Discover gists
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
# A basic script for uninstalling app packages in Windows 10/11, including those pre-installed with Windows | |
# | |
# Note: If you get an error about the script not being allowed to run, the below command will change the execution polciy temporarily for one session only: | |
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process | |
# | |
# To execute the script, open a Powershell window to the directory with the script and run the following command using your scripts file name (and don't forget the .\ ) | |
# .\WhateverScriptName.ps1 | |
# ------------------------------------------------------------------------------------------- | |
# Script by ThioJoe - https://github.com/ThioJoe | |
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
// ==UserScript== | |
// @name 哔站直播全裸2233娘 | |
// @description 哔站直播间的2233娘挂件替换为全裸版本 | |
// @description:zh-TW 嗶站直播間的2233娘掛件替換為全裸版本 | |
// @namespace https://github.com/journey-ad | |
// @author journey-ad | |
// @include *://live.bilibili.com/* | |
// @require https://cdn.jsdelivr.net/jquery/1.12.4/jquery.min.js |
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
`--> TORCH_LOGS="output_code" python optim_repro.py | |
[WARNING]:Profiler function <class 'torch.autograd.profiler.record_function'> will be ignored | |
[DEBUG]:Output code: | |
# AOT ID: ['0_inference'] | |
from ctypes import c_void_p, c_long | |
import torch | |
import math | |
import random | |
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
------------------------------------------------------------------ | |
// Version 3 | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
var elements = document.querySelectorAll( 'a[data-recaptcha-action=follow]:not([style*="display: none"]):not([style*="display: none"])' ); | |
async function follow(){ | |
for(const el of elements){ | |
await sleep(2000); | |
el.click(); |
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/sh | |
exec tail -n +3 $0 | |
menuentry "INIT_TUNE Demos" { | |
echo "Close Encounters/5 Tone" | |
play 480 900 2 1000 2 800 2 400 2 600 3 | |
echo "Fur Elise (note long)" | |
play 480 420 1 400 1 420 1 400 1 420 1 315 1 370 1 335 1 282 3 180 1 215 1 282 1 315 3 213 1 262 1 315 1 335 3 213 1 420 1 400 1 420 1 400 1 420 1 315 1 370 1 335 1 282 3 180 1 215 1 282 1 315 3 213 1 330 1 315 1 282 3 | |
echo "Berlioz's extract from Sabbath Night of Symphonie Fantastique" | |
play 312 262 3 247 3 262 3 220 3 247 3 196 3 220 3 220 3 262 3 262 3 294 3 262 3 247 3 220 3 196 3 247 3 262 3 247 5 220 1 220 5 | |
echo "Oldskool Batman tune" |
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
"""Module for handling authentication, interactions with Firebase and JWT cookies. | |
This solution is refactored from the ‘streamlit_authenticator’ package . It leverages JSON | |
Web Token (JWT) cookies to maintain the user’s login state across browser sessions. For the | |
backend, It uses Google’s Firebase Admin Python SDK. This solution ensures that the content | |
of the page and user settings panel are only displayed if the user is authenticated. Similarly, | |
the login page can only be accessed if the user is not authenticated. Upon registration, the | |
user is sent a verification link to their e-mail address. | |
Important - to make this app run, put the following variables in your secrets.toml file: | |
COOKIE_KEY - a random string key for your passwordless reauthentication |
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
"""Module for handling authentication, interactions with Firebase and JWT cookies. | |
This solution is refactored from the ‘streamlit_authenticator’ package . It leverages JSON | |
Web Token (JWT) cookies to maintain the user’s login state across browser sessions. For the | |
backend, It uses Google’s Firebase Admin Python SDK. This solution ensures that the content | |
of the page and user settings panel are only displayed if the user is authenticated. Similarly, | |
the login page can only be accessed if the user is not authenticated. Upon registration, the | |
user is sent a verification link to their e-mail address. | |
Important - to make this app run, put the following variables in your secrets.toml file: | |
COOKIE_KEY - a random string key for your passwordless reauthentication |
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
#include<Stdio.h> | |
int main() | |
{ | |
int C, D, T; | |
printf("Enter the value of C: "); | |
scanf("%d", &C); | |
printf("Enter the value of D: "); | |
scanf("%d", &D); |
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
; ---------------------------------------------------------------------------------------------------------------------- | |
; Name ..........: TrayIcon library | |
; Description ...: Provide some useful functions to deal with Tray icons. | |
; AHK Version ...: AHK_L 1.1.13.01 x32/64 Unicode | |
; Original Author: Sean (http://goo.gl/dh0xIX) (http://www.autohotkey.com/forum/viewtopic.php?t=17314) | |
; Update Author .: Cyruz (http://ciroprincipe.info) (http://ahkscript.org/boards/viewtopic.php?f=6&t=1229) | |
; Mod Author ....: Fanatic Guru | |
; License .......: WTFPL - http://www.wtfpl.net/txt/copying/ | |
; Version Date...: 2014 - 01 - 16 | |
; Note ..........: Many people have updated Sean's original work including me but Cyruz's version seemed the most straight |
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
/** | |
* Converts an ArrayBuffer to a String. | |
* | |
* @param buffer - Buffer to convert. | |
* @returns String. | |
*/ | |
export default function arrayBufferToString(buffer: ArrayBuffer): string { | |
return String.fromCharCode.apply(null, Array.from(new Uint16Array(buffer))); | |
} |
NewerOlder