Skip to content

Instantly share code, notes, and snippets.

@MuhammetOzturk
MuhammetOzturk / Titanic.csv
Created May 16, 2025 21:12
Titanik veri seti
PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
1 0 3 Braund, Mr. Owen Harris male 22 1 0 A/5 21171 7.25 S
2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Thayer) female 38 1 0 PC 17599 71.2833 C85 C
3 1 3 Heikkinen, Miss. Laina female 26 0 0 STON/O2. 3101282 7.925 S
4 1 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35 1 0 113803 53.1 C123 S
5 0 3 Allen, Mr. William Henry male 35 0 0 373450 8.05 S
6 0 3 Moran, Mr. James male 0 0 330877 8.4583 Q
7 0 1 McCarthy, Mr. Timothy J male 54 0 0 17463 51.8625 E46 S
8 0 3 Palsson, Master. Gosta Leonard male 2 3 1 349909 21.075 S
9 1 3 Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg) female 27 0 2 347742 11.1333 S
@MuhammetOzturk
MuhammetOzturk / battery_checker.py
Last active May 9, 2025 14:22
Arch linux'da hyperland masaüstü için batarya kontrolü yapan script.
import re
import time
import shutil
import schedule
from subprocess import Popen, PIPE
class Battery():
def __init__(self):
self._battery = {}
@MuhammetOzturk
MuhammetOzturk / VimScriptForPythonDevelopers.MD
Created September 10, 2024 21:55 — forked from yegappan/VimScriptForPythonDevelopers.MD
Vim script for Python Developers

Vim Script for Python Developers

This is a guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with Python programming.

For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way

For a guide similar to this one for JavaScript developers, refer to Vim Script for the JavaScripter

This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, [key-mapping](https://vimhelp.org/map.txt.html#key-m

@MuhammetOzturk
MuhammetOzturk / fdisk-subprocess.py
Created April 29, 2024 22:39
fdisk komutunu python ile kullanma
from subprocess import Popen,PIPE
fdiskl = "fdisk -l /home/muhammet/DietPi_RPi-ARMv8-Bookworm.img"
#fdisk -l 8. satirdan itaberen bolum bilgilerini verir.
device_info = Popen(fdiskl , stdout = PIPE, text = True, shell = True).stdout.read().splitlines()[8:]
#Sadece sektor bilgilerini elde ettikten sonra veriyi liste tipinde stringe cevir
@MuhammetOzturk
MuhammetOzturk / arduino.snippets
Created March 27, 2023 21:28
FreeRTOS fonksiyonlari icin hazirladigim snippets ornekleri.
#########################################################################################
# Vim'de ultisnips kullanirken freertos #
# fonksiyonlari icin hazirladigim snippets ornekleri #
# #
# Dokumantasyon: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt #
#########################################################################################
snippet inc "#include " b
#include <$0.h>
endsnippet
@MuhammetOzturk
MuhammetOzturk / Headless raspberry pi.sh
Created December 11, 2022 22:23
Headless Raspberry Pi
#!/bin/bash
IMAGE=$1
BOOT_POINT="/tmp/raspberrypi/boot"
ROOT_POINT="/tmp/raspberrypi/root"
CONNECTION="/etc/NetworkManager/system-connections/*"
mkdir -p $BOOT_POINT
mkdir -p $ROOT_POINT
@MuhammetOzturk
MuhammetOzturk / User Agents.txt
Created December 5, 2022 14:45
Examples of Headers for Scraping Information On the Web
{'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36',
'Accept-Encoding': 'gzip',
'Accept': '*/*',
'Connection': 'keep-alive'}
{'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36',
'Accept-Encoding': 'gzip',
'Accept': '*/*',
'Connection': 'keep-alive'}