Skip to content

Instantly share code, notes, and snippets.

View nanounanue's full-sized avatar
💭
😡

Adolfo De Unánue nanounanue

💭
😡
View GitHub Profile
# -*- coding: utf-8 -*-
""" Deletes all tweets below a certain retweet threshold.
"""
import tweepy
from datetime import datetime
# Constants
CONSUMER_KEY = ''
@rtbs-dev
rtbs-dev / HW7.ipynb
Created November 14, 2017 00:45
Bayes, Kalman, and Sobol
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jfeala
jfeala / batch.py
Created April 18, 2017 12:33
AWS Batch wrapper for Luigi
"""
AWS Batch wrapper for Luigi
From the AWS website:
AWS Batch enables you to run batch computing workloads on the AWS Cloud.
Batch computing is a common way for developers, scientists, and engineers
to access large amounts of compute resources, and AWS Batch removes the
undifferentiated heavy lifting of configuring and managing the required
@vcastellm
vcastellm / ecs-run
Last active April 15, 2024 17:55
Run task and wait for result in AWS ECS
#!/usr/bin/env bash
set -e
function usage() {
set -e
cat <<EOM
##### ecs-run #####
Simple script for running tasks on Amazon Elastic Container Service
One of the following is required:
Required arguments:
@agileone
agileone / bulk-neo4j-import.sh
Created May 11, 2016 02:06 — forked from jexp/bulk-neo4j-import-original.sh
Panama Papers Import Scripts for Neo4j and Docker
export NEO4J_HOME=${NEO4J_HOME-~/Downloads/neo4j-community-3.0.1}
if [ ! -f data-csv.zip ]; then
curl -OL https://cloudfront-files-1.publicintegrity.org/offshoreleaks/data-csv.zip
fi
export DATA=${PWD}/import
unzip -o -j data-csv.zip -d $DATA
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@vhodges
vhodges / metropolis.css
Last active December 18, 2023 05:33
A version of the Beamer theme Metropolis for reveal.js
/**
* A simple theme for reveal.js presentations, derived from serif.css
* It's in the spirit of the Metropolis theme for beamer https://github.com/matze/mtheme
*
* This theme is Copyright (C) 2016 Vince Hodges, http://sourdoughlabs.com - it is MIT licensed.
*/
@import url('https://fonts.googleapis.com/css?family=Fira+Sans');
.reveal a {
@jkbradley
jkbradley / LDA_SparkDocs
Created March 24, 2015 23:56
LDA Example: Modeling topics in the Spark documentation
/*
This example uses Scala. Please see the MLlib documentation for a Java example.
Try running this code in the Spark shell. It may produce different topics each time (since LDA includes some randomization), but it should give topics similar to those listed above.
This example is paired with a blog post on LDA in Spark: http://databricks.com/blog
Spark: http://spark.apache.org/
*/
import scala.collection.mutable
@ekampf
ekampf / pypossibly.py
Created June 11, 2014 10:46
Python option patrern (Maybe Monad)
import logging
import sys
class Maybe(object):
pass
class Nothing(Maybe):
def is_some(self):
return False
@prwhite
prwhite / Makefile
Last active May 2, 2024 18:02
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing