Skip to content

Instantly share code, notes, and snippets.

View gorborukov's full-sized avatar

Evgeny gorborukov

  • Krasnodar
View GitHub Profile
@gorborukov
gorborukov / cryptocurrencies.json
Created April 12, 2024 18:10
cryptocurrencies/криптовалюты в апреле 2024 в JSON формате
This file has been truncated, but you can view the full file.
[
{
"id": "01coin",
"symbol": "zoc",
"name": "01coin"
},
{
"id": "0chain",
"symbol": "zcn",
"name": "Zus"
@gorborukov
gorborukov / remove_jsonl_fields.rb
Created April 13, 2023 05:59
Removing fields from JSONL dataset
require 'json'
# Read the JSON data from the original file line by line
modified_data = ''
File.foreach('original_file.jsonl') do |line|
# Parse the line as a JSON object
json_object = JSON.parse(line)
# Remove the 'category' and 'context' fields from the JSON object
json_object.delete('category')
M107 T0
M104 S0
M104 S0 T1
M140 S0
G92 E0
G91
G1 E-1 F300
G1 Z+0.5 E-5 X-20 Y-20 F9000
G28 X0 Y0
M84 ;steppers off
@gorborukov
gorborukov / nvidia-cache-cleanup-blender-ubuntu.sh
Last active December 1, 2021 09:08
nvidia cache cleanup for Blender in Ubuntu 20.04
rm -rf /home/.cache/nvidia/GLCache
rm -rf /home/.nv/ComputeCache
rm -rf /var/tmp/OptiXCache
@gorborukov
gorborukov / recursive_quadtree.cpp
Created April 16, 2021 04:10
Pseudo quadtree base. Ported from some p5.js scripts
struct drawingLocation{
int x,y,w,h;
};
std::vector<drawingLocation> drawingLocations;
void recursion(int x, int y, int width) {
int index = 0;
int count = 2;
int size = width/count;
@gorborukov
gorborukov / imgui_responsive_three_columns_layout.cpp
Created April 10, 2021 17:22
ImGui responsive 3 columns layout (ofx based example)
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
gui.setup();
backgroundColor = ofColor(0, 0, 0);
}
//--------------------------------------------------------------
void ofApp::update(){
@gorborukov
gorborukov / heavypd.txt
Created July 21, 2020 08:42
Heavylib supported & unsupported Pd objects
SUPPORTED:
Message Objects:
!=
%
&
&&
*
+
-
/
@gorborukov
gorborukov / metrika.rb
Created March 20, 2019 15:14
Yandex Metrika API Ruby example
require 'net/http'
require 'json'
require 'openssl'
class Yandex
uri = URI('https://api-metrika.yandex.net/management/v1/counters')
Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https', :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
req = Net::HTTP::Post.new(uri)
req['Authorization'] = 'OAuth ВАШ_OAUTH_ТОКЕН'
req['Content-Type'] = 'application/x-yametrika+json'
@gorborukov
gorborukov / gist:493260468ce72cf6ca868eb777df5461
Created June 14, 2017 16:21
justified gallery sass version
.justified-gallery
width: 100%
position: relative
overflow: hidden
>
a, div
position: absolute
display: inline-block
overflow: hidden
filter: "alpha(opacity=10)"
@gorborukov
gorborukov / multiplying.rb
Created May 18, 2016 15:03
matrix multiplying
def multiply m_1, m_2
m_2 = m_2.reduce(:zip).map(&:flatten)
m_1.collect do |i|
m_2.collect do |j|
i.zip(j).map{|k| k.reduce(:*)}.reduce(:+)
end
end
end
m_1 = Array.new(2){Array.new(2){rand}}