Skip to content

Instantly share code, notes, and snippets.

;macOS-style shortcuts in Windows
;Ref: https://gist.github.com/ascendbruce/677c3169259c975259045f905cd889d6
$!x::Send ^x
$!c::Send ^c
$!v::Send ^v
$!s::Send ^s
$!a::Send ^a
$!z::Send ^z
$!+z::Send ^y
import sqlite3
import sys
from datetime import datetime
import opencc
if len(sys.argv) < 2:
quit("Usage: python3 " + sys.argv[0] + " PATH_TO_anki2_FILE")
else:
ANKI2_PATH = sys.argv[1]
@JackKuo-tw
JackKuo-tw / CMakeLists.txt
Created February 17, 2021 06:56
Add drutil_expand_rep_string to instrace_*.c samples #4138
# **********************************************************
# Copyright (c) 2010-2020 Google, Inc. All rights reserved.
# Copyright (c) 2009-2010 VMware, Inc. All rights reserved.
# **********************************************************
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
from PySide2.QtUiTools import QUiLoader
from PySide2.QtWidgets import QApplication, QLineEdit, QPushButton, QLabel, QTextEdit, QTextBrowser, QMainWindow, QWidget, QGridLayout
from PySide2.QtCore import QFile, QObject, Signal, QThread, Slot, QCoreApplication, Qt
import sys
import ilmsdump
import asyncio
import threading
from datetime import datetime
from qtui import Ui_Dialog
#!/usr/bin/env python3
import random
DOORS = 4
EPOCH = 10000
KEY_POINT_TIME = 2
# ENUM
result = {
@JackKuo-tw
JackKuo-tw / monty_hall.py
Last active November 12, 2020 05:03
General Monty Hall Calculation
#!/usr/bin/env python3
import random
DOORS = 4
EPOCH = 10000
KEY_POINT_TIME = 2
# ENUM
result = {