Skip to content

Instantly share code, notes, and snippets.

View themacmarketer's full-sized avatar

eBizGrow themacmarketer

View GitHub Profile
@themacmarketer
themacmarketer / wsort.py
Created July 22, 2023 04:20
This is a Python script that uses the wxPython library to create a graphical user interface (GUI) application for sorting files in a specified directory based on a defined set of topics and associated keywords.
/*
This is a Python script that uses the wxPython library to create a graphical user interface (GUI) application for sorting files in a specified directory based on a defined set of topics and associated keywords.
At the start, several libraries are imported: `os` and `shutil` for file and directory manipulation, `wx` for creating the GUI, `json` for reading and writing JSON data, and `re` for regular expression operations.
A constant named `TOPICS_FILE` is defined, which is the name of the JSON file that stores topics and their associated keywords.
The `load_topics` function checks if the `TOPICS_FILE` exists, and if it does, opens the file and loads the JSON data into a Python dictionary. If the file does not exist, it returns an empty dictionary.
The `MainFrame` class is the main application window. It contains controls for directory selection (`DirPickerCtrl`), a text area to display the topics and keywords (`TextCtrl`), and three buttons ("Process Files", "Undo Sort", and "Exit").
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://mysite.com/$1 [R=301,L]
@themacmarketer
themacmarketer / scraper.rb
Created September 10, 2018 09:42 — forked from rodloboz/scraper.rb
livecode scraping
require 'open-uri'
require 'nokogiri'
require 'pry-byebug'
BASE_URL = "https://www.imdb.com"
def fetch_urls
url = "https://www.imdb.com/chart/top"
html_file = open(url).read # string
html_doc = Nokogiri::HTML(html_file) #Nokogiri::HTML::Document
Sub addCustomSlideNumber()
On Error Resume Next
Dim PPSlide As Slide
For Each PPSlide In ActivePresentation.Slides
PPSlide.Shapes("customNumberBox").Delete
Next
Dim x As Integer
Dim slideToNumber As Slide