Skip to content

Instantly share code, notes, and snippets.

View chezou's full-sized avatar

Aki Ariga chezou

View GitHub Profile
@chezou
chezou / README.md
Created January 29, 2024 01:21
RAG Chatbot using Confluence

confluence-rag

This is a sample application for RAG (retrieval augmented generation) with Confluence data.

It depends on rye for package management.

Since gist doesn't allow to crete a directory, make sure to create confluence_rag directory and move Python files under it.

mkdir confluence_rag
@chezou
chezou / constraints.txt
Last active October 29, 2023 23:31
Blog recommendation with prelims and chroma
annotated-types==0.6.0
anyio==3.7.1
backoff==2.2.1
bcrypt==4.0.1
cachetools==5.3.2
certifi==2023.7.22
charset-normalizer==3.3.1
chroma-hnswlib==0.7.3
chromadb==0.4.15
click==8.1.7
@chezou
chezou / re2testbasic.cpp
Created November 26, 2011 12:05
Sample code of re2 basic regexp functions.
#include <iostream>
#include <string>
#include <re2/re2.h>
#include <vector>
using namespace std;
void test_fullmatch(){
string s,t;
string str("あぶらかたぶら");
aafigure==0.6
alabaster==0.7.10
Babel==2.4.0
certifi==2017.4.17
chardet==3.0.4
colorama==0.3.9
docutils==0.13.1
idna==2.5
imagesize==0.7.1
Jinja2==2.9.6
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
diff --git a/prelims/handler.py b/prelims/handler.py
index d4d416d..014bc7d 100644
--- a/prelims/handler.py
+++ b/prelims/handler.py
@@ -1,16 +1,18 @@
from .post import Post
import os
-
+from pathlib import Path
@chezou
chezou / code-server.ipynb
Created July 17, 2020 00:56
code-server.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chezou
chezou / kinesis_freestyle2.json
Created September 3, 2018 02:57
Karabiner-Elements setting for Kinesis freestyle2 only for Windows version with disabling for Mac. `location_id` should be replaced for your Kinesis freestyle2.
{
"title": "Kinesis Freestyle2",
"rules": [
{
"description": "Swap only for Windows",
"manipulators": [
{
"conditions": [
{
"type": "device_if",
@chezou
chezou / visword2vec.py
Last active December 2, 2020 20:52
Visualizer word2vec data for ipython notebook
# -*- coding: utf-8 -*-
"""
given a word and visualize near words
original source code is https://github.com/nishio/mycorpus/blob/master/vis.py
"""
import word2vec_boostpython as w2v
from sklearn.decomposition import PCA
import matplotlib.pyplot as plt
import matplotlib.font_manager
@chezou
chezou / backspace_stats_2.ipynb
Created January 28, 2019 15:36
backspace_stats_2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.