Skip to content

Instantly share code, notes, and snippets.

Avatar
🐌
Focus

soolaugust soolaugust

🐌
Focus
View GitHub Profile
View answers.html
<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 Dec 3, 2017
take notes for studying tensorflow
View tensorflow_note.md

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.
View how-to-deploy-kubeflow.md

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 / proxy-with-k8s.md
Created Jan 8, 2019
docker, k8s上配置代理
View proxy-with-k8s.md

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 / k8s-notebook.md
Last active Sep 11, 2019
document for problem & solution of k8s
View k8s-notebook.md

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 Apr 14, 2020
User "system:serviceaccount:kube-system:default" cannot get resource "namespaces" in API group "" in the namespace "default"
View index.md

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
get current timestamp with timezone, 获取当前时区的时间戳。
View TimeUtils.java
public class TimeUtils {
public static long getCurrentTimeWithTimeZone(){
java.util.Calendar cal = java.util.Calendar.getInstance();
return cal.getTimeInMillis() + cal.getTimeZone().getRawOffset();
}
}
@soolaugust
soolaugust / AppStatus.java
Last active Jan 10, 2022
Android fix app crash when kill by system in background; Android项目长时间在后台运行后,再次打开程序崩溃问题完美解决(APP在后台被系统回收后,如何重新启动)
View AppStatus.java
public class AppStatus {
public static final int STATUS_RECYCLE =-1; //被回收
public static final int STATUS_NORMAL=1; //正常
}
View RestartApp.java
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 Oct 29, 2020
📊 Weekly development breakdown
View 📊 Weekly development breakdown
Still Gathering Statistics...