Skip to content

Instantly share code, notes, and snippets.

@ProfessorQu
ProfessorQu / partners.py
Created July 11, 2025 14:51
List all possible partner pairings that encompass WUBRG colors
import itertools
data = {
"Tymna/Ravos": [1, 0, 1, 0, 0],
"Akiri/Bruse Tarl": [1, 0, 0, 1, 0],
"Ishai": [1, 1, 0, 0, 0],
"Sidar Kondo": [1, 0, 0, 0, 1],
"Kraum/Ludevic": [0, 1, 0, 1, 0],
"Thrasios/Kydele": [0, 1, 0, 0, 1],
"Silas Renn": [0, 1, 1, 0, 0],
@ProfessorQu
ProfessorQu / counting_commanders.py
Created February 25, 2025 20:31
Python code to calculate amount of commanders
import requests
import json
def count_num(query: str) -> int:
response = requests.get('https://api.scryfall.com/cards/search?q=' + query).text
response_json = json.loads(response)
return response_json['total_cards']
def choose_two(num: int) -> int:
return int((num * (num - 1)) / 2)
@ProfessorQu
ProfessorQu / sturdy.csv
Last active October 11, 2024 21:09
Sturdy values and their outcomes in save.json in the Yawnoc Demo
Values Sturdy Level Prevent Damage Chance
[0.5; 2] 1 2.6%
[1; 2] 2 5.1%
[2; 10] 20 41%
[10; 2] 20 41%
[100; 100] A lot of X's A very high number
@ProfessorQu
ProfessorQu / precision.csv
Last active October 11, 2024 21:02
Precision values and their outcomes in save.json in the Yawnoc Demo
Values Precision Level Crit Chance
[1; 2] 2 7.1%
[1; 10] 10 41.1%
[10; 2] 20 99%
[10; 5] 50 458.5%
[5; 10] 50 458.5%
[2; 2] 4 14.8%
[4; 2] 8 31.7%
[100; 100] A lot of X's A very high number
[1; 1] 1 3.5%
@ProfessorQu
ProfessorQu / CameraController.cs
Created September 4, 2020 14:28
Simple Unity Camera Controller with locked mouse
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraController : MonoBehaviour
{
/*
Written by ProfessorQu. Look around by using the mouse.
A camera with a locked cursor so that you can look around 360°.
Don't have to assign any variable just attach to camera.