text
stringlengths
256
65.5k
Kalyst [resolu] (Re)installer Synaptic ? Bonjour a tous, Suite au probleme de : Synaptic Package Manager et mise à jour du 18.8 http://forum.ubuntu-fr.org/viewtopic.php?id=56039 Et bien avant de voir cette solution sur le forum, j'ai voulu reinstaller Synaptic (un vieux reflexe à banir, j'ai bien compris... ). Pour cel...
I have a MDB database with the following attributes about forum posts: thread author (posted in the thread) children (a list of authors who replied to the post) child_count (number of children in the list) Im trying to build a graph with the following nodes: threadauthorchild authors the total distinct authors in my d...
no_spleen Re : Petit guide pour aider au choix d'un langage Le fichier de maillage est trops gros à poster ! Hors ligne tshirtman Re : Petit guide pour aider au choix d'un langage un code permettant de générer un fichier de ce type alors? je vais regarder ton code voir si je voit quelque chose de choquant pour les perf...
I have a text file which has the planets and their corresponding moons/satellites along with their orbital radius and period and I would like to use this to create an animation in quickdraw similar to the one below: The text file is as followed: RootObject: SunObject: SunSatellites: Mercury,Venus,Earth,Mars,Jupiter,Sat...
Edit: Updated things to reflect your clarifications above. Your question is much clearer now, thanks! Basically, you're just wanting to interpolate a 2D array at an arbitrary point. scipy.ndimage.map_coordinates is what you want.... As I understand your question, you have a 2D array of "z" values that ranges from some ...
This question has been asked before, but many of the solutions have been deprecated and the requirement of GraphAPI seems to have rendered many solutions irrelevant. I have fiddled around with the fbpy, facebook, oauth, oauth2 packages, and have looked through their examples, but still cannot figure out how to get it w...
Why SELECT Barraportfolioname FROM portfolio WHERE id IN (SELECT DISTINCT i1.portfolioid FROM Import i1 LEFT OUTER JOIN Import i2 ON i1.PortfolioID = i2.PortfolioID AND i2.ImportSetID = 82 WHERE i1.ImportSetID = 83 ...
How can I tell pycharm that the return type of form.save() is, in this case, a CategoryQuestion object? def category_ask(request): if request.method == 'POST': form = CategoryQuestion_form(request.POST) if form.is_valid(): question = form.save(commit=False) question.who = req...
What you are asking is how to parse specific content from site A and some other specific content from site B using PHPCrawl. For site specific parsing style following if-else approach can be followed: for url in urls: content = crawl(url) if(url of type 1?): extract_style1(content) else-if(url of ty...
ehmicky Stego++, projet de bibliothèque de stéganographie Salut à tous, [Message mis à jour 19/11/11] Je suis actuellement sur un projet de stéganographie (art de dissimuler un message secret dans "quelque chose" (fichier, phrase, etc.) d'apparence banal). Il s'agit de faire une bibliothèque C++, Stego++, qui permette ...
I have the following data 1.105 0.919 0.842 0.715 0.704 0.752 0.827 1.049 0.584 0.998 0.931 0.816 0.787 0.803 0.856 0.782 0.872 0.710 1.268 1.189 1.036 0.984 0.847 0.948 1.083 0.864 0.792 that I plot with imshow() The result looks like this: Here is my code: from numpy import* import matplotlib.cm as cm import matplotl...
I am trying to map a texture to a quad in pyglet using the opengl functions but the quad is just showing up as white. My code looks like this: import pyglet from pyglet.gl import * glEnable(GL_TEXTURE_2D) image = pyglet.image.load("redbrick.png") texture = image.get_texture() and my draw function: def on_draw(): w...
There is a Fourier transform method here. Using the example from belisarius it might be done as below. Caveat: I do not guarantee I made no cut-and-paste errors. Your mileage may vary. Considerably. (* sample data *) g[x_] := x + 1/2 Sin[x] + RandomVariate[NormalDistribution[.2, .05]]; SeedRandom[1111]; xmax = 8*Pi; nH...
Emails and SMS Setting up email Web2py provides the gluon.tools.Mail class to make it easy to send emails using web2py. One can define a mailer with from gluon.tools import Mail mail = Mail() mail.settings.server = 'smtp.example.com:25' mail.settings.sender = 'you@example.com' mail.settings.login = 'username:password' ...
I am importing a dmp file using the following command: imp user/pass file=file.dmp log=logfile.log full=y ignore=y destroy=y I get the following errors: . . importing table "MESSAGE_BOARD" IMP-00058: ORACLE error 22993 encountered ORA-22993: specified input amount is greater than actual source amount IM...
I am trying to stream cast a computer generated video using gstreamer and icecast, but I cannot get gstreamer appsrc to work. My app works as expected if I use xvimagesink as the sink(see commented code below). But once I pipe it to theoraenc it does not run. I exchanged shout2send with filesink to check if the problem...
Components and plugins Components and plugins are relatively new features of web2py, and there is some disagreement between developers about what they are and what they should be. Most of the confusion stems from the different uses of these terms in other software projects and from the fact that developers are still wo...
A la hora de pasar parámetros, al igual que en la amyoría de lenguajes visual nos permite pasarlos de dos formas, por valor o por referencia Por referencia variable1-> reserva un espacio de memoria variable2-> le asignamos el valor de variable1 variable2 = variable1 Ahora mismo, en memoria sólo tendríamos un valor, al ...
Just a small clarification: 'ASCII string' refers to the charset used to represent the characters, not whether or not these chars are represented as int, hex or as printable characters... Anyways, what I assume you actually want is a program which will show the printable version of the characters. So here's one way to ...
An application has a log directory, in which a alot of log output is created. The file structure in this log directory looks something like this: localhost:/var/log/myapp # ls appClient22334.a appClient22336.a appClient22338.a appClient22334.b appClient22336.b appClient22338.b appClient22334.c appCli...
This answer is really simple! (It just took me days to work it out.) Combined with PyGTK's idle_add(), you can create an AutoJoiningThread. The total code is borderline trivial: class AutoJoiningThread(threading.Thread): def run(self): threading.Thread.run(self) gobject.idle_add(self.join) If you w...
nathéo Re : /* Topic des codeurs [8] */ Yep, d'ailleurs je m'y assure toujours d'y être (avec ls) avant de lancer le script. ÉDIT : Bon ça fonctionne tout de même en utilisant la commande ruby, mais pour le coup, je me demande pourquoi avec l'autre je rencontre des soucis. Dernière modification par nathéo (Le 17/12/201...
PPdM goolgle et Ubuntu 64bits Salut Je vous soumet un probleme recurent que je croyais du a ma config matérielle mais qui se manifeste sur un autre PC totalement différent. Les accès a google (tout les sites) sont très lent quand ce n'est pas impossible sur les config en 64 BIts, j'ai deux PC (un portable et un fixe) q...
I read a tutorial about how to compile and install a Wikipedia lens, but it didn't work. The tutorial sounds easy - i just copied and pasted to the file that was suppose to edit. I have tried some times and here are 2 edits edit 1: import logging import optparse import gettext from gettext import gettext as _ gettext.t...
I'm trying to structure my project like this app/__init__.pyweb/ __init__.py web.pydatabase/ __init__.py db.py I just want to import several classes from db.py to web.py but just a ImportError: No module named is thrown. What I tried so far web.py from __future__ import absolute_import from database.db import Class...
I am using numpy and matplotlib in Python3. The following code is causing the error: import matplotlib from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib.axes import Subplot as plt from matplotlib import pylab a=[1,1] b=[1,1] fsam = 4...
winreg is obviously Windows only, and does not read registry hive files (NTUSER.DAT, etc.), but rather accesses the registry directly. What you're looking for is a library for parsing hive files, and it seems like this one might work: http://rwmj.wordpress.com/2010/11/28/use-hivex-from-python-to-read-and-write-windows-...
I tried to tether my old Windows Mobile 6 phone with my Ubuntu computer to use the phone's network. However, even though the kernel seems to recognize the phone and it is used as a network device I can not receive any packets from http-requests. The following output is from dmesg: [ 230.884554] rndis_host 1-1.1:1.0: d...
I'm working with google-app-engine-django + zipped django. Just running "python manage.py test" succeeded without error. But with virtualenv, test was failed with "import unittest error". same error with Django 1.1. - OSX 10.5.6 - google-app-engine-django (r101 via svn) : r100 was failed with launcher 1.3.0 - GoogleApp...
Is it possible to split a file? For example you have huge wordlist, I want to split it so that it becomes more than one file. How is this possible? This one splits a file up by newlines and writes it back out. You can change the delimiter easily. This can also handle uneven amounts as well, if you don't have a multiple...
I inherited the following Django view code, used by another webservice to serve downloadable versions of output data: def index(request): # ... (snip) ... data = base64.decodestring(request.POST['data']) filename = request.POST['filename'] wrapper = FileWrapper(StringIO(data)) response = HttpRespons...
Suppose you have an array (m, m) and want to make it (n, n). For example, transforming a 2x2 matrix to a 6x6. So: [[ 1. 2.] [ 3. 4.]] To: [[ 1. 2. 0. 0. 0. 0.] [ 3. 4. 0. 0. 0. 0.] [ 0. 0. 0. 0. 0. 0.] [ 0. 0. 0. 0. 0. 0.] [ 0. 0. 0. 0. 0. 0.] [ 0. 0. 0. 0. 0. 0.]] This is what I'm doing: def array_append(old_array, ne...
1) Is there any R library/function which would implement INTELLIGENT label placement in R plot? I tried some but they are all problematic - many labels are overlaping either each other or other points (or other objects in the plot, but I see that this is much harder to handle). 2) If not, is there any way how to COMFOR...
JavaScript iamjustoneman — 2011-12-20T18:02:28-05:00 — #1 Hi all, I have work thumbnails on one side (meals), ingredients on the other side, what I would like to do is: 1) If I hover over a meal, the ingredients used for that dish are highlighted on the left 2) If I hover over an ingredient, the dishes that used this i...
I have a code in which for 3 different values of D ,i have 3 different values of dx and so,3 different plots. I want to do a plot which will have all 3 plots in one. ... D=(0.133e-4,0.243e-4,0.283e-4) dx=sc.zeros(3) for i in D: dx[i]=sc.sqrt(D[i]*dt/M) plt.ion() while n<N: Vw_n=V...
Email and SMS Setting up email Web2py provides the gluon.tools.Mail class to make it easy to send emails using web2py. One can define a mailer with from gluon.tools import Mail mail = Mail() mail.settings.server = 'smtp.example.com:25' mail.settings.sender = 'you@example.com' mail.settings.login = 'username:password' ...
Here is the code that finally worked. As it depends highly on my development environment Quickly + Glade + Python + Gtk, I make it an independent answer. Bryce's answer helped a lot, and so did my exchanges with aking1012. The actual code, in a text editor: # Accelerators self.my_accelerators = Gtk.AccelGroup() self.wi...
I'm creating a client-server program. The server sends the client a range of numbers, the client does an operation on the range (finds perfect numbers) and sends back a result. The server is written in Python and the client in C. Here's my code: Server (Python): import socket def SendRequestToCompute(): # Server-si...
I'm working with python using Matplotlib and PIL and a need to look into a image select and cut the area that i have to work with, leaving only the image of the selected area.I alredy know how to cut imagens with pil(using im.crop) but how can i select the coordinates to croped the image with mouse clicks? To better ex...
Now that you all helped on the query as in below. How can I get the total time hh:mm:ss and get the average of it? SELECT CONVERT(varchar(8),cast( cast( substring(right('000000'+cast(rptime as varchar),6),1,2) + ':' + substring(right('000000'+cast(rptime as varchar),6),3,2) + ':' + ...
This answer comes from Steven Bethard on Google groups. I'm reposting it here to make it easier for people without a Google account to access. You can override the default behavior of the error method: import argparse import sys class MyParser(argparse.ArgumentParser): def error(self, message): sys.stderr.w...
Is there a list somewhere of recommendations of different Python-based REST frameworks for use on the serverside to write your own RESTful APIs? Preferably with pros and cons. Please feel free to add recommendations here. :) Something to be careful about when designing a RESTful API is the conflation of GET and POST, a...
UPDATE: 2.x support is now mainline! Please read the wiki page for important information about the update. A warm welcome to you, traveller. You have arrived at the home of Py-StackExchange, the library definitively proven† to be the best library for using the SE API from Python. If you are still interested (and by gol...
I'm trying to teach myself Python, and doing well for the most part. However, when I try to run the code class Equilateral(object): angle = 60 def __init__(self): self.angle1, self.angle2, self.angle3 = angle tri = Equilateral() I get the following error: Traceback (most recent call last): File "pyth...
I am originally a C programmer. I have seen numerous tricks and "hacks" to read many different arguments. What are some of the ways Python programmers can do this? I am originally a C programmer. I have seen numerous tricks and "hacks" to read many different arguments. What are some of the ways Python programmers can d...
I have the following two classes: class user(Base): .... id=Column(Integer, primary_key=True) address=relationship('Address',backref='user') class Address(Base): ... IsItAssgined=False user_id=Column(Integer, ForeignKey('user.id')) Lets create two instances of these classes: Addr=Address() Tom=User()...
Test-driven development is not about testing. Test-driven development is about development (and design), specifically improving the quality and design of code. The resulting unit tests are just an extremely useful by-product. That's all I'm going to tell you about test-driven development. The rest of this article will ...
I'm trying to convert text into xml format. And I'm using LXML Library. But I'm getting error message. Please help me. Thank you import re from lxml import etree import urllib,urllib2 def get_movie_info(movie_id): URL = "http://www.raaga.com/a/rss.asp?%s"%(movie_id) f = urllib.urlopen(URL) movie_info = f.re...
tonyo Lancer un petit son en Python Salut, je voudrais modifier le desklet mailer (adesklet) pour qu'il joue un petit son lorsqu'un nouveau message est arrivé. J'ai vu dans le code du desklet qu'il y a un petit script "beep.sh" qui est lancé quand un message est arrivé (mais je ne suis pas sur... ) Donc peut-être, éven...
UpdateI tried replacing everything in my custom manager with the following: def create_user(self, username, email): return self.model._default_manager.create(username=username) And that throws an error. I then tried returning the User from my custom user manager and I get 'Cannot assign "": "UserSocialAuth.use...
preface: I would like to separate these problems into smaller questions, but apparently, I am missing some pieces of the puzzle and it seems impossible to me. I developed my cherrypy application using cherrypy's built in WSGI server. I naively assumed that when the time comes, I will be able to use created WSGI Applica...
I'm attempting to figure out a. If Microsoft Power Point is running, and b. If so, is it running in full screen mode or "slide show" mode. Detecting whether or not an instance of PowerPoint is running was fairly straight forward. def check_for_ppt(): global ppt stime = time.time() f = (os.popen('tasklist')...
Sub.Lounge 24.10.2013 _ /)) __(((__ .' _`""`_`'. wann \ / /\\ /\\ \ 24.10. ab 21oo | /)_\\/)_\\ | on the decks \ | _ _()_ _ | resident djane naroma | \\/\\/\\// | & special guest fabio...
Likely, your problem is that you parsed it okay, and now you're trying to print the contents of the XML and you can't because theres some foreign Unicode characters. Try to encode your unicode string as ascii first: unicodeData.encode('ascii', 'ignore') the 'ignore' part will tell it to just skip those characters. Fro...
Because the str type is a type wich does not has an attribute dict. From the docs, "Classes" section: A class has a namespace implemented by a dictionary object. Class attribute references are translated to lookups in this dictionary, e.g., C.x is translated to C.__dict__["x"] You can also enforce something similar...
There are so many html and xml libraries built into python, that it's hard to believe there's no support for real-world HTML parsing. I've found plenty of great third-party libraries for this task, but this question is about the python standard library. Requirements: Use only Python standard library components (any 2.x...
FIRST "SOLUTION" import re regx=re.compile('(?<![\d.])' '(?!\d*\.\d*\.)' # excludes certain string as not being numbers '((\d|\.\d)([\d.])*?)' # the only matching group '([0\.]*)' '(?![\d.])') regx.sub('\\1',ch) . EDIT 1 John Machin said that 10000 and...
nesthib [astuce/awk] pourquoi awk est si puissant ? un petit exemple une petite astuce pour montrer la puissance d'awk (et plus généralement des « petits » programmes en ligne de commande) j'avais un fichier de log de la forme : 20xx-xx-xx xx:xx:xx username1 Lorem ipsum dolor sit amet 20xx-xx-xx xx:xx:xx username2 cons...
Hizoka Re : [g2s] GUI d'extraction de fichiers mkv En fait la fonction qui permet d'extraire dans le même dossier, il faut cliquer dessus à chaque fois. Tu pourrais pas mettre une option à cocher dans préférences qui permettrait de la garder toujours active ? Réinitialise les préférences. Par contre il n'y a plus l’icô...
Matplotlib is a python 2D plotting library that can produce dots lines, histograms, power spectra, bar charts, pie charts, scatterplots, etc. With few lines of codes, you can generate quality graphs into various image format such as eps, jpeg, pdf, png, ps, svg. You may want to check out the screenshots includes with s...
I think, there is a necessity to evaluate the source code to understand what makes the difference. Recently i've tried to port Python2 code to Python3, come up with same poor lookup times, Python2 is ~30% faster than Python3. This is not actual code but a dummy class to figure out where the problem actually is. Sample ...
You can’t touch this! This was my entry for the Connected Home Project Contest by Make Magazine This project consists in a movement sensor (PIR) plus a camera and a wifi connected device (Arduino Yún was my choice, but it can be easily substitued with a RaspberryPi). Optionally, speakers can be connected to reproduce a...
malbo [Tuto] identifier si on est dans un système UEFI ou Bios ATTENTION : CETTE MÉTHODE D’IDENTIFICATION EST OBSOLÈTE : IL FAUT UTILISER LA PROCÉDURE DE LA DOC : http://doc.ubuntu-fr.org/efi#identifier … n_mode_efi Le problème se pose pour des PC achetés en 2011 (et +) pour ceux qui souhaitent faire cohabiter Windows ...
djara Re : Récupération de windows après insttallation de ubuntu 12.10 64bit Merci. Je te tiens informer dans quelques minutes du résultats. Merci Hors ligne djara Re : Récupération de windows après insttallation de ubuntu 12.10 64bit Voila ce que j'ai obtenu en reprenant avec la version officiel le lien : http://paste...
If I run compix-switch or fusion-icon, and then select xfwm4 from its menu, it refuses to load, terminal gives me these errors: Code: * Setting window manager to Xfwm4 ** (xfwm4:6218): CRITICAL **: Xfconf could not be initialized ** (xfwm4:6218): WARNING **: Missing data from default files * Setting window manager to X...
I'm trying to access an array within a Fortran common block structure from C++. I have a mixed sample code with C++ and Fortran. Fortran: integer a(5),b common /sample/ a,b a(1) = 1 a(2) = 5 a(3) = 10 a(4) = 15 a(5) = 20 b = 25 Then in C++: extern "C"{ extern struct{ int *a,b; }sample_...
As others have suggested, generating random colours is much easier in the HSV colour space (or HSL, the difference is pretty irrelevant for this) So, code to generate random "green'ish" colours, and (for demonstration purposes) display them as a series of simple coloured HTML span tags: #!/usr/bin/env python2.5 """Rand...
Looked around SO and couldn't find quite what I needed. I am looking for a way to pull the key from the outside map and the value from the inside map for usin in an output statement. If I had one map I know I can pull the data I need from the inside map by using insideMap[key]. However, the [] operator does not seem to...
Question: How do I prefill a CheckBoxTable from ToscaWidgets with values. Background: I've looked everywhere and I can't seem to figure out how to initialize a particular form field with ToscaWidgets. Most form fields seem to respond just fine to initialization, like if I create a form with a single TextField in it whe...
November 26, 2013 - by Jonathan Perkin Last week was Joyent Engineering's inaugural hackathon, where we spent a couple of days together in San Francisco working in small teams on projects which interested us and were at least in some way relevant to our business. Whilst the obvious choice for me would have been to work...
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 ...
This is the output I get using FFProbe for a video I'm certain is anamorphic. I've converted it as a test with ffmpeg and the results are consistent with the video having a different PAR and DAR (video is squished). I ran some command line params to fix anamorphic video and it worked. Possibly my diagnosis is incorrect...
I have a model: class errors(models.Model): date = models.DateTimeField() msg = models.CharField(max_length=500) I simply cannot get the date format right when inserting. I do msg = "error" date = datetime.datetime.now() cursor = connection.cursor() cursor.execute("INSERT INTO cmt_errors(...
This is the simplest way: x1 = float(raw_input("Enter x1: ")) Note that the raw_input() function returns a string, which is converted to a floating point number with float(). If you type something other than a number, you will get an exception: >>> float(raw_input()) a Traceback (most recent call last): File "<stdin...
Is there a "best-practice" way to do check for connection state and reconnect if needed?# Yes, at least in my view, because there's only one approach that's free of race conditions, and that's to execute the query in a retry loop that handles errors if they arise. Otherwise you still have: PREPARE SELECT 1; or whatever...
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 to attach my domain with bind in real wwwI install bind9, with apache. By God's very grace every thing went smooth. my dig, host, nslookup and ping provide this info: my system ip address: 59.177.154.251 my domain name: imsingh.com my domain registrar: GoDaddy.com When i write imsingh.com in my system browser's add...
There are no such sequences for arbitrary n as can easily be verified by exhaustive search for n 2, 5 or 6: def check(t, n): for i in range(1, n + 1): p1 = t.index(i) p2 = t.index(i, p1 + 1) if p2 - p1 != i + 1: return False return True assert check((2, 3, 1, 2, 1, 3), 3) assert check((4, 1, 3, ...
With all this buzz about OpenID all of a sudden I have been reminded of how a while back I was tinkering with a TurboGears-based web game using OpenID (see parts 1, 2, 3). Having learned more about WSGI and Python Paste I am inclined to see how far I can push the idea of writing web applications using WSGI and a collec...
The md5sum program does not provide checksums for directories. I want to get a single MD5 checksum for the entire contents of a directory, including files in sub-directories. That is, one combined checksum made out of all the files. Is there a way to do this? The right way depends on exactly why you're asking: Option 1...
I'm trying to represent a tree structure in PostgreSQL (8.4) to be able to query the path from the root to a given node or to find all the nodes within a sub-branch. Here is a test table: CREATE TABLE tree_data_1 ( forest_id TEXT NOT NULL, node_id TEXT NOT NULL, parent_id TEXT, node_type TEXT, descr...
[assuming you need this because it's some weird 3rd party system that requires regexp] New Approach the more i think about Frederik's comment, the more i agree. the regexp engine should be able to compile this down to a compact DFA, even if the input string is long. for many cases, the following is a sensible solution:...
So basically, you want to use Sphinx as a library? Here is what sphinx-build does: from pkg_resources import load_entry_point load_entry_point('Sphinx==0.5.1', 'console_scripts', 'sphinx-build')() Looking at entry-points.txt in the EGG-INFO directory, notice that the sphinx-build entry point is the sphinx.main functio...
This is my first time installing wordpress via FTP, and the first time to an existing host and domain (I normally use EvoHosting, since it's automatic) I've gotten to the stage where I'm heading to /wp-admin/install.php, but it's redirecting to the host - 123-reg.co.uk I'm trying to figure out where I went wrong. I've ...
tomtom Re : [HOW TO] adesklets : installation sous Ubuntu Breezy raaah ! j'ai un probleme d'interpreteur python ! J'ai installé toutes les librairies via synaptic et adesklets aussi. J'ai DL YAB (Yet Another Bar) et j'ai ca : [i]tomtom@barad-luin:/mnt/config/programmes/adesklets/yab-0.0.2$ [/i][b]ls -l[/b] total 56 -rw...
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...
Extensions firebird_fdw 0.1.1 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...
I have a problem with django formset. I want to validate one field in the formset. I followed these links Django Passing Custom Form Parameters to Formset and able to create the forms. but how can i POST my data to formset. this is my form class BookingDetailsForm(forms.Form): age = forms.IntegerField() def __in...
I'm having a problem with Django 1.2.4. Here is a model: class Foo(models.Model): # ... ftw = models.CharField(blank=True) bar = models.ForeignKey(Bar, blank=True) Right after flushing the database, I use the shell: Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5] on linux2 Type "help", "copyr...
Akamine Impossible d'accéder au menu "Pilotes additionnels" Bonjour, J'ai récemment installé Steam pour Linux. Sur le wiki associé ils demandent des mises à jour des pilotes additionnels, seulement impossible d'accéder au menu "Pilotes additionnels", Ubuntu rencontre une erreur que ce soit après plusieurs reboot, avec ...
I want to create a doublespin box that changes values in steps of 0.2. But when the user enters a value that is not correct according to the steps. I normalizes that to the nearest correct value. I tried something like the code shown below but I don't know how to stop values like 0.5 to be entered. Please help me on th...
mplayer input.mp3 -ao pcm -ao pcm:file=tmp.wav -ss 5 -endpos 7 This will save from 5 to 7 seconds of the file to tmp.wav. I don't know how to do it with a relative end time, but if you put it in a script then you should be able to calculate that pretty easily. Example script to convert a diff to an exact timestamp: #!/...
I want to find the intersecting of 2 circles with radius r1 and r2 (simple solutions preferred). Tetrad covered general intersection in his post. Here I'll cover an algorithm that returns the specific points of intersection based on the formulae in this concise article. I'm matching my variable names to those in the ar...
UPDATED:One way is to look at sys.maxsize as documented here: $ python-32 -c 'import sys;print("%x" % sys.maxsize, sys.maxsize > 2**32)' ('7fffffff', False) $ python-64 -c 'import sys;print("%x" % sys.maxsize, sys.maxsize > 2**32)' ('7fffffffffffffff', True) sys.maxsize was introduced in Python 2.6. If you need a test...
My machine apparently won't draw vertex lists in pyglet. The following code renders two identical shapes at different positions in the window, one using a vertex list and the other using a straight draw(). The one that's drawn directly renders fine, while the vertex list doesn't render at all. import pyglet window = p...
matplotlib and iPython notebook UCSD Scientific Python User's Group, April 10th, 2013 Bad design = difficult interpretation, possible loss of information, and inability to recognize trends. I will use concepts from Visual Display of Quantitative Information, 2nd Ed, by Edward Tufte, Graphics Press (2001). Do not do thi...
Tim Bray has recently been writing about a simple log file processing task, giving his efforts the (decidedly peculiar) name of Wide Finder. The task at hand is to count popular links in an Apache log file. Here’s my two minutes’ worth of hat in the ring, in Haskell. > main = do > args <- getArgs > forM_ args $...
We have a file named wordlist, which contains 1,876 KB worth of alphabetized words, all of which are longer than 4 letters and contain one carriage return between each new two-letter construction (ab, ac, ad, etc., words all contain returns between them): wfile = open("wordlist.txt", "r+") I want to create a new file ...
This is example 5.1 on page 223 of Quantitative Ecotoxicology - reproduced with R. Load and clean the data Read the data into R: 1 2 3 4 5 6 7 8 df <- read.table(header = TRUE, text = 'conc A B C D 0 1 1 0.9 0.9 32 0.8 0.8 1 0.8 64 0.9 1 1 1 128 0.9 0.9 0.8 1 256 0.7 0.9 1 0.5 512 0.4 0.3 0.4 0.2') df 1 2 3 4 5 6 7 N...
This worked to some extent but it has issues. My program runs in both a console mode and a GUI mode. When run from the console with a --console argument it runs in a console mode. When I followed the procedure below, this doesn't work anymore and my program is only a GUI app then. The following source code comes from a...