Skip to content

Instantly share code, notes, and snippets.

View Dobby233Liu's full-sized avatar

Liu Wenyuan Dobby233Liu

View GitHub Profile
@xjohjrdy
xjohjrdy / xiaoxiao_tts.py
Last active April 24, 2024 09:27
返回的音频没有文件头,所以我随便加的一个文件头,但显示的音频时长有问题。如果播放器不能正常播放,可以使用Chrome播放。
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from ws4py.client.threadedclient import WebSocketClient
import binascii
class WSClient(WebSocketClient):
def __init__(self, url, text, filename):
# I am ashamed for writing this.
import inspect;
class Cin:
""" time to whip out some python magic """
def __rshift__(self, other):
# I don't want to require that "other" is declared global.
cin = input();
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@fischerbach
fischerbach / README.md
Created January 31, 2020 06:57 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
import java.util.*;
public class Main {
static long[] memo = new long[91];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print(fibo(sc.nextInt()));
}
static long fibo(int n){
if (n<=1) return n;
@abc1763613206
abc1763613206 / bvtest.py
Last active February 23, 2024 22:18
BVID Validate
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',
@FlyTechVideos
FlyTechVideos / server.py
Last active January 3, 2024 14:02
Simple web server which logs accesses and data [https://www.youtube.com/watch?v=TB3OEG0bKwc]
#!/usr/bin/env python3
from flask import Flask, request, send_from_directory
from datetime import datetime
from user_agents import parse
app = Flask(__name__)
def censor_ip(ip):
@sindresorhus
sindresorhus / esm-package.md
Last active May 23, 2024 02:45
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@mvaisakh
mvaisakh / Bringup.md
Last active May 4, 2024 15:08
An Android Device Tree Bringup Guide

A small Device Tree Bringup Guide

Introduction

So, you guys might be wondering, how do these "Developers" get your favourite Custom roms, such as LineageOS, Paranoid Android etc., to their own devices. Well I'm here to Guide you on how to do it, specifically on how to bringup or make your own device tree from scratch or adapting.

Gist of this Guide: This is for people with genuine interest in Android OS porting/development. After going through this guide, you should be able to do a total device tree bringup on your own.

Prerequisite: Certain requirements are to be met before you start with this amazing journey.

@windwakr
windwakr / gm4dec.py
Last active July 24, 2023 12:57
Game Maker 4.1/4.2/4.3 decompiler
#Game Maker 4.X decompiler
#for python 2.7 :^)
#Only tested on ~20 files
#
#As far as I can tell, there are no tools out there that actually support GM4(even if they claim to).
#Unlike later versions, image data is stored unencrypted. So we need to partially parse the GMD.
import struct
import io
import os
import sys