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 pandas as pd | |
import numpy as np | |
import bambi as bmb | |
import arviz as az | |
import matplotlib.pyplot as plt | |
#%% [markdown] | |
# |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
Created at Mon Mar 14 15:05:11 2016 by Kimmo Palin <kpalin@merit.ltdk.helsinki.fi> | |
""" | |
def main(): | |
import argparse |
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
{ | |
// Place your snippets for python here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$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
\documentclass[11pt,a4paper]{article} | |
\usepackage[driver=xetex]{geometry} | |
\usepackage[utf8x]{inputenc} | |
\newsavebox{\mypagebox} | |
\newlength{\mypageboxheight} |
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 valkoinenUhkaa(sarake,rivi,koko): | |
"""Palauttaa 'koko' x 'koko' kokoisen kaksiulotteisen listan 'lauta', jonka alkio on | |
1 joss kohdassa ('sarake','rivi') oleva shakkikuningatar uhkaa tai valloittaa | |
kyseistä alkiota. Muuten alkio on 0. | |
""" | |
# Alustetaan 2 ulotteinen taulukko/lista |
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 pipex(line): | |
"Execute command and return stdout as file like object" | |
import subprocess as sp | |
cmd = get_ipython().var_expand(line) | |
p = sp.Popen(cmd,shell=True,stdout=sp.PIPE) | |
return p.stdout | |
def load_ipython_extension(ipython): | |
"""This function is called when the extension is loaded. | |
It accepts an IPython InteractiveShell instance. |
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
### MATPLOTLIBRC FORMAT | |
# This is a sample matplotlib configuration file - you can find a copy | |
# of it on your system in | |
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it | |
# there, please note that it will be overridden in your next install. | |
# If you want to keep a permanent local copy that will not be | |
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux | |
# like systems) and C:\Documents and Settings\yourname\.matplotlib | |
# (win32 systems). |
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 | |
# Tue Feb 17 16:18:06 GMT 2009 | |
# submit the command on the command line to a job array with parameters from stdin (a la xargs) | |
# For debugging | |
#set -o verbose | |
# Die on unset variables |