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 math | |
| from collections.abc import Sequence | |
| def dot_product(vec_a: Sequence[float],vec_b: Sequence[float]) -> float: | |
| if len(vec_a) != len(vec_b): | |
| raise ValueError("Vectors must be of the same length") | |
| return sum(a * b for a, b in zip(vec_a, vec_b)) | |
| def magnitude(vec: Sequence[float]) -> float: |
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
| class Node: | |
| def __init__(self, val: int, next = None, prev = None): | |
| self.val = val | |
| self.next = next | |
| self.prev = prev | |
| class LinkedList: | |
| def __init__(self): | |
| self.size = 0 | |
| self.sentinel = Node(0) |
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
| const eventName = "dvlive"; | |
| const email = "dvlive.co"; | |
| const baseId = 2098390; | |
| const quantity = 10; | |
| console.log("PromoterLink,Name,Last name, Email"); | |
| for (let i = 1; i <= quantity; i++) { | |
| const link = `https://www.ticketfairy.com/events/${eventName}?r=${baseId + i}`; | |
| const name = `Promoter ${i}`; |
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 interface Payload { | |
| original: string; | |
| short: string; | |
| createdAt: string; | |
| } | |
| const generateRandomUrl = (): string => { | |
| const protocols = ['https://', 'http://']; | |
| const domains = ['example.com', 'test.com', 'demo.org', 'sample.net', 'random.io', 'site.co', 'web.dev', 'app.ai']; | |
| const paths = ['/', '/home', '/about', '/contact', '/products', '/services', '/blog', '/api/data', '/user/profile']; |
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 nearai | |
| import json | |
| import requests | |
| hub_url = "https://api.near.ai/v1" | |
| assistant_id = "mrh2003.near/prueba/0.0.2" | |
| # Login to NEAR AI Hub using nearai CLI. | |
| # Read the auth object from ~/.nearai/config.json | |
| auth = nearai.config.load_config_file()["auth"] |
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
| ORG 0 | |
| SJMP MAIN | |
| ORG 30H | |
| MAIN: | |
| MOV P1,#00H | |
| LOOP: | |
| JB P3.3,NEXT | |
| MOV P1,#00H | |
| SJMP LOOP |
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 process from "node:process"; | |
| class Game { | |
| private state: (0 | 1 | 2)[]; | |
| private winningCombinations: number[][]; | |
| constructor() { | |
| this.state = [0, 0, 0, 0, 0, 0, 0, 0, 0]; | |
| this.winningCombinations = [ | |
| // Horizontals |
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
| cool = [2,5,3,6,9] | |
| def insertion_sort(nums): | |
| for i in range(len(nums)): | |
| min_index = i | |
| for j in range(i+1, len(nums)): | |
| if nums[j] < nums[i]: | |
| min_index = j |
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
| { | |
| "metadata":{ | |
| "version":2 | |
| }, | |
| "zaps":[ | |
| { | |
| "id":1, | |
| "title":"HTI to Excel", | |
| "nodes":{ | |
| "1":{ |
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 pLimit from "p-limit"; | |
| export interface GitHubAnalyzerResponse { | |
| success: boolean; | |
| evaluation: Evaluation; | |
| } | |
| export interface Evaluation { | |
| id: number; | |
| username: string; |
NewerOlder