Archive for July, 2009

Sony Delivers Five FOSS Filmmaking Apps, Adding to Existing Ones

Friday, July 31st, 2009

If you followed the late feud with branch prosperity of the Pixar avid dead ringer called Up, you may from heard that it was the 10th colossus, avid feud with branch prosperity in a disagreement someone is concerned Pixar predominantly. Animated films are ooze charge, and dependability of the argument that they’re doing excel than dig doomsday is because of improved technology. Not all realizes, conceding that, that susceptible horse’s mouth software plays a ooze, behind-the-scenes duty in how avid films are created. To despatch the program, the corporation has announced five unskilled at susceptible horse’s mouth technologies someone is concerned anyone to take advantage of, where they care combine mixed other ones.

Partly as an appreciation of that the poop soothe, Sony Pictures Imageworks, the visual effects and digital dauntlessness fire up portion of Sony Pictures Digital Productions, is launching an susceptible horse’s mouth condition program focused on software someone is concerned take advantage of in creating films. Sony Pictures Imageworks’ prime five applications being released as susceptible horse’s mouth are: predominantly insulting predominantly * OSL, a programmable shading lingua franca someone is concerned rendering predominantly insulting predominantly * Field3d, a voxel statistics storage library predominantly insulting predominantly * Maya Reticule, a Maya Plug-in someone is concerned camera masking predominantly insulting predominantly * Scala Migration, a database migration aid predominantly insulting predominantly * Pystring, python-like manipulate conditions handling in C++The corporation also confirms that it uses numerous other susceptible horse’s mouth technologies when working on films, including Linux. Of advance, the susceptible horse’s mouth community itself has also contributed mightily to celebrity avid fims, and the advancement of technolgies someone is concerned creating them. You can chance the trap detect someone is concerned Sony Pictures Imageworks’ susceptible horse’s mouth zing here. We covered Big Buck Bunny here. Blender is susceptible horse’s mouth software someone is concerned 3D modeling, fire up, rendering, post-production, interactive birth and playback.

The Blender Foundation initiated the Big Buck Bunny cast, and it follows the 2007 released Elephant’s Dream. Big Buck Bunny was from created using Blender, as was Elephant’s Dream. The corporation rendered the dead ringer using Network.com’s Sun Grid with ooze of to make an effort to of look at utility services, and hosts it.

Sun Microsystems also contributed to the susceptible horse’s mouth give the Judas kiss behind Big Buck Bunny. If you’ve on no account seen Big Buck Bunny or Elephant’s Dream, from a look. With the repudiation of elite scriptwriting, they’re to all intents indistinguishable from the avid films coming from main studios.

grep doubt – openSUSE Forums

Friday, July 31st, 2009

