Skip to content

Instantly share code, notes, and snippets.

View hanjae-jea's full-sized avatar

Hanjae hanjae-jea

View GitHub Profile
@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;
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);
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"
@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 = []
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
<!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{
from tkinter import *
from tkinter import messagebox
class Person:
def __init__(self, heightV, weightV, nameV):
self.height = heightV
self.weight = weightV
self.name = weightV
self.dist = 0
import smtplib
from email.mime.text import MIMEText
from time import sleep
from selenium import webdriver
smtp = smtplib.SMTP('smtp.gmail.com', 587)
smtp.ehlo()
smtp.starttls()
smtp.login('[email protected]', '')
PLmsg = MIMEText('프언떴다')
PLmsg['Subject'] = '프언떳다'
#include <stdio.h>
int n, arr[1000000], k, str[100000][20], il, iu;
void lower_bound(int left, int right, int number)
{
int mid = (left + right) / 2;
if (left >= right) {
il = left;
return;
#include <stdio.h>
#include <algorithm>
int main()
{
int a[10];
for (int i = 0; i < 10; i++) {
scanf("%d", &a[i]); // scanf("%d", a+i) 랑 같은 코드
}