This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
from urllib.request import urlopen, Request | |
def DolarParse(): | |
pasteURL = "http://tr.investing.com/currencies/usd-try" | |
data = urlopen(Request(pasteURL, headers={'User-Agent': 'Mozilla'})).read() | |
parse = BeautifulSoup(data) | |
for dolar in parse.find_all('span', id="last_last"): | |
liste = list(dolar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function go() { | |
window.frames[0].document.body.innerHTML = '<form target="_parent" method="post" action="http://www.whatismyreferer.com"></form>'; | |
window.frames[0].document.forms[0].submit() | |
} | |
</script> | |
<iframe onload="window.setTimeout('go()', 99)" src="about:blank" style="visibility:hidden"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
#Check root | |
if [ $(id -u) != "0" ]; | |
then | |
echo "Needs to be run by a user with root privilege." | |
exit 1 | |
fi | |
# Check debian packages manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Author Mertcan GOKGOZ - 2016 | |
# Bir sistemdeki tüm yazicilar icin cupsenable komutunun calıstirilmasi | |
set -e | |
YAZICILAR=`lpstat -p | grep printer | grep -v enable | awk '{print $2}' | sed '/^$/d'` | |
if [ "x$YAZICILAR" != "x" ]; then | |
for yaziciadi in $YAZICILAR; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function try() | |
{ | |
[[ $- = *e* ]]; SAVED_OPT_E=$? | |
set +e | |
} | |
function throw() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ajaxGet(url, callback) { | |
$.support.cors = true; | |
$.ajax({ | |
type: 'GET', | |
url: url, | |
dataType: 'json', | |
crossDomain: true, | |
success: function (data) { | |
callback(data); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getUrlVars() { | |
var vars = [], hash; | |
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
for (var i = 0; i < hashes.length; i++) { | |
hash = hashes[i].split('='); | |
vars.push(hash[0]); | |
vars[hash[0]] = hash[1]; | |
} | |
return vars; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--Validation | |
function validatePositiveDecimalsOnly(e) { | |
if (e.keyCode != 46 && e.keyCode > 31 | |
&& (e.keyCode < 48 || e.keyCode > 57)) | |
return false; | |
} | |
function validateNumbersOnly(e) { | |
if ((e.keyCode < 48) || (e.keyCode > 57)) { | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/sh | |
# Mertcan GÖKGÖZ | |
find /var/log/ -name '*-*-*.logptr' -type f -mtime +30 | awk -F/ '{print $6}' | awk -F. '{print $1}' | sort -u > gunler | |
echo "==============================================" | |
echo "Gonderilecek Olan Dosyalar" | |
cat gunler | |
echo "==============================================\n" | |
for gun in `cat gunler` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
file = open('../Data/turkiye_ilceler_12042017.csv') | |
Read = csv.reader(file) | |
Data = list(Read) | |
sql = open('../Data/CityDistrict.sql', 'w') | |
for Read in Data: | |
for i in range(1, 970): |