Skip to content

Instantly share code, notes, and snippets.

@Wei1234c
Wei1234c / 練習_台泥的資產負債表.py
Created June 28, 2017 16:53
練習 - 台泥的資產負債表
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
import requests
def get_fs_html(stock_no):
url = 'http://goodinfo.tw/StockInfo/StockFinDetail.asp?RPT_CAT=BS_M_QUAR&STOCK_ID=' + stock_no
html = requests.get(url, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36'})
return html
@Wei1234c
Wei1234c / TensorBoard - Visualizing Learning.py
Last active May 26, 2016 07:33
TensorBoard: Visualizing Learning - example code
MNIST_dataset_path = '/tmp/data/MNIST'
log_path = 'log'
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@Wei1234c
Wei1234c / MPU6050_Servo.ino
Last active July 19, 2017 05:24
MPU6050 + Servo
#include <Servo.h>
// I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class
// 10/7/2011 by Jeff Rowberg <jeff@rowberg.net>
// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib
//
// Changelog:
// 2013-05-08 - added multiple output formats
// - added seamless Fastwire support
// 2011-10-07 - initial release
@Wei1234c
Wei1234c / 數組組合.ipynb
Created January 6, 2016 02:46
數組組合
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Wei1234c
Wei1234c / Shot_Zombie.ino
Last active October 16, 2015 15:57
Shot Zombie
// http://www.mobile01.com/topicdetail.php?f=37&t=3973404
#define columnCount 3
#define intervalScanning 20
#define holdForTrigger 50
#define thresholdDoorbell 500
byte pinDoorBells[columnCount] = {23, 24, 25};
byte pinTriggers[columnCount] = {2, 3, 4};
int doorBellValues[columnCount];
@Wei1234c
Wei1234c / hadoop_pseudo-distributed.armv7.dockerfile
Last active September 6, 2015 17:52
Hadoop_pseudo-distributed dockerfile
# Hadoop dockerfile for armv7
# Ref 1: https://github.com/dockerfile/java/tree/master/oracle-java8
# Ref 2: https://docs.docker.com/examples/running_ssh_service/
# Ref 3: https://github.com/sequenceiq/hadoop-docker
#
# by: Wei Lin
# date: 2015/9/4
# to build image: docker build -t hadoop_pseudo-distributed .
# to test: docker run -d -P --name=hadoop_pseudo hadoop_pseudo-distributed
@Wei1234c
Wei1234c / Oracle_Java8_sshd_root-login.dockerfile
Last active September 4, 2015 17:18
Oracle Java8 sshd root-login
# Oracle java8_sshd_root-login dockerfile for armv7
# Ref 1: https://github.com/dockerfile/java/tree/master/oracle-java8
# Ref 2: https://docs.docker.com/examples/running_ssh_service/
#
# by: Wei Lin
# date: 2015/9/4
# Pull base image.
FROM armv7/armhf-ubuntu:14.04
@Wei1234c
Wei1234c / Apache.armv7.dockerfile
Last active April 28, 2021 19:27
Apache dockerfile
# orgin: https://hub.docker.com/_/httpd/
# modified by: Wei Lin
# date: 2015/9/4
# Pull base image.
FROM armv7/armhf-ubuntu:14.04
MAINTAINER Wei Lin
ENV TERM linux
@Wei1234c
Wei1234c / Tomcat.armv7.dockerfile
Last active September 4, 2015 02:33
Tomcat dockerfile
# orgin: https://hub.docker.com/_/tomcat/
# modified by: Wei Lin
# date: 2015/9/4
FROM oracle-java8
MAINTAINER Wei Lin
ENV TERM linux
@Wei1234c
Wei1234c / NodeJS.armv7.dockerfile
Last active September 4, 2015 02:02
NodeJS dockerfile
# Node.js Dockerfile
# https://github.com/dockerfile/nodejs
#
# origin: https://github.com/dockerfile/nodejs
# modified by: Wei Lin
# date: 2015/9/3
# Pull base image.
FROM python