This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A utility function to find the distance between two points | |
def dist(p1, p2): | |
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2 | |
# O(N) operation as at most 3 points are passed to this. | |
def brute(xP, n): | |
minDis = float("inf") | |
for i in range(n): | |
for j in range(i + 1, n): | |
currDis = dist(xP[i], xP[j]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pdb | |
import time | |
#!/usr/bin/python | |
# implementation of levenshtein for matching indian names | |
''' Calculates the Levenshtein distance of 2 strings''' | |
import csv | |
from optparse import OptionParser | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"conditions": [ | |
{ | |
"status": "True", | |
"type": "Completed" | |
} | |
], | |
"finishedAt": "2020-07-20T16:27:32Z", | |
"nodes": { | |
"adviser-a7730e47": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self = <tests.test_pipfile.TestPipfileLock object at 0x7f4392bab550> | |
pipfile_lock = 'Pipfile_test1.lock' | |
@pytest.mark.parametrize("pipfile_lock", [ | |
'Pipfile_test1.lock', | |
]) | |
def test_from_string(self, pipfile_lock: str): | |
with open(os.path.join(self.data_dir, 'pipfiles', pipfile_lock), 'r') as pipfile_lock_file: | |
content = pipfile_lock_file.read() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adviser-4e4520b7-3285270457: {"name": "sentry_sdk.errors", "levelname": "DEBUG", "module": "atexit", "lineno": 51, "funcname": "_shutdown", "created": 1595279407.2818103, "asctime": "2020-07-20 21:10:07,281", "msecs": 281.8102836608887, "relative_created": 169235.69345474243, "process": 1, "message": "atexit: got shutdown signal"} | |
adviser-4e4520b7-3285270457: {"name": "sentry_sdk.errors", "levelname": "DEBUG", "module": "atexit", "lineno": 55, "funcname": "_shutdown", "created": 1595279407.2824044, "asctime": "2020-07-20 21:10:07,282", "msecs": 282.40442276000977, "relative_created": 169236.28759384155, "process": 1, "message": "atexit: shutting down client"} | |
adviser-4e4520b7-3285270457: {"name": "sentry_sdk.errors", "levelname": "DEBUG", "module": "transport", "lineno": 335, "funcname": "flush", "created": 1595279407.2826114, "asctime": "2020-07-20 21:10:07,282", "msecs": 282.6113700866699, "relative_created": 169236.4945411682, "process": 1, "message": "Flushing HTTP transport"} | |
adviser-4e4520b7-3285270457: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"analyzer": "thoth-adviser", | |
"analyzer_version": "0.9.4", | |
"arguments": { | |
"advise": { | |
"beam_width": 100000, | |
"count": 1, | |
"dev": false, | |
"library_usage": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[sai@sai-pc srcops-testing]$ argo logs kebechet-job-2fa8e27a --follow | |
kebechet-job-2fa8e27a-625046206: {"name": "sentry_sdk.errors", "levelname": "DEBUG", "module": "__init__", "lineno": 99, "funcname": "setup_integrations", "created": 1593632198.4405189, "asctime": "2020-07-01 19:36:38,440", "msecs": 440.518856048584, "relative_created": 1114.8648262023926, "process": 1, "message": "Setting up integrations (with default = True)"} | |
kebechet-job-2fa8e27a-625046206: {"name": "sentry_sdk.errors", "levelname": "DEBUG", "module": "__init__", "lineno": 117, "funcname": "setup_integrations", "created": 1593632198.4429998, "asctime": "2020-07-01 19:36:38,442", "msecs": 442.99983978271484, "relative_created": 1117.3458099365234, "process": 1, "message": "Setting up previously not enabled integration logging"} | |
kebechet-job-2fa8e27a-625046206: {"name": "sentry_sdk.errors", "levelname": "DEBUG", "module": "__init__", "lineno": 117, "funcname": "setup_integrations", "created": 1593632198.4436004, "asctime": "2020-07-01 19: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. copy https://raw.githubusercontent.com/thoth-station/template-project/master/.pre-commit-config.yaml to the repo | |
2. git add and commit | |
3. pre-commit install so that pre-commit hooks get installed | |
4. think about the config file: do you need the manifest check? do you need mypy? | |
5. pre-commit run --all-files so that the repo gets checks | |
6. fix issues... | |
7. git commit and send a PR! | |
8. feel the karma increase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<details><summary>$ pipenv --support</summary> | |
Pipenv version: `'2020.6.2'` | |
Pipenv location: `'/usr/local/lib/python3.8/site-packages/pipenv'` | |
Python location: `'/usr/bin/python3'` | |
Python installations found: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re, os | |
from kebechet.utils import cloned_repo | |
from kebechet.managers import VersionManager | |
import typing | |
from git import Repo | |
import semver | |
import logging | |
from datetime import datetime | |
NewerOlder