Invoke with:
python main.py calendar.ics 2 0 0
`python
use crate::pipeline::PipelineBuilder; | |
use crate::resources::{AllocUsage, AllocatedBuffer, Allocator, Texture, TextureId, TextureManager}; | |
use crate::util::{load_shader_module, DeletionQueue}; | |
use crate::{SubmitContext, FRAME_OVERLAP}; | |
use ash::{vk, Device}; | |
use bytemuck::{Pod, Zeroable}; | |
use egui::ahash::{HashMap, HashMapExt}; | |
use egui::epaint::{ImageDelta, Primitive}; | |
use egui::{Context, FullOutput, ImageData, TexturesDelta}; | |
use glam::{Vec3}; |
export const checkInput = (input: any, requiredKeys: string[], validator: {[key: string]: (arg0: any) => boolean | string | Response}): Response | true => { | |
for (const key of requiredKeys) { | |
if (!(key in input) || input[key] == null ) { | |
return new Response(JSON.stringify({error: `${key}-not-specified`}), {status: 400}); | |
} | |
if (key in validator) { | |
const res = validator[key](input[key]); | |
if (typeof res === "string") { | |
return new Response(JSON.stringify({error: `${key}-${res}`}), {status: 400}); | |
} else if (typeof res === "boolean" && !res) { |
Invoke with:
python main.py calendar.ics 2 0 0
`python
// Load Wi-Fi library | |
#include <ESP8266WiFi.h> | |
#include <Adafruit_Sensor.h> | |
#include "DHT.h" | |
#include <stdio.h> | |
// Replace with your network credentials | |
const char* ssid = "SSID"; | |
const char* password = "PASSWORD"; |
{ | |
"1": [ | |
"\u4e00", | |
"\u4e03", | |
"\u4e09", | |
"\u4e0a", | |
"\u4e0b", | |
"\u4e5d", | |
"\u4e8c", | |
"\u4eba", |
from decimal import * | |
getcontext().prec = 1000 | |
# simple and beautiful but diverges slowly. | |
def leibniz(): | |
prefactor = -1 | |
pre_result = 1 | |
current_index = 3 |
GREEN='\033[0;32m' | |
NC='\033[0m' | |
echo -e "${GREEN}> Adding Ubuntu Universe to repositories & Updating package lists${NC}" | |
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository universe | |
sudo apt-get update | |
echo -e "${GREEN}> Installing nodejs & npm${NC}" |
[Unit] | |
Description=Chime | |
After=multi-user.target | |
[Service] | |
WorkingDirectory=%h/chime | |
ExecStart=%h/chime/venv/bin/chime | |
Type=idle | |
User=root | |
Group=root | |
Restart=always |
class DataBuffer { | |
constructor() { | |
this.bytearr = [] | |
} | |
write(byte) { | |
this.bytearr.push(byte) | |
} | |
writeByteArray(byteArray) { |