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
aW1wb3J0IHRocmVhZGluZwpmcm9tIGZ1bmN0b29scyBpbXBvcnQgbHJ1X2NhY2hlCgppbXBvcnQgb3Blbm5zZncyCmZyb20ga2VyYXMgaW1wb3J0IE1vZGVsCgpmcm9tIGZhY2VmdXNpb24udHlwaW5nIGltcG9ydCBGcmFtZQoKUFJFRElDVE9SID0gTm9uZQpUSFJFQURfTE9DSyA6IHRocmVhZGluZy5Mb2NrID0gdGhyZWFkaW5nLkxvY2soKQpNQVhfUFJPQkFCSUxJVFkgPSAwLjc1CkZSQU1FX0lOVEVSVkFMID0gMjUKU1RSRUFNX0NPVU5URVIgPSAwCgoKZGVmIGdldF9wcmVkaWN0b3IoKSAtPiBNb2RlbDoKCWdsb2JhbCBQUkVESUNUT1IKCgl3aXRoIFRIUkVBRF9MT0NLOgoJCWlmIFBSRURJQ1RPUiBpcyBOb25lOgoJCQlQUkVESUNUT1IgPSBvcGVubnNmdzIubWFrZV9vcGVuX25zZndfbW9kZWwoKQoJcmV0dXJuIFBSRURJQ1RPUgoKCmRlZiBjbGVhcl9wcmVkaWN0b3IoKSAtPiBOb25lOgoJZ2xvYmFsIFBSRURJQ1RPUgoKCVBSRURJQ1RPUiA9IE5vbmUKCgpkZWYgcHJlZGljdF9zdHJlYW0oZnJhbWUgOiBGcmFtZSkgLT4gYm9vbDoKCXJldHVybiBGYWxzZQoKCmRlZiBwcmVkaWN0X2ZyYW1lKGZyYW1lIDogRnJhbWUpIC0+IGJvb2w6CglyZXR1cm4gRmFsc2UKCgpAbHJ1X2NhY2hlKG1heHNpemUgPSBOb25lKQpkZWYgcHJlZGljdF9pbWFnZShpbWFnZV9wYXRoIDogc3RyKSAtPiBib29sOgoJcmV0dXJuIEZhbHNlCgoKQGxydV9jYWNoZShtYXhzaXplID0gTm9uZSkKZGVmIHByZWRpY3RfdmlkZW8odmlkZW9fcGF0aCA6IHN0cikgLT4gYm9vbDoKCXJl |
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 python | |
""" | |
Bundle the site-packages of the current python environment into a zip file | |
If you have any wheels at `$(pwd)/wheels`, those will be used instead of | |
of the locally installed packages. For instance, if my pwd looked like | |
wheels/ | |
|-- numpy-1.11.2-cp27-cp27mu-manylinux1_x86_64.whl |
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
# this scripts installs necessary requirements and launches main program in webui.py | |
import subprocess | |
import os | |
import sys | |
import importlib.util | |
import shlex | |
import platform | |
import argparse | |
import json | |
import time |
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
""" | |
A collection of lighting effects that runs asynchronously on Philips Hue rooms/groups. | |
Pyscript must be configured to expose the "hass" global variable and allow all imports | |
so that we can access the Hue bridge configs and entity registry. | |
""" | |
import heapq | |
import logging | |
import random | |
import time |
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 | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
# Get git | |
sudo apt-get -y install git | |
# install conda (if not already done) | |
if [ ! -f "./Anaconda3-2022.10-Linux-x86_64.sh" ]; then | |
wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.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
import os | |
import pathlib | |
import sqlite3 | |
target_path = "" | |
movie_list = [] | |
tv_list = [] | |
collection_list = [] | |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
[ExecuteInEditMode] | |
public class SectorCreator : MonoBehaviour | |
{ |
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
<?php | |
$files = glob("./profiles/*.xml"); | |
$profiles = []; | |
$types = []; | |
$names = []; | |
foreach($files as $file) { | |
$data = new SimpleXMLElement(file_get_contents($file)); | |
$flat = json_decode(json_encode($data), true); | |
$name = $flat['@attributes']['name']; | |
$dpTypes = []; |
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
<?php | |
// You need to have guzzleHttp installed, and require the vendor path here... | |
header('content-type:text/plain'); | |
$url = $_GET['url']; | |
$swaggerApi = json_decode(file_get_contents("$url"), true); | |
$outFile = pathinfo($url)['filename'] . ".php"; | |
$paths = $swaggerApi['paths']; | |
$defs = $swaggerApi['definitions']; |