This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 9 columns, instead of 8 in line 7.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"V1","V2","V3","V4","V5","V6","V7","V8","V9" | |
"x1a","y1","z1","x2","y2","z2","x3","y3","z3" | |
-1.3491290435195,10.1059510260448,-0.411264965906754,-1.21421613916755,6.06357061562689,0.911515840683922,-2.02369356527925,14.1483314364628,-0.451187952584759 | |
1.67610622942448,-28.2861370876445,0.50256601859036,1.50849560648203,-16.9716822525867,0.864538834846784,2.51415934413671,-39.6005919227022,0.581311097123157 | |
1.02121502161026,43.936226125781,0.315348776470193,0.919093519449234,26.3617356754686,0.948975842252453,1.53182253241539,61.5107165760934,0.332304324756775 | |
-4.41415354143828,-37.6643429680954,-0.983110722246539,-3.97273818729445,-22.5986057808573,0.183011769577503,-6.62123031215742,-52.7300801553336,-5.37184425087046 | |
7.45797323063016,16.3056215847584,0.716380879596842,6.71217590756714,9.78337295085503,-0.697709420423757,11.1869598459452,22.8278702186617,-1.02676108223069 | |
-6.40974662732333,-13.3321990741625,-0.903519079437189,-5.768771964591,-7.99931944449751,-0.428547865579768,-9.61461994098499,-18.665078703 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
rm -rf $DATA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Subject } from 'rxJs/Rx'; | |
const body = document.querySelector('body'); | |
let beginningScrollPostion = body.scrollTop, | |
scrollObserver = new Subject<string>(), | |
windowEventListender = window.addEventListener('scroll', (scrollEvent) => { | |
if (body.scrollTop > beginningScrollPostion) { | |
scrollObserver.next('down'); | |
} else { | |
scrollObserver.next('up'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This function is based on the code found at (the original source doesn't work well) | |
// http://stackoverflow.com/questions/20774648/three-js-generate-uv-coordinate | |
// | |
// She following page explains how UV map should be calculated | |
// https://solutiondesign.com/blog/-/blogs/webgl-and-three-js-texture-mappi-1/ | |
// | |
// The following documentation shows what a apherical UV map should look like | |
// https://threejs.org/examples/#misc_uv_tests | |
var ThreeUvMapper = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/regl/1.3.0/regl.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/1.3.3/chroma.min.js"></script> | |
<script> | |
const regl = createREGL(); | |
const doc = document.body; | |
const docWidth = window.innerWidth; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Dynamic Routing Between Capsules | |
https://arxiv.org/abs/1710.09829 | |
""" | |
import torch | |
import torch.nn as nn | |
import torch.optim as optim | |
import torch.nn.functional as F | |
import torchvision.transforms as transforms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* https://twitter.com/wesbos/status/932644812582522880/ */ | |
font-feature-settings: "tnum"; | |
font-variant-numeric: tabular-nums; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const carbonScale = (params = {}) => { | |
const { | |
length = 20, | |
minSize = 10, | |
intervals = 4, | |
increment = 2, | |
transform = v => v | |
} = params; | |
const getSize = count => { |
OlderNewer