Skip to content

Instantly share code, notes, and snippets.

Dorukcan Kişin dorukcan

  • İstanbul
Block or report user

Report or block dorukcan

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
dorukcan /
Last active Jul 21, 2019
dummy pip freeze (so dummy that i didn't simplify the main loop, but it haz cool commentz lol)
import os
import re
from collections import Counter
def main():
result = []
# folder for starting scrape
start_folder = r"/Users/doruk/PycharmProjects/venus"
dorukcan / sort_elements.js
Last active Jun 18, 2019
sort elements in a block with descending order
View sort_elements.js
var container = document.querySelector('#gwt-debug-logGroupTable tbody');
var items = Array.from(container.querySelectorAll("tr"));
var sortable = (item) => {
var sortKey = new Date(item.querySelector("td:last-child").textContent);
return sortKey.getTime();
items = items.sort((a, b) => {return sortable(a) == sortable(b) ? 0 : (sortable(a) < sortable(b) ? 1 : -1)});
container.innerHTML = => item.outerHTML).join("");
View yemeksepeti_parse_orders.js
function loadOrders() {
var pageNum = 0;
function loadPage() {
setTimeout(() => {
if (pageNum > 50) {
} else {
View horizontal_line.js
var horizontal_line = document.createElement('div');
horizontal_line.setAttribute('style', `
position: absolute;
left: 0px;
top: 0;
width: 1px;
height: 100%;
background-color: red;
z-index: 999999;
dorukcan / twitch_chat_badge.js
Created Mar 13, 2019
hide non-badged chat comments
View twitch_chat_badge.js
function handle_chat() {
Array.from(document.querySelectorAll('.video-chat__message-list-wrapper li')).filter(x => {
return x.querySelectorAll('[data-a-target="chat-badge"]').length === 0;
}).forEach(x => {
x.setAttribute('style', 'display: none');
function start_observation() {
// Select the node that will be observed for mutations
def make_turkish(text, encode=False):
Transforms a broken text to nice unicode equivalent.
:param text: Text to modify
:param encode: Boolean value indicates that whether encode the text to utf-8 or not
:return: Modified text
if not text:
dorukcan /
Created Oct 20, 2015
creates a podcast feed file for using in beyondpod podcast application
import urllib2
import re
from BeautifulSoup import BeautifulSoup
from feedgen.feed import FeedGenerator
DIZI_TITLE = "Six Feet Under"
def downloadUrl(url):
def multiply_(num1, num2):
lines = []
len1 = len(num1)
len2 = len(num2)
for indice2 in range(0, len2):
line = ""
transfer = 0
for indice1 in range(0, len1):
View movielens.sql
-- fill empty values with null
UPDATE movielens.movies
SET genres = NULL
WHERE genres = '(no genres listed)';
-- combine all tables into one table
WITH _movies AS (
View laptop_temperature.bat
@echo off
for /f "skip=1 tokens=2 delims==" %%A in ('wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature /value') do set /a "HunDegCel=(%%~A*10)-27315"
echo %HunDegCel:~0,-2%.%HunDegCel:~-2% Degrees Celsius
You can’t perform that action at this time.