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
, 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
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
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
+= 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
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
> 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
;
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
total noob" attempting (real) security programming is a bad
idea.
-Modulok-
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
x27;s no real
point.)
There could be a lot of legitimate reasons though.
-Modulok-
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
>> 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
e you checked out PyPy?
http://pypy.org/
-Modulok-
--
http://mail.python.org/mailman/listinfo/python-list
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
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
. 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
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
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
24 matches
Mail list logo