Skip to content

Instantly share code, notes, and snippets.

View RowlandOti's full-sized avatar
🎯
Focusing on what holds things in their inmost folds.

Rowland Oti RowlandOti

🎯
Focusing on what holds things in their inmost folds.
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.doea.app.presentation.demofeature.view.activity.TestActivity">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/topLinear"
@RowlandOti
RowlandOti / Dropout.py
Created May 28, 2017 19:42 — forked from yusugomori/Dropout.py
Dropout Neural Networks (with ReLU)
# -*- coding: utf-8 -*-
import sys
import numpy
numpy.seterr(all='ignore')
'''
@RowlandOti
RowlandOti / nn.py
Created May 28, 2017 19:45 — forked from ottokart/nn.py
3-layer neural network example with dropout in 2nd layer
# Tiny example of 3-layer nerual network with dropout in 2nd hidden layer
# Output layer is linear with L2 cost (regression model)
# Hidden layer activation is tanh
import numpy as np
n_epochs = 100
n_samples = 100
n_in = 10
n_hidden = 5
@RowlandOti
RowlandOti / naivebayes.py
Created June 10, 2017 20:40 — forked from kvorion/naivebayes.py
naive bayes implementation
#Author: Krishnamurthy Koduvayur Viswanathan
from __future__ import division
import collections
import math
class Model:
def __init__(self, arffFile):
self.trainingFile = arffFile
self.features = {} #all feature names and their possible values (including the class label)
class BitmapDownloadTask extends AsyncTask<Uri, Void, Bitmap> {
private final WeakReference<ImageView> imageViewReference;
private Uri data = null;
public BitmapDownloadTask(ImageView imageView) {
// Use a WeakReference to ensure the ImageView can be garbage collected
imageViewReference = new WeakReference<ImageView>(imageView);
}
// Decode image in background.
@RowlandOti
RowlandOti / textai.py
Created October 6, 2017 06:33 — forked from iamukasa/textai.py
LSTM model to create the next version of the text file to finish it look out George rr martin
import numpy as np
import sys
class RecurrentNeuralNetwork:
def __init__(self,xs,ys,rl,eo,lr):
self.x=np.zeros(xs)
self.xs=xs
self.y=np.zeros(ys)
self.ys=ys
self.w=np.random.random((ys,ys))
/**
* ArcUtils.java
*
* Copyright (c) 2014 BioWink GmbH.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@RowlandOti
RowlandOti / CircularFragReveal.java
Created November 24, 2017 20:20 — forked from tinmegali/CircularFragReveal.java
Add a circular Reveal and Unreveal transition animation to a Android Fragment
import android.animation.Animator;
import android.animation.TimeInterpolator;
import android.annotation.TargetApi;
import android.graphics.Color;
import android.os.Build;
import android.support.annotation.NonNull;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewAnimationUtils;
@RowlandOti
RowlandOti / MainActivity.java
Created April 29, 2018 06:53
Query Firestone Database with Joins
package com.rowland.foodorder;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
@RowlandOti
RowlandOti / AndroidManifest.xml
Created June 21, 2019 19:18 — forked from manishcm/AndroidManifest.xml
Android App Widget sample app using setOnClickPendingIntent
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test1"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="19" />