Skip to content

Instantly share code, notes, and snippets.

Avatar
😶
Long way to go ...

黑山雁 xjtu-blacksmith

😶
Long way to go ...
View GitHub Profile
@xjtu-blacksmith
xjtu-blacksmith / custom-head.html
Last active Feb 6, 2020
Custom theme for cnblogs
View custom-head.html
<!-- head -->
<link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://files.cnblogs.com/files/xjtu-blacksmith/arduino-light.css">
<script async src="https://cdn.bootcss.com/pangu/4.0.7/pangu.min.js"></script>
<script src="https://cdn.bootcss.com/mathjax-mhchem/3.3.2/mhchem.js"></script>
@xjtu-blacksmith
xjtu-blacksmith / build_train_data.py
Last active Feb 5, 2020
Processing tiny-imagenet-200 datasets to pytorch.dataset.ImageFolders
View build_train_data.py
# the file is at: data/tiny-imagenet-200/train/
import os
dirs = os.listdir('.') # get categoris
for the_dir in dirs:
if os.path.isdir(the_dir): # only work for folders
for _, _, images in os.walk(os.path.join(the_dir, 'images')):
for image in images:
os.rename(
os.path.join(the_dir, 'images', image),
os.path.join(the_dir, image)
@xjtu-blacksmith
xjtu-blacksmith / data.csv
Created Oct 21, 2019
The codes to produced a comprehensive graph for temperature field (class homework)
View data.csv
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 2.9 2.8 2.71 2.62 2.54 2.49 2.45 2.43 2.41 2.41 2.4 2.4 2.4 2.4 2.4
3 2.8 2.61 2.42 2.23 2.07 1.96 1.89 1.85 1.82 1.81 1.81 1.8 1.8 1.8 1.8
3 2.71 2.42 2.11 1.81 1.54 1.38 1.3 1.25 1.23 1.21 1.2 1.2 1.2 1.2 1.2
3 2.62 2.23 1.81 1.36 0.91 0.74 0.66 0.63 0.61 0.6 0.6 0.6 0.6 0.6 0.6
3 2.54 2.07 1.54 0.91 0 0 0 0 0 0 0 0 0 0 0
3 2.49 1.96 1.38 0.74 0
3 2.45 1.89 1.3 0.66 0
3 2.43 1.85 1.25 0.63 0
3 2.42 1.83 1.23 0.62 0
You can’t perform that action at this time.