This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Генерация файлов для примера | |
files = 5.times.map do |i| | |
filename = "file_#{i}.txt" | |
File.open(filename, 'w') { |f| f.puts(Array.new(100_000) { "Line from #{filename}" }) } | |
filename | |
end | |
require 'parallel' | |
def process_files_with_parallel(files) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require 'rails_helper' | |
using TestProf::AnyFixture::DSL | |
describe 'Home' do | |
let(:scopes) { 'read:statuses' } | |
let_it_be(:bob) { Fabricate(:account) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'debug' | |
target = ENV.fetch('TARGET', 'spec/requests') | |
run :event_prof, event: 'factory.create', top_count: 10, paths: target, rank_by: :time | |
total_run_time = report.raw_report['absolute_run_time'] | |
total_event_time = report.raw_report['total_time'] | |
threshold = 0.5 * total_run_time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Starship default config, extracted from the source | |
# Configure the format of the prompt | |
format = """\ | |
$username\ | |
$hostname\ | |
$shlvl\ | |
$singularity\ | |
$kubernetes\ | |
$directory\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<clickhouse> | |
<clickhouse_remote_servers> | |
<local> | |
<shard> | |
<internal_replication>false</internal_replication> | |
<replica> | |
<host>64.225.65.90</host> | |
<port>9000</port> | |
</replica> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Django 4.0 on 2022-01-04 00:43 | |
from django.db import migrations, models | |
import django.db.models.deletion | |
import django.utils.timezone | |
class Migration(migrations.Migration): | |
dependencies = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
import json | |
from logger import logging | |
class APIClient: | |
def __init__(self, server_addr): | |
self.server_addr = server_addr | |
self.hostname = "hostname" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Django 4.0 on 2022-01-02 17:59 | |
from django.db import migrations, models | |
class Migration(migrations.Migration): | |
dependencies = [ | |
('rbr_srv_side', '0001_initial'), | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"os" | |
"strconv" | |
"github.com/go-redis/redis/v8" | |
) |
NewerOlder