Skip to content

Instantly share code, notes, and snippets.

Avatar

Zhou Hao upbit

View GitHub Profile
@ZipFile
ZipFile / README.md
Last active Sep 20, 2021
Pixiv OAuth Flow
View README.md

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

@sajithneyo
sajithneyo / bracket-pair-colorizer-2-settings
Created Jun 25, 2019
Settings you need for bracket pair colorizer 2
View bracket-pair-colorizer-2-settings
{
"bracket-pair-colorizer-2.colors": [
"Gold",
"Orchid",
"LightSkyBlue",
"Salmon",
"LawnGreen",
"DarkOrange",
"Cornsilk"
],
@goraj
goraj / incremental_lightgbm.py
Last active Sep 17, 2021
incremental learning lightgbm
View incremental_lightgbm.py
# -*- coding: utf-8 -*-
"""
@author: goraj
"""
import lightgbm as lgbm
from sklearn.datasets import load_digits
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.metrics import roc_auc_score
@W4ngatang
W4ngatang / download_glue_data.py
Last active Sep 14, 2021
Script for downloading data of the GLUE benchmark (gluebenchmark.com)
View download_glue_data.py
''' 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
View homebridge
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
@ololobus
ololobus / Spark+ipython_on_MacOS.md
Last active Aug 22, 2021
Apache Spark installation + ipython/jupyter notebook integration guide for macOS
View Spark+ipython_on_MacOS.md

Apache Spark installation + ipython/jupyter notebook integration guide for macOS

Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112

For older versions of Spark and ipython, please, see also previous version of text.

Install Java Development Kit

@adamveld12
adamveld12 / comments.md
Last active Aug 25, 2021
Go Code Review Comments
View comments.md

Go Code Review Comments

This page collects common comments made during reviews of Go code, so that a single detailed explanation can be referred to by shorthands. This is a laundry list of common mistakes, not a style guide.

You can view this as a supplement to http://golang.org/doc/effective_go.html.

Please discuss changes before editing this page, even minor ones. Many people have opinions and this is not the place for edit wars.

@patrickhammond
patrickhammond / android_instructions.md
Last active Sep 4, 2021
Easily setup an Android development environment on a Mac
View android_instructions.md

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@thynson
thynson / k_from_n.js
Last active Aug 29, 2015
Get random k numbers from an iterator of arbitrary N length array where N is unknown. (pseudo code)
View k_from_n.js
function(iter, k) {
var array = [];
var count = 0;
for (var val = iter(); val !== undefined; val = iter()) {
count ++;
if (array.length < k)
array.push_back(val);
else {
var luck = rand() % count;
if (luck < k) {
@luw2007
luw2007 / 词性标记.md
Last active Sep 12, 2021
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性
View 词性标记.md

词的分类

  • 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
  • 虚词:副词、介词、连词、助词、拟声词、叹词。

ICTPOS3.0词性标记集

n 名词
	nr 人名