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 pandas as pd | |
# Function to split the DataFrame into smaller DataFrames | |
def split_dataframe(df, chunk_size): | |
return [df[i : i + chunk_size] for i in range(0, df.shape[0], chunk_size)] | |
# Read the Excel file | |
input_file = "input.xlsx" |
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
def split_vcard(file_path, records_per_file): | |
# vCard dosyasını oku | |
with open(file_path, "r", encoding="utf-8") as file: | |
vcard_data = file.read() | |
# vCard'ları ayır | |
vcards = vcard_data.split("END:VCARD") | |
# 'END:VCARD' satırını geri ekle | |
vcards = [vcard + "END:VCARD" for vcard in vcards if vcard.strip()] |
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 pandas as pd | |
# CSV dosyasını oku | |
df = pd.read_csv("in.csv") | |
# DataFrame'i XLSX formatında kaydet | |
df.to_excel("out.xlsx", index=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
# Example usage python3 gazete.py "23 Mayıs 1954" | |
import concurrent.futures | |
import sys | |
import requests | |
gazeteler = [ | |
"agac", | |
"ahali_filibe", |
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 requests | |
import time | |
import argparse | |
parser = argparse.ArgumentParser(description='Site kontrol uygulaması') | |
parser.add_argument('--url', required=True, type=str, help='Kontrol edilecek URL') | |
parser.add_argument('--interval', required=True, type=int, help='Kontrol aralığı (dakika cinsinden)') | |
parser.add_argument('--notify', required=True, type=str, help='Bildirim yapılacak URL') | |
parser.add_argument('--post', type=str, help='POST isteği yapılacak veri') |
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 sys | |
if len(sys.argv) != 3: | |
print("Usage: python script.py BUYUK_DOSYA_ADI SATIR_SAYISI_LIMITI") | |
sys.exit(1) | |
# Komut satırı argümanlarını al | |
buyuk_dosya_adi = sys.argv[1] | |
satir_sayisi_limiti = int(sys.argv[2]) |
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 | |
# Show the list of network interfaces | |
echo "Available network interfaces:" | |
networksetup -listallhardwareports | grep "Hardware Port" | |
# Prompt the user to enter the interface number | |
echo "Enter the number of the interface you want to change (e.g., 1 for en0): " | |
read interface_num |
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 re | |
mext = '' | |
with open('html.txt', 'r') as f: | |
text = f.read() | |
mext = re.sub('<[^<]+?>', '', text) | |
with open('without_html.txt', 'w') as x: |
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
// mkdir program && cd program | |
// touch main.go | |
// paste code to main.go | |
// go build | |
// ./program | |
package main | |
import ( |
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
awesomeWidget(BuildContext context) { | |
var verticalGestures = Factory<VerticalDragGestureRecognizer>(() => VerticalDragGestureRecognizer()); | |
var gestureSet = {verticalGestures}; | |
final Completer<WebViewController> _controller = Completer<WebViewController>(); | |
Future<void> _loadHtmlString(Completer<WebViewController> controller, BuildContext context) async { | |
WebViewController _controller = await controller.future; | |
await _controller.loadHtmlString(webview_content); | |
} |
NewerOlder