Skip to content

Instantly share code, notes, and snippets.

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

Masatora Atarashi MasatoraAtarashi

🏠
Working from home
  • CyberAgent, Inc
  • Tokyo,Japan
View GitHub Profile
# MIT License
# This code will run on VRAM 12GB+ GPU such as T4, RTX 3060
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.document_loaders import PyPDFLoader
from langchain.vectorstores import FAISS
from langchain.chains import RetrievalQA
from langchain.embeddings import HuggingFaceEmbeddings
from langchain.llms.huggingface_pipeline import HuggingFacePipeline
@zonuexe
zonuexe / tadsan-conf-proposal.md
Created May 14, 2023 08:29
カンファレンスのプロポーザルを送るときに考えてること

具体的なプラクティスはさんざんいろんなところに書かれてるので、自分が意識していることだけ書く

  • まず自分が最高のゲストになることを意識する
    • イベントはマーケティングツールではないので、自分がコミュニティの一員になる
      • 最近はYouTubeに動画上がってたりするから当日参加しそこねてもハードルが下がった
      • 全部は見る必要はないが、興味あるテーマのものを当日現場で参加してるつもりで見る
        • どうせ当日参加しても全セッションは見ないからね
        • 発表内容について自分ならどう表現するか批評的に見る
        • よくなかった点があれば自分ならどうしたら繰り返さないかを考える
  • スライドを見るだけでは文脈がわからないので、動画があるものは時間が許す限り動画で見る

[2021-11] メルペイを退職した

このページの概要

  • 2021-11-30、3年半(2018-06 ~ 2021-11)在籍したメルペイを退職した
  • 自分のやったことや思いを残しておく
  • メルペイで仕事をすることを考えている人の参考になればよいと思う

皆の興味のありそうなことを先に

次は?

#include <OWL.h>
#include <Dialog.h>
#include <Button.h>
#define HAIWIDTH (24) //牌の幅(Local)
#define HAIHEIGHT (30) //牌の高さ(Local)
#define STANDARDWIDTH (10*HAIWIDTH+64+192+16) //画面の幅
#define STANDARDHEIGHT (HAIHEIGHT*13+GetSystemMetrics(SM_CYMENU) \
+GetSystemMetrics(SM_CYCAPTION)+GetSystemMetrics(SM_CYBORDER)*2+32)
//画面の高さ
@StevenACoffman
StevenACoffman / opa-vs-casbin.md
Last active April 17, 2025 09:04
OPA vs Casbin

Information in this Gist originally from this github issue, which is outdated.

As @RomanMinkin mentioned, you can also consider Casbin (https://github.com/casbin/casbin). It is the most starred authorization library in Golang. There are several differences between Casbin and OPA.

Feature Casbin OPA
Library or service? Library/Service Library/Service
How to write policy? Two parts: model and policy. Model is general authorization logic. Policy is concrete policy rule. A single part: Rego
RBAC hierarchy Casbin supports role hierarchy (a role can have a sub-role) Role hierarchies can be encoded in data. Also with the new graph.reachable() built-in function queries over those hierarchies are much more feasible now.
RBAC separation of duties Not supported Supported: two roles cannot be assigned together
@slok
slok / pprof.md
Last active April 24, 2025 09:36
Go pprof cheat sheet

Enable profiling

Default http server

import (
    _ "net/http/pprof"
    "net/http"
)
@mpppk
mpppk / clean_architecture.md
Last active April 22, 2025 09:58
クリーンアーキテクチャ完全に理解した

2020/5/31追記: 自分用のメモに書いていたつもりだったのですが、たくさんのスターを頂けてとても嬉しいです。
と同時に、書きかけで中途半端な状態のドキュメントをご覧いただくことになっており、大変心苦しく思っています。

このドキュメントを完成させるために、今後以下のような更新を予定しています。

  • TODO部分を埋める
  • 書籍を基にした理論・原則パートと、実装例パートを分割
    • 現在は4層のレイヤそれぞれごとに原則の確認→実装時の課題リスト→実装例という構成ですが、同じリポジトリへの言及箇所がバラバラになってしまう問題がありました。更新後は、実装時の課題リストを全て洗い出した後にまとめて実装を確認する構成とする予定です。

2021/1/22追記:

@tenpoku1000
tenpoku1000 / AC_2018-12-02_Intel-doc-links.md
Last active December 10, 2024 02:50
インテル関連ドキュメント・リンク集
@d-kuro
d-kuro / git_conflict.md
Created October 18, 2018 12:21
コンフリクトしたときの --theirs と --ours

コンフリクトしたときの --theirs と --ours

よく忘れるやつ

merge

$ git checkout branch_b
$ git merge branch_a
@shortjared
shortjared / list.txt
Last active April 11, 2025 14:12
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com