Skip to content

Instantly share code, notes, and snippets.

View soolaugust's full-sized avatar
🐌
Focus

soolaugust soolaugust

🐌
Focus
View GitHub Profile
<a class="question_link" target="_blank" href="/question/30746665/answer/49332475">会写 Parser、Tokenizer 是什么水平?</a><br/><br/>大多数编译原理书前100页的内容,说明大学听了一半左右的编译原理课,通俗地说,写了这个只能证明你不是个棒槌。<br><br><br>所以其实你更应该关心不会tokenizer和parser是什么水平。
<span class="answer-date-link-wrap">
<a class="answer-date-link last_updated meta-item" data-tip="s$t$发布于 2015-05-29" target="_blank" href="/question/30746665/answer/49332475">编辑于 2015-05-29</a>
</span>
<hr/><a class="question_link" target="_blank" href="/question/30703519/answer/49150834">王垠到底对 winter 做了什么?</a><br/><br/>你可以理解为是路边看到一坨**,忍不住想去一脚踩爆它的心态。(虽然我知道这么做无聊而且会沾一脚)<br><br>想了想,可能还有一点觉得他的粉丝很可怜的,想让他们停止吃**的心态吧,虽然我知道"然而没卵用"。<br><br>回到题主的问题,要问做了什么,那就是“他是**,还碰巧被我看到了”,这样的事情,简直无法被饶恕。
@soolaugust
soolaugust / tensorflow_note.md
Last active December 3, 2017 11:20
take notes for studying tensorflow

Recommand: Cuda 8.0, cudnn 6.0

1. why cannot I use tensorboard?

  • before start tensorboard, make sure add following codes:

file_writer = tf.summary.FileWriter('log_path', sess.graph)

  • then start tensorboadrd:

tensorboard --logdir log_path

  • when you see a promote site, copy it and open in browser.
@soolaugust
soolaugust / proxy-with-k8s.md
Created January 8, 2019 06:55
docker, k8s上配置代理

Refer to: HTTP/HTTPS proxy

有时我们需要在服务器上配置代理才能访问google的官方镜像,网上找了很多,不是太麻烦就是不清晰。其实很简单,配置一下docker的代理就可以了。

参考上面的链接,然后将地址配成自己使用可以访问google的客户端地址,比如使用shadowsocks的windows电脑,IP为xx.xx.xx.xx,则可以配置成下面的

[Service]
Environment="HTTP_PROXY=http://xx.xx.xx.xx:1080/" "HTTPS_PROXY=https://xx.xx.xx.xx:1080/"
@soolaugust
soolaugust / how-to-deploy-kubeflow.md
Last active January 8, 2019 07:02
Deploy kubeflow

Refer to: Getting Started with Kubeflow

Pre-requires: k8s cluster

mkdir kubeflow
cd kubeflow/
export KUBEFLOW_TAG=v0.3.5
curl https://raw.githubusercontent.com/kubeflow/kubeflow/${KUBEFLOW_TAG}/scripts/download.sh | bash
@soolaugust
soolaugust / k8s-notebook.md
Last active September 11, 2019 03:14
document for problem & solution of k8s

Kubernetes use apparmor file error

reference

The annotation should go on the template, since you want it to end up on the pod object:

spec:
  template: 
    metadata:
@soolaugust
soolaugust / index.md
Created April 14, 2020 03:38
User "system:serviceaccount:kube-system:default" cannot get resource "namespaces" in API group "" in the namespace "default"

see: helm/helm#3130

helm init --upgrade --service-account tiller

or

kubectl --namespace kube-system create serviceaccount tiller
@soolaugust
soolaugust / TimeUtils.java
Created May 29, 2020 06:22
get current timestamp with timezone, 获取当前时区的时间戳。
public class TimeUtils {
public static long getCurrentTimeWithTimeZone(){
java.util.Calendar cal = java.util.Calendar.getInstance();
return cal.getTimeInMillis() + cal.getTimeZone().getRawOffset();
}
}
@soolaugust
soolaugust / RestartApp.java
Created June 24, 2020 12:14
Android重启
public class RestartApp {
public static void restartApp(Context context) {
Intent intent = new Intent(context, SplashActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
android.os.Process.killProcess(android.os.Process.myPid());
}
}
@soolaugust
soolaugust / 📊 Weekly development breakdown
Last active October 29, 2020 00:07
📊 Weekly development breakdown
Still Gathering Statistics...
@soolaugust
soolaugust / md5.go
Created July 23, 2021 03:55
get self md5 in Golang
// GetSelfMD5 get md5 of current program
func GetSelfMD5() string {
path, e := exec.LookPath(os.Args[0])
if e != nil {
log.Println(`Self md5sum error: look path fail:`, e)
return ""
}
bs, e := ioutil.ReadFile(path)
if e != nil {
log.Println(`SelfMd5sum error: read file fail:`, e)