text
stringlengths
256
65.5k
bowmore Re : Qarte arte.tv browser (ex Qarte+7) Si je lance python /usr/bin/qarte J'obtiens python /usr/bin/qarte (qarte:23575): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « pixmap » Affiché une quinzaine de fois, puis Qarte-1 démarre bien. Dans le terminal, il y a ça: 15:33:40: INFO ...
AuthorPosts June 17, 2013 at 4:25 pm #24939 Hey, I would like to change the english text to danish on this page, such as you are here, home, reply etc. How do I do that? My website link is http://col323webdesign.dk/projekt51/indlaeg/indlaeg/ Mika June 18, 2013 at 6:22 am #125241 Hi, You are here: // Home Edit framework...
The XML file defines a set of keys you can use throughout your application to store user preferences. In the element schema, you will notice two attributes: id and path. The id is what you use to refer to the schema in the code when instantiating the settings object. The path is where the keys are stored. You can find ...
Can I somehow use u1sdtool to find out which files have I published on Ubuntu One (and possibly with their public URL)? Now, I have to use the web interface for that. You can't use u1sdtool for this, but you can use from twisted.internet import glib2reactor glib2reactor.install() from dbus.mainloop.glib import DBusGMai...
Here is what I currently have: conn = sqlite3.connect(dbfile) conn.text_factory = str ## my current (failed) attempt to resolve this cur = conn.cursor() data = cur.execute("SELECT * FROM mytable") f = open('output.csv', 'w') print >> f, "Column1, Column2, Column3, Etc." for row in data: print >> f, row f.close() It ...
here is the source code for asteroids game. i used this tutorial http://comp4431.wordpress.com/2010/08/11/tut-wk-3-asteroids/ followed everything as closely as i could. besides some of the missing fetures like fire, what is wrong with it? it wont display anything but the starmap. BTW - New to python import pygame, rand...
I have a file with multiple data structures in it like so: eventTimestamp: 2010-03-23T07:56:19.166 result: Allowed protocol: SMS payload: RCOMM_SMS eventTimestamp: 2010-03-23T07:56:19.167 result: Allowed protocol: SMS payload: RCOMM_SMS eventTimestamp: 2010-03-23T07:56:19.186 result: Allowed protocol: SMS payload: SMS-...
The TurboGears docs show how to assign validators for individual parameters in the validate decorator like this: @validate(validators={'a':validators.Int(), 'b':validators.DateConverter()}) @error_handler() def f(self, a, b, tg_errors=None):     # Now a is already an integer and b is already a datetime.date object,   ...
AlexandreP Re : Generateur de sources.list en Francais Euh... en même temps, je suis pas totalement sûr que ce soit ça : si on regarde le message d'erreur, Ubuntu tente de rejoindre l'adresse IP 1.0.0.0. Je doute très très fortement que se soit la bonne adresse du serveur Un connaisseur, siouplease ? «La capacité d'app...
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...
I have a hard time to model my applications data to get reasonable performance. It is an application that track costs within a group of people and today I have the following entities: class Event(db.Model): # Values name = db.StringProperty(required=True) password = db.StringProperty(required=True) class Pe...
I have two simple models, one representing a movie an the other representing a rating for a movie. class Movie(models.Model): id = models.AutoField(primary_key=True) title = models.TextField() class Rating(models.Model): id = models.AutoField(primary_key=True) movie = models.ForeignKey(Movie) rating...
I want to use sqlalchemy in a way like this: email1 = EmailModel(email="user@domain.com", account=AccountModel(name="username")) email2 = EmailModel(email="otheruser@domain.com", account=AccountModel(name="username")) Usually sqlalchemy will create two entries for the account and link each email address to this. If i ...
I have the following model classes: class Category(models.Model): category = models.CharField('category', max_length=200, blank=False) class Book(models.Model): title = models.CharField('title', max_length=200, blank=False) categories = models.ManyToManyField(Category, blank=False, through='Book_Category') ...
I'm trying to get an abstract model working in Django and I hit a brick wall trying to set the related_name per the recommendation here: http://docs.djangoproject.com/en/dev/topics/db/models/#be-careful-with-related-name This is what my abstract model looks like: class CommonModel(models.Model): created_on = models...
How export generated sound into audio file Hi guys, i’ve a problem. I created a keyboard application that records what i play, but i can listen the melody only through the max application. I just want to export the sound into an audio file, for example mp3 file. How can i do? Edit: oh well, i found the way to export th...
Leo 7 Re : A quoi ressemble votre environnement - printemps/été 2012 J'adore ton unity Mario_26 Est-ce que tu peux me donner le lien du wall STP, je le touve très zoli. Merci d'avance A+ hp 625: Ubuntu LTS xfce / Mac Mini ppc G4: Debian stable xfce / Les choses les plus simples sont les meilleures ! Hors ligne Major Gr...
1. Úvod 8.2 Git a ostatní systémy - Přechod na systém Git Přechod na systém Git Máte-li existující základ kódu v jiném systému VCS, ale rádi byste začali používat Git, můžete do něj svůj projekt převést. Existuje přitom několik způsobů. V této části se seznámíte s několika importéry pro běžné systémy, které jsou součás...
To write a lazy function, just use yield: def read_in_chunks(file_object, chunk_size=1024): """Lazy function (generator) to read a file piece by piece. Default chunk size: 1k.""" while True: data = file_object.read(chunk_size) if not data: break yield data f = open('reall...
I ran a recent kernel and world build from HEAD: hades!matthias:~ % uname -a DragonFly hades 2.7-DEVELOPMENT DragonFly 2.7-DEVELOPMENT #0: Sun Sep 26 19:12:12 CEST 2010 root@hades:/usr/src/sys/compile/T42 i386 Installed Intel E1000 card works with em(4). The built-in Atheros card works fine with ath(4). I use WP...
bidou10 mise à jour de sécurité importante bonjour à tous, depuis un petit moment, j'ai une mise à jour de sécurité importante qui ne veut pas se faire, elle apparait à chaque fois décochée. j'ai essayé cette commande dans le terminal, mais je ne suis pas très fort dans ce domaine et j'aimerai avoir un petit coup de ma...
For some inexplicable reason the capital d key on my Ubuntu system is no longer producing output. Hitting caps lock and then d produces a D. I've tried multiple keyboards and the issue is the same. There's nothing bound to Shift+d under System > Preferences > Keyboard Shortcuts. xev produces the following: shift + a Ke...
Faulty code: pos_1 = 234 pos_n = 12890 min_width = len(str(pos_n)) # is there a better way for this? # How can I use min_width as the minimal width of the two conversion specifiers? # I don't understand the Python documentation on this :( raw_str = '... from %(pos1)0*d to %(posn)0*d ...' % {'pos1':pos_1, 'posn': pos_n}...
Perl 5's type system has flaws. Those flaws are fixable (with a supreme act of will, lots of patience for discussion on p5p, and ... years of waiting for the state of the art in writing Perl 5 code to catch up with the historical baggage of a decade and a half of buggy code). Are they preventable? One sign of effective...
#1 Kopretinka žeby jejím jménem? vysledek:=ExtractText(zadani,znak1,znak2); napriklad: vysledek:=ExtractText('nejaky text','j','x'); melo by to vratit: vysledek='aky te' #1 wrany Skutečné parametry funkcí a procedur jsou v jazyce C předávány pouze hodnotou, tj. hodnota skutečných parametrů je zkopírována na zásobník (p...
>>> def fun(x=0,y=1,z=1): ... print x,y,z ... >>> func = fun >>> func.func_code.co_argcount 3 >>> func.func_code.co_varnames ('x', 'y', 'z') You can also try inspect module >>> import inspect >>> inspect.getargspec(func).args ['x', 'y', 'z'] >>> inspect.getargspec(func) ArgSpec(args=['x', 'y', 'z'], varargs=None, k...
aeacides Re : Ultimate Smash Friends: un smash bros like en python Kewl! Bon boulot! De mon côté il me reste une semaine et demi de labeur, et après je devrais pouvoir m'y mettre :- ) @+ http://www.q-be.ca Hors ligne tshirtman Re : Ultimate Smash Friends: un smash bros like en python cool . Mon petit frère (qui a dessi...
This works: require 'csv' file = CSV.open(filename) puts file.shift This does not: require 'csv' file = CSV.open(filename, :headers=>true) puts file.shift I get: C:/Program Files (x86)/IronRuby 1.1/Lib/ruby/1.9.1/csv.rb:2177:in `convert_field s': undefined method `with_index' for IronRuby.Builtins.Enu...
My application can authenticate via openid and oauth (facebook, twitter, etc) and also with its own authentication system. I previously switched hashing from MD5 to SHA1 and during migration I had to customize so that accounts could verify both with MD5 and SHA1 and now I've removed the MD5 completely. I read here some...
I'd like to save the site that a user came from when they sign up. I am interested in the HTTP referer of the first page the user saw on my site before signing up. How can I implement it? First, save the referrer to the session. You should probably do this in some kind of middleware: import urlparse class SaveReferrerM...
Hi! I'm a full stack developer currently working primarily with Ruby on Rails and Ember.js. I live in the Czech Republic, love reading and learning new things. I'm very passionate about technologies and computing in general. You can get in touch with me at mekishizufu@gmail.com Written by Jiří Pospíšil, a full stack de...
Background The algorithm manipulates financial analytics. There are multiple lists of the same size and they are filtered into other lists for analysis. I am doing the same filtering on different by parallel lists. I could set it up so that a1,b1,c2 occur as a tuple in a list but then the analytics have to stripe the t...
I am trying out to build full-text searching by using sphinx search, postgresql & django based on this tutorial: http://pkarl.com/articles/guide-django-full-text-search-sphinx-and-django-sp/.All setup done for sphinx & postgresql and it works but I got trouble when reach on Sample Django code part. In django views & ur...
doudoulolita Faire une animation sur la création de jeux vidéo libres Dans le topic Création de jeu vidéo libre - Appel à candidatures, j'ai découvert le créateur de jeu de Ultimate Smash Friends, Tshirtman. Voici ce que je lui ai écrit: Je cherche un jeu que notre Espace Public Numérique pourrait proposer aux jeunes s...
I find WReach's answer massively misleading. I'm not the only one. So let's analyze some of his claims and come to a fairer conclusion. First, his code: function allOdd(words) { var result = true; for (var i = 0; i < length(words); ++i) { var len = length(words[i]); if (!odd(len)) { result = false; ...
I proposed to implement this feature in http://brainstorm.ubuntu.com/idea/27164/, but it was marked as already implemented. Could someone shed light on how i can do it? I would like a shortcut to a specific connection (vpn or broadband) on my panel (one click connect). You should be able to create shortcuts that call H...
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é....
Author dllu Submission date 2011-05-21 22:50:10.234342 Rating 4503 Matches played 7157 Win rate 37.59 Use rpsrunner.py to play unranked matches on your computer. import random #hopefully fixes a stupid bug in Algo Sniffer 3.2, 3.1 and 3 #guesses the algorithm that the opponent is using #should always beat play last inp...
This question already has an answer here: I'm a bit confused about how/why so many python developers use if not in their conditional statements. for example, lets say we had a function, def foo(bar = None): if not bar: bar = 2 But why go about this way? I mean, wouldn't doing if bar != None or if bar is no...
I understand the basics of TastyPie, but the custom ModelResource methods are very confusing to me. I am trying to make a PATCH api call to update the password of a user and the data is not running through the set_password() method and therefore being updated with the raw value and not the HASH in the database. Here is...
Since Heroku does not allow saving dynamic files to disk, I've run into a dilemma that I am hoping you can help me overcome. I have a text file that I can create in RAM. The problem is that I cannot find a gem or function that would allow me to stream the file to another FTP server. The Net/FTP gem I am using requires ...
AlexandreP Re : Generateur de sources.list en Francais Euh... en même temps, je suis pas totalement sûr que ce soit ça : si on regarde le message d'erreur, Ubuntu tente de rejoindre l'adresse IP 1.0.0.0. Je doute très très fortement que se soit la bonne adresse du serveur Un connaisseur, siouplease ? «La capacité d'app...
The problem is that the counter variable is not shared between your processes: each separate process is creating it's own local instance and incrementing that. See this section of the documentation for some techniques you can employ to share state between your processes. In your case you might want to share a Value ins...
#!/usr/bin/python import os,sys from os import path input = open('/home/XXXXXX/ERR001268_1', 'r').read().split('\n') at = 1 for lines in range(0, len(input)): line1 = input[lines] line4 = input[lines+3] num1 = line1.split(':')[4].split()[0] num4 = line4.split(':')[4].split()[0] print num1,num4 a...
CKDevelop Re : Flee☠ un bureau en HTML/CSS Python-Webkit/JavaScript Bonsoir tous le monde Voilà enfin, on peut choisir si l'on veut utiliser Webkit ou gtkmozembed http://www.ckdevelop.org/upload/flex_de … _04e42.bz2 En ligne de commande la 1er option permet de définir si on veut activer le mode de debuggage avec une va...
I need something exactly like a SQL JOIN which cannot be done with appengine so I'm looking for a workaround. This is the query is want sorted by person.lastname downline = User.query(User.sponsor == distributor.key).fetch() for person in downline orders = model.Order.all().filter('distributor_id =' , person.key.id...
What is the best way to create rounded corners using CSS? Since CSS3 was introduced, the best way to add rounded corners using CSS is by using the If you are using a browser that doesn't implement I looked at this early on in the creation of Stack Overflow and couldn't find border-radius: Which is exactly how you'd wa...
If $n$ is an integer and $5^n > 4,000,000.$ What is the least possible value of $n$? (answer: $10$) How could I find the value of $n$ without using a calculator ? How could I find the value of $n$ without using a calculator ? \begin{eqnarray} & 5^n &>& 4.000.000\\ \Leftrightarrow & 5^n &>& 5^6 \cdot 2^8 \\ \Leftrightar...
I have gone through this website and many others but no one seems to give me the simplest possible answer. In the scrip bellow there are 2 different variables that need to be placed into a single pickle (aka 'test1' and 'test2'); but I am wholly unable to get even the simpler one of the two to load. There are no error ...
I'm currently trying to initiate a file upload with urllib2 and the urllib2_file library. Here's my code: import sys import urllib2_file import urllib2 URL='http://aquate.us/upload.php' d = [('uploaded', open(sys.argv[1:]))] req = urllib2.Request(URL, d) u = urllib2.urlopen(req) print u.read() I've placed this .py fil...
There is the task: I have a board of Lights, numbered 0,1,2,...,1023. Each Light can be either on or off. All Lights are initially off. Step 1: I flip all of the Lights starting at 0. At this point, all of the Lights are on. Step 2: I flip every second Light, starting at 0. At this point, Lights 0,2,4,6,8,... are off. ...
Numpy and Scipy Howto Stuff I’ve found useful for numpy/scipy (and matplotlib): http://pages.physics.cornell.edu/~myers/teaching/ComputationalMethods/python/arrays.html http://www.scipy.org/Cookbook/Recarray http://www.scipy.org/NumPy_for_Matlab_Users http://www.scipy.org/Tentative_NumPy_Tutorial Ways of Storing and Ac...
My computer shows windows in a somewhat tired manner :) It is a desktop with an onboard Intel card but with a discrete Nvidia card in a PCI slot. The Intel card is disabled in BIOS. Somebody suggested to run glxgears and I got this kind of an error ... $ glxgears Xlib: extension "GLX" missing on display ":0". Error: c...
Put all this code into a file called mass_replace. Under Linux or Mac OS X, you can do chmod +x mass_replace and then just run this. Under Windows, you can run it with python mass_replace followed by the appropriate arguments. #!/usr/bin/python import os import re import sys # list of extensions to replace DEFAULT_REPL...
I cannot open Update manager and Ubuntu Tweak when I open Ubuntu tweak I get this log user@laptop:~$ ubuntu-tweak Traceback (most recent call last): File "/usr/bin/ubuntu-tweak", line 124, in <module> from ubuntutweak.main import UbuntuTweakWindow File "/usr/lib/python2.7/dist-packages/ubuntutweak/main.py", lin...
I am reading the news.ycombinator RSS feed using python and storing them in a database using sqlite3. For example, a sample entry that is being fed to the database is (id,title,ur) ('3814508', 'Github is making me feel stupid(er)', 'http://www.serpentine.com/blog/2012/04/08/github-is-making-me-feel-stupider/') Where t...
What I want to be able to do is open a window with two images (one image is an exact copy of the other). Then when I click a button it changes the image on the right. I hope this is making sense. The code I have no is: from __future__ import division from Tkinter import * from PIL import Image, ImageTk, ImageFilter imp...
I'm trying to get Appstats to work on my GAE Python app. I'm using webapp2 with python 2.7. I've followed the instructions from https://developers.google.com/appengine/docs/python/tools/appstats#Setup which includes creating the appengine_config.py file: def webapp_add_wsgi_middleware(app): from google.appengine.ex...
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...
DonutMan75 [RESOLU] www et nom de domaine Bonsoir à tous, voilà j'ai une petite question qui me taraude l'esprit. Dans un nom de domaine tel que à quoi correspond le www ??? World Wide Web (cf. http://fr.wikipedia.org/wiki/Www), mais qu'est ce que ça apporte comme information ? D'après moi : - http:// >> Ca c'est le pr...
In Lucid 10.04, while trying to get spell-checking running in OpenOffice, I discovered taht I cannot open my Language Support dialog. System -> Administration -> Language Support It flashes up on the screen, shows a progress bar, and immediately disappears as the progress bar gets to the end... I've uninstalled and re-...
I created a class that has lots of numpy arrays inside. I created a __getitem__ function that attempts to return the class with the arrays indexed like so: MyClass[i].array1 is equivalent to MyClass.array1[i] I would like the _ _ getitem _ _ to return references, but they are returning copies, so that assignment doesn'...
I need to have a python client that can discover queues on a restarted RabbitMQ server exchange, and then start up a clients to resume consuming messages from each queue. How can I discover queues from some RabbitMQ compatible python api/library? As far as I know, there isn't any way of doing this. That's nothing to do...
If you really want to use a lambda, the syntax is: lambda param, list: return_value For example, this is a lamdba that does addition: lambda x, y: x + y I'm not sure how this could make your function easier to write though, since this is the most obvious way: def myFunction(name): for i, x in enumerate(self.getList...
I am stumped! I am building a form that allows the user to fill in profile fields and user fields at the same time. There are examples all over the web for this and a number on this site (eg How to create a UserProfile form in Django with first_name, last_name modifications?) however, try as i might, i keep on getting ...
I've got a node.js express server running with the Jade template engine. I've got a layout jade file which imports the body of individual views like so: !!! html head title= title || 'Title not set.' body #header h1 Header. #content!= body //- this renders the body of an indi...
Gemnoc Re : Logiciel de CAO 2D/3D (Conception Mecanique) Une autre demande pour Ellypsis, pourrais-tu démarrer FreeCAD de cette façon dans le terminal : freecad --write-log Ceci va enregistrer un fichier journal FreeCAD.log dans le dossier ~/.FreeCAD, ouvres-le et postes le contenu ici. J'ai testé rapidement le Sketch...
instantiating and accessing abstraction inlets/outlets (These questions might keep coming. looks like I’ll be a noob for a minute.) I’m instantiating abstractions with the included code. I’m looking to create a static object that lets you access a single abstraction from a number of named objects. (similar to buffer~ o...
I'm not sure if I truly understand the question, but please clarify in a comment to my answer if I'm off. # search.py searchables = [] def search(search_string): return [s.do_search(search_string) for s in searchables] def register_search_engine(searchable): if hasattr(searchable, 'do_search'): # you wa...
I have a funny and strange bug in my facebook for websites. When I log a user in with facebook, as a user I must press reload to get the user data from the cookie. Otherwise the cookie doesn't find a user. If I press reload once after login and reload once after logout I can login and logout but that indicates I've bee...
Ok I seem to have TKLPatch working. Now instead of using overlay with fixed config settings I would like to use di-live. There seem to be two things I need to get sorted. 1 - di-live file 2 - system config applier file DI-LIVE FILE Drop this in /usr/lib/di-live.d WHAT shuld I call the file? The TurnKey ISO file in this...
So here i have a list of numbers of 'Q9ULI0' id. Which is look like this: ['1117', '285', '357', '58', '813', '1398', '566'] when i call print lookup['Q9ULI0']I am trying access all of those value in the index to see if the number is between two of my value. I tried using .len and for loop but it doesn't even compile. ...
I have written the following code to count the number of inversions in an array of numbers.It gives correct results for the inputs that i tested it for but still it fails the test cases,I don't have access to test cases an i am not able to figure out for which cases it will fail,I can really use some help here. def cou...
I want to install numpy, pylab, scipy, and ipython on Mac OS X Lion. I installed the following: python-2.7.3-macosx10.6.dmg, numpy-1.6.1-py2.7-python.org-macosx10.6.dmg, matplotlib-1.1.1-py2.7-python.org-macosx10.6.dmg, scipy-0.11.0-py2.7-python.org-macosx10.6.dmg and obtained the following messages: /var/folders/h...
You don't filter the objects from which retrieve tags on the templatetags.I did not find a straight forward way to have tags for Product.objects.filter(draft= False) What I would do is to create a proxy model of Product like PublishedProduct class PublishedProduct(Product): objects = PublishedProductManager() ...
Here is a method without buffer which doesn't copy, as it only looks at one character at a time: from itertools import islice, izip s = "to_be_or_not_to_be" pos = [15, 2, 8] length = len(s) for start1, start2 in izip(pos, islice(pos, 1, None)): pref = 0 for pos1, pos2 in izip(xrange(start1, length), xrange(...
It’s hard to recover from that without a reboot. It’s hard to recover from that without a reboot. In terms of legal risk, this move almost makes me think that Palm is tryingto provoke Apple into filing a lawsuit. Good points in the rest of the article, but I disagree on this. Palm’s recent rhetoric, publicly calling Ap...
If I have a Python script that requires at least a particular version of Python, what is the correct way to fail gracefully when an earlier version of Python is used to launch the script? How do I get control early enough to issue an error message and exit? For example, I have a program that uses the ternery operator (...
this is my second time trying to ask this question, hoping it comes across more concise this time round. I have a list of batsmen for a cricket score calculator I am trying to get up and running. eg. batsmen = ['S Ganguly', 'M Brown', 'R Uthappa', 'A Majumdar', 'S Smith', 'A Mathews', 'M Manhas', 'W Parnell', 'B Kumar'...
When I first learned about Django signals, it gave me the same warm fuzzy feeling I got when I started using RSS. Define what I'm interested in, sit back, relax, and let the information come to me. You can do the same in Django, but instead of getting news type notifications, you define what stuff should happen when ot...
Download FREE PDF Deployment Automation Patterns are generally reusable solutions to common issues within software deployment. This card describes 7 patterns in detail, including sample scripts, tools, pipelines, and more. Deploying software to a production environment is usually the final step in the product delivery ...
I try to capture an HTTP-download with Python using dpkt and pcap. The code looks like ... pc = pcap.pcap(iface) for ts, pkt in pc: handle_packet(pkt) def handle_packet(pkt): eth = dpkt.ethernet.Ethernet(pkt) # Ignore non-IP and non-TCP packets if eth.type != dpkt.ethernet.ETH_TYPE_IP: return ...
Both PyQt4 and PySide have very similar mappings to the Qt API. There are, however, some differences, my opinions on which are described below: Maintenance They are both well maintained. The PySide produces a lot more regular releases at the moment: I think it's more closely linked to Qt than PyQt4 and as a newer proje...
Babdu89 Re : HY-D-V1 un nouveau Desktop Bonjour... Alors, comme j'ai toujours du temps, de la place sur mes hdd, et de la suite dans les idées ... Toujours au sujet de la tentative d'Hybrydiser la Cubuntu 13.04 32 bits ... Voir post ci-dessus . J'ai réinstallé, j'ai fais les maj système en commande, j'ai été obligé d'i...
Not many people are trying to capture images from their webcam using Python under Linux and blogging about it. In fact, I could find nobody who did that. I found people capturing images using Python under Windows, and people capturing images using C under Linux, and finally some people capturing images with Python unde...
I know of the non-standard %uxxxx scheme but that doesn't seem like a wise choice since the scheme has been rejected by the W3C. Some interesting examples: The heart character. If I type this into my browser: http://www.google.com/search?q=♥ Then copy and paste it, I see this URL http://www.google.com/search?q=%E2%9...
My case is this - the quickly-generated application contains some apport code, so quickly inserts python-apport in the dependencies list. I would like the application to be installable and run on Linux Mint as well, where this package is missing. I would like to wrap the apport code in a try/except ImportError section,...
I was also trying to fine my rank, but since I am not Jon Skeet or Marc Gravell it involves a lot of clicking through pages for me. Since I started learning Python I typed together a little script which would do the clicking for me. If you are a low reputation user like I am, it takes quiet a while. When asked for user...
I have and old django site (0.97-pre-SVN-7457) and I'm about to make some changes and get the site running on the current development code of django. I have alot of content that needs to be intact. When I started the site, I made an ugly "hack" to get a dual lingual site, so the result is not pretty: Here is my model: ...
Digging Up Django Class-based Views - 2 Abstract This post refers to Django 1.5. Please be warned that some of the matters discussed here, some solutions or the given code can be outdated by more recent Django versions In the first installment of this short series, I introduced the theory behind Django class-based view...
I am working on and HTML page from where users can upload videos to my youtube account using javascript. So i want my javascript code to request my youtube account's access token from my server and then make upload request using that token. On server side i am using python youtube api. I am using programaticlogin() fun...
It looks like you're hosting your page in dreamhost.com, a hosting provider. When you set up your account, they probably gave you the chance to create email accounts ending with your domain (yaddayadda@addisonbean.com) You may want to create one, get the information: host where the SMTP (the "mail server") is located, ...
Image and ImageItem An ImageItem object is an image component that contains a reference to an Image object. First, let's briefly introduce the Image class. We will revisit it again later when we talk about low-level APIs. The Image class is used as a graphical image data holder. Depending on how they are created, image...
Some things I have learnt about optimising Python I've been enjoying writing my research code in Python over the past couple of years. I haven't had to put much effort into optimising it, so I never bothered, but just recently I've been working on a graph-search algorithm which can get quite heavy - there was one scrip...
kevlar Ella : projet de logiciel d'animation Flash & SVG pour Linux Le projet est aujourd'hui bien avancé : version 0.3.1.2 au 2 Novembre 2010 ! Ella (Elegant Light Linux Animator) est un projet amateur destiné à fournir à la communauté linuxienne un générateur d'animations Flash & SVG wysiwyg, fonctionnel, léger, bien...
malbo Howto_Comment identifier si les partitions sont GPT ou MBR Tout est dit dans ce post de srs5694, spécialiste du partitionnement sur le forum anglais de Ubuntu : http://ubuntuforums.org/showpost.php?p= … ostcount=4 Mais comme c'est en anglais, je vais simplifier et préciser in french. L'outil "gdisk" proposé par s...
Since I updated to the newest version of django facebook I get this error: TypeError at /facebook/connect/ open() got an unexpected keyword argument 'timeout' Here is the full trackback: File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response 111. response = callb...
I have a big table ~15M records called entities. I want to find top 5 entities matching "hockey" in their name. I have a Full text index built for that, which is used : gin_ix_entity_full_text_search_name, which indexes the name. Query SELECT "entities".*, ts_rank(to_tsvector('english', "entities"."name"::text...
Jx7 Re : [script] Télécharger de nombreuses quotidiennes de canal+ (suite) J'ai l'impression que tu as un problème de droits d'écritures. Hors ligne Jx7 Re : [script] Télécharger de nombreuses quotidiennes de canal+ (suite) Où as-tu placer le script? Hors ligne Jx7 Re : [script] Télécharger de nombreuses quotidiennes d...
Introduction I had interview for the Flask book recently and some questions were related to realtime functionality - how it works, how to integrate realtime portion with conventional WSGI applications, how to structure application code and so on. We used Google Hangouts and it was supposed to record interview, but it f...