Skip to content

Instantly share code, notes, and snippets.

View siffi26's full-sized avatar
🔍
Building

Siffi Singh siffi26

🔍
Building
View GitHub Profile
@siffi26
siffi26 / fix2float.c
Created April 19, 2017 14:27 — forked from yfuruyama/fix2float.c
convert fixed point number to float point number
#include <stdio.h>
#include <math.h>
#define FIXED_BIT 12
float fix2float(unsigned short int n)
{
float ret = 0.0;
int integer_part;
int i;
@siffi26
siffi26 / float2fix.c
Created April 13, 2017 11:08 — forked from yfuruyama/float2fix.c
convert floating point number to fixed point number
#include <stdio.h>
#include <math.h>
#define FIXED_BIT 12
unsigned short int float2fix(float n)
{
unsigned short int int_part = 0, frac_part = 0;
int i;
float t;
@karpathy
karpathy / min-char-rnn.py
Last active March 21, 2026 03:14
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:text="Guest List"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
anonymous
anonymous / activity_main.xml
Created April 8, 2015 22:18
RelativeLayout XML for Udacity quiz question
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:text="I’m in this corner"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
@yfuruyama
yfuruyama / fix2float.c
Created January 17, 2014 09:13
convert fixed point number to float point number
#include <stdio.h>
#include <math.h>
#define FIXED_BIT 12
float fix2float(unsigned short int n)
{
float ret = 0.0;
int integer_part;
int i;