text
stringlengths
256
65.5k
It always amused me how Apple is capable of producing so quality hardware and has so bright ideas in design, but makes so awful lot of questionable decisions in software. I have quite a number of questions on the usability of Mac OS X, but recent update to Mavericks was the last drop. I spend a lot of time in the text ...
My function is made to get the area of any arbitrary triangle. Here is the way that I know works def areaOfTriangle(vertices): x1 = vertices[0][0] y1 = vertices[0][1] x2 = vertices[1][0] y2 = vertices[1][1] x3 = vertices[2][0] y3 = vertices[2][1] area = (1.0/2.0)*(x2*y3 - x3*y2 - x1*y3 + x3*...
vince06fr Re : Nettoyage dans les noyaux (kernel) Umuntu : Si tu veux prendre le temps de traduire ce script, surtout ne te gêne pas comme tout est "hardcodé" dans le script, la seule chose à faire est... De modifier l'ensemble des textes en français présents dans le script pour les mettre en anglais. Une fois le scrip...
I am new to GAE Blostore.... I am trying to display a url of the image uploaded via GAE, but I am having difficulties....any help is appreciated. 1) The code below displays the key in hex format, which I am not sure why it does that. 2) Furthermore, how do I get/create an URL to the image with the hex value key? from g...
Below we’ll create a python plugin that generates C code from UML state machine diagrams. Doing the same for other languages should be trivial. The first thing you need is Unai Estébanez Sevilla’s nice finite state machine code generator. The version that we are using here has been abstracted in order to be able to pro...
I'm trying to mark future done by timeout with this code: import asyncio @asyncio.coroutine def greet(): while True: print('Hello World') yield from asyncio.sleep(1) @asyncio.coroutine def main(): future = asyncio.async(greet()) loop.call_later(3, lambda: future.set_result(True)) yield f...
This code below best illustrates my problem: The output to the console (NB it takes ~8 minutes to run even the first test) shows the 512x512x512x16-bit array allocations consuming no more than expected (256MByte for each one), and looking at "top" the process generally remains sub-600MByte as expected. However, while t...
#1651 Le 31/05/2012, à 19:24 Hizoka Re : [glade2script-GTK2] Interface graphique pour script bash ou autre. Pour le blocage de l'interface ? Essai de mettre le sleep également avant la commande EXEC (ton ordi trop puissant ...) bien vu, ca semble etre ok avec un sleep 0.10 avant le load. Hors ligne #1652 Le 01/06/2012,...
I will explain my issue using an example: A=[[1,2,10],[1,2,10],[3,4,5]]B=[[1,2,30],[6,7,9]] From these lists of lists, i would like to create a third one: C=A+B So i get : C= [[1, 2, 10], [1, 2, 10], [3, 4, 5], [1, 2, 30], [6, 7, 9]] Notice that there are three lists inside C ,the [1, 2, 10], [1, 2, 10], [1, 2, 30] li...
Anything you can do from the command line you can also do from the JSON API which means that the same unlock command could be sent from within code just as easily. To my knowledge there is no pre-built utility capable of this, but the API is simple enough that I can't imagine it being terribly difficult to actually bui...
This is a loop I use to interpret key events in a python game. # Event Loop for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN: if event.key == pygame.K_a: my_speed = -10; if event.key == pygame.K_d: ...
JavaScript hiyatran — 2011-08-24T22:56:44-04:00 — #1 I would like to display the elements in my array but it is NOT working. Here's my code: <HTML> <HEAD> <TITLE>Test Input</TITLE> <script type="text/javascript"> function addtext() { var openURL=new Array("http://google.com","http://yahoo.com","http://www.msn.com","...
Possible Duplicate: Creating graph with date and time in axis labels with matplotlib I don't know how to change the date format when plotting with matplotilib while my data has full date in my dictionary, i only plot hours, minutes, seconds from datetime import datetime import matplotlib.pyplot as plt dico = {'A01': [...
So... I'm working on trying to move from basic Python to some GUI programming, using PyQt4. I'm looking at a couple different books and tutorials, and they each seem to have a slightly different way of kicking off the class definition. One tutorial starts off the classes like so: class Example(QtGui.QDialog): def _...
I have written code to copy text using action class of selenium webdriver. All I have been able to do is to drag cursor around the text and copy it. Code snippet : Actions a = action.clickAndHold(element) .moveToElement(element1) .release() .keyDow...
Django is recommending me that if I am going to only use one server (Apache) to serve both dynamic and static files, then I should serve static files using django.contrib.staticfiles. So in my settings.py I have loaded django.contrib.staticfiles to my INSTALLED_APPS and django.core.context_processors.static to my TEMPL...
CSS 810311 — 2013-07-15T07:27:13-04:00 — #1 Hello Good People, Please, take a look at this site http://yogastudio.atspace.com/ Issue: the following images get nudged down in Opera but look ok in Firefox and Chrome <img id="mon" src="images/mon_img.png" alt="" width="113" height="113"/> <img id="tue" src="images/tue_img...
Last week I finally got around to downgrading my laptop from karmic to jaunty. I did this for a couple of reasons. For my laptop the control of external displays regressed from working flawlessly, to crashing everytime it tried to detect an external display that it didnt boot with. Secondly,, eclipse has some major pro...
You can't use the same implementation as the result object of os.stat() and others. However Python 2.6 has a new factory function that creates a similar datatype called named tuple. A named tuple is a tuple whose slots can also be addressed by name. The named tuple should not require any more memory, according to the d...
I have a scipy.sparse.dok_matrix (dimensions m x n), wanting to add a flat numpy-array with length m. for col in xrange(n): dense_array = ... dok_matrix[:,col] = dense_array However, this code raises an Exception in dok_matrix.__setitem__ when it tries to delete a non existing key (del self[(i,j)]). So, for no...
#1676 Le 28/06/2012, à 20:51 AnsuzPeorth Re : [glade2script-GTK2] Interface graphique pour script bash ou autre. re, Bon, pour les whitelits, il faut indiquer la section et la variable ... Je vais réfléchir pour faire mieux ... Mais je pense que ce sera dur de faire différent, il faut bien indiquer la section et la var...
I need to detect a post_remove signal, so I have written : def handler1(sender, instance, action, reverse, model, pk_set, **kwargs): if (action == 'post_remove'): test1() # not declared but make a bug if it works, to detect :) m2m_changed.connect(handler1, sender=Course.subscribed.through) If I change 'post_remov...
I am trying to find some examples but no luck. Does anyone know of some examples on the net? I would like to know what it returns when it can't find, and how to specify from start to end, which I guess is going to be 0, -1. you can use >>> 'sdfasdf'.index('cc') Traceback (most recent call last): File "<pyshell#144>",...
I am trying to do something which appeared to be simple...I am trying to scrape company names of reuters list from this link: however, I just can't access the company names! Really, after playing around with a lot of xpath queries, I have problems accessing the table. I am trying to grab the names such as "3M company" ...
Did a bit of running around today to get Django sending email via Gmail. It’s simple once you figure it out. If you’re running 0.96, upgrade to the latest development version or apply the patch from ticket #2897. 0.96 does not support TLS, which Gmail requires. Then add the appropriate values to settings.py: EMAIL_USE_...
I am using Python to generate some data and have some code like this num = 0 for i in range(6): for j in range(6): num = random.randint(0,7) #some code here Instead of producing random numbers, it just makes ten random numbers, and then repeats the sequence for the next nine sets (eg. [1,2,5,1,0,0]...
laurent Codecs et paquets proprios: dépots plf Bonjour, Je me permet ici de recopier l'annonce que keyes a fait sur son blog (parce que je suis fade, mais aussi parce qu'il explique très bien tout ça ) Ça y'est c'est fait, le dépôt PLF pour Ubuntu est enfin accessible! Le but de ce dépôt et d'héberger les paquets litig...
I have a problem with some numpy stuff. I need a numpy array to behave in an unusual manner by returning a slice as a view of the data I have sliced, not a copy. So heres an example of what I want to do: Say we have a simple array like this: a = array([1, 0, 0, 0]) I would like to update consecutive entries in the arr...
In my trial test case, I want to run scripts from my source tree. Trial changes the working directory, so simple relative paths don't work. In practice, Trial's temporary directory is inside the source tree, but assuming that to be the case seems suboptimal. I.e., I could do: def source_file(p): return os.path.join...
pontiac76 [résolu]Google Ok mais pas internet avec Ubuntu 12.04 Bonjour, J'ai posté hier un message à propos de mon impossibilité d'aller sur internet sauf sur sur google avec mon installation toute neuve d'Ubuntu 12.04 LTS sur un second disque dur de mon pc fixe. Devant l'absence de réponse, j'ai relu les règles du fo...
JavaScript ramsz — 2013-03-03T07:09:13-05:00 — #1 Hi there, Ive got the following problem with a code ive come across. Code: <script language="javascript"> function checkAge() { /* the minumum age you want to allow in */ var min_age = 16; /* change "age_form" to whatever your form has for a name="..." */ ...
CoffeeScript Looping, Objects and Builds, Page 2 Looping with Comprehensions in CoffeeScript Another interesting CoffeeScript feature is its particular approach to looping statements. In lieu of the traditional for statement you can use what the CoffeeScript documentation refers to as a comprehension. This syntax is in...
So I'm going to start writing every day. Hold me to that, please. Today I'm writing about one little corner of Python, the property function. It's a builtin function, around since at least 2.2. I used a question that involved property as one of theinterview questions during a recent developer search, and I foundabout a...
I'm new to Django so pardon if this is a simple question but I've had a hard time phrasing it. I've looked for an answer quite a while already. Suppose I'm building a very simple gradebook app. models.py (with code ommited) class Course(models.Model): ... class Student(models.Model): students = models.ManyToMan...
Configuring and Managing WebLogic JDBC In WebLogic Server, you can configure database connectivity by configuring JDBC data sources and multi data sources and then targeting or deploying the JDBC resources to servers or clusters in your WebLogic domain. Each data source that you configure contains a pool of database co...
I was recently hunting down a slightly annoying usability bug in Khweeteur, a Twitter / identi.ca client: Khweeteur can notify the user when there are new status updates, however, it wasn't overlaying the notification window on the application window, like the email client does. I spent some time investigating the prob...
i'm dealing with HTTPS and i want to get HTTP header for live.com import urllib2 try: email="HelloWorld1234560@hotmail.com" response = urllib2.urlopen("https://signup.live.com/checkavail.aspx?chkavail="+email+"&tk=1258056184535&ru=http%3a%2f%2fmail.live.com%2f%3frru%3dinbox&wa=wsignin1.0&rpsnv=11&ct=1258055283&...
i need to write a function which receives a long string, and puts into a dictionaryeach letter, and it's it's appearance frequency in the string.iv'e written the next function, but the problem it doesn't ignore whitespaces, numbers etc..iv'e been asked to use the function symbol in string.ascii_lowercase, but iv'e no i...
You could spawn a thread to do the processing. It wouldn't really have much to do with Django; the view function would need to kick off the worker thread and that's it. If you really want a separate process, you'll need the subprocess module. But do you really need to redirect standard I/O or allow external process con...
I have a file that is a list followed by several numbers (eg. Name 10 20 30). I need to extract the numbers from each line and use them to calculate the average of those numbers and reprint the names, followed by the averages, line by line. How do I extract the numbers from the line and use them in calculations in Pyth...
Copyright © 2004-2005 Henrik Brix Andersen Revision History Revision 0.2.1 2005-04-08 HBA Added link to the pppd utility Revision 0.2.0 2005-04-07 HBA Major rewrite Revision 0.1.4 2004-09-10 HBA Updated email address Revision 0.1.3 2004-05-07 HBA Revision 0.1.2 2004-05-07 HBA Revision 0.1.1 2004-05-04 HBA Boosted USB c...
Under the Hood #2: Internal / External Links, the CSS3 Way If, unlike me, you don’t have a sixth-sense that means you know when a link will be internal / external, or will open in a new window, it is increasingly common practice to add little images to links to show that they lead to external websites. The benefit is...
Does any one know of a function/idiom (in any language) that takes a set and returns two or more subsets, determined by one or more predicates? It is easy to do this in an imperative style e.g: a = b = [] for x in range(10): if even(x): a.append(x) else: b.append(x) or slightly better: [even(x)...
I have a coordinated storage list in python A[row,col,value] for storing non-zeros values. How can I get the list of all the row indexes? I expected this A[0:][0] to work as print A[0:] prints the whole list but print A[0:][0] only prints A[0]. The reason I ask is for efficient calculation of the number of non-zero val...
The most tricky part coding the callback mechanism was to implement the function serialization. Here is my function serialization class to produce a JSON string: #!/usr/bin/env python # -*- coding: utf-8 -*- from hashlib import md5 import marshal import json import types class FuncMarshal: @classmethod def ...
Darel [scripts] - 4 petits scripts fait maison ! Salut ! Quand je me fais CH**R sur mon Tux, je bidouille un peu. Résultat, 3 petits scripts pour nautilus (http://doc.ubuntu-fr.org/nautilus_scripts) ! ----------------------------------------- NAUTILUS SCRIPTS ----------------------------------------- 1) COMPRESSER UNE ...
This is (mostly) easy to do, thanks to newforms admin. Basically, you'll need to create a custom inline subclass and override the template used to render it in the admin. Assuming you have an app called app and models Model1 and Model2, you'd do the following: First, create your admin.py file: from django.contrib impor...
rezzakilla Re : [Info] Installation du driver Libre ATI Radeon Je dis ça comme ça...mais ça marche terrible sur ma 7500.....:D Hors ligne hugo69 Re : [Info] Installation du driver Libre ATI Radeon ton tuto est dans la doc officielle mais ca naide pas beaucoup ma 9700ATI Hercules à fonctionner correctement. Si je mets l...
I'd like to display argparse help for my options the same way the default -h,--help and -v,--version are, without the ALLCAPS text after the option, or at least without the duplicated CAPS. import argparse p = argparse.ArgumentParser("a foo bar dustup") p.add_argument('-i', '--ini', help="use alternate ini file") print...
If myVariable is a string that comes from an external source (like a database), you first need to find out what kind of string it is. Since you seem to be using python2, there are two main possibilities: myVariable is either a unicode string object, or a bytes string object. A unicode string is one that has already bee...
I've been looking for a way to update my Twitter status from a Python client. As this client only needs to access one Twitter account, it should be possible to do this with a pre-generated oauth_token and secret, according to http://dev.twitter.com/pages/oauth_single_token However the sample code does not seem to work,...
ETags, or entity-tags, are an important part of HTTP, being a critical part of caching, and also used in "conditional" requests. So what is an etag? That's not very helpful, is it? The easiest way to think of an etag is as an MD5 or SHA1 hash of all the bytes in a representation. If just one byte in the representation ...
SESTAY gvfx sur 12.4 bonjour: cela m'arrive d'utiliser gvfx pour réaliser quelques transitions de vidéos mais après migration gvfx ne veux plus se lancer. voici le message en console from PyQt4 import QtCore, QtGui ImportError: No module named PyQt4 j'ai biens trouvé ces deux "librairie" après recherche /usr/include/q...
There are a few automatic memoization libraries available on the internet for various different languages; but without knowing what they are for, where to use them, and how they work, it can be difficult to see their value. What are some convincing arguments for using memoization, and what problem domain does memoizati...
#2201 Le 02/06/2010, à 21:39 soza971 Re : (3) Conky : Postez vos conkyrc ou certaines parties intéressantes @zarvox moi aussi il ne reconnait pas ma ville mais tu peux prendre une ville environnante tu auras quasiment les mêmes informations Asus U80V Obuntu 10.04 64bits Hors ligne #2202 Le 02/06/2010, à 21:48 leben24 R...
I'm trying to make a custom search form using django haystack, i just modify from haystack's documentation : forms.py from django import forms from haystack.forms import SearchForm class DateRangeSearchForm(SearchForm): start_date = forms.DateField(required=False) end_date = forms.DateField(required=False) d...
Readers should notice that the key= method: ut.sort(key=lambda x: x.count, reverse=True) is many times faster than adding rich comparison operators to the objects. I was surprised to read this (page 485 of "Python in a Nutshell"). You can confirm this by running tests on this little program: #!/usr/bin/env python impo...
Composite Manager Retained Drawing Protocol RFC Robert Carr 02/28/07 Outline and justification: Results from development in the creation of 'first generation' mainstream composite window managers has outlined the need for several reconsiderations in regards to applications interacting and communicating with the composi...
I can't figure out why this isn't working. I'm trying to send an email from my school email address with this code I got online. The same code works for sending from my GMail address. Does anyone know what this error means? The error occurs after waiting for about one and a half minutes. import smtplib FROMADDR = "FROM...
by Brian Nickel <http://kerrick.wordpress.com> Information on how to configure the FastCGI support for the Lighttpd server. Lighttpd (pronounced “lighty”) is a popular lightweight and easy to configure HTTP server. Adding ASP.NET support through fastcgi-mono-server is very quick and painless and can be done by modifyin...
Does anybody knows what are the 10 lines of C code mentioned by Prof. Sebastian to implement the robot localization using particle filters? It would be very useful seeing such code. asked jorgerr I really doubt these are 10 lines of C code. His algo was about 10 lines. So if you rely on a library to sample a pdf and th...
I just moved from apache prefork to worker and started running mod_wsgi in daemon mode. So far, so good. I haven't experienced max load yet, but the server seems more consistent and we're not seeing random requests take 2min waiting for a mod_wsgi response. Memory footprint has gone from 3.5G to 1G. This is awesome. We...
what is the method name that gets executed every time a member of a class is updated? for example, init is run when an object is instantiated: class Foo(db.Model) id = db.Column(db.Integer, primary_key=True) description = db.Column(db.String(50)) def __init__(self, description): self.description = d...
Is there any reason why printw() would cause a segmentation fault? Code is fine without it; broken with it. It doesn't seem to be doing anything esoteric, so I'm not sure how to even begin to understand what is wrong here. Thanks in advance for any advice! #include <ncurses.h> ... initscr(); noecho(); cbreak(); ... ...
I try to using the Pyro4 on autotesting, but now I confused for some ability for Pyro4. Does there existed some method to get the system information by the Pyro4 object. In my ideas, I expose a pyro object that can get the system information, and the remote machine can using this object to show the system information. ...
DJ Raging-Bull Carte PCMCIA WiFi non détecté sur ThinkPad 600X Bonjour, J'ai récuperé un IBM ThinkPad 600X équipé d'un Penium III @ 500 MHz et de 446 Mo de RAM, le disque dur fait environ 12 Go et il dispose d'un lecteur CD. J'aimerais le refiler à ma mère qui s'en servirait pour de la bureautique de base. Je lui ai do...
I'm unable to access an edit token for my media wiki site. Using the following code, I should be able to use the simpleMediWiki site to login, then request an edit token, then finally stage an edit. Unfortunately I'm getting an error that the 'edit' parameter is an unrecognized parameter: {'error': {'info': "Unrecogniz...
I'd like to get a few opinions on the best way to replace a substring of a string with some other text. Here's an example: I have a string, a, which could be something like "Hello my name is $name". I also have another string, b, which I want to insert into string a in the place of its substring '$name'. I assume it wo...
I'm trying to create a python server that will serve calls from outer source through sockets. So I've skimmed through the docs and copied this code, I can connect but no sent data is shown. What am I doing wrong ? import SocketServer class MyUDPHandler(SocketServer.BaseRequestHandler): def handle(self): sel...
I'm trying to get the number of followers of each follower for a specific account (with the goal of finding the most influencial followers). I'm using Tweepy in Python but I am running into the API rate limits and I can only get the number of followers for 5 followers before I am cut off. The account I'm looking at has...
bisk8 Re : [HOW TO] adesklets : configuration des desklets Bonjour, Alors la je commence a désespérer avec le adesklets: volume.py C'est le seul que je n'arrive pas a faire marcher, tous les autres sont ok. Lorsque je le lance en test python ./chemin/du/script/volume.py --nautilus puis touche t il se lance, n'est pas ...
for ( boldParam in [para1, para2, para2, para4, para5] ) { if(/* boldParam exists in params */) ilike(boldParam,'%' + params.boldParam + '%') } } I would like to write something like above. I'm trying to avoid the following multiple if statements: if (params.para1) ilike('para1','%' + params.para1...
Hello World, This year's installment of the GNU Hacker's Meeting is just a month away. When: Thursday July 19th until Sunday July 22th Where: Düsseldorf As in previous years, the fun starts on Thursday with an informal hacking / social evening followed by talks (as well as more hacking) Friday through Sunday. If you ar...
I have two large figures that I'd like to put on an extra page, meaning there should be no text on that page, only the figures. Bla bla. \begin{figure}[t] ... \end{figure} \begin{figure}[b] ... \end{figure} Lorem ipsum. I'd like that to come out as: Bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla b...
Part of me bristles when I hear someone say “Hypermedia API.” I worry it’ll become the sort of phrase, like “semantic web,” that means different things to different people, and ends up covering such a breadth of ideas that it’s impossible to argue for or against without specifying which flavor you’re addressing. Noneth...
The following is a Bresenham-like algorithm that draws 4-connected lines. The code is in Python but I suppose can be understood easily even if you don't know the language. def line(x0, y0, x1, y1, color): dx = abs(x1 - x0) # distance to travel in X dy = abs(y1 - y0) # distance to travel in Y if x0 < x...
The recently rebuilt Favcol presented an surprisingly interesting challenge: how to analyze the images. Image processing at scale is effectively a solved problem. The algorithms are well optimized, and it's trivial to scale horizontally by adding more hardware to your image processing cluster. Sites like Flickr and Pic...
I have homework that I am stuck on. I have gone as far as I can but I am stuck, can someone point me in the right direction.... I am getting stick in making each data row a new object. Normally i would think I could just iterate over the rows, but that will only return last row Question: Modify the classFactory.py sour...
Dernière news : Fedora-Fr aux 15èmes Rencontres Mondiales du Logiciel Libre Bien le bonjour, bien le bonsoir. Après avoir installé skype en téléchargent la version : J'ai essayé de le lancer, mais un problème surgit.. Impossible de lancer << skype >> L’exécution du processus fils << skype >> a échoué (Aucun fichier ou...
01:24 am - How to publish PGP keys in DNS LJ Preface I recently wrestled with something, learned quite a lot, and came up with a document that I'm really rather proud of, that shares knowledge that's not all out there in one place anywhere else. Along the way I've written some software that I'm releasing, that makes al...
Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7. What is a simple solution? What is an effective solution to reduce memory usage or run on a slower CPU? This is equivalent to Adam Rosenfield's solution, but may be a bit more clea...
The code: count = 0 oldcount = 0 for char in inwords: if char == " ": anagramlist.append(inwords[oldcount, count]) oldcount = count count = 0 else: count += 1 the error: Traceback (most recent call last): File "C:/Users/Knowhaw/Desktop/Python Programs/Anagram solver/HTS anagra...
Python 3 OOP Part 3 - Delegation: Composition and Inheritance Previous post The Delegation Run If classes are objects what is the difference between types and instances? When I talk about “my cat” I am referring to a concrete instance of the “cat” concept, which is a subtype of “animal”. So, despite being both objects,...
El lenguaje Python Acerca de Python Python es un lenguaje de programación multipropósito de alto nivel Su filosofía de diseño enfatiza la productividad del programador y la legibilidad del código. Tiene un núcleo sintáctico minimalista con unos pocos comandos básicos y simple semántica, pero además tiene una enorme y v...
ReEdit: You know, I really don't like my answer at all. I voted up the other answer but I liked his original answer because not only was it clean but self explanatory without getting "fancy" which is what I fell victim to: for row in doc.cssselect('tr'): for cell in row.cssselect('td'): if(cel.text_content(...
You must give a presentation tomorrow and you haven't prepared any figures yet; you must document your last project and you need to plot your most hairy class hierarchies; you are asked to provide ten slightly different variations of the same picture; you are pathologically unable to put your finger on a mouse and draw...
Zakhar Uploader sur votre Freebox Révolution à distance UPLOAD de fichiers sur votre Freebox "distante" ! Free a récemment ouvert la possibilité d'accéder à l'interface de gestion de la Freebox V6 à distance. Vous pouvez donc facilement "récupérer" (download) des fichiers de la Freebox distante vers votre PC, via l'int...
bertrand47 [Résolu] Duplicate sources list J'ai depuis quelques jours une erreur "duplicate sources list", visiblement du à un doublon i386 et amd64. J'ai une installation amd64. W: Duplicate sources.list entry http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages (/var/lib/apt/lists/security.ubuntu.c...
I am a beat frustrated. I developed a django project locally and it worked just fine. The problems started to emerge when i moved to production. I try to host my website on "a2hosting" which allow to run django on shared hosting. The server runs some application named "Passenger". My problem is that i cant upload image...
duration between time in ms and rate hi maybe an easy question !!! i try to find a ratio to have the max duration between two 1 shot. a clock in ms (make with a phasor and a rate) send a step passing from 1 to 0 (with a delay). i search to have an equation to have the maximum duration for each time/rate report ? a quic...
Getting this error when running pip install -U selenium. Mid way through the script, it gets the following SyntaxError: Traceback (most recent call last): File "<string>", line 14, in <module> File "C:\Python32\Scripts\build\rdflib\setup.py", line 6, in <module> from rdflib import __version__ ...
I am attempting to use South to create a migration to convert my data from using the 4326 SRID to 900913. After the migration, the coordinates remain in their 4326 format. (It's easy to tell the difference between the 4326 and 900913 projections, since the numbers are much larger in 900913) Here are the forward() and b...
with inspiration from http://stackoverflow.com/a/1526245/287923, but simplifying it, i've implemented a request cache as follows: from threading import currentThread caches = {} class RequestCache(object): def set(self, key, value): cache_id = hash(currentThread()) if caches.get(cache_id): ...
How do you remove all elements from the dictionary whose key is a element of lst? [ Further help: For loop works on all sequences and list is a sequence. for key in sequence: print key use the del(key) method. for key in list_: if key in dict_: del dict_[key] map(dictionary.__delitem__, lst) I know nothin...
I've been using OpenCV methods to get images from my camera. I'd like to decode QR codes from those images using the zbar library, but after I convert the images to PIL to be processed by zbar, it doesn't seem like the decoding is working. import cv2.cv as cv import zbar from PIL import Image cv.NamedWindow("camera", 1...
I'm learning wxPython and faced the following glitch in the tutorial example. After the application is started it shows the drawing with sizes based on the application window's sizes. And in the very beginning it looks as it should be. But when I'm resizing the window the drawing becomes broken. Here is the video http:...
HKH Re : Cerise 0.8 - TPE, freelances, artisans effectivement ca ne fonctionne pas avec ces identifiants...! J ai crée une entreprise nom : Ubuntu login ubuntu pass ubuntu Bon test Hors ligne j1100 Re : Cerise 0.8 - TPE, freelances, artisans Hop je m'abonne. Ça va fortement m'intéresser dans 2-3 ans quand je serai patr...
How do you use selenium in Django to choose and select an option in a <select> tag of a form? This is how far I got: def setUp(self): self.browser = webdriver.Firefox() def tearDown(self): self.browser.quit() def test_project_info_form(self): # set url self.browser.get(self.live_server_url + '/tool/proj...
From PEP 328, http://www.python.org/dev/peps/pep-0328/#rationale-for-relative-imports you should actually avoid naming a python module starting with a "dot" because it means relative imports in Python. If you really insist on doing so, you can but you will have to use the imp module. Example usage:- import imp with ope...
What part of the question? a, b? In mathematics, you don't understand things. You just get used to them.I have the result, but I do not yet know how to get it.All physicists, and a good many quite respectable mathematicians are contemptuous about proof. Offline a, for starters. “Here lies the reader who will never open...