Skip to content

Instantly share code, notes, and snippets.

View josephwinston's full-sized avatar

Joseph Winston josephwinston

View GitHub Profile
@josephwinston
josephwinston / viewer.py
Created June 5, 2020 01:43
simple seg-y viewer
import segyio
import napari
# wget http://s3.amazonaws.com/open.source.geoscience/open_data/newzealand/Taranaiki_Basin/Keri_3D/Kerry3D.segy
segyfile = '../../data/pylops/Kerry3D.segy'
f = segyio.open(segyfile,
iline=segyio.tracefield.TraceField.SourceEnergyDirectionExponent,
xline=segyio.tracefield.TraceField.CDP)
@josephwinston
josephwinston / small.json
Created May 10, 2019 16:44
small dataset
[
{
"API_NUMBER": "15-007-20008",
"API_NUM_NODASH": "15007200080000",
"COMMENTS": "Plugged and Abandoned",
"COMPLETION": "12-MAR-1967",
"CURR_OPERATOR": " Inc.",
"DEPTH": " KB",
"ELEVATION": "unavailable",
"ELEV_REF": "1535",
@josephwinston
josephwinston / json.schema
Created May 10, 2019 16:41
Sample dgraph Schema
KID: string .
API_NUMBER: string .
API_NUM_NODASH: string .
LEASE: string .
WELL: string .
FIELD: string .
LATITUDE: string .
LONGITUDE: string .
LONG_LAT_SOURCE: string .
TOWNSHIP: string .
@josephwinston
josephwinston / gist:4ae6d8a51fbef02192967c210a5840b3
Created August 13, 2018 14:00
valgrind report for webdist
```
valgrind ./webdis
==25858== Memcheck, a memory error detector
==25858== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==25858== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==25858== Command: ./webdis
==25858==
==25858== Thread 4:
==25858== Invalid read of size 4
==25858== at 0x11C42E: redisAsyncDisconnect (async.c:359)
fn build
Building image raej/jrest:0.0.1
Sending build context to Docker daemon 337.9kB
Step 1/12 : FROM fnproject/fn-java-fdk-build:latest as build-stage
latest: Pulling from fnproject/fn-java-fdk-build
bc95e04b23c0: Pull complete
3cbd22648d7b: Pull complete
689a1b344d36: Pull complete
21d8309ec350: Pull complete
c133b2f9ec79: Pull complete
@josephwinston
josephwinston / gist:6a56be07f7f086dc52cc95db3f9faeb7
Created December 30, 2016 17:21
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4009: ordinal not in range(128)
docker build --tag local-bigchaindb .
Sending build context to Docker daemon 2.293 MB
Step 1 : FROM rethinkdb:2.3
2.3: Pulling from library/rethinkdb
75a822cd7888: Pull complete
6e2d8dd0ca87: Pull complete
e56239563bb3: Pull complete
bf0f28d27004: Pull complete
1c6ba2c166ad: Pull complete
Digest: sha256:ab81bd8c5d8514b416331a00da048f0c041787e0a3f0d93219e46db069d65a58
@josephwinston
josephwinston / gist:5ae12386bb02629bf2c46ca121637e37
Created December 30, 2016 17:00
Invalid transaction schema
## docker pull bigchaindb/bigchaindb
## docker run --rm -v "$HOME/bigchaindb_docker:/data" -ti bigchaindb/bigchaindb -y configure
## docker run -v "$HOME/bigchaindb_docker:/data" -d --name bigchaindb -p "58080:8080" -p "59984:9984" bigchaindb/bigchaindb start
## docker-machine ip bigchaindb
from bigchaindb_driver import BigchainDB
bdb = BigchainDB('http://192.168.99.100:59984/api/v1') # From docker-machine ip bigchaindb and docker ps
bicycle = {
@josephwinston
josephwinston / gist:bad243712d8ba6fc91b80176dfd5a28b
Created December 20, 2016 16:49
simba http_server + websocket with socket initialization
/**
* @section License
*
* The MIT License (MIT)
*
* Copyright (c) 2014-2016, Erik Moqvist
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
@josephwinston
josephwinston / gist:fc99563cfc70967973200c81661c3d3e
Created December 20, 2016 01:26
simba http_server + websocket (fails)
/**
* @section License
*
* The MIT License (MIT)
*
* Copyright (c) 2014-2016, Erik Moqvist
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
minimesos init
Unable to find image 'containersol/minimesos:0.9.0' locally
0.9.0: Pulling from containersol/minimesos
4d06f2521e4f: Pull complete
691bd2bdacdc: Pull complete
7a7569255cff: Pull complete
fdcd9b3d4706: Pull complete
Digest: sha256:eca942e1b59a2a12a30333328723db4e1b5b232a446a7941e0cb548ed020a06c
Status: Downloaded newer image for containersol/minimesos:0.9.0
Initialized minimesosFile in this directory