This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#EXTM3U | |
#EXTINF:-1,BBC - Radio 1 | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_med/ak/bbc_radio_one.m3u8 | |
#EXTINF:-1,BBC - Radio 1Xtra | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_med/ak/bbc_1xtra.m3u8 | |
#EXTINF:-1,BBC - Radio 1Dance | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_med/ak/bbc_radio_one_dance.m3u8 | |
#EXTINF:-1,BBC - Radio 1Relax | |
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_med/ak/bbc_radio_one_relax.m3u8 | |
#EXTINF:-1,BBC - Radio 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="/usr/local/bin/:$PATH" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyodbc | |
import pandas as pd | |
#DDefine our connection parameters | |
con = pyodbc.connect( | |
r'DRIVER={SQL Server};' | |
r'server=server_address;' | |
r'database=database_name;' | |
r'uid=user_name;' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -A 2 --after-context=2 --before-context=2 "Text we're searching for" input_file.txt >> output_file.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i -- "s|/usr/bin/env python|/usr/bin/python|g" *.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def stoppingPowerRatio(R50D,z): | |
"""Given the beam quality R50,D calculates the Spencer Attix stopping power ratios at depth, z, using | |
the fit by Burns et al given in the 2003 IPEM code of practice for electron dosimetry. | |
This fit is valid for for beam qualities R50,D in the range 1-20 cm of water and for depths of 0.02 to | |
1.2 times R50,D""" | |
a = 1.075 | |
b = -0.5087 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%HTML | |
<script> | |
var code_show=true; //true -> hide code at first | |
function code_toggle() { | |
$('div.prompt').hide(); // always hide prompt | |
if (code_show){ | |
$('div.input').hide(); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from math import pi, log | |
import pylab | |
from scipy import fft, ifft | |
from scipy.optimize import curve_fit | |
i = 10000 | |
x = np.linspace(0, 3.5 * pi, i) | |
y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 * | |
np.random.randn(i)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- extends 'html_full.tpl' -%} | |
{% block input_group -%} | |
<div class="input_hidden"> | |
{{ super() }} | |
</div> | |
{% endblock input_group %} | |
{%- block header -%} | |
{{ super() }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ~/.bashrc | |
# | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
alias designer='designer -qt=4' | |
alias python='python2' | |
alias ipython='ipython2' |
NewerOlder