This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Flint: A tiny alternative to excel for visualization and computation. | |
File Format: | |
--- | |
ZIP -> sheet1.csv | |
sheet1.fl | |
Language | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# implement a web crawler in python | |
import requests | |
import bs4 | |
import selenium.webdriver | |
# URL | |
source_url = 'https://bhagvad-gita.github.io/' | |
# Which folder to save screenshots in | |
folder = './screenshots/' | |
# How many levels to traverse? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned int test_int = 0; | |
static int audio_interface_callback( const void *inputBuffer, void *outputBuffer, | |
unsigned long framesPerBuffer, | |
const PaStreamCallbackTimeInfo* timeInfo, | |
PaStreamCallbackFlags statusFlags, | |
void *userData ) | |
{ | |
uint16_t* out = (uint16_t*)outputBuffer; | |
uint16_t* data = (uint16_t*)((uintptr_t)userData + test_int * sizeof(uint16_t)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int audio_interface_play_sound(int channels, int sample_rate, int len, uint16_t* data) | |
{ | |
PaStream* stream; | |
PaError err = Pa_OpenDefaultStream(&stream, 0, 1, paInt16, sample_rate, 256, audio_interface_callback, data); | |
if(err != paNoError) | |
{ | |
fprintf(stderr, "stdgfx: error opening audio stream %s\n", Pa_GetErrorText(err)); | |
return -1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdarg.h> | |
#include <stdbool.h> | |
#include <SDL/SDL.h> | |
#include "c8_cpu.h" |