Skip to content

Instantly share code, notes, and snippets.

View dorukcan's full-sized avatar

Dorukcan Kişin dorukcan

View GitHub Profile
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):
@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
; PSI Config File
;
; @category PHP
; @package PSI
; @author Michael Cramer <BigMichi1@users.sourceforge.net>
; @copyright 2009 phpSysInfo
; @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
; @version SVN: $Id: phpsysinfo.ini.new 705 2012-11-11 00:33:29Z namiltd $
; @link http://phpsysinfo.sourceforge.net
eksisozluk.com###videos
dizipub.com###video-oncesi
trakt.tv###huckster-desktop-wrapper
trakt.tv###charts-wrapper
trakt.tv###network-wrapper
trakt.tv###main-search
trakt.tv##a[href="/users/justkilled/year/*"] > .btn-dashboard.btn
trakt.tv##.stats-wrapper
@dorukcan
dorukcan / CSV-Javascript.csv.js
Created December 23, 2017 13:45
intellij data extractor sqlite to mysql (for timestamps)
function eachWithIdx(iterable, f) {
var i = iterable.iterator();
var idx = 0;
while (i.hasNext()) f(i.next(), idx++);
}
function mapEach(iterable, f) {
var vs = [];
eachWithIdx(iterable, function (i) {
vs.push(f(i));
@dorukcan
dorukcan / c0l0r.js
Last active December 14, 2017 10:03
if (!String.prototype.format) {
String.prototype.format = function () {
var args = arguments;
if (typeof arguments[0] === "object" && arguments.length === 1) {
args = arguments[0];
}
return this.replace(/{(\d+)}/g, function (match, index) {
return typeof args[index] !== 'undefined'
@dorukcan
dorukcan / bcp.py
Last active November 6, 2017 10:21
A simple clone of Boun Course Planner
# -*- coding: utf-8 -*-
import datetime
import re
import requests
from bs4 import BeautifulSoup
from sqlalchemy import *
"""
Güney Kampüs
var COURSES = [
["EC", "101", "09", "N", null],
["TK", "221", "51", "C", null],
["LIT", "211", "02", "N", null],
["MATH", "102", "01", "N", "MATH102 F"],
["PHYS", "102", "01", "N", "PHYS102 F"],
["FA", "48P", "01", "N", "PHYS125 F"],
];
for (i = 0; i < COURSES.length; i++) {
var alphabet = "ABCDEFGHIJKLMONPQRSTUVWXYZ ",
target = "METHINKS IT IS LIKE A WEASEL",
i, score = 0, copies, gen = 0, child = "";
String.prototype.replaceAt = function(index, character) {
return this.substr(0, index) + character + this.substr(index+1);
}
String.prototype.shuffle = function() {
var i = this.length, j, temp = this;
@dorukcan
dorukcan / sqldmp_windows.bat
Created August 11, 2017 14:58
sql dump scripts
powershell -noexit -executionpolicy bypass -File C:\wamp64\www\url\sqldmp_windows.ps1