Skip to content

Instantly share code, notes, and snippets.

# coding: utf-8
# # 读取并整理txt
# # 读取txt
# In[15]:
@goldengrape
goldengrape / Face_Recognition_tinker.py
Created November 20, 2017 06:05
通过并联神经网络改进deeplearning.ai中人脸识别作业
# coding: utf-8
# # 持续训练
#
# 问题提出: 如果人脸识别在使用中发现准确率并不够高, 是否可以继续改进? 如何在已有的基础之上继续改进?
#
# 解决方法: 建立并联的判别神经网络, 将A人脸的128位编码和待测人脸的128位编码作为输入, 二值判别输出
# * 路径A: 计算二阶范数距离, 并以原题目中的阈值作为分界, 形成输出
# * 路径B: 待训练神经网络, 早期时参数值都很小, 因此输出值也很小, 但可被训练.
@goldengrape
goldengrape / decorate_with_jit.py
Last active November 24, 2017 07:21
对py使用numba 的@jit进行修饰, 将每一个函数定义之前加入@jit
# coding: utf-8
# # 给所有函数修饰
#
# Numba是一个python的加速器, 最简单的加速方式仅仅是在导入numba以后, 在函数定义之前增加@jit.
#
# 本程序是为了测试简单增加或者消除所有函数前@jit
# In[1]:

Keybase proof

I hereby claim:

  • I am goldengrape on github.
  • I am goldengrape (https://keybase.io/goldengrape) on keybase.
  • I have a public key ASDJ1ImsAzB5_hBAL2UokE8ZOEGUxO_Q3ywvYNraSrKC8go

To claim this, I am signing this object:

{"sig":"82fd2d33255aad1ec54fb69b5a746963c0bd9e8582b636fb86aae26718299352eee3cd6a8573d961031f3604912854918a358411ea5c732f8faf713cc3f0626d0","msghash":"b3e8afaa86b700e272fccefbc03907614e3f8ba581bc28613722f294acad2656"}
部分药品援助项目信息
A、中华慈善总会
1、格列卫全球患者援助项目
针对病种:贫困慢性粒细胞白血病患者、急性淋巴细胞白血病患者、恶性胃肠道间质瘤患者及隆突性皮肤纤维肉瘤
项目网址:https://gipap.org.cn
项目热线:400-606-1022
2、多吉美患者援助项目
针对病种:肾癌、肝癌
项目网址:www.ncpap.com.cn
@goldengrape
goldengrape / Simple Play and Say.scpt
Last active September 11, 2021 14:50
Simple Play and Say.scpt
property defaultSlideDuraton : 2
property pauseBeforeSpeaking : 0 -- 1.5
property stoppingStatement : "[[slnc 1000]] Stopping presentation."
-- my startRecordScreen
tell application "QuickTime Player"
activate
set newScreenRecording to new screen recording
tell newScreenRecording
start
@goldengrape
goldengrape / learnmusic.py
Created December 9, 2018 20:43
learnmusic.py
#! python2
# NOTE: The first line in this script specifies that it should always be run using Python 2.7.
# The `midiutil` module is currently not available for Python 3.
'''Generates a MIDI file with 12 random notes in C major, using the midiutil module. The instrument is also picked randomly. The result is then played with the sound.MIDIPlayer class.
If nothing happens, make sure that your device isn't muted.
'''
from midiutil.MidiFile import MIDIFile
@goldengrape
goldengrape / learnmusic.py
Created December 9, 2018 21:17
learnmusic.py
#! python2
# NOTE: The first line in this script specifies that it should always be run using Python 2.7.
# The `midiutil` module is currently not available for Python 3.
'''Generates a MIDI file with 12 random notes in C major, using the midiutil module. The instrument is also picked randomly. The result is then played with the sound.MIDIPlayer class.
If nothing happens, make sure that your device isn't muted.
'''
from midiutil.MidiFile import MIDIFile
import webvtt
import pandas as pd
filename="en.vtt"
time_epsilon=pd.Timedelta('00:00:00.1')
vtt=webvtt.read(filename)
df=pd.DataFrame([[pd.to_datetime(v.start),
pd.to_datetime(v.end),