Skip to content

Instantly share code, notes, and snippets.

nitelikli tembel canerbasaran

Block or report user

Report or block canerbasaran

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
View tone.js
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var HOUR = 1000*60*60;
/**
* Battery logger calculates battery discharge rate at the most opportune moment.
*/
function BatteryLogger() {
// Instantaneous values: is it charging, and the current level.
this.isCharging = true;
this.batteryLevel = -1;
@canerbasaran
canerbasaran / js-rastgele-tc-no.html
Last active Feb 23, 2016
Rastgele TC Kimlik No Üreticisi (javascript)
View js-rastgele-tc-no.html
<!--
Rastgele TC Kimlik No Üreticisi
Random Turkish Identification Number Generator
https: //github.com/CanerBasaran
-->
<html><p id="tc"></p>
<script type="text/javascript">
var tcno = "" + Math.floor(900000001 * Math.random() + 1e8),
list = tcno.split("").map(function(t) {
return parseInt(t, 10)
@canerbasaran
canerbasaran / rasgele-tc-kimlik-no.py
Last active Feb 23, 2016
Rastgele TC Kimlik No Üreticisi
View rasgele-tc-kimlik-no.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 Caner BASARAN
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
from random import randint
@canerbasaran
canerbasaran / vigenere-turkce.py
Created Aug 25, 2013
Türkçe Vigenere Şifreleme
View vigenere-turkce.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Turkce Vigenere Sifreleme
# Copyright 2013 Caner BASARAN
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
HARFLER = u'ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ'
@canerbasaran
canerbasaran / tc-check.py
Last active Feb 23, 2016
Validation of Turkish Identification Number in Python TC Kimlik No Geçerlilik Kontrolü
View tc-check.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2012 Caner BASARAN
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
def turkish_id_no_check(tc_no):
''' turkish_id_no_check(long) -> bool
You can’t perform that action at this time.