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
import glob | |
import re | |
import requests | |
import os.path | |
regex = r"https://cdn\.[^\s]*/attachments/[^\s]*" | |
source = "." | |
destination = "./media" | |
for file in glob.iglob(f"{source}/**/*.csv", recursive=True): |
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
from names_dataset import NameDataset | |
import json | |
nd = NameDataset() | |
firsts = [] | |
lasts = [] | |
countries = ["GB", "US", "FR", "DE", "PT", "ES", "NL", "IT", "MX", "CO", "ZA", "US"] | |
for country in countries: | |
print(country) |
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
// For this script to work properly, each daily habit has to start with a unique emoji, | |
// which will also be displayed next to the daily streak for each habit. | |
// Daily streaks are calculated for the currently opened daily note, and end on the first day | |
// that the habit was not ticked off. They are displayed in order of highest to lowest length. | |
// To display the result of this script in your daily notes, you can use this snippet: | |
// ```dataviewjs | |
// dv.view("path/to/Obsidian Daily Streaks.js"); | |
// ``` | |
// This is the directory that your daily notes are in |
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
// How to use: | |
// 1. Open the script editor for the form ("Script Editor" in top right menu) | |
// 2. Create a new file, paste this code and edit the settings below | |
// 3. Go to Triggers and add a new trigger with the following settings: | |
// - Function: onFormSubmit | |
// - Event source: From form | |
// - Event type: On form submit | |
// 4. Allow permissions, and you're done! | |
// link to root of cloud installation |
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
-- This is a lua script for Aseprite that allows automatically populating a MLEM.Data Data Texture Atlas. | |
-- To use this script, you need to select a rectangular area that should be your texture region. | |
-- If you want a custom pivot point, you also need to un-select exactly one pixel, the pivot point. | |
-- When you then execute the script and input the name of the texture region, it gets appended to the "SpriteName.atlas" file. | |
-- get the currently selected sprite | |
local selection = app.activeSprite.selection | |
if selection == nil then return end | |
local bounds = selection.bounds |
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
// How to use: | |
// 1. Open the script editor for the form ("Script Editor" in top right menu) | |
// 2. Create a new file, paste this code and edit the settings below | |
// 3. Go to Triggers and add a new trigger with the following settings: | |
// - Function: onFormSubmit | |
// - Event source: From form | |
// - Event type: On form submit | |
// 4. Allow permissions, and you're done! | |
// link to root of cloud installation |
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
# shuffles a pokemon 3ds language document based on string length with a given leeway | |
# needs storytext.txt and gametext.txt in the same directory | |
from random import randrange | |
# amount of characters that two string lengths can be different by to allow shuffling | |
leeway = 3 | |
def is_allowed_line(line): |
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
// Basically imports | |
// <> import something from a standard library location | |
// "" import something from an actual path | |
#include <stdio.h> | |
#include <stdlib.h> | |
// Preprocessor instructions with ifdef and ifndef, needs endif at the end | |
// ifndef = if not defined | |
#ifndef OOF | |
// Define a variable just to do the if check |