Skip to content

Instantly share code, notes, and snippets.

View sinancetinkaya's full-sized avatar

Sinan Çetinkaya sinancetinkaya

View GitHub Profile
@sinancetinkaya
sinancetinkaya / makro01.vba
Last active December 16, 2015 12:38
Excel'de ki bir veriyi parçalara bölmek
Private Sub Workbook_SheetChange(ByVal SAYFA As Object, ByVal HUCRE As Range)
Application.EnableEvents = False
'Ayraç olarak boşluk kullandım siz başka birşey kullanabilirsiniz.
ayrac = " "
metin = HUCRE.Text
With HUCRE
ayracpos = InStr(1, metin, ayrac)
kolon = 0
@sinancetinkaya
sinancetinkaya / Privacy Policy for SCTorch.html
Created October 14, 2017 12:25
Privacy Policy for SCTorch
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Sinan Cetinkaya] built the [SCTorch] app as a [open source|] app. This SERVICE is provided by [Sinan Cetinkaya] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my] Service.</p>
<p>If you choose to use [my] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I] collect are used for providing and
improving the Service. [I] will not use or share your information with anyone except as described
Public Col As New Collection
Function Counter(CELL As Range, direction As String)
Dim cell_address As String
cell_address = CELL.Address
new_value = CELL.Value
If cHas(Col, cell_address) Then
arr = cGet(Col, cell_address)
old_value = arr(0)
"""
This code generates m3u file of a soundcloud playlist or a single track
Running example https://repl.it/@bahtsiz_bedevi/soundcloudm3u
"""
import sys
from sclib import SoundcloudAPI, Track, Playlist # pip3 install soundcloud-lib
def main(argv):
try:
@sinancetinkaya
sinancetinkaya / yaziya_cevir.py
Created October 24, 2019 02:03
verilen sayiyi yaziya cevirir
class YaziyaCevir:
def __init__(self):
self.basamaklar = ["", "bin", "milyon", "milyar", "trilyon", "katrilyon"]
self.sayilar = [
["", "bir", "iki", "uc", "dort", "bes", "alti", "yedi", "sekiz", "dokuz"],
["", "on", "yirmi", "otuz", "kirk", "elli", "altmis", "yetmis", "seksen", "doksan"],
["", "yuz", "ikiyuz", "ucyuz", "dortyuz", "besyuz", "altiyuz", "yediyuz", "sekizyuz", "dokuzyuz"],
]
def cevir(self, sayi):
# original code is from https://www.gkbrk.com/2016/08/about-the-whois-protocol/
import socket
from functools import lru_cache
@lru_cache(maxsize=32)
def get_tld_server(tld="com"):
sock = socket.socket()
sock.connect(("whois.iana.org", 43))
sock.send("{}\n".format(tld).encode("utf-8"))
class YaziyaCevir:
def __init__(self):
self.basamaklar = ["", "bin", "milyon", "milyar", "trilyon", "katrilyon"]
self.sayilar = [
["", "bir", "iki", "uc", "dort", "bes", "alti", "yedi", "sekiz", "dokuz"],
["", "on", "yirmi", "otuz", "kirk", "elli", "altmis", "yetmis", "seksen", "doksan"],
["", "yuz", "ikiyuz", "ucyuz", "dortyuz", "besyuz", "altiyuz", "yediyuz", "sekizyuz", "dokuzyuz"],
]
def cevir(self, sayi):
def hesap_makinesi(islem):
sonuc = eval(islem, {"__builtins__": None}, {})
return sonuc
if __name__ == "__main__":
islem = input(u"İşlem? Örnek 2*(10*27)/8 :")
print(u"İşlem sonucu: '{}'".format(hesap_makinesi(islem)))
"""
This code generates m3u file of a soundcloud playlist or a single track
"""
import sys
from sclib import SoundcloudAPI, Track, Playlist # pip3 install soundcloud-lib
def main(argv):
try:
# url = argv[1]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="