This file contains 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
You said: | |
Prompt: | |
for python is pyparsing library using BNF? | |
ChatGPT said: | |
Not exactly — Pyparsing doesn’t use Backus-Naur Form (BNF) directly, but it provides a more Pythonic, object-oriented approach to defining grammars. | |
BNF is a formal way to describe the syntax of languages, often used in compiler design and language parsing. Pyparsing, on the other hand, lets you build grammars by combining objects representing different parsing rules — like literals, keywords, expressions, and patterns — using Python’s operators and methods. |
This file contains 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
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <boost/parser/parser.hpp> | |
#include <boost/hana/tuple.hpp> | |
namespace bp = boost::parser; | |
struct DirEntry { | |
std::string path; |
This file contains 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
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <vector> | |
#include <boost/spirit/include/qi.hpp> | |
#include <boost/phoenix/phoenix.hpp> | |
#include <boost/fusion/include/adapt_struct.hpp> | |
namespace qi = boost::spirit::qi; | |
namespace ascii = boost::spirit::ascii; |
This file contains 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/python3 | |
import logging | |
import os | |
import struct | |
def BIT(num): | |
"""Returns a bit shifted by num""" | |
return 1 << num | |
def check_fadt(): | |
"""Check the kernel emitted a message specific to 6.0 or later indicating FADT had a bit set.""" | |
found = False |
This file contains 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 aioconsole | |
import colorama | |
import configparser | |
import json | |
import discord | |
from discord.ext import commands | |
import atexit, os, sys, readline | |
histfile = os.path.join(os.path.expanduser("~"), ".discord_history") |
This file contains 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
#List of modules triggered to load specifically by mullvad daemon. | |
Module Size Used by | |
nft_reject_inet 16384 6 | |
nf_reject_ipv4 16384 1 nft_reject_inet | |
nf_reject_ipv6 16384 1 nft_reject_inet | |
nft_reject 16384 1 nft_reject_inet | |
nft_masq 16384 1 | |
nft_ct 20480 8 | |
nft_chain_nat 16384 1 | |
nf_tables 241664 725 nft_ct,nft_reject_inet,nft_masq,nft_chain_nat,nft_reject |
This file contains 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
922 PCI -> 928 PCIe | |
9220 | |
3rd gen XSpan | |
9223 | |
Oct2009 http://153.150.70.18/AR9223.pdf | |
2x2 MIMO "Mac/BB/Radio" 802.11n 2.4ghz | |
9271 USB | |
Nov2011 http://www.datasheet.es/PDF/788267/AR9271-pdf.html |
This file contains 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
New Solutions: | |
NEW AP5881 | |
WiFi 6/6E + BT 5.2 802.11ax/ac/a/b/g/n@ SiP Module, 1T1R | |
NEW WNFQ-269AX(BT) | |
WiFi 6/6E + BT 5.2 802.11ax/ac/a/b/g/n @ M.2 2230 (E KEY), 2T2R | |
NEW WPEQ-268AXI(BT) | |
WiFi 6/6E + BT 5.2 802.11ax/ac/a/b/g/n @ Half Size MPCIe, 2T2R | |
NEW WNFQ-268AXI(BT) | |
WiFi 6/6E + BT 5.2 802.11ax/ac/a/b/g/n @ M.2 2230 (E KEY), 2T2R |
This file contains 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 | |
#Copyright 2023 - genr8eofl @IRC/gentoo | |
# github-beautiful.py - fetch GitHub repo "Description" (for many links at once) | |
# Makes 1 HTTPS connection per line, retreives the HTML page and parses it for <Title> | |
import requests | |
from requests import ReadTimeout, ConnectTimeout, HTTPError, Timeout, ConnectionError | |
from bs4 import BeautifulSoup | |
import sys | |
urlprefix="https://github.com/" |
This file contains 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/bash | |
# Copyright 2023 genr8eofl @IRC/gentoo | |
# Fetch Github Repo Descriptions. Pre-reqs: bash / jq / (curl || gh) | |
while read REPO; do | |
#REPO="torvalds/linux" #test | |
API="https://api.github.com/" | |
#DESC=$(curl -s "${API}/repos/${REPO}" | jq '.description') # rate limited | |
DESC=$(gh api "/repos/${REPO}" | jq '.description') # need GITHUB_TOKEN | |
GH="https://github.com/" | |
echo "${GH}${REPO} - ${DESC}" |
NewerOlder