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 'package:camera/camera.dart'; | |
import 'package:flutter/material.dart'; | |
/// CameraApp is the Main Application. | |
class CameraView extends StatefulWidget { | |
/// Default Constructor | |
const CameraView({super.key}); | |
@override | |
State<CameraView> createState() => _CameraViewState(); |
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
from flask import Flask, send_file, render_template_string | |
from google.cloud import storage | |
import os | |
import io | |
app = Flask(__name__) | |
# Configure the environment variable for GCS credentials | |
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/your/service-account-file.json" |
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 json | |
import logging | |
from typing import List, Dict, Any | |
from langchain_google_vertexai import VertexAI | |
from langchain.prompts import PromptTemplate | |
from langchain_core.output_parsers import JsonOutputParser | |
from langchain.output_parsers import OutputFixingParser | |
from langchain_core.pydantic_v1 import BaseModel, Field | |
from langchain_core.runnables.base import RunnableSerializable |
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 asyncio | |
from quart import Quart, request | |
app = Quart(__name__) | |
@app.route('/', methods=['GET']) | |
async def sleep(): | |
await asyncio.sleep(4) | |
print("received request") | |
return 'Slept for 400ms' |
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
from urllib.request import urlopen | |
from urllib import request | |
resp = urlopen("https://api.ipify.org") | |
ip = resp.read().decode('utf-8').strip() | |
f = open('last_ip.txt', 'r+') | |
last_ip = f.read().strip() | |
if (ip != last_ip): |
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 { LightningElement, track } from 'lwc'; | |
import { subscribe, unsubscribe, onError, setDebugFlag, isEmpEnabled } from 'lightning/empApi'; | |
export default class Geofenceevent extends LightningElement { | |
@track channelName = '/event/GeoFenceTrip__e'; | |
@track isSubscribeDisabled = false; | |
@track isUnsubscribeDisabled = !this.isSubscribeDisabled; | |
subscription = {}; |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func doSomework(imDone chan bool, stopMe chan bool, breakTime int, name string) { | |
outer: | |
for { |
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
package main | |
import ( | |
"testing" | |
"fmt" | |
) | |
func getDrone() *Drone { | |
d := &Drone{} | |
d.CurrentPosition = GPSCoord{3, 3} |
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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
type GPSCoord struct { | |
Lat float64 | |
Lon float64 |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/gorilla/websocket" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
NewerOlder