Skip to content

Instantly share code, notes, and snippets.

@c-flew
c-flew / s-curve.py
Created Oct 3, 2021
Tyler Veness' s-curve implementation
View s-curve.py
"""
Copyright 2017 Tyler Veness
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
@c-flew
c-flew / combination.nim
Created Jun 30, 2021
Some combination thing
View combination.nim
import bitops
# for debugging a mask
# e.x.: 4 -> "0100"
func debug(mask: uint) =
var str: string
for i in countdown(63, 0):
if mask.testBit i:
str = str & "1"
View gist:a07da64a6d9d2404de3c3f5a9b86a3a7
### Keybase proof
I hereby claim:
* I am c-flew on github.
* I am cflew (https://keybase.io/cflew) on keybase.
* I have a public key ASC32n7zgGoRtElfC-tLiVW2eD-g8J8ifMFgHa4pe-C8-go
To claim this, I am signing this object: