hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ec04e5135fa261ff9489378efbc847aee16c977a | 1,095 | py | Python | flowcat/test/test_som.py | xiamaz/flowCat | 5fea92eff3112ea3bb669595b469735b2bfa3938 | [
"MIT"
] | 4 | 2020-03-06T14:06:12.000Z | 2021-06-25T15:03:54.000Z | flowcat/test/test_som.py | xiamaz/flowCat | 5fea92eff3112ea3bb669595b469735b2bfa3938 | [
"MIT"
] | 3 | 2020-03-25T10:54:52.000Z | 2020-11-26T19:06:23.000Z | flowcat/test/test_som.py | xiamaz/flowCat | 5fea92eff3112ea3bb669595b469735b2bfa3938 | [
"MIT"
] | 2 | 2020-04-14T11:26:25.000Z | 2021-04-02T19:25:52.000Z | import unittest
import numpy as np
from numpy.testing import assert_array_equal
from flowcat.types import som
class TestSOM(unittest.TestCase):
def test_init(self):
testsom = som.SOM(np.array([
[[3, 4], [1, 2],],
[[5, 6], [7, 8],],
]), ["A", "B"])
self.assertEqua... | 27.375 | 55 | 0.451142 |
03ed436b62190d2c3fc436b96e40940283c6487b | 10,043 | py | Python | dataset/pascal_voc.py | jacke121/X-Detector | a24e370a5acb6f5c29cd5db81fa4270f2697b8c1 | [
"Apache-2.0"
] | null | null | null | dataset/pascal_voc.py | jacke121/X-Detector | a24e370a5acb6f5c29cd5db81fa4270f2697b8c1 | [
"Apache-2.0"
] | null | null | null | dataset/pascal_voc.py | jacke121/X-Detector | a24e370a5acb6f5c29cd5db81fa4270f2697b8c1 | [
"Apache-2.0"
] | null | null | null | # --------------------------------------------------------
# RON
# Licensed under The MIT License [see LICENSE for details]
# Written by Kong Tao
# date Nov.18, 2016
# --------------------------------------------------------
from voc_eval import voc_eval
import datasets
import datasets.pascal_voc
import os
import datas... | 40.011952 | 87 | 0.545255 |
29ffe43550ea472bb9d83616e3a5468b561466ec | 7,286 | py | Python | rois/xmlsettings.py | SPC-Admin/ScrippsPlanktonCameras | c3737347513ce81e5afbe798b947fe603c64590f | [
"MIT"
] | null | null | null | rois/xmlsettings.py | SPC-Admin/ScrippsPlanktonCameras | c3737347513ce81e5afbe798b947fe603c64590f | [
"MIT"
] | null | null | null | rois/xmlsettings.py | SPC-Admin/ScrippsPlanktonCameras | c3737347513ce81e5afbe798b947fe603c64590f | [
"MIT"
] | null | null | null | #
# python module xmlsettings.py
#
# Version: 1.0.0b
# Author: Alejandro Lopez Correa
# Contact: alc@spika.net
# URL: http://spika.net/py/xmlsettings/
# License: MIT License
#
# Tested with python 2.7 and 3.2
#
# Copyright (c) 2013 Alejandro Lopez Correa
#
# MIT License
#
# Permission is hereby gran... | 36.79798 | 96 | 0.546253 |
16ee7c86c338f5eb36a0cf2f32d90fa9cc4ded3a | 74,208 | py | Python | tests/unit/gapic/resourcesettings_v1/test_resource_settings_service.py | LaudateCorpus1/python-resource-settings | 4059c1c704803e60a7341b483ead53defa8ac39a | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/resourcesettings_v1/test_resource_settings_service.py | LaudateCorpus1/python-resource-settings | 4059c1c704803e60a7341b483ead53defa8ac39a | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/resourcesettings_v1/test_resource_settings_service.py | LaudateCorpus1/python-resource-settings | 4059c1c704803e60a7341b483ead53defa8ac39a | [
"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... | 38.192486 | 144 | 0.686921 |
54a8f96526cfed6908171afe03b5afa3ed12a083 | 7,105 | py | Python | uq_benchmark_2019/gaussian_process_kernels.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-19T04:26:12.000Z | 2022-03-19T04:26:12.000Z | uq_benchmark_2019/gaussian_process_kernels.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | uq_benchmark_2019/gaussian_process_kernels.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# 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 applicab... | 33.672986 | 76 | 0.665447 |
1faa0c5d08f4bd3a6e7c2c2db68aaa7e6eb331c1 | 1,778 | py | Python | aliyun-python-sdk-ens/aliyunsdkens/request/v20171110/DescribeApplicationRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ens/aliyunsdkens/request/v20171110/DescribeApplicationRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ens/aliyunsdkens/request/v20171110/DescribeApplicationRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"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 (the
# "License"); you may not u... | 37.041667 | 78 | 0.755906 |
f3663f8a9b94720b449cd75b8db87c2f226248cd | 865 | py | Python | tf_verify/spatial/__init__.py | dimy93/eran | 97213776efb21def5e88140276a0cc496897dcc5 | [
"Apache-2.0"
] | 254 | 2018-11-14T15:43:01.000Z | 2022-03-24T09:29:12.000Z | tf_verify/spatial/__init__.py | dimy93/eran | 97213776efb21def5e88140276a0cc496897dcc5 | [
"Apache-2.0"
] | 93 | 2018-11-15T02:37:37.000Z | 2022-03-31T07:37:45.000Z | tf_verify/spatial/__init__.py | dimy93/eran | 97213776efb21def5e88140276a0cc496897dcc5 | [
"Apache-2.0"
] | 109 | 2018-11-14T17:04:00.000Z | 2022-03-13T15:45:45.000Z | """
Copyright 2020 ETH Zurich, Secure, Reliable, and Intelligent Systems Lab
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... | 39.318182 | 74 | 0.801156 |
ae3b10ec24c6d6eb5ad068d49c54f14f29a20c26 | 4,509 | py | Python | model/attentions.py | Felix2048/babywalk | f50f2600212603444a7195d1e67b6f29a783003e | [
"MIT"
] | 34 | 2020-05-13T05:44:25.000Z | 2021-11-05T02:08:35.000Z | model/attentions.py | hexiang-hu/babywalk | bced1117c3b6c08793c9c8f5f6303368b25c9bb8 | [
"MIT"
] | 5 | 2020-05-13T10:08:50.000Z | 2022-01-29T11:39:11.000Z | model/attentions.py | hexiang-hu/babywalk | bced1117c3b6c08793c9c8f5f6303368b25c9bb8 | [
"MIT"
] | 6 | 2020-05-13T17:22:49.000Z | 2021-09-19T09:28:04.000Z | import torch
import torch.nn as nn
class SoftDotAttention(nn.Module):
'''Soft Dot Attention.
Ref: http://www.aclweb.org/anthology/D15-1166
Adapted from PyTorch OPEN NMT.
'''
def __init__(self, dim, ctx_dim=None):
'''Initialize layer.'''
super(SoftDotAttention, self).__init__()
if ctx_dim is ... | 31.753521 | 76 | 0.649146 |
211a0fc2177554e58d97766c6537091b78786564 | 1,551 | py | Python | server/src/conf/device_types.py | bluthen/isadore_server | 3f03f3daf00eb712ee705280e513dba6fd60f0cb | [
"Apache-2.0"
] | null | null | null | server/src/conf/device_types.py | bluthen/isadore_server | 3f03f3daf00eb712ee705280e513dba6fd60f0cb | [
"Apache-2.0"
] | null | null | null | server/src/conf/device_types.py | bluthen/isadore_server | 3f03f3daf00eb712ee705280e513dba6fd60f0cb | [
"Apache-2.0"
] | null | null | null | # Copyright 2010-2019 Dan Elliott, Russell Valentine
#
# 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 appl... | 28.2 | 76 | 0.729207 |
54735d89d0b312f998d7890266229bff6dcd3a2c | 3,904 | py | Python | spektral/layers/convolutional/gcn_conv.py | ratthachat/spektral | da0c7121373cd87b2bf5bbb0cb48f59221d0d707 | [
"MIT"
] | null | null | null | spektral/layers/convolutional/gcn_conv.py | ratthachat/spektral | da0c7121373cd87b2bf5bbb0cb48f59221d0d707 | [
"MIT"
] | null | null | null | spektral/layers/convolutional/gcn_conv.py | ratthachat/spektral | da0c7121373cd87b2bf5bbb0cb48f59221d0d707 | [
"MIT"
] | null | null | null | from tensorflow.keras import backend as K
import tensorflow as tf
from spektral.layers import ops
from spektral.layers.convolutional.conv import Conv
from spektral.utils import gcn_filter
class GCNConv(Conv):
r"""
A graph convolutional layer (GCN) from the paper
> [Semi-Supervised Classification with Gra... | 32 | 110 | 0.619365 |
fc535c09b6db7ed64e61dd7cac4b791187e9aaa9 | 4,033 | py | Python | cotoha_nlp/data/sentence.py | obilixilido/cotoha-nlp | d445519b601f75dba97b458cdac39b9b781d6424 | [
"Apache-2.0"
] | 3 | 2019-01-10T06:11:31.000Z | 2020-02-08T04:21:02.000Z | cotoha_nlp/data/sentence.py | obilixilido/cotoha-nlp | d445519b601f75dba97b458cdac39b9b781d6424 | [
"Apache-2.0"
] | null | null | null | cotoha_nlp/data/sentence.py | obilixilido/cotoha-nlp | d445519b601f75dba97b458cdac39b9b781d6424 | [
"Apache-2.0"
] | 1 | 2020-02-09T05:37:23.000Z | 2020-02-09T05:37:23.000Z | # -*- coding:utf-8 -*-
import json
import pprint
class Sentence:
""" Sentence class """
def __init__(self, form: str, data: list):
self.form = form
self.chunks = [chunk for chunk_and_tokens in data for chunk in [Chunk(chunk_and_tokens)]]
self.tokens = [token for chunk in self.chunks fo... | 32.788618 | 121 | 0.602281 |
59a2becb9ce1be20157a3406dbf58a04801b3866 | 728 | py | Python | lib/reda/importers/utils/transforms.py | j-gallistl/reda | 13b1f9e1cda92bbbbafc5c28be2c691d3b722740 | [
"MIT"
] | null | null | null | lib/reda/importers/utils/transforms.py | j-gallistl/reda | 13b1f9e1cda92bbbbafc5c28be2c691d3b722740 | [
"MIT"
] | null | null | null | lib/reda/importers/utils/transforms.py | j-gallistl/reda | 13b1f9e1cda92bbbbafc5c28be2c691d3b722740 | [
"MIT"
] | null | null | null | """This file contains transform functions for electrode numbering. If want to
apply custom electrode renumbering, use these functions as starting points to
design your own.
"""
class transform_electrodes_roll_along(object):
"""This function shifts all electrode numbers by a fixed offset, as
commonly encounter... | 31.652174 | 77 | 0.649725 |
0f23ca2a4f99a188798f27932fd9dfade5e6c3b2 | 5,396 | py | Python | datasetloader/datasetloader.py | WeixinYang/DatasetLoader | d6e800d6a9cca8809d7dab88a6a13a7916ef272d | [
"Apache-2.0"
] | null | null | null | datasetloader/datasetloader.py | WeixinYang/DatasetLoader | d6e800d6a9cca8809d7dab88a6a13a7916ef272d | [
"Apache-2.0"
] | null | null | null | datasetloader/datasetloader.py | WeixinYang/DatasetLoader | d6e800d6a9cca8809d7dab88a6a13a7916ef272d | [
"Apache-2.0"
] | null | null | null | from abc import ABC
class DatasetLoader(ABC):
"""
Base class for all dataset loaders to provide a common interface for
retrieving the data out of the dataset object.
"""
def __init__(self, lazy_loading):
self._selected_cols = []
self._lazy = lazy_loading
if not self._lazy:
... | 32.311377 | 78 | 0.541512 |
3338aae15816c624ac73ce4e3cf505fbe33e55de | 789 | py | Python | evap/development/management/commands/dump_testdata.py | felixrindt/EvaP | fe65fcc511cc942695ce1edbaab170894f0d37b1 | [
"MIT"
] | 29 | 2020-02-28T23:03:41.000Z | 2022-02-19T09:29:36.000Z | evap/development/management/commands/dump_testdata.py | felixrindt/EvaP | fe65fcc511cc942695ce1edbaab170894f0d37b1 | [
"MIT"
] | 737 | 2015-01-02T17:43:25.000Z | 2018-12-10T20:45:10.000Z | evap/development/management/commands/dump_testdata.py | felixrindt/EvaP | fe65fcc511cc942695ce1edbaab170894f0d37b1 | [
"MIT"
] | 83 | 2015-01-14T12:39:41.000Z | 2018-10-29T16:36:43.000Z | import os
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand
class Command(BaseCommand):
args = ""
help = "Dumps all relevant contents of the database into test_data.json."
requires_migrations_checks = True
def handle(... | 28.178571 | 99 | 0.607098 |
c92dbb60a1a4b00e786294f6339c1fa7310609e7 | 496 | py | Python | simple_public_sale/core/migrations/0003_auto_20171221_1824.py | allanufal/simple-public-sale | 347c9da84ca8a5d6af9521beb9df30a3fc9f7c48 | [
"MIT"
] | 3 | 2018-01-05T15:03:11.000Z | 2018-12-20T23:34:23.000Z | simple_public_sale/core/migrations/0003_auto_20171221_1824.py | allanlucio/simple-public-sale | 347c9da84ca8a5d6af9521beb9df30a3fc9f7c48 | [
"MIT"
] | 91 | 2017-12-08T13:22:01.000Z | 2018-01-27T14:08:00.000Z | simple_public_sale/core/migrations/0003_auto_20171221_1824.py | allanlucio/simple-public-sale | 347c9da84ca8a5d6af9521beb9df30a3fc9f7c48 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2017-12-21 18:24
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0002_evento_grupo'),
]
operations = [
migrations.AlterField(
model_name='evento',
... | 24.8 | 139 | 0.647177 |
832d288b10e58dd12e80aaba14abd8f728b97597 | 11,326 | py | Python | tests/test_combine_estimates.py | riddhi150390/splink | eae96a757877cf197608be21b437356732faee6e | [
"MIT"
] | null | null | null | tests/test_combine_estimates.py | riddhi150390/splink | eae96a757877cf197608be21b437356732faee6e | [
"MIT"
] | null | null | null | tests/test_combine_estimates.py | riddhi150390/splink | eae96a757877cf197608be21b437356732faee6e | [
"MIT"
] | null | null | null | import logging
from statistics import median, harmonic_mean
import pytest
from splink.combine_models import ModelCombiner, combine_cc_estimates
from splink.model import Model, load_model_from_json
from splink.settings import Settings
logger = logging.getLevelName
def test_api():
model_1 = load_model_from_json... | 30.693767 | 118 | 0.586703 |
c5012de63efd09869c99415437493d2578a3079f | 8,486 | py | Python | ask_library.py | ameqc-iscteiul/sir-group19 | ca6d239eaa53ea65f227a7c7a6a27636d21b41f6 | [
"MIT"
] | null | null | null | ask_library.py | ameqc-iscteiul/sir-group19 | ca6d239eaa53ea65f227a7c7a6a27636d21b41f6 | [
"MIT"
] | null | null | null | ask_library.py | ameqc-iscteiul/sir-group19 | ca6d239eaa53ea65f227a7c7a6a27636d21b41f6 | [
"MIT"
] | null | null | null | from social_interaction_cloud.action import ActionRunner
from social_interaction_cloud.basic_connector import BasicSICConnector
class Ask_library:
def __init__(self, server_ip: str, dialogflow_key_file: str, dialogflow_agent_id: str):
self.sic = BasicSICConnector(server_ip, 'en-US', dialogflow_key_file, ... | 58.123288 | 171 | 0.637285 |
720d244fbfed01b42fe448b268d5467f1b9b0f99 | 7,664 | py | Python | docs/conf.py | drupsio/whitepaper | 14248efdbfcc3b06b7af520374ea820ff10cdad8 | [
"MIT"
] | null | null | null | docs/conf.py | drupsio/whitepaper | 14248efdbfcc3b06b7af520374ea820ff10cdad8 | [
"MIT"
] | null | null | null | docs/conf.py | drupsio/whitepaper | 14248efdbfcc3b06b7af520374ea820ff10cdad8 | [
"MIT"
] | null | null | null | import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General conf... | 31.539095 | 95 | 0.713987 |
42d39a8f6d58c531b8affcdb5c940616b37c2d88 | 4,422 | py | Python | octavia/tests/unit/compute/drivers/test_compute_noop_driver.py | Sirius21c/octavia | e7057a566689967f23ede519235d6075a01a6d61 | [
"Apache-2.0"
] | null | null | null | octavia/tests/unit/compute/drivers/test_compute_noop_driver.py | Sirius21c/octavia | e7057a566689967f23ede519235d6075a01a6d61 | [
"Apache-2.0"
] | null | null | null | octavia/tests/unit/compute/drivers/test_compute_noop_driver.py | Sirius21c/octavia | e7057a566689967f23ede519235d6075a01a6d61 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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... | 42.519231 | 79 | 0.600859 |
4b9ac4a768f25c4fdd64fe4e9583c349f6df7336 | 30 | py | Python | f5_lbaas_dashboard/api/__init__.py | F5Networks/f5-lbaas-dashboard | 06d891260778a77ecf31b9f16d68fe7197162699 | [
"Apache-2.0"
] | null | null | null | f5_lbaas_dashboard/api/__init__.py | F5Networks/f5-lbaas-dashboard | 06d891260778a77ecf31b9f16d68fe7197162699 | [
"Apache-2.0"
] | null | null | null | f5_lbaas_dashboard/api/__init__.py | F5Networks/f5-lbaas-dashboard | 06d891260778a77ecf31b9f16d68fe7197162699 | [
"Apache-2.0"
] | null | null | null | from . import lbaasv2 # noqa
| 15 | 29 | 0.7 |
edcf3659f7603c571954b581c435c1d80680b37f | 603 | py | Python | members/migrations/0002_auto_20171215_0922.py | PeoplesMomentum/mxv | 3ad06cc8d3db43c63f24a80a5709aed3ade94789 | [
"MIT"
] | 6 | 2017-12-13T18:28:16.000Z | 2019-12-13T06:06:34.000Z | members/migrations/0002_auto_20171215_0922.py | PeoplesMomentum/mxv | 3ad06cc8d3db43c63f24a80a5709aed3ade94789 | [
"MIT"
] | 159 | 2017-11-05T16:48:20.000Z | 2020-07-17T09:38:18.000Z | members/migrations/0002_auto_20171215_0922.py | PeoplesMomentum/mxv | 3ad06cc8d3db43c63f24a80a5709aed3ade94789 | [
"MIT"
] | 2 | 2018-06-30T19:34:57.000Z | 2018-10-17T11:09:41.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-15 09:22
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('members', '0001_initial'),
]
operations = [
migrations.AddField(
... | 23.192308 | 53 | 0.588723 |
91e2b07374de1b6898843d0b1c8407164dc3acbf | 1,447 | py | Python | src/dms-preview/setup.py | swagatmishra2007/azure-cli-extensions | 01db09fe7a6b954311fe853ec28ab0e9d8d7b5bb | [
"MIT"
] | 1 | 2018-09-22T10:39:43.000Z | 2018-09-22T10:39:43.000Z | src/dms-preview/setup.py | swagatmishra2007/azure-cli-extensions | 01db09fe7a6b954311fe853ec28ab0e9d8d7b5bb | [
"MIT"
] | null | null | null | src/dms-preview/setup.py | swagatmishra2007/azure-cli-extensions | 01db09fe7a6b954311fe853ec28ab0e9d8d7b5bb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ---------------------------------------------... | 34.452381 | 94 | 0.597789 |
dacc313fa58b6755b00a32731ae8733b39b0be3d | 6,643 | py | Python | custom_data_gen.py | powergkrry/dual-channel-virtual-fluorescence | 88c200f00e75c13e8e90ab097d3f8f09880952a0 | [
"MIT"
] | 1 | 2022-01-25T20:53:47.000Z | 2022-01-25T20:53:47.000Z | custom_data_gen.py | powergkrry/dual-channel-virtual-fluorescence | 88c200f00e75c13e8e90ab097d3f8f09880952a0 | [
"MIT"
] | null | null | null | custom_data_gen.py | powergkrry/dual-channel-virtual-fluorescence | 88c200f00e75c13e8e90ab097d3f8f09880952a0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 18 19:58:19 2021
@author: kanghyun
"""
import os
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.preprocessing.image import ImageDataGenerator
class DataGenerator(keras.utils.Sequence):
def __ini... | 42.858065 | 119 | 0.554719 |
c62d9e116214c114d868043e6675f31050d089d9 | 10,225 | py | Python | service/app/apis/cms/content.py | xuannanxan/maitul-manage | 35ddd2946bf4c97806bb38057a7dc9d6fa97c118 | [
"Apache-2.0"
] | null | null | null | service/app/apis/cms/content.py | xuannanxan/maitul-manage | 35ddd2946bf4c97806bb38057a7dc9d6fa97c118 | [
"Apache-2.0"
] | 14 | 2021-03-10T01:16:29.000Z | 2022-02-18T16:53:36.000Z | service/app/apis/cms/content.py | xuannanxan/maitul-manage | 35ddd2946bf4c97806bb38057a7dc9d6fa97c118 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
'''
@Description:
@Author: Xuannan
@Date: 2019-12-11 17:28:51
@LastEditTime: 2020-03-29 19:11:22
@LastEditors: Xuannan
'''
from flask_restful import Resource,reqparse,fields,marshal,abort
from app.apis.api_constant import *
from app.models.base import Crud
from app.utils import o... | 36.517857 | 158 | 0.611932 |
296d1168ca6ed70e0db800ac63e3cc7a9352c975 | 2,926 | py | Python | DCS311 Artificial Intelligence/BPNN/NN.py | Lan-Jing/Courses | 540db9499b8725ca5b82a2c4e7a3da09f73c0efa | [
"MIT"
] | 1 | 2021-12-17T23:09:00.000Z | 2021-12-17T23:09:00.000Z | DCS311 Artificial Intelligence/BPNN/NN.py | Lan-Jing/Courses | 540db9499b8725ca5b82a2c4e7a3da09f73c0efa | [
"MIT"
] | null | null | null | DCS311 Artificial Intelligence/BPNN/NN.py | Lan-Jing/Courses | 540db9499b8725ca5b82a2c4e7a3da09f73c0efa | [
"MIT"
] | 1 | 2021-08-03T23:42:06.000Z | 2021-08-03T23:42:06.000Z | import numpy as np
import helper as hp
import data_proc as dp
# deep copy from_nn to to_nn
def copy(to_nn, from_nn):
to_nn.act = from_nn.act
to_nn.act_grad = from_nn.act_grad
to_nn.W1 = from_nn.W1.copy()
to_nn.W2 = from_nn.W2.copy()
return
class BPNN():
def __init__(self, iSize = 1, hSize = 1... | 34.423529 | 101 | 0.570062 |
deb0e711218cdb309c7b00f58e17379492578cbe | 2,198 | py | Python | setup.py | eumiro/flask-reuploaded | 7977638ac7a7d970b8085c6ef0f6ffd9d9d96384 | [
"MIT"
] | null | null | null | setup.py | eumiro/flask-reuploaded | 7977638ac7a7d970b8085c6ef0f6ffd9d9d96384 | [
"MIT"
] | null | null | null | setup.py | eumiro/flask-reuploaded | 7977638ac7a7d970b8085c6ef0f6ffd9d9d96384 | [
"MIT"
] | null | null | null | import codecs
import os
from setuptools import find_packages
from setuptools import setup
HERE = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
"""Return the contents of the read file.
- Build an absolute path from *parts*
- Return the contents of the resulting file.
- Assume UTF-8 en... | 30.957746 | 79 | 0.618289 |
1a61859ac93a53e7861739673ee6d6aaadd392c2 | 7,550 | py | Python | tests/components/renault/test_diagnostics.py | PiotrMachowski/core | b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b | [
"Apache-2.0"
] | 3 | 2022-01-27T17:00:51.000Z | 2022-03-09T03:49:03.000Z | tests/components/renault/test_diagnostics.py | PiotrMachowski/core | b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b | [
"Apache-2.0"
] | 20 | 2021-11-24T06:25:54.000Z | 2022-03-31T07:16:25.000Z | tests/components/renault/test_diagnostics.py | PiotrMachowski/core | b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b | [
"Apache-2.0"
] | 3 | 2021-11-14T13:29:33.000Z | 2021-12-27T17:05:22.000Z | """Test Renault diagnostics."""
import pytest
from homeassistant.components.diagnostics import REDACTED
from homeassistant.components.renault import DOMAIN
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from tests.common import mock_device_registry
from tests.compone... | 37.192118 | 572 | 0.596821 |
c02485ce0808cd81a8aa2fc05fa90aa60e072df3 | 1,360 | py | Python | statsrat/rw/drate.py | SamPaskewitz/statsrat | 3f970f1731b7ec2e22c36a49375619e6afb802a8 | [
"MIT"
] | 1 | 2021-09-16T19:08:56.000Z | 2021-09-16T19:08:56.000Z | statsrat/rw/drate.py | SamPaskewitz/statsrat | 3f970f1731b7ec2e22c36a49375619e6afb802a8 | [
"MIT"
] | 1 | 2021-09-16T19:09:22.000Z | 2021-09-16T19:09:22.000Z | statsrat/rw/drate.py | SamPaskewitz/statsrat | 3f970f1731b7ec2e22c36a49375619e6afb802a8 | [
"MIT"
] | null | null | null | import numpy as np
'''
Functions for defining decay rates.
zero: Decay rate of zero (i.e. no weight decay).
cnst: Constant decay rate.
only_neg: Decay rate is constant for negative weights, and zero for positive weights.
hrmn: Harmonic decay rate.
'''
def zero(aux, t, w, n_f, n_y, sim_pars):
'''Decay rate of ... | 31.627907 | 112 | 0.668382 |
23015fdd44ff3f3d63f1d0d948124b4ff793446d | 628 | py | Python | Aula 05 - Agregate/main.py | G-ilian/S202-Repositorio | d2d00d892c818c6e76b5b5cbcc6bec0eec48ca57 | [
"MIT"
] | null | null | null | Aula 05 - Agregate/main.py | G-ilian/S202-Repositorio | d2d00d892c818c6e76b5b5cbcc6bec0eec48ca57 | [
"MIT"
] | null | null | null | Aula 05 - Agregate/main.py | G-ilian/S202-Repositorio | d2d00d892c818c6e76b5b5cbcc6bec0eec48ca57 | [
"MIT"
] | null | null | null | from db.database import Database
from helper.WriteAJson import writeAJson
from dataset.produto_database import dataset
from dataset.pessoa_dataset import dataset as cliente
compras = Database(database="database", collection="produtos", dataset=dataset)
compras.resetDatabase()
cliente = Database(
database="databas... | 19.030303 | 80 | 0.644904 |
014504c074dc773a2d7f91d7c9aee65414ccdb95 | 418 | py | Python | Web_Program/venv/Scripts/pip-script.py | Incipe-win/Games | 902e6c7631fa75b57cfabf0e8be8f8d8486ec432 | [
"Apache-2.0"
] | 1 | 2020-12-17T08:53:10.000Z | 2020-12-17T08:53:10.000Z | Web_Program/venv/Scripts/pip-script.py | Incipe-win/Games | 902e6c7631fa75b57cfabf0e8be8f8d8486ec432 | [
"Apache-2.0"
] | null | null | null | Web_Program/venv/Scripts/pip-script.py | Incipe-win/Games | 902e6c7631fa75b57cfabf0e8be8f8d8486ec432 | [
"Apache-2.0"
] | null | null | null | #!F:\Repositories\C_Cplusplus\Games\Web_Program\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys... | 32.153846 | 71 | 0.674641 |
f0253547d9428bd4a246aea3c2820a9106d29634 | 5,407 | py | Python | pymongo/daemon.py | naomielst/mongo-python-driver | e3d1d6f5b48101654a05493fd6eec7fe3fa014bd | [
"Apache-2.0"
] | 2,593 | 2015-01-02T10:53:55.000Z | 2022-03-28T15:42:47.000Z | pymongo/daemon.py | naomielst/mongo-python-driver | e3d1d6f5b48101654a05493fd6eec7fe3fa014bd | [
"Apache-2.0"
] | 356 | 2015-02-05T15:57:18.000Z | 2022-03-31T19:12:30.000Z | pymongo/daemon.py | naomielst/mongo-python-driver | e3d1d6f5b48101654a05493fd6eec7fe3fa014bd | [
"Apache-2.0"
] | 774 | 2015-01-05T09:30:07.000Z | 2022-03-30T03:36:25.000Z | # Copyright 2019-present MongoDB, 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 wri... | 38.899281 | 79 | 0.650083 |
2def558579162f1f54b742cb2c31c8a482b417cf | 7,701 | py | Python | ethtx/decoders/abi/calls.py | tmierzwa/Ethtx | 29d85873d9f13fd4ec6142bd11efb9f5642985df | [
"Apache-2.0"
] | 1 | 2021-08-02T00:40:38.000Z | 2021-08-02T00:40:38.000Z | ethtx/decoders/abi/calls.py | tmierzwa/ethtx | 29d85873d9f13fd4ec6142bd11efb9f5642985df | [
"Apache-2.0"
] | null | null | null | ethtx/decoders/abi/calls.py | tmierzwa/ethtx | 29d85873d9f13fd4ec6142bd11efb9f5642985df | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 DAI Foundation
#
# 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,... | 33.193966 | 108 | 0.575769 |
ffc8de59e4d632c3cab98343b423bb3ca797f31d | 52,817 | py | Python | pandas/tests/scalar/period/test_period.py | saurav2608/pandas | b90f9db6d23f64b0ce9ff469445e1c31013a07c0 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-04-07T13:56:06.000Z | 2021-04-12T13:45:23.000Z | pandas/tests/scalar/period/test_period.py | saurav2608/pandas | b90f9db6d23f64b0ce9ff469445e1c31013a07c0 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/scalar/period/test_period.py | saurav2608/pandas | b90f9db6d23f64b0ce9ff469445e1c31013a07c0 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | from datetime import date, datetime, timedelta
import numpy as np
import pytest
import pytz
from pandas._libs.tslibs import iNaT, period as libperiod
from pandas._libs.tslibs.ccalendar import DAYS, MONTHS
from pandas._libs.tslibs.frequencies import INVALID_FREQ_ERR_MSG
from pandas._libs.tslibs.parsing import DatePars... | 35.258344 | 79 | 0.531098 |
e50f2c495bc7023ae607bafca2e53b92c37dca08 | 3,583 | py | Python | func_tests/framework/utils/couch_http_wrapper.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/framework/utils/couch_http_wrapper.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/framework/utils/couch_http_wrapper.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
import base64
import httplib
import json
import simplejson
from datawinners import settings
def prettyPrint(s):
"""Prettyprints the json response of an HTTPResponse object"""
# HTTPResponse instance -> Python object -> str
print simplejson.dumps(json.loads(s.r... | 31.156522 | 98 | 0.583589 |
245653ad0b7fe59eba165bcd5bdc0778d06bb8a4 | 173 | py | Python | web/app.py | nekobean/electron-flask-template | c76e970b04f23cd3390cf514f1271afc1d4d52c7 | [
"MIT"
] | null | null | null | web/app.py | nekobean/electron-flask-template | c76e970b04f23cd3390cf514f1271afc1d4d52c7 | [
"MIT"
] | null | null | null | web/app.py | nekobean/electron-flask-template | c76e970b04f23cd3390cf514f1271afc1d4d52c7 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
return "Hello World"
if __name__ == "__main__":
app.run(host="127.0.0.1", port=5000)
| 13.307692 | 40 | 0.635838 |
e15c2c08885a7348b0898f2e6fd9317f5cd6bcfe | 2,107 | py | Python | pyspedas/erg/satellite/erg/load.py | nickssl/pyspedas | fe28668519d58a4926438ebc55ce9cf04dab6281 | [
"MIT"
] | 3 | 2018-10-22T20:15:39.000Z | 2019-03-06T18:03:35.000Z | pyspedas/erg/satellite/erg/load.py | tiger2017/pyspedas | 8a944a7bc15e6f48f66a5a8705aa0021ca85ee13 | [
"MIT"
] | null | null | null | pyspedas/erg/satellite/erg/load.py | tiger2017/pyspedas | 8a944a7bc15e6f48f66a5a8705aa0021ca85ee13 | [
"MIT"
] | 2 | 2019-01-25T20:03:33.000Z | 2019-07-05T19:53:30.000Z | from pyspedas.analysis.time_clip import time_clip as tclip
from pyspedas.utilities.dailynames import dailynames
from pyspedas.utilities.download import download
from pytplot import cdf_to_tplot
from .config import CONFIG
def load(trange=['2017-03-27', '2017-03-28'],
pathformat=None,
instrument='mgf'... | 29.263889 | 114 | 0.614143 |
a1b6910093326d1cf5ca3ec7e0d36ddb09d07df7 | 3,359 | py | Python | tests/robot/libraries/linux.py | samelias/vpp-agent | aafaf85bdf1673d87a66dd3754d0550905e6ab98 | [
"Apache-2.0"
] | null | null | null | tests/robot/libraries/linux.py | samelias/vpp-agent | aafaf85bdf1673d87a66dd3754d0550905e6ab98 | [
"Apache-2.0"
] | null | null | null | tests/robot/libraries/linux.py | samelias/vpp-agent | aafaf85bdf1673d87a66dd3754d0550905e6ab98 | [
"Apache-2.0"
] | null | null | null | import json
# input - output from 'ip a' command
# output - interfaces with parameters in json
def Parse_Linux_Interfaces(data):
ints = {}
for line in data.splitlines():
if line[0] != ' ':
if_name = line.split()[1][:-1]
ints[if_name] = {}
if "mtu" in line:
... | 39.517647 | 117 | 0.65198 |
4dacc9c7460350d1ff2daa74df39d8564993feab | 2,131 | py | Python | chaospy/distributions/collection/student_t.py | krystophny/chaospy | e09f8e3f6dfc26145f15774edd5b03665140712f | [
"MIT"
] | 1 | 2019-12-20T00:32:44.000Z | 2019-12-20T00:32:44.000Z | chaospy/distributions/collection/student_t.py | QianWanghhu/chaospy | 18ff6c4fc56c632825e53fb24e17de51a7febd7d | [
"MIT"
] | null | null | null | chaospy/distributions/collection/student_t.py | QianWanghhu/chaospy | 18ff6c4fc56c632825e53fb24e17de51a7febd7d | [
"MIT"
] | null | null | null | """Student-T distribution."""
import numpy
from scipy import special
from ..baseclass import Dist
from ..operators.addition import Add
from .deprecate import deprecation_warning
class student_t(Dist):
"""Student-T distribution."""
def __init__(self, a=1):
Dist.__init__(self, a=a)
def _pdf(self,... | 29.597222 | 77 | 0.566401 |
a9685c709ee66db19eec5bf58d3ed2dc2601e278 | 18,393 | py | Python | pru/trajectory_analysis.py | euctrl-pru/rt-python | da5d0040e250bd159845a0d43bf0b73eab368863 | [
"MIT"
] | null | null | null | pru/trajectory_analysis.py | euctrl-pru/rt-python | da5d0040e250bd159845a0d43bf0b73eab368863 | [
"MIT"
] | null | null | null | pru/trajectory_analysis.py | euctrl-pru/rt-python | da5d0040e250bd159845a0d43bf0b73eab368863 | [
"MIT"
] | null | null | null | # Copyright (c) 2018 Via Technology Ltd. All Rights Reserved.
# Consult your license regarding permissions and restrictions.
"""
Functions to smooth trajectory position data.
"""
import numpy as np
import pandas as pd
import scipy.optimize
from via_sphere import global_Point3d
from pru.spherical_path_functions import ... | 35.714563 | 98 | 0.674441 |
562174f331fb23cf80dcdc9a3685db4f623e371a | 13,925 | py | Python | src/model_run.py | jmarca/initial-solution | 61766ef4dff6f1405fbaf9d13e271d13fda33ad7 | [
"Apache-2.0"
] | 6 | 2019-05-30T17:55:02.000Z | 2021-03-17T11:45:38.000Z | src/model_run.py | jmarca/initial-solution | 61766ef4dff6f1405fbaf9d13e271d13fda33ad7 | [
"Apache-2.0"
] | null | null | null | src/model_run.py | jmarca/initial-solution | 61766ef4dff6f1405fbaf9d13e271d13fda33ad7 | [
"Apache-2.0"
] | 7 | 2019-07-04T02:05:48.000Z | 2021-03-17T11:47:32.000Z | from ortools.constraint_solver import routing_enums_pb2
from ortools.constraint_solver import pywrapcp
import numpy as np
from functools import partial
import evaluators as E
def use_nodes(record,d):
nodes = [0,record.origin,record.destination]
nodes.extend(d.get_break_node_chain(0,record.origin))
nodes.ex... | 39.899713 | 90 | 0.686248 |
fb2074eb6ed4a942b2e93b83dca4005401513261 | 3,745 | py | Python | examples/line/run_line.py | HuangLED/euler | a56b5fe3fe56123af062317ca0b4160ce3b3ace9 | [
"Apache-2.0"
] | 2,829 | 2019-01-12T09:16:03.000Z | 2022-03-29T14:00:58.000Z | examples/line/run_line.py | HuangLED/euler | a56b5fe3fe56123af062317ca0b4160ce3b3ace9 | [
"Apache-2.0"
] | 331 | 2019-01-17T21:07:49.000Z | 2022-03-30T06:38:17.000Z | examples/line/run_line.py | HuangLED/euler | a56b5fe3fe56123af062317ca0b4160ce3b3ace9 | [
"Apache-2.0"
] | 578 | 2019-01-16T10:48:53.000Z | 2022-03-21T13:41:34.000Z | # Copyright 2020 Alibaba Group Holding Limited. 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 ... | 40.268817 | 85 | 0.654473 |
c511548f573d499e585f215f88848088e75409a3 | 34,589 | py | Python | MinkowskiEngine/MinkowskiPooling.py | Pandinosaurus/MinkowskiEngine | a40123a32eb1208f6a11fa32c36ee866ad4d4827 | [
"MIT"
] | 1 | 2021-07-28T18:31:06.000Z | 2021-07-28T18:31:06.000Z | MinkowskiEngine/MinkowskiPooling.py | Pandinosaurus/MinkowskiEngine | a40123a32eb1208f6a11fa32c36ee866ad4d4827 | [
"MIT"
] | null | null | null | MinkowskiEngine/MinkowskiPooling.py | Pandinosaurus/MinkowskiEngine | a40123a32eb1208f6a11fa32c36ee866ad4d4827 | [
"MIT"
] | null | null | null | # Copyright (c) Chris Choy (chrischoy@ai.stanford.edu).
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, ... | 40.31352 | 87 | 0.621701 |
88fbffc4190f7e49748ab361dc3cc94478886d02 | 16,292 | py | Python | research/nlp/luke/src/reading_comprehension/feature.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/luke/src/reading_comprehension/feature.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/luke/src/reading_comprehension/feature.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2022 Huawei Technologies Co., Ltd
#
# 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... | 38.606635 | 142 | 0.630248 |
17ae83b7b53e1bae390347d2057c9cb887ecf36f | 8,340 | py | Python | main.py | Cecilia9855/PKUAutoSubmit | afb9ef4103dfda98b8b6c04fbaa8dc121505c033 | [
"Apache-2.0"
] | 3 | 2020-12-23T12:10:43.000Z | 2021-03-08T04:28:50.000Z | main.py | Cecilia9855/PKUAutoSubmit | afb9ef4103dfda98b8b6c04fbaa8dc121505c033 | [
"Apache-2.0"
] | null | null | null | main.py | Cecilia9855/PKUAutoSubmit | afb9ef4103dfda98b8b6c04fbaa8dc121505c033 | [
"Apache-2.0"
] | 2 | 2021-03-08T11:30:21.000Z | 2021-03-09T13:37:55.000Z | from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver import Firefox, Chrome, PhantomJS
... | 31.832061 | 92 | 0.675899 |
de3f912831987b9e38bf674ebc1b899e39ce4879 | 8,319 | py | Python | GANs/reenactgan/test_reenactment.py | saulocatharino/nnabla-examples | 176ee44c8eec2f480e6db812e3c33f3bfd0d8697 | [
"Apache-2.0"
] | 228 | 2017-11-20T06:05:56.000Z | 2022-03-23T12:40:05.000Z | GANs/reenactgan/test_reenactment.py | saulocatharino/nnabla-examples | 176ee44c8eec2f480e6db812e3c33f3bfd0d8697 | [
"Apache-2.0"
] | 36 | 2018-01-11T23:26:20.000Z | 2022-03-12T00:53:38.000Z | GANs/reenactgan/test_reenactment.py | saulocatharino/nnabla-examples | 176ee44c8eec2f480e6db812e3c33f3bfd0d8697 | [
"Apache-2.0"
] | 76 | 2017-11-22T22:00:00.000Z | 2022-03-28T05:58:57.000Z | # Copyright 2020,2021 Sony Corporation.
# Copyright 2021 Sony Group 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 ... | 40.580488 | 116 | 0.612814 |
a872f45a8a7a69fef806eee7d41b8e67b317bcbb | 3,605 | py | Python | docs/generate_rst.py | patricksnape/menpo-widgets | 27da9f018e987c69c13baafaa468028b3108925a | [
"BSD-3-Clause"
] | 5 | 2016-02-17T17:29:53.000Z | 2019-06-07T07:28:15.000Z | docs/generate_rst.py | patricksnape/menpo-widgets | 27da9f018e987c69c13baafaa468028b3108925a | [
"BSD-3-Clause"
] | 30 | 2015-10-13T14:19:24.000Z | 2021-09-16T19:04:22.000Z | docs/generate_rst.py | patricksnape/menpo-widgets | 27da9f018e987c69c13baafaa468028b3108925a | [
"BSD-3-Clause"
] | 20 | 2015-09-03T19:11:14.000Z | 2021-09-16T18:22:00.000Z | from inspect import isclass, isfunction, ismodule
from functools import partial
is_func_or_partial = lambda f: isfunction(f) or isinstance(f, partial)
def write_docs_for_module(module, path, modules_to_skip=None,
generate_index=False):
if modules_to_skip is None:
modules_to_skip... | 41.436782 | 78 | 0.592788 |
890ec0d8b9331755e53b7335fa707b5cba25f9f9 | 2,865 | py | Python | tests/at_reduction.py | microsoft/svirl | 8d0da6a03ad20315a690a3c65bb8b60c196c3f3d | [
"MIT"
] | 6 | 2020-12-21T20:11:13.000Z | 2022-03-21T07:55:33.000Z | tests/at_reduction.py | ivan-sadovsky/svirl | 523abe9fcf2a5e9d192782d7aeb7093c86ef4036 | [
"MIT"
] | 4 | 2021-07-15T20:12:55.000Z | 2021-08-07T22:11:18.000Z | tests/at_reduction.py | ivan-sadovsky/svirl | 523abe9fcf2a5e9d192782d7aeb7093c86ef4036 | [
"MIT"
] | 9 | 2020-12-22T06:06:16.000Z | 2022-03-25T17:26:55.000Z | import numpy as np
import sys, os
sys.path.append(os.path.abspath("../"))
from svirl import GLSolver
from common import *
gl = GLSolver(
Nx = 32, Ny = 32,
dx = 0.5, dy = 0.5,
)
np.random.seed(5)
#=============================================
# Test scalar reduction
#======================================... | 28.65 | 78 | 0.540663 |
591c09c70cf1238979913320f628aff4fc644aaa | 2,991 | py | Python | streamlit/asylum.py | rdukewiesenb/human-rights-first-asylum-ds-a | 6d15902788922a2647872719339f31dde0f7399b | [
"MIT"
] | 1 | 2021-06-02T18:48:10.000Z | 2021-06-02T18:48:10.000Z | streamlit/asylum.py | SophistryDude/human-rights-first-asylum-ds-a | 78fb52a7f1f0faa22560a2bcdd3a72f8ed89499a | [
"MIT"
] | 17 | 2020-12-11T00:03:24.000Z | 2021-05-19T20:02:34.000Z | streamlit/asylum.py | SophistryDude/human-rights-first-asylum-ds-a | 78fb52a7f1f0faa22560a2bcdd3a72f8ed89499a | [
"MIT"
] | 16 | 2020-12-16T19:06:11.000Z | 2021-05-04T16:10:09.000Z | import streamlit as st
import numpy as np
import pandas as pd
# SETUP
st.set_page_config(layout="wide")
st.title('Human Rights First Asylum')
st.markdown('### State of Aggregated Data')
st.markdown('---')
df: pd.DataFrame
# READ-IN CSV
df = (
pd.read_csv('cases.csv')
.fillna(value='')
.set_index('dat... | 27.440367 | 71 | 0.650284 |
fe7499436967cf073e2f493623170cf565933fb4 | 63,069 | py | Python | electrumx/server/session.py | AustEcon/electrumx | d584a7da0de4177acd42008bc59190e1ab8bc799 | [
"MIT"
] | 1 | 2020-03-26T05:34:37.000Z | 2020-03-26T05:34:37.000Z | electrumx/server/session.py | AustEcon/electrumx | d584a7da0de4177acd42008bc59190e1ab8bc799 | [
"MIT"
] | null | null | null | electrumx/server/session.py | AustEcon/electrumx | d584a7da0de4177acd42008bc59190e1ab8bc799 | [
"MIT"
] | 1 | 2021-01-17T20:44:23.000Z | 2021-01-17T20:44:23.000Z | # Copyright (c) 2016-2018, Neil Booth
#
# All rights reserved.
#
# See the file "LICENCE" for information about the copyright
# and warranty status of this software.
'''Classes for local RPC server and remote client TCP/SSL servers.'''
import codecs
import itertools
import json
import math
import os
import ssl
import... | 40.637242 | 100 | 0.604449 |
63f71b9435a59aa8dcd5b3cd9438cd5d8ef7ec45 | 494 | gyp | Python | gyp/webtry.gyp | quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_skia | 90b3f9b82dbad266f960601d2120082bb841fb97 | [
"BSD-3-Clause"
] | 111 | 2015-01-13T22:01:50.000Z | 2021-06-10T15:32:48.000Z | gyp/webtry.gyp | quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_skia | 90b3f9b82dbad266f960601d2120082bb841fb97 | [
"BSD-3-Clause"
] | 129 | 2015-01-14T16:07:02.000Z | 2020-03-11T19:44:42.000Z | gyp/webtry.gyp | quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_skia | 90b3f9b82dbad266f960601d2120082bb841fb97 | [
"BSD-3-Clause"
] | 64 | 2015-01-14T16:45:39.000Z | 2021-09-08T11:16:05.000Z | # GYP file to build a the webtry sample.
{
'targets': [
{
'target_name': 'webtry',
'type': 'executable',
'include_dirs' : [
'../src/core',
'../src/images',
'../src/pathops',
],
'sources': [
'../experimental/webtry/result.cpp',
'../experime... | 20.583333 | 45 | 0.453441 |
369318881d728be1fd54195b9f1dc51bbde4abd0 | 24 | py | Python | __init__.py | RiceD2KLab/TCH_CardiacSignals_F20 | ea6e84703086ddb7bfc5ba164aa67acdc9e78b7d | [
"BSD-2-Clause"
] | 1 | 2022-01-27T07:03:20.000Z | 2022-01-27T07:03:20.000Z | __init__.py | RiceD2KLab/TCH_CardiacSignals_F20 | ea6e84703086ddb7bfc5ba164aa67acdc9e78b7d | [
"BSD-2-Clause"
] | null | null | null | __init__.py | RiceD2KLab/TCH_CardiacSignals_F20 | ea6e84703086ddb7bfc5ba164aa67acdc9e78b7d | [
"BSD-2-Clause"
] | null | null | null | sys.path.insert(0, '.')
| 12 | 23 | 0.583333 |
81ead9438279c1a01bc2299377f5ca68cbf8d3a2 | 30,816 | py | Python | tools/tensorflow_docs/api_generator/parser_test.py | BurnhamG/docs-1 | 507c4deff0a9b25300f02b4120f6ad4db8b89ed0 | [
"Apache-2.0"
] | 1 | 2019-06-18T11:11:53.000Z | 2019-06-18T11:11:53.000Z | tools/tensorflow_docs/api_generator/parser_test.py | BurnhamG/docs-1 | 507c4deff0a9b25300f02b4120f6ad4db8b89ed0 | [
"Apache-2.0"
] | null | null | null | tools/tensorflow_docs/api_generator/parser_test.py | BurnhamG/docs-1 | 507c4deff0a9b25300f02b4120f6ad4db8b89ed0 | [
"Apache-2.0"
] | 23 | 2019-06-13T16:03:21.000Z | 2019-09-13T20:37:37.000Z | # Copyright 2015 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... | 31.221884 | 121 | 0.649922 |
ad0145f92a04ec41b62530920fac43f00bca4c97 | 10,953 | py | Python | fulltext/controllers.py | arXiv/arxiv-fulltext | 36008457022cde245d78b3ad91e0a95aa21bc420 | [
"MIT"
] | 18 | 2019-03-01T02:51:45.000Z | 2021-11-05T12:26:12.000Z | fulltext/controllers.py | arXiv/arxiv-fulltext | 36008457022cde245d78b3ad91e0a95aa21bc420 | [
"MIT"
] | 6 | 2019-05-06T15:25:16.000Z | 2019-07-31T20:11:36.000Z | fulltext/controllers.py | arXiv/arxiv-fulltext | 36008457022cde245d78b3ad91e0a95aa21bc420 | [
"MIT"
] | 8 | 2019-01-10T22:01:58.000Z | 2021-11-05T12:26:01.000Z | """API controllers."""
from typing import Optional, Tuple, Dict, Any, Callable
from http import HTTPStatus as status
from flask import url_for
from celery import current_app
from werkzeug.exceptions import NotFound, InternalServerError, BadRequest, \
NotAcceptable
from arxiv.base import logging
from .services i... | 41.965517 | 79 | 0.660184 |
2be8b5dbef7a6104d758b859a4a1db7657bfb63f | 191,700 | py | Python | tests/build/virtualenv/lib/python2.7/site-packages/salt/states/file.py | codebergau/salt-formula-odoo9 | c619a401505dec3df469e9f9a8f27026f444a660 | [
"Apache-2.0"
] | null | null | null | tests/build/virtualenv/lib/python2.7/site-packages/salt/states/file.py | codebergau/salt-formula-odoo9 | c619a401505dec3df469e9f9a8f27026f444a660 | [
"Apache-2.0"
] | null | null | null | tests/build/virtualenv/lib/python2.7/site-packages/salt/states/file.py | codebergau/salt-formula-odoo9 | c619a401505dec3df469e9f9a8f27026f444a660 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Operations on regular files, special files, directories, and symlinks
=====================================================================
Salt States can aggressively manipulate files on a system. There are a number
of ways in which files can be managed.
Regular files can be enforced wit... | 34.640405 | 117 | 0.556703 |
13f11c665ffaab21dd0e36b1da65c270754fdfa5 | 1,171 | py | Python | xlsxwriter/test/comparison/test_set_row03.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_set_row03.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_set_row03.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompar... | 24.914894 | 79 | 0.603757 |
53cb54289e9b6d6868bbb43260fbf0356c710684 | 2,569 | py | Python | dropbox_hook.py | ALTURKA/dropbox_hook | 689236a6ec6b8cbc55a0f6326c1c9e490f8a52c0 | [
"Apache-2.0"
] | 17 | 2015-03-09T09:26:09.000Z | 2021-11-10T14:42:19.000Z | dropbox_hook.py | ALTURKA/dropbox_hook | 689236a6ec6b8cbc55a0f6326c1c9e490f8a52c0 | [
"Apache-2.0"
] | 2 | 2017-06-20T21:26:46.000Z | 2021-02-08T16:36:02.000Z | dropbox_hook.py | ALTURKA/dropbox_hook | 689236a6ec6b8cbc55a0f6326c1c9e490f8a52c0 | [
"Apache-2.0"
] | 6 | 2015-01-10T00:30:38.000Z | 2021-04-19T22:40:13.000Z | import argparse
from hashlib import sha256
import hmac
import json
import sys
import click
import requests
@click.group()
def cli():
'''This tool makes it easier to test Dropbox webhooks, particularly on localhost. It generates fake requests, mimicking what Dropbox itself sends. Usage:
\b
dropbox_hoo... | 34.716216 | 187 | 0.648501 |
dbdac8f702920eef47a4a555edc1a5be6f8524a3 | 359 | py | Python | Exercício feitos pela primeira vez/ex096.py | Claayton/pythonExerciciosLinux | 696cdb16983638418bd0d0d4fe44dc72662b9c97 | [
"MIT"
] | 1 | 2021-01-23T15:43:34.000Z | 2021-01-23T15:43:34.000Z | Exercício feitos pela primeira vez/ex096.py | Claayton/pythonExerciciosLinux | 696cdb16983638418bd0d0d4fe44dc72662b9c97 | [
"MIT"
] | null | null | null | Exercício feitos pela primeira vez/ex096.py | Claayton/pythonExerciciosLinux | 696cdb16983638418bd0d0d4fe44dc72662b9c97 | [
"MIT"
] | null | null | null | # Ex096
def area(largura, comprimento):
print(f'A área de um terreno de \033[32m{largura:.1f}\033[m x \033[32m{comprimento:.1f}\033[m'
f' é de \033[32m{largura*comprimento:.1f}m²\033[m')
print(f'\033[7;37m{"CONTROLE DE TERRENOS":^60}\033[m')
area(float(input('Qual a largura do terreno?: ')), float(input... | 39.888889 | 100 | 0.668524 |
f067bbdf7bf31100338671d626decb2f3b17368e | 5,989 | py | Python | utils/adders.py | kaustubhgupta/PortfolioFy | 26613f58457e021bf1f420c4d81626ff284100cd | [
"MIT"
] | 110 | 2020-10-11T13:01:53.000Z | 2022-01-18T03:40:02.000Z | utils/adders.py | kaustubhgupta/PortfolioFy | 26613f58457e021bf1f420c4d81626ff284100cd | [
"MIT"
] | 36 | 2020-11-24T06:37:23.000Z | 2021-07-31T15:45:09.000Z | utils/adders.py | kaustubhgupta/PortfolioFy | 26613f58457e021bf1f420c4d81626ff284100cd | [
"MIT"
] | 31 | 2020-10-13T05:40:02.000Z | 2021-09-12T19:57:15.000Z |
class Adder:
'''
This class of functions contains all the additional functions required to add the website components.
'''
def __init__(self):
pass
def addBlogsL1(self, index_file: str) -> str:
'''
Function to add blogs section and meta text (comment) needed for blogpost ... | 37.198758 | 131 | 0.56754 |
cbb28feea45d5ff0da781d8379bfa275c606147d | 40,945 | py | Python | xls/dslx/ir_converter.py | lromor/xls | dd1ab857519bb984d178cfdb7758252689dbd647 | [
"Apache-2.0"
] | null | null | null | xls/dslx/ir_converter.py | lromor/xls | dd1ab857519bb984d178cfdb7758252689dbd647 | [
"Apache-2.0"
] | null | null | null | xls/dslx/ir_converter.py | lromor/xls | dd1ab857519bb984d178cfdb7758252689dbd647 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
#
# Copyright 2020 The XLS Authors
#
# 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... | 39.106972 | 127 | 0.677616 |
0f31b0aec48e925f5ddb32d08fd9fdbda4e5e6be | 2,479 | py | Python | experiments/attention_allocation_experiment_test.py | lavanyashukla/ml-fairness-gym | fb68b379d4284b7af746b2a051d518b3bd45ab00 | [
"Apache-2.0"
] | null | null | null | experiments/attention_allocation_experiment_test.py | lavanyashukla/ml-fairness-gym | fb68b379d4284b7af746b2a051d518b3bd45ab00 | [
"Apache-2.0"
] | null | null | null | experiments/attention_allocation_experiment_test.py | lavanyashukla/ml-fairness-gym | fb68b379d4284b7af746b2a051d518b3bd45ab00 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The ML Fairness Gym Authors.
#
# 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 applicab... | 32.618421 | 74 | 0.755547 |
af53d4c8a7338cb01af701e6a1552004ec8176ed | 40,489 | py | Python | aries_cloudagent/protocols/out_of_band/v1_0/manager.py | SmartLoan/smartloan-cloud-agent | 3d1e4b506f02e25bdece194240110c71b1786911 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/out_of_band/v1_0/manager.py | SmartLoan/smartloan-cloud-agent | 3d1e4b506f02e25bdece194240110c71b1786911 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/out_of_band/v1_0/manager.py | SmartLoan/smartloan-cloud-agent | 3d1e4b506f02e25bdece194240110c71b1786911 | [
"Apache-2.0"
] | null | null | null | """Classes to manage connections."""
import asyncio
import json
import logging
from typing import Mapping, Sequence, Optional
from ....connections.base_manager import BaseConnectionManager
from ....connections.models.conn_record import ConnRecord
from ....connections.util import mediation_record_if_id
from ....core.... | 39.734053 | 88 | 0.558646 |
3e4ab830126d46ba8952ed31290a1e0cacfdf44e | 1,403 | py | Python | UE4Parse/Assets/PropertyTagData/MapProperty.py | zbx911/pyUE4Parse | eb30d27a4341ad68a7104458a0fdfae6a360d153 | [
"MIT"
] | null | null | null | UE4Parse/Assets/PropertyTagData/MapProperty.py | zbx911/pyUE4Parse | eb30d27a4341ad68a7104458a0fdfae6a360d153 | [
"MIT"
] | null | null | null | UE4Parse/Assets/PropertyTagData/MapProperty.py | zbx911/pyUE4Parse | eb30d27a4341ad68a7104458a0fdfae6a360d153 | [
"MIT"
] | null | null | null | from UE4Parse.Assets import PropertyTagData
from UE4Parse.BinaryReader import BinaryStream
class MapProperty:
position: int
Value: dict
def __init__(self, reader: BinaryStream, tag, readType):
self.position = reader.base_stream.tell()
self.Value = {}
if readType.value == 3: return... | 38.972222 | 106 | 0.585175 |
9973f0aff593b92ab514a3068a2a8e45bfb4d797 | 835 | py | Python | 2_kalman_filter/20_update_and_predict.py | AliManUtd/udacity_ai4robotics | edb655b20f34ab9ee7491328b5f45271cf44295d | [
"MIT"
] | null | null | null | 2_kalman_filter/20_update_and_predict.py | AliManUtd/udacity_ai4robotics | edb655b20f34ab9ee7491328b5f45271cf44295d | [
"MIT"
] | null | null | null | 2_kalman_filter/20_update_and_predict.py | AliManUtd/udacity_ai4robotics | edb655b20f34ab9ee7491328b5f45271cf44295d | [
"MIT"
] | 2 | 2022-03-04T02:14:13.000Z | 2022-03-08T09:05:54.000Z | # Write a program that will iteratively update and
# predict based on the location measurements
# and inferred motions shown below.
def update(mean1, var1, mean2, var2):
new_mean = float(var2 * mean1 + var1 * mean2) / (var1 + var2)
new_var = 1./(1./var1 + 1./var2)
return [new_mean, new_var]
def predict(... | 27.833333 | 65 | 0.657485 |
2f774bf5b9140a4511384b2b010acc6f9dae9823 | 7,888 | py | Python | data/external/repositories/180904/Kaggle_WestNileVirus-master/src/train.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/180904/Kaggle_WestNileVirus-master/src/train.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/180904/Kaggle_WestNileVirus-master/src/train.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | from __future__ import print_function
import numpy as np
import datetime
import csv
from lasagne.layers import InputLayer, DropoutLayer, DenseLayer
from lasagne.updates import nesterov_momentum
from lasagne.objectives import binary_crossentropy
from nolearn.lasagne import NeuralNet
import theano
from theano import tens... | 33.854077 | 142 | 0.580882 |
c0d6517217a13be609a28f8ce9e606c89f08389c | 215 | py | Python | Exercicios-CursoEmVideo/ex002.py | guilhermeerosa/Python | bf15b2abc952e3792d058ae72c157709e113b651 | [
"MIT"
] | null | null | null | Exercicios-CursoEmVideo/ex002.py | guilhermeerosa/Python | bf15b2abc952e3792d058ae72c157709e113b651 | [
"MIT"
] | null | null | null | Exercicios-CursoEmVideo/ex002.py | guilhermeerosa/Python | bf15b2abc952e3792d058ae72c157709e113b651 | [
"MIT"
] | null | null | null | #Pergunta dia/mês/ano e informa sua data de nascimento
print('Informe seus dados de nascimento:')
dia = input('Dia: ')
mes = input('Mês: ')
ano = input('Ano: ')
print(f'Você nasceu no dia {dia} de {mes} de {ano}.')
| 30.714286 | 54 | 0.669767 |
5f2789019b8ac1f1787ca913ae69afad2acb21fe | 5,707 | py | Python | ucdb/ucdb_table.py | edmundmk/ualyze | 5584410f90d6ce7ded7714b81ba35be2686ec621 | [
"0BSD"
] | 9 | 2020-04-28T04:33:15.000Z | 2021-11-14T20:26:12.000Z | ucdb/ucdb_table.py | edmundmk/ualyze | 5584410f90d6ce7ded7714b81ba35be2686ec621 | [
"0BSD"
] | null | null | null | ucdb/ucdb_table.py | edmundmk/ualyze | 5584410f90d6ce7ded7714b81ba35be2686ec621 | [
"0BSD"
] | 2 | 2020-07-24T02:12:13.000Z | 2022-02-01T09:13:30.000Z | #!/usr/bin/env python3
#
# ucdb_table.py
#
# Created by Edmund Kapusniak on 28/05/2020.
# Copyright © 2020 Edmund Kapusniak.
#
# Licensed under the ISC License. See LICENSE file in the project root for
# full license information.
#
#
# Run this script to generate the property table:
#
# python3 ucdb_ta... | 28.393035 | 197 | 0.626248 |
7a4aa01d2aa5570ed566c03707bb34e97ab67778 | 3,271 | py | Python | jobs/models.py | kaichengyan/efzer-jobs-rest-api | cfc196a4a63b10862a7b1d3d47a2dbe1eab378d5 | [
"BSD-2-Clause"
] | 2 | 2017-10-03T08:38:01.000Z | 2021-10-31T10:24:46.000Z | jobs/models.py | kaichengyan/efzer-jobs-rest-api | cfc196a4a63b10862a7b1d3d47a2dbe1eab378d5 | [
"BSD-2-Clause"
] | null | null | null | jobs/models.py | kaichengyan/efzer-jobs-rest-api | cfc196a4a63b10862a7b1d3d47a2dbe1eab378d5 | [
"BSD-2-Clause"
] | null | null | null | from django.core.exceptions import ValidationError
from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
def validate_class(grad_class):
year_number = grad... | 24.969466 | 106 | 0.615102 |
c0177c9b21d92045ab6871763a0ab7549a2b3425 | 16,886 | py | Python | safe_transaction_service/history/admin.py | Janmajayamall/safe-transaction-service | 3c24c50463ff8a1a3df00e8c6177810f94027edd | [
"MIT"
] | null | null | null | safe_transaction_service/history/admin.py | Janmajayamall/safe-transaction-service | 3c24c50463ff8a1a3df00e8c6177810f94027edd | [
"MIT"
] | 1 | 2022-02-28T21:28:09.000Z | 2022-02-28T21:28:09.000Z | safe_transaction_service/history/admin.py | Janmajayamall/safe-transaction-service | 3c24c50463ff8a1a3df00e8c6177810f94027edd | [
"MIT"
] | null | null | null | from typing import Optional
from django.contrib import admin
from django.db.models import F, Q
from django.db.models.functions import Greatest
from django.db.transaction import atomic
from hexbytes import HexBytes
from rest_framework.authtoken.admin import TokenAdmin
from gnosis.eth import EthereumClientProvider
fr... | 28.76661 | 88 | 0.64438 |
a69d17c684ccfd17486c703ffce26f45aa0f77fe | 778 | py | Python | 02_oop/02_information_hiding/02_encapsulation_good.py | doanthanhnhan/learningPY | 93c10c5225a306c791402095e1cf0b454f31d0c2 | [
"MIT"
] | 1 | 2021-04-04T02:39:05.000Z | 2021-04-04T02:39:05.000Z | 02_oop/02_information_hiding/02_encapsulation_good.py | doanthanhnhan/learningPY | 93c10c5225a306c791402095e1cf0b454f31d0c2 | [
"MIT"
] | null | null | null | 02_oop/02_information_hiding/02_encapsulation_good.py | doanthanhnhan/learningPY | 93c10c5225a306c791402095e1cf0b454f31d0c2 | [
"MIT"
] | null | null | null | class User:
def __init__(self, userName=None, password=None):
self.__userName = userName
self.__password = password
def login(self, userName, password):
if ((self.__userName.lower() == userName.lower())
and (self.__password == password)):
print(
"Access Granted against username:",... | 32.416667 | 76 | 0.682519 |
fa70fa81cdbb8b0c8d1fadd5e14538813bd74d96 | 716 | py | Python | _py2tmp/ir0_optimization/__init__.py | google/tmppy | faf67af1213ee709f28cc5f492ec4903c51d4104 | [
"Apache-2.0"
] | 27 | 2017-10-02T01:17:35.000Z | 2021-10-16T23:31:46.000Z | _py2tmp/ir0_optimization/__init__.py | google/tmppy | faf67af1213ee709f28cc5f492ec4903c51d4104 | [
"Apache-2.0"
] | 51 | 2017-10-01T09:38:22.000Z | 2018-10-13T16:39:39.000Z | _py2tmp/ir0_optimization/__init__.py | google/tmppy | faf67af1213ee709f28cc5f492ec4903c51d4104 | [
"Apache-2.0"
] | 9 | 2017-11-04T13:12:27.000Z | 2021-10-16T23:31:38.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 42.117647 | 77 | 0.782123 |
4a3e57c92b047b8235595fffa94cea30a696b84e | 834 | py | Python | setup.py | lycantropos/ethereum_helpers | 8b7375d18398c94f97628903f562d7d6c354c418 | [
"MIT"
] | null | null | null | setup.py | lycantropos/ethereum_helpers | 8b7375d18398c94f97628903f562d7d6c354c418 | [
"MIT"
] | null | null | null | setup.py | lycantropos/ethereum_helpers | 8b7375d18398c94f97628903f562d7d6c354c418 | [
"MIT"
] | null | null | null | from setuptools import (setup,
find_packages)
setup(name='ethereum_helpers',
packages=find_packages(),
version='0.0.5',
description='Helper functions for working with ethereum network.',
author='Azat Ibrakov',
author_email='azatibrakov@gmail.com',
url='https:... | 32.076923 | 77 | 0.565947 |
75c628783dbe1976963b40f9d8bb240af4fb1a64 | 12,294 | py | Python | test/test_exceptions.py | GabrielJie/mpi4py | c7b9314b8a2903c55685c43aca0b382791ab9b89 | [
"BSD-2-Clause"
] | 1 | 2022-01-19T06:34:35.000Z | 2022-01-19T06:34:35.000Z | test/test_exceptions.py | GabrielJie/mpi4py | c7b9314b8a2903c55685c43aca0b382791ab9b89 | [
"BSD-2-Clause"
] | null | null | null | test/test_exceptions.py | GabrielJie/mpi4py | c7b9314b8a2903c55685c43aca0b382791ab9b89 | [
"BSD-2-Clause"
] | null | null | null | from mpi4py import MPI
import mpiunittest as unittest
import sys, os
# --------------------------------------------------------------------
@unittest.skipMPI('PlatformMPI')
@unittest.skipMPI('MPICH2')
class BaseTestCase(unittest.TestCase):
def setUp(self):
self.errhdl_world = MPI.COMM_WORLD.Get_errhandle... | 33.407609 | 79 | 0.601513 |
fd827cc050143538408f15efde2808eb313f22a8 | 853 | py | Python | app.py | Arodrigal/docker-skills | 49a3a05f6f16ae5cc8137ffd3aa1d1cb384529cc | [
"Apache-2.0"
] | null | null | null | app.py | Arodrigal/docker-skills | 49a3a05f6f16ae5cc8137ffd3aa1d1cb384529cc | [
"Apache-2.0"
] | null | null | null | app.py | Arodrigal/docker-skills | 49a3a05f6f16ae5cc8137ffd3aa1d1cb384529cc | [
"Apache-2.0"
] | null | null | null | from os import environ
from bson import json_util
from bson.objectid import ObjectId
from flask import Flask, jsonify
from flask_pymongo import PyMongo
from src.mongoflask import MongoJSONEncoder, ObjectIdConverter, find_restaurants
app = Flask(__name__)
app.config["MONGO_URI"] = environ.get("MONGO_URI")
app.json_e... | 26.65625 | 81 | 0.739742 |
01cff427653e903924908e54bcd2a16946280f55 | 1,979 | py | Python | players/migrations/0001_initial.py | OnerInce/nfl-rest_api | 8d66d68ae7f04476a1b9f509e69a9d0dc83bfcca | [
"Apache-2.0"
] | 2 | 2021-06-14T18:14:10.000Z | 2022-01-29T18:45:28.000Z | players/migrations/0001_initial.py | OnerInce/nfl-rest_api | 8d66d68ae7f04476a1b9f509e69a9d0dc83bfcca | [
"Apache-2.0"
] | null | null | null | players/migrations/0001_initial.py | OnerInce/nfl-rest_api | 8d66d68ae7f04476a1b9f509e69a9d0dc83bfcca | [
"Apache-2.0"
] | 1 | 2022-02-09T14:14:20.000Z | 2022-02-09T14:14:20.000Z | # Generated by Django 3.1.5 on 2021-01-24 18:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='College',
fields=[
... | 36.648148 | 125 | 0.548762 |
856f5e282a183c8f7ae73ec15adf8bbb667e36fe | 4,904 | py | Python | pythonFiles/vscode_datascience_helpers/getJupyterVariableDataFrameInfo.py | sunix/vscode-python | ce409abd7bf18be8c3c6f15b0dd86c218c7810e4 | [
"MIT"
] | 28 | 2020-05-21T19:17:43.000Z | 2021-12-14T06:54:41.000Z | pythonFiles/vscode_datascience_helpers/getJupyterVariableDataFrameInfo.py | sunix/vscode-python | ce409abd7bf18be8c3c6f15b0dd86c218c7810e4 | [
"MIT"
] | 66 | 2020-09-01T20:09:30.000Z | 2022-03-31T10:03:15.000Z | vscode/extensions/ms-python.python-2020.3.69010/pythonFiles/vscode_datascience_helpers/getJupyterVariableDataFrameInfo.py | Adespinoza/dotfiles | e2509402a7fd2623a3ea401b6f9fcbf6a372fc60 | [
"CC0-1.0"
] | 9 | 2020-06-06T16:41:24.000Z | 2021-11-03T12:10:58.000Z | # Query Jupyter server for the info about a dataframe
import json as _VSCODE_json
import pandas as _VSCODE_pd
import pandas.io.json as _VSCODE_pd_json
import builtins as _VSCODE_builtins
# _VSCode_sub_supportsDataExplorer will contain our list of data explorer supported types
_VSCode_supportsDataExplorer = "['list', '... | 40.528926 | 135 | 0.725122 |
6f6305d397d0811157b9c356a1b3eca5fc4ab9aa | 3,641 | py | Python | em_stitch/viz/schemas.py | AllenInstitute/em_stitch | 5b24e57b83fdda14cdd7c2bd540c517f68c0569c | [
"BSD-2-Clause"
] | 2 | 2019-04-20T00:28:47.000Z | 2020-01-31T11:12:43.000Z | em_stitch/viz/schemas.py | AllenInstitute/em_stitch | 5b24e57b83fdda14cdd7c2bd540c517f68c0569c | [
"BSD-2-Clause"
] | 14 | 2019-04-22T17:05:11.000Z | 2020-11-03T20:49:35.000Z | em_stitch/viz/schemas.py | AllenInstitute/em_stitch | 5b24e57b83fdda14cdd7c2bd540c517f68c0569c | [
"BSD-2-Clause"
] | 1 | 2020-05-12T17:34:06.000Z | 2020-05-12T17:34:06.000Z | import warnings
from marshmallow.warnings import ChangedInMarshmallow3Warning
from argschema import ArgSchema
from argschema.schemas import DefaultSchema
from argschema.fields import (
Nested, Int, Str, Boolean, List)
warnings.simplefilter(
action='ignore',
category=ChangedInMarshmallow3Warning)... | 30.596639 | 76 | 0.641582 |
9daeb97ebc4b5240fc91135584f41c3351c723ca | 8,178 | py | Python | allennlp/training/metrics/evalb_bracketing_scorer.py | tpanza/allennlp | 2c54cf8b67f0d70f6c0f0374838a2ea6c1e6b41a | [
"Apache-2.0"
] | null | null | null | allennlp/training/metrics/evalb_bracketing_scorer.py | tpanza/allennlp | 2c54cf8b67f0d70f6c0f0374838a2ea6c1e6b41a | [
"Apache-2.0"
] | null | null | null | allennlp/training/metrics/evalb_bracketing_scorer.py | tpanza/allennlp | 2c54cf8b67f0d70f6c0f0374838a2ea6c1e6b41a | [
"Apache-2.0"
] | null | null | null | from typing import List
import logging
import os
import tempfile
import subprocess
import shutil
from overrides import overrides
from nltk import Tree
import torch
import torch.distributed as dist
from allennlp.common.util import is_distributed
from allennlp.common.checks import ConfigurationError
from allennlp.trai... | 37.686636 | 100 | 0.629494 |
210fe2ecf1877b88088b16b52c4e437ee6c81c67 | 13,358 | py | Python | ross/plotly_theme.py | hssaabbl/ross | 5e548d24c8522c8a9a294479c580c21b4eb3bb65 | [
"MIT"
] | 69 | 2018-12-26T19:21:26.000Z | 2022-02-10T08:48:03.000Z | ross/plotly_theme.py | hssaabbl/ross | 5e548d24c8522c8a9a294479c580c21b4eb3bb65 | [
"MIT"
] | 639 | 2018-12-18T16:44:11.000Z | 2022-03-27T16:46:41.000Z | ross/plotly_theme.py | hssaabbl/ross | 5e548d24c8522c8a9a294479c580c21b4eb3bb65 | [
"MIT"
] | 136 | 2019-01-08T12:37:32.000Z | 2022-03-30T07:14:35.000Z | """Plotly theme to ROSS - Rotordynamic Open Source Sofware."""
from plotly import graph_objects as go
from plotly import io as pio
# tableau colors
tableau_colors = {
"blue": "#1f77b4",
"orange": "#ff7f0e",
"green": "#2ca02c",
"red": "#d62728",
"purple": "#9467bd",
"brown": "#8c564b",
"pink... | 34.786458 | 88 | 0.367196 |
adf9e50c9788a9cf137ade97c151a924bc40e6c4 | 7,304 | py | Python | homework_4_2.py | pyaiveoleg/computing_practicum | c91cc72f33ae6e744bfb2a5e0b23e3647fa0089a | [
"MIT"
] | null | null | null | homework_4_2.py | pyaiveoleg/computing_practicum | c91cc72f33ae6e744bfb2a5e0b23e3647fa0089a | [
"MIT"
] | null | null | null | homework_4_2.py | pyaiveoleg/computing_practicum | c91cc72f33ae6e744bfb2a5e0b23e3647fa0089a | [
"MIT"
] | null | null | null | import math
from typing import Callable
class MethodComplex:
@staticmethod
def calculate(f: Callable, values_table: list, h: float, **kwargs):
pass
@staticmethod
def name():
pass
class left_rectangle_complex(MethodComplex):
@staticmethod
def calculate(f: Callable, values_tab... | 41.265537 | 125 | 0.566128 |
87113443872d44cb9d68d073383def1b6e243986 | 807 | py | Python | src/sample/utils/schemas.py | fierroformo/django-app | 84d5cc3b92ab3091c92bcbb1807295c90150d982 | [
"Apache-2.0"
] | null | null | null | src/sample/utils/schemas.py | fierroformo/django-app | 84d5cc3b92ab3091c92bcbb1807295c90150d982 | [
"Apache-2.0"
] | null | null | null | src/sample/utils/schemas.py | fierroformo/django-app | 84d5cc3b92ab3091c92bcbb1807295c90150d982 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from drf_yasg import openapi
from drf_yasg.inspectors.view import SwaggerAutoSchema
class CustomJSONAPISchema(SwaggerAutoSchema):
def get_responses(self):
"""
Get the possible responses for this view as a swagger
:class:`.Responses` object.
:return: the doc... | 35.086957 | 69 | 0.672862 |
4a2cd16f91f204304312cfda0b325b6eeb0fcf45 | 11,395 | py | Python | src/output.py | tuguldurs/vivus | 8d5f4373d1746643b1eee2816e2e5ba9efc926c8 | [
"MIT"
] | 4 | 2021-05-05T17:01:10.000Z | 2021-07-09T18:15:32.000Z | src/output.py | tuguldurs/vivus | 8d5f4373d1746643b1eee2816e2e5ba9efc926c8 | [
"MIT"
] | 1 | 2021-11-24T02:11:04.000Z | 2021-11-24T02:11:04.000Z | src/output.py | UltraSound-AI/vivus-sdk | 8d5f4373d1746643b1eee2816e2e5ba9efc926c8 | [
"MIT"
] | 1 | 2021-05-26T10:52:13.000Z | 2021-05-26T10:52:13.000Z | """
processes fully populated vivus object into outputs
"""
import logging
import os
import numpy as np
import matplotlib.pyplot as plt
from datetime import date
from sys import exit
from pydicom import dcmread
from . import params as p
from .preproc import isDICOM
mlg = logging.getLogger(__name__)
class Stenos... | 31.740947 | 97 | 0.575516 |
ee984602116ed2d10be75f33e68ef5e0818aea85 | 21,183 | py | Python | tests/test_ch.py | jeffhsu3/chumpy | 00e83955ea45cd129d55a3017c08f89045842224 | [
"MIT"
] | null | null | null | tests/test_ch.py | jeffhsu3/chumpy | 00e83955ea45cd129d55a3017c08f89045842224 | [
"MIT"
] | null | null | null | tests/test_ch.py | jeffhsu3/chumpy | 00e83955ea45cd129d55a3017c08f89045842224 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
Author(s): Matthew Loper
See LICENCE.txt for licensing and contact information.
"""
from __future__ import print_function
import time
import unittest
import numpy as np
import scipy.sparse as sp
import chumpy as ch
class TestCh(unittest.TestCase):
def test_cachehit... | 33.730892 | 143 | 0.545343 |
0b15d6ae716cb404ff784dccb98d33818a109356 | 633 | py | Python | mauth_client/exceptions.py | mdsol/mauth-client-python | 0711017ebe644d5571c3ef3b26868b8f70e8c241 | [
"MIT"
] | 1 | 2020-10-23T06:31:52.000Z | 2020-10-23T06:31:52.000Z | mauth_client/exceptions.py | mdsol/mauth-client-python | 0711017ebe644d5571c3ef3b26868b8f70e8c241 | [
"MIT"
] | 2 | 2021-02-10T15:54:40.000Z | 2021-02-18T14:23:03.000Z | mauth_client/exceptions.py | mdsol/mauth-client-python | 0711017ebe644d5571c3ef3b26868b8f70e8c241 | [
"MIT"
] | null | null | null | class InauthenticError(Exception):
"""
Used to indicate that an object was expected to be validly signed but its signature does not
match its contents, and so is inauthentic.
"""
class UnableToAuthenticateError(Exception):
"""
The response from the MAuth service encountered when attempting to ... | 21.1 | 96 | 0.691943 |
dcd970c9aa2baa2811352948eba94403d1377a37 | 28,193 | py | Python | mi/dataset/parser/vel3d_cd_dcl.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/vel3d_cd_dcl.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/vel3d_cd_dcl.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | """
@package mi.dataset.parser
@file /mi/dataset/parser/vel3d_cd_dcl.py
@author Emily Hahn
@brief Parser for the vel3d instrument series c,d through dcl dataset driver
"""
__author__ = 'Emily Hahn'
__license__ = 'Apache 2.0'
import struct
import re
import binascii
import base64
from mi.core.log import get_logger
log... | 40.978198 | 118 | 0.674281 |
88de45169044775cfd60080c176aab00935b2ac6 | 6,765 | py | Python | python/ccxt/async/vaultoro.py | hippylover/ccxt | db304e95b699c1971ad37b9053ae71fcb5dc3b03 | [
"MIT"
] | 2 | 2018-03-08T20:17:22.000Z | 2021-06-01T23:36:26.000Z | python/ccxt/async/vaultoro.py | August-Ghost/ccxt | 886c596ffde611b5a92cb5b6e3788ff010324c74 | [
"MIT"
] | null | null | null | python/ccxt/async/vaultoro.py | August-Ghost/ccxt | 886c596ffde611b5a92cb5b6e3788ff010324c74 | [
"MIT"
] | 9 | 2018-02-20T18:24:00.000Z | 2019-06-18T14:23:11.000Z | # -*- coding: utf-8 -*-
from ccxt.async.base.exchange import Exchange
class vaultoro (Exchange):
def describe(self):
return self.deep_extend(super(vaultoro, self).describe(), {
'id': 'vaultoro',
'name': 'Vaultoro',
'countries': 'CH',
'rateLimit': 1000,
... | 34.340102 | 126 | 0.467406 |
a0aa75b977e13a9f9f391b7620127bc1f1d66e3f | 1,043 | py | Python | plugins/controller/baker_builder.py | gnydick/qairon | e67af1f88ac6c614ae33adc4f42ab2ec3cc5b257 | [
"MIT"
] | null | null | null | plugins/controller/baker_builder.py | gnydick/qairon | e67af1f88ac6c614ae33adc4f42ab2ec3cc5b257 | [
"MIT"
] | null | null | null | plugins/controller/baker_builder.py | gnydick/qairon | e67af1f88ac6c614ae33adc4f42ab2ec3cc5b257 | [
"MIT"
] | null | null | null | from controllers import RestController
from .bakers import HelmBakerController
class BakerBuilder:
def __init__(self, deployment_id, build_id, release_job_number):
self.rest = RestController()
self.deployment_id = deployment_id
self.build_id = build_id
self.release_job_number = re... | 45.347826 | 100 | 0.686481 |
1bae50fb11fc201c41bc7a0c31f34973221da730 | 5,501 | py | Python | src/callback_executor/executor.py | wladimirguerra/callback_executor | bf34263c3383cd4e68b54d418c172ddae229d8b7 | [
"MIT"
] | null | null | null | src/callback_executor/executor.py | wladimirguerra/callback_executor | bf34263c3383cd4e68b54d418c172ddae229d8b7 | [
"MIT"
] | null | null | null | src/callback_executor/executor.py | wladimirguerra/callback_executor | bf34263c3383cd4e68b54d418c172ddae229d8b7 | [
"MIT"
] | null | null | null | import asyncio
import atexit
import typing
from typing import Callable
class ExecutorQueue:
"""
An executor queue class that provide a way to call `Callables` at a
`call_interval`.
The callback are executed in a thread pool (`ThreadPoolExecutor`) so
it is possible to enqueue
blocking callbac... | 33.339394 | 101 | 0.606617 |
980c803536d5fefae381ae6e263303663014c50e | 92 | py | Python | django_gcp_log_groups/__init__.py | christophski/flask-gcp-log-groups | 54c51470f7d8131e1e4c22cabf84dd5203078bd3 | [
"Apache-2.0"
] | 2 | 2020-05-07T07:27:01.000Z | 2021-01-06T00:40:37.000Z | django_gcp_log_groups/__init__.py | christophski/django-gcp-log-groups | 54c51470f7d8131e1e4c22cabf84dd5203078bd3 | [
"Apache-2.0"
] | 1 | 2022-03-27T21:16:09.000Z | 2022-03-27T21:16:09.000Z | django_gcp_log_groups/__init__.py | christophski/django-gcp-log-groups | 54c51470f7d8131e1e4c22cabf84dd5203078bd3 | [
"Apache-2.0"
] | 1 | 2019-10-04T14:51:18.000Z | 2019-10-04T14:51:18.000Z | # -*- coding: utf-8 -*-
from django_gcp_log_groups.gcp_logging import GCPLoggingMiddleware
| 23 | 66 | 0.782609 |
3ab6511b8259be0817e47fc5bb067ad49655aba2 | 2,115 | py | Python | models/network.py | snilloO/SCAN | 23e12d2d27f3e2a5c28882dbc7dd7daa57c53159 | [
"MIT"
] | null | null | null | models/network.py | snilloO/SCAN | 23e12d2d27f3e2a5c28882dbc7dd7daa57c53159 | [
"MIT"
] | null | null | null | models/network.py | snilloO/SCAN | 23e12d2d27f3e2a5c28882dbc7dd7daa57c53159 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import os
from .backbone import Basenet
def init_weights(m):
if type(m) == nn.Conv2d:
torch.nn.init.kaiming_normal_(m.weight.data)
elif type(m) == nn.BatchNorm2d:
torch.nn.init.normal_(m.weight.data, 1.0, 0.02)
torch.nn.... | 27.115385 | 70 | 0.555556 |
3d8cc1ff5e3ab3a684204eef6d7b5b158fd2d4cb | 15,048 | py | Python | pymedphys/labs/managelogfiles/bygantry.py | pymedphys/pymedphys-archive-2019 | 6bb7c8d0da2e93ff56469bb47e65b15ece2ea25e | [
"Apache-2.0"
] | 1 | 2020-12-20T14:13:56.000Z | 2020-12-20T14:13:56.000Z | pymedphys/labs/managelogfiles/bygantry.py | pymedphys/pymedphys-archive-2019 | 6bb7c8d0da2e93ff56469bb47e65b15ece2ea25e | [
"Apache-2.0"
] | 6 | 2020-10-06T15:36:46.000Z | 2022-02-27T05:15:17.000Z | pymedphys/labs/managelogfiles/bygantry.py | cpbhatt/pymedphys | 177b3db8e2a6e83c44835d0007d1d5c7a420fd99 | [
"Apache-2.0"
] | 1 | 2020-12-20T14:14:00.000Z | 2020-12-20T14:14:00.000Z | # Copyright (C) 2018 Cancer Care Associates
# 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 ... | 35.574468 | 89 | 0.671518 |
28bef40472cb91b97dbe5974d458c836ec4380db | 1,089 | py | Python | test/test_corrientes.py | Julioocz/SIMNAV2 | 51a5320b4f0d957afddb26e06ed055d9f89e4933 | [
"MIT"
] | 2 | 2020-07-20T09:11:18.000Z | 2021-05-26T19:15:12.000Z | test/test_corrientes.py | Julioocz/SIMNAV2 | 51a5320b4f0d957afddb26e06ed055d9f89e4933 | [
"MIT"
] | null | null | null | test/test_corrientes.py | Julioocz/SIMNAV2 | 51a5320b4f0d957afddb26e06ed055d9f89e4933 | [
"MIT"
] | 1 | 2018-06-01T20:50:25.000Z | 2018-06-01T20:50:25.000Z | from CoolProp import CoolProp as CP
from simnav.corrientes import CorrienteMateria, Compuesto
from simnav.termodinamica.paquetes import PaqueteIdeal
from .utilidades import parse_components, error_relativo
class TestCorrientes:
compuestos = [Compuesto('benzene'), Compuesto('toluene')]
paquete = PaqueteIdeal(... | 41.884615 | 82 | 0.600551 |
9c330944a2af889461586c632f11d0a367df7383 | 1,000 | py | Python | Exam/Btests.py | nadavWeisler/PythonThePracticalAspect | 7ffd52fc95d0f692f48390cb02eb5d93931577bb | [
"MIT"
] | null | null | null | Exam/Btests.py | nadavWeisler/PythonThePracticalAspect | 7ffd52fc95d0f692f48390cb02eb5d93931577bb | [
"MIT"
] | null | null | null | Exam/Btests.py | nadavWeisler/PythonThePracticalAspect | 7ffd52fc95d0f692f48390cb02eb5d93931577bb | [
"MIT"
] | null | null | null | from partB import Restaurant
res = Restaurant([3, 4, 4])
print(res.status())
res.print_restaurant()
print("---")
res.group_seating(("a", 2))
print(res.status())
res.print_restaurant()
print("---")
res.group_seating(("b", 2))
print(res.status())
res.print_restaurant()
print("---")
res.group_seating(("C", 8))
prin... | 15.625 | 33 | 0.67 |
04d46d3ec75f9568633e2a623dc2abcdfb9e7cd3 | 24,816 | py | Python | mcci-catena-provision-helium.py | mcci-catena/mcci-catena-provision | 37c13d3d5b872b311f8484fa774075d7f72d5e0e | [
"MIT"
] | 1 | 2022-02-25T23:50:42.000Z | 2022-02-25T23:50:42.000Z | mcci-catena-provision-helium.py | mcci-catena/mcci-catena-provision | 37c13d3d5b872b311f8484fa774075d7f72d5e0e | [
"MIT"
] | 15 | 2019-07-16T01:34:44.000Z | 2022-02-23T15:06:55.000Z | mcci-catena-provision-helium.py | mcci-catena/mcci-catena-provision | 37c13d3d5b872b311f8484fa774075d7f72d5e0e | [
"MIT"
] | 1 | 2022-03-09T09:25:31.000Z | 2022-03-09T09:25:31.000Z | #!/usr/bin/env python3
##############################################################################
#
# Module: mcci-catena-provision-helium.py
#
# Function:
# Provision a catena device through Helium cli
#
# Copyright and License:
# This file copyright (c) 2021 by
#
# MCCI Corporation
# 352... | 26.4 | 126 | 0.542392 |
8456a7a21086f028d1a5213c058dbde3b7cb343a | 533 | py | Python | tests/test_environment.py | vikorbit/PyLaTeX | 9dee695c88857b4894ec110765a4b3c7f84ca853 | [
"MIT"
] | 4 | 2019-10-12T21:36:01.000Z | 2021-12-21T10:03:31.000Z | tests/test_environment.py | vikorbit/PyLaTeX | 9dee695c88857b4894ec110765a4b3c7f84ca853 | [
"MIT"
] | null | null | null | tests/test_environment.py | vikorbit/PyLaTeX | 9dee695c88857b4894ec110765a4b3c7f84ca853 | [
"MIT"
] | 1 | 2020-11-25T08:47:30.000Z | 2020-11-25T08:47:30.000Z | #!/usr/bin/python
"""Test to validate that Environments uphold contract of base classes."""
from pylatex.base_classes import Environment
def test_alltt():
class AllTT(Environment):
escape = False
content_separator = "\n"
alltt = AllTT()
alltt.append("This is alltt content\nIn two lines... | 25.380952 | 73 | 0.662289 |
6f7ae88f74335dc820f2538508e90e3671184afb | 554 | py | Python | VaarunSinha/DAY 2/TaskApiTut/api/migrations/0001_initial.py | dyofficial/100-Days-of-Code | 28a4334212b6d1679aaa8dda9906bc2640a0a973 | [
"MIT"
] | 33 | 2022-01-11T14:00:24.000Z | 2022-03-24T02:49:44.000Z | VaarunSinha/DAY 2/TaskApiTut/api/migrations/0001_initial.py | dyofficial/100-Days-of-Code | 28a4334212b6d1679aaa8dda9906bc2640a0a973 | [
"MIT"
] | 28 | 2022-01-11T17:08:52.000Z | 2022-03-15T17:03:15.000Z | VaarunSinha/DAY 2/TaskApiTut/api/migrations/0001_initial.py | dyofficial/100-Days-of-Code | 28a4334212b6d1679aaa8dda9906bc2640a0a973 | [
"MIT"
] | 57 | 2022-01-11T15:54:07.000Z | 2022-03-27T04:37:42.000Z | # Generated by Django 4.0.1 on 2022-01-16 14:59
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Task',
fields=[
('id', models.BigAutoField(... | 24.086957 | 117 | 0.575812 |
03929c654e97a261b2e6efb67fe0894869ce8cbc | 3,602 | py | Python | scripts/Leiden Scripts/FP_Monitor.py | spauka/therm_flask | ea898b60cd87c5b5dbf0fdf42989034e37b0effa | [
"MIT"
] | 2 | 2021-03-15T01:25:49.000Z | 2021-07-02T14:23:49.000Z | scripts/Leiden Scripts/FP_Monitor.py | spauka/therm_flask | ea898b60cd87c5b5dbf0fdf42989034e37b0effa | [
"MIT"
] | null | null | null | scripts/Leiden Scripts/FP_Monitor.py | spauka/therm_flask | ea898b60cd87c5b5dbf0fdf42989034e37b0effa | [
"MIT"
] | 1 | 2021-02-06T14:58:41.000Z | 2021-02-06T14:58:41.000Z | import os, os.path
import sys
import re
import time, datetime
import csv, json
import urllib.request, urllib.error, http.client
import serial
FRIDGE = 'Red_Fridge'
SUPPL = 'FP'
SERIAL = "COM15"
def find_oldest():
URL = 'http://www.physics.usyd.edu.au/~spauka/therm_flask/%s/%s/?current' % (FRIDGE,SUPPL)
line =... | 32.45045 | 95 | 0.52332 |
cf65126f76ab676165567007d349f6349d726d14 | 33,870 | py | Python | zerver/views/streams.py | vishkrish200/zulip | 73179baaf6fa1a01643c48bdfd5b6163c9cfa54c | [
"Apache-2.0"
] | null | null | null | zerver/views/streams.py | vishkrish200/zulip | 73179baaf6fa1a01643c48bdfd5b6163c9cfa54c | [
"Apache-2.0"
] | null | null | null | zerver/views/streams.py | vishkrish200/zulip | 73179baaf6fa1a01643c48bdfd5b6163c9cfa54c | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from typing import (
Any,
Callable,
Dict,
Iterable,
List,
Mapping,
Optional,
Sequence,
Set,
Tuple,
Union,
)
import orjson
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions imp... | 42.179328 | 109 | 0.676705 |
d85dd714cb5d842ea12dee4140adfd7db55c9c01 | 7,019 | py | Python | tests/unit/test_scenes.py | kevinleestone/pyrender | 4a289a6205c5baa623cd0e7da1be3d898bcbc4da | [
"MIT"
] | 845 | 2019-01-21T20:33:03.000Z | 2022-03-29T11:33:48.000Z | tests/unit/test_scenes.py | kevinleestone/pyrender | 4a289a6205c5baa623cd0e7da1be3d898bcbc4da | [
"MIT"
] | 191 | 2019-01-24T04:15:18.000Z | 2022-03-27T21:37:18.000Z | tests/unit/test_scenes.py | kevinleestone/pyrender | 4a289a6205c5baa623cd0e7da1be3d898bcbc4da | [
"MIT"
] | 174 | 2019-03-04T07:14:19.000Z | 2022-03-29T06:38:31.000Z | import numpy as np
import pytest
import trimesh
from pyrender import (Mesh, PerspectiveCamera, DirectionalLight,
SpotLight, PointLight, Scene, Node, OrthographicCamera)
def test_scenes():
# Basics
s = Scene()
assert np.allclose(s.bg_color, np.ones(4))
assert np.allclose(s.ambie... | 29.741525 | 77 | 0.606924 |
908299c4758067d15a9628a77e7a70ffcff057a7 | 240 | py | Python | ipc/ipc/echo.py | rboxbot/rodabox | 255a63b60c9479371ec9209b5ce1cf27443e3c4e | [
"Apache-2.0"
] | null | null | null | ipc/ipc/echo.py | rboxbot/rodabox | 255a63b60c9479371ec9209b5ce1cf27443e3c4e | [
"Apache-2.0"
] | null | null | null | ipc/ipc/echo.py | rboxbot/rodabox | 255a63b60c9479371ec9209b5ce1cf27443e3c4e | [
"Apache-2.0"
] | null | null | null | import sys
import socket
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as channel:
channel.connect(('0.0.0.0', 8001))
message = ' '.join(sys.argv[1:])
channel.send(message.encode())
rec = channel.recv(100000)
print(rec)
| 24 | 66 | 0.704167 |
968c00a24988fc5ef33f1be255a1fe0057b839ea | 9,413 | py | Python | py3/lib/python3.6/site-packages/geocoder/google.py | unique1o1/Find-Places | 7c448df257ee290440f30e1f89f3b4a9a055bd5b | [
"MIT"
] | null | null | null | py3/lib/python3.6/site-packages/geocoder/google.py | unique1o1/Find-Places | 7c448df257ee290440f30e1f89f3b4a9a055bd5b | [
"MIT"
] | 2 | 2018-07-31T15:42:12.000Z | 2020-08-26T08:43:28.000Z | py3/lib/python3.6/site-packages/geocoder/google.py | unique1o1/Find-Places | 7c448df257ee290440f30e1f89f3b4a9a055bd5b | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding: utf8
from __future__ import absolute_import
import six
from geocoder.base import OneResult, MultipleResultsQuery
from geocoder.keys import google_key, google_client, google_client_secret
from collections import OrderedDict
class GoogleResult(OneResult):
def __init__(self, json_conten... | 32.912587 | 103 | 0.631148 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.