Skip to content

Instantly share code, notes, and snippets.

View abumubaarak's full-sized avatar
🏠
Working from home

Abu Mubaarak abumubaarak

🏠
Working from home
View GitHub Profile
import android.content.Context
import android.net.ConnectivityManager
import android.net.Network
import android.net.NetworkCapabilities
import android.net.NetworkRequest
import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
@bradtraversy
bradtraversy / devcamper_specs.md
Last active July 12, 2024 01:33
Specs for Devcamper Udemy course project

DevCamper Backend API Specifications

Create the backend for a bootcamp directory website. The frontend/UI will be created by another team (future course). The html/css template has been created and can be used as a reference for functionality. All of the functionality below needs to be fully implmented in this project.

Bootcamps

  • List all bootcamps in the database
    • Pagination
    • Select specific fields in result
    • Limit number of results
  • Filter by fields
/**
* Make bitmap appropriate size, greyscale and inverted. MNIST model is originally teached on
* dataset of images 28x28px with white letter written on black background.
*/
public static Bitmap prepareImageForClassification(Bitmap bitmap) {
ColorMatrix colorMatrix = new ColorMatrix();
colorMatrix.setSaturation(0);
colorMatrix.postConcat(BLACKWHITE);
colorMatrix.postConcat(INVERT);
ColorMatrixColorFilter f = new ColorMatrixColorFilter(colorMatrix);
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active June 28, 2024 20:49
React Native Bridging Cheatsheet
@parmentf
parmentf / GitCommitEmoji.md
Last active July 26, 2024 09:35
Git Commit message Emoji
@frogermcs
frogermcs / AppComponent.java
Last active March 29, 2019 04:11
Sources for blog post "Dependency injection with Dagger 2 - Scopes"
@Singleton
@Component(
modules = {
AppModule.class,
GithubApiModule.class
}
)
public interface AppComponent {
UserComponent plus(UserModule userModule);
@jrnk
jrnk / ISO-639-1-language.json
Last active July 24, 2024 12:19
ISO 639-1 Alpha-2 codes of languages JSON
[
{ "code": "aa", "name": "Afar" },
{ "code": "ab", "name": "Abkhazian" },
{ "code": "ae", "name": "Avestan" },
{ "code": "af", "name": "Afrikaans" },
{ "code": "ak", "name": "Akan" },
{ "code": "am", "name": "Amharic" },
{ "code": "an", "name": "Aragonese" },
{ "code": "ar", "name": "Arabic" },
{ "code": "as", "name": "Assamese" },
@6174
6174 / Random-string
Created July 23, 2013 13:36
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);