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 { Ai } from './vendor/@cloudflare/ai.js'; | |
export default { | |
async fetch(request, env) { | |
const body = await request.json(); | |
const ai = new Ai(env.AI); | |
const response = await ai.run("@hf/thebloke/llama-2-13b-chat-awq", body); | |
return new Response(JSON.stringify(response)); | |
}, | |
}; |
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 { useState } from "react"; | |
import "./App.css"; | |
import { GoogleGenerativeAI } from "@google/generative-ai"; | |
function App() { | |
const [loading, setLoading] = useState(false); | |
const [apiData, setApiData] = useState([]); | |
const [place, setPlace] = useState("Bangkok"); | |
const [days, setDays] = useState(3); | |
const [preferences, setPreferences] = useState(""); |
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
class Cosine | |
def initialize(vecA, vecB) | |
@vecA = vecA | |
@vecB = vecB | |
end | |
def calculate_similarity | |
return nil unless @vecA.is_a?(Array) && @vecB.is_a?(Array) && @vecA.size == @vecB.size | |
dot_product = @vecA.each_with_object(0).with_index { |(v1i, sum), i| sum += v1i * @vecB[i] } |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
guntur | |
kakinada | |
kurnool | |
nellore | |
rajamahendravaram | |
vijayawada | |
visakhapatnam | |
warangal | |
guwahati | |
patna |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
delhi | |
mumbai | |
bangalore (bengaluru) | |
chennai | |
hyderabad | |
kolkata | |
ahmedabad | |
pune |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CameraController : MonoBehaviour | |
{ | |
public GameObject player; | |
private Vector3 offset; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.InputSystem; | |
public class PlayerController : MonoBehaviour | |
{ | |
public float speed = 0; | |
private Rigidbody rb; |
NewerOlder