Skip to content

Instantly share code, notes, and snippets.

@mebaysan
mebaysan / il.csv
Created February 12, 2021 12:44
Türkiye İller CSV
plaka il_adi lat lon northeast_lat northeast_lon southwest_lat southwest_lon
1 ADANA 37.00000000 35.32133330 37.07200400 35.46199500 36.93552300 35.17470600
2 ADIYAMAN 37.76416670 38.27616670 37.82566700 38.33546500 37.71708600 38.18818800
3 AFYONKARAHİSAR 38.76376000 30.54034000 38.80210500 30.61116700 38.71428900 30.44232000
4 AĞRI 39.72166670 43.05666670 39.74860500 43.08524100 39.68814400 43.00177800
5 AMASYA 40.65000000 35.83333330 40.67283400 35.85632100 40.63691100 35.78909100
6 ANKARA 39.92077000 32.85411000 40.10098100 33.02486600 39.72282100 32.49909700
7 ANTALYA 36.88414000 30.70563000 36.97517800 30.84095300 36.78586600 30.51609500
8 ARTVİN 41.18333330 41.81666670 41.20707800 41.85479900 41.15541500 41.77736100
9 AYDIN 37.84440000 27.84580000 37.87099700 27.88535500 37.81957300 27.79052200
@nevack
nevack / archived.md
Last active July 1, 2024 22:29
[ARCHIVED] Fix for CSR Dongle 0a12:0001 ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

This gist is currenctly archived.

Please refer to previous revisions if you know what to do.

The patch proposed was merged into kernel in 5.8 release, but no longer working as of linux 5.11

@yegappan
yegappan / VimScriptForPythonDevelopers.MD
Last active September 10, 2024 21:55
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

@awwong1
awwong1 / pytorch-rpi3.md
Last active July 27, 2024 13:26
PyTorch Installation for Raspberry Pi 3B
@blurayne
blurayne / ui-widget-select.sh
Last active March 15, 2024 20:27
Pure BASH interactive CLI/TUI menu (single and multi-select/checkboxes)
#!/bin/bash
##
# Pure BASH interactive CLI/TUI menu (single and multi-select/checkboxes)
#
# Author: Markus Geiger <mg@evolution515.net>
# Last revised 2019-09-11
#
# ATTENTION! TO BE REFACTORED! FIRST DRAFT!
#
@shawwwn
shawwwn / uping.py
Last active September 6, 2024 12:35
µPing: Ping library for MicroPython
# µPing (MicroPing) for MicroPython
# copyright (c) 2018 Shawwwn <shawwwn1@gmail.com>
# License: MIT
# Internet Checksum Algorithm
# Author: Olav Morken
# https://github.com/olavmrk/python-ping/blob/master/ping.py
# @data: bytes
def checksum(data):
if len(data) & 0x1: # Odd number of bytes
@korakot
korakot / record.py
Last active August 23, 2024 08:45
Record audio in Colab using getUserMedia({ audio: true })
# all imports
from IPython.display import Javascript
from google.colab import output
from base64 import b64decode
from io import BytesIO
!pip -q install pydub
from pydub import AudioSegment
RECORD = """
const sleep = time => new Promise(resolve => setTimeout(resolve, time))
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
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
@aldente39
aldente39 / .vimrc
Created January 7, 2012 10:27
To compile & run by F5 (Vim)
"実行コマンド
command! Run call s:Run()
nmap <F5> :Run<CR>
function! s:Run()
let e = expand("%:e")
if e == "c"
:Gcc
endif
if e == "py"
:Python