Skip to content

Instantly share code, notes, and snippets.

View jamesy0ung's full-sized avatar

James Young jamesy0ung

View GitHub Profile
#include <iostream>
#include <random>
#include <utility>
std::pair<double, double> generateRandomNumber(std::mt19937& gen, std::uniform_real_distribution<>& dis) {
double randomValue1 = dis(gen);
double randomValue2 = dis(gen);
return std::make_pair(randomValue1, randomValue2);
}
#include <string>
#include <iostream>
#include <thread>
#include <random>
#include <atomic>
#include <vector>
#include <iomanip>
#include <chrono>
#include <algorithm>
#include <array>
#include <iostream>
const int c = { 299792458 };
float findWavelength(float frequency)
{
return(c / (frequency * 1000000)); // Convert MHz to Hz and use meters for wavelength
}
float findDipoleLeg(float wavelength)
#include <iostream>
#include <climits>
long long int f0 = { 0 };
long long int f1 = { 1 };
long long int fn = {};
int main()
{
std::cout << "Printing fibbonacci sequence\n";
@jamesy0ung
jamesy0ung / oculusDebloater.bat
Created October 19, 2024 01:32
Meta/Oculus debloater
@echo off
echo Disabling Oculus packages...
adb shell pm disable-user --user 0 com.oculus.explore
if %errorlevel% neq 0 echo Failed to disable com.oculus.explore
adb shell pm disable-user --user 0 com.oculus.socialplatform
if %errorlevel% neq 0 echo Failed to disable com.oculus.socialplatform
adb shell pm disable-user --user 0 com.meta.curio.toybox
#include <iostream>
#include <string>
#include <cmath>
#include <iomanip>
long double e = 1.0;
long double term = 1.0;
int i = 1;
long double precision = 1.0e-10;
bool flag_found = false;
@jamesy0ung
jamesy0ung / decimaltobinary.cpp
Last active October 17, 2024 06:39
Decimal to Binary
#include <iostream>
#include <vector>
#include <string>
#include <limits>
#include <stdexcept>
int main()
{
std::string input;
unsigned long long num;
import serial
import time
import logging
import sys
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.StreamHandler(sys.stdout),
logging.FileHandler('switch_config.log')
@jamesy0ung
jamesy0ung / tortoise-tts.ipynb
Created September 20, 2024 07:08
tortoise-tts.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
0.0.0.0 outlookads.live.com
0.0.0.0 adtago.s3.amazonaws.com
0.0.0.0 analyticsengine.s3.amazonaws.com
0.0.0.0 analytics.s3.amazonaws.com
0.0.0.0 advice-ads.s3.amazonaws.com
0.0.0.0 pagead2.googlesyndication.com
0.0.0.0 adservice.google.com
0.0.0.0 pagead2.googleadservices.com
0.0.0.0 afs.googlesyndication.com
0.0.0.0 stats.g.doubleclick.net