Rename 03_Vagrantfile to Vagrantfile and run vagrant up
You may need a couple extra plugins. If it complains, install what is mentioned
in the error msg with vagrant install [x]
Loopback IPs are not configured here
""" | |
Script to update on-call groups based on pagerduty escalation policies | |
From: https://gist.github.com/markddavidoff/863d77c351672345afa3fd465a970ad6 | |
Slack permissions required: | |
- Installer must be able to update user groups. | |
- usergroups:read | |
- usergroups:write | |
- users:read | |
- users:read.email |
package pgtest | |
import ( | |
"context" | |
"fmt" | |
"strings" | |
"sync" | |
"testing" | |
"github.com/docker/go-connections/nat" |
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
) | |
// Little Endianed | |
var ZstdMagic = []byte("\x28\xB5\x2F\xFD") |
// Problem: https://leetcode.com/problems/number-of-islands/ | |
// ASCII byte reference | |
// 48 = "0" | |
// 49 = "1" | |
// 120 = "x" | |
package main | |
import "fmt" | |
func findBounds(input [][]byte, row, col int) int { |
import time | |
import asyncio | |
def blocking(): | |
time.sleep(5) | |
print("hell yeah") | |
async def main(): |
import asyncio | |
import logging | |
import time | |
import threading | |
import typing as t | |
import janus | |
LOG = logging.getLogger(__name__) |
import asyncio | |
import logging | |
import time | |
import threading | |
import typing as t | |
import janus | |
LOG = logging.getLogger(__name__) |
#!/bin/env python | |
def toggle_comment(lines, filename, startswith=False): | |
'''Toggle comment on lines in filename | |
Options: | |
lines (list): lines to comment. | |
filename (str): filname | |
startswith (bool): allows providing start of a line vs exact matching |
def plain_to_dot(asn): # -> str | |
'''Take ASPLAIN and return ASDOT notation | |
asn: int | |
''' | |
barray = struct.pack('>I', asn) | |
return '%d.%d' % struct.unpack('>HH', barray) | |
def dot_to_plain(asn): # -> int |