Skip to content

Instantly share code, notes, and snippets.

@liuran001
liuran001 / config.yaml
Last active April 22, 2025 17:26
mihomo (Clash Meta) 懒人配置
# AFF
# 如果你想支持我,可以通过我的邀请链接购买机场
# 感谢支持
# 1. 倾城极速 邀请码: 0jiB5uAA https://qcjs.ovh
# 2. superbiu 邀请码: fACfjKC8 https://superbiu.com/#/register?code=fACfjKC8
# 一定要填我的邀请码,不填我哭给你看😭
# mihomo (Clash Meta) 懒人配置
# 版本 V1.19-250408
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
@crypt3lx2k
crypt3lx2k / 0-model.py
Last active September 2, 2021 07:59
Training model in tensorflow for tflite with 8-bit integer quantization
#! /usr/bin/env python
import tensorflow as tf
def inference_fn(x, training=False):
net = x
net = tf.layers.flatten(net)
net = tf.layers.dense(net, 512, activation=tf.nn.relu)
net = tf.layers.dropout(net, 0.2, training=training)
@W4ngatang
W4ngatang / download_glue_data.py
Last active April 17, 2025 06:39
Script for downloading data of the GLUE benchmark (gluebenchmark.com)
''' Script for downloading all GLUE data.
Note: for legal reasons, we are unable to host MRPC.
You can either use the version hosted by the SentEval team, which is already tokenized,
or you can download the original data from (https://download.microsoft.com/download/D/4/6/D46FF87A-F6B9-4252-AA8B-3604ED519838/MSRParaphraseCorpus.msi) and extract the data from it manually.
For Windows users, you can run the .msi file. For Mac and Linux users, consider an external library such as 'cabextract' (see below for an example).
You should then rename and place specific files in a folder (see below for an example).
mkdir MRPC
cabextract MSRParaphraseCorpus.msi -d MRPC
@shagunsodhani
shagunsodhani / PPDB.md
Created March 5, 2017 17:27
Summary of "PPDB: The Paraphrase Database" paper

PPDB: The Paraphrase Database

Introduction

  • The paper presents a database of ranked English and Spanish paraphrases derived by:
    • Extracting lexical, phrasal, and syntactic paraphrases from large bilingual parallel corpora.
    • Computing the similarity scores for the pair of paraphrases using Google ngrams and the Annotated Gigaword corpus.
  • Link to the paper

Extracting Paraphrase from Bilingual Text

@subfuzion
subfuzion / mysql-autostart-osx.md
Created March 18, 2014 22:39
mysql auto start on OS X

Install with Homebrew

brew install mysql

Set up launchctl to auto start mysql

$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents

/usr/local/opt/mysql/ is a symlink to /usr/local/Cellar/mysql/x.y.z (e.g., 5.6.16)

@chrisjhoughton
chrisjhoughton / wait-el.js
Last active April 17, 2025 08:14
Wait for an element to exist on the page with jQuery
var waitForEl = function(selector, callback) {
if (jQuery(selector).length) {
callback();
} else {
setTimeout(function() {
waitForEl(selector, callback);
}, 100);
}
};
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 22, 2025 19:18
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@zythum
zythum / gist:2848881
Created June 1, 2012 04:50
google收录的敏感词