This file contains hidden or 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 os | |
| import subprocess | |
| import sys | |
| import logging | |
| from dotenv import load_dotenv | |
| from datetime import datetime | |
| import argparse # Import argparse for handling command line arguments | |
| # Set up logging (change this if you want your logs to go elsewhere) | |
| log_dir = "/var/log/backup_script" |
This file contains hidden or 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 React, { useState } from 'react'; | |
| import { Trash2, CheckSquare, PlusSquare, RefreshCw, User, XCircle } from 'lucide-react'; | |
| const Task = ({ text, status, index, onComplete, onDelete, onDragStart }) => ( | |
| <div | |
| draggable | |
| onDragStart={(e) => onDragStart(e, index)} | |
| className={`p-2 m-1 rounded shadow ${status === 'complete' ? 'bg-green-200' : 'bg-yellow-200'} cursor-move`} | |
| > | |
| <p className="text-sm">{text}</p> |
This file contains hidden or 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 https://stackoverflow.com/questions/21517879/python-pil-resize-all-images-in-a-folder | |
| from PIL import Image | |
| import os, sys | |
| def batch_resize(folder, w, h): | |
| path = '../data/' + folder + '/' | |
| dirs = os.listdir( path ) | |
| resized_img_path = '../data/' + folder + '_resized/' | |
| if not os.path.exists(resized_img_path): |
This file contains hidden or 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
| PImage img; | |
| String text[] = {}; | |
| void setup() { | |
| String finalPicture[] = {}; | |
| size(47,65); | |
| img = loadImage("max.png"); | |
| img.loadPixels(); | |
| loadPixels(); | |
| for (int y = 0; y < img.height; y++) { |
This file contains hidden or 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
| class HelloWorld { | |
| public static void main(String[] args) { | |
| System.out.println("Hello World!"); | |
| } | |
| } |