Skip to content

Instantly share code, notes, and snippets.

View ilyar's full-sized avatar
🖖
InfinityHackathon

ilyar

🖖
InfinityHackathon
View GitHub Profile
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active April 22, 2024 08:47
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
@frol
frol / AccountChangesFlow.tsx
Created September 25, 2021 19:06
Live Transactions visualization on NEAR mainnet
// https://youtu.be/2WXaosLThBY
import React, { useState, useEffect } from "react";
import ReactEcharts from "echarts-for-react";
import echarts from "echarts";
import { Tabs, Tab } from "react-bootstrap";
import StatsApi, { AccountsByDate } from "../../libraries/explorer-wamp/stats";
import { Props } from "./TransactionsByDate";
@siraben
siraben / forth.v
Last active April 16, 2023 04:50
Small-step operational semantics of Forth in Coq
Set Warnings "-notation-overridden,-parsing".
From Coq Require Import Arith.Arith.
From Coq Require Import Arith.EqNat.
From Coq Require Import Init.Nat.
From Coq Require Import Lia.
From Coq Require Import Lists.List.
Import ListNotations.
From PLF Require Import Maps.
From PLF Require Import Smallstep.
Import Nat.
@ElGatoLoco
ElGatoLoco / minting-native-tokens-on-cardano.sh
Created March 26, 2021 12:29
Mint native tokens on Cardano testnet using the node and cli that come with Daedalus
# This guide assumes that you're running MacOS and already have a fully synced Daedalus testnet wallet
# For mainnet some minor tweaks are required
# The line below assumes the default location for the testnet wallet at the time of writing this guide
# If your node socket is located somewhere else, you should be able to finding by inspecting the running processes on your machine
export CARDANO_NODE_SOCKET_PATH=~/Library/Application\ Support/Daedalus\ Testnet/cardano-node.socket
# Make testnet id available as environment variable; not needed for the mainnet
# This one is active at the time of writing this guide
export TESTNET_ID=1097911063
@k06a
k06a / ShardedToken.sol
Last active May 17, 2023 13:15
ShardedToken
contract ShardedToken {
using SafeMath for uint256;
address owner = msg.sender;
uint256 private _totalSupply;
mapping(address => ShardedToken.Extension) private extensions;
function register() public {
extensions[msg.sender] = new Token.Extension();
}
@niw
niw / Vagrantfile
Last active May 19, 2024 18:06
A simple Vagrantfile to setup Ubuntu desktop environment with Google Chrome and Japanese input
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provider :virtualbox do |v|
v.gui = true
v.memory = 2048
end
# Currently "ubuntu/bionic64" on VirtualBox requires `type: "virtualbox"`
# to make synced folder works.
@ilyar
ilyar / smart_question_ru.md
Last active August 11, 2022 20:32
SMART — алгоритм формулирования вопроса

SMART / SMARTER — это мнемоническая аббревиатура, используемая в менеджменте и проектном управлении для определения целей и постановки задач. Первое известное использование термина упоминается в работе Пола Мэйра (Paul J Meyer) в 1965 и позже в ноябре 1981 в работе Management Review by George T. Doran.

Этот подход можно использовать для формулирования вопросов, получаются такие компоненты:

  • Specific (Специфичность) Моя задача... (Объясняется, что именно необходимо достигнуть);
  • Measurable (Измеримость) Должно получится... (Объясняется ожидаемый результат);
  • Attainable (Достижимость) Делаю... (Объясняется за счет чего планируется достигнуть цели. Тут надо привести код или последовательность действий и. т.п.);
  • Relevant (Актуальность) Получаю... (Описание фактического результат, картинки, цитата ошибок и т.п.);
  • Time-bound (Ограниченность во времени) Когда надо получить ответ. (Определение временного промежутка по наступлению / окончанию которого ответ еще будет актуал
@NaniteFactory
NaniteFactory / dllmain.go
Last active March 15, 2024 16:35
An implementation example of DllMain() entrypoint with Golang. $ go build --buildmode=c-shared -o my.dll && rundll32.exe my.dll Test
package main
//#include "dllmain.h"
import "C"
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 22, 2024 03:29
set -e, -u, -o, -x pipefail explanation
@kuzminT
kuzminT / html5-games-tips.md
Last active May 29, 2023 04:39
Tips for phaser.js and html5 game development