Skip to content

Instantly share code, notes, and snippets.

View Thesharing's full-sized avatar

Zhilong Hong Thesharing

View GitHub Profile
@Thesharing
Thesharing / git-rename-stash.sh
Created August 23, 2019 07:40 — forked from jdforsythe/git-rename-stash.sh
Rename Git Stash
#!/bin/bash
git stash list
echo "Enter stash number to rename"
read stash_number
echo "Enter new name"
read new_name
stash_name="stash@{${stash_number}}"
echo "$stash_name"
@Thesharing
Thesharing / thread_pool.py
Created December 5, 2018 19:13 — forked from heavywatal/thread_pool.py
Example of thread pool in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Example of thread pool
https://docs.python.org/3/library/concurrent.futures.html
https://docs.python.org/3/library/multiprocessing.html
"""
import concurrent.futures as confu
import multiprocessing.pool as mpp
import time