Skip to content

Instantly share code, notes, and snippets.

View ypwhs's full-sized avatar
:octocat:
Focusing

杨培文 (Yang Peiwen) ypwhs

:octocat:
Focusing
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ypwhs
ypwhs / check_iPhoneX.py
Last active September 19, 2023 05:56
检查 iPhone 是否有货,有货则语音播报,适用于 macOS
# coding: utf-8
import requests
import time
import os
store_url = 'https://reserve-prime.apple.com/CN/zh_CN/reserve/iPhoneX/stores.json'
stores = [('R388', '西单'), ('R448', '王府井')]
product = 'MQA82CH/A'
availability_url = 'https://reserve-prime.apple.com/CN/zh_CN/reserve/iPhoneX/availability.json'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import requests
def format_bytes(size):
# 2**10 = 1024
power = 2 ** 10
n = 0
power_labels = {0: '', 1: 'K', 2: 'M', 3: 'G', 4: 'T'}
while size > power:
size /= power
@ypwhs
ypwhs / transfer_learning.ipynb
Created October 5, 2017 08:15
Keras Inception + Xception (0.47)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ypwhs
ypwhs / preprocessing.ipynb
Created February 2, 2017 16:22
convert svhn digitStruct.mat to csv
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ypwhs
ypwhs / random_seed_test.ipynb
Last active October 8, 2019 09:40
Keras 固定随机数种子重现相同的训练结果
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.
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.