Skip to content

Instantly share code, notes, and snippets.

View theseatoms's full-sized avatar

TS theseatoms

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 23, 2024 05:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@drewolson
drewolson / reflection.go
Last active November 20, 2023 09:39
Golang Reflection Example
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
@yanofsky
yanofsky / LICENSE
Last active June 5, 2024 21:51
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@pythonanywhere
pythonanywhere / extra_functions.py
Last active June 22, 2017 18:11
PythonAnywhere Gist DemoBot
import os
import subprocess
def get_google_news_homepage():
print("this will fetch the current google news home page as text.")
print("it will use the requests and lxml libaries")
print("press enter to continue")
input()
import requests
@whoshuu
whoshuu / bootstrap.sh
Last active November 19, 2015 01:05
Bootstrap installation of pip, virtualenv, and virtualenvwrapper
#!/bin/bash
###########################################################################################
# bootstrap.sh
#
# To run directly from web:
# wget -O - https://gist.githubusercontent.com/whoshuu/11159710/raw/bootstrap.sh | bash
# Else:
# ./bootstrap.sh
#
@iirelu
iirelu / libstuff.py
Created November 30, 2014 16:02
A small python library for rendering generative art gifs
from __future__ import division
import os
import numpy
from PIL import Image, ImageDraw
class Renderer():
def __init__(
self, size=(640, 480), sampler=None,
@titipata
titipata / caffe_install.md
Last active January 27, 2022 03:27
My notes on how to install caffe on Ubuntu

Caffe Installation

Note on how to install caffe on Ubuntu. Sucessfully install using CPU, more information for GPU see this link

###Installation

  • verify all the preinstallation according to CUDA guide e.g.
lspci | grep -i nvidia
# internal
import re
import subprocess
# external
import twython
# prosaic, obviously
twitter = twython.Twython(
ENV['API_KEY'],
@dannycoates
dannycoates / etl.md
Last active July 22, 2019 12:40
AWS Lambda for ETL

Experimenting with AWS Lambda for ETL

A lot of us are interested in doing more analysis with our service logs so I thought I'd share an experiment I'm doing with Sync. The main idea is to transform the raw logs into something that'll be nice to query and generate reports with in Redshift.

The Pipeline

Pipeline Diagram

Logs make their way into an S3 bucket (lets call it the 'raw' bucket) where we've got a lambda listening for new data. This lambda reads the raw heka protobuf gzipped data, does some transformation and writes a new file to a different S3 bucket (the 'processed' bucket) in a format that is redshift friendly (like json or csv). There's another lambda listening on the processed bucket that loads this data into Redshift.