Skip to content

Instantly share code, notes, and snippets.

View billmetangmo's full-sized avatar

Bill Metangmo billmetangmo

  • France
View GitHub Profile
api_server-1 | 09/05/2024 03:44:04 PM users.py 76 : Using Auth Type: basic
api_server-1 | ERROR: Traceback (most recent call last):
api_server-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1968, in _exec_single_context
api_server-1 | self.dialect.do_execute(
api_server-1 | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 920, in do_execute
api_server-1 | cursor.execute(statement, parameters)
api_server-1 | psycopg2.errors.UndefinedTable: relation "connector_credential_pair" does not exist
api_server-1 | LINE 2: FROM connector_credential_pair
api_server-1 | ^
api_server-1 |
@billmetangmo
billmetangmo / notes.md
Created August 26, 2024 15:13
Test outlines for tool extraction using modal
title date author categories tags
Meeting 36
2024-08-07
collectif mongulu
Meeting notes
generative-ai
data-tools
developer-tools
devops
machine-learning

Recommandations


RUN_IDS=$(gh run list --repo $REPO --json databaseId --limit 50 | jq -r '.[1:] | .[].databaseId')
Delet all runs: gh run delete --repo $REPO 10143283850
@billmetangmo
billmetangmo / draw.py
Created July 2, 2024 14:28
Graph distribution of resources
import pandas as pd
import matplotlib.pyplot as plt
# Load the CSV file
file_path = '/mnt/data/resources(2).csv'
data = pd.read_csv(file_path)
# Calculate the number of resources per region
resources_per_region = data['Region'].value_counts().reset_index()
resources_per_region.columns = ['Region', 'Number of Resources']
@billmetangmo
billmetangmo / deny_regions.json
Created July 2, 2024 09:55
scp deny all unused regions
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyCreateResourcesInSpecificRegions",
"Effect": "Deny",
"Action": [
"*"
],
"Resource": "*",
@billmetangmo
billmetangmo / gist:262fb7f2d379a4ea4c7d3bd499aa7c3b
Last active June 26, 2024 02:07
sample argo applicationset
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: easyappointments-preview
namespace: argocd
spec:
generators:
- pullRequest:
github:
owner: mongulu-cm
import unittest
from typing import List, Dict
from tqdm import tqdm
def distribute_elements(stream: List[int], servers: List[str], weights: List[int]) -> Dict[str, List[int]]:
if len(servers) != len(weights):
raise ValueError("The number of servers and weights must be the same.")
total_weight = sum(weights)
normalized_weights = [weight / total_weight for weight in weights]
@billmetangmo
billmetangmo / cfn-patches.yml
Last active January 4, 2024 11:42
Code to add a new domain to aws copilot
- op: add
path: /Resources/HTTPSRulePriorityAction1
value:
Metadata:
'aws:copilot:description': 'Custom resource assigning priority for the first HTTPS listener rule'
DependsOn: HTTPSListenerRule
Type: Custom::RulePriorityFunction
Properties:
ServiceToken: !GetAtt RulePriorityFunction.Arn
RulePath: ["/"]
@billmetangmo
billmetangmo / gitab-pipelines-stages-histogram.py
Created October 6, 2023 11:17
Generate histogram from gitlab pipelines scrape with Bardeen
import pandas as pd
import datetime
import re
import matplotlib.pyplot as plt
# Load the CSV file
df = pd.read_csv("/mnt/data/06-10-2023_10-10.csv")
# Function to convert status text to timedelta
def convert_to_timedelta_updated_with_weeks(text):