hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b7447c7e63cef72744a2596b6bfed0bc8c930ff6 | 147 | py | Python | plugins/Hikvision_app.py | cflq3/getcms | 6cf07da0ea3ec644866df715cff1f311a46ee378 | [
"MIT"
] | 22 | 2016-09-01T08:27:07.000Z | 2021-01-11T13:32:59.000Z | plugins/Hikvision_app.py | cflq3/getcms | 6cf07da0ea3ec644866df715cff1f311a46ee378 | [
"MIT"
] | null | null | null | plugins/Hikvision_app.py | cflq3/getcms | 6cf07da0ea3ec644866df715cff1f311a46ee378 | [
"MIT"
] | 20 | 2015-11-07T19:09:48.000Z | 2018-05-02T03:10:41.000Z | #!/usr/bin/env python
# encoding: utf-8
| 21 | 74 | 0.721088 |
3f74e2e86d84e340b05f4456f8d63e50bac1ee3e | 495 | py | Python | package/awesome_panel/database/settings.py | mycarta/awesome-panel | dae17d11f686daaedd48b8e74ac4307c89e2b031 | [
"Apache-2.0"
] | 1 | 2020-05-08T21:44:37.000Z | 2020-05-08T21:44:37.000Z | package/awesome_panel/database/settings.py | mycarta/awesome-panel | dae17d11f686daaedd48b8e74ac4307c89e2b031 | [
"Apache-2.0"
] | null | null | null | package/awesome_panel/database/settings.py | mycarta/awesome-panel | dae17d11f686daaedd48b8e74ac4307c89e2b031 | [
"Apache-2.0"
] | null | null | null | """In this module we provide a list paths, urls and other usefull settings."""
GITHUB_URL = "https://github.com/MarcSkovMadsen/awesome-panel/"
GITHUB_BLOB_MASTER_URL = "https://github.com/MarcSkovMadsen/awesome-panel/blob/master/"
GITHUB_RAW_URL = "https://raw.githubusercontent.com/MarcSkovMadsen/awesome-panel/maste... | 55 | 92 | 0.775758 |
3f787b4695b11190d523827faaa3e059aacc4c9c | 1,789 | py | Python | astropy/coordinates/tests/test_pickle.py | MatiasRepetto/astropy | 689f9d3b063145150149e592a879ee40af1fac06 | [
"BSD-3-Clause"
] | 1 | 2019-03-11T12:26:49.000Z | 2019-03-11T12:26:49.000Z | astropy/coordinates/tests/test_pickle.py | MatiasRepetto/astropy | 689f9d3b063145150149e592a879ee40af1fac06 | [
"BSD-3-Clause"
] | 1 | 2019-10-09T18:54:27.000Z | 2019-10-09T18:54:27.000Z | astropy/coordinates/tests/test_pickle.py | MatiasRepetto/astropy | 689f9d3b063145150149e592a879ee40af1fac06 | [
"BSD-3-Clause"
] | 1 | 2020-02-18T04:10:00.000Z | 2020-02-18T04:10:00.000Z | import pickle
import pytest
import numpy as np
from astropy.coordinates import Longitude
from astropy import coordinates as coord
from astropy.tests.helper import pickle_protocol, check_pickling_recovery # noqa
# Can't test distances without scipy due to cosmology deps
from astropy.utils.compat.optional_deps import ... | 24.847222 | 81 | 0.579094 |
3f78ac0f4821a9877cc3b9aefc54f11d9894ac13 | 3,683 | py | Python | articles/Machine Learning/SupervisedLearning/knn_classify/knn.py | wjiec/packages | 4ccaf8f717265a1f8a9af533f9a998b935efb32a | [
"MIT"
] | null | null | null | articles/Machine Learning/SupervisedLearning/knn_classify/knn.py | wjiec/packages | 4ccaf8f717265a1f8a9af533f9a998b935efb32a | [
"MIT"
] | 1 | 2016-09-15T07:06:15.000Z | 2016-09-15T07:06:15.000Z | articles/Machine Learning/SupervisedLearning/knn_classify/knn.py | wjiec/packages | 4ccaf8f717265a1f8a9af533f9a998b935efb32a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (C) 2017 ShadowMan
#
import operator
import numpy as np
group = np.array([
[1.0, 1.1],
[1.0, 1.0],
[0.0, 0.0],
[0.0, 0.1]
])
labels = ['A', 'A', 'B','B']
if __name__ == '__main__':
print(knn_classify((1.0, 0.5), group, labels, 2))
print(knn_classify((18, 90... | 36.83 | 111 | 0.541406 |
3f79f05e8ea447c87ecd650d6cef267e990945dc | 3,101 | py | Python | src/pymir-controller/controller/label_model/label_runner.py | IJtLJZ8Rm4Yr/ymir-backend | 73baa7822bb0d8ec1d152b07d9cabaddb2ae895d | [
"Apache-2.0"
] | null | null | null | src/pymir-controller/controller/label_model/label_runner.py | IJtLJZ8Rm4Yr/ymir-backend | 73baa7822bb0d8ec1d152b07d9cabaddb2ae895d | [
"Apache-2.0"
] | null | null | null | src/pymir-controller/controller/label_model/label_runner.py | IJtLJZ8Rm4Yr/ymir-backend | 73baa7822bb0d8ec1d152b07d9cabaddb2ae895d | [
"Apache-2.0"
] | null | null | null | import os
from typing import Tuple, List
from controller.invoker.invoker_task_exporting import TaskExportingInvoker
from controller import config
from controller.label_model.label_studio import LabelStudio
from controller.utils.app_logger import logger
| 34.842697 | 124 | 0.718478 |
3f7a60ea385d7fdaeb685b99834b8a082b01d925 | 719 | py | Python | run-workflow-cloud-run/main.py | UriKatsirPrivate/gcp-workflows | 35fa813bdc5335d8f06aee2f2d2e12b773f43872 | [
"MIT"
] | 1 | 2021-07-07T07:43:55.000Z | 2021-07-07T07:43:55.000Z | run-workflow-cloud-run/main.py | UriKatsirPrivate/gcp-workflows | 35fa813bdc5335d8f06aee2f2d2e12b773f43872 | [
"MIT"
] | null | null | null | run-workflow-cloud-run/main.py | UriKatsirPrivate/gcp-workflows | 35fa813bdc5335d8f06aee2f2d2e12b773f43872 | [
"MIT"
] | null | null | null | import os
from flask import Flask
from googleapiclient.discovery import build
import json
import sys
from google.oauth2 import service_account
import googleapiclient.discovery
app = Flask(__name__)
workflow_service = build('workflowexecutions', 'v1')
if __name__ == "__main__":
app.run(debug=True, host="0.0.... | 23.966667 | 94 | 0.727399 |
3f7b2d2414e53d9ad204b36035beffc35a3a5a76 | 9,264 | py | Python | rendering/viewer.py | MTKat/FloorplanTransformation | de10a1177e685267185de05dbce3230c25ef1d16 | [
"MIT"
] | 323 | 2017-10-24T07:45:12.000Z | 2022-03-05T15:25:17.000Z | rendering/viewer.py | MTKat/FloorplanTransformation | de10a1177e685267185de05dbce3230c25ef1d16 | [
"MIT"
] | 32 | 2017-11-20T12:44:27.000Z | 2022-03-22T01:59:23.000Z | rendering/viewer.py | MTKat/FloorplanTransformation | de10a1177e685267185de05dbce3230c25ef1d16 | [
"MIT"
] | 137 | 2017-11-13T10:06:00.000Z | 2022-03-23T10:26:30.000Z | from math import pi, sin, cos
from panda3d.core import *
from direct.showbase.ShowBase import ShowBase
from direct.task import Task
from floorplan import Floorplan
import numpy as np
import random
import copy
app = Viewer()
app.run()
| 35.358779 | 186 | 0.636118 |
3f7bd6bf0cb9919cde3364ef2571e57284b86425 | 118,425 | py | Python | application/gen/today/TodayInternalApiService.py | today-app/today-api | a77adbad509d485e643023efc64f62b69fd364cc | [
"MIT"
] | null | null | null | application/gen/today/TodayInternalApiService.py | today-app/today-api | a77adbad509d485e643023efc64f62b69fd364cc | [
"MIT"
] | null | null | null | application/gen/today/TodayInternalApiService.py | today-app/today-api | a77adbad509d485e643023efc64f62b69fd364cc | [
"MIT"
] | 1 | 2021-06-04T06:02:36.000Z | 2021-06-04T06:02:36.000Z | #
# Autogenerated by Thrift Compiler (0.9.1)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
... | 31.156275 | 188 | 0.673574 |
3f7d049cc55342fe3c9001df6677acf8bf2011d5 | 626 | py | Python | common/kalman/simple_kalman_old.py | 919bot/Tessa | 9b48ff9020e8fb6992fc78271f2720fd19e01093 | [
"MIT"
] | 114 | 2020-02-24T14:18:01.000Z | 2022-03-19T03:42:00.000Z | common/kalman/simple_kalman_old.py | 919bot/Tessa | 9b48ff9020e8fb6992fc78271f2720fd19e01093 | [
"MIT"
] | 15 | 2020-02-25T03:37:44.000Z | 2021-09-08T01:51:15.000Z | common/kalman/simple_kalman_old.py | 919bot/Tessa | 9b48ff9020e8fb6992fc78271f2720fd19e01093 | [
"MIT"
] | 73 | 2018-12-03T19:34:42.000Z | 2020-07-27T05:10:23.000Z | import numpy as np
| 26.083333 | 81 | 0.634185 |
3f7dac25b4b548d364d5151417f67ef21dc2df87 | 3,985 | py | Python | serverless/apps/qctokyo/horoscope.py | snuffkin/qctokyo | 25d457cce402a21fe1a009c82cfb5131fb7db526 | [
"Apache-2.0"
] | 8 | 2020-06-15T23:08:12.000Z | 2022-01-30T00:14:48.000Z | serverless/apps/qctokyo/horoscope.py | snuffkin/qctokyo | 25d457cce402a21fe1a009c82cfb5131fb7db526 | [
"Apache-2.0"
] | 1 | 2022-03-09T18:33:26.000Z | 2022-03-09T18:33:26.000Z | serverless/apps/qctokyo/horoscope.py | snuffkin/qctokyo | 25d457cce402a21fe1a009c82cfb5131fb7db526 | [
"Apache-2.0"
] | 1 | 2020-06-16T00:30:08.000Z | 2020-06-16T00:30:08.000Z | import datetime
import logging
import os
import boto3
from qiskit import IBMQ
from qiskit import QuantumCircuit, execute
logger = logging.getLogger()
logger.setLevel(logging.INFO)
backend_candidates = [
"ibmq_athens",
"ibmq_santiago",
"ibmq_belem",
"ibmq_quito",
"ibmq_lima",
]
| 29.738806 | 98 | 0.647679 |
3f7e03214470e23d0a5adb54a209d5b572903083 | 8,558 | py | Python | boot/rpi/tools/patman/func_test.py | yodaos-project/yodaos | d0d7bbc277c0fc1c64e2e0a1c82fe6e63f6eb954 | [
"Apache-2.0"
] | 1,144 | 2018-12-18T09:46:47.000Z | 2022-03-07T14:51:46.000Z | boot/rpi/tools/patman/func_test.py | Rokid/YodaOS | d0d7bbc277c0fc1c64e2e0a1c82fe6e63f6eb954 | [
"Apache-2.0"
] | 16 | 2019-01-28T06:08:40.000Z | 2019-12-04T10:26:41.000Z | boot/rpi/tools/patman/func_test.py | Rokid/YodaOS | d0d7bbc277c0fc1c64e2e0a1c82fe6e63f6eb954 | [
"Apache-2.0"
] | 129 | 2018-12-18T09:46:50.000Z | 2022-03-30T07:30:13.000Z | # -*- coding: utf-8 -*-
# SPDX-License-Identifier: GPL-2.0+
#
# Copyright 2017 Google, Inc
#
import contextlib
import os
import re
import shutil
import sys
import tempfile
import unittest
import gitutil
import patchstream
import settings
def testBasic(self):
"""Tests the basic flow of patman
T... | 35.218107 | 80 | 0.557373 |
3f7e4f78011ff12caa466b7a88c18ef168733660 | 832 | py | Python | anime downloaders/animeblkom downloader.py | badr286/anime-stuff | 2083e612ff2dbd079e68d8c49eb3fcddbfbfc031 | [
"MIT"
] | null | null | null | anime downloaders/animeblkom downloader.py | badr286/anime-stuff | 2083e612ff2dbd079e68d8c49eb3fcddbfbfc031 | [
"MIT"
] | null | null | null | anime downloaders/animeblkom downloader.py | badr286/anime-stuff | 2083e612ff2dbd079e68d8c49eb3fcddbfbfc031 | [
"MIT"
] | null | null | null | from animeblkom import Animeblkom, animeblkom_episode
from downloader import blkom
from requests import get
download_list = []
anime_url = input('Anime Url: ') # ex. https://animeblkom.net/watch/one-piece
episodes = Animeblkom.get_anime_episodes(anime_url)
print(f'{len(episodes)} episodes found.')
episodes... | 24.470588 | 78 | 0.689904 |
3f814f9f3699e39e3b921e760844dbc2795a7e64 | 225 | py | Python | src/spaceone/monitoring/interface/rest/v1/common.py | xellos00/monitoring | deb5363a2152e7b3f85a08d27bdede0e00023824 | [
"Apache-2.0"
] | null | null | null | src/spaceone/monitoring/interface/rest/v1/common.py | xellos00/monitoring | deb5363a2152e7b3f85a08d27bdede0e00023824 | [
"Apache-2.0"
] | null | null | null | src/spaceone/monitoring/interface/rest/v1/common.py | xellos00/monitoring | deb5363a2152e7b3f85a08d27bdede0e00023824 | [
"Apache-2.0"
] | null | null | null | import logging
from fastapi import APIRouter
from spaceone.core.locator import Locator
_LOGGER = logging.getLogger(__name__)
router = APIRouter()
| 16.071429 | 41 | 0.742222 |
3f8398d930cd82cdfb7464d288fada9e7ec31ac8 | 7,617 | py | Python | figures/kCSD_properties/figure_eigensources_M_1D.py | rdarie/kCSD-python | 5b9e1b1dce2ff95c0d981c2c4015b7a75199de9a | [
"BSD-3-Clause"
] | 11 | 2017-11-06T21:24:18.000Z | 2022-02-07T21:17:13.000Z | figures/kCSD_properties/figure_eigensources_M_1D.py | aeladly91/kCSD-python | 4dd0015e9c5598e7eceeeb25668e696e495b2026 | [
"BSD-3-Clause"
] | 105 | 2017-12-13T12:49:54.000Z | 2022-03-19T12:25:51.000Z | figures/kCSD_properties/figure_eigensources_M_1D.py | aeladly91/kCSD-python | 4dd0015e9c5598e7eceeeb25668e696e495b2026 | [
"BSD-3-Clause"
] | 27 | 2017-06-08T07:32:32.000Z | 2022-02-07T21:17:15.000Z | """
@author: mkowalska
"""
import os
import numpy as np
from numpy.linalg import LinAlgError
import matplotlib.pyplot as plt
from figure_properties import *
import matplotlib.gridspec as gridspec
from kcsd import KCSD1D
import targeted_basis as tb
__abs_file__ = os.path.abspath(__file__)
def stability_M(n_src, tot... | 32.412766 | 79 | 0.52606 |
3f83a4002afc61816d499ce9af2515b129624aaf | 392 | py | Python | examples/task1.py | qqgg231/Allegro | d5300bfb8eb58168d5efbd6a7e211561fce569e0 | [
"MIT"
] | 27 | 2017-04-22T03:00:04.000Z | 2017-11-28T08:40:47.000Z | examples/task1.py | qqgg231/Allegro | d5300bfb8eb58168d5efbd6a7e211561fce569e0 | [
"MIT"
] | 2 | 2017-05-18T08:40:29.000Z | 2018-11-07T02:00:20.000Z | examples/task1.py | qqgg231/Allegro | d5300bfb8eb58168d5efbd6a7e211561fce569e0 | [
"MIT"
] | 4 | 2017-04-21T11:49:15.000Z | 2018-10-29T12:01:38.000Z | #!/usr/bin/env python
# coding=utf-8
from celery import Celery
from pprint import pprint
import time
app = Celery('tasks', backend='redis://localhost:6379/0', broker = 'redis://localhost:6379/0')
| 17.818182 | 94 | 0.614796 |
3f880cabd29a75530eb1d2132bd05625f3e4cd8e | 98 | py | Python | checkov/common/comment/enum.py | antonblr/checkov | 9415c6593c537945c08f7a19f28bdd8b96966f67 | [
"Apache-2.0"
] | 4,013 | 2019-12-09T13:16:54.000Z | 2022-03-31T14:31:01.000Z | checkov/common/comment/enum.py | antonblr/checkov | 9415c6593c537945c08f7a19f28bdd8b96966f67 | [
"Apache-2.0"
] | 1,258 | 2019-12-17T09:55:51.000Z | 2022-03-31T19:17:17.000Z | checkov/common/comment/enum.py | antonblr/checkov | 9415c6593c537945c08f7a19f28bdd8b96966f67 | [
"Apache-2.0"
] | 638 | 2019-12-19T08:57:38.000Z | 2022-03-30T21:38:37.000Z | import re
COMMENT_REGEX = re.compile(r'(checkov:skip=|bridgecrew:skip=) *([A-Z_\d]+)(:[^\n]+)?')
| 24.5 | 86 | 0.622449 |
3f89aa8877a0c320a25f1232234def2b63591b67 | 438 | py | Python | chris_backend/plugins/migrations/0034_auto_20200420_2320.py | rudolphpienaar/ChRIS_ultron_backEnd | 5de4e255fb151ac7a6f900327704831da11dcd1f | [
"MIT"
] | 26 | 2016-05-26T14:09:35.000Z | 2022-01-28T19:12:43.000Z | chris_backend/plugins/migrations/0034_auto_20200420_2320.py | rudolphpienaar/ChRIS_ultron_backEnd | 5de4e255fb151ac7a6f900327704831da11dcd1f | [
"MIT"
] | 168 | 2016-06-24T11:07:15.000Z | 2022-03-21T12:33:43.000Z | chris_backend/plugins/migrations/0034_auto_20200420_2320.py | rudolphpienaar/ChRIS_ultron_backEnd | 5de4e255fb151ac7a6f900327704831da11dcd1f | [
"MIT"
] | 45 | 2017-08-16T16:41:40.000Z | 2022-03-31T18:12:14.000Z | # Generated by Django 2.1.4 on 2020-04-20 23:20
from django.db import migrations, models
| 23.052632 | 64 | 0.639269 |
3f8a0dda01eeac406db001e56651f4bc81dfa178 | 4,112 | py | Python | src/StarTrac/forms.py | Stdubic/Track | 853df13178967ab9b5c1918d6d56fa7fe2831b0f | [
"MIT"
] | 1 | 2015-09-14T19:54:56.000Z | 2015-09-14T19:54:56.000Z | src/StarTrac/forms.py | Stdubic/Track | 853df13178967ab9b5c1918d6d56fa7fe2831b0f | [
"MIT"
] | null | null | null | src/StarTrac/forms.py | Stdubic/Track | 853df13178967ab9b5c1918d6d56fa7fe2831b0f | [
"MIT"
] | null | null | null | '''
Created on Dec 21, 2014
@author: Milos
'''
'''
Forma za eventualna prosirenja djangovog user-a
'''
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404... | 31.875969 | 100 | 0.63643 |
3f8a3a645b102cb7225f8c5a5422dfe385638911 | 4,775 | py | Python | mysite/settings/base.py | HumanCellAtlas/HCA-Tracker | 4b3df2b8a99582b7b654253d6e0faf537298a876 | [
"MIT"
] | 3 | 2019-09-09T15:43:23.000Z | 2020-12-03T23:29:45.000Z | mysite/settings/base.py | HumanCellAtlas/HCA-Tracker | 4b3df2b8a99582b7b654253d6e0faf537298a876 | [
"MIT"
] | 45 | 2019-09-30T19:00:04.000Z | 2020-12-03T23:50:35.000Z | mysite/settings/base.py | HumanCellAtlas/HCA-Tracker | 4b3df2b8a99582b7b654253d6e0faf537298a876 | [
"MIT"
] | 1 | 2021-01-11T21:30:52.000Z | 2021-01-11T21:30:52.000Z | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 2.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
imp... | 27.923977 | 99 | 0.685654 |
3f8a7855be2c7792001f6241d146c5b377cdb431 | 932 | py | Python | setup.py | kiranmantri/python-remote-import | 2724e320377c3f2328dafd61707aad4d5eed2f10 | [
"MIT"
] | null | null | null | setup.py | kiranmantri/python-remote-import | 2724e320377c3f2328dafd61707aad4d5eed2f10 | [
"MIT"
] | null | null | null | setup.py | kiranmantri/python-remote-import | 2724e320377c3f2328dafd61707aad4d5eed2f10 | [
"MIT"
] | null | null | null | """Create the distribution file (pypi)."""
import importlib
import setuptools
from pathlib import Path
this_package_name = 'remote_import'
version_file = Path(__file__).absolute().parent / this_package_name / "__version__.py"
setuptools.setup(
name=this_package_name,
url="https://github.com/kiranmantri/pytho... | 35.846154 | 105 | 0.724249 |
3f8aa0798a7df35cc97e5a10a092cb9ce9a9bf74 | 1,958 | py | Python | flaskr/test/unit/webapp/test_aquarium_mode.py | UnibucProjects/SmartAquarium | 6f3c16fb7a45218e763b46223568f6c3e5b66bfd | [
"MIT"
] | 6 | 2022-02-02T19:37:57.000Z | 2022-02-03T15:12:32.000Z | flaskr/test/unit/webapp/test_aquarium_mode.py | UnibucProjects/SmartAquarium | 6f3c16fb7a45218e763b46223568f6c3e5b66bfd | [
"MIT"
] | 18 | 2022-01-29T22:47:46.000Z | 2022-02-03T15:30:28.000Z | flaskr/test/unit/webapp/test_aquarium_mode.py | UnibucProjects/SmartAquarium | 6f3c16fb7a45218e763b46223568f6c3e5b66bfd | [
"MIT"
] | null | null | null |
from flask import request
import pytest
import json
from app import create_app, create_rest_api
from db import get_db
| 26.459459 | 84 | 0.64811 |
3f8aeedaa1eeb40e7b048cb7a40313232cfd6bb4 | 4,172 | py | Python | get_anns.py | hoangnt2601/RAPiD | 8e765ccec45e192305ca3d9d547967dbb4299cc3 | [
"MIT"
] | null | null | null | get_anns.py | hoangnt2601/RAPiD | 8e765ccec45e192305ca3d9d547967dbb4299cc3 | [
"MIT"
] | null | null | null | get_anns.py | hoangnt2601/RAPiD | 8e765ccec45e192305ca3d9d547967dbb4299cc3 | [
"MIT"
] | null | null | null | import json
import os
import cv2
import imutils
import numpy as np
import torch
import torchvision.transforms.functional as tvf
from PIL import Image
from models.rapid import RAPiD
from tracker.deep_sort import DeepSort
from utils import utils
weights_path = "weights/pL1_HBCP608_Apr14_6000.ckpt"
model = RAPiD(backbo... | 28.972222 | 88 | 0.514382 |
3f8b0d6e16b2a41fa16dedea3dc287034f8c9ddf | 5,194 | py | Python | src/pypipegraph2/util.py | TyberiusPrime/pypipegraph2 | 16f5d3a471b3dae71fafca98f63c4c80882dc20a | [
"MIT"
] | null | null | null | src/pypipegraph2/util.py | TyberiusPrime/pypipegraph2 | 16f5d3a471b3dae71fafca98f63c4c80882dc20a | [
"MIT"
] | null | null | null | src/pypipegraph2/util.py | TyberiusPrime/pypipegraph2 | 16f5d3a471b3dae71fafca98f63c4c80882dc20a | [
"MIT"
] | 1 | 2021-09-01T11:20:46.000Z | 2021-09-01T11:20:46.000Z | import os
import sys
from loguru import logger
from rich.console import Console
console_args = {}
if "pytest" in sys.modules:
console_args["width"] = 120
console = Console(**console_args)
cpu_count = None
def CPUs():
"""
Detects the number of CPUs on a system. Cribbed from pp.
"""
global cpu_co... | 29.344633 | 87 | 0.622256 |
3f8d947a33583e1607214e59c7b361284124cdbb | 1,808 | py | Python | hwk/tests/unit/test_udev.py | jaypipes/os-hardware | b43be56fafc7e853614cafc7d02c734aadb72cbe | [
"Apache-2.0"
] | null | null | null | hwk/tests/unit/test_udev.py | jaypipes/os-hardware | b43be56fafc7e853614cafc7d02c734aadb72cbe | [
"Apache-2.0"
] | 7 | 2017-06-02T00:41:49.000Z | 2017-06-19T23:00:12.000Z | hwk/tests/unit/test_udev.py | jaypipes/hwk | b43be56fafc7e853614cafc7d02c734aadb72cbe | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | 30.644068 | 76 | 0.776549 |
3f8dbacf9ded6ecf935b85a50c2260653a9563a1 | 618 | py | Python | app/resources/continent.py | visar/world | c609dcf343e94d6bb5cd242cd093ad646c744575 | [
"MIT"
] | 2 | 2021-03-20T05:53:33.000Z | 2021-04-12T04:38:58.000Z | app/resources/continent.py | visar/world | c609dcf343e94d6bb5cd242cd093ad646c744575 | [
"MIT"
] | null | null | null | app/resources/continent.py | visar/world | c609dcf343e94d6bb5cd242cd093ad646c744575 | [
"MIT"
] | null | null | null | from http import HTTPStatus
from flask_restful import Resource
from ..extensions import cache
from ..models.country import Country
from ..schemas.continent import ContinentSchema
continent_list_schema = ContinentSchema(many=True)
| 29.428571 | 110 | 0.745955 |
3f8e2e50dac6d87bfd7ff239f2e32c8c791e0ddb | 14,547 | py | Python | sublimebookmark.py | gwenzek/sublimeBookmark | 02a08c8249c5203fa9a46fd19e71bc68e6e0be9a | [
"Apache-2.0"
] | null | null | null | sublimebookmark.py | gwenzek/sublimeBookmark | 02a08c8249c5203fa9a46fd19e71bc68e6e0be9a | [
"Apache-2.0"
] | null | null | null | sublimebookmark.py | gwenzek/sublimeBookmark | 02a08c8249c5203fa9a46fd19e71bc68e6e0be9a | [
"Apache-2.0"
] | null | null | null | import sublime
import sublime_plugin
import threading
import os.path
from pickle import dump, load, UnpicklingError, PicklingError
from copy import deepcopy
from .common import *
from .bookmark import *
from .visibilityHandler import *
from .ui import *
BOOKMARKS = []
UID = None
#list of bookmarks that have ben d... | 28.083012 | 121 | 0.72771 |
3f8e75a7037cb0591f30cdca4d67c840b9c842f3 | 3,677 | py | Python | xrpc/examples/exemplary_rpc.py | andreycizov/python-xrpc | ed403ae74d5e89e0ebac68bcc58591d6b32742ff | [
"Apache-2.0"
] | null | null | null | xrpc/examples/exemplary_rpc.py | andreycizov/python-xrpc | ed403ae74d5e89e0ebac68bcc58591d6b32742ff | [
"Apache-2.0"
] | null | null | null | xrpc/examples/exemplary_rpc.py | andreycizov/python-xrpc | ed403ae74d5e89e0ebac68bcc58591d6b32742ff | [
"Apache-2.0"
] | null | null | null | import logging
import random
from typing import Dict
from xrpc.dsl import rpc, RPCType, regular, signal
from xrpc.error import TerminationException
from xrpc.runtime import sender, service
# todo: the issue is actually that not only the request-reply pattern wouldn't work
# todo: but also the fact that an RPC might h... | 29.653226 | 101 | 0.627686 |
3f8ee60500939b288620ad55089e24b11d028c78 | 413 | py | Python | tests/__init__.py | sgbaird/ml-matrics | e0560af810b12cae3a34dd818d628360de2d96e5 | [
"MIT"
] | 11 | 2021-07-12T02:12:02.000Z | 2022-02-14T19:06:22.000Z | tests/__init__.py | sgbaird/ml-matrics | e0560af810b12cae3a34dd818d628360de2d96e5 | [
"MIT"
] | 7 | 2021-10-14T10:00:01.000Z | 2022-03-01T21:09:30.000Z | tests/__init__.py | sgbaird/ml-matrics | e0560af810b12cae3a34dd818d628360de2d96e5 | [
"MIT"
] | 2 | 2021-10-01T10:00:50.000Z | 2022-02-12T08:50:22.000Z | import matplotlib.pyplot as plt
import pandas as pd
import pytest
from ml_matrics import ROOT
y_binary, y_proba, y_clf = pd.read_csv(f"{ROOT}/data/rand_clf.csv").to_numpy().T
xs, y_pred, y_true = pd.read_csv(f"{ROOT}/data/rand_regr.csv").to_numpy().T
| 20.65 | 80 | 0.723971 |
3f8f4d8b9a542512c36e38813053e17bfd674f61 | 2,907 | py | Python | example_run.py | altsoph/community_loglike | ea8800217097575558f8bfb97f7737d12cad2339 | [
"BSD-3-Clause"
] | 16 | 2018-02-14T23:14:32.000Z | 2021-09-15T09:38:47.000Z | example_run.py | altsoph/community_loglike | ea8800217097575558f8bfb97f7737d12cad2339 | [
"BSD-3-Clause"
] | null | null | null | example_run.py | altsoph/community_loglike | ea8800217097575558f8bfb97f7737d12cad2339 | [
"BSD-3-Clause"
] | 7 | 2019-05-09T10:25:24.000Z | 2020-06-06T09:37:18.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
from __future__ import print_function
import community_ext
import networkx as nx
fn1 = "datasets/polblogs/polblogs.edges"
fn2 = fn1.replace(".edges",".clusters")
print("DATASET:",fn1)
# load graph
G = nx.Graph()
for line in open(fn1):
from_node, to_node = map(int, li... | 38.76 | 144 | 0.68765 |
3f8f5e2babed8a1212595d0eeba5f9b572718ef4 | 1,961 | py | Python | rebalanced_balanced_tests/evalr.py | zhanghuiying2319/Master | 1f4d11dd8277517b7e63d34651a9629f58dd7070 | [
"MIT"
] | null | null | null | rebalanced_balanced_tests/evalr.py | zhanghuiying2319/Master | 1f4d11dd8277517b7e63d34651a9629f58dd7070 | [
"MIT"
] | null | null | null | rebalanced_balanced_tests/evalr.py | zhanghuiying2319/Master | 1f4d11dd8277517b7e63d34651a9629f58dd7070 | [
"MIT"
] | null | null | null |
import os,sys,math,numpy as np, matplotlib.pyplot as plt
if __name__=='__main__':
runstuff()
| 35.017857 | 109 | 0.740948 |
3f8f66290e622881703269fb324e879e53d1763e | 5,282 | py | Python | recognize.py | pg992/face-recognition | 61db03a7fc5efeae6d88a49cf60dca3e426a2b04 | [
"Apache-2.0"
] | null | null | null | recognize.py | pg992/face-recognition | 61db03a7fc5efeae6d88a49cf60dca3e426a2b04 | [
"Apache-2.0"
] | null | null | null | recognize.py | pg992/face-recognition | 61db03a7fc5efeae6d88a49cf60dca3e426a2b04 | [
"Apache-2.0"
] | null | null | null | from keras.models import Model, Sequential
from keras.layers import Input, Convolution2D, ZeroPadding2D, MaxPooling2D, Flatten, Dense, Dropout, Activation
import numpy as np
from os import listdir,path
from os.path import isfile, join
from PIL import Image
from keras.preprocessing.image import load_img, save_img, img_t... | 37.197183 | 125 | 0.72624 |
3f94e4db1e0637fc4c005e79e78b67f9d50a7128 | 3,879 | py | Python | learning_journal/views/default.py | famavott/pyramid-learning-journal | 07d1c6c8699e7cb1cdb8b8eb856c8477455f4fa9 | [
"MIT"
] | null | null | null | learning_journal/views/default.py | famavott/pyramid-learning-journal | 07d1c6c8699e7cb1cdb8b8eb856c8477455f4fa9 | [
"MIT"
] | null | null | null | learning_journal/views/default.py | famavott/pyramid-learning-journal | 07d1c6c8699e7cb1cdb8b8eb856c8477455f4fa9 | [
"MIT"
] | null | null | null | """Module with view functions that serve each uri."""
from datetime import datetime
from learning_journal.models.mymodel import Journal
from learning_journal.security import is_authenticated
from pyramid.httpexceptions import HTTPFound, HTTPNotFound
from pyramid.security import NO_PERMISSION_REQUIRED, forget, remem... | 33.439655 | 109 | 0.675432 |
3f94e6b56b89d77a4cf091db5423e2787e19e58b | 4,854 | py | Python | algorithms/search/depth_first_search/depth_first_search_power_set.py | josephedradan/algorithms | 6caa107b0df245653eab81143ebf0d9c7e5515fb | [
"MIT"
] | null | null | null | algorithms/search/depth_first_search/depth_first_search_power_set.py | josephedradan/algorithms | 6caa107b0df245653eab81143ebf0d9c7e5515fb | [
"MIT"
] | null | null | null | algorithms/search/depth_first_search/depth_first_search_power_set.py | josephedradan/algorithms | 6caa107b0df245653eab81143ebf0d9c7e5515fb | [
"MIT"
] | null | null | null | """
Created by Joseph Edradan
Github: https://github.com/josephedradan
Date created: 3/23/2020
Purpose:
The most generic DFS algorithm capable of being modified to Fit your needs.
It is also optimized.
Details:
Description:
Notes:
IMPORTANT NOTES:
Explanation:
Time Complexity:
Reference:
"""
from typi... | 28.892857 | 119 | 0.63391 |
3f95236c19c4a6142c354065a15b5c5f4828679e | 657 | py | Python | apps/core/models/cb_media_movel/parameters_MM.py | bispojr/observatorio-ufj-covid19 | 8667fae1367b95a7dfa8558fbac3b1b0b708af8d | [
"MIT"
] | 3 | 2020-04-02T21:59:19.000Z | 2020-12-03T12:37:26.000Z | apps/core/models/cb_media_movel/parameters_MM.py | bispojr/observatorio-ufj-covid19 | 8667fae1367b95a7dfa8558fbac3b1b0b708af8d | [
"MIT"
] | 68 | 2020-03-28T22:40:08.000Z | 2020-07-08T18:04:07.000Z | apps/core/models/cb_media_movel/parameters_MM.py | bispojr/observatorio-ufj-covid19 | 8667fae1367b95a7dfa8558fbac3b1b0b708af8d | [
"MIT"
] | 5 | 2020-03-28T21:35:30.000Z | 2020-06-10T01:28:14.000Z | from django.db import models
import json | 21.193548 | 48 | 0.482496 |
3f971a075f4d4a4954da5f6fa16233c6818129bb | 4,151 | py | Python | httprider/model/app_data_reader.py | iSWORD/http-rider | 5d9e5cc8c5166ab58f81d30d21b3ce2497bf09b9 | [
"MIT"
] | 27 | 2019-12-20T00:10:28.000Z | 2022-03-09T18:04:23.000Z | httprider/model/app_data_reader.py | iSWORD/http-rider | 5d9e5cc8c5166ab58f81d30d21b3ce2497bf09b9 | [
"MIT"
] | 6 | 2019-10-13T08:50:21.000Z | 2020-06-05T12:23:08.000Z | httprider/model/app_data_reader.py | iSWORD/http-rider | 5d9e5cc8c5166ab58f81d30d21b3ce2497bf09b9 | [
"MIT"
] | 7 | 2019-08-10T01:38:31.000Z | 2021-08-23T05:28:46.000Z | import json
import logging
from PyQt5.QtCore import QObject, pyqtSignal
from ..core.constants import (
API_TEST_CASE_RECORD_TYPE,
HTTP_EXCHANGE_RECORD_TYPE,
ENVIRONMENT_RECORD_TYPE,
PROJECT_INFO_RECORD_TYPE,
APP_STATE_RECORD_TYPE,
API_CALL_RECORD_TYPE,
)
from ..model.app_data import (
ApiC... | 33.747967 | 88 | 0.695977 |
3f978f4cb297bf98d9722f54f27227c0fe655e28 | 120,882 | py | Python | tests/parsers/test_pwscf.py | jgaff/pif-dft | 0fcc136560973f0f99cd257108cdfbc497207e4f | [
"Apache-2.0"
] | null | null | null | tests/parsers/test_pwscf.py | jgaff/pif-dft | 0fcc136560973f0f99cd257108cdfbc497207e4f | [
"Apache-2.0"
] | null | null | null | tests/parsers/test_pwscf.py | jgaff/pif-dft | 0fcc136560973f0f99cd257108cdfbc497207e4f | [
"Apache-2.0"
] | null | null | null | import unittest
from dfttopif.parsers.pwscf import PwscfParser
from ..test_pif import unpack_example, delete_example
from pypif.obj.common.value import Value
import os
import shutil
if __name__ == '__main__':
unittest.main()
| 470.357977 | 65,484 | 0.668983 |
3f9839dc98473c8e4ea48d01106d9d7e95ce9755 | 1,009 | py | Python | labels/migrations/0002_auto_20210210_0110.py | plaf2000/webspec | 487ccccff088ddbda0e5e475aaad167a01f4aab2 | [
"MIT"
] | null | null | null | labels/migrations/0002_auto_20210210_0110.py | plaf2000/webspec | 487ccccff088ddbda0e5e475aaad167a01f4aab2 | [
"MIT"
] | null | null | null | labels/migrations/0002_auto_20210210_0110.py | plaf2000/webspec | 487ccccff088ddbda0e5e475aaad167a01f4aab2 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2021-02-10 01:10
from django.db import migrations, models
| 26.552632 | 63 | 0.544103 |
3f9a7e714891705f693edf84f2253bf5255cd0d3 | 399 | py | Python | src/MeshSegmentation/conjgrad.py | paigeco/VirtualGoniometer | 536e7e77fbb036ad8d777b42e751a0f3e80b8242 | [
"CC0-1.0"
] | 1 | 2021-02-22T02:53:26.000Z | 2021-02-22T02:53:26.000Z | src/MeshSegmentation/conjgrad.py | paigeco/VirtualGoniometer | 536e7e77fbb036ad8d777b42e751a0f3e80b8242 | [
"CC0-1.0"
] | 5 | 2021-03-26T15:15:34.000Z | 2021-06-11T20:16:00.000Z | src/MeshSegmentation/conjgrad.py | paigeco/VirtualGoniometer | 536e7e77fbb036ad8d777b42e751a0f3e80b8242 | [
"CC0-1.0"
] | null | null | null | import numpy as np
| 22.166667 | 40 | 0.43609 |
3f9ba869b5d88cbcf4492c69120be7f5826782f4 | 569 | py | Python | handlers/_my.py | MelomanCool/telegram-stickers | 62ee6e5c89bf6793a6d64ec0865b6f79582b3974 | [
"MIT"
] | null | null | null | handlers/_my.py | MelomanCool/telegram-stickers | 62ee6e5c89bf6793a6d64ec0865b6f79582b3974 | [
"MIT"
] | 7 | 2017-12-18T20:07:57.000Z | 2021-06-21T13:50:30.000Z | handlers/_my.py | MelomanCool/telegram-stickers | 62ee6e5c89bf6793a6d64ec0865b6f79582b3974 | [
"MIT"
] | null | null | null | import model
sticker_storage = model.get_storage()
def my(_, update):
"""Prints stickers added by user"""
message = update.message
user_id = update.message.from_user.id
stickers = sticker_storage.get_for_owner(user_id, max_count=20, tagged=True)
text = '\n\n'.join(
'Tags: {tags}\n'
... | 22.76 | 80 | 0.602812 |
3f9c9921caf4c6f97ced7380a73a7c255bf458f6 | 9,587 | py | Python | src/forest/main.py | ADVRHumanoids/forest | 22995b7bebf9809d49b0887dcb4a35c907fb3e13 | [
"MIT"
] | null | null | null | src/forest/main.py | ADVRHumanoids/forest | 22995b7bebf9809d49b0887dcb4a35c907fb3e13 | [
"MIT"
] | 6 | 2022-02-24T14:00:39.000Z | 2022-03-31T14:35:18.000Z | src/forest/main.py | ADVRHumanoids/forest | 22995b7bebf9809d49b0887dcb4a35c907fb3e13 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import getpass
import os
import sys
import argcomplete
from datetime import datetime
from forest import cmake_tools
from forest.common.eval_handler import EvalHandler
from forest.common.install import install_package, write_setup_file, write_ws_file, check_ws_file, uninstall_pac... | 45.870813 | 240 | 0.682487 |
3f9ec030fef5007a3fee6e257fb29f26ca2ccd76 | 1,849 | py | Python | csc140/divideAndConquer/maximumSubArray.py | Matt-Crow/SmallPythonPrograms | 660dad09e1e8472e4bb4f0464117ccac63dbd7ea | [
"MIT"
] | 1 | 2019-12-11T21:56:59.000Z | 2019-12-11T21:56:59.000Z | csc140/divideAndConquer/maximumSubArray.py | Matt-Crow/SmallPythonPrograms | 660dad09e1e8472e4bb4f0464117ccac63dbd7ea | [
"MIT"
] | null | null | null | csc140/divideAndConquer/maximumSubArray.py | Matt-Crow/SmallPythonPrograms | 660dad09e1e8472e4bb4f0464117ccac63dbd7ea | [
"MIT"
] | null | null | null | """
Given an array of numbers, find the subarray that maximizes the sum of all
elements in the array. Note that these numbers can be negative
"""
import random
# Returns max subarray within a[i:j] (inclusive of i, exclusive of j)
if __name__ == "__main__":
a = createArray(100)
print(a)
bruteForce = b... | 24.012987 | 74 | 0.567334 |
3f9f5148d14b1213378b99075bb02d7c56142c61 | 1,101 | py | Python | setup.py | thusoy/blag | 183f5c5c6be16d8f22b269e574396d957d5f1895 | [
"MIT"
] | null | null | null | setup.py | thusoy/blag | 183f5c5c6be16d8f22b269e574396d957d5f1895 | [
"MIT"
] | 10 | 2015-02-23T22:55:15.000Z | 2022-01-07T19:48:42.000Z | setup.py | thusoy/blag | 183f5c5c6be16d8f22b269e574396d957d5f1895 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
from setuptools import setup, find_packages
import os
migration_files = package_files(os.path.join('blag', 'migrations'), os.path.abspath('blag'))
package_data = [
os.path.join('templates', '*.html'),
os.path.join('templates', '*', '*.html'),
os.path.join('server-ass... | 25.022727 | 92 | 0.629428 |
3fa22069ae5fe18f29c6332040788c47fba607ea | 469 | py | Python | DataStructures/Stacks/TextEditor.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Stacks/TextEditor.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Stacks/TextEditor.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
N = int(raw_input())
S = ''
stack = [S]
for _ in xrange(N):
s = raw_input()
if s.startswith('1'):
S = ''.join((S, s.split()[-1]))
stack.append(S)
elif s.startswith('2'):
k = int(s.split()[-1])
S = S[:-k]
stack.append(S)
elif s.startswith('3'):
... | 19.541667 | 39 | 0.447761 |
3fa25fe67ade7748177cb9602ea922bfde19db47 | 2,601 | py | Python | backend/server/services.py | Masyru/gisspot | 472e7d6c321c3a9db01ffdb8573e612caaf8a13b | [
"Apache-2.0"
] | null | null | null | backend/server/services.py | Masyru/gisspot | 472e7d6c321c3a9db01ffdb8573e612caaf8a13b | [
"Apache-2.0"
] | null | null | null | backend/server/services.py | Masyru/gisspot | 472e7d6c321c3a9db01ffdb8573e612caaf8a13b | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from typing import Optional, List, Dict
import sys
sys.path.append("../../")
from backend.server.pd_model import *
from backend.queue.services import add_task, stop_all_ws_task
from backend.database.main import gis_stac
__all__ = ["preview_processing", "vector_processing", "refuse_proces... | 34.68 | 89 | 0.626682 |
3fa285fbe23a04fd466fb79a701560d794e0830d | 530 | py | Python | openwater/views.py | openwater/h2o-really | bb6ae678cc4f505450684a2579e3f0196236e8dc | [
"Unlicense"
] | 3 | 2015-05-25T07:41:42.000Z | 2020-05-18T05:50:40.000Z | openwater/views.py | openwater/h2o-really | bb6ae678cc4f505450684a2579e3f0196236e8dc | [
"Unlicense"
] | null | null | null | openwater/views.py | openwater/h2o-really | bb6ae678cc4f505450684a2579e3f0196236e8dc | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic.base import TemplateView
from diario.models import Entry
from observations.models import Measurement
| 27.894737 | 92 | 0.711321 |
3fa32905c78137776bdb65ffa8ff14608ab1abe6 | 1,516 | py | Python | backtrace_with_time/backtrace_with_time.py | chimicus/addons | 0fa1110df999fc9a8622a12e00453fc67b62fce1 | [
"BSD-3-Clause"
] | null | null | null | backtrace_with_time/backtrace_with_time.py | chimicus/addons | 0fa1110df999fc9a8622a12e00453fc67b62fce1 | [
"BSD-3-Clause"
] | 6 | 2019-08-23T15:53:05.000Z | 2021-07-14T08:24:06.000Z | backtrace_with_time/backtrace_with_time.py | chimicus/addons | 0fa1110df999fc9a8622a12e00453fc67b62fce1 | [
"BSD-3-Clause"
] | 3 | 2019-11-04T12:02:11.000Z | 2020-03-05T13:57:11.000Z | """
Adds a ubt command which adds basic block counts to frames within a backtrace.
Usage: ubt
Contributors: Isa Smith, Toby Lloyd Davies
Copyright (C) 2019 Undo Ltd
"""
import gdb
from undodb.debugger_extensions import (
debugger_utils,
udb,
)
BacktraceWithTime()
| 31.583333 | 79 | 0.566623 |
3fa6b41c13b8399c331e3ed2f410f771408be4f8 | 680 | py | Python | envoy/examples/puma-proxy/internal_lib/backend/netflix/database_connect.py | kevinjesse/puma | 163a363275bf5d84d1957aaf23783be84053e40f | [
"MIT"
] | null | null | null | envoy/examples/puma-proxy/internal_lib/backend/netflix/database_connect.py | kevinjesse/puma | 163a363275bf5d84d1957aaf23783be84053e40f | [
"MIT"
] | null | null | null | envoy/examples/puma-proxy/internal_lib/backend/netflix/database_connect.py | kevinjesse/puma | 163a363275bf5d84d1957aaf23783be84053e40f | [
"MIT"
] | null | null | null | #
# @author Kevin Jesse
# @email kevin.r.jesse@gmail.com
#
"""
Database Connect serves to connect to the database postgres, as the master user. Autocommit has been turned on so
all inserts, updates, and deletes will be enforced atomically
"""
import psycopg2 | 30.909091 | 125 | 0.695588 |
3fa903d69a123b3bf76665218092b5512ddf68eb | 6,590 | py | Python | tests/integration_tests/data_steward/cdr_cleaner/cleaning_rules/remove_participants_under_18years_test.py | lrwb-aou/curation | e80447e56d269dc2c9c8bc79e78218d4b0dc504c | [
"MIT"
] | 16 | 2017-06-30T20:05:05.000Z | 2022-03-08T21:03:19.000Z | tests/integration_tests/data_steward/cdr_cleaner/cleaning_rules/remove_participants_under_18years_test.py | lrwb-aou/curation | e80447e56d269dc2c9c8bc79e78218d4b0dc504c | [
"MIT"
] | 342 | 2017-06-23T21:37:40.000Z | 2022-03-30T16:44:16.000Z | tests/integration_tests/data_steward/cdr_cleaner/cleaning_rules/remove_participants_under_18years_test.py | lrwb-aou/curation | e80447e56d269dc2c9c8bc79e78218d4b0dc504c | [
"MIT"
] | 33 | 2017-07-01T00:12:20.000Z | 2022-01-26T18:06:53.000Z | """
Integration test for remove_participants_under_18years module
Original Issues: DC-1724
The intent is to remove data for participants under 18 years old from all the domain tables."""
# Python Imports
import os
import datetime
# Project Imports
from common import VISIT_OCCURRENCE, OBSERVATION
from common import... | 42.792208 | 113 | 0.579363 |
3fa9343aaf14f40f21e088d8570e50cd71a50d99 | 609 | py | Python | exercises/en/solution_08_15.py | Lavendulaa/programming-in-python-for-data-science | bc41da8afacf4c180ae0ff9c6dc26a7e6292252f | [
"MIT"
] | 1 | 2020-06-26T20:15:44.000Z | 2020-06-26T20:15:44.000Z | exercises/en/solution_08_15.py | Lavendulaa/programming-in-python-for-data-science | bc41da8afacf4c180ae0ff9c6dc26a7e6292252f | [
"MIT"
] | 20 | 2020-06-15T23:05:20.000Z | 2020-09-01T22:07:45.000Z | exercises/en/solution_08_15.py | UBC-MDS/MCL-programming-in-python | 22836d9013d3e3d1b1074678ba7dc3ee2e66f398 | [
"MIT"
] | 1 | 2020-05-09T03:49:02.000Z | 2020-05-09T03:49:02.000Z | import pandas as pd
canucks = pd.read_csv('data/canucks.csv')
# Identify any columns with null values with .info()
# Save this dataframe as canucks_info
canucks_info = canucks.info()
canucks_info
# Create a new column in the dataframe named Wealth
# where all the values equal "comfortable"
# Name the new dataframe ... | 27.681818 | 78 | 0.770115 |
3faaaf65e1a880fbb043da470d287b3c90f587fb | 1,412 | py | Python | 题源分类/LeetCode/LeetCode日刷/python/461.汉明距离.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | 题源分类/LeetCode/LeetCode日刷/python/461.汉明距离.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | 题源分类/LeetCode/LeetCode日刷/python/461.汉明距离.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode.cn id=461 lang=python3
#
# [461]
#
# https://leetcode-cn.com/problems/hamming-distance/description/
#
# algorithms
# Easy (79.21%)
# Likes: 459
# Dislikes: 0
# Total Accepted: 137K
# Total Submissions: 170K
# Testcase Example: '1\n4'
#
#
#
# x y
#
#
# 0 x, y < 2^31.
#
# :
#
#
# : ... | 18.578947 | 64 | 0.431303 |
3fab256836e3c2695afaebffbd3e344034438d33 | 4,413 | py | Python | emissionsapi/db.py | brennerm/emissions-api | 577fa209ffd27476ff1ad0904ecc081564cf8f53 | [
"MIT"
] | null | null | null | emissionsapi/db.py | brennerm/emissions-api | 577fa209ffd27476ff1ad0904ecc081564cf8f53 | [
"MIT"
] | null | null | null | emissionsapi/db.py | brennerm/emissions-api | 577fa209ffd27476ff1ad0904ecc081564cf8f53 | [
"MIT"
] | null | null | null | """Database Layer for the Emmission API.
"""
from functools import wraps
from sqlalchemy import create_engine, Column, DateTime, Integer, Float, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import geoalchemy2
from emissionsapi.config import config
import emi... | 30.226027 | 78 | 0.686155 |
3fabfef911568657e72bad1d7f657b6017f3f593 | 2,217 | py | Python | cmdb/views.py | proffalken/edison | 5bfa941f8876cb8698cd8009c4514bc03d24c109 | [
"BSD-3-Clause"
] | 3 | 2015-11-05T07:29:00.000Z | 2021-06-17T23:44:17.000Z | cmdb/views.py | proffalken/edison | 5bfa941f8876cb8698cd8009c4514bc03d24c109 | [
"BSD-3-Clause"
] | 1 | 2016-05-04T10:54:48.000Z | 2016-05-04T10:54:56.000Z | cmdb/views.py | proffalken/edison | 5bfa941f8876cb8698cd8009c4514bc03d24c109 | [
"BSD-3-Clause"
] | null | null | null | # This file is part of the Edison Project.
# Please refer to the LICENSE document that was supplied with this software for information on how it can be used.
# Create your views here.
from django.http import Http404, HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from django.template im... | 36.344262 | 162 | 0.722598 |
3fac52a8d1c05423e274506bc3a7a1b6ae3c1a67 | 553 | py | Python | setup.py | williamgilpin/pypdb_legacy | 5c0586128415ec64804d17dd3efa0a4e52b64734 | [
"MIT"
] | null | null | null | setup.py | williamgilpin/pypdb_legacy | 5c0586128415ec64804d17dd3efa0a4e52b64734 | [
"MIT"
] | null | null | null | setup.py | williamgilpin/pypdb_legacy | 5c0586128415ec64804d17dd3efa0a4e52b64734 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name = 'pypdb',
packages = ['pypdb'], # same as 'name'
version = '1.310',
install_requires=[
'xmltodict',
'beautifulsoup4',
'requests'
],
description = 'A Python wrapper for the RCSB Protein Data Bank (PDB) API',
author = 'William Gilpin',
author_... | 26.333333 | 76 | 0.652803 |
3fac820670f21ea8c46cbcd7d979941dd6e7c18a | 409,678 | py | Python | 3algo/homo/1_10_10datap.py | allengrr/deadlock_project | 933878077c45a7df04daa087407bb2620c064617 | [
"MIT"
] | null | null | null | 3algo/homo/1_10_10datap.py | allengrr/deadlock_project | 933878077c45a7df04daa087407bb2620c064617 | [
"MIT"
] | null | null | null | 3algo/homo/1_10_10datap.py | allengrr/deadlock_project | 933878077c45a7df04daa087407bb2620c064617 | [
"MIT"
] | 1 | 2021-03-21T17:54:26.000Z | 2021-03-21T17:54:26.000Z |
wt1_10_10 = {'192.168.122.110': [5.5754, 5.5952, 9.2422, 8.5338, 9.0058, 8.4025, 8.7557, 8.4405, 8.1397, 8.1318, 8.0657, 7.8501, 8.1701, 8.0757, 7.8899, 7.7329, 7.6153, 7.9967, 7.9363, 7.838, 8.7936, 8.6351, 8.5151, 8.6381, 8.7262, 8.816, 8.8984, 8.7799, 8.8584, 8.9543, 8.8833, 8.794, 8.6935, 8.735, 8.635, 8.5429, 8.6... | 25,604.875 | 386,495 | 0.620085 |
3facb12be8784f2c2576c973d9abccef35b78a25 | 940 | py | Python | awwards/urls.py | cossie14/slyawwards | 8babb043843dee836644b311809c5c1727e1de69 | [
"MIT"
] | null | null | null | awwards/urls.py | cossie14/slyawwards | 8babb043843dee836644b311809c5c1727e1de69 | [
"MIT"
] | 4 | 2021-03-19T03:24:59.000Z | 2021-09-08T01:16:07.000Z | awwards/urls.py | cossie14/slyawwards | 8babb043843dee836644b311809c5c1727e1de69 | [
"MIT"
] | null | null | null |
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls import include,url
from . import views
urlpatterns=[
url(r'api/user/user-id/(?P<pk>[0-9]+)/$',
views.UserDescription.as_view()),
url(r'api/project/project-id/(?P<pk>[0-9]+)/$',
views.ProjectDesc... | 33.571429 | 81 | 0.667021 |
3faf19d3bce07009761ea272b335839c3b750a3e | 3,485 | py | Python | webinar_part_2/2.0_nxos_existing_with_netbox/setup.py | Miradot/webinar | d6f4b54477e2dabf856406d65ad585c98066bc2f | [
"MIT"
] | 1 | 2021-12-21T21:20:48.000Z | 2021-12-21T21:20:48.000Z | webinar_part_2/2.0_nxos_existing_with_netbox/setup.py | Miradot/webinar | d6f4b54477e2dabf856406d65ad585c98066bc2f | [
"MIT"
] | null | null | null | webinar_part_2/2.0_nxos_existing_with_netbox/setup.py | Miradot/webinar | d6f4b54477e2dabf856406d65ad585c98066bc2f | [
"MIT"
] | null | null | null | import yaml
import argparse
from ansible_vault import Vault
if __name__ == '__main__':
main()
| 37.880435 | 115 | 0.631564 |
3fb0b9f6019a06b844fd3dd799c2b173e97e1ff6 | 448 | py | Python | Core/solar/performance_ratio.py | ncatunda/hive | 721731ce83c9ccd4ff1db224824a234035fbcd30 | [
"MIT"
] | null | null | null | Core/solar/performance_ratio.py | ncatunda/hive | 721731ce83c9ccd4ff1db224824a234035fbcd30 | [
"MIT"
] | null | null | null | Core/solar/performance_ratio.py | ncatunda/hive | 721731ce83c9ccd4ff1db224824a234035fbcd30 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
The data is (should be) based on the lecture Energie und Klimasysteme II,
Erneuerbare Energieerzeugung am Gebude, FS 2019, Folie 30,
"""
from __future__ import print_function
| 37.333333 | 74 | 0.705357 |
3fb1e5989581de8b3d3c0c1f32458f03c00fd7bf | 2,901 | py | Python | tests/e2e/process_chm15k/tests.py | actris-cloudnet/data-processing | 8ab6fccd5cf48e10e985addcf339b9698a9b09cd | [
"MIT"
] | null | null | null | tests/e2e/process_chm15k/tests.py | actris-cloudnet/data-processing | 8ab6fccd5cf48e10e985addcf339b9698a9b09cd | [
"MIT"
] | 5 | 2020-08-27T12:34:08.000Z | 2021-09-28T14:49:20.000Z | tests/e2e/process_chm15k/tests.py | actris-cloudnet/data-processing | 8ab6fccd5cf48e10e985addcf339b9698a9b09cd | [
"MIT"
] | null | null | null | import netCDF4
from os import path
from test_utils.utils import count_strings, read_log_file
import pytest
SCRIPT_PATH = path.dirname(path.realpath(__file__))
| 32.595506 | 122 | 0.641848 |
3fb2a77029f3ade78cfb9fb154c1aca159746d1e | 1,371 | py | Python | type_page/models.py | dumel93/project- | f9ad52d9c8449953e2151fd1c13b39631113eea7 | [
"MIT"
] | null | null | null | type_page/models.py | dumel93/project- | f9ad52d9c8449953e2151fd1c13b39631113eea7 | [
"MIT"
] | null | null | null | type_page/models.py | dumel93/project- | f9ad52d9c8449953e2151fd1c13b39631113eea7 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db import models
from .validators import validate_bet, validate_course
| 33.439024 | 94 | 0.66229 |
3fb31909a92b7362c0a031af95a6855ca677513e | 759 | py | Python | applications/pytorch/cnns/utils/distributed.py | kew96/GraphcoreExamples | 22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb | [
"MIT"
] | null | null | null | applications/pytorch/cnns/utils/distributed.py | kew96/GraphcoreExamples | 22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb | [
"MIT"
] | null | null | null | applications/pytorch/cnns/utils/distributed.py | kew96/GraphcoreExamples | 22dc0d7e3755b0a7f16cdf694c6d10c0f91ee8eb | [
"MIT"
] | null | null | null | # Copyright (c) 2021 Graphcore Ltd. All rights reserved.
import logging
import popdist
import popdist.poptorch
import horovod.torch as hvd
| 30.36 | 122 | 0.732543 |
3fb348a99aed4f8624038b9f92d6819ccde7fa22 | 589 | py | Python | aiohttp_apispec/decorators/__init__.py | maksimvrs/aiohttp-apispec | 186e354ce244ccc4b36999bca56a9d8ca41e63d0 | [
"MIT"
] | null | null | null | aiohttp_apispec/decorators/__init__.py | maksimvrs/aiohttp-apispec | 186e354ce244ccc4b36999bca56a9d8ca41e63d0 | [
"MIT"
] | null | null | null | aiohttp_apispec/decorators/__init__.py | maksimvrs/aiohttp-apispec | 186e354ce244ccc4b36999bca56a9d8ca41e63d0 | [
"MIT"
] | null | null | null | from .docs import docs
from .request import (
request_schema,
use_kwargs, # for backward compatibility
path_schema, # request_schema with locations=["path"]
querystring_schema, # request_schema with locations=["querystring"]
form_schema, # request_schema with locations=["form"]
json_schema, ... | 36.8125 | 72 | 0.730051 |
3fb43581afcabab87376ae372e835742ac18f05a | 1,943 | py | Python | tests/api/v1/test_tags.py | redhat-cip/dci-control-server | 6dee30e7b8770fde2466f2b09554d299a3f3db4d | [
"Apache-2.0"
] | 17 | 2016-09-02T09:21:29.000Z | 2021-09-27T11:33:58.000Z | tests/api/v1/test_tags.py | redhat-cip/dci-control-server | 6dee30e7b8770fde2466f2b09554d299a3f3db4d | [
"Apache-2.0"
] | 80 | 2015-12-09T09:29:26.000Z | 2021-01-06T08:24:22.000Z | tests/api/v1/test_tags.py | redhat-cip/dci-control-server | 6dee30e7b8770fde2466f2b09554d299a3f3db4d | [
"Apache-2.0"
] | 10 | 2015-09-29T21:34:53.000Z | 2021-09-27T11:34:01.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Red Hat, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 30.84127 | 75 | 0.654658 |
3fb4a33534aa6e53058ff51d1739c3dcfd4acdde | 4,355 | py | Python | graypy/rabbitmq.py | bakkerd/graypy | e2782c7a5174c7c5f1006ff444f6d59487ef3c7f | [
"BSD-3-Clause"
] | null | null | null | graypy/rabbitmq.py | bakkerd/graypy | e2782c7a5174c7c5f1006ff444f6d59487ef3c7f | [
"BSD-3-Clause"
] | null | null | null | graypy/rabbitmq.py | bakkerd/graypy | e2782c7a5174c7c5f1006ff444f6d59487ef3c7f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Logging Handler integrating RabbitMQ and
Graylog Extended Log Format (GELF)"""
import json
from logging import Filter
from logging.handlers import SocketHandler
from amqplib import client_0_8 as amqp # pylint: disable=import-error
from graypy.handler import BaseGELF... | 31.330935 | 79 | 0.622503 |
3fb6cccbe58ab4aa99341ff7ff29997ad198d655 | 1,323 | py | Python | workmail-translate-email/src/translate_helper.py | zjt/amazon-workmail-lambda-templates | 27bcdee78634527c11c5083ecdc67360295a99e0 | [
"Apache-2.0"
] | 31 | 2019-02-20T04:52:45.000Z | 2022-03-28T14:55:27.000Z | workmail-translate-email/src/translate_helper.py | zjt/amazon-workmail-lambda-templates | 27bcdee78634527c11c5083ecdc67360295a99e0 | [
"Apache-2.0"
] | 4 | 2021-06-29T16:21:16.000Z | 2021-09-17T22:58:52.000Z | workmail-translate-email/src/translate_helper.py | zjt/amazon-workmail-lambda-templates | 27bcdee78634527c11c5083ecdc67360295a99e0 | [
"Apache-2.0"
] | 16 | 2019-02-21T13:27:10.000Z | 2021-12-25T18:49:13.000Z | import boto3
comprehend = boto3.client(service_name='comprehend')
translate = boto3.client(service_name='translate')
def detect_language(text):
"""
Detects the dominant language in a text
Parameters
----------
text: string, required
Input text
Returns
-------
string
Rep... | 29.4 | 94 | 0.665155 |
3fb7186eaada6a7909f15b3f783b895109917928 | 3,768 | py | Python | mylearner.py | USC-MCL/Func-Pool | 20c43df0eb2da68d8d2e01c03d66a1a4e4e06081 | [
"MIT"
] | 3 | 2020-01-24T19:03:44.000Z | 2021-04-13T17:22:36.000Z | mylearner.py | USC-MCL/Func-Pool | 20c43df0eb2da68d8d2e01c03d66a1a4e4e06081 | [
"MIT"
] | null | null | null | mylearner.py | USC-MCL/Func-Pool | 20c43df0eb2da68d8d2e01c03d66a1a4e4e06081 | [
"MIT"
] | 3 | 2020-01-24T19:03:45.000Z | 2020-04-13T08:27:13.000Z | # 2020.05.10
# update topNscore
# learner on subspace
# particular designed for encounter missing class in this subspace
# if one class do not exists in training data, probability for this class would be zeros under anytime
#
# learner: a regressor or classifier, must have methods named 'predict'
# num_class: tota... | 36.582524 | 112 | 0.551221 |
3fb92b9dfc88175ad72437eeb1e0e07300b64bc1 | 1,077 | py | Python | pritunl_wireguard_client/utils/token.py | SuperBo/pritunl-wireguard-cient | bed4407bf2b7811f7180d72446a2dc26d45db90d | [
"MIT"
] | 1 | 2021-02-16T07:08:46.000Z | 2021-02-16T07:08:46.000Z | pritunl_wireguard_client/utils/token.py | SuperBo/pritunl-wireguard-cient | bed4407bf2b7811f7180d72446a2dc26d45db90d | [
"MIT"
] | 1 | 2022-02-08T13:34:18.000Z | 2022-02-08T13:34:18.000Z | pritunl_wireguard_client/utils/token.py | SuperBo/pritunl-wireguard-cient | bed4407bf2b7811f7180d72446a2dc26d45db90d | [
"MIT"
] | 1 | 2021-03-18T14:34:41.000Z | 2021-03-18T14:34:41.000Z | import time
import pritunl_wireguard_client.utils.random as utils
| 27.615385 | 53 | 0.557103 |
3fb9b92107c88b93e0868bfec40b6ae263c31ca9 | 16,812 | py | Python | github_util.py | dglo/svn2git_tools | 72aea47d801c7c674e4fe9f053a613ef88fc38c4 | [
"BSD-3-Clause"
] | null | null | null | github_util.py | dglo/svn2git_tools | 72aea47d801c7c674e4fe9f053a613ef88fc38c4 | [
"BSD-3-Clause"
] | null | null | null | github_util.py | dglo/svn2git_tools | 72aea47d801c7c674e4fe9f053a613ef88fc38c4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
from __future__ import print_function
import getpass
import os
import shutil
import time
from datetime import datetime
from github import Github, GithubException, GithubObject
from git import git_init
| 35.171548 | 79 | 0.583393 |
3fba31ce0598188d4268a711f23cf7223b613738 | 2,299 | py | Python | moabb/analysis/__init__.py | plcrodrigues/moabb | aa4274fe7905631864e854c121c92e1927061f29 | [
"BSD-3-Clause"
] | 321 | 2017-06-03T16:14:45.000Z | 2022-03-28T17:43:59.000Z | moabb/analysis/__init__.py | plcrodrigues/moabb | aa4274fe7905631864e854c121c92e1927061f29 | [
"BSD-3-Clause"
] | 223 | 2017-06-03T17:41:57.000Z | 2022-03-29T09:07:44.000Z | moabb/analysis/__init__.py | girafe-ai/moabb | 78bbb48a2a0058b0725ebeba1ba1e3203f0eacd5 | [
"BSD-3-Clause"
] | 118 | 2017-06-03T18:36:35.000Z | 2022-03-16T06:22:02.000Z | import logging
import os
import platform
from datetime import datetime
from moabb.analysis import plotting as plt
from moabb.analysis.meta_analysis import ( # noqa: E501
compute_dataset_statistics,
find_significant_differences,
)
from moabb.analysis.results import Results # noqa: F401
log = logging.getLogg... | 32.380282 | 82 | 0.68769 |
3fba37decae8c7ead3f5cde9a2d0f4e93d890495 | 2,180 | py | Python | smm/lemm/numba_optimisations.py | jamesthomasgriffin/smm | 5f1f6432e17f84f7f793d60cb9831ac5c79991e6 | [
"BSD-3-Clause"
] | 2 | 2019-10-17T15:33:13.000Z | 2020-01-16T10:05:36.000Z | smm/lemm/numba_optimisations.py | jamesthomasgriffin/smm | 5f1f6432e17f84f7f793d60cb9831ac5c79991e6 | [
"BSD-3-Clause"
] | null | null | null | smm/lemm/numba_optimisations.py | jamesthomasgriffin/smm | 5f1f6432e17f84f7f793d60cb9831ac5c79991e6 | [
"BSD-3-Clause"
] | 1 | 2020-01-16T10:06:10.000Z | 2020-01-16T10:06:10.000Z | from numba import guvectorize, float64, int64, njit
import numpy as np
from smm import numba_target as target_preset
| 31.142857 | 77 | 0.509633 |
3fba7d34fac65f02b80c4c96594e7743e1629ab8 | 783 | py | Python | exercices_todo/duplicates_find.py | AntonioIonica/Automation_testing | 6f7c94c55677b0958e6fada24058f1a00d2c0d0e | [
"MIT"
] | null | null | null | exercices_todo/duplicates_find.py | AntonioIonica/Automation_testing | 6f7c94c55677b0958e6fada24058f1a00d2c0d0e | [
"MIT"
] | null | null | null | exercices_todo/duplicates_find.py | AntonioIonica/Automation_testing | 6f7c94c55677b0958e6fada24058f1a00d2c0d0e | [
"MIT"
] | null | null | null | """
How to find only the duplicates
"""
some_list = ['a', 'b', 'c', 'b', 'd', 'm', 'n', 'n']
duplicates = [] # o noua lista unde adaugam duplicatele
for value in some_list:
if some_list.count(value) > 1: # cand in lista numaram fiecare valoarea si se gaseste mai mult de o data
if value not in duplicates... | 35.590909 | 117 | 0.664112 |
3fba885aa5f0287571e2d253dd5d007fd48c35d4 | 588 | py | Python | ethgasstation.py | ethgasstation/ethgasstation-adaptive-oracle | e5983adfa0cb8cd0c3952aa6a9869e9f402156b9 | [
"MIT"
] | 47 | 2017-12-08T02:02:19.000Z | 2018-01-06T10:30:56.000Z | ethgasstation.py | ethgasstation/ethgasstation-adaptive-oracle | e5983adfa0cb8cd0c3952aa6a9869e9f402156b9 | [
"MIT"
] | 11 | 2017-12-08T08:03:56.000Z | 2018-01-06T23:39:32.000Z | ethgasstation.py | ethgasstation/ethgasstation-adaptive-oracle | e5983adfa0cb8cd0c3952aa6a9869e9f402156b9 | [
"MIT"
] | 7 | 2017-12-08T07:27:18.000Z | 2018-01-06T04:06:46.000Z | #!/usr/bin/env python3
"""
ETH Gas Station
Primary backend.
"""
import argparse
from egs.main import master_control
from egs.output import Output
def main():
"""Parse command line options."""
parser = argparse.ArgumentParser(description="An adaptive gas price oracle for Ethereum.")
parser.add_argu... | 23.52 | 118 | 0.693878 |
3fbafb8b47bed64f592d7b2645ff31b682526b8a | 3,675 | py | Python | app/tests/controls/tests_template_helpers.py | madussault/FlaskyPress | 677bfbb3473a239c08d9e120e959d3e31c456964 | [
"MIT"
] | null | null | null | app/tests/controls/tests_template_helpers.py | madussault/FlaskyPress | 677bfbb3473a239c08d9e120e959d3e31c456964 | [
"MIT"
] | null | null | null | app/tests/controls/tests_template_helpers.py | madussault/FlaskyPress | 677bfbb3473a239c08d9e120e959d3e31c456964 | [
"MIT"
] | null | null | null | """Contains tests for the functions found in ``controls/templates_helpers.py``
To run this particular test file use the following command line:
nose2 -v app.tests.controls.tests_template_helpers
"""
from app import db, create_app
import unittest
from unittest import TestCase
from config import Config
from app.tests.u... | 37.121212 | 79 | 0.628844 |
3fbbc3f8ef8d51546060cccaf53257878c60d288 | 2,299 | py | Python | MAModule/networks/predict.py | MrReochen/MultiAgentModule | 20216dee265501f09fba7b73fafdbef63b297725 | [
"MIT"
] | null | null | null | MAModule/networks/predict.py | MrReochen/MultiAgentModule | 20216dee265501f09fba7b73fafdbef63b297725 | [
"MIT"
] | null | null | null | MAModule/networks/predict.py | MrReochen/MultiAgentModule | 20216dee265501f09fba7b73fafdbef63b297725 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from ..networks.basic.util import check
from ..networks.basic.predict import PredictNet, PredictLayer, OutLayer
from ..utils.util import get_shape_from_obs_space | 34.833333 | 104 | 0.646368 |
3fbbd88b176cdd6b237953ffa51d4f9d25ca08a8 | 1,431 | py | Python | repositories/gae/blob_dataset.py | singhj/locality-sensitive-hashing | 99baa87d3b532ba5aa03fd80ed967275eb98d422 | [
"MIT"
] | 19 | 2015-02-22T15:47:33.000Z | 2020-10-19T12:29:24.000Z | repositories/gae/blob_dataset.py | singhj/locality-sensitive-hashing | 99baa87d3b532ba5aa03fd80ed967275eb98d422 | [
"MIT"
] | 7 | 2015-02-10T10:52:06.000Z | 2019-04-01T15:27:00.000Z | repositories/gae/blob_dataset.py | singhj/locality-sensitive-hashing | 99baa87d3b532ba5aa03fd80ed967275eb98d422 | [
"MIT"
] | 7 | 2015-02-23T19:22:11.000Z | 2022-02-04T10:27:15.000Z | from google.appengine.ext import ndb
from repositories.gae.dataset import Dataset
from repositories.gae.dataset import calculate_max_hashes, get_random_bits | 34.902439 | 74 | 0.566038 |
3fbcfad926cc78ab95112a6eecc4dc811aaf6f09 | 1,394 | py | Python | wetrunner/tests/test_evmat.py | DavidMStraub/python-wetrunner | be9549535aab3a00e496002a515c647d112ea090 | [
"MIT"
] | null | null | null | wetrunner/tests/test_evmat.py | DavidMStraub/python-wetrunner | be9549535aab3a00e496002a515c647d112ea090 | [
"MIT"
] | 4 | 2018-01-11T10:29:16.000Z | 2018-04-12T15:36:20.000Z | wetrunner/tests/test_evmat.py | DavidMStraub/python-wetrunner | be9549535aab3a00e496002a515c647d112ea090 | [
"MIT"
] | 2 | 2018-01-11T10:20:55.000Z | 2018-03-07T22:13:34.000Z | """Compare evolution matrices to v0.1 numerics"""
import wetrunner
import unittest
from pkg_resources import resource_filename
import numpy as np
import numpy.testing as npt
| 39.828571 | 91 | 0.553085 |
3fbfff6f4fb61ab0d9c6aaa91429d122a201c789 | 4,310 | py | Python | python/clockwork/ena/submit_files.py | jeff-k/clockwork | d6e9ac80bb46ec806acd7db85ed5c3430c3f2438 | [
"MIT"
] | 18 | 2018-01-18T13:02:10.000Z | 2022-03-25T05:56:02.000Z | python/clockwork/ena/submit_files.py | jeff-k/clockwork | d6e9ac80bb46ec806acd7db85ed5c3430c3f2438 | [
"MIT"
] | 54 | 2018-01-25T15:47:25.000Z | 2022-03-30T17:02:23.000Z | python/clockwork/ena/submit_files.py | jeff-k/clockwork | d6e9ac80bb46ec806acd7db85ed5c3430c3f2438 | [
"MIT"
] | 15 | 2018-01-18T11:21:33.000Z | 2022-03-30T16:55:48.000Z | import configparser
import random
import string
from clockwork import utils
| 31.459854 | 148 | 0.615777 |
3fc20da9e836148d0b5e35676fbdec51d080a74c | 3,350 | py | Python | tools/add_new_quantization_parameters.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | 310 | 2020-10-29T09:22:42.000Z | 2022-03-31T04:53:34.000Z | tools/add_new_quantization_parameters.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | 615 | 2020-10-28T10:22:25.000Z | 2022-03-29T18:09:23.000Z | tools/add_new_quantization_parameters.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | 86 | 2020-10-28T11:34:34.000Z | 2022-03-31T08:00:35.000Z | """
Copyright (c) 2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | 37.222222 | 118 | 0.638507 |
3fc217a661811f79c1778a9b4610e13c10ae7b95 | 1,106 | py | Python | src/backend/marsha/core/migrations/0019_auto_20200609_0820.py | marin-leonard/marsha | b5d6bf98fda27acd3a08577b82dd98bcd39bfd8d | [
"MIT"
] | 64 | 2018-04-26T23:46:14.000Z | 2022-03-26T21:32:23.000Z | src/backend/marsha/core/migrations/0019_auto_20200609_0820.py | marin-leonard/marsha | b5d6bf98fda27acd3a08577b82dd98bcd39bfd8d | [
"MIT"
] | 533 | 2018-04-17T10:17:24.000Z | 2022-03-31T13:07:49.000Z | src/backend/marsha/core/migrations/0019_auto_20200609_0820.py | marin-leonard/marsha | b5d6bf98fda27acd3a08577b82dd98bcd39bfd8d | [
"MIT"
] | 16 | 2018-09-21T12:52:34.000Z | 2021-11-29T16:44:51.000Z | # Generated by Django 3.0.6 on 2020-05-19 14:32
from django.db import migrations, models
| 26.97561 | 72 | 0.454792 |
3fc23e96afc2ac687938892c8fa39f0756c775dd | 11,766 | py | Python | models/video_base.py | vedaldi/dynamic-video-depth | 274f5f59604a10121a2445f7b30df4a9ff075946 | [
"Apache-2.0"
] | 1 | 2022-03-24T23:59:26.000Z | 2022-03-24T23:59:26.000Z | models/video_base.py | vedaldi/dynamic-video-depth | 274f5f59604a10121a2445f7b30df4a9ff075946 | [
"Apache-2.0"
] | null | null | null | models/video_base.py | vedaldi/dynamic-video-depth | 274f5f59604a10121a2445f7b30df4a9ff075946 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 40.996516 | 167 | 0.586011 |
3fc28ee2166df5c930e27ec1974997e4a8df5d90 | 1,232 | py | Python | update-tuya-address.py | mwinters-stuff/octoprint-update-tuya-address | 6b4f95613d573eb45af2de936615d75dfd01a77b | [
"Apache-2.0"
] | null | null | null | update-tuya-address.py | mwinters-stuff/octoprint-update-tuya-address | 6b4f95613d573eb45af2de936615d75dfd01a77b | [
"Apache-2.0"
] | null | null | null | update-tuya-address.py | mwinters-stuff/octoprint-update-tuya-address | 6b4f95613d573eb45af2de936615d75dfd01a77b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import subprocess
import yaml
try:
from yaml import CLoader as Loader, CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper
#MAC address of the smart plug
MAC_ADDRESS = '84:f3:eb:32:e3:b4'
# netmask of your network
NET_MASK = '192.168.1.1/24'
#octopi config
OCTOPI_CONFIG = ... | 31.589744 | 84 | 0.660714 |
3fc2b905de175376e48fc847adcd762ca15c7b7a | 2,571 | py | Python | sarpy_gui_apps/apps/canvas_demo/panels/canvas_demo_button_panel.py | spowlas/sarpy | c4a404203607d404b93a556459aa5311d7148e95 | [
"MIT"
] | null | null | null | sarpy_gui_apps/apps/canvas_demo/panels/canvas_demo_button_panel.py | spowlas/sarpy | c4a404203607d404b93a556459aa5311d7148e95 | [
"MIT"
] | 1 | 2019-11-14T20:55:57.000Z | 2019-12-27T18:11:29.000Z | sarpy_gui_apps/apps/canvas_demo/panels/canvas_demo_button_panel.py | spowlas/sarpy | c4a404203607d404b93a556459aa5311d7148e95 | [
"MIT"
] | 2 | 2020-02-12T20:11:00.000Z | 2020-03-26T16:55:03.000Z | from tkinter_gui_builder.panel_templates.widget_panel.widget_panel import AbstractWidgetPanel
from tkinter_gui_builder.widgets import basic_widgets
if __name__ == '__main__':
print(dir(AbstractWidgetPanel))
| 40.171875 | 93 | 0.552703 |
3fc57348ab10be442b6950d805f656ab0d9bf881 | 1,360 | py | Python | GCN/test_until.py | Alienge/Graph-Network | 559cccb6af4e6ca50c44fd51cac8df5713f255bf | [
"MIT"
] | 3 | 2020-06-10T03:29:11.000Z | 2020-10-21T09:03:13.000Z | GCN/test_until.py | Alienge/Graph-Network | 559cccb6af4e6ca50c44fd51cac8df5713f255bf | [
"MIT"
] | null | null | null | GCN/test_until.py | Alienge/Graph-Network | 559cccb6af4e6ca50c44fd51cac8df5713f255bf | [
"MIT"
] | 1 | 2020-06-25T06:15:28.000Z | 2020-06-25T06:15:28.000Z | import torch
import numpy as np
import scipy.sparse as sp
def sparse_to_tuple(sparse_mx):
"""Convert sparse matrix to tuple representation."""
if isinstance(sparse_mx, list):
for i in range(len(sparse_mx)):
sparse_mx[i] = to_tuple(sparse_mx[i])
else:
sparse_mx = to_tuple(sparse_... | 17.894737 | 58 | 0.609559 |
3fc7b2fa4d7d1bb8ba7c895d8420a155ae6e1ca0 | 5,056 | py | Python | mechmean/fabric_tensors.py | JulianKarlBauer/meanfieldmechanics | a53b38655d0e9558cc3e676c359fa13dfe3d9112 | [
"MIT"
] | null | null | null | mechmean/fabric_tensors.py | JulianKarlBauer/meanfieldmechanics | a53b38655d0e9558cc3e676c359fa13dfe3d9112 | [
"MIT"
] | null | null | null | mechmean/fabric_tensors.py | JulianKarlBauer/meanfieldmechanics | a53b38655d0e9558cc3e676c359fa13dfe3d9112 | [
"MIT"
] | 1 | 2022-02-25T19:37:20.000Z | 2022-02-25T19:37:20.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
import mechkit
import mechmean
def evenly_distributed_vectors_on_sphere(nbr_vectors=1000):
"""
Define nbr_vectors evenly distributed vectors on a sphere
Using the golden spiral method kindly provided by
stackoverflow-user "CR Drost"
... | 28.727273 | 88 | 0.548655 |
3fc90063242679a163aee4c95d494aed3302ce11 | 961 | py | Python | setup.py | adamltyson/fancylog | 8e9047759d5c394e98b5af7c2d68f70f2fbeb40e | [
"MIT"
] | 3 | 2020-09-30T09:02:08.000Z | 2021-06-12T20:43:43.000Z | setup.py | adamltyson/fancylog | 8e9047759d5c394e98b5af7c2d68f70f2fbeb40e | [
"MIT"
] | 8 | 2020-01-07T11:27:05.000Z | 2021-07-13T11:07:11.000Z | setup.py | adamltyson/fancylog | 8e9047759d5c394e98b5af7c2d68f70f2fbeb40e | [
"MIT"
] | 2 | 2020-02-05T19:03:04.000Z | 2021-07-07T09:42:24.000Z | from setuptools import setup, find_packages
setup(
name="fancylog",
version="0.2.6",
description="Fancier logging in Python",
install_requires=["packaging", "rich"],
extras_require={
"dev": [
"black",
"pytest-cov",
"pytest",
"coverage",
... | 26.694444 | 49 | 0.552549 |
3fc96ed41bb550e4bca1d28b2bc1be7197a1cd5d | 5,620 | py | Python | tests/test_identity.py | multiscale/ymmsl-python | f8a63232823ad655530a83570443d9c045ef9929 | [
"Apache-2.0"
] | 1 | 2018-12-13T18:09:09.000Z | 2018-12-13T18:09:09.000Z | tests/test_identity.py | multiscale/ymmsl-python | f8a63232823ad655530a83570443d9c045ef9929 | [
"Apache-2.0"
] | 10 | 2018-11-13T16:12:38.000Z | 2021-07-21T13:16:43.000Z | tests/test_identity.py | multiscale/ymmsl-python | f8a63232823ad655530a83570443d9c045ef9929 | [
"Apache-2.0"
] | null | null | null | from ymmsl import Identifier, Reference
import pytest
import yatiml
| 30.053476 | 79 | 0.637011 |
3fc9e66e2e4c81e88a2f6282ca33a85ca40e0ad7 | 1,262 | py | Python | molecule/loadbalancer/tests/test_default.py | mvdheenux/OpenConext-deploy | 9c75866cba7675cafa8946e591ffac0fe528f7b3 | [
"Apache-2.0"
] | 11 | 2015-07-05T10:38:10.000Z | 2019-06-27T07:49:32.000Z | molecule/loadbalancer/tests/test_default.py | mvdheenux/OpenConext-deploy | 9c75866cba7675cafa8946e591ffac0fe528f7b3 | [
"Apache-2.0"
] | 201 | 2015-02-03T14:52:30.000Z | 2022-03-09T08:45:00.000Z | molecule/loadbalancer/tests/test_default.py | domgon/OpenConext-deploy | 80b28f59bdef2ac683744c07bb938c889cb43681 | [
"Apache-2.0"
] | 48 | 2015-03-10T13:28:23.000Z | 2021-11-28T23:15:32.000Z | import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_sysctl_non_local_bind(host):
non_local_bind = host.sysctl("net.ipv4.ip_nonlocal_bind")
assert non_local_bind =... | 26.291667 | 71 | 0.717116 |
3fca93e41547a1ae70fbe0d1268f42c02b9128db | 4,237 | py | Python | tiledb/cloud/_results/results.py | TileDB-Inc/TileDB-Cloud-Py | e73f6e0ae3fc595218abd3be606c68f62ad5ac9b | [
"MIT"
] | 4 | 2019-12-04T23:19:35.000Z | 2021-06-21T21:42:53.000Z | tiledb/cloud/_results/results.py | TileDB-Inc/TileDB-Cloud-Py | e73f6e0ae3fc595218abd3be606c68f62ad5ac9b | [
"MIT"
] | 106 | 2019-11-07T22:40:43.000Z | 2022-03-29T22:31:18.000Z | tiledb/cloud/_results/results.py | TileDB-Inc/TileDB-Cloud-Py | e73f6e0ae3fc595218abd3be606c68f62ad5ac9b | [
"MIT"
] | 1 | 2020-10-04T18:54:37.000Z | 2020-10-04T18:54:37.000Z | """Things that help you keep track of task results and how to decode them."""
import abc
import dataclasses
import threading
import uuid
from concurrent import futures
from typing import Callable, Generic, Optional, TypeVar, Union
import urllib3
from tiledb.cloud import rest_api
from tiledb.cloud import tiledb_cloud... | 32.343511 | 80 | 0.660609 |
3fca96dd670cc10df7dd85a3eaf8c8ace2dc5c34 | 3,676 | py | Python | test2/mining/mining.py | gr0mph/OceanOfCode | 336caa00e22ae06e12d32971f84c82e3c0c9a3a4 | [
"MIT"
] | null | null | null | test2/mining/mining.py | gr0mph/OceanOfCode | 336caa00e22ae06e12d32971f84c82e3c0c9a3a4 | [
"MIT"
] | null | null | null | test2/mining/mining.py | gr0mph/OceanOfCode | 336caa00e22ae06e12d32971f84c82e3c0c9a3a4 | [
"MIT"
] | null | null | null | import sys
sys.path.append('../../')
# Global variables
from test2.test_main import TREASURE_MAP
from test2.test_main import MINE_MAP
# From OceanOfCode
# Class
from OceanOfCode import MineAndTrigger
from OceanOfCode import Submarine
from OceanOfCode import Board
# Global
from OceanOfCode import EMPTY_SYMBOLS
from O... | 28.276923 | 95 | 0.586235 |
3fcb54fe77197f1040f44681301381a698a9f1e0 | 831 | py | Python | dfdatetime/__init__.py | joachimmetz/dfdatetime | de6da30114b952abeac8909906862e78aa7286dc | [
"Apache-2.0"
] | null | null | null | dfdatetime/__init__.py | joachimmetz/dfdatetime | de6da30114b952abeac8909906862e78aa7286dc | [
"Apache-2.0"
] | null | null | null | dfdatetime/__init__.py | joachimmetz/dfdatetime | de6da30114b952abeac8909906862e78aa7286dc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Digital Forensics Date and Time (dfDateTime).
dfDateTime, or Digital Forensics date and time, provides date and time
objects to preserve accuracy and precision.
"""
# Imports for date time values factory.
from dfdatetime import apfs_time
from dfdatetime import cocoa_time
from dfdatetime imp... | 29.678571 | 70 | 0.839952 |
3fcbaff4724b7b17a4f047879b9dde04a4754a7c | 1,267 | py | Python | common/data/selectionhelper.py | alainjungo/reliability-challenges-uncertainty | 21e86f6e2a5d2520b5767dce48bbcf2b11773788 | [
"MIT"
] | 56 | 2019-07-10T06:02:11.000Z | 2021-12-21T08:11:22.000Z | common/data/selectionhelper.py | alainjungo/reliability-challenges-uncertainty | 21e86f6e2a5d2520b5767dce48bbcf2b11773788 | [
"MIT"
] | 4 | 2019-09-26T08:51:58.000Z | 2021-06-08T20:27:53.000Z | common/data/selectionhelper.py | alainjungo/reliability-challenges-uncertainty | 21e86f6e2a5d2520b5767dce48bbcf2b11773788 | [
"MIT"
] | 8 | 2019-10-21T12:43:08.000Z | 2021-12-02T08:14:38.000Z | import logging
import json
import zlib
import os
import pymia.data.extraction as extr
| 28.155556 | 103 | 0.694554 |
3fce44aec3e71efcc655d5db43f3f8dd2acd2d0c | 1,191 | py | Python | src/main/TextLemmatizer.py | alschmut/code2semantics | af1daf0b8320b534344c5352ae972fb600e21e43 | [
"MIT"
] | 2 | 2020-02-26T22:50:38.000Z | 2020-10-29T10:46:10.000Z | src/main/TextLemmatizer.py | alschmut/linguistic-parser | af1daf0b8320b534344c5352ae972fb600e21e43 | [
"MIT"
] | null | null | null | src/main/TextLemmatizer.py | alschmut/linguistic-parser | af1daf0b8320b534344c5352ae972fb600e21e43 | [
"MIT"
] | null | null | null | import sys
from util.Timer import Timer
from util.FileOpener import FileOpener
from util.Logger import Logger
from util.PathExtractor import PathExtractor
from util.PathValidator import PathValidator
from service import SpacyModel
if __name__ == '__main__':
main()
| 28.357143 | 90 | 0.74979 |
3fce57d4964a0ce253965c723aa6fb69e1b90bf3 | 4,069 | py | Python | mat2py/core/graph2d.py | mat2py/mat2py | 2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8 | [
"MIT"
] | null | null | null | mat2py/core/graph2d.py | mat2py/mat2py | 2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8 | [
"MIT"
] | 37 | 2021-12-23T03:22:20.000Z | 2022-02-16T15:40:47.000Z | mat2py/core/graph2d.py | mat2py/mat2py | 2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8 | [
"MIT"
] | 2 | 2022-01-23T07:59:10.000Z | 2022-02-03T09:15:54.000Z | # type: ignore
__all__ = [
"plotyy",
"figtoolset",
"getscribecontextmenu",
"getobj",
"scribeeventhandler",
"setscribecontextmenu",
"putdowntext",
"gtext",
"scribetextdlg",
"doresize",
"prepdrag",
"scriberestoresavefcns",
"zoom",
"scribeclearmode",
"domymenu",... | 17.168776 | 54 | 0.673876 |
3fce96f02b43f368aab74e2c6e770ef0bfeee1f2 | 107 | py | Python | run.py | Arthurdb1999/dash-plotly-example | a54dce5e233aab75746a433665a4a958a77e4b58 | [
"MIT"
] | null | null | null | run.py | Arthurdb1999/dash-plotly-example | a54dce5e233aab75746a433665a4a958a77e4b58 | [
"MIT"
] | null | null | null | run.py | Arthurdb1999/dash-plotly-example | a54dce5e233aab75746a433665a4a958a77e4b58 | [
"MIT"
] | null | null | null | from app import app
if __name__ == '__main__':
app.run_server(port=5000, debug=True, host='localhost') | 26.75 | 59 | 0.719626 |
3fcf781a8eea0228e1eb54ee4f6768c262da5120 | 748 | py | Python | rasa/train_init.py | BarnikRay/chatbot | 4191f3064f6dae90b108ecf4e08130cda39ed370 | [
"MIT"
] | 1 | 2020-05-03T07:30:18.000Z | 2020-05-03T07:30:18.000Z | rasa/train_init.py | privykurura1/chatbot | 4191f3064f6dae90b108ecf4e08130cda39ed370 | [
"MIT"
] | 8 | 2019-12-04T23:20:56.000Z | 2022-02-10T07:47:03.000Z | rasa/train_init.py | privykurura1/chatbot | 4191f3064f6dae90b108ecf4e08130cda39ed370 | [
"MIT"
] | 1 | 2021-11-14T07:45:24.000Z | 2021-11-14T07:45:24.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import logging
from rasa_core.agent import Agent
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.policies.memoization import MemoizationPolicy
if __name__ == '__main__':
logging... | 28.769231 | 117 | 0.758021 |
3fcf9b0ce8ecad5b900f4b1d09dd5ed1b9a47ad4 | 6,123 | py | Python | examples/passage_ranking.py | skirdey/FARM | 2fc801d1d0c973cb36bc867907d4250d1084493b | [
"Apache-2.0"
] | 1,551 | 2019-07-17T18:21:08.000Z | 2022-03-24T18:09:07.000Z | examples/passage_ranking.py | skirdey/FARM | 2fc801d1d0c973cb36bc867907d4250d1084493b | [
"Apache-2.0"
] | 555 | 2019-07-23T09:00:54.000Z | 2022-03-31T15:31:06.000Z | examples/passage_ranking.py | skirdey/FARM | 2fc801d1d0c973cb36bc867907d4250d1084493b | [
"Apache-2.0"
] | 259 | 2019-07-22T08:12:01.000Z | 2022-03-26T09:41:00.000Z | # fmt: off
import logging
from pathlib import Path
from farm.data_handler.data_silo import DataSilo
from farm.data_handler.processor import RegressionProcessor, TextPairClassificationProcessor
from farm.experiment import initialize_optimizer
from farm.infer import Inferencer
from farm.modeling.adaptive_model import Ad... | 41.653061 | 162 | 0.644619 |
3fd06fe52f4de9eab41206707f2484a26a7e0deb | 2,723 | py | Python | extended_data_provider.py | NicolaOrritos/pricenet | 1667e564d48bf0021eb16dcd529017cd00643b03 | [
"MIT"
] | null | null | null | extended_data_provider.py | NicolaOrritos/pricenet | 1667e564d48bf0021eb16dcd529017cd00643b03 | [
"MIT"
] | null | null | null | extended_data_provider.py | NicolaOrritos/pricenet | 1667e564d48bf0021eb16dcd529017cd00643b03 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import pandas as pd
import json
import pytz
def load():
""" Returns `X` and `y` arrays, the former being the training data and the former the targets. """
# Get data:
data = _get_data('coinbaseUSD_1-min_data_2014-12-01_to_2018-03-27.csv')
prices = _get_pri... | 28.072165 | 114 | 0.667646 |
3fd08ba20ef96dd8738b44a611be2e078eaec1a9 | 789 | py | Python | django_alive/tests/test_command.py | lincolnloop/django-alive | 608fd0a1d94f90f51a48a943348e9038f402a504 | [
"MIT"
] | 25 | 2018-08-22T12:42:14.000Z | 2022-01-18T19:03:05.000Z | django_alive/tests/test_command.py | lincolnloop/django-alive | 608fd0a1d94f90f51a48a943348e9038f402a504 | [
"MIT"
] | 7 | 2019-11-05T23:52:49.000Z | 2020-07-01T18:03:32.000Z | django_alive/tests/test_command.py | lincolnloop/django-alive | 608fd0a1d94f90f51a48a943348e9038f402a504 | [
"MIT"
] | null | null | null | import sys
from django.core.management import CommandError, call_command
from django.test import TestCase
from .side_effects import bad_database_check
try:
from unittest.mock import patch
except ImportError:
from mock import patch
# Python 2.7 support
if sys.version_info > (3, 0):
from io import StringI... | 24.65625 | 80 | 0.697085 |
3fd0cbcd561a8f1e4b20915840399b1fbffc54a0 | 2,579 | py | Python | main.py | fanicia/file-backup | f85d59a77d3168def9805e70b8a2a1dacf99c69d | [
"MIT"
] | null | null | null | main.py | fanicia/file-backup | f85d59a77d3168def9805e70b8a2a1dacf99c69d | [
"MIT"
] | null | null | null | main.py | fanicia/file-backup | f85d59a77d3168def9805e70b8a2a1dacf99c69d | [
"MIT"
] | null | null | null | from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
# importing the modules
import os.path
import shutil
import datetime
import time
import re
# getting the current working directory
src_dir = os.getcwd()
# printing current directory
print("########## File-backup started ######... | 32.2375 | 134 | 0.643273 |
3fd11ac451a6a98e1c44245e5db55488106cc6f1 | 24,449 | py | Python | tests/ignite/distributed/comp_models/test_native.py | Eunjnnn/ignite | 743089705b2b252aa5e2a0f310da3a8724d6711e | [
"BSD-3-Clause"
] | 4,119 | 2017-11-23T18:10:37.000Z | 2022-03-31T05:31:27.000Z | tests/ignite/distributed/comp_models/test_native.py | Eunjnnn/ignite | 743089705b2b252aa5e2a0f310da3a8724d6711e | [
"BSD-3-Clause"
] | 1,838 | 2017-11-24T11:19:25.000Z | 2022-03-31T09:08:18.000Z | tests/ignite/distributed/comp_models/test_native.py | Eunjnnn/ignite | 743089705b2b252aa5e2a0f310da3a8724d6711e | [
"BSD-3-Clause"
] | 691 | 2017-11-24T10:57:33.000Z | 2022-03-29T02:19:44.000Z | import os
import pytest
import torch
import torch.distributed as dist
from ignite.distributed.comp_models import has_native_dist_support
if not has_native_dist_support:
pytest.skip("Skip if no native dist support", allow_module_level=True)
else:
from ignite.distributed.comp_models.native import _expand_hostl... | 36.491045 | 120 | 0.674261 |
3fd17ae0190fb0fd9c0e5b30d818a6da541ac894 | 1,114 | py | Python | src/popular_consistent_items/popular_consistent_items.py | masinag/popular_twitter_topics_mining | b86e05d7700cfca4dbf9db67cde50664d99e60f7 | [
"MIT"
] | null | null | null | src/popular_consistent_items/popular_consistent_items.py | masinag/popular_twitter_topics_mining | b86e05d7700cfca4dbf9db67cde50664d99e60f7 | [
"MIT"
] | null | null | null | src/popular_consistent_items/popular_consistent_items.py | masinag/popular_twitter_topics_mining | b86e05d7700cfca4dbf9db67cde50664d99e60f7 | [
"MIT"
] | null | null | null | import pandas as pd
from .apriori_opt import apriori as apriori_opt
from .apriori_basic import apriori as apriori_basic
# from memory_profiler import profile
from .utils import log
| 30.108108 | 83 | 0.653501 |