Skip to content

Instantly share code, notes, and snippets.

View Davidnet's full-sized avatar
🦔

David Cardozo Davidnet

🦔
View GitHub Profile
@Davidnet
Davidnet / montecarlo.jl
Created February 16, 2016 06:27
Montecarlo Integral
using Distributions
e = 10.0^(-3);
p = 0.85;
variance = 4;
N = floor(Int, variance / ((1-p)*((e/2)^2))) + 1
u = Uniform(0,2);
x = rand(N);
y = rand(N);
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
function isEven(z) {
if (z == 1) {
return (true);
}
if (z == 0){
return (false);
}
else {
isEven(z-2);
}
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
Original text - 54 chars.
dbaue wlnkv dmtmz tpxu mtwg ufjou wpmau veum wydf wolsp ibfy
Initialised text - 52 chars.
dbaue wlnkv dmtmz tpxu mtwgu fjouw pmauv eum w ydfwo lspib fy
Processed text - shift 0
DBAUE WLNKV DMTMZ TPXU MTWGU FJOUW PMAUV EUM W YDFWO LSPIB FY
Processed text - shift 1
u : 6
w : 5
m : 5
p : 3
f : 3
d : 3
t : 3
b : 2
y : 2
If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 ./configure --with-features=huge --enable-python3interp --with-compiledby=
│ "David Cardozo <david.cardozo@me.com>"¬