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
## The port on which Tor will listen for local connections from Tor controller applications | |
ControlPort 9051 | |
CookieAuthentication 0 | |
## Maximum amount of time (seconds) a circuit is kept alive after its last use | |
MaxCircuitDirtiness 10 |
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
module = angular.module 'app.directives', [] | |
module.directive 'dDraggable', -> | |
return { | |
scope: | |
index:'@?' | |
link: (scope, element, attrs) -> | |
element = $(element) | |
element.attr('draggable', 'true') | |
data = element.data() |
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
class Quadforce{ | |
Tetrahedron tetra; | |
float edgeLength; | |
Quadforce(float radius){ | |
tetra = new Tetrahedron(radius); | |
edgeLength = tetra.a; | |
} | |
void create(){ |
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 groovy | |
import javafx.embed.swing.JFXPanel; | |
import javafx.scene.media.Media; | |
import javafx.scene.media.MediaPlayer; | |
// if we can access google, we can access everything (?) | |
fxPanel = new JFXPanel(); | |
file = new File("msg.mp3"); // of course you need a suitable audio file of your own | |
media = new Media(file.toURI().toString()); |
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
test/ # this directory contains the tests for the Calculus module | |
runtests.jl # this file runs the tests | |
using Calculus # obviously the tests use the Calculus module... | |
using Base.Test # and the Base.Test module... | |
tests = ["finite_difference", ... # the test file names are stored as strings... | |
for t in tests | |
include("$(t).jl") # ... so that they can be evaluated in a loop | |
end | |
... | |
finite_difference.jl # this file contains tests for finite differences, |
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 | |
docker kill $(docker ps -q) | |
cd test/ | |
echo "running tests" | |
julia runtests.jl && say "tests done" && cd ../ && docker build -t timeline-calc . && docker run -dit --rm -p 8080:8080 timeline-calc && say "done" && docker attach $(docker ps -q) |
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 | |
if git checkout master && git pull origin master; then | |
cd test/ | |
echo "running tests ..." | |
if julia runtests.jl; then | |
say "tests OK" | |
cd ../ | |
if gcloud app deploy -q --image-url="gcr.io/timeline-pdf/github.com/devnacho/timeline-calc:$(git rev-parse HEAD)"; then | |
say "deploy successful, engines online, weapons online, all systems nominal" |
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 | |
docker kill $(docker ps -q) | |
docker build -t timeline-calc . \ | |
&& docker run --log-driver=syslog --log-opt syslog-address=udp://logs7.papertrailapp.com:24524 -d --rm -p 8080:8080 timeline-calc \ | |
&& say "done" && docker attach $(docker ps -q) |
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 CSV | |
DATA = CSV.read("v2_historical_data.csv", missingstring="-") | |
foreach( names(DATA) ) do name | |
missing = true | |
foreach(DATA[name]) do data | |
if missing | |
missing = typeof(data) == Missing |
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
function prepare_returns_matrix(account, number_of_scenarios, scenarios_length, interval) | |
classes_returns = | |
[:gbp_uk_aggregate_bonds, :gbp_uk_equities] |> # replace with the classes you want to see the correlations | |
class_name -> DataLoader.get_returns_matrix( | |
class_name, | |
scenarios_length, | |
interval | |
), |
OlderNewer