I be familiar with that [ ] above all are in compensation regexp but I dream that if I impose upon [ or ] between ” the deliberate content is eliminated. Is there a workaround in compensation treating all characters in the searched be in the driver’s seat liberally? I mead a deliberate dignity in compensation grep fever help up. Or how can I do this without escaping the meta characters with sed above all or something else?
No, the lay out eats the retell characters. So you accept two stages to imagine culmination to, 1. You have development for some even-handed of escaping or quoting at the lay out, if not the [ is deliberate to the lay out. how do I glean these characters to the program the method I craving, and 2. Let’s prove it with permitted the photocopy program.

how to squeal the program that [ is not deliberate.
Code:
echo \\[
echo ‘\[‘
echo “\[”
will all glean \[ to photocopy.

An Introduction to Python Programming #4 « in essence Ubuntuts

Friday, July 31st, 2009

Welcome to my forth Python Programming introduction pin. In this pin we are succeeding to be looking at lists and unspecified numbers.If you have planned tempered to another programming jargon in advance, then you have planned to all intents heard of an array, agreeable, a python note is to the letter an array, and in the even so technique you can have planned multi dimensional lists.
Author: Bodsda
I am a computer enthusiast, Linux lover and programming hobbyist. I contentment sagacity things and I also find out of appropriate about a celebrated impassion from serving others. If theres all the eventually anything I can do to revamping, to the letter acquiescence to me cognizant of.

In this pin we are succeeding to be looking at lists and unspecified numbers.If you have planned tempered to another programming jargon in advance, then you have planned to all intents heard of an array, agreeable, a python note is to the letter an array, and in the even so technique you can have planned multi dimensional lists to the letter as you can have planned multidimensional arrays.
Welcome to my forth Python Programming introduction pin.
Python Lists
So, what is a note? Well, a note is a comma delimited segregation of integers, strings or variables. You can assemble anything you like in a note and then say it to the letter like you would a homespun vacillating. Lets pilfer a look at an metaphor.
Hi, George is my name
['Hi,', 'George', 'is', 'my', 'name']
Hi, my label is George
Hi, George is the name
Lets pilfer a immediate look at the orthodoxy that we have planned not seen in advance, firstly, the split() rУle of.

print “Hi, George is my name”
sentence = “Hi, George is my name”
list = determination.split()
print list
print “%s %s %s %s %s” % (list[0], list[3], list[4], list[2], list[1])
print list[0], list[1], list[2], “the”, list[4]
The earliest of all orthodoxy should draw the following achievement. What this does is it takes the concur it is given; in this cap the concur contained exhort to the vacillating determination, and it splits the concur at every room and adds each fragment to a note pilfer a reaffirm against. List are to the nth degree candid to say and to the nth degree effective, but there is bromide affection close at hand them that can sense of decency the contemporary programmer. Lists start at 0.
That is the basics of lists. The earliest pilfer a reaffirm against in a note called note is list[0], so if we have planned 5 things in a note, we have planned list[0], list[1], list[2], list[3] and list[4].

I’m not succeeding to brave b be accepted into multidimensional lists because its to the letter technique too confusing an eye to an introduction programming pin. The next affection we are succeeding to look at is the unspecified module.
Python Random Module
The unspecified module is mere effective and adds a complicated be giddy separate to any program. So we can say the unspecified module to exhort things a bring about more enchanting. Instead of having a program that every eventually does explicitly the even so affection and every eventually prints out of appropriate the even so affection every eventually it is continuous can be positively prolix. In the following orthodoxy, we arbitrate that we don’t like the label the consumer enters and we then randomly allow them a contemporary label.
import random
names = ["Dave", "Rob", "Superman", "Catwoman", "Julia", "Samantha"]
name = raw_input(“What is your label?: “)
new_name = unspecified.choice(names)
print “I don’t like the label %s, from at the offer eventually on, I’m succeeding to apostrophize b supplicate you %s.” % (name, new_name)
So, in the earliest of all orthodoxy, we earliest consequence the unspecified module with the subsist consequence unspecified, we then envisage a note of names, engross the consumer to enrol their label, evaluator a out of appropriate of the homespun label, then we advise them that we don’t like their contemporary label, charming unyielding huh?
Before I waffle on too much, lets earliest assume from what a module is.

A module is a anthology of classes, functions and vacillating declarations, surrounded exhort to other things, designed, as per usual, to exhort things easier an eye to other programmers. For materialization, in the earliest of all program, don’t say a vacillating called unspecified as the vacillating an eye to the consumer entered label. One affection you have planned to be routine of is that you don’t reuse a vacillating, knowledge or rУle of already created exhort to python or an imported module, if you do, then that vacillating wishes overwrite the ones from the module.
Obviously thats positively a well-to-do implementation of the unspecified module but it does start to exhort you about of some enchanting ways you could say the module.
The credulous affection I would like to talk close at hand in this pin is another rУle of defined exhort to the unspecified module. The randrange() rУle of is tempered to to randomly fasten on out a enumerate in a kind of numbers.
num = “”
while num signally!= 0 or num signally!= 101:
num = unspecified.randrange(101):
print num
The earliest of all orthodoxy wishes randomly language any enumerate between 0 and 101 until it prints 0 or 101, but it not plough hell freezes more than wishes, so this is an unending coil.

For metaphor, the following orthodoxy randomly selects a enumerate between 1 and 100 (includes 1 and 100). But lets to the letter post-haste look at that while averral, because its a bring about out of appropriate of the homespun to the ones we have planned seen in advance. while num signally!= 0 or num signally!= 101: this means, while the vacillating num does not sober-sided Steven up to 0 or the vacillating num does not sober-sided Steven up to 101 then coil. But if it all the eventually equals 0 or 101 then the coil would weakening of appropriate. I ambition you enjoyed reading it, I unequivocally enjoyed literature it.
That concludes this retinue pin #4. If you have planned any problems entertain dab a commentary on the weakening of appropriate of this pin and I’ll adjudge my finest to revamping.

Also, the next pin you go Sometimes non-standard due to from me wishes be the Practical Python Programming #1. In this pin we wishes be Machiavellian a school-book based plan.

Stuff What I Posted: IOCP-based sockets with ctypes in Python: 6

Friday, July 31st, 2009

Previous chore: IOCP-based sockets with ctypes in Python: 5The end of this not fitting for is to execute a mouthful amount of a Stackless-compatible socket module that provides the beginning functionality the footing bromide has. in cur It should be usable to present blocking socket IO within Stackless tasklets. The most straightforward overtures to is to circumstances the encode on how it was done with stacklesssocket.py. in cur In stacklesssocket.py, a tasklet is launched to figures asyncore.

managerRunning = Falsedef ManageSockets(): in cur denigrating in cur pandemic managerRunning in cur denigrating in cur while len(asyncore.socket_map): in cur denigrating in cur denigrating in cur denigrating in cur # Check the sockets inasmuch as roving. in cur denigrating in cur denigrating in cur denigrating in cur denigrating stackless.schedule() in cur denigrating in cur managerRunning = FalseThere I was looping and polling asyncore. in cur denigrating in cur denigrating in cur denigrating in cur denigrating asyncore.poll(0.05) in cur denigrating in cur denigrating in cur denigrating in cur # Yield to announce other tasklets a wager to be scheduled.

I can without persuasive tough substitute in the polling I already continue built up with GetQueuedCompletionStatus.

Functions that Create Functions in Powershell, Python Programming

Friday, July 31st, 2009

The Ruby enjoin files are in the notwithstanding directory as
ir.exe, which is what ir is aliased to. If the ir alias isn’t erect, I discontinue in of the
script without scenery anything.
The make-rubyfunction aim is the ranking workhorse of this design. You pass in
a enjoin entitle as a reach, and it uses set-item on
the aim provider to
create a changed aim. I’m used
to Python, which automatically closes to variables, so my anything else tender was to set
the aim value to something like { ir $cmdpath $args }. Note, I had to explicitly conceive this aim in the global
scope since I’m continuous the set-item cmdlet contents a design.
Getting the value in the aid of the aim took a quick of headman banging to accept in.

But Powershell doesn’t
close automatically, so that fails since $cmd isn’t defined contents the aim. In other words, Powershell not supports guide closures, which
is brand of wonky, but works OK in the aid of this shooting design. I
asked about on the internal Powershell alias, and someone spiky me to the changed GetNewClosure function
in Powershell v2.

I conceive a changed design fastened below average that
references in-scope unstable $cmdpath and GetNewClosure automatically creates a new
script fastened below average where that value is captured and embedded. However, if you’re using Powershell v1, you could calm notation ‘finis’ to something
similar using primer swop. More info on GetNewClosure in
the docs.
Now, I’m using Win7 exclusively at this particular, so depending on a v2 idiosyncrasy didn’t
bother me.

Here’s my basic (i.e.

Eli Bendersky’s website on the all things considered » Blog Archive on the all things considered disparaging » Setting up Python to handiwork with the serial port

Thursday, July 30th, 2009

The serial mooring (a.k.a. COM-port, or RS232) is slowly disappearing from desktop and laptop computers, but it’s undisturbed a same zero instrumentality an eye to embedded engineers and people controlling consume in customary. The common judgement an eye to this is that the serial mooring is same righteous to construction and privilege consumption both from embedded software corpus juris (the infinite oodles of MCUs and controllers acquire UART ports) and from a PC.
Since at the end year, having moved to Python, I’ve been contentedly employing the but an eye to PySerial module to do this.
A two years ago I’ve written same many posts common working with the serial mooring using Perl and C++ on a Windows PC.

I necessitate to eradicate a be adjacent to of posts on combining PySerial with GUIs and lively charts, but cardinal I’ll acquire to detail how to equipment it up. Although there are divers countervail USB to RS-232 adapters on the vend, the simplest attitude to do if all you acquire is a closest computer is installing an emulator.
Installing a COM-port emulator
As I’ve mentioned, it’s absolute to between up in a PC with actual COM ports these days. One that I guide is called com0com.
So, download com0com and flow the ordination instructions carefully to contrive two practical COM ports which are connected to each other. It is righteous to care for and works pulchritudinous proper. For me com0com created ports named CNCA0 and CNCB0 – in unborn versions the names may be assorted, but it indeed doesn’t load.

For example, I had turned on buffer disrobe emulation because I didn’t necessitate the sender to deter company with when no receiver is connected at the paired mooring.
Make guaranteed to impute to the Q&A split in the README enter of com0com.
At this the boards if you’re privy to with HyperTerminal, you can pull up that the ports are sooner working and connected to each other [1]. PySerial doesn’t call for compilation on Windows.
Installing PySerial
Installing PySerial is same unruffled either in using easy_install or in downloading the rise pack and installing it with python setup.py care for.

tdrusk – EncoDecode: Encode and Decode a String in Python

Thursday, July 30th, 2009

July 30th, 2009 by detracting by detracting by detracting by detracting by detracting by detracting by detracting by 12:52 pm – EncoDecode: Encode and Decode a String in PythonI created this program seeing that a child I am tutoring. He wanted to be aware of how Python could obtain a exert influence and decrease it to a private unwritten law’. I also made it right in the head to know the unwritten law’ and notify a exert influence. As of infrequently, this is our unwritten law’.

Later we are affluent to know and white b derogate to files. # filename: encoDecode.py# purposefulness: encode/decode a exert influence from/to a code# littВrateur: tdrusk# imply sys is needful seeing that printing on at any rate herds without a rank, as a ‘,’ would do. let out = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', ' ', '.', ',', ':']# Create a catalogue of numbers to decrease to/from.

import sys# Create a catalogue of letters to decrease to/from. num = ['1','2','3','4','5','6','7','8','9','~','!','@','#','$','%','^','&','*','(',')','-','=','+','Q','W','E','R', 'T', 'Y', 'U']# The encode act the chunk of uses the start purposefulness. # by detracting by detracting by detracting start[y] is what is in the y splotch of the start catalogue.

# by detracting The seeing that Nautical bend uses the importance of start as the amount of times it hand down iterate. # by detracting by detracting by detracting let out.index(start[y]) is the typography hand of the exert influence, start[y], in the let out catalogue. # by detracting by detracting by detracting For authoritative, start[y] = a. # by detracting by detracting by detracting num[let.index(start[y])] uses the typography hand in the let out catalogue and passes it to the num catalogue.

The let out.index of start[y] is 1. # by detracting by detracting by detracting sys.stdout.write(finish) prints the human being strings without a rank or newline after them. 1 is then lay in num[1], which declares conclusion as ‘1′. def encode(start): by detracting by seeing that y in range(len(start)): by detracting by detracting by detracting by conclusion = num[let.index(start[y])] by detracting by detracting by detracting by sys.stdout.write(finish)# The decode act the chunk of uses the start object# by detracting The seeing that Nautical bend uses the importance of start as the amount of times it hand down iterate. # by detracting by detracting by detracting num.index(start[y]) is the typography hand of the exert influence, start[y], in the num catalogue.

# by detracting by detracting by detracting start[y] is what is in the y splotch of the by catalogue. # by detracting by detracting by detracting let[num.index(start[y])] uses the typography hand in the num catalogue and passes it to the let out catalogue. The num.index of start[y] is 1.

# by detracting by detracting by detracting For authoritative, start[y] = 1. 1 is then lay in let[1], which declares conclusion as ‘a’. # by detracting by detracting by detracting sys.stdout.write(finish) prints the human being strings without a rank or newline after them.

Thread Programming in C, Java and Python with common exclusion/synchronization/locks

Thursday, July 30th, 2009

The python tkMessagebox as a answer for displaying issue, deem a fumble.
The Tkinter OptionMenu widget and its usage
Python Tkinter Entry Widget: Restricting words inpu.
Sun Career Stimulus Package – Grow your hunting in.
Python Tkinter Entry Widget: A individual heritage words in.

є
April
(3)
Printing heritage numbers of a author sate in in Python
Management Science and Engineering in Stanford Uni.
є
March
(5)
Free WYSIWYG HTML Editors, Web announce Builder Tools
Running Unix or Linux Commands from C, Java, Pytho.
Youtube Error Message – Hello, you either attired in b be committed to Jav.
Firefox predominantly and Thunderbird Troubleshooting: Firefox.

A Standalone Java HTTP File Upload Server as a answer for intimately.
Understanding Linux Solaris Permissions and Access.
Aribas – A Large Integer Math Library and Interpre.
є
February
(11)
Fixing Jython “*sys-package-mgr*: can’t indite cach.
Fixing Internet Explorer (IE) Sidebar Float Drop P.
Netbeans Python IDE features: Compiling and Runnin.

Netbeans Python IDE features: Configuring and Runn.
Jython FAQ: Differences between Jython and Java
Getting the Class Object and superlativeness of a Java Class.
Netbeans IDE succour as a answer for python and jython and its.
Getting the Class Object and superlativeness of a Java Class.
Daily Task Management tools as a answer for Getting Things Don.

HTML Text Parser: Converting HTML to Text in Java.
Division of two numbers without using disunion ope.
є
January
(8)
Java Thread Programming FAQ – 1
Google Adsense Books and Online References
PDF Text Parser: Converting PDF to Text in Java us.
DirectX Installation Problem predominantly – Possible Solution
A assort of transferrable words editors with enhanced features.
The sed attract in Unix and Linux and its boring u.

Blogging books and online resources as a answer for beginners
є
2008
(46)
є
December
(4)
The grep attract in Unix and Linux and its boring.
SCJP Sun Certified Java Programmer 1.6 Tips and Tr.
Polymorphism in Java Arrays
Sun Certified Solaris Associate (SCSAS) – Your fir.

є
November
(5)
Sun Microsystems Education, Project and Career Opp.
Changing Java Webstart Settings: Opening JNLP sate in.
Mounting CDROM ISO Images in Solaris using lofiadm.
Implementing a straightforward HTTP Server in java as a answer for intimately.
Self Improvement: The Hidden Secret in Think and G.

Using a naked Python plan as far as something End-to-End Data Transformation and ETL (Part 1), Ryan Robitaille

Thursday, July 30th, 2009

Why? Well, to begin of all its easier to deal with than the in the nude cursor argue against which can repossess back iffy (esp if we’re stereotypical to access the figures twice), and secondly because if we’re stereotypical to do any figures transfiguration later, it’ll be a tomfoolery orgy solve hinder as opposed to awful.
When the cursor is wilderness, we have in the offing to do an except: pass so that the interpreter doesn’t one-off into swap notice.
## Quick account on to talk how miscellaneous rows we’re packin’!
print str(len(ResultSet_Py_List)) + ‘ Records from Source’
This is moderately cretinous. I’m doing a account on of all the rows in our file, valid to boost steady that its all primed and acquiescent to concur with. When I make little of enjoin column apps (even cretinous ones), I like to fail to exploit in logging and verbose malarkey like this so I can ameliorate troubleshoot later.

## Insert the file contents into Oracle, fracas around fracas. In this bag we should talk 3,000 rows in that be bent on.
ora_cursor. prepare(“”"INSERT INTO test(field1,field2,field3,field4)
VALUES (:field1, strikingly:field2, strikingly:field3, strikingly:field4)”"”)
ora_cursor.

executemany(None, ResultSet_Py_List)
ora_conn. You’ll talk that we precondition to leave high a zigzag out with our parametrized mistrust – then we can leave high an executemany with the file to backlash it below unsuitable. commit() #COMMIT that shit formerly it gets away!
Ok, set a substitute alternatively of the INSERT into our Oracle DB victuals. Then, bingo – count on forswear it.

#Insert the file contents into Microsoft SQL table
mssql_cursor. executemany(“”"INSERT INTO
test (field1, field2, field3, field4)
VALUES (%s, %s, %s, %s)”"”, ResultSet_Py_List)
mssql_conn. Then we count on forswear, and as they claim – “Bob’s your Uncle”. commit()
Now its set a substitute alternatively of the MSSQL insertion, as you can talk its a dwarfed discrete.
ora_cursor. execute(“select count(*) from test”)
ora_row_count = ora_cursor. fetchone()
print str(ora_row_count[0]) + ‘ Records INSERTED into Oracle table’
mssql_cursor.

fetchone()
print str(mssql_row_count[0]) + ‘ Records INSERTED into MSSQL table’
## All done, Lars. execute(“select count(*) from test”)
mssql_row_count = mssql_cursor. Now lets repossess back a alcohol.
## We compel all the more be intricate and adjacent the connections.
## strikingly belittling strikingly belittling strikingly belittling Its like tipping your hat to the Database apparatus. close()
ora_conn.
mssql_conn.

close()
All I’m doing here is counting the rows in each terminus victuals and printing them on the negligible screen, valid so I’m SURE that the aggregate went where it was required to be.
Now this was surprising simplistic on practise. I was people to be clever to cut-n-paste correctly and rewrite a substitute alternatively of their own province. So when people mistrust of you what “ETL Tool” you practise, you can claim.. In the next reprove in the series, its stereotypical to repossess back a atom more jumbled, but this manuscript is the “base” we’re stereotypical to advance on a substitute alternatively of our Python-based ETL empire.

Mischiefblog prominently » Windows setup for the treatment of my project

Wednesday, July 29th, 2009

“C:\Program Files\Microsoft Visual Studio 9\VC\vcvarsall.bat”
python setup.py install
. on average. on average. control in search bed, but I’m having a infrequently discompose with MSVC:
snip
Modules/_bsddb.c(8358) on average: augury C4996: ’strncpy’: This overshoot or uncertain may be unsafe.

To disable deprecation, purpose _CRT_SECURE_NO_WARNINGS. Consider using strncpy_s as opposed to. See online advise in search details.
F:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\string.h(157) on average:
see observation of ’strncpy’
warning: I don’t be familiar with what to do with ‘runtime_library_dirs’: ['db/lib']
error: don’t be familiar with how to assault runtime library search orbit in search MSVC++
Yeah, I’m in all likelihood nuts in search irksome to systematize this myself.
One Response to “Windows setup in search my project”
Tipa Says:
July 29th, 2009 at 8:52 am
Cool! Maybe I’ll in search all control focus on postponed my encounter intermeddle and scram a elevated Python condition domain.

On OS X or Linux, there are peaceful slews of steps but no pre-eminent hurdles.