text stringlengths 256 65.5k |
|---|
I am trying to send mail using Python 3.2. My code is as follows:
#from email import Encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import COMMASPACE, formatdate
import os
import smtplib
from base64 import encode
from em... |
I'm trying to test totem in a minimal chroot (host and chroot both ubuntu 12.04 amd64). When I load a video, I get the error
** (totem:25660): WARNING **: Problem inhibiting the screensaver: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Name "org.gnome.SessionManager" does not exist
Indeed, the screen will tur... |
You have to create a code which prints
:)
No white-space and newline character included
Random times but ranged between 0-255
Your score :
The count in bytes
EDIT : Also show 3 outputs of your code
You have to create a code which prints
No
GolfScript, 12 characters
Nothing really interesting here.
JavaScript (ES6), 25
... |
Textpattern Forum
Re: adi_matrix – Multi-article update tabs
Hi Adi:)
After installing I get this in extensions>adi_matrix
Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE Field = 'article_image'' at line 1 SHOW FIELDS ... |
g_barthe
interface python et apprentissage boa constrictor
Bonjour,
Je voudrais commencer à developper qq applications (avec interfaces graphiques) en python (pour windows et linux). Je recherche donc un éditeur qui permettrait de realiser l'interface de maniere simple et non en code pur. J'ai bien trouvé "wxglade" mai... |
Exactly the same as this question, but there must be a way to do it without the Sites module. That's just silly... I shouldn't need to query my DB to snag the URL!
I want to use it with reverse().
Use handy request.build_absolute_uri() method on request, pass it the relative url and it'll give you full one.
You can als... |
I am playing with Python's logging system. I have noticed a strange behavior while removing handlers from a Logger object in a loop. Namely, my for loop removes all but one handler. Additional call to .removeHandler removes the last handler smoothly. No error messages are issued during the calls.
This is the test code:... |
It is sometimes beneficial to run two or more web sites or subdomains of a site from a single Django code base. Each Django app in the project can then power a website on a different domain, but all the apps can still share a single database with a single administrative interface.
In order to achieve this, one needs to... |
So what I'm looking for here is something like PHP's print_r function. This is so I can debug my scripts by seeing what's the state of the object in question.
You are really mixing together two different things.
Use
>>> l = dir(__builtins__)
>>> d = __builtins__.__dict__
Print that dictionary however fancy you like:
>... |
bowmore
Re : Qarte arte.tv browser (ex Qarte+7)
Si je lance
python /usr/bin/qarte
J'obtiens
python /usr/bin/qarte
(qarte:23575): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « pixmap »
Affiché une quinzaine de fois, puis Qarte-1 démarre bien. Dans le terminal, il y a ça:
15:33:40: INFO ... |
Okay. I've built here a mysql query browser, like navicat. Using MySQLdb to perform queries.
Here's the weird part. When i run the query through the program(using MySQLdb), it gives me success, affected rows = 1, but when i look at it in phpmyadmin, the value hasn't changed.
so before i perform the query, i print it ou... |
In Numpy, I need to unpack some binary data into a single variable. In the past I've been unpacking it using the 'fromstring' function in Numpy and extracting the first element. Is there a way I can unpack binary data into a Numpy type directly and avoid the overhead of creating a Numpy array that I pretty much ignore?... |
Mindiell
Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4]
Si c'est Floyd Pepper...
Eh mais c'est l'week-end !
Hors ligne
PPdM
Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4]
Bonjour, Golgoth devait en bricoler un mais il n'a pas dis quand!
Hors ligne
raspouillas
Re... |
I am using a 13.10 Ubuntu client and I have installed a 12.04 Server with the help of VirtualBox. I am new user of Linux and this is my first Server that I am trying to create for experimentation purposes. I am trying to ping the server from the client but I keep getting this message when I terminate the process:
PING ... |
Here is what I would recommend:
class Team(object):
def __init__(self, name=None, logo=None, members=0):
self.name = name
self.logo = logo
self.members = members
team = Team("Oscar", "http://...", 10)
team2 = Team()
team2.name = "Fred"
team3 = Team(name="Joe", members=10)
Some notes on this... |
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... |
The only way I can find would require you to write a bit of Python code.
This is the site that provides a module for Pythonhttp://code.google.com/p/pygooglevoice/
This page gives you details on how to set a message to read. Look for the Mark function under the Message section.sphinxdoc. github.com/pygooglevoice/api.htm... |
The RestApiDoc plugin allows to document your Grails Rest API. Thanks to some Annotations (@), you will be ready to build a full API report (with a playground to perform test request). The plugin is based on jsondoc.
This plugin allows you to document methods (description, HTTP path/verb, parameters, response type...) ... |
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... |
/ Published in: Python
Found on Corey Goldberg's blog. Usage:
from progress_bar import ProgressBar
p = ProgressBar(60)
p.update_time(15)
print p
p.fill_char = '='
p.update_time(40)
print p
#!/usr/bin/env python
#
# ascii command-line progress bar with percentage and elapsed time display
#
# adapted from Pylot source c... |
What is the largest order of any element in $U_{900}$? I found that it is isomorphic to $\mathbb Z _{240}$. So I guess that it should be $240$. Am I correct?
You first factorise $900 = 3^2 \cdot 5^2 \cdot 2^2$. Then you determine the maximal order in $U_9$, in $U_{25}$ and in $U_4$ (you should already know the general ... |
Cooking with Python
07/11/2002
by Robin Parma, Alex Martelli, Scott David Daniels, Ben Wolfson, Nick Perkins, Anurag Uniya, Tim Keating, Rael Dornfest and Jeremy Hylton, authors of the Python Cookbook
1. Simple Tests Using Exceptions
Usually Python is straightforward, but there are a few unexpected exceptions.
Credits:... |
Audiofeeline
Modifier GRUB avec GRUB CUSTOMIZER
Bonjour à tous,
alors que je surfais paisiblement, je suis tombé sur un article de Tux-Planet qui présente GRUB CUSTOMIZER : http://www.tux-planet.fr/grub-customizer/
Je tenais à vous en faire part car ça faisait un petit moment que je cherchais une telle solution.
Bien à... |
I can not make any HTTP POST requests through a proxy in Google App Engine, with httplib (set_tunnel, it seems that is not supported: http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/dist27/httplib.py?r=281&spec=svn281) nor urllib2.
The fact is that in the local test whether the requ... |
If the site requires authentication, things are slightly more complicated, but not much--at least if you have Python 2.4 installed. In order to manage cookie-based authentication procedures, you need to import a few utilities from urllib2:
>>> from urllib2 import build_opener, HTTPCookieProcessor, Request
Notice that ... |
I'm not sure, where to ask, so I try it here.
Hello, I would be very interested in pyxfce.
Is it still used. It seems, the content of the website is not so new
anymore.
What could be done with pyxfce?
For example: In windows I had a taskbar icon, which pops up
a list of alle available desktop icons and have quick acces... |
Parsimony is a very popular and simple approach for calculating scores for trees. It is also the first method that we encounter that isn’t an exact method, but instead requires a heuristic for estimating the best tree. For more information about how we search through tree space see the page on tree searching. Another a... |
web.py 0.3 tutorial
Sommaire
Prérequis
Manipuler les URLs
Gérer les URLs
GET et POST : la différence
Page index - ma première classe
Lancer le serveur
Modèles, gabarits
Formulaires
Base de données
Afficher le contenu d'une base de données
Ecrire dans une base de données
Debugger
Et Après ?
Prérequis
Vous connaissez Pyt... |
Description:
Gensim - Python Framework for Vector Space Modelling
Gensim is a Python library for
Vector Space Modellingwith very large corpora. Target audience is theNatural Language Processing(NLP) community.
Features
All algorithms are
memory-independentw.r.t. the corpus size (can process input larger than RAM),
Intu... |
My app displays a table with many columns. I use Django tables 2 app to render the table. I am trying to make items in one column hyperpinked so that users can click. The url pattern is simple: /contact/pk/, for e.g. /contact/2/. This is what I have in my models:
#models.py
class Contact(models.Model):
name = model... |
g_barthe
interface python et apprentissage boa constrictor
Bonjour,
Je voudrais commencer à developper qq applications (avec interfaces graphiques) en python (pour windows et linux). Je recherche donc un éditeur qui permettrait de realiser l'interface de maniere simple et non en code pur. J'ai bien trouvé "wxglade" mai... |
Ok so i've seen dozen of threads like that , but none of them gives a complete answer and everything i tried so far foes not work for me.
1) Script that constantly outputs some data and flusheshs it:
import time
import sys
if __name__ == '__main__':
for i in range(5):
print i,
sys.stdout.flush()
... |
Anything you can do from the command line you can also do from the JSON API which means that the same unlock command could be sent from within code just as easily. To my knowledge there is no pre-built utility capable of this, but the API is simple enough that I can't imagine it being terribly difficult to actually bui... |
I recently installed Ubuntu on my new MacBook Air 4,2 (Mid 2011). Everything has worked great so far, with a few minor issues with screen resolution. However, I am now completely stuck on how to get my touchpad to recognize gestures such as scrolling, tap to click, and right click. I have run the post-install script he... |
In an environment running Neutron, a request from your instance must traverse a number of steps:
From the instance to a router,
Through a NAT rule in the router namespace,
To an instance of the neutron-ns-metadata-proxy,
To the actual Nova metadata service
When there are problem accessing the metadata, it can be helpfu... |
here's a small tweak for the openbox-logout script
to exit the openbox-logout script when pressing 'escape' add these lines outside of the DoTheLogout class
def capture_key(dialog, event):
if event.keyval == gtk.keysyms.Escape:
gtk.main_quit()
and this one anywhere after the gtk.Window was created
self.win... |
mastergb
Vpnautoconnect 2.X(Nouvelle version ,bugs, demande d'aide: c'est ici!)
Bonjour à tous,
Suite à l'énorme thread précédent (et à la demande de ljere) , j'aimerais reprendre un sujet vraiment dédié a vpnautoconnect.
Le logiciel n'est plus à présenter. On l'aime (ou pas), il permet entre autre de répondre à une la... |
pef
Re : RealRipper: enregistreur de flux Real
Merci pour vos remarques !
Je vais voir ce que je peux faire pour la prochaine version
Hors ligne
b52
Re : RealRipper: enregistreur de flux Real
Salut @pef,
@b52: merci pour tes remarques utilises-tu la version 1.1 ? C'est en effet un bug qu'il y avait sur la 1.0.
Oui oui,... |
This documentation describes how to use the SubDB API to download and upload subtitles from our database.
How it works
The API uses an unique hash, calculated from the video file to match a subtitle. This way, we cannot only guarantee that the subtitle fits the intended video but improve the search speed while we keep ... |
I am working on numpy and I have a number of arrays with the same size and shape like:a= [153 186 0 258] b=[156 136 156 0] c=[193 150 950 757]I want to have average of the arrays, but I want the program to ignore the zero values in the computation. So, the resulting array for this example will be: d=[167.333 157.333 55... |
I currently have a bash application that, among other things, uses cURL to upload a file to a web application with the PUT method. I am attempting to duplicate the web application as the client (bash) portion is GPL but the web portion is not. I also cannot alter the client application as it auto-updates itself from th... |
I have Mathematica code that uses Import[] to download URLs. I noticed that first time I use the Import[] command it works. Next time it fails. I'm using Windows 7, Mathematica 8.0.4.
Here is an example. I start new sesssion of Mathematica, and then type
Import["http://groups.google.com/group/comp.soft-sys.math.mathema... |
Everything began one fine day when I visited our storage room to see if there was anything interesting for me to look at. Soon I came across an old shabby dark-gray Toshiba notebook thrown there amidst different computer rubbish long ago, from the time when Intel's Pentium I was the top of performance. I couldn't pass ... |
#0 Re : -1 » [Conky] Alternative à weather.com (3) » Le 10/04/2013, à 21:26
Ehcor8
Réponses : 1060
Bjr Didier-T,
Toujours sur Ubuntu 13.04, version 3.8.0.17. avec "recmeteo.py" 1.22. Cela refonctionne à nouveau après la mise à jour d'hier soir. J'ai mis en place la version de recmeteo.py pour python 2.7 mais elle se pl... |
I'm using pyrax to manipulate Rackspace Cloud Files. Can I force pyrax to use servicenet instead of publicnet, or is it choosen automatically?
In django-cumulus settings we have settings.CUMULUS['SERVICENET'] parameter to handle it, but I didn't found, how to set this param to pyrax itself.
import pyrax
cls = pyrax.uti... |
Issue Department Detector for Roundup
Could find no samples for immediate team/department email on issue creation for Roundup. There used to be one that was shipped with it but that code is broken. Anyway, I needed it so I had to waste my morning writing it. The roundup api is a bit hairy but this example is simple. Yo... |
I've been trying to learn about metaclasses in Python. I get the main idea, but I can't seem to activate the mechanism. As I understand it, you can specify M to be as the metaclass when constructing a class K by setting __metaclass__ to M at the global or class level. To test this out, I wrote the following program:
p ... |
This program has been disqualified.
Author dllu
Submission date 2011-05-23 05:34:57.555201
Rating 1018
Matches played 167
Win rate 10.18
import random
import math
lastmatch=0
lastmatch3=0
lastmatch5=0
lastmatch6=0
limit = 30
if not input:
urmoves=""
mymoves=""
predictor1=random.choice(['R','P','S'])
predictor2=rand... |
I searched around as much as I could, but I couldn't seem to find a solution to fix my problem.
Whether I install anything, remove anything, run sudo apt-get update or sudo apt-get upgrade, I still seem to get the following message:
Setting up python3.2 (3.2.3-0ubuntu3.2) ...
Traceback (most recent call last):
File "... |
I’ve just released Gnotty 0.2 with a handful of new features which I thought would be worthwhile writing about. I wrote in greater detail about Gnotty when it was first released, but if you missed that and are wondering what it is, it’s an open source Python web application for managing an IRC channel. It provides a ch... |
I have a rest server running (python bottle) on the same host that is running my django application. From my django application I am doing a get request using ajax, but the request is failing even though I can see the status of the request succeeding on my rest server(returns code 200, success)
My Ajax code:
$.ajax({
... |
I have a circular import problem in my python code. The decorator from one module need to call a function in another module. And this function is using the decorator which is imported from previous module. The error message shows can't import name xxxx
my code structure:
__init__.pyworker1.pyworker2.py...
and there is ... |
When I run sensors I get the following output:
nouveau-pci-0068
Adapter: PCI adapter
temp1: +6618.0°C (high = +100.0°C, crit = +110.0°C)
atk0110-acpi-0
Adapter: ACPI interface
Vcore Voltage: +1.08 V (min = +0.85 V, max = +1.60 V)
+3.3 Voltage: +3.33 V (min = +2.97 V, max = +3.63 V)
+5 Voltag... |
There are some children sitting around a round table. Each child is given an even amount of $1$-cent coins ($0$ is even) by their teacher, all the children at once. A child will give half his money to the child by his right, then the receiving child gives half of his to the one by his right and it goes on like that. If... |
I have a fresh centos 6.2 with mysql in 5.1.52. Then I saw two empty user name and I deleted that then I saw 3 root user deleted that and created one like this CREATE USER 'root'@'%' IDENTIFIED BY '**';. But when I go in as root into my phpMyAdmin now I cannot create a new database. What wrong did I do here?
I have a f... |
What I want to be able to do is open a window with two images (one image is an exact copy of the other). Then when I click a button it changes the image on the right. I hope this is making sense. The code I have no is:
from __future__ import division
from Tkinter import *
from PIL import Image, ImageTk, ImageFilter
imp... |
I just saw Alex Martelli demonstrate this tonight. I didn't catch his explanation for why there's such a large discrepancy in speed here, and I'm still really curious:
% python -mtimeit -s'def f(): pass' 'f()'
10000000 loops, best of 3: 0.121 usec per loop
% python -mtimeit -s'def f(): pass' 'f'
10000000 loops, best of... |
I'm trying to configure logging for Django so that I had session_key in every line of log (if set). I think I found a way:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'request': {
'format': '%(asctime)s %(levelname)-8s [%(sessid)s] %(message)s',
}... |
Much of the world’s data are stored in portable document format (PDF) files. This is not my preferred storage or presentation format, so I often convert such files into databases, graphs, or spreadsheets. I sort of follow this decision process.
Do we need to read the file contents at all?
Do we only need to extract the... |
So, to answer that question first: Tracker tracks the user home and any mounted media that is attached to the device. For the memory cards, it retains a stack of 3 cards in it's database, so, you can change card A to card B, and back to card A and tracker won't need to reindex the content of the cards. And yes, you can... |
Leonux
Guide de survie pour l'ubuntero débutant :-)
Bonjour à tous et à toutes
Peut-être avez vous déjà téléchargé un tutoriel au format pdf pour apprendre à utiliser votre machine, à choisir ou tester des programmes ?
Au début, le fichier que vous allez voir était un simple échange entre deux utilisateurs (Léonux et f... |
An asymptote is going to mean that $r\rightarrow\infty$, which happens when the denominator approaches zero. Vertical or horizontal means that $\theta$ is a multiple of $\pi/2$ (vertical for even, horizontal for odd multiples). The only asymptote would therefore be when $\theta\rightarrow\pi$, which would be a horizont... |
» More on python flatten +
The standard (but for some unknown reason, not built-in) python
flattenmethod looks something like this:
def flatten(l):
out = []
for item in l:
if isinstance(item, (list, tuple)):
out.extend(flatten(item))
else:
out.append(item)
return out
This obviously runs into ... |
Scripting Flickr with Python and REST
Flickr probably needs no introduction for readers of this column. It's a hugely popular social-network site owned by Yahoo, focusing on sharing of photographs. It embodies most of the the current web buzzwords, including tagging, web feeds, AJAX, and accessibility to scripts. Flick... |
I have a problem with GDB. Whenever I try to debug any C++ program, just after running it, GDB gives this error:
(gdb) run
Starting program: /home/errikos/Workspaces/tests/a.out
Traceback (most recent call last):
File "/usr/lib/debug/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18-gdb.py", line 59, in <module>
from... |
grim7reaper
Re : Besoin de conseils pour débuter en python
Merci, cette documentation me semble plutôt complète et complexe pour un débutant python
Complexe, non je ne pense pas.
Du moins ce n’est pas le but.
Outre ce cadre universitaire assez réduit, ce cours s’adresse à toute personne désireuse d’apprendre Python en ... |
Followup - Happily, the ticket I referenced below is now resolved. The simpler API will be included in the next release of Twisted. The original answer is still a valid way to use Conch and may reveal some interesting details about what's going on, but from Twisted 13.1 and on, if you just want to run a command and han... |
First, you should extract the relevant information from your source file. As the data is ,-seperated, you can use the python csv module or do a simple split(',').
This is an example method of how it could look like:
def extract(source):
for line in iter(source):
_, start, end, _, _, _, _, _, _, text = line.... |
Last week, I spent sometime benchmarking the state-of-the-art WSGI application server for SurveyMonkey Contribute. It is quite challenging to configure various WSGI app servers for apple-to-apple comparison due to the diverse concurrency paradigms. The system statistics, such as the CPU consumption and memory usage wil... |
mol1
Re : Hortus belli projet de tower defense (finissons le jeu d'helly)
Un lien vers une esquisse de musique :
http://ubuntuone.com/7RqEp9oXkT6K338qog5WlX
Hors ligne
Ypnose
Re : Hortus belli projet de tower defense (finissons le jeu d'helly)
La zike est pas mal.
J'aiderai bien mais je suis pas bon codeur C, donc si v... |
I have an SQLAlchemy scheme that looks roughly like this:
participation = db.Table('participation',
db.Column('artist_id', db.Integer, db.ForeignKey('artist.id'),
primary_key=True),
db.Column('song_id', db.Integer, db.ForeignKey('song.id'),
primary_key=True),
)
class ... |
I am creating templates using grids and object oriented css. The goal is to separate components from containers. The challenge i run into is that in header and footer container i would like that components are stacked from bottom up instead of top down.
For example
<div class="gridX gridY" id ="Footer container">
... |
I have a fresh ubuntu 12.04 installation. When i connect to my remote server i got errors like this:
~$ ssh example.com sudo aptitude upgrade
...
Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 33, in <module>
from ALChacks import *
File "/usr/share/apt-listchanges/ALChacks.py", line 32... |
This script will provide you with detailed information on SQL Server Agent Jobs and their schedules. This doesn't include any scheduled task that may exist in Scheduled Tasks for Windows.
USE msdb
Go
SELECT dbo.sysjobs.Name AS 'Job Name',
'Job Enabled' = CASE dbo.sysjobs.Enabled
WHEN 1 THEN 'Yes'
W... |
インストールガイド
web.pyをダウンロードします。
http://webpy.org/static/web.py-0.33.tar.gz
ダウンロードファイルを展開し、あなたのアプリケーションがあるディレクトリに展開したフォルダwebpyの直下にある web フォルダをコピーしてください。もしくは以下のコマンドを実行し、すべてのアプリケーションからのアクセスを可能にします。
python setup.py install
ノート: Ubuntuなどrootを許可していない unix/linux などでは以下のコマンドで実行する必要があるかもしれません。
sudo python setup.py install
推奨セットアッ... |
I'm using Facebook Graph API on Google App Engine. I was able to fetch all the basic info from an user. However when I tried to fetch any user info that requires permission, email for exemple, it always appears as None. I've followed the whole tutorial available at the developers blog.
Here's my code:
class User(db.Mod... |
I'm having a small problem with a Python program (below) that I'm writing.
I want to insert two values from a MySQL table into another table from a Python program.
The two fields are priority and product and I have selected them from the shop table and I want to insert them into the products table.
Can anyone help? Tha... |
In JavaScript, is it possible to test whether a condition remains true throughout a program's entire execution? Here, I want to ensure that the variable a is always divisible by 3, from the start of the program to the end.
//Assert that the following is always true, and print an error message if not true
ensureAlwaysTr... |
Hi all,
I lost the 3 horizontal boxes that come standard with the theme (on the demo they have a blue circle and the first says Build your own skins).
I was trying to fix the video size that appears and deleted the wrong box. my site is http://ideaction.co/. I tried to go to back ups but not luck.
Can you please:
- tel... |
AuthorPosts
December 16, 2012 at 6:35 pm #18791
Hi,
I’d like to change the padding of some issues in product pages, for instance “Related Products” all the way to the left, below Product image.
Even show more related products, here is a link as an example:
Thanks.
December 17, 2012 at 4:38 pm #100957
Hi Icarox,
That is... |
The REST of the Web
Pages: 1, 2
Adding Velocity to the Mix
Velocity is a templating engine I've written about before, and including a template engine with Jython makes a big difference in simplifying development.
To use Velocity with Jython, we'll need to add a few more .jar files to Jetty's ext directory: log4j, Veloc... |
I’ve been working in Plone, so I’ve seenzope.component. I’malso thinking of making a (potentially) networked game in Python, andfor that I was looking at things likeTwisted andKamaelia. Unsurprisingly, I’m not reallysatisfied with any of these.
Let me try to articulate what I’m looking for when I say “component system”... |
I can't find the definition of a function $f(x); x \in [-1;1]$ where $(x|f(x))$ is a point on the unit-circle.
Can you please give me a hint?
---------- Edit -----------
Background:
I want to render a filled circle (programatically) onto a screen using an iteration from $x-rad \rightarrow x+rad$ where $x$ is the x-posi... |
Hizoka
Re : [glade2script-GTK2] Interface graphique pour script bash ou autre.
bah le principe en lui même je le pige.
mais c'est son application où j'ai du mal.
Il va falloir que je me penche bien sur tes exemples.
Hors ligne
frafa
Re : [glade2script-GTK2] Interface graphique pour script bash ou autre.
CouCou !
oulah ... |
Writing Reactive Apps with ReactiveMongo and Play, Pt. 1
ReactiveMongo is a brand new Scala driver for MongoDB. More than just yet-another-async-driver, it's a reactive driver that allows you to design very scalable applications unleashing MongoDB capabilities like streaming infinite live collections and files for mode... |
I've been playing with using the subprocess module to run python scripts as sub-processes and have come accross a problem with reading output line by line.
The documentation I have read indicates that you should be able to use subprocess and call readline() on stdout, and this does indeed work if the script I am callin... |
WebLogic Type 4 JDBC Drivers
See Supported Database Configurations in Supported Configurations for WebLogic Server 9.0.
Table 6-1 lists the JDBC connection properties supported by the Oracle driver, and describes each property. You can use these connection properties in a JDBC data source configuration in your WebLogic... |
Stability provisional
Maintainer Alberto Ruiz (aruiz at um dot es)
Safe Haskell Safe-Infered
disp :: Int -> Matrix Double -> IO ()
zeros :: Int -> Int -> Matrix Double
ones :: Int -> Int -> Matrix Double
diagl :: [Double] -> Matrix Double
row :: [Double] -> Matrix Double
col :: [Double] -> Matrix Double
(&) :: Vector D... |
I recently assembled a new desktop with an ASUS PCE-N15 wireless network adapter and my home wireless network is detected and I am able to connect to it and even access the Internet.
However, after little time I lose the Internet connection, not the wireless connection to the home network, and have to manually disconne... |
Introducing PyToolz a functional standard library
The PyToolz project extends itertools and functools to provide a set ofstandard functions for iterators, functions, and dictionaries.
tl;dr – PyToolz provides good functions for core data structures. These functions work together well. Here is a partial API:
groupby, un... |
I found this script online:
import httplib, urllib
params = urllib.urlencode({'@number': 12524, '@type': 'issue', '@action': 'show'})
headers = {"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"}
conn = httplib.HTTPConnection("bugs.python.org")
conn.request("POST", "", params, head... |
Ok so I have a custom django admin built from a Author Model:
class AuthorAdmin(admin.ModelAdmin):
"""
Author Admin
"""
form = AuthorForm
list_display = ['profile_photo', 'first_name', 'last_name', 'title']
search_fields = ['first_name', 'last_name', 'title', 'credential']
prepopulated_field... |
For some reason my laptop is stuck in Caps Lock. I have the Caps Lock key mapped by xmodmap to hyper_l, so I don't have a caps_lock key to turn it off. Is there a way I can turn it off by command line? It would be nice if I could reset the lock state without resetting my computer, especially for future reference. This ... |
When I attempt to install git on a server distribution of Ubuntu 11.04, I get an error. I used the following command:
sudo apt-get install git
And that generated this error:
(Reading database ...
dpkg: warning: files list file for package `git' missing, assuming package has no files currently installed.
(Reading data... |
From time to time I come to ideas of actions I'd like to have available in a menu which pops up when I right-click on files in Nautilus. How to add them there? Is there something like Thunar UCA plugin for Nautilus?
Context menus of Nautilus can be customized by Nautilus extensions.
You can also place plain shell scrip... |
XML Namespaces Support in Python Tools, Part Two
In the last article I discussed namespace handling in Python 2.3's SAX and minidom libraries. As I pointed out there are a lot of pitfalls and oddities involved with processing namespaces, and I will continue to give the same treatment to the namespace support in third p... |
The folks in the twisted community found the most wonderful trick. Consider this typical example of event driven code. Consider this example (proabably easier to read bottom to top). The function enqueueTaskToDisplayURL depends on three callbacks to handle the usual eventualities (good, bad, wrapup).
from twisted.web i... |
jbfabin
mise à jour / téléchargement des paquets impossibles
Bonjour, quand je veux mettre à jour mon système, j'obtiens le message :"le téléchargement des informations du dépot a échoué".
si quelqu'un peut m'aider, je lui serai reconnaissant.
PS : au terminal, j'obtiens ces messages :
W: Impossible de récupérer http:/... |
aeacides
Re : Ultimate Smash Friends: un smash bros like en python
Kewl! Bon boulot! De mon côté il me reste une semaine et demi de labeur, et après je devrais pouvoir m'y mettre :- )
@+
http://www.q-be.ca
Hors ligne
tshirtman
Re : Ultimate Smash Friends: un smash bros like en python
cool .
Mon petit frère (qui a dessi... |
I installed the KDE window manager on top of Ubuntu 11.10 and while I am using KDE, I do not get an elevation dialog when I try to perform tasks that require root privileges. Instead, the operations silently fail, unless I launch apps from a terminal, in which case I get errors like:
Traceback (most recent call last):
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.