Skip to content

Instantly share code, notes, and snippets.

View emo-eth's full-sized avatar

James emo-eth

View GitHub Profile
@sixtenbe
sixtenbe / analytic_wfm.py
Last active May 27, 2024 01:24 — forked from endolith/peakdet.m
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See
@weiglemc
weiglemc / .block
Last active January 15, 2019 19:39
D3 Scatterplot Example
license: mit
@caged
caged / README.md
Last active March 11, 2023 18:50 — forked from mbostock/.block
Using d3-tip to add tooltips to a d3 bar chart
@christophermanning
christophermanning / README.md
Last active October 27, 2019 20:03
Random Walk USA

Created by Christopher Manning

Summary

This is an experiment using a random walk to draw shapes. Adjusting theta results in a very organic or procedural drawing. The random walk stays in the geometry by using a point in polygon test.

Controls

@dannguyen
dannguyen / algorithm-for-nyt-algorithms.README.md
Last active November 23, 2020 13:30
My algorithm to find readings about algorithms (from the New York Times articlesearch API)

Algorithm to find readings about algorithms

(as found among published New York Times articles)

The file fetch_nyt_articlesearch_api.py is a Python 3.4+ (w/ Requests) script that queries for the New York Times articlesearch.v2 API for all articles containing "algorithms" as a subject and more than 700 words.

  • Saves each time period of articles as a JSON file.
  • Requires a NYT developers API key for articlesearch API: developer.nytimes.com/signup
  • requires an environmental variable, NYT_ARTICLE_SEARCH_KEY

The script is hardcoded to fetch results from 1800 to today (2016-05-24), which returns 1,653 results.

@mbostock
mbostock / .block
Last active July 4, 2016 13:46
ColorBrewer Spline
license: gpl-3.0
height: 620
@pchhetri
pchhetri / README.md
Last active July 16, 2024 21:24
OS X iMessage (Messages) database merger

OS X iMessage (Messages) database merger

Use it at your own risk! You might end up worse than before. Backup everything beforehand. Twice.

If you have the Messages app setup in multiple Macs with the same Apple ID you may end up with iMessages (or SMS) scattered around all of these Macs. This is because after a certain time the new iMessages (or SMS) recevied will cease to push to devices afer a certain time has elapsed. Thus, if a computer has been offline for some period of time it won't get the new iMessages.

Each Messages instance stores the information in a SQLite database, to consolidate all these databases run the script below. This is where the Messages app stores the SQLite database under ~/Library/Messages, the folder contents will look like as follows:

  • chat.db
@pathikrit
pathikrit / README.md
Last active April 24, 2021 17:36
My highly opinionated list of things needed to build an app in Scala
@veltman
veltman / README.md
Last active December 20, 2018 08:35
Electoral cartograms
@Kcnarf
Kcnarf / .block
Last active April 11, 2017 14:08
Voronoï playground - Do you see the path ?
license: gpl-3.0