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
//#define LOADING_SAVES_TYPE_WORLD_INIT 1 | |
//#define SAVING_SAVES_TYPE_MASTER_CONTROLLER_DEATH 1 | |
#ifndef GLOBAL_LIST_EMPTY | |
#define GLOBAL_LIST_EMPTY(n) var/static/list/##n = list() | |
#endif | |
#ifndef GLOBAL_VAR_INIT | |
#define GLOBAL_VAR_INIT(n, value) var/static/##n = value | |
#endif | |
GLOBAL_LIST_EMPTY(SavingCache) |
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
def multiplyList(l): | |
dot = 1 | |
for i in l: | |
dot *= i | |
return dot | |
def persistence(n, depth = 0): | |
nstr = str(n) | |
if len(nstr) == 1: | |
return depth | |
dot = multiplyList([int(i) for i in list(nstr)]) |
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
def DegreeToList(degree): | |
dot = [] | |
seconds = degree * 3600 | |
hours = seconds // 3600 | |
seconds -= hours*3600 | |
minutes = seconds // 60 | |
seconds -= minutes * 60 | |
seconds = round(seconds) | |
minutes = round(minutes) |
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
using System; | |
using System.Collections.Generic; | |
public class RomanDecode | |
{ | |
private static readonly Dictionary<char, int> RomanToNum = new Dictionary<char, int> | |
{ | |
['I'] = 1, | |
['V'] = 5, | |
['X'] = 10, |
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
from difficult_module import Difficult2Str as num2toy, Difficult as time_of_year | |
Difficults = [ | |
time_of_year("Winter", range(0, 3)), | |
time_of_year("Spring", range(3, 6)), | |
time_of_year("Summer", range(6, 9)), | |
time_of_year("Autumn", range(9, 12)) | |
] | |
def Num2TimeOfYear(Month): |
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 sys | |
from os import system as sh | |
from yaml import load, dump | |
try: | |
from yaml import CLoader as Loader, CDumper as Dumper | |
except ImportError: | |
from yaml import Loader, Dumper | |
class ErrorCode: |
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 Difficult: | |
Name = "None" | |
Range = range(1) | |
def __init__(self, _name, _range): | |
self.Name = _name | |
self.Range = _range | |
def __str__(self): | |
return f"[{self.Name}, {self.Range}" | |
Difficults = [ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class Deck | |
{ | |
private Random rand; | |
public string[] DefaultDeck = new string[] | |
{ | |
"The Magician", | |
"The High Priestess", |