Skip to content

Instantly share code, notes, and snippets.

Qiyuan Gong qiyuangong

Block or report user

Report or block qiyuangong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
qiyuangong /
Created Apr 12, 2019
ImageNet Resized image and crop to 224*224
import os
import cv2
import argparse
def resize_image(image):
height, width, _ = image.shape
qiyuangong /
Last active May 27, 2017
package org.smartdata.server.actions;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdfs.DFSClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.smartdata.common.actions.ActionType;
import java.util.UUID;
View plot_matlab.m
figure1 = figure('Color',[1 1 1]);
axes1 = axes('Parent',figure1,'YTick',[0:1:10],...
'GridLineStyle','--','FontSize', 15);
X = 10:10:40
plot(X, multitest(:, 1),'s-','Color',[1 0 1] ,'LineWidth',2.5, 'DisplayName','adult-7');
qiyuangong / rename_nature_with_fixed_size
Created Oct 12, 2016
Rename nature numbered files with fixed size number
View rename_nature_with_fixed_size
import os
def rename_nature_with_fixed_size(size=3, sep='_'):
files = [f for f in os.listdir('.') if os.path.isfile(f)]
for f in files:
if sep in f and f[0] != sep:
new_name = f.split(sep)
if len(new_name[0]) < size:
new_name[0] = '0' * (size - len(new_name[0])) + new_name[0]
os.rename(f, sep.join(new_name))
qiyuangong /
Last active Oct 12, 2016
merge excel with xlrd and xlwt
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pdb
import os
from xlrd import open_workbook
from xlwt import Workbook
# from xlwt import
if __name__ == '__main__':


###功能 基于DNSPOD (的动态域名解析脚本:


###原理 基于dnspod提供的api,提交信息。 如果IP地址没有改变,则不处理;如果改变了则提交新的IP地址。

You can’t perform that action at this time.