Skip to content

Instantly share code, notes, and snippets.

import llama_cpp
import re
import json
# Model configuration
# tested with mistral, llama2, llama3, and phi3
model_path = "/path/to/model"
base_llm = llama_cpp.Llama(model_path, seed=42, n_gpu_layers=-1, n_ctx=4096, verbose=False, temperature=0.0)
@playerx
playerx / .env
Last active May 6, 2024 10:39
Script for importing batch data import from csv to MongoDB
MONGO_DB=
@Migaro106
Migaro106 / dexie-export-import.markdown
Created April 11, 2019 09:38
dexie-export-import
@justingorham
justingorham / README.md
Last active May 6, 2024 10:38
Generate plantUml from typescript default export

PlantUML diagrams

Use <br> instead of \n to ensure proper line breaking.

Make the default export of any .ts file in diagrams a UML string

@dukemai
dukemai / Selector.js
Created September 5, 2018 11:11
Redux Selector
export const mapStateToProps = {
Component: state => ({
}),
};
export const mapDispatchToProps = {
Component: dispatch => ({
}),
@dukemai
dukemai / common-copied
Last active May 6, 2024 10:37
common copied
/* eslint import/no-named-as-default: 0 */
import { propTypes, defaultProps } from './PropTypes';
import { mapStateToProps, mapDispatchToProps } from './Selector';
import { lazy } from '@/core/scaffolding/feature';
const ImageDropHolder = lazy({ namespace: 'ImagesManager', exportName: 'ImageDropHolder' });
@dukemai
dukemai / npm_modules.list
Last active May 6, 2024 10:37
list convenient modules
css-box-model
is-plain-object
lodash
package-json
text-table
#react
React-Move
classnames
react-virtualized
@dukemai
dukemai / index.test.js
Last active May 6, 2024 10:37
tests copy text
import browser from "exp-react-test";
import mountTestApp from "./helpers/mountTestApp";
When("The application mounts", () => {
mountTestApp();
});
@dukemai
dukemai / tips.js
Last active May 6, 2024 10:37
ReactNative code snipets
// disable warning
console.disableYellowBox = true;
//eslint
npx install-peerdeps --dev eslint-config-airbnb
//shoutem
yarn add @shoutem/ui
//configuration