Skip to content

Instantly share code, notes, and snippets.

[Script Info]
Title: How AI Could Empower Any Business | Andrew Ng | TED
ScriptType: v4.00+
WrapStyle: 0
Collisions: Reverse
PlayResX: 384
PlayResY: 288
Timer: 100.0000
ScaledBorderAndShadow: no
@c93614
c93614 / chatpdf-zh.ipynb
Created March 25, 2023 10:06 — forked from ninehills/chatpdf-zh.ipynb
ChatPDF-zh.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@c93614
c93614 / remove-pdf-watermark.sh
Created November 11, 2022 07:25 — forked from convexset/remove-pdf-watermark.sh
Remove multiple text watermarks from a PDF file. Requires xxd and qpdf to work correctly.
#!/bin/bash
# Remove multiple text watermarks from a PDF file. Requires xxd and qpdf to work correctly.
#
# Usage:
#
# remove-pdf-watermark.sh "Your Input File.pdf" "Your Output File.pdf" [WATERMARK1] [WATERMARK2] [WATERMARK3] [...]
#
# For Example:
#
@c93614
c93614 / xiaoxiao_tts.py
Created December 12, 2021 09:23 — forked from xjohjrdy/xiaoxiao_tts.py
返回的音频没有文件头,所以我随便加的一个文件头,但显示的音频时长有问题。如果播放器不能正常播放,可以使用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):
@c93614
c93614 / xiaoxiao_tts.py
Created December 12, 2021 09:21 — forked from Dobby233Liu/xiaoxiao_tts.py
superb edit of an old parameterless script
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""Edge Microsoft TTS for Python."""
import sys
from ws4py.client.threadedclient import WebSocketClient
import binascii
import argparse
import json
import requests
import re
@c93614
c93614 / CausalImpact.ipynb
Created May 20, 2020 02:26 — forked from pshapiro/CausalImpact.ipynb
CausalImpact implementation in Python to demonstrate SEO A/B Testing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@c93614
c93614 / search-google.go
Created September 17, 2019 01:05 — forked from quux00/search-google.go
Fake google search example in Go using concurrent Go routines pushing to a common Go channel. From Rob Pike's Google IO 2012 presentation: http://www.youtube.com/watch?v=f6kdp27TYZs&feature=youtu.be and adapted from Alexey Kachayev's transcription of Pike's slides: https://gist.github.com/3124594#file-go-channels-7-search-go
package main;
import (
"fmt"
"math/rand"
"time"
)
var (
Web1 = fakeSearch("web1")
@c93614
c93614 / balance.go
Created September 4, 2019 03:19 — forked from darkhelmet/balance.go
Simple TCP load balancer in Go.
package main
import (
"flag"
"io"
"log"
"net"
"strings"
)
@c93614
c93614 / supervisord
Created June 8, 2019 11:16 — forked from saitodev/supervisord
supervisord init script for CentOS
#!/bin/sh
#
# Startup script for the Supervisor server
#
# chkconfig: - 90 10
# description: Supervisor is a client/server system that allows its users to \
# monitor and control a number of processes on UNIX-like \
# operating systems.
#
# processname: supervisord
@c93614
c93614 / async.js
Created June 8, 2018 12:38 — forked from bschwartz757/async.js
Async/await function to fetch data from multiple URLs in parallel
/* Client side, works in Chrome 55 and Firefox 52 without transpilation */
//https://blogs.msdn.microsoft.com/typescript/2016/11/08/typescript-2-1-rc-better-inference-async-functions-and-more/
async function fetchURLs() {
try {
// Promise.all() lets us coalesce multiple promises into a single super-promise
var data = await Promise.all([
/* Alternatively store each in an array */
// var [x, y, z] = await Promise.all([
// parse results as json; fetch data response has several reader methods available:
//.arrayBuffer()