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
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x3F, 16,2); | |
const byte coinPin = 2; | |
const byte buttonPin = 3; | |
const byte motorPin = 6; | |
volatile double lira = 0.00; | |
volatile int paraGeldimi = 0; |
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 certifi | |
import urllib3 | |
url = "http://www.serveraddress.tld/file/to/download.zip" | |
file_name = url.split('/')[-1] | |
http = urllib3.PoolManager( | |
cert_reqs='CERT_REQUIRED', | |
ca_certs=certifi.where() |
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 urllib3 | |
def check_internet_conn(): | |
http = urllib3.PoolManager(timeout=3.0) | |
r = http.request('GET', 'google.com', preload_content=False) | |
code = r.status | |
r.release_conn() | |
if code == 200: | |
return True | |
else: |
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 os | |
def Is64Windows(): | |
return 'PROGRAMFILES(X86)' in os.environ | |
def GetProgramFiles32(): | |
if Is64Windows(): | |
return os.environ['PROGRAMFILES(X86)'] | |
else: |
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
let filemanager = FileManager.default | |
var isDir : ObjCBool = false | |
let filename = "test" | |
let fileExtension = "txt" | |
var dir = try? filemanager.url(for: .cachesDirectory, in: .userDomainMask, appropriateFor: nil, create: true) | |
dir!.appendPathComponent(filename) |
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 datetime | |
import math | |
import cv2 | |
import numpy as np | |
#global variables | |
width = 0 | |
height = 0 | |
EntranceCounter = 0 | |
ExitCounter = 0 |
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
extension String { | |
// Zamana da çevir | |
func toDate() -> Date { | |
let df = DateFormatter() | |
df.dateFormat = "YYYY/MM/dd HH:mm" | |
if let date = df.date(from: self as String) { | |
return date | |
} else { | |
return df.date(from: "1970/01/01 00:00")! | |
} |
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
extension Date { | |
func hour() -> Int { | |
//Get Hour | |
let calendar = Calendar.current | |
let components = calendar.component(.hour, from: self as Date) | |
let hour = components.hashValue | |
//Return Hour | |
return hour | |
} |
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 UIKit | |
extension UIColor { | |
func fromHex(_ hex : String) -> UIColor { | |
var hexString = hex.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines).uppercased() | |
if hexString.hasPrefix("#") { | |
hexString.remove(at: hexString.startIndex) | |
} |
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
/* | |
* Biga İmam Hatip Ortaokulu | |
* YayaUyaran | |
* | |
* Proje Öğrencileri: | |
* Eslem Sare Kısa | |
* Emine Elif Elgin | |
* | |
* | |
* |
OlderNewer