Skip to content

Instantly share code, notes, and snippets.

View NiharG15's full-sized avatar

Nihar Gajare NiharG15

  • Seattle, WA
View GitHub Profile
@NiharG15
NiharG15 / dmesg for WiFi error
Created January 16, 2013 08:19
DMESG for WiFi not working
<4>[ 317.052856] ## wifi_probe
<4>[ 317.053039] wifi_set_power = 1
<6>[ 317.053253] pico_wifi_power: 1
<7>[ 317.054016] htc_wifi_bt_sleep_clk_ctl ON=1, ID=0
<7>[ 317.054046] htc_wifi_bt_sleep_clk_ctl ON=1, ID=0 DONE
<4>[ 317.189422] wifi_set_carddetect = 1
<6>[ 317.189758] pico_wifi_set_carddetect: 1
<6>[ 317.189910] mmc1: Slot status change detected (0 -> 1)
<4>[ 317.194396]
<4>[ 317.194427] Dongle Host Driver, version 5.90.195.23
--------- beginning of /dev/log/main
I/cm ( 106): Welcome to Android 4.1.2 / CyanogenMod-10-20130122-UNOFFICIAL-pico
I/cm ( 107): _
I/cm ( 108): __ __ _ ___ _ _ __ ___ __ _ _ _ _ __ __))
I/cm ( 109): ((_ \(/'((_( ((\( ((_)((_( (('((\( ((`1( ((_)((_(
I/cm ( 110): )) _))
I/cm ( 111):
I/DEBUG ( 116): debuggerd: Jan 22 2013 10:46:07
--------- beginning of /dev/log/system
I/Vold ( 114): Vold 2.1 (the revenge) firing up
@NiharG15
NiharG15 / gist:4722938
Created February 6, 2013 14:41
PAC Error
Install: /home/nihar/PAC/out/target/product/pico/system/app/PicoTts.apk
target Package: Provision (/home/nihar/PAC/out/target/product/pico/obj/APPS/Provision_intermediates/package.apk)
'/home/nihar/PAC/out/target/common/obj/APPS/Provision_intermediates/classes.dex' as 'classes.dex'...
Copying: /home/nihar/PAC/out/target/common/obj/APPS/QuickSearchBox_intermediates/emma_out/lib/classes-jarjar.jar
target Package: Settings (/home/nihar/PAC/out/target/product/pico/obj/APPS/Settings_intermediates/package.apk)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
W/ResourceType( 4632): Bad XML block: header size 22334 or total size 0 is larger than data size 0
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layoutfab);
//Outline
int size = getResources().getDimensionPixelSize(R.dimen.fab_size);
Outline outline = new Outline();
@NiharG15
NiharG15 / Assignment10.c
Last active August 29, 2015 14:08
FPL C2 Assignments
/*
* matrix.c
*
* Created on: Nov 4, 2014
*/
#include<stdio.h>
int main() {
int m, n, c, d, first[10][10], second[10][10], sum[10][10];
@NiharG15
NiharG15 / capitalize.sh
Created October 9, 2015 07:16
A shell script to capitalize first and last characters of every word in given file
#!/bin/bash
#This script capitalizes the first and last letters of each word in infile and writes the output to outfile
#This regex matches first character of every word which is converted to uppercase by \u\1
sed -e 's/\b\(.\)/\u\1/g' infile > tmpfile
#This regex matches last character of every word which is converted to uppercase by \u\1
sed -e 's/\(.\)\b/\u\1/g' tmpfile > outfile
#Delete temporary file
rm tmpfile
@NiharG15
NiharG15 / mount.sh
Created October 20, 2015 08:19
Mount / Unmount Script
#A script to mount / unmount devices.
while [ true ]
do
echo "1. Mount a device"
echo "2. Unmount a device"
echo "3. Exit"
echo "Enter your choice: "
read ch
case $ch in
1)
@NiharG15
NiharG15 / README.md
Last active February 27, 2024 14:39
Iris Classification using a Neural Network

A Simple Neural Network in Keras + TensorFlow to classify the Iris Dataset

Following python packages are required to run this file:

    pip install tensorflow
    pip install scikit-learn
    pip install keras
@NiharG15
NiharG15 / README.md
Last active January 17, 2018 18:42
A tensorpack.dataflow based image data generator for pandas DataFrames

A data generator for pandas DataFrames

This is a tensorpack.dataflow based data generator that takes a pandas DataFrame as input. The DataFrame has one or more columns that act as path components and a label column.

  • path_func:
    This function takes a pandas DataFrame row as an input and generates corresponding image path.

Example Usage: