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
''' | |
@author Anshul Singhvi | |
@author Walter Phillips | |
Aug 31. 2017 | |
CMPT 100 B Intro to Computer Science | |
Project: RPS-101 | |
''' |
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 | |
CWD=$(pwd) | |
DOWNDIRDIR="~/git" # modify as necessary for the directory you want to install Julia into | |
cd DOWNDIR # go to the download directory | |
git clone -b master git://github.com/JuliaLang/julia.git # clone the repo | |
# needed these on EC2 | |
sudo apt-get update | |
sudo apt-get install gcc |
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
##setup | |
# using Pkg | |
# pkg"add Makie ForwardDiff" | |
## begin program | |
using Makie, | |
ForwardDiff | |
# using MakieThemes |
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
using PackageCompiler | |
pkgs = [:Makie, :AbstractPlotting, :StatsMakie, :GR, :DataFrames] | |
snoop, toml = PackageCompiler.snoop_packages(pkgs...) | |
nso, cso = PackageCompiler.compile_incremental(snoop, toml) | |
# do whatever here |
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
#!/usr/bin/env julia | |
### USAGE | |
# GITHUB_AUTH="MY_GITHUB_AUTH_TOKEN_HERE" mkproj.jl <packages names (WITH .jl)>... | |
### | |
## NOTE: | |
# To set this up, you will need to change the two constants below | |
# to the user who will fork, | |
# and the organization which owns the repos. |
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
#!/usr/bin/env julia | |
### USAGE | |
# GITHUB_AUTH="MY_GITHUB_AUTH_TOKEN_HERE" FILENAME.jl <per-package usage> | |
### | |
## NOTE: | |
# To set this up, you will need to change the two constants below | |
# to the user who will fork, | |
# and the organization which owns the repos. |
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
## setup differential equation | |
using DifferentialEquations, | |
ParameterizedFunctions | |
lorenz = @ode_def Lorenz begin # define the system | |
dx = σ * (y - x) | |
dy = x * (ρ - z) - y | |
dz = x * y - β*z | |
end σ ρ β |
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
from __future__ import division | |
from numpy.fft import rfft | |
from numpy import argmax, mean, diff, log, nonzero | |
from scipy.signal import blackmanharris, correlate | |
from time import time | |
import sys | |
try: | |
import soundfile as sf | |
except ImportError: | |
from scikits.audiolab import flacread |
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
# setup | |
# import Pkg; | |
# Pkg.pkg"add Makie#master PlotUtils GeoInterface GeoJSON" | |
using Makie | |
using GeoInterface, GeoJSON | |
using PlotUtils | |
states = download("https://raw.githubusercontent.com/PublicaMundi/MappingAPI/master/data/geojson/us-states.json") |
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
# Generate the tex file | |
rawtex = raw""" | |
\documentclass{standalone} | |
\begin{document} | |
\[\left[{\frac{-\hbar^{2}}{2m}}\nabla^{2}+V(\mathbf{r})\right]\Psi(\mathbf{r}) = E\Psi(\mathbf{r})\] % Schrodinger equation | |
\end{document} | |
""" | |
lua_stdin = IOBuffer(writable = true) |
OlderNewer