Skip to content

Instantly share code, notes, and snippets.

View obenjiro's full-sized avatar
🎯
Focusing

Alexey Okhrimenko obenjiro

🎯
Focusing
View GitHub Profile
@Birch-san
Birch-san / code-assist.md
Last active March 4, 2024 19:32
Local VSCode AI code assistance via starcoder + 4-bit quantization in ~11GB VRAM

Install HF Code Autocomplete VSCode plugin.

We are not going to set an API token. We are going to specify an API endpoint.
We will try to deploy that API ourselves, to use our own GPU to provide the code assistance.

We will use bigcode/starcoder, a 15.5B param model.
We will use NF4 4-bit quantization to fit this into 10787MiB VRAM.
It would require 23767MiB VRAM unquantized. (still fits on a 4090, which has 24564MiB)!

Setup API

@Norod
Norod / gpt2-large-onnx-convert.py
Created August 10, 2022 07:58
Converting gpt2-large to onnx with multiple external files and using it later for inference
#!/usr/bin/python
# -*- coding: utf-8 -*-
import transformers
from transformers import AutoTokenizer, AutoModelForCausalLM, AutoModel, AutoConfig
from transformers.onnx import FeaturesManager, convert, export
from pathlib import Path
import os
model_id = 'gpt2-large'
@Informatic
Informatic / README.md
Last active April 29, 2024 11:18
openlgtv webOS hacking notes

This is just a dump of some interesting undocumented features of webOS (3.8 specifically, on early 2018 4k LG TV) and other development-related tips.

Homebrew app ideas

@RaschidJFR
RaschidJFR / webpack.config.js
Last active May 11, 2022 18:35
Transpile Angular project with Babel + Webpack
/**
* ## Angular custom webpack config for compatibility with IE11
* ------------------------------------------------------------
* 1. Add this file to your project root. Add the modules list that needs transpiling (see below code).
* 2. Install dev dependencies:
*
* `$ npm i -D @angular-builders/custom-webpack:browser babel-loader @babel/core @babel/preset-env browserlist`
*
* 3. Add this to your `angular.json`:
*
@glebmachine
glebmachine / snippet.js
Last active February 1, 2024 21:40
Snippet: Force Safari to switch to discrete GPU
try {
document.createElement('canvas').getContext('webgl', { powerPreference: "high-performance" })
} catch(e) {}
@irustm
irustm / AngularVsReact.md
Last active April 8, 2024 09:47
Angular vs React

На случай важных переговоров

[11.01.18 18:47] [Forwarded from Алексей Охрименко]

  1. Google, Microsoft
  2. Typescript из коробки
  3. Единственный вреймворк с Dependency Injection из коробки
  4. Не нужно ничего React-ить и AngularJS-ифаить. Больше никаких оберток. jQuery плагины и D3 можно использовать на прямую
  5. Более современный фреймворк
@obenjiro
obenjiro / gist:c69f7732b62b96099fa9bf2219a897e5
Created May 22, 2019 11:05 — forked from dmethvin/gist:1676346
Breakpoint on access to a property
function debugAccess(obj, prop, debugGet){
var origValue = obj[prop];
Object.defineProperty(obj, prop, {
get: function () {
if ( debugGet )
debugger;
return origValue;
},
{
"compilerOptions": {
/* Basic Options */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "ESNext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": ["es2017", "dom"], /* Specify library files to be included in the compilation. */
"allowJs": true, /* Allow javascript files to be compiled. */
"checkJs": true, /* Report errors in .js files. */
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
@obenjiro
obenjiro / talks.md
Last active April 17, 2021 19:17
Доклады - Алексей Охрименко
@gh0st026
gh0st026 / docker_export_postgre_table.sh
Last active February 13, 2023 02:15
Dump PostgreSQL Table in docker container as CSV file
CONTAINER="name"
DB="Db name"
TABLE="Table Name"
FILE="file.csv"
sudo docker exec -u postgres ${CONTAINER} psql -d ${DB} -c "COPY ${TABLE} TO STDOUT WITH CSV HEADER " > ${FILE}