Skip to content

Instantly share code, notes, and snippets.

View cainmagi's full-sized avatar
🤓
Wrapping up previous work.

Yuchen Jin cainmagi

🤓
Wrapping up previous work.
View GitHub Profile
@cainmagi
cainmagi / l02-einops.md
Last active February 17, 2024 05:28
Lecture 02: EinOps

2. 基于爱因斯坦求和约定的运算符 (einops)

intro.mp4

[toc]

2.1. 导论

@cainmagi
cainmagi / LICENSE.md
Created February 8, 2024 16:51
Solve overloads

MIT License

Copyright (c) 2024 Yuchen Jin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@cainmagi
cainmagi / l01-parallelism.md
Last active January 13, 2024 04:48
My Lectures

Lecture 01: Parallelism 并行

多线程,多进程,协程(concurrency, coroutine)

多线程,协程(并发):并没有并行计算的功能,只是一种对并行的模拟,打开任务管理器,只会看到一个Python.exe

多进程(并行):并行计算,很多的Python.exe

进程、线程、协程之概念理解+线程和进程各自有什么区别和优劣- 雨打芭蕉wt - 博客园

@cainmagi
cainmagi / fmtexception.py
Last active January 6, 2024 01:10
Formatted Exception Wrapper, designed for multi-processing applications.
# -*- coding: UTF-8 -*-
"""
Formatted Exception
===================
License
-------
MIT License
https://opensource.org/license/mit/
@cainmagi
cainmagi / README.md
Last active November 6, 2023 16:30
One-to-one map.

One to one map

This gist is used for recording the codes implementing the bijective map.

Due to the differences in the usage, the implementations may have special features.

Implementation Description
oodict.py When creating a new key-value pair, the value will also be a key. Replacing the key/value is not allowed. However, it is possible to replace a value by deleting and then reassigning a different value.
@cainmagi
cainmagi / README.md
Last active December 1, 2022 17:52
Definition of @ xfloat in TeXLive 2021

These codes are extracted from

texlive\2021\texmf-dist\source\latex-dev\base\latexrelease.dtx
@cainmagi
cainmagi / Dockerfile
Last active April 19, 2022 06:53
A test for installing VS Code with extensions
#
# Dockerfile used for testing VS Code installation
#
# By Yuchen Jin (cainmagi@github)
#
# Pull base image.
ARG BASE_IMAGE=ubuntu:focal
FROM $BASE_IMAGE
ARG DEBIAN_FRONTEND=noninteractive
@cainmagi
cainmagi / Get-Conda-Path-Readme.md
Last active April 18, 2022 04:56
Python & Conda Version Checker.

A script for getting python & conda information.

Use the following commands to fetch the scripts.

wget https://gist.githubusercontent.com/cainmagi/9ddcc621d21baf529b08c739ddca5e1c/raw/get-conda-path.py
wget https://gist.githubusercontent.com/cainmagi/9ddcc621d21baf529b08c739ddca5e1c/raw/get-pyver.py

get-pyver.py

@cainmagi
cainmagi / Installation-for-Oh-My-Posh.md
Last active April 18, 2022 03:22
Installation script of Oh My Posh.

Installation for Oh My Posh

This archive is a collections of required scripts for installing Oh-My-Posh 🔗.

To use this script, you can run:

wget -O- https://gist.githubusercontent.com/cainmagi/99a8dbfe175fccdc8b3457d14c67e2b8/raw/install-omp.sh | bash
@cainmagi
cainmagi / Installation-for-GCC.md
Last active August 1, 2022 12:54
Installation for GCC

Installation for GCC

This archive is a collections of required scripts for installing GCC. The installation is based on the full compilation of the source codes.

To use this script, you can run:

wget -O- https://gist.githubusercontent.com/cainmagi/eaa93dd3c88672cc76e565a2081399d0/raw/install-gcc.sh | bash -s -- --all