Skip to content

Instantly share code, notes, and snippets.

@adrianhajdin
adrianhajdin / constants.index.ts
Created October 27, 2023 09:18
Build and Deploy a Full Stack Social Media App | React JS, Appwrite, Tailwind CSS, React Query
export const sidebarLinks = [
{
imgURL: "/assets/icons/home.svg",
route: "/",
label: "Home",
},
{
imgURL: "/assets/icons/wallpaper.svg",
route: "/explore",
label: "Explore",
# Make sure you have Anaconda installed
# This tutorial assumes you have an Nvidia GPU, but you can find the non-GPU version on the Textgen WebUI github
# More information found here: https://github.com/oobabooga/text-generation-webui
conda create -n textgen python=3.10.9
conda activate textgen
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui
cd text-generation-webui
python -m pip install -r requirements.txt
@Daniel-V-Richardson
Daniel-V-Richardson / assistant.py
Created January 24, 2023 14:44
Simple AI Voice Assistant using OpenAI API
import speech_recognition as sr
import pyttsx3
import openai
openai.api_key = "Your API Key"
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voices', voices[1].id)
@adrianhajdin
adrianhajdin / App.css
Last active October 12, 2024 17:25
Build and Deploy a React Admin Dashboard App With Theming, Tables, Charts, Calendar, Kanban and More
@import url('https://cdn.syncfusion.com/ej2/material.css');
.sidebar {
box-shadow: rgb(113 122 131 / 11%) 0px 7px 30px 0px;
}
.nav-item,
.navbar {
z-index: 10000;
}
@media screen and (max-width:800px) {
@adrianhajdin
adrianhajdin / StateContext.js
Last active July 11, 2024 14:11
Build and Deploy a Modern Full Stack ECommerce Application with Stripe
import React, { createContext, useContext, useState, useEffect } from 'react';
import { toast } from 'react-hot-toast';
const Context = createContext();
export const StateContext = ({ children }) => {
const getLocalStorage = (name) => {
if (typeof window !== 'undefined') {
const storage = localStorage.getItem(name);
@koolkishan
koolkishan / login.css
Created March 8, 2022 17:54
Index CSS Code for JWT login with react and nodejs
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
height: 100vh;
width: 100vw;
display: flex;
def choose_source_image(self):
self.source_filename = QFileDialog.getOpenFileName()[0]
self.source_image_data = cv2.imread(self.source_filename)
source_image_resized = resize_image(self.source_image_data, self.max_img_width, self.max_img_height)
self.source_image.setPixmap(pixmap_from_cv_image(source_image_resized))
def process_image(self):
if self.source_image_data is None:
error_dialog = QErrorMessage()
error_dialog.showMessage('No image selected')
@ejmejm
ejmejm / pytorch_tips_yt_follow.ipynb
Created May 9, 2021 09:14
pytorch_tips_yt_follow.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samirsaci
samirsaci / nodes.py
Created March 19, 2021 20:52
Create nodes
def order_brand(PATH_IN):
''' List of all brands in each order'''
# Import DataFrame
df_rec = pd.read_excel(PATH_IN)
# Listing Unique Brands
df_ordbr = pd.DataFrame(df_rec.groupby(['ORDER_NUMBER'])['BRAND'].unique())
df_ordbr.columns = ['list_brand']
# source = list brands