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
# Imports | |
import logging | |
import threading | |
from typing import Callable, Union | |
import ywg.utils.logger as logger_util | |
# Code | |
class Worker: |
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 | |
import shutil | |
import json | |
import re | |
def is_contained_inside_2d_array(element, index, array): | |
for arr_elem in array: | |
print(element) | |
if arr_elem[index] == element: |
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
;- Compiler directives & imports | |
EnableExplicit | |
CompilerIf #PB_Compiler_Thread = 0 | |
CompilerError "Required: Thread-safe compiler flag." | |
CompilerEndIf | |
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
;{- Code Header | |
; ==- Basic Info -================================ | |
; Name: IPv4Helper.pbi | |
; Version: 0.0.1 | |
; Author: Herwin Bozet | |
; Create date: 21 June 2019, 19:24:33 | |
; | |
; Description: A basic set of utility procedures and macros to help with IPv4 addresses. | |
; | |
; ==- Compatibility -============================= |
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
;EnableExplicit | |
; Original ASM code for .l | |
; https://www.purebasic.fr/english/viewtopic.php?f=19&t=17427 | |
Macro EndianSwap(Number) | |
CompilerSelect TypeOf(Number) | |
CompilerCase #PB_Word | |
EndianSwapW(Number) |
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
; http://www.unrealtexture.com/Unreal/Downloads/3DEditing/UnrealEd/Tutorials/unrealwiki-offline/umod-file-format.html | |
#UMOD_DECALSTAY$ = "DecalStay.umod" | |
#UMOD_EXCESSIVE$ = "Excessive100.umod" | |
; .l type (4bytes) | |
#UMOD_MAGIC_NBR = $9FE3C5A3 | |
;#UMOD_MAGIC_NBR = $A3C5E3FE | |
#UMOD_FILE_REGULAR = $00 |
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
W1NldHVwXQ0KUHJvZHVjdD1EZWNhbCBTdGF5DQpWZXJzaW9uPTIwMA0KQXJjaGl2ZT1EZWNhbFN0YXkudW1vZA0KU3JjUGF0aD0uDQpNYXN0ZXJQYXRoPS4uDQpSZXF1aXJlcz1VbnJlYWxUb3VybmFtZW50NDAwUmVxdWlyZW1lbnQNCkdyb3VwPVNldHVwR3JvdXANCkdyb3VwPURlY2FsU3RheUdyb3VwDQpHcm91cD11bW9kSW5jbHVkZUZpbGVzR3JvdXANCg0KW1VucmVhbFRvdXJuYW1lbnQ0MDBSZXF1aXJlbWVudF0NClByb2R1Y3Q9VW5yZWFsVG91cm5hbWVudA0KVmVyc2lvbj00MDANCg0KW1NldHVwR3JvdXBdDQpDb3B5PShTcmM9U3lzdGVtXE1hbmlmZXN0LmluaSxNYXN0ZXI9U3lzdGVtXE1hbmlmZXN0LmluaSxTaXplPTQ3OSxGbGFncz0zKQ0KQ29weT0oU3JjPVN5c3RlbVxNYW5pZmVzdC5pbnQsTWFzdGVyPVN5c3RlbVxNYW5pZmVzdC5pbnQsU2l6ZT00NzgsRmxhZ3M9MykNCg0KW0RlY2FsU3RheUdyb3VwXQ0KRmlsZT0oU3JjPVN5c3RlbVxEZWNhbFN0YXkudSxTaXplPTMyMDQwKQ0KRmlsZT0oU3JjPVN5c3RlbVxEZWNhbFN0YXkuaW50LFNpemU9ODkpDQoNClt1bW9kSW5jbHVkZUZpbGVzR3JvdXBdDQpGaWxlPShTcmM9SGVscFxEZWNhbFN0YXkuaHRtLFNpemU9MjQ5OCkNCg0KW1NldHVwXQ0KTG9jYWxQcm9kdWN0PURlY2FsIFN0YXkNClJlYWRNZT1IZWxwXERlY2FsU3RheS5odG0NClNldHVwV2luZG93VGl0bGU9RGVjYWwgU3RheQ0KQXV0b3BsYXlXaW5kb3dUaXRsZT1EZWNhbCBTdGF5IE9wdGlvbnMNClByb2R1Y3RVUkw9aHR0cDovL3d3 |
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
; As described in: | |
; http://eliotvu.com/page/unreal-package-file-format | |
Enumeration UnrealEngineVersion | |
; U and U2 are also missing (U could be 69 since it's the same engine ?) | |
#UE_UT99 = 69 | |
; UT2003 is missing from the docs :/ | |
#UE_UT_UT2004 = 128 | |
#UE_UT_UT3 = 512 | |
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
OpenConsole() | |
Procedure CRC16CCITT(*mem.Ascii,len) | |
Protected crc.u = $FFFF; | |
While a < len | |
For i = 0 To 7 | |
bit = (*mem\a >> (7-i) & 1) | |
c15 = ((crc >> 15) & 1) | |
crc << 1 | |
If Bool(c15 ! bit) |
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
@echo off | |
if "%1"=="" (echo Error: No arguments passed ! && exit /B) | |
set "var="&for /f "delims=0123456789" %%i in ("%1") do set var=%%i | |
if defined var (echo Error: Non-numeric value passed ! && exit /B) | |
for /l %%x in (1, 1, %1) do cd .. |
NewerOlder