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 | |
using Plots | |
function load_all_games() | |
CSV.read("/Users/tallakt/Downloads/15982_games_with_centipawn_metrics/15982_games_with_centipawn_metrics.csv", DataFrame) | |
end | |
function player_games(all_games, player_name) |
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 Plots | |
using Optim | |
MS_KNOTS = 1.943844 | |
KG_LBS = 2.204623 | |
KW_HP = 1.341022 | |
M_FEET = 3.28084 | |
# Dimensjoner på båten (i meter, kg etc) | |
# https://marex.no/wp-content/uploads/2016/12/Duckie-Catalog.pdf |
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 ruby | |
# Reads the anemometer "Holdpeak HP-866A" from USB port | |
# Time stamp in unix time and windspeed in m/s is output | |
require 'rubyserial' | |
if ARGV.length != 1 | |
$stderr.puts "usage: read_anemometer.rb <tty device>" | |
exit(-1) |
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 ruby | |
require 'pty' | |
loop do | |
begin | |
PTY.spawn( "/usr/bin/gpspipe -w" ) do |stdout, stdin, pid| | |
stdout.each do |line| | |
m = line.match /"time":"(2...-..-..T..:..:......Z)"/ |
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
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim')) | |
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall --sync | source ~/.config/nvim/init.vim | |
endif | |
call plug#begin('~/.local/share/nvim/plugged') | |
Plug 'andymass/vim-matchup' | |
Plug 'frankier/neovim-colors-solarized-truecolor-only' |
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
@doc """ | |
# Mud Sync | |
Koden er basert på en modell hvor man har x pumper, hver med y stempel som går i | |
(360 / y) graders fase på hverandre. Man får en puls per omdreining av kamakselen. Hver | |
pumpe har sine egne pulser som brukes til synkronisering | |
""" | |
defmodule MudSync do |
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 | |
# $ curl -s https://gist.githubusercontent.com/tallakt/7048c646b999faf17db98a49e6374324/raw/020b759c6f71d72efe67d2c7f8f7d6fcb87b8635/mining_fetch_git.sh -O mining_fetch_git.sh | |
cd /home/tallakt | |
if [ ! -e ~/mining/README.md ]; then | |
rm -Rf mining | |
git clone [email protected]:tallakt/mining.git | |
fi; |
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 ruby | |
require 'net/http' | |
require 'json' | |
def get_json(url) | |
uri = URI(url) | |
JSON.parse(Net::HTTP.get uri) | |
end |
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
defmodule MatchAndAssign do | |
defmacro __using__(_) do | |
quote do | |
require MatchAndAssign | |
import MatchAndAssign, only: [match_and_assign: 2] | |
end | |
end | |
defp unhygienize(pattern = {n, _meta, c}) when is_atom(n) and is_atom(c) do | |
var! pattern |
NewerOlder