This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --since ==2020–05-02 --until=2018-06-11 --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Implementation of ESIM(Enhanced LSTM for Natural Language Inference) | |
https://arxiv.org/abs/1609.06038 | |
""" | |
import numpy as np | |
from keras.layers import * | |
from keras.activations import softmax | |
from keras.models import Model | |
def StaticEmbedding(embedding_matrix): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: FILE_BYTES_REQUEST | |
for (int initial_position = 0; initial_position < qq.fileDescriptor.fileSize; ) { | |
long offset = 0; | |
long remained = qq.fileDescriptor.fileSize - initial_position; | |
if (remained > blockSize) { | |
offset = blockSize; | |
} else { | |
offset = remained; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(_,_,_) -> (0,_,_) = remove all three pitchs | |
(_,_,_) -> (a,b,c) = a + b == 3 or a + c == 3 retrive all three notes or octaves | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import re | |
import jieba | |
ROOT_PATH = "/Users/elfsong/PycharmProjects/BERT_demo" | |
RESOURCE_PATH = os.path.join(ROOT_PATH, "Test text") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def vbyte_encode(num): | |
# out_bytes stores a list of output bytes encoding the number | |
out_bytes = [] | |
### | |
# Your answer BEGINS HERE | |
### | |
while num >= 128: | |
out_bytes = [num % 128] + out_bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def avsplit1(s, n): | |
fn = len(s)//n | |
rn = len(s)%n | |
ar = [fn+1]*rn+ [fn]*(n-rn) | |
si = [i*(fn+1) if i<rn else (rn*(fn+1)+(i-rn)*fn) for i in range(n)] | |
sr = [s[si[i]:si[i]+ar[i]] for i in range(n)] | |
return sr | |
def avsplit2(s, n): | |
fn = len(s)//n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import ast | |
import clr | |
import json | |
import os | |
import re | |
from StoryTelling.tts import append_pronunciation | |
from StoryTelling.tts.tools import OnlineTts | |
from Speech.Cognitive.Services import TimeLine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
from multiprocessing import Process | |
import cocos | |
import cv2 | |
import numpy as np | |
import pyglet | |
from PIL import ImageGrab | |
from cocos.actions import CallFunc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import xlrd | |
ROOT_PATH = r"C:\Users\t-midu\PycharmProjects\Scenario" | |
RESOURCE_PATH = os.path.join(ROOT_PATH, "resource") | |
file_path = os.path.join(RESOURCE_PATH, "sentence_class.xls") | |
data = xlrd.open_workbook(file_path) |
NewerOlder