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
# More Info: http://davydany.com/post/32287214449/matplotlibs-basemap-plotting-a-list-of-latitude | |
def show_map(self, a): | |
# 'a' is of the format [(lats, lons, data), (lats, lons, data)... (lats, lons, data)] | |
lats = [ x[0] for x in a ] | |
lons = [ x[1] for x in a ] | |
data = [ x[2] for x in a ] | |
lat_min = min(lats) | |
lat_max = max(lats) |
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
set nu | |
set smarttab | |
set expandtab | |
set autoindent | |
set nocompatible " choose no compatibility with legacy vi | |
syntax enable | |
set encoding=utf-8 | |
set showcmd " display incomplete commands | |
filetype plugin indent on " load file type plugins + indentation |
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
######################################### | |
## DAVID'S BASH_PROFILE | |
######################################### | |
# Sys Vars | |
user='' | |
pass='' | |
# XMLStarlet |
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 time | |
def timeit(func=None,loops=1,verbose=False): | |
if func != None: | |
def inner(*args,**kwargs): | |
sums = 0.0 | |
mins = 1.7976931348623157e+308 | |
maxs = 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
## DirXPath | |
## -------- | |
## | |
## Requirements: | |
## ============= | |
## Ensure that XMLStarlet is installed on your machine (http://xmlstar.sourceforge.net/) | |
## | |
## Install | |
## ======= | |
## Put the following in your .bashrc (Linux/Unix/Cygwin/MinGW) or .bash_profile (Mac) file. Then source the 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
""" | |
****************************************************************** | |
WARNING: THIS DOES NOT TAKE INTO ACCOUNT NESTED SELECT QUERIES. | |
****************************************************************** | |
Select Query query_extractor | |
============================ | |
Takes a log file with multipe SELECT query that was split across | |
multiple lines, and extracts the SELECT query and prints it out on |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.davydany.hadoop</groupId> | |
<artifactId>MapReduce</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>MapReduce</name> |
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
BLACK="\033[0;30m" | |
DARK_GRAY="\033[1;30m" | |
LIGHT_GRAY="\033[0;37m" | |
WHITE="\033[1;37m" | |
BLUE="\033[0;34m" | |
LIGHT_BLUE="\033[1;34m" | |
GREEN="\033[0;32m" | |
LIGHT_GREEN="\033[1;32m" |
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/python | |
import random | |
NUMBER_OF_PLAYS = 1000000 | |
class GamblingGame(object): | |
pass |
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
# indexing | |
set-option -g base-index 1 | |
# synchronize panes with "Y" | |
bind-key y set-window-option synchronize-panes | |
# mouse & scroll configurations | |
set-option -g mode-mouse on # allows us to use the mouse for scrolling | |
set-option -g mouse-select-pane on # select a pane with mouse | |
set-option -g history-limit 100000 # really large scroll-back |
OlderNewer