Skip to content

Instantly share code, notes, and snippets.

View aferust's full-sized avatar
💭
I may be slow to respond.

Ferhat Kurtulmuş aferust

💭
I may be slow to respond.
  • Bursa
View GitHub Profile
@Justasic
Justasic / fcgitest.c
Created April 19, 2014 06:28
This is a nice example on how to use the FastCGI library in C.
// libfcgi-dev includes
#define NO_FCGI_DEFINES 1
//#include <fcgio.h>
#include <fcgi_config.h>
#include <fcgi_stdio.h>
#include <string.h>
int main()
{
FCGX_Request request;
@neuro-sys
neuro-sys / thread.c
Created November 22, 2015 20:26
POSIX/Windows Threads Wrapper
#include "thread.h"
#include <stdio.h>
#ifdef __WIN32__
#include <windows.h>
#else
#include <pthread.h>
#include <stdlib.h>
#endif // __WIN32__
@joelouismarino
joelouismarino / googlenet.py
Last active October 9, 2023 07:09
GoogLeNet in Keras
from __future__ import print_function
import imageio
from PIL import Image
import numpy as np
import keras
from keras.layers import Input, Dense, Conv2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, Concatenate, Reshape, Activation
from keras.models import Model
from keras.regularizers import l2
from keras.optimizers import SGD
@kbarbary
kbarbary / cpptest.pyx
Created May 11, 2017 15:29
Example: Using cython, convert numpy.ndarray to C++ std::valarray and back (using copies)
"""example of converting a numpy array to a C++ valarray and back in cython
using copies.
Compile with `python setup.py build_ext --inplace`
Example
-------
>>> import cpptest, numpy as np
>>> x = np.array([0., 1., 2.])
@mortennobel
mortennobel / SingleFileOpenGLTex.cpp
Last active January 25, 2024 10:03
Single file OpenGL 3.3 / WebGL (using Emscripten) example with texture (SDL2 / SDL_Image 2)
//
// Compile for emscripten using
// emcc -Iinclude SingleFileOpenGLTex.cpp \
-O2 -std=c++14 -s TOTAL_MEMORY=33554432 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' --preload-file examples/data -s USE_SDL=2 -o html/SingleFileOpenGLTex.html
// where the following images must be located in a subfolder
// - examples/data/test.png
// - examples/data/cartman.png
// - examples/data/cube-negx.png
// - examples/data/cube-negz.png
//
@kndt84
kndt84 / mobilenet.prototxt
Last active December 23, 2021 14:17
MobileNet caffe implementation for NVIDIA DIGITS
name: "MOBILENET"
layer {
name: "train-data"
type: "Data"
top: "data"
top: "label"
transform_param {
mirror: true
crop_size: 224
}
@kndt84
kndt84 / mobilenetv2.prototxt
Last active December 23, 2021 14:21
MobileNet V2 caffe implementation for NVIDIA DIGITS
name: "MOBILENET_V2"
layer {
name: "train-data"
type: "Data"
top: "data"
top: "label"
transform_param {
mirror: true
crop_size: 224
}
@ashutoshsatapathy1990
ashutoshsatapathy1990 / ResNet18.prototxt (NVIDIA DIGITS)
Last active May 9, 2020 15:01
ResNet 18 Caffe prototxt file for DIGITS
# ResNet18
name: "ResNet18"
layer {
name: "train-data"
type: "Data"
top: "data"
top: "label"
transform_param {
mirror: true
crop_size: 224