I hereby claim:
- I am strboul on github.
- I am strboul (https://keybase.io/strboul) on keybase.
- I have a public key ASB-QR3015IubTjaSubzmM12zzDk8pvITKhfPqr_MJAXGwo
To claim this, I am signing this object:
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "path/filepath" | |
| "strings" |
| import string | |
| import random | |
| message = "hello world from python" | |
| # secret = ''.join(random.choices(string.ascii_uppercase + string.digits, k=100)) | |
| secret = 'bob' | |
| encrypted = ''.join([chr(ord(a) ^ ord(b)) for a, b in zip(message, secret)]) | |
| decrypted = ''.join([chr(ord(a) ^ ord(b)) for a, b in zip(encrypted, secret)]) |
I hereby claim:
To claim this, I am signing this object:
| from pprint import pprint | |
| def calc_growth(revenue, fixed_rate, years): | |
| """Calculate growth rate | |
| revenue: Initial revenue. | |
| fixed_rate: fixed rate to grow in a year. It's between 0 and 1. | |
| years: number of years. | |
| """ | |
| init_revenue = revenue |
| # How much interest etc. would you pay for a mortgage? | |
| compound <- function(rate, money, n) { | |
| prin <- money * (1+rate/100)^(0:(n-1)) | |
| int <- prin * (rate/100) | |
| totalInt <- sum(int) | |
| totalMoney <- money + totalInt | |
| rentpermonth <- totalMoney / (n * 12) | |
| textTable <- c( | |
| cat(rep("=", 30), "\n ", sep=""), |
| days <- seq_along(1:365) | |
| points <- list() | |
| for (i in days) { | |
| points[[i]] <- exp(-i/500) | |
| } | |
| x <- unlist(points) | |
| df <- cbind.data.frame(x, days) |