Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
// Free to use | |
// Written by Alexis Bridoux - https://github.com/ABridoux | |
import AppKit | |
#if canImport(SwiftUI) | |
import SwiftUI | |
#endif | |
// MARK: Model |
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json" |
--taken from http://benguild.com/2012/04/11/how-to-import-tasks-to-do-items-into-ios-reminders/#comment-1346894559 | |
--set theFileContents to (read file "Users:n8henrie:Desktop:Reminders.txt") -- Change this to the path to your downloaded text file with your tasks in it! (Note the : instead of a / between folders) Or, just name them Reminders.txt and put them in your downloads folder | |
--set theLines to paragraphs of theFileContents | |
set theLines to {"task name 1", "task name 2"} | |
repeat with eachLine in theLines | |
tell application "Reminders" | |
set mylist to list "Your List Name" | |
tell mylist | |
make new reminder at end with properties {name:eachLine, due date:date "7/10/2014 3:00 PM"} |
Key Name Resulting Keystroke | |
{F1} - {F24} Function keys. For example: {F12} is the F12 key. | |
{!} ! | |
{#} # | |
{+} + | |
{^} ^ | |
{{} { | |
{}} } | |
{Enter} ENTER key on the main keyboard | |
{Escape} or {Esc} ESCAPE |
-- A global variable for the Hyper Mode | |
k = hs.hotkey.modal.new({}, "F17") | |
-- Trigger existing hyper key shortcuts | |
k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end) | |
-- OR build your own | |
launch = function(appname) |
" tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence | |
" http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users | |
if exists('$TMUX') | |
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
else | |
let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
endif |
# need install asconnect: pip install asconnect, and openai: pip install openai | |
import asconnect | |
import os | |
import openai | |
#api key: https://developer.apple.com/documentation/appstoreconnectapi/creating_api_keys_for_app_store_connect_api | |
APPCONN_APIKEY_ID = "xxxxx" | |
APPCONN_ISSUER_ID = "xxxxxxx" | |
APPCONN_KEY_FILE = "xxxxx.p8" |
// alterkeys.c | |
// http://osxbook.com | |
// | |
// Complile using the following command line: | |
// gcc -Wall -o alterkeys alterkeys.c -framework ApplicationServices | |
// | |
// You need superuser privileges to create the event tap, unless accessibility | |
// is enabled. To do so, select the "Enable access for assistive devices" | |
// checkbox in the Universal Access system preference pane. |
// | |
// FVRInAppPurchaseVC.swift | |
// favroutes | |
// | |
// Created by wisaruthk on 10/8/2558 BE. | |
// Copyright © 2558 kojo. All rights reserved. | |
// | |
import UIKit | |
import StoreKit |