Python has a solid set tools to power web applications. The necessary knowledge lies in passing variables between python and jquery, however this can be hard to figure out. Here is a simple tutorial on how to send information between python and jquery to make python-powered web applications.
Note: If you are testing this on an OSX, place the html file in /Library/Webserver/Documents/.
3. Write the python script
#!/usr/bin/python
import cgi, cgitb
cgitb.enable() # for troubleshooting
#the cgi library gets vars from html
form = cgi.FieldStorage()
jquery_input = form.getvalue("stuff_for_python", "nothing sent")
#the next 2 'print' statements are important for web
print "Content-type: text/html"
print
#this is the actual output
print jquery_input
Note: Name the python script test.py. If you are testing this on an OSX, place the python script in /Library/Webserver/CGI-Executables/ (this is the cgi-bin).
Ernest Ramirez is a PhD student at the UCSD Center for Wireless Health Systems. Apart from designing new ways to keep people healthy, he has redesigned his own office into a body and mind workout station. Literally 6 feet away from my desk, he has set up a treadmill so that he says fit while doing his research. There are some cool things going on at UCSD’s CalIt2, but Ernesto and his active desk really stand out. He’s new to Tumblr, so if you are interested in the latest intersections between health and technology, I strongly recommend following him!
wellovations: Two and half years ago I took the plunge and went out an bought a treadmill. Not for exercise, not to run indoors. No, I bought a treadmill to work. Yes, that’s right. I bought a treadmill for work. I have done a lot of research and long ago decided that this was not just a good idea, it was a must-do idea. So after trading one crisp clean Benjamin for a older model treadmill, convincing my parents that I needed their extra desk, and whipping out the few tools I have I was able to build my treadmill desk. What is a treadmill desk? Well…
The addition of the proposed modifications to the Research Plan has been done in such a way as to be very confusing.
”
—
UCSD IRB
New prototype for a stimulus trigger board with fiber optic delivery triggers to check the monitor for the exact time the stimulus was displayed. I love my job.
We created new human’s organs that use brain wave sensor.
「necomimi」is the new communication tool that augments human’s body and ability.
This cat’s ear shaped machine utilizes brain waves and express your condition before you start talking.
Just put on 「necomimi」and if you are concentrated on, this cat’s ear shaped machine will rise. When you are relaxed, your new ears lie down.
If concentration and relaxing time comes at the same time, your new ears rise and move actively. In general, professional sport players demonstrate their abilities most in this condition.
If people show their feeling even they don’t express, what differences will be happened? Interesting? Ashamed? Scared?
In the beginning, people may feel strange, however people are getting accustomed to control their new ears by brain waves if they keep using. At this moment,「necomimi」can be part of your body.
It followed from the special theory of relativity that mass and energy are both a different manifestation of the same thing […] and very small amounts of mass may be converted into a very large amount of energy.
To preface, I want to make a note that an understanding of the electronic structure of the atom, requires an understanding of elementary quantum mechanics, and therefore falls more heavily within the domain of physics than general chemistry. Most textbooks simply state that there are four quantum numbers, and expect you to memorize them. If you agree with that method, stop reading, else take note of Richard Feynman’s words and read on.
The idea of quantum mechanics started with Max Plank (circa 1900), who wanted to understand more about how heat is converted into light. Although he knew energy emitted from a radiating black body was proportional to the fourth power of the temperature of the black body (Stefan-Boltzmann Law), and that the temperature was proportional to color (Wien’s Displacement Law). The problem was that the exact emission spectrum observed was not properly accounted for by the combination of these theories, and in fact, this discrepancy bothered and confused physicists so much that the problem is called the “ultraviolet catastrophe.”
To solve the problem, he made a model predicated on a few assumptions:
The energy is radiated from oscillators on the surface of the black body.
The energy of each oscillator is quantized, meaning that it is discrete and doesn’t exist between energy levels. E(n) = nhf, where n=shell number (the first quantum number). If you remember learning that electrons only exist in specific shells (and not in between shells), thats where it came from.
The oscillators transmit and absorb energy in distinct units by making a transition from one quantum state to another. For each transition, the energy absorbed or released is represented by E = hf
Boom! There it is, the fundamental idea behind quantum mechanics. Now you know why electrons don’t exist between levels…because then Max Plank wouldn’t have a job. Also, this explains how energy of an electron is calculated. The farther it is from the nucleus, the more potential energy it wants to release by returning back to the lowest shell. If that shell is occupied, then it retains its PE and has an energy corresponding to the shell number where it resides ( E(n) = nhf ).
The color of the laser is precisely tuned to energize a layer of sodium atoms found in one of the upper layers of the atmosphere — one can recognize the familiar color of sodium street lamps in the color of the laser.
This layer of sodium atoms is thought to be a leftover from meteorites entering the Earth’s atmosphere. When excited by the light from the laser, the atoms start glowing, forming a small bright spot that can be used as an artificial reference star for the adaptive optics. Using this technique, astronomers can obtain sharper observations. For example, when looking towards the center of our Milky Way, researchers can better monitor the galactic core, where a central super massive black hole, surrounded by closely orbiting stars, is swallowing gas and dust.
Taken with a wide angle lens, this photo covers about 180° of the sky.
This is one of the projects I am working on in the Machine Perception Lab. I just submitted it to Core77’s “Autism Connects” design challenge. I hope more people will learn about the wonderful things coming out of this lab and how this project will impact autism therapy.
Shigeru Kobayashi lives in Japan and has experienced the tsunami and nuclear power plant tragedy first-hand. Shigeru wanted a way that he could monitor the radiation levels at his home and compare them to other regions. So he bought a SparkFun Geiger counter and mated it to an Arduino board and a wireless LAN converter. He then interfaced the counter with Pachube.
This is an excellent example of how Arduino is changing our world by giving the ability to collect raw data, straight to developers and end users. Great job Shigeru!
The graph below is real time, and shows his LIVE geiger counts per minute (cpm) via Pachube’s embadable graph feature. (Hit refresh in your browser to see if it updated).
Doctors at Sunnybrook hospital in Toronto, Canada have taken interactive gaming to the next level when they hooked up a Kinect console to their medical imaging computer. Now when in the operating room, doctors can have direct access to MRI scans, without having to disinfect, leave the operating room, consult the scans, and then scrub back in. This hack allows them to virtually manipulate the scans and retrieve the necessary information by pulling it up on screen with a wave of their hand.
via victoriayoung: Colleen Jordan has conceptualized teeny adorable plants that you can wear as necklaces—the “Wearable Planters“—inspired by her Material Perception project in which she attempts to asks the question: “Do products shape the perception of a material, or vice versa?” So fresh.
I love my lab. Where else could I find engineering blend so well with neuroscience? The above photo was taken today at the UCSD Institute of Neural Computation’s Machine Perception Lab, where I work. I am going to talk about them more.
The photo is of a display that they have managed to construct in a matter of days from a hacked a flat screen TV and a small cluster of macbook minis. It looks like a whole project, but it’s only part of a demonstration. They are demonstrating our lab’s software that will take multiple video inputs and do everything from attentional scanning of a room to real time facial emotion detection. Their work is brilliant. I hope I can continue to learn from them.
Hi, my name is Dave. I try to combine art, engineering, and medicine in my work and research. I am currently part of an applied machine learning laboratory at the UCSD Institute of Neural Computation (Machine Perception Laboratory).