Skip to content

Instantly share code, notes, and snippets.

View xjtu-blacksmith's full-sized avatar
😶
Long way to go ...

Jerry You xjtu-blacksmith

😶
Long way to go ...
View GitHub Profile
@xjtu-blacksmith
xjtu-blacksmith / avit-new.omp.json
Created May 20, 2021 01:56
A nerd-free version of avit theme for oh-my-posh
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "path",
"style": "plain",
@xjtu-blacksmith
xjtu-blacksmith / iterate.theme.bash
Created January 12, 2021 12:08
bash-it: theme Iterate with conda_env_prompt support
#!/usr/bin/env bash
SCM_GIT_CHAR="± "
SCM_HG_CHAR="☿ "
SCM_SVN_CHAR="⑆ "
SCM_NONE_CHAR=""
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
SCM_THEME_PROMPT_PREFIX="|"
SCM_THEME_PROMPT_SUFFIX="${green}| "
SCM_GIT_AHEAD_CHAR="${green}+"
@xjtu-blacksmith
xjtu-blacksmith / custom-head.html
Last active February 6, 2020 04:42
Custom theme for cnblogs
<!-- 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 February 5, 2020 08:49
Processing tiny-imagenet-200 datasets to pytorch.dataset.ImageFolders
# 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 October 21, 2019 12:40
The codes to produced a comprehensive graph for temperature field (class homework)
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