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 {NextApiRequest, NextApiResponse} from "next"; | |
| import {Photo} from '@prisma/client' | |
| import Busboy from "busboy"; | |
| import {PutObjectCommand, S3Client} from "@aws-sdk/client-s3"; | |
| import crypto from "crypto"; | |
| import {S3_BUCKET} from "../../constants"; | |
| const client = new S3Client({}); | |
| export async function storePhoto(ctx: { fileBuffer: Buffer, mimeType: 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
| import base64 | |
| import hashlib | |
| import hmac | |
| import math | |
| import time | |
| def dynamic_truncation(raw_key: hmac.HMAC, length: int) -> str: | |
| hex_digest: str = raw_key.hexdigest() | |
| int_repr: int = int(hex_digest, base=16) |
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 datetime | |
| import os | |
| import sys | |
| import zipfile | |
| from zipfile import ZipFile, ZipInfo | |
| from olclient import OpenLibrary, config | |
| from sqlmodel import Field, SQLModel, create_engine, Session, select | |
| import logging |
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
| # .profile | |
| # Mute spotify on ad | |
| while sleep 1; do mute_ad_spotify; done & |
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 Vala.Basics : GLib.Object { | |
| public static void post_request() { | |
| var soupSession = new Soup.Session (); | |
| var soupMessage = new Soup.Message("POST", "https://reqres.in/api/users"); | |
| var body = "{\"name\":\"morpheus\"}"; | |
| soupMessage.set_request( | |
| "application/json", | |
| Soup.MemoryUse.COPY, | |
| body.data |
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
| #!/usr/bin/env python3 | |
| import hashlib | |
| import logging | |
| import os.path | |
| import shutil | |
| import sys | |
| from pathlib import Path | |
| from typing import List |
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 datetime | |
| from datetime import timedelta | |
| from functools import reduce | |
| from typing import TextIO | |
| import icalendar | |
| ical_contents_raw: TextIO = open('/Users/bharatkalluri/Downloads/bharat@refyne.co.in.ics', 'r') | |
| ical_contents: str = ical_contents_raw.read() | |
| work_cal = icalendar.Calendar.from_ical(ical_contents) |
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 sys | |
| from typing import List | |
| from beancount.core.number import D | |
| from beancount.ingest import importer | |
| from beancount.core import amount, flags | |
| from beancount.core.data import Posting, Transaction, new_metadata | |
| from smart_importer import apply_hooks | |
| from smart_importer.detector import DuplicateDetector |
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
| import requests | |
| # find these from avalibility get request for your session | |
| TOKEN = "Bearer " | |
| CLIENT_APP_ID = "" | |
| CLIENT_USER_ID = "" | |
| # input dates here | |
| check_in = "2023-01-25" | |
| check_out = "2023-01-29" |