Skip to content

Instantly share code, notes, and snippets.

@dkavraal
dkavraal / vscode.json
Created Apr 25, 2018
vscode user settings
View vscode.json
{
"workbench.iconTheme": "material-icon-theme",
"explorer.confirmDelete": false,
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.fontFamily": "Meslo LG M for Powerline",
"terminal.integrated.shellArgs.osx": ["-l", "-Y", "-X", "-M", "-0", "-8"],
"terminal.integrated.lineHeight": 1.2,
"terminal.integrated.env.osx": {
"LC_CTYPE": "UTF-8",
"COLORFGBG": "15;0",
View pips
function pips() { ⏎
for pkg in $@; do
pip install "$pkg" && {
name="$(pip show "$pkg" | grep Name: | awk '{print $2}')";
version="$(pip show "$pkg" | grep Version: | awk '{print $2}')";
echo "${name}==${version}" | tee -a requirements.txt;
}
done
}
View Setting_Up_Email_Receiving_in_AWS_Lambda_and_Forwarding.md

Set up an IAM Role called (say) SNSEmailForwarder:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
View K-Means.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkavraal
dkavraal / copyPBar.sh
Last active Aug 29, 2015
a few bash helper
View copyPBar.sh
alias cp='rsync -p --progress'
# copy with progressbar
@dkavraal
dkavraal / boot0 problem
Created May 30, 2014
osx win linux multiboot
View boot0 problem
http://www.niresh12495.com/apple/articles/how-to/how-to-fix-the-boot0-error-for-your-hackintosh-r25/
View collection.scm
;; The first three lines of this file were inserted by DrScheme.
;; They record information about the language level.
#reader(lib "plai-pretty-big-reader.ss" "plai")((modname collection) (read-case-sensitive #t) (teachpacks ()))
;AEfold : (lv rv -> rv) rv (list of lv) -> rv
;consumes an operation (f), a null value and a list; and operates f on the list at Scheme order
;Ex:
;(AEfold - 0 (1 2 3 4)) -> -8 ;(foldr - 0 '(1 2 3 4))->-2 , (foldl - 0 '(1 2 3 4)) -> 2
;(AEfold + 0 (3 5 7)) ->15 ;(foldr + 0 '(3 5 7)) ->15
;(AEfold / 1 (3 9 8)) -> 1/24 ; (foldr / 1 '(3 9 8)) -> 2 2/3 , (foldl / 1 '(3 9 8)) -> 2 2/3
;(AEfold / 1 (3 9 5 6)) -> 1/90 ; (foldr / 1 '(3 9 5 6)) ->5/18 , (foldl / 1 '(3 9 5 6))->3 3/5
View project9.scm
;; The first three lines of this file were inserted by DrScheme.
;; They record information about the language level.
#reader(lib "plai-pretty-big-reader.ss" "plai")((modname pro9) (read-case-sensitive #t) (teachpacks ()))
(define (AEfoldin op nv list)
(cond
((null? list) nv)
((null? (rest list)) (AEfoldin op (op (first list) (op nv)) (rest list))) ;(op nv) => -3 vb icin
(else (AEfoldin op (op nv (first list)) (rest list)))))
(define (AEfold op nv list) (AEfoldin op nv (reverse list)))
View substitution.scm
;; The first three lines of this file were inserted by DrScheme.
;; They record information about the language level.
#reader(lib "plai-pretty-big-reader.ss" "plai")((modname proje) (read-case-sensitive #t) (teachpacks ()))
(define p2->p1
(lambda (f)
(lambda (p1)
(lambda (p2)
(f p2 p1)))))
View environment.scm
;; The first three lines of this file were inserted by DrScheme.
;; They record information about the language level.
#reader(lib "plai-pretty-big-reader.ss" "plai")((modname proje) (read-case-sensitive #t) (teachpacks ()))
;; Comp 314 - Project 9
;; Anıl Özselgin (10276040) - Ahmet Sevimli (10276043)
(define p3->p1
(lambda (f)
(lambda (p1)
(lambda (p2)