Skip to content

Instantly share code, notes, and snippets.

View ajinkyapuar's full-sized avatar

Ajinkya Puar ajinkyapuar

View GitHub Profile
@ajinkyapuar
ajinkyapuar / nvidia.md
Created October 25, 2023 13:17 — forked from bitsurgeon/nvidia.md
install Nvidia driver on Ubuntu with Secure Boot

Install Nvidia Driver on Ubuntu 18.04.3

Secure Boot

This section applies to machines with Secure Boot, such as ThinkPad.

  1. Before installation, switch to "Discrete Graphics" in BIOS, if both Intel and Nvidia graphics are present.
  2. During installation, make sure to select the "Install third-party software for graphics and Wi-Fi hardware and addition media formats" in "Updates and other software" screen.
  3. Select "Configure Secure Boot", and set password.
  4. Continue Ubuntu installation as normal.
@ajinkyapuar
ajinkyapuar / anydesk-enable-remote-access.md
Created October 9, 2023 11:31 — forked from imami/anydesk-enable-remote-access.md
AnyDesk - How Enable Remote Access from ubuntu/debian terminal

###AnyDesk - How Enable Remote Access from ubuntu/debian terminal.

Note:

Here are the commands might be usefull in this purpose:

  • anydesk --get-status : To get current status of anydesk, which might be offlien,online or nothing.
  • anydesk --get-id : To get the ID that your system can be accessed by.
  • anydesk --service : To start anydesk service if not already running (for Linux).
  • anydesk --restart-service : To restart anydesk service
  • anydesk --stop-service : To stop anydesk service
# Must have conda installed
# It costs approximately $0.2 (in GPT-4 API fees) to generate one example with analysis and design, and around $2.0 for a full project.
conda create -n metagpt python=3.11.4
conda activate metagpt
npm --version # to check you have npm installed
# optional: install node if you don't have it
npm install -g @mermaid-js/mermaid-cli
git clone https://github.com/geekan/metagpt
cd metagpt
@ajinkyapuar
ajinkyapuar / app.py
Created May 16, 2023 08:49
Python Script for Gaze Data Collection
import os
import cv2
import tkinter as tk
points = [(0.2, 0.2), (0.5, 0.2), (0.8, 0.2),
(0.2, 0.5), (0.5, 0.5), (0.8, 0.5),
(0.2, 0.8), (0.5, 0.8), (0.8, 0.8)]
class CalibrationApp:
def __init__(self, master):
@ajinkyapuar
ajinkyapuar / index.html
Created April 12, 2023 06:07 — forked from alecordev/index.html
Example vanilla JS WebSocket
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
// use vanilla JS because why not
window.addEventListener("load", function() {
// create websocket instance
var mySocket = new WebSocket("ws://localhost:8080/ws");
@ajinkyapuar
ajinkyapuar / GetExternalIPAddress.cs
Created January 31, 2023 09:15 — forked from Raziel619/GetExternalIPAddress.cs
Unity Function for getting External IP Address
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class GetExternalIPAddress : MonoBehaviour {
void Start()
{
StartCoroutine(GetIPAddress());
@ajinkyapuar
ajinkyapuar / gist:75337c57abb912c331852d8c318ee7a4
Created January 2, 2023 09:25 — forked from davidnunez/gist:1404789
list all installed packages in android adb shell
pm list packages -f
@ajinkyapuar
ajinkyapuar / OpenOtherAppFromUnityScript.cs
Created December 26, 2022 09:57 — forked from arumoy/OpenOtherAppFromUnityScript.cs
Open Other App From Unity C# Script - Android
public void OpenApp() {
string bundleId = "<App Package Name>"; // your target bundle id
AndroidJavaClass up = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject ca = up.GetStatic<AndroidJavaObject>("currentActivity");
AndroidJavaObject packageManager = ca.Call<AndroidJavaObject>("getPackageManager");
//if the app is installed, no errors. Else, doesn't get past next line
AndroidJavaObject launchIntent = packageManager.Call<AndroidJavaObject>("getLaunchIntentForPackage",bundleId);
ca.Call("startActivity",launchIntent);
@ajinkyapuar
ajinkyapuar / OSC-Python.py
Created October 17, 2022 07:27 — forked from shks/OSC-Python.py
Touchdesigner - python communication via OSC
#python
'''
setup instruction
for Install pythonosc
pip install python-osc
'''
from pythonosc import dispatcher
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch