Skip to content

Instantly share code, notes, and snippets.

View pourmand1376's full-sized avatar
😉
Learning

Amir Pourmand pourmand1376

😉
Learning
View GitHub Profile
@jvelezmagic
jvelezmagic / main.py
Last active March 25, 2024 09:46
QA Chatbot streaming with source documents example using FastAPI, LangChain Expression Language, OpenAI, and Chroma.
"""QA Chatbot streaming using FastAPI, LangChain Expression Language , OpenAI, and Chroma.
Features
--------
- Persistent Chat Memory:
Stores chat history in a local file.
- Persistent Vector Store:
Stores document embeddings in a local vector store.
- Standalone Question Generation:
Rephrases follow-up questions to standalone questions in their original language.
@HimDek
HimDek / Install Android apps or apk files in Windows using Windows Subsystem for Android (No Emulator).md
Last active May 3, 2024 13:49
This Guide will show you how to install and run apk files or Android apps in any Edition of Windows 11 using Windows Subsystem for Android. WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator.

Install Android apps or apk files in Windows using Windows Subsystem for Android

WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow my guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.

Prerequisites:

  • Windows Subsystem for Android or WSA must be Installed.

Click here to view the guide that shows how to install Windows Subsystem for Android in any Edition of Windows 11 (including Windows 11 Home) non Inider or stable release.

How to Install Android Apps or apk files in Windows Subsystem for Android:

@pourmand1376
pourmand1376 / fast_fourier_transform_impl.py
Last active May 25, 2021 11:45
Fast Fourier Transform Implementation with numpy
import numpy as np
import matplotlib.pyplot as plt
from skimage import color
def fft(length_x,width_y,v,y,image,inner=True):
expVector=np.exp(-2j*np.pi/width_y*(v@y)) if inner else np.exp(-2j*np.pi/length_x*(v@y))
if inner:
return image @ expVector
else:
return expVector @ image
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active May 6, 2024 03:05
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

from matplotlib import pyplot as plt
import cv2
img = cv2.imread('/Users/mustafa/test.jpg')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
plt.imshow(gray)
plt.title('my picture')
plt.show()
@sdcb
sdcb / FF.cs
Last active January 1, 2020 09:45
LL(1) First & Follow C# edition
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace MyLL1
{
public interface IRule
{
string Name { get; }
@WeiTang114
WeiTang114 / nvv.sh
Created March 13, 2017 06:43
Show username after each process in nvidia-smi.
#!/bin/bash
# Show username after each process in nvidia-smi
# like:
# ...
# +------------------------------------------------------+
# | Processes: GPU Memory |
# | GPU PID Type Process name Usage |
# |======================================================|
# | 0 150752 C python 830MiB | User: user1
# | 1 2185 C /usr/bin/python 1090MiB | User: user2
@Madrigal
Madrigal / kindle.sh
Created January 14, 2014 23:34
Send files to your Amazon Kindle via the Command Line Interface.
# Command line utility to send attachments to your kindle
# It supports sending a PDF in both regular form and with the convert option
# and sending to the regular (@kindle.com) or free Kindle mail (@free.kindle.com)
# The only argument it has is the name of the file to send. It will detect if
# it is a pdf and treat it accordingly.
## Preferences
# If true, send one version with pdf as-is, another with 'convert' subject
# else, just send the pdf version