[ Launch: asd ] c3c98b497afa902c075a4c23da029385 by ErikBjare
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
def paths(gs): | |
void = [2**i for i in range(gs,0,-1)] | |
p = 2**(2*gs)+2 - sum(void)*2 | |
print(p, void) | |
return p | |
paths(20) | |
p1 = paths(1) | |
p2 = paths(2) |
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
-- Takes an empty list *l* and calculates a *n* numbers in the fibonacci sequence | |
fib l n | |
| l == [] = fib [1,1] n | |
| length(l) <= n = fib (sum(take 2 l) : l) n | |
| otherwise = l |
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
(defun fib (l n) | |
(if (< (length l) n) | |
(fib (append l (list (apply #'+ (last l 2)))) n) | |
l | |
)) |
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/sh | |
# Oneliner by @Coornail, modifications by @ErikBjare | |
watch -n1 -d "curl -s https://btc-e.com/api/2/btc_usd/ticker | json_pp | tail --line=+2 | head --line=12" |
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/sh | |
# Requires jq | |
# Remember to chmod +x! | |
# | |
# Add the following cron-job (using "crontab -e") to run at hourly intervals: | |
# 0 * * * * export DISPLAY=:0.0 && /bin/bash <SCRIPT_PATH_GOES_HERE> > /dev/null 2>&1 | |
# Change <SCRIPT_PATH_GOES_HERE> to the appropriate name | |
BTCE_PRICE="$(curl -s https://btc-e.com/api/2/btc_usd/ticker | jq '.ticker.last')" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Verifying that +erikbjare is my openname (Bitcoin username). https://onename.io/erikbjare |
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
import time | |
import ctypes | |
from ctypes import Structure, POINTER, WINFUNCTYPE, windll | |
from ctypes.wintypes import BOOL, UINT, DWORD | |
class LastInputInfo(Structure): | |
_fields_ = [ | |
("cbSize", UINT), | |
("dwTime", DWORD) |
I hereby claim:
- I am ErikBjare on github.
- I am erb (https://keybase.io/erb) on keybase.
- I have a public key whose fingerprint is AE64 E141 3876 3D20 1E7A E732 7A8F 433A 86E4 C130
To claim this, I am signing this object:
OlderNewer