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
""" | |
Brief: | |
This file can be used to make a Python dict from a c++ enum. | |
Simply copy-paste the enum from typedef to end as input and | |
out.txt will be created with it as a Python dict. | |
Author: | |
Charles Machalow | |
""" |
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
""" | |
Brief: | |
This file can be used to make a ctypes Structure from a c++ struct. | |
Simply copy-paste the structure from typedef to end as input and | |
out.txt will be created with it as a Structure | |
You may need to make some type fixes... | |
Author: | |
Charles Machalow | |
""" |
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
""" | |
Brief: | |
This file can be used to convert C++ enum code into a function to get a std::string from enum value. | |
To use: Copy and paste the entire enum code (from MSDN) as input to the script. | |
Output goes to an 'out.txt' file. | |
Author: | |
Charles Machalow | |
""" | |
lowCaseFirstLetter = lambda s: s[:1].lower() + s[1:] if s else '' |
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
""" | |
bdm241.py - Bomb Defusal Manual Version 1. Verification Code 241. | |
This file contains functions to solve various challenges faster than using the guide for 'Keep Talking and Nobody Explodes' | |
(C) - Charles Machalow - MIT License | |
""" | |
import itertools | |
words = ["about", "after", "again", "below", "could", "every", "first", "found", "great", "house", "large", "learn", "never", "other", "place", "plant", "point", "right", "small", "sound", "spell", "still", "study", "their", "there", "these", "thing", "think", "three", "water", "where", "which", "world", "would", "write"] | |
morse_seqs = { |
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
""" | |
iseq.py - A script for comparing the speed of is, ==, and neither with boolean values | |
csm10495 - Charles Machalow - MIT License | |
Hint: Usually == is slowest. Neither is fastest | |
""" | |
import timeit | |
def testN(n=1000): | |
""" |
NewerOlder