Skip to content

Instantly share code, notes, and snippets.

Avatar
🏄‍♂️

Seungyoon Lee samsee

🏄‍♂️
View GitHub Profile
@samsee
samsee / apscheduler-sample.py
Created May 10, 2020
Apschedule example for nested job
View apscheduler-sample.py
from apscheduler.schedulers.blocking import BlockingScheduler
from datetime import datetime
# main code
def runner():
print(f'{datetime.now()}:runner')
sched = BlockingScheduler()
View email_notification.py
import smtplib
# 이메일 보내기 : restock
class EmailNotification:
def __init__(self, gmail_user, gmail_password):
self.gmail_user = gmail_user
self.gmail_password = gmail_password
View newstock_coupang_parts.py
def coupang_check(res):
soup = BeautifulSoup(res.text, 'html.parser')
stock_div = soup.find(find('div', class_='prod-not-find-known__buy__button')
if stock_div.text == "품절":
return False
return True
@samsee
samsee / newstock_parts.py
Last active Mar 1, 2020
restock_bot_parts
View newstock_parts.py
def elvst_check(res):
soup = BeautifulSoup(res.text, 'html.parser')
stock_a = soup.find("a", class_="btn_dshop buying position_top")
if stock_a == None:
return False
return True
@samsee
samsee / page_turner.py
Created Dec 22, 2019
Auto PageDown Python script
View page_turner.py
from pynput.keyboard import Key, Controller
from time import sleep
keyboard = Controller()
sleep(5)
while(True):
keyboard.press(Key.page_down)
keyboard.release(Key.page_down)
@samsee
samsee / config.ini
Last active Oct 4, 2021
Restock Check Bot
View config.ini
[DEFAULT]
INTERVAL_MINS = 5
[TELEGRAM]
TOKEN = ***
RECEIVER_ID = ###
View hello.py
print('just a simple test')
View django-react-debian.yml
---
- hosts: localhost
become: true
tasks:
- name: Install basic packages
apt:
name: ['curl', 'apt-transport-https']
state: present
force: yes
- name: Install Python3.4
View MavenUberJar.xml
<!-- 의존성 jar를 포함하여 빌드 -->
<properties>
<main.class>YourMainClass</main.class> <!-- jar 실행할 메인 클래스 -->
</properties>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
View ParameterizedTest.java
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import java.util.Arrays;
import java.util.Collection;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;