Skip to content

Instantly share code, notes, and snippets.

Avatar

Derobukal RitterHou

View GitHub Profile
@RitterHou
RitterHou / Submit-PR.md
Created Jul 14, 2022 — forked from YimianDai/Submit-PR.md
向开源项目提交 Pull Request
View Submit-PR.md

步骤

Part 1 - Local Repo Config

  1. 先 Fork 感兴趣项目,即 dmlc/gluon-cv
  2. Clone 到本地,git clone git@github.com:YimianDai/gluon-cv.git
  3. 添加源项目 dmlc/gluon-cv 作为 upstream 源,git remote add upstream https://github.com/dmlc/gluon-cv.git
  4. 禁止直接向 upstream 源 push,因为我们不是 dmlc 的人,没有 push 的权限,要提交代码必须通过 Pull Request,git remote set-url --push upstream no_push
  5. 创建并切换到本地的新分支 fixMixSoftmaxCrossEntropyLossgit checkout -b fixMixSoftmaxCrossEntropyLoss
View sync.sh
#!/usr/bin/env bash
flag="to"
while getopts ":l:r:u:h:f:" opt; do
case $opt in
l) local="$OPTARG"
;;
r) remote="$OPTARG"
;;
@RitterHou
RitterHou / colors.py
Created Jul 2, 2020 — forked from lilydjwg/colors.py
colors.py: show all kinds of terminal colors at a glance
View colors.py
#!/usr/bin/python3
from functools import partial
def colors16():
for bold in [0, 1]:
for i in range(30, 38):
for j in range(40, 48):
print(f'\x1b[{bold};{i};{j}m {bold};{i};{j} |\x1b[0m', end='')
print()
View es-term-test.txt
➜ ab ./test.sh
2020-05-16 13:52:52
Query DSL: {
"query": {
"term": {
"acctId": "A00000000000"
}
},
"size": 0
}
View es-test.sh
#!/usr/bin/env bash
date '+%Y-%m-%d %H:%M:%S'
# 打印查询DSL
echo -n 'Query DSL: '
cat query.json
echo ''
# 默认并发数
cocurrency=60
View ES-7.5.2-mapping.json
{
"acct-trades-bills": {
"mappings": {
"dynamic_templates": [
{
"long_fields": {
"match": "*",
"match_mapping_type": "long",
"mapping": {
"fields": {
View ES-1.5.2-mapping.json
{
"acct-trades-bills": {
"mappings": {
"_default_": {
"dynamic_templates": [
{
"string_fields": {
"mapping": {
"index": "not_analyzed",
"type": "string",
View uBlacklist.txt
*://*.voidcc.com/*
*://*.codeday.me/*
*://*.voidcn.com/*
*://*.codenong.com/*
*://*.helplib.com/*
*://*.jishuwen.com/*
*://*.csdn.net/*
*://stackoverrun.com/*
*://*.itranslater.com/*
*://365airsoft.com/*
View elasticsearch2elastic.py
#!/usr/bin/env python
import datetime
import time
import urllib
import json
import urllib2
import os
import sys
# ElasticSearch Cluster to Monitor
View 动态规划.md