Skip to content

Instantly share code, notes, and snippets.

View jinyu121's full-sized avatar
💪
Fighting!

Yu Hao jinyu121

💪
Fighting!
View GitHub Profile
@jinyu121
jinyu121 / amazon_sms.py
Last active April 12, 2019 10:27
亚马逊发送短信示例
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import boto3
import argparse
AWS_ACCESS_KEY = "AWS_ACCESS_KEY_HERE"
@jinyu121
jinyu121 / get_anchor.py
Last active March 5, 2024 02:36
YOLO2 Get Anchors
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import numpy as np
import os
import random
@jinyu121
jinyu121 / run_test.sh
Created August 12, 2017 11:27
Caffe Auto Train and test
BASE_DIR="examples/jinyu121-alexnet"
BACK_DIR="${BASE_DIR}/backups"
PRE="alexnet"
GPU_NUM=1
LOG="/tmp/haoyu_log.log"
cd ../../
build/tools/caffe time -gpu ${GPU_NUM} -phase TEST -model ${BASE_DIR}/train_val.prototxt >${LOG} 2>&1
echo $(tail ${LOG} -n5 | head -n3 | cut -d "]" -f2 | cut -d ":" -f2)
@jinyu121
jinyu121 / NetAuth.py
Last active March 12, 2024 04:59
复旦大学网络自动认证脚本
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import requests
import logging
import socket
@jinyu121
jinyu121 / WeiboPicDownloader.py
Last active September 17, 2017 13:59
免登录下载微博大图
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 15 01:38:07 2017
@author: nondanee
"""
import os
import sys
import locale
@jinyu121
jinyu121 / apache_v2proxy.conf
Last active March 7, 2023 16:47
V2Ray: VMess over apache TLS
<VirtualHost *:80>
ServerName your.domain
ServerAdmin admin@your.domain
DocumentRoot /var/www/v2proxy/
ErrorLog ${APACHE_LOG_DIR}/error-v2proxy.log
CustomLog ${APACHE_LOG_DIR}/access-v2proxy.log combined
php_admin_value open_basedir "/var/www/v2proxy/:/tmp/:/proc/"
<Directory /var/www/v2proxy>
@jinyu121
jinyu121 / ImageDataGenerator.py
Last active April 21, 2019 14:03
TensorFlow Slim Classification Data Convert and Read
# -*- coding: utf-8 -*-
import os
import numpy as np
import tensorflow as tf
from tensorflow.contrib.data import Dataset
from tensorflow.python.framework import dtypes
from tensorflow.python.framework.ops import convert_to_tensor
class ImageDataGenerator(object):
@jinyu121
jinyu121 / README.md
Created October 3, 2017 07:17
TensorFlow图片分类例子

TensorFlow 分类例子

数据准备

不需要转换成TfRecord格式。只需要两个txt,每个txt都是图片路径 分类id的形式。

@jinyu121
jinyu121 / README.md
Last active May 17, 2019 06:16
将excel中的条目发给每个人

将excel中的数据发给每个人

文件组织

SendMail
├── templates
│   ├── __init__.py
│   └── templates
│   └── main.html
@jinyu121
jinyu121 / README.md
Last active April 18, 2018 06:12
TensorFlow 图片分类例子2

TensorFlow 分类例子

数据准备

需要把用到的数据转换成 TfRecord 格式。这里以Flower数据集为例。

网络

这里使用 LeNet5 作为分类网络。