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
function main(workbook: ExcelScript.Workbook): string { | |
// Get all the worksheets in the workbook. | |
let sheets = workbook.getWorksheets(); | |
// Don't treat these strings as dates | |
let notDates = ['NA', '', 'ETA DATE']; | |
// Compare to yesterday | |
let today = new Date(Date.now()).getTime() - (24 * 60 * 60 * 1000); | |
console.log(today.toString()); |
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
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define PIN 9 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800); | |
const uint32_t Green = Adafruit_NeoPixel::Color(00, 255, 0); | |
const uint32_t Red = Adafruit_NeoPixel::Color(255, 0, 0); | |
void setup() { |
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
(define (script-fu-set-layers-mode | |
image | |
layer | |
mode | |
) | |
(let* | |
( | |
(width (car (gimp-image-width image))) | |
(height (car (gimp-image-height image))) |
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
public static string SaveFile(string title, string filter) | |
{ | |
using (SaveFileDialog saveFileDialog = new SaveFileDialog()) | |
{ | |
saveFileDialog.RestoreDirectory = true; | |
saveFileDialog.Title = title; | |
saveFileDialog.Filter = filter; | |
if (saveFileDialog.ShowDialog() == DialogResult.OK) | |
return saveFileDialog.FileName; | |
} |
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 sys | |
import csv | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
from scipy.linalg import lstsq | |
# Read CSV | |
csvFileName = sys.argv[1] | |
csvData = [] |
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
public static void OpenWithDefaultProgram(string path) | |
{ | |
using (Process fileopener = new Process()) | |
{ | |
fileopener.StartInfo.FileName = "explorer"; | |
fileopener.StartInfo.Arguments = "\"" + path + "\""; | |
fileopener.Start(); | |
} | |
} |
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
public static Point ZoomMousePos(Point click) | |
{ | |
PictureBox pbx = Components.Vision; | |
float BackgroundImageAspect = pbx.BackgroundImage.Width / (float)pbx.BackgroundImage.Height; | |
float controlAspect = pbx.Width / (float)pbx.Height; | |
PointF pos = new PointF(click.X, click.Y); | |
if (BackgroundImageAspect > controlAspect) | |
{ | |
float ratioWidth = pbx.BackgroundImage.Width / (float)pbx.Width; | |
pos.X *= ratioWidth; |
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
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
namespace PiePrep | |
{ | |
class Program | |
{ | |
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
using System; | |
using System.Drawing; | |
using System.IO; | |
namespace XYZmanipulator | |
{ | |
class Program | |
{ | |
static void Main() | |
{ |
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 PIL import Image, ImageFont, ImageDraw, ExifTags | |
import pathlib | |
import os | |
imageExtensions = ['.png', '.jpg', '.jpeg', '.tiff', '.bmp', '.gif'] | |
basewidth = 600 # Adjust output file size | |
# Make output dir | |
if not os.path.exists('watermark'): | |
os.makedirs('watermark') |