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
###Famille "Modules" | |
____ | |
####Élements | |
* Modules | |
####Relations | |
* Fait Partie De | |
* Dépend De | |
* Est Un |
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 <stdio.h> | |
//This is a simple program that counts from 0 to 63 in a loop without conditional statements or use of modulo | |
int main(void) { | |
int i=0; | |
int cntr=0; | |
// 0x3f = 0011 1111 |
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 <stdio.h> | |
#include <stdlib.h> | |
#ifdef __APPLE__ | |
#include <OpenCL/opencl.h> | |
#else | |
#include <CL/cl.h> | |
#endif | |
int main() { |
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
To use this on a remote server without making it listen to the wild, keep it listening on localhost only and on your computer you could for instance launch this: | |
ssh -Nf -L 9999:localhost:57575 remote-server | |
and then you can go to http://localhost:9999/ with ssh taking care the encrypted connection between you and the remote-server. |
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
Another way to deal with X freezing. | |
Use acpi to set your power button to switch you to console. Just edit your /etc/acpi/power.sh and change it to... | |
#/bin/sh | |
/bin/chvt 1 | |
The acpi system is separate from the X/keyboard interface and still works. So this way you can switch to the console even if your keyboard is locked. | |
Note you can use other keys as well. On my laptop I use my "thinkvantage" key for this. Any key that has an associated acpi event will work. |
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 <fstream> | |
#include "Partio.h" | |
#include "cl.hpp" | |
#include "structures.h" | |
#include "cereal/archives/binary.hpp" | |
#include "profile.hpp" |
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 <vector> | |
int binary_search(std::vector<int> *sorted_data, int value, int start_index, int end_index) { | |
int mid_index = start_index + ( (end_index - start_index)/2) ; | |
if( (*sorted_data)[mid_index] == value ) { | |
return mid_index; | |
} |
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
//Online version needs this define. But it gets defined twice on the local machine | |
#ifndef _GNU_SOURCE | |
#define _GNU_SOURCE | |
#endif | |
#include <stdio.h> /* printf, fgets */ | |
#include <stdlib.h> /* atoi */ | |
int main() { |
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
{ | |
"particles_count" : 64000, | |
"particle_mass" : 0.0025, | |
"simulation_time" : 1, | |
"target_fps" : 60, | |
"simulation_scale" : 0.01, | |
"write_all_frames" : false, | |
"constant_acceleration" : { | |
"x" : 0, "y" : -9.8, "z" : 0 | |
} |
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
---------------------------------------------------------- | |
Training predictor neural_network_predictor | |
Result: success | |
Validating predictor neural_network_predictor | |
Mean Squared Error: 0.803143 Mean Percent Error: 12.9514% | |
---------------------------------------------------------- | |
Training predictor knn_predictor | |
Result: success | |
Validating predictor knn_predictor | |
Mean Squared Error: 0.485454 Mean Percent Error: 9.83764% |
OlderNewer