Skip to content

Instantly share code, notes, and snippets.

View Gerrrr's full-sized avatar

Alex Sorokoumov Gerrrr

  • Bay Area, California
View GitHub Profile
@Gerrrr
Gerrrr / randomized_test.patch
Created March 27, 2020 10:40
randomized_test.patch
diff --git a/test/unit/org/apache/cassandra/locator/PendingRangesTest.java b/test/unit/org/apache/cassandra/locator/PendingRangesTest.java
index fcdc8b5041..89bdf78354 100644
--- a/test/unit/org/apache/cassandra/locator/PendingRangesTest.java
+++ b/test/unit/org/apache/cassandra/locator/PendingRangesTest.java
@@ -19,7 +19,10 @@
package org.apache.cassandra.locator;
import java.net.UnknownHostException;
+import java.util.ArrayList;
import java.util.Collections;
@Gerrrr
Gerrrr / rangescan.yaml
Last active April 30, 2019 08:42
range scan stress
keyspace: stresscql
keyspace_definition: |
CREATE KEYSPACE IF NOT EXISTS stresscql WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
table: table1
table_definition: |
CREATE TABLE table1 (
id int,
@Gerrrr
Gerrrr / 14900-3.11-1.txt
Created November 16, 2018 14:22
CASSANDRA-14900 3.11 #1
test:
[echo] Number of test runners: 4
[mkdir] Created dir: /home/automaton/cassandra/build/test/cassandra
[mkdir] Created dir: /home/automaton/cassandra/build/test/output
[junit] Testsuite: org.apache.cassandra.auth.jmx.AuthorizationProxyTest
[junit] Testsuite: org.apache.cassandra.auth.PasswordAuthenticatorTest
[junit] Testsuite: org.apache.cassandra.auth.RoleOptionsTest
[junit] Testsuite: org.apache.cassandra.auth.RoleOptionsTest Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.456 sec
[junit]
[junit] Testsuite: org.apache.cassandra.auth.PasswordAuthenticatorTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.858 sec
@Gerrrr
Gerrrr / 14900-3.0-1.txt
Last active November 16, 2018 14:15
CASSANDRA-14900 3.0 #1
test:
[echo] Number of test runners: 4
[mkdir] Created dir: /home/automaton/cassandra/build/test/cassandra
[mkdir] Created dir: /home/automaton/cassandra/build/test/output
[junit] Testsuite: org.apache.cassandra.batchlog.BatchTest
[junit] Testsuite: org.apache.cassandra.auth.RoleOptionsTest
[junit] Testsuite: org.apache.cassandra.auth.PasswordAuthenticatorTest
[junit] Testsuite: org.apache.cassandra.batchlog.BatchlogEndpointFilterTest
[junit] Testsuite: org.apache.cassandra.batchlog.BatchlogEndpointFilterTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.146 sec
[junit]
require.config({
paths: {
three: 'https://cdnjs.cloudflare.com/ajax/libs/three.js/r72/three.min',
jquery: 'https://code.jquery.com/jquery-2.1.4.min'
}
});
require(['three', 'jquery'], function(three, _){
loadCSS = function(url) {
if (!$('link[href="' + url + '"]').length)
@Gerrrr
Gerrrr / gist:0a2a5213e1168d1ae999
Last active September 19, 2015 20:21
Javascript visualisation in spark-notebook

Current workflow to create custom js chart

  • define js as a string. In the example it is a function, which accepts data, container and other arguments as parameters
  • import
    • notebook.front.widgets._
    • notebook.front.widgets.magic._
    • notebook.front.widgets.magic.Implicits._
  • create case class, which extends package notebook.front.Chart (from package notebook.front.package.scala). This class parametrizes container and defines the logic of passing parameters to js. Js function itself is passed as a string.
  • snippets, scripts (????)
  • create instance of case class, which outputs as a chart
@Gerrrr
Gerrrr / gist:4e4c5b243c71117c9215
Created July 28, 2014 17:30
Dataset Protocols

PDatasetColumns

(column-names [ds] "Returns column names of the dataset")
(column-name [ds idx] "Returns column name at given index")
(select-columns [ds cols] "Produces a new dataset with the columns in the specified order")
(except-columns [ds cols] "Returns new dataset with all columns except specified")
(merge-columns [& args] "Returns a dataset created by combining columns of the given datasets. In case of columns with duplicate names, last-one-wins strategy is applied.")
(add-column [ds col] "Adds column to the dataset")
(rename-columns [ds col-map] "Renames columns based on map of old new column name pairs")
(replace-column [ds col-name vs] "Replaces column in a dataset with new values")
root@konura:/home/gerrr/ami# python app.py
<class 'asterisk.manager.Event'> FullyBooted
{'_event_callbacks': {'*': [<function yoba at 0x7ff2de5c8050>]}, '_response_queue': <Queue.Queue instance at 0x7ff2dd6bdc20>, '_connected': <threading._Event object at 0x7ff2dd6b6d90>, '_running': <threading._Event object at 0x7ff2dd6b6ed0>, 'version': '1.3', 'title': 'Asterisk Call Manager', '_sock': <socket._fileobject object at 0x7ff2de62bbd0>, 'hostname': 'konura', '_event_queue': <Queue.Queue instance at 0x7ff2dd6bdea8>, '_message_queue': <Queue.Queue instance at 0x7ff2dd6b5bd8>, '_seqlock': <thread.lock object at 0x7ff2de6bd1f0>, 'message_thread': <Thread(Thread-1, started daemon 140681052083968)>, '_seq': 1, 'event_dispatch_thread': <Thread(Thread-2, started daemon 140681035298560)>, '_reswaiting': []}
<class 'asterisk.manager.Event'> PeerStatus
{'_event_callbacks': {'*': [<function yoba at 0x7ff2de5c8050>]}, '_response_queue': <Queue.Queue instance at 0x7ff2dd6bdc20>, '_connected': <threading._Event object at 0x7ff
@Gerrrr
Gerrrr / gist:5509499
Last active December 16, 2015 22:49
profkernel error
$ profkernel-workflow -f /mnt/home/asorokoumov/idp/extended_dataset/archaea/fasta/archaea_1.train.expanded.new.fa -p /mnt/home/asorokoumov/idp/extended_dataset/archaea/new_profiles/archaea_1.new.profile -l /mnt/home/asorokoumov/idp/extended_dataset/archaea/new_profiles/archaea_1.new.classes -o /mnt/project/locbloc-ha/idp/aleks/models/original/archaea -k 3 -s 5 -w My_ND_Archaea_Fast
=#=#=#= STAGE 1: TRAINING OF WEKA MODEL =#=#=#=
=== STAGE 1.1: CREATING BIG KERNEL INPUT ===
Reading fasta file
Reading profiles file
Reading classes file
Creating kernel input file
Use of uninitialized value in concatenation (.) or string at
@Gerrrr
Gerrrr / Statistics for archaea
Last active December 14, 2015 13:08
Only trembl
total: 16364 proteins
Cell membrane; Peripheral membrane protein (By similarity). 19
Cytoplasm. Secreted. Cell surface. Note=Fractions of enolase are present in both the cytoplasm and on the cell surface. The export of\
enolase possibly depends on the covalent binding to the substrate; once secreted, it remains attached to the cell surface (By similar\
ity). 97
Cytoplasm. Note=Assembles at midcell at the inner surface of the cytoplasmic membrane (By similarity). 209
Cytoplasm. Chromosome (By similarity). 124
Cytoplasm. Note=May associate with membranes (By similarity). 103
Cell membrane; Single-pass membrane protein (By similarity). 262
Cytoplasm. Note=The SRP-RNC complex is targeted to the cytoplasmic membrane (By similarity). 108