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 requests | |
| import json | |
| from collections import defaultdict | |
| from datetime import datetime | |
| def get_team_schedule(team_abbrev, season): | |
| """ | |
| Get all games for a team in a season | |
| Args: |
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 requests | |
| import json | |
| def get_shootout_results(game_id): | |
| """ | |
| Fetch and parse shootout results from NHL API | |
| Args: | |
| game_id: NHL game ID (e.g., 2025020485) | |
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
| # cat /usr/lib/systemd/system-sleep/nm-suspend.sh | |
| #!/bin/bash | |
| case $1 in | |
| pre) | |
| nmcli radio wifi off | |
| ;; | |
| post) | |
| nmcli radio wifi on | |
| ;; | |
| esac |
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 """ mockup language engine for plugins """ | |
| import json | |
| js = '{"name":"command_name", "prompt": [{"question": "where do you want to ping", "var": "dest"},{"question": "ping from", "var": "src"}], "handler": "some_function", "query": "ping $dest from $src"}' | |
| j = json.loads(js) | |
| def some_function(j): | |
| print(f"command: {j['name']}") | |
| answer = {} | |
| for q in j['prompt']: |
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 | |
| class command(object): | |
| def ratelimit(*args, **kwargs): | |
| limit = args[0] | |
| def ratelimit_wrapper(func): | |
| print(f"rate: {limit}") | |
| print("begin: ratelimit_wrapper") | |
| # some stuff | |
| print("end: ratelimit_wrapper") |
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
| class Alpha(Cosmos): | |
| def __init__(self): | |
| self.name = "Alpha.class" |
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
| { | |
| "agent": { | |
| "run_as_user": "cwagent" | |
| }, | |
| "metrics": { | |
| "metrics_collected": { | |
| "procstat": { | |
| "pattern": "/usr/bin/java -jar report-service.jar", | |
| "measurement": [ | |
| "pid_count" |
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
| - hosts: all | |
| tasks: | |
| - name: Installing git | |
| become: true | |
| become_user: root | |
| yum: | |
| name: git | |
| state: latest |
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 JsonSettings() | |
| set expandtab | |
| set shiftwidth=2 | |
| set tabstop=2 | |
| endfunction | |
| :command Json :call JsonSettings() |
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
| __module_name__ = "wat" | |
| __module_version__ = "1.0" | |
| __module_description__ = "say wat!" | |
| import hexchat | |
| import re | |
| from datetime import datetime | |
| from datetime import timedelta | |
| def count_words(somevar): |
NewerOlder