This file contains hidden or 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
# ====================================================================== | |
# There are 5 questions in this exam with increasing difficulty from 1-5. | |
# Please note that the weight of the grade for the question is relative | |
# to its difficulty. So your Category 1 question will score significantly | |
# less than your Category 5 question. | |
# | |
# Don't use lambda layers in your model. | |
# You do not need them to solve the question. | |
# Lambda layers are not supported by the grading infrastructure. | |
# |
This file contains hidden or 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
# ====================================================================== | |
# There are 5 questions in this exam with increasing difficulty from 1-5. | |
# Please note that the weight of the grade for the question is relative | |
# to its difficulty. So your Category 1 question will score significantly | |
# less than your Category 5 question. | |
# | |
# Don't use lambda layers in your model. | |
# You do not need them to solve the question. | |
# Lambda layers are not supported by the grading infrastructure. | |
# |
This file contains hidden or 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
class YOLO(private val context: Context) { | |
private val interpreter: Interpreter | |
// lazily load object labels | |
private val labelList by lazy { loadLabelList(context.assets) } | |
// create image processor to resize image to input dimensions | |
private val imageProcessor by lazy { | |
ImageProcessor.Builder() | |
.add(ResizeOp(300, 300, ResizeOp.ResizeMethod.BILINEAR)) |
This file contains hidden or 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
class YOLO(private val context: Context) { | |
// other stuff | |
// lazily load object labels | |
private val labelList by lazy { loadLabelList(context.assets) } | |
private fun loadLabelList( | |
assetManager: AssetManager | |
): List<String> { | |
val labelList = mutableListOf<String>() |
This file contains hidden or 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
class YOLO(private val context: Context) { | |
private val interpreter: Interpreter | |
companion object { | |
private const val MODEL_FILE = "detect.tflite" | |
private const val LABEL_FILE = "labelmap.txt" | |
} | |
init { | |
val options = Interpreter.Options() |
This file contains hidden or 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
android { | |
// other stuff | |
aaptOptions { | |
noCompress "tflite" | |
} | |
} |
This file contains hidden or 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
// Permissions handling | |
implementation 'com.github.quickpermissions:quickpermissions-kotlin:0.4.0' | |
// Tensorflow lite | |
implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly' | |
implementation 'org.tensorflow:tensorflow-lite-support:0.0.0-nightly' | |
// CameraView | |
implementation 'com.otaliastudios:cameraview:2.6.2' |
This file contains hidden or 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
#[derive(Serialize, Deserialize)] | |
pub struct Game { | |
pub id: Option<i32>, | |
pub name: String, | |
pub developer: String, | |
pub is_goty: bool, | |
} |
This file contains hidden or 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
#![feature(proc_macro_hygiene, decl_macro)] | |
#[macro_use] extern crate rocket; | |
#[get("/<name>")] | |
fn index(name: String) -> String { | |
format!("Hello there, {}!", name) | |
} | |
fn main() { |
This file contains hidden or 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
version: "3.4" | |
networks: | |
web: | |
services: | |
auth: | |
image: atechnohazard/hestia-auth | |
container_name: auth | |
env_file: ./.env |