Skip to content

Instantly share code, notes, and snippets.

View prashunchitkr's full-sized avatar
🎯
Focusing

prashunchitkr

🎯
Focusing
  • Nepal
View GitHub Profile
@Bearbobs
Bearbobs / Awesome Configuration
Last active July 4, 2024 20:20
Awesome Dot Files Config and How to Setup on Ubuntu/POP-OS/Debain and other debian based distro
Config Files Repo : https://github.com/Bearbobs/glorious-awesome-debian
Setps to setup on debain based system as the original author is on arch and It's quite diffrent procedure as compared.
## Awesome and Rofi are quite old in debain repo, Building from Git is required.
Steps to do the same.
## Rofi->
git clone --recursive https://github.com/DaveDavenport/rofi
cd rofi
// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*
@nairouz
nairouz / custom_layers.md
Created June 22, 2018 21:43
Blog - Custom layers in Keras

Building custom layers in Keras

About Keras

Keras is currently one of the most commonly used deep learning libraries today. And part of the reason why it's so popular is its API. Keras was built as a high-level API for other deep learning libraries ie Keras as such does not perform low-level tensor operations, instead provides an interface to its backend which are built for such operations. This allows Keras to abstract a lot of the underlying details and allows the programmer to concentrate on the architecture of the model. Currently Keras supports Tensorflow, Theano and CNTK as its backends.

Let's see what I mean. Tensorflow is one of the backends used by Keras. Here's the code for MNIST classification in TensorFlow and Keras. Both models are nearly identical and applies to the same problem. But if you compare the codes you g

@PattoMotto
PattoMotto / enable_camera2_api.bat
Last active September 16, 2019 10:29
Enable Camera 2 API for android
@echo off
REM before use this script please disable pin/password unlock screen (set to none)
REM enable developer mode and USB debugging
REM download ADB and FASTBOOT from https://forum.xda-developers.com/showthread.php?t=2588979
REM download recovery file for your device from https://twrp.me and rename to recovery.img
REM Tested with MI A1
REM Thanks, script from https://forum.xda-developers.com/showpost.php?p=75541654&postcount=98
echo. & echo Rebooting & echo.
@KKorvin
KKorvin / PickDominantColor.java
Last active August 3, 2021 16:07
How to pick dominant color from image on Android. Palette Google library used.
// Don't forget to add Palette library to your build.gradle
// compile 'com.android.support:palette-v7:+'
public static int getDominantColor(Bitmap bitmap) {
List<Palette.Swatch> swatchesTemp = Palette.from(bitmap).generate().getSwatches();
List<Palette.Swatch> swatches = new ArrayList<Palette.Swatch>(swatchesTemp);
Collections.sort(swatches, new Comparator<Palette.Swatch>() {
@Override
public int compare(Palette.Swatch swatch1, Palette.Swatch swatch2) {
return swatch2.getPopulation() - swatch1.getPopulation();

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by