Skip to content

Instantly share code, notes, and snippets.

View zoq's full-sized avatar
💭
breathing

Marcus Edel zoq

💭
breathing
View GitHub Profile
@zoq
zoq / carla
Last active December 2, 2021 18:36
carla
carla-server-8e64b277ea18f28d
@zoq
zoq / model.hpp
Created August 16, 2020 14:13
model.hpp
model m;
arma::mat images;
StandardSGD s(0.0003, 1, 1, 1e-9, true);
CustomCallback cb(images);
std::stringstream stream;
s.Optimize(model, coordinates, cb);
@zoq
zoq / NSGA2Test-memcheck.xml
Created July 31, 2020 21:01
NSGA2Test-memcheck.xml
<?xml version="1.0"?>
<valgrindoutput>
<protocolversion>4</protocolversion>
<protocoltool>memcheck</protocoltool>
<preamble>
<line>Memcheck, a memory error detector</line>
<line>Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.</line>
@zoq
zoq / arma_util.go
Created July 10, 2020 22:02
arma_util.go
package mlpack
/*
#cgo CFLAGS: -I/srv/conda/envs/notebook/include/ -I. -I/capi -g -Wall -Wno-unused-variable
#cgo LDFLAGS: -L. /srv/conda/envs/notebook/lib/libgo_util.so
#include <stdlib.h>
#include <stdio.h>
#include <capi/cli_util.h>
#include <capi/arma_util.h>
*/
@zoq
zoq / image_save.hpp
Created September 14, 2019 15:56
image_save.hpp
// Image saving API for multiple files.
template<typename eT>
bool Save(const std::vector<std::string>& files,
arma::Mat<eT>& matrix,
ImageInfo& info,
const bool fatal,
const bool transpose)
{
if (files.size() == 0)
{
@zoq
zoq / convnet_example.hpp
Created June 17, 2019 13:21
convnet_example.hpp
arma::cube imageA(28, 28, 3);
imageA.fill(1.0);
arma::cube imageB(28, 28, 3);
imageB.fill(0.5);
arma::mat imageData(28*28*3, 100);
imageData.fill(1.0);
arma::mat imageLabels = arma::zeros<arma::mat>(1, 100);
@zoq
zoq / env_wrapper.hpp
Created May 27, 2019 18:39
env_wrapper.hpp
template<typename EnvType>
class EnvWrapper
{
public:
EnvWrapper(const EnvType& env) : env(env) {}
EnvType env;
}
CartPole env;
@zoq
zoq / neat-task.hpp
Last active May 19, 2019 11:24
neat-task.hpp
/**
* Main task idea.
*/
class Task
{
double Evalaute(Genome& genome)
{
// This is just a super simple example that shows how to set the input
// values.
genome.Input() = arma::vec("1 2 0.3");
@zoq
zoq / install.json
Created May 12, 2019 23:24
install.json
{
"header" : ["stable (3.1.0)", "nightly"],
"stable" : {
"mac" : [
{
"package" : "homebrew",
"language" : "python",
"cmd" : ["1", "2"]
},
{
@zoq
zoq / index.html
Created May 12, 2019 23:23
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Test</title>
<script src="jquery-3.4.0.min.js"></script>
<style type="text/css">
.seltable {