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 convert_az_to_bearing(a): | |
"""Takes the azimuth, which should be 0-360 degrees, and returns a string N/E/S/W. | |
North is 0 degrees.""" | |
if a > 360 or a < 0 or not a: | |
return "" | |
elif a >= 348.75 or a < 11.25: | |
return "N" | |
elif a >= 11.25 and a < 33.75: | |
return "NNE" |
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 os | |
with open('output.txt', 'w') as a: | |
for path, subdirs, files in os.walk('/folder/with/files'): | |
for filename in files: | |
filestr = str(filename) | |
if filestr.endswith('.htm') or filestr.endswith('.html'): | |
print(filename) | |
a.write(str(filename) + ',') #separate by comma | |
else: |
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
#This snippet takes words intended for a bip39 mnemonic seed as a list and reorders them into a seed where the checksum validates. | |
#Often people want to choose their own seed words but the resulting order doesn't adhere to the bip39 specification, | |
#This is a way to force your favourite words into a valid hd bip39 seed. Disclaimer: Use true random entropy to select your words! | |
#All possible combinations are written to a text file, but that's probably going to be a lot of choice so you should probably | |
#Limit the number of itterations or cancel it a ways into processing | |
import itertools | |
import os | |
import binascii | |
import mnemonic |
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
REM This script will check for SatisfactoryDedicatedServer game updates (and install them) | |
REM Then it'll turn on the server. | |
REM If the server closes for any reason (like a crash/game update) it'll restart. | |
REM Note, depending on where dedicated server is installed, you may need to run as Admin. | |
REM TODO: Add a parameter for where the steamcmd folder lives. | |
REM TODO: The game does a good job at auto-saving, but maybe we can add a backup with each loop in-case? | |
REM Bypass "Terminate Batch Job" prompt so it'll continue looping without user prompt | |
if "%~1"=="-FIXED_CTRL_C" ( | |
REM Remove the -FIXED_CTRL_C parameter |