Skip to content

Instantly share code, notes, and snippets.

View morisono's full-sized avatar

morisono

View GitHub Profile
@morisono
morisono / monte_carlo_tree_search.py
Created September 25, 2024 15:20 — forked from qpwo/monte_carlo_tree_search.py
Monte Carlo tree search (MCTS) minimal implementation in Python 3, with a tic-tac-toe example gameplay
"""
A minimal implementation of Monte Carlo tree search (MCTS) in Python 3
Luke Harold Miles, July 2019, Public Domain Dedication
See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search
https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1
"""
from abc import ABC, abstractmethod
from collections import defaultdict
import math
@morisono
morisono / fedora-autorestic.md
Created November 3, 2024 11:21 — forked from marcan/fedora-autorestic.md
Setting up autorestic on Fedora (Asahi) for automated backups with btrfs
  • Install restic and autorestic
  • sudo mkdir -p /var/cache/restic
  • Set up /etc/autorestic.yml roughly as follows:
backends:
    mybackend:
        # Your backend options here, see the documentation
global:
    all:
        cache-dir: /var/cache/restic

How to start Hugo site

Clone Template and Setup Git

❯ git clone https://github.com/adityatelange/hugo-PaperMod mysite --depth=1
Cloning into 'mysite'...
remote: Enumerating objects: 139, done.
remote: Counting objects: 100% (139/139), done.
remote: Compressing objects: 100% (100/100), done.
remote: Total 139 (delta 38), reused 126 (delta 34), pack-reused 0 (from 0)

Notes for Dive Into Design Patterns

Pillars of OOP

  • Abstraction
  • Polymorphism
  • Encapsulation
  • Inheritance

Relations Between Objects

あなたのプロジェクトに Frontend Ops を。

現状

  • Full Plan: 1ヶ月 120万
    • 秘密保持契約を行い、ソースコードを分析し、改善を行います
    • 現在受付可能なのは、1月以降です
    • 調査費用は50万~になります
  • Lightweight Plan: 外部計測のみ 50万
  • 秘密保持契約抜きで外部からの監視を行います
@morisono
morisono / backup-github.sh
Created January 12, 2025 07:11 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
#-------------------------------------------------------------------------------
# NOTES:
#-------------------------------------------------------------------------------
# * Under the heading "CONFIG" below you'll find a number of configuration
# parameters that must be personalized for your GitHub account and org.
# Replace the `<CHANGE-ME>` strings with the value described in the comments
# (or overwrite those values at run-time by providing environment variables).
@morisono
morisono / conventional-commits-cheatsheet.md
Created January 13, 2025 22:37 — forked from qoomon/conventional-commits-cheatsheet.md
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@morisono
morisono / backend-setup.md
Created January 20, 2025 08:27 — forked from ali-aka-ahmed/backend-setup.md
Backend Setup Instructions

Backend Setup Instructions

Use this guide to setup the backend for this project.

It uses Supabase, Drizzle ORM, and Server Actions.

Write the complete code for every step. Do not get lazy. Write everything that is needed.

Your goal is to completely finish the backend setup.

@morisono
morisono / 0.README.md
Created January 23, 2025 13:51 — forked from agentcooper/0.README.md
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

@morisono
morisono / cut_silence.py
Created January 25, 2025 21:31 — forked from vivekhaldar/cut_silence.py
Python script to cut out silent parts from a video. Uses moviepy.
#!/usr/bin/env python
#
# Based on a script by Donald Feury
# https://gitlab.com/dak425/scripts/-/blob/master/trim_silenceV2
# https://youtu.be/ak52RXKfDw8
import math
import sys
import subprocess
import os