Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Fortyseven's full-sized avatar
🥃
🟥🟧🟨⬜

Toby D Fortyseven

🥃
🟥🟧🟨⬜
View GitHub Profile
The user will provide you with a description, and you are to generate an SVG file that draws what the user wants.
TIPS:
- Think through the visual layout of the design. Explain step by step how that might look. And with each step, imagine how those steps might be implemented using SVG commands.
- Think about exactly where in 2D space the items are in relation to each other.
- Take into account the drawing order of the objects. Do not allow objects meant to be in front appear earlier in the rendering.
- Consider the color of the objects you are drawing.
- The thickness and length of lines are important.
- Take color and composition of the entire scene into account.
// ==UserScript==
// @name 3D DOM viewer (Fortyseven hack)
// @namespace https://gist.github.com/Fortyseven/2c8486ad2e1ad07049120748bc87d2a5
// @version 2024-03-27
// @description 3D DOM viewer
// @author OrionReed (forked by hf02 (forked by Fortyseven)
// @match *://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant GM_registerMenuCommand
// ==/UserScript==
You are a forensic information analyst. The user will provide you a block of text from a news article, or other source.
You are to extract and summarize all the important pieces of information in the text.
You will then create a list all of the locations and organizations involved and who and where they are.
You will then create a list all of the people involved and who they are.
Create a timeline of events based on the dates and times provided in the text, where applicable.
This file has been truncated, but you can view the full file.
{
"gvlSpecificationVersion":3,
"tcfPolicyVersion":4,
"features":{
"1":{
"illustrations":[
],
"id":1,
"name":"Match and combine data from other data sources",
#! /usr/bin/env python
import argparse
# yes we could just slot in the country code but I wanted to
# do more with this, and I get the benefit of a dict with the
# valid entries in it
PLAYLISTS_BY_COUNTRY = {
#!/usr/bin/env python3
from posixpath import basename
from rich import print
from rich.table import Table
from rich.console import Console
import argparse
import re
import os
import sys
@Fortyseven
Fortyseven / extract-grid-overview.py
Last active August 17, 2022 18:59
Creates a montage grid of frames from a video file with frame and time offset labels to help give a basic summary of the video file contents.
#!/usr/bin/env python3
'''
Creates a montage grid of frames from a video file with frame and
time offset labels to help give a basic summary of the video file contents.
'''
# ----------------------------------------------------------------------------
# REQUIRES: This script requires `ffmpeg`` (including `ffprobe``) and
# imagemagick (with `convert` and `montage`) to be available on the path.
#
@Fortyseven
Fortyseven / nemo-exiftoo.py
Created May 9, 2022 17:37
Nemo exiftool extension
import subprocess
from urllib.parse import unquote
from gi.repository import Nemo, GObject, Gtk
EXCLUDE_FIELDS = ["ExifTool Version Number"]
class ExifInfo(GObject.GObject, Nemo.PropertyPageProvider):
def get_property_pages(self, files):
if len(files) != 1:
#!/usr/bin/env python
# import requests
import argparse
from lxml import etree
from termcolor import colored
COLORS = [
# 'grey',
'red',
#!/bin/sh
if [ -z "$1" ]; then
echo "usage: data-url file" >&2
exit 1
fi
mimetype=$(file -bN --mime-type "$1")
content=$(base64 < "$1")
echo "data:$mimetype;base64,$content"