Skip to content

Instantly share code, notes, and snippets.

View xor2003's full-sized avatar
💭
Wating time/knowledge to finish masm2c translator

x0r xor2003

💭
Wating time/knowledge to finish masm2c translator
View GitHub Profile
@primaryobjects
primaryobjects / montyHall.R
Last active June 24, 2020 17:33
Monty Hall Problem and probability, simulated in R, Bayes Nets, bayesian nets.
library(ggplot2)
montyHall <- function(maxDoors = 3, switch = T, tries = 10) {
plays <- data.frame()
for (i in 1:tries) {
# Create the doors.
doors <- 1:maxDoors
# Choose a winning door.
@jasonbot
jasonbot / github_access_token_for_app_install.py
Last active April 27, 2023 10:42
Get a github3 client instance for an app installation
def get_github3_client():
"""See
https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app
for an explanation of how/why this is like it is.
Requires requests, pyjwt, and github3. Make sure you intall a newer
version of cryptography for pyjwt as well."""