Skip to main content

Home/ Groups/ Python Programming
1More

Chapter 14. Test-First Programming - 0 views

  •  
    good introduction to unit-testing
1More

12. Writing a C extension to NumPy - 0 views

  • There are two applications that require using the NumPy array type in C extension modules: Access to numerical libraries: Extension modules can be used to make numerical libraries written in C (or languages linkable to C, such as Fortran) accessible to Python programs. The NumPy array type has the advantage of using the same data layout as arrays in C and Fortran. Mixed-language numerical code: In most numerical applications, only a small part of the total code is CPU time intensive. Only this part should thus be written in C, the rest can be written in Python. NumPy arrays are important for the interface between these two parts, because they provide equally simple access to their contents from Python and from C. This document is a tutorial for using NumPy arrays in C extensions.
2More

Python keyword arguments [python] [parameters] [kwargs] [arguments] - 0 views

  • This is something I always forget how to do, and it's kind of hard to Google or search the Python docs because you can't search for **.The point is, when using **kwargs, you have to use the ** prefix not only in the function definition, but also in the call, prefixed to the variable you want to use as a keyword dictionary.
  •  
    want to pass keyword dictionary as keyword arguments
2More

Human-Readable Encryption Keys - 0 views

  • in PyCrypto: >>> key = os.urandom(16) # Generate 16 random bytes (128 bits) >>> bin_to_hex(key) # Show the key in hex (32 characters) '61aa60e43a5e7fdb4b86a4897b52a0dc' >>> y = RFC1751.key_to_english(key) >>> y # Show the pass phrase version of the key 'BUSY BARN RUB DOLE TAUT TOOK ALTO PRY KIT WALL MUG CURT' >>> # The transformation is always reversible >>> bin_to_hex(RFC1751.english_to_key(y)) '61aa60e43a5e7fdb4b86a4897b52a0dc'
  • Human-Readable Encryption Keys
1More

Winpdb - A Platform Independent Python Debugger » Documentation - 0 views

  • Winpdb is a platform independent GPL Python debugger with support for multiple threads, namespace modification, embedded debugging, encrypted communication and is up to 20 times faster than pdb.
1More

ulipad - Google Code - 0 views

  • UliPad uses Mixin and Plugin technique as its architecture. Most of its classes can be extended via mixin and plugin components, and finally become an integrity class when creating the instance. So UliPad is very dynamic. You can write the new features in new files, and hardly need to modify the existing code. And if you want to extend the existing classes, you could write mixins and plugins, and this will be bound to the target class that I call "Slot Class". This technique will make the changes centralized and easily managed.
1More

dkbza - TeXmacs Python - 0 views

  • A 'Mathematica Notebook' styled interface to Python from within TeXmacs. Blocks of code can be run independently of their order, and full multiline blocks, i.e. function remain visible and easily modifiable.
3More

ASPN : Python Cookbook : Permutation and Combination Enumerator - 0 views

  • def comb(items, n=None): if n is None: n = len(items) for i in range(len(items)): v = items[i:i+1] if n == 1: yield v else: rest = items[i+1:] for c in comb(rest, n-1): yield v + c
  • def perm(items, n=None): if n is None: n = len(items) for i in range(len(items)): v = items[i:i+1] if n == 1: yield v else: rest = items[:i] + items[i+1:] for p in perm(rest, n-1): yield v + p
  • Permutation and Combination Enumerator
2More

Pypar -- parallel programming - 0 views

  • Pypar does not require the Python interpreter to be modified or recompiled: Parallel python programs use the standard Python and need merely import the pypar module. This means for example that you can upgrade Python independently of your parallel codes.
  • Pypar is an efficient but easy-to-use module that allows programs/scripts written in the Python programming language to run in parallel on multiple processors and communicate using message passing. Pypar provides bindings to an important subset of the message passing interface standard MPI. Other Python MPI bindings available from other developers include: PyMPI, Scientific Python and pythonMPI.
1More

pyeuclid - Google Code - 0 views

  • Vector, matrix and quaternion classes for use with 2D and 3D games and graphics applications. Compatible with Pygame.
2More

6.5.1 Itertool functions - 0 views

  • 6.5.1 Itertool functions The following module functions all construct and return iterators. Some provide streams of infinite length, so they should only be accessed by functions or loops that truncate the stream.
  •  
    good examples
1More

blog.bjrn.se: TrueCrypt explained - 0 views

  • he most popular cryptographic software for Windows is probably TrueCrypt. In this article I will explain how TrueCrypt works and as a by-product a working Python implementation will be provided. This article is written from a programmer perspective and the math will be kept to the minimum. The emphasis is on how TrueCrypt uses cryptographic primitives such as AES and SHA-1, not how the primitives themselves work.
2More

pyscripter - PyScripter Development Site - 0 views

  • PyScripter is a free and open-source Python Integrated Development Environment (IDE) created with the ambition to become competitive in functionality with commercial Windows-based IDEs available for other languages. Being built in a compiled language is rather snappier than some of the other Python IDEs and provides an extensive blend of features that make it a productive Python development environment. 
  •  
    PyScripter is a free and open-source Python Integrated Development Environment (IDE) created with the ambition to become competitive in functionality with commercial Windows-based IDEs available for other languages. Being built in a compiled language is r
1More

pyscripter - Using matplotlib with PyScripter - 0 views

  • interpreter:>>>import matplotlib>>>matplotlib.interactive(True)>>>matplotlib.use("WXAgg")>>>from matplotlib.pylab import *>>>plot([1,2,3])>>>xlabel('time (s)') 
2More

pyscripter - Google Code - 0 views

  • PyScripter is a free and open-source Python Integrated Development Environment (IDE) created with the ambition to become competitive in functionality with commercial Windows-based IDEs available for other languages. Being built in a compiled language is rather snappier than some of the other Python IDEs and provides an extensive blend of features that make it a productive Python development environment.
  •  
    excellent windows-based IDE
1More

Testoob - Python Testing Out Of The Box - About - 0 views

  • Testoob is an advanced unit testing framework for Python. It integrates effortlessly with existing PyUnit (module ‘unittest’) test suites.
3More

Index of /Individu/pointal/python/pqrc/versions - 0 views

  • PQRC-2.4-A4-latest.pdf 30-Apr-2007 14:02 599K
    • pagetribe .
       
      Python 2.4 Quick Reference Card
  •  
    Python 2.4 Quick Reference Card
1More

"n choose m" module - 0 views

  • """ a class for generating permutations from an array # choose 2 letters from 'abcd' c = Chooser(['a', 'b', 'c', 'd'], 2) while c.hasMoreElements(): print c.next() """ import time, copy class NoMoreChoices(StandardError): pass class Chooser:
« First ‹ Previous 61 - 80 Next › Last »
Showing 20 items per page