Skip to content

Instantly share code, notes, and snippets.

View aftabsikander's full-sized avatar

Aftab aftabsikander

  • Karachi,Pakistan
View GitHub Profile
import numpy
import random
from numpy import arange
#from classification import *
from sklearn import metrics
from sklearn.datasets import fetch_mldata
from sklearn.ensemble import RandomForestClassifier
from sklearn.utils import shuffle
import time
@aftabsikander
aftabsikander / mnist-to-jpg.py
Created April 18, 2017 14:55 — forked from ischlag/mnist-to-jpg.py
Simple python script which takes the mnist data from tensorflow and builds a data set based on jpg files and text files containing the image paths and labels. Parts of it are from the mnist tensorflow example.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gzip
import os
import sys
import time
from six.moves import urllib
import os
import struct
import numpy as np
"""
Loosely inspired by http://abel.ee.ucla.edu/cvxopt/_downloads/mnist.py
which is GPL licensed.
"""
def read(dataset = "training", path = "."):
@aftabsikander
aftabsikander / material_design_guidelines_dimens.xml
Created April 12, 2017 20:03 — forked from aeroechelon/material_design_guidelines_dimens.xml
Recommended Material Design Dimensions for Android
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
# Material Design Dimensions
These dimensions are provided as per Material Design Guidelines
to adhere to a 8 dp baseline grid. (With the exception of the
toolbar and notification bar.).
## References
@aftabsikander
aftabsikander / dimens.xml
Created April 10, 2017 18:35 — forked from MarkMjw/dimens.xml
Android default resource dimens.xml.
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/assets/res/any/dimens.xml
**
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
Glen,
As already discussed on call previous regarding Fingerprint functionality I've outlined detailed information which cover implementation for different vendors and google.
Every vendor had it's own Fingerprint implementation before Android Marshmallow (6.0) was launched. Samsung was the first vendor which brought Fingerprint feature on their Android devices. They also provided SDK for 3rd Party Developer.
###Samsung SDK [(Pass)](http://developer.samsung.com/galaxy/pass)
Pass SDK allows us to use fingerprint recognition features in our application. With Pass SDK, we can provide reinforced security, by identifying whether the current user is the actual owner of the device.
All those Samsung device which has fingerprint sensor and Android version is lower then marshmallow uses Pass SDK. However Samsung S5, Note 5 uses Pass SDK as they did not follow the rules of Google's Marshmallow Compatibility Definition Document (CDD). Hence they can't use Google's Native Fingerprint API
@aftabsikander
aftabsikander / README.md
Created January 27, 2017 17:52 — forked from JakeWharton/README.md
A JUnit @rule which launches an activity when your test starts. Stop extending gross ActivityInstrumentationBarfCase2!
package com.example.mediasessioncompat;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.media.MediaDescriptionCompat;
import android.support.v4.media.MediaMetadataCompat;
import android.support.v4.media.session.MediaButtonReceiver;
import android.support.v4.media.session.MediaControllerCompat;
import android.support.v4.media.session.MediaSessionCompat;
http://stackoverflow.com/questions/15955958/android-audiorecord-to-server-over-udp-playback-issues
http://i-liger.com/article/android-wav-audio-recording
http://www.scriptscoop.net/t/63f9c3372043/android-what-to-do-when-noisesuppressor-not-available.html
http://twigstechtips.blogspot.com.br/2013/07/android-enable-noise-cancellation-in.html
http://stackoverflow.com/questions/6959930/android-need-to-record-mic-input
http://stackoverflow.com/questions/4525206/android-audiorecord-class-process-live-mic-audio-quickly-set-up-callback-func
http://stackoverflow.com/questions/14842803/low-latency-audio-playback-on-android
http://stackoverflow.com/questions/21804390/pcm-aac-encoder-pcmdecoder-in-real-time-with-correct-optimization
http://audiorecordandroid.blogspot.in/
http://stackoverflow.com/questions/15971035/remove-noise-from-audio-sample-record-using-audiorecorder