Skip to content

Instantly share code, notes, and snippets.

KhanradCoder /
Created Apr 11, 2020
Code for the video where we build a Jarvis like virtual assistant in python 3
import wolframalpha
client = wolframalpha.Client("lilpumpsaysnopeeking")
import wikipedia
import PySimpleGUI as sg
layout =[[sg.Text('Enter a command'), sg.InputText()],[sg.Button('Ok'), sg.Button('Cancel')]]
window = sg.Window('PyDa', layout)
Zearin /
Last active Aug 3, 2021
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.

Q: How can I make a chain of function decorators in Python?

If you are not into long explanations, see [Paolo Bergantino’s answer][2].

AO8 /
Last active Aug 3, 2021
Convert an HTML table into a CSV file with Python and BeautifulSoup.
# Adapted from example in "Web Scraping with Python, 2nd Edition" by Ran Mitchell.
import csv
from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen(""
soup = BeautifulSoup(html, "html.parser")
table = soup.findAll("table", {"class":"wikitable"})[0]
View countryCodes.js
export default [
text: "Afghanistan (+93)",
value: "+93",
flag: "af",
key: "af",
text: "Aland Islands",
value: "",
rickdaalhuizen90 / .bashrc
Created Feb 12, 2017
Parrot Os bash theme for ubuntu
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
View policy.json
"Version": "2012-10-17",
"Statement": [
"Action": "ec2:*",
"Effect": "Allow",
"Resource": "*"
"Effect": "Allow",
jeremyzilar /
Last active Aug 3, 2021
Copy Trello Board as text or markdown

Copy Trello Board as text or markdown

Wouldn't it be nice to copy out your Trello board as plain text or markdown to be able to put it in a weekly memo, shipping notice or release notes? Now you can!

How to use this

Copy this line of JS and paste it into the CONSOLE in your browser. The results will be saved to your clipboard.

Option 1: Copy your Trello Board as Markdown

This will copy your columns + cards as markdown right to left

var s = []; s.push("# " + jQuery(".board-header").children()[0].innerText); jQuery.fn.reverse = [].reverse; jQuery(".list:has(.list-header-name)").reverse().each(function() {s.push("\n## " + jQuery(this).find(".list-header-name-assist")[0].innerText + "\n"); jQuery(this).find(".list-card-title").each(function() {s.push("* " + this.innerText); }); }); copy(s.join("\n"));
operatino /
Last active Aug 3, 2021 — forked from nrollr/
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
mattifestation / CIPolicyParser.ps1
Last active Aug 3, 2021
Functions to recover information from binary Windows Defender Application Control (WDAC) Code Integrity policies.
View CIPolicyParser.ps1
# Ensure System.Security assembly is loaded.
Add-Type -AssemblyName System.Security
function ConvertTo-CIPolicy {
Converts a binary file that contains a Code Integrity policy into XML format.
Author: Matthew Graeber (@mattifestation)
nberlette / BmwSvg.jsx
Created May 25, 2021
BMW Logo SVG as a React Native Component.
View BmwSvg.jsx
import * as React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import Svg, { SvgProps, Use, Symbol, G, Path } from "react-native-svg"
export default function BmwSvg(props: SvgProps) {
return (
<Svg style={styles.logo} width="80%" height="80%" focusable="false" {...props}>
<Use xmlnsXlink="" xlinkHref="#icon-bmw-logo-gray">
<Symbol viewBox="0 0 340 340" id="icon-bmw-logo-gray" xmlns="">
<G fill="#6f6f6f">