Skip to content

Instantly share code, notes, and snippets.

View criminact's full-sized avatar

Raj Hammeer Singh Hada criminact

View GitHub Profile
@criminact
criminact / llama3-8b-instruct-demo.ipynb
Created April 20, 2024 21:35
llama3-8b-instruct-demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@criminact
criminact / convertingtogguf.ipynb
Created April 9, 2024 20:44
ConvertingToGGUF.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@criminact
criminact / screenCapture.cpp
Created April 22, 2023 21:02
Screen Capture
#include <iostream>
#include <Windows.h>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
Mat captureScreenMat(HWND hwnd)
{
HDC hwindowDC,hwindowCompatibleDC;
@criminact
criminact / OTPViewSettings.gradle
Created August 11, 2022 21:03
OTPView - How to include in android project
dependencyResolutionManagement {
...
repositories {
...
maven { url 'https://jitpack.io' }
}
}
@criminact
criminact / OTPActivity.kt
Last active April 27, 2024 12:06
OTPView completion listener implementation
var otpView = findViewById<OTPView>(R.id.otpView)
otpView.setOTPListener(object : OTPView.OTPListener {
override fun onOTPCompleted(otp: String) {
Toast.makeText(this@MainActivity, "OTP Completed $otp", Toast.LENGTH_LONG).show()
if(otp == "123456"){
otpView.showSuccess()
}else{
otpView.showFailure()
}
<com.noobcode.otpview.OTPView
android:id="@+id/otpView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@color/white"
app:borderThickness="2"
app:otpLength="6"
android:text="123456"
app:otpLayoutColor="@color/teal_200"
@criminact
criminact / settings.gradle
Created November 22, 2021 16:03
Adding jitpack repo in new versions
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
//add jitpack here
maven { url "https://jitpack.io" }
@criminact
criminact / build.gradle
Created November 22, 2021 16:00
Adding old android jitpack repo
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
@criminact
criminact / build.gradle
Last active April 27, 2024 12:09
OTP View build.gradle (app)
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
}
android {
compileSdk 34
defaultConfig {
@criminact
criminact / AppHomeFragmentUpdater.kt
Created November 14, 2021 08:13
Updating List from the MainClass
adapter.updateData(/*updated list*/)