Skip to content

Instantly share code, notes, and snippets.

View kylepls's full-sized avatar

Kyle kylepls

View GitHub Profile
@kylepls
kylepls / spiral.ipynb
Last active February 11, 2024 08:26
2-Dimensional Grid Square Spiral Coordinates
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kylepls
kylepls / rubiks-gen.ipynb
Last active February 11, 2024 08:11
Rubik's Algorithm Visualizer
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kylepls
kylepls / PsAndQs.java
Created May 27, 2023 21:36
PsAndQs Encoder
import java.io.*;
import java.nio.charset.StandardCharsets;
/**
* Encode streams into Ps and Qs.
* Why? Because it's mannerly.
* P = 0
* Q = 1
*/
public class PsAndQs {
@kylepls
kylepls / pdf_merge.py
Created November 15, 2020 23:47
Merges several input PDFs into a single, large, PDF with bookmarks for each individual PDF.
import os
import re
import sys
import PyPDF2
MIN_PYTHON = (3, 0)
"""
According to all known laws of aviation, there is no way that a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway. Because bees don’t care what humans think is impossible.”
SEQ. 75 - “INTRO TO BARRY” INT. BENSON HOUSE -
DAY
ANGLE ON: Sneakers on the ground.
Camera PANS UP to reveal
BARRY BENSON’S BEDROOM
ANGLE ON: Barry’s hand flipping through different sweaters in his closet.
BARRY Yellow black, yellow black, yellow black, yellow black, yellow black, yellow black...oohh, black and yellow...
ANGLE ON: Barry wearing the sweater he picked, looking in the mirror.
BARRY (CONT’D) Yeah, let’s shake it up a little. He picks the black and yellow one. He then goes to the sink, takes the top off a CONTAINER OF HONEY, and puts some honey into his hair. He squirts some in his mouth and gargles. Then he takes the lid off the bottle, and rolls some on like deodorant.
package fuck.josh;
import java.util.HashMap;
import java.util.Map;
import rx.Observable;
import rx.subjects.PublishSubject;
public class NotificationLoop {
package in.kyle.plotz2.obj.plot;
import in.kyle.plotz2.Plotz;
import in.kyle.plotz2.config.configs.PlotWorldConfig;
import in.kyle.plotz2.eum.PlotCorner;
import in.kyle.plotz2.obj.player.PlotLocation;
import in.kyle.plotz2.obj.player.PlotPlayer;
import in.kyle.plotz2.world.WorldAdapter;
import lombok.AllArgsConstructor;
package in.kyle.plotz2.util;
import in.kyle.plotz2.obj.player.PlotLocation;
import lombok.Data;
/**
* Created by Kyle on Jul 24, 2015
*/
public class PlotIdUtils {
@kylepls
kylepls / PsAndQs.java
Created July 18, 2017 05:38
Would rather use P's and Q's rather than binary
package in.kyle.api;
/**
* P = 0
* Q = 1
*/
public class PsAndQs {
private static final byte[] BIT_MASKS =
new byte[]{0b1000000, 0b1000000, 0b100000, 0b10000, 0b1000, 0b100, 0b10, 0b1};
@kylepls
kylepls / google.java
Last active July 18, 2017 05:49
Rewrote google in java. super ez.idk y they need 2 billion lines of code for this lmao
import java.util.Scanner;
class Main {
static String[] webpages =
new String[]{"google.com", "bing.com", "youtube.com", "youtube.biz", "spectonik.om"};
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Entier search: ");
String s = scanner.nextLine();