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
public class ManualBallsGenerator {
Scanner scanner;
public ManualBallsGenerator() {
this.scanner = new Scanner(System.in);
}
public BaseBalls generate() {
System.out.println("์ˆซ์ž 3๊ฐœ ์ž…๋ ฅ");
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();')
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) {
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: quickstart
spec:
version: 7.6.2
podTemplate:
spec:
containers:
- name: kibana
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: quickstart
spec:
version: 7.6.2
nodeSets:
- name: default
count: 1
config:
@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)
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
#!/usr/bin/env python
import flask
from flask import request, jsonify
from os import path, environ
from raven.contrib.flask import Sentry
import cv2
import numpy as np
import requests
import sys , os
sys.path.append(os.pardir)
from dataset.mnist import load_mnist
from common.functions import sigmoid, softmax, np
def get_data():
(x_train, t_train), (x_test, t_test)=\
load_mnist(normalize=True, flatten=True, one_hot_label=True)
return x_train, t_train
# ํ•œ ์ค„ ์งœ๋ฆฌ ์†”๋ฃจ์…˜ ํ•ด์„
def solution(t, l = []):
if not t: # ํƒˆ์ถœ ์กฐ๊ฑด. ์‚ผ๊ฐํ˜•์„ ์ „๋ถ€ ์†Œ๋ชจํ•œ๋‹ค.
return max(l)
result = []
for x, y, z in zip([0]+l, l+[0], t[0]): # [0] + l = 0 ๋”ํ•˜๊ธฐ ๋ฆฌ์ŠคํŠธ
# zip ์€ ๋ฆฌ์ŠคํŠธ๋ฅผ n ๊ฐœ ๋ฐ›์•„์„œ ๊ฐ ๋ฆฌ์ŠคํŠธ ๋งˆ๋‹ค foreach ๋ฅผ ๋Œ์•„์ค˜์š”
# for a, b, c in zip(A, B, C) ์ด๋ฉด a ๋Š” A์˜ ์š”์†Œ, b ๋Š” B์˜ ์š”์†Œ, c ๋Š” C์˜ ์š”์†Œ
result.append(max(x, y) + z) # result ์— ํ•˜๋‚˜์”ฉ ๋”ํ•จ