Skip to main content

Home/ Python Programming/ Group items tagged generation

Rss Feed Group items tagged

reckoner reckoner

TANGO Project - 0 views

  •  
    This is the Python wrapper for the solver. It calls the optimization solver (GENCAN for bound-constrainted problems and ALGENCAN for general nonlinear programming problems).
reckoner reckoner

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
reckoner reckoner

Parallelization on muli-CPU hardware? - comp.lang.python | Google Groups - 0 views

  •  > According to the fact that all Thread run on the same CPU (if i didn't  > understand wrong), i'm asking if python will suffer from the future  > multicore CPU. Will not python use only one core, then a half or a  > quarter of CPU ? It could be a serious problem for the future of python... I agree that it could potentially be a serious hindrance for cpython if "multiple core" CPUs become commonplace. This is in contrast to jython and ironpython, both of which support multiple-cpu parallelism. Although I completely accept the usual arguments offered in defense of the GIL, i.e. that it isn't a problem in the great majority of use cases, I think that position will become more difficult to defend as desktop CPUs sprout more and more execution pipelines. I think that this also fits in with AM Kuchling's recent musing/thesis/prediction that the existing cpython VM may no longer be in use in 5 years, and that it may be superceded by python "interpreters" running on top of other VMs, namely the JVM, the CLR, Smalltalk VM, Parrot, etc, etc, etc. http://www.amk.ca/diary/archives/cat_python.html#003382 I too agree with Andrew's basic position: the Python language needs a period of library consolidation. There is so much duplication of functionality out there, with the situation only getting worse as people re-invent the wheel yet again using newer features such generators, gen-exps and decorators.
reckoner reckoner

ONLamp.com -- Introduction to Stackless Python - 0 views

  • What's the relation between these benefits and Stackless's implementation details? Here's a quick sketch: Continuations are the general-purpose concurrency construct. A continuation represents all the future computations of a particular program. Capturing all this control flow in a single conceptual object makes it programmable: It becomes possible to calculate or reason over the control flow. In particular, there's great scope for optimizing assignment of different calculations to different processes or threads or even hosts.
reckoner reckoner

"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:
reckoner reckoner

Place n indistinguishable items into k distinguishable boxes - comp.lang.python | Googl... - 0 views

  • >     Generate all ways to place n indistiguishable items into k >     distinguishable boxes
reckoner reckoner

Psyco - Introduction - 0 views

  • In short: run your existing Python software much faster, with no change in your source. Think of Psyco as a kind of just-in-time (JIT) compiler, a little bit like what exists for other languages, that emit machine code on the fly instead of interpreting your Python program step by step. The difference with the traditional approach to JIT compilers is that Psyco writes several version of the same blocks (a block is a bit of a function), which are optimized by being specialized to some kinds of variables (a "kind" can mean a type, but it is more general). The result is that your unmodified Python programs run faster. Benefits 2x to 100x speed-ups, typically 4x, with an unmodified Python interpreter and unmodified source code, just a dynamically loadable C extension module. Drawbacks Psyco currently uses a lot of memory. It only runs on Intel 386-compatible processors (under any OS) right now. There are some subtle semantic differences (i.e. bugs) with the way Python works; they should not be apparent in most programs.
reckoner reckoner

SourceForge.net: pyExcelerator - 0 views

  • Generating Excel 97+ files with Python 2.4+ (need decorators), importing Excel 95+ files, support for UNICODE in Excel files, using variety of formatting features and printing options, Excel files and OLE2 compound files dumper. No need in Windows/COM
reckoner reckoner

Epydoc -- automatic Python documentation - 0 views

  • Epydoc is a tool for generating API documentation for Python modules, based on their docstrings. For an example of epydoc's output, see the API documentation for epydoc itself (html, pdf). A lightweight markup language called epytext can be used to format docstrings, and to add information about specific fields, such as parameters and instance variables. Epydoc also understands docstrings written in reStructuredText, Javadoc, and plaintext. For a more extensive example of epydoc's output, see the API documentation for Python 2.5.
reckoner reckoner

Charming Python: Functional programming in Python, Part 1 - 0 views

  • Document options Document options requiring JavaScript are not displayed Rate this pageHelp us improve this contentLevel: IntroductoryDavid Mertz (mertz@gnosis.cx), Applied Metaphysician, Gnosis Software, Inc. 01 Mar 2001Although users usually think of Python as a procedural and object-oriented language, it actually contains everything you need for a completely functional approach to programming. This article discusses general concepts of functional programming, and illustrates ways of implementing functional techniques in Python. We'd better start with the hardest question: "What is functional programming (FP), anyway?" One answer would be to say that FP is what you do when you program in languages like Lisp, Scheme, Haskell, ML, OCAML, Clean, Mercury, or Erlang (or a few others). That is a safe answer, but not one that clarifies very much. Unfortunately, it is hard to get a consistent opinion on just what FP is, even from functional programmers themselves. A story about elephants and blind men seems apropos here. It is also safe to contrast FP with "imperative programming" (what you do in languages like C, Pascal, C++, Java, Perl, Awk, TCL, and most others, at least for the most part).
reckoner reckoner

SAGE: Open Source Mathematics Software - 0 views

  • General and Advanced Pure and Applied Mathematics Use SAGE for studying a huge range of mathematics, including algebra, calculus, elementary to very advanced number theory, cryptography, numerical computation, commutative algebra, group theory, combinatorics, graph theory, and exact linear algebra.
‹ Previous 21 - 34 of 34
Showing 20 items per page