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
push!(LOAD_PATH, pwd()) | |
# Run _init.jl at runtime if it exists | |
if VERSION < v"0.4-" | |
if isinteractive() && isfile("_init.jl") | |
info("Found ", joinpath(pwd(),"_init.jl")) | |
include(joinpath(pwd(),"_init.jl")) | |
end | |
else | |
atreplinit() do repl |
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
# Installation: | |
# - Put this in your .bash_profile | |
# - Replace my directory with your exobrain directory on line 10 | |
# | |
# What you get: | |
# A Jupyter notebook open on a well-defined port that is always | |
# on for exobrain-ing your ideas... | |
exec 6<>/dev/tcp/localhost/10000 || ( | |
source activate py27 && |
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
# Installation: | |
# - Put this in your .bash_profile | |
# - Replace my directory with your exobrain directory on line 10 | |
# | |
# What you get: | |
# A Jupyter notebook open on a well-defined port that is always | |
# on for exobrain-ing your ideas... | |
exec 6<>/dev/tcp/localhost/10000 || ( | |
source activate py27 && |
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
# 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) | |
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
if VERSION > v"0.4.0-dev+4268" | |
const marcoexpandkeys = Dict{Any,Any}("^I" => function (s,o...) | |
if !isempty(s) | |
line = parse(Base.LineEdit.input_string(s)) | |
s.kill_buffer=Base.LineEdit.input_string(s) | |
Base.LineEdit.edit_clear(s) | |
Base.LineEdit.edit_insert(s,string(macroexpand(line))) | |
end |
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
# This code is part of a presentation on streaming analytics in Julia | |
# It was inspired by a number of individuals and makes use of some of their ideas | |
# 1. FastML.com got me thinking about inline processing after | |
# reading his great Vowpal Wabbit posts | |
# 2. John Lanford and his fantastic Vowpal Wabbit library. | |
# Check out his NYU video course to learn more (see below) | |
# 3. John Myles White's presentation on online SDG and his StreamStats.jl library | |
# Thank you all! | |
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
#Importing Requests package | |
Pkg.add("Requests") | |
using Requests.get; | |
import JSON; | |
url = "http://query.yahooapis.com/v1/public/yql?q=select%20DaysRange%20from%20yahoo.finance.quotes%20where%20symbol%20in%20%28%22EBAY%22,%22GOOG%22%29%20&env=http://datatables.org/alltables.env&format=json"; | |
#Reads the data from HTTP URL | |
es = get(url); |
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
/// @file segmented_sieve.cpp | |
/// @author Kim Walisch, <[email protected]> | |
/// @brief This is a simple implementation of the segmented sieve of | |
/// Eratosthenes with a few optimizations. It generates the | |
/// primes below 10^9 in 0.8 seconds (single-threaded) on an | |
/// Intel Core i7-6700 3.4 GHz CPU. | |
/// @license Public domain. | |
#include <iostream> | |
#include <algorithm> |
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
## Algoritmos de caminos más cortos | |
from estructuras import Cola, ColaMin | |
from conectividad import ordenamiento_topologico | |
inf = float('inf') #Tratar infinito como un numero | |
def recorrido_a_lo_ancho(G, s): | |
dist, padre = {v:inf for v in G}, {v:v for v in G} | |
dist[s] = 0 |
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
## Algoritmos de caminos más cortos | |
from estructuras import Cola, ColaMin | |
from conectividad import ordenamiento_topologico | |
inf = float('inf') #Tratar infinito como un numero | |
def recorrido_a_lo_ancho(G, s): | |
dist, padre = {v:inf for v in G}, {v:v for v in G} | |
dist[s] = 0 |