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
; Win + A to loop among: recording mode, active, and inactive. | |
; recording: write clicks to recording.txt | |
#Requires AutoHotkey v2.0 | |
mode := "inactive" | |
kiss := [ | |
["a", 1732, 494], | |
["s", 1793, 500], | |
["d", 1856, 492], |
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
require "hs.caffeinate" | |
require "hs.hotkey" | |
-- Exchange windows on these 2 out of 3 monitors if they are moved to the other. | |
internal_screen_id = "37D8832A-2D66-02CA-B9F7-8F30A301B230" | |
right_screen_id = "BFF6E135-AF30-4853-A5EF-EE64D279FA06" | |
apps_grouping = { | |
[internal_screen_id] = {right_screen_id, { | |
"飞书" |
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
{ | |
"Death Woods": [ | |
"l4d2_deathwoods01_stranded", | |
"l4d2_deathwoods02_tunnel", | |
"l4d2_deathwoods03_bridge", | |
"l4d2_deathwoods04_power", | |
"l4d2_deathwoods05_airfield" | |
], | |
"Death Row": [ | |
"deathrow01_streets", |
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 argparse | |
def sign_extend(value: int, bits: int) -> int: | |
""" Perform sign extension operation. | |
""" | |
sign_bit = 1 << (bits - 1) | |
mask = sign_bit - 1 | |
return (value & mask) - (value & sign_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
import tensorflow as tf | |
from tensorflow import keras | |
class GradientReversal(keras.layers.Layer): | |
"""Flip the sign of gradient during training. | |
based on https://github.com/michetonu/gradient_reversal_keras_tf | |
ported to tf 2.x | |
""" | |
def __init__(self, λ=1, **kwargs): |
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 | |
REM Automaticaly configure your network so that the VPN (TAP) of your intranet | |
REM provider (employer/campus) won't unintentionally block your access to the | |
REM Internet while working from home. | |
REM Change corresponding names and IP ranges to fit your need. | |
REM Designed for typical home PC behind routers, without PPPoE. | |
REM The code is provided as-is without warranty. | |
powershell -command Start-Process powershell -Verb runAs -ArgumentList ^ |
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
@if (@CodeSection == @Batch) @then | |
@echo off | |
REM run 100% Orange Juice on secondary screen | |
REM pay attention to "*** TODO: ***"s in the script | |
REM Download & install cmdow.exe (https://ritchielawrence.github.io/cmdow) & add to PATH | |
echo Starting Juice from Sbeam... |
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 java.util.Arrays; | |
public class HelloWorld { | |
public static void main(String[] args) { | |
byte abyte = (byte) 3; | |
if (Math.random() < 1) abyte++;// No static opt | |
Object a = abyte; | |
Object b = (Object) (byte) 4; | |
Object c = (Object) 4; |