Here is a working example of running a NEURON simulation of a cell to steady state, saving that state, restoring it in a new simulation, and using the Vector.play method to stimulate the cell with an arbitrary waveform. All this while using the variable integration method CVODE. First, build the cell, and run it to … Continue reading Tutorial: Making NEURON Vector.play() + SaveState.restore() + CVODE work
Author: Justas
FFMPEG Cheat Sheet
Create animated GIF (with nice colors) from a sequence of images named "img (0...N).jpg". Use "%0Nd.jpg" for 0-padded numbered files. set pattern="%04d.jp2" ffmpeg -i %pattern% -vf palettegen palette.png ffmpeg -i %pattern% -i palette.png -lavfi "fps=15, paletteuse" out.gif
Blender Cheat Sheet
View whole scene: HOME KEY Rotate view: middle click then drag Zoom: scroll Pan view: shift+middle click Fly/walk Mode: Shift F to start flying or walking with WASD EQ for up-down movement (elevator) Point at an object + SPACE to directly teleport to it ESC/right click to undo flying movement (return to start) Mouse wheel … Continue reading Blender Cheat Sheet
NEURON Cheat Sheet
Compile all .mod files in directory nrnivmodl #NRN IV MOD L Use variable step integration h.cvode_active(1) # or 0 for fixed, note the _ h.cvode.atol(0.01) # for tolerance 0.001 is default Run sim till a specific time h.continuerun(tstop) Record value e.g. memb pot vVector = h.Vector() vVector.record(section(0.5)._ref_v) #Use h._ref_t for time #Then, after h.run() vVector.to_pyton() … Continue reading NEURON Cheat Sheet
Ruby Cheat Sheet
Upper/lower case version of a string "test".downcase "test".upcase Check if a string contains another string my_string.include? "target" Replace in string stringVar.gsub("replacewhat","withthis") # add ! to replace in-place Length of array arrVar.length Try/Catch exception handling begin error_code_here() rescue handle_error() end Ternary/conditional operator: result = condition ? if_true : if_false
JAVA Cheat Sheet
Setup remote debugging for a process In command line type this before launching the debuggable process: export JAVA_TOOL_OPTIONS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" Then start the debugging in intelliJ
Python Cheat Sheet
Create Anaconda environment conda create -n envName python=2.7 Change Anaconda Python environment *NIX: source activate p2/p3 WIN: activate p2/3/pb35 Cython re-build files python setup.py build_ext --inplace Get cmd parameter: sys.argv[1+] Get absolute path: os.path.abspath(relativePath) Get file parent folder: os.path.dirname(filePath) Get list of directory files (just file names): os.listdir(dirPath) # note no os.path Delete … Continue reading Python Cheat Sheet
Ubuntu/Linux Cheat Sheet
Kill process pkill -9 name* Chain commands com1; com2 Recursive delete folder rm -rf dirPath Change owner sudo chown newOwner file/dir # single file/dir sudo chown -R newOwner dirpath # recursively Restart Apache server: sudo service apache2 restart Change Anaconda Python environment: source activate p2/p3/envName Update and run startup script … Continue reading Ubuntu/Linux Cheat Sheet
Windows Cheat Sheet
Kill process(es) by name, including wildcards taskkill /f /t /im name* Chain commands into a single line com1 & com2 Change Anaconda Python environment activate p2/3/pb35/envName
Tutorial: Share Ubuntu folder with Windows
I've had several problems getting a Ubuntu folder show up as a shared folder on my Windows machine. They were: Ubuntu machine does not show up in Windows > Network. Nor can I get to it with \\UBUNTUMACHINE When it does show up, there are no shared folders visible When they're visible, the share complains … Continue reading Tutorial: Share Ubuntu folder with Windows
You must be logged in to post a comment.