| Date | 05-05-2021 - 10-17-2023 |
| Revision | R3 |
| Author | Guillaume Dua |
| Reviewers | Loïc Joly, Antoine Morrier |
| PS1='\[\e[31m\][\[\e[m\]\[\e[34m\]\u\[\e[m\]\[\e[31m\]@\[\e[m\]\[\e[33m\]\h\[\e[m\] \[\e[36m\]\w\[\e[m\]\[\e[32m\]$(__git_ps1 " %s")\[\e[m\]\[\e[31m\]]\[\e[m\]\\$ ' |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
| using System.Threading.Tasks; | |
| using Discord.Commands; | |
| public class AudioModule : ModuleBase<ICommandContext> | |
| { | |
| // Scroll down further for the AudioService. | |
| // Like, way down | |
| private readonly AudioService _service; | |
| // Remember to add an instance of the AudioService |
| """ Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
| import numpy as np | |
| import cPickle as pickle | |
| import gym | |
| # hyperparameters | |
| H = 200 # number of hidden layer neurons | |
| batch_size = 10 # every how many episodes to do a param update? | |
| learning_rate = 1e-4 | |
| gamma = 0.99 # discount factor for reward |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| mat4 rotationMatrix(vec3 axis, float angle) | |
| { | |
| axis = normalize(axis); | |
| float s = sin(angle); | |
| float c = cos(angle); | |
| float oc = 1.0 - c; | |
| return mat4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, | |
| oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, | |
| oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, |
| #/bin/bash | |
| #-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
| REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
| if [ -z "$REPO_URL" ]; then | |
| echo "-- ERROR: Could not identify Repo url." | |
| echo " It is possible this repo is already using SSH instead of HTTPS." | |
| exit | |
| fi |
| /* | |
| * Copyright (c) 2013 Calvin Rien | |
| * | |
| * Based on the JSON parser by Patrick van Bergen | |
| * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
| * | |
| * Simplified it so that it doesn't throw exceptions | |
| * and can be used in Unity iPhone with maximum code stripping. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining |