Skip to content

Instantly share code, notes, and snippets.

View hanjae-jea's full-sized avatar

Hanjae hanjae-jea

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie-edge">
<title>Document</title>
<style>
main .gnb{
import pygame
import time
clock = pygame.time.Clock()
pygame.init()
screen = pygame.display.set_mode((400,400))
done = False
x=0
y=0
g=200
h=200
@hanjae-jea
hanjae-jea / 1-1.py
Last active November 6, 2018 14:56
LR 과제
# Define linear regression function
# You may use sklearn.linear_model.LinearRegression
# Your code here
def LinReg(X, y):
r = LinearRegression()
return r.fit(X, y)
# End your code
# Basic settings. DO NOT MODIFY
selected_feature = []
class A():
attr = "Cls attr"
instance1 = A()
instance2 = A()
print("I1 attr", instance1.attr)
instance2.attr = "New Attr"
print("I2 attr", instance2.attr)
print("I1 attr", instance1.attr)
A.attr = "New Cls"
import java.util.Scanner;
public class LuxuryHelloJava {
static char k;
static int number;
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("입력하고싶은 문자는?");
k = input.nextLine().charAt(0);
@hanjae-jea
hanjae-jea / cowjump.cpp
Created April 1, 2019 17:40
USACO 2019 Silver Open #2 Cowjump implementation with Shamos-Hoey algorithm.
#include <stdio.h>
#include <algorithm>
#include <queue>
#include <set>
typedef struct point {
long long x, y;
int num;
bool lr;
class Node:
def __init__(self, value):
self.value = value
self.left = None
self.right = None
class Tree:
def __init__(self):
self.root = None
#include <stdio.h>
int nt[100005], team[100005], n;
int start, dap;
void visit(int v){
int next = nt[v];
team[v] = -start;
if( team[next] == 0 ){
visit(next);
if( team[next] == 1 && dap > 0 ){
team[v] = 1;
@hanjae-jea
hanjae-jea / 2289.cpp
Created September 17, 2019 16:05
현영
#include <stdio.h>
int arr[80000];
int building[80000];
int index[80000];
int result[80000];
int main()
{
int n;
@hanjae-jea
hanjae-jea / 2289.cpp
Created September 17, 2019 16:05
현영
#include <stdio.h>
int arr[80000];
int building[80000];
int index[80000];
int result[80000];
int main()
{
int n;