Skip to content

Instantly share code, notes, and snippets.

View geetikabatra's full-sized avatar

Geetika Batra geetikabatra

View GitHub Profile
rcolife  …  codeRiddles  others  booking  cat hotels.py
# Complete the function below.
import operator
from collections import defaultdict
def best_hotels():
hotels = defaultdict(list)
for i in range(int(input())):
a,b = [int(i) for i in input().split()]
hotels[a].append(b)
eetikas-MBP:fabric8-gemini-server gbatra$ docker run -i -t fabric8geminiserver_fabric8-gemini-server:latest /bin/bash
[2018-02-28 21:20:52 +0000] [7] [INFO] Starting gunicorn 19.7.1
[2018-02-28 21:20:52 +0000] [7] [INFO] Listening at: http://0.0.0.0:5000 (7)
[2018-02-28 21:20:52 +0000] [7] [INFO] Using worker: sync
[2018-02-28 21:20:52 +0000] [10] [INFO] Booting worker with pid: 10
[2018-02-28 21:20:53 +0000] [10] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
worker.init_process()
File "/usr/lib/python3.4/site-packages/gunicorn/workers/base.py", line 126, in init_process
{
"git_url" : "new4",
"git_sha" : "dskdsknfdsksdkjsd",
"email_ids" : "geetika.com"
}
@geetikabatra
geetikabatra / oclogs
Last active April 17, 2018 18:30
oc logs
1m 1m 1 bayesian-data-importer-2-9fxz6 Pod spec.containers{bayesian-data-importer} Normal Pulling kubelet, n24.c1.rdu2c.fabric8.io pulling image "registry.devshift.net/bayesian/data-model-importer:latest"
58s 58s 1 bayesian-data-importer-2-9fxz6 Pod spec.containers{bayesian-data-importer} Normal Pulled kubelet, n24.c1.rdu2c.fabric8.io Successfully pulled image "registry.devshift.net/bayesian/data-model-importer:latest"
Geetikas-MBP:f8a_version_comparator gbatra$ oc get events | grep data-importer
3m 3m 1 bayesian-data-importer-2-9fxz6 Pod Normal Scheduled default-scheduler Successfully assigned bayesian-data-importer-2-9fxz6 to n24.c1.rdu2c.fabric8.io
3m 3m 1 bayesian-data-importer-2-9fxz6 Pod
@geetikabatra
geetikabatra / feature list
Created April 17, 2018 18:34
feature.txt
# Order of the features in this file is significant, so shuffle them carefully.
#features/smoketest.feature
#features/server_api.feature
#features/jobs_api.feature
#features/jobs_debug_api.feature
#features/ecosystems.feature
#features/component_search.feature
#features/components.feature
features/stack_analyses.feature
#features/user_feedback.feature
When I delete all pods for the service f8a-server-backbone # features/steps/oc.py:88 2.198ss "f8a-server-backbone" not found
Traceback (most recent call last):
File "/Users/gbatra/fabric8/fabric8-analytics-common/integration-tests/venv/lib/python3.6/site-packages/behave/model.py", line 1456, in run
match.run(runner.context)
File "/Users/gbatra/fabric8/fabric8-analytics-common/integration-tests/venv/lib/python3.6/site-packages/behave/model.py", line 1903, in run
self.func(context, *args, **kwargs)
File "/Users/gbatra/fabric8/fabric8-analytics-common/integration-tests/features/steps/oc.py", line 91, in oc_delete_selected_pods
oc_delete_pods(service_name)
File "/Users/gbatra/fabric8/fabric8-analytics-common/integration-tests/features/src/utils.py", line 87, in oc_delete_pods
subprocess.check_call(command)
{'npm:media-typer:0.3.0', 'npm:array-flatten:1.1.1', 'npm:vary:1.1.2', 'npm:range-parser:1.2.0', 'npm:on-finished:2.3.0', 'npm:setprototypeof:1.0.2', 'npm:unpipe:1.0.0', 'npm:debug:2.2.0', 'npm:send:0.14.2', 'npm:inherits:2.0.3', 'npm:ipaddr.js:1.4.0', 'npm:methods:1.1.2', 'npm:ms:0.7.1', 'npm:encodeurl:1.0.2', 'npm:statuses:1.3.1', 'npm:depd:1.1.2', 'npm:escape-html:1.0.3', 'npm:path-to-regexp:0.1.7', 'npm:cookie-signature:1.0.6', 'npm:qs:6.2.0', 'npm:merge-descriptors:1.0.1', 'npm:parseurl:1.3.2', 'npm:content-type:1.0.4', 'npm:utils-merge:1.0.0', 'npm:destroy:1.0.4', 'npm:fresh:0.3.0', 'npm:ee-first:1.1.1', 'npm:forwarded:0.1.2', 'npm:etag:1.7.0', 'npm:content-disposition:0.5.2', 'npm:mime-types:2.1.21', 'npm:mime-db:1.37.0', 'npm:ms:0.7.2', 'npm:cookie:0.3.1', 'npm:negotiator:0.6.1', 'npm:mime:1.3.4'}
@geetikabatra
geetikabatra / helper.sh
Created January 24, 2019 06:22
Helpers.sh
function is_set_or_fail() {
local name=$1
local value=$2
if [ ! -v value ] || [ "${value}" == "not-set" ]; then
echo "You have to set $name" >&2
exit 1
fi
}
@geetikabatra
geetikabatra / env.sh
Created January 24, 2019 13:15
env.sh
# This is a deployment configuration template with default values used to configure dev deployment of fabric8-analytics.
# It is recommended to copy this file and then modify it:
# $ cp env-template.sh env.sh
# (Required) Dev cluster
# Your dev cluster username
export OC_USERNAME='not-set'
# Your dev cluster password
export OC_PASSWD='not-set'