Skip to content

Instantly share code, notes, and snippets.

View felixdivo's full-sized avatar
💻

Felix Divo felixdivo

💻
View GitHub Profile
@saeed-khalafinejad
saeed-khalafinejad / AndroidManifest.xml
Last active October 16, 2022 10:10
Android barcode scanner activity that is implemented by Google ML Kit and Fotoapparat library with the Kotlin language
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.kasabeh.barcode_ml_foto">
<uses-permission android:name="android.permission.CAMERA"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
@MFreidank
MFreidank / infinite_dataloader.py
Last active October 16, 2023 13:36
A pytorch DataLoader that generates an unbounded/infinite number of minibatches from the dataset.
from torch.utils.data import DataLoader
class InfiniteDataLoader(DataLoader):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Initialize an iterator over the dataset.
self.dataset_iterator = super().__iter__()
def __iter__(self):
@nyorain
nyorain / aud2.md
Last active February 3, 2018 19:17
AuD_Codemonkeys_2_nb_version

Djikstra

One test in 'Djiktra - complete' is not working but it's most likely a wrong test/a bug.

public void preProcess() throws InvalidInputException
{
    if(getGraph() == null || getSourceNode() == null)
        throw new InvalidInputException();
@sheharyarn
sheharyarn / RVEmptyObserver.java
Created May 13, 2017 13:55
Set Empty Layout for RecyclerViews in Android
/**
* Custom implementation of AdapterDataObserver to show empty layouts
* for RecyclerView when there's no data
*
* Usage:
*
* adapter.registerAdapterDataObserver(new RVEmptyObserver(recyclerView, emptyView));
*/
public class RVEmptyObserver extends RecyclerView.AdapterDataObserver {
private View emptyView;
@nyorain
nyorain / AuD_Codemonkeys_1.md
Last active June 19, 2017 19:32
Codemonkey solutions

Notes

  • All code snippets should pass all unit tests, but may have bugs beyond the tests
  • the exercise list contains findSmallestElement_iterative, but codemonkeys does not.
    • the same for singly_linked_list::revert iterative...
    • and for singly_linked_list::find
    • also array_list::get
@zackw
zackw / unicode-growth-rate.R
Created October 30, 2015 00:30
Compute the growth rate of Unicode.
#! /usr/bin/Rscript
suppressPackageStartupMessages({
library(ggplot2)
library(scales)
library(grid)
})
# Data from https://en.wikipedia.org/wiki/Unicode#Versions
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//