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 time | |
from telethon import InteractiveTelegramClient | |
from telethon.tl.types.input_peer_chat import InputPeerChat | |
from telethon.tl.functions.messages.set_typing import SetTypingRequest | |
from telethon.tl.types.send_message_typing_action import SendMessageTypingAction | |
client = InteractiveTelegramClient('session_name','+8613400000000',api_id=123456,api_hash='752f79bb39d8004006f00f761dab7f00') | |
peer = InputPeerChat(14884418) | |
act = SendMessageTypingAction() |
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
#!/usr/bin/env python3 | |
import csv | |
import re | |
import requests | |
import argparse | |
def main(args): | |
with open(args.input, 'r') as in_list, open(args.output, 'w') as out: | |
writer = csv.writer(out) | |
words_lines = [x.strip() for x in in_list.readlines()] |
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
publickey: | |
EB2A38568661887FA180BDDB5CABD5F21C7BFD59C090CB2D245A87AC253062882729293E5506350508E7F9AA3BB77F4333231490F915F6D63C55FE2F08A49B353F444AD3993CACC02DB784ABBB8E42A9B1BBFFFB38BE18D78E87A0E41B9B8F73A928EE0CCEE1F6739884B9777E4FE9E88A1BBE495927AC4A799B3181D6442443 | |
plain: | |
1438871975 EK8NU4 | |
12345678 | |
base64: | |
sXbou35GY7H3aSvoHMAzUida/sHhD57l/KUJT5iOJya2KcuFrizCEudTIaQQU7ITj0DiR3xWcctTW9d/YvL5Dtc8aYXifnxisN5USeZ+DWVl6wKrYXB2uFkMCuY1aXxGPayYQh/2Jpy6gqqmTvvZW3HCG02ZeXwvdz8NW8kI+Zc= | |
base16: | |
de19b3e4315088744395ceb34562be7ada250-946c3451f0-2c793745b584fd942527e4fdadf8c3b9a1d4a569a78749db8036d6c3f209e7e1d8099ff8ba5453789c896286dab2f2ddd715e7298bf3607f01bb5368a12c2e4fbd6339881961f10665f626ac-3e4f4f46af5d7177aea380344c4000a3a61efaa3e217808bd2-1d9bf | |
{"retcode":"20","reason":"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u767b\u5f55\u540d"} |
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
code = '' | |
pos = 0 | |
offset = 10 | |
reg = (n)-> | |
offset + n | |
moveTo = (dest)-> | |
diff = dest-pos |
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
# Automatically change avatar! | |
# This is magical! | |
# Xavier Yao 2014-05-10 Sat | |
# Don't forget to install request (`npm install request') | |
fs = require 'fs' | |
request = require 'request' | |
date = new Date() |
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
/* | |
* Programming implementation of Monty Hall Problem. | |
* By Prof.X (http://weibo.com/xavieryao) | |
*/ | |
//Variants to store experiment time and result. | |
var time = 0.0; | |
var changeAndWin = 0.0; | |
var winWithoutChange = 0.0; |
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
package com.paperairplane.minesweeper.minetest; | |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.Random; | |
/** | |
* | |
* @author Xavier Yao | |
* @see <a href="http://weibo.com/xavieryao">Xavier Yao's Sina Weibo </a> |