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 A-Frame and AR.js libraries --> | |
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@1c2407b26c61958baa93967b5412487cd94b290b/dist/aframe-master.min.js"></script> | |
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script> | |
<!-- Loading Screen Styles --> | |
<style> | |
.arjs-loader { | |
height: 100%; | |
width: 100%; | |
position: absolute; |
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 redis | |
import sys | |
import requests | |
from datetime import timedelta | |
import json | |
# Create connectivity to the Redis server | |
def redis_connect(): | |
try: | |
client = redis.Redis(host="localhost",port=6379,db=0,socket_timeout=5,) |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="./public/main.css"> | |
<title>TailwindCSS Test</title> | |
</head> | |
<body> | |
<div class="h-screen"> |
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
module.exports = { | |
content: ["./src/**/*.{html,js}"], | |
theme: { | |
extend: {}, | |
}, | |
plugins: [], | |
} |
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
# Delete Data | |
query_result = client.query( | |
faunaquery.delete( | |
faunaquery.ref( | |
faunaquery.collection("testCollection"), "328031285277622849") | |
) | |
) |
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
# Update Data | |
query_result = client.query( | |
faunaquery.update( | |
faunaquery.ref( | |
faunaquery.collection("testCollection"), "328031285277622849"), | |
{ "data": {"name" : "Barry Allen", "email": "barry@gmail.com"}} | |
) | |
) |
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
# Retrieve Data | |
query_result = client.query( | |
faunaquery.get( | |
faunaquery.ref( | |
faunaquery.collection("testCollection"), "328031285277622849") | |
) | |
) |
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
# Insert Data into the Collection using a Map | |
query_result = client.query( | |
faunaquery.map_( | |
lambda username: faunaquery.create( | |
faunaquery.collection("testCollection"), | |
{"data": {"name": username}} | |
), | |
[ | |
"Barry", | |
"Sam", |
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 os | |
from dotenv import load_dotenv | |
from urllib.parse import urlparse | |
from faunadb import query as faunaquery | |
from faunadb.client import FaunaClient | |
try: | |
# Load environment variable from .env file | |
load_dotenv() | |
secret = os.getenv("DB_ACCESS_KEY") |
NewerOlder