Skip to content

Instantly share code, notes, and snippets.

View marcolussetti's full-sized avatar

Marco Lussetti marcolussetti

View GitHub Profile
@marcolussetti
marcolussetti / PickGame.svelte
Created October 10, 2020 05:19
Pick a game
<script>
import { onMount } from 'svelte';
const games = [
// Streamed via Discord
// Jackbox 4
"Fibbage 3 (2-8) - Jackbox 4 - (later)",
"Fibbage Enough about You (2-8) - Jackbox 4 - (later)",
"Survive the Internet (3-8) - Jackbox 4 - (earlier)",
"Monster Seeking Monster (3-7) - Jackbox 4 - (earlier)",
@marcolussetti
marcolussetti / test_winrm.ps1
Created December 30, 2019 23:37
Test WinRM's basic Auth
Enter-PSSession -ComputerName <HOST> -UseSSL -port 5986 -Authentication Basic -Credential (New-Object System.Management.Automation.PSCredential("Administrator", (ConvertTo-SecureString "<PASSWORD>" -AsPlainText -Force))) -SessionOption (New-PSSessionOption -SkipCACheck)
@marcolussetti
marcolussetti / 50-cloud-init.yaml
Created December 7, 2019 03:36
SoYouStart/OVH Ubuntu 18.04 Networking Config for ESXi
# Stored at /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
ens160:
@marcolussetti
marcolussetti / .worklog.csv
Last active December 4, 2019 18:23
worklog.py - An extremely simple worklog to CSV tracker with no dependencies (well, besides Python 3).
Date Description Task Difference Processed
20191204 0800:00 This is an example description Example Task False
@marcolussetti
marcolussetti / live_testdata.py
Last active October 17, 2019 01:16
Testbank recipe-scrapers
#!/usr/bin/env python3
"""Quick and dirty check of what's running and what isn't"""
from recipe_scrapers import scrape_me
import pandas as pd
import numpy as np
import logging
log = logging.Logger("")
@marcolussetti
marcolussetti / fetch_data.sh
Last active October 16, 2019 05:33
refresh recipe data
curl -o recipe_scrapers/tests/test_data/101cookbooks.testhtml http://www.101cookbooks.com/archives/nikkis-healthy-cookies-recipe.html
curl -o recipe_scrapers/tests/test_data/allrecipes.testhtml http://allrecipes.com/recipe/133948/four-cheese-margherita-pizza/
curl -o recipe_scrapers/tests/test_data/aspicyperspective.testhtml https://www.aspicyperspective.com/banana-cream-pie-recipe/
curl -o recipe_scrapers/tests/test_data/backtoherroots.testhtml http://wholefully.com/blue-cornbread/
curl -o recipe_scrapers/tests/test_data/bbc_food.testhtml http://www.bbc.co.uk/food/recipes/baileysandchocolatec_72293
curl -o recipe_scrapers/tests/test_data/bbc_good_food.testhtml http://www.bbcgoodfood.com/user/5632816/recipe/cookie-monster-cupcakes
curl -o recipe_scrapers/tests/test_data/biggirlssmallkitchen.testhtml http://www.biggirlssmallkitchen.com/2011/11/cauliflower-soup-with-sharp-cheddar-and-thyme.html
curl -o recipe_scrapers/tests/test_data/bonappetit.testhtml http://www.bonappetit.com/recipe/red-wine-braised-short-r
@marcolussetti
marcolussetti / DOCKER-FIX.bat
Created August 7, 2019 20:27
add user to docker-users and relog
net localgroup docker-users <machine_name>\<username> /add
shutdown -L
@marcolussetti
marcolussetti / FullModel.ipynb
Created July 25, 2019 15:50
CUCSC 2019 - Model
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marcolussetti
marcolussetti / excel-readonly.bat
Last active July 3, 2019 18:16
Excel Read-Only Opener. Works with the 64-bit version of Microsoft Excel and the "Open With" dialog. It's a simple batch file converted to .exe with Bat To Exe.
@echo off
"C:\Program Files\Microsoft Office\Office16\EXCEL.EXE" /r %1
exit
@marcolussetti
marcolussetti / ordered_dict_fizzbuzz.py
Created June 27, 2019 01:17
An extensible fizz buzz example using Python's OrderedDict as lookup tables
from collections import OrderedDict
def fizzdizz(start, end, lookup_table):
# Map integers in given range to the lookup values
results = OrderedDict({i: [v for k, v in lookup_table.items() if i % k == 0] for i in range(start, end)})
# Join in string and fall back to key if no successful lookups
results = [("".join(v) if len(v) > 0 else str(k)) for k, v in results.items()]
# Print