This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/hanyul/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
T = int(input()) | |
for _ in range(T): | |
x1, y1, r1, x2, y2, r2 = list(map(int, input().split())) | |
dist = (x2-x1) * (x2-x1)+(y2-y1) * (y2-y1) | |
rd = (r2-r1) * (r2-r1) | |
rs = (r2+r1) * (r2+r1) | |
C = "0" | |
if dist == 0 and rd == 0: | |
C = "-1" | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def myround(x, prec=2, base=.05): | |
return round(base * round(float(x)/base), prec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func round(num float64) int { | |
return int(num + math.Copysign(0.5, num)) | |
} | |
func floatRound(num float64, precision int) float64 { | |
output := math.Pow(10, float64(precision)) | |
return float64(round(num * output)) / output | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getWeekOfMonth(date) { | |
let adjustedDate = date.getDate()+date.getDay(); | |
let prefixes = ['0', '1', '2', '3', '4', '5']; | |
return (parseInt(prefixes[0 | adjustedDate / 7])+1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date.prototype.getWeek = function (dowOffset) { | |
/*getWeek() was developed by Nick Baicoianu at MeanFreePath: http://www.meanfreepath.com */ | |
dowOffset = typeof(dowOffset) == 'number' ? dowOffset : 0; //default dowOffset to zero | |
var newYear = new Date(this.getFullYear(),0,1); | |
var day = newYear.getDay() - dowOffset; //the day of week the year begins on | |
day = (day >= 0 ? day : day + 7); | |
var daynum = Math.floor((this.getTime() - newYear.getTime() - | |
(this.getTimezoneOffset()-newYear.getTimezoneOffset())*60000)/86400000) + 1; | |
var weeknum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getWeekOfMonth(date) { | |
let adjustedDate = date.getDate()+date.getDay(); | |
let prefixes = ['0', '1', '2', '3', '4', '5']; | |
return (parseInt(prefixes[0 | adjustedDate / 7])+1); | |
} | |
function getDateOfWeek(w, y) { | |
var d = (1 + (w - 1) * 7); // 1st of January + 7 days for each week | |
return new Date(y, 0, d); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{'_id': '냉동생지', 'rank': 15915.9}, | |
{'_id': '크로와상생지', 'rank': 8822.0}, | |
{'_id': '화이트데이', 'rank': 7827.0}, | |
{'_id': '프렌치토스트', 'rank': 6088.5}, | |
{'_id': '에어프라이어요리', 'rank': 4622.8}, | |
{'_id': '생지', 'rank': 2737.6}, | |
{'_id': '빵', 'rank': 2567.5}, | |
{'_id': '크로와상냉동생지', 'rank': 1915.8}, | |
{'_id': '타피오카펄', 'rank': 1765.8}, | |
{'_id': '식빵요리', 'rank': 1708.1}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"origin_tag": "마카롱", | |
"hashtag": "하트케이크", | |
"likes": 559, | |
"comments": 3, | |
"crawling_time": "2020-03-15T18:30:00.000Z" | |
}, | |
{ | |
"origin_tag": "마카롱", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"연관키워드": "화이트데이", | |
"월간검색수_모바일": 1351800 | |
}, | |
{ | |
"연관키워드": "달고나커피", | |
"월간검색수_모바일": 1053600 | |
}, | |
{ |
NewerOlder