Skip to content

Instantly share code, notes, and snippets.

View SeungheonOh's full-sized avatar

SeungheonOh SeungheonOh

View GitHub Profile
[
{
"diff": -0.035623,
"percentchange": -13.11467563975598891126,
"exchangeratedate": "2023-06-10 04:39:23.000000",
"time_stamp": "2023-06-10 04:30:00.000000 +00:00"
},
{
"diff": -0.006496,
"percentchange": -2.33565724517569564545,
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
module Main where
import System.IO
import Data.Aeson
import Data.Aeson.Types
import qualified Data.ByteString.Lazy.UTF8 as BLU
import dearpygui.dearpygui as dpg
def cnter():
state = 0
def inc():
nonlocal state
state = state + 1
def get():
nonlocal state
return state
from dataclasses import dataclass
import csv
@dataclass
class College:
name: str #INSTNM
address: str #ACCREDAGENCY
zip_code: int #ZIP
website: str #INSTURL
tui_in: int #TUITIONFEE_IN
{-# LANGUAGE OverloadedStrings #-}
module Main where
import System.IO
import Control.Applicative hiding (many)
import Control.Monad
import Data.Char
import Data.Text (Text)
import qualified Data.Text as T
@SeungheonOh
SeungheonOh / logger.h
Last active June 27, 2020 04:09
simple logger
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <time.h>
#define __LOG(ll) \
va_list args;\
va_start(args, format);\
_print_log(ll, format, args);\
va_end(args);
@SeungheonOh
SeungheonOh / brainfuck.c
Created May 18, 2020 05:38
brainfuck interpreter
// by SeungheonOh 2020
#include <stdio.h>
#include <stdlib.h>
int main() {
unsigned char heap[30000] = { 0 }, cloop = 0, *ptr = heap;
char doloop = 0, *loops[30000], *loopretp[30000] = { 0 }, *lptr, *innerptr, c;
while(1) {
if(!doloop) scanf("%c", &c);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/epoll.h>
#include <sys/fcntl.h>
#include <netinet/in.h>
@SeungheonOh
SeungheonOh / font-live-reload.diff
Last active February 22, 2020 05:12
St Live font reload patch
diff --git a/st.c b/st.c
index 21c6739..dd3c577 100644
--- a/st.c
+++ b/st.c
@@ -1936,6 +1936,15 @@ strhandle(void)
}
}
return;
+ case 69:
+ if (narg < 2)
@SeungheonOh
SeungheonOh / csv_spliter.go
Last active February 19, 2020 03:02
CSV spliter
package main
import (
"bufio"
"errors"
"fmt"
"os"
"strconv"
"sync"
)