text stringlengths 256 65.5k |
|---|
After I turned down my computer and came back, steam suddenly needed to update, and the games are gone.
I thought the paths to the actual files are gone, as the amount of space that the games take up my partition are still there, as shown by GParted.
So, I decided to reinstall Steam, which would only affect the launche... |
App Engine’s Python documentation is sometimes fuzzy on details around caching and cache headers. Here’s a quick overview for those new to the platform. App Engine apps can serve a mix of static and dynamic content. For each, I’ll discuss App Engine’s default behavior and then describe levers that you can pull to custo... |
spyke
Re : La communauté du jeux sous Linux http://www.JeuxLinux.fr
jerhum oki mais alors je ny arrive pas a les faire tourner justement est ce normale comme wolfenstein , quake4 etc.....
Hors ligne
foxylechou
Re : La communauté du jeux sous Linux http://www.JeuxLinux.fr
il faut autoriser le fichier a être exécuter dan... |
I'm quite new to Django & Tastypie. I would like to return only one of the objects from the query. I've tried almost everything and cannot seem to find the solution. Here is my code below:
class ProfileResource(ModelResource):
person = fields.ForeignKey(UserResource, 'user', full=True)
class Meta:
queryset = P... |
ddg.velamp external
This is probably a silly question but:
Where do I put this external in Max6? I’ve placed it everywhere and have even made an ‘externals’ folder in ‘file preferences’ and pointed to it but Im still having no luck. Putting it in ‘patches’ or ‘examples’ which I understand is the default directory to pl... |
I was wondering the same the other day, what I found on internet was that the best way to make a search with like and text is 'WORD%' with the % at the end (text that end with word will not be found) if you can't use that your query will go row by row and word by word, reading all the text of each result to find the ma... |
I've been working on creating a subclass of db.Model that is automatically cached, i.e.:
instance.put would store the entity in memcache before persisting it to the datastore
class.get_by_key_name would first check the cache, and if missed, would go to the datastore to retrieve it and cache it after retrieval
I develop... |
#1476 Le 27/06/2013, à 20:53
The Uploader
Re : /* Topic des codeurs [8] */
Je ne suis pas sûr de comprendre la question pour le coup.
En fait, je rajoute ceci :
position: relative;
À ce code de app/assets/stylesheets/application.css :
#preview {
float:left;
width: 46%;
height: 100%;
border-left:5px solid gray;... |
pandageek
MCedit pour minecraft
bonjour a tous,
je joue à minecraft version linux sous xubuntu et j'aimerai pouvoir utiliser le logiciel MCedit qui sert a éditer les cartes du jeu.
or il ne fonctionne pas malgré mes tentatives :
panda@panda-USB:~/Bureau/MCEdit-stable33-linux$ ./mcedit.sh
RuntimeError: Bad magic number... |
Getting DBUS Messages from Networkmanager (Python)
Dennis Guse
I had some spare time and so I started playing with DBUS. I was annoyed that after NetworkManager established a connection I always start the same programs like ekiga, pidgin, firefox and evolution. So I wrote a small python program that start software if t... |
The following table is designed to make layout a simpler paper and pencil exercise. It is probably best to print it out (using NON PROPORTIONAL fonts) and adjust the numbers until you are happy with them.
Mount point is what directory you wish to mount a partition on or the actual device. This is also a good place to n... |
Ayu
Grub ne se lance pas
Bonsoir,
J'ai installé windows 7 et Xubuntu 11.10 sur un nouveau pc avec cette configuration:CM: Asus P8H67 B3Processeur: i5 2500kDD: 1TO 7200 RPMRAM: 2x4GOCG: Gigabyte GeForce GTX 560
Mais je boot toujours sur windows et Grub ne se lance pas
j'ai essayé de réinstaller grub depuis une session l... |
I'm trying to trawl newsgroup to test some text-based grouping algorithms, fetching batches of newsgroup headers and sticking them into a SQLite database. The database is about as plain as it gets, with text columns for all the data, and the header data as fetched by Python's nntp library always gives 8 values per head... |
I've finally found why my Google Chrome is so slow. And I've found these 2 posts.The first on Google Chrome forum and the second one here.The solution suggested in the second post requires a modification of /etc/modprobe.d/aliases, but on my Ubuntu 11.04 I don't have such a file.
None of the resources i found would wor... |
The Date Helper primarily creates select/option tags for different kinds of dates and times or date and time elements. All of the select-type methods share a number of common options that are as follows:
:prefix- overwrites the default prefix of “date” used for the select names. So specifying “birthday” would give birt... |
Extending GlusterFS with Python
Although this behavior makes sense for many applications, the performance impact for many PHP applications can be severe. Without negative-lookup caching, you're likely to search half of those directories in vain before finding the one that contains each include file, every time the incl... |
sam7
mon multiboot & UbuntuStudio Gnome Voyager 10.04
bonjour, pour faire suite à http://forum.ubuntu-fr.org/viewtopic.php?id=387219 (installation d'un nouveau multiboot)
je viens d'installer Gnome-Voyager 10.04 basé sur Ubuntu 10.04 TS (personnalisation réalisée par rodofr http://forum.ubuntu-fr.org/viewtopic.ph … 5#p... |
Installing a Wiki on Your iBook
by Giles Turnbull
06/05/2003
The following conversation between Mac DevCenter writer Giles Turnbull and software developer Matt Hunt (a FreeBSD fan who's very happy with the way Mac OS X turned out) walks you through a Wiki installation on Mac OS X. It's really easy to follow, and we hop... |
NOTE: This github page hosts the development version, but not the distribution version. To get and install the current stable version of geeneus use pip
sudo pip install geeneus
**The command above will install the current stable release. **
geeneus is designed as a simple to use, robust and reliable Python API to obt... |
If you happen to be one of about 4 people that actually reads this, you may notice I added a search box to the sidebar. What's far more interesting is the code behind it. I posted a snippet containing the code I wrote to accomplish this. Basically, it's just some convenience code to avoid having to drop down to SQL or ... |
I am using ubuntu with libreOffice. I have installed unoconv for convert a *.odp file to *.pdf. When i run the command unoconv -f pdf myfile.odp from terminal then it works very fine. I want to do the same thing with using PHP shell_exec() method. So, I wrote the following code:
$output = shell_exec('unoconv -f pdf tes... |
This question already has an answer here:
Question:
(34 O 5 O 6 O 8 O 9 O 1) O 2=2008
Replace the Symbol of "O" to "+" or "-" or "*",and make the expression is true.
My solution:
info = {{"+"}, {"-"}, {"*"}};
For[a = 1, a < 4, a++,
For[b = 1, b < 4, b++,
For[c = 1, c < 4, c++,
For[d = 1, d < 4, d++,
... |
brital
creer un explorateur de fichiers avec python 3
Bonjour,
Je voudrais programmer un "petit" explorateur de ficher avec python et TKinter. Je suppose que je dois utiliser le module os de la bibliothèque standard. Mais je cherche un tuto ou un exemple en français qui me montrerais la marche à suivre...
Hors ligne
sh... |
Virtualici
Re : [Tuto] - Ma personnalisation Xubuntu (et autres variantes)
j'ai tout tenté ! au mieux j'ai ça : ):
[sudo] password for boubou:
Sorry, try again.
sudo: 3 incorrect password attempts
boubou@boubou-M51SE:~$ *******
******* : commande introuvable
boubou@boubou-M51SE:~$
les : ******* c'est mon pass.
Hors l... |
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
En ligne
ossatureLibre
Re : Idée projet Logiciel RDM Eurocodes Struc... |
Have you ever wished that you had a sweet little API to generate HTML in Python? Dominate is probably what you are looking for.
Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API.
Now, I’m a self admitted HTML purist, but look at how the dominate API works.
from dominat... |
I want to find out which sql agent jobs failed in last 24 hours... How can I find it using TSQL for SQL 2000?
Regards Manjot
I want to find out which sql agent jobs failed in last 24 hours... How can I find it using TSQL for SQL 2000?
Regards Manjot
SELECT
j.[name]
, jh.run_date
, jh.run_time
, jh.sql_severit... |
I've started with matplotlib a week ago; I'm trying to plot the function
where
I changed my code for
from math import*
import numpy as np
import matplotlib.pyplot as plt
def phi(x):
return min(ceil(x) - x, x - floor(x))
n=50
def f(x):
return sum([phi(x*2.0**i)/(2.0**i) for i in range (1,n)])
t = np.aran... |
I once got started on a PyGtk and Glade tutorial but never finished it. Recently I saw that PyGtk is being depreciated in favor of using introspection at https://wiki.ubuntu.com/MeetingLogs/appdevweek1104/GObjectIntrospection and https://wiki.ubuntu.com/MeetingLogs/appdevweek1104/PyGI. I decided to try learning more of... |
A different non-regex approach from the others:
>>> import string
>>> from itertools import groupby
>>>
>>> special = set(string.punctuation + string.whitespace)
>>> s = "One two three tab\ttabandspace\t end"
>>>
>>> split_combined = [''.join(g) for k, g in groupby(s, lambda c: c in special)]
>>> split_combined
[... |
I'm trying to deploy my first django app on heroku and have been following the guide on the Heroku site. I get all the way to this step of checking to see if the web process is up and it looks like like the app is crashing:
(venv)Jonathans-MacBook-Air-2:myportfolio jonathanschen$ heroku ps
=== web: `python ./manage.py ... |
I had the following code that works fine with python 2.7+
class Worker(threading.Thread):
def __init__(self, group=None, target=None, name=None,
args=(), kwargs=None, verbose=None, onCompleteCb=None):
self.__onCompleteCb = onCompleteCb
self.__name = name
super(Worker, self).... |
Use crons to schedule tasks to run periodically at specific times and dates.
Crons can be triggered as often as every minute, and there’s no limit to the number of functions you can register as crons.
Everytime your cron is triggered by its schedule, a job is created and added to the queue. This does not mean that your... |
One of the big topics in the BigData community is Map/Reduce. There are a lot of good blogs that explain what Map/Reduce does and how it works logically, so I won’t repeat it (look here, here and here for a few). Very few of them however explain the technical flow of things, which I at least need, to understand the per... |
Okay, here is the problem:
Certain questions contain more than one page's worth of answers. Given a sort method and an answer id, how can we figure out which page the answer is on?
Any suggestions are welcome.
These are two simple methods in meta-language:
1. Pulls a pagesize number of answers, page after page, checkin... |
Three months ago, I wrote a post detailing the process of writing a calculator using a parsing library. The popular response, however, was that readers are far more curious about seeing a calculator written from scratch, with the batteries included but nothing else. I figured, why not?
Writing a calculator is simple, i... |
utaku_ryukko
[RESOLU]Problême avec Rhythmbox et Clementine - Lecture de CD Audio im
Bonjour,
J'ai un petit souci. Je viens de remarqué qu'il m'est impossible de lire un CD audio quelque soit le logiciel de lecture que je veux utiliser.
Il m'est possible de copier via Brasero et de ripper via SoundJuicer.
Quand j'insère... |
mao-40
Re : TBI + wiimote + ubuntu
En ce qui concerne 'gtkwhiteboard.ico', ce n'est pas l'image de calibration je pense, puisque le logiciel demande de calibrer l'écran avec les 4 coins du bureau et après cela fonctionne bien.
Ah ok, j'essaierai au demain au vidéo-projcteur.
Dernière modification par mao-40 (Le 04/02/2... |
#1476 Le 27/06/2013, à 20:53
The Uploader
Re : /* Topic des codeurs [8] */
Je ne suis pas sûr de comprendre la question pour le coup.
En fait, je rajoute ceci :
position: relative;
À ce code de app/assets/stylesheets/application.css :
#preview {
float:left;
width: 46%;
height: 100%;
border-left:5px solid gray;... |
I have a lenovo y460 laptop with hybrid graphics. it's a nvidia optimus card and a integrated intel graphics.
I'm only using the integrated chip and i don't want use the nvidia card
the problem occur in ubuntu 10.04 and ubuntu 11.10
i can not work when the flickering occur .
that all right in windows 7 so i think it's ... |
Sure thing. It is a bit tricky to do this with LINQ but certainly possible using only the standard query operators.
UPDATE: This is the subject of my blog on Monday June 28th 2010; thanks for the great question. Also, a commenter on my blog noted that there is an even more elegant query than the one I gave. I'll update... |
Code: Public Sub ProjectViewCmd(ID As Long, Stat As String) Dim i As Integer Dim MyBox As String 'if it is a project lead If Stat = "Active Lead" Or Stat = "Dead Lead" Then DoCmd.OpenForm "Project Leads", acNormal If Stat = "Dead Lead" Then Forms![Project Leads].Controls(BothOption).Value = True Forms![Project Leads].F... |
V druhém díle našeho obludária si ukážeme další dva esoterické programovací jazyky. Prvním bude Single Four a ten druhý se jmenuje AAAAAAAAAAAAAA!!!!. Navíc se potom můžete zúčastnit malé soutěže, kterou najdete na konci článku.
Single Four
Single Four je programovací jazyk, který navrhla Starla Insigna, programátorka ... |
I'm trying to go with-the-grain using Django TastyPie to update my models. I have an Identity model, acting as a wrapper around default Django user model:
class Identity(ProfileBase):
user = models.OneToOneField(User, related_name='identity')
avatar = models.ImageField(upload_to=avatar_upload_path, blank=True,
... |
aeacides
Re : Ultimate Smash Friends: un smash bros like en python
Kewl! Bon boulot! De mon côté il me reste une semaine et demi de labeur, et après je devrais pouvoir m'y mettre :- )
@+
http://www.q-be.ca
Hors ligne
tshirtman
Re : Ultimate Smash Friends: un smash bros like en python
cool .
Mon petit frère (qui a dessi... |
Both PyQt4 and PySide have very similar mappings to the Qt API. There are, however, some differences, my opinions on which are described below:
Maintenance
They are both well maintained. The PySide produces a lot more regular releases at the moment: I think it's more closely linked to Qt than PyQt4 and as a newer proje... |
raspouillas
Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4]
Je ne faisait aucune allusion au problème de @souen.
Dernière modification par raspouillas (Le 15/06/2012, à 20:37)
ljere
Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4]
alors voici la première partie du ... |
Tony95
Re : Ella : projet de logiciel d'animation Flash & SVG pour Linux
Salut à tous je savais pas trop où poster donc je le fais ici. J'ai un petit soucis en GTK, j'aimerais créer une interface permettant de charger et sauvegarder des fichiers mais j'arrive vraiment pas à m'en sortir pour le code. En gros j'ai une fe... |
joko
Re : Qarte arte.tv browser (ex Qarte+7)
bonjour, grands compliments à VinsS et consors, vraiment épaté. bravo à tous les p'tits fouineurs !
qualité vidéo géniale, rien à voir avec celle du site d'arte +7 !!!
Dernière modification par joko (Le 06/11/2012, à 12:35)
Je suis un homme, quoi de plus naturel en somme ?
l... |
def buildTestCase(xmlfile, description, method, evalString):
func = lambda self, xmlfile=xmlfile, method=method, evalString=evalString: \
method(self, evalString, feedparser.parse(xmlfile))
func.__doc__ = description
return func
Above is a code snippet from feedparser, why there is a "self" in function ... |
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... |
Provided by Richard@AWS
This example shows how to use Hadoop Streaming to count the number of times that words occur within a text collection. Hadoop streaming allows one to execute MapReduce programs written in languages such as Python, Ruby and PHP.
Source Location on Amazon S3: s3://elasticmapreduce/samples/wordcoun... |
evann83
Mode superutilisateur
Bonjour
Me voici avec un soucis que je n'arrive pas a résoudre:
j'aimera utiliser la commande "javac" pour pouvoir compiler un fichier java sur mon bureau mais apparement il n'a pas envie puisque il me demande d'installer la JDK, logique je me suis dis après coups. Me voilà parti pour inst... |
March 8th, 2012 at 9:45 pm by Dr. Drang
@macdrifter Um, doesn’t Devon know that appscript has been end-of-lifed? appscript.sourceforge.net/status.html
— Dr. Drang (@drdrang) Wed Mar 7 2012
Appscript was—and still is—a library for writing scripts that use Apple Events without having to write in AppleScript. There were a... |
A bug I've recently seen in production code gave me the idea for this blog post. Probably smarter people already wrote better things on this topic, so this is mostly for myself, to better summarise my own thoughts. Corrections are welcome, please leave a comment!
Let's say we have a somewhat standard API in Python or C... |
Bismut
Re : [HOW TO] adesklets : configuration des desklets
Bon, je ne trouve toujours pas le moyen d'afficher mes desklets au bon endroit, voici le contenu de mes fichiers :
.adesklets
# This is adesklets configuration file.
#
# It gets automatically updated every time a desklet main window
# parameter is changed, so ... |
Intro
For nearly nine years, I worked almost exclusively in Java. For me, Java was a productivity enhancer, over C and C++, and I greatly enjoyed working in it. Lately, however, I’ve been programming in Python almost exclusively, and I’m having so much fun with it that I have little desire to go back to programming in ... |
I have an object subclass which implements a dynamic dispatch __ iter __ using a caching generator (I also have a method for invalidating the iter cache) like so:
def __iter__(self):
print("iter called")
if self.__iter_cache is None:
iter_seen = {}
iter_cache = []
for name in self.__slot... |
I have set
import matplotlib as mpl
AXES_COLOR = '#333333'
mpl.rc('axes', edgecolor=AXES_COLOR, labelcolor=AXES_COLOR, grid=True)
mpl.rc('xtick', color=AXES_COLOR)
mpl.rc('ytick', color=AXES_COLOR)
mpl.rc('grid', color=AXES_COLOR)
The color of the axes labels and the ticks are properly set both in 2D and in 3D. Howeve... |
CSS
jossshr — 2010-03-15T17:58:42-04:00 — #1
I am trying to create a simple webpage with a horizontal list as the navigation, but IE (at least IE7) isn't accepting my horizontal list or my font colors. I've got it as inline, but it's still not working. Works great in FF, Safari and Chrome.
The website is www DOT family... |
Python httplib Performance Problems
25 March 2008
13:50
I've run into a tricky performance problem with my CouchDB client for Python.
I recently started getting some reports about really bad performance of the client on Linux, where you apparently couldn't get more than about 25 requests per second in throughput (that ... |
So I have a mysql table and I am trying to take each element from one of the fields of the table. The field and table are both called "keywords". In the field there are many different random words and I am trying to take all of those and save them to a text file. Any help on how to implement this would be great, here i... |
Judepaum
[Résolu] Twinview changement résolution impossible
Bonjour et bonne année !
Je viens de faire une installation fraîche de 12.10 et j'ai pas mal de soucis pour retrouver la configuration de TwinView que j'avais sur 12.04 ...
Donc, dans les faits, dans nvidia-settings je ne peux choisir que Off ou Auto pour la r... |
gmli
Cerise 0.8 - TPE, freelances, artisans
Hello,
je me suis dit qu'une petit présentation pourrait intéresser du monde ici.
Je viens de sortir aujourd'hui la version 0.8 de mon petit soft de gestion d'entreprise (cf. l'article sur le blog http://leblog.cfait.fr/post/2008/09/07/Cerise-08)
Vous pouvez trouver une liste... |
I’m writing a web app that includes, among other things, a good amount of (rational) non-integer numbers. Whenever I’m in this situation, and I’m using a language that supports Decimals (as opposed to just floats and doubles), I always wonder which one I should use.
If you’re a programmer, you understand the difference... |
I'm having issue with arranging code to make it easily testable. I have 2 major modules in my code: cache generator and modifier builder, both have approximately the same level of complexity. Modifier builder is used in one of the methods of child objects of cache generator.
I already have full test suite which covers ... |
I have a python script which needs to execute several command line utilities. The stdout output is sometimes used for further processing. In all cases, I want to log the results and raise an exception if an error is detected. I use the following function to achieve this:
def execute(cmd, logsink):
logsink.log("exec... |
UPDATE: 2.x support is now mainline! Please read the wiki page for important information about the update.
A warm welcome to you, traveller. You have arrived at the home of Py-StackExchange, the library definitively proven† to be the best library for using the SE API from Python. If you are still interested (and by gol... |
On the link that contains 'alpha' in the URL has many links(hrefs) which I would like to collect from 20 different pages and paste onto the end of the general url(second last line). The href are found in a table which class is mys-elastic mys-left for the td and the a is obviously the element which contains the href at... |
After configuring and installing IPython to run under python3, as explained by this wiki, and having completed all the steps, I still get:
gmask@Gbuntu:~$ ipython3 qtconsole
No command 'ipython3' found, did you mean:
Command 'ipythonx' from package 'ipython' (universe)
Command 'ipython' from package 'ipython' (universe... |
Let’s start with something easy.
Here’s the mirepoix
bar = "chicken"
You know single quotes and double quotes, right? These are our salt and pepper.
'frickin #{bar}' # => "frickin #{bar}"
"frickin #{bar}" # => "frickin chicken"
Have you seen %%q and %%Q?
%%q(frickin #{bar}) # => "frickin #{bar}"
%%Q(frickin #{bar}) # ... |
xxkirastarothxx
Re : MegaUpload : BotMU v1.0.1
Tucan a l'avantage de gérer les captcha pour les services qui en ont (enfin... un popup s'ouvre avec l'image, et l'utilisateur doit saisir lui même le texte)
Aaah ok c'est comme ça qu'il fait.
Par-ce que j'ai déjà essayé de pété des capcha avec des OCR, pour certains ça fo... |
fffredo
traduction française (résolu)
Bonjour la communauté, je suis sous kde 4.12.1 et ubuntu 13.10.
Tout marche bien sur ma monture depuis un bon moment et là d'un coup j'ai kickoff qui passe en anglais tout comme libreoffice et les menus clic droit ????
j'ai bien depuis longtemps les paquets de langue installé (je l... |
icares
Impossible de mettre à jour les dépots
Voilà ce que j'obtiens avec un apt-get update
mathieu@mathieu-dd:~$ sudo apt-get update
Password:
Err http://be.archive.ubuntu.com dapper Release.gpg
Échec de la connexion [IP : 85.133.25.23 80]
Err http://be.archive.ubuntu.com dapper-updates Release.gpg
Échec de la con... |
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... |
1
Este pack contiene los siguientes vídeos musicales (con sus m4a's correspondientes):
Demi Lovato - Really Don't Care (Official Video) ft. Cher Lloyd
David Bisbal - Tú Y Yo
Foster The People - Best Friend
Arctic Monkeys - Snap Out Of It (Official Video)
Kasabian - eez-eh
Villagers - Occupy Your Mind (Official Video) -... |
I've been looking for a way to update my Twitter status from a Python client. As this client only needs to access one Twitter account, it should be possible to do this with a pre-generated oauth_token and secret, according to http://dev.twitter.com/pages/oauth_single_token
However the sample code does not seem to work,... |
Load Testing Web Services with Grinder
by Jim Alateras
I first came across Grinder a year or so ago but never got beyond installing it on my machine. The latest version, which is still in beta, has a lot of new features, including support for the Jython scripting engine.
The latest version also has a console, which col... |
I guess it’s on everybody’s mind lately, but here is an excellent overview of “new” languages to come out in the past few years. Definitely a lot more than I thought there were at first.
In this post I will provide a list of fairly new languages (let’s say 5 years with a little flex) that display interesting features a... |
The Software Center has a section of For Purchase programs —see screenshot below—,
which is annonying me every time I want to install something.
Is there any way to remove or hide these programs from the Software Center?
Links to answers:
The Software Center has a section of
Is there any way to
For 12.04
1. Ignore the ... |
python python-ogre/BuildModule.py -g -c ogre --usesystem
python python-ogre/BuildModule.py -g -c ois cegui --usesystem
python python-ogre/BuildModule.py -b install --usesystem
PythonOgre.BuildModule DEBUG Traceback (most recent call last):
File "generate_code.py", line 36, in <module>
import common_utils
File "../com... |
I create a custom command via
def spawn_pot(ctx):
ctx.recurse ('po')
class spawnpot(BuildContext):
cmd = 'spawnpot'
fun = 'spawn_pot'
and I would like to set a tooltip, but I could not find how to do that. Currently the waf --help looks like this (truncated):
Main commands (example: ./waf build -j4)
build ... |
If you are computing an L2-norm, you could compute it directly (using the axis=-1 argument to sum along rows):
np.sum(np.abs(x)**2,axis=-1)**(1./2)
Lp-norms can be computed similarly of course.
It is considerably faster than np.apply_along_axis, though perhaps not as convenient:
In [48]: %timeit np.apply_along_axis(np... |
How would I write the following Java PriorityQueue in Python?
PriorityQueue<Integer[]> pq = new PriorityQueue<Integer[]>(11,
new Comparator<Integer[]>() {
public int compare(Integer[] A, Integer[] B) {
return A[0] < B[0] ? -1 : 1;
}
});
I got as far as
from Queue import ... |
FTL Performance
FTL Optimization Strategy
LLVM Patch Points
FTL-Style LLVM IR
MCJIT and the LLVM C API
Linking WebKit with LLVM
FTL Efficiency
Optimization Improvements
Extending Patch Points
Conclusion
Before translating to LLVM IR, WebKit's optimizing JIT operates on an IR that clearly expresses JavaScript semantics.... |
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... |
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 need to make HTTP and HTTPS requests using POST, GET and other methods and specifying headers and timeouts.
On the Internet there are many examples, and they are all different:
import urllib.parse
import urllib.request
url = 'http://www.someserver.com/cgi-bin/register.cgi'
user_agent = 'Mozilla/4.0 (compatible; MSIE ... |
{
"teachers" : [
{"name": "Lucy", "id": 3, course: "history"},
{"name": "Mark", "id": 6, "course": "maths"},
{"name": "Joan", "id": 20, course: "French"}
]
}
This document is in the "school" collection. I have been trying to access these imbedded documen... |
In a Python program I'm writing, I've built up a linked list using a dictionary which maps each node to its successor (with the last node mapped to None).
(Actually, the dictionary holds what Wikipedia tells me is called a spaghetti stack, which is a tree where each node is linked to its parent but not its children. Th... |
PHP
reubenrd — 2012-02-06T09:54:09-05:00 — #1
Hello,
It appears one my gets is not grabbing the detail correctly for some reason.
Output of ECHO'D details equals grabbed via the $_GET:
date1: 2012-02-90,
date2: 1
URI = "....date_from=2012-02-09&date_to=2012-02-11...."
HTML FORM CODE:
<form name='refined_search' action=... |
lexouille
Depuis la MàJ d'ajd, mon ordi plante!!
Bonjour,
je suis complètement novice et ne comprends pas grand chose à Linux c'est pourquoi je vous sollicite:
aujourd'hui linux m'a demandé de mettre à jour des paquets, ce qui a été fait mais 2 d'entres eux n'ont pu l'être car ils étaient "cassés"... Il s'agissait de h... |
gtk.glade.XML — Allows dynamic loading of user interfaces from XML descriptions.
class gtk.glade.XML(gobject.GObject):
gtk.glade.XML(fname, root=None, domain="", typedict={})
def signal_connect(handler_name, func)
def signal_autoconnect(dict)
def get_widget(name)
def get_widget_prefix(name)
def ... |
I need some help.
In my models.py I have a table for Note. What I want to to do with this table is to create a form where a user could enter some notes in a text field for a particular client.
models.py
class Note(models.Model):
client = models.ForeignKey(Client)
datetime = models.DateTimeField(default=datetime... |
ProDy works quite well, especially from within an existing Python script.
The following code takes an existing PDB file, performs some selection query on it, then saves it to another file.
import prody
def pdbsubset(inpdb, outpdb, selection):
with open(inpdb) as protf:
prot = prody.parsePDBStream(protf)
... |
gmli
Cerise 0.8 - TPE, freelances, artisans
Hello,
je me suis dit qu'une petit présentation pourrait intéresser du monde ici.
Je viens de sortir aujourd'hui la version 0.8 de mon petit soft de gestion d'entreprise (cf. l'article sur le blog http://leblog.cfait.fr/post/2008/09/07/Cerise-08)
Vous pouvez trouver une liste... |
The question is for Python 2.6, that is what we have in production.
I have this requirement for formatting a number (like 1234567.0987 or 1234567.0) with comma, and specified number of digits after decimal points. So, it if precision is three, 1234567.0987 may look like 1,234,567.099.
I tried using Locale, as suggested... |
Another key point is that the mouse messages all report the position in "Screen Coordinates" (i.e., relative to the top-left corner of the screen) rather than in "Client Coordinates" (i.e., relative to the top-left corner of our window). You use a member function PyCWnd.ScreenToClient() to transform these coordinates.
... |
I am playing with Python's logging system. I have noticed a strange behavior while removing handlers from a Logger object in a loop. Namely, my for loop removes all but one handler. Additional call to .removeHandler removes the last handler smoothly. No error messages are issued during the calls.
This is the test code:... |
How can I improve this code (elegance, best practices, etc)?
""" Simple in-memory database as a response to the Thumbtack coding challenge. """
class SimpleDb(object):
""" Simple in-memory database as a response to the Thumbtack coding challenge. """
def __init__(self):
""" Initialize SimpleDb instance.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.