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
pub fn new(data: impl IntoIterator<Item = T>) -> Self { | |
// raw data to enumerated leaf | |
let mut master: Vec<Vec<Leaf<T>>> = data | |
.into_iter() | |
.map(|point| vec![Leaf::new_data(point)]) | |
.collect(); | |
// add dummy leaf if odd | |
if master.len() % 2 != 0 { | |
master.push(vec![Leaf::new_dummy()]) |
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
"""Automatic minecraft server runner used and maintained for myself; see constants for configuration. Dynamically uses spigot/paper jars placed in same dir""" | |
from __future__ import print_function | |
import os | |
import sys | |
import time | |
import signal | |
"""The possible beginnings of filenames for server jars""" | |
STARTJAR = ["spigot-", "paper-"] |
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
"""JWT KID exploit, ensure Flask (`flask`) and PyJWT (`pyjwt`) are installed before running""" | |
import jwt | |
from flask import Flask | |
DEFAULT_PORT = 8000 | |
DIV = "-" * 32 | |
print(f"JWT KID exploit\n{DIV}") |
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
import os | |
import discord | |
import matplotlib.pyplot as plt | |
import mplfinance | |
import numpy as np | |
import pandas as pd | |
import yfinance as yf | |
from discord.ext.commands import Bot | |
PATH_HISTORIC = "historic.png" |
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
/// Encodes plaintext with [ARGON_PEPPER] before the salt is added | |
fn encode_pepper<P: Into<String>>(plaintext: P) -> String { | |
format!("{}{}", plaintext.into(), ARGON_PEPPER) | |
} | |
/// Simplifies frontend of [gen_argon_hash] + [encode_hash_base64] into | |
/// a single function that only returns completed, [String]ified hash, typically | |
/// used for comparisons with already made hashes | |
pub fn hash_plaintext<P: Into<String>, S: Into<Option<i64>>>( | |
password: P, |
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
Computer Information: | |
Manufacturer: Unknown | |
Model: Unknown | |
Form Factor: Desktop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: AuthenticAMD | |
CPU Brand: AMD FX(tm)-8320 Eight-Core Processor | |
CPU Family: 0x15 |
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
li64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eli64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eeli64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eeli64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eeli64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eeli64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eeli64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eeli64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eeli64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eeli64ei64ei64ei64ei64ei64ei64ei64el2:hi5:there2:hi5:there2:hi5:therei64ei64ei64ei64ei64ei64ei64ei64eeli64ei64ei64ei64ei64ei64e |
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
DOMAIN: pleasepm.com | |
API PREFIX: /api/v1 | |
GET /package/[name] | |
ABOUT: Query for a package using it's unique name. | |
EXAMPLE REQUEST: `GET https://pleasepm.com/package/mypackage` | |
EXAMPLE RESPONSE: | |
{ | |
"status": "success", | |
"body": { |
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
// Maximise button (when clicked) | |
private void buttonMaximise_Click(object sender, EventArgs e) | |
{ | |
if (this.WindowState == System.Windows.Forms.FormWindowState.Normal) // if the forms state is normal (not maximised or minimised) then.. | |
{ | |
this.WindowState = FormWindowState.Maximized; // Tells windows this application should be maximised | |
} | |
else if (this.WindowState == System.Windows.Forms.FormWindowState.Maximized) // if the forms state is maximised then.. | |
{ | |
this.WindowState = FormWindowState.Normal; // Tells windows this application should be in the normal state (not maximised or minimised) |