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 datetime import datetime, timedelta | |
| from typing import List | |
| import csv | |
| START_TIME = datetime.now() | |
| def call_api(symbol_string) -> str: | |
| """ | |
| Please just ignore this method. It's just a mock for the sake of the example. |
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
| using System.Collections.Immutable; | |
| using Microsoft.CodeAnalysis; | |
| using Microsoft.CodeAnalysis.CSharp.Syntax; | |
| using Microsoft.CodeAnalysis.Diagnostics; | |
| using DiagnosticDescriptor = Microsoft.CodeAnalysis.DiagnosticDescriptor; | |
| using DiagnosticSeverity = Microsoft.CodeAnalysis.DiagnosticSeverity; | |
| using LanguageNames = Microsoft.CodeAnalysis.LanguageNames; | |
| using SyntaxKind = Microsoft.CodeAnalysis.CSharp.SyntaxKind; | |
| namespace Gist; |
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 PIL import Image | |
| from pathlib import Path | |
| def compress_image(source: Path, destination: Path, quality=20): | |
| with Image.open(source) as image: | |
| rgb_image = image.convert('RGB') | |
| rgb_image.save(destination, quality=quality, optimize=True, format='JPEG') | |
| def compress_images(source_folder: Path, destination_folder: Path, globs: list[str], quality: int = 25): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| events { | |
| } | |
| http { | |
| resolver 127.0.0.11 ipv6=off valid=1s; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Forwarded-For $remote_addr; | |
| proxy_set_header X-Forwarded-Proto $scheme; |
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
| services: | |
| api: | |
| image: olivervea/veachron-api:latest | |
| environment: | |
| DB_HOST: db | |
| DB_USER: user | |
| DB_PASSWORD: password | |
| LOG_LEVEL: WARNING | |
| ui: |
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
| struct Pt { | |
| double d, angle; | |
| }; | |
| // Polar coordinates of the points (-2, 1) and (5, 1) respectively. | |
| std::vector<Pt> points = { { 2.2360679774997898, 2.6779450445889870 }, { 5.0990195135927845, 0.19739555984988075 } }; | |
| double a, r = 0; | |
| double n = points.size(); |