\usepackage{tkz-euclide} % checked for version 3.02c
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
""" | |
This is a demo script to debug prompts | |
Example | |
艾达:你好,我是艾达,竭诚为您服务?有什么可以帮到你的吗? | |
麦克:我们可以一起玩个游戏吗? | |
艾达:当然可以!你有什么喜欢的游戏? | |
麦克:猜谜语? | |
艾达:好的,那我们就开始吧!第一个谜语是:“我有四个脚,但不能走路,我会在水里游来游去,你知道我是什么吗?” |
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 cv2 | |
import numpy as np | |
# constructing an image with a frame in the center | |
img = np.zeros([255, 255], dtype=np.int) | |
img[64:192, 64] = np.ones([128], dtype=np.int) * 255 | |
img[64:192, 192] = np.ones([128], dtype=np.int) * 255 | |
img[64, 64:192] = np.ones([128], dtype=np.int) * 255 | |
img[192, 64:192] = np.ones([128], dtype=np.int) * 255 |
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
DIRECTION=$1 | |
SOURCE=$2 | |
if test -f $HOME/.xiaoyi ; then | |
. $HOME/.xiaoyi | |
else | |
echo "Please input ip of your node: " | |
read NODEIP | |
echo "NODEIP=$NODEIP" > $HOME/.xiaoyi | |
fi |
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 -*- | |
''' | |
This simple program is used to search for crossword sentences in selected Chinese poetries | |
The selected Chinese poetries here is stored in a text file - tang_poetry_5char.txt. | |
You can change to your version of candidates | |
You should install networkx by pip |
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 numpy as np | |
import sys | |
import keras | |
from keras.layers import Input, Dense | |
from keras.models import Model | |
I hereby claim:
- I am mountain on github.
- I am mingliyuan (https://keybase.io/mingliyuan) on keybase.
- I have a public key whose fingerprint is ED86 CD82 A682 45D7 5CC5 2C3E 6EFF 88CB 304F 50A2
To claim this, I am signing this object:
I hereby claim:
- I am mountain on github.
- I am mingliyuan (https://keybase.io/mingliyuan) on keybase.
- I have a public key whose fingerprint is ED86 CD82 A682 45D7 5CC5 2C3E 6EFF 88CB 304F 50A2
To claim this, I am signing this object:
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
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
package ngram; | |
import java.util.Iterator; | |
public class NGramIterator implements Iterator<StringBuilder> { | |
private char[] ring; | |
private int n; | |
private int cur; |
NewerOlder