text stringlengths 256 65.5k |
|---|
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... |
A lot of those answers here are helpful yet I might help someone but putting my solution as well.
def theflyingcircus():
if 9 <= 9:
return True
print "It's true"
elif 6 == 8 or 99 < 88:
return False
else:
return False
now as you know the positioning is crucial in python ther... |
I am plotting an image in matplotlib, and it keeps giving me some padding. This is what I have tried:
def field_plot():
x = [i[0] for i in path]
y = [i[1] for i in path]
plt.clf()
plt.axis([0, 560, 0, 820])
im = plt.imread('field.jpg')
field = plt.imshow(im)
for i in range(len(r)):
p... |
adelmorsux
Bug Radio tray...
Bonjour à toutes et tous,
Sur QQ 12.10 beta depuis 15 jours et apres qqes bidouilles je voulais retrouvé toutes mes radios que j’écoute sur Radio tray et là.... rien...
En faite si, j'ai tester l'install via la logiteque puis sous console et même résultat RIEN
moi@moi:~$ sudo apt-get instal... |
Trudy
Résolu ! Ouvrir fenêtre Dépôts
Bonjour, Je voudrais savoir comment ouvrir la fenêtre Dépots, si je ne l'ai pas dans Système-Aministration ... Merci pour vos réponses !
Dernière modification par Trudy (Le 04/12/2005, à 15:57)
Hors ligne
Express
Re : Résolu ! Ouvrir fenêtre Dépôts
Ca s'appel "Gestionnaire de paquet... |
L4ur3nt
Accéder au NAS DNS320 depuis toutes les applications sur Ubuntu 12.10
Bonjour, j'ai un soucis de connection à mon NAS DNS 320 sur Ubuntu 12.10.
J'arrive à y avoir accès en recherchant dans le réseau local mais je parviens pas à "accéder au NAS depuis toutes les applications"
J'ai déjà consulté plusieurs anciens... |
I'm using the python facebook api on google app engine (webapp). I want to set the user's cookie to expire when the user logs out of the application. This cookie is being set by the Javascript Facebook API.
Here is the facebook api function showing how the facebook api access the facebook cookie:
def get_user_from_cook... |
Coeur Noir
[résolu] Langue du système ...pas d'interface KCmodule...
Hello,
je viens de réinstaller Kubuntu12.04 - seul - sur partition dédiée avec son propre utilisateur dans un /home sur un 2nd DD.
Sur une autre partition il y a Ubuntu12.04 et son autre utilisateur, dans le même /home (/home contient donc 2 utilisate... |
I am a relative newcomer to SQLAlchemy and have read the basic docs. I'm currently following Mike Driscoll's MediaLocker tutorial and modifying/extending it for my own purpose.
I have three tables (loans, people, cards). Card to Loan and Person to Loan are both one-to-many relationships and modelled as such:
from sqlal... |
I received a PDF in an email and I want to crop and rotate it because it has two pages per sheet. Trying the solutions in Split pages in pdf I had problems with "AssertionError" in pyPDF and "Warning: stream operator not terminated by valid EOL." in ImageMagick. pdftk seems to be stuck in an endless loop and never fini... |
JavaScript
macaela — 2011-07-19T17:49:29-04:00 — #1
Hi i have the following function that display a list depending on the drop down option the user selects but doesnt not work on explorer it works on other browsers but on exploere i get the following error
SCRIPT600: Unknown runtime error
manitest.html, line 76 charact... |
I am trying to modify and example by making the animation run on increasing x values. I want update the x axis tick labels to update according to the x values.
I am trying to use the animation features (specifically FuncAnimation) in 1.2. I can set the xlimit but the tick labels are not updating. I tried explicitly set... |
toma222
[HOW TO] adesklets : installation sous Ubuntu Dapper et Edgy
Il existe désormais un article sur le wiki concernant Adesklets donc je vous conseille de vous y fier, ce tutoriel n'étant plus mis à jour.
Je poste ce sujet en complément du sujet sur l'installation de adesklets sous Breezy.
Je ne reviendrais pas sur... |
This is mostly taken from the very helpful documentation on Stevedore; when I started working on Gnocchi I found myself wondering a lot about the functions of two modules in particular, stevedore and pecan. The other day I needed to use stevedore to load a plugin and so finally had the chance to use it in practice. The... |
I'm trying to make one of my libraries compatible with Python 2.6. It uses the method datetime.timedelta.total_seconds which was added in 2.7, so to make it work with 2.6, I wanted to monkey patch it into timedelta like this:
import datetime
if not hasattr(datetime.timedelta, 'total_seconds'):
class timedelta(datet... |
So the other day I spent a few hours trying to dive into Python unit testing. After using unit tests at work in Ruby on Rails, I wanted to see if I could take a stab at wrapping some code I was working on with some tests in Python. It took me awhile to figure out how to build what I wanted, so I wanted to write about m... |
I've been seeing this error more and more lately. I'm using the Chrome dev-channel browser on Ubuntu 10.10. When I refresh a web page - the dev_appserver seems to hang. After a timeout, if completes the request.
If I type CTRL-C in the appserver terminal window, it seems to "unstick" the server after displaying this ba... |
#2676 Le 15/02/2013, à 19:14
mulder29
Re : TVDownloader: télécharger les médias du net !
Et je reçois
python: can't open file
alors que j'ai installé Python 2.7.3, hier.
Hors ligne
#2677 Le 15/02/2013, à 19:26
k3c
Re : TVDownloader: télécharger les médias du net !
si tu tapes
which python
ça affiche quoi ?
Dernière mod... |
You can transpose and flatten the arrays:
d = numpy.array([a, b, c]).T.flatten()
An alternative way to combine the arrays is to use numpy.vstack():
d = numpy.vstack((a, b, c)).T.flatten()
(I don't know which one is faster, by the way.)
Edit: In response to the answer by Nicolas Barbey, here is how to make do with cop... |
I'm attempting to send an email with Python. From what I can tell, all the following code needs is a valid recipient and a host HOST. I'm unsure on how to get the host. What is the simplest way?
import smtplib
import string
SUBJECT = "Test email from Python"
TO = "python@mydomain.com"
FROM = "python@mydomain.com"
text ... |
I am writing and testing code on XPsp3 w/ python 2.7. I am running the code on 2003 server w/ python 2.7. My dir structure will look something like this
d:\ssptemp
d:\ssptemp\ssp9-1
d:\ssptemp\ssp9-2
d:\ssptemp\ssp9-3
d:\ssptemp\ssp9-4
d:\ssptemp\ssp10-1
d:\ssptemp\ssp10-2
d:\ssptemp\ssp10-3
d:\ssptemp\ssp10-4
Ins... |
-------------------------------------------------------------------------------------------------------------------
Ropes and Weights
In a room there are N ropes and N weights. Each rope is connected to exactly one weight (at just one end), and each rope has a particular durability − the maximum weight that it can susp... |
I have Realtek RTL8191SEvB wireless card on Ubuntu 10.10:
$ lspci -v | grep Network
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10)
When I load its driver, according to the Network Manager it sometimes blinks with a list of available networks but it keeps disabl... |
I was asked last week how many lines of code some of my projects are, and didn't have an answer handy. Fortunately, it's easy to write a LOC counter in Python:
"""Calculate LOC (lines of code) for a given package directory."""
import os
import re
def loc(path, pattern="^.*\.py$"):
"""Return the number of lines of c... |
I'm doing Zed Shaw's fantastic Learn Python The Hard Way, but an extra question has me stumped: Line 9--10 could be written in one line, how? I've tried some different thoughts, but to no avail. I could move on, but what would the fun in that be?
from sys import argv
from os.path import exists
script, from_file, to_fil... |
I'm trying to display the elements in an array but doesn't seem to work:
var myurl=new Array("google.com", "yahoo.com");
for (i=0;i<=myurl.length-1;i++){
document.writeln("<a href='http://www.' + myurl[i] + target='_blank'>");
}
Not sure why it is not working??
The immediate problem is that your code has some mes... |
Basic Todo List in 0.2
DEPRECATED! This code won't work in the latest version of web.py.
Uses web.py microframework: web.py, template.py, form.py.
Requires PostgreSQL, lighttpd, psycopg2 and flup.
Note: This code is beta. This means: 2xplore at your own risk ;)
Files:
tidy/
__init__.py
app/
__init__.py
cont... |
#2851 Le 19/03/2013, à 02:35
M@dinko12
Re : TVDownloader: télécharger les médias du net !
Bonjour,
je ne comprends pas si le projet tvdownloader est au point mort à cause des fragmentations de M6Replay (les fichiers téléchargés font 0 octets même après MAJ des plugins) ? Et pas envie de lire 114 pages, j'ai lu les dern... |
Some usage examples of Misaka. Everything about the examples is explained here. What's possible, how it works and what you get.
Installation
Installation from PyPi:
% pip install misaka
Or get the most recent version from Github:
% git clone git://github.com/FSX/misaka.git
% cd misaka
% python setup.py install
Visual ... |
I am trying to fetch and parse an XML file into a databse. The XML is compressed in GZIP. The GZIP file is ~8MB. When I run the code locally the memory on pythonw.exe builds up to level where the entire system (Windows 7) stops responding, and when I run it online it exceeds the memory limit on Google App Engine. Not s... |
bibichouchou
TVDownloader: télécharger les médias du net ! [2]
A k3c
j'ai fait les mêmes constats quand à l'utilisation du script de KSV.
le flux rtmp était bien utile car les séries n'étaient pas chiffrées. avec la version fragmentée, ce n'est pas le cas
ci-dessous une version corrigée de ton script pour tf1 et compag... |
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 "... |
Am I missing something here while creating table using sqlalchemy?
from sqlalchemy import create_engine
from sqlalchemy import MetaData, Column, Table, ForeignKey
from sqlalchemy import Integer, String, DateTime
engine = create_engine('postgresql+psycopg2://postgres:password#@localhost:5432/LabData',echo=True)
metadata... |
Oct 11, 2013 at 6:03am UTC
A program which opens a file and immediately closes it. Very impressive.
Did you come up with that on your own?
Oct 11, 2013 at 8:02am UTC
What is wumbo. Did you give me a virus? Anyway I have a better one:
#!/usr/bin/env python
from optparse import OptionParser
def requestAction():
usage... |
April 19th, 2010 at 6:02 pm by Dr. Drang
Last summer I wrote a script that logged in to my account at Heaven’s Above every Monday morning and emailed me a list of the week’s upcoming Iridium flares. The script has been working perfectly, but I’ve found myself doing the same things every time I read the email:
Scan the ... |
Plupload is a reusable component which fully takes advantage of the file upload capabilities of your browser and its plugins. It will use HTML5, Flash and Google Gears if they are available, but otherwise, it can gracefully degrade down to HTML4 it it needs to. Here's how it can be integrated within a Django web applic... |
I'd like to embed an IPython qt console widget in a PyQt application I am working on. The code provided below (and adapted from http://stackoverflow.com/a/9796491/1332492) Accomplishes this for IPython v0.12. However, this crashes in IPython v0.13 at the line self.heartbeat.start() with RuntimeError: threads can only b... |
ZePhYmA
Installation de sublime Text
Bonsoir,
J'aimerais installer Sublime Text, mais après divers essais je n'y arrive toujours pas. Le problème est que le logiciel ne semble pas trouver la bibliothèque Python. Pourtant j'ai fais très exactement ces trois commandes : http://minitoolkit.net/softs/installer_ … ext_2.htm... |
After you've made your .scheme or .schemedef file (see Add Support for Your Language) there's still something missing from that authentic professional feeling when programming with your newly defined language. For that you need to create an auto-indenter.
Please note: You need to have PyPN installed for this to work! S... |
What is the best way to take a data file that contains a header row and read this row into a named tuple so that the data rows can be accessed by header name?
I was attempting something like this:
import csv
from collections import namedtuple
with open('data_file.txt', mode="r") as infile:
reader = csv.reader(infil... |
A code-completion engine for Vim
YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine for Vim. It has several completion engines: an identifier-based engine that works with every programming language, a semantic, Clang-based engine that provides native semantic code completion for C/C++/Objective-C... |
Petr Matousek discovered that libvirt did not always honor read-only connections. An attacker who is authorized to connect to the libvirt daemon could exploit this to cause a denial of service via application crash. Updated packages are available from security.ubuntu.com.
===============================================... |
Like jobscry said, logout() cleans session data, but it looks like you have set your own cookies too.
You could wrap auth logout view, which will return an HttpResponse:
def logout_user(request):
response = logout(request, next_page=reverse('app.home.views.home'))
response.delete_cookie('user_location')
... |
I have a table with the following info...
Id | orderNumber | orderDate | customerId
orderDate is a MySQL datetime field and the current day, month, year and time is inserted into the database at the time the record is written.
So my question is how would I pull a list of orders for a certain day of this current week. M... |
Try with a specific folder to display an image, but does not work, tell me what I was doing wrong and where, what can it not enough? All images are in the folder C:\dip\todo. Use runserver.
settings.py
MEDIA_ROOT = 'C:/dip/todo/'
MEDIA_URL = 'http://127.0.0.1:8000/media/'
ADMIN_MEDIA_PREFIX = '/admin-media/'
admin.py... |
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... |
I have a webapp on google app engine that checks to see if a user is logged in (through the federated id) with the following code. I just changed domain names and now for some reason it isn't recognizing any of my current users. This is because the openID changes depending on the domain name which I found through a lit... |
I've got a Taz 2.1 from Lulzbot. It's tons of fun, but I had really hoped I'd find some joy in the ability to use it for rapid prototyping. I've done some minor stuff with it, but this weekend I finally got to build a thing which I designed that was not trivial.
One of the final pieces being printed
I also took all the... |
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... |
I’ve just spent the last hour or so ironing out the details required to automate the building of cabalised Haskell packages for Debian. At the same time I also built Debian packages for 5 Haskell packages (test-framework and its dependencies).
These are the basic steps I’ve followed:
Extract the tar-ball in the working... |
Ian Bicking wrote a Zope 3 Critique a couple of weeks or so ago, partially in response to a critique by Jean-Marc Orliaguet. I’ve wanted to write a response of my own, but time has not allowed it. Now, I’d like to use a few posts to post my own responses to a few items.
The first point I’d like to address comes under h... |
Using regular expressions for web scraping is sometimes criticized, but I believe they still have their place, particularly for one-off scrapes. Let's say I want to extract the title of a particular webpage - here is an implementation using BeautifulSoup, lxml, and regular expressions:
import re import time import urll... |
I need some help with Python's map function. I am trying to execute this code, though I get an error:
Updated Post
This is my exact code, along with the outputs of each function:
infinity = 1000000
invalid_node = -1
startNode = 0
#Values to assign to each node
class Node:
def __init__(self):
self.distFromSo... |
Audit trail
Some applications, those that deal with medical records for example, need an audit trail. I.e. they need to keep track of every database change. One way to achieve this is by
time stamping and signing every records of every table
storing a copy of the current record every time it is updated
marking new/modi... |
lekokeliko
Tictactux jeu en Python
Je tient a vous présenter ma grande réalisation :
le Tictactux en python développé depuis la nuit du 24 decembre 2007
morpion like parametrable a souhait
quelques précisions :
versions antérieures :
-1.07.29 beta test
-1.07.30 détails des modifs plus bas (post 7)
-1.07.31 modification... |
Fri, 31 Aug 2007
Finding Duplicate Elements in an Array
I came across an interesting programming puzzle today, and I'd like to share a couple of variants on it.
To start with, let's say we have an array A that contains some numbers.For simplicity, let's say that the array is 1-based. How can weefficiently find out if a... |
Nick Borko
Chief Technology Officer
Leaning Forward Technologies, LLC
May 14, 2013
Except where otherwise noted, this work is licensed under
http://creativecommons.org/licenses/by-nc-sa/3.0
Python 2.7.3 (default, Sep 26 2012, 21:53:58)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more inf... |
GabLeRoux
less info
bio website gableroux.com
location Chicoutimi
age 23
visits member for 2 years, 1 month
seen Sep 29 '12 at 17:57
stats profile views 1
I'm a programer, I speak french, english and python. Read my stuff on gableroux.com
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, random, math
def main()... |
Selected ramblings of a geospatial tech nerd
Best bang for your analytical buck
As (geo)data scientists, we spend much of our time working with data models that try (with varying degrees of success) to capture some essential truth about the world while still being as simple as possible to provide a useful abstraction. ... |
I want to get user input for multiple times and store the input data together in a string until input "quit" to quit from input. I think a for loop can work but I don't know how to do it.
while True:
user_input = raw_input("Enter something:")
if user_input == "quit":
break
Try this:
input_string = ''
w... |
Is there a difference between stability and reliability (at least in software engineering context) or can they be used interchangeably? If not, what would be some examples of reliable but not necessarily stable systems, and vice versa?
Is there a difference between
Let's say for instance we have an app, it works perfec... |
O'Reilly Book Excerpts: Gaming Hacks
Gaming Hacks for Geeks, Part 2
by chromatic
Editor's note: Last week, in part one of this two-part series of hack excerpts from Gaming Hacks, author Simon Carless showed you how to write your own MMORPG macros. This week, Simon is back, giving you the hacking tools you need to creat... |
In the following I use translate() to eliminate punctuation from a string. I've been having a lot of problems with translate because it does not work with unicode. But now I noticed that the script works well in the development server but raises an error in the production server.
The request is sent by chrome extension... |
#1676 Le 28/06/2012, à 20:51
AnsuzPeorth
Re : [glade2script-GTK2] Interface graphique pour script bash ou autre.
re,
Bon, pour les whitelits, il faut indiquer la section et la variable ... Je vais réfléchir pour faire mieux ... Mais je pense que ce sera dur de faire différent, il faut bien indiquer la section et la var... |
Python-Powered Templates with Cheetah
by Andrew Glover
01/13/2005
XML transformation via XSL Transformations (XSLT) is quite popular and indeed powerful. Well-constructed XSL can produce HTML, PDF, XML, and just about any other text format imaginable. XSLT, however, requires that the subject data be a well-structured X... |
Thanks to Ubuntu sites I no longer thought it was just me even though I reported this around almost a year ago. Just right-clicking for desktop not only kills the conceptual menu but hikes the cpu wild & hot, forget even activating the fixed desktop slideshow feature which locks the cpu to run high and hot even if you ... |
Analysis
The script is a busy loop: it keeps reading the GPIO pins over and over. It doesn't consume much memory but it keeps the CPU busy.
You should set the GPIO pin in edge mode. The WiringPi author is considering adding a wait command to the gpio utility but currently there is no way to react to an edge trigger fro... |
For users of Firefox and SessionSaver who lost sessions upgrading to 0.9.x
by Uche Ogbuji
SessionSaver created by "pike" based on work by "rue" is an "old" extension that does not work on Firefox 0.9.x. Some, including me, upgraded for the security fixes and now find we can't use SS, now can we resume old sessions. One... |
Przeszukiwanie wszerz
Przeszukiwanie wszerz
Kolejność odwiedzania węzłów
Rodzaj Przeszukiwanie grafu
Struktura danych graf, drzewo
Złożoność
Czasowa
Pamięciowa
Niniejszy artykuł jest częścią cyklu teoria grafów.
Przeszukiwanie wszerz (ang. Breadth-first search, w skrócie BFS) – jeden z najprostszych algorytmów przeszuk... |
September 14, 2014
PyRSS2Gen worked fine as a stop-gap for the last couple of years, despite the fact that it kept generating invalid XML markup for my RSS feed. Thankfully, feed readers seemed more tolerant than the FEED Validator. Chisel initially did not have this method of RSS generation within its code, but was re... |
link5192
Re : [How-to] Desktop Screenlets
Bonjour à tous,
Je me permet aussi de remonter ce topic, j'ai voulu lancer le screenlets terminal (http://gnome-look.org/content/show.php/ … tent=74844) mais impossible celui-ci ne veut pas demarrer ... quelq'un aurait-il une solution ?
Ubuntu 12.04 (Precise) sur Dell Inspiron ... |
I am trying to understand how a function, say mkdir, works by looking at the kernel source. This is an attempt to understand the kernel internals and navigate between various functions. I know mkdir is defined in sys/stat.h. I found the prototype:
/* Create a new directory named PATH, with permission bits MODE. */
ext... |
Other recipes
Upgrading
In the "site" page of the administrative interface there is an "upgrade now" button. In case this is not feasible or does not work (for example because of a file locking issue), upgrading web2py manually is very easy.
Simply unzip the latest version of web2py over the old installation.
This will... |
The main source of problems I've had working with unicode strings is when you mix utf-8 encoded strings with unicode ones.
For example, consider the following scripts.
two.py
# encoding: utf-8
name = 'helló wörld from two'
one.py
# encoding: utf-8
from __future__ import unicode_literals
import two
name = 'helló wö... |
I built Numpy with the MKL libraries from Intel (a difficult process for me, it took my whole day!). Numpy needs to be linked to the MKL library with the LD_LIBRARY_PATH environment variable, or at least this is the way I do it... So I use export in .bashrc to save the path and when I start a new console and run python... |
MEH-TECH
Re : [Support] Team Fortress 2
Je me disais aussi que c’était du pipo... Je me connecterai dans la soirée alors pour le récupérer
Merci
Hors ligne
MEH-TECH
Re : [Support] Team Fortress 2
C'est bon je l'ai reçu
Hors ligne
kurapika29
Re : [Support] Team Fortress 2
Bien le bonjour, chez moi depuis le début TF2 es... |
You can't modify collections while iterating over them.
There are a few ways around this:
(0) Rethink your design to see if you need to do this.
(1) Don't modify the collection; instead, build a new, filtered collection.
(2) Don't iterate over the collection; instead, iterate over a copy of the collection
(2.5) For a d... |
sksbir
Lecteur 6 en 1 interne sur USB non reconnu ?
bonjour,
Sur un transportable gericom cinema XXL, j'essaye en vain de faire fonctionner le lecteur de carte memoire 6 en 1 interne.
Sous windows XP il n'est pas reconnu en standard, le driver s'appelle "C-media USB Mass storage controler".
Sous ubuntu, il ne se passe ... |
Everyone!
I'm building JSON and I'm not sure how to build this part of the JSON.
'playlist': [
{
'file': 'bunny.mp4',
'title': 'Big Buck Bunny Trailer',
'provder': 'rtmp',
'streamer': 'rtmp://rtmp.server.com/application',
'image': 'http://thumbnails.server.... |
/proc/$pid/maps
/proc/$pid/mem shows the contents of $pid's memory mapped the same way as in the process, i.e., the byte at offset x in the pseudo-file is the same as the byte at address x in the process. If an address is unmapped in the process, reading from the corresponding offset in the file returns EIO (Input/outp... |
Python lambda expressions are real, formal untyped λ-calculus lambda expressions.
They fit the formal definition; they can only represent one python expression, based on variables (free or otherwise) and references to other functions (abstract symbols). Python uses parenthesis in expressions too.
You use them wherever... |
So I have a directory that contains my Python unit test. Each unit test module is of the form "test_*.py". I am attempting to make a file called "all_test.py" that will, you guessed it, run all files in aforementioned test form and return the result. I have tried two methods so far, both have failed, I will show the tw... |
nknico
Un nouveau dépôt officiel pour Ubuntu (logiciels commerciaux)
Un nouveau dépot officiel vient d'ouvrir. Il contient des logiciels commerciaux. Pour l'instant Opéra et Realplayer sont disponibles.
En gros, pour l'installer, il faut:
* Activer les mises a jour de dapper
* Mettre a jour sa dapper :-)
* Via gnome-ap... |
I'm trying to upgrade a portion of Python 2.6 code to Python 2.7. This code uses the json module to produce some JavaScript (not JSON-compliant), which is then inserted into the rest of a script.
The general idea is to be able to insert code or refer to variables that are defined elsewhere: it's not intended to be used... |
To compute the $n$th term in this sequence, you really only need decent estimates on the fractional parts of $(n-1)e$ and $ne$ (following Gerry Myerson's solution) - you get 2 if and only if the fractional part of $(n-1)e$ lies in $[0.5,1)$ and the fractional part of $ne$ lies in $[0,0.5)$. To find the fractional parts... |
use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
~61 users here now
Items from redditblog.com that are about the community or otherwise not directly related to funct... |
I use the ConfigObj Python library for this. If you do this, it does require writing Python to interface with the config files. I typically have a default_conf file which has default values, and I can selectively override these settings with some other file, say user_conf
Here is the code I am currently using as an exa... |
kryss
Re : [HOW TO] adesklets : installation sous Ubuntu Dapper et Edgy
ah la galere...
etu tu crois que tu peux savoir pourquoi les desklets de gdesklet marchent pas?
c est quoi un capteur rss grab?
Hors ligne
toma222
Re : [HOW TO] adesklets : installation sous Ubuntu Dapper et Edgy
Non désolé, j'ai laissé tomber gdes... |
Zakhar
Uploader sur votre Freebox Révolution à distance
UPLOAD de fichiers sur votre Freebox "distante" !
Free a récemment ouvert la possibilité d'accéder à l'interface de gestion de la Freebox V6 à distance.
Vous pouvez donc facilement "récupérer" (download) des fichiers de la Freebox distante vers votre PC, via l'int... |
im reading a csv file and then writing a new one:
import csv
with open('thefile.csv', 'rb') as f:
data = list(csv.reader(f))
import collections
counter = collections.defaultdict(int)
for row in data:
counter[row[11]] += 1
writer = csv.writer(open('/pythonwork/thefile_subset1.csv', 'w'))
for row in data:
if co... |
chaoswizard
Re : TVDownloader: télécharger les médias du net !
Bonsoir,
Non ce n'est pas possible, RtmpDump (et je suppose Flvstreamer) n'arrive pas à parser l'URL si elle n'est pas découpée.
J'avais étudié ce problème en mettant au point Arte Live Web pour TVO.
Bon courage pour votre projet
Je viens pourtant de tester... |
I am looking to be able to write an alternative code to the built in count in python: This code works
def count(element,seq):
"""Counts how often an element occurs
...in a sequence"""
mycount = seq.count(element)
return mycount
but I would like to write it in a for loop (or another way?), I've got this... |
I now have this working:
Download the latest sqlite and pysqlite2 builds as described above: make sure correct versions are being used at runtime by python.
import sqlite3
import pysqlite2
print sqlite3.sqlite_version # should be 3.6.23.1
print pysqlite2.__path__ # eg C:\\Python26\\lib\\site-packages\\pysql... |
Parsing large XML files efficiently with Python
Parsing XML with python is not a difficult task if you have some familiarity with python and any of the library that deals with providing you methods to parse XML. But what if you want to parse very very large XML files. Probably you are here searching for this only becau... |
I have this beautiful sphere I made in matplotlib. How would I go about putting it in a tkinter frame widget? It'd be nice to be able to integrate it into an existing tkinter GUI. Also is it possible to rid of the menu bar below the display? I have no need to save the output or zoom, so it's useless to me.
from mpl_too... |
gege1809
installation de libboost Resolu
je veux installer un logiciel de radio numerique (gqrx)sur mon pc sous ubuntu 12.04 et pour cela j ai besoin de libboost-all-dev mais quan je lance l installation (sudo apt-get-install libboost-all-dev) j aiune erreur bizarre sur des dependances
Lecture des listes de paquets... ... |
grim7reaper
Re : /* Topic des codeurs [8] */
On va prendre une autre approche : vous me conseillez quoi pour commencer, dans un cas et/ou dans l'autre ?
Pour Haskell, le fameux Learn You a Haskell for Great Good! (une traduction existe, je ne sais pas ce qu’elle vaut), si tu veux approfondir il y a aussi Real World Has... |
My question is: What is it that makes those languages suitable? From what I know, they are slower than other languages, and operate at a higher abstraction level, which means they are too far from the hardware. The only reason I could think is because of their advanced string manipulation capabilities, but I believe th... |
I will just attempt to rewrite the previous answer with more details on why it is optimal.
The A* algorithm taken directly from wikipedia is
function A*(start,goal)
closedset := the empty set // The set of nodes already evaluated.
openset := set containing th... |
degolarson
RESOLU connexion ok mais ouverture pages web lente ou imopssible
bonjour
j'ai déjà posté ici : http://forum.ubuntu-fr.org/viewtopic.php?id=21092
mais le pb était peut être un peu différent
quand je tape une recherche dans Google ou bien dans ma barre personnelle d'onglets l'ouverture de la page est souvent l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.