I put IPFS on a Raspberry Pi and so should you!
- Raspberry Pi 3 B: $43
- Micro SD card: $11
- [Raspberry Pi charger](ht
import requests | |
import json | |
import gradio as gr | |
url = "http://localhost:11434/api/generate" | |
headers = { | |
'Content-Type': 'application/json', | |
} |
import os | |
from pathlib import Path | |
from flet import icons, flet, Page, Row, ElevatedButton, GridView, TextButton, TextField | |
def setup_page(page: Page): | |
page.theme_mode = "dark" | |
<form name="contact" netlify netlify-honeypot="bot-field" hidden> | |
<input type="text" name="name" /> | |
<input type="email" name="email" /> | |
<textarea name="message"></textarea> | |
</form> |
import datetime as dt | |
import os | |
import motor | |
from beanie import Document, Indexed, PydanticObjectId, init_beanie, operators | |
from fastapi import FastAPI, Response, status | |
from pydantic import BaseModel | |
app = FastAPI() |
//https://www.digitalocean.com/community/tutorials/how-to-add-login-authentication-to-react-applications | |
//By default, react-router-dom is now ^6.0.2. | |
//Below are the significant changes for the tutorial to use the new version of react-router-dom | |
//Line 14 -> Switch has been replaced with Routes | |
//Line 29/34 -> Switch has been replaced with Routes (2) | |
import React, { useState }from "react"; | |
import "./App.css"; |
// Basic Types | |
let id: number = 5 | |
let company: string = 'Traversy Media' | |
let isPublished: boolean = true | |
let x: any = 'Hello' | |
let ids: number[] = [1, 2, 3, 4, 5] | |
let arr: any[] = [1, true, 'Hello'] | |
// Tuple |
from flask import Flask, jsonify, request | |
from flask_sqlalchemy import SQLAlchemy | |
import uuid | |
app = Flask(__name__) | |
db = SQLAlchemy(app) | |
app.config['SECRET_KEY']='secret' | |
app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///app.db' |
class HttpCrudRequests { | |
async get(url) { | |
const res = await fetch(url) | |
const data = await res.json() | |
return data | |
} | |
async post(url, post) { | |
const res = await fetch(url, { |