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 bash | |
# | |
# Backup selected directories to a Backblaze B2 bucket | |
# | |
# If youre encountering errors running the script you probably need Bash 4.0 | |
# | |
# You need to login to your b2 account once with b2 authorize-account [<accountId>] [<applicationKey>] before running it. | |
# | |
# Example daily cron running script.sh in home directory: | |
# @daily /usr/local/bin/bash ~/script.sh |
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
# imports | |
from instapy import InstaPy | |
from instapy.util import smart_run | |
import json | |
import time | |
import schedule | |
# login credentials | |
insta_username = '*********' | |
insta_password = '*********' |
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 { useState, useEffect } from 'react' | |
const dict = { | |
"af": "Goeie dag", | |
"sq": "Tungjatjeta", | |
"ar": "Ahlan bik", | |
"zh": "Nín hao", | |
"hr": "Zdravo", | |
"cs": "Nazdar", | |
"da": "Hallo", |
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 { useReducer, useRef, useEffect, useCallback } from 'react'; | |
function reducer(state, action) { | |
switch (action.type) { | |
case 'PENDING': | |
return { ...state, status: 'pending' }; | |
case 'SUCCESS': | |
return { ...state, status: 'success', value: action.value }; | |
case 'ERROR': | |
return { ...state, status: 'error', error: action.error }; |
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 cv2 | |
import numpy as np | |
import time | |
# Load the input image | |
input_image = cv2.imread('example.jpg') | |
# Define the size of the chunks | |
chunk_size = (200, 200) |