Skip to content

Instantly share code, notes, and snippets.

View ker2x's full-sized avatar

Laurent Laborde ker2x

  • Toulouse, France
  • 18:04 (UTC +02:00)
View GitHub Profile
@ker2x
ker2x / tensorbrot.ipynb
Created December 5, 2021 11:27
Tensorbrot.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#%%
import tensorflow as tf
import pathlib
import os
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Optionally set memory groth to True
#%%
import tensorflow as tf
import pathlib
import os
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
physical_devices = tf.config.list_physical_devices('GPU')
#%%
import tensorflow as tf
import pathlib
import os
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
physical_devices = tf.config.list_physical_devices('GPU')
package kleolife.gl
import kleolife.data.GraphicData
import org.khronos.webgl.WebGLProgram
import org.khronos.webgl.WebGLRenderingContext
import org.khronos.webgl.WebGLShader
class GLUtils {
companion object {
fun clearScreen(gfx: GraphicData) {
#pragma omp parallel default(none)
{
srand(chrono::high_resolution_clock::now().time_since_epoch().count() ^ static_cast<long long>(omp_get_thread_num()));
#pragma omp for
for (auto i = 0; i < group1size; i++)
{
@ker2x
ker2x / openframworks.cpp
Last active October 5, 2023 19:45
voronoi ?
// create cells with random positions and colors
for (auto i = 0; i < 2000; i++) {
Cell cell;
cell.position.x = ofRandom(0, ofGetWidth());
cell.position.y = ofRandom(0, ofGetHeight());
cell.color = ofColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255));
cells.push_back(cell);
}