Skip to content

Instantly share code, notes, and snippets.

import tensorflow as tf
import numpy as np
import cProfile
def ff_network(name, layer_dims):
layer_weight_list = [None] * len(layer_dims)
layers = [None] * len(layer_dims)
layers[0] = tf.placeholder('float', [None, layer_dims[0]])
layer_weight_list = [None] * (len(layer_dims) - 1)
layer_bias_list = [None] * len(layer_weight_list)
error: expected one of `,`, `.`, `?`, `else`, or `}`, found `ClearValue`
--> /home/anish/Code/vulkano/vulkano/src/command_buffer/auto.rs:520:33
|
519 | }
| - expected one of `,`, `.`, `?`, `else`, or `}` here
520 | ClearValue::Int(_) => if atch_desc.format.ty() != FormatTy::Sint {
| ^^^^^^^^^^ unexpected token
from __future__ import print_function
from common import *
from callbacks import *
from listeners import *
import argparse
import atexit
import socket
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <iostream>
#include <stdexcept>
#include <functional>
#include <fstream>
#include <algorithm>
#include <vector>
#include <cstring>
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <iostream>
#include <stdexcept>
#include <functional>
#include <algorithm>
#include <vector>
#include <cstring>
#include <set>
[ 14%] Building CXX object CMakeFiles/smargl.dir/Triangle.cpp.o
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h:33:0,
from /usr/include/c++/5/bits/allocator.h:46,
from /usr/include/c++/5/string:41,
from /usr/include/c++/5/bits/locale_classes.h:40,
from /usr/include/c++/5/bits/ios_base.h:41,
from /usr/include/c++/5/ios:42,
from /usr/include/c++/5/istream:38,
from /usr/include/c++/5/fstream:38,
from /home/anish/Code/smargl_tst/shader.h:7,
#include "SDL2/SDL.h"
#include "SDL2/SDL_opengl.h"
#include <fstream>
namespace shaders {
const GLchar* read_shader_source(const std::string shaderpath) {
std::ifstream in(shaderpath);
std::string contents((std::istreambuf_iterator<char>(in)),
#define GLEW_STATIC
#include <GL/glew.h>
#include "SDL2/SDL.h"
#include "SDL2/SDL_opengl.h"
#include "shaders.h"
#include <iostream>
#include <typeinfo>
#include "Shaders.h"
t2d::Shader::Shader(const char * foo, GLenum type, int loadmode = LOAD_FROM_FILE) {
if (loadmode == LOAD_FROM_FILE) {
std::ifstream in(foo);
source = std::string((std::istreambuf_iterator<char>(in)), std::istreambuf_iterator<char>());
glSource = (GLchar *) source.c_str();
} else if (loadmode == LOAD_FROM_STRING) {
@anlsh
anlsh / Shaders.h
Last active August 29, 2015 14:25
#ifndef TINY2D_SHADERS_H
#define TINY2D_SHADERS_H
#define GLEW_STATIC
#include <GL/glew.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>
#include <stdexcept>
#include <fstream>