Skip to content

Instantly share code, notes, and snippets.

View isezen's full-sized avatar
💭
Working at Çay Bahçesi :)

Ismail SEZEN isezen

💭
Working at Çay Bahçesi :)
View GitHub Profile
@torresashjian
torresashjian / linux-ubuntu-install-wifi-drivers
Last active April 12, 2024 09:07
How to install Broadcom bcm43602 Drivers on Ubuntu Linux
sudo apt-get purge bcmwl-kernel-source
sudo apt update
sudo update-pciids
sudo apt install firmware-b43-installer
sudo reboot #note that this will restart your computer
sudo iwconfig wlp3s0 txpower 10dBm
#sudo iwconfig wlp2s0 txpower 10dBm
@bsodmike
bsodmike / README.md
Last active March 13, 2023 05:04
OC Nvidia GTX1070s in Ubuntu 16.04LTS for Ethereum mining

Following mining and findings performed on EVGA GeForce GTX 1070 SC GAMING Black Edition Graphics Card cards.

First run nvidia-xconfig --enable-all-gpus then set about editing the xorg.conf file to correctly set the Coolbits option.

# /etc/X11/xorg.conf
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
@klmr
klmr / generator.md
Last active August 28, 2022 02:26
Python-like generators in R

A little experiment using restarts.

(And while we’re at it, let’s torture R’s syntax a little.)

![screenshot][]

In the following we will be using R’s “restarts” feature to implement the state machine that drives generators in languages such as Python. Generators allow lazily generating values on demand: a consumer invokes a generator, and consumes values as they are produced. A new value is only produced once the previous one has been consumed.

@pbaylis
pbaylis / 00_spatial_interpolation.R
Last active February 27, 2022 02:16
Sample R spatial interpolation code. First fills in missing obs using CDF method, then interpolates to a grid. Useful for converting weather station to gridded data. Uses IDW but that could easily be changed.
library(foreign)
library(data.table)
library(zoo)
library(Hmisc)
library(gstat)
library(sp)
rm(list=ls())
# Fill in missing data ----
sm.thresh <- 0.9 # Min proportion of obs that must be in a station-month
@johnbaums
johnbaums / iwanthue.R
Last active June 7, 2020 22:48
Palettes of distinct colours, generated through kmeans clustering of LAB colour space
swatch <- function(x) {
# x: a vector of colours (hex, numeric, or string)
par(mai=c(0.2, max(strwidth(x, "inch") + 0.4, na.rm = TRUE), 0.2, 0.4))
barplot(rep(1, length(x)), col=rev(x), space = 0.1, axes=FALSE,
names.arg=rev(x), cex.names=0.8, horiz=T, las=1)
}
# Example:
# swatch(colours()[1:10])
# swatch(iwanthue(5))