Re: Creating a reliable sandboxed Python environment

2015-05-30 Thread Modulok
While this thread is indeed a theoretical discussion of the interpreter, for a practical solution where you control the host environment, one might look into OS level sandboxing like FreeBSD's Jails (not to be confused with a simple chroot environment) along with various resource limiting parameter

OT - information theory thing...

2014-07-17 Thread Modulok
, but it is impossible to control *what* information flows. (Due to the possibility of nested encoding, stenography, etc.) Was this a Claude Shannon thing or Alan Turing or... I really don't recall. Thoughts? Cheers! -Modulok- -- https://mail.python.org/mailman/listinfo/python-list

Re: Algorithm that makes maximum compression of completly diffused data.

2013-10-30 Thread Modulok
etual motion machine or an inertial propulsion engine or any other classically impossible solutions. (This only applies to truly random data.) -Modulok- -- https://mail.python.org/mailman/listinfo/python-list

Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-17 Thread Modulok
uding what could otherwise have been useful bits of publicly available code - a charitable work of skilled labor - I think we will have lost something far more valuable than having a G-rated module index. That said, I appreciate and try to express professionalism in all that I do and encourage others to do the same but I also embrace the freedom of myself and others to choose - even if I think that choice is sexist and distasteful. I would rather experience the freedom of having the full latitude of life, decision and emotion, than to cower in fear of being offended by the world at large. To think that I would be capable of being offended by the arrangement of a glyph in a programming package index, is a ridiculous thought indeed. Yup. -Modulok- -- https://mail.python.org/mailman/listinfo/python-list

Re: building an online judge to evaluate Python programs

2013-09-23 Thread Modulok
+= 1 # Oops. In a well behaved iterator this should eventually # raise 'StopIteration'. I knew I forgot something. a = Foo() b = list(a) -Modulok- -- https://mail.python.org/mailman/listinfo/python-list

Re: building an online judge to evaluate Python programs

2013-09-21 Thread Modulok
ther process or even a process on another server watchdog your judge system. Send it a few test programs every x minutes. If it fails to respond with the expected results in the expected time frame - kill it and restart it. Test again. If it still fails consider it hacked (or broke

Re: semicolon at end of python's statements

2013-09-02 Thread Modulok
> But, more than that, it saves the zillions of hours of > time wasted arguing about which way is better. > XD Nice. That's about the best supporting argument I've heard. -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: semicolon at end of python's statements

2013-09-02 Thread Modulok
; Try maintaining a non-trivial body of JavaScript, or Perl (that you didn't write) for a while. You'll soon appreciate the One True Way of thinking lol. -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: password protect file

2013-06-30 Thread Modulok
total noob" attempting (real) security programming is a bad idea. -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Modulok
Have you looked into docopt? -Modulok- On Fri, Jun 28, 2013 at 7:36 PM, Ethan Furman wrote: > On 06/27/2013 03:49 PM, Steven D'Aprano wrote: > >> >> [rant] >> I think it is lousy design for a framework like argparse to raise a >> custom ArgumentError in one

Re: My son wants me to teach him Python

2013-06-12 Thread Modulok
comfortable with that. (Eww... but even it has good parts.) If you decide to get seriously invested in digital content creation software (i.e. Maya, etc) most of those are scripted in Python. Maya used to be all MEL (and the MEL interpreter is still supported) but most new code for proprietary tools

Re: How to Begin Web Development with Python ?

2013-06-01 Thread Modulok
start my development with. > > and > > does my plan of learning Web2Py is good for Web development and getting > > involved in the big projects like Django , MoinMoin Wiki , Plone. > > > > Modulok suggested using ORM software. ORM should not really be needed if > you ar

Re: How to Begin Web Development with Python ?

2013-05-31 Thread Modulok
worlds. I can define check constraints and enumerations and all the other goodies and have them match between database clients. If you don't already know this from scientific computing, learning some raw SQL is quite useful too! Sometimes you need a non-trivial query. -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: Cutting a deck of cards

2013-05-31 Thread Modulok
x27;s no real point.) There could be a lot of legitimate reasons though. -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way to count sequences

2013-04-25 Thread Modulok
nt) # Output looks like this: # Counter({(2, 4): 2, (4, 5): 1, (3, 4): 1, (2, 1): 1}) You then have access to methods to return the most common items, etc. See more examples here: http://docs.python.org/3.3/library/collections.html#collections.Counter Good luck! -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: django vs zope vs web2py

2013-04-21 Thread Modulok
gic. (Again we're going deeper.) Sometimes a backend-specific module is called for, in which case psycopg2 on postgresql is nice. The ability to use python context managers as transaction blocks is very clean. In short, how much do you want to learn? Do you prefer a top-down or bottom-up approach? Gritty details or elegant abstractions? -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: The usage of -m option of python

2013-03-18 Thread Modulok
ard library have no obligation to do anything useful, or even anything at all, if execute directly but you can use the same idea to execute modules as scripts from packages you create. -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: Store a variable permanently

2013-03-01 Thread Modulok
>> Installing and running a database for a single integer is like using a >> using a bulldozer for moving your keyboard half an inch to the left. I'd like to see that sometime XD -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is it impossible to create a compiler than can compile Python to machinecode like C?

2013-02-28 Thread Modulok
e you checked out PyPy? http://pypy.org/ -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGreSQL 4.1 released

2013-01-03 Thread Modulok
for general information. > > This version has been built and unit tested on: > - NetBSD > - FreeBSD > - openSUSE 12.2 > - Windows 7 with both MinGW and Visual Studio > - PostgreSQL 8.4, 9.0 and 9.2 32 and 64bit > - Python 2.5, 2.6 and 2.7 32 and 64bit This is good new

Re: Considering taking a hammer to the computer...

2012-12-31 Thread Modulok
input!") # You might consider telling your user why their input is # invalid. e.g: "rooms on floor must be greater than 10". rooms_on_floor = int(input("Enter the number of rooms on floor: ")) occupied_rooms = int(input("How many rooms on the floor are occupied?: ")) #CALCULATE OCCUPANCY RATE FOR FLOOR occupancy_rate = occupied_rooms / rooms_on_floor print ("The occupancy rate for this floor is ",occupancy_rate) -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: New to python, do I need an IDE or is vim still good enough?

2012-12-27 Thread Modulok
. I always end up back in a customized text editor and a *nix command shell. I prefer it. There's a lot of *very* skilled programmers in both camps. -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: Secretly passing parameter to function

2012-12-05 Thread Modulok
rgs, **kwargs) return framework.do(part) #<-- Call the simplified function. return f#<-- Return the function object to-be-called. # Usage: Just wrap your defs with the decorator '@pack': @pack def step1(x, y): print(x, y) @pack def step2(a): return sum(a) @pack def step3(): print("Amazing!") # Call your functions as usual e.g: step1(3, 5)... In theory everything should just work. I tested the above example and it seemed to work just fine with my limited testing. Good luck! -Modulok- -- http://mail.python.org/mailman/listinfo/python-list

Re: Web Frameworks Excessive Complexity

2012-11-21 Thread Modulok
rate a contractor's quality of workmanship and efficiency by the number of nails he drives? Of course not. That would be ridiculous. A better metric of code quality and complexity would be to borrow from science and mathematics. i.e. a peer review or audit by others working on the project or in the same field of study. Unfortunately this isn't cheap or easily computed and doesn't translate nicely to a bar graph. Such is reality. -Modulok- -- http://mail.python.org/mailman/listinfo/python-list