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
| return function(page, offset, screen_width, screen_height) | |
| local percent = math.abs(offset/page.width) | |
| local centerX = page.width/2 | |
| local centerY = page.height/2 | |
| local formationProgress = math.min(percent * 4, 1) | |
| local easeFormation = formationProgress * formationProgress * (3 - 2 * formationProgress) | |
| local fadeStart = 0.7 | |
| local pageFade = 1.0 | |
| if percent > fadeStart then | |
| local fadeProgress = (percent - fadeStart) / (1 - fadeStart) |
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
| import json | |
| import time | |
| import requests | |
| from tqdm import tqdm | |
| import concurrent.futures | |
| USE_WHILE_LOOP = True | |
| LOOP_TIME = 2 | |
| SLEEP_TIME = 0.5 | |
| SUCCESS_STATUS_CODE = 204 |
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
| #!/usr/bin/env python3 | |
| # | |
| # generate reverse powershell cmdline with base64 encoded args | |
| # | |
| import sys | |
| import base64 | |
| def help(): | |
| print("USAGE: %s IP PORT" % sys.argv[0]) |
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
| // https://stackoverflow.com/questions/45445699/most-efficient-way-to-find-all-the-factors-of-a-number | |
| func factors(of n: Int) -> [Int] { | |
| precondition(n > 0, "n must be positive") | |
| let sqrtn = Int(Double(n).squareRoot()) | |
| var factors: [Int] = [] | |
| factors.reserveCapacity(2 * sqrtn) | |
| for i in 1...sqrtn { | |
| if n % i == 0 { | |
| factors.append(i) | |
| } |
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
| """ | |
| Get iOS device name and its UDID then showing with PyQT5 message box | |
| supports multi devices connected | |
| """ | |
| import subprocess | |
| import sys | |
| from PyQt5.QtGui import * | |
| from PyQt5.QtWidgets import * | |
| IDEVICE_ID_EXEC = "idevice_id" |