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
import SwiftUI | |
import AVFoundation | |
import Accelerate | |
import Combine | |
struct ContentView: View { | |
@ObservedObject var audioRecorder = AudioRecorder() | |
@ObservedObject var audioPlayer = AudioPlayer() | |
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
import { StyleSheet, Button, View, Text } from 'react-native'; | |
import { useState } from 'react'; | |
import { Audio, Video } from 'expo-av'; | |
export default function App() { | |
const [sound, setSound] = useState<Audio.Sound | null>(); | |
const [recording, setRecording] = useState<Audio.Recording | null>(); | |
const [permissionResponse, requestPermission] = Audio.usePermissions(); | |
const [uri, setUri] = useState<string | null>(null); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Color Frequency Calculator</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
</head> | |
<body> |
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
use js_sys::Uint8Array; | |
use rand::seq::{IteratorRandom, SliceRandom}; | |
use rayon::prelude::*; | |
use std::sync::{Arc, Mutex}; | |
use wasm_bindgen::prelude::*; | |
use web_sys::console; | |
use std::fmt::Debug; | |
use anyhow::{anyhow, Result}; |
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> | |
typedef enum { | |
TAG_HTML, | |
TAG_HEAD, | |
TAG_BODY, | |
TAG_TITLE, |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as mdates | |
import pandas as pd | |
from scipy.signal import argrelextrema | |
eth = pd.read_csv("./financial_data/eth.csv") | |
priceData = pd.DataFrame() |
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
// Literal: | |
// IntLiteral(int), | |
// FloatLiteral(float), | |
// BoolLiteral(bool), | |
// StringLiteral(string) | |
// Variable: | |
// name: string | |
// type: TypeDesc |
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
HtmlTag: enum = { | |
div = "Div", | |
p = "P", | |
h1 = "H1", | |
h2 = "H2", | |
} | |
HtmlNode = { |
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
for anyone trying to run inkwell via vs code and using the run/debug in rust_analyzer | |
Setting this in your user settings will fix this | |
"rust-analyzer.runnables.extraEnv": { | |
"LLVM_SYS_170_PREFIX": "/opt/homebrew/Cellar/llvm/17.0.6" | |
} |
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
fn generate_add_func(module: &mut Module) { | |
let mut func = Function::new( | |
Linkage::private(), | |
"add".to_string(), | |
vec![ | |
(Type::Word, Value::Temporary("a".to_string())), | |
(Type::Word, Value::Temporary("b".to_string())), | |
], | |
Some(Type::Word), |