text stringlengths 184 4.48M |
|---|
import { Colors } from "@/theme/colors";
import { SearchBoxInput } from "@guallet/ui-react";
import { Group, Button } from "@mantine/core";
import { useState } from "react";
interface Props {
onAddNewAccount: () => void;
onSearchQueryChanged: (searchQuery: string) => void;
}
export function AccountsHeader({
onA... |
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Observable } from 'rxjs';
export interface CommentDialogData {
title: string;
commentContentM... |
import React from 'react';
import Post from './Post/Post';
import styles from './MyPosts.module.css';
const MyPosts = (props) => {
const postsElements = props.posts
.map(post => <Post message={post.message} likesCount={post.likesCount}/>)
const newPostElement = React.createRef()
const onAddPost = () => ... |
package com.roydon.community.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import android... |
/**
* @file main.c
* @brief This is the main source file for the flash read/write example.
* @details
* This includes flash memory operations to store
* small amounts of infrequently-changing user
* information. (ie settings, etc)
*
* Integrated flash has limited write cycles (10K as
* per datasheet) and ... |
import XCTest
@testable import NativeKit
final class NativeKitTests: XCTestCase {
func testRedRGBA() throws {
let red: NativeColor = .red
let (r, g, b, a) = red.rgba
XCTAssertEqual(r, 1)
XCTAssertEqual(g, 0)
XCTAssertEqual(b, 0)
XCTAssertEqual(a, 1)
let (rd, gd, bd, ad) = r... |
# %% Libraries
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import mlflow
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers, mixed_precision
import numpy as np
from sklearn.metrics import confusion_matrix
import random
from sklearn.model_selection import train_test_split
... |
<nz-card [nzBordered]="false">
<form [nzLayout]="'inline'" nz-form [formGroup]="form" (ngSubmit)="submitForm($event, form.value)">
<div nz-row>
<div nz-col nzXs="8" nzSm="8" nzMd="8">
<button nz-button type="reset" [nzSize]="'large'" [nzType]="'primary'" (click)="resetForm()">
<span>刷新列表</... |
import React from 'react'
import { render } from 'react-dom'
import Highcharts from 'highcharts'
import HighchartsReact from 'highcharts-react-official'
import getChartTheme from './chartTheme'
import primitives from '@primer/primitives'
const chartTheme = getChartTheme()
const colors = primitives.colors.light
const ... |
package main
import (
"fmt"
"github.com/MdSadiqMd/TaskFlow/db"
"github.com/MdSadiqMd/TaskFlow/routes"
"github.com/gofiber/fiber/v2"
/* "github.com/gofiber/fiber/v2/middleware/cors" */
"github.com/joho/godotenv"
"log"
"os"
)
func main() {
fmt.Println("Hello World")
/* var name string = "Md"
const name1 stri... |
import unittest
import dgenerate.mediainput as _mi
class TestImageSeedParser(unittest.TestCase):
def test_file_not_found(self):
with self.assertRaises(_mi.ImageSeedFileNotFoundError) as e:
_mi.parse_image_seed_uri('not_found')
self.assertIn('not_found', str(e.exception))
with... |
//
// AccountService.swift
// RoninEMS
//
// Created by Alvin Raygon on 2/12/22.
//
import Foundation
//{
// "grant_type": "password",
// "Email": "ls1001@yopmail.com",
// "Password": "12345"
//}
struct LoginRequest: Codable {
var grant_type: String = "password"
let Email: String
let Passwor... |
//
//
// Create by imac on 29/4/2018
// Copyright © 2018. All rights reserved.
import Foundation
import UIKit
// MARK: - ... UserAuth Controller
class UserRoot: Codable {
// MARK: - ... Keys UserDefaults
public static var storeUserDefaults: String = "userDataDefaults"
public static var storeRemembe... |
import { Heading, IconLink, Button, Footer, Meta } from "../components";
export default function ReportDesign() {
return (
<>
<Meta title="State of Cobalt | Report Design" />
<main>
{/* Start */}
<article id="overview" class="cobalt">
<section class="hero">
<hgr... |
To setup Express server:
1.create one folder called basic-express-setup
2.Inside the folder please run the below command:
cmd:npm init
3.npm init - will create base package.json file for you.
4.npm install express
/* once express or any new package is install for first time it will create package-lock.json and node-mo... |
import React, { useState } from "react";
import { FaBars, FaTimes, FaGithub, FaLinkedin } from "react-icons/fa";
import { HiOutlineMail } from "react-icons/hi";
import { Link } from "react-scroll";
import { BsFillPersonLinesFill } from "react-icons/bs";
import Logo from "../assets/logo.png";
const Navbar = () => {
c... |
;;; ../repos/walter-manger/.dotfiles/emacs/.doom.d/+gtd.el -*- lexical-binding: t; -*-
(setq org-directory "~/Dropbox/Org/organizer/.agenda-files")
(wm/add-file-keybinding "C-c z w" (concat (file-name-as-directory org-directory) "work.org") "work.org")
(wm/add-file-keybinding "C-c z h" (concat (file-name-as-directory... |
@using Web_Programming_Project.Data.Enum;
@model IEnumerable<Web_Programming_Project.Models.Box>
@{
ViewData["Title"] = "Boxes";
}
<h1>Boxes</h1>
<div class="input-group mb-3">
@if (User.Identity.IsAuthenticated)
{
<a asp-action="Create" class="btn btn-success rounded-end me-4"><i class="fa-solid... |
interface AbilityInterface {
key: string;
value: number | string | boolean | null;
isPositive: boolean;
toString(): string;
}
abstract class AbilityBase implements AbilityInterface {
protected abstract _key: string;
protected abstract _value: number | string | boolean | null;
get key(): string {
... |
import Header from "./components/header/Header"
import css from './styles/app.module.scss'
import Hero from "./components/hero/Hero";
import Experience from "./components/experience/Experience";
import SocialLinks from "./components/social-links/SocialLinks";
import {ThemeContext} from './utils/Context'
import { useCon... |
import express from 'express';
import boards from '../data/boardsData.js';
import { v4 as uuidv4 } from 'uuid';
const router = express.Router();
router.get('/', (req, res) => {
const { ids } = req.query;
if (ids) {
const boardIds = ids.split(',');
const filteredBoards = boards.filter(board =>... |
import { call, put, takeLatest } from 'redux-saga/effects';
import { getUsersService } from '@/services/usersService';
import {
getUsersSuccess,
getUsersFailure,
} from '@/store/actions/users/getUsers';
import { GET_USERS_REQUEST } from '@/store/types/users/getUsers';
import { IResponseUsers, IGetUsersRequest } ... |
### Scope and Usage
The Finnish Core Encounter profile is intended to encapsulate the most common and basic data model
of encounters in Finnish healthcare systems. The profile also defines encounter's relation to the
Kanta registry. As such the profile should be usable in most Finnish contexts.
#### Relation to Finni... |
import { Injectable, UnauthorizedException } from '@nestjs/common';
import { CreateEventDto } from '../dto/create-event.dto';
import { EventParamsDto } from '../dto/get-events-params.dto';
import { UpdateEventDto } from '../dto/update-event.dto';
import { EventRepository } from '../repositories/event.repository';
impor... |
import Course from "../models/Course.js";
import Category from "../models/Category.js";
import User from "../models/User.js";
const createCourse = async (req, res) => {
try {
const course = await Course.create({
name: req.body.name,
description: req.body.description,
ca... |
/* Please note that all of the software in this file is in the public domain. */
/*********************************************************************************************
This is public domain software that was developed by or for the U.S. Naval Oceanographic
Office and/or the U.S. Army Corps of Engin... |
package com.example.myapplication;
import android.app.Activity;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.app.Acti... |
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Drink Shop</title>
<!-- Bootstrap core CSS -->
<link th:href="@{/public/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
<link th:href="@{/public/jquery/jquery-ui.min.css}" rel="stylesheet">
<link re... |
/**
*
*/
package view;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.JToolBar;
import javax.swing.event.ChangeEvent;
import javax... |
import { Component } from "@angular/core";
import { AuthenticationService } from "./services/authentication-service.service";
import { Router } from "@angular/router";
@Component({
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"]
})
export class AppComponent {
title... |
# pylint: disable=g-bad-file-header
# Copyright 2023 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... |
import Mongoose from "mongoose";
import Assets from "../models/db/Assets.model";
import Acquisitions from "../models/db/borrow.model";
import Replicate from "replicate";
import 'dotenv/config';
import Forecasts from "../models/db/forecasting.model";
import Depreciated from "../models/db/depreciated.model";
import Missi... |
/**
* @file SCReduxTempoClockController.sc
*
* @desc A TempoClock controller that receives tempo from the Redux
* state tree.
*
* @author Colin Sullivan <colin [at] colin-sullivan.net>
*
* @copyright 2018 Colin Sullivan
* @license Licensed under the MIT license.
**/
SCReduxTempoCloc... |
def sum_digits(n):
"""Sum all the digits of n.
>>> sum_digits(10) # 1 + 0 = 1
1
>>> sum_digits(4224) # 4 + 2 + 2 + 4 = 12
12
>>> sum_digits(1234567890)
45
>>> x = sum_digits(123) # make sure that you are using return rather than print
>>> x
6"""
total = 0
while n > 0:
... |
# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#... |
# 인프런 알고리즘 문제풀이(C/C++)
## [48]: 각 행의 평균과 가장 가까운 값
### 🌴 문제
9 × 9 격자판에 쓰여진 81개의 자연수가 주어질 때, 각 행의 평균을 구하고, <br>
그 평균과 가장 가까운 값을 출력하는 프로그램을 작성하세요. 평균은 소수점 첫 째 자리에서 반올림합니다. <br>
평균과 가까운 값이 두 개이면 그 중 큰 값을 출력하세요.
#### ◻ 입력
첫 째 줄부터 아홉 번째 줄까지 한 줄에 아홉 개씩 자연수가 주어진다. <br>
주어지는 자연수는 100보다 작다.
#### ◻ 출력
첫째 줄에 첫 번째 줄부터 각 줄에... |
#Listar todas las partidas
# Esta funcion no recibe parametros y retorna una lista con todas las partidas ya registradas
# Cada item de esta lista es un diccionario
# Ej: {'ID': '1', 'JUGADOR1': 'alexis', 'JUGADOR2': 'Martin', 'GANADOR': 'alexis', 'RESULTADO': '102100102'}
def listar_partidas() :
with open("./archi... |
import Generator from 'yeoman-generator';
import chalk from 'chalk'
import { simpleGit } from 'simple-git';
import * as fs from 'fs';
export default class Index extends Generator {
constructor(args, opts) {
super(args, opts);
this.argument('generator-isi', { type: String, required: false });
}
// A... |
/*
* Copyright (C) 2021 -- 2023 Zachary A. Kissel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... |
const express = require("express");
const cors = require("cors");
const port = 5000;
const app = express();
//post in json response
app.use(express.json());
app.use(
cors({
//for allow all clients listening
origin: ["http://localhost:3000"],
})
);
app.listen(port, () => console.log(`listen on post ${port}... |
export function remove_duplicate_chars(str: string) {
const deduped_arr = [...new Set(str.split(''))]
return deduped_arr.join('')
}
function clean_white_space(str: string, separator?: string) {
return str.split(' ').join(separator)
}
export function encrypt(plain_text: string, k: string): string {
const key: ... |
/**
* Fichero de implementación del NodoTrie.
*/
#include "NodoTrie.hpp"
NodoTrie::NodoTrie (void)
{
/* Por defecto un nodo no es fin de palabra. */
esFinPalabra = false;
/* Por defecto el mapa está vacío y por tanto no hay que inicializar sus elementos. */
}
NodoTrie::~NodoTrie (void)
{
/* Cuando lib... |
import numpy as np
import pandas as pd
import polars as pl
import pytest
from pytest_lazyfixture import lazy_fixture
from opsml.registry import CardRegistries
from opsml.registry.cards import DataCard, DataSplit
from opsml.registry.sql.registry import CardInfo, CardRegistry
card_info = CardInfo(name="test-data", team... |
# Funções de ativação em redes neurais multicamadas
A **_step function_** (função degrau), como demonstrado anteriormente no modelo Perceptron de uma camada, é uma função de ativação simples e limitada em sua aplicabilidade, sendo adequada principalmente para esse tipo de modelo.
A **função sigmoide**, por sua vez, p... |
DM_BEGIN_IMPORT_SECTION
DM_SECTION(EZproxy)
DM_BEGIN_COLLAPSIBLE
This is the code which cleans/processes/compiles the raw EZproxy
web logs and produces a single data set (concatenates all logs)
containing pertinent/derived fields.
DM_SUBSECTION(software dependencies)
DM_SMALL1(Reminder: this is only necessary if yo... |
package controller;
import entity.Especialidad;
import entity.Medico;
import model.EspecialidadModel;
import model.MedicoModel;
import javax.swing.*;
import java.util.List;
public class MedicoController {
public static void getAll(){
MedicoModel objMedicoModel = new MedicoModel();
List<Object> li... |
import { collection, doc, getDoc, getDocs, onSnapshot, setDoc } from "firebase/firestore";
import FirebaseManager from "./firebase_manager";
import BettingManager from "./betting_manager";
import GameModel from "../../util/model/game_model";
import { httpsCallableFromURL } from "firebase/functions";
import MemberManage... |
import React, { useState } from "react";
import { Button, Form, Row, Col, Container, InputGroup, Card, FloatingLabel } from "react-bootstrap";
import { useNavigate } from "react-router";
const PreCadastroAluno = () => {
const [email, setEmail] = useState(null);
const [senha, setSenha] = useState("");
const [senh... |
/*
File Name: Profiler.h
Project Name: Q
Author(s):
Primary: Junwoo seo
Secondary:
All content (C) 2021 DigiPen (USA) Corporation, all rights reserved.
*/
#pragma once
#include <chrono>
#include <string>
#include <fstream>
namespace q_engine
{
struct ProfilingResult
{
std::string Name;
long long Start, En... |
import React from 'react';
import { Card, Col, Row, Table } from 'react-bootstrap';
import Pageheader from '../../Layouts/Pageheader/Pageheader';
import styles from './Margin.module.scss';
const Margin = () => {
return (
<div className={styles.Margin}>
<Pageheader titles="Utilities" active="Margin" />
{/* <... |
<template>
<modal
name="leads-copy-to-offer-modal"
height="auto"
:adaptive="true"
>
<div class="flex flex-col w-full p-6">
<div class="flex flex-col w-full mb-2">
<label class="block text-sm font-medium leading-5 text-gray-700 sm:mt-px sm:pt-2 mb-1">Период регистрации</label>
<... |
import pg from 'pg';
import { environment } from './environment.js';
import { logger as loggerSingleton } from './logger.js';
const MAX_GAMES = 100;
/**
* Database class.
*/
export class Database {
/**
* Create a new database connection.
* @param {string} connectionString
* @param {import('./logger.js').... |
package com.diplom.webinar.controller;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springfr... |
import React from "react";
import Box from "@mui/material/Box";
import Card from "@mui/material/Card";
import CardActions from "@mui/material/CardActions";
import CardContent from "@mui/material/CardContent";
import Button from "@mui/material/Button";
import Typography from "@mui/material/Typography";
const ProductCar... |
// Atributos inicias do jogo
const state = {
score: {
playerScore: 0,
computerScore: 0,
winBox: document.getElementById("score_points_win"),
loseBox: document.getElementById("score_points_lose")
},
cardSprites: {
avatar: document.getElementById("card-image"),
... |
#include "Selection/Selection.h"
#include "Tests/SelectionTestBase.h"
#include "Tests/Testing.h"
#include "Util/Assert.h"
class SelectionTest : public SelectionTestBase {};
TEST_F(SelectionTest, Default) {
Selection sel;
EXPECT_FALSE(sel.HasAny());
EXPECT_EQ(0U, sel.GetCount());
TEST_THROW(sel.GetPrim... |
import { useState } from 'react';
import AddTodo from './AddTodo';
import TodoItem from './TodoItem';
import Footer from './Footer';
const Todo = () => {
const [todoList, setTodoList] = useState([
{ id: 0, text: 'Lear React', checked: true },
]);
return (
<div className="todo">
<AddTodo todo={[todo... |
from typing import Optional
from geopy.geocoders import ArcGIS
from geopy.adapters import AioHTTPAdapter
from geopy.distance import geodesic
from geopy import Location
class GeoPyAPI:
async def get_coordinates(self, node_text: str) -> Optional[tuple]:
"""lat,lon"""
async with ArcGIS(user_agent="G... |
import React, { useEffect, useRef, useState } from "react";
import { useSelector } from "react-redux";
import CardFeature from "../component/CardFeature";
import HomeCard from "../component/HomeCard";
import { GrPrevious, GrNext } from "react-icons/gr";
import FilterProduct from "../component/FilterProduct";
import All... |
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... |
package org.cvarela.sliderWeb.controllers;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import org.cvarela.sliderWeb.models.Imagen;
import org.cvarela.sliderWeb.repositories.ImagenDao;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.MultipartConfig;
import j... |
import React, { useEffect, useState } from "react";
import { PDFDownloadLink } from "@react-pdf/renderer";
import BookingDialogPDF from "./BookingDialogPDF";
import { Button } from "@mui/material";
import html2canvas from "html2canvas";
import useStatusData from "../utils/useStatusData";
import { useSelector } from "re... |
DESCRIBE-BATCH-LOAD-TASK() DESCRIBE-BATCH-LOAD-TASK()
NAME
describe-batch-load-task -
DESCRIPTION
Returns information about the batch load task, including configura-
tions, mappings, progress, and other details. Service quotas apply .
See code sample for d... |
package
DBI; # hide this non-DBI package from simple indexers
# $Id: W32ODBC.pm 8696 2007-01-24 23:12:38Z Tim $
#
# Copyright (c) 1997,1999 Tim Bunce
# With many thanks to Patrick Hollins for polishing.
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as spec... |
package vn.sparkminds.ecommerce;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
i... |
import type { IConnection } from '@plumber/types'
import * as React from 'react'
import { useQuery } from '@apollo/client'
import AppConnectionRow from 'components/AppConnectionRow'
import NoResultFound from 'components/NoResultFound'
import * as URLS from 'config/urls'
import { GET_APP_CONNECTIONS } from 'graphql/que... |
@gutter: (100-(@colWidth*@numCols))/(@numCols - 1); /*-- Automatically calculated gutter width --*/
/*-- Columns are wrapped in rows --*/
.row {
width: 100%;
max-width: @maxWidthPx;
margin: 0 auto;
overflow: hidden;
}
/*-------------------------------------------------------------*\
| The width of a column 'x'... |
import React, { useState, useEffect } from "react";
import useFetch from "../../../hooks/useFetch";
import { useParams } from "react-router-dom";
import { AiFillBank, AiFillPhone } from "react-icons/ai";
import { MdLocationPin } from "react-icons/md";
import { FaLink } from "react-icons/fa";
import ReviewForm from "./r... |
/*
* The MIT License
* Copyright © 2021-present KuFlow S.L.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, cop... |
#pragma once
#include <map>
#include <cstring>
#include <core/Drawable/Drawable.h>
#include "core/Common/defines.h"
#include "core/TiledMap/ObjectGroup.h"
#include "core/Components/Component.h"
struct TileData;
class Tilesets;
namespace Tmx {
class Map;
class Tileset;
class TileLayer;
}
enum class LayerType{
IMM... |
Merge IntervalsMar 27 '122166 / 7703
Given a collection of intervals, merge all overlapping intervals.
For example,
Given [1,3],[2,6],[8,10],[15,18],
return [1,6],[8,10],[15,18].
/**
* Definition for an interval.
* public class Interval {
* int start;
* int end;
* Interval() { start = 0; end = 0; }
... |
#ifndef DotNetPELib_ASSEMBLYDEF
#define DotNetPELib_ASSEMBLYDEF
/* Software License Agreement
*
* Copyright(C) 1994-2020 David Lindauer, (LADSoft)
* With modifications by me@rochus-keller.ch (2021)
*
* This file is part of the Orange C Compiler package.
*
* The Orange C Compiler package is free ... |
#Problema 2.08 Choques de duración finita
import numpy
import matplotlib.pyplot as plt
import matplotlib.animation as anim
import tqdm
k=1
def dot(a:numpy.ndarray,b:numpy.ndarray)->float:
if a.shape!=b.shape:
raise Exception("Should have the same size")
return numpy.sum(a*b)
def norm(a:numpy.ndarray)->f... |
import React from "react";
import { useLocation } from "react-router-dom";
import { Bar } from "react-chartjs-2";
import { useSelector } from "react-redux";
import { getCompleted, getInprogress } from "../features/project/projectSlice";
import Navbar from "../components/navbar";
// import { Chart } from "chart.js";
imp... |
<?php
namespace Doctrine\ODM\MongoDB\Tests\Functional\Ticket;
use Doctrine\Common\Collections\ArrayCollection;
class MODM70Test extends \Doctrine\ODM\MongoDB\Tests\BaseTest
{
public function testTest()
{
$avatar = new Avatar('Test', 1, array(new AvatarPart('#000')));
$this->dm->persist($avatar);
$this... |
package kr.or.ddit.member.qaBoard.dao;
import java.util.List;
import kr.or.ddit.member.vo.QaboardVO;
public interface IQABoardDAO {
/**
* 문의 게시글 전체 개수 반환하는 메서드
*
* @return 조회된 레코드 개수(int)
*/
public int getCountQaBoard();
/**
* 문의 게시글 목록 전체를 반환하는 메서드
*
* @param m_code(회원번호)
* @return 해당 m_code... |
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import Header from "../components/header";
import TagBar from "../components/bar/tag";
import Footer from "../components/footer";
import { Toaster } from "@/components/ui/toaster"
import { ThemeProvider } from "@/com... |
import os
from openai import OpenAI
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
import argparse
# Parse command-line arguments
parser = argparse.ArgumentParser(description="Ask Alexabcde a question.")
parser.add_argument('--content', type=str,
required=True, help="Your question.")
parser.... |
# ChatGPT Telegram Bot: **GPT-4. Fast. No daily limits. Special chat modes**
<br>
We all love [chat.openai.com](https://chat.openai.com), but... It's TERRIBLY laggy, has daily limits, and is only accessible through an archaic web interface.
This repo is ChatGPT re-created as Telegram Bot. **And it works great.*... |
//
// SettingsView.swift
// GlucoseDirectClientUI
//
import Combine
import GlucoseDirectClient
import HealthKit
import LoopKit
import LoopKitUI
// MARK: - GlucoseDirectSettingsViewController
public class GlucoseDirectSettingsViewController: UITableViewController {
// MARK: Lifecycle
init(cgmManager: Gluco... |
namespace Majako.Collections.RadixTree.Tests.Set
open FsCheck
open FsCheck.Xunit
open Majako.Collections.RadixTree
open System.Collections.Generic
open Majako.Collections.RadixTree.Tests
type TestItems = list<NonEmptyString>
[<AbstractClass>]
type PrefixTreePropertyTestBase(ctor: (string seq -> IPrefixTree)) =
l... |
---
title: "07_learn_heatmap_with_tmap"
author: "Author: [Steve, Yu](https://github.com/littlefish0331)"
date: "`r Sys.setlocale('LC_TIME', 'English'); format(Sys.time(), '%Y %b %d %a, %H:%M:%S')`"
output:
rmdformats::readthedown:
css: style.css
self_contained: TRUE
thumbnails: FALSE
lightbox: TRUE
... |
import {Construct} from "constructs";
import * as cdk from 'aws-cdk-lib';
import * as ecr from 'aws-cdk-lib/aws-ecr';
import * as assets from 'aws-cdk-lib/aws-ecr-assets';
import * as ecrdeploy from 'cdk-ecr-deployment';
export class Ecr extends Construct {
public readonly fluentbitECR: ecr.IRepository;
cons... |
import 'package:flutter/material.dart';
class LoginEmailTextField extends StatelessWidget {
const LoginEmailTextField({
super.key,
required this.emailController,
});
final TextEditingController emailController;
@override
Widget build(BuildContext context) {
return TextField(
keyboardType:... |
Using TraX on Linux
This tutorial will show you how to compile C and C++ trackers on Linux systems using CMake build system. It is assumed that you have read the :doc:`general remarks on tracker structure </tutorial_introduction>`.
There are many Linux distributions, this tutorial will focus on the most popular one... |
function status = save_ann (Fname, Ann, Vars)
% Writer for .ann annotation files
%
% status = save_xxx(Fname, Ann, Vars)
%
% save_xxx() is a subprogram to eaf_save that is used to specifically
% save annotations to an EMGlab ".xxx" annotation file from
% the EMGlab annotation structure. The function inputs and outputs... |
//
// Protocolos.swift
// estudoVIPER
//
// Created by Roberto Edgar Geiss on 30/09/21.
//
// MARK: - User Interface
// MARK: Routers
import UIKit
public protocol PostBrowserWireframe: AnyObject
{
var rootViewController: UIViewController { get }
func present(PostDetail: PostDetailPresenter, from: UIViewCo... |
import React, { useCallback, useEffect, useMemo, useState } from "react";
import ListItemText from "@mui/material/ListItemText";
import ListItemButton from "@mui/material/ListItemButton";
import Typography from "@mui/material/Typography";
import CustomDialog from "@/components/miscellaneous/CustomDialog";
import { useD... |
package dataaccess.mysql;
import chess.ChessGame;
import dataaccess.DataAccessException;
import dataaccess.DatabaseManager;
import dataaccess.GameDAO;
import model.bean.GameBean;
import java.sql.*;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
public class MySQLGameDAO implements GameD... |
package CBOR::Free::SequenceDecoder;
use strict;
use warnings;
=encoding utf-8
=head1 NAME
CBOR::Free::SequenceDecoder
=head1 SYNOPSIS
my $decoder = CBOR::Free::SequenceDecoder->new();
if ( my $got_sr = $decoder->give( $some_cbor ) ) {
# Do something with your decoded CBOR.
}
while (my ... |
import {
Group,
Button,
TextInput,
Stack,
Divider,
Container,
Center,
Textarea,
Badge,
Text,
ScrollArea,
} from "@mantine/core";
import StoryCard from "../components/StoryCard";
import { useEffect, useState } from "react";
import { useForm } from "@mantine/form";
import { Modal } from "@mantine/co... |
---
title: Extending Matchers | Guide
---
# Extending Matchers
Since Vitest is compatible with both Chai and Jest, you can use either the `chai.use` API or `expect.extend`, whichever you prefer.
This guide will explore extending matchers with `expect.extend`. If you are interested in Chai's API, check [their guide](... |
package io.descoped.client.http.internal.apiBuilder;
import io.descoped.client.api.builder.intf.OutcomeHandler;
import io.descoped.client.exception.APIClientException;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Map;
import static jav... |
import { CamelCasedPropertiesDeepPatched, SnakeCasedPropertiesDeepPatched } from "./types/typeFestPatch";
export type SnakeCasedPropertiesDeep<T> = SnakeCasedPropertiesDeepPatched<T>;
export type CamelCasedPropertiesDeep<T> = CamelCasedPropertiesDeepPatched<T>;
// those explicit function type are needed because othe... |
package SinglyLinkedList.ReverseLinkedList_II;
// https://leetcode.com/problems/reverse-linked-list-ii/description/
public class ReverseLinkedList_II {
/************************************* Double pass Traversal ************************************
* Time Complexity: O(2*n)
* Space Complexity: O(1)
... |
//
// Created by Luecx on 23.04.2022.
//
#ifndef EXACTCONSTRAINEDDELAUNAY_SRC_TRIANGLE_H_
#define EXACTCONSTRAINEDDELAUNAY_SRC_TRIANGLE_H_
#include <ostream>
#include "defs.h"
#include "Edge.h"
#include "CDT.h"
namespace delaunay{
struct Triangle {
// Edges spanning the triangle
Edge edges[3]{};
// hist... |
import { test, describe, expect } from "@jest/globals";
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import Form from "../components/Form";
describe("Given the form component, ", () => {
test("it should render correctly", () => {
render(<Form />);
... |
# 执行属性推断攻击
def property_inference_categorical(
self,
# 每个world需要的阴影模型数量
num_shadow_models=1,
# 查询轮数
query_trials=1,
# 随机挑选查询数据集
query_selection="random",
# 区分两个world的方法
distinguishing_test="median",
):
"""Property inference attack for categoric... |
import {BrowserRouter, Link, Route, Routes } from 'react-router-dom';
import './App.css';
import Home from './components/Home';
import Signup from './components/Signup';
import Login from './components/Login';
import Navbar from './components/Navbar';
import EventHandling from './components/EventHandling';
import State... |
import { HttpCode, HttpStatus } from '@nestjs/common';
import { Controller, Logger, Post, UseGuards, Request, Body, BadRequestException, InternalServerErrorException } from '@nestjs/common';
import { UserAlreadyExistException, UserInvalidDataException, UserPasswordException } from '../../application/exceptions';
import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.