Skip to content

Instantly share code, notes, and snippets.

View emrebayrm's full-sized avatar
🎯
Focusing

Emre Bayram emrebayrm

🎯
Focusing
View GitHub Profile
@YohanObadia
YohanObadia / knn_impute.py
Last active January 25, 2024 14:23
Imputation of missing values with knn.
import numpy as np
import pandas as pd
from collections import defaultdict
from scipy.stats import hmean
from scipy.spatial.distance import cdist
from scipy import stats
import numbers
def weighted_hamming(data):
@mertcangokgoz
mertcangokgoz / Arch-Linux-Kurulumu
Last active November 9, 2021 10:58
Güncel ArchLinux Kurulumudur.Türkiyedeki Linux sevenler için tekrardan düzenlenmiş versiyonudur.dm-crypt kullanılarak HDD şifreleme imkanı sağlanmıştır UEFI Modu içindir.
# ArchLinux Kurulumu (UEFI ve Şifreli HDD)
# Translated and Modified: (https://gist.github.com/mattiaslundberg/8620837)
# Resmi Kurulum Dokümantasyonu için (https://wiki.archlinux.org/index.php/Installation_Guide)
# Son sürüm iso dosyasını resmi sitesinden indirin https://www.archlinux.org/
# İso kalıbını USB diskimize yazdırıyoruz.
dd if=archlinux.img of=/dev/sdb bs=16M && sync # USB ismi ARCH_2015xx şeklinde olmalı örng: ARCH_201509
# Ardından Secure Boot seçeneği devredışı bırakılmış bir şekilde Boot işlemini gerçekleştirin.
@junfenglx
junfenglx / semaphores.c
Created November 11, 2013 13:12
named semaphores use example.
#include <stdio.h> /* printf() */
#include <stdlib.h> /* exit(), malloc(), free() */
#include <unistd.h>
#include <sys/types.h> /* key_t, sem_t, pid_t */
#include <sys/wait.h>
#include <sys/shm.h> /* shmat(), IPC_RMID */
#include <errno.h> /* errno, ECHILD */
#include <semaphore.h> /* sem_open(), sem_destroy(), sem_wait().. */
#include <fcntl.h> /* O_CREAT, O_EXEC */