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
/* | |
SQL to batch delete specific rows wrapped wrapped in transaction. | |
*/ | |
DECLARE @BatchSize INT = 1000; | |
DECLARE @RowsAffected INT = 1; | |
DECLARE @Batches INT = 10; | |
DECLARE @BatchCount INT = 0; | |
WHILE @RowsAffected > 0 AND @BatchCount < @Batches |
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
CREATE OR ALTER PROCEDURE sp_GenerateDateRangeSelectQuery | |
@TimeInterval NVARCHAR(10), -- 'HOUR', 'DAY', 'WEEK', 'MONTH' | |
@StartDate DATETIME, | |
@EndDate DATETIME, | |
@SchemaName NVARCHAR(128), | |
@TableName NVARCHAR(128), | |
@DateColumnName NVARCHAR(128) | |
AS | |
BEGIN | |
DECLARE @SQL NVARCHAR(MAX) |
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 datetime import datetime | |
from typing import Any, List, Tuple | |
from pyspark.sql import DataFrame, SparkSession | |
from jdbc_configuration import JdbcConfiguration | |
# https://www.youtube.com/watch?v=_p73PZIDQuA | |
NOT_PREPARED: str = "The prepared_statement param is None!" | |
SQL_FORMAT: str = '%Y-%m-%d %H:%M:%S' |
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
#!/bin/bash | |
set -e | |
# Endpoint URL | |
#endpoint="" | |
final_expected_response='{"profile":{"error":"invalid user id"}}' | |
# Default values | |
ids_to_enumerate=1 |
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
. . | |
++xx++;++++xxxxx+x+++;+++++++;++++++;++++;;;;;x+++++++x+++++++++++++++++x++xxxxXxxxxXXx+xxxxxxxxxxxx+xxxxxx++x+xXXXXXXxxXXxxXXxx+x++xxXxXXXXXXxxxxxXXXXXXXXxxxXXXXXXx+$X+XXXXXX$XXXXXXXxXXXxxX$xxX$$$$ | |
++++++;:;+++++xx++++;+++++++++++++++++;;+++;+++;+++++++x+++xxxx+xx++xxxx+++xXxxXxXXXx+++++xxxxxxxx+xxxxxxXxxXxxXXxxxxxxXXxXXxxXXXXXXxxxxXXXXXxxxXXXXXXXx+xxXXXXXXXXxXXxxXXX$$$XXXXXXXX$$$XxXXXX&$$$XX$ | |
xx;:::;;+++;++;+++++xx+x+++++++++++;;;+x++xxxxxx+++xx+xxxx++++;+x+++++++xxxXXXxxx+++++xxxXXxxXXx++xXxXXXXXxxx++xxXXxxxx+xXxXXXxXxxxxXXxxxXxxxxXXXxxXxxX$XxxXXXXXXxxXxxXXXXXXXXXxxXXXXXX+xXXXX$$$XxXXXX | |
;:;;;++++++++xx+xxxxx;;;;;++x+++++;;++++;+++;;;+++++++x++++++++++++++++++++++x++++xxxXXXxxx++xxXXXXXxxx++x+xX$$XX+xxxXXXXXXXXXx+xxXXxxX$xXXxxxXXXXXXXXxxXXXxxXXXXxxxxXXXXXxxXx+$XXXXXXxXXxX$$XXXXXXXXx | |
++++;;;+++;;+++++; |
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 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
#!/bin/bash | |
# Work in progerss. Currently the diff is not accurate. | |
# TODO: Take in setup.py and requirements_*.txt. | |
# Exit immediately if a command exits with a non-zero status | |
set -e | |
# Uncomment for debugging | |
#set -x |
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
#!/bin/bash | |
# Work in Progress | |
# The pip freeze will bring in a lot more packages explicitly than expected. | |
# Still need to populate/paste into setup.py correctly. | |
SETUP_PY_PATH="./setup.py" | |
# Extract install_requires values without versioning | |
INSTALL_REQUIRES=$(grep -oP '"[^"]+"' $SETUP_PY_PATH \ | |
| grep -oP '"[^"]+"' \ |
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
#!/bin/bash | |
# Requires existing template setup.py | |
SETUP_PY_PATH="./setup.py" | |
# Requires pipdeptree | |
pip install pipdeptree | |
# Generate a dependency tree for your project | |
pipdeptree --warn silence --warn silence -r --warn silence --warn silence --warn silence > dependencies.txt |
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
hashcat --benchmark | |
hashcat (v6.2.6) starting in benchmark mode | |
Benchmarking uses hand-optimized kernel code by default. | |
You can use it in your cracking session by setting the -O option. | |
Note: Using optimized kernel code limits the maximum supported password length. | |
To disable the optimized kernel code in benchmark mode, use the -w option. | |
* Device #2: Apple's OpenCL drivers (GPU) are known to be unreliable. | |
You have been warned. |
NewerOlder