Skip to content

Instantly share code, notes, and snippets.

@hoitab
hoitab / retaildata.gs
Created March 22, 2023 01:17
Parse the retail modelling data on Simcompanies from the text of a javascript file
/**
* More info on retail modelling: https://www.simcompanies.com/newspaper/0/139/
*
* @param {url} the URL to the javascript file
* @param {realm}
* @param {economicPhase}
* @param {productId}
*
* @return json portion
* @customfunction
@hoitab
hoitab / requirements_analysis.py
Last active March 8, 2021 19:22
Load a list of required Python packages from requirements.txt and compare to the current environment to see whether the package is installed and how the versions compared. I like to run this in Google Colab to see how different is the default environment to what the project needed.
from pathlib import Path
from packaging import version
import time
# Returns a dictionary of package name and versions
def package_reader(file_path, is_installed_list):
skipped_lines = 0
txt_file = Path(file_path)
package_dict = {}
import org.tensorflow.lite.experimental.GpuDelegate
val interpreter = Interpreter(model,
Interpreter.Options().addDelegate(GpuDelegate()))
dependencies {
// Remove / comment out the existing import
// implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
implementation 'org.tensorflow:tensorflow-lite:0.0.0-gpu-experimental'
}
@hoitab
hoitab / AndroidManifest.xml
Created February 3, 2016 10:40
Nearby Messages example for the Google Beacon Platform as demonstrated during the Google Ubiquity Summit. Video for the session is available here: https://goo.gl/KO2VOS
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.