text
stringlengths
256
65.5k
In the previous post I covered how to tackle JavaScript based websites with Chickenfoot. Chickenfoot is great but not perfect because it: requires me to program in JavaScript rather than my beloved Python (with all its great libraries) is slow because have to wait for FireFox to render the entire webpage is somewhat bu...
Bloom Filters A Bloom filter is a data structure for managing sets of values. Bloom filters provide O(1) lookups and insertion and, perhaps most importantly, provide an extremely compact representation of the set of values being stored. The trade-off for this compact representation is that the lookup operation can have...
Getting Started with WSGI by Jason R. Briggs 11/09/2006 What is WSGI, and why should you care? WSGI, or the Web Server Gateway Interface, is a Python Enhancement Proposal (#333) authored by Philip Eby in an attempt to address the lack of standardization among Python web frameworks. Think of it as the servlet spec for t...
The issue: I can ping all devices on the network except the gateway (192.168.0.1) and in turn can not access outside of the network without proxying through another device. The system: Lenovo x230 Tablet with a Realtek wifi adapter running on Quantal: Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11...
I want to make a simple stupid twitter app using Twitter API. If I request this page from my browser it does work: http://search.twitter.com/search.atom?q=hello&rpp=10&page=1 but if I request this page from python using urllib or urllib2 most of the times it doesn't work: response = urllib2.urlopen("http://search.twit...
I am trying to parallelize some work, which runs on my mac (Pyton 3.2.2 under Mac OS 10.7) but gives the following error on a Linux cluster I run it where I got 4 cores and access Python 3.2. The error messages continue until I break execution manually. Exception in thread Thread-2: Traceback (most recent call last): ...
First, you cannot write a "universal" or "smart" conversion that magically handles anything. Second, trying to summarize a string-to-data conversion in anything other than code never seems to work out well. So rather than write a string that names the conversion, just write the conversion. Finally, trying to write a co...
Wireless access is all the rage. Wireless this, wireless that. Hot spots are turning up everywhere. Many are free. Many have absolutely no security. There are several in my neighborhood. I have no idea who is running them, but at least one is wide open. This article will show you one method for locking down your wirele...
A New Running Map It’s about time to make a revision of my old running map - something that I threw together in February with a few scripts and an über-early version of TileMill. I run with a GPS watch that records heartrate, position, and elevation, and then can send it up to Garmin Connect, which used to be awesome u...
I'm a bit new to python and cannot figure out why my variable GTRed gets overwritten where indicated. As far as my understanding goes GTRed should stay untouched at that point. I'm aware that I can reduce the number of nested for loops by using something like 'for x,y in xygrid:', but that should not affect this. Thank...
Currently, it is possible to mark tests and then run them (or not run them) using -m argument. However, all tests are still collected first and only then are deselected In the below example all 8 are still collected, and then 4 are run and 4 are deselected. ============================= test session starts ============...
You could use a script to toggle between the commands. Here's a python script. Copy the following into a file #!/usr/bin/env python from subprocess import Popen, PIPE setting = Popen(['gsettings', 'get', 'org.gnome.nautilus.window-state', 'side-pane-view'], stdout=PIPE).communicate()[0].rstrip() if setting == "'places'...
I just learned about list comprehension, which is a great fast way to get data in a single line of code. But something's bugging me. In my test I have this kind of dictionaries inside the list: [{'y': 72, 'x': 94, 'fname': 'test1420'}, {'y': 72, 'x': 94, 'fname': 'test277'}] The list comprehension s = [ r for r in lis...
I just started dwelling into the realm of Qt (coming from PyGTK) and I'm using PySide. So I found this great example on another answer here on stack exchange. import sys from PySide.QtCore import * from PySide.QtGui import * from PySide.QtWebKit import * app = QApplication(sys.argv) web = QWebView() web.settings().setA...
I'm writing a Tornado Rest API and I'm using mongoengine as an ODM. I would like to keep things as decoupled as possible. The reason I dont want my code right in the handler is I would like to make some functions async. Would this be the best way to do this?: (Just psuedocode) class UserSearchHandler(BaseHandler): @...
JavaScript heinz_stapff — 2011-10-09T13:34:24-04:00 — #1 I don't understand why I can't get either of these methodes to work but for sure there are syntax errors in the script that are not being reported by 'Developer' tools in IE8. Script not working function getprompt(){ /* f1.innerHTML=' '; var f1prompt=document.cre...
I'd like to have a Python program start listening on port 80, but after that execute without root permissions. Is there a way to drop root or to get port 80 without it? You won't be able to open a server on port 80 without root privileges, this is a restriction on the OS level. So the only solution is to drop root priv...
This program has been disqualified. Author &&& Submission date 2011-06-20 19:41:40.122126 Rating 3906 Matches played 6 Win rate 33.33 import random #Weighted random beat previous inputs def weighted_choice(C, p): x = random.random() for elmt in range(len(C)): if x <= p[elmt]: return C[elmt] ...
I'm running Ubuntu 11.04 64 bit version. Nothing happens when hitting "Install Updates" button in Update Manager, except for the mouse cursor shortly (<1 second) displaying the wait icon. I can update using apt-get without any problems. Also in the Ubuntu Software Centre, nothing can be installed, and the problem is si...
I have an little app I wrote in Python and it used to work... until yesterday, when it suddenly started giving me an error in a HTTPS connection. I don't remember if there was an update, but both Python 2.7.3rc2 and Python 3.2 are failing just the same. I googled it and found out that this happens when people are behin...
I'm trying to figure out a good practice for designing a function with (many) optional components. For a specific example, say I am interested in designing a feature extractor function that takes as input a document and returns a list of features extracted from the document. Question If there are many optional componen...
bishop Re : Qarte arte.tv browser (ex Qarte+7) VinsS ! J'ai réinstallé Qarte. Avant de lancer Qarte j'ai refait un test avec rtmpdump... pas de problème. J'ai supprimé le dossier caché .qarte puis testé Qarte: bishop@JC:~/Bureau$ qarte -d lang: /usr/share/locale/fr/LC_MESSAGES/qarte.mo 11:44:14: WARNING - utils Config ...
Le Sphenodon [Résolu] Python : Impossible d'installer le module random Bonjour, Je n'arrive pas à installer le module random de Python. En fait j'ai 2 problèmes potentiels : soit je me trompe dans le nom du module ce qui explique que je n'arrive pas à l'installer ; soit j'ai mal installé pip et ça ne marche pas. J'ai d...
nicky940 Re : Generateur de sources.list en Francais bonsoir je suis un nouvelle utilisateur d'ubuntu l'installation c'est dérouler a merveille version 9.10 jai depuis quelque temps un problème avec les mise jour qui m'indique un sens interdit qui m'indique ce message d'erreur :un problème irrémédiable est survenu pend...
I am new to Arcpy scripting, I need help on copying the features to SDE feature class. My Scenario: We have 2 Geo databases running on Oracle 11g ArcSDE 10.2 . I have been asked to write the python script for query and copy the features from SDE connection1: Feature class1 to SDE connection2: Feature class2. The featur...
I wonder if there is a more elegant way to draw the polygon in below code, or with a special plot function or parameter ? import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm x = np.linspace(-4,4,150) # plot density with shaded area showing Pr(-2 <= x <= 1) lb = -2 ub = 1 d=norm.pdf(x) fig = ...
I have a file structure like this: dir_a __init__.py mod_1.py mod_2.pydir_b __init__.py my_mod.py I want to dynamically import every module in dir_a in my_mod.py, and in order to do that, I have the following inside the __init__.py of dir_a: import os import glob __all__ = [os.path.basename(f)[:-3] for f in glob.glob(o...
#1626 Le 13/05/2012, à 15:13 Hizoka Re : [glade2script-GTK2] Interface graphique pour script bash ou autre. echo "TERM@@SEND@@$cmd\n" sleep 3 # permet de laisser le temps au process d'etre créer pid=$(pidof cdrdao) while kill -0 $pid >/dev/null; do sleep 0.2 ## barre de progression ####### ...
Because I totally screwed up my python installation I manually deleted all the python files and am now trying to reinstall it. When I type apt-get install --reinstall python2.7, I get this error message: 0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 0 not to upgrade. 3 not fully installed or removed....
Disclaimer: I'm running Arch Linux, not ubuntu, but that should be irrelevant, or if it isn't I should be able to translate from apt to pacman. Whenever I attempt to use an application relating to python2(gnome-tweak-tool, bzr, etc.) it fails to start and, when run from command-line, I get this error: [username@host ~]...
Most model "strings" appear as the form "appname.modelname" so you might want to use this variation on get_model from django.db.models.loading import get_model your_model = get_model ( *your_string.split('.',1) ) The part of the django code that usually turns such strings into a model is a little more complex This fro...
Python Standard Logging by Jeremy Jones 06/02/2005 Python 2.3 introduced the logging module to the Python standard library. logging provides a standard interface for outputting information from a running application. The classic example of a logging mechanism is writing data to a text file, which is a plain old log fil...
If the rebirth of JavaScript has been the biggest theme of the past two years, you could probably divide most of the talk surrounding this topic into two main areas. At the geekier end of town, we’ve seen smarties harnessing JavaScript to do all sorts of amazing — and occasionally ridiculous — things with Ajax. However...
On Google App Engine, I would like to create a unique key for a data table. As suggested by this, I am trying to do the following: Suppose I have a model called Message, and the field values are obtained from a web page as follows: message = db.Message() message.name = self.request.get('name') message.email = self.requ...
The current version of mksh had use of arc4random(3) removed, including “set -o arc4random”, to speed it up (on some architectures, a lot) – this will break some existing scripts (such as /etc/rc *cough* on MirBSD…). Hence I decided to publish the next version of mksh(1) as R40 based upon current development, and defer...
I have recently pushed support for OpenStack Identity API v3 to Libcloud trunk. In this blog post I’m going to have a look at the motivation for that, changes which were involved and show some examples of how you can utilize those changes and newly available features. What is OpenStack Keystone / Identity service? Open...
In your model: response.files.append("http://www.pengoworks.com/workshop/jquery/lib/jquery.autocomplete.js") response.files.append("http://www.pengoworks.com/workshop/jquery/lib/jquery.autocomplete.css") def ajax_autocomplete(f,v): items_url = URL(r=request,f="get_items") wrapper = DIV() inp = SQLFORM.widge...
McPeter Re : Un 'autre' générateur de sources.list en ligne Je viens de rectifier le soucis sur le nom du fichier bash. Par contre je ne vois aucun soucis à l'exécution :\ pourrais tu me dire quel navigateur tu as utilisé et quel message d'erreur ça te renvoit ? (un copié/collé du message) le chmod +x est inutile là pu...
DOM creation libraries JavaScript performance comparison Info Tests a number of ways of generating DOM. Preparation code <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> <script src="https://rawgithub.com/KoryNunn/crel/master/crel.js"> </script> <script src="https://rawgithub.co...
I am attempting to use argparse to convert an argument into a timedelta object. My program reads in strings supplied by the user and converts them to various datetime objects for later usage. I cannot get the filter_length argument to process correctly though. My code: import datetime import time import argparse def mk...
Ramblings of a mad engineer MapReduce is one of those simple ideas that you look back on and say, well damn, I could have thought of that. MapReduce is a simple technology that allows programmers to write two simple functions, a mapper and a reducer, and have them scale to attack very large problems. I was recently nee...
I have almost finished my Ubuntu App Showdown app, but would like to make it somewhat more robust, upon application quit I iterate through the open files checking for unsaved files, if any are found I pop up a dialog informing the user. What I would like to happen is that if the user cancels the dialog the program resu...
cherrak Re : A quoi ressemble votre environnement - automne/hiver 2011/2012 Ok merci pour la precision ! Dernière modification par cherrak (Le 07/03/2012, à 03:09) Major Grubert Re : A quoi ressemble votre environnement - automne/hiver 2011/2012 Question bête : quel est le paramètre à modifier pour avoir un affichage "...
I am not able to use SetTop property Canvas in Silverlight App. Following is the minimal code to reproduce the problem from System import TimeSpan from System.Windows import Application, Duration, PropertyPath from System.Windows.Controls import Canvas, TextBlock from System.Windows.Media import SolidColorBrush, Colors...
krystoo Comment installer des mises à jour téléchargées ? Bonsoir, alors je vais faire le tour je crois ^^ après troisième installe sur le pc portable, se coup ci j'avais 197 mises à jour. J'ai fait en plusieurs fois car sinon interminable. Quand aux 6 dernières màj que j'ai téléchargé, visiblement elles ne se sont pas...
This guide covers: Clojure language basics expressions, identifiers (locals, vars) letforms scalars functions basic data types introduction to immutable data structures overview of Clojure reference types (vars, atoms, agents, refs) looping and recursion basics of Clojure macros Overview This is a brief beginner's intr...
The goal is to get the array of family members made and print out the results in the order created. Is there any way to tidy this up :)? // Our Person constructor function Person(name,age) { this.name=name; this.age=age; } // Now we can make an array of people var family=new Array(); family[0]=new Person("alice...
I hope this captcha is not used anywhere. Following is a dummy way to decode it. Basically what you need are the patterns from 0 to 9 as present in these captchas. From your examples, I have only the patterns for 0 3 4 5 7 8. Since everything is fixed on them, you know where to split each character. You also know each ...
My team has recently been working to refactor our existing, traditional web interface, in order to expose web services instead. In doing so, we've spun the old web front end out into a separate application, which calls the various web services to perform the critical work (most of this web code is automated, with just ...
Il linguaggio Python Python Python è un linguaggio di programmazione general purpose (utilizzabile quindi per gli scopi più diversi) estremamente di alto livello. La sua filosofia di progettazione pone l'accento sulla produttività del programmatore e sulla leggibilità del codice. Il suo nucleo ha una sintassi minimale ...
Composite Manager Retained Drawing Protocol RFC Robert Carr 02/28/07 Outline and justification: Results from development in the creation of 'first generation' mainstream composite window managers has outlined the need for several reconsiderations in regards to applications interacting and communicating with the composi...
About ScattPy ScattPy is an open source Python package for light scattering simulations. Its goal is to provide an easy-to-use and flexible modern framework for the numerical solving of the diffraction problems with various kinds of particles. With the current version of ScattPy [cite:Vinokurov_jqsrt2011] it is possibl...
When I wake up my computer, the internet automatically reconnects, however the VPN does not. Is it possible to make it automatically reconnect (using the network manager on KDE, or at least in a way that the network manager is aware if it being connected via VPN) ? I faced this issue long time back, when i had linux mi...
fenix122 Re : erreur avec apache2 : « Unable to open logs » [RESOLU] non non je sais faire les serveur sans interface j'ai fait sa surtout pour simplifier après non je ne suis pas tout a lettre car le tuto que j'ai suivi avait des erreurs pour certaine chose surtout pour c'est source pas bonne j'ai du aller sur le site...
I recently stumbled upon this and am checking here to see if what I am proposing is indeed feasible and can be considered a breach of privacy. For obvious reasons I am not revealing the website which exhibits this property The URLs are of the format : https://xxxxxxxxyyyyyzzzz/xyz/<6 digit rand>_<17 digit rand>_<10 dig...
This code implements the sampling of n-d discrete probability distributions. By setting a flag on the object, it can also be made to be used as a piecewise constant probability distribution, which can then be used to approximate arbitrary pdf's. Well, arbitrary pdfs with compact support; if you efficiently want to samp...
I know a ton has been written on this subject. I cannot, however, absorb much of it. Perhaps because I'm a complete novice teaching myself without the benefit of any training in computer science. Regardless, maybe if some of you big brains chime in on this specific example, you'll help other beginners like me. So, I've...
I have created the csv file through django. I have write the encoded data into that. but when i open this file in excel sheet then the unicode characters not display properly. I also refer this question Django create CSV file that contains Unicode and can be opened directly with Excel But didn't get the proper answer. ...
I've written a small snippet that computes the path length of a given node (e.g. its distance to the root node): def node_depth(node, depth=0, colored_nodes=set()): """ Return the length of the path in the parse tree from C{node}'s position up to the root node. Effectively tests if C{node} is inside a circl...
Given this Many to Many relationship: tagmap = db.Table('tagmap', db.Model.metadata, db.Column('post_id', db.Integer, db.ForeignKey('posts.id'), db.Column('tag_id', db.Integer, db.ForeignKey('tags.id'),) class Post(db.Model): __tablename__ = 'posts' id = db.Column(db.Integer, primary_key=True) te...
You could also break up the audio into a chunks and measure the RMS (a measure of loudness). let's say you want an image that is 180 pixels wide. I'll use pydub, a light-weight wrapper I wrote around the std lib wave modeule: from pydub import AudioSegment # first I'll open the audio file sound = AudioSegment.from_mp3(...
There's a lot of articles on-line on how to remove cruft and deprecated packages etc. But I struggled to find one that will help you clean up your world file. Being a bit of a quick fix kind of guy, I hammered this little python script together, which will loop through your world file and find the package description f...
enebre Re : Gmediafinder : Youtube/dailymotion/vimeo.. sans flash et bien plus.... bonjour smo, je viens de réinstaller gmf sur mon petit netbook et git clone git://github.com/smolleyes/gmediafinder2.git gmf2 cd gmf2/Gmediafinder python gmediafinder.py je constate que python-mecahanize n'est plus intégré dans les deps...
I have been working on this looping problem for a bit now. How do I loop through a list containing a single string and tuple, while appending the tuple to the preceding string? For example: gen = ['A', ('x', 'y'), ('t', 'u'), 'B', ('y', 't'), 'B', ('a', 'z')]fam = ['A', 'B'] Fortunately fam also contains the single str...
Sublime Text 2 is an extensible editor with a Python API. You can create new commands (called Plugins) and make them available from the UI. Adding basic filtering TextCommand plugin In Sublime Text 2, select Tools » New Plugin and enter the following text: import sublime, sublime_plugin def filter(v, e, needle): #...
This series of two articles will show you how to participate in the global Internet. The architects of this greatest advance in communications since the printing press have strived to make such participation possible. The Internet is — by design — a simple network, engineered only to route data from one location to ano...
Ruby kriston — 2010-04-28T23:30:50-04:00 — #1 I'm up to page 283 of Simply Rails 2 in the "protective measures" chapter. As the note states, I'm getting errors because now that I'm attempting to reference a user_id, and none exist in previous entries, it is failing... I thought that I could change all of the story entr...
I was watching a Google Tech Talks video, and they frequently referred to polymorphism. What is polymorphism, what is it for, and how is it used? If you think about the Greek roots of the term, it should become obvious. So polymorphism is the ability (in programming) to present the same interface for differing underlyi...
When one creates Processes with multiprocessing library from python, the parent process waits for its children to return before it returns. In fact, the documentation recommends joining all children.But I would like to let the parent return before its child process finish. Is there any way to "detach" the child process...
here, in the following code, I get the colors assigned to the vertices, but there is no significance for the length of the box 'l' I want the colors to be assigned w.r.t. the length of the boxes and the function should output the number of different colors in the network, so that I can use it to determine the fractal d...
Long story short, I want to call format with arbitrarily named arguments, which will preform a lookup. '{Thing1} and {other_thing}'.format(**my_mapping) I've tried implementing my_mapping like this: class Mapping(object): def __getitem__(self, key): return 'Proxied: %s' % key my_mapping = Mapping() Which works ...
I'm trying to go through a file line by line (each line is no more than 50 characters), shift each character by 10 or -10 (to encrypt and decrypt) and then print the shifted string where the old string was. But I'm getting some really funny output. heres the code: #include <stdio.h> int main(void){ FILE *fp; fp...
fenix122 Re : erreur avec apache2 : « Unable to open logs » [RESOLU] non non je sais faire les serveur sans interface j'ai fait sa surtout pour simplifier après non je ne suis pas tout a lettre car le tuto que j'ai suivi avait des erreurs pour certaine chose surtout pour c'est source pas bonne j'ai du aller sur le site...
FTG [script/python] Nautilus et picasaweb! Bonjour à tous, depuis longtemps je voulais réaliser un petit script python a l'aide des API Google, me permettant d'uploader en 2 temps 3 mouvements un paquet de photos de Nautilus vers Picasaweb par un clic droit de souris. Je n'avais pratiquement rien à faire aujourd hui et...
Yoko 12 [Résolu] Problème avec apt-get update Bonsoir à tous, Après avoir fait des changement dans mon sources.list, j'ai voulut lancer apt-get update. Mais il reste bloqué à 36%, après il me dit que le delais de connexion est dépasser pour se connecter au serveurs. Voici le contenu de mon sources.list (j'imagine qu'el...
A cool project from Benjamin E. Coe for SMTP using an elegant DSL in Python: class ExampleRoute(Route): @route(r'(?P<prefix>open)@(?P<suffix>.*)') def open_route(self): print "%s at %s sent the message: nn %s" % ( self.prefix, self.suffix, self.message ) Mess...
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 à...
Using Python, how can I compute the md5 hash of a TIFF image, excluding all metadata? With a JPG, I do something like this: def jpeg(fh): hash = hashlib.md5() assert fh.read(2) == "\xff\xd8" while True: marker,length = struct.unpack(">2H", fh.read(4)) assert marker & 0xff00 == 0xff00 if marker =...
Following is the simple database model i have: class Notes(db.Model): text = db.StringProperty(multiline=True) date = db.DateTimeProperty(auto_now_add=True) Now in the url handler, i send all the notes to the template as follows: class MainPage(webapp2.RequestHandler): def get(self): notes = Notes.all() ...
Databases brandonbuster — 2013-05-22T09:48:58-04:00 — #1 All I want is a single random value from this MySQL query. Both the outer inner and outer queries reference the same table but I'm assigning them different aliases. Yet, this query is still performing like a correlated subquery, often returning multiple results. ...
I would like to make two pairs from pairs. A pair consists of two elements, and a two-pair consists of two pairs. Here is the list of constraints: In a pair, order of elements is important: (element1, element2) != (element2, element1) In a two-pair, order of pairs is not important: (pair1, pair2) == (pair2, pair1) I wr...
List.metaClass.joinWithDifferentLast { a, b -> delegate.join(a).reverse().replaceFirst(a.reverse(),b.reverse()).reverse() } def a = ['one', 'two', 'three']; println a.joinWithDifferentLast(',',' and ') //prints one,two and three assert '' == [].joinWithDifferentLast(' , ', ' and ' ) assert '1' ==...
This article describes a fixpoint combinator for Haskell types, with some justification of why such a thing would be useful. It's meant to be an accessible introduction to material which is already covered elsewhere. You'll need some basic Haskell knowledge, such as how to define and use polymorphic data types. And you...
1. Что такое?.. Python - это интерпретируемый алгоритмический объектно-ориентированный язык со строгой динамической типизацией, полиморфизм в нем реализован в виде Duck Typing. Трансляция питона организована очень схожим с Java образом. Именно, исходник компилируется в байт-код, а затем этот байт-код исполняется. Это с...
Hi I would like to extend my logger (taken by logging.getLogger("rrcheck")) with my own methods like: def warnpfx(...): How to do it best? My original wish is to have a root logger writing everything to a file and additionally named logger ("rrcheck") writing to stdout, but the latter should also have some other method...
Heroku is increasingly becoming my favorite platform to deploy simple Python applications on. Heroku actually gives you a completely managed environment where you can deploy an app in literally minutes. Not to mention that the free tier usage on Heroku (1 dyno, Postgres dev plan) can actually get you pretty far. You ca...
As i mentioned in this previous post. Im trying to create a decorator which does the following: The decorated class represents a document in a Documentbased DB like CouchDB or MongoDB. The Decorator accepts on argument which is a instance of a connector to such a database. The Model Class (in this example User) does au...
Below is a simplified version of a query that I have already created. The query works fine, but I cannot figure out how to get the XML declaration at the top of the generated XML. I've tried multiple things and searched far and wide on the Google, but alas I cannot seem to find out how to do this ... or even if it is p...
we work on a python program/library for which we would like to set a logging system. Basically we would like to log either on a terminal either on a file. To do so, we will use the excellent logging package embedded in the standard distribution. The logging level should be customizable by the user via its Preferences. ...
In our previous article, we discussed what the POI project is all about, showed how to read and write OLE 2 Compound Document files, and gave a brief history of the POI project. Probably half of the folks who read that article are scratching their heads now, thinking "How do I write out a spreadsheet?" Good news! In th...
cmarcx Re : [Script] Client Hubic pour linux ;) Bonjour, J'ai essayé de monter hubic avec la commande : ./hubicmount -l <email> -p <passwd> -o umask=022 -o uid=1000 /media/hubic Mais j'obtiens toujours l'erreur "Unable to login to hubic". Pourtant les logins indiqués sont bons, je fais un copier-coller, et ils fonction...
I have a project that has almost complete unit test coverage. There's only one statement that isn't covered and I can't work out a good way to do so. Say the project is called foo, I have foo/commands.py: #!/usr/bin/python [...] def main(argv): [...] if __name__ == '__main__': return main(sys.argv) # This line ...
The purpose of this piece of code is to take in a string and print it out in a specific format. For instance, given: s = "Hello" The program should print out: +---+---+---+---+---+| H | e | l | l | o |+---+---+---+---+---+ If the size of the string is greater than the column size of the console, it's then supposed to p...
pygame is pygame.org is PyComicView PyComicView - 1 Jeffrey Aylesworth (jeffayle) Tags: Description PyComicView PyComicView is a python library for displaying comic directories. Why? There is a lack of good, free and Mac compatible comic book readers. Not that this is only for Mac, but being written in Python, it shoul...
Phoen1x Re : [HOW TO] adesklets : configuration des desklets J'ai besoin d'un coup de main, donc j'ai voulu installer les adesklets Weather forecast et system moniteur Le problème c'est que j'avais pas vu le tuto pour l'installation de adesklest . J'ai bigouilller un long moment sur weather car il ne me le lancait pas ...
Developing a PythonWin Sample Application During the rest of this section, we will develop a sample application using PythonWin. This will lead us through many of the important MFC and PythonWin concepts, while also leveraging the dynamic nature of PythonWin. MFC itself has a tutorial/sample called Scribble, which deli...
Ninja is a build system similar to Make. As input you describe the commands necessary to process source files into target files. Ninja uses these commands to bring targets up to date. Unlike many other build systems, Ninja’s main design goal was speed. I wrote Ninja while working on Google Chrome. I started Ninja as an...
n3o51 Liste des onglets Bonsoir y a t'il un moyen de copier directement dans un fichier txt la liste des onglets ouverts dans opera et firefox ? ligne par ligne ? Merci d'avance Edit modérateur : si vous n'avez pas de réponses à donner, ne sortez pas le sujet des "Sujets sans réponses". Dernière modification par xabilo...
James Bennett wrote a great explanation last year of when it's a good idea to use class methods versus custom managers in Django models. I'd like to showcase a snippet from Django Snippets, which, combined with one extra class, allows you to add expressive, chainable querysets to your managers. Why Not Class Methods? I...
On the Python Edu-sig, Dethe Elza announced a project to write a beginning Python programming book for artists. Many commercial art tools now use Python, including Blender, Poser, and Lightflow. Blender is a 3D animation tool that uses Python as its scripting language. The Poser Pro pack includes an altered version of ...