Skip to content

Instantly share code, notes, and snippets.

View kimdwkimdw's full-sized avatar
πŸƒβ€β™‚οΈ
Running & Learning

Arthur Kim kimdwkimdw

πŸƒβ€β™‚οΈ
Running & Learning
View GitHub Profile
@epicure
epicure / llama2.html
Created July 26, 2023 17:06
A pure JavaScript port of @karpathy's llama2.c
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
padding: 1em;
}
label, button {
margin: 0.5em;
}
input {
@navsing
navsing / clubhouse.swift
Created February 11, 2021 21:22
Recreating ClubHouse in SwiftUI with Dark Mode
//
// Clubhouse.swift
// Playground
//
// Created by Nav Singh on 2/11/21.
//
import SwiftUI
struct Clubhouse: View {
@gnuton
gnuton / Mixamo.js
Last active January 2, 2025 13:09
Script which downloads all mixamo animations for one character.
// Mixamo Animation downloadeer
//
// Author: Antonio Aloisio <[email protected]>
// Contributions: kriNon
//
// The following script make use of mixamo2 API to download all anims for a single character that you choose.
// The animations are saved with descriptive long names instead of the short ones used by default by mixamo UI.
//
// This script has been written by gnuton@gnuton.org and the author is not responsible of its usage
//
@MrTrustor
MrTrustor / clean-docker-for-mac.sh
Last active November 21, 2023 11:38
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 ThΓ©o Chamley
# 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:
#
# The above copyright notice and this permission notice shall be included in all copies or
@karpathy
karpathy / pg-pong.py
Created May 30, 2016 22:50
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward
@trustin
trustin / smi2ass.py
Last active January 24, 2023 03:25
smi2ass.py - converts a SAMI (.smi) subtitle file to the SubStationAlpha (.ass) format.
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# Note: A newer version of this script is located at https://github.com/trustin/smi2ass
#
# Copyright (C) 2018 Trustin Heuiseung Lee and other contributors
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
@karpathy
karpathy / min-char-rnn.py
Last active April 21, 2025 10:52
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@acuros
acuros / daum.js
Last active July 30, 2018 02:22
Daum Login
var daumlogin = {};
var daum = {}
daum.Browser = {ua:'mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.11 (khtml, like gecko) chrome/23.0.1271.95 safari/537.11'}
daum.Event = {}
daum.Event.addOrderEvent = (function () {
var a = {};
return function (f, e, g, b) {
var h = null,
c, d;
if (!f) {
@lifthrasiir
lifthrasiir / crypto.md
Last active November 14, 2023 07:10
High-level understanding of cryptography

κ³ μˆ˜μ€€μ—μ„œ μ•”ν˜Έν•™ μ΄ν•΄ν•˜κΈ°

이 글은 메아리 저널에 μ“Έ λͺ©μ μœΌλ‘œ ν•œλ™μ•ˆ μž‘μ—…ν•˜λ˜ κΈ€μž…λ‹ˆλ‹€. 메아리 특유의 λ””μžμΈ(...)이 μ‹«λ‹€λ©΄ μ—¬κΈ°λ‘œ λ§ν¬ν•˜μ…”λ„ λ©λ‹ˆλ‹€. μ–΄λŠ μͺ½μ΄λ“ κ°„에 μ˜κ²¬μ€ 이 μ•„λž˜μ˜ μ½”λ©˜νŠΈ λž€ λ˜λŠ” 메아리에 κΈ°μž¬λ˜μ–΄ μžˆλŠ” 메일 μ£Όμ†Œλ₯Ό 써 μ£Όμ‹œλ©΄ κ°μ‚¬ν•˜κ² μŠ΅λ‹ˆλ‹€. --lifthrasiir

μ•”ν˜Έν•™μ„ μ‚¬μš©ν•˜λŠ” λ§Žμ€ μ‹œμŠ€ν…œμ€ μ„ΈλΆ€μ μœΌλ‘œ 무슨 μ•Œκ³ λ¦¬μ¦˜μ„ μ“°λŠ”μ§€λ³΄λ‹€λŠ” κ·Έ μ•Œκ³ λ¦¬μ¦˜λ“€μ΄ μ–΄λ–»κ²Œ μ—°κ²°λ˜μ–΄ μžˆλŠ”μ§€, 즉 ꡬ쑰가 μ‹€μ œ μ•ˆμ „μ„±μ— 더 큰 영ν–₯을 λ―ΈμΉœλ‹€. λ”°λΌμ„œ ꡬ쑰와 κ·Έ ꡬ쑰λ₯Ό μ΄λ£¨λŠ” λΉŒλ”© λΈ”λŸ­μ„ μ•„λŠ” 것이 μ€‘μš”ν•œλ°, μ—¬κΈ°μ—μ„œλŠ” μ΄λŸ¬ν•œ μ•”ν˜Έν•™μ  λΉŒλ”© λΈ”λŸ­κ³Ό ν•¨κ»˜ λΈ”λŸ­λ“€μ΄ μ–΄λ–»κ²Œ μ“°μ—¬μ„œ 더 큰 ꡬ쑰λ₯Ό λ§Œλ“œλŠ”μ§€λ₯Ό μ•Œμ•„ λ³Έλ‹€.

Key Exchange

ν‚€ κ΅ν™˜. 두 μ‚¬λžŒλ§Œμ΄ μ•Œ 수 μžˆλŠ” μƒˆλ‘œμš΄ ν‚€λ₯Ό λ§Œλ“ λ‹€. 이 과정이 λλ‚˜λ„ μƒλŒ€λ°©μ΄ λ‚΄κ°€ μ•„λŠ” μ‚¬λžŒμΈμ§„ μ•Œ 수 μ—†μ§€λ§Œ 적어도 μƒλŒ€λ°©κ³Ό λ‚΄κ°€ 같은 ν‚€λ₯Ό κ°€μ§€κ³  μžˆλ‹€λŠ” 건 ν™•μ‹ ν•  수 μžˆλ‹€.