text stringlengths 256 65.5k |
|---|
I'm trying to send the contents of a file over to the client 1 line at a time so that the client (written in Objective-C) can process each line individually. However the log of the client shows that the data being send over from the server is all coming through as 1 line and is apparently too large so the it cuts off m... |
Introduction
Background
I'm writing a script to upload stuff including files using the multipart/form-data content type defined in RFC 2388. In the long run, I'm trying to provide a simple Python script to do uploads of binary packages for github, which involves sending form-like data to Amazon S3.
Related
This questio... |
I am working on a django project (my first), and in one of my views, I have a sophisticated html snippet with JS weaved within it. I would like to reuse this "component" somewhere else in the same view. Is there a way of achieving this? Please let me know if this design is faulty to begin with?
Use the
Not sure, if you... |
Piddle Graphics Online
by Michal Wallace
06/28/2001
In Generating Graphics With Piddle we generated a gantt chart using piddle and the Python Imaging Library. Now we'll extend this concept to generate graphics in real time on the Web. We'll build on the code from the previous article, making references to it as we go a... |
I want to use sqlalchemy in a way like this:
email1 = EmailModel(email="user@domain.com", account=AccountModel(name="username"))
email2 = EmailModel(email="otheruser@domain.com", account=AccountModel(name="username"))
Usually sqlalchemy will create two entries for the account and link each email address to this. If i ... |
#2601 Le 29/12/2012, à 21:49
bibichouchou
Re : TVDownloader: télécharger les médias du net !
Dans le gestionnaire de paquet, as-tu remarqué s'il y avait une coche en face des lignes
http://ppa.launchpad.net/chaoswizard/tvdownloader/ubuntu quantal main
Si les lignes ne sont pas cochées, c'est que le dépôt n'est pas act... |
I would like to use the following code to determine if a path exists. The path I would like to check is being passed to my code via parameter on a ArcMap 10.0 tool dialog box. The parameters data type is folder, this folder path is being passed along to sys.argv[2] in my code below.
{import sys
import os
if os.path.exi... |
Ruby has a couple of well-known libraries for unit testing, mocking and stubbing HTTP interactions. My typical toolset includes RSpec, WebMock and VCR. I had the chance to work on a Python project recently and did some investigation into similar libraries for Python.
General testing libraries
The two most popular pytho... |
I'd like to create a custom scope that searches and returns results from an online source for personal use.
Is this possible? And if so, how?
Yes it is absolutely possible and really easy to create new scopes. The Ubuntu App Developer site has lots of content to get you started writing scopes:
For development in python... |
fffredo
traduction française (résolu)
Bonjour la communauté, je suis sous kde 4.12.1 et ubuntu 13.10.
Tout marche bien sur ma monture depuis un bon moment et là d'un coup j'ai kickoff qui passe en anglais tout comme libreoffice et les menus clic droit ????
j'ai bien depuis longtemps les paquets de langue installé (je l... |
I'm trying to follow PEP 328, with the following directory structure:
pkg/ __init__.py components/ core.py __init__.py tests/ core_test.py __init__.py
In core_test.py I have the following import statement
from ..components.core import GameLoopEvents
However, when I run, I get the following error:
tests$ python core_te... |
maltamirano wrote:
Can I modify iRedAdmin-Pro LDAP code to access filesystem and remove folders?
Please, point out which file/files should be modified. I'm not a Python geek, but understand MVC architecture and can code...
Alright, here we go:
*) WARNING: Please test your code on a testing machine first, don't do it on... |
#0 Re : -1 » Quelles photos c'est !!! » Le 07/06/2013, à 14:03
loutre
Réponses : 462
S'il fallait trouver un intérêt aux photos de dictateurs "jeunes", c'est qu'elles sortent de la représentation officielle du tyran.
On a souvent en tête l'image très rigide, et donc distante, de ces personnages.
C'est très con dit comm... |
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... |
Lazy imports can be done either explicitly, by moving import statements inside functions (instead of at the global level), or by using tools such as LazyImport from egenix. Here's why they suck:
> fetchall (PgSQL:3227)
--> __fetchOneRow (PgSQL:2804)
----> typecast (PgSQL:874)
... 26703 function calls later ...
----< ty... |
I have a small problem that I think should be easily handled by SQL Alchemy but I can't seem to get it right. I have two tables with one being a parent table and the other a child table. For each child record it needs a unique ID but only with the context of the unique parent record.
I am using the Declarative Base app... |
It is a habit that you pick up after working with Python for a while. I hate to say it but it is a good habit. As a C/C++/C# programmer for a long time, I have been brought up with the "curly braces" mentality. We learn it in school, we do it at work, we read it in other people's code. If you look at C/C++/C# code, you... |
AuthorPosts
August 19, 2013 at 5:32 pm #28053
Hi, I’d like to change two things: change the meta under the images on the grid layout (comments/dates) & the informations on the articles themselves.
I – GRID LAYOUT
Currently on the grid preview layout it goes like this:
2 Comments / August 4, 2013
I’d like to do somethin... |
I'm building a Quickly ~ HTML5 Application, it works great until I try to use WebSQL Storage, which fails to open a databse:
var db = openDatabase('mydb', '1.0', 'Test DB', 5 * 1024 * 1024);
giving the next error: Error: SECURITY_ERR: DOM Exception 18
The Python code that calls the webview is this:
self.webview = WebKi... |
Notify-osd does not handle actions. This is an explicit design decision by the developers. As the design spec states, "Other than that hover effect, bubbles should not directly respond to input devices in any way." The it also asserts that when actions are requested, it will fallback to an alert box:
For cases where ap... |
Programming Praxis' new challenge(s) are to write three different list algorithms three times, each with a different runtime complexity. From their first post last week we have list intersection and union and from a newer post yesterday we have the difference of two lists. For each of those, we want to be able to write... |
We have an Agent job that runs every morning at 2a.m. to defrag the top 5 biggest tables. Usually it takes around 20 mins to complete. It has stayed this way for several years. However, recently (last week or so) I've noticed that it's been taking significantly longer (2-7 hours). This morning, I had to terminate the j... |
Ok, my first answer has gotten quite a bit of flack, so I thought I'd try a few different ways of doing this and report the differences. Here's my code.
import sys
import itertools
def getFirstDup(c, toTest):
# Original idea using list slicing => 5.014 s
if toTest == '1':
for i in xrange(0, len(c)):
... |
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... |
Hi im having some trouble with foreign key in sqlalchemy not auto incrementing on a primary key ID
Im using: python 2.7, pyramid 1.3 and sqlalchemy 0.7
Here is my models
class Page(Base):
__tablename__ = 'page'
id = Column(Integer, ForeignKey('mapper.object_id'), autoincrement=True, primary_key=True)
title ... |
What is a generator?
A generator is a special kind of function that returns an iterator. It looks like a normal function, but values are returned to the caller using a yield statement instead of a return statement. When yield is called, the function is suspended and the yielded value is returned to the caller. The func... |
Because sometimes it's more practical than designing a solution around queues, I would like to write a simple wrapper to make an iterator thread safe. So far, I had inspiration from these topics and came up with two ideas:
Idea 1
class LockedIterator(object):
def __init__(self, it):
self._lock = threading.L... |
clahor
topic des sources lists??
bjr je viens d'installer ubuntu et voudrait paufiner mon sources-list , il y avait un thread avec les sources-list "personnalisés" , quelqu'un aurait il l'URL SVP
Hors ligne
Stardust
Re : topic des sources lists??
bonjour
voici mon fichier sources list
## Automatix sources.list
## This ... |
I have the following problem:
A mail server, sends emails with rate $7.5/\text{hour}$.
What is the probability that it will send exactly $5$ emails in one hour?
To solve it, I did the following using a Poisson distribution:
$$\frac{7.5^5 e^{-7.5}}{5!}$$
or with sage math:
def dpoi(x):
return (7.5^x * (e^-7.5)) / fact... |
The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group
NAME
pnoutrefresh, prefresh - refresh pads
SYNOPSIS
#include <curses.h>
int pnoutrefresh(WINDOW *pad, int pminrow, int pmincol, int sminrow,
int smincol, int smaxrow, int smaxcol);
int prefresh(WINDOW *pad, int pminrow, int pmin... |
Is it possible to use Django serializer without a Model?
How it is done?
Will it work with google-app-engine?
I don't use Django framework, but since it is available, I would want to use its resources here and there. Here is the code I tried:
from django.core import serializers
obj = {'a':42,'q':'meaning of life'}
seri... |
You can do this easily from NetworkManager's pygi bindings:
from gi.repository import NetworkManager, NMClient
nmc = NMClient.Client.new()
devs = nmc.get_devices()
for dev in devs:
if dev.get_device_type() == NetworkManager.DeviceType.WIFI:
for ap in dev.get_access_points():
print ap.get_ssid()
... |
I am trying to use NumPy and vectorization operations to make a section of code run faster. I appear to have a misunderstanding of how to vectorize this code, however (probably due to an incomplete understanding of vectorization).
Here's the working code with loops (A and B are 2D arrays of a set size, already initiali... |
I thought this was going to be easier but after a while I'm finally giving up on this, at least for a couple of hours...
I wanted to reproduce this a trailing stars image from a timelapse set of pictures. Inspired by this:
The original author used low resolution video frames taken with VirtualDub and combined with imag... |
Another key point is that the mouse messages all report the position in "Screen Coordinates" (i.e., relative to the top-left corner of the screen) rather than in "Client Coordinates" (i.e., relative to the top-left corner of our window). You use a member function PyCWnd.ScreenToClient() to transform these coordinates.
... |
Enhancing the DocumentTemplate
Although MFC and PythonWin support multiple document templates, there's a slight complication that isn't immediately obvious. When MFC is asked to open a document file, it asks each registered DocumentTemplate in turn if it can handle this document type. The default implementation for Doc... |
Having investigated the new Google D&S forms feature, I decided to create a proof-of-concept blog application (OK - calling it an application is a *bit* an overstatement). It has some basic features, like form for entering entries and a feed. I doesn't have a site and is pretty much crippled. Still, quite good for 0 li... |
Create a Python script called whatever you want (say mystartup.py) and then set an environment variable PYTHONSTARTUP to the path of this script. Python will then load this script on startup of an interactive session (but not when running scripts). In this script, define a function similar to this:
def _(v):
if typ... |
Module imaplib
IMAP4 client.
Based on RFC 2060.
Public class: IMAP4
Public variable: Debug
Public functions: Internaldate2tuple
Int2AP
ParseFlags
Time2Internaldate
IMAP4
IMAP4 client class.
IMAP4_SSL
IMAP4 client class over S... |
JavaScript
stevemtno — 2012-01-10T12:51:47-05:00 — #1
I'm guessing this is a pretty easy problem to fix, but I can't find any code that will do what I need.
I have a group of images (all different sizes). Each image will have a corresponding text link. I need to be able to click on one of the text links and display the... |
I'm really sorry to bother you with an AttributeError, but I just can't figure out what's wrong with my code though I worked through many solved question regarding AttributeErrors.
This is my code:
class Base:
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_position... |
I have the following decorator inside a module:
class CachedProperty(object):
"""Decorator that lazy-loads the value of a property.
The first time the property is accessed, the original property function is
executed. The value it returns is set as the new value of that instance's
property, replacing the... |
tiramiseb
Re : configuration des DNS
S'il-te-plait, pour des citations utilise la balise "[ quote ]" et non la balise "[ code ]", c'est pénible de devoir défiler horizontalement pour lire les phrases que tu cites...
Hors ligne
kr2sis
Re : configuration des DNS
ça y est je sui perdu...:o
est ce qu'on peut faire doucemen... |
I was looking for a way to create multiple ad-hoc copies of a dictionary to hold some "evolutionary states", with just slight generational deviations and found this little prototype-dict:
class ptdict(dict):
def asprototype(self, arg=None, **kwargs):
clone = self.__class__(self.copy())
if isinstance... |
Suppose I have a dictionary which is dictList = {1:[1,3,4,8], 2:[5,7,2,8], 3:[6,3,5,7]}
I want to print all the combinations like this: key,value first iteration 1,1 2,5 3,6 second iteration 1,1 2,5 3,3 .... and so on
Assuming that what you're trying to do is retrieve every unique set of three key,value pairs:
from ite... |
You'd be a little happier with the following.
import subprocess
awk_sort = subprocess.Popen( ["-c", "awk -f script.awk | sort > outfile.txt" ],
stdin= subprocess.PIPE, shell=True )
awk_sort.communicate( "input data\n" )
awk_sort.wait()
Delegate part of the work to the shell. Let it connect two processes with a pip... |
k3c
Re : TVDownloader: télécharger les médias du net ! [2]
Merci Julien
J'ai testé avec succès pour plusieurs vidéos comme
par contre le --resume devrait être optionnel
python d8_julien.py http://www.d8.tv/d8-art-de-vivre/pid5205-d8-a-vos-regions.html
rtmpdump -r "rtmp://geo2-vod-fms.canalplus.fr/ondemand/geo2/1304/A_V... |
Whilst the Pi is both less expensive and less prone to temperature issues, myself and many others just can't resist finding new ways to keep an eye on the temperature levels. It's certainly peace of mind for existing projects such as VPN, webservers etc where the Pi is on 24/7.
I previously wrote a bit of code to show ... |
I'm using Ubuntu 12.04. Now up until minutes ago XSensors was working fine. I had to restart due to some updates and it stopped working. By that I mean that it only displays one temperature (the other tab is just blank):
Here is my the output from $ sensors, to show that there is other data being detected:
k10temp-pci-... |
I m trying to compare keyboard input to a string:
import sys
# read from keyboard
line = sys.stdin.readline()
if line == "stop":
print 'stop detected'
else:
print 'no stop detected'
When I type 'stop' at the keyboard and enter, I want the program to print 'stop detected' but it always prints 'no stop detected'... |
I am pretty new with django. I am using django, mongoengine, django-social-auth to build authentication system and to store user profile in mongodb.
I am in process of using 'Custom User Model' mechanism provided by django as follows:
from mongoengine import *
from mongoengine.django.auth import User
class UserProfile(... |
UPDATES: thanks a lot to Gabe and Glenn for the detailed explanation. The test is wrote not for language comparison benchmark, just for my studying on VM optimization technologies.
I did a simple test to understand the performance of string concatenation between Java and Python.
The test is target for the default immut... |
Why is there a difference between 'import ...' and 'from ... import ...' and why do I get an exception using the first one?
Here is my layout:
/tmp/zero/
|~two/
| |-__init__.py
| |-four.py
| `-three.py
|-__init__.py
`-one.py
/tmp/zero/one.py
=================
import zero.two
/tmp/zero/two/__init__.py
==========... |
What can I do with this error message?
"BrokenCount>0"
Reading database ... 957130 files and directories currently installed.)
Preparing to replace initramfs-tools-bin 0.99ubuntu13.2 (using .../initramfs-tools-bin_0.99ubuntu13.4_amd64.deb) ...
Unpacking replacement initramfs-tools-bin ...
Setting up initramfs-tools-bin... |
benoitfra
[Script] reconnaissance vocale avec google
Voilà pas mal de temps que le projet avait été lancé (2012) mais je n'avais pas les compétences et le temps pour amener le projet là où je le désirais. J'ai donc repris tout le projet à 0 afin de fournir un système beaucoup plus souple et rapide de prise en main.
Pri... |
Possible Duplicate:
Hyperref warning - Token not allowed in a PDF string
The following code:
\subsection{The classes $\mathcal{L}(\gamma)$}
generates the errors:
Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
(hyperref) removing `math shift' on input line 1938.
Package hyp... |
It's been explicitly written in Django-facebook that they recommend it to be used with Userena:
We recommend using Django Userena. It seems easier to work with than Django Registration. Both are supported and good packages though. To use django userena simply point to the userena compatability layer.
AUTH_PROFILE_MODUL... |
I know there is a better way to store data. What is the most concise way to simplify this script?
from random import randint
from sys import exit
import os
os.system('clear')
print "Welcome to the dice rolling simulator!"
raw_input("Press enter to begin.")
total = 0
completed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
def rol... |
I will solve a stupid management problem using old mathematics and Google.
Imagine that you have N employees who work side by side in a row. For more conviviality you decide to arrange them in a different order every day, so that after some time each employee has worked besides each of the others at least once. How to ... |
Quite often GAE is not able to upload the file and I am getting the following error:
ApplicationError: 2
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 636, in __call__
handler.post(*groups)
File "/base/data/home/apps/picasa2vko... |
I suppose you solved the problem by now, but I wanted to share another (in my opinion a much more viable) option. When you are interested in evaluating just one --known-- javascript function, it may be easier to implement this function in Python rather than pull in a huge tool that is built to parse and run all imagina... |
image loader
Mar 5, 2011 at 7:50pm UTC
I need to load an image from a file into an array. I would perfer a small snippet of code, but an image loading library would work too.
Mar 5, 2011 at 7:58pm UTC
I know that Allegro can load bitmaps, but I don't think you would need somthing that large just to use one or two funct... |
I'm running Lubuntu 12.04. I have a shell script that tests for a network condition and need some way for it to pop up a notification in the GUI. The network testing part is done, but I need some help with the "pop up a notification in the GUI" part.
You can use the default notification daemon to give notifications wit... |
Flatking
Un "emulateur" windows 100% compatible sous 64bits ?
Bonsoir,
et en voilà encore un qui lache Windows pour se mettre a linux alors j'aurais aimer savoir si il y'avait un "emulateur" ( je sais pas comment vous apellez ça vraiment ) windows qui marche a 100% sur un adm 64 bits, parcque j'ai essayer d'installer c... |
obelix
Ajouter les backports !
bonjour... je voudrais ajouter les backsports comme indiquer http://wiki.ubuntu-fr.org/installation/depots mais cela plante avec tous les backports
une idee ? merci de votre aide
ftp://ftp2.caliu.info/backports/dists/breezy-backports/main/binary-i386/Packages.gz: Impossible de récupérer l... |
Note: this is a repost from my blog. You can find the original post here.
This is my first post to the Mozilla WebDev blog. Woot, exciting!
Table of contents:
Demo
Summary
Server side (Django)
Client side
Graceful degradation
Demo
Screencast
Screenshots:
The upload form, empty and ready for action:
Browsing for an imag... |
I have a small problem that I think should be easily handled by SQL Alchemy but I can't seem to get it right. I have two tables with one being a parent table and the other a child table. For each child record it needs a unique ID but only with the context of the unique parent record.
I am using the Declarative Base app... |
Iam facing issue while reading the document when runnning code from IIS. It is not reading the document and throwirng an error "No document is opne when trying to save the activedocument.".
m_word.Documents.Open(ref FileName,
ref missing, ref readOnly, ref missing, ref missing,
... |
Le Farfadet Spatial
Re : Petit guide pour aider au choix d'un langage
Salut à tous !
Sur amazon, j'ai trouvé ce livre
"Python - Les Fondamentaux du langage - La Programmation pour les scientifiques. de Matthieu Brucher"
Très bon livre, dans la mesure où tu sais déjà programmer et que tu es intéressé par la partie scien... |
benjou
Re : Aidez moi s'il vous plait pour mon projet
benoit@laptop-benoit:~$ picard
Traceback (most recent call last):
File "/usr/bin/picard", line 2, in ?
from picard.tagger import main; main('/usr/share/locale')
File "/usr/lib/python2.4/site-packages/picard/tagger.py", line 73, in ?
from picard import ev... |
I am "converting" a large (~1.6GB) CSV file and inserting specific fields of the CSV into a SQLite database. Essentially my code looks like:
import csv, sqlite3
conn = sqlite3.connect( "path/to/file.db" )
conn.text_factory = str #bugger 8-bit bytestrings
cur = conn.cur()
cur.execute('CREATE TABLE IF NOT EXISTS mytable... |
Freitag, Juni 27, 2014
In JVM prison we live in a totalitarian system. You are not allowed to do something unless you are called to do something.
You can call someone else to ask for assistance. But that's no fun either. You have to stand still and wait for the other to complete your call.
Some poor guys call themselve... |
from DOM-land
/* $$$$$$\ $$\ $$$$$$$\ $$\ $$ __$$\ \__|$$ __$$\ \__| $$ / $$ | $$$$$$\ $$\ $$ | $$ | $$$$$$\ $$$$$$\$$$$\ $$\ $$ | $$ |$$ __$$\ $$ |$$ | $$ |$$ __$$\ $$ _$$ _$$\ $$ | $$ | $$ |$$ | \__|$$ |$$ | $$ |$$ / $$ |$$ / $$ / $$ |$$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ |$$ | $$$$$$ |$$ | $$ |$$$$$$... |
Proper connection of a two-way circuit is (sorry about the ASCII sketch)
sw1 sw2 load
_________________
hot ____/ ______()_____ neutral
_________________ /
... two single-pole, double-throw switches back to back. When both are switched one way (up in this cas... |
My laptop used to work fine. My girlfriend was moving to California for a month, so I gave it to her to take with her. It worked fine the day before she left. Once she got there, it wouldn't work. However, she was staying with her sister who was using WEP and refused to switch to WPA, so I suspected that was the issue ... |
In Python (specifically Python 3.0 but I don't think it matters), how do I easily write a loop over a sequence of characters having consecutive character codes? I want to do something like this pseudocode:
for Ch from 'a' to 'z' inclusive: #
f(Ch)
Example: how about a nice "pythonic" version of the following?
def ... |
Where to get wxPython
The latest version of wxPython can always be found at http://alldunn.com/wxPython/. From this site you can download a self-installer for Win32 systems that includes a prebuilt extension module, documentation in HTML help format, and a set of demos.
Also available from this site is a Linux RPM, wxP... |
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 was trying to resolve the issue below, after some searching it seems to be an open bug in Django. I resolved the issue by adding a classmethod to the model child, although this solution works, it still requires another custom check on any (Model)Form using this child class. I'm posting this for others to find a solut... |
pango.Color — an object representing a RGB color
class pango.Color(gobject.GBoxed):
pango.Color(spec)
A pango.Color objectis a gobject.GBoxed
pango.Color(spec)
a string specifying the new color
a new pango.Colorobject.
Creates a new pango.Color usingthe color attributes specified by the string spec. The string in... |
Bonjour à tous
N'ayant pas grand chose à faire hier après midi, je me suis fait un petit script pour contrôler ma souris à l'aide de mon joypad (tous ceux que j'ai essayé jusqu'ici ne fonctionnent pas chez moi).
Le script utilise pygame pour l'acquisition des signaux de la manette et python-xlib pour le contrôle clavie... |
I'm trying to extract SQLAlchemy query parameter values for use in caching, using the function _params_from_query from the SQLAlchemy Beaker Caching example.
Unfortunately when I try it with a query involving a subquery, it seems to only traverse the main query parameters, ignoring the subquery.
The following example c... |
Babdu89
Re : HY-D-V1 un nouveau Desktop
Bonjour...
Alors, comme j'ai toujours du temps, de la place sur mes hdd, et de la suite dans les idées ...
Toujours au sujet de la tentative d'Hybrydiser la Cubuntu 13.04 32 bits ... Voir post ci-dessus .
J'ai réinstallé, j'ai fais les maj système en commande, j'ai été obligé d'i... |
joko
Re : Qarte arte.tv browser (ex Qarte+7)
bonjour, grands compliments à VinsS et consors, vraiment épaté. bravo à tous les p'tits fouineurs !
qualité vidéo géniale, rien à voir avec celle du site d'arte +7 !!!
Dernière modification par joko (Le 06/11/2012, à 12:35)
Je suis un homme, quoi de plus naturel en somme ?
l... |
I'd like to create a custom scope that searches and returns results from an online source for personal use.
Is this possible? And if so, how?
Yes it is absolutely possible and really easy to create new scopes. The Ubuntu App Developer site has lots of content to get you started writing scopes:
For development in python... |
In the FTP Server example it uses IWriteFile which expects a consumer the code I have now currently buffers and sends 4mb chunks to a server, however the producer write doesn't seem to expect a deferred but a synchronous write is it safe to use a deferred?
Code
# Deals with giving the FTP Connection a FileConsumer then... |
Also worth trying is the readchar library, which is in part based on the ActiveState recipe mentioned in other answers.
Installation:
pip install readchar
Usage:
import readchar
print("Reading a char:")
print(repr(readchar.readchar()))
print("Reading a key:")
print(repr(readchar.readkey()))
Tested on Windows and Linux... |
Marrrrrrrie
Pas de scroll avec le touchpad (ubuntu 12.04)
Bonjour,
Je viens d'installer ubuntu 12.04 sur un Dell latitude E6330.
Il y a un seul problème majeur : le scroll sur le côté droit du touchpad ne fonctionne pas.
Le scroll-down marche avec une souris externe. Dans les paramètres systèmes il semble que mon touch... |
I'm having issues removing several of my href links that all have the same ID. Here is my code snippet:
$('.delblk').click(function(e) {
e.preventDefault();
var id = $(this).attr('id').substr(7);
$.getJSON("../ajax_blocked.php?op=delete&id="+id, function(data) {
if (data) {
$... |
Vicks
openoffice et accents circonflexes...
Bonjour à tous,
J'ai un gros problème avec les acents circonflexes que je ne peux pas utiliser lorsque je suis sous openoffice. Cependant, sur le reste de ma config il n'y a aucun problème...
Merci beaucoup de votre aide...
@+
Vicks
Hors ligne
Vicks
Re : openoffice et accents... |
Certainly, it's not that hard either:
shortword = re.compile(r'\W*\b\w{1,3}\b')
The above expression selects any word that is preceded by some non-word characters (essentially whitespace or the start), is between 1 and 3 characters short, and ends on a word boundary.
>>> shortword.sub('', anytext)
' echo chamber from ... |
I am using a tktable in an application I am making using the Python's tkinter module.
When I select a cell and type in it the colour of the text is white, which is very hard to read. How do I change this colour to black for example.
I have already changed the 'foreground' colour, yet I has not made a difference.
self.t... |
Given a list of vertices (v), and a list of edges connecting the vertices (e), and a list of surfaces that connect the edges (s), how to calculate the volume of the Polyhedron?
Given a list of vertices (
Notes:
[ x1 x2 x3 x4 ]
where the columns are the homogeneous coordinates of the verticies (x,y,z,1).
It works even i... |
yann458
paquet computertemp ou autre
Bonjour,
J'ai monté une machine AMD , et étant donnée que les processeur AMD chauffe plus ,
je cherche un utilitaire aqéquat qui avertit d'une boite de dialogue si le processeur est en surchauffe.
L'utilitaire computertemp joue un son si le processeur est en surchauffe , et je prefe... |
The rr.nu PHP Worm and Encrypted Webshells: Dyslexic Mayans Want to Sell You Cialis
Problems with preg_replace("/.*/e","\x65\x76 , $_8b7b="\x63\x72\, eval(base64_ hacks, and those damn rr.nu domain redirects
My shared host account got hacked-TFU last Monday. After looking a little closer it became clear that there had ... |
Anime Slam Dunk Subtitle Indonesia. Ini link Download Slam Dunk Subtitle Indonesia Gratis. Enjoy... ^_^
Sinopsis Slam Dunk Subtitle Indonesia :
Hanamichi Sakuragi adalah seorang berandalan yang telah 50 kali ditolak perempuan yang diminta untuk menjadi pacarnya. Ia kemudian bertemu Akagi Haruko, gadis idamannya yang me... |
How To Talk So The Government Can’t Listen. Part 1: how to encrypt your e-mail in Gmail with GPG (for use with Gmail or other web mail interfaces on Firefox in Windows)
Fellow counter-economists,
Let’s suppose that you want to send somebody an message that contains sensitive information which you want only the person g... |
Last night Andrew, Viddler's frontend guy suggested to me that the MySQL querycache free space graph looked like a waveform and that MySQL was trying to tell us something.
So of course I had to convert the RRD data into a waveform.
The resulting sound is here.
I can't make anything out. It could be a different language... |
After some research i found the solution using Python-Xlib.
In the code that generates the window, it is possible to get the window ID, which is the reference for the window on X. Depending on the GUI kit used, the method to get this ID may vary. Qt4 provides QWidget.winId(), Gtk+2 has its own means to reserve space fo... |
Suppose I have a class NamedObject which has an attribute name. Now if I had to use a setter, I would first have to define a getter (I guess?) like so:
class NamedObject:
def __init__(self, name):
self.name = name
@property
def name(self):
return self._name
Now I was wondering, inside the s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.