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
#! /usr/bin/env python3 | |
import re | |
from quads.quads_api import QuadsApi | |
from quads.config import Config | |
quads = QuadsApi(Config) | |
hosts = quads.get_hosts() | |
pattern = r"^(?P<rack>[^-]+)-(?P<uloc>[^-]+)-(?P<blade>[^-]+)-(?P<host_type>[^.]+)\.(?P<domain>.+)$" |
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
#define POTENTIOMETER_PIN A0 | |
#define CHANGE_THRESHOLD 2 | |
#include <ESP8266WiFi.h> | |
#include <WiFiClientSecure.h> | |
#include <ArduinoJson.h> | |
#include <ESP8266HTTPClient.h> | |
// Replace with your network credentials | |
const char* ssid = "{SSID}"; |
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
/usr/bin/brave-browser-stable %U --remote-debugging-port=9222 --remote-allow-origins=http://localhost:9222 |
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
#! /usr/bin/env python | |
import subprocess | |
from subprocess import CalledProcessError | |
import time | |
def get_active_window_title(): | |
try: | |
window_title = subprocess.check_output("xdotool getactivewindow getwindowname", shell=True).decode('utf-8').strip() | |
return window_title |
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
- model: Dell R630 | |
quantity: 45 | |
specs: | |
- 2x Intel Xeon E5-2683 v3 (28 total cores, 56 threads) | |
- 128GB | |
- 2x 1TB Disk | |
- model: Dell R640 | |
quantity: 334 | |
specs: |
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
from functools import partial | |
class CommandException(Exception): | |
def __init__(self, message): | |
self.message = message | |
class Command: | |
""" |
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
#! /usr/bin/env python | |
from llama_index.core import SummaryIndex | |
from llama_index.readers.mongodb import SimpleMongoReader | |
from langchain_community.llms import HuggingFaceEndpoint | |
import os | |
os.environ["HUGGINGFACEHUB_API_TOKEN"] = {HUGGINGFACE_API_TOKEN} |
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
#! /usr/bin/env python | |
from flask import Flask, request | |
import requests | |
import json | |
import os | |
JIRA_WEBHOOK_ID = os.getenv("JIRA_WEBHOOK_ID") | |
JIRA_WEBHOOK = f"https://issues.redhat.com/rest/cb-automation/latest/hooks/{JIRA_WEBHOOK_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
#! /bin/env python | |
import yaml | |
def prompt_user(config): | |
for key in config.keys(): | |
if isinstance(config[key], dict): | |
config[key] = prompt_user(config[key]) | |
else: | |
# Convert the key into a human-friendly format | |
prompt = ' '.join(word.capitalize() for word in key.split('_')) |
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
from grafanalib.core import ( | |
Dashboard, Graph, | |
OPS_FORMAT, Row, | |
single_y_axis, Target | |
) | |
dashboard = Dashboard( | |
title="Python generated dashboard", | |
rows=[ |
NewerOlder