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 pyopencl as cl | |
import numpy as np | |
import random as r | |
import datetime as date | |
np.set_printoptions(threshold=np.nan) | |
#Averages ~250.000,000 CGoL cell updates a second, 1GB NVIDIA 560ti | |
# x*y*iterations = total = gpu time = cells/sec | |
# 36*36*100000 = 129600000 = 27s = 4,800,000 |
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
<?php | |
// Settings: | |
// - METRO_ID is extracted from the sl.se url. This URL is for slussen departures | |
// http://realtid.sl.se/?id=177&epslanguage=sv&WbSgnMdl=9192-U2x1c3NlbiAoU3RvY2tob2xtKQ%3d%3d-_--_-_-_ | |
// the METRO_ID is 9192 | |
// | |
// - DEPARTURE_NAME is the station the metro you want is going to as it appears on the above URL eg. 'Hässelby str.' | |
// - DEPARTURE_NICKNAME just a friendly name to make th english tts api be able to pronounce your destination | |
// - API_KEY is the api key, you can get one at http://www.trafiklab.se |
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
function apply_base_settings() | |
kind "ConsoleApp" | |
language "C++" | |
files { "**.h", "**.cpp", "External/*.c", "External/*.h", "External/*.cpp", "External/json/**" } | |
excludes { "External/libRocket/**" } | |
includedirs {".", "./External", "./External/libRocket/Include"} | |
end | |
function apply_spu_settings(dir, symbol_name) | |
kind "ConsoleApp" |
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
enum MetaSyntacticVariables | |
{ | |
Foo, | |
Bar, | |
Baz, | |
MetaSyntacticVariables_Count, | |
} | |
std::map<MetaSyntacticVariables, std::string> uselessMapUsage; |
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
const char *vertextype(BYTE type) | |
{ | |
if(type == D3DDECLTYPE_FLOAT1) return "D3DDECLTYPE_FLOAT1"; | |
if(type == D3DDECLTYPE_FLOAT2) return "D3DDECLTYPE_FLOAT2"; | |
if(type == D3DDECLTYPE_FLOAT3) return "D3DDECLTYPE_FLOAT3"; | |
if(type == D3DDECLTYPE_FLOAT4) return "D3DDECLTYPE_FLOAT4"; | |
if(type == D3DDECLTYPE_D3DCOLOR) return "D3DDECLTYPE_D3DCOLOR"; | |
if(type == D3DDECLTYPE_UBYTE4) return "D3DDECLTYPE_UBYTE4"; | |
if(type == D3DDECLTYPE_SHORT2) return "D3DDECLTYPE_SHORT2"; | |
if(type == D3DDECLTYPE_SHORT4) return "D3DDECLTYPE_SHORT4"; |
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
// ExecuteSomeCode.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <windows.h> | |
typedef int (__stdcall MyFunctionType)(int a, int b, int c); | |
static int test(int a) | |
{ |