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 | |
CONFIG_FILE="$HOME/Library/Application Support/Claude/claude_desktop_config.json" | |
# Check if the config file exists | |
if [ ! -f "$CONFIG_FILE" ]; then | |
echo "Config file not found: $CONFIG_FILE" | |
exit 1 | |
fi |
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 psycopg2 | |
import pandas as pd | |
import pyarrow.parquet as pq | |
import pyarrow as pa | |
import glob | |
# PostgreSQL connection | |
conn_pg = psycopg2.connect( | |
host="db_host, | |
database="drumwave", |
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 | |
# Variables | |
GITHUB_ORG=reddrummer | |
GITHUB_TOKEN=$DRUMWAVE_GITHUB_TOKEN | |
# Set GitHub CLI authentication | |
export GH_TOKEN=$GITHUB_TOKEN | |
# Check if `gh` CLI is installed |
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
name: Scan for CVEs | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
repository_dispatch: | |
types: | |
- sync-prs |
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 | |
# set -x | |
inst_id=$(ec2metadata --instance-id) | |
while : | |
do | |
used_megs=$(free --mega | awk 'NR!=1 {print $3}' | head -1) | |
aws cloudwatch put-metric-data \ | |
--region us-west-2 \ |
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 findEqualParts(remArr, half, s, d=0): | |
for i in range(len(remArr)): | |
remArr2 = remArr[:] | |
diff = s - remArr2[i] | |
# print(f"Entering findEqualParts({remArr}, {half}, {s}; diff is {diff}, i is {i}, d is {d}") | |
if diff > 0: | |
half2 = half[:] | |
half2.append(remArr2[i]) | |
s2 = s - remArr[i] | |
del remArr2[i] |
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 | |
# Parse the output and generate a Deployment Manager configuration file | |
echo "resources:" > config0.yaml | |
echo "outputs:" > outputs0.yaml | |
# List all Cloud Run services and their attributes | |
services=$(gcloud run services list --format="csv(NAME, REGION, IMAGE)" --quiet | tail -n+2) |
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 ( | |
"context" | |
"fmt" | |
"sync" | |
"time" | |
) | |
func withCancel() { |
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" | |
func plus[T int | float32](i1 T, i2 T) T { | |
return i1 + i2 | |
} | |
func minus[T int | float32](i1 T, i2 T) T { | |
return i1 - i2 |
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" | |
"strconv" | |
"sync" | |
"sync/atomic" | |
) | |
// No deadlock on all sleeping, etc. |
NewerOlder