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 <functional> | |
#include <iostream> | |
#include <random> | |
#include <boost/geometry.hpp> | |
#include <boost/geometry/geometries/point.hpp> | |
#include <boost/geometry/index/rtree.hpp> | |
namespace bg = boost::geometry; |
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
""" | |
Convert: filename of Gmail contacts -> XLSX file | |
Converts the contents of a filename where exported Gmail contacts can be found | |
into an XLSX spreadsheet where only the relevant information of the contacts is | |
found. | |
""" | |
import argparse | |
import codecs | |
import os |
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
❯ gcc -g minimal.c -o minimal | |
❯ sudo gdb minimal | |
Password: | |
(gdb) break main | |
Breakpoint 1 at 0x100000f90: file minimal.c, line 3. | |
(gdb) run | |
Starting program: /private/tmp/c-repl/minimal |
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 parse_command_line(): | |
"""Defines and parses command line arguments""" | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-v', '--verbose', action='count', default=0) | |
return parser.parse_args() | |
def configure_logging(args): | |
"""Configures logging as specified by the author and the user""" | |
levels = [logging.WARNING, logging.INFO, logging.DEBUG] |
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 sh | |
wget http://mirrors.ctan.org/macros/latex/contrib/undertilde.zip | |
unzip undertilde.zip | |
cd undertilde | |
latex undertilde.ins | |
latex undertilde.dtx | |
makeindex undertilde.idx | |
mkdir -p /Users/$USER/Library/texmf/tex/latex/undertilde/ | |
mv undertilde.sty /Users/$USER/Library/texmf/tex/latex/undertilde/ | |
sudo tlmgr install comment arydshln wrapfig multirow dirtree algorithm2e \ |
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 | |
pkg_name=$1 | |
pkg_root=$PWD/${pkg_name} | |
doc_root=${pkg_root}/docs/_build/html | |
hostname=`hostname` | |
year=`date '+%Y'` | |
version='0.1.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
#lang typed/racket/base | |
(require racket/future) | |
(require racket/performance-hint) | |
(require racket/cmdline) | |
(require (only-in racket/unsafe/ops | |
unsafe-car | |
unsafe-cdr)) | |
(require (rename-in racket/unsafe/ops | |
[unsafe-fx+ +] | |
[unsafe-fx- -] |
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 | |
""" | |
Script to retrieve events from a Google Calendar, check if any of them happens | |
tomorrow earlier than 11AM, and set a reminder in Reminders.app for today at | |
9PM | |
""" | |
import argparse | |
import datetime | |
import sys | |
import os |
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
#lang typed/racket/base | |
(require racket/cmdline | |
racket/string) | |
(: parse (-> String Integer Integer (Values String Integer))) | |
(define (parse line key-field-pos val-field-pos) | |
(let ([fields (string-split line "\t")]) | |
(values (list-ref fields key-field-pos) | |
(assert (string->number (list-ref fields val-field-pos)) |
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
function mkscons --argument proj | |
mkdir -p $proj/include/core | |
mkdir -p $proj/src/core | |
mkdir -p $proj/tests/core | |
############################################################################### | |
# BUILD SCONSCRIPT | |
printf "\ | |
env = Environment(CPPPATH=['include']) | |
env.Library(target='$proj', source=Glob('src/core/*.c')) | |
env.Program(target='$proj', source=Glob('src/*.c'), |
OlderNewer