Skip to content

Instantly share code, notes, and snippets.

View ivanistheone's full-sized avatar

Ivan Savov ivanistheone

View GitHub Profile
@rmcelreath
rmcelreath / prior_likelihood_conflict.r
Created September 11, 2023 11:29
Demonstration of how normal and student-t distributions interact in Bayesian updating
# prior - likelihood conflict
library(rethinking)
yobs <- 0
mtt <- ulam(
alist(
y ~ dstudent(2,mu,1),
mu ~ dstudent(2,10,1)
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@andrew-nuwber
andrew-nuwber / README.md
Last active December 29, 2023 00:26
Namecheap DNS to zone file
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carld
carld / build.sh
Created July 15, 2017 00:22
The build script from my compiler blog article
chez --script c.scm > c.s
nasm -f macho c.s
ld c.o
./a.out
echo $?
@carld
carld / c.scm
Created July 15, 2017 00:21
The compiler from my blog article
(define emit printf)
(define (compile exp)
(cond
[(fixnum? exp) (emit "push ~a~%" exp)]
[(eq? '+ (car exp)) (begin
(compile (cadr exp))
(compile (caddr exp))
(emit "pop eax~%")
(emit "pop ebx~%")
@vitorfs
vitorfs / github_webhooks.py
Last active June 25, 2022 14:51
Handling GitHub Webhooks Using Django
import hmac
from hashlib import sha1
from django.conf import settings
from django.http import HttpResponse, HttpResponseForbidden, HttpResponseServerError
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
from django.utils.encoding import force_bytes
import requests
@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
@bishboria
bishboria / springer-free-maths-books.md
Last active March 22, 2024 11:19
Springer made a bunch of books available for free, these were the direct links
@kharrison
kharrison / String.swift
Last active January 22, 2024 14:03
Swift String Playground Examples
// Swift Standard Librray - String
// Keith Harrison http://useyourloaf.com
// Import Foundation if you want to bridge to NSString
import Foundation
// ====
// Initializing a String
// ====