Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Pietsch cpietsch

View GitHub Profile
View a little chat with gpt-3
Q: What is human life expectancy in the United States?
A: Human life expectancy in the United States is 78 years.
Q: Who was president of the United States in 1955?
A: Dwight D. Eisenhower was president of the United States in 1955.
Q: What party did he belong to?
A: He belonged to the Republican Party.
Q: Who was president of the United States before George W. Bush?
View DHT22 Raspi node-red to influxdb
[
{
"id":"8447d084.7e9fb",
"type":"tab",
"label":"Flow 1",
"disabled":false,
"info":""
},
{
"id":"5ab61f98.c68d3",
@cpietsch
cpietsch / download.js
Created Dec 19, 2018
nodejs script to download images from a csv file
View download.js
var fsPromises = require('fs').promises
var dsv = require('d3-dsv');
var download = require('download');
async function all(){
let data = dsv.csvParse(await fsPromises.readFile("data.csv", { encoding: "utf8" }))
for(let entry of data) {
console.log(entry.url, entry.id)
View keybase.md

Keybase proof

I hereby claim:

  • I am cpietsch on github.
  • I am chrispie (https://keybase.io/chrispie) on keybase.
  • I have a public key ASA1z5V4JBxq8UzVGSXn8oqk_wln55LjyjfFZEUtiEz2IAo

To claim this, I am signing this object:

@cpietsch
cpietsch / .block
Last active Apr 25, 2017
Geo Scatterplot Transitions
View .block
license: mit
@cpietsch
cpietsch / README.md
Last active May 29, 2016
Local Variables 2
View README.md
@cpietsch
cpietsch / README.md
Last active May 29, 2016
Local Variables
View README.md

In response to mbostock's block: Local Variables and the Tweet I implemented a little variation having a .local(name[, value) method you can use on selections.

On set, the value is stored on the given element:

element.local("foo", value);

On get, the value is retrieved from given element, or the nearest ancestor that defines it:

var value = element.local("foo");

@cpietsch
cpietsch / .block
Last active Feb 27, 2016 — forked from mbostock/.block
Pseudo-Dorling Cartogram
View .block
license: gpl-3.0
@cpietsch
cpietsch / README.md
Last active Jan 4, 2016
Voronoi Images
View README.md

Using voronoi tessellation on random points as a surface for images. From here you could distribute the points in a more meaningfull way e.g. using t-SNE or d3.layout.force()

@cpietsch
cpietsch / README.md
Last active Oct 29, 2020
d3.js map with markers
View README.md

Easy example on how to put marker on a d3.js map.

You got 2 options:

  • using d3.geo.path() which does all the work for you
  • using svg circles and translating them via projection(d.geometry.coordinates)
You can’t perform that action at this time.