Skip to content

Instantly share code, notes, and snippets.

View TechTinkerer42's full-sized avatar

TechTinkerer108 TechTinkerer42

View GitHub Profile
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
@TechTinkerer42
TechTinkerer42 / copy-logs-lambda.js
Created July 31, 2020 23:02 — forked from aaronfranco/copy-logs-lambda.js
Analyzing Multi-Account WAF Logs with AWS Elasticsearch Service, Amazon Athena and QuickSight Scripts
// JavaScript
// Load the AWS SDK
const aws = require('aws-sdk');
// Construct the AWS S3 Object
const s3 = new aws.S3();
// Define variable for the destination bucket
var destBucket = "<central logging bucket name>";
@TechTinkerer42
TechTinkerer42 / Compare-timeseries.md
Created June 17, 2020 11:25 — forked from denis-bz/Compare-timeseries.md
Compare timeseries in python

Comparing time series in Python

The task: you have a hundred pairs of time series, say A1 .. A100 and B1 .. B100, e.g. temperature data at 100 cities in two different years. All the time series are say 365 long, but many days are missing (NA or NaN). Some pairs are quite similar, some not. You want to rank them from most similar .. least similar, 0 .. 100, in order to describe and understand how A and B differ.

(The $64 question: does it matter ?

@TechTinkerer42
TechTinkerer42 / clean_code.md
Created June 7, 2020 10:35 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@TechTinkerer42
TechTinkerer42 / pom.xml
Created October 24, 2015 02:34 — forked from sharwell/pom.xml
Maven pom.xml to support automatic code generation for ANTLR 4 grammar(s) during an Eclipse build. This configuration does not support (and is not intended for) building using Maven alone.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.uiuc</groupId>
<artifactId>cchistory</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>CodeCompletionWithHistory</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
TL;DR - It was proving to be more buildsystem than I needed,
and I had found that there were other buildsystems that met my needs
that I felt were lighter and more nimble. It's still a fine product
that I continue to recommend to this day, I just no longer see it as
"The One True Way".
=========================
1: Bamboo was consuming a significant amount of system resources,
//
// facerec.cpp, this goes into your dll/so.
// this is just an example for lbp, but it will work similar for fisher and eigen, too.
//
#include "jni.h"
#include "opencv2/contrib/contrib.hpp"
//