Skip to content

Instantly share code, notes, and snippets.

View vihanb's full-sized avatar
🐶
Probably at the doggo shelter

Vihan vihanb

🐶
Probably at the doggo shelter
View GitHub Profile
count code country city
758 IN India
221 FR France
213 US United States
199 RU Russia Moscow
195 US United States Edison
176 ID Indonesia
148 JP Japan
138 TN Tunisia
134 VN Vietnam Hanoi
code country city
AU Australia Sydney
AU Australia Sydney
AU Australia Sydney
AU Australia Sydney
AU Australia Sydney
AU Australia Sydney
AU Australia Sydney
AU Australia Sydney
AU Australia Lilyfield
@vihanb
vihanb / rtcp.cities.csv
Last active February 2, 2020 08:09
RTCP Data
count city
2855
199 Moscow
195 Edison
134 Hanoi
122 Tokyo
116 Calgary
107 Seoul
105 Chennai
102 Bengaluru
Case #1: Impossible
Case #2: Impossible
Case #3: 3 3 0
Case #4: Impossible
Case #5: Impossible
Case #6: Impossible
Case #7: Impossible
Case #8: Impossible
Case #9: Impossible
Case #10: Impossible
Case #1: Impossible
Case #2: Impossible
Case #3: 3 3 0
Case #4: Impossible
Case #5: Impossible
Case #6: Impossible
Case #7: Impossible
Case #8: Impossible
Case #9: Impossible
Case #10: Impossible
import time
import RPi.GPIO as GPIO
light_sensor_pin = 5
fan_pin = 6
wheel_pin_numbers = [1, 2, 3, 4]
for pin_number in wheel_pin_numbers:
GPIO.setup(pin_number, GPIO.OUT)
Syntax Error: Ambigous parsing (2) for:
CodeBlock
└ statements[]
└ ExpressionStatement
└ expression: BinaryExpression
├ lhs: Identifier; b
└ rhs: FunctionCall
├ head: FunctionCall
│ ├ head: Identifier; a
│ └ arguments[]
@vihanb
vihanb / alloc.vsl
Created January 10, 2019 03:29
VSL wasm heap allocator
private func memoryGrow(memIndex: UInt32, by size: UInt32) -> Int32 external("llvm.wasm.memory.grow.i32");
private func memorySize(memIndex: UInt32) -> UInt32 external("llvm.wasm.memory.size.i32");
// VSL WASM heap allocation implementation
// This uses a first fit technique by designing the heap
// as a linked list. This rather aggressively merges blocks
// and is kind of similar to dlalloc
// WASM Page size as designated in spec (64 Ki)
// WebAssembly Core Specification § 4.2.8
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 13
.globl _main ## -- Begin function main
.p2align 4, 0x90
_main: ## @main
## %bb.0: ## %entry
pushq %rax
movl $13, %edi
callq _malloc
movw $8303, 4(%rax) ## imm = 0x206F