Dǝve Derıso

Python can be cross-compiled as an objective-c application (a native OSX app) using a neat little utility called “py2applet.” Py2applet works off of the “pyobjc” bridge, supports Tkinter, and can quickly be implemented with a few commands on in the terminal.

Here are the steps: (Everything is done in terminal)

1. Download “pyobjc”

easy_install pyobjc==2.2

Note: You will most likely get an error when you try to run pyapplet after you install it. This has something to do with the native copy of python on OSX missing the proper files. To solve the problem, run the following copy.

cp /Library/Python/2.6/site-packages/py2app-0.5.2-py2.6.egg/py2app/apptemplate/prebuilt/main-fat \
/Library/Python/2.6/site-packages/py2app-0.5.2-py2.6.egg/py2app/apptemplate/prebuilt/main-i386

2. Write your python script

Try this example. Copy the code below into textedit and save it as “example.py”.

#!/usr/bin/python
import sys
from Tkinter import *
root = Tk()

def setUpGui():
	gui_title_text = Label(root, text="Type Something Below:")
	gui_title_text.pack()
	global gui_input_text 
	gui_input_text = Entry(root, width=50)
	gui_input_text.focus_set() 
	gui_input_text.pack()
	gui_button = Button(root, text="Show Text", width=10, command=showOutputText)
	gui_button.pack()
	root.mainloop()

def showOutputText():
	gui_output_text = Text(root)
	gui_output_text.insert(0.0, gui_input_text.get())
	gui_output_text.pack()

setUpGui()

Then try executing it in python.

python example.py

If this works, continue to step 3 and compile the app. Here’s how it should look:


3. Create a makefile and then compile the app

py2applet --make-setup example.py
python setup.py py2app -A
Note: If you change your code and need to recompile, it’s good practice to delete your makefile, dist folder, and build folder before repeating this step.

Try running the app, and if it works, viola! you have a binary version of your python script, ready for distribution!

I'm an undergraduate bioengineering student and neural engineering research assistant who is just beginning to consider applying for a Fulbright or Whitaker award. Since I'm interested in work similar to yours (neural engineering or computational neuroscience with a practical, clinical application) I was wondering if you knew of any international institutions that I might want to consider in my search. Also, thanks for creating the best neural engineering blog on tumblr!
--recalculate-restate-reverberate

Dear RRR,

Thanks for shouting out! There are a ton of options. However, as you probably know by now, neural engineering programs generally lack marketing and can be difficult to find. If you go to the SFN website, you can look for schools that were presenting posters or giving talks. Generally, these are the schools you want to join…the ones who are doing things. Apart from that, there are a few other sources, such as the massive, two volume neural engineering text’s author index, that can provide clues. Frankly, the best guide is your own intuition; if you like their work, apply.

Here is a short, but by no means exhaustive list of international progams that have at least something to do with neural engineering:

  • Institute for Neuroinformatics, Zurich, Switzerland
  • University of Western Sydney, Australia
  • University of Cape Town, South Africa
  • University of Cambridge, United Kingdom
  • University College London, United Kingdom
  • Otto-von-Guericke University, Germany
  • Fraunhofer Institute for Reliability and Microintegration, Germany
  • University of Lund, Sweden
  • University of Newcastle, United Kingdom
  • National Institute for Physiological Science, Okazaki, Japan
  • Center for Neuroprosthetics, Lausanne, Switzerland
  • Universitätsklinik für Neurochirurgie, Tübingen, Germany
  • University of Luebeck, Germany
  • Max Planck Institute for Human Cognitive and Brain Sciences, Leipzig, Germany
Cheers, and best of luck with your scholarship apps!!
Here is my contribution to the open source community. The project has been my passion for the past few years. Now, I am sharing my work on sourceforge. Please tell everyone you know who may be interested. We need members and contributors.

http://sourceforge.net/p/opensensors/home/

Here is my contribution to the open source community. The project has been my passion for the past few years. Now, I am sharing my work on sourceforge. Please tell everyone you know who may be interested. We need members and contributors.

http://sourceforge.net/p/opensensors/home/

meme-meme:

Artist Jason Freeny created a fully functional Rubik’s Cube puzzle shaped like a brain. (via Neatorama/Super Punch)

meme-meme:

Artist Jason Freeny created a fully functional Rubik’s Cube puzzle shaped like a brain. 
(via Neatorama/Super Punch)

(Source: meme-meme, via quantum-dot)

Here are a few counter-intuitive ideas that have changed the way I see the world:

  1. the x factor
    Despite your best predictions, you have no way of knowing what you will find along the way. Do things (like go to grad school) not because you know what to expect, but because you don’t know. Give yourself a chance to find out about those wonderful things you hadn’t considered. Who knows what doors will be revealed.

  2. action creates attitude
    Going to the gym is the best treatment for depression, yet no depressed people want to go to the gym. The funny thing is, the more they go, the better they feel about it. The action itself creates the attitude. I use this to force myself to study, and after  awhile, I like the studying better.

  3. fail early, fail often
    If you are not failing, you are not trying hard enough. Failing is good because you can tell that you are pushing yourself past your own limits. 

  4. your imperfections
    If you hadn’t made mistakes you made, you wouldn’t be the person you are. Perspective is gained by experience, and wisdom is measured by winters.

  5. the present moment
    Negative thoughts force themselves onto your mind. Even when you try to distract yourself they try to come back, and you can observe them doing this. The idea is to pay attention to the present moment and ask youself, “is there a problem right now?”

  6. the fundamental attribution error
    If you make an error its because you are an idiot. If I make an error, its because I was distracted. We attribute inherent criticisms about others, but use situational excuses about ourselves.

  7. don’t be personally invested
    Don’t ever get offended in an argument or let someone get the best of you. It’s not about you, and you should really be bigger than that. Stay impartial, you are not your ideas.

  8. build yourself on your passions
    If you build your self-image on a relationship, you will not survive the breakup. If you build it on a job, you will not survive the lay-off. Build yourself on a rock made from your own passions. No one can take art, music, and philosophy away.

  9. politics are real
    If you believe that no one wants to control you, think again. The world is full of different sorts of people, some of them are addicted to power. Never give too much power to anyone, including your friends.

Sources:
2,6. Social Psychology
3. Javier and Nick at the MP Lab
5. The Power of Now
9. The 48 Laws of Power
1,4,7,8. Dave Deriso

Normally I’m skeptical of conspiracy theories, but this the real deal. US companies, some contracted by the Justice department, are paying top dollar to run smear campaigns on Wikileak supporters.

The two main question I have are:

  1. Should these groups be able to do business? Isn’t this completely illegal?
  2. Is it legal for the Justice Department to authorize smear campaigns?

Calling their work “proactive tactics,” these “professionals” will do everything from getting info about your children to coding viruses and planting them on your computer. Here is the story:

http://arstechnica.com/tech-policy/news/2011/02/the-ridiculous-plan-to-attack-wikileaks.ars

Still dont believe this is real? Take a look at the HBGary website, before they take it down.

http://www.hbgary.com/statement.htm

Read More

In December, following the wake of interest I had with the SFN neuro-blog, I was contacted by Nature and offered a blog position in their new education network, “Scitable.”

Although I was honored, I was hesitant at first because I had done so much to build up this site. But, after a little thinking, I realized I could do both. Tumblr and Nature are entirely separate philosophies about writing. Nature posts are more like articles in a magazine like Discovery Cognition, they have long drawn out detail and emphasis on grammar and style. Tumblr, however is agile in the way that ideas, in their minimalist form, can be spread rapidly -like a bigger twitter. And thus, the two are clearly distinct.

Nature=article with lengthy discourse
Tumblr=ideas sans boggy detail

So, without betraying my love of Tumblr, I would like to introduce another place where ideas can be spread in their more elaborate and canonical form: The Artful Brain. I hope you enjoy it.

There is another writer, a graduate student at Cambridge, who focuses on cognitive science, but through the lens of culture. Please have a look at Cognoculture.

I’m not going anywhere, but I am busy studying for MCATS; so posts may be less common.

http://www.nature.com/scitable/blog/the-artful-brain

http://www.nature.com/scitable/blog/cognoculture

The Research Project Template
I have had to make my fair share of research websites for different labs (for example cidia.ucsd.edu). There’s no point building a new site over and over again for different projects when there’s services like Google Sites that readily offer a free template and hosting.
The problem is, none of the templates on google sites were any good for organizing a research project. In my opinion —and this is totally subjective, a good research site should have the following characteristics:
Design Characteristics of a Good Research Project WebsiteEasy to find out whats important (such as announcements or due dates)
Easy to find files (centrally located)
Easy to coordinate group work (delegate tasks and monitor task progress)
Easy to edit (multiple users can contribute)
Easy to track changes (find out who’s deleting your stuff and beat them with a calculator)
Have a clean, modern, and simple appearance (so people use it)

Back in November, I created a site to organize the autism project at the Institute for Neural Computation, and decided that I didn’t want to have to do this over and over. So, I shared my work with the world and created a public template. I’m very excited to hear that someone has used it. I hope that it gets used and is enjoyed by flustered scientists around the globe!

https://sites.google.com/site/researchprojecttemplate

The Research Project Template

I have had to make my fair share of research websites for different labs (for example cidia.ucsd.edu). There’s no point building a new site over and over again for different projects when there’s services like Google Sites that readily offer a free template and hosting.

