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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7312f4e851716d3794419b5dd38d90bc2a4c9307 | 6,195 | py | Python | python3/base/equipments.py | LetMeR00t/SA4BG | 260046db25e68651600bef1d53efabc1e1461d16 | [
"Apache-2.0"
] | null | null | null | python3/base/equipments.py | LetMeR00t/SA4BG | 260046db25e68651600bef1d53efabc1e1461d16 | [
"Apache-2.0"
] | null | null | null | python3/base/equipments.py | LetMeR00t/SA4BG | 260046db25e68651600bef1d53efabc1e1461d16 | [
"Apache-2.0"
] | null | null | null | ## IMPORTS ##
from base.equipment.dice import Dice
from base.equipment.card import Card
from base.equipment.board import Board
from random import shuffle
## CLASS ##
class Equipments():
"""
Define an Equipments class
"""
def __init__(self, cards=[[]], dices=[], board=None):
"""
Default constructor tha... | 22.609489 | 111 | 0.581759 |
7313004b37359bf4ada8bbd09473f2ff1b131e14 | 8,085 | py | Python | tests/scripts/thread-cert/test_srp_server_anycast_mode.py | sarah-iot/openthread | 8210a02400c145eb862b65e32040ed0415ba36c2 | [
"BSD-3-Clause"
] | 69 | 2021-12-16T01:34:09.000Z | 2022-03-31T08:27:39.000Z | tests/scripts/thread-cert/test_srp_server_anycast_mode.py | xuyirio/openthread | 349041bc61e899acdccefea455c3401c05e1318b | [
"BSD-3-Clause"
] | 6 | 2022-01-12T18:22:08.000Z | 2022-03-25T10:19:27.000Z | tests/scripts/thread-cert/test_srp_server_anycast_mode.py | xuyirio/openthread | 349041bc61e899acdccefea455c3401c05e1318b | [
"BSD-3-Clause"
] | 21 | 2021-12-20T09:05:45.000Z | 2022-03-28T02:52:28.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2021, The OpenThread Authors.
# 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 copyright
# ... | 40.223881 | 112 | 0.624613 |
73131dfab7aad3d38a8c7500a4c9067747d17715 | 6,424 | py | Python | python3/knapsack/paretoPoint.py | CostaBru/knapsack | cdd95de759c20b0cdeef4064fbbed10df1ab76d0 | [
"MIT"
] | 1 | 2021-03-06T16:38:28.000Z | 2021-03-06T16:38:28.000Z | python3/knapsack/paretoPoint.py | CostaBru/knapsack | cdd95de759c20b0cdeef4064fbbed10df1ab76d0 | [
"MIT"
] | null | null | null | python3/knapsack/paretoPoint.py | CostaBru/knapsack | cdd95de759c20b0cdeef4064fbbed10df1ab76d0 | [
"MIT"
] | null | null | null | """
Copyright Feb 2021 Konstantin Briukhnov (kooltew at gmail.com) (@CostaBru). San-Francisco Bay Area.
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 limit... | 30.445498 | 146 | 0.644458 |
7313225a59c4421c1b8214183edb6c615fc41fc0 | 3,187 | py | Python | featurizers.py | coleygroup/del_qsar | b55f1d37e250235ad59eb64ebd450ba947cb5aed | [
"MIT"
] | 7 | 2021-09-08T03:34:51.000Z | 2022-03-30T15:28:17.000Z | featurizers.py | coleygroup/del_qsar | b55f1d37e250235ad59eb64ebd450ba947cb5aed | [
"MIT"
] | 4 | 2021-12-04T06:40:37.000Z | 2022-01-17T07:39:56.000Z | featurizers.py | coleygroup/del_qsar | b55f1d37e250235ad59eb64ebd450ba947cb5aed | [
"MIT"
] | 3 | 2021-09-07T03:03:34.000Z | 2022-03-02T03:48:04.000Z | import functools
from rdkit.Chem.Draw import SimilarityMaps
from rdkit.Chem import AllChem
import rdkit.Chem as Chem
import numpy as np
from tqdm import tqdm
from chemprop.data.data import MoleculeDatapoint
FP_SIZE = 2048
FP_RADIUS = 3
class Featurizer(object):
pass
class GraphFeaturizer(Featurizer):
def __... | 33.547368 | 77 | 0.55695 |
73132640177ce6af60a34900069cecc678e49093 | 17,972 | py | Python | src/preprocess/preprocess.py | LeanderLXZ/intelligent-analysis-of-financial-statements | 38bab5bea3c2f22f71020020c8325f6b6b014853 | [
"Apache-2.0"
] | null | null | null | src/preprocess/preprocess.py | LeanderLXZ/intelligent-analysis-of-financial-statements | 38bab5bea3c2f22f71020020c8325f6b6b014853 | [
"Apache-2.0"
] | null | null | null | src/preprocess/preprocess.py | LeanderLXZ/intelligent-analysis-of-financial-statements | 38bab5bea3c2f22f71020020c8325f6b6b014853 | [
"Apache-2.0"
] | 1 | 2021-12-15T02:09:16.000Z | 2021-12-15T02:09:16.000Z | import os
import numpy as np
import pandas as pd
from os.path import join
# Check if directories exit or not
def check_dirs(path_list):
for dir_path in path_list:
if not os.path.isdir(dir_path):
os.makedirs(dir_path)
class DataPreprocess(object):
def __init__(self, data_path, save_path, ... | 42.790476 | 149 | 0.57406 |
73132d7f1c88f42f7231af37b98bcaa4bf5a189c | 417 | py | Python | alkaf_administration/asgi.py | FerdiantJoshua/alkafgrosir-administration | e7ef86b117a98e7f5503d7b5fee91079d0d86932 | [
"MIT"
] | null | null | null | alkaf_administration/asgi.py | FerdiantJoshua/alkafgrosir-administration | e7ef86b117a98e7f5503d7b5fee91079d0d86932 | [
"MIT"
] | 9 | 2020-07-12T23:23:49.000Z | 2022-03-12T00:41:04.000Z | alkaf_administration/asgi.py | FerdiantJoshua/alkafgrosir-administration | e7ef86b117a98e7f5503d7b5fee91079d0d86932 | [
"MIT"
] | null | null | null | """
ASGI config for alkaf_administration project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault(... | 24.529412 | 80 | 0.798561 |
73135f51e3ffc1a7d612eb641b808485b75ecf00 | 988 | py | Python | python/phonenumbers/shortdata/region_CI.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/shortdata/region_CI.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/shortdata/region_CI.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. CI metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_CI = PhoneMetadata(id='CI', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='1\\d{2}', possible_number_pattern='\\d{... | 76 | 131 | 0.783401 |
7313696a9f67c70e3d017a3ec27bec997c50edc4 | 439 | py | Python | cms/admin/static_placeholder.py | fusionbox/django-cms | 3a09d5c39b3469e64aeecc0205a193f5b70c2061 | [
"BSD-3-Clause"
] | null | null | null | cms/admin/static_placeholder.py | fusionbox/django-cms | 3a09d5c39b3469e64aeecc0205a193f5b70c2061 | [
"BSD-3-Clause"
] | null | null | null | cms/admin/static_placeholder.py | fusionbox/django-cms | 3a09d5c39b3469e64aeecc0205a193f5b70c2061 | [
"BSD-3-Clause"
] | null | null | null | from cms.models import StaticPlaceholder
from django.contrib import admin
from cms.admin.placeholderadmin import PlaceholderAdminMixin
class StaticPlaceholderAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
list_display = ('name', 'code', 'creation_method')
search_fields = ('name', 'code',)
exclude = ('cre... | 33.769231 | 70 | 0.779043 |
73136f947e9c33d3f3fbd4f35c51c52c1aba723e | 679 | py | Python | src/graph_transpiler/webdnn/frontend/keras/layers/wrappers.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | src/graph_transpiler/webdnn/frontend/keras/layers/wrappers.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/frontend/keras/layers/wrappers.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | try:
import keras
except ImportError as e:
pass
from webdnn.frontend.keras.converter import KerasConverter
# noinspection PyUnusedLocal
@KerasConverter.register_handler("TimeDistributed")
def _convert_time_distributed(converter: KerasConverter, k_op: "keras.layers.TimeDistributed"):
# TODO
raise NotI... | 32.333333 | 95 | 0.805596 |
731392e05663e4c0fc6ecee9cd23b46309d7b439 | 3,054 | py | Python | bigml/tests/test_26_statistical_test.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:38.000Z | 2021-08-30T20:18:38.000Z | bigml/tests/test_26_statistical_test.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | null | null | null | bigml/tests/test_26_statistical_test.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:40.000Z | 2021-08-30T20:18:40.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015-2019 BigML
#
# 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 requi... | 42.416667 | 100 | 0.641781 |
731395d73702f8f22ac5a98f0ac822a0b7013fe4 | 408 | py | Python | Python-code-snippets-001-100/056-Windows Pop-Up Notification.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-001-100/056-Windows Pop-Up Notification.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-001-100/056-Windows Pop-Up Notification.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | '''
56-Windows Pop-Up Notification
Use Windows pop up notification to show a desktop message.
Tested on Windows 7 and works great.
You may need to "pip install win10toast"
'''
from win10toast import ToastNotifier as toast
pop_up = toast()
pop_up.show_toast("Smeg Alert", \
"Don't forget to turn your ... | 27.2 | 63 | 0.718137 |
7313d471ce80ea0359990240221898c4f437c0ca | 9,963 | py | Python | friday/friday.py | hoojaoh/Friday | 586819a5500aa45144146c19693b8cea3adce520 | [
"MIT"
] | 102 | 2017-01-14T08:22:47.000Z | 2022-01-26T07:42:22.000Z | friday/friday.py | hoojaoh/Friday | 586819a5500aa45144146c19693b8cea3adce520 | [
"MIT"
] | 399 | 2017-01-16T05:29:21.000Z | 2022-03-28T11:46:19.000Z | friday/friday.py | hoojaoh/Friday | 586819a5500aa45144146c19693b8cea3adce520 | [
"MIT"
] | 34 | 2017-01-15T18:53:08.000Z | 2021-11-08T12:04:16.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from friday import ai_interface
from gtts import gTTS
from platform import system
from subprocess import call
from yapsy.PluginManager import PluginManager
import apiai
import click
import os
import re
import sp... | 40.173387 | 114 | 0.602931 |
7313e1884db74de5844ac82128c29879c82c7e2c | 1,954 | py | Python | var/spack/repos/builtin/packages/ntl/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/ntl/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/ntl/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Ntl(Package):
"""
NTL -- a library for doing number theory
NTL is open-source so... | 31.015873 | 96 | 0.656602 |
731415c3d51b144b00d681654b0fff1b0f96605a | 3,492 | py | Python | influxdb_client/domain/notification_endpoint.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/notification_endpoint.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/notification_endpoint.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from influxd... | 32.036697 | 222 | 0.577892 |
731415f3ebfc1fc85ce33deb01c306f9790c2ca3 | 958 | py | Python | repos/system_upgrade/el7toel8/actors/osreleasecollector/tests/unit_test.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/osreleasecollector/tests/unit_test.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/osreleasecollector/tests/unit_test.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | from leapp.libraries.actor.library import get_os_release_info
from leapp.libraries.common import reporting
from leapp.libraries.common.testutils import produce_mocked, report_generic_mocked
from leapp.models import OSReleaseFacts
def test_get_os_release_info(monkeypatch):
monkeypatch.setattr('leapp.libraries.stdl... | 39.916667 | 82 | 0.748434 |
73145c3b542b59c73d1e5ab80627c1c0459b2a3a | 544 | py | Python | study/vstack-hstack-theory.py | CrtomirJuren/npTDMS | cbebbf31d3977af06dbfa7f9602c89627134621d | [
"MIT"
] | 2 | 2021-02-04T05:40:01.000Z | 2021-04-06T14:34:55.000Z | study/vstack-hstack-theory.py | CrtomirJuren/npTDMS | cbebbf31d3977af06dbfa7f9602c89627134621d | [
"MIT"
] | null | null | null | study/vstack-hstack-theory.py | CrtomirJuren/npTDMS | cbebbf31d3977af06dbfa7f9602c89627134621d | [
"MIT"
] | 2 | 2021-02-04T05:40:15.000Z | 2021-12-25T06:07:54.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Dec 5 20:07:37 2020
@author: crtom
"""
import numpy as np
a = np.array([0,1,2])
b = np.array([10,11,12])
c = np.array([101,102,103])
d = np.array([3,4,5])
e = np.array([13,14,15])
f = np.array([104,105,106])
packet_1 = np.vstack((a,b,c))
print(packet_1)
packet_2= np.vsta... | 17 | 39 | 0.632353 |
73145fa0ce12ae87217bfab896d581480e613a20 | 5,504 | py | Python | examples/image_classification/models/cifar/wrn_reparametrized.py | botcs/NGD-SGD | 003ef162bd274c321537d60264969be6e2419ff4 | [
"Apache-2.0"
] | null | null | null | examples/image_classification/models/cifar/wrn_reparametrized.py | botcs/NGD-SGD | 003ef162bd274c321537d60264969be6e2419ff4 | [
"Apache-2.0"
] | null | null | null | examples/image_classification/models/cifar/wrn_reparametrized.py | botcs/NGD-SGD | 003ef162bd274c321537d60264969be6e2419ff4 | [
"Apache-2.0"
] | null | null | null | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
__all__ = ['wrn_reparametrized']
class BasicBlock(nn.Module):
def __init__(self, in_planes, out_planes, stride, dropRate=0.0, reparametrized=False):
super(BasicBlock, self).__init__()
self.register_buffer("reparametriz... | 40.175182 | 116 | 0.586664 |
73146e5d146aec73c3f5c0830b8ea4d7292b2ac7 | 12,058 | py | Python | esky/bdist_esky/f_cxfreeze.py | omnivore/esky | 39e77deacf3e48d4d5d7a46701d9ef0f5593820d | [
"BSD-3-Clause"
] | 1 | 2019-07-11T14:50:07.000Z | 2019-07-11T14:50:07.000Z | esky/bdist_esky/f_cxfreeze.py | omnivore/esky | 39e77deacf3e48d4d5d7a46701d9ef0f5593820d | [
"BSD-3-Clause"
] | null | null | null | esky/bdist_esky/f_cxfreeze.py | omnivore/esky | 39e77deacf3e48d4d5d7a46701d9ef0f5593820d | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd.
# All rights reserved; available under the terms of the BSD License.
"""
esky.bdist_esky.f_cxfreeze: bdist_esky support for cx_Freeze
"""
import os
import sys
import imp
import time
import zipfile
import marshal
import struct
import shutil
import inspect
import... | 40.193333 | 116 | 0.633024 |
7314920e7f63b5baf6759e0a2ad23e7098793d8e | 3,372 | py | Python | alipay/aop/api/domain/AlipayOpenMiniInnerExperienceCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenMiniInnerExperienceCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenMiniInnerExperienceCreateModel.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.constant.ParamConstants import *
class AlipayOpenMiniInnerExperienceCreateModel(object):
def __init__(self):
self._app_origin = None
self._app_version = None
self._bundle_id = None
self._dev_id = None
... | 29.068966 | 73 | 0.584223 |
7314944695a86df05b16d51f4349c6fe9630d4c6 | 17,559 | py | Python | pontoon/sync/vcs/models.py | zbraniecki/pontoon | d559316783938bc66d5d9a52dcdb01137475c259 | [
"BSD-3-Clause"
] | 1 | 2017-04-04T06:55:46.000Z | 2017-04-04T06:55:46.000Z | pontoon/sync/vcs/models.py | zbraniecki/pontoon | d559316783938bc66d5d9a52dcdb01137475c259 | [
"BSD-3-Clause"
] | null | null | null | pontoon/sync/vcs/models.py | zbraniecki/pontoon | d559316783938bc66d5d9a52dcdb01137475c259 | [
"BSD-3-Clause"
] | null | null | null | """
Models for working with remote translation data stored in a VCS.
"""
import logging
import os
import shutil
from itertools import chain
from datetime import datetime
from django.utils import timezone
from django.utils.functional import cached_property
from pontoon.base import MOZILLA_REPOS
from pontoon.sync.exce... | 36.12963 | 119 | 0.619796 |
73149ec00af9bd7d1c3020d287704d408896cdfa | 2,602 | py | Python | tests/h/services/flag_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | tests/h/services/flag_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | 4 | 2020-03-24T17:38:24.000Z | 2022-03-02T05:45:01.000Z | tests/h/services/flag_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from h.services import flag
from h import models
@pytest.mark.usefixtures("flags")
class TestFlagServiceFlagged:
def test_it_returns_true_when_flag_exists(self, svc, flags):
user = flags[-1].user
annotation = flags[-1... | 28.911111 | 86 | 0.68063 |
7314ccd664efbe466815f8d81ecf5a85239358e1 | 1,464 | py | Python | datasets/AESDD/process.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | 3 | 2020-11-03T14:54:22.000Z | 2021-04-12T12:23:10.000Z | datasets/AESDD/process.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | null | null | null | datasets/AESDD/process.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | 2 | 2020-12-03T06:21:59.000Z | 2021-01-16T04:47:12.000Z | """Process the raw AESDD dataset.
This assumes the file structure from the original compressed file:
/.../
anger/
*.wav
disgust/
*.wav
...
"""
from pathlib import Path
import click
from ertk.dataset import resample_audio, write_annotations, write_filelist
from ertk.utils import PathlibPa... | 25.684211 | 81 | 0.630464 |
7314d2e8f54970093df641c90086d965d415cea3 | 12,366 | py | Python | ginga/misc/plugins/Zoom.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/misc/plugins/Zoom.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/misc/plugins/Zoom.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | #
# Zoom.py -- Zoom plugin for 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.
#
import time
from ginga.gw import Widgets, Viewers
from ginga.misc import Bun... | 36.585799 | 89 | 0.610222 |
7314d501e9db1527fdd850d873121398de189024 | 478 | py | Python | leetcode_python/src/algorithms/arrays/best_time_to_buy_and_sell_stocks.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/src/algorithms/arrays/best_time_to_buy_and_sell_stocks.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/src/algorithms/arrays/best_time_to_buy_and_sell_stocks.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | from typing import List
class BestTimeToBuyAndSellStocks:
def calculate(self, days_with_price: List[int]) -> int:
left = 0
right = 1
max_profit = 0
while right < len(days_with_price):
if days_with_price[right] > days_with_price[left]:
max_profit = max... | 23.9 | 92 | 0.585774 |
7314e607722d8956f42502967efa8ac32a8872b0 | 877 | py | Python | Searching-and-sorting/binary-search.py | jen-sjen/data-structures-basics-leetcode | addac32974b16e0a37aa60c210ab7820b349b279 | [
"MIT"
] | 6 | 2021-07-29T03:26:20.000Z | 2022-01-28T15:11:45.000Z | Searching-and-sorting/binary-search.py | jen-sjen/data-structures-basics-leetcode | addac32974b16e0a37aa60c210ab7820b349b279 | [
"MIT"
] | 2 | 2021-09-30T09:47:23.000Z | 2022-01-31T03:08:24.000Z | Searching-and-sorting/binary-search.py | jen-sjen/data-structures-basics-leetcode | addac32974b16e0a37aa60c210ab7820b349b279 | [
"MIT"
] | 5 | 2021-08-10T06:41:11.000Z | 2022-01-29T17:50:20.000Z |
def binary_search_iter(arr, target):
left, right = 0, len(arr) - 1
while left < right:
mid = (left + right) // 2
if arr[mid] == target:
return True
elif arr[mid] > target:
right = mid - 1
else:
left = mid + 1
return False
def binary_sea... | 22.487179 | 52 | 0.533637 |
7315113a64df7e6c16edffb5c1ba050375600089 | 21,362 | py | Python | tests/app/main/views/test_accept_invite.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 16 | 2019-11-05T21:35:49.000Z | 2022-01-12T15:00:32.000Z | tests/app/main/views/test_accept_invite.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 509 | 2019-07-11T22:03:19.000Z | 2022-03-30T15:19:26.000Z | tests/app/main/views/test_accept_invite.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 8 | 2020-02-21T20:19:29.000Z | 2022-03-31T14:17:02.000Z | from unittest.mock import ANY, Mock
import pytest
from bs4 import BeautifulSoup
from flask import url_for
from notifications_python_client.errors import HTTPError
import app
from tests.conftest import (
SERVICE_ONE_ID,
USER_ONE_ID,
active_caseworking_user,
active_user_with_permissions,
)
from tests.co... | 32.415781 | 129 | 0.72203 |
731511ddccd72c394a70d4ef1154f2841b575511 | 2,334 | py | Python | marqeta/response_models/velocity_control_response.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | marqeta/response_models/velocity_control_response.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | marqeta/response_models/velocity_control_response.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from datetime import datetime, date
from marqeta.response_models.spend_control_association import SpendControlAssociation
from marqeta.response_models.merchant_scope import MerchantScope
from marqeta.response_models import datetime_object
import json
import re
class VelocityControlResponse(object):
def __init__(s... | 27.458824 | 110 | 0.703513 |
7315346b40801968f7792d744685af82d860165b | 6,354 | py | Python | src/python/pants/backend/jvm/tasks/jvm_dependency_analyzer.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/tasks/jvm_dependency_analyzer.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/jvm/tasks/jvm_dependency_analyzer.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from abc i... | 43.22449 | 100 | 0.734813 |
73153b9546672b9904e7f5eb918865fc8a5168b6 | 26,301 | py | Python | Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2014, 2016 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 copyright
# notice, this ... | 45.74087 | 153 | 0.658834 |
73154dff0d3f87968924e98df91b53b90ac5e10a | 1,312 | py | Python | embutils/utils/math.py | cwichel/embutils | 188d86d84637088bafef188b3312078048934113 | [
"MIT"
] | null | null | null | embutils/utils/math.py | cwichel/embutils | 188d86d84637088bafef188b3312078048934113 | [
"MIT"
] | null | null | null | embutils/utils/math.py | cwichel/embutils | 188d86d84637088bafef188b3312078048934113 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: ascii -*-
"""
Math utilities.
:date: 2021
:author: Christian Wiche
:contact: cwichel@gmail.com
:license: The MIT License (MIT)
"""
import math
# -->> Definitions <<------------------
# -->> API <<--------------------------
def closest_multi(ref: float, base: float, forc... | 25.230769 | 86 | 0.596799 |
73155b246d63a24d15d61903941e49c7bd81fa15 | 893 | py | Python | beers/test/test_constraints.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | null | null | null | beers/test/test_constraints.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | null | null | null | beers/test/test_constraints.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | null | null | null | from decimal import InvalidOperation
from django.test import TestCase
from django.db.utils import IntegrityError
from beers.test.factories import BeerFactory
class BeerConstraintTestCase(TestCase):
def test_negative_ibu(self):
with self.assertRaises(IntegrityError):
BeerFactory(ibu=-1)
... | 27.060606 | 49 | 0.694289 |
73156afea3e49089b1274668ad0186e52d57ee3f | 20,598 | py | Python | Apps/phdetectionondemand/detectionondemand_connector.py | rgil-splunk/phantom-apps | 7bf0c2a922d63f03dc55770a14aa00e46d00a1af | [
"Apache-2.0"
] | null | null | null | Apps/phdetectionondemand/detectionondemand_connector.py | rgil-splunk/phantom-apps | 7bf0c2a922d63f03dc55770a14aa00e46d00a1af | [
"Apache-2.0"
] | null | null | null | Apps/phdetectionondemand/detectionondemand_connector.py | rgil-splunk/phantom-apps | 7bf0c2a922d63f03dc55770a14aa00e46d00a1af | [
"Apache-2.0"
] | null | null | null | # Python 3 Compatibility imports
from __future__ import print_function, unicode_literals
# Phantom App imports
import phantom.app as phantom
from phantom.vault import Vault
from phantom.base_connector import BaseConnector
from phantom.action_result import ActionResult
# Usage of the consts file is recommended
from de... | 38.429104 | 153 | 0.635887 |
73158ee9ba267061f7d0f7abff314c6611afc8a9 | 7,976 | py | Python | pygsti/circuits/circuitlist.py | maij/pyGSTi | 70e83e05fa689f53550feb3914c4fac40ca4a943 | [
"Apache-2.0"
] | 73 | 2016-01-28T05:02:05.000Z | 2022-03-30T07:46:33.000Z | pygsti/circuits/circuitlist.py | 00mjk/pyGSTi | 4f8bf5337b01b7afcb7b0580b717b5d1fe281be4 | [
"Apache-2.0"
] | 113 | 2016-02-25T15:32:18.000Z | 2022-03-31T13:18:13.000Z | pygsti/circuits/circuitlist.py | 00mjk/pyGSTi | 4f8bf5337b01b7afcb7b0580b717b5d1fe281be4 | [
"Apache-2.0"
] | 41 | 2016-03-15T19:32:07.000Z | 2022-02-16T10:22:05.000Z | """
Defines the CircuitList class, for holding meta-data alongside a list or tuple of Circuits.
"""
# ***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contra... | 40.282828 | 118 | 0.628761 |
73159fd14fafb9fdbb7bc54db8854fdbddb62403 | 4,972 | py | Python | readthedocs/integrations/models.py | gamearming/readthedocs | 53d0094f657f549326a86b8bd0ccf924c2126941 | [
"MIT"
] | null | null | null | readthedocs/integrations/models.py | gamearming/readthedocs | 53d0094f657f549326a86b8bd0ccf924c2126941 | [
"MIT"
] | null | null | null | readthedocs/integrations/models.py | gamearming/readthedocs | 53d0094f657f549326a86b8bd0ccf924c2126941 | [
"MIT"
] | null | null | null | """Integration models for external services"""
import json
import uuid
from django.db import models, transaction
from django.utils.translation import ugettext_lazy as _
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.utils.safestr... | 35.014085 | 80 | 0.66794 |
7315b83324215c81eba51ab8accac64a378bc48f | 3,891 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_form_recognizer_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_form_recognizer_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/v2_0/_form_recognizer_client.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 ... | 39.704082 | 116 | 0.666153 |
7315c9c7ff6e212c2ccc1fa5c7ec592ba12ecd8c | 4,517 | py | Python | src/griffe/mixins.py | pawamoy/griffe | 8465796426fda40fc46f0f1682032be3f6b17aa8 | [
"0BSD"
] | 9 | 2021-09-22T09:01:01.000Z | 2022-01-19T20:43:23.000Z | src/griffe/mixins.py | pawamoy/griffe | 8465796426fda40fc46f0f1682032be3f6b17aa8 | [
"0BSD"
] | 4 | 2021-09-29T18:02:18.000Z | 2022-01-20T17:06:16.000Z | src/griffe/mixins.py | pawamoy/griffe | 8465796426fda40fc46f0f1682032be3f6b17aa8 | [
"0BSD"
] | 1 | 2022-01-21T16:37:52.000Z | 2022-01-21T16:37:52.000Z | """This module contains some mixins classes about accessing and setting members."""
from __future__ import annotations
from typing import Any, Sequence
class GetMembersMixin:
"""This mixin adds a `__getitem__` method to a class.
It makes it easier to access members of an object.
The method expects a `m... | 35.289063 | 106 | 0.610361 |
731617d142c82a5447e62f97a31988f48f1a8f0f | 8,725 | py | Python | deepsim/test/test_deepsim/colliders/test_circle2d_collider.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | 1 | 2022-03-25T07:20:49.000Z | 2022-03-25T07:20:49.000Z | deepsim/test/test_deepsim/colliders/test_circle2d_collider.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | deepsim/test/test_deepsim/colliders/test_circle2d_collider.py | aws-deepracer/deepsim | cad2639f525c2f94ec5c03d8b855cc65b0b8ee55 | [
"Apache-2.0"
] | null | null | null | #################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). ... | 36.506276 | 86 | 0.563095 |
731645ee8e4cc96c6ca0f4c41129718125d72d69 | 38,356 | py | Python | tests/test_modules/test_sngan_proj_archs.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_sngan_proj_archs.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_sngan_proj_archs.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
from copy import deepcopy
import pytest
import torch
from mmgen.models import ProjDiscriminator, SNGANGenerator, build_module
class TestSNGANPROJGenerator(object):
@classmethod
def setup_class(cls):
cls.noise = torch.randn((2, 128))
cls.label ... | 36.390892 | 78 | 0.584055 |
73164c3b75a423c21aaf2a1117ae541987b1f6a0 | 3,933 | py | Python | agent/utils.py | vermouth1992/mbrl_hvac | 2402b1bfa36dff74df669bd1bd1956eb8c346923 | [
"MIT"
] | 2 | 2020-12-22T10:02:59.000Z | 2020-12-22T19:57:55.000Z | agent/utils.py | Sayani21/mbrl-hvac | eb0e2213cc2734b1a8f83e485180cc622ffced5d | [
"MIT"
] | 1 | 2022-03-12T00:52:44.000Z | 2022-03-12T00:52:44.000Z | agent/utils.py | Sayani21/mbrl-hvac | eb0e2213cc2734b1a8f83e485180cc622ffced5d | [
"MIT"
] | 1 | 2021-07-19T15:40:26.000Z | 2021-07-19T15:40:26.000Z | import random
import numpy as np
from sklearn.model_selection import train_test_split
from torchlib.dataset.utils import create_data_loader
from torchlib.deep_rl import BaseAgent
from torchlib.deep_rl.algorithm.model_based.utils import EpisodicDataset
class EpisodicHistoryDataset(EpisodicDataset):
def __init__(s... | 34.80531 | 96 | 0.629291 |
7316528849c2b624d452242157020688a19b0aa2 | 3,667 | py | Python | homeassistant/components/sensor/yahoo_finance.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | 4 | 2017-03-22T21:16:45.000Z | 2021-06-11T05:08:14.000Z | homeassistant/components/sensor/yahoo_finance.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/sensor/yahoo_finance.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | 4 | 2016-11-27T01:59:49.000Z | 2018-03-11T07:17:25.000Z | """
Currency exchange rate support that comes from Yahoo Finance.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.yahoo_finance/
"""
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.components.sensor impor... | 27.992366 | 74 | 0.662122 |
731675c2ea7d15e7a5947ecda5688edbd150735f | 3,777 | py | Python | checkout/forms.py | Wings30306/callingmrschristmas | 2957e4fd3e61e0df4f3135113d52a518eae6270e | [
"PostgreSQL"
] | 4 | 2020-01-31T13:49:43.000Z | 2020-02-05T22:47:51.000Z | checkout/forms.py | Wings30306/callingmrschristmas | 2957e4fd3e61e0df4f3135113d52a518eae6270e | [
"PostgreSQL"
] | 13 | 2019-12-07T12:16:27.000Z | 2022-03-12T00:06:22.000Z | checkout/forms.py | Wings30306/callingmrschristmas | 2957e4fd3e61e0df4f3135113d52a518eae6270e | [
"PostgreSQL"
] | 1 | 2020-02-01T00:23:19.000Z | 2020-02-01T00:23:19.000Z | from django import forms
from .models import Order
class MakePaymentForm(forms.Form):
""" Prepare the form for input of credit card details:
expiry date, credit card number, CVV """
MONTH_CHOICES = [(i, i) for i in range(1, 12+1)]
YEAR_CHOICES = [(i, i) for i in range(2020, 2038)]
credit_card_num... | 43.413793 | 94 | 0.471803 |
7316ac437907ef26ee2a11e6e763b0e032634277 | 9,759 | py | Python | ForgeShortUrl/forgeshorturl/main.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | ForgeShortUrl/forgeshorturl/main.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | ForgeShortUrl/forgeshorturl/main.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # 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 (t... | 36.826415 | 84 | 0.599754 |
7316b1ad8f0eaf2dd9face7d91011b2b1f771380 | 3,731 | py | Python | Q/questionnaire/serializers/serializers_references.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | Q/questionnaire/serializers/serializers_references.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | 477 | 2015-01-07T18:22:27.000Z | 2017-07-17T15:05:48.000Z | Q/questionnaire/serializers/serializers_references.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | ####################
# ES-DOC CIM Questionnaire
# Copyright (c) 2017 ES-DOC. All rights reserved.
#
# University of Colorado, Boulder
# http://cires.colorado.edu/
#
# This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT].
####################
# from dj... | 37.686869 | 117 | 0.689895 |
7316c71453c1850c6616619ba4573bb2d22ccaa6 | 32,621 | py | Python | src/tespy/components/combustion/combustion_chamber_stoich.py | govind-menon110/tespy | 69f00d6e8fa3d9ecc329e71ac9c53f1276fd06ae | [
"MIT"
] | null | null | null | src/tespy/components/combustion/combustion_chamber_stoich.py | govind-menon110/tespy | 69f00d6e8fa3d9ecc329e71ac9c53f1276fd06ae | [
"MIT"
] | null | null | null | src/tespy/components/combustion/combustion_chamber_stoich.py | govind-menon110/tespy | 69f00d6e8fa3d9ecc329e71ac9c53f1276fd06ae | [
"MIT"
] | null | null | null | # -*- coding: utf-8
"""Module of class CombustionChamberStoich.
This file is part of project TESPy (github.com/oemof/tespy). It's copyrighted
by the contributors recorded in the version control history of the file,
available from its original location
tespy/components/combustion/combustion_chamber_stoich.py
SPDX-Li... | 33.423156 | 114 | 0.52316 |
7316c7f84bccd7ca7a73e9529afe49b88eb8652d | 6,036 | py | Python | tempest/api/identity/admin/v3/test_users.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/identity/admin/v3/test_users.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/identity/admin/v3/test_users.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | # Copyright 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/licenses/LICENSE-2.0
#
# Unless requ... | 45.383459 | 78 | 0.631213 |
7316db9cb9495018887e7803d4bb7c61e63a2d1f | 5,409 | py | Python | charms/hss-operator/src/charm.py | charmed-osm/5g-ims | bb902efa575e2e3cf7b97441fc85ace2e917c39b | [
"Apache-2.0"
] | 1 | 2021-06-10T06:53:34.000Z | 2021-06-10T06:53:34.000Z | charms/hss-operator/src/charm.py | charmed-osm/5g-ims | bb902efa575e2e3cf7b97441fc85ace2e917c39b | [
"Apache-2.0"
] | 3 | 2021-08-25T02:30:13.000Z | 2022-02-25T06:08:16.000Z | charms/hss-operator/src/charm.py | charmed-osm/5g-ims | bb902efa575e2e3cf7b97441fc85ace2e917c39b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2020 Tata Elxsi
#
# 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 o... | 33.596273 | 77 | 0.608246 |
7317622f4e7f2070be27b99c2d0d3c5aafca1985 | 32,384 | py | Python | autotest/ogr/ogr_factory.py | szekerest/gdal | 3abdad0a39c56e8f575569f3fa7a25d5265df047 | [
"MIT"
] | 1 | 2015-04-21T19:52:03.000Z | 2015-04-21T19:52:03.000Z | autotest/ogr/ogr_factory.py | szekerest/gdal | 3abdad0a39c56e8f575569f3fa7a25d5265df047 | [
"MIT"
] | 1 | 2016-04-04T09:14:19.000Z | 2016-04-14T19:17:10.000Z | autotest/ogr/ogr_factory.py | pramsey/gdal | 965421b79fe4d3332b0f2f633b072fdcab2b700a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test some geometry factory methods, like arc stroking.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
##################################... | 52.915033 | 638 | 0.607121 |
7317686c259270b5125327481da1cea5a5ca22db | 8,427 | py | Python | toko/subtoken.py | ltgoslo/toko | a32846cbf329020feac6e7b6e06b92a10581a338 | [
"Unlicense",
"MIT"
] | 1 | 2017-09-28T09:05:55.000Z | 2017-09-28T09:05:55.000Z | toko/subtoken.py | ltgoslo/toko | a32846cbf329020feac6e7b6e06b92a10581a338 | [
"Unlicense",
"MIT"
] | null | null | null | toko/subtoken.py | ltgoslo/toko | a32846cbf329020feac6e7b6e06b92a10581a338 | [
"Unlicense",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class Subtoken(object):
def __init__(self, form):
'''
Construct a new Token instance
- form - basically a sentence (whatever is written on each
line of the input file)
- __spaces -- a list of 0s and 1s indicating whether a subtoken
... | 35.707627 | 96 | 0.493651 |
73176db0c93238d36dfd5d00f37420d5506f885f | 1,961 | py | Python | libs/shell.py | PushDotGame/telegram-forward-bot | 40a54aff1a8b10e79fa8a6f611e2371c79869340 | [
"Apache-2.0"
] | 1 | 2020-07-09T02:26:14.000Z | 2020-07-09T02:26:14.000Z | libs/shell.py | PushDotGame/telegram-bots | 40a54aff1a8b10e79fa8a6f611e2371c79869340 | [
"Apache-2.0"
] | null | null | null | libs/shell.py | PushDotGame/telegram-bots | 40a54aff1a8b10e79fa8a6f611e2371c79869340 | [
"Apache-2.0"
] | null | null | null | def _ipython(local, banner):
# noinspection PyUnresolvedReferences
from IPython.terminal.embed import InteractiveShellEmbed
# noinspection PyUnresolvedReferences
from IPython.terminal.ipapp import load_default_config
InteractiveShellEmbed.clear_instance()
shell = InteractiveShellEmbed.in... | 26.863014 | 65 | 0.618562 |
73177ae3586a32954231c321aebe8480fb80b436 | 1,344 | py | Python | migrations/versions/c31fc37a35ed_.py | MohmedH/OpulentGroupDashboard | a071196da0146125b627894178125c1739dfbd7d | [
"MIT"
] | 1 | 2020-12-10T21:11:44.000Z | 2020-12-10T21:11:44.000Z | migrations/versions/c31fc37a35ed_.py | MohmedH/OpulentGroupDashboard | a071196da0146125b627894178125c1739dfbd7d | [
"MIT"
] | null | null | null | migrations/versions/c31fc37a35ed_.py | MohmedH/OpulentGroupDashboard | a071196da0146125b627894178125c1739dfbd7d | [
"MIT"
] | null | null | null | """empty message
Revision ID: c31fc37a35ed
Revises: 29ced810bf4f
Create Date: 2020-07-21 01:24:02.432919
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c31fc37a35ed'
down_revision = '29ced810bf4f'
branch_labels = None
depends_on = None
def upgrade():
# ... | 29.866667 | 87 | 0.629464 |
731790ee7db7ad9bf60d45b6ff2c4bf772d505d5 | 3,056 | py | Python | aries-cloudagent-python/aries_cloudagent/protocols/issue_credential/v1_0/handlers/credential_proposal_handler.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/protocols/issue_credential/v1_0/handlers/credential_proposal_handler.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/protocols/issue_credential/v1_0/handlers/credential_proposal_handler.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | 1 | 2022-02-02T17:05:27.000Z | 2022-02-02T17:05:27.000Z | """Credential proposal message handler."""
from .....indy.issuer import IndyIssuerError
from .....ledger.error import LedgerError
from .....messaging.base_handler import BaseHandler, HandlerException
from .....messaging.request_context import RequestContext
from .....messaging.responder import BaseResponder
from ........ | 38.2 | 87 | 0.631545 |
7317a6930269ed12767410eb83d6a69a93881194 | 1,839 | py | Python | app/user/contact_request.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 41 | 2019-11-28T16:58:41.000Z | 2022-01-28T21:11:16.000Z | app/user/contact_request.py | cds-snc/notification-api | b1c1064f291eb860b494c3fa65ac256ad70bf47c | [
"MIT"
] | 1,083 | 2019-07-08T12:57:24.000Z | 2022-03-08T18:53:40.000Z | app/user/contact_request.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 9 | 2020-01-24T19:56:43.000Z | 2022-01-27T21:36:53.000Z | from dataclasses import dataclass, field, fields
from typing import List
from flask import escape
from notifications_utils.recipients import validate_email_address
__all__ = [
"ContactRequest",
]
@dataclass
class ContactRequest:
email_address: str = field()
tags: List[str] = field(default_factory=lambda... | 33.436364 | 77 | 0.665035 |
7317fdb52c5b79e787a49d71be49f5261d6b1fff | 2,182 | py | Python | tensorflow/contrib/keras/api/keras/metrics/__init__.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/keras/api/keras/metrics/__init__.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/keras/api/keras/metrics/__init__.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.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... | 45.458333 | 80 | 0.812557 |
7318211c92c743f1a89c09add64bf4bd6d1d2ba6 | 578 | py | Python | ucsc_apis/common/__init__.py | scottwedge/ucsc_apis | c7d0de17cb969fb43984035be2dee630fcb1f610 | [
"Apache-2.0"
] | 1 | 2018-08-15T15:13:43.000Z | 2018-08-15T15:13:43.000Z | ucsc_apis/common/__init__.py | scottwedge/ucsc_apis | c7d0de17cb969fb43984035be2dee630fcb1f610 | [
"Apache-2.0"
] | 8 | 2017-02-13T09:09:02.000Z | 2017-12-27T04:05:26.000Z | ucsc_apis/common/__init__.py | scottwedge/ucsc_apis | c7d0de17cb969fb43984035be2dee630fcb1f610 | [
"Apache-2.0"
] | 3 | 2016-11-22T09:49:01.000Z | 2020-10-14T01:23:40.000Z | # Copyright 2017 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 41.285714 | 74 | 0.768166 |
73186ebcb788708eafbe29ff2fa6e501b75f523a | 18,134 | py | Python | tests/changelog.py | python-xy/releases | 19e4b9d0fe4c4e98600baf28bc04e856c709990f | [
"BSD-2-Clause"
] | 5 | 2016-12-05T13:38:59.000Z | 2021-06-27T17:51:05.000Z | tests/changelog.py | python-xy/releases | 19e4b9d0fe4c4e98600baf28bc04e856c709990f | [
"BSD-2-Clause"
] | null | null | null | tests/changelog.py | python-xy/releases | 19e4b9d0fe4c4e98600baf28bc04e856c709990f | [
"BSD-2-Clause"
] | 1 | 2017-08-01T23:19:04.000Z | 2017-08-01T23:19:04.000Z | from tempfile import mkdtemp
from shutil import rmtree
import six
from spec import Spec, eq_, raises
from mock import Mock
from docutils.nodes import (
reference, bullet_list, list_item, raw, paragraph, Text,
)
from sphinx.application import Sphinx
import sphinx
from releases import (
Issue,
issues_role,
... | 35.417969 | 79 | 0.589831 |
73186eede7bdd9c85e4b1df882ad1235c8c7ff2e | 3,721 | py | Python | challenge/agoda_cancellation_prediction.py | Eyal708/IML.HUJI | aa51187d3b45a579c4829acd4c998853968de5b2 | [
"MIT"
] | null | null | null | challenge/agoda_cancellation_prediction.py | Eyal708/IML.HUJI | aa51187d3b45a579c4829acd4c998853968de5b2 | [
"MIT"
] | null | null | null | challenge/agoda_cancellation_prediction.py | Eyal708/IML.HUJI | aa51187d3b45a579c4829acd4c998853968de5b2 | [
"MIT"
] | null | null | null | from challenge.agoda_cancellation_estimator import AgodaCancellationEstimator
import numpy as np
import pandas as pd
from IMLearn.base import BaseEstimator
from sklearn.model_selection import train_test_split
import datetime
def load_data(filename: str):
"""
Load Agoda booking cancellation dataset
Parame... | 37.585859 | 118 | 0.6552 |
7318dba5ec5a49df8e9dfa32d49a6de591c3990e | 862 | py | Python | bin/rename_sciframes.py | wisemanp/des_stacks | 3657dc5abe1003e54c56e689348054c7d49c6e5e | [
"MIT"
] | 1 | 2019-10-23T11:04:15.000Z | 2019-10-23T11:04:15.000Z | bin/rename_sciframes.py | wisemanp/des_stacks | 3657dc5abe1003e54c56e689348054c7d49c6e5e | [
"MIT"
] | null | null | null | bin/rename_sciframes.py | wisemanp/des_stacks | 3657dc5abe1003e54c56e689348054c7d49c6e5e | [
"MIT"
] | null | null | null | '''Script to rename the stacked science frames so they
are more easily accessible when not in the default file structure'''
import os
import glob
from des_stacks.utils.gen_tools import get_des_bands,get_good_des_chips
fields = ['X1','X2','X3','C1','C2','C3','E1','E2','S1','S2']
mys = ['1','2','3','4','5','none']
chi... | 37.478261 | 115 | 0.611369 |
7318dfea144776cf14079a6e58a28350b3989727 | 7,287 | py | Python | test/mgstest/softhsm.py | airtower-luna/mod_gnutls | b6ce8add210095b2b983f63a818f5d157aff9f89 | [
"Apache-2.0"
] | 2 | 2015-04-06T11:28:40.000Z | 2021-07-11T12:34:53.000Z | test/mgstest/softhsm.py | airtower-luna/mod_gnutls | b6ce8add210095b2b983f63a818f5d157aff9f89 | [
"Apache-2.0"
] | 4 | 2020-09-07T19:27:20.000Z | 2021-07-29T19:29:40.000Z | test/mgstest/softhsm.py | airtower-luna/mod_gnutls | b6ce8add210095b2b983f63a818f5d157aff9f89 | [
"Apache-2.0"
] | 1 | 2022-01-26T12:17:17.000Z | 2022-01-26T12:17:17.000Z | # Copyright 2020 Fiona Klute
#
# 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, ... | 32.824324 | 78 | 0.597365 |
73192b556223d2644134091efb8c3c0709aaa7b9 | 6,919 | py | Python | astroutils/kernel_density_estimator.py | nithyanandan/AstroUtils | 97473f52d4247bb9c8507598899215d0662e8d6f | [
"MIT"
] | 1 | 2018-10-31T03:49:39.000Z | 2018-10-31T03:49:39.000Z | astroutils/kernel_density_estimator.py | nithyanandan/AstroUtils | 97473f52d4247bb9c8507598899215d0662e8d6f | [
"MIT"
] | 5 | 2017-11-18T01:45:50.000Z | 2020-05-30T12:26:50.000Z | astroutils/kernel_density_estimator.py | nithyanandan/AstroUtils | 97473f52d4247bb9c8507598899215d0662e8d6f | [
"MIT"
] | 1 | 2019-10-14T08:44:40.000Z | 2019-10-14T08:44:40.000Z | import numpy as NP
import scipy.sparse
import scipy.ndimage
import scipy.stats
import scipy.signal
import matplotlib.pyplot as PLT
def main():
x, y = generate_data(1e7)
grid, extents, density = fast_kde(x, y, sample=True)
image_example(grid, extents)
scatter_example(x, y, density)
PLT.show()
de... | 34.595 | 78 | 0.605434 |
731978913a624c1fa402007c12896290fc9af21e | 592 | py | Python | p16.py | cemulate/python-challenge | 1c3b790d3a32cd51b3bc9ed4d1acc2760405f358 | [
"MIT"
] | null | null | null | p16.py | cemulate/python-challenge | 1c3b790d3a32cd51b3bc9ed4d1acc2760405f358 | [
"MIT"
] | null | null | null | p16.py | cemulate/python-challenge | 1c3b790d3a32cd51b3bc9ed4d1acc2760405f358 | [
"MIT"
] | null | null | null | from PIL import Image
im = Image.open("mozart.gif")
print im
data = im.getdata()
import itertools
newData = []
def findEndpoint(row):
test = lambda i, data: data[i:i+5] == [195]*5
results = [test(i, row) for i in range(len(row))]
return results.index(True)
data = list(data)
data = [data[i:i+640] for i ... | 22.769231 | 53 | 0.636824 |
73197f1a9bca1faac49cb7bcb3c864fa633be7a3 | 25,957 | py | Python | LatticeBERT/run_pretraining_labert.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | 1 | 2021-08-05T05:41:50.000Z | 2021-08-05T05:41:50.000Z | LatticeBERT/run_pretraining_labert.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | null | null | null | LatticeBERT/run_pretraining_labert.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | 1 | 2021-07-10T09:50:47.000Z | 2021-07-10T09:50:47.000Z | # coding=utf-8
# Copyright 2021 The Alibaba DAMO NLP Team Authors.
# Copyright 2018 The Google AI Language Team Authors.
# Copyright (c) 2018, NVIDIA CORPORATION. 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.
... | 39.689602 | 118 | 0.717225 |
7319985088065bc1d4196bc45ff1ef80112960a2 | 1,995 | py | Python | alipay/aop/api/response/AlipayEcoMycarParkingEnterinfoSyncResponse.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/AlipayEcoMycarParkingEnterinfoSyncResponse.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/AlipayEcoMycarParkingEnterinfoSyncResponse.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 AlipayEcoMycarParkingEnterinfoSyncResponse(AlipayResponse):
def __init__(self):
super(AlipayEcoMycarParkingEnterinfoSyncResponse, self).__init__()
self._agreement_sce... | 30.227273 | 115 | 0.683208 |
7319a0da37bb259ca06c07635a8dbfdceaeba1a8 | 6,333 | py | Python | simplivity/ovc_client.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 7 | 2020-02-28T09:03:09.000Z | 2022-03-28T15:52:23.000Z | simplivity/ovc_client.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 47 | 2020-01-16T20:32:19.000Z | 2020-08-27T04:43:00.000Z | simplivity/ovc_client.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 16 | 2020-01-10T14:15:17.000Z | 2021-04-06T13:31:01.000Z | ####
# (C) Copyright [2019] Hewlett Packard Enterprise Development LP
#
# 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 a... | 29.184332 | 113 | 0.639823 |
7319ce556728e7853c364ac570d6648c7db8c96b | 7,393 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_compute_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_compute_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/_compute_management_client_enums.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 ... | 38.305699 | 142 | 0.692412 |
731a066bd77a00aae510d8aa04ffc21461408108 | 6,639 | py | Python | eva_submission/ena_retrieval.py | itsroops/eva-submission | 16c0860e020013ce1d1c2b8a3688676460269f40 | [
"Apache-2.0"
] | null | null | null | eva_submission/ena_retrieval.py | itsroops/eva-submission | 16c0860e020013ce1d1c2b8a3688676460269f40 | [
"Apache-2.0"
] | null | null | null | eva_submission/ena_retrieval.py | itsroops/eva-submission | 16c0860e020013ce1d1c2b8a3688676460269f40 | [
"Apache-2.0"
] | null | null | null | import os.path
from ebi_eva_common_pyutils.config import cfg
from ebi_eva_common_pyutils.logger import logging_config as log_cfg
from ebi_eva_common_pyutils.metadata_utils import get_metadata_connection_handle
from ebi_eva_common_pyutils.pg_utils import get_all_results_for_query, execute_query
from retry import retry
... | 54.418033 | 157 | 0.700105 |
731a1c22d3f4db953ecf2c396c43ae950f0ddb38 | 3,566 | py | Python | rkd/didactic/lib.py | iro-upgto/rkd | 7823781ddc81a9dac18fed55080205e8ed68b57b | [
"MIT"
] | null | null | null | rkd/didactic/lib.py | iro-upgto/rkd | 7823781ddc81a9dac18fed55080205e8ed68b57b | [
"MIT"
] | null | null | null | rkd/didactic/lib.py | iro-upgto/rkd | 7823781ddc81a9dac18fed55080205e8ed68b57b | [
"MIT"
] | null | null | null | """
"""
from rkd.didactic.core import Robot
# from rkd.didactic.transformations import *
from sympy import sin,cos,tan,atan2
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
from rkd.didactic.ws import alpha_shape
__all__ = ["RR_Planar_Robot", ]
class RR_Planar_Robot(Robot):
def __in... | 27.859375 | 73 | 0.482053 |
731a4ff1b40c8a1d132b053a3aaede86ec8aa19f | 9,563 | py | Python | detection/RetinaFace/rcnn/core/module.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | detection/RetinaFace/rcnn/core/module.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | detection/RetinaFace/rcnn/core/module.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | """A `MutableModule` implement the `BaseModule` API, and allows input shape
varying with training iterations. If shapes vary, executors will rebind,
using shared arrays from the initial module binded with maximum shape.
"""
import logging
from mxnet import context as ctx
from mxnet.initializer import Uniform
from mxn... | 36.780769 | 88 | 0.596361 |
731a9fed6340fe2924df2efacf4d9156347e0904 | 4,059 | py | Python | alipay/aop/api/domain/ReceiverIstd.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/domain/ReceiverIstd.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/domain/ReceiverIstd.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.constant.ParamConstants import *
class ReceiverIstd(object):
def __init__(self):
self._address = None
self._address_detail = None
self._city = None
self._coordinate_type = None
self._lat = None
... | 27.80137 | 81 | 0.552106 |
731aa9d600ba7dc7971f6ec99fd2a207128f6e41 | 3,613 | py | Python | baselines/pgpe/npgpe.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | 2 | 2020-08-01T18:19:05.000Z | 2021-06-30T06:37:23.000Z | baselines/pgpe/npgpe.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | null | null | null | baselines/pgpe/npgpe.py | T3p/baselines | 5623c9160d1e86ebca3e673f142fe6b14a1db06c | [
"MIT"
] | 5 | 2018-11-24T16:29:39.000Z | 2021-12-10T03:07:07.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 4 18:13:18 2018
@author: matteo
"""
"""References
PGPE: Sehnke, Frank, et al. "Policy gradients with parameter-based exploration for
control." International Conference on Artificial Neural Networks. Springer,
Berlin, Heidelberg,... | 36.13 | 95 | 0.611403 |
731ab9174415f26d59276c779d64528dacf9ba7d | 800 | py | Python | models/ScatNetAnalysis.py | iclr2021-paper1937/separation_concentration_deepnets | 31a54b5b459f0269bb49e401fe8856c1c7da0343 | [
"BSD-3-Clause"
] | 7 | 2021-03-20T16:21:32.000Z | 2021-12-30T21:03:15.000Z | models/ScatNetAnalysis.py | iclr2021-paper1937/separation_concentration_deepnets | 31a54b5b459f0269bb49e401fe8856c1c7da0343 | [
"BSD-3-Clause"
] | 1 | 2022-02-08T08:39:43.000Z | 2022-02-09T05:24:10.000Z | models/ScatNetAnalysis.py | iclr2021-paper1937/separation_concentration_deepnets | 31a54b5b459f0269bb49e401fe8856c1c7da0343 | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.nn as nn
def hook_fn(grad):
if torch.isnan(grad).any():
grad[torch.isnan(grad)] = 0.
if torch.isinf(grad).any():
grad[torch.isinf(grad)] = 0.
return grad
class ScatNetAnalysis(nn.Module):
def __init__(self, scattering, linear_proj, analysis, classifier):
... | 24.242424 | 70 | 0.62875 |
731ac471b05830894cc36c83e309ace97113259a | 14,197 | py | Python | conpaas-services/src/conpaas/services/mysql/manager/manager.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2015-09-20T18:20:01.000Z | 2015-09-20T18:20:01.000Z | conpaas-services/src/conpaas/services/mysql/manager/manager.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2020-07-27T11:56:18.000Z | 2020-07-27T11:56:18.000Z | conpaas-services/src/conpaas/services/mysql/manager/manager.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 3 | 2018-09-14T16:54:14.000Z | 2020-07-26T03:14:56.000Z | # -*- coding: utf-8 -*-
"""
:copyright: (C) 2010-2013 by Contrail Consortium.
"""
from threading import Thread
import os, tempfile
import string
import sys
from random import choice
from conpaas.core.https.server import HttpJsonResponse, HttpErrorResponse, \
FileUploadField
... | 40.332386 | 159 | 0.602381 |
731b009351e0148ff6dd73369871448f7a9c6d0e | 391 | py | Python | models/enums/analysis.py | gregsmi/sample-metadata | f8d18c3e750475f40147097c2861cc6ffc712a2e | [
"MIT"
] | null | null | null | models/enums/analysis.py | gregsmi/sample-metadata | f8d18c3e750475f40147097c2861cc6ffc712a2e | [
"MIT"
] | 40 | 2021-05-05T23:53:36.000Z | 2022-03-29T23:50:02.000Z | models/enums/analysis.py | gregsmi/sample-metadata | f8d18c3e750475f40147097c2861cc6ffc712a2e | [
"MIT"
] | 2 | 2021-12-13T17:51:20.000Z | 2022-02-23T22:46:57.000Z | from enum import Enum
class AnalysisType(Enum):
"""Types of analysis"""
QC = 'qc'
JOINT_CALLING = 'joint-calling'
GVCF = 'gvcf'
CRAM = 'cram'
CUSTOM = 'custom'
class AnalysisStatus(Enum):
"""Status that an analysis can be run"""
QUEUED = 'queued'
IN_PROGRESS = 'in-progress'
... | 17.772727 | 44 | 0.611253 |
731b1562477d26474a3861dd7dfa62e1d350a9ad | 12,658 | py | Python | automol/reac/_util.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/reac/_util.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/reac/_util.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | 7 | 2019-12-18T20:11:06.000Z | 2020-10-14T08:54:16.000Z | """ Common utilities for reaction classes
"""
import itertools
import automol.graph
from automol.graph import ts
from automol.par import ReactionClass
from automol.reac._reac import reactant_graphs, product_graphs
def hydrogen_migration_atom_keys(rxn):
""" Obtain the atoms involved in a hydrogen migration reacti... | 34.210811 | 82 | 0.681703 |
731b1e8e90e2c73dfa60c981a14575ef8ef1a158 | 3,389 | py | Python | alipay/aop/api/response/AntfortuneStockQualifiedInvestorApplyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AntfortuneStockQualifiedInvestorApplyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AntfortuneStockQualifiedInvestorApplyResponse.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.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.InvestorMaterialInfo import InvestorMaterialInfo
class AntfortuneStockQualifiedInvestorApplyResponse(AlipayResponse):
def __init__(self):
super(Antfortun... | 32.902913 | 118 | 0.677486 |
731b2dcd3dd8f5e62343b5db427cc8690a8641b8 | 1,595 | py | Python | src/data/load_data.py | egy21/churn_model | 6b0d9d5da6a4c3e68748894128164c75cc56accd | [
"MIT"
] | null | null | null | src/data/load_data.py | egy21/churn_model | 6b0d9d5da6a4c3e68748894128164c75cc56accd | [
"MIT"
] | null | null | null | src/data/load_data.py | egy21/churn_model | 6b0d9d5da6a4c3e68748894128164c75cc56accd | [
"MIT"
] | null | null | null | """
to load the external data into the raw folder
"""
import yaml
import argparse
import numpy as np
import pandas as pd
def read_params(config_path):
"""
read parameters from the params.yaml file
input: params.yaml location
output: parametrs as dictionary
"""
with open(config_path) as yaml_fi... | 31.27451 | 113 | 0.705956 |
731b2f12f6c091a3b8be22fbb40cffc1fe30920a | 3,440 | py | Python | docs/conf.py | 3d-pli/fastpli | fe90ac53a7e78d122696bebb4816f4cb953cdb72 | [
"MIT"
] | 13 | 2020-03-21T10:40:36.000Z | 2022-03-20T17:27:56.000Z | docs/conf.py | 3d-pli/fastpli | fe90ac53a7e78d122696bebb4816f4cb953cdb72 | [
"MIT"
] | 11 | 2021-01-30T07:21:52.000Z | 2021-03-16T15:24:41.000Z | docs/conf.py | 3d-pli/fastpli | fe90ac53a7e78d122696bebb4816f4cb953cdb72 | [
"MIT"
] | 6 | 2020-08-27T07:19:30.000Z | 2021-07-20T08:49:11.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:
# https://www.sphinx-doc.org/en/main/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If exte... | 44.675325 | 101 | 0.706395 |
731b583282f945837140647058f951621770c57a | 2,608 | py | Python | autorop/bof/corefile.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | autorop/bof/corefile.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | autorop/bof/corefile.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | from autorop import PwnState, constants
from pwn import tube, process, cyclic, cyclic_find, log, pack
def corefile(state: PwnState) -> PwnState:
"""Find offset to the return address via buffer overflow using corefile.
This function not only finds the offset from the input to the return address
on the sta... | 39.515152 | 84 | 0.670245 |
731b70d4ddde8e6698e601ad8397f77c88576792 | 1,127 | py | Python | python/test/test_authorizations_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/test/test_authorizations_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/test/test_authorizations_api.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 openlattice
from openlattice.api.authori... | 23 | 147 | 0.700089 |
731b7c6a19bed5ae9a32136e03d130f0222b94e7 | 12,847 | py | Python | docs/generate_rst.py | camresp/nitpick | c922dcde1c1e650234343e03bb872cac6500e7b1 | [
"MIT"
] | 251 | 2019-08-06T08:50:01.000Z | 2022-03-26T13:49:19.000Z | docs/generate_rst.py | camresp/nitpick | c922dcde1c1e650234343e03bb872cac6500e7b1 | [
"MIT"
] | 429 | 2019-06-07T09:12:52.000Z | 2022-03-31T23:29:26.000Z | docs/generate_rst.py | camresp/nitpick | c922dcde1c1e650234343e03bb872cac6500e7b1 | [
"MIT"
] | 18 | 2019-08-12T14:16:28.000Z | 2022-03-15T13:54:26.000Z | """Write documentation files content from Python classes.
Run on the dev machine with "invoke doc", and commit on GitHub.
The ``include`` directive is not working on Read the Docs.
It doesn't recognise the "styles" dir anywhere (on the root, under "docs", under "_static"...).
Not even changing ``html_static_path`` on... | 33.986772 | 118 | 0.611505 |
731bcab4cb762c46ecd891eaa9b86eeb8b0e5cc9 | 1,976 | py | Python | test/unit/test_disco_storage.py | Angakkuq/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | null | null | null | test/unit/test_disco_storage.py | Angakkuq/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | 4 | 2016-03-22T17:04:04.000Z | 2016-03-23T18:03:45.000Z | test/unit/test_disco_storage.py | Angakkuit/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | null | null | null | """
Tests of disco_aws
"""
from unittest import TestCase
import random
import dateutil.parser as dateparser
from mock import MagicMock
from moto import mock_ec2
from disco_aws_automation import DiscoStorage
class DiscoStorageTests(TestCase):
'''Test DiscoStorage class'''
@mock_ec2
def setUp(self):
... | 37.283019 | 88 | 0.688765 |
731bcea5f6f288bc2abb957b71f482f0079eb3e8 | 2,029 | py | Python | python/utils/tiff_merge.py | qnano/simflux | 4f149d4e6c997954ac862cc5a7a404855b2a0be9 | [
"MIT"
] | 2 | 2019-12-13T16:24:12.000Z | 2021-03-13T04:02:51.000Z | python/utils/tiff_merge.py | qnano/simflux | 4f149d4e6c997954ac862cc5a7a404855b2a0be9 | [
"MIT"
] | 1 | 2021-01-25T13:32:43.000Z | 2021-01-26T06:03:19.000Z | python/utils/tiff_merge.py | qnano/simflux | 4f149d4e6c997954ac862cc5a7a404855b2a0be9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import tifffile
import tqdm
import os
import numpy as np
import sys
import fnmatch
def scandir(path, pat, cb):
for root, dirs, files in os.walk(path):
head, tail = os.path.split(root)
for file in files:
if fnmatch.fnmatch(file, pat):
fn = os.path.... | 41.408163 | 102 | 0.579103 |
731bdcd79f7ab28a543a1997629be6fc9a6670ef | 379 | py | Python | setup.py | FredrikAppelros/ransac | 1ce13a963e2fc6d3e86edf2b0e3f6ef22ceec177 | [
"MIT"
] | 5 | 2016-04-28T03:32:33.000Z | 2021-04-03T13:30:25.000Z | setup.py | FredrikAppelros/ransac | 1ce13a963e2fc6d3e86edf2b0e3f6ef22ceec177 | [
"MIT"
] | null | null | null | setup.py | FredrikAppelros/ransac | 1ce13a963e2fc6d3e86edf2b0e3f6ef22ceec177 | [
"MIT"
] | 1 | 2016-04-28T03:32:34.000Z | 2016-04-28T03:32:34.000Z | from setuptools import setup
setup(name="ransac",
version='0.1',
description='Robust method for fitting a model to observed data.',
author='Fredrik Appelros, Carl Ekerot',
author_email='fredrik.appelros@gmail.com, kalle@implode.se',
url='https://github.com/FredrikAppelros/ransac',
p... | 29.153846 | 72 | 0.6781 |
731c08c17914b22da670376db249b8cc842bc424 | 2,469 | py | Python | yggdrasil/communication/tests/test_ForkComm.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/communication/tests/test_ForkComm.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/communication/tests/test_ForkComm.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | import uuid
import copy
from yggdrasil.communication.tests import test_CommBase as parent
class TestForkComm(parent.TestCommBase):
r"""Tests for ForkComm communication class."""
comm = 'ForkComm'
attr_list = (copy.deepcopy(parent.TestCommBase.attr_list)
+ ['comm_list', 'curr_comm_index']... | 35.271429 | 89 | 0.641555 |
731c45c5fbdd8fb1b336c7f4e1e8b5a99e443fb8 | 1,847 | py | Python | neb/bond.py | cstein/neb | 8bf59ef16819841d0839d6875c5935a681e0c405 | [
"MIT"
] | 20 | 2016-12-13T19:38:19.000Z | 2022-02-11T08:40:40.000Z | neb/bond.py | cstein/neb | 8bf59ef16819841d0839d6875c5935a681e0c405 | [
"MIT"
] | null | null | null | neb/bond.py | cstein/neb | 8bf59ef16819841d0839d6875c5935a681e0c405 | [
"MIT"
] | 6 | 2017-03-02T16:59:44.000Z | 2021-01-25T10:06:17.000Z | import numpy
class Bond(object):
""" A bond between two Atom objects.
Currently, there is no reference to the actual Atom objects but instead
they are indexed with integers in from the parent molecule class.
"""
def __init__(self, id1, id2):
self._id1 = id1
self._id2 = id2... | 31.844828 | 82 | 0.582566 |
731c4f342045d2de6654bb854ce64a0fb9099447 | 6,794 | py | Python | mitmproxy/addons/export.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/addons/export.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/addons/export.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | import shlex
from collections.abc import Callable, Sequence
from typing import Any, Union
import pyperclip
import mitmproxy.types
from mitmproxy import command
from mitmproxy import ctx, http
from mitmproxy import exceptions
from mitmproxy import flow
from mitmproxy.net.http.http1 import assemble
from mitmproxy.utils... | 32.352381 | 89 | 0.639682 |
731c54bce7e08345b5cbf843e56234b44d3e47ce | 6,282 | py | Python | netgpibdata/netgpib.py | daccordeon/summerSHG | 4e9254b408bb04ddd7b4b5ae1c8db0d23c72f88f | [
"BSD-3-Clause"
] | 1 | 2020-12-06T23:40:21.000Z | 2020-12-06T23:40:21.000Z | netgpibdata/netgpib.py | daccordeon/summerSHG | 4e9254b408bb04ddd7b4b5ae1c8db0d23c72f88f | [
"BSD-3-Clause"
] | null | null | null | netgpibdata/netgpib.py | daccordeon/summerSHG | 4e9254b408bb04ddd7b4b5ae1c8db0d23c72f88f | [
"BSD-3-Clause"
] | null | null | null | import sys
#import math
import socket
import time
#import pdb
import select
import struct
import termstatus
class netGPIB:
def __init__(self, ip, gpibAddr, eot=b'\004', debug=0,
auto=False, log=False, tSleep=0):
# End of Transmission character
self.eot = eot
# EOT charact... | 32.890052 | 84 | 0.510825 |
731c55149173f18b51b72e46046753f622505856 | 1,680 | py | Python | sprint-challenge/acme.py | mljarman/DS-Unit-3-Sprint-1-Software-Engineering | aa96f9c260d78cb398a3a96c1e8739f43ca31dac | [
"MIT"
] | null | null | null | sprint-challenge/acme.py | mljarman/DS-Unit-3-Sprint-1-Software-Engineering | aa96f9c260d78cb398a3a96c1e8739f43ca31dac | [
"MIT"
] | null | null | null | sprint-challenge/acme.py | mljarman/DS-Unit-3-Sprint-1-Software-Engineering | aa96f9c260d78cb398a3a96c1e8739f43ca31dac | [
"MIT"
] | null | null | null | import random
from random import randint, sample, uniform
class Product:
"""
Implements an organization of Acme Corporation's goods.
"""
def __init__(self, name, price=10, weight=20, flammability=.5,
identifier=random.randint(1000000, 9999999)):
self.name = name
self.p... | 25.074627 | 67 | 0.532143 |
731c55de71e8d4b7db156f1ae72172c36eb1be7a | 20,412 | py | Python | fluid/DeepASR/data_utils/async_data_reader.py | wojtuss/models | 5d1dc2ff7d3355984c469f0906d24447b58a5ffe | [
"Apache-2.0"
] | null | null | null | fluid/DeepASR/data_utils/async_data_reader.py | wojtuss/models | 5d1dc2ff7d3355984c469f0906d24447b58a5ffe | [
"Apache-2.0"
] | null | null | null | fluid/DeepASR/data_utils/async_data_reader.py | wojtuss/models | 5d1dc2ff7d3355984c469f0906d24447b58a5ffe | [
"Apache-2.0"
] | 1 | 2018-09-10T02:11:21.000Z | 2018-09-10T02:11:21.000Z | """This module contains data processing related logic.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import random
import struct
import Queue
import time
import numpy as np
from threading import Thread
import signal
from multiprocessing import Manager,... | 44.373913 | 80 | 0.568489 |
731c60b81cf0797cd3519c6adefd216d3b6d6817 | 39,570 | py | Python | google/cloud/compute_v1/services/region_target_http_proxies/client.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/region_target_http_proxies/client.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/region_target_http_proxies/client.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 44.410774 | 107 | 0.629189 |
731c672e10953235aae095777288508fb3266999 | 4,014 | py | Python | HRI/TFVT_HRI/perception/utterance/eval.py | WorldEditors/PaddleRobotics | d02efd74662c6f78dfb964e8beb93f1914dcb2f3 | [
"Apache-2.0"
] | 146 | 2020-12-08T11:51:38.000Z | 2022-03-23T12:58:43.000Z | HRI/TFVT_HRI/perception/utterance/eval.py | WorldEditors/PaddleRobotics | d02efd74662c6f78dfb964e8beb93f1914dcb2f3 | [
"Apache-2.0"
] | 10 | 2020-12-23T03:00:31.000Z | 2022-03-23T09:55:30.000Z | HRI/TFVT_HRI/perception/utterance/eval.py | WorldEditors/PaddleRobotics | d02efd74662c6f78dfb964e8beb93f1914dcb2f3 | [
"Apache-2.0"
] | 43 | 2020-12-21T09:40:39.000Z | 2022-03-31T06:41:32.000Z | import os
from paddle import fluid
from perception.common.utils import load_vocab
from perception.utterance.tokenizer import WordpieceTokenizer
from perception.utterance.bow import BoW
from perception.utterance.ernie_v1 import ErnieConfig, ErnieModel, \
convert_example_to_record, pad_batch_records
class Utteranc... | 36.825688 | 78 | 0.602392 |
731c6f7d386cf609339465d47287492b247ae712 | 2,820 | py | Python | setup.py | renovate-bot/python-securitycenter | 6472a2d563c9071cfa1bea577786f2292963cc20 | [
"Apache-2.0"
] | null | null | null | setup.py | renovate-bot/python-securitycenter | 6472a2d563c9071cfa1bea577786f2292963cc20 | [
"Apache-2.0"
] | null | null | null | setup.py | renovate-bot/python-securitycenter | 6472a2d563c9071cfa1bea577786f2292963cc20 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 32.045455 | 74 | 0.689362 |
731ce4aa749c096036fbbde4094a9c477bbe3859 | 1,807 | py | Python | tests/test_db.py | AntiCompositeNumber/acnutils | 30dbd024acf7fb11106a25cd26a11551b73bcb0f | [
"Apache-2.0"
] | null | null | null | tests/test_db.py | AntiCompositeNumber/acnutils | 30dbd024acf7fb11106a25cd26a11551b73bcb0f | [
"Apache-2.0"
] | 1 | 2021-10-19T20:13:23.000Z | 2021-10-19T20:13:23.000Z | tests/test_db.py | AntiCompositeNumber/acnutils | 30dbd024acf7fb11106a25cd26a11551b73bcb0f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
# SPDX-License-Identifier: Apache-2.0
# Copyright 2020 AntiCompositeNumber
# 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/l... | 33.462963 | 86 | 0.759823 |
731ce65c3f84281b8876b196895b126b5320784f | 328 | py | Python | ibis/backends/spark/tests/test_numeric.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-08-04T08:29:44.000Z | 2020-08-04T08:29:44.000Z | ibis/backends/spark/tests/test_numeric.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-10-02T23:51:48.000Z | 2020-10-03T00:54:29.000Z | ibis/backends/spark/tests/test_numeric.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 2 | 2020-11-27T22:21:50.000Z | 2021-04-03T09:36:25.000Z | import pytest
import ibis
pytestmark = pytest.mark.spark
def test_double_format(client):
expr = ibis.literal(1.0)
assert client.compile(expr) == 'SELECT 1.0d AS `tmp`'
def test_float_format(client):
expr = ibis.literal(1.0, type='float')
assert client.compile(expr) == 'SELECT CAST(1.0 AS FLOAT) AS... | 20.5 | 71 | 0.692073 |
731cf037e60fcff91f36b25a7a88c8c5dd1276ca | 1,253 | py | Python | services/traction/api/db/models/tenant_webhook_msg.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | null | null | null | services/traction/api/db/models/tenant_webhook_msg.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | null | null | null | services/traction/api/db/models/tenant_webhook_msg.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | null | null | null | import uuid
from datetime import datetime
from typing import Optional
from sqlmodel import Field
from api.db.models.base import BaseModel, BaseTable
class TenantWebhookMsgBase(BaseModel):
msg_id: uuid.UUID = Field(nullable=False)
payload: str = Field(nullable=False)
# if the hook fails, record the respo... | 29.833333 | 81 | 0.747805 |
731cfdba19059c54cf0ab098fc5d8b3fa1856460 | 23 | py | Python | solrcloudadmin/__init__.py | imacube/solrcloudadmin | 02070442c22c9099378d339b742a176b1ec5785d | [
"Apache-2.0"
] | null | null | null | solrcloudadmin/__init__.py | imacube/solrcloudadmin | 02070442c22c9099378d339b742a176b1ec5785d | [
"Apache-2.0"
] | null | null | null | solrcloudadmin/__init__.py | imacube/solrcloudadmin | 02070442c22c9099378d339b742a176b1ec5785d | [
"Apache-2.0"
] | null | null | null | __version__ = '0.16.8'
| 11.5 | 22 | 0.652174 |
731d12806b1538d5512856fdecfc830edfc4290a | 2,030 | py | Python | layer_cake/utils.py | bcsaller/layercake | c980f56d678ec4333f891b74b7e8be242330de38 | [
"Apache-2.0"
] | 3 | 2016-06-13T17:21:08.000Z | 2016-09-20T02:08:54.000Z | layer_cake/utils.py | bcsaller/disco | c980f56d678ec4333f891b74b7e8be242330de38 | [
"Apache-2.0"
] | 3 | 2016-07-22T20:31:43.000Z | 2021-03-25T21:43:54.000Z | layer_cake/utils.py | bcsaller/disco | c980f56d678ec4333f891b74b7e8be242330de38 | [
"Apache-2.0"
] | 1 | 2017-01-30T22:45:15.000Z | 2017-01-30T22:45:15.000Z | import collections
import copy
def freeze(o):
if isinstance(o, dict):
return frozenset({k: freeze(v) for k, v in o.items()}.items())
if isinstance(o, list):
return tuple([freeze(v) for v in o])
return o
def make_hash(o):
return hash(freeze(o))
def nested_get(dict, path, default=N... | 23.604651 | 70 | 0.550739 |
731d4d34eff5c295ab8f64f020b3eeecc01d2216 | 10,741 | py | Python | partnerclient/decision_module/decision_module/views.py | NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention | 4facd935920e77239c25323ca7e233cb899ba9f5 | [
"Apache-2.0"
] | 7 | 2015-07-15T06:47:16.000Z | 2020-10-17T20:51:09.000Z | partnerclient/decision_module/decision_module/views.py | NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention | 4facd935920e77239c25323ca7e233cb899ba9f5 | [
"Apache-2.0"
] | null | null | null | partnerclient/decision_module/decision_module/views.py | NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention | 4facd935920e77239c25323ca7e233cb899ba9f5 | [
"Apache-2.0"
] | 8 | 2017-01-30T02:27:01.000Z | 2021-04-21T04:15:48.000Z | '''
Copyright (C) 2013 TopCoder Inc., All Rights Reserved.
'''
'''
This is the module that defines all the views which will respond to client requests.
Thread Safety:
The implementation is not thread safe but it will be used in a thread-safe manner.
v1.1 - Healthcare Fraud Prevention Release Assembly v1.0
- upda... | 35.448845 | 113 | 0.63225 |
731d857322d610c9c6b8777431a0aa947b49f8de | 2,756 | py | Python | docs/source/conf.py | NIB-SI/squad-reboot | 8d32527eddc1ee04d8f0f00b8a744dbd84f811f1 | [
"MIT"
] | null | null | null | docs/source/conf.py | NIB-SI/squad-reboot | 8d32527eddc1ee04d8f0f00b8a744dbd84f811f1 | [
"MIT"
] | 1 | 2021-05-13T12:36:35.000Z | 2021-05-13T12:36:35.000Z | docs/source/conf.py | NIB-SI/BoolDoG | a638f9b2e131d2a381f6a81d6791e1436d101b9e | [
"MIT"
] | 1 | 2020-06-10T09:08:02.000Z | 2020-06-10T09:08:02.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:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 29.956522 | 79 | 0.672714 |
731da0efc1177a256cde29d9a3785f2b32e716e2 | 16,052 | py | Python | eucaconsole/forms/scalinggroups.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | eucaconsole/forms/scalinggroups.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | eucaconsole/forms/scalinggroups.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013-2014 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software 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... | 41.264781 | 122 | 0.700162 |
731da94ef476ef78e76e35475d4094220645d73e | 714 | py | Python | manage/sawtooth_manage/__init__.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | 1 | 2017-08-04T10:31:00.000Z | 2017-08-04T10:31:00.000Z | manage/sawtooth_manage/__init__.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | 1 | 2021-12-09T23:11:26.000Z | 2021-12-09T23:11:26.000Z | manage/sawtooth_manage/__init__.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 32.454545 | 80 | 0.651261 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.