Skip to content

Instantly share code, notes, and snippets.

View olp-cs's full-sized avatar

Olga Pustovalova olp-cs

View GitHub Profile
@olp-cs
olp-cs / Running Harmony API tests - 2024-08-11.md
Last active December 17, 2024 13:16
Running Harmony API tests - 2024-08-11.md

System

  • Ubuntu 24.04 LTS
  • Python 3.10.14

Setting up the environment

git submodule update --init
pip install -r requirements.txt
@olp-cs
olp-cs / Running Harmony API tests - 2024-08-05.md
Last active August 11, 2024 06:08
Running Harmony API tests - 2024-08-05
  • Ubuntu 24.04 LTS
  • Python 3.10.14

Running Tika

wget https://archive.apache.org/dist/tika/2.3.0/tika-server-standard-2.3.0.jar
java -jar tika-server-standard-2.3.0.jar 
@olp-cs
olp-cs / README.md
Created July 27, 2024 16:06
[GEOParse] Non-breaking change compatible with pandas 1.3.0 and 2.2.2
@olp-cs
olp-cs / test-type-error.ipynb
Last active July 16, 2024 10:15
GEOparse - Failing test: `test_merge_and_average` fails with a TypeError
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
library(igraph) # to work with graphs
library(RColorBrewer) # to use a color palette
library(plotrix) # to rescale variables
# Read the data
raw_data <- read.csv("network_data.csv")
names(raw_data) <- c("Source", "Target", "Count", "Money")
# reformat data for igraph library
@olp-cs
olp-cs / function_lengths.py
Created December 30, 2015 15:31 — forked from minrk/function_lengths.py
Count all function lengths under a directory
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
from pandas import DataFrame
from pandas.util.testing import set_trace
dirs = []
@olp-cs
olp-cs / print_cm.py
Created November 4, 2015 06:59 — forked from zachguo/print_cm.py
Pretty print for sklearn confusion matrix
from sklearn.metrics import confusion_matrix
def print_cm(cm, labels, hide_zeroes=False, hide_diagonal=False, hide_threshold=None):
"""pretty print for confusion matrixes"""
columnwidth = max([len(x) for x in labels]+[5]) # 5 is value length
empty_cell = " " * columnwidth
# Print header
print " " + empty_cell,
for label in labels:
print "%{0}s".format(columnwidth) % label,
@olp-cs
olp-cs / gist:8ac9e6e6f82d8e21cebe
Last active September 10, 2015 19:25 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@olp-cs
olp-cs / test.json
Created February 24, 2014 12:45
Test
{
"metadata": {
"name": "exploring_a_single_data_file"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{