Skip to content

Instantly share code, notes, and snippets.

View davidsth's full-sized avatar
🎯
Focusing

David Shrestha davidsth

🎯
Focusing
View GitHub Profile
Day 1
“Everyone
believes their way is the right way. Everyone is wrong.”
Best
Practices v. Patterns
XP
Values
# Apache Spark
- 100x faster than Hadoop MapReduce because it's in memory.
- spark replaces hadoop mapreduce not the hadoop file system (HDFS)
- Benchmark https://databricks.com/blog/2014/11/05/spark-officially-sets-a-new-record-in-large-scale-sorting.html
-
- cluster management with YARN
## Spark API
from optparse import OptionParser
import ctypes
from ctypes import wintypes
import time
user32 = ctypes.WinDLL('user32', use_last_error=True)
INPUT_MOUSE = 0
INPUT_KEYBOARD = 1
INPUT_HARDWARE = 2

Keybase proof

I hereby claim:

  • I am dshrest on github.
  • I am dshrest (https://keybase.io/dshrest) on keybase.
  • I have a public key whose fingerprint is 9566 76A0 76AA 5EFD 72A9 2805 2069 F4B9 C4D3 AC46

To claim this, I am signing this object:

@davidsth
davidsth / sublime config
Last active August 29, 2015 14:01
sublime config
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Monokai Soda.tmTheme",
"font_face": "monaco",
"font_size": 11,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
@davidsth
davidsth / sit-scheduler
Created August 16, 2013 14:47
tells you to get up and move every 30m(default) to stay healthy.
#!/bin/sh
#
# http://vimeo.com/71441709
if [ -n "$1" ]; then
snooze="$1";
else
snooze="30m"
fi
==Vimperator_Color_Scheme=f
" name: Darkness
" ==Darkness_Colorscheme_Settings==
"StatusLine settings
hi StatusLine font-family: Tewi;color: #F1F1E0; background: #100F0F; "font-size: 8pt;
hi StatusLineBroken font-family: Tewi;color: #D44A40; background: #100F0F; "font-size: 8pt;
hi StatusLineSecure font-family: Tewi;color: #5A89C9; background: #100F0F; "font-size: 8pt;
"CmdLine settings excluding Gradient
@davidsth
davidsth / filepermission.c
Last active December 15, 2015 17:09
file permission
/* filepermission.c
*
* Date: 11/01/2012
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
char*lie;
double time, me= !0XFACE,
not; int rested, get, out;
main(ly, die) char ly, **die ;{
signed char lotte,
@davidsth
davidsth / filelock
Created February 9, 2013 03:56
File locker
#!/bin/bash
# Use this to hide your folders
# Don't forget to chown : root and chmod : 700 this file
# How to use:
# filelock [option] filename
# option: lock or unlock
# Note: when you lock the file, it will be hidden and won't be readable.
if [ $1 = "lock" ]; then
echo "hiding $2 and locking..."