openpgp4fpr:1623A4C60EF7B422D2C89D5D0610BBE990258018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script that takes you to some random page | |
# on the Internet. | |
# Adapted from: https://lazybea.rs/ils3/ | |
INDIEBLOG=https://indieblog.page/random | |
OOH=https://ooh.directory/random | |
FEEDLE=https:/feedle.world/random |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
from argparse import ArgumentParser | |
from urllib import request | |
from urllib.parse import urlparse | |
import sys | |
parser = ArgumentParser(description="Request Internet Archive to save the site") | |
parser.add_argument("URL", type=str, help="URL to save") | |
parser.add_argument("-s", action='store_true', help="Silent. Makes output less verbose") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Tool to grab list of photo information (URLs/etc) of | |
images in Google Photos album. | |
Adapted from Matthieu Bessat | |
https://github.com/lefuturiste/google-photos-album-crawler/blob/f33026d379058912c597d5802296b55b62ed27a4/src/Crawler.php | |
""" | |
import json | |
import re | |
import sys | |
from http.client import HTTPResponse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(dplyr) | |
library(ggplot2) | |
library(GGally) | |
library(ggthemr) | |
library(gapminder) | |
gapminder_mediangdp = gapminder %>% | |
group_by(year, continent) %>% | |
summarize(medianGdp = median(gdpPercap)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Addition & subtraction are independent implementations | |
var add = function(x, y) { | |
if (y == 0) { | |
return x; | |
} | |
if (y < 0) { | |
return add(x - 1, y + 1); | |
} | |
return add(x + 1, y - 1); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math" | |
"math/rand" | |
"time" | |
) | |
// Returns the number of successes, to approx pi use formula |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
int isPrime(unsigned long long n); | |
int main() { | |
printf("%d", 2); | |
unsigned long long i = 3; | |
while (1) { | |
if (isPrime(i)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var decay = function(initial, chance) { | |
var numDecayed = 0; | |
for (var i = 0; i < initial; i++) { | |
if (Math.random() < chance) { | |
numDecayed++ | |
} | |
} | |
return numDecayed; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
//Amount of times for simulation to run | |
#define N 5000000 | |
//The amount of times per simulation | |
#define R 1 | |
//The amount of choices | |
#define C 4 |
NewerOlder