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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d59b6bb7739f33d1ba880444c8a846e3f94a9682 | 886 | py | Python | card_detection_module/nanodet/dectect.py | nhatnxn/ID_Passport-OCR | 78322ec2b9648d0b027326dced7c4aec967bcab3 | [
"MIT"
] | 1 | 2021-06-30T11:01:25.000Z | 2021-06-30T11:01:25.000Z | card_detection_module/nanodet/dectect.py | nhatnxn/ID_Passport-OCR | 78322ec2b9648d0b027326dced7c4aec967bcab3 | [
"MIT"
] | null | null | null | card_detection_module/nanodet/dectect.py | nhatnxn/ID_Passport-OCR | 78322ec2b9648d0b027326dced7c4aec967bcab3 | [
"MIT"
] | null | null | null | import os
import cv2
import torch
import numpy as np
from .detector import Predictor
from .detector import CENTER_MODEL
def detect_card(im):
"""detect 4 corners of a table
Args:
im (np.array): input image
Returns:
list:
- case 1: table detected: [top-left, top-right, bottom-... | 22.717949 | 86 | 0.61851 |
d59baf7bb4ead99709f7018bc89d264ce8b8a3c2 | 17,211 | py | Python | lang/py/src/avro/ipc.py | gth828r/avro-python3 | c8379728b4a762d99262e526fb53f631076fb143 | [
"Apache-2.0"
] | 21 | 2015-09-11T19:52:23.000Z | 2021-12-17T02:50:47.000Z | lang/py/src/avro/ipc.py | gth828r/avro-python3 | c8379728b4a762d99262e526fb53f631076fb143 | [
"Apache-2.0"
] | 16 | 2018-03-15T23:11:29.000Z | 2021-09-20T12:45:54.000Z | lang/py/src/avro/ipc.py | gth828r/avro-python3 | c8379728b4a762d99262e526fb53f631076fb143 | [
"Apache-2.0"
] | 25 | 2018-01-05T15:13:55.000Z | 2021-12-10T20:01:28.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.41358 | 79 | 0.731509 |
d59bb87f406eb296968c3ac8283e98cb8c649a82 | 1,952 | py | Python | vyperlogix/html/stripper.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/html/stripper.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/html/stripper.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | import HTMLParser
import string
class StrippingParser(HTMLParser.HTMLParser):
# These are the HTML tags that we will leave intact
valid_tags = ('b', 'a', 'i', 'br', 'p')
from htmlentitydefs import entitydefs # replace entitydefs from sgmllib
def __init__(self):
HTMLParser.HTMLParser.__i... | 31.483871 | 90 | 0.539959 |
d59bc63eb76dffbed44bcd2fad51ad8db51154d6 | 3,978 | py | Python | alipay/aop/api/request/AlipayBusinessPaymenthubRefundRequest.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/request/AlipayBusinessPaymenthubRefundRequest.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/request/AlipayBusinessPaymenthubRefundRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayBusinessPaymenthubRefundModel import AlipayBusinessPaymenthubRefundModel
class AlipayBusinessPaymenthubRefundRequest(object):
... | 27.434483 | 148 | 0.645551 |
d59be02ea33f3ab047660659f52829a4666ac1ba | 8,362 | py | Python | pycalc/MAVProxy/modules/mavproxy_map/mp_slipmap.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | null | null | null | pycalc/MAVProxy/modules/mavproxy_map/mp_slipmap.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | 8 | 2021-01-28T19:26:22.000Z | 2022-03-24T18:07:24.000Z | pycalc/MAVProxy/modules/mavproxy_map/mp_slipmap.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
slipmap based on mp_tile
Andrew Tridgell
June 2012
'''
import functools
import math
import os, sys
import time
try:
import cv2.cv as cv
#import cv2 as cv
except ImportError:
import cv
from MAVProxy.modules.mavproxy_map import mp_elevation
from MAVProxy.mo... | 36.043103 | 127 | 0.592562 |
d59c11b57ba88804bf490a128e29943ea484eb98 | 4,104 | py | Python | va_explorer/va_data_management/utils/coding.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | null | null | null | va_explorer/va_data_management/utils/coding.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | 125 | 2020-10-07T12:00:15.000Z | 2022-03-31T21:29:21.000Z | va_explorer/va_data_management/utils/coding.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | 2 | 2020-10-29T16:08:42.000Z | 2020-12-08T19:03:41.000Z | import csv
import json
import os
import re
from io import StringIO
import pandas as pd
import requests
from django.forms import model_to_dict
from va_explorer.va_data_management.models import CauseCodingIssue
from va_explorer.va_data_management.models import CauseOfDeath
from va_explorer.va_data_management.models imp... | 45.098901 | 154 | 0.721491 |
d59c3feffc021a253502a2af086bdd409138a203 | 1,332 | py | Python | PythonProjects/03-AccumulatorsAndFunctionsWithParameters/src/m1r_functions.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/03-AccumulatorsAndFunctionsWithParameters/src/m1r_functions.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/03-AccumulatorsAndFunctionsWithParameters/src/m1r_functions.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | ###############################################################################
# TODO:
# 1. READ the code below.
# 2. TRACE (by hand) the execution of the code,
# predicting what will get printed.
# 3. Run the code and compare your prediction to what actually was printed.
# 4. Decide whether you are 100... | 30.976744 | 79 | 0.503754 |
d59c4954beea87e31969cbfcb14c24e2e68b5960 | 8,823 | py | Python | common/node_operations/gemm.py | SSGAalto/minionn | 49bc403a7d91ba4c466843952d53a815cf10d78a | [
"Apache-2.0"
] | 55 | 2018-05-15T08:14:05.000Z | 2022-03-24T12:52:33.000Z | common/node_operations/gemm.py | WeiBenqiang/minionn | 49bc403a7d91ba4c466843952d53a815cf10d78a | [
"Apache-2.0"
] | 9 | 2018-08-01T09:48:21.000Z | 2022-03-14T02:32:51.000Z | common/node_operations/gemm.py | WeiBenqiang/minionn | 49bc403a7d91ba4c466843952d53a815cf10d78a | [
"Apache-2.0"
] | 9 | 2018-08-09T02:12:31.000Z | 2021-12-01T04:24:59.000Z | """
Author: Fritz Alder
Copyright:
Secure Systems Group, Aalto University
https://ssg.aalto.fi/
This code is released under Apache 2.0 license
http://www.apache.org/licenses/LICENSE-2.0
"""
"""
Operator node for Gemm.
Adhering to https://github.com/onnx/onnx/blob/master/docs/Operators.md#Gemm
Gemm
General Matrix ... | 36.458678 | 168 | 0.61453 |
d59c803f0f165b0b6c00bff3f2ae0610c89b4835 | 2,304 | py | Python | appengine/monorail/sitewide/moved.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/sitewide/moved.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/monorail/sitewide/moved.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""A class to display a message explaining that a project has moved.
When a project moves, we ... | 36.571429 | 80 | 0.731337 |
d59c816319dc59550c27909937ded3374b78307a | 863 | py | Python | doc/python_api/examples/bpy.types.Operator.3.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | 2 | 2018-06-18T01:50:25.000Z | 2018-06-18T01:50:32.000Z | doc/python_api/examples/bpy.types.Operator.3.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | null | null | null | doc/python_api/examples/bpy.types.Operator.3.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | null | null | null | """
Dialog Box
++++++++++
This operator uses its :class:`Operator.invoke` function to call a popup.
"""
import bpy
class DialogOperator(bpy.types.Operator):
bl_idname = "object.dialog_operator"
bl_label = "Simple Dialog Operator"
my_float = bpy.props.FloatProperty(name="Some Floating Point")
my_bool... | 26.151515 | 73 | 0.677868 |
d59c8c1ad7ca1414c03c4fea04e2706bf4f7f31e | 7,885 | py | Python | tests/unit/states/archive_test.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | null | null | null | tests/unit/states/archive_test.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | 1 | 2019-09-06T13:57:28.000Z | 2019-09-06T13:57:28.000Z | tests/unit/states/archive_test.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | 1 | 2020-09-30T16:09:48.000Z | 2020-09-30T16:09:48.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Alexander Schwartz <alexander.schwartz@gmx.net>`
'''
# Import python libs
from __future__ import absolute_import
import os
# Import Salt Testing libs
from salttesting import TestCase, skipIf
from salttesting.helpers import ensure_in_syspath
from salttesting.mock im... | 41.719577 | 105 | 0.497273 |
d59c92ac4ebbd2e71f6d53d6c82b12fc62bf531a | 10,932 | py | Python | devito/data/utils.py | cc-a/devito | 24ede9131473f69c1e44ba3b852f8654d3fd953e | [
"MIT"
] | null | null | null | devito/data/utils.py | cc-a/devito | 24ede9131473f69c1e44ba3b852f8654d3fd953e | [
"MIT"
] | null | null | null | devito/data/utils.py | cc-a/devito | 24ede9131473f69c1e44ba3b852f8654d3fd953e | [
"MIT"
] | 1 | 2020-01-13T01:17:24.000Z | 2020-01-13T01:17:24.000Z | import numpy as np
from devito.tools import Tag, as_tuple, is_integer
__all__ = ['Index', 'NONLOCAL', 'PROJECTED', 'index_is_basic', 'index_apply_modulo',
'index_dist_to_repl', 'convert_index', 'index_handle_oob',
'loc_data_idx', 'mpi_index_maps']
class Index(Tag):
pass
NONLOCAL = Index('n... | 32.730539 | 85 | 0.573729 |
d59c9b9c10bd3ac41212f1e5f1524aa2541406b5 | 2,217 | py | Python | alsek/cli/_helpers.py | TariqAHassan/alsek | a0d0f44d2eea1538c9d04530ae917695f624d269 | [
"MIT"
] | 1 | 2021-08-16T02:38:40.000Z | 2021-08-16T02:38:40.000Z | alsek/cli/_helpers.py | TariqAHassan/alsek | a0d0f44d2eea1538c9d04530ae917695f624d269 | [
"MIT"
] | null | null | null | alsek/cli/_helpers.py | TariqAHassan/alsek | a0d0f44d2eea1538c9d04530ae917695f624d269 | [
"MIT"
] | null | null | null | """
Helpers
"""
import logging
import os
import sys
from importlib import import_module
from inspect import getmembers
from pkgutil import walk_packages
from types import ModuleType
from typing import Any, Dict, Iterable, Tuple
from alsek._utils.logging import magic_logger
from alsek.core.task import Task
from a... | 24.362637 | 81 | 0.637348 |
d59cabb784bec1a083d77124d2fcd9d8cd3df32f | 8,194 | py | Python | ginga/examples/tk/example2_tk.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/examples/tk/example2_tk.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/examples/tk/example2_tk.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
#
# example2_tk.py -- Simple, configurable FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from __future__ import print_function
im... | 32.387352 | 100 | 0.583842 |
d59cc625c876fe1b22b5240bc73c2c9fa0e80d7c | 327 | py | Python | cookiesync/struct.py | sheinnick/cookie-sync-example | cdf7dbb1c9cb4b9e9c69e57d40545877e6687bbf | [
"Apache-2.0"
] | null | null | null | cookiesync/struct.py | sheinnick/cookie-sync-example | cdf7dbb1c9cb4b9e9c69e57d40545877e6687bbf | [
"Apache-2.0"
] | null | null | null | cookiesync/struct.py | sheinnick/cookie-sync-example | cdf7dbb1c9cb4b9e9c69e57d40545877e6687bbf | [
"Apache-2.0"
] | null | null | null | from prodict import Prodict
from aioredis.pool import ConnectionsPool
class Partner:
init: str
sync: str
class State(Prodict):
redis_pool: ConnectionsPool
partners: Prodict
def get_partner(self, partner) -> Partner:
if partner:
return self.partners.get(partner... | 20.4375 | 51 | 0.663609 |
d59ce22db3031aa4ba5facbf86668ba13f4888ae | 4,708 | py | Python | monitoring/prober/rid/test_subscription_simple.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | 1 | 2021-03-06T19:31:04.000Z | 2021-03-06T19:31:04.000Z | monitoring/prober/rid/test_subscription_simple.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | null | null | null | monitoring/prober/rid/test_subscription_simple.py | rpai1/dss | 79d8110c336851b155a6e5417692ec68b70c0c07 | [
"Apache-2.0"
] | 1 | 2020-09-20T22:15:36.000Z | 2020-09-20T22:15:36.000Z | """Basic subscription tests:
- create the subscription with a 60 minute expiry
- get by ID
- get by search
- delete
"""
import datetime
import re
from monitoring.monitorlib.infrastructure import default_scope
from monitoring.monitorlib import rid
from monitoring.monitorlib.rid import SCOPE_READ
from . import... | 32.694444 | 91 | 0.696899 |
d59ced9fba98afdcf0f6f849d308f5ff3ad778bb | 3,298 | py | Python | src/decisionengine_modules/tests/test_AwsBurnRate.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 2 | 2020-03-17T15:51:19.000Z | 2022-02-23T15:45:37.000Z | src/decisionengine_modules/tests/test_AwsBurnRate.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 358 | 2020-03-02T20:06:38.000Z | 2022-03-28T20:39:01.000Z | src/decisionengine_modules/tests/test_AwsBurnRate.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 34 | 2020-02-24T17:17:11.000Z | 2022-01-13T21:50:11.000Z | import numpy as np
import pandas as pd
from decisionengine.framework.modules.Module import verify_products
from decisionengine_modules.AWS.transforms import AwsBurnRate
produces = {"AWS_Burn_Rate": pd.DataFrame}
config = {"channel_name": "test"}
occupancy = pd.DataFrame(
[
{
"AccountName": "... | 30.82243 | 116 | 0.561552 |
d59d16e24817e13f9699dd6d05caf95de389a6b2 | 5,295 | py | Python | mdf/tests/test_filtering.py | manahl/mdf | 4b2c78084467791ad883c0b4c53832ad70fc96ef | [
"MIT"
] | 100 | 2015-06-14T23:38:41.000Z | 2019-10-28T03:23:28.000Z | mdf/tests/test_filtering.py | ahlmss/mdf | 4b2c78084467791ad883c0b4c53832ad70fc96ef | [
"MIT"
] | 6 | 2016-12-28T11:22:12.000Z | 2018-12-02T23:01:08.000Z | mdf/tests/test_filtering.py | manahl/mdf | 4b2c78084467791ad883c0b4c53832ad70fc96ef | [
"MIT"
] | 40 | 2015-07-21T17:13:56.000Z | 2019-07-29T21:26:49.000Z | """
Test the various nodetypes all work with a filter.
"""
from mdf import (
MDFContext,
varnode,
evalnode,
now
)
import mdf
from datetime import datetime, timedelta
import unittest
import logging
import pandas as pa
import numpy as np
# this is necessary to stop namespace from looking
# too far up the... | 35.777027 | 98 | 0.667989 |
d59d40432548501a299a4aa1e36724b562c8cb71 | 2,331 | py | Python | datar/tidyr/replace_na.py | stjordanis/datar | 4e2b5db026ad35918954576badef9951928c0cb1 | [
"MIT"
] | 110 | 2021-03-09T04:10:40.000Z | 2022-03-13T10:28:20.000Z | datar/tidyr/replace_na.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 54 | 2021-06-20T18:53:44.000Z | 2022-03-29T22:13:07.000Z | datar/tidyr/replace_na.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 11 | 2021-06-18T03:03:14.000Z | 2022-02-25T11:48:26.000Z | """Replace NAs with specified values"""
from functools import singledispatch
from typing import Any, Iterable
import numpy
import pandas
from pandas import DataFrame
from pandas.core.series import Series
from pipda import register_verb
from ..core.types import ArrayLikeType, is_scalar
from ..core.contexts import Cont... | 30.272727 | 78 | 0.694552 |
d59d53d08554871b695cf3c9f4f9806d8eb982ca | 689 | py | Python | test/international_autocomplete/suggestion_test.py | melonhead901/smartystreets-python-sdk | dd1af1c497968819b3e73a701af5e1f45b58a389 | [
"Apache-2.0"
] | 19 | 2017-01-20T16:34:19.000Z | 2021-12-09T15:56:09.000Z | test/international_autocomplete/suggestion_test.py | melonhead901/smartystreets-python-sdk | dd1af1c497968819b3e73a701af5e1f45b58a389 | [
"Apache-2.0"
] | 25 | 2016-12-11T01:20:19.000Z | 2022-03-24T19:59:25.000Z | test/international_autocomplete/suggestion_test.py | melonhead901/smartystreets-python-sdk | dd1af1c497968819b3e73a701af5e1f45b58a389 | [
"Apache-2.0"
] | 28 | 2016-12-31T17:06:07.000Z | 2022-02-17T00:09:02.000Z | import unittest
from smartystreets_python_sdk.international_autocomplete import Suggestion
class TestSuggestion(unittest.TestCase):
def test_all_fields_get_filled_in_correctly(self):
response_dictionary = {"street": "1", "locality": "2", "administrative_area": "3", "postal_code": "4", "country_iso3": "5"... | 38.277778 | 131 | 0.724238 |
d59d59dccdeefe4ffd8af350e15eaaaead73f472 | 1,377 | py | Python | tests/test_hello_world.py | 4577/Jawa | 23f93020ef6687567e45a9afa09bfd6e0faf6f0a | [
"MIT"
] | 1 | 2021-12-30T10:53:57.000Z | 2021-12-30T10:53:57.000Z | tests/test_hello_world.py | GiantTreeLP/jawa-fixed | dbdd1cb6ef2439bf6496adef8732775c792036ec | [
"MIT"
] | null | null | null | tests/test_hello_world.py | GiantTreeLP/jawa-fixed | dbdd1cb6ef2439bf6496adef8732775c792036ec | [
"MIT"
] | 1 | 2021-01-21T12:17:39.000Z | 2021-01-21T12:17:39.000Z | from jawa.util.bytecode import Instruction, Operand
def test_hello_world(loader):
"""
An integration test for the complete parsing of a simple HelloWorld
example.
The source example is as follows:
.. code::
class HelloWorld {
public static void main(String[] args) {
... | 29.297872 | 71 | 0.622367 |
d59d9212bf9e4aa2bda5cf3e8c101dfa0a0b16ca | 7,933 | py | Python | scrapekit.py | PythonIsMagic/scrape_mlp | bc7f9af57439477a4b959cc1e796837a7ff0d5ea | [
"MIT"
] | 1 | 2018-01-05T04:30:01.000Z | 2018-01-05T04:30:01.000Z | scrapekit.py | PythonIsMagic/scrape_mlp | bc7f9af57439477a4b959cc1e796837a7ff0d5ea | [
"MIT"
] | null | null | null | scrapekit.py | PythonIsMagic/scrape_mlp | bc7f9af57439477a4b959cc1e796837a7ff0d5ea | [
"MIT"
] | null | null | null | # coding=utf-8
"""
" Tools for scraping with requests, BeautifulSoup, urllib, and Selenium
"""
from bs4 import BeautifulSoup
import csv
import os
import re
import requests
import time
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
DELAY = 2 # Seconds
DATADIR = "... | 27.737762 | 99 | 0.617925 |
d59d996f33418a41f9e41bc7d15ef18fcf310b81 | 708 | py | Python | lemur/migrations/versions/5e680529b666_.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/migrations/versions/5e680529b666_.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | 2 | 2020-04-03T09:28:20.000Z | 2020-04-04T04:56:35.000Z | lemur/migrations/versions/5e680529b666_.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | """Sync up endpoints properties
Revision ID: 5e680529b666
Revises: 131ec6accff5
Create Date: 2017-01-26 05:05:25.168125
"""
# revision identifiers, used by Alembic.
revision = '5e680529b666'
down_revision = '131ec6accff5'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('endpoints',... | 26.222222 | 83 | 0.720339 |
d59da0e1f3d0c694274075d4ced92e3ab92d967e | 742 | py | Python | mcts/parameters.py | garywei944/AlphaSMILES | 192ed0c1533e7eb18b54da8a5f4e8351f224adbf | [
"MIT"
] | 15 | 2020-08-14T18:44:07.000Z | 2021-12-06T11:18:02.000Z | mcts/parameters.py | garywei944/AlphaSMILES | 192ed0c1533e7eb18b54da8a5f4e8351f224adbf | [
"MIT"
] | 2 | 2020-08-16T02:26:09.000Z | 2021-08-13T01:46:43.000Z | mcts/parameters.py | garywei944/AlphaSMILES | 192ed0c1533e7eb18b54da8a5f4e8351f224adbf | [
"MIT"
] | 3 | 2019-07-16T09:12:29.000Z | 2020-08-28T04:51:15.000Z | from rdkit import RDLogger
# to change RDKit logs
# RDLogger.logger().setLevel(RDLogger.DEBUG)
RDLogger.logger().setLevel(RDLogger.CRITICAL)
f_stop = ""
f_tree = ""
f_info = ""
f_data = ""
f_stat = ""
directory = ""
r_dft = ""
stop = False
models = []
tree = None
tree_info = None
data = None
scorer = None
lock_updat... | 15.787234 | 45 | 0.71159 |
d59da32090e652aeedc6e1836709c4b457507d8e | 979 | py | Python | python_solutions/ARMSTRONG_NUMBERS/ARMSTRONG_NUMBERS.py | joelstanner/codeeval | ef0591fabcad39d45f10287d7a1330f342ab96e0 | [
"MIT"
] | null | null | null | python_solutions/ARMSTRONG_NUMBERS/ARMSTRONG_NUMBERS.py | joelstanner/codeeval | ef0591fabcad39d45f10287d7a1330f342ab96e0 | [
"MIT"
] | null | null | null | python_solutions/ARMSTRONG_NUMBERS/ARMSTRONG_NUMBERS.py | joelstanner/codeeval | ef0591fabcad39d45f10287d7a1330f342ab96e0 | [
"MIT"
] | null | null | null | """
An Armstrong number is an n-digit number that is equal to the sum of the n'th
powers of its digits. Determine if the input numbers are Armstrong numbers.
INPUT SAMPLE:
Your program should accept as its first argument a path to a filename. Each
line in this file has a positive integer. E.g.
6
153
351
OUTPUT SAMP... | 20.829787 | 77 | 0.638407 |
d59dc08d09b5f7415a838d95dfa291131c535f30 | 1,242 | py | Python | example_bot.py | Doezer/dismock | e9b5a11ffe00d6d7ecd0aa045a6cc972a37c79f4 | [
"MIT"
] | null | null | null | example_bot.py | Doezer/dismock | e9b5a11ffe00d6d7ecd0aa045a6cc972a37c79f4 | [
"MIT"
] | null | null | null | example_bot.py | Doezer/dismock | e9b5a11ffe00d6d7ecd0aa045a6cc972a37c79f4 | [
"MIT"
] | null | null | null | '''
Run with:
python example_bot.py
Enter token in config.json under DISMOCK_BOT_TOKEN
'''
import json
import logging
import discord
from discord.ext import commands
from hl_utils import setup_logging
logger = logging.getLogger(__name__)
class DiscordBot(commands.AutoShardedBot):
def __init__(... | 23.433962 | 57 | 0.621578 |
d59dda3e8e1d1763df210f29852ccb0d15dc56c9 | 30,044 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_network_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 may ... | 80.546917 | 2,439 | 0.825622 |
d59dff51613dac6585463a6e923f55470c8ecdea | 39,108 | py | Python | plan2explore/training/utility.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 189 | 2020-05-13T01:12:03.000Z | 2022-03-23T01:38:56.000Z | plan2explore/training/utility.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 13 | 2020-05-12T22:51:07.000Z | 2022-03-12T00:28:47.000Z | plan2explore/training/utility.py | sarthak268/plan2explore | 264f513d46c6e971d5523782344a694b17139a20 | [
"Apache-2.0"
] | 24 | 2020-05-14T03:47:50.000Z | 2021-09-26T04:20:36.000Z | # Copyright 2019 The Dreamer Authors. Copyright 2020 Plan2Explore 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... | 40.950785 | 253 | 0.683875 |
d59e2206bde8b7d2dd79d4d6be4f0440b7b67bcc | 28,852 | py | Python | src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2022_05_02_preview/operations/_managed_cluster_snapshots_operations.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2022_05_02_preview/operations/_managed_cluster_snapshots_operations.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2022_05_02_preview/operations/_managed_cluster_snapshots_operations.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # pylint: disable=too-many-lines
# 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) AutoRe... | 42.058309 | 216 | 0.670768 |
d59e26286451101498aff70ee7a8616a1d1ba099 | 5,676 | py | Python | ipytablewidgets/tests/test_table.py | progressivis/ipytablewidgets | 0b851691d63ac6fc23de642ac30c4d0c11766b6f | [
"BSD-3-Clause"
] | 2 | 2021-07-10T12:42:53.000Z | 2021-11-18T09:42:42.000Z | ipytablewidgets/tests/test_table.py | progressivis/ipytablewidgets | 0b851691d63ac6fc23de642ac30c4d0c11766b6f | [
"BSD-3-Clause"
] | null | null | null | ipytablewidgets/tests/test_table.py | progressivis/ipytablewidgets | 0b851691d63ac6fc23de642ac30c4d0c11766b6f | [
"BSD-3-Clause"
] | null | null | null | # Initial software, Jean-Daniel Fekete, Christian Poli, Copyright (c) Inria, BSD 3-Clause License, 2021
import pytest
import numpy as np
from ..serializers import table_to_json, table_from_json
from ..numpy_adapter import NumpyAdapter
from ..pandas_adapter import PandasAdapter
from ..compressors import LZ4Compressor
... | 34.822086 | 103 | 0.605004 |
d59e383aae125dbe1c689faa51f4fc286a3cd66c | 441 | py | Python | tests/conftest.py | heston/firebase-data | 5ea47529d3f057db1bc4b074d1d1921817ddbd28 | [
"MIT"
] | null | null | null | tests/conftest.py | heston/firebase-data | 5ea47529d3f057db1bc4b074d1d1921817ddbd28 | [
"MIT"
] | null | null | null | tests/conftest.py | heston/firebase-data | 5ea47529d3f057db1bc4b074d1d1921817ddbd28 | [
"MIT"
] | null | null | null | import os.path
import logging
import sys
# Add the module path
module_path = os.path.abspath(os.path.join(
os.path.dirname(__file__),
'..'
))
sys.path.insert(0, module_path)
logging.basicConfig(
format='[%(asctime)s] %(levelname)s %(name)s: %(message)s',
level=logging.DEBUG
)
def pytest_configure(co... | 20.045455 | 78 | 0.671202 |
d59e3b9df6381aead624ed836eb43889c48d37af | 393 | py | Python | src/constants/io.py | villoro/expensor_personal | 93296b782700d81beb5ee2450626b2292c74728a | [
"MIT"
] | 2 | 2019-03-11T14:48:56.000Z | 2021-01-02T00:20:41.000Z | src/constants/io.py | villoro/expensor_personal | 93296b782700d81beb5ee2450626b2292c74728a | [
"MIT"
] | 5 | 2019-01-08T10:43:22.000Z | 2019-03-27T10:45:39.000Z | src/constants/io.py | villoro/expensor_personal | 93296b782700d81beb5ee2450626b2292c74728a | [
"MIT"
] | null | null | null | """
input/output related constants
"""
SECRET_ENV_VAR_NAME = "SECRET_EXPENSOR"
VAR_DROPBOX_TOKEN = "EXPENSOR_DROPBOX_TOKEN"
VAR_USER = "EXPENSOR_USER"
VAR_PASSWORD = "EXPENSOR_PASSWORD"
PATH_MONEY_LOVER = "/Money Lover/"
FILE_TRANSACTIONS = "/transactions.xlsx"
FILE_DATA = "/data.xlsx"
FILE_CONFIG = "/config.yml... | 21.833333 | 44 | 0.755725 |
d59e5a00452c19bec0b1337e1b4f3ea7d978a1ff | 7,715 | py | Python | advesarial_text/gen_data.py | slowy07/tensorflow-model-research | 48ba4ba6240452eb3e3350fe7099f2b045acc530 | [
"MIT"
] | null | null | null | advesarial_text/gen_data.py | slowy07/tensorflow-model-research | 48ba4ba6240452eb3e3350fe7099f2b045acc530 | [
"MIT"
] | null | null | null | advesarial_text/gen_data.py | slowy07/tensorflow-model-research | 48ba4ba6240452eb3e3350fe7099f2b045acc530 | [
"MIT"
] | null | null | null | """Create TFRecord files of SequenceExample protos from dataset.
Constructs 3 datasets:
1. Labeled data for the LSTM classification model, optionally with label gain.
"*_classification.tfrecords" (for both unidirectional and bidirectional
models).
2. Data for the unsupervised LM-LSTM model that predicts t... | 36.391509 | 84 | 0.711212 |
d59e6ae2679a12b8031d165e7e2d5ddac57d470d | 3,755 | py | Python | vlcp/service/sdn/flowbase.py | hubo1016/vlcp | 61c4c2595b610675ac0cbc4dbc46f70ec40090d3 | [
"Apache-2.0"
] | 252 | 2015-11-17T14:21:50.000Z | 2022-03-11T10:19:47.000Z | vlcp/service/sdn/flowbase.py | SarahZarei/vlcp | 61c4c2595b610675ac0cbc4dbc46f70ec40090d3 | [
"Apache-2.0"
] | 23 | 2018-01-09T13:28:52.000Z | 2019-12-12T06:11:44.000Z | vlcp/service/sdn/flowbase.py | SarahZarei/vlcp | 61c4c2595b610675ac0cbc4dbc46f70ec40090d3 | [
"Apache-2.0"
] | 37 | 2016-08-03T04:42:22.000Z | 2021-12-30T16:57:10.000Z | '''
Created on 2016/4/11
:author: hubo
'''
from vlcp.server.module import Module, api, call_api, ModuleLoadStateChanged
from vlcp.event.runnable import RoutineContainer
from vlcp.service.sdn.ofpmanager import TableAcquireUpdate
from vlcp.event.core import QuitException
class FlowBase(Module):
# Table request sho... | 38.71134 | 138 | 0.573369 |
d59e870d1e3d0f995bda92f7d9d00256dcec49b3 | 2,425 | py | Python | demo/djangoproject/views.py | zulumarketing/html2pdf | 77ddeaf9a7323fec3c23a362a0e64de382cd23ce | [
"Apache-2.0"
] | 8 | 2015-05-23T21:19:43.000Z | 2021-12-23T01:54:01.000Z | demo/djangoproject/views.py | zulumarketing/xhtml2pdf | 77ddeaf9a7323fec3c23a362a0e64de382cd23ce | [
"Apache-2.0"
] | 3 | 2015-05-22T20:51:32.000Z | 2015-08-11T17:18:58.000Z | demo/djangoproject/views.py | zulumarketing/xhtml2pdf | 77ddeaf9a7323fec3c23a362a0e64de382cd23ce | [
"Apache-2.0"
] | 2 | 2017-04-21T01:19:21.000Z | 2018-05-22T05:38:31.000Z | #! /usr/bin/python
# -*- encoding: utf-8 -*-
from django import http
from django.shortcuts import render_to_response
from django.template.loader import get_template
from django.template import Context
import xhtml2pdf.pisa as pisa
try:
import StringIO
StringIO = StringIO.StringIO
except Exception:
from io ... | 32.77027 | 83 | 0.560825 |
d59e8a28b2f8724a76a2260be941433919c0b687 | 894 | py | Python | msp430backend/msp430_data/utility.py | zlalanne/msp430-webcontrol | a4e8f84942c3e16fa447907d2cfff4587013d6b3 | [
"BSD-3-Clause"
] | null | null | null | msp430backend/msp430_data/utility.py | zlalanne/msp430-webcontrol | a4e8f84942c3e16fa447907d2cfff4587013d6b3 | [
"BSD-3-Clause"
] | null | null | null | msp430backend/msp430_data/utility.py | zlalanne/msp430-webcontrol | a4e8f84942c3e16fa447907d2cfff4587013d6b3 | [
"BSD-3-Clause"
] | null | null | null | import sys
def trim(docstring):
if not docstring:
return ''
# Convert tabs to spaces (following the normal Python rules)
# and split into a list of lines:
lines = docstring.expandtabs().splitlines()
# Determine minimum indentation (first line doesn't count):
indent = sys.maxint
... | 33.111111 | 68 | 0.614094 |
d59e93897377c230fbb49a3fe8f89d2557c3e325 | 22,454 | py | Python | mmdet/models/dense_heads/yolo_head.py | ddayzzz/mmdetection | b9940c56cc19b3dda7468a5fd858b9683e93a486 | [
"Apache-2.0"
] | 77 | 2021-07-30T03:05:36.000Z | 2022-03-31T11:02:33.000Z | mmdet/models/dense_heads/yolo_head.py | ddayzzz/mmdetection | b9940c56cc19b3dda7468a5fd858b9683e93a486 | [
"Apache-2.0"
] | 7 | 2021-08-04T07:03:41.000Z | 2021-12-21T16:08:52.000Z | mmdet/models/dense_heads/yolo_head.py | ddayzzz/mmdetection | b9940c56cc19b3dda7468a5fd858b9683e93a486 | [
"Apache-2.0"
] | 24 | 2021-08-03T07:16:54.000Z | 2022-03-27T12:41:17.000Z | # Copyright (c) 2019 Western Digital Corporation or its affiliates.
import warnings
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import ConvModule, normal_init
from mmcv.runner import force_fp32
from mmdet.core import (build_anchor_generator, build_assigner,
... | 42.048689 | 79 | 0.584172 |
d59e9be4f7a29b64dc0688e9fa1d56dc40bf994d | 120 | py | Python | Chapter 5/05/PaxHeader/recipe37.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 5/05/PaxHeader/recipe37.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 5/05/PaxHeader/recipe37.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | 15 uid=2057284
20 ctime=1290656304
20 atime=1292623534
24 SCHILY.dev=234881026
23 SCHILY.ino=25871144
18 SCHILY.nlink=1
| 17.142857 | 23 | 0.825 |
d59ebde0cd981e49f1f6c24bf4f18f6661f0e9b9 | 11,758 | py | Python | main/model/icon.py | wodore/wodore-ng | 0f5f1fd720a52a36e8bfe0cc588a81bdf43b0ce5 | [
"MIT"
] | null | null | null | main/model/icon.py | wodore/wodore-ng | 0f5f1fd720a52a36e8bfe0cc588a81bdf43b0ce5 | [
"MIT"
] | null | null | null | main/model/icon.py | wodore/wodore-ng | 0f5f1fd720a52a36e8bfe0cc588a81bdf43b0ce5 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from google.appengine.ext import ndb
#from api import fields
import model
import util
import config
from .counter import CountableLazy
from .collection import Collection, AddCollection
import config
import cloudstorage as gcs
from google.appengine.api import im... | 36.067485 | 109 | 0.623575 |
d59ebe497dafb2f2def8fcd67abfbfa78ae30c0a | 6,062 | py | Python | parse_bio_xml.py | sergpolly/Thermal_adapt_scripts | faca767209dc7fa66f35b4738dcdd1b7d3bbac93 | [
"MIT"
] | 2 | 2018-12-05T07:43:39.000Z | 2018-12-05T07:43:42.000Z | parse_bio_xml.py | sergpolly/Thermal_adapt_scripts | faca767209dc7fa66f35b4738dcdd1b7d3bbac93 | [
"MIT"
] | null | null | null | parse_bio_xml.py | sergpolly/Thermal_adapt_scripts | faca767209dc7fa66f35b4738dcdd1b7d3bbac93 | [
"MIT"
] | null | null | null | import re
import os
import sys
from Bio import Seq
from Bio import SeqIO
from Bio import Entrez as ncbi
import xml.etree.ElementTree as ET
import pandas as pd
import itertools
def get_temperature(text):
# options are:
# 1) 35-40
# 2) 98
# 3) 100C
# 4) 34~45
# 5) 35-40C
to_str = lambda tx... | 37.8875 | 223 | 0.682778 |
d59ee15d24e1aa196fcf11da5e1e9acf04c3e72c | 74 | py | Python | lovely/essequence/__init__.py | lovelysystems/lovely.essequence | ff1e3c5ab93896e08a33a94cb8cfbabf8637628c | [
"MIT",
"Unlicense"
] | null | null | null | lovely/essequence/__init__.py | lovelysystems/lovely.essequence | ff1e3c5ab93896e08a33a94cb8cfbabf8637628c | [
"MIT",
"Unlicense"
] | null | null | null | lovely/essequence/__init__.py | lovelysystems/lovely.essequence | ff1e3c5ab93896e08a33a94cb8cfbabf8637628c | [
"MIT",
"Unlicense"
] | null | null | null | VERSION = '0.1.0'
from lovely.essequence.sequence import Sequence # noqa
| 24.666667 | 55 | 0.756757 |
d59f1dcccbd32af829381dd3853ec683d08d3461 | 8,604 | py | Python | src/_repobee/main.py | tohanss/repobee | cf5eb1e83e62c20bbca00c8ad9f798a612e1664f | [
"MIT"
] | null | null | null | src/_repobee/main.py | tohanss/repobee | cf5eb1e83e62c20bbca00c8ad9f798a612e1664f | [
"MIT"
] | null | null | null | src/_repobee/main.py | tohanss/repobee | cf5eb1e83e62c20bbca00c8ad9f798a612e1664f | [
"MIT"
] | null | null | null | """Main entrypoint for the repobee CLI application.
.. module:: main
:synopsis: Main entrypoint for the repobee CLI application.
.. moduleauthor:: Simon Larsén
"""
import argparse
import contextlib
import io
import logging
import os
import pathlib
import sys
from typing import List, Optional, Union, Mapping
from... | 32.345865 | 79 | 0.65516 |
d59f32cba8b848a33f4074fd7a98ce6a5e3c3771 | 5,685 | py | Python | brim/test/unit/test_log.py | gholt/python-brim | d21bc19fde9f8b8dfb5fdfb8ad6585494e4821c1 | [
"Apache-2.0"
] | null | null | null | brim/test/unit/test_log.py | gholt/python-brim | d21bc19fde9f8b8dfb5fdfb8ad6585494e4821c1 | [
"Apache-2.0"
] | null | null | null | brim/test/unit/test_log.py | gholt/python-brim | d21bc19fde9f8b8dfb5fdfb8ad6585494e4821c1 | [
"Apache-2.0"
] | null | null | null | """Tests for brim.log."""
"""Copyright and License.
Copyright 2012-2014 Gregory Holt
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 ... | 33.245614 | 79 | 0.614424 |
d59f6a22649fe0a3869b587b05ce1c52527bd7d3 | 2,213 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/bots/set_bot_commands.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/bots/set_bot_commands.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/bots/set_bot_commands.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.736111 | 103 | 0.625847 |
d59f972e9b0b418635271a0be6d0c169bf4ed258 | 726 | py | Python | test/test_cli.py | jladdjr/ansible-builder | 7520396f8921b98a033a8f25248dbadb9cd83901 | [
"Apache-2.0"
] | null | null | null | test/test_cli.py | jladdjr/ansible-builder | 7520396f8921b98a033a8f25248dbadb9cd83901 | [
"Apache-2.0"
] | null | null | null | test/test_cli.py | jladdjr/ansible-builder | 7520396f8921b98a033a8f25248dbadb9cd83901 | [
"Apache-2.0"
] | null | null | null | from ansible_builder.main import AnsibleBuilder
from ansible_builder.cli import parse_args
def prepare(args):
args = parse_args(args)
return AnsibleBuilder(**vars(args))
def test_custom_image(exec_env_definition_file, tmpdir):
content = {'version': 1}
path = str(exec_env_definition_file(content=cont... | 29.04 | 84 | 0.720386 |
d59fa3a71ab60b32929b085f1e6b0525e0acef4b | 10,205 | py | Python | Doraemon/Crawlers/qq_music_crawler_by_album.py | 131250208/Doraemon | 424f50dfc32f378a104a970a346b587d1f9a5e04 | [
"MIT"
] | 2 | 2019-01-04T03:19:42.000Z | 2021-11-14T16:24:01.000Z | Doraemon/Crawlers/qq_music_crawler_by_album.py | 131250208/Doraemon | 424f50dfc32f378a104a970a346b587d1f9a5e04 | [
"MIT"
] | null | null | null | Doraemon/Crawlers/qq_music_crawler_by_album.py | 131250208/Doraemon | 424f50dfc32f378a104a970a346b587d1f9a5e04 | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
import html
import json
import re
import os
from urllib import parse
from Doraemon.Requests import requests_dora
from tqdm import tqdm
def get_album_list(sin, ein):
url = "https://c.y.qq.com/splcloud/fcgi-bin/fcg_get_diss_by_tag.fcg"
header = {
"user-agent": "Mozilla/5.0 (Windows... | 40.177165 | 804 | 0.591181 |
d59fa76f43cc97e847df2498b17bb21b5cb41f19 | 2,204 | py | Python | datar/tidyr/unite.py | stjordanis/datar | 4e2b5db026ad35918954576badef9951928c0cb1 | [
"MIT"
] | 110 | 2021-03-09T04:10:40.000Z | 2022-03-13T10:28:20.000Z | datar/tidyr/unite.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 54 | 2021-06-20T18:53:44.000Z | 2022-03-29T22:13:07.000Z | datar/tidyr/unite.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 11 | 2021-06-18T03:03:14.000Z | 2022-02-25T11:48:26.000Z | """Unite multiple columns into one by pasting strings together"""
from typing import Union
import pandas
from pandas import DataFrame
from pipda import register_verb
from pipda.utils import CallingEnvs
from ..core.contexts import Context
from ..core.utils import vars_select, reconstruct_tibble
from ..base import se... | 29 | 79 | 0.647459 |
d59fc33686613ad3e43742c2087acf14c14bced9 | 15,049 | py | Python | A6/vae.py | Sundragon1993/CS231n_2020 | 47ebb67491dfedf1d9040866422b6cf369f0fbac | [
"MIT"
] | null | null | null | A6/vae.py | Sundragon1993/CS231n_2020 | 47ebb67491dfedf1d9040866422b6cf369f0fbac | [
"MIT"
] | null | null | null | A6/vae.py | Sundragon1993/CS231n_2020 | 47ebb67491dfedf1d9040866422b6cf369f0fbac | [
"MIT"
] | null | null | null | from __future__ import print_function
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import numpy as np
import torch
import torch.utils.data
from torch import nn, optim
from torch.autograd import Variable
from torch.nn import functional as F
from torchvision import datasets, transforms
from torc... | 56.152985 | 120 | 0.458967 |
d59fce174d7c084800344e19ddfc6e2e930c3269 | 5,910 | py | Python | asposewordscloud/models/requests/get_header_footer_of_section_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/get_header_footer_of_section_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/get_header_footer_of_section_online_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="get_header_footer_of_section_online_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any per... | 47.28 | 149 | 0.667005 |
d59ff44399eb92a588fa498cfb965bd996964b9b | 11,567 | py | Python | Common/pointnet_util.py | qapture/Dis-PU | 539abcfb507af38fa6e7e881db9ab8193a1a8ab7 | [
"Apache-2.0"
] | 41 | 2021-03-04T02:40:51.000Z | 2022-03-30T03:39:17.000Z | Common/pointnet_util.py | qapture/Dis-PU | 539abcfb507af38fa6e7e881db9ab8193a1a8ab7 | [
"Apache-2.0"
] | 9 | 2021-03-22T09:23:37.000Z | 2022-03-05T08:20:57.000Z | Common/pointnet_util.py | qapture/Dis-PU | 539abcfb507af38fa6e7e881db9ab8193a1a8ab7 | [
"Apache-2.0"
] | 6 | 2021-05-15T03:19:48.000Z | 2022-02-21T22:57:47.000Z | """ PointNet++ Layers
Author: Charles R. Qi
Date: November 2017
"""
import os
import sys
sys.path.append(os.path.join(os.getcwd(),"tf_ops/sampling"))
sys.path.append(os.path.join(os.getcwd(),"tf_ops/nn_distance"))
sys.path.append(os.path.join(os.getcwd(),"tf_ops/approxmatch"))
sys.path.append(os.path.join(os.getcwd()... | 52.103604 | 130 | 0.606294 |
d5a04c9b3ce5b5d4c4a7bcd51c878d4f20928dfe | 679 | py | Python | tests/visualization.py | justinchanjinle/data-science-verification-exercise | 52e383a0a64c6db8b17601c007ed187a5ce69ea0 | [
"MIT"
] | null | null | null | tests/visualization.py | justinchanjinle/data-science-verification-exercise | 52e383a0a64c6db8b17601c007ed187a5ce69ea0 | [
"MIT"
] | null | null | null | tests/visualization.py | justinchanjinle/data-science-verification-exercise | 52e383a0a64c6db8b17601c007ed187a5ce69ea0 | [
"MIT"
] | null | null | null | import pandas as pd
import pytest
from src.visualization import get_roc_metrics, plot_roc
from utils.enumerations import Models, Directories, Checksum
from utils.helpers import get_md5
def test_plot_roc(input_data_features: pd.DataFrame):
"""Test for executability and reproducibility"""
model = Models.RAN... | 26.115385 | 73 | 0.752577 |
d5a06a4c867599293195597044d34e40bd2610d7 | 4,055 | py | Python | keystone/assignment/role_backends/ldap.py | yanheven/keystone | 417b8941095f40674575ed951b4a03ebcdc91fef | [
"Apache-2.0"
] | null | null | null | keystone/assignment/role_backends/ldap.py | yanheven/keystone | 417b8941095f40674575ed951b4a03ebcdc91fef | [
"Apache-2.0"
] | null | null | null | keystone/assignment/role_backends/ldap.py | yanheven/keystone | 417b8941095f40674575ed951b4a03ebcdc91fef | [
"Apache-2.0"
] | 1 | 2020-07-02T09:12:28.000Z | 2020-07-02T09:12:28.000Z | # 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
# distributed under t... | 32.18254 | 76 | 0.663872 |
d5a08a6a3c4c9d08453b711c9336446587d0ed3e | 373 | py | Python | tests/app/urls.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | tests/app/urls.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | tests/app/urls.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^sync/', include('mtr.sync.urls')),
]
if settings.DEBUG:
urlpatterns += static(
se... | 26.642857 | 62 | 0.729223 |
d5a09856481484dcaeca60a4e2eaaeb92ac70a27 | 586 | py | Python | toucan_data_sdk/utils/postprocess/percentage.py | vdestraitt/toucan-data-sdk | 09327592daef6bc94d0d6f79a041b581226c2b7b | [
"BSD-3-Clause"
] | null | null | null | toucan_data_sdk/utils/postprocess/percentage.py | vdestraitt/toucan-data-sdk | 09327592daef6bc94d0d6f79a041b581226c2b7b | [
"BSD-3-Clause"
] | null | null | null | toucan_data_sdk/utils/postprocess/percentage.py | vdestraitt/toucan-data-sdk | 09327592daef6bc94d0d6f79a041b581226c2b7b | [
"BSD-3-Clause"
] | null | null | null | def percentage(df, new_column, column, group_cols=None):
"""
Add a column to the dataframe according to the groupby logic on group_cols
:param df: Dataframe
:param new_column: name of the new column
:param column: name of the desired column you need percentage on
:param group_cols: (str | list o... | 39.066667 | 90 | 0.668942 |
d5a099526c96afe31c17dc2cb24200379e605be6 | 2,163 | py | Python | src/glauber.py | AdrianSosic/StarCTBN | 9e0f24ed28053555a7b08cc4e9944745c9c6b74c | [
"MIT"
] | 1 | 2021-06-23T03:03:30.000Z | 2021-06-23T03:03:30.000Z | src/glauber.py | AdrianSosic/StarCTBN | 9e0f24ed28053555a7b08cc4e9944745c9c6b74c | [
"MIT"
] | null | null | null | src/glauber.py | AdrianSosic/StarCTBN | 9e0f24ed28053555a7b08cc4e9944745c9c6b74c | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from potts import Potts_CTBN
class Glauber_CTBN(Potts_CTBN):
"""CTBN with Glauber dynamics."""
def __init__(self, **kwargs):
"""
Parameters
----------
beta : float
Inverse Glauber temperature.
tau: float
... | 23.010638 | 100 | 0.590846 |
d5a0a1e2f36e0151aeca024bdca661f2492373c2 | 949 | py | Python | sdks/python/test/test_AgentQueuesResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_AgentQueuesResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_AgentQueuesResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 23.725 | 97 | 0.726027 |
d5a0a52e4fbf79c9ee6db760a1ffe81d8a016662 | 392 | py | Python | tests/functional/test_regexps.py | Crunch-io/crunchbot | c26a381c10bc5368bd0d208e09ff16d1fb5563ae | [
"MIT"
] | 1 | 2019-04-15T14:04:03.000Z | 2019-04-15T14:04:03.000Z | tests/functional/test_regexps.py | Cloudxtreme/pmxbot | 4b95ed84f1cc60ba0f0fd999ee0a59e6dcf5152e | [
"MIT"
] | 2 | 2018-06-11T20:19:44.000Z | 2020-07-06T03:54:16.000Z | tests/functional/test_regexps.py | Crunch-io/crunchbot | c26a381c10bc5368bd0d208e09ff16d1fb5563ae | [
"MIT"
] | null | null | null | import time
from tests.functional import PmxbotHarness
class TestPmxbotRegexp(PmxbotHarness):
def test_feck(self):
"""
We send a command to the logged channel to make sure that the
reponse happens
"""
self.client.send_message('#logged', 'What the feck?!')
time.sleep(0.2)
assert self.check_logs(
'#l... | 24.5 | 77 | 0.732143 |
d5a0b32c7edb6522bf0d3754e207829c50b06e60 | 2,930 | py | Python | tests/test_autodetect.py | jsfillman/staging_service | eeb82e9eb6dc9ed893572ed9205590bec7bb9f06 | [
"MIT"
] | null | null | null | tests/test_autodetect.py | jsfillman/staging_service | eeb82e9eb6dc9ed893572ed9205590bec7bb9f06 | [
"MIT"
] | null | null | null | tests/test_autodetect.py | jsfillman/staging_service | eeb82e9eb6dc9ed893572ed9205590bec7bb9f06 | [
"MIT"
] | null | null | null | import pytest
from staging_service.autodetect.GenerateMappings import type_to_extension_mapping
from staging_service.AutoDetectUtils import AutoDetectUtils
from staging_service.app import inject_config_dependencies
from tests.test_utils import bootstrap_config
@pytest.fixture(autouse=True)
def run_before_and_after_te... | 31.847826 | 88 | 0.693515 |
d5a0bc664a1cd7f7e7fa9aae942ce7b39b1a0e87 | 855 | py | Python | setup.py | FearlessDoggo21/ccash_python_client | cfc7e6da01d898bb4b9dd9f7489fc7e12f73426b | [
"MIT"
] | 1 | 2021-12-10T07:17:28.000Z | 2021-12-10T07:17:28.000Z | setup.py | FearlessDoggo21/ccash_python_client | cfc7e6da01d898bb4b9dd9f7489fc7e12f73426b | [
"MIT"
] | null | null | null | setup.py | FearlessDoggo21/ccash_python_client | cfc7e6da01d898bb4b9dd9f7489fc7e12f73426b | [
"MIT"
] | null | null | null | #!/bin/python3
# ccash_python_client - ccash python client
# Copyright (C) 2021 FearlessDoggo21
# see LICENCE file for licensing information
# python3 setup.py sdist; twine upload dist/*
from setuptools import setup
with open("README", "r") as file:
desc = file.read()
setup(
name = "ccash_python_... | 26.71875 | 57 | 0.610526 |
d5a0d36f61525e68003ee72334c8fd0f05ca88bf | 16,737 | py | Python | src/kinematics/inverse_kinematics.py | rgaensler/gcode | c6a6b617a04490dedefb2bae7b596a2e12ab4ab1 | [
"MIT"
] | null | null | null | src/kinematics/inverse_kinematics.py | rgaensler/gcode | c6a6b617a04490dedefb2bae7b596a2e12ab4ab1 | [
"MIT"
] | 314 | 2020-02-26T12:37:17.000Z | 2021-08-02T00:32:32.000Z | src/kinematics/inverse_kinematics.py | rgaensler/gcode | c6a6b617a04490dedefb2bae7b596a2e12ab4ab1 | [
"MIT"
] | 2 | 2020-11-12T16:07:48.000Z | 2020-11-16T09:14:48.000Z | from math import atan2, pi, acos, atan, hypot
from typing import List, Optional, Dict
import numpy as np
from src.kinematics.joints import ShoulderSingularity, WristSingularity, WRIST_SINGULARITY_THRESHOLD, \
SHOULDER_SINGULARITY_THRESHOLD
from src.kinematics.forward_kinematics import forward_kinematics, vec3_cro... | 40.427536 | 120 | 0.669535 |
d5a0e296865bc66fc3b052bd8019d05f8a76f154 | 24,946 | py | Python | test/core/likelihood_test.py | deepchatterjeeligo/bilby | 6532c63d0d970ad33478ae0b1c28d4c570b74047 | [
"MIT"
] | null | null | null | test/core/likelihood_test.py | deepchatterjeeligo/bilby | 6532c63d0d970ad33478ae0b1c28d4c570b74047 | [
"MIT"
] | null | null | null | test/core/likelihood_test.py | deepchatterjeeligo/bilby | 6532c63d0d970ad33478ae0b1c28d4c570b74047 | [
"MIT"
] | null | null | null | import unittest
from unittest import mock
import numpy as np
from bilby.core.likelihood import (
Likelihood,
GaussianLikelihood,
PoissonLikelihood,
StudentTLikelihood,
Analytical1DLikelihood,
ExponentialLikelihood,
AnalyticalMultidimensionalCovariantGaussian,
AnalyticalMultidimensionalBi... | 35.739255 | 113 | 0.65273 |
d5a0e5002e0ccb6cb74dc4c5f262993ee0d51c09 | 4,027 | py | Python | alipay/aop/api/request/AlipayMarketingActivityOrdervoucherUseRequest.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/request/AlipayMarketingActivityOrdervoucherUseRequest.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/request/AlipayMarketingActivityOrdervoucherUseRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayMarketingActivityOrdervoucherUseModel import AlipayMarketingActivityOrdervoucherUseModel
class AlipayMarketingActivityOrdervou... | 27.772414 | 148 | 0.649615 |
d5a0efbb3644fb84b3cd0b35c24d8bbfe0212a4e | 4,831 | py | Python | wiktionary/conceptnet.py | gychant/CSKMTermDefn | df77f9370a1ff870cc611079608e08ef05497305 | [
"MIT"
] | 5 | 2021-01-30T17:38:37.000Z | 2022-02-26T07:19:52.000Z | wiktionary/conceptnet.py | gychant/CSKMTermDefn | df77f9370a1ff870cc611079608e08ef05497305 | [
"MIT"
] | 1 | 2021-03-15T09:21:10.000Z | 2021-03-15T14:51:38.000Z | wiktionary/conceptnet.py | gychant/CSKMTermDefn | df77f9370a1ff870cc611079608e08ef05497305 | [
"MIT"
] | 1 | 2021-03-30T23:29:03.000Z | 2021-03-30T23:29:03.000Z | """
Extract ConceptNet subsets
Adapted from https://github.com/INK-USC/KagNet/blob/master/conceptnet/extract_cpnet.py
and https://github.com/INK-USC/KagNet/blob/master/conceptnet/merge_relation.txt
"""
import json
from tqdm import tqdm
relation_groups = [
'atlocation/locatednear',
'capableof',
'causes/ca... | 33.089041 | 92 | 0.572552 |
d5a0f64a234fb8334103da4bbbed16aeab0e95a2 | 4,244 | py | Python | pywicta/image/hillas_parameters.py | jeremiedecock/pywi-cta | 1185f7dfa48d60116472c12ffc423be78a250fc9 | [
"MIT"
] | null | null | null | pywicta/image/hillas_parameters.py | jeremiedecock/pywi-cta | 1185f7dfa48d60116472c12ffc423be78a250fc9 | [
"MIT"
] | 1 | 2018-03-23T15:44:10.000Z | 2018-03-23T15:44:10.000Z | pywicta/image/hillas_parameters.py | jeremiedecock/pywi-cta | 1185f7dfa48d60116472c12ffc423be78a250fc9 | [
"MIT"
] | 1 | 2018-10-02T08:34:53.000Z | 2018-10-02T08:34:53.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Jérémie DECOCK (http://www.jdhp.org)
# This script is provided under the terms and conditions of the MIT license:
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | 43.306122 | 115 | 0.700518 |
d5a11cce5b8697a4d9313992f34e921fa8bf3dad | 551 | py | Python | secretlist.py | cellabus/cellabus-chromebook | ed174f876389d17b9c93daf16f3736e41bde5742 | [
"MIT"
] | 2 | 2017-10-24T02:24:05.000Z | 2017-10-24T03:17:59.000Z | secretlist.py | cellabus/chromebook | ed174f876389d17b9c93daf16f3736e41bde5742 | [
"MIT"
] | null | null | null | secretlist.py | cellabus/chromebook | ed174f876389d17b9c93daf16f3736e41bde5742 | [
"MIT"
] | null | null | null | #
# Setup OAuth2Decorator Class
#
from oauth2client.appengine import OAuth2Decorator
def CreateDecorator(environment):
'Creates the proper OAuth2Decorator for use with AppEngine'
if environment != 'local':
return OAuth2Decorator(
client_id='',
client_secret='',
scope='https://w... | 27.55 | 81 | 0.678766 |
d5a12c0e82d1018e2a7980446073ea93b6e8389c | 1,790 | py | Python | experiments/2014-04-21-motorcycle.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 151 | 2015-01-09T19:25:05.000Z | 2022-01-05T02:05:52.000Z | experiments/2014-04-21-motorcycle.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 1 | 2016-08-04T13:12:51.000Z | 2016-08-04T13:12:51.000Z | experiments/2014-04-21-motorcycle.py | jaesikchoi/gpss-research | 2a64958a018f1668f7b8eedf33c4076a63af7868 | [
"MIT"
] | 59 | 2015-02-04T19:13:58.000Z | 2021-07-28T23:36:09.000Z | Experiment(description='The classic motorcycle time series',
data_dir='../data/motorcycle/',
max_depth=10,
random_order=False,
k=1,
debug=False,
local_computation=False,
n_rand=9,
sd=2,
jitter_sd=0.1,
max_j... | 44.75 | 98 | 0.407821 |
d5a1658a87ed46e879e66b4a6d1886908776b3cc | 2,303 | py | Python | alipay/aop/api/response/AlipayMarketingVoucherBillQueryResponse.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/AlipayMarketingVoucherBillQueryResponse.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/AlipayMarketingVoucherBillQueryResponse.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
from alipay.aop.api.domain.VoucherBill import VoucherBill
class AlipayMarketingVoucherBillQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayMarketingVoucherBillQueryRe... | 31.547945 | 112 | 0.664785 |
d5a184065669b801eb0d218ad695ce2e2d741a48 | 12,582 | py | Python | nova/pci/pci_manager.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | 1 | 2015-01-09T10:49:56.000Z | 2015-01-09T10:49:56.000Z | nova/pci/pci_manager.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/pci/pci_manager.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | 1 | 2020-07-24T06:47:54.000Z | 2020-07-24T06:47:54.000Z | # Copyright (c) 2013 Intel, Inc.
# Copyright (c) 2013 OpenStack Foundation
# 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/li... | 39.196262 | 79 | 0.609124 |
d5a1b27d6e7c7101138d8a62e548ca5c4991cbd7 | 954 | py | Python | python/image_moderation_batch_jobs_token_demo.py | huaweicloudsdk/ais-sdk | 623dd366dc3b26ef2eb949a8284f5b0a55e5b0e6 | [
"Apache-2.0"
] | 48 | 2018-03-13T06:21:46.000Z | 2021-06-23T02:32:14.000Z | python/image_moderation_batch_jobs_token_demo.py | huaweicloudsdk/ais-sdk | 623dd366dc3b26ef2eb949a8284f5b0a55e5b0e6 | [
"Apache-2.0"
] | 29 | 2019-03-27T08:52:38.000Z | 2021-12-14T21:15:11.000Z | python/image_moderation_batch_jobs_token_demo.py | huaweicloudsdk/ais-sdk | 623dd366dc3b26ef2eb949a8284f5b0a55e5b0e6 | [
"Apache-2.0"
] | 38 | 2018-03-22T01:06:51.000Z | 2020-12-30T12:42:42.000Z | # -*- coding:utf-8 -*-
from ais_sdk.gettoken import get_token
from ais_sdk.image_moderation_batch_jobs import image_batch_jobs
from ais_sdk.utils import init_global_env
if __name__ == '__main__':
# Services currently support North China-Beijing 1 (cn-north-1), Asia Pacific-Hong Kong (ap-southeast-1)
init_globa... | 39.75 | 108 | 0.710692 |
d5a20638dee5c7e7e56d8943766f1ee6b7980fb8 | 4,579 | py | Python | fancyflags/_argument_parsers.py | alimuldal/fancyflags | 0ec5468b084830d7a5a11b0d187d81fb4dbab77b | [
"Apache-2.0"
] | 22 | 2021-02-05T09:15:06.000Z | 2021-12-31T09:46:01.000Z | fancyflags/_argument_parsers.py | alimuldal/fancyflags | 0ec5468b084830d7a5a11b0d187d81fb4dbab77b | [
"Apache-2.0"
] | 2 | 2021-09-15T18:27:30.000Z | 2021-11-27T15:34:21.000Z | fancyflags/_argument_parsers.py | alimuldal/fancyflags | 0ec5468b084830d7a5a11b0d187d81fb4dbab77b | [
"Apache-2.0"
] | 4 | 2021-02-14T03:54:31.000Z | 2021-12-09T23:17:20.000Z | # Copyright 2021 DeepMind Technologies Limited.
#
# 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... | 32.942446 | 80 | 0.680061 |
d5a20e15bf88ef4bbd0c91e21b9fff704813ebbd | 6,035 | py | Python | tests/modules/test_module_utils.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tests/modules/test_module_utils.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tests/modules/test_module_utils.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Implement unit tests for the module utils.
"""
import re
from tlsmate import utils
from tlsmate import tls
data = {
"array": [1, 2, 3],
"integer": 4,
"object": {"a": 1, "b": 2},
"string": "hello",
}
json = (
"{\n"
' "array": [\n'
" 1,\n"
" 2,... | 28.601896 | 86 | 0.654515 |
d5a2177f98baf47286e5109f69421474b71cf54b | 1,275 | py | Python | src/django_backend_api/django_backend_api/urls.py | Adityaraj1711/django-backend-architecture | 7f3c270af0cb5dd2ebc097c7436a4958cd48ff7c | [
"MIT"
] | 25 | 2020-04-28T19:25:28.000Z | 2021-07-04T17:24:35.000Z | src/django_backend_api/django_backend_api/urls.py | Adityaraj1711/django-backend-architecture | 7f3c270af0cb5dd2ebc097c7436a4958cd48ff7c | [
"MIT"
] | 13 | 2020-08-05T22:40:37.000Z | 2022-03-12T00:24:36.000Z | src/django_backend_api/django_backend_api/urls.py | Adityaraj1711/django-backend-architecture | 7f3c270af0cb5dd2ebc097c7436a4958cd48ff7c | [
"MIT"
] | 2 | 2020-10-29T13:10:01.000Z | 2021-11-22T01:55:14.000Z | """django_backend_api URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
... | 35.416667 | 106 | 0.734118 |
d5a234b438ba897f73c1eca530df9826600b67e7 | 12,963 | py | Python | dynamic/rpm_uploader.py | DanielOjalvo/execview | f606663437b76a9a0d5d7876c4b26a3b658dac14 | [
"Apache-2.0"
] | null | null | null | dynamic/rpm_uploader.py | DanielOjalvo/execview | f606663437b76a9a0d5d7876c4b26a3b658dac14 | [
"Apache-2.0"
] | null | null | null | dynamic/rpm_uploader.py | DanielOjalvo/execview | f606663437b76a9a0d5d7876c4b26a3b658dac14 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
__doc__ = """
This script will upload JSON files created by rpm_db_builder into the database
created with create_tables.py. This should only need to be run once, then the
data will be available in the database for future queries.
"""
import sys
import time
from json import load
from os import li... | 42.087662 | 184 | 0.436319 |
d5a24660ec95ab87c1a628917cbc7c5b7dc24153 | 6,665 | py | Python | appengine/components/tools/compile_proto.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2017-10-30T15:08:10.000Z | 2017-10-30T15:08:10.000Z | appengine/components/tools/compile_proto.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/components/tools/compile_proto.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | #!/usr/bin/env python
# Copyright 2014 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Compiles all *.proto files it finds into *_pb2.py."""
import logging
import optparse
import os
import re
import shutil
i... | 32.354369 | 80 | 0.694224 |
d5a24b15f07c89efb8a66e4a61f3b96117ae24a5 | 10,775 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_06_01/aio/operations/_management_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_06_01/aio/operations/_management_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_06_01/aio/operations/_management_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # 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 may ... | 46.847826 | 225 | 0.699582 |
d5a27697239c20a3ce17690f8327ca6a9573044e | 30,416 | py | Python | tests/jstests/18_threebot_record_update.py | xmonader/pytfchain | ef28238eeaedda1dd5ea8055ea6dc2ca6baa263c | [
"Apache-2.0"
] | null | null | null | tests/jstests/18_threebot_record_update.py | xmonader/pytfchain | ef28238eeaedda1dd5ea8055ea6dc2ca6baa263c | [
"Apache-2.0"
] | null | null | null | tests/jstests/18_threebot_record_update.py | xmonader/pytfchain | ef28238eeaedda1dd5ea8055ea6dc2ca6baa263c | [
"Apache-2.0"
] | null | null | null | from Jumpscale import j
import pytest
from Jumpscale.clients.blockchain.tfchain.stub.ExplorerClientStub import TFChainExplorerGetClientStub
from Jumpscale.clients.blockchain.tfchain.TFChainClient import ThreeBotRecord
from Jumpscale.clients.blockchain.tfchain.types.ThreeBot import BotName, NetworkAddress
from Jumpsca... | 307.232323 | 10,198 | 0.831437 |
d5a2914146f6e881d1f63f457cad2d4a757be4a2 | 1,093 | py | Python | geomstats/geometry/embedded_manifold.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | geomstats/geometry/embedded_manifold.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | geomstats/geometry/embedded_manifold.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | """Manifold embedded in another manifold."""
import math
from geomstats.geometry.manifold import Manifold
class EmbeddedManifold(Manifold):
"""Class for manifolds embedded in another manifold."""
def __init__(self, dimension, embedding_manifold):
assert isinstance(dimension, int) or dimension == ma... | 33.121212 | 66 | 0.714547 |
d5a29602a50592e414e726d39fb82d8d1856d425 | 2,388 | py | Python | .leetcode/309.best-time-to-buy-and-sell-stock-with-cooldown.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/309.best-time-to-buy-and-sell-stock-with-cooldown.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/309.best-time-to-buy-and-sell-stock-with-cooldown.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=309 lang=python3
#
# [309] Best Time to Buy and Sell Stock with Cooldown
#
# https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/description/
#
# algorithms
# Medium (48.68%)
# Likes: 3917
# Dislikes: 130
# Total Accepted: 202.3K
# Total Submissions: 412.9K
# Testcase... | 20.410256 | 90 | 0.592546 |
d5a2b04ea0d0124d471805cb402a3a1ffc7f2cb2 | 1,489 | py | Python | src/exceptions/messages.py | pBouillon/pynterpreter | 5501d1b59d08b80b3a8cd299cbd2e2e8d2817eae | [
"MIT"
] | 1 | 2018-05-26T00:53:17.000Z | 2018-05-26T00:53:17.000Z | src/exceptions/messages.py | pBouillon/pynterpreter | 5501d1b59d08b80b3a8cd299cbd2e2e8d2817eae | [
"MIT"
] | 11 | 2018-02-08T08:01:57.000Z | 2018-02-23T15:49:08.000Z | src/exceptions/messages.py | pBouillon/pynterpreter | 5501d1b59d08b80b3a8cd299cbd2e2e8d2817eae | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2018 Pierre Bouillon [https://pierrebouillon.tech/]
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 restrict... | 36.317073 | 78 | 0.774345 |
d5a2c58e907336e0612fa8a9793672225a9bedb5 | 65 | py | Python | tests/__init__.py | bird-house/kingfisher | d3623e8e71e1b0e081833e216369926607dfc594 | [
"Apache-2.0"
] | null | null | null | tests/__init__.py | bird-house/kingfisher | d3623e8e71e1b0e081833e216369926607dfc594 | [
"Apache-2.0"
] | 12 | 2018-11-27T15:51:28.000Z | 2019-02-04T14:04:51.000Z | tests/__init__.py | bird-house/kingfisher | d3623e8e71e1b0e081833e216369926607dfc594 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for kingfisher."""
| 16.25 | 39 | 0.584615 |
d5a2cd554c0e23f3b6d5eebb55dfd2f65bf06361 | 5,809 | py | Python | packages/fetchai/protocols/oef_search/custom_types.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | packages/fetchai/protocols/oef_search/custom_types.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | packages/fetchai/protocols/oef_search/custom_types.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2020 fetchai
#
# 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
#
#... | 39.517007 | 165 | 0.684627 |
d5a301cce81044cf14693fe94ae1eae7684222fe | 883 | py | Python | buildscripts/debug_test.py | calcmogul/Robot-2020 | b416c202794fb7deea0081beff2f986de7001ed9 | [
"BSD-3-Clause"
] | 10 | 2020-02-07T04:13:15.000Z | 2022-02-26T00:13:39.000Z | buildscripts/debug_test.py | calcmogul/Robot-2020 | b416c202794fb7deea0081beff2f986de7001ed9 | [
"BSD-3-Clause"
] | 82 | 2020-02-12T03:05:15.000Z | 2022-02-18T02:14:38.000Z | buildscripts/debug_test.py | calcmogul/Robot-2020 | b416c202794fb7deea0081beff2f986de7001ed9 | [
"BSD-3-Clause"
] | 5 | 2020-02-14T16:24:01.000Z | 2022-03-31T09:10:01.000Z | #!/usr/bin/env python3
import os
import platform
import subprocess
if platform.system() == "Linux":
task_os = "linux"
debugger = "gdb"
elif platform.system() == "Darwin":
task_os = "osx"
debugger = "lldb"
elif platform.system() == "Windows":
task_os = "windows"
debugger = "windbg"
# Build tes... | 25.228571 | 67 | 0.674972 |
d5a35675ef89c5f52ee150b9920dd84eee254f53 | 685 | py | Python | setup.py | WISDEM/FrequencyDomain | 5c837c6ea110499c95fccc8d427295620aca7b30 | [
"Apache-2.0"
] | 26 | 2020-08-25T16:16:21.000Z | 2022-03-10T08:23:57.000Z | setup.py | WISDEM/FrequencyDomain | 5c837c6ea110499c95fccc8d427295620aca7b30 | [
"Apache-2.0"
] | 90 | 2020-08-24T23:02:47.000Z | 2022-03-29T13:48:15.000Z | setup.py | WISDEM/FrequencyDomain | 5c837c6ea110499c95fccc8d427295620aca7b30 | [
"Apache-2.0"
] | 25 | 2020-08-24T19:28:24.000Z | 2022-01-27T21:17:37.000Z | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="RAFT",
version="0.1",
author="National Renewable Energy Laboratory",
author_email="matthew.hall@nrel.gov",
description="RAFT: Response Amplitudes of Floating Turbines",
... | 29.782609 | 65 | 0.665693 |
d5a3799009e6fc918b363a745d2e8f1ad470454f | 303 | py | Python | game/models/card.py | pitzer42/micro-tcg | eec416fb3b7b992a206ab900f3d85d172f494103 | [
"MIT"
] | null | null | null | game/models/card.py | pitzer42/micro-tcg | eec416fb3b7b992a206ab900f3d85d172f494103 | [
"MIT"
] | 2 | 2019-06-25T02:15:10.000Z | 2019-06-25T02:22:14.000Z | game/models/card.py | pitzer42/micro-tcg | eec416fb3b7b992a206ab900f3d85d172f494103 | [
"MIT"
] | 1 | 2019-06-12T00:35:41.000Z | 2019-06-12T00:35:41.000Z | from engine.models import assign_dict_to_obj
from game.models.resource import Resource
class Card:
def __init__(self, **kwargs):
self.name: str = None
self.attack: int = 0
self.defense: int = 0
self.cost: Resource = None
assign_dict_to_obj(self, **kwargs)
| 23.307692 | 44 | 0.653465 |
d5a385cce78f91c44f72d491119e024e33dcf405 | 57,607 | py | Python | src/olympia/reviewers/views.py | abhinavraj23/addons-server | b9e3cc09718679d2a72d8e305b79d98d1421c397 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/reviewers/views.py | abhinavraj23/addons-server | b9e3cc09718679d2a72d8e305b79d98d1421c397 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/reviewers/views.py | abhinavraj23/addons-server | b9e3cc09718679d2a72d8e305b79d98d1421c397 | [
"BSD-3-Clause"
] | null | null | null | import functools
import json
import time
from collections import OrderedDict
from datetime import date, datetime, timedelta
from django import http
from django.conf import settings
from django.core.cache import cache
from django.core.exceptions import PermissionDenied
from django.core.paginator import Paginator
from ... | 38.766487 | 79 | 0.674432 |
d5a3d4e6b9b3241bb25201c017f7737d9a30959d | 599 | py | Python | tests/test_config.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | 1 | 2022-01-29T17:14:40.000Z | 2022-01-29T17:14:40.000Z | tests/test_config.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | tests/test_config.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | import pytest
from unit_parse import parser, Quantity, config
examples = [
# complex
['18 mm Hg at 68 °F ; 20 mm Hg at 77° F (NTP, 1992)', [[Quantity('18 mmHg'), Quantity('68 degF')],
[Quantity('20 mmHg'), Quantity('77 degF')]]],
['Sound travels ... | 28.52381 | 104 | 0.54591 |
d5a3de2c5118fae92efe907c5b1af9abccd9817c | 6,378 | py | Python | lib/pt/core/database.py | ace-ecosystem/ptauto | c32d0553c77522180f08445b8b3a8815cb38170f | [
"Apache-2.0"
] | null | null | null | lib/pt/core/database.py | ace-ecosystem/ptauto | c32d0553c77522180f08445b8b3a8815cb38170f | [
"Apache-2.0"
] | null | null | null | lib/pt/core/database.py | ace-ecosystem/ptauto | c32d0553c77522180f08445b8b3a8815cb38170f | [
"Apache-2.0"
] | null | null | null | import json
import logging
import os
from datetime import datetime
from lib.pt.common.config import Config
from sqlalchemy import create_engine, Column
from sqlalchemy import Integer, String, DateTime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.or... | 35.831461 | 79 | 0.577611 |
d5a3e7f690555e2fdc23abfc0aa2bc9c619d4645 | 15,405 | py | Python | gpkit/tests/t_sub.py | appliedopt/gpkit | 647ef0a2a0ff625026943bfd7fb5ca560100898b | [
"MIT"
] | 1 | 2015-01-20T16:02:38.000Z | 2015-01-20T16:02:38.000Z | gpkit/tests/t_sub.py | appliedopt/gpkit | 647ef0a2a0ff625026943bfd7fb5ca560100898b | [
"MIT"
] | 2 | 2015-01-19T21:29:44.000Z | 2015-01-20T15:26:26.000Z | gpkit/tests/t_sub.py | appliedopt/gpkit | 647ef0a2a0ff625026943bfd7fb5ca560100898b | [
"MIT"
] | null | null | null | """Test substitution capability across gpkit"""
import pickle
import unittest
import numpy as np
import numpy.testing as npt
from adce import adnumber, ADV
import gpkit
from gpkit import SignomialsEnabled, NamedVariables
from gpkit import Variable, VectorVariable, Model, Signomial
from gpkit.small_scripts import mag
fr... | 36.332547 | 79 | 0.510613 |
d5a3eae125960b99afcbd6a13a13e890fe286705 | 10,498 | py | Python | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/PWAF/lib/python3.7/site-packages/nose_html_reporting/__init__.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | null | null | null | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/PWAF/lib/python3.7/site-packages/nose_html_reporting/__init__.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | 51 | 2021-04-08T11:39:59.000Z | 2021-05-07T12:01:27.000Z | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/PWAF/lib/python3.7/site-packages/nose_html_reporting/__init__.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | null | null | null | import StringIO
import re
import codecs
import inspect
import os
import traceback
from collections import defaultdict
from datetime import datetime
from jinja2 import Environment
from jinja2 import FileSystemLoader
from nose.exc import SkipTest
from nose.plugins import Plugin
import sys
__version__ = '... | 34.532895 | 112 | 0.57449 |
d5a4146f96a14fe11bed769f6f2e26fae6ec44da | 29,610 | py | Python | misc/shader-processor.py | bqqbarbhg/spear | 727f41fa5197f9681337d1ff37ea63c44708f0d4 | [
"BSD-3-Clause"
] | 29 | 2020-07-27T09:56:02.000Z | 2022-03-28T01:38:07.000Z | misc/shader-processor.py | bqqbarbhg/spear | 727f41fa5197f9681337d1ff37ea63c44708f0d4 | [
"BSD-3-Clause"
] | 3 | 2020-05-29T11:43:20.000Z | 2020-09-04T09:56:56.000Z | misc/shader-processor.py | bqqbarbhg/spear | 727f41fa5197f9681337d1ff37ea63c44708f0d4 | [
"BSD-3-Clause"
] | 2 | 2020-05-29T11:34:46.000Z | 2021-03-08T08:39:07.000Z | import pcpp
import zstd
import re
from collections import namedtuple
import io
import os
import subprocess
import sys
import argparse
cmd_parser = argparse.ArgumentParser(description="Process shaders")
cmd_parser.add_argument("--config", nargs="*", default=[], help="Configurations to process (gles,glsl,hlsl,ios,macos)... | 34.270833 | 142 | 0.56025 |
d5a45cc64459276eee20883b8e586a9725c93b02 | 922 | py | Python | sdks/python/test/test_XamarinSDKBundle.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_XamarinSDKBundle.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_XamarinSDKBundle.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 23.05 | 91 | 0.718004 |
d5a46d8a9d55ce1b4923e6c9cf9835b4f8bb2c6e | 907 | py | Python | tests/eca/eca.py | Thanatoz-1/EmotionStimuli | f7774cf77ec2a66949949905ed70d62117179666 | [
"BSD-3-Clause"
] | null | null | null | tests/eca/eca.py | Thanatoz-1/EmotionStimuli | f7774cf77ec2a66949949905ed70d62117179666 | [
"BSD-3-Clause"
] | 2 | 2021-07-28T10:38:03.000Z | 2021-07-31T10:37:09.000Z | tests/eca/eca.py | Thanatoz-1/EmotionStimuli | f7774cf77ec2a66949949905ed70d62117179666 | [
"BSD-3-Clause"
] | null | null | null | __author__ = "Maximilian Wegge"
from emotion.utils import Data, Dataset
from emotion import HMM
from emotion.evaluation import Evaluation
# read Data from file, only gne, all labels
eca = Data(
filename="data/rectified-unified-with-offsets.json",
roles=["cause"],
corpora=["eca"],
splits=[0.8, 0.2],
)... | 25.194444 | 73 | 0.744212 |
d5a473a71ce1a856efbd1c9c513f12eeb613558c | 2,414 | py | Python | python_modules/dagster/dagster_tests/core_tests/storage_tests/test_run_storage.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/storage_tests/test_run_storage.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/storage_tests/test_run_storage.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import tempfile
from contextlib import contextmanager
import mock
import pytest
from dagster_tests.core_tests.storage_tests.utils.run_storage import TestRunStorage
from dagster.core.storage.runs import InMemoryRunStorage, SqliteRunStorage
@contextmanager
def create_sqlite_run_storage():
with tempfile.TemporaryD... | 28.4 | 93 | 0.719553 |
d5a48dc07aa4a3920d2bb0290ae94356135963b9 | 2,089 | py | Python | supriya/patterns/Pfx.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/patterns/Pfx.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/patterns/Pfx.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import uuid
from supriya.patterns.EventPattern import EventPattern
class Pfx(EventPattern):
### CLASS VARIABLES ###
__slots__ = ("_pattern", "_release_time", "_settings", "_synthdef")
### INITIALIZER ###
def __init__(self, pattern, synthdef, release_time=0.25, **settings):
import supriya.... | 25.47561 | 76 | 0.640977 |
d5a4adf4ae88a4c74788d2da6d9d6754b27b619a | 2,022 | py | Python | numpywren/utils.py | cloudbutton/lithops-array | 5e74b881c7db95eccdccf986f1e3b0dc44603889 | [
"Apache-2.0"
] | null | null | null | numpywren/utils.py | cloudbutton/lithops-array | 5e74b881c7db95eccdccf986f1e3b0dc44603889 | [
"Apache-2.0"
] | null | null | null | numpywren/utils.py | cloudbutton/lithops-array | 5e74b881c7db95eccdccf986f1e3b0dc44603889 | [
"Apache-2.0"
] | null | null | null | import time
BACKOFF = 1
MAX_TRIES = 100
def convert_to_slice(l):
if l is None:
return slice(None, None, None)
elif isinstance(l, int):
return slice(l, l + 1, 1)
elif not isinstance(l, slice):
start = None
stop = None
step = None
if len(l) == 1:
... | 24.071429 | 108 | 0.536597 |
d5a4b24fe3a95be9c80a9fecc6ac4a1aaa1ac11f | 1,319 | py | Python | CodeChef/Practice/CAKEDOOM.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | CodeChef/Practice/CAKEDOOM.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | CodeChef/Practice/CAKEDOOM.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | from copy import deepcopy
def check(arr,k):
for i in range(len(arr)):
if arr[i] == arr[i-1] or arr[i] == '?' or int(arr[i]) >= k:
return False
return True
for t in range(int(input())):
K = int(input())
S = input()
N = len(S)
if N == 1:
if S == '?': print(0)
... | 23.553571 | 67 | 0.396513 |
d5a4d661f42b1b995d8990d88483ebab89ae03cb | 7,629 | py | Python | Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2009 Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 42.149171 | 169 | 0.724079 |
d5a523e97c8871c1b7a642d8e7e1284f0ce9a2ec | 1,492 | py | Python | tracksuite/utils/metrics.py | jimiolaniyan/tracksuite | f05c40e7b78ce2bb623a4ae76c08997a41585152 | [
"MIT"
] | null | null | null | tracksuite/utils/metrics.py | jimiolaniyan/tracksuite | f05c40e7b78ce2bb623a4ae76c08997a41585152 | [
"MIT"
] | 1 | 2020-09-02T07:53:51.000Z | 2020-09-02T07:53:51.000Z | tracksuite/utils/metrics.py | jimiolaniyan/tracksuite | f05c40e7b78ce2bb623a4ae76c08997a41585152 | [
"MIT"
] | null | null | null | import numpy as np
def calculate_iou(bboxes1, bboxes2):
"""
This calculates the intersection over union of N bounding boxes
in the form N x [left, top, right, bottom], e.g for N=2:
>> bb = [[21,34,45,67], [67,120, 89, 190]]
:param bboxes1: np array: N x 4 ground truth bounding boxes
:param bb... | 38.25641 | 84 | 0.656166 |
d5a542427595f0e45d2d5aaf868c31a37c860b8f | 3,876 | py | Python | test/unit/core/test_unit_core_makemethod.py | arielmakestuff/funcext | 87c235c2ef923b793dbbd7d9f80f71466c374da4 | [
"MIT"
] | null | null | null | test/unit/core/test_unit_core_makemethod.py | arielmakestuff/funcext | 87c235c2ef923b793dbbd7d9f80f71466c374da4 | [
"MIT"
] | null | null | null | test/unit/core/test_unit_core_makemethod.py | arielmakestuff/funcext | 87c235c2ef923b793dbbd7d9f80f71466c374da4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# test/unit/core/test_unit_core_makemethod.py
# Copyright (C) 2016 authors and contributors (see AUTHORS file)
#
# This module is released under the MIT License.
"""Unit tests for funcext.core.MakeMethod"""
# ============================================================================
# Import... | 26.547945 | 78 | 0.50903 |
d5a54a7d0ab8f90ca646fcb11337ecf61fc1f3d1 | 23,624 | py | Python | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/aio/operations/_packet_core_data_planes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/aio/operations/_packet_core_data_planes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/aio/operations/_packet_core_data_planes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 may ... | 49.630252 | 268 | 0.698061 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.