This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class VideoIMUFusion::RunningData | |
| { | |
| public: | |
| private: | |
| FilterState& state() | |
| { | |
| return m_state; | |
| } | |
| FilterState const& state() const |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class VideoIMUFusion::RunningData | |
| { | |
| public: | |
| private: | |
| FilterState& state() | |
| { | |
| return m_state; | |
| } | |
| FilterState const& state() const |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from bs4 import BeautifulSoup | |
| import base64 | |
| payload = {} | |
| res = requests.get('http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU_d.php') | |
| res.encoding = 'big5' | |
| soup = BeautifulSoup(res.text) | |
| for input_tag in soup.select('input'): | |
| if input_tag.get('type') == 'hidden': | |
| payload[input_tag.get('name')] = base64.b64encode(input_tag.get('value').encode('utf-8')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import BeautifulSoup, requests | |
| r=requests.post('http://www.twse.com.tw/ch/trading/exchange/BWIBBU/BWIBBU.php', {'STK_NO':2330, 'myear': 2016, 'mmon':2}) | |
| soup = BeautifulSoup.BeautifulSoup(r.content) | |
| table = soup.find('table', {'class':'board_trad'}) | |
| with open('out2.csv', 'w') as f: | |
| trs = table.findAll('tr') | |
| for tr in trs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <pthread.h> | |
| #include <unistd.h> | |
| static pthread_mutex_t Cmtx = PTHREAD_MUTEX_INITIALIZER; | |
| void* ap1_thread(void* args) | |
| { | |
| while (1) { | |
| pthread_mutex_lock(&Cmtx); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CC = gcc | |
| SOFLAGS = -shared | |
| LDFLAGS = -lm | |
| CFLAGS = -Wall -pedantic -ggdb3 -O0 -std=c99 -lpthread -fPIC -shared | |
| ADD_OBJS = add.o | |
| SUB_OBJS = sub.o | |
| all: add.so sub.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int add(int a, int b) | |
| { | |
| return a + b; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding=utf-8 | |
| # Goal: parse house information for each district from websites | |
| # for each district, get 「土地區段位置或建物區門牌」,「建物型態」,「建物現況格局」,「坪數」,「屋齡」,「總價元」,「資料來源」into csv file | |
| # Procedure: | |
| # 1. get the number of page for each district by parsing first html content | |
| # 2. for each district put all html page together, use htmlparser to parse content and save data into file | |
| import sys | |
| import math |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding=utf-8 | |
| # Goal: | |
| # parse different city's website | |
| # for each city, get 「土地區段位置或建物區門牌」,「建物型態」,「建物現況格局」,「坪數」,「屋齡」,「總價元」,「資料來源」into csv file | |
| # step: | |
| # 1. get number of page by parsing string | |
| # 2. put all html page together, use htmlparser to get content | |
| # 3. parsing content and save it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package hardware; | |
| import java.util.ArrayList; | |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.location.Location; | |
| import android.location.LocationListener; | |
| import android.location.LocationManager; | |
| import android.location.LocationProvider; |