Skip to content

Instantly share code, notes, and snippets.

View lightondust's full-sized avatar

Sen Zhang lightondust

View GitHub Profile
import streamlit as st
import pandas as pd
import numpy as np
import altair as alt
import pydeck as pdk
import time
# LOADING DATA
DATE_TIME = "date/time"
@lightondust
lightondust / streamlit_slider_bar_and_animation.py
Created February 14, 2021 06:51
modify the hello app of streamlit to enable user to use both animation and slider
import streamlit as st
import numpy as np
# Interactive Streamlit elements, like these sliders, return their value.
# This gives you an extremely simple interaction model.
iterations = st.sidebar.slider("Level of detail", 2, 20, 10, 1)
separation = st.sidebar.slider("Separation", 0.7, 2.0, 0.7885)
m, n, s = 960, 640, 400
x = np.linspace(-m / s, m / s, num=m).reshape((1, m))
@lightondust
lightondust / coordinate from address
Created November 13, 2020 10:49
get coordinate from address
import requests
import lxml
def get_coordinate_of_address(address):
url = 'http://geocode.csis.u-tokyo.ac.jp/cgi-bin/simple_geocode.cgi?charset=UTF8&addr={}'.format(address)
res = requests.get(url)
res_obj = lxml.etree.fromstring(bytes(res.text, encoding='utf8'))
lng = res_obj.xpath('//longitude/text()')[0]
lat = res_obj.xpath('//latitude/text()')[0]
@lightondust
lightondust / d-wave-nlp-article.ipynb
Created December 24, 2018 06:56
quantum_computing/dwave/d-wave-nlp-article.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lightondust
lightondust / cirq-tuto.ipynb
Created December 9, 2018 06:19
play_network/src/quantum_computing/cirq-tuto.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lightondust
lightondust / svm_and_decision_boundary.ipynb
Last active September 26, 2018 09:36
カーネル遊び
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lightondust
lightondust / google_analytics_first_search.ipynb
Created September 22, 2018 07:48
src/kaggle/Untitled.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lightondust
lightondust / scraping.ipynb
Last active September 9, 2018 13:27
src/scraping.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lightondust
lightondust / word2vec.ipynb
Created August 26, 2018 07:42
notebook/wiki/word2vec.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.