Skip to content

Instantly share code, notes, and snippets.

View liuyu81's full-sized avatar

LIU Yu liuyu81

  • China
View GitHub Profile
@ynott
ynott / multipass-on-bridged-network.md
Last active April 14, 2024 17:59
Instructions for running multipass on a bridge network

1. Environmental information

  • OS: Ubuntu 20.04.2 LTS (GNU/Linux 5.8.0-59-generic x86_64)
  • Network: 192.168.xxx.0/24
  • Ubuntu multipass host machine IP: 192.168.xxx.yyy(static IP)
  • NIC: enp2s0(bridge host NIC)
  • Bridge NIC:br0

2. Prerequisites

@rixtox
rixtox / Export Timing Points to OSU.py
Last active October 19, 2019 14:23
Export REAPER Tempo Markers to osu! Timing Points
import sys, os, configparser, codecs, re
sys.argv=["Main"]
import tkinter as tk
from tkinter.filedialog import asksaveasfilename
root = tk.Tk()
root.withdraw()
proj = RPR_EnumProjects(-1, "", 512)[0]
@christianroman
christianroman / test.py
Created May 30, 2013 16:02
Bypass Captcha using 10 lines of code with Python, OpenCV & Tesseract OCR engine
import cv2.cv as cv
import tesseract
gray = cv.LoadImage('captcha.jpeg', cv.CV_LOAD_IMAGE_GRAYSCALE)
cv.Threshold(gray, gray, 231, 255, cv.CV_THRESH_BINARY)
api = tesseract.TessBaseAPI()
api.Init(".","eng",tesseract.OEM_DEFAULT)
api.SetVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz")
api.SetPageSegMode(tesseract.PSM_SINGLE_WORD)
tesseract.SetCvImage(gray,api)
print api.GetUTF8Text()
@liuyu81
liuyu81 / .gitignore
Last active December 14, 2015 05:19
Testbed for the sandbox policy from Richard's CodeRunner (https://github.com/trampgeek/CodeRunner)
*.pyc
*.pyo
__pycache__
distance.py
@zed
zed / .gitignore
Created August 25, 2012 22:42
call Python callback from a non-python thread in a C extension module
/c_extension_module*.so
/build/*
/.do_built*
/log
/all.did
"""
This script writes the VDSO to the file linux-gate.dso.1 .
Use `objdump -d linux-gate.dso.1` to examine it.
You might also want to play around more with the other objdump options and
the readelf tool :)
LICENSE: MIT License ( http://www.opensource.org/licenses/mit-license.php )
"""
from __future__ import with_statement
import os