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
(echo '"Date","Amount","Account Name"' ; tail -n +2 ~/Downloads/trends.csv | sed -e 's/January /01-/' -e 's/February /02-/' -e 's/March /03-/' -e 's/April /04-/' -e 's/May /05-/' -e 's/June /06-/' -e 's/July /07-/' -e 's/August /08-/' -e 's/September /09-/' -e 's/October /10-/' -e 's/November /11-/' -e 's/December /12-/' -e 's/"\(.*\)","\$\(.*\)",".*",".*"/"\1","\2","ACCOUNT_NAME_HERE"/' -e 's/^"\([0-9]\+\)-\([0-9]\+\)/"\2-\1-01/') > /tmp/balances.csv |
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
from ortools.sat.python import cp_model | |
from ortools.sat.cp_model_pb2 import CpSolverStatus | |
num_lectors = 4 | |
num_groups = 3 | |
num_lessons_per_day = 3 | |
num_days = 5 | |
model = cp_model.CpModel() |
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 Data.Bits | |
import Data.Word | |
import System.Random | |
mtN = 624 | |
mtM = 397 | |
data MersenneTwister = MersenneTwister [Word32] Int | |
deriving Show |
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
VL53L1X_ERROR VL53L1X_SensorInit(uint16_t dev) | |
{ | |
VL53L1X_ERROR status = 0; | |
uint8_t Addr = 0x00, tmp; | |
for (Addr = 0x2D; Addr <= 0x87; Addr++){ | |
status = VL53L1_WrByte(dev, Addr, VL51L1X_DEFAULT_CONFIGURATION[Addr - 0x2D]); | |
} | |
status = VL53L1X_StartRanging(dev); | |
tmp = 0; |
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
{-# Language TypeFamilies, StandaloneDeriving, GeneralizedNewtypeDeriving, UndecidableInstances #-} | |
module Example where | |
newtype N p m a = N (((CT p) m) a) | |
deriving instance (CT p ~ f, Functor (f m)) => Functor (N p m) | |
deriving instance (CT p ~ f, Applicative (f m)) => Applicative (N p m) -- internal error when this line added | |
class C p where | |
type CT p :: (* -> *) -> * -> * |
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
class Foo(a: Int) { | |
def bar(other: Foo) { | |
other match { | |
case f : Foo => println(f.a) | |
} | |
} | |
} |
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
0 : 0 0 0 0 0 0 0 0 0 | |
1 : 1 0 0 0 0 0 0 0 0 | |
12 : 12 0 0 0 0 0 0 0 0 | |
123 : 81 23 0 0 0 0 0 0 0 | |
1234 : 92 34 0 0 0 0 0 0 0 | |
12345 : c1 45 23 0 0 0 0 0 0 | |
123456 : d2 56 34 0 0 0 0 0 0 | |
1234567 : e1 23 67 45 0 0 0 0 0 | |
12345678 : f0 78 56 34 12 0 0 0 0 | |
123456789 : f1 89 67 45 23 0 0 0 0 |
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
{-# LANGUAGE ScopedTypeVariables #-} | |
module Main where | |
import Control.Exception | |
import System.Exit | |
main :: IO () | |
main = do | |
r <- catch (do | |
let [r, _] = ['a'] |
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
// LockedWindow.cpp : Defines the entry point for the application. | |
// | |
#include "stdafx.h" | |
#include "LockedWindow.h" | |
#define MAX_LOADSTRING 100 | |
// Global Variables: | |
HINSTANCE hInst; // current 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
import XMonad | |
import XMonad.Config.Gnome | |
import XMonad.Util.EZConfig | |
import XMonad.Hooks.ManageHelpers (isFullscreen,doFullFloat) | |
import qualified XMonad.StackSet as W | |
myWorkspaces = ["1","2","3","4","5","6","7","8","9"] | |
main = xmonad $ gnomeConfig |
NewerOlder