text
stringlengths
256
65.5k
A while ago I decided that in order to learn Haskell I should make an attempt to stop reaching for Python whenever I needed to solve a “small problem” and use Haskell instead. This morning I found a need to unescape URLs inside Vim and I didn’t catch myself until after I had written the following Python code: #! /usr/b...
Bybeu [résolu] Problème veille carte nvidia 4200 nvidia96 EDIT 27 mars 2013: j'ouvre un nouveau fil ici: http://forum.ubuntu-fr.org/viewtopic.php?id=1210781 Bonjour Mon portable 12.04 plante en sortie de veille; J'ai essayé sudo s2ram -n Machine matched entry 222: sys_vendor = 'Dell Computer Corporation' sys_...
tomtom Re : [HOW TO] adesklets : installation sous Ubuntu Breezy raaah ! j'ai un probleme d'interpreteur python ! J'ai installé toutes les librairies via synaptic et adesklets aussi. J'ai DL YAB (Yet Another Bar) et j'ai ca : [i]tomtom@barad-luin:/mnt/config/programmes/adesklets/yab-0.0.2$ [/i][b]ls -l[/b] total 56 -rw...
I absolutely agree with bennylope's answer -- make sure you have a Django project running before trying to incorporate django-cms. Once you do have the skeleton django project up, you'll probably want to add this to the bottom of your root urls.py file: urlpatterns += patterns('', url(r'^', include('cms.urls')), ) ...
Gordon Tillman has a wiki page up on how to mix Django content into a CherryPy site. It's easy and probably works, but please don't do it anymore. We're officially going to deprecate the wsgiapp Tool because 1) it doesn't conform to the WSGI spec (and cannot be fixed to do so), and 2) there's a better way to mix conten...
Aeris API The Aeris API is one of the most complete and advanced weather APIs available and quickly gives you access to many different types of weather information. Not only is Aeris weather content easy and flexible to use, but our set of mobile and web toolkits integrate with our core API to provide you with everythi...
I am here and waiting. In mathematics, you don't understand things. You just get used to them.I have the result, but I do not yet know how to get it.All physicists, and a good many quite respectable mathematicians are contemptuous about proof. Offline >>> def pi(n): s = Decimal() for i in xrange(0,n+1): s += ((-1**...
Решил недавно изучить WPF и столкнулся с тем, что у меня кнопочка в приложении выглядела в классическом стиле Windows, а не как те красивости, что можно увидеть в туториалах в интернете. Стал разбираться... Как оказалось, в WPF есть несколько стандартных тем: Aero (как в Windows Vista), Luna (Windows XP), Royale (Windo...
It's hard to track why your computer crashed and restarted, but you can e-mail your logs with the notification e-mail. For advanced monitoring, I suggest trying out Zabbix, NagiOS or Cacti.However, here's a simple Python 2.7 script for sending an e-mail with a command "./script.py username_for_gmail path_to_letter": #!...
I'm trying to create a script in which I can set the background color gradient with a colorpicker and are using 2 functions to create this, but... Is it possible to do this within 1 function? This is what i have so far: From: <input name="backfrom" id="backfrom" class="color" onchange="bcolorFrom(this.color);" style="w...
Kanor Re : Idée projet Logiciel RDM Eurocodes Structures Bois, Acier, Béton... D'aprés ce que je comprend Salome utilise code_aster Sinon pdf qui me semble intéressant http://calcul.math.cnrs.fr/Documents/Journees/dec2006/aster.pdf ça date un peu 2006 Hors ligne ossatureLibre Re : Idée projet Logiciel RDM Eurocodes Str...
I am writing a script that looks through my inventory, compares it with a master list of all possible inventory items, and tells me what items I am missing. My goal is a .csv file where the first column contains a unique key integer and then the remaining several columns would have data related to that key. For example...
Bu proje kullanıcıların kablosuz hesaplarını kendi başvuruları ile otomatik oluşturmak için oluşturuldu. Yapılan başvurulara e-posta onayı gönderme prensibiyle çalışmaktadır. Eposta hesaplarına gelen bağlantıya tıklandığında yapılan istekler gerçeklenmekte ve bilgilendirme epostası kullanıcıya gönderilmektedir. Kurulum...
Alex0000 Déconnexion sur Batterie [Samsung] Bonjour à tous J'ai un problème récurrent avec mon wifi quelque soit l'os ou la version de celui-ci. Après un petit temps sur batterie ( entre 5min et 1h) il se déconnecte de plus le gestionnaire de connexion ne montre plus aucun wifi. Sur Windows, l'outils de résolution de p...
November 12, 2010: An Introduction I really like funcparserlib. By far my favorite parser and have used it in numerous projects over the years. But it took me forever to "get". The author wrote two tutorials, the Official Tutorial and the Bracket Tutorial. Both of these are solid, but here is my take on the library. Th...
I have the following Python script, chmod +x'd. When I run this script from the command line and Putty has not been started, it launches putty: #!/usr/bin/env python from __future__ import print_function import shlex import subprocess output = subprocess.check_output(['ps', 'aux']) found = False for line in output.spli...
I read this: "The ubuntu-support-status command will print the exact status of your system. " but when i try i get this: $ ubuntu-support-status Traceback (most recent call last): File "/usr/bin/ubuntu-support-status", line 105, in <module> (still_supported, support_str) = get_maintenance_status(cache, pkg.name, su...
bipede Re : Besoin de testeurs pour Pap'rass Merci bipede Il n'y a pas de quoi Ca fonctionne pour ton scanner ? Hors ligne jeremix Re : Besoin de testeurs pour Pap'rass Oui, ça fonctionne, mais je retape la valeur voulu à chaque fois (au cas où ça provoquerais un problème), car cela m'affiche 2 résolutions différentes....
yanshee Breezy: sérieux problèmes au démarrage de Gnome Bonjour à tous, Voilà, je viens de passer d'Hoary à Breezy, et j'ai un énorme problème avec Gnome: quand j'arrives sur l'écran de login, je me logges normalement, il commence le démarrage de gnome, avec la bannièere de chargement et la p'tite musique, et puis boum...
Author dllu Submission date 2011-06-14 21:31:13.394125 Rating 7509 Matches played 4982 Win rate 78.1 Use rpsrunner.py to play unranked matches on your computer. #This is a DNA werfer. It werfs DNA! import random number_of_predictors = 36 #yes, this really has 36 predictors. predictors=range(number_of_predictors) for i ...
In my last Python post, I learned how to get a single webpage from one of my old blogs and convert it from HTML into Markdown. My objective, if you recall, is to take a list of posts from my old blog and convert them into an EPUB. I chose this task mainly to give me a reasonable goal while learning python, but I’m also...
Explaining Redis is tough, it’s easy to say “a data structures server” or “memcached on steroids” or something more jargon filled. It’s not exactly a key value store, it’s definitely not a relational or document-oriented database. The biggest selling point of Redis is that usually as programmers we have to bend our dat...
I created 3 virtual interfaces with different MAC addresses all linked to the same physical interface. I see that they can successfully arp for the gateway (gw) and they can ping (the request is coming in the packet capture in Wireshark). However the ping utility does not count the responses. Does anyone knows the issu...
I have the following dictionary: student_loan_portfolio = { 'loan1': {'rate': .078, 'balance': 1000, 'payment': 100, 'prepayment': 0}, 'loan2': {'rate': .0645, 'balance': 10, 'payment': 5, 'prepayment': 0}, 'loan3': {'rate': .0871, 'balance': 250, 'payment': 60, 'prepayment': 0}, 'loan4': {'rate': .0842...
From PEP 328, http://www.python.org/dev/peps/pep-0328/#rationale-for-relative-imports you should actually avoid naming a python module starting with a "dot" because it means relative imports in Python. If you really insist on doing so, you can but you will have to use the imp module. Example usage:- import imp with ope...
what is closure and its correspondence example ? I have research a lot and could not understand. Please explain in generic programming language concept aspect and specific programming language aspect. Please help. Thanks. what is closure and its correspondence example ? I have research a lot and could not understand. P...
I have a server side code to process uploaded binary files: class UploadHandler(webapp.RequestHandler): def post(self): file_name = files.blobstore.create(mime_type='application/octet-stream') with files.open(file_name, 'a') as f: f.write('data') files.finalize(file_name) ...
How do I create a GUID in Python that is platform independent? I hear there is a method using ActivePython on Windows but it's Windows only because it uses COM. Is there a method using plain Python? "The uuid module, in Python 2.5 and up, provides RFC compliant UUID generation. See the module docs and the RFC for detai...
Recently I was DMing a game, and my players ran into a giant lizard. After they defeated it, they asked if they could skin the lizard and make it into armor. I basically just made it up on the fly; all that happened was they made a huge mess. What are the rules for skinning animals, if there are any? There are no offic...
my first try, goes bad :-( I ran (as the doc say) python manage.py startapp polls but, I obtain just this: Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/alwaysdata/python/django/1.5/django/core/management/__init__. py", line 453, i...
#0 Re : -1 » contrôle parental : Timekpr / Nanny » Le 27/12/2010, à 19:32 Karos Réponses : 41 Je suis sous UBUNTU avec nanny, navigateurs installées firefox et prism (+evolution ???) J'ai une plage horaire de 9h (en vert) sur l'onglet " Navigateur Web". J'ai mis une limitation de 0.5 heures mais cela ne bloque rien au ...
Today I did a fresh install of ubuntu 12.04 and went about setting up my local development environment. I installed mysql and edited /etc/mysql/my.cnf to optimise InnoDB but when I try to restart mysql, it fails with a error: [20:53][tom@Pochama:/var/www/website] (master) $ sudo service mysql restart start: Job failed ...
Try using cv2.DescriptorMatcher_create for that. For instance, in the following code I am using pylab, but you can get the message ;) It computes the keypoints using GFTT, and then uses the SURF descriptor and the Brute force matching.The output of each code part is show as header. %pylab inline import cv2 import numpy...
We have a need to create SQLAlchemy classes to access multiple external data sources that will increase in number over time. We use the declarative base for our core ORM models and I know we can manually specify new ORM classes using the autoload=True to auto generate the mapping. The problem is that we need to be able...
My algorithm is like: data is stored as: data = [record1, record2, ... ] where record1 is [1, x1, x2 ..., x_m] m feature values for that record theta is parameter of linear regression function, theta is vector of size m+1 y is true label, again array of length, len(data). (y[0] is true value for record 0) Linear r...
I'm writing an app using Gtk/PyGI, and I need to create a sidebar with a Nautilus-like tree. However, Gtk refuses to cooperate with me. I tried both with Glade and GtkBuilder (creating the GtkTreeStore with one gchararray column) and with this code: def create_widgets(self): self.hbox = Gtk.Box(orientation = Gtk.Orie...
luc765 Re : Synthèse vocale SVOX Pico Merci à frafra et tuxmuraille, pour votre travail. J'utilisais espeak avec mbrola, la qualité de SVOX est nettement meilleure J'ai installé gSpeech sur Lucid via la compilation pour SVOX. Tout est parfait. Dans l'utilisation est-il possible de modifier la vitesse de lecture par un ...
is there a builtin function of Python that does on python.array what argsort() does on a numpy.array? I timed the suggestions above and here are my results. First of all, the functions: def f(seq): # http://stackoverflow.com/questions/3382352/equivalent-of-numpy-argsort-in-basic-python/3383106#3383106 #non-lamb...
I have two scripts. Script A has a bunch of functions with variables in them, that need to be defined in Script B. For example, this is basically what I need to do in script A and B A.py: health = {p1:"100", p2:"100"} The rest of the script requires that dictionary to be defined. B.py: p1 = raw_input() p2 = raw_input(...
Posts tagged python Posts tagged python Below is a typical job: @hgmq.job('async_job') def async_job(msg): # Do something usefull here actor = Actor.objects.get(name=msg["name"]) msg = { "results": [fact.title for fact in actor.facts.all()] } hgmq.send_job('core/back', 'recv_async_job', msg)...
This project is archived and is in readonly mode. psycopg went psycotic without error set Reported by Gavin Panella | December 7th, 2011 @ 12:18 PM In Storm https://launchpad.net/storm wehave various tests for behaviour when a connection to the database is broken. One of themis breaking with "psycopg went psycotic with...
I'm using celery with django and rabbitmq to create a message queue. I also have a worker, which is originating from a different machine. In a django view I'm starting a process like this: def processtask(request, name): args = ["ls", "-l"] MyTask.delay(args) return HttpResponse("Task set to execute.") My task i...
I'm currently trying to parse through a text file containing a number of Facebook chat fragments. The fragments are stored as below:- {"t":"msg","c":"p_100002239013747","s":14,"ms":[{"msg":{"text":"2what is the best restauran t in hong kong? ","time":1303115825598,"clientTime":1303115824391,"msgID":"1862585188"},"from"...
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...
I found a recipe in English that mentions a "pinch" of something. English is not my first language, and Google shows that "pinch" has many meanings. Do I have to pinch it with my fingers, or can i find a suitable amount of milliliters to use? A 'pinch' is the amount of powder/whatever that can be trapped between one's ...
Seeking to improve upon my high score 'module' code. It saves users' high score in a pickle database and if needed prints out the current scores in the database. import pickle import os global high_scores def setup_scores(): global high_scores high_scores = {} if os.path.isfile('highscores.pkl'): wi...
I am setting up a new MySQL Slave and I can't start mysql after replacing the datadir (/db/mysql) with the innobackupex backup from the master. I have given the directory the permissions with: sudo chown -R mysql:mysql /db/mysql I'm on Ubuntu 12.04 and MySQL 5.5.24 Output of syslog: Oct 29 11:30:58 pling kernel: [5927...
AnsuzPeorth Re : [Gm9diaCenter] Interface graphique pour mediacenter neuf/sfr Re, La suppression des logs se fait au démarrage de l'appli, pas du mediacenter ! (en tout cas chez moi ça marche). Pour le systray, je t'ai ajouté une petit image clicable gnome J'ai ajouté la possibilité de créer/supprimer les lanceurs depu...
I'm working on an app that on logout I'm deleting the sqlite file and upon log in I'm creating a new one but after logging back in and while getting the data from the server I'm encountering a mystery issue that I could not fix since 2 weeks: 2013-04-29 07:05:09.107 APP[85958:1cd03] CoreData: sql: SELECT 0, t0.Z_PK, t0...
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... ~24 users here now News and links for Django developers. Exactly what are class-based views? (self.django) submitted...
I have a 2-d numpy array (MxN) and two more 1-d arrays (Mx1) that represent starting and ending indices for each row of the 2-d array that I'd like to sum over. I'm looking for the most efficient way to do this in a large array (preferably without having to use a loop, which is what I'm currently doing). An example of ...
Alex0000 Réponses : 0 Hello, Je part d'ici peu en pays plus ou moins démocratique ( plus moins que plus ... ) et m'était mis en tête d'installer un VPN sur mon dédié pour surfer un peut plus tranquillement. J'ai suivis scrupuleusement ce tutoriel. Connexion impeccable, j'ai accès a tout mes service en local mais pas de...
Programming Web Services for WebLogic Server Access control security answers the question "who can do what?" First you specify the security roles that are allowed to access a Web Service; a security role is a privilege granted to users or groups based on specific conditions. Then, when a client application attempts to ...
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...
in the server contain a large log file. i want to achieve recently 5 days log data. here is part of log file Sat Jun 2 03:32:13 2012 [pid 12461] CONNECT: Client "66.249.68.236" Sat Jun 2 03:32:13 2012 [pid 12460] [ftp] OK LOGIN: Client "66.249.68.236", anon password "gxxglxxxxt@google.com" Sat Jun 2 03:3...
I did a Django Sync DB a couple of times on a brand new django project which didn't have its DATABASES set yet. The Unhandled exception part should be investigated. Python interactive window. Type $help for a list of commands. Executing manage.py syncdb ImproperlyConfigured: settings.DATABASES is improperly configured...
Problem Statement2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest number that is evenly divisible by all of the numbers from 1 to 20? NotesThis is essentially a requirement to compute the least common multiple for the values 1 through 20. We...
Basic explanations Unicode is a standard that defines several things. Here is a handful of some most important facts about it: There are thousands of “code points” that represent characters in various alphabets, numbers, punctuation, various symbols, etc. Each of these has a name and a number. Here are some examples: L...
If you know people interested in programming language theory, you willhave heard of the monad. Especially in Haskell, they are usedextensively. When trying to find out what they are, exactly, theaverage programmer will have a distinct Matrix feeling, though: Youcan not be told what a Monad is! Lots and lots of websites...
A few days ago, I have published a tutorial on building a Connector/C++ client application on Windows using Visual Studio. Its time for a Linux How-To. My I-Do-Everything (IDE) choice on Linux is NetBeans 6.5. NetBeans is open-source and free. A version with C and C++ support is lightweight (24MB download) and the code...
#2626 Le 05/01/2013, à 15:18 rvhm Re : TVDownloader: télécharger les médias du net ! bjr j'ai commencé à mettre les dépendance de tvdownloader il me manque "libkrb53 (>= 1.6.dfsg.2)" ou je pourrais le trouver ? merci Hors ligne #2627 Le 06/01/2013, à 18:23 rvhm Re : TVDownloader: télécharger les médias du net ! bonjour...
bowmore Problème avec une HP Color LaserJet 4550N branchée en Ethernet . Bonjour à tous. J'essaye depuis quelques jour de faire fonctionner une imprimante HP Color LaserJet 4550N branchée en Ethernet sur un PC sous Lubuntu 12.04. N'ayant pas de port USB sur l'imprimante, ni de port série sur ma carte mère, je n'ai que ...
I'm using Ubuntu 12.04. Now up until minutes ago XSensors was working fine. I had to restart due to some updates and it stopped working. By that I mean that it only displays one temperature (the other tab is just blank): Here is my the output from $ sensors, to show that there is other data being detected: k10temp-pci-...
The first step to performing any successful security engagement is reconnaissance. How much information one is able to enumerate about given personnel (for social engineering engagements) or systems can often impact the effectiveness of the engagement. In this post, we will discuss what Open Source Intelligence (OSINT)...
malbo [Tuto] identifier si on est dans un système UEFI ou Bios ATTENTION : CETTE MÉTHODE D’IDENTIFICATION EST OBSOLÈTE : IL FAUT UTILISER LA PROCÉDURE DE LA DOC : http://doc.ubuntu-fr.org/efi#identifier … n_mode_efi Le problème se pose pour des PC achetés en 2011 (et +) pour ceux qui souhaitent faire cohabiter Windows ...
When you need data to be sorted beyond sort's capability, a common approach is to pre-process the data to prepend a sort key, then sort, and finally remove the extra sort key. For example, here, add a 0 if a line starts with b, a 1 if a line starts with d, and a 2 otherwise. sed 's/^b/0&/; t; s/^d/1&/; t; s/^/2/' | sor...
I can understand that if I join individual queries that are "individually fast" the combination may become slow because the default execution plan may be non-optimal. However when I know the number of rows for one query is very small I think I should be able to use hints to control the joins. select cj.a, cv.b from (...
gio.LoadableIcon — Interface for icons. class gio.LoadableIcon(gobject.GInterface): def load(size=0, cancellable=None) def load_async(callback, size=0, cancellable=None, user_data=None) def load_finish(res) def load(size=0, cancellable=None) an integer optional gio.Cancellable object, None to ignore. a 2 t...
Dyn ≡ Menu Products Solutions Resources Support About Contact Us I am unable to access any equipment on my network from outside my router. For this question I will concentrate on my Q-See QC40198-814-5 DVR. I have assigned it a static IP to the DVR. I have no problem accessing the DVR within the LAN, and can surf the i...
Recently I was DMing a game, and my players ran into a giant lizard. After they defeated it, they asked if they could skin the lizard and make it into armor. I basically just made it up on the fly; all that happened was they made a huge mess. What are the rules for skinning animals, if there are any? There are no offic...
I'm using Ubuntu 12.04 with python 2.7.3 and PyGObject and I'd like to develop plugins for Gedit in python. I found a simple looking tutorial for this sort of thing here. According to the tutorial, I need the Gedit module to interact with the plugin interface: from gi.repository import GObject, Gedit I keep getting an...
This update of pidgin fixes a stack-based buffer overflow in the MXit protocol which could have potentially been exploited by remote attackers to execute arbitrary code in the context of the user running pidgin. Updated packages are available from download.opensuse.org. SUSE Security Update: Security update for pidgin,...
I try to add a login functionality to the web.py todo example. This is my code: """ Basic todo list using webpy 0.3 """ import web import model ### Url mappings urls = ( '/', 'Index', '/login', 'Login', '/logout', 'Logout', '/del/(\d+)', 'Delete', ) ### Templates render = web.template.render('templates'...
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...
I got this answer wrong. I thought it was 55% but it seems the answer is different. Please can you have a look at this and tell me where have I gone wrong and it should be. Thanks in advance. Q) Approximately what proportion of the total number of seats in all Buses and Trains are empty? EDITED - I FORGOT TO INCLUDE MU...
This is not a math answer, but if you're only interested in the results I guess my approach is much simpler to understand. I simply let the computer calculate the numbers. Simple Python solution This one works, but is slow: def isAcceptable(number): s = str(number) for i in range(len(s)-1): for j in ran...
If you review the sidebar "wxPython Window Layout," you'll see a number of choices available, but we have chosen to use the brute-force mechanism for the Edit Transaction dialog: # Create some controls wxStaticText(self, -1, "Date:", wxDLG_PNT(self, 5,5)) self.date = wxTextCtrl(self, ID_DATE, "", ...
Thoughts on Whatever back to all thoughts The OpenSSL heartbleed bug was a serious kick to the Internet's collective ass. This video provides a quick overview if you want the details. In summary, an attacker could craft a payload with a fake size (up to 64k) and trick openssl into sending a random chunk of server memor...
I've often wondered how hard it is to output a PNG file directly, without using a library or a standard tool like pnmtopng. (I'm not sure when you'd actually want to do this; maybe for a tiny embedded system with a web interface.) I found that constructing a simple, uncompressed PNG does not require a whole lot of code...
#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 ####### ...
I have written some code which works without errors. The code uses MySQLdb for (frequent) database access and uses 4 different databases. Also a couple of log files are generated and logging module is used. The real worry is that when running Valgrind, i get the following ==7840== LEAK SUMMARY:==7840== definitely lost:...
While developing iOS apps, it can sometimes be useful to temporarily redefine the default behavior of your app for convenience or debugging purposes. For example, maybe you’re working on a first-run feature—a tutorial, for instance—that users should only see the first time they open your app. In production, you might w...
I've been trying to get the unicode character for a given keycode, but i cannot figure out why i have to give so many parameters. From MSDN: int WINAPI ToUnicode( _In_ UINT wVirtKey, _In_ UINT wScanCode, _In_opt_ const BYTE *lpKeyState, _Out_ LPWSTR pwszBuff, _In_ int cchBuff, _In_ ...
The Flask Mega-Tutorial, Part IV: Database The goal of the tutorial series is to develop a decently featured microblogging application that demonstrating total lack of originality I have decided to call microblog. Here is an index of all the articles in the series that have been published to date: Part I: Hello, World!...
Image and ImageItem An ImageItem object is an image component that contains a reference to an Image object. First, let's briefly introduce the Image class. We will revisit it again later when we talk about low-level APIs. The Image class is used as a graphical image data holder. Depending on how they are created, image...
I've recently updated to the current version of Ubuntu, 13.04 and Python 2.7.4. Since then I have problems importing the gobject module and dunno what to do to fix it. I'd like to use dreampie which currently fails at startup with the ImportError below. Here are more details: kiri:/home/kiri% uname -a Linux megfigyelok...
The way web.py does this for 301 and other redirect types is by subclassing web.HTTPError (which in turn sets web.ctx.status). For example: class MultipleChoices(web.HTTPError): def __init__(self, choices): status = '300 Multiple Choices' headers = {'Content-Type': 'text/html'} data = '<h1>M...
tonyo adesklet au premier plan Salut, j'aimerais placer un desklet adesklet au premier plan, c'est-à-dire au-dessus d'un panel gnome. Malheureusement, je ne vois pas comment faire... Il semble que cette option ne soit pas dans les options générales de config des desklets, mais je suis prêt à trifouiller un peu le code ...
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 trying to create a simple CRUD with ModelForm. It works fine except that every time I edit, saving creates a new instance of the data. So i edit and get an extra row in DB instead of an updated one. I am at a loss as to how it knows to save an existing charity as it does not store the PK (id) as a hidden field in ...
Introduction A while back, I published a post on the Raidersec blog demonstrating how to perform a deauthentication attack using Python and Scapy. I enjoyed writing the post, since I got the opportunity to learn in-depth about how different wireless attacks work, beyond just learning how to exclusively use the aircrack...
I'm creating a webapp with this combination of tools. I'm authenticating with App Engine in the following manner: class googleLogin(webapp.RequestHandler): def get(self): callbackURL = 'http://%s/googleLoginCallback' % getHost() #Create a client service gdClient = gdata.docs.service.DocsService() gdat...
Edit: ok, now that I have more than 5 minutes to spare I can clean this up a bit and add a wikipedia reference. I'm going to write A(n,k) for $A_n(k)$. First of all, note that it's easy to see that A(n,k) = A(n,-k) by induction on n, and that the A(n,k) are zero unless -n <= k <= n. So we may as well just start computi...
Generally, in the explicit schemes of differential method, Courant number is an important number which should be less than 1 in order to assure the stability. However, if the Courant number is too small, much computation time will be lost. So the Courant number could be one of those important parameters affecting compu...
This game is similar to a Dungeons and Dragons game. How could I improve the efficiency of the program? For example, where can I add functions, records etc? This is for a school Controlled Assessment so any help would really be appreciated. import random play1 = True str1 = int(input("Enter a value for strength")) pri...
In installed python-virtualenv, because this question said I should use virtualenv to install pygame. However, I'm not really sure how that's accomplished. What I did (following these instructions): virtualenv --no-site-packages --distribute -p /usr/bin/python3.3 ~/.virtualenvs/pywork3 --no-pip And then I don't know w...
#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...
function [A , c] = MinVolEllipse(P, tolerance) [d N] = size(P); Q = zeros(d+1,N); Q(1:d,:) = P(1:d,1:N); Q(d+1,:) = ones(1,N); count = 1; err = 1; u = (1/N) * ones(N,1); while err > tolerance, X = Q * diag(u) * Q'; M = diag(Q' * inv(X) * Q); [maximum j] = max(M); step_size = (maximum - d -1)/((d+1)*(max...
my app experiences a crash when the sqlite database is updated the first time. Reloading the app, it works fine from then on. I'm guessing this has to do with the onUpgrade function then. I can't seem to locate where the problem is, any advice very appreciated. Thanks in advance. DatabaseHelper: public class DatabaseHe...
malbo [Tuto] identifier si on est dans un système UEFI ou Bios ATTENTION : CETTE MÉTHODE D’IDENTIFICATION EST OBSOLÈTE : IL FAUT UTILISER LA PROCÉDURE DE LA DOC : http://doc.ubuntu-fr.org/efi#identifier … n_mode_efi Le problème se pose pour des PC achetés en 2011 (et +) pour ceux qui souhaitent faire cohabiter Windows ...