Shaare your links...
3325 links
L!NKS Retour au blog Login RSS Feed ATOM Feed Tag cloud Picture wall Daily
Links per page: 20 50 100
◄Older
page 2 / 10
Newer►
188 results for tags python x
  • Découverte de l'interpréteur interactif IPython
    permalink -
    - http://eric-pommereau.developpez.com/tutoriels/introduction-ipython/
    ipython python
  • PEP 0008 -- Style Guide for Python Code | Python.org
    permalink -
    - https://www.python.org/dev/peps/pep-0008/#blank-lines
    memo python
  • Aller plus loin avec les hash maps en Python | Sam & Max
    permalink -
    - http://sametmax.com/aller-plus-loin-avec-les-hash-maps-en-python/
    dict memo python
  • Réagir à un changement sur un fichier avec watchdog | Sam & Max
    A creuser...
    permalink -
    - http://sametmax.com/reagir-a-un-changement-sur-un-fichier-avec-watchdog/
    python ut
  • Beautiful Soup Documentation — Beautiful Soup 4.4.0 documentation
    encoding guessing !

    from bs4 import UnicodeDammit
    dammit = UnicodeDammit("Sacr\xc3\xa9 bleu!")
    print(dammit.unicode_markup)
    # Sacré bleu!
    dammit.original_encoding
    # 'utf-8'
    permalink -
    - https://beautiful-soup-4.readthedocs.org/en/latest/#unicode-dammit
    beautifulsoup encoding python
  • comment installer python sous linux debian ubuntu, formation DIF python à Grenoble Lyon
    permalink -
    - http://www.rasadacrea.com/fr/cours-informatiques/comment-installer-python
    python
  • Extensions Registry | Flask (A Python Microframework)
    flask extensions :
       flask-Login
       flask_seasurf (anti CSRF)
       flask-sijax (AJAX)
       flask-uploads
       flask-WTF (forms with anti CSRF)
    permalink -
    - http://flask.pocoo.org/extensions/
    flask python
  • [Python] Python ctypes BigEndianStructure - Pastebin.com
    en lien avec : http://sametmax.com/lire-un-format-binaire-en-python-avec-struct/

    decode header with ctypes :

    import ctypes

    class Header_Decoder(ctypes.BigEndianStructure): # {
       _pack_ = 1
       _fields_ = [
           ('protocol_id', ctypes.c_uint8, 8),      # 1 byte:  byte 1,      bits 00-07
           ('segmentation', ctypes.c_uint8, 3),     # 3 bits:  byte 2,      bits 08-10
           ('transaction_type', ctypes.c_uint8, 5), # 5 bits:  byte 2,      bits 11-15
           ('packet_length', ctypes.c_uint32),      # 4 bytes: bytes 3-6,   bits 16-47
           ('checksum', ctypes.c_uint16),           # 2 bytes: bytes 7-8,   bits 48-63
       ]
    # } Header_Decoder

    HEADER_LENGHT_BYTES = ctypes.sizeof(Header_Decoder)

    packet = b'\xFF\x10\x00\x00\x00\x0C\x00\xE3\x48\x65\x79\x21'

    header = Header_Decoder.from_buffer_copy(packet[0 : 0 + HEADER_LENGHT_BYTES])

    print("Protocol ID:", header.protocol_id)
    print("Segmentation:", header.segmentation)
    print("Transaction type:", header.transaction_type)
    print("Checksum:", header.checksum)
    print("Data:", packet[HEADER_LENGHT_BYTES : header.packet_length].decode('ascii'))
    permalink -
    - http://pastebin.com/G7FjUJLh
    python
  • 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
Links per page: 20 50 100
◄Older
page 2 / 10
Newer►
Shaarli 0.0.41 beta - The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net. Theme by idleman.fr.