Skip to content

Instantly share code, notes, and snippets.

View peterdalle's full-sized avatar

Peter M. Dahlgren peterdalle

View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
# Data source: Statistics Sweden
# No data on county and municipality level if count < 3
# No data on country level if count < 2
"sex","county_code","county","municipality","municipality_code","name","count"
"male",NA,NA,NA,NA,"Aadam",2
"male",NA,NA,NA,NA,"Aadhiran",2
"female",NA,NA,NA,NA,"Aadya",3
"male",NA,NA,NA,NA,"Aahil",2
"female",NA,NA,NA,NA,"Aaliya",2
"female","12","Skåne län","Malmö","1280","Aaliyah",3
@yjunechoe
yjunechoe / Kernel estimation animation
Created February 20, 2021 01:33
Recreation of the animation of kernel estimation from "Visualizing How a Kernel Draws a Smooth Line" - https://www.walker-harrison.com/posts/2021-02-13-visualizing-how-a-kernel-draws-a-smooth-line/
## Code by Walker Harrison @walkwearscrocs
## From https://www.walker-harrison.com/posts/2021-02-13-visualizing-how-a-kernel-draws-a-smooth-line/
library(tidyverse)
theme_set(theme_bw())
set.seed(0)
n <- 100
x <- runif(n, 0, 4*pi)
@RealDotNetDave
RealDotNetDave / .editorConfig
Last active May 2, 2024 20:50
.editorConfig by David (dotNetDave) McCarter - dotNetTips.com
# dotNetDave's (David McCarter) Editor Config - dotNetTips.com
# Updates to this file are posted quarterly at: https://bit.ly/EditorConfig5
# Updated May 2, 2024
# dotNetDave's NEW coding standards book is available at: https://bit.ly/CodingStandards8
# Rockin' the Code World with dotNetDave (weekly live show): https://bit.ly/RockinCodeWorldShows
root = true
# All Files
[*]
@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet
@richarddmorey
richarddmorey / cov.R
Created July 1, 2017 15:37
covariance matrix
x = scan()
0.78
0.71
0.69
0.71
0.73
0.68
0.69
0.64
0.64
# data from http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat
# Originally seen at http://spatial.ly/2014/08/population-lines/
# So, this blew up on both Reddit and Twitter. Two bugs fixed (southern Spain was a mess,
# and some countries where missing -- measure twice, submit once, damnit), and two silly superflous lines removed after
# @hadleywickham pointed that out. Also, switched from geom_segment to geom_line.
# The result of the code below can be seen at http://imgur.com/ob8c8ph
library(tidyverse)
@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();
@Atcold
Atcold / My-Unix-shortcuts.md
Last active July 25, 2022 17:48
Unix shortcuts
@jackielii
jackielii / OpenWithSublimeText3.bat
Last active March 13, 2024 17:38 — forked from mrchief/LICENSE.md
Add "Open with Sublime Text 3" to Windows Explorer Context Menu (including folders)
@echo off
SET st2Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@nileshgr
nileshgr / gist:3388917
Created August 18, 2012 18:32
Delete all twitter DMs using this python script
#!/usr/bin/python2
# Go to dev.twitter.com/apps and create a new app; put the information here.
# You need the tweepy library.
consumer_secret = ''
consumer_key = ''
access_token_key = ''
access_token_secret = ''