Skip to content

Instantly share code, notes, and snippets.

View gqqnbig's full-sized avatar

QQ喵 gqqnbig

View GitHub Profile
@gqqnbig
gqqnbig / gist:b4816e90a60c21174a7ec26779be3cec
Last active December 10, 2020 04:32
Pycharm External Documentation Configurations

I have to use Chrome extension Requestly to deal with the paths of some libraries.

Due to the removal of the export function in the free version of Requestly, I'm not going to update these Requestly rules. Please let me know if you like another form of solution! (https://app.requestly.io/pricing)

Tensorflow

tensorflow_core: https://www.tensorflow.org/api_docs/python/{element.qname.slashes}#{functionToProperty.name}

Import the shared rule to Requestly: https://app.requestly.io/rules/#sharedList/1605688738767-Pycharm or import the following text version.

\documentclass[]{article}
\begin{document}
\newcount\vb\vb=1\relax\the\vb
\newcount\vc\vc=2\relax\the\vc
\newcount\vd\vd=3\relax\the\vd
@gqqnbig
gqqnbig / instant-slurm.sh
Last active November 17, 2022 23:51 — forked from mslacken/instant-slurm.sh
Script to setup slurm on a single node
#!/bin/bash
# Copyright (C) 2019 by Christian Goll <cgoll@suse.de>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
@gqqnbig
gqqnbig / gist:708b831bdd2cf9b41469082d374b1615
Created January 12, 2023 08:16 — forked from sebfisch/gist:2235780
Laymans explanation of delimited continuations with examples of using them for exception handling and nondeterministic programming.

Delimited Continuations

Delimited continuations manipulate the control flow of programs. Similar to control structures like conditionals or loops they allow to deviate from a sequential flow of control.

We use exception handling as another example for control flow manipulation and later show how to implement it using delimited continuations. Finally, we show that nondeterminism can also be expressed using delimited continuations.

Exception Handling

@gqqnbig
gqqnbig / addBlockCount
Created February 11, 2024 13:47
Add block count to ufw status report
#!/bin/awk
{
ORS=""
print $0
if ($2 == "DENY" && $3 ~ /\.0\/24$/ && $4 == "(log)") {
subnet=substr($3, 0,length($3)-4)
print "\t\t"
#print subnet
print "grep -F " subnet " /var/log/ufw.* | wc -l\n" | "/bin/bash"