Skip to content

Instantly share code, notes, and snippets.

View drorata's full-sized avatar

Dror Atariah drorata

View GitHub Profile
@drorata
drorata / explain.md
Last active March 26, 2019 07:11
Extracting a query from MongoDB using shell and python

Extracting the results to a new collection

First, extract the result set into a new collection. Connect to the host mongo url.of.your.mongo. Then run:

use dbName
db.getCollection('collectionName').aggregate(
  [
@drorata
drorata / notebook.ipynb
Created July 8, 2019 08:20
Comparing pandas_udf to create_map
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drorata
drorata / notebook_foo.ipynb
Last active July 9, 2019 12:09
Mapping values to integers/floats/doubles
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drorata
drorata / mapping-strings-to-floats.ipynb
Created July 10, 2019 16:25
Casting values carefully using dask
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drorata
drorata / Interacting with a Spark cluster from local machine.ipynb
Created November 6, 2019 07:56
Very minimal example with Livy and sparkmagic
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drorata
drorata / .zshrc
Last active February 11, 2020 07:55
ZSH setting
source ~/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
# antigen bundle pip
antigen bundle aws
antigen bundle docker
antigen bundle brew
antigen bundle osx
# Settings for mac at HF
source ~/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
# antigen bundle pip
antigen bundle aws
antigen bundle docker
@drorata
drorata / .env
Created November 11, 2020 16:00
Basic querying example
HIVE_HOST=my.location.com
HIVE_USERNAME=user.name
HIVE_PASSWORD=my_passWord
@drorata
drorata / d3-graph.html
Created February 15, 2021 10:25
Minimal example of a graph drawing using D3
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.links line {
stroke: #999;
stroke-opacity: 0.6;
}
.nodes circle {
stroke: #fff;
@drorata
drorata / buergerbot.rb
Last active October 30, 2021 12:25 — forked from pbock/buergerbot.rb
Bürgerbot: Refreshes the Berlin Bürgeramt page until an appointment becomes available, then notifies you.
#!/usr/bin/env ruby
require 'watir'
def log (message) puts " #{message}" end
def success (message) puts "+ #{message}" end
def fail (message) puts "- #{message}" end
def notify (message)
success message.upcase
system 'osascript -e \'Display notification "Bürgerbot" with title "%s"\'' % message
rescue StandardError => e