Skip to content

Instantly share code, notes, and snippets.

View siayi's full-sized avatar
💭
I may be slow to respond.

Ayi Sumarna siayi

💭
I may be slow to respond.
View GitHub Profile
@siayi
siayi / getSongFromYoutube.py
Created October 28, 2021 05:38 — forked from beantowel/getSongFromYoutube.py
script for downloading MTG-QBH dataset collection
import os
import click
import re
import csv
import numpy as np
from selenium import webdriver
from bs4 import BeautifulSoup
from urllib.parse import quote_plus
YOUTUBE_QUERY = 'https://www.youtube.com/results?search_query='
# Copyright (c) 2021. THIS SOURCE CODE BELONGS TO WB&C/SMARTEEZ INC. ANY OUTSIDER REPLICATION OF IT IS LEGALLY PERSECUTED.
# _______ ________ ________ _______ ________ ________
# |\ ___ \ |\ ___ \|\ ___ \|\ ___ \ |\ ____\|\ __ \
# \ \ __/|\ \ \\ \ \ \ \_|\ \ \ __/|\ \ \___|\ \ \|\ \
# \ \ \_|/_\ \ \\ \ \ \ \ \\ \ \ \_|/_\ \_____ \ \ __ \
# \ \ \_|\ \ \ \\ \ \ \ \_\\ \ \ \_|\ \|____|\ \ \ \ \ \
# \ \_______\ \__\\ \__\ \_______\ \_______\____\_\ \ \__\ \__\
# \|_______|\|__| \|__|\|_______|\|_______|\_________\|__|\|__|
# \|_________|
#
@siayi
siayi / AbstractBasePage.py
Created October 28, 2021 05:44 — forked from Asad-Khan-Aasanjobs/AbstractBasePage.py
Get element logic for selenium script
"""
__________________________________________________
Base Page that provides basic page functionality
Positional arguments:
Selenium webdriver instance.
__________________________________________________
"""
from bs4 import BeautifulSoup
from random import randint
# https://github.com/SeleniumHQ/selenium/blob/trunk/py/selenium/webdriver/support/relative_locator.py
# https://github.com/SeleniumHQ/selenium/blob/4c5b92bac07b17e223917c31caddf7035c120ea7/py/selenium/webdriver/remote/webdriver.py
from selenium import webdriver
import sys
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from time import sleep
import urllib3
import warnings
from selenium.webdriver.support.relative_locator import with_tag_name
import json
import random
import time
import logging
import requests
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
/**
* Google Maps Tile Carver for Photoshop
*
* @description Tiles a photoshop image to create a Custom Map Type for Google Maps API, tested with CS4 and CS5
* @since 2010-09-01
* @author Will James, http://onNYTurf.com (creator)
* @author Curtis Wyatt, http://gocalipso.com/
* @author Nate Bundy, http://www.lemonrage.com/
* @author Uli Schöberl, http://aplusplus.org
*/
@siayi
siayi / get-all-class-id-css-file.md
Last active October 28, 2021 06:53
Getting the names of all classes / ids contained within a css file
  1. Include your css file into any html file.
  2. In console execute the following code:

Array.prototype.forEach.call(document.styleSheets[0].cssRules,function(a){console.log(a.selectorText)})

  1. In the console will be the listing of all css tags used in your stylesheet.
@siayi
siayi / idm.py
Created October 28, 2021 14:07 — forked from kkprakasa/idm.py
#IDM
#!/bin/python3
import urllib3
from bs4 import BeautifulSoup
from time import sleep
import csv
import sys
import json
import ssl
@siayi
siayi / gist:6feed486a73e4b20ea1145540d81af62
Created October 29, 2021 16:07 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@siayi
siayi / Regex-NIK-KTP.md
Last active December 26, 2024 14:55
Penjelasan Regex Nomor NIK KTP

Regex KTP / NIK versi 1 (sederhana):

^\\d{16}$

^ : penanda awal kata

\d{16} : harus matching angka (digit / d) sebanyak 16 buah.

$ : penanda akhir kata