from unittest import TestCase
from unittest.mock import patch, Mock
from foo import FooModule
class DemoTest(TestCase):
@classmethod
def setUpClass(cls):
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
| { | |
| "title": "Eana's POK3R Mods", | |
| "rules": [ | |
| { | |
| "description": "[POK3R] Cmd+ESC to Cmd+`", | |
| "manipulators": [ | |
| { | |
| "conditions": [{ | |
| "type": "device_if", | |
| "identifiers": [{"vendor_id": 1241, "product_id": 321}] |
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 telegram | |
| import telegram.ext | |
| import re | |
| # Utsushidasu Kagami Bot v3 | |
| # With sticker removal and off-topic transfer. | |
| # License: MIT | |
| """ | |
| Copyright 2017 Eana Hufwe |
This script generates random commands based on the method provided by cmdgen.c,
feeds it to the program and verify automatically.
All table prints for stage 1, 2, 3 should follow the format provided in the template.
For stage 4, the template should follow the merged format of previous stages.
This script tests:
- Result of insertion
- Result of query
- Availablity, preciseness, uniqueness of keys in the printed table
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
| modprobe sch_netem | |
| tc qdisc del dev eth0 root | |
| tc qdisc add dev eth0 root handle 1: prio priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | |
| tc qdisc add dev eth0 parent 1:2 handle 20: netem loss 80% 20% | |
| # tc filter add dev eth0 parent 1:0 protocol ip u32 match ip protocol 17 0xff match ip sport 32768 0xe000 flowid 1:2 | |
| tc filter add dev eth0 parent 1:0 protocol ip prio 1 basic match "cmp(u16 at 0 layer transport gt 31999) and cmp(u16 at 0 layer transport lt 60001) and u32(u8 0x11 0xff at 0x9)" flowid 1:2 | |
| tc qdisc ls | |
| tc -s qdisc show dev eth0 |
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
| -- Telegram Native Swift 汉化脚本 | |
| -- 制作:Eana Hufwe | |
| set zh_cn to "简体中文语言文件,来自 @zh_CN 的 GitHub Repo" | |
| set zh_tw to "正體中文化文件(台灣),尚未收录" | |
| set zh_hk to "繁體中文化文件(香港),尚未收录" | |
| set tlocal to "本地语言文件" | |
| set iinput to (choose file with prompt "选择您的 Telegram Native Swift 程序。" of type {"app"} default location "Applications") as string | |
| set tgpath to POSIX path of iinput |
Demo: https://t.me/big_text_bot
Dependencies:
python-telegram-botPIL
Font file:
font.otf
- Clone https://github.com/vysheng/tg/, and install all necessary dependencies
- Apply
documents.patch, then./configure && make pip3 install pytg- Modify
main.pyand changetgdirto the correct path. - Log in your tg-cli
nohup ./bin/telegram-cli --json -R -W -P 4458 --permanent-peer-ids --permanent-peer-ids > /dev/null &nohup python3 kagami.py > /dev/null &
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 re | |
| from terminaltables import SingleTable | |
| from collections import Counter | |
| f = open("GY_posts.json").read() | |
| data = json.loads(f) | |
| def lang(s): | |
| if re.match(r".*[ぁ-ヿ].*", s): |