Skip to content

Instantly share code, notes, and snippets.

View kspalaiologos's full-sized avatar
❤️‍🔥

Kamila Szewczyk kspalaiologos

❤️‍🔥
View GitHub Profile
@Mroik
Mroik / taylor.fsx
Last active April 26, 2022 20:17
Taylor series to approximate a generic function
let fact x =
let rec fact_r i acc =
match i with
| 0.0 -> acc
| a -> fact_r (i - 1.0) (acc * i)
fact_r x 1.0
let rec pwr bas ex =
match ex with
| 0 -> 1.0
static bool get_next_byte( std::istream& stream, char&c, std::string& log_ )
{
if( !stream.eof() )
{
stream.get( c );
log_ += c;
return true;
}
return false;
}
@MarcDiethelm
MarcDiethelm / Contributing.md
Last active September 13, 2024 15:58
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@maxcountryman
maxcountryman / bf.c
Created January 29, 2012 17:20
A simple brainfuck interpreter in C
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
// initialize the tape with 30,000 zeroes
unsigned char tape[30000] = {0};
// set the pointer to point at the left-most cell of the tape
unsigned char* ptr = tape;