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
# events.json https://calendar.kakao.com/web/events?from=20230625T000000Z&to=20240624T235959Z&birthday=true&referer=month | |
# friends.json https://calendar.kakao.com/web/talk/friends | |
cal_template = """BEGIN:VCALENDAR | |
PRODID:-//Talk Calendar//iCal4j 2.0//EN | |
VERSION:2.0 | |
CALSCALE:GREGORIAN | |
X-WR-CALNAME: | |
{} | |
END:VCALENDAR |
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
Joplo Bartu | |
From Wikipedia, the free encyclopedia | |
Jump to navigationJump to search | |
Joplo Bartu | |
refer to caption | |
Bartu at University of Phoenix Stadium in 2016 | |
Personal information | |
Born: October 3, 1989 (age 32) | |
Seattle, Washington | |
Height: 6 ft 2 in (1.88 m) |
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
###### | |
# Author: Marcello de Sales ([email protected]) | |
# Description: Create Create Environment Variables in EC2 Hosts from EC2 Host Tags | |
# | |
### Requirements: | |
# * Install jq library (sudo apt-get install -y jq) | |
# * Install the EC2 Instance Metadata Query Tool (http://aws.amazon.com/code/1825) | |
# | |
### Installation: | |
# * Add the Policy EC2:DescribeTags to a User |
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
# examples from https://realpython.com/primer-on-python-decorators/ | |
import time | |
import functools | |
import random | |
######### Common decorators ######### | |
def timer(func): | |
"""Print the runtime of the decorated function""" | |
@functools.wraps(func) | |
def wrapper_timer(*args, **kwargs): |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# @File Name: scrapper.py | |
# @Created: 2020-03-18 02:57:12 Simon Myunggun Seo ([email protected]) | |
# @Updated: 2020-03-18 17:08:14 Simon Seo ([email protected]) | |
import sys, time | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.by import By |
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
import json, codecs | |
input_filename = "message.json" | |
output_filename = "message_new.json" | |
with codecs.open(input_filename, 'r', encoding='utf-8') as infile: | |
with codecs.open(output_filename, 'w', encoding='utf-8') as outfile: | |
json.dump(json.load(infile), outfile, ensure_ascii=False) | |
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
import json, codecs, re | |
from functools import partial | |
input_filename = "message.json" | |
output_filename = "message_new.json" | |
fix_mojibake_escapes = partial( | |
re.compile(rb'\\u00([\da-f]{2})').sub, | |
lambda m: bytes.fromhex(m.group(1).decode())) |
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
# createM3U.py | |
# Creates .m3u from current directory | |
# Dependencies: mutagen | |
# Usage: put this script in a folder that has mp3 files. run in console like so: | |
# $ python3 createM3U.py | |
# or | |
# $ python3 createM3U.py <path to mp3s> | |
from mutagen.id3 import ID3 | |
from mutagen.mp3 import MP3 |