This file contains 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
func main() { | |
resp, err := http.Get("https://httpbin.org/get") |
This file contains 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
#!/bin/bash | |
# Loop through each .mkv file in the current directory | |
for file in *.mkv; do | |
# Extract the filename without extension | |
filename=$(basename "$file" .mkv) | |
# Convert the .mkv file to .mp4 using FFMpeg | |
ffmpeg -i "$file" -vcodec libx264 -crf 27 -preset veryfast -c:a copy -s 960x540 "${filename}.mp4" & | |
done |
This file contains 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
def find_max(arr): | |
max = arr[0] | |
for num in arr: | |
if num > max: | |
max = num | |
return max | |
arr = [5, 10, 3, 8, 15] | |
max_num = find_max(arr) | |
print("Maximum element in the list:", max_num) |
This file contains 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
#include <stdio.h> | |
int find_max(int arr[], int size) { | |
int max = arr[0]; | |
for (int i = 1; i < size; i++) { | |
if (arr[i] > max) { | |
max = arr[i]; | |
} | |
} | |
return max; |
This file contains 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
torch | |
torchvision | |
starlette | |
uvicorn | |
transformers | |
pytesseract | |
ipython | |
accelerate |
This file contains 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 openai | |
import os | |
import json | |
from typing import List | |
from pydantic import BaseModel | |
# set Open AI API Key | |
api_key = os.getenv("OPENAI_API_KEY") | |
assert api_key is not None, "API Key not set in environment" |
This file contains 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 json | |
class Color: | |
name = None | |
found_in = None | |
def __init__(self, name) -> None: | |
self.name = name | |
This file contains 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 json | |
colors = [ | |
{ | |
"name": "RED", | |
"foundIn": "soil" | |
}, | |
{ | |
"name": "GREEN", | |
"foundIn": "forest" |
This file contains 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 json | |
colors = [ | |
{ | |
"name": "RED", | |
"foundIn": "soil" | |
}, | |
{ | |
"name": "GREEN", | |
"foundIn": "forest" |
This file contains 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
{ | |
"languages": { | |
"python": { | |
"name": "Python", | |
"author": "Guido Van Rossum", | |
"usedFor": ["Scripting", "Web Development", "Text processing", "Data Science"] | |
}, | |
"go": { | |
"name": "Go", | |
"author": "Google", |