I hereby claim:
- I am akolybelnikov on github.
- I am akolybelnikov (https://keybase.io/akolybelnikov) on keybase.
- I have a public key ASDBT2fG6lP9Ydx6d2dEqtxtaAdNhFgk_dfnoQ1MFgAJ1wo
To claim this, I am signing this object:
| fn find_subseq(s: &[u8]) -> u8 { | |
| let mut res: u8 = 1; | |
| let mut i = 0; | |
| while (i < s.len() - 1) && s[i] < 255 && (s[i] + 1 == s[i + 1]) { | |
| res += 1; | |
| i += 1; | |
| } | |
| return res; | |
| } |
| #include <unistd.h> | |
| #include <stdbool.h> | |
| #include <pthread.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define NUM_THREADS 10 | |
| pthread_mutex_t cv_mutex; | |
| pthread_cond_t notification_cv; |
| /* | |
| * timsort Javascript | |
| * | |
| * Licensed under GPL 3 ( http://www.gnu.org/licenses/gpl.html ) license. | |
| * | |
| */ | |
| Array.prototype.timsort = function(comp){ | |
| var global_a=this | |
| var MIN_MERGE = 32; |
| # | |
| # Include this in your own .gitconfig by using the | |
| # [include] directive with the path to this file | |
| # | |
| # [include] | |
| # path = ~/.gitconfig.aliases | |
| # | |
| # If you don't have any existing includes, you can add this via the following command | |
| # | |
| # git config --global include.path ~/.gitconfig.aliases |
| echo "Creating an SSH key for you..." | |
| ssh-keygen -t rsa | |
| echo "Please add this public key to Github \n" | |
| echo "https://github.com/account/ssh \n" | |
| read -p "Press [Enter] key after this..." | |
| echo "Installing xcode-stuff" | |
| xcode-select --install |
I hereby claim:
To claim this, I am signing this object:
| extern crate itertools; | |
| use itertools::{Itertools, Either::*}; | |
| // Самый первый вариант — разбиваем массив | |
| // на вектор отрицательных чисел и вектор положительных, | |
| // а затем возвращаем тот, для которого абсолютная сумма элементов больше. | |
| fn max_abs_sum_subset_1(arr: &[i32]) -> Vec<i32> { | |
| let (neg, pos): (Vec<_>, Vec<_>) = arr.iter().cloned() | |
| .partition_map(|x| if x < 0 { Left(x) } else { Right(x) }); |
| #!/usr/bin/env bash | |
| set -e | |
| cweb_version=0.6.16 | |
| cweb=https://github.com/koute/cargo-web/releases/download/$cweb_version/cargo-web-x86_64-unknown-linux-gnu.gz | |
| curl -Lo cargo-web.gz $cweb | |
| gunzip cargo-web.gz | |
| chmod u+x cargo-web |
| use crate::node::Node; | |
| use serde_json::Value; | |
| use serde::ser::{Serialize, SerializeMap, Serializer}; | |
| use json_patch::merge; | |
| struct WrapDirectory<'a, T> { | |
| name: &'a str, | |
| value: &'a T | |
| } |
| use std::collections::HashMap; | |
| use std::collections::hash_map::Entry; | |
| use std::cmp::Eq; | |
| #[derive(Debug)] | |
| pub struct RawKV { | |
| key: String, | |
| value: String | |
| } |