Skip to content

Instantly share code, notes, and snippets.

View v123582's full-sized avatar

WeiYuan v123582

View GitHub Profile
@v123582
v123582 / selenium.py
Created November 11, 2019 05:12 — forked from korakot/selenium.py
Use selenium in Colab
# install chromium, its driver, and selenium
!apt install chromium-chromedriver
!pip install selenium
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
# open it, go to a website, and get results
@v123582
v123582 / README.md
Created November 12, 2018 07:58 — forked from greyscaled/README.md
Sequelize + Express + Migrations + Seed Starter
@v123582
v123582 / AccountKit-Comparsion.md
Created June 3, 2017 03:32 — forked from Calvin-Huang/AccountKit-Comparsion.md
Account Kit 優缺點整理

Account Kit - Pros & Cons

Pros

  • 不需要重新實作簡訊/Email註冊流程(PhoneNumber / Email 可擇一)
  • 集成 iOS/Android/Web SDK
  • 沒有與 Facebook 帳號做綁定(實測過沒問題) 測試用 App
  • 支援國家包含中國,詳細可見 支援 SMS 國碼一覽

Cons

  • 只能拿到 PhoneNumber/Email & AccountKit ID, 所以其他會員資料需要後補
@v123582
v123582 / model_relation_ex.py
Created May 3, 2017 08:21 — forked from kirang89/model_relation_ex.py
Example for many-to-many relationship with extra columns in SQLAlchemy
import sqlalchemy
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import sessionmaker, relationship
engine = sqlalchemy.create_engine('sqlite:///:memory:')
Base = declarative_base()
// demo: http://jsfiddle.net/v123582/j6r454om/
<select class="mobile-vendor-1">
<option value="motorola">Motorola</option>
<option value="nokia">Nokia</option>
<option value="android">Android</option>
</select>
<select class="model-1">
<option></option>