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
% The Spiral of Roots (https://gist.github.com/drorata/8709182) | |
% | |
% Inspired by Felix Lindemann (http://www.texample.net/tikz/examples/rooty-helix/) | |
% | |
% Author: Dror Atariah, drorata@gmail.com | |
\documentclass[border=4pt]{standalone} | |
\usepackage{tikz} | |
\usetikzlibrary{calc} |
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
sid=res['_scroll_id'] | |
IDs=[] | |
scroll_size=res['hits']['total'] | |
while (scroll_size > 0): | |
sys.stdout.write('.') | |
sys.stdout.flush() | |
try: | |
res=es.scroll(scroll_id=sid,scroll='1m') | |
IDs += res['hits']['hits'] | |
sid=res['_scroll_id'] |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:d5b3e958f7624194296f7f343c6dd48ae49eb42a47ccc694f35bc575a2bd23d7" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:63382758aa4c42ca13e1a47f0deebe1617a89f35f5fcc00ce9f6b2e24efa2e9e" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
""" | |
Usage: python remove_output.py notebook.ipynb [ > without_output.ipynb ] | |
Modified from remove_output by: | |
damianavila (https://gist.github.com/damianavila/5305869) | |
""" | |
import sys | |
import io | |
import os | |
from IPython.nbformat import read, write |
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 re | |
from pyspark import SparkContext | |
print "-----------------===========================-----------------" | |
print "-----------------==========Staring==========-----------------" | |
print "-----------------===========================-----------------" | |
sc = SparkContext(appName = "simple app") | |
print "-----------------===========================-----------------" | |
print "-----------------==========Loaded file======-----------------" | |
print "-----------------===========================-----------------" |
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
Cat,Country,Count | |
A,DE,0.4596065657 | |
B,DE,0 | |
C,US,0.3224789091 | |
A,UK,0.4740651803 | |
B,US,5 | |
C,UK,0.6467712916 | |
A,UK,0.4206986968 | |
B,DE,0.647481787 | |
C,UK,0.7009353881 |
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
\begin{tikzpicture}[ | |
mnode/.style={circle,draw=black,fill=black,inner sep=0pt,minimum size=2pt}, | |
node at every point/.style={% | |
decoration={% | |
show path construction, | |
lineto code={% | |
\coordinate (pos) at ($0.5*(\tikzinputsegmentlast)+0.5*(\tikzinputsegmentfirst)$); | |
\coordinate (direction) at ($(\tikzinputsegmentlast)-(\tikzinputsegmentfirst)$); | |
\gettikzxy{(direction)}{\dirx}{\diry} | |
\pgfmathsetmacro\rotationdir{atan(\diry/\dirx)} |
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
Debugger entered--Lisp error: (wrong-type-argument sequencep :grouptags) | |
mapconcat(identity ("PRIVATE" "{" "WORK" :grouptags "WORK@mittagseminar" "WORK@open_questions" "WORK@diss" "WORK@CV" "}" "{" "IT" :grouptags "IT@emacs" "IT@git" "IT@TeX" "}" "{" "PROG" :grouptags "PROG@mathematica" "PROG@cgal" "}" "}" "4freeTime" "bms_friday" "emacs" "interesting_questions" "mittagseminar" "Mittagsseminar" "NOTE" "private" "results" "work" "Yvinec" "Ziegler") " ") | |
(insert "#+TAGS: " (mapconcat (quote identity) tags " ") "\n") | |
(save-current-buffer (set-buffer temp-buffer) (while (setq entry (car (prog1 def-todo (setq def-todo (cdr def-todo))))) (insert "#+READONLY\n") (setq kwds (mapcar (function (lambda (x) (if (string-match "(" x) (substring x 0 ...) x))) (cdr entry))) (insert "#+TODO: " (mapconcat (quote identity) kwds " ") "\n") (setq dwds (member "|" kwds) twds (org-delete-all dwds kwds) todo-kwds (org-delete-all twds todo-kwds) done-kwds (org-delete-all dwds done-kwds))) (if (or todo-kwds done-kwds) (progn (in |
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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Assume you have events log with two event types `foo` and `bar`. The goal is to obtain a frequency bar plot of the events per some predescribed time interval." | |
] | |
}, | |
{ |
OlderNewer