Skip to content

Instantly share code, notes, and snippets.

View clemp's full-sized avatar

Christian Lemp clemp

View GitHub Profile
@fauxneticien
fauxneticien / README.md
Last active June 23, 2023 06:22
Research knowledge base with Zotero, Highlights, and Obsidian

Research knowledge base with Zotero, Highlights, and Obsidian

Ever since I started working on my honours thesis in 2013, I had been tinkering with various workflows to manage references, PDFs, PDF annotations and notes all in some coherent way. The workflow I describe here is the latest one (February 2021 as of writing), and I think I've finally found something that satisfies a lot of the [admittedly very subjective] desiderata.

Knowledge provenance

Being [perhaps overly] wary of mis-citing something, I'd like to be able to quickly go back to the original source, and the exact page and PDF highlight that I'm referring to. For the last couple of years, I have been using the Highlights App (MacOS only, unfortunately; though there may be Windows/Linux equivalents). The two main features of Highlights are that:

  1. It automatically extracts PDF highlights and is able to keep them updated in a 'sidecar' file, so for a file like Ram_et_al_2020_Neural_Network.pdf, there'll be
@OthmanT
OthmanT / IsPointInArc.pde
Last active June 26, 2020 02:00
How to check if a point is in an arc.
Arc arc;
void setup() {
size(500, 500);
arc = new Arc(width/2, height/2, -PI, PI/4, 200);
}
void draw() {
background(51);
arc.rotateBy(0.03);
@tatianamac
tatianamac / tatiana-mac-speaker-rider.md
Last active March 24, 2024 12:22
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@jeffThompson
jeffThompson / RandomPath.pde
Created August 15, 2017 14:19
Generates a random path between two predefined points.
/*
RANDOM PATH
Jeff Thompson | 2017 | jeffreythompson.org
Generates a random path between two predefined points.
*/
import java.util.Date; // imports for timestamp
@antiboredom
antiboredom / index.html
Created December 15, 2014 16:36
A simple example showing how to save animated gifs from p5.js sketches, using https://github.com/jnordberg/gif.js
<html>
<head>
<script src="gif.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.3.11/p5.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.3.11/addons/p5.dom.js"></script>
<script src="sketch.js"></script>
</head>
<body>
<p>First, allow camera access.<p><p>Then click once to start recording, and another time finish recording and make a gif.</p>
</body>
import networkx as nx
import numpy as np
import itertools
## We define each S* motif as a directed graph in networkx
motifs = {
'S1': nx.DiGraph([(1,2),(2,3)]),
'S2': nx.DiGraph([(1,2),(1,3),(2,3)]),
'S3': nx.DiGraph([(1,2),(2,3),(3,1)]),
'S4': nx.DiGraph([(1,2),(3,2)]),
@jeromyanglim
jeromyanglim / example-r-markdown.rmd
Created May 17, 2012 04:23
Example of using R Markdown
This post examines the features of [R Markdown](http://www.rstudio.org/docs/authoring/using_markdown)
using [knitr](http://yihui.name/knitr/) in Rstudio 0.96.
This combination of tools provides an exciting improvement in usability for
[reproducible analysis](http://stats.stackexchange.com/a/15006/183).
Specifically, this post
(1) discusses getting started with R Markdown and `knitr` in Rstudio 0.96;
(2) provides a basic example of producing console output and plots using R Markdown;
(3) highlights several code chunk options such as caching and controlling how input and output is displayed;
(4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and
(5) discusses the implications of R Markdown.