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.
integer nbin_t,bindim=1000
real*8 minbin_t,maxbin_t,dxbin_t,x_axis_observable,t_histo(1:bindim),
& t_dnsgrd(1:bindim),t_errgrd(1:bindim)
minbin_t=1
maxbin_t=101
nbin_t=50
dxbin_t=(maxbin_t-minbin_t)/nbin_t
#
# ~/.ssh/config
#
# how to automate ssh logins
# this is my setup, obviously change your username and grads-XX
# I use
# ssh phy : for the main physics login server
# ssh ws : my workstation, while on campus
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
from numpy.random import random
import itertools
colors = ('b', 'g', 'r')
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 9.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
globus-url-copy file:///home/jeb65/testfile gsiftp://osg-xsede.grid.iu.edu/home/jeb65/testfile-copied
#!/usr/bin/env python3
"""
Calculate v2{2} for an isotropic emission law (zero flow). Will converge
to zero as the number of particles -> infinity.
"""
import itertools
import sys
def event_generator(phi_column_number, pT_column_number):
"""
Lazily generate arrays of phi angles and pT for each event.
Fastest way I can find to read a numerical text file in chunks,
where the chunks are of non-uniform size and separated by markers in the text file.
"""
event = []
@jbernhard
jbernhard / 30-scale-font.conf
Created September 3, 2014 15:02
Scale font size, useful for hidpi.
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<test name="family">
<string>Inconsolatazi4</string>
</test>
<edit name="pixelsize" mode="assign">
@jbernhard
jbernhard / config
Created September 11, 2014 22:30
SSH connection sharing
#
# ~/.ssh/config
#
# share connections
Host *
ControlMaster auto
ControlPersist 5m
ControlPath /tmp/ssh-%r@%h:%p