Skip to content

Instantly share code, notes, and snippets.

View Zeta611's full-sized avatar
๐ŸŽฏ
Focusing

Jay Lee Zeta611

๐ŸŽฏ
Focusing
View GitHub Profile
@chwnam
chwnam / kt_starbucks_2019.py
Last active March 29, 2025 05:16
์Šคํƒ€๋ฒ…์Šค ์™€์ดํŒŒ์ด ์ž๋™ ์ธ์ฆ ํŒŒ์ด์ฌ3 ์Šคํฌ๋ฆฝํŠธ
#!/usr/bin/env python3
import time
from http.cookiejar import Cookie
from re import search, findall
from urllib.parse import urlencode
from urllib.request import (
HTTPCookieProcessor,
HTTPRedirectHandler,
Request,
@chriseidhof
chriseidhof / RemoteValue.swift
Created June 28, 2019 10:27
Custom Lazy Loading
import Foundation
import SwiftUI
import Combine
import TinyNetworking
final class RemoteValue<A>: BindableObject {
let didChange = MyPublisher()
let endpoint: Endpoint<A>
var value: A? {
didSet {
@mikelane
mikelane / game_of_life.py
Last active March 21, 2022 22:52
Conway's Game of Life implemented using a 2d convolution.
import click
import difflib
import numpy as np
import random
import sys
import time
from os import name, system
from scipy.ndimage import convolve
@marcwjj
marcwjj / mosh-setup-guide.md
Last active February 19, 2025 05:35
Step by step guide to setup mosh ssh client to Google Cloud VM instance

A beginner's guide to setup Mosh roaming terminal on Mac to access Google Cloud Compute Engine instance

Being new to training ML models using Google Cloud VM instances, I faced issues where my ssh connection to the cloud instance (using either the clound web-based ssh client or using cloud shell) would disconnect from time to time (for example when I power off my laptop or the network gets disconnected) which would terminate the model training process. Therefore I searched for a ssh client that can handle disconnection and can resume connection without disrupting the process running on the server and came across with Mosh mobile shell, a remote terminal app that supports roaming.

It took me a while to figure out how to set up a third party ssh terminal using the google cloud OAuth. Here's a step-by-step guide:

Update: a simpler alternative for persisting remote sessions

Since this writing, another Mosh user kindly advised me that using terminal multiplexer co

@rudolfratusinski
rudolfratusinski / parallels_tools_ubuntu_new_kernel_fix.md
Last active November 24, 2024 02:13
Parallels Tools fix for Ubuntu 18.04 and other Linux distributions with Kernel version >= 4.15

Preparation

  • In open Ubuntu 18.04 machine click Parallels Actions -> "Install Parallels Tools"

  • A "Parallels Tools" CD will popup on your Ubuntu desktop.

  • Open it by double mouse click, copy all the content to a new, empty directory on a desktop, name it for e.g. "parallels_fixed"

  • Open terminal, change directory to parallels_fixed (cd ~/Desktop/parallels_fixed)

  • Make command line installer executable (chmod +x install)

  • Change directory to "installer" (cd installer)

  • Make few other scripts executable: chmod +x installer.* *.sh prl_*

@jdhao
jdhao / resize_and_pad_image_to_square
Last active June 15, 2023 04:12
this script will resize and pad an image to desired square size and keep its aspect ratio unchanged. Before running the script, please change the size and image path to valid value.
from PIL import Image, ImageOps
import cv2
desired_size = 368
im_pth = "/home/jdhao/test.jpg"
# im = Image.open(im_pth)
# old_size = im.size # old_size[0] is in (width, height) format
# ratio = float(desired_size)/max(old_size)
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 26, 2025 14:47
Swift Concurrency Manifesto
@ncrash
ncrash / Brewfile
Last active January 30, 2025 08:24
๋งฅ ์‹ ๊ทœ ์…‹ํŒ…ํ• ๋•Œ ์‚ฌ์šฉํ•˜๋Š” Brewfile, 2๋ฒˆ์งธ Brewfile ํŒŒ์ผ์€ ๋งฅ์•ฑ์Šคํ† ์–ด ํ•œ๊ตญ๊ณ„์ •์— ๊ตฌ์ž…์ด๋ ฅ์ด ์žˆ๋Š” ํ”„๋กœ๊ทธ๋žจ ์„ค์น˜, Brewfile - https://github.com/Homebrew/homebrew-bundle ๋งํฌ์ฐธ๊ณ 
# tap brew
tap "homebrew/bundle"
tap "homebrew/services"
tap "hashicorp/tap"
# need to check
#tap "homebrew/cask-versions"
#tap "homebrew/cask-fonts"
tap "buo/cask-upgrade"
@lattner
lattner / async_swift_proposal.md
Last active December 28, 2024 11:11 — forked from oleganza/async_swift_proposal.md
Concrete proposal for async semantics in Swift

Async/Await for Swift

Introduction

Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.

This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.

@xnuk
xnuk / hyeong.md
Last active April 23, 2025 10:14
๋‚œํ•ดํ•œ ํ˜€์—‰.... ์–ธ์–ด

๋‚œํ•ดํ•œ ํ˜€์—‰... ์–ธ์–ด v0.4.5

  • โ€ฆ(U+2026), โ‹ฏ(U+22EF), โ‹ฎ(U+22EE)๋Š” ๋ชจ๋‘ .(U+002E)๊ฐ€ 3๋ฒˆ ์—ฐ์†์œผ๋กœ ๋‚˜์—ด๋œ ๊ฒƒ๊ณผ ๊ฐ™์€ ๊ฒƒ์œผ๋กœ ๋ด…๋‹ˆ๋‹ค.
  • "ํ•œ๊ธ€ ์Œ์ ˆ ๋ฌธ์ž"๋Š” ๊ฐ€(U+AC00) ์ด์ƒ ํžฃ(U+D7A3) ์ดํ•˜์˜ ์œ ๋‹ˆ์ฝ”๋“œ ๋ฌธ์ž๋“ค์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.

์Šคํƒ