Skip to content

Instantly share code, notes, and snippets.

View Avantgarde95's full-sized avatar
😺
Working

Hunmin Park Avantgarde95

😺
Working
View GitHub Profile
@Avantgarde95
Avantgarde95 / extractmyworks.py
Last active December 11, 2021 22:44
Tmax weekly 추출 스크립트
'''지정한 폴더의 weekly .md 파일들에서 사용자가 작성한 부분들을 뽑아내서 한 파일로 만들어줍니다.'''
import glob
import re
import pathlib
def getBasename(path):
'''경로에서 파일 이름만 추출. (a/b/c.md에서 c.md만 추출.)'''
return pathlib.Path(path).name
@Avantgarde95
Avantgarde95 / imdbtest.py
Last active October 29, 2020 02:36
imdbpy test
# pip install imdbpy로 imdbpy 라이브러리 설치해야됨.
# (안 되면 python -m pip install imdbpy)
from imdb import IMDb
def printMovie(movie):
# movie['title']: 제목만, movie['long imdb title']: 연도도 같이.
title = movie['long imdb title']
movieID = movie.movieID
pragma solidity ^0.5.7;
contract BC3D {
// ======================================================
// Types.
struct Project {
bytes32 id;
string name;
string keyword;
@Avantgarde95
Avantgarde95 / happynewyear.js
Created December 31, 2019 14:37
Happy new year 2020!
var w = 31;
var ct = 0;
var ic = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
function rp(s, n) {
var line = "";
var i;
for (i = 0; i < n; i++) {
line += s;
@Avantgarde95
Avantgarde95 / FlyCamera.cs
Created April 12, 2019 08:39 — forked from gunderson/FlyCamera.cs
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
@Avantgarde95
Avantgarde95 / chuseok.cpp
Created September 26, 2018 21:07
Chuseok
#include <iostream>
#include <string>
#include <vector>
#include <chrono>
#include <thread>
#include <cmath>
template<typename T>
int cut(T value, int bottom, int top) {
int intValue = static_cast<int>(value);
@Avantgarde95
Avantgarde95 / tree-output.txt
Created March 28, 2018 05:02
CopyTree (Copyable tree implementation)
Original:
A: (0, 0, 0)
|-B: (0, 0, 0)
|-D: (0, 0, 0)
|-F: (1, 0, 0)
|-G: (2, 0, 0)
|-E: (0, 0, 0)
|-C: (0, 0, 0)
|-H: (0, 1, 0)
|-I: (0, 2, 0)
@Avantgarde95
Avantgarde95 / eigen_2.py
Created January 16, 2018 07:54
Eigenvalue of 2-dimensional matrix (in python)
import math
# =============================================================
# 2-dimensional matrix
class Matrix:
"""| 1 2 | -> Matrix([1, 2, 3, 4])
| 3 4 |
"""
def __init__(self, elems):
@Avantgarde95
Avantgarde95 / 2018.py
Last active January 11, 2024 19:14
cs1robots 2018
import cs1robots as cs
import time
# patch some methods
def add_beeper(self, av, st, num=None):
if num is None:
self.beepers[(av, st)] = 1
else:
self.beepers[(av, st)] = num
@Avantgarde95
Avantgarde95 / star.py
Created November 24, 2017 11:54
Drawing stars on GUI
import sys
py_major, py_minor = sys.version_info[:2]
if py_major <= 2:
import Tkinter as tk
else:
import tkinter as tk
data_star = '''