Porting d3.js histogram layout example to p5.js using d3.js tools and libraries as much as possible.
Original d3.js code: http://bl.ocks.org/mbostock/3048450
A Pen by Sepand Ansari on CodePen.
Porting d3.js histogram layout example to p5.js using d3.js tools and libraries as much as possible.
Original d3.js code: http://bl.ocks.org/mbostock/3048450
A Pen by Sepand Ansari on CodePen.
Porting d3.js voronoi layout example to p5.js using d3.js voronoi layout, but drawing in p5.js
Original d3.js code: http://bl.ocks.org/mbostock/4060366
A Pen by Sepand Ansari on CodePen.
<div id="container"></div> | |
<div id='sections'> | |
<section class="step active"> | |
<div class="title">Title</div> | |
data not too large and managable | |
</section> | |
<section class="step"> | |
<div class="title">Title 2</div> | |
your data grows as your business grows | |
</section> |
urls=( http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/aberporthdata.txt http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/armaghdata.txt http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/ballypatrickdata.txt http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/bradforddata.txt http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/braemardata.txt | |
http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/cambornedata.txt http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/cambridgedata.txt http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/cardiffdata.txt http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/chivenordata.txt http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/cwmystwythdata.txt | |
http://www.metoffice.gov.uk//pub/data/weather/uk/climate/stationdata/dunstaffnagedata.txt http://www.metoffice.gov.uk//pub/data/weather/uk/climate/statio |
// copy and paste it to console to get all filenams. if didn't work update '.photo-list-photo-view' with correct div class | |
[].forEach.call( document.querySelectorAll('.photo-list-photo-view'), function(item) { var url = item.style.backgroundImage.replace('url("//',''); url = url.replace('")',''); console.log(url); }); |
Port of this python code in Javascript.
LSH from Wikipedia:
Locality-sensitive hashing (LSH) reduces the dimensionality of high-dimensional data. LSH hashes input items so that similar items map to the same “buckets” with high probability (the number of buckets being much smaller than the universe of possible input items). LSH differs from conventional and cryptographic hash functions because it aims to maximize the probability of a “collision” for similar items. Locality-sensitive hashing has much in common with data clustering and nearest neighbor search.
More explanation:
Source: https://gist.github.com/tullyhansen/7621632
After adding an operation (mutation or query) to exchange the corresponding operation has to be added to Metaphysics. Because most of the clients don't use exchange directly since exchange doesn't know anything about galleries, users or artworks and it only keeps the ID of those entities. MP pulls that data from gravity and adds that to the order object coming from exchange.
This is a temporary solution for now. Graphql has a mechanism called sticking that can infer all these from the schema and defined types. At this point stitching is not fully implemented so it needs to be done manually. If you know that stitching is enabled for exchange stop reading and delete this document immediately.
Follow this PR as a reference: artsy/metaphysics#1375
#!/bin/bash | |
verbose=`$( $2 = "-v" )` | |
verbose=0; [ "$2" == "-v" ] && verbose=1 | |
echo "counting lines in directory: $1 params? $2, verbose: use -v? $verbose" | |
sum=0 | |
for filename in `find "$1" -type f` | |
do | |
if [ $verbose = 1 ] | |
then |