Skip to content

Instantly share code, notes, and snippets.

View yosakabe's full-sized avatar

Y. Osakabe yosakabe

View GitHub Profile
def publish_timestamp(return_type:str='y4md_hms', verbose:bool=False) -> str:
"""generate timestamp as str with the current time
Args:
return_type (str, optional): format definition. Defaults to 'y4md_hms'.
verbose (bool, optional): display timestamp to the standard output. Defaults to False.
Returns:
str: timestamp
% line numbers
\usepackage{lineno}
\newcommand*\patchAmsMathEnvironmentForLineno[1]{
\expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
\expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
\renewenvironment{#1}
{\linenomath\csname old#1\endcsname}
{\csname oldend#1\endcsname\endlinenomath}}
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{
\patchAmsMathEnvironmentForLineno{#1}
@yosakabe
yosakabe / 00_dotfiles.md
Last active October 8, 2021 10:12
dotfiles
  1. 01_bashrc_prompt.sh: my favourite prompt
@yosakabe
yosakabe / 00_Git_tips.md
Created July 17, 2020 10:42
git commands, tips
  1. 01_force_to_ignore.md: force to ignore tracked file
@yosakabe
yosakabe / 00_SMILES_handling.md
Last active July 17, 2020 10:34
SMILES data handling
  1. 01_SMILES_into_psql.md
  2. ...

To run argparse commands in .ipynb:

script type replace following commands
.py args = parser.parse_args()
.ipynb args = parser.parse_args(args=[])

Favourite Fonts

  1. Cica
  2. HackGen

more others

  • Hasklig
  • Monoid
  • Fira Code Light
  • Cascadia Mono (Windows Only)
@yosakabe
yosakabe / VSCode - Extensions.md
Last active July 12, 2020 01:43
VisualStudioCode-Settings

Tools

  • AsciiDoc
  • asciidoctor-vscode
  • Bracket Pair Colorizer 2 [newer version is available now]
  • Clipboard Ring
  • Docker
  • EvillInspector
  • Git Graph
  • GitLens
  • Highlight Matching Tag
@yosakabe
yosakabe / 00_readme-hyperparamesloader.md
Last active May 27, 2020 08:38
Utility function to manage global variables such as hyper-parameters in python projects.

Purpose

This gist helps you to handle global variables such as hyper-parameters in your python projects.

Contents

  1. hyperparamsloader.py
  2. sample_params.yaml
  3. sample_params.json

How to use

@yosakabe
yosakabe / 00_requirements.md
Created May 16, 2020 04:10
conda environments
  • xeus
  • mi
  • vis