Skip to content

Instantly share code, notes, and snippets.

View RitterHou's full-sized avatar

Derobukal RitterHou

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

步骤

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
#!/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 July 2, 2020 07:23 — forked from lilydjwg/colors.py
colors.py: show all kinds of terminal colors at a glance
#!/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()
➜ ab ./test.sh
2020-05-16 13:52:52
Query DSL: {
"query": {
"term": {
"acctId": "A00000000000"
}
},
"size": 0
}
#!/usr/bin/env bash
date '+%Y-%m-%d %H:%M:%S'
# 打印查询DSL
echo -n 'Query DSL: '
cat query.json
echo ''
# 默认并发数
cocurrency=60
{
"acct-trades-bills": {
"mappings": {
"dynamic_templates": [
{
"long_fields": {
"match": "*",
"match_mapping_type": "long",
"mapping": {
"fields": {
{
"acct-trades-bills": {
"mappings": {
"_default_": {
"dynamic_templates": [
{
"string_fields": {
"mapping": {
"index": "not_analyzed",
"type": "string",
*://*.voidcc.com/*
*://*.codeday.me/*
*://*.voidcn.com/*
*://*.codenong.com/*
*://*.helplib.com/*
*://*.jishuwen.com/*
*://*.csdn.net/*
*://stackoverrun.com/*
*://*.itranslater.com/*
*://365airsoft.com/*
#!/usr/bin/env python
import datetime
import time
import urllib
import json
import urllib2
import os
import sys
# ElasticSearch Cluster to Monitor