text
stringlengths
256
65.5k
I have 8 plots that I want to compare with 8 different but corresponding plots. So I set up 8 subplots, then try to use axes_grid1.make_axes_locatable to divide the subplots. However, it appears that when I use the new_vertical function it returns something of the type matplotlib.axes.AxesSubplot. Here's the code I hav...
maccam Re : Résolu : Dual Boot Windows 8 / Ubuntu 13.04 + SSD + HDD un petit up car je n arrive tjrs pas à installer mon dualboot Personne habite à Montréal par hasard pour m aider Hors ligne FelixP Re : Résolu : Dual Boot Windows 8 / Ubuntu 13.04 + SSD + HDD Je ne m'y connais pas trop de ce côté, mais si le CD se lanc...
When a client makes a get request to '/test' a simple string is exchanged between node.js and python via AMQP, but I don't know how to transmit the response back to the client (since the process is async). test.py import pika connection = pika.BlockingConnection(pika.ConnectionParameters( host='localhost')) chann...
I need a temporary table in my programme. I have seen that this can be achieved with the "mapper" syntax in this way: t = Table( 't', metadata, Column('id', Integer, primary_key=True), # ... prefixes=['TEMPORARY'], ) Seen here But, my whole code is using the declarative base, it is what I understand, a...
Here's the problem shown in Python shell: In [32]: from osgeo import gdal In [33]: geotiff = '/Users/calvin/work/luc/proj_public/media/GLO /Users/calvin/work/luc/proj_public/media/GLOBCOVER_L4_200901_200912_V2.3.color.tif /Users/calvin/work/luc/proj_public/media/GLOBCOVER_L4_200901_200912_V2.3.color_orig.tif /Users/cal...
jQuery API Update: offline and anywhere(edit) The key change I've made is to de-couple the API search engine from the front end. What this has resulted in, is a fairly simple API to create any number of bespoke front ends to the jQuery API browser. Since the engine now runs separately, it's been easy to create differen...
Let's say I have a class Rectangle(object): def __init__(self, length, width, height=0): self.l = length self.w = width ...
The source for Fitbit is open - please contribute. Fitboard allows you to visualize Steps Calories Distance Floors Active Score Minutes Asleep Sleep Efficiency Times Awakened And a multi point graph showing Minutes Sedentary Minutes Lightly Active Minutes Fairly Active Minutes Very Active Over 1 Day 7 Days 1 Month 3 Mo...
Extrinsic Visitor Pattern in Python with support for Inheritance In python you often find a slightly modified version of the classicVisitor Pattern. Instead of using a accept(self, visitor)methodin the target class to tell the visitor what kind of object to handle, theaccept method is replaced with introspection in the...
Apart from asking Guido directly, I don't think your going to find any explanation of this. The syntax has been around from the very beginning. The earliest version of python sources I could find was python 1.0.1. Looking at the changelog in the Grammar file we find references to even earlier versions. In version 2 of ...
I am using python and specifically MySQLdb to fill a database, although a code that was working until recently is throwing up an error after moving servers at work: The code is: cursor.execute("""SELECT Entry, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P FROM evaluation""") result = cursor.fetchall() for record in re...
Traditional thinking judges the merit of a computing language on objective, rather mathematical dimensions: how object-oriented is it? Are its constructs orthogonal? Does the syntax admit ambiguities? While that's appropriate for abstract analysis, when we work or play with a computing language in our daily life, we li...
This is an awful pun, but I've recently written the following script to help with some of the work of back-porting patch sets to maintenance branches. Basically you pass it a bunch of commit identifiers and it cherry picks them all in order. #!/usr/bin/python import os import sys import subprocess for commit in sys...
As Jerry explained, all math operations treat numbers as floating point... even numbers stored as integers. This was my first attempt: 1 rem 2 rem fizzbuzz in commodore basic 3 rem 10 t = time 20 for i = 1 to 100 30 n = i / 15 :if n = int(n) then print "fizzbuzz" :goto 70 40 n = i / 3 :if n = int(n) then print "fizz" :...
I'm writing an article on Lychrel numbers and some people pointed out that this is completely useless. My idea is to amend my article with some theories that seemed useless when they are created but found use after some time. I came with some ideas like the Turing machine but I think I'm not grasping the right examples...
Assumed prior knowledge: understand error-m, maybe-m, and identity-m. State-m is kind of confusing in haskell for beginners, at least it was for me. Here it is in python, if it helps. It helped me a lot. think of state-m = reader-m + writer-m. let’s start with writer-m, it’s easiest. Writer monad lets you compose funct...
Using PyGTK, I am trying to make a ListStore with CheckButtons in the first column and a "Select All" CheckButton similar to what GMail and Yahoo! Mail have for quickly selecting or deselecting every CheckButton in the list. If it is toggled, all the buttons in the list should change to match it. It should also change ...
I am creating a Rails app which is hosted on Heroku and that allows the user to generate animated GIFs on the fly based on an original JPG that's hosted somewhere in the web (think of it as a crop-resize app). I tried Paperclip but, AFAIK, it does not handle dynamically-generated files. I am using the aws-sdk gem and t...
malbo Re : Windows 8.1+Ubuntu... Ton Boot-Info est là : Boot Info Script e7fc706 + Boot-Repair extra info [Boot-Info 27Sep2013] ============================= Boot Info Summary: =============================== => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 175118912 of the same hard ...
Hernou Carte graphique Intelcore3 bonjour, je poste un message ici, car j'ai remarqué que bien que ma carte graphique à l'air de fonctionner correctement avec bien des jeux, elle pose problème lors du lancement de certains d'entre eux comme GTA2. lio@Karkatouf:~$ lspci -nn | egrep "VGA|Display" 00:02.0 VGA compatible c...
I am brand new to programming. I have researched this error message and I am not sure what it means or how to solve the problem; does anyone have any insight for this error. firstName=input('Enter your first name: ') middleName=input('Enter your middle name: ') lastName=input(firstName,middleName'enter your las...
I am trying to use a class to hold state instead of global variables. As an example, the object inner would like to reference the variable Outer.x (see example below) I am doing this because I have a library that requires their own class input (ros_smach) class Outer: def __init__(self): self.x = 5 class Inner:...
I'm trying to compare a generated image in Python with an image/photo in a file. The best way I got to make this so far is by generating a figure in Matplotlib and then convert it to a numpy array and compare the values with the values I get from my image. I got the following code to convert a Matplotlib figure to a 3D...
It's child easy, but not googleable yet. I used reportlab - a handy, pure-python pdf library. Here are the steps: Checkout reportlab into your app directory svn co http://www.reportlab.co.uk/svn/public/reportlab/trunk \ reportlab Write some pdf-generation code, like import wsgiref.handlers from google.appengine.ext im...
hlou [Résolu]Xubuntu echec du traitement des paquets Bonjour, J'ai installé xubuntu 12.04.1 et à par les mises à jour systemes, je ne peux plus rien installer via la logithèque ou synaptic. Le téléchargement de paquets se lance et au bout de quelques minutes, un message me dit "échec de traitement des paquets :l'instal...
hectorau_ben Re : [tuto]Installation de Dofus 2.0 par paquet debian et rpm (pour la doc) Même si tu m'as toujours pas répondu, dofus marche parfaitement, sans AUCUN ralentissement, mais le son ne marche pas ... Même si l'Updater est ouvert et que j'ai activé le son dans le options et biensûr, je n'ai pas trouvé la solu...
How can I give a variable to a function when I bind something? As a simple example: def test(self): self.MyTextCtrl.Bind(wx.EVT_TEXT, self.something, AnyVariable) def something(self, event, x) # do something print x As you see, I want to give the value "AnyVariable" to the function "something" so that it w...
How do you do a text-to-columns conversion in Google Spreadsheets? For example, I have the following data string in one cell: 5,233,6,2,6,7,2,2,6,6 I want to break it apart by the comma separator into columns. Leverage Google Apps Scripting to extend the UI Text to Columns, is a very handy feature and one of the reason...
ubuntiny [Résolu] Problème avec arista Salut à tous! Voilà le problème: j'ai essayé d'installer arista, un encodeur permettant de manipuler les vidéos (encodage, modification du format de lecture etc...), mais après installation, lorsque je clique sur le raccourci arista situé dans le menu applications de gnome, ou lor...
In SQLAlchemy Declarative, how do I set up default values for columns, such that transient or pending object instances will have those default values? A short example: from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class A(Base): __tabl...
nathéo Re : /* Topic des codeurs [8] */ Arf, j'ai oublié de traiter son cas je crois. C'est rarement par le sarcasme qu'on élève son âme.Le jus de la vigne clarifie l'esprit et l'entendement. De quoi souffres-tu ? De l'irréel intact dans le réel dévasté ? N'oubliez pas d'ajouter un [RESOLU] si votre problème est réglé....
Extensions firebird_fdw 0.1.2 A PostgreSQL foreign data wrapper (FDW) for Firebird README Contents Firebird Foreign Data Wrapper for PostgreSQL This is an experimental foreign data wrapper (FDW) to connect PostgreSQL to Firebird. It provides basic functionality, including both read (SELECT) and write (INSERT/UPDATE/DEL...
In my C/C++ program, I'm using OpenCV to capture images from my webcam. The camera (Logitech QuickCam IM) can capture at resolutions 320x240, 640x480 and 1280x960. But, for some strange reason, OpenCV gives me images of resolution 320x240 only. Calls to change the resolution using cvSetCaptureProperty() with other reso...
This year I have tried to make it a habit to track how much time I spend on numerical programming. I’d like to put in 10 hours or so a week and this lets me know if I am doing that. Anyway, I went back to my records from February when I was developing the Algebraic Mesher in C. It took me 20.9 hours to complete, with a...
I think that the above answers missed the key point. Let's have a class with a method: class A(object): def m(self): pass Now, let's play with it in ipython: In [2]: A.m Out[2]: <unbound method A.m> Ok, so m() somehow becomes an unbound method of A. But is it really like that? In [5]: A.__dict__['m'] Out[5...
I'm try to write a fast fibonacci algorithm in python that can be used for extremely large values, but I keep getting negative values, so I'm assuming its not properly using longs? fibonacci_matrix = numpy.matrix([[1,1],[1,0]]) def fib(n): return (fibonacci_matrix**(n-1)) [0,0] fibonacci_matrix2 = numpy.matrix([[1L,1...
payment-tags.py @register.simple_tag def has_purchased(user_id): payments = Payment.objects.all(user__id=user_id) return PaymentObjects(payments) class PaymentObjects(template.Node): def __init__(self, payments): print 'inside init' self.payments_obj = payments def render(self, context): print 'insi...
I have many files using classes with the following syntax: o = module.CreateObject() a = o.get_Field and now the implementation has changed from 'get_XXX' and 'set_XXX' to just 'XXX': o = module.CreateObject() a = o.Field This implementation is an external package, which I don't want to change. Is it possible to writ...
I've spent couple of hours and still unable to get the best result. However, the task is very easy but it seems I'm missing something or simply slow today. So, we have a simple tree structure of objects. Object in formal looks like this: node: name {str} value {str} children {list} node, nod...
it seems bizarre, but when deleting and element in a document and try to remove the _id from GridFS (removing a product + its image), it gives me an error, because the picture removed si NOT the element's picture! the id of the picture i've made using using the name of the user + time.time here is the code: class Vente...
This is the task I was given after completing my program. I don't have a clue what procedures and functions are to be honest. Therefore I have no clue on how to break down my program into different elements of it. #paint calculator RoomWidth = 0 RoomHeight = 0 RoomTotal = 0 RoomPaint = 0 RoomWidth = float(input("Ent...
n3o51 Re : ADesk Bar : Barre de lancement rapide [python/gtk/cairo] Ah ok je regarde ça merci, bone je n'arrive pas as avoir les options du plugins c'est ou ? je clique dessus est pas possible de modifier Dernière modification par n3o51 (Le 08/02/2012, à 21:10) Welcome to the real world ________________________________...
I've been using PHPWord for docx files generation. And it's been working great. But now I have the need to also make available some of those files on a pdf version. After a few research I found PyODConverter which use OOo. Seemed quite a good option since I don't want to depend on third party web services. I tried it o...
I have a python script and I wanna know if the request is from web or from command line. How can I do this? When run as a CGI, environment variables such as You can check this like this: import os if os.getenv("REQUEST_METHOD"): print("running as CGI") else: print("not running as CGI")
I have a function in python that return an inner function def parent_func(func): def decorator(a,b): return a + b return decorator for simplify lets consider this code def in_func ( a, b) return a*b child = parent_func ( in_func) Does someone know a way to get the "func" attribute of parent_func fro...
I want to iterate over everything in a list except the first few elements, e.g.: for line in lines[2:]: foo(line) This is concise, but copies the whole list, which is unnecessary. I could do: del lines[0:2] for line in lines: foo(line) But this modifies the list, which isn't always good. I can do this: for i ...
Here is another implementation (python 2; would require some minor rewrites to get it working in 3) that is much faster than OJW's, which seems to loop through the dictionary for each word, despite the comment/implication to the contrary. Timing of OJW's script on my machine, with an 80,000 IOP SSD: real 0m3.264s us...
chaoswizard Re : TVDownloader: télécharger les médias du net ! Une idée ca pourrait sympas aussi de récupérer a partir de daylimotion ou youtube : vous savez genre des chaines de groupe : http://www.youtube.com/user/ProdigyChannel exemple france inter : http://www.dailymotion.com/franceinter C'est jouable. Dans ce cas ...
Due to memory pools (g_slice), I get possibly lost in my code. My question is: is there anything I could do in my code to avoid leaking or is this purely a GLib issue? All of these are reported as 'possibly lost'. ==2552== ==2552== 744 bytes in 3 blocks are possibly lost in loss record 6 of 8 ==2552== at 0x40235BE:...
I want to save the user input in my view, I don't know how to do it redefining the searchview so I did this: request.session['q']=request.GET.get('q') from haystack.views import SearchView search_view = SearchView(template = template_name) return search_view(request) but I got this error: Traceback (most recent ...
adelmorsux Bug Radio tray... Bonjour à toutes et tous, Sur QQ 12.10 beta depuis 15 jours et apres qqes bidouilles je voulais retrouvé toutes mes radios que j’écoute sur Radio tray et là.... rien... En faite si, j'ai tester l'install via la logiteque puis sous console et même résultat RIEN moi@moi:~$ sudo apt-get instal...
At the moment i am learning python and i have been experimenting compiling python code. The problem i am having is, once the script is compiled, it does not respond. I learnt that an IDLE-X extension can help fix this problem, but the same error occurs after compilation. I am running Windows 7 Ultimate 64Bit, wxPython ...
#2626 Le 05/01/2013, à 15:18 rvhm Re : TVDownloader: télécharger les médias du net ! bjr j'ai commencé à mettre les dépendance de tvdownloader il me manque "libkrb53 (>= 1.6.dfsg.2)" ou je pourrais le trouver ? merci Hors ligne #2627 Le 06/01/2013, à 18:23 rvhm Re : TVDownloader: télécharger les médias du net ! bonjour...
I am trying to create a function to calculate the moving average on a set of data. This is the function: def averaged_rel_track(navg, rel_values, nb, zeroindex): #function to average the relative track values for each blade. This is #dependant on the number values specified by the user to average over in a ...
How can I protect my variables from this kind of attack: MyClass.__dict__ = {} MyClass.__dict__.__setitem__('_MyClass__protectedVariable','...but it is not') The above changes the variable dictionary and after that it is childs play to change all the variables. The upper line is crucial for this to work. The above doe...
I am learning Python and trying to figure out an efficient way to tokenize a string of numbers separated by commas into a list. Well formed cases work as I expect, but less well formed cases not so much. If I have this: A = '1,2,3,4' B = [int(x) for x in A.split(',')] B results in [1, 2, 3, 4] which is what I expect, ...
Topic: iRedMail in jail? Do iRedMail is working in jails? ---- Urgent issue? Pay iRedMail developer to solve it remotely at $39. Works on Red Hat Enterprise Linux, CentOS, Debian, Ubuntu, FreeBSD, OpenBSD You are not logged in. Please login or register. Do iRedMail is working in jails? ---- Sorry, you didn't explain cl...
Ole Zorn’s Pythonista is one of my favorite, most-used iOS apps to date. Combining a Python interpreter with scripting capabilities that take advantage of iOS through native interface elements and features like URL schemes, Pythonista has completely reinvented my iOS workflow. With Pythonista, I can work from the iPad ...
I've loaded an RGB image with PIL/OpenCV, and I'd like convert all its channels into a single 1x(3*width*height) sequence into order to feed it to an ANN. I found I can simply do: rlist = [] glist = [] blist = [] for i in xrange(im.width): for j in xrange(im.height): r,g,b = im[i,j] rlist.append(r) ...
In previous articles, I have worked through the archives of the XML-SIG mailing list to gather some of the most useful bits of code and threads of discussion that are still relevant. The previous articles are "Gems From the Archives " (published Apr. 9, 2003) and "More Gems From the Mines " (published Nov. 12, 2003). I...
"jcurry" wrote: The wiki page looks useful but a couple of lines of instruction would be helpful on how to add to the page. I can see how to add a comment but not sure how to modify the page to add to the bottom (rather than just a comment)?? Cheers, Jane evt.component = "Node: %s:%s" % (evt.bigipNotifyObjNode, evt.big...
galanga Re : Qarte arte.tv browser (ex Qarte+7) @Christophe: content de voir que cela a commencé à fonctionner... Pour le second cas qui fait une erreur, c'est parce qu'il manque un back slash sur le guillemets fermant de ...3789-visual-crop-medium.jpg ; essayez avec cela : items.append("<item>\n <title>Dominique ...
How can I convert: u'2012-11-07T13:25:10.703Z' to Python datetime? EDIT I intend to use something like this: >>> from datetime import datetime >>> datetime.strptime('2011-03-07','%Y-%m-%d') datetime.datetime(2011, 3, 7, 0, 0) but how can I change the second argument to accommodate my date format?
How do you use glBufferData() in the PyOpenGL python bindings to OpenGL? When I run the following code import sys from OpenGL.GL import * from PySide.QtCore import * from PySide.QtGui import * from PySide.QtOpenGL import * class SimpleTestWidget(QGLWidget): def __init__(self): QGLWidget.__init__(self) d...
I have a wrapper function that returns a function. Is there a way to programmatically set the docstring of the returned function? If I could write to __doc__ I'd do the following: def wrapper(a): def add_something(b): return a + b add_something.__doc__ = 'Adds ' + str(a) + ' to `b`' return add_someth...
In many different statistical methods there is an "assumption of normality". What is "normality" and how do I know if there is normality? The assumption of normality is just the supposition that the underlying random variable of interest is distributed normally, or approximately so. Intuitively, normality may be unders...
(Note: It might help if you explain why you want this. There might be a better way to approach the underlying problem.) Is this possible? Not with ForeignKey alone, because you're overloading the column values with two different meanings, without a reliable way of distinguishing them. (For example, what would happen if...
Topic: [HOWTO] Configure Mailman on CentOS/RHEL 5 Follow this configurations after installing iRedMail & Mailman. * below method was only tested with iRedMail 0.6.1 & 0.7.0 Assumptions: - Your server's FQDN is mail-server.mydomain.com - iRedMail & Mailman installed on the same server /etc/httpd/conf.d/mailman.conf # Re...
The only way I can find would require you to write a bit of Python code. This is the site that provides a module for Pythonhttp://code.google.com/p/pygooglevoice/ This page gives you details on how to set a message to read. Look for the Mark function under the Message section.sphinxdoc. github.com/pygooglevoice/api.htm...
I am looking to be able to write an alternative code to the built in count in python: This code works def count(element,seq): """Counts how often an element occurs ...in a sequence""" mycount = seq.count(element) return mycount but I would like to write it in a for loop (or another way?), I've got this...
After reading the excellent SO post, I tried crafting a module level metaclass: def metaclass(future_class_name, future_class_parents, future_class_attrs): print "module.__metaclass__" future_class_attrs["bar"]="bar" return type(future_class_name, future_class_parents, future_class_attrs) __metaclass__=meta...
toma222 [HOW TO] adesklets : configuration des desklets Il existe désormais un article sur le wiki concernant Adesklets donc je vous conseille de vous y fier, ce tutoriel n'étant plus mis à jour. J'ouvre ce deuxième post au sujet de adesklets, afin de permettre une meilleure lisibilité de l'ensemble.Celui-ci a donc pou...
After studying this page: I am hoping to find some setup.py files to study so as to make my own (with the goal of making a fedora rpm file). Could the s.o. community point me towards some good examples? Complete walkthrough of writing If you'd like a real-world example, I could point you towards the These aren't simple...
I'm a code banger from way back trying to learn good Python style. Here is my attempt at the classic game. I'm trying to learn Tk, because I have a couple codes that need GUIs. Any suggestions or comments? from tkinter import * import random # use a class definition to hold all my functions class MyApp(Tk): def __i...
jopiou Probleme AMSN installation Bonsoir voila mon souci je cherche a installer amsn car j'ai pu lire que l'on peut utiliser les webcam avec ^^ enfin voila je cherche le moyen de le trouver deja je sais pas trop ou l'avoir si vous pouviez m'aider a le chercher et le mettre en place je serais trés content je vous remer...
mastergb Vpnautoconnect 2.X(Nouvelle version ,bugs, demande d'aide: c'est ici!) Bonjour à tous, Suite à l'énorme thread précédent (et à la demande de ljere) , j'aimerais reprendre un sujet vraiment dédié a vpnautoconnect. Le logiciel n'est plus à présenter. On l'aime (ou pas), il permet entre autre de répondre à une la...
use the following search parameters to narrow your results: e.g. subreddit:aww site:imgur.com dog subreddit:aww site:imgur.com dog see the search faq for details. advanced search: by author, subreddit... ~6 users here now A subreddit dedicated to the GNU Radio project and any software-define radio (SDR) related content...
I have application that need to calculate the rolling sum of Pandas multilevel dataframe , and I want to find a way to shorten the processing time . mul_df() is the function to create the demo multilevel dataframe. import itertools import numpy as np import pandas as pd def mul_df(level1_rownum, level2_rownum, col_num)...
Ah, so you want to position the UILabels in the middle of the container view (both horizontally and vertically)? I have rephrased my answer so it will make more sense to future readers. My code is assuming that you have the 3 IBOutlets set up: UIView *containerView; //Your nice view containing the two textfields. UILab...
here is my code and my issue. import web render = web.template.render('templates/') urls = ( '/(.+)', 'index' ) class index: def GET(self, lang): return render.index(lang) if __name__=="__main__": app = web.application(urls, globals()) app.run() and my index.html is this one: $def with ...
I was trying to hack up a tool to visualize shaders for my game and I figured I would try using python and cocoa. I have ran into a brick wall of sorts though. Maybe its my somewhat poor understand of objective c but I can not seem to get this code for a view I was trying to write working: from objc import YES, NO, IBA...
I'm making a platformer in Pygame. One of the sprites I'm using is a flag, and I want to detect if the player collides with the flagpole (just like in Super Mario Bros). The problem is that the image is wider than the flagpole, because of the flag itself. I build the Rect for every sprite based on their image, just lik...
I have an existing Python application which servers a bunch of files via a Bottle.py service. Now I have to change the path the server should react to. The obvious way would be to change the @route statement and prepend the new path to each route. But I got the constraint that the old path should keep on working for a ...
Python Scripts as a Replacement for Bash Utility Scripts To demonstrate the power of combining Python scripts in a modular andpiped fashion, let's expand further on the problem space. Let's findthe top five users of the service. head is a commandthat allows you tospecify a certain number of lines to display of the stan...
Issues ZF-2375: Zend_Db_Statement_Mysqli::_execute() causes too much memory to be allocated. Description Zend_Db_Statement_Mysqli::_execute() calls mysqli_stmt_bind_result() *before* calling mysqli_stmt_execute(), and it does not call mysqli_stmt_store_result() or mysqli_stmt_free_result(). Modify the following test ca...
I'm trying to scrape information about new album releases of a site, and I'm handling this via Nokogiri. The idea would be to create a nice array that would contain items like so [ 0 => ['The Wall', 'Pink Floyd', '1979'], 1 => ['Led Zeppelin I', 'Led Zeppelin', '1969'] ] This is my current code. I'm a total ruby newbie...
Open up /usr/share/software-center/softwarecenter/backend/scagent.py and edit the beginning of this function, so that it says: def query_exhibits(self): import urllib, json class Obj: def __init__(self, obj): self.obj = obj def __getattr__(self, name): if name[:2] == "__": return obj...
I am trying to executemany in python with on duplicate key update, with the following script: # data from a previous query (returns 4 integers in each row) rows = first_cursor.fetchall() query=""" INSERT INTO data (a, b, c) VALUES (%s,%s,%s) ON DUPLICATE KEY UPDATE a=%s """ second_cursor.executemany(query,rows) I'm ge...
smo Re : Gmediafinder : Youtube/dailymotion/vimeo.. sans flash et bien plus.... ola ok cool je vais regarder ca apres, la j en fais un "normalement" c est un peu (beaucoup...) plus complique pour les ppa j vous tiens au jus ! et whoue si vous avez des idees, hesitez pas hein ... j aimerais bien avoir des visualisations...
I'm writing a log collection / analysis application in Python and I need to write a "rules engine" to match and act on log messages. It needs to feature: Regular expression matching for the message itself Arithmetic comparisons for message severity/priority Boolean operators I envision An example rule would probably be...
Custom NotFound message Other languages: français | ... Problem How to customize notfound and other messages? Solution import web urls = (...) app = web.application(urls, globals()) def notfound(): return web.notfound("Sorry, the page you were looking for was not found.") # You can use template result like bel...
Django, heroku & S3 FTW 08 Feb 2012 Outdated Heroku now automatically runs `collectstatic` on deployment. By the way, I encourage you to put all your environment specific configs (like database dsn, debug…) into environment variables. Today I’ll show you my tips backed from a django project deployment over heroku (appl...
AnsuzPeorth Re : [Script] reconnaissance vocale avec google Je voulais aider mais, je viens de voir mes intérêts pas mal modifiés (girl power tongue ).... Euh, non, suis pas d'accord, et mon beta testeur ?? Qui va apposer le HUG (HizokaUsineaGaz) ??? T'as raison, ca tiens plus chaud une femme qu'un pc Hors ligne n3o51 ...
Retrieving Mails with Twisted Programming a POP3 client to retrieve mails in the Twisted framework is more complex and takes more code. The logic to retrieve mails is all in a class that subclasses POPClient (from twisted.mail.pop3client). Due to the event-driven nature of Twisted, it's easier to define a method for ea...
Chris__ Re : gReemote, télécommande + prog TV pour Freebox HD Merci tocks. Je pense aussi que la meilleur des solutions serait de minimiser dans la zone de notif quand on ferme la fenêtre. Je vais regarder ça dès que j'aurai un peu de temps. Pour réduire la fenêtre j'ai peur que ca commence à compliquer pas mal l'appli...
chaoswizard Re : TVDownloader: télécharger les médias du net ! Une idée ca pourrait sympas aussi de récupérer a partir de daylimotion ou youtube : vous savez genre des chaines de groupe : http://www.youtube.com/user/ProdigyChannel exemple france inter : http://www.dailymotion.com/franceinter C'est jouable. Dans ce cas ...
I have multiple arrays without column or row names, and I would like to combine them using something like numpy.vstack() or numpy.hstack(). import numpy as np a1 = np.array([1,2,3,4]) a2 = np.array([5,6,7,8]) a3 = np.vstack([a1,a2],dtype=[('RowName1','double'),('RowName2','double')]) yielding: TypeError: vstack() got ...
This may be a little overkill, but the proper way to find your intersection point, once you have split up your curve into chunks, is to see if any segment from the first chunk intersects with any segment from the second chunk. I am going to make myself some easy data, a piece of a prolate cycloid, and am going to find ...
Author N0T0R10US 1.2 Alpha Submission date 2012-02-10 14:32:13.606971 Rating 7346 Matches played 450 Win rate 74.44 Use rpsrunner.py to play unranked matches on your computer. import random, math if input == "": padding = 8.0 decay_model = 0.67 decay_strategy = 0.95 history = [] weight_strategy = 1 ...
FreeRADIUS is a high-performance and highly configurable free Remote Authentication Dial In User Service (RADIUS) server, designed to allow centralized authentication and authorization for a network. A buffer overflow flaw was discovered in the way radiusd handled the expiration date field in X.509 client certificates....