注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
| #!/usr/bin/env python3.6 | |
| """ | |
| Outputs an .eps visualization of shuffling algorithm to stdout. | |
| Requires Python 3.6+ (for f-strings). | |
| """ | |
| import numpy as np | |
| def create(width, height): | |
| print(f"""%!PS-Adobe-3.0 EPSF-3.0 | |
| %%BoundingBox: 0 0 {width} {height} |
| # http://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html | |
| def exp_lr_scheduler(optimizer, epoch, init_lr=0.001, lr_decay_epoch=7): | |
| """Decay learning rate by a factor of 0.1 every lr_decay_epoch epochs.""" | |
| lr = init_lr * (0.1**(epoch // lr_decay_epoch)) | |
| if epoch % lr_decay_epoch == 0: | |
| print('LR is set to {}'.format(lr)) | |
| for param_group in optimizer.param_groups: |
| import gym | |
| import numpy as np, pandas as pd | |
| from sklearn.neural_network import MLPClassifier | |
| import matplotlib.pyplot as plt | |
| env = gym.make("MountainCar-v0") | |
| env.reset() |
| sudo yum install libmpc-devel mpfr-devel gmp-devel | |
| cd ~/Downloads | |
| curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O | |
| tar xvfj gcc-4.9.2.tar.bz2 | |
| cd gcc-4.9.2 | |
| ./configure --disable-multilib --enable-languages=c,c++ | |
| make -j 4 | |
| make install |
| from gensim import models | |
| sentence = models.doc2vec.LabeledSentence( | |
| words=[u'so`bme', u'words', u'here'], tags=["SENT_0"]) | |
| sentence1 = models.doc2vec.LabeledSentence( | |
| words=[u'here', u'we', u'go'], tags=["SENT_1"]) | |
| sentences = [sentence, sentence1] | |
| class LabeledLineSentence(object): |
Refer to https://clang-omp.github.io/ .
We need to install something:
brew install libiomp
brew install clang-ompThen we need to set the environment:
With NLTK version 3.1 and Stanford NER tool 2015-12-09, it is possible to hack the StanfordNERTagger._stanford_jar to include other .jar files that are necessary for the new tagger.
First set up the environment variables as per instructed at https://github.com/nltk/nltk/wiki/Installing-Third-Party-Software
(This is the text of the keynote I gave at Startup Riot 2009. Will update when video becomes available.)
Hi everyone, I’m Chris Wanstrath, and I’m one of the co-founders of GitHub.
GitHub, if you haven’t heard of it, has been described as “Facebook for developers.” Which is great when talking about GitHub as a website, but not so great when describing GitHub as a business. In fact, I think we’re the polar opposite of Facebook as a business: we’re small, never took investment, and actually make money. Some have even called us successful.
Which I’ve always wondered about. Success is very vague, right? Probably even relative. How do you define it?
After thinking for a while I came up with two criteria. The first is profitability. We employ four people full time, one person part time, have thousands of paying customers, and are still growing. In fact, our rate of growth is increasing – which means January was our best month so far, and February is looking pretty damn good.