Skip to content

Instantly share code, notes, and snippets.

View kostajh's full-sized avatar

Kosta Harlan kostajh

View GitHub Profile
@kostajh
kostajh / linkrecommendation-toolforge.sh
Last active December 11, 2020 11:18
Query addlink-simple on Toolforge
#!/bin/bash
set -e
WIKI=$1
TITLE=$2
if [ -z "$3" ]; then
THRESHOLD=0.5
else
THRESHOLD=$3
100.00% 8718.007 1 - main()
97.01% 8457.145 1 - wfIndexMain
97.00% 8456.192 1 - MediaWiki::run
96.86% 8444.029 1 - MediaWiki::main
60.18% 5246.396 1 - MediaWiki::performRequest
58.60% 5108.791 836 - MediaWiki\HookContainer\HookContainer::run
53.40% 4655.016 75 - MediaWiki\HookContainer\HookContainer::callLegacyHook
51.39% 4480.369 398 - Message::fetchMessage
51.22% 4465.625 294 - MessageCache::get
50.88% 4435.360 294 - MessageCache::getMessageFromFallbackChain

Keybase proof

I hereby claim:

  • I am kostajh on github.
  • I am kosta (https://keybase.io/kosta) on keybase.
  • I have a public key ASBKbVferd-wC6ljnAjrRvkrH3Vrc4OFOwaWHGdBO3bsZwo

To claim this, I am signing this object:

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!-- in this example, we will only use synonyms at query time
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
-->
<!-- Case insensitive stop word removal. -->
<filter class="solr.StopFilterFactory"
ignoreCase="true"
@kostajh
kostajh / nakefile
Created September 1, 2016 20:27
makefile for cchd
install:
make up
if [ ! -f sites/default/settings.local.php ]; then cp sites/default/example.settings.local.php sites/default/settings.local.php; fi
make preparedb
make refreshdb
docker-compose exec cli /bin/bash -c "cd tests; composer install"
docker-compose ps
down:
docker-compose down
mysql> select tid, name from term_data;
+-----+---------------------------------------+
| tid | name |
+-----+---------------------------------------+
| 1 | Alumni |
| 2 | Arts |
| 3 | Athletics |
| 4 | Benefits |
| 5 | Buildings & Grounds |
| 6 | Business |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDADhTMwf7gseNfyNslm+/JduHyXNqdsVkgVxOHT9dQrWvX2EwapCfCoTI5L3i+ZROWTZoIrpcoPLBThQGOYKeRJuw9D1b144+WIQHxr4HbopjxHtCSbtH57DaGMHV8l36OZ3vh2D1bMaSVXyBo0b1PTfxh4uGX032vIFqlAyvyuJH72Zs0tkD2oy08ScHLnlGRYkndqKVqgVKJ2a539ZxQ4M0u6CS7ELRL0Jp4IEvlUU3J6zfdCF8DlYqWulNqI0O1Li2JvFlWpviynHa5Evxl7FUiR909PswHt0Lt+cVJ0nQD8r6+mIJYLJLM1pD7aAA9/EHJuPzwWkvoH8VvtanjXuGlBEZB2W2FwMrB7bAJR2fOvP35JhunwGLyZfqy7kD/zW5DMmsASr2yoeHxc9cLKQPwAyySQrtshTIGKRUjk7E89RDPJAPtvCg1eFKQKEoFRFnjW0XOv92XPRe7q+L4smTrZooq50eny9uvHURrvJ8KjSvfBiGY22bqDVYW/e7RmdFJopT0zEus1lEfWVF50madCNPi0ETXOZetkYfizTKWmWOcurRijkbRmqwxu9EumG7HmD7xeS7jwSgSgu5XO81gwIFhc/0otMhyT3lQPdNvBd/9ALfMUEq8a4RHT2Ix+HRQ2aCIbxI6uhIc2PcyrWdBz4vFjV6UF5iFWv2I+Q== kosta@kostaharlan.net
version: '2'
services:
web:
build: .
ports:
- "80:80"
depends_on:
- db
- selenium
volumes:
@kostajh
kostajh / gist:ce81abda5eb3653a8876
Last active November 13, 2015 01:52 — forked from ttal1/gist:81c5fe7a6c32efa2f3c4
complete practice
complete <- function(directory, id = 1:332) {
files_list <- list.files(directory, full.names=TRUE)
#create list of files
df1 <- data.frame()
#create empty data frame
df2 <- complete.cases(read.csv(files_list[1]))
#populate df1 with complete cases from file id=1
@kostajh
kostajh / geofield.module.json
Created June 1, 2015 12:35
geofield-module
{
"title": {
"id": "title",
"table": "node_field_data",
"field": "title",
"entity_type": "node",
"entity_field": "title",
"label": "",
"alter": {
"alter_text": false,