# Check for Nvidia Hardware
lspci | grep -i nvidia
# Update
apt update
apt upgrade
# Install Nvidia drivers
apt install nvidia-driver-535 nvtop
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 os | |
import argparse | |
import requests | |
from datetime import datetime | |
# Define the parser for command line arguments | |
parser = argparse.ArgumentParser(description='Groq Whisper transcribe') | |
parser.add_argument('file', type=str, help='Audio file to transcribe') | |
parser.add_argument('--output_file', type=str, help='File to write output', default="transcription.txt") | |
args = parser.parse_args() |
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 -e | |
# mirror_test.sh | |
# benchmarks closest ubuntu mirrors and outputs them in speed order | |
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/lox/9152137/raw/mirror_test.sh)" | |
RELEASE=$(lsb_release -c -s 2>/dev/null || echo 14.04) | |
MIRRORS=$(curl -s http://mirrors.ubuntu.com/mirrors.txt) | |
TESTFILE="dists/$RELEASE/main/binary-amd64/Packages.bz2" | |
TIMEOUT=1 |
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
# https://help.drata.com/en/articles/4994112-gcp-connection-details | |
# Create a new project for Drata Integration | |
resource "google_project" "drata" { | |
name = var.project_name | |
project_id = var.project_id | |
org_id = var.org_id | |
billing_account = var.billing_account_id | |
auto_create_network = false | |
} |
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 { BatchInterceptor } from '@mswjs/interceptors' | |
import { ClientRequestInterceptor } from '@mswjs/interceptors/ClientRequest' | |
import { FetchInterceptor } from '@mswjs/interceptors/fetch' | |
import http from 'http' | |
const interceptor = new BatchInterceptor({ | |
name: 'my-interceptor', | |
interceptors: [new ClientRequestInterceptor(), new FetchInterceptor()], | |
}) |
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
// See https://cloud.namespace.so/docs/federation/gcp | |
locals { | |
roles = [ | |
"roles/resourcemanager.projectIamAdmin", # allow managing identity | |
"roles/editor", # allow to manage all resources | |
"roles/iam.serviceAccountAdmin", # allow to manage service accounts | |
] | |
} |
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
addEventListener('fetch', (event) => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
/** | |
* Intercept requests and redirect to Firestore API | |
* @param {Request} request | |
*/ | |
async function handleRequest(request) { | |
const url = new URL(request.url) |
Grout is an HTTP-based front proxy that delegates portions of a url path space to other web applications. This allows for a web application to be composed of a collection of micro-services.
Beyond routing based on url, language or ip-based region, Grout provides downstream services with a unique per-request X-Grout-Id
and a per-session X-Grout-Session
header for simple cross-service sessions.
Presently 99designs.com is composed of 2-3 different web applications. Varnish sits in front of these web applications and dispatches requests to the appropriate backend based on some complicated regular expressions and a large chunk of complicated VCL.
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 | |
# Enable bash strict mode | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Disable the pager for aws commands (no less on the host) | |
export AWS_PAGER="" | |
# Get the log group arn as a parameter and cut the group name out of it |
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
<?php | |
namespace Aws\S3; | |
/** | |
* @category Amazon | |
* @package AWS | |
* @copyright Copyright 2009 Amazon Technologies, Inc. | |
* @link http://aws.amazon.com | |
* @license http://aws.amazon.com/apache2.0 Apache License, Version 2.0 |
NewerOlder