Skip to content

Instantly share code, notes, and snippets.

View Ghost---Shadow's full-sized avatar
🥔
eating potatoes

Souradeep Nanda Ghost---Shadow

🥔
eating potatoes
View GitHub Profile
@zed
zed / demo.py
Created April 13, 2011 02:04
how to define an elementwise function in pycuda
#!/usr/bin/env python
import pycuda.gpuarray as gpuarray
import pycuda.autoinit
from pycuda.elementwise import ElementwiseKernel
# define elementwise `add()` function
add = ElementwiseKernel(
"float *a, float *b, float *c",
"c[i] = a[i] + b[i]",
@yano3
yano3 / gist:1378948
Created November 19, 2011 15:17
git commit --amend --reset-author
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active May 20, 2024 11:27
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@mycodeschool
mycodeschool / InfixToPostfix.cpp
Created December 9, 2013 05:34
Infix to Postfix conversion in C++ using stack. We are assuming that both operators and operands in input will be single character.
/*
Infix to postfix conversion in C++
Input Postfix expression must be in a desired format.
Operands and operator, both must be single character.
Only '+' , '-' , '*', '/' and '$' (for exponentiation) operators are expected.
*/
#include<iostream>
#include<stack>
#include<string>
//
// SCNVector3+MathUtils.swift
//
// Created by Jeremy Conkin on 4/26/16.
//
import SceneKit
/**
Add two vectors
@dswah
dswah / layers_tied.py
Last active September 17, 2021 22:45
Tied Convolutional Weights with Keras for CNN Auto-encoders
from keras import backend as K
from keras import activations, initializations, regularizers, constraints
from keras.engine import Layer, InputSpec
from keras.utils.np_utils import conv_output_length
from keras.layers import Convolution1D, Convolution2D
import tensorflow as tf
class Convolution1D_tied(Layer):
'''Convolution operator for filtering neighborhoods of one-dimensional inputs.
When using this layer as the first layer in a model,
@awjuliani
awjuliani / DCGAN.ipynb
Last active May 19, 2020 07:12
An implementation of DCGAN in Tensorflow and Python.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active July 20, 2024 15:07
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