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
module Day8 where | |
import qualified Data.Text as T | |
import qualified Data.Map.Strict as M | |
import Data.Monoid | |
import Data.List | |
import Data.Ord (comparing) | |
import Data.Char (digitToInt) | |
import Data.Maybe (fromMaybe, catMaybes) |
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 FlexibleInstances #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GADTs #-} | |
module Day5 where | |
import Prelude hiding (read) | |
import qualified Data.Text as T |
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 OverloadedStrings #-} | |
module Day3 where | |
import Data.List | |
import Data.Function (on) | |
import qualified Data.Set as S | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as T | |
import Util |
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 FlexibleContexts #-} | |
module Day2 where | |
import Prelude hiding (read) | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as T | |
import qualified Data.Vector as V | |
import Data.Maybe (mapMaybe) | |
import Control.Monad.State (liftM2, modify, gets, execState) | |
import Data.List (find) |
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 logging | |
import requests | |
from flask import current_app as app | |
from flask_restful import Resource as BaseResource | |
from flask_restful import reqparse, fields, marshal_with | |
from sdp.common import db | |
from sdp.common import lego_week | |
log = logging.getLogger(__file__) |
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 asyncio | |
import requests | |
import time | |
headers = { | |
'Host': 'api.tradono.com', | |
'Connection': 'keep-alive', | |
'Sec-Fetch-Mode': 'cors', | |
'tradono-app-version': '1.2.139-53-g59d7aa5', | |
'authorization': 'e5a64398-cc4c-4839-850e-c597326f67aa', |
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 FlexibleContexts #-} | |
{-# LANGUAGE BangPatterns, TypeApplications #-} | |
import Control.Monad | |
import Data.List | |
import Diagrams.Prelude | |
import Diagrams.Backend.SVG.CmdLine | |
import Text.Printf | |
type Board = [Int] |
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
%{ | |
#include <stdio.h> | |
#include <string.h> | |
#include "tree.h" | |
extern char *yytext; | |
extern Body* prgBody; | |
void yyerror(char *str) { | |
fprintf(stderr, "%s\n", str); |
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 { BotManager } from "BotManager"; | |
import { sendCM, Ticker } from "util/utils"; | |
import { ComponentType, IComponent } from "components/Component"; | |
import { myBots } from "util/constants"; | |
export class SlaveComponent implements IComponent { | |
public componentType: ComponentType = "role"; | |
public ticker: Ticker = new Ticker(500); | |
public onLoad = () => { |
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 bash | |
# This will not work with set -e because killing ffmpeg means whole script | |
# ends. | |
set -xuo pipefail | |
dorecord() { | |
local filename="$(date "+%F_%V_%H-%M-%S").webm" | |
local start="$(date "+%s")" |
NewerOlder