Skip to content

Instantly share code, notes, and snippets.


Hamza Fetuga biodunalfet

View GitHub Profile
View MainFragmentViewModel.kt
package com.hf.fichaya.ui.main
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
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 /
Last active Mar 10, 2020 — forked from PurpleBooth/
A template to make good



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


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

View rxrx.kt
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 /
Created Jul 24, 2019
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;
import static org.junit.Assert.*;
View upc.kt
fun main(args: Array<String>) {
// print(Character.getNumericValue('5'))
fun UPC(s : String) : Boolean {
//calculate the odd sum
View supermarket.kt
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)
View coroutines.kt
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 /
Last active Oct 7, 2020
Barter Terms and Conditions

Flutterwave's Barter® Terms of Service


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

private class MyBrowser extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return true;