Skip to content

Instantly share code, notes, and snippets.

👩‍💻
work work work

Dahyun Yu yuda110

👩‍💻
work work work
Block or report user

Report or block yuda110

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yuda110
yuda110 / README-Template.md
Created Dec 3, 2018 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@yuda110
yuda110 / refactoring_coursera_2.py
Created Nov 24, 2018
dateutil.parser 있기 때문에 try/except 문 대신 그냥 import
View refactoring_coursera_2.py
# Not all systems have this so conditionally define parser
try:
import dateutil.parser as parser
except:
pass
#####
from dateutil import parser
# Not all systems have this so conditionally define parser
@yuda110
yuda110 / refactoring_coursera_1.py
Created Nov 24, 2018
사용하지 않는 모듈 import 삭제
View refactoring_coursera_1.py
import sqlite3
import time
import ssl
import urllib.request, urllib.parse, urllib.error
from urllib.parse import urljoin
from urllib.parse import urlparse
import re
from datetime import datetime, timedelta
###
View fibo.py
def fino(n):
a = b
for i in range(n):
yield a
a, b = b, a+b
for x in fibo(100000):
print(x)
View args.py
def foo(*args):
for arg in args:
print(arg)
foo(1, 2, 3, 4)
View editing_codemirror.js
let editor = $('.CodeMirror')[0].CodeMirror;
// 혹은 let editor = CodeMirror.fromTextArea(document.getElementById('code'));
// readonly 부분 정하기
let readOnlyLines = [0, 1];
editor.on('beforeChange', function (cm, change) {
if (~readOnlyLines.indexOf(change.from.line)){
change.cancel();
}
});
View project_euler_56.py
def calc_googol(a_to, b_to):
max_sum = 0
for a in range(1, a_to):
for b in range(1, b_to):
num = a**b
sum_of_digits = sum(int(x) for x in str(num))
if sum_of_digits > max_sum:
max_sum = sum_of_digits
return max_sum
View project_euler_42.py
import string
text = open('./41-50/words.txt', 'r', encoding='utf-8')
def get_nth_triangle_num(n):
triangle_num = int(0.5*n*(n+1))
return triangle_num
def if_alp_triangle_num(alp_string):
triangle_num, cnt = 0, 1
View project_euler_41.py
import itertools
from primesieve import generate_primes
def get_biggest_decimal_pandigital(n):
max_pan = 0
permu_obj = itertools.permutations(range(1, n+1))
for pan in permu_obj:
each_pan = int(''.join(map(str,pan)))
if len(generate_primes(each_pan, each_pan)) > 0 and each_pan > max_pan:
max_pan = each_pan
View level5_change124.py
from itertools import product
def change124(n):
count = 1
digit = 1
while count != n :
for i in product('124', repeat=digit):
cur_num = ''.join(i)
if count == n :
break
You can’t perform that action at this time.