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
#!/usr/bin/env python | |
from random import random, randint, choice | |
from copy import deepcopy | |
from math import log | |
TAB = " " | |
### classes ## |
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
# Next time you need to install something with python setup.py -- which should be never but things happen. | |
python setup.py install --record files.txt | |
# This will cause all the installed files to be printed to that directory. | |
# Then when you want to uninstall it simply run; be careful with the 'sudo' | |
cat files.txt | xargs sudo rm -rf | |
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
#!/bin/bash | |
link=$1 | |
to=$2 | |
echo "Link $link" | |
echo "To $2" | |
function createdirs { | |
echo "createdirs Arg $1" | |
for dir in $(curl $link$1 | grep "href=" | sed 's/^.*href="//' | sed 's/">.*$//' | grep -v '/git' | grep -v '^\?' | grep '/$') |
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
import OpenGL.GL as GL | |
import OpenGL.GL.shaders | |
import ctypes | |
import pygame | |
import numpy | |
vertex_shader = """ | |
#version 330 | |
in vec4 position; |
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
import ast | |
from timeit import repeat | |
import threading | |
from ctypes import pythonapi, c_void_p | |
import math | |
import numpy as np | |
try: | |
import numexpr as ne | |
nthreads = ne.ncores |
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
""" | |
MIT License | |
Copyright (c) 2017 Cyrille Rossant | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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 <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <vector> | |
#include <cmath> | |
#include <cstdio> | |
#include <limits> | |
#include <chrono> | |
#include <thread> | |
#include <mutex> |
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
/* | |
Minimal SDL2 + OpenGL3 example. | |
Author: https://github.com/koute | |
This file is in the public domain; you can do whatever you want with it. | |
In case the concept of public domain doesn't exist in your jurisdiction | |
you can also use this code under the terms of Creative Commons CC0 license, | |
either version 1.0 or (at your option) any later version; for details see: | |
http://creativecommons.org/publicdomain/zero/1.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
/* llist.c | |
* Generic Linked List implementation | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include "llist.h" | |
llist *llist_create(void *new_data) | |
{ |
OlderNewer