Skip to content

Instantly share code, notes, and snippets.

View Cranked's full-sized avatar
💭
I constantly learn without stop

ALİ RIZA ÇELİK Cranked

💭
I constantly learn without stop
  • Kocaeli/Turkey
View GitHub Profile
@Cranked
Cranked / Python,port_tarama,açık_bulma
Created August 23, 2017 16:14
Python'da Basit Port Tarama
#!/usr/bin/env python
#-*-coding:utf-8-*-
import socket
import subprocess
import sys
from datetime import datetime
subprocess.call('clear', shell=True)#Ekranı Temizle
try:
remoteServer = raw_input("Tarama yapılacak siteyi veya İp Adresini Giriniz: ")# Girdi Al
@Cranked
Cranked / Python,Resim Filtreleme
Last active May 22, 2019 11:21
Python Resim Filtreleme
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'image_processing.ui'
#
# Created by: PyQt5 UI code generator 5.5.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from PIL import Image,ImageFilter
@Cranked
Cranked / Converter.java
Created June 26, 2022 10:24
Convert bytes to KB,MB,GB,TB,PB,EB,ZB,YB
public String getFileSize(long size, int round) {
if (size <= 0)
return "0";
final String[] units = new String[]{"B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"};
int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
return String.format("%." + round + "f", size / Math.pow(1024, digitGroups)) + " " + units[digitGroups];
}