This file contains 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
class Page: | |
def __init__(self): | |
self.r = 0 | |
self.p = None | |
def __str__(self): | |
str(self.p) | |
def inc_clk(cur: int, max: int) -> int: |
This file contains 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
STORE_MEM_INST = 'stw' | |
REGISTER_PREFIX = 'r' | |
STACK_POINTER_REG = 'sp' | |
RETURN_POINTER_REG = 'ra' | |
WORD_SIZE = 4 | |
from_reg = int(input("from register: ")) | |
to_reg = int(input("to register: ")) | |
output = [] |
This file contains 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> | |
#define CHECK_UP_TO 100 | |
int main() { | |
_Bool notPrime[CHECK_UP_TO] = { 1, 1 }; | |
for (int i = 0; i < sqrt(CHECK_UP_TO); i++) { | |
if (notPrime[i] == 0) { |
This file contains 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
"""rot_cipher.py - A rot-n/Caesar cipher tool that takes user input plaintext and outputs ciphertext | |
- Provides encrypt() and decrypt()""" | |
# Store alphabet and the length for later use | |
ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
ALPHABET_LEN = len(ALPHABET) | |
def encrypt(plaintext: str, rot: int) -> str: |
This file contains 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
# Exported from npc_groups_profiles.py by JDTech | |
# | |
# Values are in following format: | |
# TargetProfile = [name],[EM %],[Thermal %],[Kinetic %],[Explosive %],[Max velocity m/s],[Signature radius m],[Radius m] | |
TargetProfile = Sentry Gun,22.499999999999996,18.125000000000004,19.374999999999996,18.75,0.0,100.0,100.0 | |
TargetProfile = Police Drone,18.458819370802402,19.288617886178862,21.57601235415237,22.222782258064516,2000.0,100.0,100.0 | |
TargetProfile = Pirate Drone,18.59375,18.281250000000004,21.030745967741936,20.46875,250.0,87.5,87.5 | |
TargetProfile = LCO Drone,0.0,0.0,0.0,0.0,350.0,100.0,100.0 | |
TargetProfile = Minor Threat,18.282493368700266,15.714285714285714,23.67302955665025,27.224221627050554,380.0,45.0,45.0 | |
TargetProfile = Rogue Drone,17.14285714285714,18.571428571428573,24.28571428571429,25.71428571428571,250.0,45.0,45.0 |
This file contains 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
// ==UserScript== | |
// @name Torn Bazaar Item IDs | |
// @namespace https://j0e.ca/ | |
// @version 0.3 | |
// @description Displays item IDs in the Bazaar | |
// @author JDTech | |
// @match https://www.torn.com/bazaar.php* | |
// @grant GM_log | |
// ==/UserScript== |
This file contains 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
# | |
# | |
# TheFrenchGhostys YouTube-DL Archivist Scripts: The ultimate collection of scripts for YouTube-DL | |
# https://github.com/TheFrenchGhosty/TheFrenchGhostys-YouTube-DL-Archivist-Scripts | |
# https://github.com/TheFrenchGhosty | |
# | |
# Modified by JDTech | |
.\youtube-dlc --format "(bestvideo[vcodec^=av01][height>=4320][fps>30]/bestvideo[vcodec^=vp9.2][height>=4320][fps>30]/bestvideo[vcodec^=vp9][height>=4320][fps>30]/bestvideo[vcodec^=av01][height>=4320]/bestvideo[vcodec^=vp9.2][height>=4320]/bestvideo[vcodec^=vp9][height>=4320]/bestvideo[height>=4320]/bestvideo[vcodec^=av01][height>=2880][fps>30]/bestvideo[vcodec^=vp9.2][height>=2880][fps>30]/bestvideo[vcodec^=vp9][height>=2880][fps>30]/bestvideo[vcodec^=av01][height>=2880]/bestvideo[vcodec^=vp9.2][height>=2880]/bestvideo[vcodec^=vp9][height>=2880]/bestvideo[height>=2880]/bestvideo[vcodec^=av01][height>=2160][fps>30]/bestvideo[vcodec^=vp9.2][height>=2160][fps>30]/bestvideo[vcodec^=vp9][height>=2160][fps>30]/bestvideo[vcodec^=av01][height>=2160]/bestvideo[vcodec^=vp9.2] |
This file contains 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
# [what] JDTech's Python rewrite of Sheepy's PHP infra calculator | |
# [license] MIT | |
# [updated] 2020-09-02 | |
def infra_price(amt: float) -> float: | |
"""Calculates infra price at a certain infra level | |
Args: | |
amt (float): Infra level | |
Returns: | |
float: Price of one (1) infra at specified infra level |
This file contains 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
import java.lang.reflect.Field; | |
class SomeClass { | |
private int privateValue = 0; | |
public int getPrivateValue() { | |
return privateValue; | |
} | |
public void setPrivateValue(int privateValue) { |