Skip to content

Instantly share code, notes, and snippets.

View chiragzq's full-sized avatar
💭
Eating Cheese

Chirag Kaushik chiragzq

💭
Eating Cheese
  • West Lafayette, IN
View GitHub Profile
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define endl "\n"
#define INF 10000000
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define endl "\n"
#define INF 10000000
@chiragzq
chiragzq / theme.js
Last active September 13, 2020 06:14
Schoology dark theme
// ==UserScript==
// @name Schoology dark theme
// @namespace https://chiragzq.github.io
// @version 0.1
// @author chiragzq
// @match *://schoology.harker.org/*
// @grant none
// ==/UserScript==
// Get your API credentials at https://app.schoology.com/api and insert them below.
// Go to https://api.schoology.com/404 to avoid CORS problems.
// Paste the script in console, wait for "Ready," then call the function searchSection(sectionId).
const CONSUMER_KEY = "9894f356bc999e01b0e346aa94e55ec205dda14ec";
const CONSUMER_SECRET = "5f4921f7cf268127dd2a61f137787e14";
let output;
var users = [], userCourses = [], matches = [];
async function fetchUsers() {
users = [];
let numUsers = 1000;
@chiragzq
chiragzq / hltv_roles.js
Last active March 14, 2022 00:50
Calculate optimal role selection for HLTV fantasy
let names = Array.from(document.querySelectorAll(".card-player-tag.text-ellipsis>span")).slice(0,5).map(elem => elem.innerHTML);
let player_buttons = Array.from(document.getElementsByClassName("assign-role-button"));
let role_names = [];
let scores = [];
let trigger_scores = [];
let BIG_MUL = 5;
let SMALL_MUL = 2;
let NUM_PLAYERS = 5;