Watch the breakdown here in a Q4 2024 prompt engineering update video
- Quick, natural language prompts for rapid prototyping
- Perfect for exploring model capabilities and behaviors
Watch the breakdown here in a Q4 2024 prompt engineering update video
| function timeCalc(millis) { | |
| var minutes = Math.floor(millis / 60000) | |
| var seconds = parseInt(((millis % 60000) / 1000).toFixed(0)) | |
| return minutes + ':' + (seconds < 10 ? '0' : '') + seconds | |
| } | |
| let start = new Date().getTime() | |
| /** operation .... */ |
| version: "3" | |
| services: | |
| mongo1: | |
| hostname: mongo1 | |
| container_name: mongo1 | |
| image: mongo:5.0.6 | |
| expose: | |
| - 27017 | |
| ports: | |
| - 27011:27017 |
| version: "3" | |
| services: | |
| mongo1: | |
| hostname: mongo1 | |
| container_name: localmongo1 | |
| image: mongo:4.0-xenial | |
| expose: | |
| - 27017 | |
| ports: | |
| - 27011:27017 |
| function parseTime( | |
| time: number | |
| ): { hours: number; minutes: number; seconds: number; milliseconds: number } { | |
| const date = new Date(time); | |
| const hours = date.getHours() + date.getTimezoneOffset() / 60 - 24; | |
| const minutes = date.getMinutes(); | |
| const seconds = date.getSeconds(); | |
| const milliseconds = date.getMilliseconds(); | |
| return { | |
| hours, |
| const fs = require('fs'); | |
| fs.readdirSync('.').forEach(file => { | |
| console.log(file); | |
| }); |
| /** Vercel they provide some environment variables you could use to get the latest Git SHA: */ | |
| const COMMIT_SHA = | |
| VERCEL_GITHUB_COMMIT_SHA || | |
| VERCEL_GITLAB_COMMIT_SHA || | |
| VERCEL_BITBUCKET_COMMIT_SHA | |
| /** Otherwise you'd need to get it yourself */ |
| var splitInteger = function(num, parts) { | |
| const remainder = num % parts | |
| const value = (num - remainder) / parts | |
| return Array(parts).fill(value).fill(value + 1, 0, remainder); | |
| } | |
| console.log(splitInteger(25,5)) | |
| // Input: X = 25, N = 5 |
| function maskify(input) { | |
| return input.replace(/.(?=.{4})/g, "#"); | |
| } | |
| /** _Tests__ **/ | |
| let assert = require('chai').assert | |
| require('mocha').describe; | |
| require('mocha').it; |
| version: '3.3' | |
| services: | |
| db: | |
| image: mysql:5.7 | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| restart: always | |
| environment: | |
| MYSQL_ROOT_PASSWORD: root_password |