Skip to content

Instantly share code, notes, and snippets.

View s3nh's full-sized avatar
🦊

____ s3nh

🦊
View GitHub Profile
@s3nh
s3nh / gist:cfbbf43f5e9e3cfe8c3e4e2f0d550b80
Last active January 24, 2024 18:08
custom_embedding_fn_chroma.py
import torch
from chromadb import EmbeddingFunction
from typing import List, Dict, Union
from typing import Any, TypeVar
INSTRUCTIONS = {
"qa": {
"query": "Represent this query for retrieving relevant documents: ",
"key": "Represent this document for retrieval: ",
#Add e5-instruct-mistral layers, so they naming is different than
# original mistral instruct one
from __future__ import annotations
from typing import Sequence
from .constants import MODEL_ARCH, MODEL_TENSOR, MODEL_TENSORS, TENSOR_NAMES
@s3nh
s3nh / index.pug
Created September 19, 2023 19:29
SlideShow Animated
body
section#js-header.slideshow
.slideshow__slide.js-slider-home-slide.is-current(data-slide="1")
.slideshow__slide-background-parallax.background-absolute.js-parallax(data-speed="-1" data-position="top" data-target="#js-header")
.slideshow__slide-background-load-wrap.background-absolute
.slideshow__slide-background-load.background-absolute
.slideshow__slide-background-wrap.background-absolute
.slideshow__slide-background.background-absolute
.slideshow__slide-image-wrap.background-absolute
.slideshow__slide-image.background-absolute(style=`background-image:url("https://images.pexels.com/photos/227675/pexels-photo-227675.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260")`)
@s3nh
s3nh / horizontal-tab-menu.markdown
Created July 17, 2020 07:06
Horizontal Tab Menu

Horizontal Tab Menu

Horizontal tab menu with left and right arrow key navigation. Built with Stylus and jQuery.

A Pen by Ettrics on CodePen.

License.

@s3nh
s3nh / custom-calculator-section-1.markdown
Created July 17, 2020 06:55
Custom Calculator Section 1
@s3nh
s3nh / index.html
Created July 17, 2020 06:53
portfolio with angular
<body ng-app="app">
<!--header-->
<div id="header">
<div class="container cont-header txt-title txt-md" >
<span class="header-left">Kyla Vana</span>
<ul class="header-right">
<li><a href="#portfolio">Portfolio</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>