Skip to content

Instantly share code, notes, and snippets.

View BeyondEvil's full-sized avatar

Jim Brännlund BeyondEvil

View GitHub Profile
@BeyondEvil
BeyondEvil / BUILD.bazel
Created October 29, 2022 15:46
bazel js image
# apps/gamma/BUILD.bazel
load("//docker:js_image_layer.bzl", "js_image_layer")
load("@aspect_rules_js//js:defs.bzl", "js_binary", "js_library")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
load("@io_bazel_rules_docker//container:layer.bzl", "container_layer")
npm_link_all_packages(name = "node_modules")
import requests
def main():
timeout=None
print(f"Timeout is: {timeout}")
response = requests.get(
"https://shootnscoreit.com/api/ipsc/match/<some match ID>/",
auth=("<user email>", "<user password>"),
headers={
import pytest
@pytest.fixture(scope="module")
def module_function():
yield [1,2,3]
@pytest.fixture(scope="function")
def function_function(module_function):
return module_function
E selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
E (unknown error: DevToolsActivePort file doesn't exist)
E (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
E (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.15.0-1028-gcp x86_64)
Mar 18 21:48:19 pms kernel: ------------[ cut here ]------------
Mar 18 21:48:19 pms kernel: WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:300 dev_watchdog+0x248/0x260
Mar 18 21:48:19 pms kernel: NETDEV WATCHDOG: enp2s0f0 (tg3): transmit queue 0 timed out
Mar 18 21:48:19 pms kernel: Modules linked in: binfmt_misc rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crc32_pclmul snd_hda_codec_hdmi snd_hda_codec_cirrus snd_hda_codec_generic ghash_clmulni_intel aesni_intel iTCO_wdt snd_hda_intel iTCO_vendor_support lrw snd
Mar 17 23:38:33 Updated: libgcc-4.8.5-16.el7_4.2.x86_64
Mar 17 23:38:33 Updated: systemd-libs-219-42.el7_4.10.x86_64
Mar 17 23:38:33 Updated: 12:dhcp-libs-4.2.5-58.el7.centos.3.x86_64
Mar 17 23:38:33 Updated: libstdc++-4.8.5-16.el7_4.2.x86_64
Mar 17 23:38:39 Updated: plexmediaserver-1.12.0.4829-6de959918.x86_64
Mar 17 23:38:41 Updated: systemd-219-42.el7_4.10.x86_64
Mar 17 23:38:42 Updated: cpp-4.8.5-16.el7_4.2.x86_64
Mar 17 23:38:42 Updated: 12:dhcp-common-4.2.5-58.el7.centos.3.x86_64
Mar 17 23:38:43 Updated: libmonosgen-2_0-1-5.10.0.160-0.xamarin.1.epel7.x86_64
Mar 17 23:38:43 Updated: mono-winfxcore-5.10.0.160-0.xamarin.1.epel7.x86_64
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
Mar 17 23:22:27 pms kernel: nfs: server qnap not responding, still trying
import re
import operator as op
from collections import defaultdict
def read_input():
with open('input.txt', 'r') as f:
return f.read().strip()
import collections
def read_input():
with open('input.txt', 'r') as f:
return f.read().strip()
def build(components, curr_port, visited=None):
if visited is None:
import networkx as nx
def read_input():
with open('input.txt', 'r') as f:
return f.read().strip()
def get_strength(graph, path):
return graph.subgraph(path).size('weight')