Skip to content

Instantly share code, notes, and snippets.

View tamuhey's full-sized avatar
🏠
Working from home

Yohei Tamura tamuhey

🏠
Working from home
View GitHub Profile
@akirakubo
akirakubo / bert-japanese.md
Created July 11, 2020 00:10
日本語向け事前学習済みBERTモデルのリスト
@pandaman64
pandaman64 / memory_model.md
Last active December 18, 2020 07:54
papers on formalized memory models

色々メモリモデル

コンパイラ(LLVM)のメモリモデル

✅ Reconclining high-level optimization and low-level code in LLVM (https://dl.acm.org/doi/10.1145/3276495)

Lee, Hur, Jung, Liu, Regehr, Lopes.

  • 低レベル言語(C, C++, Rust)のコンパイラのメモリモデルには二つの相反する目標がある
    • high-level optimization
      • 最適化したい
  • 例:
@ines
ines / Install
Last active September 21, 2023 17:14
Streamlit + spaCy
pip install streamlit
pip install spacy
python -m spacy download en_core_web_sm
python -m spacy download en_core_web_md
python -m spacy download de_core_news_sm
@gatopeich
gatopeich / dataclass_from_dict.py
Created February 19, 2019 15:08
Python 3.7 dataclass to/from dict/json
from dataclasses import dataclass, fields as datafields
from ujson import dumps, loads
# Note: ujson seamlessly serializes dataclasses, unlike stdlib's json
@dataclass
class Point:
x: float
y: float
# Shallow dataclass can be rebuilt from dict/json:
@t-vi
t-vi / __init__.pyi
Last active July 13, 2023 09:11
PyTorch Type Hints work in progress (put into python3.x/dist-packages/torch/ directory to try)
from typing import List, Tuple, Optional, Union, Any, ContextManager, Callable, overload
import builtins
import math
import pickle
class dtype: ...
_dtype = dtype
@2torus
2torus / doctesting_decorator.py
Last active November 21, 2020 10:02
Replacement for ipython_doctester
"""
ipython_doctester module is outdated. I tried to replace its test function with the function below
Code is from https://stackoverflow.com/a/47590703/996379
"""
import doctest
import copy
def test(func):
'''
Use test as a decorator to a function with doctests in Jupyter notebook.
Run the cell to see the results of the doctests.
@althonos
althonos / setup.cfg
Last active March 4, 2024 18:08
A `setup.cfg` template for my Python projects
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c
[metadata]
name = {name}
version = file: {name}/_version.txt
author = Martin Larralde
author_email = martin.larralde@embl.de
url = https://github.com/althonos/{name}
description = {description}
long_description = file: README.md
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@santisbon
santisbon / Search my gists.md
Last active April 22, 2024 14:15
How to #search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@ryboe
ryboe / .travis.yml
Last active November 23, 2023 05:37
Example .travis.yml for Golang
# use the latest ubuntu environment (18.04) available on travis
dist: bionic
language: go
# You don't need to test on very old versions of the Go compiler. It's the user's
# responsibility to keep their compiler up to date.
go:
- 1.16.x