Skip to content

Instantly share code, notes, and snippets.

View r-lyeh's full-sized avatar
👻

r-lyeh

👻
View GitHub Profile
@r-lyeh
r-lyeh / astar.h
Created January 28, 2023 00:12 — forked from mmozeiko/astar.h
generic A* in C
// generic A* pathfinding
//
// INTERFACE
//
// mandatory macros
#ifndef ASTAR_POS_TYPE
#error ASTAR_POS_TYPE should specify position type
@r-lyeh
r-lyeh / neural-network-from-scratch.py
Created October 20, 2022 19:51 — forked from svpino/neural-network-from-scratch.py
An implementation of a neural network from scratch
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def neural_network(X, y):
learning_rate = 0.1
W1 = np.random.rand(2, 4)
W2 = np.random.rand(4, 1)
@r-lyeh
r-lyeh / stuns
Created April 15, 2020 10:44 — forked from zziuni/stuns
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@r-lyeh
r-lyeh / Quirks of C.md
Created September 10, 2018 11:19 — forked from fay59/Quirks of C.md
Quirks of C

Here's a list of mildly interesting things about the C language that I learned over time.

  1. Combined type and variable/field declaration, inside a struct scope: https://godbolt.org/g/Rh94Go
  2. Compound literals are lvalues: https://godbolt.org/g/Zup5ZB
  3. Switch cases anywhere: https://godbolt.org/g/fSeL18 (also see: Duff's Device)
  4. Flexible array members: https://godbolt.org/g/HCjfzX
  5. {0} as a universal initializer: https://godbolt.org/g/MPKkXv
  6. Function typedefs: https://godbolt.org/g/5ctrLv
  7. Array pointers: https://godbolt.org/g/N85dvv
  8. Modifiers to array sizes in parameter definitions: https://godbolt.org/z/SKS38s
@r-lyeh
r-lyeh / Unicode table
Created March 21, 2018 10:36 — forked from ivandrofly/Unicode table
Unicode table - List of most common Unicode characters *
Unicode table - List of most common Unicode characters *
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable.
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol.
What is Unicode?
Unicode is a standard created to define letters of all languages ​​and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode.
How to identify the Unicode number for a character?
Type or paste a character: