Skip to content

Instantly share code, notes, and snippets.

View biodunalfet's full-sized avatar

Hamza Fetuga biodunalfet

View GitHub Profile
**Privacy Policy**
Hamza built the Best Rates app as a Free app. This SERVICE is provided by Hamza at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at Best Rates unless otherwise defined in this Privacy Policy.
package com.hf.fichaya.ui.main
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.hf.fichaya.data.di.DIContainer
import com.hf.fichaya.data.local.LocalDataSource
import com.hf.fichaya.data.remote.response.UserData
class MainFragmentViewModel(
val local: LocalDataSource = DIContainer.localDataSource
"""A cell's genetic composition determines what it does or the structure it has. An activated gene produces
a messenger RNA which in turn is converted to a peptide in the ribosomal complex. The nucleotide sequence on the gene
can allow us to predict the sequence of amino acid in peptides that is obtained from that gene.
The Template or antisense is the strand that gets transcribed i.e complimentary to mRNA
while the coding and sense refer to the strand that is NOT transcribed i.e similar to mRNA"""
"""This program help to determine the amino acid sequence in a gene whether the user has mRNA, sense DNA
or antisense DNA sequence. Moreover, it can also help in determining the portion of the gene that proteins are obtained
"""
@biodunalfet
biodunalfet / README-Template.md
Last active March 10, 2020 17:05 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Owners

Upseller

This module helps coordinate upsell flows on different pages across the app

The Problem

To upsell a feature on a certain page, one has to be aware of all the other features that are also being tried to be "upsold" on that same page and their timing and implementation logic behind it. In order to reduce this complexity and to prevent the user from being in states where multiple features are being shown to the users at the same time, this module was created

Solution

The upseller module encapsulates the timing and implementation logic into UpSells. Each UpSell contains the following properties and functions:

override fun requestStatement(startDate: String?, endDate: String?, statementType: String, cardLastFourDigits : String?): Single<GenericResponse> {
return localDataStore.getAccessToken().zipWith(localDataStore.getUserData(), BiFunction { t1: String, t2: DataUserData ->
Pair(t1, t2)
}).flatMap {
remoteDataSource.requestStatement(startDate, endDate, statementType, cardLastFourDigits, it.first).map { entity ->
mapper.customMapFromEntity(entity, it.second.EmailAddress)
}
}
}
@biodunalfet
biodunalfet / test_spec.java
Created July 24, 2019 11:11
Specification for unit test
package com.flutterwave.raveandroid.validators;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
// https://www.codewars.com/kata/568e111353952f6c82000014
fun main(args: Array<String>) {
// print(Character.getNumericValue('5'))
print(UPC("614141000030"))
}
fun UPC(s : String) : Boolean {
//calculate the odd sum
fun price(items : String) : Double {
//split string into items
//store in a map thats maps items to their quantity
//calculate price
val itemsAsList = items.toCharArray().map { it.toString() }
val itemsMap = mutableMapOf<String, Int>()
for (i in itemsAsList) {
val qty = itemsMap.getOrDefault(i, 0)
suspend fun <ResponseType>
makeCall(deferredResponse: Deferred<Response<ResponseType>>): LiveData<Resource<ResponseType>> {
val result = MutableLiveData<Resource<ResponseType>>()
try {
val response = deferredResponse.await()
if (response.isSuccessful) {
@biodunalfet
biodunalfet / barter_t_and_c.md
Last active October 7, 2020 15:11
Barter Terms and Conditions

Flutterwave's Barter® Terms of Service

Introduction

These Terms and Conditions ("Terms") contained herein on this page is a legal agreement between you, as a prospective customer and or customer of Flutterwave's services and Flutterwave UK Limited (Flutterwave, "we", "our" or "us") and shall govern your access to and use of Flutterwave's services which include all pages within the Flutterwave website, mobile applications and other products and services (collectively referred to