Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
------ Begin Next Fly'm ------
"Begin Fly'm (Mon Mar 03 18:15:46 2014)"
"Ion N","Events","TOF","Mass","Charge","X","Y","Z","Vt","B","Bx","By","Bz"
1,4,8.66971,99,1,69.2607,92.6018,1840,279.259,0.10056,-0.00732981,-0.0916362,-0.0407612
2,4,8.67301,99,1,69.7009,91.0858,1840,279.173,0.0992598,-0.00733109,-0.0902476,-0.040671
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from math import sin, cos, pi
l = list()
for alpha in np.linspace(0,90,90):
alpha = alpha*pi/180 # plane angle in radians
R = np.matrix([ [cos(alpha) , 0, sin(alpha)],
[0 , 1, 0],
[-sin(alpha), 0, cos(alpha)] ])
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@elyase
elyase / quartz_event_taps
Created September 21, 2014 10:11
QuartztEvent Taps
import Quartz
from AppKit import NSKeyUp, NSSystemDefined, NSEvent
def keyboardTapCallback(proxy, type_, event, refcon):
# Convert the Quartz CGEvent into something more useful
if type_ < 0 or type_ > 0x7fffffff:
print "----- Timed out -----"
print NSEvent.eventWithCGEvent_(event)
return event
keyEvent = NSEvent.eventWithCGEvent_(event)
@elyase
elyase / yahoo.ipnb
Created October 1, 2014 11:06
download stocks symbols specified in a text file from Yahoo
{
"metadata": {
"name": "",
"signature": "sha256:42134ad8f5b08de55437d93a2e23cb1ca3217608d1d8cc35d7768fe256c96c11"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"metadata": {
"name": "",
"signature": "sha256:b99bf1f68a92860ccebd342a666077e249dfb487cea12a567d68facfaa39ab39"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [