This file contains hidden or 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 openai import OpenAI | |
| from typing import Any, List | |
| import sys | |
| class Agent: | |
| def __init__(self) -> None: | |
| self.client: OpenAI = OpenAI( | |
| base_url="http://dmacstudio.lan.mateos.cc:11434/v1", | |
| api_key="ollama", |
This file contains hidden or 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
| use std::collections::HashMap; | |
| #[derive(Debug)] | |
| pub enum Instruction { | |
| ADD, | |
| MULT, | |
| PRINT, | |
| END, | |
| PUSH(i64), | |
| LOAD(String), |
This file contains hidden or 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
| use std::io; | |
| use std::net::UdpSocket; | |
| const QUESTION_OFFSET: usize = 12; | |
| fn encode_label_format(name: &str) -> Vec<u8> { | |
| let mut encoded = Vec::new(); | |
| for label in name.split('.') { | |
| encoded.push(label.len() as u8); | |
| encoded.extend_from_slice(label.as_bytes()); |
This file contains hidden or 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
| #include <stdbool.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #define PROGRAM_SIZE 1024 | |
| #define STACK_SIZE 1024 |
This file contains hidden or 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
| #include <stdbool.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #define PROGRAM_SIZE 1024 | |
| enum INSTRUCTIONS { |
This file contains hidden or 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 ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| "strconv" | |
| "strings" | |
| ) |
This file contains hidden or 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 React from 'react'; | |
| import logo from './logo.svg'; | |
| import './App.css'; | |
| import { useState, useEffect } from 'react'; | |
| import { Amplify } from 'aws-amplify'; | |
| import { generateClient } from 'aws-amplify/api'; | |
| import { listPersons } from './graphql/queries'; | |
| import { Person } from "./API"; |
This file contains hidden or 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 cv2 | |
| import os | |
| from PIL import Image | |
| from torchvision.models.detection import fasterrcnn_resnet50_fpn_v2, FasterRCNN_ResNet50_FPN_V2_Weights | |
| from torchvision.transforms.functional import pil_to_tensor | |
| cap = cv2.VideoCapture(0) | |
| cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640) # width | |
| cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) # height | |
| cap.set(cv2.CAP_PROP_FPS, 30) # frame rate |
This file contains hidden or 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 cv2 | |
| import numpy as np | |
| from matplotlib import pyplot as plt | |
| #IMAGE = "circle.jpg" | |
| IMAGE = "lisa.png" | |
| #IMAGE = "melita.png" | |
| INITIAL_POPULATION = 500 | |
| EPOCHS = 128 | |
| DNA_LENGTH = 1024 |
This file contains hidden or 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 cv2 | |
| import numpy as np | |
| from matplotlib import pyplot as plt | |
| IMAGE = "circle.jpg" | |
| #IMAGE = "lisa.png" | |
| #IMAGE = "melita.png" | |
| INITIAL_POPULATION = 500 | |
| EPOCHS = 128 | |
| DNA_LENGTH = 64 |
NewerOlder