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 { remote } from 'webdriverio'; | |
async function main() { | |
const caps = { | |
"platformName": "Android", | |
"appium:automationName": "UiAutomator2", | |
"appium:ensureWebviewsHavePages": true, | |
"appium:nativeWebScreenshot": true, | |
"appium:newCommandTimeout": 3600, | |
"appium:connectHardwareKeyboard": true, |
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 AVFoundation | |
import Opus | |
import SwiftUI | |
import Starscream | |
import CoreAudio | |
import CoreAudioTypes | |
import AVFoundation | |
import AudioToolbox | |
import Foundation |
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 std::future::Future; | |
use std::thread::sleep; | |
use std::time::Duration; | |
use anyhow::{anyhow, Result}; | |
use rodio::buffer; | |
use rodio::cpal; | |
use rodio::cpal::traits::HostTrait; | |
use rodio::cpal::traits::StreamTrait; | |
use rodio::source::SineWave; |
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 std::future::Future; | |
use anyhow::Ok; | |
use tokio::sync::mpsc; | |
use tokio::sync::oneshot; | |
use tokio::task; | |
use tokio::task::JoinSet; | |
use anyhow::Result; | |
enum Signal { |
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 tokio::net::{TcpListener, TcpStream}; | |
use tokio_stream::StreamExt; | |
use tokio_tungstenite::{accept_async, WebSocketStream}; | |
use opus::{Decoder, Encoder, Error}; | |
use rodio::{OutputStream, Source}; | |
use rodio::buffer::SamplesBuffer; | |
#[tokio::main] | |
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> { | |
let listener = TcpListener::bind("0.0.0.0:8080").await?; |
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 std::time::Duration; | |
use anyhow::{anyhow, Ok, Result}; | |
use rodio::{ | |
cpal::{ | |
self, | |
traits::{HostTrait, StreamTrait}, | |
BufferSize, SampleRate, StreamConfig, | |
}, |
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}; |
NewerOlder