Skip to content

Instantly share code, notes, and snippets.

View aliwo's full-sized avatar
🏠
Working from home

정승원 aliwo

🏠
Working from home
View GitHub Profile
class G:
pending = set()
bombed = 0
board = []
def bomb():
for i, j in reversed(sorted(G.pending)):
G.board[i].pop(j)
G.bombed += 1
@aliwo
aliwo / gangnam.py
Created February 20, 2020 02:27
hello
import winsound
import time
winsound.Beep(293, 200) # D
winsound.Beep(293, 200) # D
winsound.Beep(293, 200) # D
winsound.Beep(293, 600) # D
winsound.Beep(246, 600) # B
time.sleep(0.1)
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: quickstart
spec:
version: 7.6.2
nodeSets:
- name: default
count: 1
config:
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: quickstart
spec:
version: 7.6.2
podTemplate:
spec:
containers:
- name: kibana
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
from flask import Flask
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import time
app = Flask(__name__)
engine = create_engine('mysql+pymysql://root:22380476@localhost/pool?charset=UTF8MB4', pool_recycle=300)
SessionMaker = sessionmaker(bind=engine)
engine.execute('SELECT NOW();')
public class ManualBallsGenerator {
Scanner scanner;
public ManualBallsGenerator() {
this.scanner = new Scanner(System.in);
}
public BaseBalls generate() {
System.out.println("숫자 3개 입력");
from copy import deepcopy
class Num:
def __init__(self, num):
self.num = num
def __repr__(self):
return str(self.num)
@aliwo
aliwo / record.py
Created December 23, 2020 08:04
keyboardinterrupt 로 중간에 멈추는 녹음
import pyaudio
import wave
chunk = 1024 # Record in chunks of 1024 samples
sample_format = pyaudio.paInt16 # 16 bits per sample
channels = 1
fs = 44100 # Record at 44100 samples per second
seconds = 3
filename = "output.wav"
@Getter
@NoArgsConstructor
@Entity
public class User {
@OneToMany(mappedBy = "user", fetch = FetchType.LAZY)
private List<PartyUser> parties = new ArrayList<>();
}