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
// | |
// OllamaContentView.swift | |
// | |
// Created by Saamer Mansoor on 4/1/25. | |
// | |
import SwiftUI | |
import Foundation | |
struct OllamaContentView: View { | |
@State var prompt: PromptModel = .init(prompt: "", model: "", system: "") |
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
// YouTube Video link : https://youtu.be/MlbEel7bB8o | |
// Pre-reqs: Scrape the Data from the YCombinator job board (https://www.workatastartup.com/. Clean (Lint) the data to ensure it's ready for analysis. | |
// Code to display job listings and their corresponding salaries. | |
const fs = require('fs').promises; | |
async function printFileContents() { | |
const filePath = 'yc-jobs.json'; | |
try { |
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
# Create a table with 7 rows in Google Sheets and Copy the data with the headers and paste it in here: https://codepen.io/saamerm/pen/NWVZyEm | |
# Then get the json from that codepen and replace the variable in line 8 with the new json | |
import os | |
import requests | |
import json | |
# Sample JSON data | |
hotels = [ | |
{ | |
"HotelId": "1085", |
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 os | |
from PIL import Image | |
# Folder containing your images | |
folder_path = os.getcwd() | |
# Desired output size | |
target_size = (450, 180) | |
# Iterate over files in the folder |
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
function Invoke-EmailAPI { | |
param ( | |
[hashtable]$body | |
) | |
# Define the API endpoint | |
$url = "{URL}" | |
# Define the authorization token | |
$token = "afasfa23414" |
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 socket # Doesn't need installation | |
import pyaudio # Requires another package | |
import audioop # Doesn't need installation until python 3.13 | |
import time | |
# Constants for the UDP socket | |
UDP_IP = "192.168.0.194" # Listen on all local IPs | |
UDP_PORT = 9444 # Port number to listen on | |
SUBSCRIBE_INTERVAL = 15 # in seconds |
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 Network | |
class NetworkMonitor: ObservableObject { | |
@Published var isInternetAvailable = false | |
init() { | |
startMonitoring() | |
} | |
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
function doGet(request){ | |
var result = processRequest(request); | |
return ContentService | |
.createTextOutput(result) | |
.setMimeType(ContentService.MimeType.TEXT); | |
} | |
function processRequest(e) | |
{ | |
// Open Google Sheet using ID |
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
# N.B. When changing this file, run this in the Terminal to load the updated values: 'npm run start -- --reset-cache' | |
NODE_ENV=development | |
# the URL to the GraphQL api | |
API_URL=https://sonesta-gateway-test.azure-api.net/member/graphql | |
API_URL_GUEST=https://sonesta-gateway-test.azure-api.net/guest/graphql | |
API_URL_HEALTHCHECK=https://sonesta-gateway-test.azure-api.net/healthcheck/v1.1/heartbeat | |
API_SUBSCRIPTION_KEY=5e60f927beb2407195a1ca72583c1507 |
NewerOlder