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
#!/usr/bin/env python3 | |
import torch | |
def is_metal_enabled(): | |
"""Checks if Metal acceleration is enabled for PyTorch.""" | |
# Check if MPS backend is available on the system | |
if not torch.backends.mps.is_available(): | |
print("MPS backend is not available on this system.") | |
return False |
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
package com.legbehindneck; | |
import java.io.IOException; | |
import com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.core.JsonPointer; | |
public class Main { | |
public static void main(String[] args) { |
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
#!/usr/bin/env python3 | |
# Dependencies | |
# ============================= | |
# pip install nltk transformers | |
import argparse | |
import sys | |
from pathlib import Path |
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
#!/usr/bin/osascript -l JavaScript | |
// ^^^^ COMMENT/REMOVE THIS SHEBANG IF RUNNING FROM SCRIPT EDITOR!!!!! ^^^^^^^^^^^ | |
// The SHEBANG is only needed if the file is executable and is run from a terminal with `./RsyncBackup.js` | |
// 1. In MacOS Spotlight type 'Script Editor' and paste the code below | |
// 2. Click the top-left dropdown which says 'AppleScript' and select 'JavaScript' | |
// 3. Under menu File pick Export | |
// 4. In the Export dialog select File Format = Application | |
// 5. Save the app in /Applications |
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
#!/bin/bash | |
# Convert Lingvo DSL, Babylon BGL, Stardict, ZIM, etc dictionaries to MDict MDX (see input formats supported by https://github.com/ilius/pyglossary) | |
# | |
# Dependencies: | |
# python3, sqlite3, pyglossary, mdict-utils | |
# optional dependency: dictzip (for unpacking .dz files) | |
# | |
# Install all dependencies with: | |
# pip3 install pyglossary mdict-utils lxml polib PyYAML beautifulsoup4 html5lib PyICU libzim>=1.0 python-lzo prompt_toolkit |
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
#!/usr/bin/env python3 | |
import sys | |
from pathlib import Path | |
from PyQt5.QtCore import * | |
from PyQt5.QtWebEngineWidgets import * | |
from PyQt5.QtWidgets import * | |
# REQUIREMENTS |
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
### ❗️❗️❗️ moved to https://github.com/glowinthedark/html-music-gallery-creator |
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
#!/usr/bin/env python3 | |
# NOTE: this script is deprecated; | |
# maintained version with SVG icons: https://github.com/glowinthedark/index-html-generator/ | |
# --- | |
# Copyright 2020 glowinthedark | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. |
NewerOlder