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 collections import defaultdict | |
| def reciprocal_rank_fusion(*list_of_list_ranks_system, K=60): | |
| """ | |
| Fuse rank from multiple IR systems using Reciprocal Rank Fusion. | |
| Args: | |
| * list_of_list_ranks_system: Ranked results from different IR system. | |
| K (int): A constant used in the RRF formula (default is 60). | |
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 boto3.session import Session | |
| from botocore.auth import SigV4Auth | |
| from botocore.awsrequest import AWSRequest | |
| from botocore.credentials import Credentials | |
| from http.client import HTTPConnection, HTTPSConnection | |
| import json | |
| import os | |
| from urllib.parse import urlparse | |
| def sigv4_request( |
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 { | |
| IntersectionType, | |
| OmitType, | |
| PartialType, | |
| PickType, | |
| } from '@nestjs/mapped-types'; | |
| import { IsNotEmpty, IsString, Length, validate } from 'class-validator'; | |
| export class Base { | |
| @IsString() |
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 time | |
| from functools import wraps | |
| # 1. Definición de los interceptores | |
| def interceptor_de_cache(cache): | |
| """Interceptor que verifica si el resultado ya está en cache.""" | |
| def wrapper(datos): |
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 './App.css'; | |
| import React, { useState, useEffect } from 'react'; | |
| // Implement an interface for drawing 2D bounding boxes on top of an image. | |
| // Requirements: | |
| // * The user should be able to click-and-drag on the image to draw a box. | |
| // * Boxes should remain on the image after they are drawn. | |
| // * Boxes should be able to overlap each other. |
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
| version: '3.9' | |
| services: | |
| db: | |
| container_name: tabi_postgres | |
| platform: linux/amd64/v8 | |
| image: postgres | |
| restart: unless-stopped | |
| shm_size: 128mb | |
| volumes: |
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
| fastapi-project | |
| ├── alembic/ | |
| ├── src | |
| │ ├── auth | |
| │ │ ├── router.py # auth main router with all the endpoints | |
| │ │ ├── schemas.py # pydantic models | |
| │ │ ├── models.py # database models | |
| │ │ ├── dependencies.py # router dependencies | |
| │ │ ├── config.py # local configs | |
| │ │ ├── constants.py # module-specific constants |
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
| // // strings3.rs | |
| // // | |
| // // Execute `rustlings hint strings3` or use the `hint` watch subcommand for a | |
| // // hint. | |
| // // I AM NOT DONE | |
| // fn trim_me(input: &str) -> String { | |
| // // TODO: Remove whitespace from both ends of a string! | |
| // input.trim().to_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
| export DOCKER_DEFAULT_PLATFORM=linux/x86_64/v8 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder