hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3366c96529f788550edae4b257cd468b67f78c04 | 854 | py | Python | examples/minhash_examples.py | yrik/datasketch | 82d9639bc0011932a952bbae1d4b5bd5ac03c7c8 | [
"MIT"
] | 1,771 | 2015-04-07T18:06:02.000Z | 2022-03-31T17:45:24.000Z | examples/minhash_examples.py | yrik/datasketch | 82d9639bc0011932a952bbae1d4b5bd5ac03c7c8 | [
"MIT"
] | 159 | 2015-08-15T09:47:58.000Z | 2022-03-22T12:55:21.000Z | examples/minhash_examples.py | yrik/datasketch | 82d9639bc0011932a952bbae1d4b5bd5ac03c7c8 | [
"MIT"
] | 278 | 2015-04-08T13:50:27.000Z | 2022-03-02T13:00:33.000Z | '''
Some examples for MinHash
'''
from hashlib import sha1
from datasketch.minhash import MinHash
data1 = ['minhash', 'is', 'a', 'probabilistic', 'data', 'structure', 'for',
'estimating', 'the', 'similarity', 'between', 'datasets']
data2 = ['minhash', 'is', 'a', 'probability', 'data', 'structure', 'for',
... | 28.466667 | 75 | 0.608899 |
3366ce564a5cf30d0aba42937ee5630ae15f40ab | 5,002 | py | Python | tensorflow/contrib/learn/python/learn/estimators/nonlinear_test.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 65 | 2016-09-26T01:30:40.000Z | 2021-08-11T17:00:41.000Z | tensorflow/contrib/learn/python/learn/estimators/nonlinear_test.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 5 | 2017-02-21T08:37:52.000Z | 2017-03-29T05:46:05.000Z | tensorflow/contrib/learn/python/learn/estimators/nonlinear_test.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 10 | 2017-03-28T06:16:10.000Z | 2020-08-25T09:03:44.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# 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 applica... | 38.775194 | 80 | 0.691323 |
3366e810b16324d6c1e7090df6c81d4ad5edafe4 | 8,496 | py | Python | tests/functional/test_paginate.py | Bhaskers-Blu-Org1/ibm-cos-sdk-python-core | dbd5dd4b6362724f068648fad7a6771e20bf994f | [
"Apache-2.0"
] | 6 | 2018-01-18T02:18:28.000Z | 2021-03-16T17:42:48.000Z | tests/functional/test_paginate.py | Bhaskers-Blu-Org1/ibm-cos-sdk-python-core | dbd5dd4b6362724f068648fad7a6771e20bf994f | [
"Apache-2.0"
] | 12 | 2017-09-21T13:55:17.000Z | 2022-01-25T16:48:28.000Z | tests/functional/test_paginate.py | IBM/ibm-cos-sdk-python-core | 18e8a854a2a4fdca7fbb50d5b80fb666734def1f | [
"Apache-2.0"
] | 10 | 2018-01-18T02:17:55.000Z | 2020-06-29T13:50:59.000Z | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 35.548117 | 79 | 0.602872 |
3367052edc39492b2c0641417efd2f1c226f71c2 | 446 | py | Python | alipay/aop/api/response/AlipayIserviceCliveChatSendResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayIserviceCliveChatSendResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayIserviceCliveChatSendResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayIserviceCliveChatSendResponse(AlipayResponse):
def __init__(self):
super(AlipayIserviceCliveChatSendResponse, self).__init__()
def parse_response_content(self, re... | 27.875 | 108 | 0.782511 |
33670f7fe2b49c4ea1d5d1dbb03b111adf32e998 | 417 | py | Python | respy/tests/conftest.py | boryana-ilieva/respy | c3f600eefbb54d4f34ae2cc1e52d4d32c03ba0dc | [
"MIT"
] | null | null | null | respy/tests/conftest.py | boryana-ilieva/respy | c3f600eefbb54d4f34ae2cc1e52d4d32c03ba0dc | [
"MIT"
] | null | null | null | respy/tests/conftest.py | boryana-ilieva/respy | c3f600eefbb54d4f34ae2cc1e52d4d32c03ba0dc | [
"MIT"
] | 1 | 2020-10-31T19:40:22.000Z | 2020-10-31T19:40:22.000Z | """ This module provides the fixtures for the PYTEST runs.
"""
import numpy as np
import tempfile
import pytest
import os
@pytest.fixture(scope='function')
def set_seed():
""" Each test is executed with the same random seed.
"""
np.random.seed(1223)
@pytest.fixture(scope='function')
def fresh_directory(... | 18.954545 | 58 | 0.688249 |
33671ebb41414596f2799cd65030a02f1d9e957b | 2,564 | py | Python | dev_files/testing_func.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | 1 | 2022-01-29T17:14:40.000Z | 2022-01-29T17:14:40.000Z | dev_files/testing_func.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | dev_files/testing_func.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | import logging
from unit_parse import Quantity
from unit_parse.utils import quantity_approx_equal
color_codes = {
"reset": "\033[0m", # add at the end to stop coloring
"black": "\033[30m",
"red": "\033[31m",
"green": "\033[32m",
"yellow": "\033[33m",
"blue": "\033[34m",
"magenta": "\033[35... | 29.813953 | 100 | 0.609204 |
3367314e693383e3378edadbcac324cc4e295212 | 5,175 | py | Python | google-cloud-sdk/lib/surface/deployment_manager/types/list.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/deployment_manager/types/list.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/deployment_manager/types/list.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# 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 ag... | 32.34375 | 77 | 0.650048 |
3367432a86e0b16209d6437b9fc7f7090cbf3fe2 | 25,579 | py | Python | intersight/apis/storage_controller_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/storage_controller_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/storage_controller_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from s... | 50.651485 | 818 | 0.618711 |
336756ac3fea809fc16b78ec50e649c62d73053d | 1,351 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_action_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_action_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_action_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 37.527778 | 80 | 0.637306 |
336780e36a8efdd578bcc30c18d9dbc3102d0371 | 7,460 | py | Python | SCRAPE/Lib/site-packages/twisted/conch/ui/tkvt100.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/conch/ui/tkvt100.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/conch/ui/tkvt100.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
"""Module to emulate a VT100 terminal in Tkinter.
Maintainer: Paul Swartz
"""
import string
import tkinter as Tkinter
import tkinter.font as tkFont
from . import ansi
ttyFont = None # tkFont.Font(family = 'Courier', size = 10)
fontWidth, f... | 29.84 | 97 | 0.484584 |
336784f396aafcd32d42694242d565b0642b6976 | 102 | py | Python | office365/sharepoint/publishing/video_channel.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/sharepoint/publishing/video_channel.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/sharepoint/publishing/video_channel.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | from office365.runtime.client_object import ClientObject
class VideoChannel(ClientObject):
pass
| 17 | 56 | 0.823529 |
3367b7e578096f40054780a7695d2796588f4b43 | 3,151 | py | Python | confgen/inventory.py | fieldaware/confgen | 2b177aeb465de1cb8b55bbc61a33289e1e9d1d2d | [
"MIT"
] | 2 | 2016-04-22T15:47:46.000Z | 2016-05-31T15:52:54.000Z | confgen/inventory.py | fieldaware/confgen | 2b177aeb465de1cb8b55bbc61a33289e1e9d1d2d | [
"MIT"
] | 5 | 2017-01-13T13:14:13.000Z | 2017-08-22T10:17:58.000Z | confgen/inventory.py | fieldaware/confgen | 2b177aeb465de1cb8b55bbc61a33289e1e9d1d2d | [
"MIT"
] | null | null | null | import re
import errno
import os
from os.path import join
import yaml
from . import dir_rm
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc: # Python >2.5
if not exc.errno == errno.EEXIST:
raise
class Inventory(object):
"""
Represents, builds and saves the... | 31.19802 | 102 | 0.571565 |
3367d90c5a2cb1f296ee2922a0ec3356bd3e22b8 | 21,445 | py | Python | nanotune/fit/dotfit.py | microsoft/nanotune | 68be8f5b74a52d57b74ccac228e120d9ab48e3e4 | [
"MIT"
] | 5 | 2021-02-24T14:32:37.000Z | 2022-01-05T16:37:26.000Z | nanotune/fit/dotfit.py | microsoft/nanotune | 68be8f5b74a52d57b74ccac228e120d9ab48e3e4 | [
"MIT"
] | 149 | 2021-03-23T14:44:39.000Z | 2022-03-31T06:09:07.000Z | nanotune/fit/dotfit.py | LaudateCorpus1/nanotune | 0ada354597b16f6dbb17ca7be01ab7668b6d5049 | [
"MIT"
] | 10 | 2021-03-29T13:36:38.000Z | 2022-02-16T23:06:35.000Z | import copy
import json
import logging
import math
import os
from itertools import combinations
from math import floor
from typing import Any, Dict, List, Optional, Tuple, Union
import numpy.typing as npt
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import qcodes as qc
import xarray as xr
from m... | 38.363148 | 87 | 0.544836 |
3367e9aa6b03c9e8bbe1cb46517879341ea5d7db | 645 | py | Python | tests/data/expected/main_kr/main_modular/__init__.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 891 | 2019-07-23T04:23:32.000Z | 2022-03-31T13:36:33.000Z | tests/data/expected/main_kr/main_modular/__init__.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 663 | 2019-07-23T09:50:26.000Z | 2022-03-29T01:56:55.000Z | tests/data/expected/main_kr/main_modular/__init__.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 108 | 2019-07-23T08:50:37.000Z | 2022-03-09T10:50:22.000Z | # generated by datamodel-codegen:
# filename: modular.yaml
# timestamp: 1985-10-26T08:21:00+00:00
from __future__ import annotations
from typing import Optional
from pydantic import BaseModel
from . import foo, models
from .nested import foo as foo_1
class OptionalModel(BaseModel):
__root__: str
class ... | 16.538462 | 40 | 0.72093 |
33680a641c13cedca135d16e52e5de38b5b78bbf | 4,744 | py | Python | openapi_client/models/alert.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/alert.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/alert.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
MBTA
MBTA service API. https://www.mbta.com Source code: https://github.com/mbta/api # noqa: E501
The version of the OpenAPI document: 3.0
Contact: developer@mbta.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from op... | 26.80226 | 106 | 0.565767 |
33681281eebc33ed51ae195be1bd7253d0cafa90 | 4,820 | py | Python | Tools/Scripts/webkitpy/xcode/sdk.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/xcode/sdk.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/xcode/sdk.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyrig... | 38.870968 | 95 | 0.648133 |
336813bc62a4544f59545fea41cc1230e15c974c | 2,161 | py | Python | day20/solution1.py | evanbrumley/aoc2021 | 96e66be2a003eebc942c8cb2845925277bd28645 | [
"MIT"
] | null | null | null | day20/solution1.py | evanbrumley/aoc2021 | 96e66be2a003eebc942c8cb2845925277bd28645 | [
"MIT"
] | null | null | null | day20/solution1.py | evanbrumley/aoc2021 | 96e66be2a003eebc942c8cb2845925277bd28645 | [
"MIT"
] | null | null | null | class Image:
def __init__(self, algorithm, rows):
self.algorithm = algorithm
self.set_rows(rows)
self.universe_cell = "0"
def __str__(self):
output = ""
for row in self.rows:
output += "".join([c for c in row])
output += "\n"
return outp... | 23.236559 | 82 | 0.5118 |
33684935247d8b1d1cb1ba7d230eea22d34e6c2a | 7,486 | py | Python | examples/mach_tutorials/aerostruct/mphys_as_2scenario.py | kejacobson/mphys | 72ff05a1c444461a9431470d32dcf2a7d51752eb | [
"Apache-2.0"
] | null | null | null | examples/mach_tutorials/aerostruct/mphys_as_2scenario.py | kejacobson/mphys | 72ff05a1c444461a9431470d32dcf2a7d51752eb | [
"Apache-2.0"
] | null | null | null | examples/mach_tutorials/aerostruct/mphys_as_2scenario.py | kejacobson/mphys | 72ff05a1c444461a9431470d32dcf2a7d51752eb | [
"Apache-2.0"
] | null | null | null | import numpy as np
import argparse
from mpi4py import MPI
import openmdao.api as om
from mphys import Multipoint
from mphys.scenario_aerostructural import ScenarioAeroStructural
# these imports will be from the respective codes' repos rather than mphys
from mphys.solver_builders.mphys_adflow import ADflowBuilder
fro... | 37.059406 | 113 | 0.541678 |
33684c7581eb3da15c9fb1e9052096dc3d0d6100 | 89,815 | py | Python | lib/models/hrformer.py | leijue222/TransPose | a0ed0adcd70a0f57425cbe4ef2bd06c4bfaa5f45 | [
"MIT"
] | null | null | null | lib/models/hrformer.py | leijue222/TransPose | a0ed0adcd70a0f57425cbe4ef2bd06c4bfaa5f45 | [
"MIT"
] | null | null | null | lib/models/hrformer.py | leijue222/TransPose | a0ed0adcd70a0f57425cbe4ef2bd06c4bfaa5f45 | [
"MIT"
] | 1 | 2021-12-16T07:50:40.000Z | 2021-12-16T07:50:40.000Z | # %%
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import warnings
from mmcv.cnn import (
build_conv_layer,
build_norm_layer,
constant_init,
kaiming_init,
normal_init,
build_upsample_layer,
)
# from mmcv.runner import load_checkpoint
from mmcv.runner.check... | 35.416009 | 115 | 0.532751 |
33684fa84b4d03048c31ed8334471c627d866bc6 | 4,448 | py | Python | viz/viz_static.py | Alicegif/covid19-severity-prediction | adb3f483e00444949aaaa46830b0cb5531525cfa | [
"MIT"
] | null | null | null | viz/viz_static.py | Alicegif/covid19-severity-prediction | adb3f483e00444949aaaa46830b0cb5531525cfa | [
"MIT"
] | null | null | null | viz/viz_static.py | Alicegif/covid19-severity-prediction | adb3f483e00444949aaaa46830b0cb5531525cfa | [
"MIT"
] | null | null | null | import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import Patch
from matplotlib.lines import Line2D
from adjustText import adjust_text
import datetime
cs = ['#6E8E96', '#D3787D', '#AC3931']
def corrplot(df, SIZE=8):
# sns.set(style="white")
# Compute the correlati... | 39.714286 | 118 | 0.595324 |
33686b34b5ede4269e7ed8c8e6cf6b5d15554ed3 | 1,481 | py | Python | src/tenzing/utils/singleton.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/tenzing/utils/singleton.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | src/tenzing/utils/singleton.py | ieaves/tenzing | 92d39c1c3a5633d8074e0ffe8c2687c465aebbc8 | [
"MIT"
] | null | null | null | from abc import ABCMeta
class Singleton(ABCMeta):
"""Singleton metaclass
Any instantiation of a Singleton class yields
the exact same object, e.g.
>>> class MyClass(metaclass=Singleton):
>>> pass
>>> a = MyClass()
>>> b = MyClass()
>>> a is b
True
"""
_instances = {}
... | 25.982456 | 85 | 0.644159 |
33687cb2b261bd45b22f479d5d1af387eb0bf3c2 | 585 | py | Python | tests/test_msa.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 116 | 2019-11-28T07:54:26.000Z | 2022-03-31T03:20:44.000Z | tests/test_msa.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 120 | 2019-12-08T21:01:46.000Z | 2022-03-30T04:11:52.000Z | tests/test_msa.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 19 | 2019-12-19T05:34:03.000Z | 2022-03-19T05:54:51.000Z | # test if identical GFF3 files give the correct fasta alignment output
from panaroo.__main__ import main
import sys
import glob
from Bio import SeqIO
def test_msa(datafolder):
# run panaroo
sys.argv = [
"", "-i", datafolder + "aln.gff", datafolder + "aln.gff", "-o",
datafolder, "-a", "pan", "... | 23.4 | 72 | 0.635897 |
3368be9eafae7bbddda14389b3d7b9d2040c1734 | 4,034 | py | Python | alipay/aop/api/request/AlipayCommerceTransportIndustryDataSyncRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayCommerceTransportIndustryDataSyncRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayCommerceTransportIndustryDataSyncRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceTransportIndustryDataSyncModel import AlipayCommerceTransportIndustryDataSyncModel
class AlipayCommerceTransportIndust... | 27.82069 | 148 | 0.649975 |
3368cf2480680f65f0a9ba590ee6ea9cb1112863 | 8,023 | py | Python | docs/conf.py | Eravalord/OpenPNM | 505bc37318a3ba40d8343f89cd347d0073dd9d14 | [
"MIT"
] | 1 | 2021-07-20T13:56:57.000Z | 2021-07-20T13:56:57.000Z | docs/conf.py | jgostick/openpnm | 8298608a38f6aae4a96b0f3b9dd9b9e4460e8692 | [
"MIT"
] | null | null | null | docs/conf.py | jgostick/openpnm | 8298608a38f6aae4a96b0f3b9dd9b9e4460e8692 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
import datetime
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../'))
# General configuration ------------------------------------------------------
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphin... | 31.217899 | 93 | 0.679048 |
3368d284eac5c234aea147e92a7807b1780d8ad4 | 964 | py | Python | office365/sharepoint/taxonomy/taxonomy_service.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/taxonomy/taxonomy_service.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/taxonomy/taxonomy_service.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.runtime.client_runtime_context import ClientRuntimeContext
from office365.runtime.odata.odata_request import ODataRequest
from office365.runtime.odata.v4_json_format import V4JsonFormat
from office365.runtime.resource_path import ResourcePath
from office365.sharepoint.taxonomy.term_store import TermStore... | 33.241379 | 75 | 0.743776 |
3368dac0d9d0cfca9681a5b321acc32668773807 | 133 | py | Python | doc/python_study_code/list_comprehension.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | doc/python_study_code/list_comprehension.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | doc/python_study_code/list_comprehension.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
squares = []
for x in range(10):
squares.append(x**3)
# **3 就是triple-factorial = x*x*x
| 16.625 | 36 | 0.609023 |
336901b4deb8b98d61b390fc2abc6bf13d87b2e1 | 357 | py | Python | strGen.py | TeamDragons/Dragons-Userbot | e40584f4dc898b785523adea4519ffb412dc92c4 | [
"MIT"
] | 3 | 2021-08-11T08:33:39.000Z | 2022-01-17T00:09:11.000Z | strGen.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | null | null | null | strGen.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | 6 | 2021-08-14T08:20:41.000Z | 2022-03-20T02:31:45.000Z | #!/bin/bash
#
# Copyright (C) 2021 by TeamDragons, <https://github.com/MIT/TeamDragons>
#
# This file is part of <https://github.com/MIT/TeamDragons> project,
# and is released under the "MIT TeamDragons License Agreement".
# Please see <https://github.com/MIT/Dragons-Userbot/blob/main/LICENSE>
#
# All rights reserved.... | 29.75 | 73 | 0.745098 |
336958875afa419172a19e24b7bdc1a24e224b72 | 1,605 | py | Python | talk_creation_helpers/initial_code/run_train.py | DonaldWhyte/deep-learning-with-rnns | 764316fc1820bda4ab3e1c0fc48c772755011266 | [
"MIT"
] | 6 | 2017-10-20T11:20:12.000Z | 2020-02-13T18:50:39.000Z | talk_creation_helpers/initial_code/run_train.py | DonaldWhyte/deep-learning-with-rnns | 764316fc1820bda4ab3e1c0fc48c772755011266 | [
"MIT"
] | null | null | null | talk_creation_helpers/initial_code/run_train.py | DonaldWhyte/deep-learning-with-rnns | 764316fc1820bda4ab3e1c0fc48c772755011266 | [
"MIT"
] | 2 | 2018-07-14T09:00:08.000Z | 2021-03-12T21:10:38.000Z | import argparse
from model import RNNTextModel
from text import ProgressBar, read_data_files
def _main():
args = _parse_args()
data = read_data_files(args.files, validation=True)
sequence_length = 30
batch_size = 200
display_every_n_batches = 50
progress = ProgressBar(
display_every... | 29.722222 | 77 | 0.677259 |
33695d54a57415fd6ff756c39952eedfd676ae4d | 32,517 | py | Python | atomic_reactor/plugins/exit_koji_import.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | 16 | 2019-07-04T16:00:13.000Z | 2022-01-28T19:51:58.000Z | atomic_reactor/plugins/exit_koji_import.py | containerbuildsystem/atomic-reactor | 5734a189fc79245d99610f3a81b3aee9913db355 | [
"BSD-3-Clause"
] | 577 | 2019-06-03T07:53:16.000Z | 2022-03-31T04:01:23.000Z | atomic_reactor/plugins/exit_koji_import.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | 17 | 2020-02-21T13:30:06.000Z | 2022-02-15T10:42:32.000Z | """
Copyright (c) 2017 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
import copy
import json
import koji
import os
import time
import logging
from tempfile import NamedTemporaryFile
from atomic_reactor.constan... | 41.741977 | 100 | 0.616047 |
3369655d5accabb29c664cd2a5c5c58011f0d994 | 4,146 | py | Python | capnpy/compiler/fieldtree.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 1 | 2019-05-29T19:47:53.000Z | 2019-05-29T19:47:53.000Z | capnpy/compiler/fieldtree.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | null | null | null | capnpy/compiler/fieldtree.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 4 | 2018-01-28T23:44:41.000Z | 2019-09-28T17:50:14.000Z | from __future__ import print_function
from collections import namedtuple
Union = namedtuple('Union', ['varname', 'offset'])
class AbstractNode(object):
parent = None
union = None
children = ()
def pprint(self, level=0):
indent = (level*4) * ' '
print('%s%s' % (indent, self))
... | 32.390625 | 83 | 0.587072 |
336970e1b800765dcdcfc6365519ea9d0a67f99a | 6,546 | py | Python | exeteracovid/algorithms/inconsistent_symptoms.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 3 | 2021-03-23T14:23:06.000Z | 2021-12-29T16:54:42.000Z | exeteracovid/algorithms/inconsistent_symptoms.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 29 | 2021-02-22T12:12:53.000Z | 2021-09-27T10:52:25.000Z | exeteracovid/algorithms/inconsistent_symptoms.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 1 | 2021-03-08T15:00:30.000Z | 2021-03-08T15:00:30.000Z | # Copyright 2020 KCL-BMEIS - King's College London
# 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... | 45.458333 | 119 | 0.705163 |
33699603e242f7fffdfcb0bdeced391d37c6487b | 952 | py | Python | src/samples/PySide2/ui_loader.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 88 | 2020-03-19T20:24:08.000Z | 2022-03-23T23:13:54.000Z | src/samples/PySide2/ui_loader.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 5 | 2020-04-09T19:56:47.000Z | 2021-11-12T20:02:18.000Z | src/samples/PySide2/ui_loader.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 22 | 2020-03-19T19:24:36.000Z | 2022-03-18T21:55:19.000Z | '''
Demonstrates loading .ui files with PySide2
'''
import os
from PySide2.QtWidgets import QMainWindow
from PySide2.QtCore import QFile
from PySide2.QtUiTools import QUiLoader
from pymxs import runtime as rt
from qtmax import GetQMaxMainWindow
class MyWindow(QMainWindow):
"""
Main window class object loadin... | 27.2 | 85 | 0.679622 |
33699993863e892f61f6880e06bc0c9d1be33565 | 300 | py | Python | src/fastapi_aad_auth/__init__.py | Alex-Chekh/fastapi_aad_auth | 4ad21fa76e7422da5d0799695bb547cd3e6224e0 | [
"MIT"
] | 29 | 2020-09-04T08:39:42.000Z | 2022-01-21T08:43:48.000Z | src/fastapi_aad_auth/__init__.py | Alex-Chekh/fastapi_aad_auth | 4ad21fa76e7422da5d0799695bb547cd3e6224e0 | [
"MIT"
] | 86 | 2020-07-30T20:51:19.000Z | 2022-03-30T16:55:24.000Z | src/fastapi_aad_auth/__init__.py | Alex-Chekh/fastapi_aad_auth | 4ad21fa76e7422da5d0799695bb547cd3e6224e0 | [
"MIT"
] | 11 | 2020-10-16T07:17:16.000Z | 2022-02-09T17:13:55.000Z | from fastapi_aad_auth.auth import Authenticator # noqa F401
from fastapi_aad_auth.config import Config # noqa F401
from fastapi_aad_auth._base.state import AuthenticationState # noqa F401
from fastapi_aad_auth._version import get_versions
__version__ = get_versions()['version']
del get_versions
| 37.5 | 73 | 0.836667 |
33699dc1278245a1fa7e40f6059aca5d34455fbc | 1,696 | py | Python | build/lib/pyminer/parsers/parsers.py | sckott/pyminer | 00f05067f536465d664999d613e4c37500653976 | [
"MIT"
] | 6 | 2016-02-02T21:29:11.000Z | 2020-08-16T14:11:19.000Z | pyminer/parsers/parsers.py | sckott/pyminer | 00f05067f536465d664999d613e4c37500653976 | [
"MIT"
] | 9 | 2016-11-12T16:14:13.000Z | 2020-09-25T13:15:42.000Z | pyminer/parsers/parsers.py | sckott/pyminer | 00f05067f536465d664999d613e4c37500653976 | [
"MIT"
] | null | null | null | from ..fetcher_utils import *
from ..extract import extract
def parse_xml(x):
'''
parse xml
:param path: [String] Path to an xml file
:return: object of class lxml.etree._Element
Usage::
from pyminer import fetch
from pyminer import parsers
url = "https://peerj.com/articl... | 22.315789 | 86 | 0.602594 |
3369bf8918a3a2525eef32cad96f1c6cefae6cbd | 1,031 | py | Python | src/test/tests/rendering/image.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/rendering/image.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/rendering/image.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: image.py
#
# Tests: mesh - 2D curvilinear, single domain
# plots - Pseudocolor
# annotations - Image
#
# Defect ID: None
#
# Programmer: Kathleen Biagas
#... | 22.413043 | 78 | 0.558681 |
3369c28422d6e908a23bb51f101ff44401d870d8 | 1,983 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/update_contacts_reset.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/update_contacts_reset.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/update_contacts_reset.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 30.984375 | 103 | 0.631367 |
3369e596f207fd2a713931d41fee60b2f588fa99 | 1,243 | py | Python | app/config.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | null | null | null | app/config.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | null | null | null | app/config.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from subprocess import run, PIPE
from os import getenv
from sys import exit
from app.utils import parse_as_boolean
import logging
try:
# Настройки приложения
VERSION = getenv("VERSION", "Unknown")
COMMIT = str(run(["git log --pretty=format:'%h' -n 1"], shell=True, stdout=PIPE).std... | 37.666667 | 110 | 0.734513 |
3369f4aae0815621769b5552e3a409d2945b4be6 | 25,339 | py | Python | sharpy/aero/utils/uvlmlib.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | sharpy/aero/utils/uvlmlib.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | sharpy/aero/utils/uvlmlib.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | from sharpy.utils.sharpydir import SharpyDir
import sharpy.utils.ctypes_utils as ct_utils
import ctypes as ct
import numpy as np
import platform
import os
from sharpy.utils.constants import NDIM, vortex_radius_def
UvlmLib = ct_utils.import_ctypes_lib(SharpyDir + '/lib/UVLM/lib/', 'libuvlm')
class VMopts(ct.Structur... | 38.334342 | 116 | 0.632543 |
336a1f367b5e49ca203b92e3f7d5356b8627951a | 25,674 | py | Python | network/nervenetplus_policy.py | WilsonWangTHU/neural_graph_evolution | 9142b7f1c32c476aa44c83da38d3f0bacc276d73 | [
"MIT"
] | 33 | 2019-06-06T13:59:51.000Z | 2022-03-07T10:36:42.000Z | network/nervenetplus_policy.py | WilsonWangTHU/neural_graph_evolution | 9142b7f1c32c476aa44c83da38d3f0bacc276d73 | [
"MIT"
] | 8 | 2019-07-09T16:58:28.000Z | 2022-02-10T00:27:39.000Z | network/nervenetplus_policy.py | WilsonWangTHU/neural_graph_evolution | 9142b7f1c32c476aa44c83da38d3f0bacc276d73 | [
"MIT"
] | 12 | 2019-06-07T10:43:12.000Z | 2022-03-09T13:47:01.000Z | # ------------------------------------------------------------------------------
# @brief:
# The nervenet plus! Where we use truncated bp to optimize the weights
# @Input:
# _input_obs: [num_prop_steps * batch_size, ob_size]
# _input_hidden_state: [batch_size, hidden_dim],
# ... | 40.178404 | 80 | 0.528589 |
336a22a77c0d2242d4d52dbf95b64be33aa2b903 | 8,537 | py | Python | scripts/convert.py | Joshua-Ashton/apitrace | 2353c8654941f6c599183287a7235a91ee83c038 | [
"MIT"
] | 47 | 2020-11-08T15:20:49.000Z | 2021-08-16T01:41:49.000Z | scripts/convert.py | Joshua-Ashton/apitrace | 2353c8654941f6c599183287a7235a91ee83c038 | [
"MIT"
] | null | null | null | scripts/convert.py | Joshua-Ashton/apitrace | 2353c8654941f6c599183287a7235a91ee83c038 | [
"MIT"
] | 1 | 2020-11-18T06:37:31.000Z | 2020-11-18T06:37:31.000Z | #!/usr/bin/env python3
##########################################################################
#
# Copyright 2012 VMware Inc.
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
# in th... | 29.642361 | 100 | 0.594471 |
336a3628f27cce31929ae4b92e3923f5c01d6e17 | 358 | py | Python | m2-modified/ims/common/agentless-system-crawler/crawler/plugins/systems/metric_host_crawler.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | 108 | 2015-07-21T10:40:36.000Z | 2021-07-01T06:54:51.000Z | m2-modified/ims/common/agentless-system-crawler/crawler/plugins/systems/metric_host_crawler.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | 320 | 2015-07-21T01:33:20.000Z | 2020-07-21T15:57:02.000Z | m2-modified/ims/common/agentless-system-crawler/crawler/plugins/systems/metric_host_crawler.py | CCI-MOC/ABMI | 955c12ae9d2dc7afe7323f6c25f2af120f5b281a | [
"Apache-2.0"
] | 61 | 2015-07-20T18:26:37.000Z | 2021-03-17T01:18:54.000Z | import logging
from icrawl_plugin import IHostCrawler
from utils.metric_utils import crawl_metrics
logger = logging.getLogger('crawlutils')
class MetricHostCrawler(IHostCrawler):
def get_feature(self):
return 'metric'
def crawl(self, **kwargs):
logger.debug('Crawling %s' % (self.get_featur... | 19.888889 | 58 | 0.715084 |
336a449ea7b1230fab9d519ad32bb33a8ee90805 | 1,253 | py | Python | shmelegram/migrations/versions/02923f056907_add_ondelete_clause.py | Hukyl/epam_2021_python_final | f2d81d5f3039300d6378465629551f8cb93785df | [
"MIT"
] | null | null | null | shmelegram/migrations/versions/02923f056907_add_ondelete_clause.py | Hukyl/epam_2021_python_final | f2d81d5f3039300d6378465629551f8cb93785df | [
"MIT"
] | null | null | null | shmelegram/migrations/versions/02923f056907_add_ondelete_clause.py | Hukyl/epam_2021_python_final | f2d81d5f3039300d6378465629551f8cb93785df | [
"MIT"
] | null | null | null | """Add ONDELETE clause
Revision ID: 02923f056907
Revises: bca5d73c8775
Create Date: 2021-12-05 21:29:40.003937
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '02923f056907'
down_revision = 'bca5d73c8775'
branch_labels = None
depends_on = None
def upgrade():
... | 35.8 | 99 | 0.711093 |
336a4a92dd3c1d718ca2413912fdf0dc6e7dca95 | 202 | wsgi | Python | rassh/wsgi/feedback_api.wsgi | rbricheno/rassh | 2a8406965bcbdc06b3e83f92ea449619e1b359aa | [
"MIT"
] | null | null | null | rassh/wsgi/feedback_api.wsgi | rbricheno/rassh | 2a8406965bcbdc06b3e83f92ea449619e1b359aa | [
"MIT"
] | null | null | null | rassh/wsgi/feedback_api.wsgi | rbricheno/rassh | 2a8406965bcbdc06b3e83f92ea449619e1b359aa | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
if sys.version_info[0] < 3:
raise Exception("Python3 required! Current (wrong) version: '%s'" % sys.version_info)
from rassh.api.http_feedback_api import application
| 25.25 | 89 | 0.747525 |
336a60a9d24b91613f224c4f7a2e60e6b1345162 | 2,678 | py | Python | legal-api/src/legal_api/resources/business/internal_services.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | 1 | 2019-11-07T20:32:59.000Z | 2019-11-07T20:32:59.000Z | legal-api/src/legal_api/resources/business/internal_services.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | legal-api/src/legal_api/resources/business/internal_services.py | jachurchill/lear | 1abeadfa8a68fe84eae28957fcd762d45712b931 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 37.194444 | 113 | 0.705751 |
336a6f3607f9574111fa8f0df3d88ca595d715c0 | 1,711 | py | Python | python/test/test_data_association.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/test/test_data_association.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/test/test_data_association.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenLattice API
OpenLattice API # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@openlattice.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import openlattice
from openlat... | 26.734375 | 85 | 0.594389 |
336a906277ecc5716f919baf72d989e7863d121b | 1,240 | py | Python | services/traction/acapy_wrapper/models/v10_presentation_proposal_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_wrapper/models/v10_presentation_proposal_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_wrapper/models/v10_presentation_proposal_request.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
from acapy_wrapper.models.indy_pres_preview import IndyPres... | 35.428571 | 96 | 0.770968 |
336aa98d8c2f185374aae825769ec22efb0aae1f | 10,901 | py | Python | tasks.py | feuri/netbox-plugin-prometheus-sd | 0a294748541662cf0ce1dd87e2bc2462476312a4 | [
"MIT"
] | null | null | null | tasks.py | feuri/netbox-plugin-prometheus-sd | 0a294748541662cf0ce1dd87e2bc2462476312a4 | [
"MIT"
] | null | null | null | tasks.py | feuri/netbox-plugin-prometheus-sd | 0a294748541662cf0ce1dd87e2bc2462476312a4 | [
"MIT"
] | null | null | null | """Tasks for use with Invoke.
(c) 2020 Network To Code
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 w... | 38.932143 | 138 | 0.634254 |
336ac0c1cb58eed9e65c32c38d6b2d8670ae148f | 1,837 | py | Python | models/lr_schedulers.py | ml4ai/mliis | f40352e734f77609bcd5c4ad330ea73a897a217d | [
"MIT"
] | 23 | 2020-06-01T09:21:58.000Z | 2022-03-01T07:36:25.000Z | models/lr_schedulers.py | ml4ai/mliis | f40352e734f77609bcd5c4ad330ea73a897a217d | [
"MIT"
] | 6 | 2020-05-20T05:57:06.000Z | 2022-03-14T09:44:35.000Z | models/lr_schedulers.py | ml4ai/mliis | f40352e734f77609bcd5c4ad330ea73a897a217d | [
"MIT"
] | 5 | 2020-05-07T23:34:25.000Z | 2022-03-11T11:10:30.000Z | import numpy as np
from typing import Optional
class LRScheduler:
def __init__(self, initial_lr: float, total_steps: int):
self.initial_lr = initial_lr
self.total_steps = total_steps
def anneal_lr(self, cur_step: int):
"""Implemented by subclass"""
pass
def cur_lr(self, ... | 34.660377 | 154 | 0.66086 |
336acbf823815220e092da4438d1b195893f410b | 15,550 | py | Python | ansible/src/mm_user.py | menandmice/ansible-module | 519b0f87ee5a665609232087f82b0c124d48ba35 | [
"MIT"
] | 2 | 2021-10-05T16:40:57.000Z | 2021-10-05T16:41:01.000Z | ansible/src/mm_user.py | menandmice/ansible-module | 519b0f87ee5a665609232087f82b0c124d48ba35 | [
"MIT"
] | 2 | 2021-06-05T01:19:31.000Z | 2021-10-05T16:19:08.000Z | ansible/src/mm_user.py | menandmice/ansible-module | 519b0f87ee5a665609232087f82b0c124d48ba35 | [
"MIT"
] | null | null | null | """Ansible user module.
Part of the Men&Mice Ansible integration
Module to manage users in Micetro.
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
#IMPORTS_START
import sys
import os
import urllib
import include as mm
from ansible.errors import AnsibleError
from ansible.mo... | 36.162791 | 106 | 0.565209 |
336ad0ee3928f98bda763c80070294ff09ebc41c | 2,734 | py | Python | dmrg_helpers/extract/extract.py | iglpdc/dmrg_helpers | df27ff06395c0a4779c2d2723d57524da55cc14a | [
"MIT"
] | 1 | 2019-09-26T13:06:04.000Z | 2019-09-26T13:06:04.000Z | dmrg_helpers/extract/extract.py | iglpdc/dmrg_helpers | df27ff06395c0a4779c2d2723d57524da55cc14a | [
"MIT"
] | null | null | null | dmrg_helpers/extract/extract.py | iglpdc/dmrg_helpers | df27ff06395c0a4779c2d2723d57524da55cc14a | [
"MIT"
] | null | null | null | ''' Functions to extract data and create databases.
'''
from dmrg_helpers.extract.database import Database
from dmrg_helpers.extract.locate_estimator_files import locate_estimator_files
from dmrg_helpers.core.dmrg_logging import logger
def create_db_from_file(filename, database_name=":memory:"):
"""Creates a data... | 35.051282 | 79 | 0.673007 |
336adbff01491d4484ef80eaed5c01d239bda630 | 4,631 | py | Python | test/dlc_tests/ecs/mxnet/inference/test_ecs_mxnet_inference.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | test/dlc_tests/ecs/mxnet/inference/test_ecs_mxnet_inference.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | test/dlc_tests/ecs/mxnet/inference/test_ecs_mxnet_inference.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | import pytest
import test.test_utils.ecs as ecs_utils
import test.test_utils.ec2 as ec2_utils
from test.test_utils import request_mxnet_inference_squeezenet, request_mxnet_inference_gluonnlp
from test.test_utils import ECS_AML2_CPU_USWEST2, ECS_AML2_GPU_USWEST2
@pytest.mark.model("squeezenet")
@pytest.mark.parametri... | 48.747368 | 119 | 0.782552 |
336ae5a8957bbd53bcd1290aa3b74e7662bbe0d7 | 2,540 | py | Python | pandas_ta/volatility/atr.py | MyBourse/pandas-ta | 5998e92e39b71cd79a6e75d7c599492181af5f65 | [
"MIT"
] | 2 | 2021-03-30T01:23:14.000Z | 2021-04-02T18:04:51.000Z | pandas_ta/volatility/atr.py | lukaszbinden/pandas-ta | 98478f8bf049a4c8748d6f3c795f4f335ced05ca | [
"MIT"
] | null | null | null | pandas_ta/volatility/atr.py | lukaszbinden/pandas-ta | 98478f8bf049a4c8748d6f3c795f4f335ced05ca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .true_range import true_range
from pandas_ta.overlap import ma
from pandas_ta.utils import get_drift, get_offset, verify_series
def atr(high, low, close, length=None, mamode=None, drift=None, offset=None, **kwargs):
"""Indicator: Average True Range (ATR)"""
# Validate arguments
... | 27.912088 | 87 | 0.650394 |
336b1508f977d775bc5406fd1cfafff551c5e5c7 | 180 | py | Python | topi/python/topi/intel_graphics/__init__.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 64 | 2021-05-02T14:42:34.000Z | 2021-05-06T01:35:03.000Z | topi/python/topi/intel_graphics/__init__.py | clhne/tvm | d59320c764bd09474775e1b292f3c05c27743d24 | [
"Apache-2.0"
] | 23 | 2019-07-29T05:21:52.000Z | 2020-08-31T18:51:42.000Z | topi/python/topi/intel_graphics/__init__.py | clhne/tvm | d59320c764bd09474775e1b292f3c05c27743d24 | [
"Apache-2.0"
] | 51 | 2019-07-12T05:10:25.000Z | 2021-07-28T16:19:06.000Z | # pylint: disable=redefined-builtin, wildcard-import
"""Intel Gen9 GPU specific declaration and schedules."""
from __future__ import absolute_import as _abs
from .conv2d import *
| 30 | 56 | 0.794444 |
336b168c406207a76ece589d1d9f81799ba612d7 | 2,259 | py | Python | keybert/_maxsum.py | artmatsak/KeyBERT | 6ab9af1cfe74a126e709539a2467426d0881945c | [
"MIT"
] | 1,302 | 2020-10-27T11:38:25.000Z | 2022-03-31T14:02:54.000Z | keybert/_maxsum.py | koaning/KeyBERT | 25dab3a763e5cc0450346dcf061754f71f184ae3 | [
"MIT"
] | 81 | 2020-10-27T12:41:09.000Z | 2022-03-31T06:10:16.000Z | keybert/_maxsum.py | koaning/KeyBERT | 25dab3a763e5cc0450346dcf061754f71f184ae3 | [
"MIT"
] | 179 | 2020-10-30T21:43:14.000Z | 2022-03-29T13:47:33.000Z | import numpy as np
import itertools
from sklearn.metrics.pairwise import cosine_similarity
from typing import List, Tuple
def max_sum_similarity(doc_embedding: np.ndarray,
word_embeddings: np.ndarray,
words: List[str],
top_n: int,
... | 41.072727 | 89 | 0.684816 |
336b172c2eb1fbc17248a31cdf65044652108ab8 | 3,202 | py | Python | indra_db_lite/construction/tables/entrez.py | steppi/indra_db_lite | 094d927570717d278624713072fa2c9acef5d884 | [
"BSD-2-Clause"
] | null | null | null | indra_db_lite/construction/tables/entrez.py | steppi/indra_db_lite | 094d927570717d278624713072fa2c9acef5d884 | [
"BSD-2-Clause"
] | null | null | null | indra_db_lite/construction/tables/entrez.py | steppi/indra_db_lite | 094d927570717d278624713072fa2c9acef5d884 | [
"BSD-2-Clause"
] | 1 | 2021-11-17T20:15:35.000Z | 2021-11-17T20:15:35.000Z | import argparse
from contextlib import closing
import gzip
import io
import logging
import os
import pandas as pd
import requests
import sqlite3
from indra.databases.hgnc_client import get_hgnc_from_entrez
from protmapper.uniprot_client import get_id_from_entrez
from indra_db_lite.construction import get_sqlite_table... | 29.648148 | 77 | 0.678638 |
336b32ec7341dc44ff7cd27c44fbad388005f0eb | 1,912 | py | Python | firestone/deserializers.py | movermeyer/django-firestone | e045089f6ff4a6686633f9c5909c314a010bd4a0 | [
"WTFPL"
] | 1 | 2017-03-08T22:58:35.000Z | 2017-03-08T22:58:35.000Z | firestone/deserializers.py | movermeyer/django-firestone | e045089f6ff4a6686633f9c5909c314a010bd4a0 | [
"WTFPL"
] | null | null | null | firestone/deserializers.py | movermeyer/django-firestone | e045089f6ff4a6686633f9c5909c314a010bd4a0 | [
"WTFPL"
] | 1 | 2018-03-05T17:40:55.000Z | 2018-03-05T17:40:55.000Z | """
The ``deserializers`` module exposes the classes responsible for
deserializing the request bodies of incoming requests to python deta
structures, according to the ``Content-type`` header
"""
import exceptions
import json
import urlparse
def _json_deserializer(data):
try:
return json.loads(data)
ex... | 25.493333 | 78 | 0.670502 |
336b4235e1493e2697f7ae71e0c7826cfeb00e69 | 3,179 | py | Python | src/sardana/taurus/qt/qtgui/extra_sardana/cmdline.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 43 | 2016-11-25T15:21:23.000Z | 2021-08-20T06:09:40.000Z | src/sardana/taurus/qt/qtgui/extra_sardana/cmdline.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 1,263 | 2016-11-25T15:58:37.000Z | 2021-11-02T22:23:47.000Z | src/sardana/taurus/qt/qtgui/extra_sardana/cmdline.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 58 | 2016-11-21T11:33:55.000Z | 2021-09-01T06:21:21.000Z | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 28.383929 | 81 | 0.643913 |
336b46e12e753dbb208d1ac71b8242f4d2056089 | 4,468 | py | Python | src/bullet_utils/env.py | machines-in-motion/bullet_utils | ea71fe8cfe9ec81ab2b85e840f2dadd6b90a7af4 | [
"BSD-3-Clause"
] | 1 | 2021-10-03T00:39:04.000Z | 2021-10-03T00:39:04.000Z | src/bullet_utils/env.py | machines-in-motion/bullet_utils | ea71fe8cfe9ec81ab2b85e840f2dadd6b90a7af4 | [
"BSD-3-Clause"
] | 11 | 2021-01-06T18:40:07.000Z | 2021-12-13T15:51:50.000Z | src/bullet_utils/env.py | machines-in-motion/bullet_utils | ea71fe8cfe9ec81ab2b85e840f2dadd6b90a7af4 | [
"BSD-3-Clause"
] | 3 | 2021-03-09T15:18:05.000Z | 2021-12-22T12:05:18.000Z | """wrapper
Pybullet interface using pinocchio's convention.
License: BSD 3-Clause License
Copyright (C) 2018-2021, New York University , Max Planck Gesellschaft
Copyright note valid unless otherwise stated in individual files.
All rights reserved.
"""
try:
# use standard Python importlib if available (Python>3.7)... | 37.233333 | 170 | 0.646374 |
336b522dd6b744e8a23e10f6940c252e6da21fb4 | 4,273 | py | Python | Programs/snakes.py | ShineTop/PiGlow | 3b87aca3a36a9cc2076ccebdccc5eb7a61855aa7 | [
"MIT"
] | 5 | 2018-03-16T19:09:50.000Z | 2022-02-06T21:37:35.000Z | Programs/snakes.py | Breakfast-for-Pigeons/PiGlow | 3b87aca3a36a9cc2076ccebdccc5eb7a61855aa7 | [
"MIT"
] | 3 | 2018-10-02T16:06:19.000Z | 2020-03-01T19:07:31.000Z | Programs/snakes.py | Breakfast-for-Pigeons/PiGlow | 3b87aca3a36a9cc2076ccebdccc5eb7a61855aa7 | [
"MIT"
] | 1 | 2020-12-19T01:30:06.000Z | 2020-12-19T01:30:06.000Z | #!/usr/bin/env python3
"""
Snakes (or should the title be: Pythons ?)
I think the title is self explanatory.
....................
Functions:
- snake_12: Lights up the LEDs on arms 1 and 2
- snake_13: Lights up the LEDs on arms 1 and 3
- snake_23: Lights up the LEDs on arms 2 and 3
....................
Requirements... | 27.928105 | 72 | 0.538732 |
336b55832cd3da2e75b98f8d24a13144ae4da9e0 | 3,192 | py | Python | lib/cherrypy/lib/lockfile.py | nkvoronov/script.module.cherrypy | 2573349bb7bba9b46102387ef3105f75cc8a82f9 | [
"BSD-3-Clause"
] | 1 | 2022-01-05T12:36:17.000Z | 2022-01-05T12:36:17.000Z | lib/cherrypy/lib/lockfile.py | nkvoronov/script.module.cherrypy | 2573349bb7bba9b46102387ef3105f75cc8a82f9 | [
"BSD-3-Clause"
] | 2 | 2019-11-16T13:20:55.000Z | 2021-01-10T11:28:43.000Z | lib/cherrypy/lib/lockfile.py | nkvoronov/script.module.cherrypy | 2573349bb7bba9b46102387ef3105f75cc8a82f9 | [
"BSD-3-Clause"
] | 6 | 2020-05-22T15:25:34.000Z | 2021-08-13T09:43:01.000Z | """
Platform-independent file locking. Inspired by and modeled after zc.lockfile.
"""
import os
try:
import msvcrt
except ImportError:
pass
try:
import fcntl
except ImportError:
pass
class LockError(Exception):
'Could not obtain a lock'
msg = 'Unable to lock %r'
def __init__(self, pa... | 22.321678 | 77 | 0.576128 |
336b703cbd6c1bcaf61f04be79496e31dc45b9c6 | 6,637 | py | Python | openstackclient/identity/v3/trust.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/identity/v3/trust.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/identity/v3/trust.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | # 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, software
# distrib... | 34.567708 | 77 | 0.572397 |
336ba761aed4fc617a53016007afa1053d25a3ad | 442 | py | Python | credentialdigger/scanners/base_scanner.py | fabiosangregorio/credential-digger | 213fb3684e8dc62f630a3ed718082790c5da4f4a | [
"Apache-2.0"
] | null | null | null | credentialdigger/scanners/base_scanner.py | fabiosangregorio/credential-digger | 213fb3684e8dc62f630a3ed718082790c5da4f4a | [
"Apache-2.0"
] | null | null | null | credentialdigger/scanners/base_scanner.py | fabiosangregorio/credential-digger | 213fb3684e8dc62f630a3ed718082790c5da4f4a | [
"Apache-2.0"
] | null | null | null | import tempfile
from abc import ABC, abstractmethod
from git import Repo as GitRepo
class BaseScanner(ABC):
def __init__(self, rules):
self.rules = rules
@abstractmethod
def scan(self, repo_url, **kwargs):
pass
def clone_git_repo(self, git_url):
""" Clone git repository. ""... | 21.047619 | 49 | 0.662896 |
336bb8ebf5c4e4c2f2c3c69a6b1f32db22dcb290 | 1,086 | py | Python | onyx/sockyx/service/main.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | 2 | 2020-04-14T21:16:07.000Z | 2020-07-09T07:30:44.000Z | onyx/sockyx/service/main.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | 2 | 2020-04-01T12:33:36.000Z | 2020-04-01T12:33:49.000Z | onyx/sockyx/service/main.py | OnyxAI/onyx | 52f4bd5c5dd102acc51a83a20f281d7146893c2a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Onyx Project
https://onyxlabs.fr
Software under licence Creative Commons 3.0 France
http://creativecommons.org/licenses/by-nc-sa/3.0/fr/
You may not use this software for commercial purposes.
@author :: Cassim Khouani
"""
import tornado.ioloop as ioloop
import tornado.web as web
import os
f... | 23.106383 | 67 | 0.700737 |
336bd0530f11d5de342c90fbd8cf8dd9c7f444b5 | 13,631 | py | Python | yolo/util.py | tiahflorens/ict2019 | 47d35da2d834d1b11ba33a01465da8b10ac66f0c | [
"Apache-2.0"
] | null | null | null | yolo/util.py | tiahflorens/ict2019 | 47d35da2d834d1b11ba33a01465da8b10ac66f0c | [
"Apache-2.0"
] | 5 | 2021-03-19T03:28:49.000Z | 2022-03-11T23:59:03.000Z | yolo/util.py | peter-yys-yoon/ict2019 | 008493faece8b82d13dd2fb1964e4cba16b93137 | [
"Apache-2.0"
] | null | null | null | from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import cv2
import matplotlib.pyplot as plt
try:
from bbox import bbox_iou
except ImportError:
from yolo.bbox import bbox_iou
def count_parameters(model):
... | 36.25266 | 110 | 0.596068 |
336bf662c1bf86c0510afab76095a0af7b4851d0 | 2,029 | py | Python | tutorial/deprecated/tutorial_from_reinforce_to_a2c/main_a2c.py | Purple-PI/rlstructures | 9b201b083715bbda2f3534b010c84e11dfc0a1c7 | [
"MIT"
] | 281 | 2021-01-13T14:20:23.000Z | 2022-03-23T08:46:56.000Z | tutorial/deprecated/tutorial_from_reinforce_to_a2c/main_a2c.py | Purple-PI/rlstructures | 9b201b083715bbda2f3534b010c84e11dfc0a1c7 | [
"MIT"
] | 2 | 2021-01-22T23:28:34.000Z | 2021-04-29T22:05:42.000Z | tutorial/deprecated/tutorial_from_reinforce_to_a2c/main_a2c.py | Purple-PI/rlstructures | 9b201b083715bbda2f3534b010c84e11dfc0a1c7 | [
"MIT"
] | 13 | 2021-01-15T14:53:32.000Z | 2022-03-22T11:12:54.000Z | #
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
from rlstructures import logging
from rlstructures.env_wrappers import GymEnv
from rlstructures.tools import weight_init
import torch.nn ... | 28.180556 | 156 | 0.697388 |
336c8f10991ab89e23c36566a92f6aaca1d9ee1a | 8,065 | py | Python | doc/source/conf.py | ifwe/jenkinsapi | 31a7fbb07efcd48e226f7dcf643fd2a2625416c0 | [
"MIT"
] | 1 | 2015-10-16T18:55:51.000Z | 2015-10-16T18:55:51.000Z | doc/source/conf.py | moustuk/jenkinsapi-1 | d18c1e669965c209093763f3295f79c9d3ccdeea | [
"MIT"
] | null | null | null | doc/source/conf.py | moustuk/jenkinsapi-1 | d18c1e669965c209093763f3295f79c9d3ccdeea | [
"MIT"
] | 1 | 2021-09-08T11:45:44.000Z | 2021-09-08T11:45:44.000Z | # -*- coding: utf-8 -*-
#
# JenkinsAPI documentation build configuration file, created by
# sphinx-quickstart on Mon Jan 09 16:35:17 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
#... | 32.003968 | 102 | 0.717173 |
336ca261e0ba4cdfdbaac08be7a80660eef07ec5 | 21,706 | py | Python | tests/tensor/nnet/test_corr.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | tests/tensor/nnet/test_corr.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | tests/tensor/nnet/test_corr.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
import aesara
import aesara.tensor as at
from aesara.tensor.nnet import corr
from aesara.tensor.type import dmatrix, dtensor3, dtensor4, dvector, tensor4
from tests import unittest_tools as utt
from tests.tensor.nnet.test_abstract_conv import (
TestAsymmetricPadding,
TestCausal... | 38.554174 | 88 | 0.517322 |
336cae15868a710e640a577b238cab8e90141a5d | 11,249 | py | Python | qube/custom_cli/click.py | qbicsoftware/qube | 59d6d034d6def13f6456cc80de0f56029b24af03 | [
"MIT"
] | 2 | 2020-04-16T18:50:06.000Z | 2020-04-19T10:39:50.000Z | qube/custom_cli/click.py | qbicsoftware/qube-cli | 59d6d034d6def13f6456cc80de0f56029b24af03 | [
"MIT"
] | 202 | 2020-09-25T07:48:39.000Z | 2022-03-28T04:04:54.000Z | qube/custom_cli/click.py | qbicsoftware/qube | 59d6d034d6def13f6456cc80de0f56029b24af03 | [
"MIT"
] | null | null | null | import collections
import io
from rich.console import Console
from rich import print
import click
import sys
from pathlib import Path
from configparser import NoSectionError
from qube.common.suggest_similar_commands import MAIN_COMMANDS
from qube.common.levensthein_dist import most_similar_command
from qube.bump_versi... | 44.996 | 149 | 0.645391 |
336cbe03ed311063fe76accad1589a1be0819663 | 2,046 | py | Python | tests/operations/test_macro_einsum.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | tests/operations/test_macro_einsum.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | tests/operations/test_macro_einsum.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | import pytest
from myia.lib import InferenceError
from myia.operations import einsum
from myia.testing.common import MA, MB
from myia.testing.multitest import infer, mt, run_debug
@run_debug(MA(1, 4)[0])
def test_einsum_view1d(a):
return einsum("i", a)
@run_debug(MA(1, 4)[0])
def test_einsum_sum1d(a):
retu... | 19.673077 | 63 | 0.633431 |
336cfa0a9f1c5fc3fc493bc94a5ea5724803fbe5 | 1,589 | py | Python | py/cidoc_crm_types/properties/p133_is_spatiotemporally_separated_from.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p133_is_spatiotemporally_separated_from.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p133_is_spatiotemporally_separated_from.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
@dataclass
class P133IsSpatiotemporallySeparatedFrom:
"""
Scope note:
This symmetric property associates two instances of E92 Spacetime Volume that have no extents in common. If only the fuzzy boundaries of the instances of E92 Spacetime Volume overlap, this property cannot be de... | 58.851852 | 461 | 0.777218 |
336d053612e949005e6fef4ee62a935027137186 | 50 | py | Python | src/widget/__init__.py | megemini/DataCastle2017 | 261134f760d8c1bbfc3e65e1362b7710e601947d | [
"MIT"
] | null | null | null | src/widget/__init__.py | megemini/DataCastle2017 | 261134f760d8c1bbfc3e65e1362b7710e601947d | [
"MIT"
] | null | null | null | src/widget/__init__.py | megemini/DataCastle2017 | 261134f760d8c1bbfc3e65e1362b7710e601947d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Save users widgets
""" | 12.5 | 23 | 0.52 |
336d0d4d12586ece9227bcc4791d57be43e7bf8f | 1,283 | py | Python | aux1/src/p2-random.py | CC3501/CC3501-2019-1 | aeaed382e40a54f0ab968e04cc1914485c192d0d | [
"MIT"
] | 2 | 2019-05-03T00:33:27.000Z | 2020-01-16T00:51:55.000Z | aux1/src/p2-random.py | CC3501/CC3501-2019-1 | aeaed382e40a54f0ab968e04cc1914485c192d0d | [
"MIT"
] | null | null | null | aux1/src/p2-random.py | CC3501/CC3501-2019-1 | aeaed382e40a54f0ab968e04cc1914485c192d0d | [
"MIT"
] | null | null | null | """
Pregunta 2, colores random.
Pablo Pizarro @ppizarror / CC3501, 2019-1.
"""
# Obtiene la librería
from ex_color_palette import *
# Carga la imagen original
originalImage = mpl.imread("santiago.png")
# Obtiene una imagen indexada y su paleta de colores, este indizado indica a que posición de la paleta pertenece
# ... | 24.673077 | 112 | 0.707716 |
336d15a21bfb48060e36bbbcab6c4a9669915148 | 3,804 | py | Python | docs/conf.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | 276 | 2019-09-13T08:25:51.000Z | 2022-03-05T13:07:55.000Z | docs/conf.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | 15 | 2019-09-06T14:05:30.000Z | 2022-01-01T20:15:06.000Z | docs/conf.py | awesome-archive/gobbli | 71aacbdc1184871b164185dc0c9f615f07b83173 | [
"Apache-2.0"
] | 24 | 2019-09-18T15:11:42.000Z | 2021-12-23T18:59:55.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
import datetime as dt
impo... | 29.261538 | 79 | 0.64511 |
336d40456599e4a7e976c0433bf53ba99898c59c | 98 | py | Python | example_project/example_site/tests/__init__.py | wearehoods/djangocms-rest-api | 7ac95b683e24bfdb61a2a2d73c9d018a190d51f8 | [
"MIT"
] | 55 | 2016-08-04T19:08:01.000Z | 2020-07-27T06:43:35.000Z | example_project/example_site/tests/__init__.py | wearehoods/djangocms-rest-api | 7ac95b683e24bfdb61a2a2d73c9d018a190d51f8 | [
"MIT"
] | 14 | 2016-10-03T19:44:19.000Z | 2019-01-17T13:18:24.000Z | example_project/example_site/tests/__init__.py | wearehoods/djangocms-rest-api | 7ac95b683e24bfdb61a2a2d73c9d018a190d51f8 | [
"MIT"
] | 18 | 2016-09-30T03:20:43.000Z | 2021-03-03T07:20:01.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
| 24.5 | 72 | 0.765306 |
336d6b395c22a52c6df473aed468191248aa7e9d | 15,633 | py | Python | util/data/gen/WS2_32.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/WS2_32.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/WS2_32.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | symbols = []
exports = [{'type': 'function', 'name': 'FreeAddrInfoEx', 'address': '0x7ffb3d6c2910'}, {'type': 'function', 'name': 'FreeAddrInfoExW', 'address': '0x7ffb3d6c2910'}, {'type': 'function', 'name': 'FreeAddrInfoW', 'address': '0x7ffb3d6c29f0'}, {'type': 'function', 'name': 'GetAddrInfoExA', 'address': '0x7ffb... | 7,816.5 | 15,620 | 0.67511 |
336d7c881aca02c68ff59be18b468a1472113407 | 3,258 | py | Python | microfreshener/core/refiner/istiorefiner.py | di-unipi-socc/micro-tosca | 5d5c9361b34eeabaed8955ddc62282607672bd81 | [
"MIT"
] | null | null | null | microfreshener/core/refiner/istiorefiner.py | di-unipi-socc/micro-tosca | 5d5c9361b34eeabaed8955ddc62282607672bd81 | [
"MIT"
] | 3 | 2019-05-07T07:33:49.000Z | 2019-05-15T14:02:51.000Z | microfreshener/core/refiner/istiorefiner.py | di-unipi-socc/microFreshener-core | 5d5c9361b34eeabaed8955ddc62282607672bd81 | [
"MIT"
] | null | null | null | from .irefiner import IRefiner
from ..model import MicroToscaModel
from ..model.nodes import KProxy
from ..errors import GroupNotFoundError, MicroToscaModelError
from ..model.groups import Edge
from ..logging import MyLogger
from nested_lookup import get_occurrence_of_key
from nested_lookup import nested_lookup
impor... | 31.631068 | 69 | 0.622161 |
336d87c791132287b31a6eab07c493811ac17b4c | 11,549 | py | Python | pyannote/audio/pipelines/voice_activity_detection.py | suissemaxx/pyannote-audio-develop_colab | e9499372a1771c21e1604424a6dd041337111093 | [
"MIT"
] | null | null | null | pyannote/audio/pipelines/voice_activity_detection.py | suissemaxx/pyannote-audio-develop_colab | e9499372a1771c21e1604424a6dd041337111093 | [
"MIT"
] | null | null | null | pyannote/audio/pipelines/voice_activity_detection.py | suissemaxx/pyannote-audio-develop_colab | e9499372a1771c21e1604424a6dd041337111093 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2018-2021 CNRS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, pu... | 34.372024 | 108 | 0.670448 |
336d886c5169a15271755ef52070e38fd7af8b1a | 24,955 | py | Python | src/module.py | Lucaskabela/UNAST | 7a5abb5329591e37469fdadf498661ca04373bcc | [
"MIT"
] | 2 | 2021-03-26T19:51:29.000Z | 2021-03-27T19:25:20.000Z | src/module.py | Lucaskabela/UNAST | 7a5abb5329591e37469fdadf498661ca04373bcc | [
"MIT"
] | 6 | 2021-04-01T03:40:18.000Z | 2021-04-27T06:14:13.000Z | src/module.py | Lucaskabela/UNAST | 7a5abb5329591e37469fdadf498661ca04373bcc | [
"MIT"
] | null | null | null | '''
Contains the nn.Modules which compose the networks. This includes modules
for preprocessing speech and text, the transformer & RNN encoder/decoder, & post
processing modules for text and speech.
'''
import torch
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
import torch.nn as nn
import to... | 39.800638 | 125 | 0.608656 |
336e13f2a9951ca0c748cfabb804a056a0b08538 | 3,796 | py | Python | oscar/lib/python2.7/site-packages/flake8/main/mercurial.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/flake8/main/mercurial.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/flake8/main/mercurial.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Module containing the main mecurial hook interface and helpers.
.. autofunction:: hook
.. autofunction:: install
"""
import configparser
import os
import subprocess
from flake8 import exceptions as exc
__all__ = ('hook', 'install')
def hook(ui, repo, **kwargs):
"""Execute Flake8 on the repo... | 28.757576 | 75 | 0.633562 |
336e1d20e2aece8823758a94ec302ee0b6655299 | 986 | py | Python | adguardhome/types/filtering/status.py | FutaGuard/python-adguardhome | 9cf63cba37303e0b2fbcad1903a0672e7d5d2010 | [
"MIT"
] | null | null | null | adguardhome/types/filtering/status.py | FutaGuard/python-adguardhome | 9cf63cba37303e0b2fbcad1903a0672e7d5d2010 | [
"MIT"
] | null | null | null | adguardhome/types/filtering/status.py | FutaGuard/python-adguardhome | 9cf63cba37303e0b2fbcad1903a0672e7d5d2010 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import List
from dataclasses_json import dataclass_json
@dataclass_json
@dataclass
class Filters:
enabled: bool = field(hash=False, repr=True, compare=False, default=None)
id: int = field(hash=False, repr=True, compare=False, default=None)
last_updated... | 39.44 | 86 | 0.739351 |
336e4f49925383dda03878b4a1d17ad34552e7b6 | 9,877 | py | Python | scales/core.py | steveniemitz/scales | 153fff192a11fbda18afdea12652b090e33b3c59 | [
"MIT"
] | 48 | 2015-06-04T00:08:44.000Z | 2021-02-27T16:00:50.000Z | scales/core.py | steveniemitz/pynagle | 153fff192a11fbda18afdea12652b090e33b3c59 | [
"MIT"
] | 10 | 2015-07-30T20:54:02.000Z | 2020-02-24T15:39:49.000Z | scales/core.py | steveniemitz/pynagle | 153fff192a11fbda18afdea12652b090e33b3c59 | [
"MIT"
] | 11 | 2015-06-10T19:44:34.000Z | 2020-02-14T02:02:40.000Z | """Scales core module."""
import collections
import functools
import inspect
from six.moves.urllib.parse import urlparse, ParseResult
from .constants import (SinkProperties, SinkRole)
from .dispatch import MessageDispatcher
from .loadbalancer.serverset import (
StaticServerSetProvider,
ZooKeeperServe... | 30.865625 | 82 | 0.636631 |
336e63ebf3775b868738ee3b34c6e3bdbbf01188 | 12,028 | py | Python | midterm_submission/code/cogs/steam.py | best4281/programming-practice-2021 | 39e826661430f00c1a2aaebd36ceff5e50f98f89 | [
"MIT"
] | null | null | null | midterm_submission/code/cogs/steam.py | best4281/programming-practice-2021 | 39e826661430f00c1a2aaebd36ceff5e50f98f89 | [
"MIT"
] | null | null | null | midterm_submission/code/cogs/steam.py | best4281/programming-practice-2021 | 39e826661430f00c1a2aaebd36ceff5e50f98f89 | [
"MIT"
] | null | null | null | #Cogs are like modules of the bot, it was made for easy grouping of commands and listeners (events).
import json
import os
import discord
import aiohttp
from discord.ext import commands
from steam import steamid
from googlesearch import search
from settings import *
#Import from upper directory, because this... | 51.401709 | 216 | 0.586714 |
336e653256c7ce88dc969ed164cdf5fd93d88a04 | 1,990 | py | Python | dependency.py | hydrogen602/simple-cpp-build | a2c5c642ea47157c07425d86ec4d242ec47c8bdf | [
"MIT"
] | null | null | null | dependency.py | hydrogen602/simple-cpp-build | a2c5c642ea47157c07425d86ec4d242ec47c8bdf | [
"MIT"
] | null | null | null | dependency.py | hydrogen602/simple-cpp-build | a2c5c642ea47157c07425d86ec4d242ec47c8bdf | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import Dict, List, Set, Type
import re
class DependencyTree:
__visited_dependencies: Dict[Path, 'DependencyTree'] = {}
def __new__(cls: Type['DependencyTree'], file: Path) -> 'DependencyTree':
if file in cls.__visited_dependencies:
return cls.__visite... | 34.310345 | 112 | 0.588945 |
336e7b3c4be805c99fc11184db6f6aea765e0d76 | 1,198 | py | Python | cinema_environment/bin/rst2html5.py | AndrewMalitchuk/cinema-server-monolith | 0002f672c3389f187c4668b7f87e9ea7273900a7 | [
"Apache-2.0"
] | null | null | null | cinema_environment/bin/rst2html5.py | AndrewMalitchuk/cinema-server-monolith | 0002f672c3389f187c4668b7f87e9ea7273900a7 | [
"Apache-2.0"
] | null | null | null | cinema_environment/bin/rst2html5.py | AndrewMalitchuk/cinema-server-monolith | 0002f672c3389f187c4668b7f87e9ea7273900a7 | [
"Apache-2.0"
] | null | null | null | #!/home/adular/Projects/Python/Django/cinema-server/cinema_environment/bin/python
# -*- coding: utf8 -*-
# :Copyright: © 2015 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
#
# Copying and distribution of this file, with or without modification,
# are permitted in any... | 33.277778 | 81 | 0.72621 |
336e9d1172e998c4b2a50396f2fd86117a108ee5 | 9,669 | py | Python | lib/rucio/daemons/badreplicas/minos_temporary_expiration.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | 1 | 2019-03-28T15:53:51.000Z | 2019-03-28T15:53:51.000Z | lib/rucio/daemons/badreplicas/minos_temporary_expiration.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | null | null | null | lib/rucio/daemons/badreplicas/minos_temporary_expiration.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018-2021 CERN
#
# 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 a... | 51.705882 | 171 | 0.626228 |
336ecd362d2ad6ce47433f0f38c0f50719eaa48b | 28,920 | py | Python | Florence/Solver/CoupleStressSolver.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 65 | 2017-08-04T10:21:13.000Z | 2022-02-21T21:45:09.000Z | Florence/Solver/CoupleStressSolver.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 6 | 2018-06-03T02:29:20.000Z | 2022-01-18T02:30:22.000Z | Florence/Solver/CoupleStressSolver.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 10 | 2018-05-30T09:44:10.000Z | 2021-05-18T08:06:51.000Z | from __future__ import print_function
import gc, os, sys, inspect
from copy import deepcopy
from warnings import warn
from time import time
import numpy as np
import scipy as sp
from numpy.linalg import norm
from Florence.Utils import insensitive
from Florence.Tensor import trace, Voigt
from Florence.PostProcessing im... | 51.095406 | 149 | 0.654668 |
336ed10cb96af1bba8f88d859c607db1fb2f5d5e | 6,642 | py | Python | rlkit/core/offline_rl_algorithm.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/core/offline_rl_algorithm.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/core/offline_rl_algorithm.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import abc
from collections import OrderedDict
from rlkit.core.timer import timer
from rlkit.core import logger
from rlkit.core.logging import append_log
from rlkit.misc import eval_util
from rlkit.data_management.replay_buffer import ReplayBuffer
from rlkit.samplers.data_collector import DataCollector
def _get_epo... | 35.518717 | 81 | 0.629479 |
336ef256fde27ea9abdb47a0f399520e41f3ebf9 | 4,692 | py | Python | src/Application/PythonScriptModule/pymodules_old/lib/webdav/acp/Privilege.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2018-04-02T15:38:10.000Z | 2018-04-02T15:38:10.000Z | src/Application/PythonScriptModule/pymodules_old/lib/webdav/acp/Privilege.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/PythonScriptModule/pymodules_old/lib/webdav/acp/Privilege.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2021-09-04T12:37:34.000Z | 2021-09-04T12:37:34.000Z | # Copyright 2008 German Aerospace Center (DLR)
#
# 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 agre... | 39.428571 | 103 | 0.627025 |
336ef4284914affa238ffa57f0904c863c1618c5 | 3,131 | py | Python | libra_client/lbrtypes/transaction/authenticator.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | libra_client/lbrtypes/transaction/authenticator.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | libra_client/lbrtypes/transaction/authenticator.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | from libra_client.canoser import Struct, RustEnum
from enum import IntEnum
from libra_client.crypto.ed25519 import Ed25519PublicKey, Ed25519Signature
from libra_client.crypto.multi_ed25519 import MultiEd25519PublicKey, MultiEd25519Signature
from libra_client.crypto.hash import HashValue
from libra_client.move_core_typ... | 31 | 96 | 0.716704 |
336f09d80a718d3d3b503e4cee5b5486ebac72dd | 36,201 | py | Python | temboardui/plugins/monitoring/chartdata.py | tilkow/temboard | 99a75c894561ee77e78a2dc568d273c1a02e0b0d | [
"PostgreSQL"
] | null | null | null | temboardui/plugins/monitoring/chartdata.py | tilkow/temboard | 99a75c894561ee77e78a2dc568d273c1a02e0b0d | [
"PostgreSQL"
] | null | null | null | temboardui/plugins/monitoring/chartdata.py | tilkow/temboard | 99a75c894561ee77e78a2dc568d273c1a02e0b0d | [
"PostgreSQL"
] | null | null | null | try:
# python2
from StringIO import StringIO
except Exception:
# python3
from io import StringIO
import datetime
from textwrap import dedent
from psycopg2.extensions import AsIs
from .pivot import pivot_timeserie
METRICS = dict(
blocks=dict(
sql_nozoom="""
SELECT
datetime AS date,
... | 38.389183 | 278 | 0.67023 |
336f0b648fc98e9614b000fc941f5f4a13c8b72f | 2,484 | py | Python | src/controllers/processing_template.py | super-resolution/lineprofiler | 8ca3d63b9b209ba0b1a4da9258fb1111ed2125c2 | [
"MIT"
] | 4 | 2019-10-11T11:28:46.000Z | 2021-01-29T20:19:30.000Z | src/controllers/processing_template.py | super-resolution/lineprofiler | 8ca3d63b9b209ba0b1a4da9258fb1111ed2125c2 | [
"MIT"
] | null | null | null | src/controllers/processing_template.py | super-resolution/lineprofiler | 8ca3d63b9b209ba0b1a4da9258fb1111ed2125c2 | [
"MIT"
] | null | null | null | import numpy as np
from PyQt5.QtCore import QThread,pyqtSignal
import os
from matplotlib import cm
class QSuperThread(QThread):
"""
Processing thread to compute distances between SNCs in a given SIM image.
Extending the QThread class keeps the GUI running while the evaluation runs in the background.
"... | 24.594059 | 104 | 0.627214 |
336f15878369f81920f016a28a2fc2737c635cbf | 6,745 | py | Python | mudpi/extensions/sun/sensor.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 163 | 2020-02-17T16:34:54.000Z | 2022-02-28T23:12:11.000Z | mudpi/extensions/sun/sensor.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 28 | 2020-05-05T19:42:25.000Z | 2021-08-04T18:36:32.000Z | mudpi/extensions/sun/sensor.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 31 | 2020-02-27T18:30:42.000Z | 2022-01-18T21:14:56.000Z | """
Sun Sensor Interface
Connects to sun api to get
sunset and sunrise times.
https://sunrise-sunset.org
"""
import time
import json
import requests
import datetime
from mudpi.utils import decode_event_data
from mudpi.extensions import BaseInterface
from mudpi.extensions.sensor import Sensor
from mud... | 33.391089 | 119 | 0.578354 |
336f1742919c4800dd7327ff7486ac2877d6d210 | 6,607 | py | Python | src/pydupe/hasher.py | chris2013/pydupe | be8fd2dd2a905899e376be4e0b3d2fc8482e89e6 | [
"MIT"
] | null | null | null | src/pydupe/hasher.py | chris2013/pydupe | be8fd2dd2a905899e376be4e0b3d2fc8482e89e6 | [
"MIT"
] | 3 | 2022-01-28T15:54:54.000Z | 2022-01-28T15:58:23.000Z | src/pydupe/hasher.py | chris2013/pydupe | be8fd2dd2a905899e376be4e0b3d2fc8482e89e6 | [
"MIT"
] | null | null | null | import concurrent.futures
import logging
import pathlib
import subprocess
import typing as tp
from more_itertools import chunked
from rich.logging import RichHandler
from rich.progress import Progress
from pydupe.config import cnf
from pydupe.console import console
from pydupe.db import PydupeDB
from pydupe.utils imp... | 41.037267 | 117 | 0.6145 |
336fab80bdfb447e6202a2d48bee27fe0105d2f1 | 1,632 | py | Python | python/odmlFromDatacite/fetch_datacite.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odmlFromDatacite/fetch_datacite.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odmlFromDatacite/fetch_datacite.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | """
Query the Datacite API using their Python implementation
for CRCNS specific publications and download all available
data entries as XML files.
"""
import json
import os
import requests
import datacite
# Adjust as required
OUTPUT_DIR = os.path.join(os.sep, "tmp", "datacite")
DATACITE_API_ENDPOINT = "https://api.d... | 30.222222 | 71 | 0.704044 |
336fac228f55fa002dbb3392da520e32e8f19ad1 | 5,118 | py | Python | posthog/test/test_organization_model.py | thinhnguyenuit/posthog | 4758e66790485587d29a617174158d07341342f8 | [
"MIT"
] | 1 | 2021-04-09T09:13:23.000Z | 2021-04-09T09:13:23.000Z | posthog/test/test_organization_model.py | thinhnguyenuit/posthog | 4758e66790485587d29a617174158d07341342f8 | [
"MIT"
] | 1 | 2022-02-15T00:47:35.000Z | 2022-02-15T00:47:35.000Z | posthog/test/test_organization_model.py | thinhnguyenuit/posthog | 4758e66790485587d29a617174158d07341342f8 | [
"MIT"
] | 1 | 2021-09-08T19:45:03.000Z | 2021-09-08T19:45:03.000Z | from unittest import mock
from unittest.mock import Mock, patch
import pytest
from dateutil.relativedelta import relativedelta
from django.utils import timezone
from django.utils.timezone import now
from freezegun import freeze_time
from posthog.celery import sync_all_organization_available_features
from posthog.mode... | 47.831776 | 117 | 0.717859 |
337020f14c19b04026b2218d53513103f1fde34a | 2,966 | py | Python | cloudify_nsx/library/nsx_security_tag.py | cloudify-cosmo/cloudify-nsx-plugin | d7b2abbe384e55aaf47b2c8474ab07f622eb83b5 | [
"Apache-2.0"
] | 2 | 2017-03-08T21:44:54.000Z | 2019-01-16T06:00:16.000Z | cloudify_nsx/library/nsx_security_tag.py | cloudify-cosmo/cloudify-nsx-plugin | d7b2abbe384e55aaf47b2c8474ab07f622eb83b5 | [
"Apache-2.0"
] | 3 | 2017-01-26T13:26:31.000Z | 2017-02-03T14:51:45.000Z | cloudify_nsx/library/nsx_security_tag.py | cloudify-cosmo/cloudify-nsx-plugin | d7b2abbe384e55aaf47b2c8474ab07f622eb83b5 | [
"Apache-2.0"
] | 5 | 2016-12-28T15:26:02.000Z | 2017-01-30T08:46:10.000Z | # Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved
#
# 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 ... | 26.017544 | 74 | 0.646999 |
33702664c42df34e74e0596b0edb166fc2e5423e | 8,241 | py | Python | test/python/LIM2Metrics/py3/base/common/EasyStatePattern/EasyStatePattern.py | sagodiz/SonarQube-plug-in | 4f8e111baecc4c9f9eaa5cd3d7ebeb1e365ace2c | [
"BSD-4-Clause"
] | 20 | 2015-06-16T17:39:10.000Z | 2022-03-20T22:39:40.000Z | test/python/LIM2Metrics/py3/base/common/EasyStatePattern/EasyStatePattern.py | sagodiz/SonarQube-plug-in | 4f8e111baecc4c9f9eaa5cd3d7ebeb1e365ace2c | [
"BSD-4-Clause"
] | 29 | 2015-12-29T19:07:22.000Z | 2022-03-22T10:39:02.000Z | test/python/LIM2Metrics/py3/base/common/EasyStatePattern/EasyStatePattern.py | sagodiz/SonarQube-plug-in | 4f8e111baecc4c9f9eaa5cd3d7ebeb1e365ace2c | [
"BSD-4-Clause"
] | 12 | 2015-08-28T01:22:18.000Z | 2021-09-25T08:17:31.000Z | """
Supports implementation of state pattern.
State Machine is defined a class containing one or more StateTable objeects,
and using decorators to define Events and Transitions that are handled by the
state machine. Individual states are Subclasses of the state machine, with
a __metaclass__ specifier.
Author: Rod... | 35.217949 | 94 | 0.690086 |
33703f7067aca90dd0c476771b9a1e3ef78b61fe | 2,519 | py | Python | Graph-based/feeder/feeder.py | EnTimeMent/Group-Behavior-Recognition | d6606e9e7bef836a9ccc5b4ada66933a4770171c | [
"MIT"
] | 3 | 2020-12-29T04:07:58.000Z | 2022-01-11T14:47:16.000Z | Graph-based/feeder/feeder.py | EnTimeMent/Group-Behavior-Recognition | d6606e9e7bef836a9ccc5b4ada66933a4770171c | [
"MIT"
] | 1 | 2021-01-02T10:28:07.000Z | 2021-01-04T18:01:42.000Z | Graph-based/feeder/feeder.py | EnTimeMent/Group-Behavior-Recognition | d6606e9e7bef836a9ccc5b4ada66933a4770171c | [
"MIT"
] | 1 | 2022-01-09T12:55:41.000Z | 2022-01-09T12:55:41.000Z | # sys
import os
import sys
import numpy as np
import random
import pickle
# torch
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torchvision import datasets, transforms
# visualization
import time
# operation
from . import tools
class Feeder(torch.utils.data.Data... | 28.625 | 87 | 0.609369 |
3370b157f48cd59157e2b39fc71654805417f87f | 5,265 | py | Python | tests/clvm/coin_store.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 7 | 2021-09-07T02:14:15.000Z | 2022-03-27T06:42:35.000Z | tests/clvm/coin_store.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 1 | 2021-10-21T16:38:56.000Z | 2021-11-15T13:03:15.000Z | tests/clvm/coin_store.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 3 | 2021-10-21T07:17:40.000Z | 2022-03-16T12:57:09.000Z | from collections import defaultdict
from dataclasses import dataclass, replace
from typing import Dict, Iterator, Optional
from skynet.util.condition_tools import created_outputs_for_conditions_dict
from skynet.full_node.mempool_check_conditions import mempool_check_conditions_dict, get_name_puzzle_conditions
from sky... | 34.86755 | 118 | 0.630389 |
3370d399a3fd844edd9c7b054182a84b25617077 | 66,481 | py | Python | src/nwb_conversion_tools/tools/spikeinterface/spikeinterface.py | ben-dichter-consulting/nwbn-conversion-tools | f5641317d2697a3916eeb54f74ce171ed65469ed | [
"BSD-3-Clause"
] | null | null | null | src/nwb_conversion_tools/tools/spikeinterface/spikeinterface.py | ben-dichter-consulting/nwbn-conversion-tools | f5641317d2697a3916eeb54f74ce171ed65469ed | [
"BSD-3-Clause"
] | 6 | 2020-01-31T13:29:40.000Z | 2020-03-27T13:09:32.000Z | src/nwb_conversion_tools/tools/spikeinterface/spikeinterface.py | ben-dichter-consulting/nwb-conversion-tools | f5641317d2697a3916eeb54f74ce171ed65469ed | [
"BSD-3-Clause"
] | 1 | 2020-03-07T17:17:01.000Z | 2020-03-07T17:17:01.000Z | """Author: Cody Baker."""
from logging import warning
import uuid
import warnings
import numpy as np
import distutils.version
from pathlib import Path
from typing import Union, Optional, List
from warnings import warn
from collections import defaultdict
import pynwb
from spikeinterface import BaseRecording, BaseSortin... | 46.817606 | 120 | 0.674343 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.