text stringlengths 256 65.5k |
|---|
Hi i have just started to evaluate different options for python>Twitter api:s.
I have written some code looking at the examples in the Twython package but i always end up getting the same error.
AttributeError: 'Twython' object has no attribute 'auth'
I also get the same error running the included core_example files.
I... |
I am displaying some volumetric scalar data and quickly rendering the scene and saving the results to a png. This all works fine. However if I add some helpful objects such as a scalarbar or even axes to the figure it only renders the newly added scalarbar or axes.
An example,
import numpy as np
from mayavi import mlab... |
There are many reasons why you may want to increase your Twitter followers: for engagement, status and for greater reach are a few that come to mind. I’m certainly in the latter - more reach == more potential hits to my blog.
If you’re in the status camp you’ll most likely have gone down the route of paying for followe... |
In Io, you can set the execution context using do:
Http := Object clone
Http get := method(uri, ("<GET request to " .. uri .. ">") println)
Http delete := method(uri, ("<DELETE request to " .. uri .. ">") println)
Database := Object clone
Database insert := method(table, data, ("<insert data to " .. table .. ">") print... |
I came up with the following solution for a koan.
# and
# about_triangle_project_2.rb
#
def triangle(a, b, c)
driehoek = Array.new[ a, b, c].sort
raise (TriangleError), "length cannnot be 0 or lesser" if (driehoek[0] <= 0)
raise (TriangleError), "impossible triangle" if (driehoek[0] + driehoek[1] < driehoek[2... |
#1551 Le 26/03/2012, à 18:46
k3c
Re : TVDownloader: télécharger les médias du net !
Voilà
gg@gg-SATELLITE-L755:~$ python --version
Python 2.7.1+
gg@gg-SATELLITE-L755:~$ python2 --version
Commande « python2 » non trouvée, vouliez-vous dire :
La commande « python » issue du paquet « python-minimal » (main)
La commande ... |
You can work it out with a recursive algorithm. I'm not sure if there is a neater way, for example with a closed formula - you have to account for the different numbers of doughnuts of each type at some point.
The line of thinking goes like this: if you look at the first type of doughnuts, you can choose freely how man... |
I have a python function defined as follows which i use to delete from list1 the items which are already in list2. I am using python 2.6.2 on windows XP
def compareLists(list1, list2):
curIndex = 0
while curIndex < len(list1):
if list1[curIndex] in list2:
list1.pop(curIndex)
else:
... |
#0 Re : -1 » Cerise 0.8 - TPE, freelances, artisans » Le 06/05/2009, à 19:01
#1 Re : -1 » Cerise 0.8 - TPE, freelances, artisans » Le 06/05/2009, à 19:24
thx_84
Réponses : 38
bonjour c'est re-moi
en voulant tester l'installation, voici ce que me crache cerise:
Traceback (most recent call last):
File "/usr/bin/tg-admi... |
No, there is no way built into matplotlib to do that. You are supposed to either live with the default locations or go fully interactive with manual and using the mouse.
You might want to file this as a bug report upstream so they can improve their algorithms.
There are multiple options to work around this. The first o... |
In SQLAlchemy Declarative, how do I set up default values for columns, such that transient or pending object instances will have those default values? A short example:
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class A(Base):
__tabl... |
#1251 Le 05/02/2012, à 19:35
chaoswizard
Re : TVDownloader: télécharger les médias du net !
Voilà, la version 0.5 est arrivée dans le PPA !
Ubuntu ==> Debian ==> Archlinux
Hors ligne
#1252 Le 05/02/2012, à 20:08
ynad
Re : TVDownloader: télécharger les médias du net !
@Greg_lattice
comme f.x0 avec la même ligne de comma... |
Python: "Batteries Included"
Rather than looking to a data store like RabbitMQ, Redis, or an RDBMS, I think python and a couple libraries have more than enough to solve this problem. Some may complain that this do-it-yourself approach is re-inventing the wheel but I prefer running a hundred lines of python code over ma... |
I have a model Zone, a model Entity and a model Transit. Transit is minimally defined as:
class Entity(db.Model):
__tablename__ = 'entities'
id = db.Column(db.Integer, primary_key=True)
contained_by = db.Column(db.Integer, db.ForeignKey('entities.id'))
contains = db.relationship('Entity', backref='conta... |
I was looking for a Command pattern implementation in Python...(According to Wikipedia,
the command pattern is a design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time.
)
The only thing I found was Command Dispatch pattern:
class Dispatcher:
... |
One of the big topics in the BigData community is Map/Reduce. There are a lot of good blogs that explain what Map/Reduce does and how it works logically, so I won’t repeat it (look here, here and here for a few). Very few of them however explain the technical flow of things, which I at least need, to understand the per... |
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. Introduction▲
Cet article est destiné aussi bien aux professionnels qu'aux particuliers, qui que vous soyez, quelque soit votre logiciel, votre langage de programmation ou vos objectifs. Avec la géolocalisation, vous ne verrez plus vos données comme de simples chaînes de caractères.
Quand dans vos données vous avez ... |
How can I tell a Tkinter window where to open, based on screen dimensions? I would like it to open in the middle.
This answer is based on Rachel's answer. Her code did not work originally, but with some tweaking I was able to fix the mistakes.
root = Tk() #Sets root
root.title("My Text Editor") #This is the tile at the... |
The number of ways to put $n$ unlabeled balls in $k$ distinct bins is $$\binom{n+k-1}{k-1} .$$ Which makes sense to me, but what I can't figure out is how to modify this formula if each bucket has a max of $m$ balls.
EDIT: What I've tried:
I got to the generating function $$(1-x^{m+1})^k(1-x)^{-k}$$ which ends up givin... |
I've read almost all the other questions about the topic, but my code still doesn't work. I think I'm missing something about python variable scope.
Here is my code:
PRICE_RANGES = {
64:(25, 0.35),
32:(13, 0.40),
16:(7, 0.45),
8:(4, 0.5)
}
... |
I have a python string in the following format:
"x1 y1\n x2 y2\n x3 y3\n ..."
I would like to transform this into a list points = [p1, p2, p3,...], where p1, p2 and p3 are [x1,y1], [x2,y2] and [x3,y3] etc.
Thanks
Think you can use the following:
inputText = "x1 y1\n x2 y2\n x3 y3\n"
print [line.split() for line in inpu... |
Shanx
Python : écoute d’un port TCP
Bonjour à tous
je voudrais faire un programme en python qui joue un rôle de serveur : il écoute un port TCP (dans mes exemples le port 81), et quand il reçois quelque chose il répond sur le port 234. J’ai récupéré des morceaux de codes sur internet, et j’arrive à faire communiquer 2 ... |
I'm not sure if the title gave the best description. But this here is my problem. I have a class named 'Ball'. Each ball has its own width, radius and color. My code worked great while I was adding my own balls before the loop eg. ball1 = Ball() .... ball2 = Ball() I'm using pygame and what I want is so that whenever I... |
im making some simple python post script but it not working well.
there is 2 part to have to login.
first login is using 'http://mybuddy.buddybuddy.co.kr/userinfo/UserInfo.asp' this one.
and second login is using 'http://user.buddybuddy.co.kr/usercheck/UserCheckPWExec.asp'
i can login first login page, but i couldn't l... |
Update (May 2014): Please note that these instructions are outdated. while it is still possible (and in fact easier) to blog with the Notebook, the exact process has changed now that IPython has an official conversion framework. However, Blogger isn't the ideal platform for that (though it can be made to work). If you ... |
Sector11 wrote:
Thanks for the kind words Sector. I forgot to mention that the maximum width for the conky is set for my netbook resolution (1024x600).
I have a 1280x1024 screen, I have tried to make a one line conky ... get it 'almost' done and, oops!, it becomes a two liner and when it's finished a 3 line conky ... I... |
Can anybody tell me what can be the cause of this error or where can I find out more about this error?
event.preventDefault();
try{
var itemsVector:Vector.<Object> =
event.dragSource.dataForFormat('itemsByIndex') as Vector.<Object>;
}
catch(errObject:Error) {
trace(errObject.message);
}
... |
I'm calling a function in Python which I know may stall and force me to restart the script. How do I call the function or what do I wrap it in so that if it takes longer than 5 seconds the script cancels it and does something else.
Thanks
You may use the signal package if you are running on UNIX:
In [1]: import signal
... |
This is as much as I know how to do, not sure if I'm doing it correctly.
L = [4, 10, 4, 2, 9, 5, 4 ]
n = len(L)
element = ()
if element in L:
print(element)
print("number occurs in list at the following position, if element not in list")
print("this number does not occur in the list")
How do I go about getting ele... |
Gevent, Long-Polling & You
A big focus lately (as far as web technology trends go) is the move to"real-time". "Real-time" is a loaded terms that can mean a lot of things todifferent people, but what is consistent is people's desire to always have thelatest information, without a lot of effort on their part. Because, le... |
goyou
[Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]
Bonjour,
Pour quelqu'un qui a déjà installé numpy sur son pc, l'idée est de pouvoir invoquer un terminal qui charge python et qui charge numpy automatiquement pour s'en servir comme d'une calculatrice.
C'est-à-dire qu'on obtient une fenetre en lign... |
So I may have a rather unique use case here, but I'm thinking it should work- But it's not working correctly.
Basically, I have a class that uses a static factory method ( create ) that returns a shared_ptr to the newly created instance of the class. This class also has a virtual function that I'd like to override from... |
Hi there fellas. This is an answer posted on stackoverflow by e-satis. The original link to the answer is given at the end. No credit goes to me. All of the credit goes to the original author. This answer is posted just because most of us are unaware of how decorators work in python and this answer solves that problem ... |
You can fix this by finding out what exactly causes the "pygame parachute".
Your first step to find this out is to add detailed logging to your code. Start off with poor man's print() logging:
print("importing pygame")
import pygame
print("initialising pygame")
pygame.init()
...
With that sort of code you might get an... |
The Software Center has a section of For Purchase programs —see screenshot below—,
which is annonying me every time I want to install something.
Is there any way to remove or hide these programs from the Software Center?
Links to answers:
The Software Center has a section of
Is there any way to
For 12.04
1. Ignore the ... |
k3c
[script Python] Récupérer simplement des proxys de différents pays
J'ai écrit un module Python qui récupère des proxys sur proxynova.com, exemple
1) get_valid_countries()
affiche la liste des pays pour lesquels au moins un proxy est disponible
2) get_proxy('ca')
affiche dans une liste les proxys du Canada, gb pour ... |
I am using the Pyro package to create a daemon which will, upon startup, prompt for a password, and then the daemon will store that password as long as it is running. Other scripts will then make a Pyro connection to this daemon and execute methods from the daemon, none of which reveal or have access to the password:
m... |
JavaScript
macaela — 2011-07-19T17:49:29-04:00 — #1
Hi i have the following function that display a list depending on the drop down option the user selects but doesnt not work on explorer it works on other browsers but on exploere i get the following error
SCRIPT600: Unknown runtime error
manitest.html, line 76 charact... |
You can get the string you want (apparently implying a big-endian, 32-bit representation; Python internally uses the native endianity and 64-bits for floats) with the struct module:
>>> import struct
>>> x = 173.125
>>> s = struct.pack('>f', x)
>>> ''.join('%2.2x' % ord(c) for c in s)
'432d2000'
this doesn't yet let y... |
S'amuser avec un .wav
tlpl: Je me suis amusé à lire un fichier wav. Le C fut le langage le mieux adapté à ce traitement. Bien meilleur que Ruby par exemple.
edit: Je voulais que ce programme fonctionne sur une machine spécifique. En aucun cas je ne pensais publier ce code pour une utilisation autre que celle-ci.
J’ai e... |
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 ... |
1) Almost-English style:
Test for presence using the in operator, then apply the remove method.
if thing in some_list: some_list.remove(thing)
The removemethod will remove only the first occurrence of thing, in order to remove all occurrences you can use while instead of if.
while thing in some_list: some_list.remove(... |
I have read several tutorials, but I just can't this to work. My apache config file looks like this (with the important few lines at the bottom):
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
... |
#1 -1 » serveur secondaire teste serveur primaire via le web, et inversement » Le 20/08/2010, à 16:07
Sylau
Réponses : 2
Voici ma config:
[réseau privé]----[switch]----[serveur #1]----{web}----[routeur]----[serveur #2]
Postulats:
- J'ai deux adresses no-ip puisque j'ai des ip dynamiques
- #1 est mon gateway, dhcp, pxe,... |
oliver2004
problème wifi avec portable HP nx6125...
Salut à tous, je viens d'installer sans trop de mal Kubuntu 7.10 sur mon portable HP Compaq nx6125 (j'ai de la chance il n'est pas tatoué...). Aparemment tout marche sur la machine... sauf le wifi... j'en ai pas besoin là maintenant mais j'en aurai sûrement besoin et ... |
nknico
Un nouveau dépôt officiel pour Ubuntu (logiciels commerciaux)
Un nouveau dépot officiel vient d'ouvrir. Il contient des logiciels commerciaux. Pour l'instant Opéra et Realplayer sont disponibles.
En gros, pour l'installer, il faut:
* Activer les mises a jour de dapper
* Mettre a jour sa dapper :-)
* Via gnome-ap... |
gtk.Paned — a base class for widgets with two adjustable panes
class gtk.Paned(gtk.Container):
def add1(child)
def add2(child)
def pack1(child, resize=False, shrink=True)
def pack2(child, resize=True, shrink=True)
def get_position()
def set_position(position)
def compute_position(allocation,... |
I am new to python, and I am sorry if what I am asking seems odd. I want to loop over each line on standard input and return a modified line to standard output immediately. I have code that works, mostly. However I do not know how to make this work completely.
I have the following code
while True:
line = sys.stdin.... |
I am trying to generate tree with fasta file input and Alignment with MuscleCommandline
import sys,os, subprocess
from Bio import AlignIO
from Bio.Align.Applications import MuscleCommandline
cline = MuscleCommandline(input="c:\Python26\opuntia.fasta")
child= subprocess.Popen(str(cline),
stdout ... |
This is the first thing I do after logging in:
How can I make it happen automatically?
To make the default Ubuntu IM application Empathy start automatically when you log in, the following instructions are from OMG Ubuntu:
this script will automatically set status to "unavailable" when screen is locked or screensaver is... |
bibichouchou
TVDownloader: télécharger les médias du net ! [2]
A k3c
j'ai fait les mêmes constats quand à l'utilisation du script de KSV.
le flux rtmp était bien utile car les séries n'étaient pas chiffrées. avec la version fragmentée, ce n'est pas le cas
ci-dessous une version corrigée de ton script pour tf1 et compag... |
I have problem using dict in python, I just end up with empty dictionary.
looks like I erase the data each itartion
this code suppose to generate a tests that include tests for each site.
thanks in advance
tests={}
for t in Test.objects.all():
for s in Site.objects.all():
site={}
for sv in s.sitever... |
Is it possible to pickle (using cPickle) an enum that has been exposed with Boost.Python? I have successfully pickled other objects using the first method described here, but none of that seems to apply for an enum type, and the objects don't seem to be pickleable by default.
Not as they are in the module. I am given t... |
davidB21
[Tuto] Installation de x-plane 8.50 sous Ubuntu x86_64
Le simulateur de vol X-plane 8.50 est disponible pour Linux mais uniquement en version 32 bits.
Mais en installant les bonnes librairies on va pouvoir l'utiliser sous notre systême x86_64 .
1) Obtenir x-plane.
En commandant les DVD sur le site : http://www... |
Ruby 1.9 is supposed to have native threads, and GIL is supposed to lift if some threads enters native code (like GUI toolkit main loop or C implementation of some Ruby lib).
But if i start following simple code sample that displays GUI in main thread and do some basic math in separate thread - the GUI will hang out ba... |
smo
Re : Gmediafinder : Youtube/dailymotion/vimeo.. sans flash et bien plus....
ola
ok cool je vais regarder ca apres, la j en fais un "normalement" c est un peu (beaucoup...) plus complique pour les ppa
j vous tiens au jus !
et whoue si vous avez des idees, hesitez pas hein ... j aimerais bien avoir des visualisations... |
[SOLVED] Please see below for application of accepted answer and source code for functioning kivy DatePicker widget.
I've been learning Kivy and decided to make a date picker widgets as a learning exercise.
import kivy
kivy.require('1.4.0')
from kivy.uix.gridlayout import GridLayout
from kivy.uix.boxlayout import B... |
I am using optimize.leastsq to fit data. I would like to constrain the fitting parameter(s) to a certain range. Is it possible to define bounds when using optimize.leastsq? Bounds are implemented in optimize.fmin_slsqp, but I'd prefer to use optimize.leastsq.
I think the standard way of handling bounds is by making the... |
I have problem with JDBC application that uses MONEY data type. When I insert into MONEY column:
insert into _money_test (amt) values ('123.45')
I got exception:
Character to numeric conversion error
The same SQL works from native Windows application using ODBC driver. I live in Poland and have Polish locale and in my... |
I'm using a parser generator that creates somewhat ugly code. As a result my Eclipse project has several dozen warnings emanating from generated source files. I know I can use the @SuppressWarning annotation to suppress particular warnings in particular elements, but any annotations I add by hand will be lost when the ... |
I know LaTeX is used a lot in academia to format papers and dissertations. How is LaTeX used in industry and what are some examples? I am wondering whether knowing LyX will give me a leverage when applying to jobs.
A very common use of LaTeX is for automatic generation of high quality PDF reports that present the resul... |
I've been googling this all day and have not come across a solution, hope you can help:
Using Django 1.6, I made an app called "builds" as part of a project called "computerbuilder".
The site works fine when I use the test server, however I created a file to populate the database with some items, and it's giving me the... |
Consider that I include namespaced reusable application:
urlpatterns = patterns('',
# ella urls
url('^ella/', include('ella.core.urls', namespace="ella")),
)
Now, the Ella applications has urls like that:
urlpatterns = patterns( '',
url( r'^(?P<category>[a-z0-9-/]+)/$', category_detail, name="category_deta... |
Author goska
Submission date 2012-02-06 15:27:49.869469
Rating 4847
Matches played 459
Win rate 52.94
Use rpsrunner.py to play unranked matches on your computer.
import random
class RPS:
def __init__(self):
self.num = 0
self.statistika = [0 for x in range(3)] + [1 for x in range(5)]
self.str... |
I want to run the periodic tasks using celery and celerybeat.am using celery 3.0.12 django-celery 3.0.11 kombu 2.5.3 and billiard 2.7.3.19 python 2.6 django 1.4.2. Can anyone please tell where its going wrong or missing any configuration part?
Traceback (most recent call last):
File "manage.py", line 10, in <module>
ex... |
I have problems in connecting to internet via my WLAN.
I had ubuntu 10.04 LTS initially which I recently upgraded to 12.04 LTS, the problem existed from the earlier version.
I can connect to internet with a ethernet.
I am able to scan for the available WLANs. Also I can connect to a WLAN of my choice. But I am unable t... |
Tagged union
It has been suggested that Variant type be merged into this article. (Discuss) Proposed since August 2014.
This article does not cite any references or sources. (August 2009)
In computer science, a tagged union, also called a variant, variant record, discriminated union, disjoint union, or sum type, is a d... |
Commercial Services ✈ Flight Status API / Flight Tracking API / FlightAware API ✈ Documentation
FlightXML 2.0 Documentation
About
Using the FlightXML API, programs can query the FlightAware live flight information and recent history datasets.
Queries for in-flight aircraft return a set of matching aircraft based on a c... |
I have the next collection:
{"status": "new", "date": {"$date": 1334841845571}, "_id": {"$oid": "4f901223e4b0c2899fb22da0"}, "description": "description 1", "number": "01"}
{"status": "new", "date": {"$date": 1334841845571}, "_id": {"$oid": "4f90126fe4b0c2899fb22da1"}, "description": "description 1", "number": "02"}
{"... |
so i have a os.walk code
search = self.search.get_text()
top = '/home/bludiescript/tv-shows'
for dirpath, dirnames, filenames in os.walk(top):
for filename in filenames:
if fnmatch.fnmatch(filename, search)
print os.path.join([dirpath, filename])
on python docs it shows you can match any seq of chars with ... |
In djano admin the database has one of its coloumn always displayed as a link. How can we avoid gettin the link on these elements that djano gives us by default.
You can use
class WhateverAdmin(django.contrib.admin.ModelAdmin):
def filtered_url_filed(self):
return '' if self.url_field == self.url_filed.default... |
I once needed to an XTEA snippet to from C++ to Python and it did not work properly. I then found a function on ActiveState.com and noticed that it looks almost exactly like mine, with one exception - for some reason, its "delta" variable was changed. Here's the test code:
import struct
def XTEA_encrypt(buf, k):
re... |
I'm trying to use a queue with the multiprocessing library in Python. After executing the code below (the print statements work), but the processes do not quit after I call join on the Queue and there are still alive. How can I terminate the remaining processes?
Thanks!
def MultiprocessTest(self):
print "Starting mul... |
I ran into the same problem. Facebook authentication API returns the access token behind a hash appended into the redirection url. In the same way, Flask's request.url drops everything in the URL behind the hash sign.
I'm also using Flask so I think you can use my brute-force workaround using Javascript's window.locati... |
I normally use avidemux to convert mp4s to Xvid AVI for my Philips Streamium SLM5500. Normally I select MPEG-4 ASP (Xvid) at Two Pass with an average bitrate f 1500kb/s for video and AC3 (lav) audio and it converts correctly.
However, I'm trying to using avconv so I can automate the process with a script, but when I do... |
I need change only background colour of window, and keep widgets in system colours.
The space between boxes should keep different colour
Something like this
I don't know if clutter is here better way to make it look this way
I need change only background colour of window, and keep widgets in system colours.
The space b... |
After coming back to try to finish more of my OpenPGP implementation, I refound one of my questions http://stackoverflow.com/questions/6021360/openpgp-tag-18-19-description-confusion that I am still having trouble with.
This time however, I have been able to encrypt some data and get another program to decrypt it. The ... |
[This post was written by Dipanjan. Dipanjan is a Data Engineer at DataWeave who works with Mandar addressing some of the semantics related problems like product clustering and data normalization.]
Twitter, as we know, is a highly popular social networking and micro-blogging service used by millions worldwide. Each sta... |
I've been trying for hours to get this simple script working, but nothing I do seems to help. It's a slight modification of the most basic animated plot sample code from the Matplotlib website, that should just show a few frames of noise (I have the same issue with the unmodified code from their website BTW).
On my com... |
May 9, 2014
One of the first things that Haskell beginners usually notice is that Haskell has this somewhat unusual but attractive way of defining functions case-by-case:
foldr f z [] = z
foldr f z (x:xs) = f x (foldr f z xs)
It looks fun and math-y. The other way to do pattern matching, case expressions, is much... |
I am running ubuntu 10.10, and installed Gnome Activity Journal. However it does not show any recently used files. I have attached a screenshot below.
Please note that gnome activity journal has been installed on the system for quite some time. So it is not that I recently installed and it still has to slowly gather da... |
[edit 2013-11-25: note that recent versions of pylibftdi have deprecated and then removed the ability to use 'Driver' in this way; replace Driver and BitBangDriver with Device and BitBangDevice in the code below]
Toggling an LED or other device from pin D0
from pylibftdi import BitBangDriver
import time
with BitBangDri... |
I've come to run my app in development locally this morning, in the Google App Engine Launcher for Windows. Up until yesterday this has been working fine, and the code hasn't been changed since then.
Now, when I try to run the app on localhost I get the yellow warning sign in the Launcher and the log shows the followin... |
I've put together this solution to resolve your issue, and tested it on KDE and XFCE with opening text files and font files. It is a generic solution that should be applicable to any number of desktop environments and mime types. The way it works is there is a simple python script called custom-open that will open a fi... |
How do I recursively compare two directories (comparison should be based only on file name) and print out files/folders only in one or the other directory?
I'm using Python 3.3.
I've seen the filecmp module, however, it doesn't seem to quite do what I need. Most importantly, it compares files based on more than just th... |
Anbreizh
[Résolu] Threads+Python
Bonjour a tous !
Alors la je dois avoué que je vois pas comment faire. Je suis en train d'essayé de mettre en place plusieur threads dans mon programme. Je veux en faire faire un Thread pour L'interface graphique, et un autre pour les commandes gourmande (Copie de fichiers .... )
Je l'a... |
#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... |
chaoswizard
Re : TVDownloader: télécharger les médias du net !
Bonsoir,
Non ce n'est pas possible, RtmpDump (et je suppose Flvstreamer) n'arrive pas à parser l'URL si elle n'est pas découpée.
J'avais étudié ce problème en mettant au point Arte Live Web pour TVO.
Bon courage pour votre projet
Je viens pourtant de tester... |
Well, this query struck my mind when someone pointed out to me that importing a package using import package gives more code readability. Is this actually true? I mean when using this statement as compared to from package import x, y, z, isn't there any overhead of importing the entire package?
Well, this query struck ... |
Perhaps someone more fluent in Python's Multiprocessing Pool code could help me out. I am trying to connect to several hosts on my network simultaneously (N at any one time) over a socket connection and execute some RPC's. As one host finishes, I want to add the next host into the Pool to run until all are complete.
I ... |
ok, since it seems not possible, I put together a proto-plugin for gedit2 that works for me at the moment. I still hope that someone has a better answer...
~/.gnome2/gedit/plugins/mimeprefs.py
import gedit
class MimePrefsPlugin(gedit.Plugin):
def __init__(self):
gedit.Plugin.__init__(self)
def activate(... |
luc765
Re : Synthèse vocale SVOX Pico
Merci à frafra et tuxmuraille, pour votre travail.
J'utilisais espeak avec mbrola, la qualité de SVOX est nettement meilleure
J'ai installé gSpeech sur Lucid via la compilation pour SVOX. Tout est parfait.
Dans l'utilisation est-il possible de modifier la vitesse de lecture par un ... |
ogaby
Re : [ATTENTION] Faille de sécurité critique dans le noyau Linux !
vi...
Avec cette simple ligne, on peut bénéficier des mises-à -jour de sécurité plus rapidement que sur un dépà´t européen. Je dis "européen" car je vis en Allemagne et mon dépà´t "normal" n'a pas encore cette mise-à -jour.
Hors ligne
zappinggg
Re... |
#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... |
My problem is I'd like to use Latex titles in some plots, and no latex in others. Right now, matplotlib has two different default fonts for Latex titles and non-Latex titles and I'd like the two to be consistent. Is there an RC setting I have to change that will allow this automatically?
I generate a plot with the foll... |
The hello world demo for Flask is:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
What if I modified this like so:
from flask import Flask
app = Flask(__name__)
a = 1
b = 2
c = 3
@app.route("/")
def hello():
a += 1
b... |
hi im study programming by Gtk3 and i try to using glade i installed it, But when i try to load the file from glade I have the problem:
" AttributeError: 'gi.repository.Gtk' object has no attribute 'glade' "
or this when I using only (Gtk.Builder):
" AttributeError: 'Builder' object has no attribute 'glade' "
I know i ... |
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 have a File class:
class File(DeclarativeBase):
__tablename__ = 'files'
id = Column(Integer, primary_key=True)
name = Column(String)
mime_type = Column(String)
data = Column(LargeBinary)
which I use for storing attachments in my application. I also have a Note class:
class Note(D... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.