Skip to content

Instantly share code, notes, and snippets.

View dharay's full-sized avatar

Dharay Mistry dharay

  • Deloitte
  • mumbai/bangalore
View GitHub Profile
Conda Cheat Sheet
Conda is a package, dependency, and environment manager. It's used to create isolated environments for different projects, ensuring that dependencies for one project don't interfere with another.
Environment Management
Create a new environment: conda create --name <env_name>
This command creates an environment with the specified name. To create it with specific Python versions or packages, add them to the command: conda create --name <env_name> python=3.9 numpy scipy
@dharay
dharay / gist:2bd408fabe25fafc65085bcd53c00337
Last active April 13, 2025 07:24
ONNX directml for radeon 9000 series
import onnxruntime_genai as og
import argparse
import time
import numpy as np
import os
os.environ["PROCESSOR_ARCHITECTURE"] = "AMD64"
def main(args):
if args.verbose: print("Loading model...")
if args.timings:
alias rni="npx react-native run-ios"
alias rna="npx react-native run-android"
alias gitp="git add . ; git commit -m "update" ; git push"
alias podi="npx pod-install ios"
# .gitprofile
alias gp='git add . && git commit -m && git push'
#.zhrc
import React, { useState } from 'react';
import { createStore } from 'redux';
import { Provider, useDispatch, useSelector } from 'react-redux';
// Define initial state
const initialState = {
todos: []
};
// Define actions
sudo apt update && sudo apt upgrade -y
sudo apt-get install ubuntu-desktop xrdp stacer -y
sudo cp /etc/iptables/rules.v4 /etc/iptables/rules.v4.bak && sudo truncate -s 0 /etc/iptables/rules.v4
sudo rm /usr/share/polkit-1/actions/org.freedesktop.color.policy
# give space and write ur password
sudo passwd ubuntu
import UIKit
protocol TalkingAnimal{
func speak()
}
class Cat: TalkingAnimal {
func speak() {
//some complex functionality in real world scenario
print("meow!")
@dharay
dharay / LetsEncrypt.md
Created January 18, 2020 12:40 — forked from davestevens/LetsEncrypt.md
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt