Shaare your links...
3416 links
L!NKS Retour au blog Login RSS Feed ATOM Feed Tag cloud Picture wall Daily
Links per page: 20 50 100
◄Older
page 3 / 10
Newer►
200 results for tags python x
  • Python Patterns - An Optimization Anecdote | Python.org
    Rule number one: only optimize when there is a proven speed bottleneck. Only optimize the innermost loop. (This rule is independent of Python, but it doesn't hurt repeating it, since it can save a lot of work. :-)
       Small is beautiful. Given Python's hefty charges for bytecode instructions and variable look-up, it rarely pays off to add extra tests to save a little bit of work.
       Use intrinsic operations. An implied loop in map() is faster than an explicit for loop; a while loop with an explicit loop counter is even slower.
       Avoid calling functions written in Python in your inner loop. This includes lambdas. In-lining the inner loop can save a lot of time.
       Local variables are faster than globals; if you use a global constant in a loop, copy it to a local variable before the loop. And in Python, function names (global or built-in) are also global constants!
       Try to use map(), filter() or reduce() to replace an explicit for loop, but only if you can use a built-in function: map with a built-in function beats for loop, but a for loop with in-line code beats map with a lambda function!
       Check your algorithms for quadratic behavior. But notice that a more complex algorithm only pays off for large N - for small N, the complexity doesn't pay off. In our case, 256 turned out to be small enough that the simpler version was still a tad faster. Your mileage may vary - this is worth investigating.
       And last but not least: collect data. Python's excellent profile module can quickly show the bottleneck in your code. if you're considering different versions of an algorithm, test it in a tight loop using the time.clock() function.
    permalink -
    - https://www.python.org/doc/essays/list2str/
    optimisation python
  • python bottle : checkboxes with the same name
    Comment récupérer la valeur de checkbox qui ont le même attribut "name" ?

    ex :
    <label><input type="checkbox" name="fruit' value="banane"/>banane</label>
    <label><input type="checkbox" name="fruit' value="pomme"/>pomme</label>
    <label><input type="checkbox" name="fruit' value="fraise"/>fraise</label>

    request.POST.getall('fruit')

    NB : pour le label qui entoure l'input, il permet de checker la checkbox en cliquant sur le label !
    (https://stackoverflow.com/questions/6293588/how-to-create-an-html-checkbox-with-a-clickable-label)
    permalink -
    - https://github.com/bottlepy/bottle/issues/43
    bottle python
  • How can I get a list of locally installed Python modules? - Stack Overflow
    import pip
    installed_packages = pip.get_installed_distributions()
    installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
        for i in installed_packages])
    print(installed_packages_list)
    permalink -
    - https://stackoverflow.com/questions/739993/how-can-i-get-a-list-of-locally-installed-python-modules
    pip python
  • blueluna / transmissionrpc / wiki / Home — Bitbucket
    Un client python pour interroger et contrôler transmission.
    voir : https://pythonhosted.org/transmissionrpc/ (la doc)
    et https://trac.transmissionbt.com/wiki/EditConfigFiles pour la config de transmission.
    permalink -
    - https://bitbucket.org/blueluna/transmissionrpc/wiki/Home
    python torrent transmission
  • Philip Guo - CPython internals: A ten-hour codewalk through the Python interpreter source code
    permalink -
    - http://pgbovine.net/cpython-internals.htm
    python
  • 8.3. collections — High-performance container datatypes — Python 2.7.10 documentation
    via http://podcastinit.com/episode-8-mark-baggett-on-pythons-role-in-information-security.html
    permalink -
    - https://docs.python.org/2/library/collections.html#collections.Counter
    python
  • Introduction — Supervisor 3.1.3 documentation
    permalink -
    - http://supervisord.org/introduction.html
    daemon python services
  • Deployment — Bottle 0.13-dev documentation
    permalink -
    - http://bottlepy.org/docs/dev/deployment.html
    bottle python
  • python - bottle on cherrypy server + ssl - Stack Overflow
    voir ici : http://webpy.org/cookbook/ssl
    permalink -
    - https://stackoverflow.com/questions/10390927/bottle-on-cherrypy-server-ssl
    bottle python ssl
  • dgtool: SSL encryption in python bottle
    permalink -
    - http://dgtool.blogspot.fr/2011/12/ssl-encryption-in-python-bottle.html
    bottle python ssl
  • bash - Fast ping sweep in python - Stack Overflow
    voir aussi : https://stackoverflow.com/questions/12101239/multiple-ping-script-in-python
    et : http://www.wellho.net/resources/ex.php4?item=y302/fastandfull
    permalink -
    - https://stackoverflow.com/questions/21225464/fast-ping-sweep-in-python
    ping python
  • python - How can I quantify difference between two images? - Stack Overflow
    https://gist.github.com/astanin/626356
    permalink -
    - https://stackoverflow.com/questions/189943/how-can-i-quantify-difference-between-two-images
    image python
  • DIY Book Scanner • View topic - Spreads development environment
    Utiliser jpegtran (https://github.com/jbaiter/jpegtran-cffi)
    """jpegtran-cffi is a Python package for fast JPEG transformations. Compared to other, more general purpose image processing libraries like wand-py or PIL/Pillow, transformations are generally more than twice as fast (see Benchmarks). In addition, all operations except for scaling are lossless, since the image is not being re-compressed in the process. This is due to the fact that all transformation operations work directly with the JPEG data.

    This is achieved by using multiple C routines from the Enlightenment project's epeg library (for scaling) and jpegtran from the Independent JPEG Group's libjpeg library (for all other operations). These routines are called from Python through the CFFI module, i.e. no external processes are launched.

    The package also includes rudimentary support for getting and setting the EXIF orientation tag, automatically transforming the image according to it and obtaining the JFIF thumbnail image."""



    sudo apt-get python-dev
    sudo apt-get install libffi-dev
    sudo apt-get install libjpeg8-dev

    -> virtualenv
    pip install --user jpegtran-cffi
    permalink -
    - http://www.diybookscanner.org/forum/viewtopic.php?f=35&t=3078
    epeg image python
  • Calling a function of a module from a string with the function's name in Python - Stack Overflow
    import foo
    methodToCall = getattr(foo, 'bar')
    result = methodToCall()

    ou : result = getattr(foo, 'bar')()
    permalink -
    - https://stackoverflow.com/questions/3061/calling-a-function-of-a-module-from-a-string-with-the-functions-name-in-python
    python
  • https://inventwithpython.com/chapters/
    d'après les comments de http://sametmax.com/quels-exercices-pour-debutants-en-python/
    permalink -
    - https://inventwithpython.com/chapters/
    python tuto
  • Manipulating PDFs with Python - Tutorial - Binpress
    permalink -
    - https://www.binpress.com/tutorial/manipulating-pdfs-with-python/167
    pdf python
  • Deep into Python
    des trucs pas si évidents en python...
    for ... else
    permalink -
    - http://sebastianraschka.com/Articles/2014_deep_python.html#else_clauses
    python
  • mitmproxy 0.11.3 - Introduction
    permalink -
    - http://mitmproxy.org/doc/index.html
    proxy python
  • 7. Camera Hardware — Picamera 1.10 documentation
    permalink -
    - http://picamera.readthedocs.org/en/latest/fov.html#camera-modes
    picamera python
  • Fledgling Polymath — Basic Authentication in bottle.py
    permalink -
    - http://fledglingpolymath.tumblr.com/post/39977900894/basic-authentication-in-bottle-py
    basicAuth bottle python
Links per page: 20 50 100
◄Older
page 3 / 10
Newer►
Shaarli 0.0.41 beta - The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net. Theme by idleman.fr.