text stringlengths 256 65.5k |
|---|
nicky940
Re : Generateur de sources.list en Francais
bonsoir
je suis un nouvelle utilisateur d'ubuntu l'installation c'est dérouler a merveille version 9.10 jai depuis quelque temps un problème avec les mise jour qui m'indique un sens interdit qui m'indique ce message d'erreur :un problème irrémédiable est survenu pend... |
If you use django 1.5 and newer use:
{% verbatim %}
{{if dying}}Still alive.{{/if}}
{% endverbatim %}
If you are stuck with django 1.2 on appengine extend the django syntax with the verbatim template command like this ...
from django import template
register = template.Library()
class VerbatimNode(template.Node)... |
Consider the code:
class MyClass(object):
'''
Keep track of file and its path on disk
'''
def __init__(self):
self.file = None
self.path = None
I'd like to add doc-string to all properties. So, I could do something like (for file property):
class MyClass(object):
...
@property
def file(self):
... |
I downloaded ProText.exe, and was about to start Setup according to protext-install-en.pdf. But an error popped up. And in Setup.exe, it says this.
Traceback (most recent call last):
File "protext-setup.py", line 298, in <module>
File "protext-setup.py", line 97, in __init__
File "wx\_controls.pyc", line 494, in ... |
My configuration file is always changing. Vim is so flexible and powerfull, and the plugin authors so productive, that from time to time I spent a few hours looking for new plugins and tricks and retuning my configuration file. In this article I will comment the coolest plugins I use trying to explain why I find them t... |
I need one urgent help.
I am using Ubuntu 12.10. My hard drive is only one year old.
Suddenly all of my folders and files became read only. After checking in Google, I came to know that this is something related to corrupt file system. I cannot transfer the files and folders to another machine or to an external hard dr... |
I'm trying to write a program that would detect external monitors being plugged in and automatically enable and configure them through Xlib. I know that there is XRandr extension that allows this. My question is, how do I enable receiving XRandr events to my application? What event mask should I use? I know that xev ap... |
I need a way to make an image as a background for a window, and still be able to put buttons and other controls on top of it.
this is my code:
from __future__ import division
from Tkinter import *
from PIL import Image, ImageTk, ImageFilter
import random
import Tkinter as tk
class MyGame(object):
def __init__(self)... |
ViewSets
After routing has determined which controller to use for a request, your controller is responsible for making sense of the request and producing the appropriate output.
Django REST framework allows you to combine the logic for a set of related views in a single class, called a ViewSet. In other frameworks you ... |
I have a resource in which I'm trying to expose its' votes.
class ViewPostResource(ModelResource):
user = fields.ForeignKey(UserResource,'user',full=True)
votes = fields.ToOneField('voting.resources.GetVotesResource', attribute='vote_set', full=True)
class Meta:
queryset = UserPost.objects.all()
... |
Reviews by Vegimite
85
Best sonic game in a decade.
Vegimite| April 24, 2013 | Review of Sonic Generations
First off, have a game pad of some kind for the pc, it's not impossible to play it with a keyboard but the experience is vastly improved without having to. This is coming from someone who played sonic the hedgehog... |
I use revision control (Subversion, to be exact) to keep track of the edits to my LaTeX documents. Is there a LaTeX package that interfaces with revision control? Specifically, it would be nice to see the revision number and time and date inside the document. (Obviously, I'd turn this off in the final version.) Also, i... |
Topic: iRedMail in jail?
Do iRedMail is working in jails?
----
Urgent issue? Pay iRedMail developer to solve it remotely at $39.
Works on Red Hat Enterprise Linux, CentOS, Debian, Ubuntu, FreeBSD, OpenBSD
You are not logged in. Please login or register.
Do iRedMail is working in jails?
----
Sorry, you didn't explain cl... |
I have seen some fascinating statistics about what HTML markup is actually in use on the web.
Have there been any similar studies more recently than this?
This dates from January 2011, but isn't that widespread: http://try.powermapper.com/demo/statsversions.aspx
I recently needed to come up with some HTML element stati... |
Does the following recursive algorithm have a name? If so, what is it?
procedure main():
myFilter = new Filter( myPrime = 2 ) //first prime number
print 2 //since it would not otherwise be printed
for each n in 3 to MAX:
if myFilter.isPrime(n):
print n
object Filter:
integer myPrime
PrimeFilter nextFilter = N... |
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... |
I'm trying to understand what is happening in the python code below. I take the square root of 2 and divide its decimals by 1. Doing this for 5 times keeps giving the same value but the 6th and 7th time I get different values.
Why does the output change at the 6th time when the input value is the same as in the previou... |
Ras'
Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4]
Hors ligne
ljere
Re : Topic des lève-tôt… Faisons manger leurs caleçons aux couche-tard! [4]
voici le code
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# auteur Gabriel Pettier
# license GPL V3 or later
# sert uniquement a compter le... |
Since Pangolin, I can't manage to link any program with libcurl, even the example provided with libcurl themselves.
I have installed libcurl:
sudo apt-get install libcurl4-gnutls-dev
Then as the README says in /usr/share/doc/libcurl4-gnutls-dev/examples I tried compiling the simplest program in the examples (copied it... |
Background: I am pulling the connection table of a firewall in order to build a top talkers/listeners list.
In some cases, the connection table is 200,000+ entries. I am using telnetlib to remote to the firewall and grab the connection table. I use read_until to capture the data. However, when the table is larger than ... |
I'm having an issue with update-manager. Last night, my computer restart suddenly during the update process. Now it won't open and it keep appearing on the notifier with a message warning that an error occurred. The error is the same that is displayed when I try to open it on the terminal:
Error in sitecustomize; set P... |
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.
... |
As explained in Can changing desktops environments affect my programs/personal data?, installing (or removing) a given desktop environment shouldn't affect any other desktop environment that you currently have on your system. It's just about installing/removing a bunch of packages, which apt ensures are independent of ... |
I am trying to use urllib.parse.urlencode() method in one of my scripts. import urllib
#!/usr/bin/python3.2
import urllib
data = urllib.parse.urlencode({'type': 'device_code','client_id': 150792241632891})
It was working before but now I get following error.
Output
Traceback (most recent call last):
File "/home/rake... |
Nós programadores perdemos um tempo tentando mexer em programas de edição de imagem como Photoshop e Gimp para quebrar algum galho, tarefas bobas como redimensionar uma imagem para um determinado tamanho sem perder a qualidade por exemplo.
Perda de tempo maior ainda seria se fossem 20 ou 30 imagens, imaginem? Pois é.
S... |
This dict comprehension works:
docScores = {0:[{u'word':2.3},{u'the':8.7},{u'if':4.1},{u'Car':1.7}],
1:[{u'friend':1.2},{u'a':5.2},{u'you':3.8},{u'person':0.8}],
29:[{u'yard':1.5},{u'gardening':2.8},{u'paint':3.7},{u'brush':1.6}]
}
sum_d={k:sum(d.values()[0] for d in v) for k,v in ... |
I figured out what the problem is when I was trying to see why the print statement I suggested in the comments didnt work.
First of all, an efficient way in Python to print all the strings in a list of strings is like this:
', '.join(Sources)
The part in the quotes ', ' is the separator between elements in the list of... |
I had Ubuntu 13.04 installed on my laptop.
Rather than upgrading, I decided to install 14.04 fresh on a new SSD.
So, I have two drives. One with 13.04 and my old data, and one with 14.04. Both Ubuntu instances were installed using the default "Erase disk and install Ubuntu" option with LVM checked.
I'm trying to mount ... |
I am writing a note taking app with python and glade. I've been searching the web for the how to save and retrieve textbuffer with tags from simple app made with python and glade. I would like to get an in-depth answer as I am just starting to know python a little. So here's the situation:
Text loads fine, but tags tha... |
While this does not address your question as such, I can highly recommend using Amazon EC2 via the excellent boto instead, which is a Python package that provides interfaces to Amazon Web Services.
It pretty much covers the same ground as the Amazon EC2 API Tools, but doesn't suffer from the painful delays due to relyi... |
May 15th, 2012 at 9:16 pm by Dr. Drang
When I wrote a post last week about using Flickr as a CDN, there was a paragraph that bothered me:
One thing did change when I started using Flickr to host screenshots: I had to change my screenshot format from PNG to JPEG. Flickr accepts PNGs, but it saves the resized images as J... |
This is my setup:
Raspberry Pi w/Raspbmc
8GB Transcend SDHC card
Yamaha RX-V1900 receiver
Westinghouse 40" flat panel TV
When the Pi is directly connected to the TV by HDMI, the output is sharp (TV switches to the HDMI output of the Pi) and the screen doesn't change resolutions every 5 seconds.
When the Pi is connected... |
UpdateCursor (arcpy.da)
Summary
UpdateCursor establishes read-write access to records returned from a feature class or table.
Returns an iterator of lists. The order of values in the list matches the order of fields specified by the field_names argument.
Discussion
Update cursors can be iterated using a for loop. Updat... |
I am having problems with installation with everything in the software center.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", line 968, in simulate
trans.unauthenticated = self._simulate_helper(trans)
File "/usr/lib/python2.7/dist-packages/aptdaemon/worker.py", l... |
bowmore
Re : Qarte arte.tv browser (ex Qarte+7)
Si je lance
python /usr/bin/qarte
J'obtiens
python /usr/bin/qarte
(qarte:23575): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « pixmap »
Affiché une quinzaine de fois, puis Qarte-1 démarre bien. Dans le terminal, il y a ça:
15:33:40: INFO ... |
You have just finished your beautiful web application, with lots of pages, links, forms, and buttons; you have spent weeks making sure that everything works fine, that it handles the special cases correctly, that the user cannot crash your system no matter what she does.
Now you are happy and are ready to ship, but at ... |
Ubuntu is becoming slow for no apparent reason. I'd like some help with analysing and fixing this issue.
Usually when a system slows down, that's because the software is using too much system resources, but my CPU and RAM usage usually doesn't even reach 40%. Still, the system starts slowing down and applications stop ... |
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... |
How do you do a text-to-columns conversion in Google Spreadsheets?
For example, I have the following data string in one cell:
5,233,6,2,6,7,2,2,6,6
I want to break it apart by the comma separator into columns.
Leverage Google Apps Scripting to extend the UI
Text to Columns, is a very handy feature and one of the reason... |
n3o51
Liste des onglets
Bonsoir y a t'il un moyen de copier directement dans un fichier txt la liste des onglets ouverts dans opera et firefox ?
ligne par ligne ?
Merci d'avance
Edit modérateur : si vous n'avez pas de réponses à donner, ne sortez pas le sujet des "Sujets sans réponses".
Dernière modification par xabilo... |
connolly's blog
TaskJuggler provides an optimizing scheduler that computes your project time lines and resource assignments based on the project outline and the constrains that you have provided. The build-in resource balancer and consistency checker offload you from having to worry about irrelevant details and ring th... |
I am trying to migrate an existing application fron SQueryl 0.9.5 to 0.9.6, in order to make use of the new extended field types. I am now to the point where the application and its tests compile, but I get a runtime error as soon as I try to load a Schema.
A portion of the rather long stacktrace includes this:
[error]... |
DonutMan75
[RESOLU] www et nom de domaine
Bonsoir à tous,
voilà j'ai une petite question qui me taraude l'esprit.
Dans un nom de domaine tel que
à quoi correspond le www ??? World Wide Web (cf. http://fr.wikipedia.org/wiki/Www), mais qu'est ce que ça apporte comme information ?
D'après moi :
- http:// >> Ca c'est le pr... |
Terminal allows python "unicode" code to execute without issues because it has sys.stdout.encoding correctly set.
I change the script as below:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
print sys.stdout.encoding
print u"富强"
Run in Gedit, the output is: None for sys.stdout.encoding.
Run in Terminal,... |
Already many people explained about import vs from, even i wanna try to explain bit more under the hood, where are all the places it got changes:
First of all let me explain:
import X :
imports the module X, and creates a reference to that module in the current
namespace. Then you need to define completed module path ... |
This program has been disqualified.
Author EbTech
Submission date 2011-05-25 17:56:25.041440
Rating 10000
Matches played 2
Win rate 100.0
import math
import random
if input == "":
matchHistory = ""
candidate = ['P','R','P','S','R','P','S']
score = [0,2,0,0,0,0,2]
else:
matchHistory += input
for i in ... |
I use revision control (Subversion, to be exact) to keep track of the edits to my LaTeX documents. Is there a LaTeX package that interfaces with revision control? Specifically, it would be nice to see the revision number and time and date inside the document. (Obviously, I'd turn this off in the final version.) Also, i... |
Twill is especially good at retrieving and submitting web forms. The form-related feature uses the commands:
showforms
formvalue <form_id> <name> <value>
submit <button_id>
formclear <form_id>
Explaining the commands is pretty straightforward.
showforms shows the forms contained in a web page. For example, try:
>>> go ... |
So I was doing some configuration for ssh. When I later then did this command:
lsof -i tcp|grep ^ssh
I got a list of what I was expecting to happen. However, something I never noticed before was that everything was being called "penguin.local" as my machine. This isn't odd, because I know I named my laptop as "penguin"... |
Soipacon
[Tuto] Wallpapoz enfin ça marche !!!!
Enfin j'ai trouvé un How To concernant wallpapoz.
C'est trés bien fait et même sans être bilingue c'est facile.
En tout cas chez moi ça marche impec sur Breezy noyau 686.
http://ubuntuforums.org/showthread.php? … =wallpapoz
Hors ligne
Bob Morane
Re : [Tuto] Wallpapoz enfin... |
I am a newbie in Python & web.py so excuse my ignorance. I had a script for a web page that was working, and then randomly stopped working. I've been at it for a few days and cant seem to figure the issue out.
I keep getting the following error:
127.0.0.1:49664 - - [05/Jul/2012 23:58:42] "HTTP/1.1 GET /" - 500 Internal... |
I already asked this exact question a year ago. My application uses Python's multiprocessing module, which works fine when run from the command line, but when I package it as an executable using Pyinstaller, the multiple processes spawn as new instances of the original rather than running the function they are supposed... |
sefiane
[résolu] Logithèque / Synaptic
Salut !
J'ai besoin de votre aide S.V.P !
Je suis débutant dans Linux , j'ai la version 12.O4 ATS.
Il fonctionnait très bien sans problème, une fois additionner Synaptic, Logithèque ne voulait pas répondre ! Il plantait, lorsque je fermais, une fenêtre apparaît, " logithèque ne ré... |
milambert
[résolu] kde et clef usb??
salut.
lorsque je connecte ma clef usb, konqueror s'ouvre et me dit "sda1 not found" ou qqch dans le genre. En fait, le fichier sda1 n'est pas existant dans la partie media:/ de kde (partie ou tout les liens vers les periferique se trouvent).
Serait il possible de créé ce lien.
ps: ... |
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... |
I could need some help on designing my models and their relationships.
Short overview
Book: book titles(e.g. "Lord of the Rings")
Tag: tags associated with books(e.g. "Fantasy", "Wizard", "Epic fight")
Aspect: aspects associated with tags, or, in other words, things users can rate when a specific tag occurs, e.g.:
for ... |
Python 3.2 Concurrent Programming Features, Page 2
Mapped Submission in Python 3.2
In addition to submitting a function with parameters to an executor, we can alternatively "map" a function onto a list of arguments (more precisely, map a function onto an iterable list of arguments).
In the example below, I use the exec... |
If you visit DuckDuck Go API Page, you will find some notes about using the API. The first notes says clearly that:
As this is a Zero-click Info API, most deep queries (non topic names)
will be blank.
An here's the list of those fields:
Abstract: ""
AbstractText: ""
AbstractSource: ""
AbstractURL: ""
Image: ""
Headin... |
I'm doing some amateur image analysis using Python, specifically Numpy, PIL and OpenCV. However, I'm not too pleased with the performance of PIL, so I would like to port those parts of the code to OpenCV. This will also make it easier to port the code to C/C++ later on, if needed.
Anyways, I'm having some trouble with ... |
Description:
Gensim - Python Framework for Vector Space Modelling
Gensim is a Python library for
Vector Space Modellingwith very large corpora. Target audience is theNatural Language Processing(NLP) community.
Features
All algorithms are
memory-independentw.r.t. the corpus size (can process input larger than RAM),
Intu... |
I am trying to set up a Fluentd log handler from a Django project using a logger from code:
def get_fluentd_logger(name):
import logging
from fluent import handler
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(name)
logger.addHandler(handler.FluentHandler(name, host='localhost'... |
Looks like you're missing a library file. The program apt-file can be used to find which package provides a certain file. (dpkg -S does this too, but does not work for packages which are not installed)
apt-file search libXss.so yields:
ia32-libs: /usr/lib32/libXss.so
ia32-libs: /usr/lib32/libXss.so.1
ia32-libs: /usr/li... |
Bug #582
volk_test_all : volk_32fc_s32f_magnitude_16i_test fails on x86 and ARM for arch u_orc (v3.7.0)
Status: Closed Start date: 08/12/2013
Priority: Low Due date:
Assignee: Tom Rondeau % Done:
0%
Category: volk
Target version: -
Resolution:
Description
Test fails on both x86 target (VMWare based) and on ARM target.
... |
LAMPP is just an easy way of running apache with php, mysql and some other stuff. If you were not using LAMPP, you would have to install and configure these (or an alternate webserver) yourself.So in general, no.
You don't have to run lampp on system startup. It's as simple as opening a command line and typing sudo /op... |
I'm quite sure that this cannot be achieved using the out-of-the-box JQL.
You can do this easily using Jira's remote API, using jira-python for example :
from jira.client import JIRA
jira = JIRA(basic_auth=('admin', 'admin')) # a username/password tuple
props = jira.application_properties()
# Find all issues from th... |
I want to have Conky display the time using words and not numbers.
What I want to do is more or less how the Pebble Watch looks (Red watch).
Like in the image, even if only the time and not the date can be shown.
Is this possible?
I want to have Conky display the time using words and not numbers.
What I want to do is m... |
I find this sort of issue everywhere, however I have been at this for just about two weeks and really need to fix this, as I need the functionality of my NVIDIA Geforce GT 540m.
Running an external monitor via HDMI (1920x1080) and using my laptop screen (1366x768) as my secondary screen.
My process:
Download the driver... |
Gaara
[résolu] wxPython: changer position fenêtre
Bonjour,
J'ai récupéré ce script python sur le net, et actuellement l'image s'affiche en haut à gauche de l'écran, je voudrais savoir comment afficher cette image en haut à droite de l'écran.
Je précise que je ne connais rien au python, c'est juste par curiosité.
J'ai e... |
Topic: iredadmin ImportError No module named ldap
==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
==== ==== Required information ====
- iRedMail version: 0.8.3
- Store mai... |
I know of the non-standard %uxxxx scheme but that doesn't seem like a wise choice since the scheme has been rejected by the W3C.
Some interesting examples:
The heart character. If I type this into my browser:
http://www.google.com/search?q=♥
Then copy and paste it, I see this URL
http://www.google.com/search?q=%E2%9... |
This answer is a repost of one to a related question Framester posted about using ctypes instead of swig. I've included it here in case any web-searches turn up a link to his original question.
I've used ctypes for several projects
now and have been quite happy with the
results. I don't think I've personally
need... |
alex2423
Plus d'accès à la TV de SFR via VLC sur le PC
Hello tout le monde,
Je fais partie de ceux qui n'ont pas de TV. J'ai juste un bel écran Dell 24" que j'utilise comme TV. Je regardais la TV avec VLC via le flux SFR.
Depuis 1 mois à peu près, je n'ai plus d'image. J'ai encore le son.
Est ce que vous avez ce meme s... |
There is matplotlib2tikz, which creates a TikZ/pgfplots file that can be \input in your document. I don't know how well it works, having never used matplotlib, but I have used matlab2tikz from the same author, and that works well. Also, I do not know if matplotlib2tikz supports all the different kinds of plots that mat... |
lukophron
Re : [python]Monsieur Cinéscript
ah, bug du forum, je voyais mon dernier message en triple, je veux effacer les doubles et il m'efface tout.enfin bref
ça veut dire quoi "je voulais voir ce que ça donnait" ?
et heureusement que j'ai dit "ne pas faire la màj"...
le problème, lorsque tu fais des trucs comme ça, ... |
I recently clicked upon Keith Braithwaite and Ivan Moore’s presentation, “Why Java Programmers Should Learn Python”. It starts off well with an expert discussion of three different axes of type systems, placing various programming languages in the resulting 3-space. It then poses a programming problem, the kind of prob... |
It's a rare website or company today that doesn't have to make HTTP requests to another party. Phone apps need to communicate with a server. Servers have to communicate with 3rd party tools like Facebook, Twitter, Sendgrid, (Twilio!) and others. Most companies that implement a service oriented architecture use HTTP to ... |
Cooking with Python, Part 2
Pages: 1, 2
Recipe 18.10: Computing Prime Numbers
Credit: David Eppstein, Tim Peters, Alex Martelli, Wim Stolker, Kazuo Moriwaka, Hallvard Furuseth, Pierre Denis, Tobias Klausmann, David Lees, Raymond Hettinger
Problem
You need to compute an unbounded sequence of all primes, or the list of a... |
You must give a presentation tomorrow and you haven't prepared any figures yet; you must document your last project and you need to plot your most hairy class hierarchies; you are asked to provide ten slightly different variations of the same picture; you are pathologically unable to put your finger on a mouse and draw... |
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=... |
Ce cours est visible gratuitement en ligne.
Ce cours existe en livre papier.
Ce cours existe en eBook.
Vous pouvez obtenir un certificat de réussite à l'issue de ce cours.
J'ai tout compris !
En programmation, on est souvent amené à utiliser plusieurs fois des groupes d'instructions dans un but très précis. Attention, ... |
I am trying to package a program I wrote (using Pyqt4) into a single executable for linux. I tried using Pyinstaller however it has problems with importing Gio (for settings)
from gi.repository import Gio
Running the application would give:
ImportError: cannot import name Gio
I then tried to use bbFreeze. The problem... |
My script logs to a file just fine until I try to fork it into the background at which point the file handle is closed, even if I use filesPreserve. How can I improve this in a lightweight fashion so that my logger runs in the background?
#!/usr/bin/env python
from socket import *
import sys, time, logging
import ... |
(NB: see this other post for why I am not using dpkg/apt-get/etc. for this installation.)
I can install numpy in a virtualenv on Debian with, e.g., pip:
(base)[1778]% pip -v install numpy
Downloading/unpacking numpy
...
<output omitted>
...
Successfully installed numpy
Cleaning up...
Removing temporary dir /home/jo... |
Przeszukiwanie w głąb
Przeszukiwanie w głąb
Kolejność odwiedzania węzłów
Rodzaj Przeszukiwanie grafu
Struktura danych graf, drzewo
Złożoność
Czasowa
Pamięciowa h-długość najdłuższej prostej ścieżki
Niniejszy artykuł jest częścią cyklu teoria grafów.
Przeszukiwanie w głąb (ang. Depth-first search, w skrócie DFS) – jeden... |
We are trying to implement new relic ( http://www.newrelic.com ) on a dev server to test openerp's performance .
The below installation steps of newrelic asks us to to modify WSGI application file . I am new to openerp and I can't seem to figure this out. Any help will be highly appreciated.
Within the same WSGI applic... |
sali10
ecrire un script
bonjour tout le monde
je voulais ecrire un script en C , qui manipule un fichier texte, il doit lire le fichier et faire des modification par exemple a chaque fois qu'il rencotre le mot 'a5b6 il le remplace par ahbv....comment proceder?
Hors ligne
Jean-Julien
Re : ecrire un script
J'ai l'impress... |
There is a Fourier transform method here. Using the example from belisarius it might be done as below. Caveat: I do not guarantee I made no cut-and-paste errors. Your mileage may vary. Considerably.
(* sample data *)
g[x_] := x + 1/2 Sin[x] + RandomVariate[NormalDistribution[.2, .05]];
SeedRandom[1111];
xmax = 8*Pi;
nH... |
Normally, you process a file line by line in Python using a loop like:
import sys
for s in sys.stdin:
# do something with the line in s
or
import sys
while True:
line = sys,stdin.readline()
if len(line) == 0: break
# process input line
Of course, you can also use raw_input() in soemthing like this:
tr... |
pontiac76
[résolu]Google Ok mais pas internet avec Ubuntu 12.04
Bonjour,
J'ai posté hier un message à propos de mon impossibilité d'aller sur internet sauf sur sur google avec mon installation toute neuve d'Ubuntu 12.04 LTS sur un second disque dur de mon pc fixe.
Devant l'absence de réponse, j'ai relu les règles du fo... |
loubrix
[RESOLU] sources.list bizarre...
Bonsoir,
après une mise à jour normale, faite dans la journée, je me suis aperçu que j'avais un triangle jaune dans le systray, avec un message "les informations de mise à jour sont obsolètes. Ceci est peut-être du à un problème sur le réseau ou à un dépot qui n'est plus disponi... |
doudoulolita
Faire une animation sur la création de jeux vidéo libres
Dans le topic Création de jeu vidéo libre - Appel à candidatures, j'ai découvert le créateur de jeu de Ultimate Smash Friends, Tshirtman.
Voici ce que je lui ai écrit:
Je cherche un jeu que notre Espace Public Numérique pourrait proposer aux jeunes s... |
life == "good"
Here's some things you should know about me.
Don't wake me up earlier than 7:30, unless you want your face dented in.
I have no life. I once spent 1 solid day, programming.
I have a raspberry pi. That's it.
I really only play one game. Minecraft.
What's my name again?
Here's a program I made to emulate P... |
Sure you can define such property:
year = column_property(extract('year', date))
But do you realy need it? You can filter by year without such property defined by rewriting filter condition:
query(Foo).filter(extract('year', Foo.date)==2011)
Update
Although this solution looks simple it also have a drawback: such con... |
You can change the array type without converting like this:
a.dtype = numpy.float32
but first you have to change all the integers to something that will be interpreted as the corresponding float. A very slow way to do this would be to use python's struct module like this:
def toi(i):
return struct.unpack('i',struc... |
nesthib
[JEU] challenge bash #6
Espaçeur de paragraphes
Imaginons un texte, celui-ci est composé de différents paragraphes. La plupart du temps un paragraphe sera coupé en deux à la fin d'une page. Le but de ce challenge est de réaliser un script qui formate le texte de façon à ce qu'un paragraphe ne soit jamais coupé ... |
I got the following code from this site to connect to a mysql database through python (which is much appreciated by the way). I have used it once already to connect to a database on the server, but in a different file. However I know want to connect to another database on the same server but i keep getting error messag... |
Ok so I have a custom django admin built from a Author Model:
class AuthorAdmin(admin.ModelAdmin):
"""
Author Admin
"""
form = AuthorForm
list_display = ['profile_photo', 'first_name', 'last_name', 'title']
search_fields = ['first_name', 'last_name', 'title', 'credential']
prepopulated_field... |
n3o51
Liste des onglets
Bonsoir y a t'il un moyen de copier directement dans un fichier txt la liste des onglets ouverts dans opera et firefox ?
ligne par ligne ?
Merci d'avance
Edit modérateur : si vous n'avez pas de réponses à donner, ne sortez pas le sujet des "Sujets sans réponses".
Dernière modification par xabilo... |
4. 伺服器上的 Git
5. 分散式 Git
6. Git 工具
8.2 Git 與其他系統 - 遷移到 Git
遷移到 Git
如果在其他版本控制系統(VCS)中保存了某專案的代碼而後決定轉而使用 Git,那麼該專案必須經歷某種形式的遷移。本節將介紹 Git 中包含的一些針對常見系統的導入腳本(importer),並將展示編寫自訂的導入腳本的方法。
你將學習到如何從專業重量級的版本控制系統(SCM)中匯入資料—— Subversion 和 Perforce —— 因為據我所知這二者的用戶是(向 Git)轉換的主要群體,而且 Git 為此二者附帶了高品質的轉換工具。
讀過前一節有關 git svn 的內容以後,你應該能輕而易舉的根... |
I'm not really sure a naive algorithm would serve your purpose well, as pointed out by eumiro, so I'll describe a slightly more complex one.
The idea
The best way to proceed is to model the distribution of the output. A good first approximation is to assume all words are independently distributed. Then you only need to... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.