This file contains 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 random | |
import math | |
import datetime | |
from pymongo import MongoClient | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as mdates | |
from matplotlib.ticker import MultipleLocator | |
import numpy as np |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/bin/bash | |
# Minecraft Server Backup | |
stamp=$(date +%d_%m_%Y_%H_%M_%S) | |
cd $HOME/servers/backups/mcprohost/ | |
mkdir -p $stamp | |
wget -r -nH -P $stamp ftp://$MCP_USER:$MCP_PASS@$MCP_IP/world* | |
zip -rm $stamp $stamp |
This file contains 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
""" | |
Scrapes all dimensions of data from http://www.mrl.ucsb.edu:8080/datamine/thermoelectric.jsp. | |
RE: electrical resistivity | |
SE: seebeck coefficient | |
TH: thermal conductivity | |
AT: average atomic mass | |
SC: scarcity | |
HP: HHI (production) | |
HR: HHI (reserves) |
This file contains 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
""" Extract the CIF files for each mineral in the | |
American Minerologist Crystal Structure Database | |
http://rruff.geo.arizona.edu/AMS/ | |
Puts files in 'amcsd_data' folder. | |
""" | |
import requests | |
import string | |
import urllib |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
""" OCN forum link unfurler bot for Slack """ | |
import json | |
import time | |
import re | |
import requests | |
from slackclient import SlackClient | |
from bs4 import BeautifulSoup |
This file contains 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
''' | |
Created on Mar 24, 2013 | |
@author: Ben | |
''' | |
import pATournamentReport as r | |
#Example of how to use the classes. | |
base_url = "https://oc.tc" |
This file contains 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
(* Numerical Schemes *) | |
(* Regular Euler Method *) | |
euler[y0_, npoints_, a_, b_, f_] := ( | |
h = (b - a)/(npoints - 1); | |
y = Table[0, {npoints}]; | |
t = Table[0, {npoints}]; | |
y[[1]] = y0; | |
t[[1]] = a; | |
Do[ | |
yn = y[[n]]; |
This file contains 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
En[n_, a_, V_] := | |
Assuming[a \[Element] Reals && | |
a > 0, (1/8)*Integrate[D[n, x]^2/n, {x, -Infinity, Infinity}] + | |
Integrate[V*n, {x, -Infinity, Infinity}]] | |
V[x_, k_] := (1/2)*k*x^2 | |
\[Psi][x_, a_] := (1/Sqrt[2*Pi*a])*Exp[-x^2/(2*a)] | |
Enf = En[\[Psi][x, a]^2, a, V[x, k]] | |
Solve[D[Enf, a] == 0, a] |
OlderNewer