Functional JavaScript by Jesse Farmer is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Contact Jesse at jesse@20bits.com if you have any questions!
using HTTPClient: HTTPC | |
using JSON | |
# Fill in your city name and GitHub API token | |
const MEETUP_LOCATION = lowercase("Seattle") | |
const API_TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
# Pages of search results to examine. Warning - you WILL hit the rate limit | |
const NUM_PAGES = 1 | |
typealias Field Union{AbstractString,Void} |
# Requested gist of code to produce: | |
# https://www.scribd.com/doc/271871142/Julia-Type-Hierarchy | |
# | |
# I just redirected the output to a dot file, then executed: | |
# dot -Tpdf julia.dot -o julia.pdf | |
function print_type_tree(t, parent=Any, seen=Set{DataType}()) | |
# Avoid redundant edges. | |
t ∈ seen && return | |
push!(seen, t) | |
Functional JavaScript by Jesse Farmer is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Contact Jesse at jesse@20bits.com if you have any questions!
cmake_minimum_required(VERSION 2.6) | |
project(subclassdispatchtests) | |
set(CMAKE_BUILD_TYPE Release) | |
add_definitions(-std=c++11) | |
add_executable(subclassdispatchtests subclassdispatchtests.cpp) |
type MyGraph | |
source::AbstractVector{Int} | |
destiny::AbstractVector{Int} | |
end | |
type DepsGraph | |
g::MyGraph | |
d::Int | |
names::Vector{String} | |
end |
#!/usr/bin/env julia | |
# inspired by http://stackoverflow.com/questions/40031913/simulate-a-bouncing-ball | |
# and the inspired Chris Rackauckas | |
using DifferentialEquations, ParameterizedFunctions, NLsolve, Luxor | |
f = @ode_def BallBounce begin | |
dy = v | |
dv = -g |
using Winston | |
const SIMUL_DUR = 10.0 # simulation time in seconds | |
const PeriodTime = 20e-3 # period time for the simulation in seconds | |
const workload = 20000 # workload in vector additions/ multiplications per simulation step | |
const vec_size = 3 | |
const cpu_usage = zeros(round(Int, SIMUL_DUR / PeriodTime)) # data array to log the cpu usage | |
const vec = zeros(vec_size, workload) # preallocate data array of 3D vectors |
function pkgdeps(pkg::String, metadir = "/home/zac/.julia/v0.6/METADATA") | |
deps = [] | |
for pdir in readdir(metadir) | |
if isdir(joinpath(metadir,pdir)) && "versions" in readdir(joinpath(metadir,pdir)) | |
for ver in readdir(joinpath(metadir, pdir, "versions")) | |
if isfile(joinpath(metadir, pdir, "versions",ver,"requires")) | |
reqs = readlines(joinpath(metadir, pdir, "versions",ver,"requires")) | |
for r in reqs | |
if first(split(r, " ")) == pkg | |
push!(deps, (pdir, ver)) |
using Compat | |
# using Suppressor | |
using OhMyREPL | |
const SEPARATOR = "\n\n" * "#"^80 * "\n\n" | |
ENV["PYTHON"] = "" | |
ENV["JULIA_WARN_COLOR"] = :yellow | |
ENV["JULIA_INFO_COLOR"] = :cyan | |
# ENV["LISP_PROMPT_TEXT"] = "λ ↦ " |
choco list -lo -r -y | % { $_.Split('|') | select -First 1 } | % { "choco install " + $_ + " -y" } | |
choco list -lo -r -y | % { $_.Split('|') | select -First 1 } | % { "choco install " + $_ + " -y" } | Out-file choco-software.txt |