- Nvidia Driver
- CUDA (Compute Unified Device Architecture)
- cuDNN (NVIDIA CUDA® Deep Neural Network library)
- Install tensorflow-gpu
This file contains 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
# Ref: https://stackoverflow.com/a/47774393/2975670 | |
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to notebook input.ipynb --output output.ipynb | |
jupyter nbconvert --clear-output --to notebook boston.ipynb --output output.ipynb |
This file contains 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 | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.firefox.options import Options | |
from selenium.webdriver import Firefox | |
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary | |
url = 'https://s.taobao.com/search?q=%E5%B0%BF%E8%A4%B2&type=p&tmhkh5=&spm=a21wu.241046-tw.a2227oh.d100&from=sea_1_searchbutton&catId=100' |
This file contains 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
# Reference: | |
# https://samelh.com/blog/2017/10/01/get-alexa-site-rank-python-php-javascript/ | |
import requests, re | |
alexa = 'http://data.alexa.com/data?cli=10&dat=s&url={0}' | |
search_domain = 'google.com' | |
r = requests.get(alexa.format(search_domain)) | |
xml = r.text | |
rank = int(re.search(r'<POPULARITY[^>]*TEXT="(\d+)"', xml).groups()[0]) |
This file contains 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
#.getJSON("http://example.com/data.json", function(data) { | |
table_data = [] | |
for each(item in data) { | |
row = { node: item.node, value: item.value } | |
table_data.push(row) | |
} | |
somefunction();# | |
('#realtime_table').bootstrapTable({ | |
data: table_data | |
}) |
This file contains 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
from flask import Flask, make_response | |
from flask_restful import Resource, Api, fields, marshal_with | |
import pandas as pd | |
# 初始化 | |
app = Flask(__name__) | |
api = Api(app) | |
todo_fields = { | |
"col_one": fields.String(attribute="col1"), |
This file contains 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
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> | |
<script src="https://code.highcharts.com/highcharts.js"></script> | |
<script src="https://code.highcharts.com/modules/data.js"></script> | |
<script src="https://code.highcharts.com/modules/exporting.js"></script> | |
<!-- Additional files for the Highslide popup effect --> | |
<script src="https://www.highcharts.com/media/com_demo/js/highslide-full.min.js"></script> | |
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> | |
<script> | |
$.getJSON('https://gist.githubusercontent.com/VioletVivirand/74cb28602595c2a18d8c9de77ebabe78/raw/a8a4567d9f1399ca206add3dd25826e2e0759b23/timedata.json', function(data) { |