Skip to content

Instantly share code, notes, and snippets.

@loochao
loochao / Installing Arch on a ThinkPad X1 Extreme.md
Created March 11, 2020 04:04 — forked from CodingCellist/Installing-Arch-on-a-ThinkPad-X1-Extreme-Gen-1.md
A detailed overview of how I installed Arch Linux on my Lenovo ThinkPad X1 Extreme, having never installed Arch before.

DISCLAIMER

I am not responsible for any damages, loss of data, system corruption, or any other mishap you may somehow cause by following this guide.

This is mainly a step-by-step reminder/log for myself of how I installed Arch on my laptop. I am putting this out there in case it is useful for someone else, it is not intended to be an official guide. As a result, you may find that this guide is very tedious or lists a lot of unnecessary/intuitive steps or just straight up does things in a way that is considered bad practice. Apart from the latter, this is intentional, as I did not find these steps intuitive at all when

@loochao
loochao / Synology-Diskstation-Git.md
Created July 22, 2018 02:39 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@loochao
loochao / ssh_server_commands.md
Created March 29, 2018 14:41 — forked from stevekm/ssh_server_commands.md
handy ssh, rsync, scp commands

Here are some handy commands for connecting to servers and copying files about. These are all for Linux terminal / bash shell

Do cool things with ssh; log in & run command, find files in dir

# log into server
ssh [email protected] -Y 
# -X      Enables X11 forwarding. <- use this to enable X11 graphical windows, but this will eventually time out & you'll lose the X11 connection
# -Y      Enables trusted X11 forwarding. <- this one preserves your X11 connection while you're logged in
仙人抚我顶,结发受长生
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Import Dataset
dataset = pd.read_csv('Data2.csv')
X = dataset.iloc[:, :-1].values
y = dataset.iloc[:, 5].values
df_X = pd.DataFrame(X)
df_y = pd.DataFrame(y)
@loochao
loochao / config.py
Created January 12, 2018 04:01
把相应的目录加入路径中
# coding=utf-8
"""
@author: Xingbuxing
date: 2017年05月06日
配置文件,配置文件路径
"""
import os
# 获取当前程序的地址
current_file = __file__

###1. 自定义激活函数

可以采用以下几种方法:

from keras import backend as K
from keras.layers.core import Lambda
from keras.engine import Layer
http://blog.csdn.net/han_xiaoyang?viewmode=contents
https://www.zybuluo.com/hanxiaoyang/note/985858
from sklearn.svm import LinearSVC
from sklearn.learning_curve import learning_curve
#绘制学习曲线,以确定模型的状况
def plot_learning_curve(estimator, title, X, y, ylim=None, cv=None,
train_sizes=np.linspace(.1, 1.0, 5)):
"""
画出data在某模型上的learning curve.
https://www.zhihu.com/question/20874888
量化投资方面,国内外都有哪些好的论坛或者网站
;; For Worldquant
(if (eq system-uses-terminfo t)
(progn
(set-face-background 'mode-line "grey")
(set-face-foreground 'mode-line "black")
(set-face-attribute 'region nil :background "Cyan" :foreground "#ffffff")))
(setq visible-bell nil)