Skip to content

Instantly share code, notes, and snippets.

💭
"Use :octocat: like twitter"

Youngseok Choe 3-24

💭
"Use :octocat: like twitter"
Block or report user

Report or block 3-24

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@3-24
3-24 / tips.md
Created Apr 23, 2020
핀토스 팁 끄적끄적
View tips.md

GDB 사용법

Setup

shell 하나에서 pintos --gdb ~~~ 나머지 shell에서 gdb kernel.otarget remote localhost:1234

Breakpoints

b process.c:345 : process.c의 345번째 줄에 삽입

@3-24
3-24 / randombot.py
Created Mar 28, 2020
디스코드 랜덤봇
View randombot.py
#!/usr/bin/python3
import discord
import random
import os
TOKEN = os.environ["randombot_TOKEN"]
client = discord.Client()
@client.event
async def on_ready():
@3-24
3-24 / change_key.md
Created Aug 16, 2019
ubuntu 한영키 설정
View change_key.md
$ sudo vim /usr/share/X11/xkb/symbols/altwin

에서 symbols[Group1] = [ Alt_R, Meta_R ]의 값을 다음과 같이 바꿔준다:

// Meta is mapped to second level of Alt.
partial modifier_keys
xkb_symbols "meta_alt" {
@3-24
3-24 / change_key.md
Created Aug 16, 2019
ubuntu 한영키 설정
View change_key.md
$ sudo vim /usr/share/X11/xkb/symbols/altwin

에서 symbols[Group1] = [ Alt_R, Meta_R ]의 값을 다음과 같이 바꿔준다:

// Meta is mapped to second level of Alt.
partial modifier_keys
xkb_symbols "meta_alt" {
@3-24
3-24 / change_key.md
Created Aug 16, 2019
ubuntu 한영키 설정
View change_key.md
$ sudo vim /usr/share/X11/xkb/symbols/altwin

에서 symbols[Group1] = [ Alt_R, Meta_R ]의 값을 다음과 같이 바꿔준다:

// Meta is mapped to second level of Alt.
partial modifier_keys
xkb_symbols "meta_alt" {
@3-24
3-24 / change_key.md
Created Aug 16, 2019
ubuntu 한영키 설정
View change_key.md
$ sudo vim /usr/share/X11/xkb/symbols/altwin

에서 symbols[Group1] = [ Alt_R, Meta_R ]의 값을 다음과 같이 바꿔준다:

// Meta is mapped to second level of Alt.
partial modifier_keys
xkb_symbols "meta_alt" {
@3-24
3-24 / feynnman_algorithm.py
Last active Nov 19, 2018
This is variation of Feynnman's problem solving algorithm written in Python. This code requires coffee because I love it. Have FUN!
View feynnman_algorithm.py
##### Feynnman Algorithm #####
# 1. Write down the problem.
# 2. Think real hard.
# 3. Write down the solution.
##############################
class Paper(object):
def __init__(self):
self.s = ""
def write_down(self,string):
self.s += string
@3-24
3-24 / changeTyporaDelimiter.py
Last active Sep 15, 2018
Typora sets the math equations delimiters as ($,$) and ((<p class='md-mathblock>)$,$) for HTML source. This file converts the delimiters to (\( , \)) and ( \[, \] ) to use in Mathjax using in-line inputs and output.txt.
View changeTyporaDelimiter.py
def checkInline(s):
i = 0
while True:
try:
if s[i] == '$':
return i
except IndexError:
return -1
i += 1
@3-24
3-24 / mergesort.py
Last active Sep 13, 2018
user defined list sorting function using divide-and-conquer
View mergesort.py
def merge(X,left,middle,right): #Assume that left and right part are sorted
A=X[left:middle+1]
B=X[middle+1:right+1]
a,b=len(A),len(B)
i,j=0,0 #i for A, j for B
while (i!=a and j!=b): #compare elements of both part until one reaches end
if A[i]<=B[j]: #right one is bigger
X[left+i+j]=A[i] #Modify X i+j th element as left one
i+=1
else:
@3-24
3-24 / 1707.py
Created Sep 13, 2018
Checking Bipartite Graph
View 1707.py
test_nbr = int(input()) # number of test cases
def isBipartite():
# v and e is number of vertexes and edges, respectively.
v,e = map(int,input().split())
# None if not colored
# If colored, there are two bool cases: False and True.
colorArr = [None for _ in range(v+1)]
adjacentPoints = [[] for _ in range(v+1)]
You can’t perform that action at this time.