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
#!/usr/bin/env python3 | |
"""This script patches PixInsight 1.8.9-2 to nop the call to QWidget::raise() | |
in PixInsightWorkspace::OnMainWindowUnblocked(). | |
This works around the very annoying behavior of PixInsight putting itself | |
as top window when it receives focus. This happens often when you have other | |
windows open on top of Pix and you have "focus follows mouse" active in your | |
WM. | |
Tested for me, your mileage may vary. | |
This doesn't circumvent any security from PI. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python3 | |
from sympy import symbols, init_printing, simplify, diff | |
from sympy.utilities.codegen import codegen | |
import numpy as np | |
import re | |
import os | |
import pyopencl as cl | |
# https://docs.sympy.org/latest/tutorials/intro-tutorial/intro.html |
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
#!/usr/bin/env python3 | |
import usb.core | |
import usb.util | |
import usb.control | |
import time | |
cmd_calibrate = [0x03, 0x7e, 0x5a, 0x01, 0x01] | |
#bidirectional | |
cmd_setpos_bi = [0x03, 0x7e, 0x5a, 0x01, 0x3] |
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
#!/usr/bin/env python3 | |
""" | |
Automatically move Sony ARW raw files into directories based on the guessed | |
content (brut/flat/offset/dark/darkflat). | |
Usage: ./sortpics.py *.ARW | |
""" | |
import sys | |
import os |
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
#!/usr/bin/env python3 | |
import sys | |
import os | |
""" | |
Deletes all FIT files from a Siril sequence file (.seq) | |
""" | |
def parse_seq(seq): |
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
#!/usr/bin/env python3 | |
import random | |
change_strategy, stay_strategy = 0, 0 | |
for i in range(1000): | |
v = [True, False, False] | |
random.shuffle(v) | |
print("Solution:", v) | |
firstchoice = random.choice([0, 1, 2]) |
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
void compute_session_keys(uint8_t encryptkey[AES128_KEY_LEN], | |
uint8_t master_key[AES128_KEY_LEN], | |
uint8_t encryption_salt[8]){ | |
uint8_t long_encryptkey[SHA256_DIGEST_LEN]; | |
HMAC_SHA256_CTX ctx; | |
HMAC_SHA256_Init(&ctx, master_key, sizeof(master_key)); | |
HMAC_SHA256_Update(&ctx,encryption_salt, 8); | |
HMAC_SHA256_Update(&ctx, "encryption", 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
#!/usr/bin/env python | |
# This script will let you play constructor without the CD | |
# in the drive. My retrogaming laptop has no CD drive. | |
f = open("GAME.EXE").read() | |
patches = [ | |
(272174,"\x74","\xeb"), | |
(642050,"\x83\x3d\x88\x3b\x04\x00\x00","\x90\x90\x90\x90\x90\x90\x90"), | |
(750753,"\x75","\xeb"), | |
(750850,"\xfa\xff\xff\xff","\x00\x00\x00\x00"), | |
(750887,"\x74","\xeb"), |
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
#!/usr/bin/env python3 | |
import struct | |
from libctf import * | |
port=1337 | |
atoi_got = 0x603110 | |
#ubuntu 14.04 |
NewerOlder