Skip to content

Instantly share code, notes, and snippets.

View cyberhoon's full-sized avatar

cyberhoon cyberhoon

  • Seoul, South Korea
View GitHub Profile
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@SDuck4
SDuck4 / DateProgress.js
Last active November 3, 2023 12:19
Date Progress - Progress bar widget for days, weeks, months and years
/**
* Date Progress - Progress bar widget for days, weeks, months and years
* - This widget run by Scriptable(https://scriptable.app).
* - This widget is optimized for 4x2 size.
* - Author: SDuck (https://twitter.com/sduck4)
* - Source: https://gist.github.com/SDuck4/a655230ec214083e432566a84e24c5f8
*
* Parameters:
* - Each parameter is separated by `|`(vertical bar) and must be entered in the following order.
* - If you do not use the parameters, you can skip them.
@plumhj
plumhj / lib.rs
Last active January 4, 2025 02:23
use std::thread;
use std::sync::mpsc;
use std::sync::Arc;
use std::sync::Mutex;
enum Message {
NewJob(Job),
Terminate,
}
@serithemage
serithemage / AWSSecurityContents.md
Last active July 24, 2025 04:30
AWS 보안 관련 자료 모음집

AWS 학습 링크집 시리즈

/*
* fen.c
*
* cc fen.c -o fen
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@Accalmie
Accalmie / winsock_sniffer.c
Created October 17, 2015 16:32
Winsock Sniffer code in C
/*
Simple Sniffer in winsock
Author : Silver Moon ( m00n.silv3r@gmail.com )
*/
#include "stdio.h"
#include "winsock2.h"
#pragma comment(lib,"ws2_32.lib") //For winsock
@surinkim
surinkim / AudioWrapper.cpp
Last active February 20, 2018 01:58
xp audio handling
#include "AudioWrapper.h"
#include <QSysInfo>
#include <QCoreApplication>
AudioWrapper::AudioWrapper(void)
: m_isVistaLater( false )
, m_curPid( 0 )
{
CoInitialize( NULL );
@phansson
phansson / watchdir.c
Created August 9, 2015 16:20
Solaris File Events Notification working example
/* ************************************************************************
* watchdir.c
*
* watchdir uses Solaris' File Event Notification system to monitor
* a directory for changes. It is in this respect similar in use case
* to Linux's inotify-tools.
*
* This method of monitoring a directory is far superior to any
* alternative that would probably use looping and some sort of polling.
*
@ssgkd
ssgkd / setup.py
Last active October 4, 2015 05:16
from cx_Freeze import setup,Executable
setup(
name = "sqrt",
version="0.1",
description="sqrt",
executables=[Executable("sqrt.py")],
options = {
"build_exe": {
# "includes": includes,
@tj
tj / some.sh
Created October 11, 2012 18:45
change terminal tab name on cd
function tabname {
printf "\e]1;$1\a"
}
if [ x`type -t cd` == "xfunction" ]; then
# previously wrapped cd
eval $(type cd | grep -v 'cd is a function' | sed 's/^cd/original_cd/' | sed 's/^}/;}/' )
else
# builtin
eval "original_cd() { builtin cd \$*; }"