The problem is, none of the templates on google sites were any good for organizing a research project. In my opinion —and this is totally subjective, a good research site should have the following characteristics:

Design Characteristics of a Good Research Project Website
  1. Easy to find out whats important (such as announcements or due dates)
  2. Easy to find files (centrally located)
  3. Easy to coordinate group work (delegate tasks and monitor task progress)
  4. Easy to edit (multiple users can contribute)
  5. Easy to track changes (find out who’s deleting your stuff and beat them with a calculator)
  6. Have a clean, modern, and simple appearance (so people use it)

Back in November, I created a site to organize the autism project at the Institute for Neural Computation, and decided that I didn’t want to have to do this over and over. So, I shared my work with the world and created a public template. I’m very excited to hear that someone has used it. I hope that it gets used and is enjoyed by flustered scientists around the globe!

https://sites.google.com/site/researchprojecttemplate

This is not a question. Just saying thanks for the research project template. I plan to use it for my practicum process and if it works I will move on to the big boy: dissertation. Z.
--Anonymous

Sweet! Im really stoked that you’re using it!! Best of luck with your dissertation!

In case you’re wondering what Anonymous is talking about, go here:

https://sites.google.com/site/researchprojecttemplate/

Its a generic website template for research projects. Totally free to use and host on goole sites!

watching a dissertation defense is like watching a gladiator fight a pack of lions with a pencil and a calculator

I just started getting way into python. I just found out today that Apple has a bridge that connects python to Cocoa, the framework behind apple’s sexy GUIs. I’ve decided to share the following from Apple’s developer site:

While Cocoa applications are generally written in Objective-C, Python is a fully capable choice for application development. Python is an interpreted, interactive and object-oriented programming language, that provides higher-level features such as regular expressions and garbage collection, and it’s built into Mac OS X Tiger. Best of all, there’s little you need to sacrifice in order to gain Python’s flexibility and productivity, which are making this language increasingly popular. With Python, you still leverage the complete power and maturity of Cocoa, the capable project management of Xcode and the rapid interface development offered by Interface Builder. Today, you can build native, uncompromising, best-of-breed Mac OS X applications using only Python.

Python stands alone from Cocoa, as does Cocoa from Python. Between the two systems, enabling interoperability, stands PyObjC, the Python/Objective-C bridge.

PyObjC (pronounced pie-obz-see) is the key piece which makes it possible to write Cocoa applications in Python. It enables Python objects to message Objective-C objects as if they’re fellow Python objects, and likewise facilitates Objective-C objects to message Python objects as brethren. 

"I want a student, but have no idea where to find anyone who knows how to do stuff, like program things outside of java and matlab..."

As an undergrad who's interested in continuing my education in your line of work, I was wondering what type of programming skills (and any other skills) that you would seek in an assistant.
--recalculate-restate-reverberate

Dear RRR,

That’s a really good question. I have a lot of friends with a social or cognitive science degrees who work odd jobs instead of in real labs or industry, where they would use their education. This speaks to a big problem with university science educations: a lack of practical skills.

If I were able to hire someone (and I can’t yet, so this is totally hypothetical) I would make the following requirements:

Hypothetical Lab Job Requirements:

Programming: ability to program at a B to B+ level in any of the following (Python, JAVA, MATLAB, R, C++, C#, Actionscript 3, Objective C, BASH, or the like)

Critical Thinking: ability to read a research article and summarize the main findings and potential criticisms in under 15 minutes (and not be exhausted afterwards)

Self-Instruction: ability to search for a tutorial, read it, try it, and experiment with it, say for making an LED blink

Electrical Engineering: ability to make an LED blink using: a breadboard, a resistor, an arduino, and the internet

for my lab work:

Neuroscience: understand the basic physics and biology behind MRI (DTI, FMRI), EEG, and MEG

Analysis: understand ANOVA, regressions, correlations, normality, sphericity, plotting (bar, line), distributions. be able to use SPSS, R, or MATLAB

Writing: Must be able to write clearly and concisely

Note: I don’t give a rats arse about your GPA. If you’re smart enough to meet the above and willing to work hard, you qualify.

I should add that the only reason I have been able to get an actual job in the field is because I kept learning stuff that people needed. That turned out to be programming and engineering. If they need you, they’ll pay you :)

Good Luck!!

Dave

Not a question, I just can't figure out how to respond to your comment about the dendrite brooch :) I'm glad I was able to point you towards a gift!
--scientistintraining

yeah they’re beautiful!! great suggestion. i went to the http://n-e-r-v-o-u-s.com/ website and they apparently write software that models natural biological growth. so these earrings are actually ‘graphs’ generated from their models. pretty cool! thanks again, and keep posting!! :)

Designed By Dave Deriso © 2010