Skip to content

Instantly share code, notes, and snippets.

import openai
import streamlit as st
from streamlit_chat import message
from dotenv import load_dotenv
import os
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma
import openai
from langchain.document_loaders import UnstructuredMarkdownLoader
from langchain.chains.question_answering import load_qa_chain
@AntonioRossi
AntonioRossi / embed.py
Created April 18, 2023 10:30 — forked from peterw/embed.py
embedding the pdf
import openai
import streamlit as st
from streamlit_chat import message
from dotenv import load_dotenv
import os
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Chroma
import openai
from langchain.document_loaders import UnstructuredMarkdownLoader
from langchain.chains.question_answering import load_qa_chain

Keybase proof

I hereby claim:

  • I am antoniorossi on github.
  • I am antoniorossi (https://keybase.io/antoniorossi) on keybase.
  • I have a public key ASAX-HTVusgkcSv8v8c8D0OKFW3xbjcQI088eTLzjagUBwo

To claim this, I am signing this object:

@AntonioRossi
AntonioRossi / Docker-on-qubes.md
Created May 4, 2018 10:39 — forked from xahare/Docker-on-qubes.md
How to run docker on Qubes-OS

Docker on Qubes

(Docker)[https://www.docker.com] a software container platform. You may have heard of it.

(Qubes-OS)[https://www.qubes-os.org] "A Reasonably Secure Operating System"

It takes a little work to get Docker running on qubes because you have to modify a templatevm. But, once you do it, you have the ease of compartmentalization qubes is famous for.

As of this writing the versions im using are,

package com.cobocn.hdms.app.ui.widget;
/**
* Created by benny on 14-9-19.
*/
import android.content.Context;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
@AntonioRossi
AntonioRossi / certgen.rb
Created June 13, 2016 14:03 — forked from sheerun/certgen.rb
Docker TLS certificate generator
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
@AntonioRossi
AntonioRossi / gist:6f4b1025c6dc1d43144a
Created November 13, 2015 15:59 — forked from djvs/gist:24006c975ff11fd889e3
AngularJS (Angular) HTML5 Audio Player directive from scratch

Write your own HTML5 Audio/AngularJS audio player

example

I tried AudioJS, JPlayer, and a couple of the angular directives. Somehow they all sucked! And yet the HTML5 audio API was totally open and in theory should work fine with Angular. Time to get my hands dirty as usual....

Javascript:

app.directive('aplayer',function($interval) {

# Install ttfautohint on Ubuntu 12.04 LTS
# @author: Jean Lescure
# 2014/04/23
# Clone ttfautohint git repo to 'tmp' dir and cd into resulting repo folder
cd /tmp
git clone git://repo.or.cz/ttfautohint.git
cd ttfautohint
# Handle bootstrap's dependency: automake