Skip to content

Instantly share code, notes, and snippets.

View theseatoms's full-sized avatar

TS theseatoms

View GitHub Profile
@CJEnright
CJEnright / gzip.go
Last active July 1, 2024 21:17
Idiomatic golang net/http gzip transparent compression, an updated version of https://gist.github.com/bryfry/09a650eb8aac0fb76c24
package main
import (
"net/http"
"compress/gzip"
"io/ioutil"
"strings"
"sync"
"io"
)
@bretton
bretton / lightning-maps.md
Last active June 4, 2024 12:36
Visualisers of the Lightning Network (and some other explorers)

A (mostly) visual collection of the Lightning Network

Disclaimer

Network views tend to be the view of the network from a single node, or small selection of nodes. They are not complete views of the network. This is impossible to achieve. Even if many node views were combined, it would still be incomplete.

These network views, or network maps, have been termed 'visualisers' by the LN community.

Screenshots may reflect older visual styles, and are dated accordingly.

import asyncio
loop = asyncio.get_event_loop()
async def hello():
await asyncio.sleep(3)
print('Hello!')
if __name__ == '__main__':
loop.run_until_complete(hello())
@NelsonMinar
NelsonMinar / Pandas-MultiIndex-slicing-demo.ipynb
Created September 17, 2016 19:32
Pandas MultiIndex slicing demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eirikb
eirikb / clicktest.md
Last active April 9, 2021 16:49
Automated click testing in bash

About

This is a bash script, as an example, on how to do click-testing GUI based on finding components based on how they look.

Dependencies

@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.

# internal
import re
import subprocess
# external
import twython
# prosaic, obviously
twitter = twython.Twython(
ENV['API_KEY'],
@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
@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,