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
#include <iostream> | |
#include <cmath> | |
using std::cout; | |
using std::endl; | |
struct vec2 | |
{ | |
double x; | |
double y; |
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
#include <iostream> | |
using std::cout; using std::endl; | |
#include <Eigen> | |
using namespace Eigen; | |
double f(const Matrix3d &a, Matrix3d &y) { | |
return 1/2. * (a-y).squaredNorm(); | |
} | |
Matrix3d conv(Matrix4d &x, Matrix2d &w) { |
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
#include "stdafx.h" | |
#include <iostream> | |
using std::cout; using std::endl; | |
#include <functional> | |
using std::function; | |
#include <string> | |
using std::string; | |
#include <vector> | |
using std::vector; |
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
string SVM::MSVMAdapter::Generate3dShader() { | |
string ret = string(R"( | |
const int MaxNumClasses = )") + to_string(SVM::MaxNumClasses) + string(R"( ; | |
const int MaxNumExamples = )") + to_string(SVM::MaxNumExamples) + string(R"( ; | |
uniform vec4 Examples[ MaxNumExamples ]; | |
uniform int Labels[ MaxNumExamples ]; | |
uniform vec4 Weights[ MaxNumClasses ]; | |
uniform vec3 Colors[ MaxNumClasses ]; | |
uniform float weightToClassMap[ MaxNumClasses ]; |
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
# the following code is in my ~/.xonshrc | |
# mkdir ~/.config/themes; cd ~/.config/themes | |
# git clone https://github.com/aaron-williamson/base16-alacritty | |
# git clone https://github.com/khamer/base16-i3 | |
# git clone https://github.com/0xdec/base16-rofi | |
# git clone https://github.com/nicodebo/base16-zathura | |
# set to the correct directories | |
conf_dir = '/home/xdaimon/.config' |
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 is my solution for a project in cse 320 at msu | |
// Turn off assert | |
#define NDEBUG | |
#include <stdint.h> // uint64_t | |
#include <stdbool.h> | |
#include <assert.h> | |
#include "/user/cse320/Projects/project06.support.h" |
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
#include <iostream> | |
using std::cout; | |
using std::endl; | |
#include <complex> | |
using std::complex; | |
#include <string> | |
using std::string; | |
#include <fstream> | |
using std::ofstream; | |
#include "fftw3.h" |
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
#include <bits/stdc++.h> | |
using namespace std; | |
#include <range/v3/all.hpp> | |
namespace views = ranges::views; | |
mt19937 generator(1252414); | |
struct Agent { | |
int id{}; | |
int score{}; |
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
int main() { | |
Config* config = new Config; | |
Programs* programs = new Programs; | |
Renderer* renderer = new Renderer; | |
Window* window = new Window; | |
while (true) { | |
if (user_config_changed()) { | |
logger.log("Updating state."); |
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
int main() { | |
Config* config = new Config; | |
Programs* programs = new Programs; | |
Renderer* renderer = new Renderer; | |
Window* window = new Window; | |
while (true) { | |
if (user_config_changed()) { | |
logger.log("Updating state."); |
OlderNewer