hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79745bdaa548acb91d605d2ed633f1133c40112f | 2,968 | py | Python | nflows/transforms/UMNN/MonotonicNormalizer.py | KailinLi/nflows | 7c07a1d5e510beb681d1b11d6ffda95a086a8153 | [
"MIT"
] | null | null | null | nflows/transforms/UMNN/MonotonicNormalizer.py | KailinLi/nflows | 7c07a1d5e510beb681d1b11d6ffda95a086a8153 | [
"MIT"
] | null | null | null | nflows/transforms/UMNN/MonotonicNormalizer.py | KailinLi/nflows | 7c07a1d5e510beb681d1b11d6ffda95a086a8153 | [
"MIT"
] | null | null | null | import torch
# from UMNN import NeuralIntegral, ParallelNeuralIntegral
import torch.nn as nn
def _flatten(sequence):
flat = [p.contiguous().view(-1) for p in sequence]
return torch.cat(flat) if len(flat) > 0 else torch.tensor([])
class ELUPlus(nn.Module):
def __init__(self):
super().__init__()
... | 32.977778 | 107 | 0.548854 |
79745c16c4a5356067ec8903ad985fa4491891d5 | 1,246 | py | Python | test.py | katrinleinweber/riemann_book | 0bd2320765a459249d938c6913cc39339cddb3fb | [
"BSD-3-Clause"
] | 1 | 2021-05-30T07:56:12.000Z | 2021-05-30T07:56:12.000Z | test.py | katrinleinweber/riemann_book | 0bd2320765a459249d938c6913cc39339cddb3fb | [
"BSD-3-Clause"
] | null | null | null | test.py | katrinleinweber/riemann_book | 0bd2320765a459249d938c6913cc39339cddb3fb | [
"BSD-3-Clause"
] | 1 | 2018-06-01T10:13:16.000Z | 2018-06-01T10:13:16.000Z | import os
import subprocess
import tempfile
import sys
import nbformat
import doctest
import utils
if sys.version_info >= (3,0):
kernel = 'python3'
else:
kernel = 'python2'
def _notebook_run(path):
"""Execute a notebook via nbconvert and collect output.
:returns (parsed nb object, execution errors)... | 27.086957 | 83 | 0.608347 |
79745c7eab7e4130cf080d2312cb3336327ba78c | 2,024 | py | Python | Methods/Slot/SlotMPolar/build_geometry.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | Methods/Slot/SlotMPolar/build_geometry.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | Methods/Slot/SlotMPolar/build_geometry.py | Superomeg4/pyleecan | 2b695b5f39e77475a07aa0ea89489fb0a9659337 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""@package Methods.Machine.SlotMPolar.build_geometry
SlotMPolar build_geometry method
@date Created on Mon Dec 22 13:00:07 2014
@copyright (C) 2014-2015 EOMYS ENGINEERING.
@author pierre_b
@todo: case W3 == 0
"""
from numpy import exp
from pyleecan.Classes.Arc1 import Arc1
from pyleecan.Class... | 28.914286 | 77 | 0.630435 |
79745d3ec2772db4c9394d4b35b0bdb5b1c8e90a | 4,418 | py | Python | tepsimulation/packages/graph/graphing/sensors.py | hsaafan/TEPSimulation | 86743fab499d8ffb690df63308e2a835fa59c6fd | [
"MIT"
] | null | null | null | tepsimulation/packages/graph/graphing/sensors.py | hsaafan/TEPSimulation | 86743fab499d8ffb690df63308e2a835fa59c6fd | [
"MIT"
] | null | null | null | tepsimulation/packages/graph/graphing/sensors.py | hsaafan/TEPSimulation | 86743fab499d8ffb690df63308e2a835fa59c6fd | [
"MIT"
] | null | null | null | import pint
import warnings
from ... import utils
class Sensor:
""" Sensor class for taking measurements
Attributes
----------
id: str
User set label for identifying sensor
flowsheet: flowsheet.FlowSheet
The flowsheet object which the sensor is used for
target: list
T... | 33.218045 | 79 | 0.581258 |
79745defa703e7839e51ca9f45fa82164d232671 | 1,078 | py | Python | kubernetes/test/test_v1alpha1_cluster_role_binding_list.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | 1 | 2018-10-20T19:37:57.000Z | 2018-10-20T19:37:57.000Z | kubernetes/test/test_v1alpha1_cluster_role_binding_list.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1alpha1_cluster_role_binding_list.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | 2 | 2018-07-27T19:39:34.000Z | 2020-12-25T02:48:27.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 23.955556 | 109 | 0.74026 |
79745e45fc41513ce59e59660e4bd56a57237aa9 | 1,079 | py | Python | tests/functional/test_endpoint_show.py | masalim2/globus-cli | aaea1635cec2948cb4ca047d2168866d30696e2d | [
"Apache-2.0"
] | null | null | null | tests/functional/test_endpoint_show.py | masalim2/globus-cli | aaea1635cec2948cb4ca047d2168866d30696e2d | [
"Apache-2.0"
] | null | null | null | tests/functional/test_endpoint_show.py | masalim2/globus-cli | aaea1635cec2948cb4ca047d2168866d30696e2d | [
"Apache-2.0"
] | null | null | null | import pytest
@pytest.mark.parametrize("ep_type", ["personal", "share", "server"])
def test_show_works(run_line, load_api_fixtures, ep_type):
"""make sure it doesn't blow up"""
data = load_api_fixtures("endpoint_operations.yaml")
if ep_type == "personal":
epid = data["metadata"]["gcp_endpoint_id"]... | 32.69697 | 68 | 0.68304 |
79745e4c771d26b51d1f463419546f62d01d14f0 | 22,006 | py | Python | qa/rpc-tests/replace-by-fee.py | mirzaei-ce/core-tabit | f4ae2cb3a1026ce0670751f5d98e5eee91097468 | [
"MIT"
] | null | null | null | qa/rpc-tests/replace-by-fee.py | mirzaei-ce/core-tabit | f4ae2cb3a1026ce0670751f5d98e5eee91097468 | [
"MIT"
] | null | null | null | qa/rpc-tests/replace-by-fee.py | mirzaei-ce/core-tabit | f4ae2cb3a1026ce0670751f5d98e5eee91097468 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test replace by fee code
#
from test_framework.test_framework import TabitTestFramework
from test_fr... | 37.109612 | 105 | 0.602836 |
79745f20ef36bbccbbe62b8787355b8f6d1c52ee | 678 | py | Python | reframe/core/launchers/ssh.py | MaximeVdB/reframe | ff998e9e6501f586e36fe5097e6aab86a9dc9435 | [
"BSD-3-Clause"
] | null | null | null | reframe/core/launchers/ssh.py | MaximeVdB/reframe | ff998e9e6501f586e36fe5097e6aab86a9dc9435 | [
"BSD-3-Clause"
] | null | null | null | reframe/core/launchers/ssh.py | MaximeVdB/reframe | ff998e9e6501f586e36fe5097e6aab86a9dc9435 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
from reframe.core.backends import register_launcher
from reframe.core.launchers import JobLauncher
@register_launcher('ssh')... | 33.9 | 76 | 0.716814 |
79745f5d4b85681cd73c1c21109da6fc9cbc6e92 | 12,663 | py | Python | scipy/optimize/__init__.py | mkoeppe/scipy | 70a76cbcea11d959bcfdf7ee9df983bfac30e170 | [
"BSD-3-Clause"
] | 1 | 2019-07-12T16:40:35.000Z | 2019-07-12T16:40:35.000Z | scipy/optimize/__init__.py | mkoeppe/scipy | 70a76cbcea11d959bcfdf7ee9df983bfac30e170 | [
"BSD-3-Clause"
] | 1 | 2019-07-24T19:52:07.000Z | 2019-07-24T19:52:07.000Z | scipy/optimize/__init__.py | mkoeppe/scipy | 70a76cbcea11d959bcfdf7ee9df983bfac30e170 | [
"BSD-3-Clause"
] | 2 | 2019-12-29T20:29:20.000Z | 2020-06-08T14:39:49.000Z | """
=====================================================
Optimization and root finding (:mod:`scipy.optimize`)
=====================================================
.. currentmodule:: scipy.optimize
SciPy ``optimize`` provides functions for minimizing (or maximizing)
objective functions, possibly subject to constrai... | 28.977117 | 94 | 0.65719 |
79745ff1d0d33e6ebd5f30e87120cf59a4401def | 3,673 | py | Python | tensorflow/python/tools/freeze_graph_test.py | toptaldev92/tensorflow | 1fd1f65d1b0896149e44a1f105267c27994010d9 | [
"Apache-2.0"
] | 2 | 2017-10-14T09:13:27.000Z | 2017-10-26T18:34:28.000Z | tensorflow/python/tools/freeze_graph_test.py | kiliczsh/tensorflow | f49aca4532c155597c669cf2189f211cafbebf96 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/tools/freeze_graph_test.py | kiliczsh/tensorflow | f49aca4532c155597c669cf2189f211cafbebf96 | [
"Apache-2.0"
] | 1 | 2021-04-22T09:17:52.000Z | 2021-04-22T09:17:52.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... | 39.074468 | 80 | 0.691805 |
79745ff6c9e4f119680ba962152a7d623f5864ab | 13,101 | py | Python | GPy/likelihoods/student_t.py | beckdaniel/GPy | 37e835aa36b18c32bc500684cc10dd2b74240e1f | [
"BSD-3-Clause"
] | null | null | null | GPy/likelihoods/student_t.py | beckdaniel/GPy | 37e835aa36b18c32bc500684cc10dd2b74240e1f | [
"BSD-3-Clause"
] | null | null | null | GPy/likelihoods/student_t.py | beckdaniel/GPy | 37e835aa36b18c32bc500684cc10dd2b74240e1f | [
"BSD-3-Clause"
] | 1 | 2020-02-21T02:40:18.000Z | 2020-02-21T02:40:18.000Z | # Copyright (c) 2012-2014 Ricardo Andrade, Alan Saul
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from scipy import stats, special
import scipy as sp
from . import link_functions
from scipy import stats, integrate
from scipy.special import gammaln, gamma
from .likelihood import Likeli... | 43.816054 | 276 | 0.585375 |
7974600dab492711ca4c5cce7b18ceff6b3b0c95 | 3,348 | py | Python | official/modeling/performance.py | w3ichen/models | b378433a1bb2dc55ae9266796f63b787fe3206fd | [
"Apache-2.0"
] | 15 | 2018-08-15T19:29:39.000Z | 2021-11-05T02:14:59.000Z | official/modeling/performance.py | w3ichen/models | b378433a1bb2dc55ae9266796f63b787fe3206fd | [
"Apache-2.0"
] | null | null | null | official/modeling/performance.py | w3ichen/models | b378433a1bb2dc55ae9266796f63b787fe3206fd | [
"Apache-2.0"
] | 8 | 2019-06-06T20:37:15.000Z | 2022-03-04T13:54:38.000Z | # Copyright 2020 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... | 42.379747 | 80 | 0.714456 |
7974608203ad804fb71440ebec6fe0d432c808d2 | 114,184 | py | Python | mne/preprocessing/ica.py | kazemakase/mne-python | 9dbb10156a8faf6610f3a8d979ffe9b853dd20dd | [
"BSD-3-Clause"
] | null | null | null | mne/preprocessing/ica.py | kazemakase/mne-python | 9dbb10156a8faf6610f3a8d979ffe9b853dd20dd | [
"BSD-3-Clause"
] | null | null | null | mne/preprocessing/ica.py | kazemakase/mne-python | 9dbb10156a8faf6610f3a8d979ffe9b853dd20dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Authors: Denis A. Engemann <denis.engemann@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Juergen Dammers <j.dammers@fz-juelich.de>
#
# License: BSD (3-clause)
from inspect import isfunction
from collections import namedtuple
from copy import deepcopy
from... | 42.637789 | 156 | 0.597133 |
797460c929ee586b3bb83437921bc6b47833a040 | 870 | py | Python | app/backend/core/models/lightweight_layers/__init__.py | SummaLabs/DLS | 2adba47430b456ad0f324e4c8883a896a23b3fbf | [
"MIT"
] | 32 | 2017-09-04T17:40:39.000Z | 2021-02-16T23:08:34.000Z | app/backend/core/models/lightweight_layers/__init__.py | AymanNabih/DLS | 2adba47430b456ad0f324e4c8883a896a23b3fbf | [
"MIT"
] | 3 | 2017-10-09T12:52:54.000Z | 2020-06-29T02:48:38.000Z | app/backend/core/models/lightweight_layers/__init__.py | AymanNabih/DLS | 2adba47430b456ad0f324e4c8883a896a23b3fbf | [
"MIT"
] | 20 | 2017-10-07T17:29:50.000Z | 2021-01-23T22:01:54.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'ar'
from layers_basic import LW_Layer, \
LW_InputLayer, \
LW_Merge, \
LW_Flatten, \
LW_Dense, \
LW_Activation
from layers_convolutional import LW_Convolution1D, LW_Convolution2D, LW_Convolution3D, \
LW_AtrousConvolution1D, LW_AtrousConvol... | 34.8 | 91 | 0.782759 |
797462d8b3b78501f5d265d27bc91ace3c05fa35 | 9,519 | py | Python | python2sql/ml/ml_pipeline.py | welpaolo/ML2SQL | a716c466dedfe0400d701de40beacd1fee16a778 | [
"MIT"
] | null | null | null | python2sql/ml/ml_pipeline.py | welpaolo/ML2SQL | a716c466dedfe0400d701de40beacd1fee16a778 | [
"MIT"
] | null | null | null | python2sql/ml/ml_pipeline.py | welpaolo/ML2SQL | a716c466dedfe0400d701de40beacd1fee16a778 | [
"MIT"
] | null | null | null | import os
import pickle
import time
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sqlalchemy import create_engine
class MLPipeline(object):
"""
TODO
"""
def __init__(self, output_dir):
self.output_dir = output_dir
self.drop_features ... | 38.538462 | 156 | 0.615086 |
79746543bb04d89b3e6aa0933ac1181a97a2a3d0 | 4,737 | py | Python | sdk/python/pulumi_gcp/sql/ssl_cert.py | stack72/pulumi-gcp | e63e4ed3129fe8e64e4869f4839ba2b20f57cb57 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/sql/ssl_cert.py | stack72/pulumi-gcp | e63e4ed3129fe8e64e4869f4839ba2b20f57cb57 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/sql/ssl_cert.py | stack72/pulumi-gcp | e63e4ed3129fe8e64e4869f4839ba2b20f57cb57 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from .. import utilities, tables
class SslCert(pulumi.CustomResource):... | 39.806723 | 241 | 0.664133 |
7974657facc558fb4b146bf3b9ca5eb5b5071ee5 | 13,161 | py | Python | modules/prediction.py | codeboy5/cvpr20-scatter-text-recognizer | 4bd6cfbd4d7f64ce11864514f6b6b0646267c285 | [
"Apache-2.0"
] | 63 | 2020-10-16T09:28:05.000Z | 2022-03-27T15:52:16.000Z | modules/prediction.py | codeboy5/cvpr20-scatter-text-recognizer | 4bd6cfbd4d7f64ce11864514f6b6b0646267c285 | [
"Apache-2.0"
] | 7 | 2020-09-18T03:31:05.000Z | 2022-03-03T00:20:27.000Z | modules/prediction.py | codeboy5/cvpr20-scatter-text-recognizer | 4bd6cfbd4d7f64ce11864514f6b6b0646267c285 | [
"Apache-2.0"
] | 8 | 2020-09-18T03:13:55.000Z | 2022-02-27T13:34:33.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import math
from torch.nn.init import xavier_uniform_
from torch.nn.init import constant_
from torch.nn.init import xavier_normal_
import copy
import numpy as np
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
class Attention(nn.... | 41.914013 | 130 | 0.649343 |
797466db97cf84cfe83b5973046d86b292e9d105 | 52,888 | py | Python | ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py | panfeiyy/ambari | 24077510723ede93d3024784f0b04422adaf56d6 | [
"Apache-2.0"
] | 16 | 2018-05-24T10:28:24.000Z | 2021-08-05T03:13:26.000Z | ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py | panfeiyy/ambari | 24077510723ede93d3024784f0b04422adaf56d6 | [
"Apache-2.0"
] | 3 | 2021-05-09T12:37:16.000Z | 2022-03-02T10:13:24.000Z | ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py | panfeiyy/ambari | 24077510723ede93d3024784f0b04422adaf56d6 | [
"Apache-2.0"
] | 17 | 2018-07-06T08:57:00.000Z | 2021-11-04T11:00:36.000Z | #!/usr/bin/env python
'''
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")... | 42.3104 | 190 | 0.699951 |
797467e20d75f8220d84132025ff8a29798323c4 | 788 | py | Python | src/control/publication_historgram.py | Carreau/phd-dissertation | f283cf3819af019027a4e017141ec51029a0e46c | [
"CC-BY-3.0"
] | null | null | null | src/control/publication_historgram.py | Carreau/phd-dissertation | f283cf3819af019027a4e017141ec51029a0e46c | [
"CC-BY-3.0"
] | 1 | 2015-01-23T10:18:16.000Z | 2015-01-23T10:18:16.000Z | src/control/publication_historgram.py | Carreau/phd-dissertation | f283cf3819af019027a4e017141ec51029a0e46c | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
from pybtex.database.input import bibtex
import matplotlib.pyplot as plt
parser = bibtex.Parser()
path = '/media/Data/Documents/School/UC Davis/Bicycle Mechanics/Papers/bicycle.bib'
bib_data = parser.parse_file(path)
years = []
for entry in bib_data.entries:
try:
years.append(int(bib... | 29.185185 | 83 | 0.711929 |
7974683af1dc8be279464805f34b396fda283277 | 206 | py | Python | src/otofu/__init__.py | kemasuda/otofu | d873d2e7422fea421e3dec005b0d12fbd5eae0bf | [
"MIT"
] | null | null | null | src/otofu/__init__.py | kemasuda/otofu | d873d2e7422fea421e3dec005b0d12fbd5eae0bf | [
"MIT"
] | 1 | 2022-01-09T05:41:14.000Z | 2022-01-09T05:41:14.000Z | src/otofu/__init__.py | kemasuda/otofu | d873d2e7422fea421e3dec005b0d12fbd5eae0bf | [
"MIT"
] | 1 | 2022-01-04T04:45:11.000Z | 2022-01-04T04:45:11.000Z | __all__ = []
__version__ = "0.0.1"
__uri__ = "none"
__author__ = "Kento Masuda"
__email__ = ""
__license__ = "MIT"
__description__ = "observing tools for UCDs"
from . import obsplan
from . import jasmine
| 17.166667 | 44 | 0.708738 |
79746854746a483c197cacae7471f746465a0c32 | 2,337 | py | Python | stripstream/pddl/temporal.py | nishadg246/stripstream-ivan-nishad | 9a275ae5836ee289cd09cbe6bc0ff6fd4a381135 | [
"MIT"
] | null | null | null | stripstream/pddl/temporal.py | nishadg246/stripstream-ivan-nishad | 9a275ae5836ee289cd09cbe6bc0ff6fd4a381135 | [
"MIT"
] | null | null | null | stripstream/pddl/temporal.py | nishadg246/stripstream-ivan-nishad | 9a275ae5836ee289cd09cbe6bc0ff6fd4a381135 | [
"MIT"
] | null | null | null | from operators import Operator, OPERATOR_PDDL
# TODO: is it going to be strange if I can't actually simulate these things...
class TemporalOperator(Operator):
_pddl_name = None
def __init__(self, name, parameters, condition, effect):
"""
:param name: the name of the action
:param parameters: a list of... | 36.515625 | 104 | 0.593924 |
797468ca62cfe505cda76ced7f3f08fbe431940c | 17,236 | py | Python | Mathematics/GraphingTwoVariables/helper.py | callysto/curriculum-notebooks | 871241c8f318cff74f46f42705a03020cd48cd17 | [
"CC-BY-4.0"
] | 21 | 2018-08-23T20:41:26.000Z | 2021-04-21T02:27:13.000Z | Mathematics/GraphingTwoVariables/helper.py | callysto/curriculum-notebooks | 871241c8f318cff74f46f42705a03020cd48cd17 | [
"CC-BY-4.0"
] | 113 | 2018-07-23T21:05:00.000Z | 2022-03-16T23:40:08.000Z | Mathematics/GraphingTwoVariables/helper.py | callysto/curriculum-notebooks | 871241c8f318cff74f46f42705a03020cd48cd17 | [
"CC-BY-4.0"
] | 11 | 2018-11-20T16:36:59.000Z | 2021-08-03T12:58:55.000Z | import matplotlib.pyplot as plt
import plotly as py
import plotly.graph_objs as go
import numpy as np
import math
import ipywidgets as widgets
from astropy.table import Table, Column
from ipywidgets import interact, interactive, Layout
from IPython.display import display, Math, Latex, HTML
py.offline.init_notebook_mod... | 35.319672 | 151 | 0.502379 |
79746992d46e81ee563caee613bfd45d7a2b9b8c | 1,492 | py | Python | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/enums/types/lead_form_call_to_action_type.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/enums/types/lead_form_call_to_action_type.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/enums/types/lead_form_call_to_action_type.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- 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... | 27.62963 | 74 | 0.654826 |
79746d28391b0bc667b37e009f103e4e3352ef60 | 85,910 | py | Python | lopper/__init__.py | devicetree-org/lopper | d9f1abb3595b18fe27eefdab1133270a481c546a | [
"BSD-3-Clause"
] | 12 | 2020-10-04T16:53:52.000Z | 2022-01-31T20:11:32.000Z | lopper/__init__.py | devicetree-org/lopper | d9f1abb3595b18fe27eefdab1133270a481c546a | [
"BSD-3-Clause"
] | 59 | 2020-06-08T17:43:12.000Z | 2022-03-31T13:36:04.000Z | lopper/__init__.py | devicetree-org/lopper | d9f1abb3595b18fe27eefdab1133270a481c546a | [
"BSD-3-Clause"
] | 15 | 2020-06-05T21:40:17.000Z | 2022-01-31T20:11:34.000Z | #/*
# * Copyright (c) 2019,2020 Xilinx Inc. All rights reserved.
# *
# * Author:
# * Bruce Ashfield <bruce.ashfield@xilinx.com>
# *
# * SPDX-License-Identifier: BSD-3-Clause
# */
import sys
import os
import re
import shutil
from pathlib import Path
from io import StringIO
import contextlib
from importlib.machine... | 41.40241 | 194 | 0.457479 |
79746d6148cb34cd360227af516ee36c5f397999 | 4,598 | py | Python | tests/end_to_end/target_snowflake/tap_mongodb/test_replicate_mongodb_to_sf.py | epoch8/pipelinewise | 4de979f9b581dadc92ab3b2ef8f1596ae82fdabe | [
"Apache-2.0"
] | null | null | null | tests/end_to_end/target_snowflake/tap_mongodb/test_replicate_mongodb_to_sf.py | epoch8/pipelinewise | 4de979f9b581dadc92ab3b2ef8f1596ae82fdabe | [
"Apache-2.0"
] | null | null | null | tests/end_to_end/target_snowflake/tap_mongodb/test_replicate_mongodb_to_sf.py | epoch8/pipelinewise | 4de979f9b581dadc92ab3b2ef8f1596ae82fdabe | [
"Apache-2.0"
] | null | null | null | import decimal
import uuid
from datetime import datetime
from random import randint
import bson
from tests.end_to_end.helpers import assertions
from tests.end_to_end.target_snowflake.tap_mongodb import TapMongoDB
TAP_ID = 'mongo_to_sf'
TARGET_ID = 'snowflake'
class TestReplicateMongoDBToSF(TapMongoDB):
"""
... | 32.380282 | 107 | 0.551327 |
79746f9cde30e01fa2f7276e73eac7c66d75fd1c | 408 | py | Python | doc/_i18n/jp/tutorials/introduction/multi-robot-controller/logic_setup.py | rohanpsingh/mc_rtc | 63918efc54f561650a8e93f449c40ec156a6feb4 | [
"BSD-2-Clause"
] | null | null | null | doc/_i18n/jp/tutorials/introduction/multi-robot-controller/logic_setup.py | rohanpsingh/mc_rtc | 63918efc54f561650a8e93f449c40ec156a6feb4 | [
"BSD-2-Clause"
] | null | null | null | doc/_i18n/jp/tutorials/introduction/multi-robot-controller/logic_setup.py | rohanpsingh/mc_rtc | 63918efc54f561650a8e93f449c40ec156a6feb4 | [
"BSD-2-Clause"
] | null | null | null | # 定数を宣言する
APPROACH = 0
HANDLE = 1
OPEN = 2
# コンストラクター内
self.phase = APPROACH
# コントローラーの新しいメソッド
def switch_phase(self):
if self.phase == APPROACH and False: # この条件は後で記述する
# HANDLEフェーズをセットアップする
self.phase = HANDLE
elif self.phase == HANDLE and False: # この条件は後で記述する
# OPENフェーズをセットアップする
self.phase = OPEN... | 21.473684 | 52 | 0.718137 |
79746fdc2920949d94ec8a092826ee892a5e650b | 1,208 | py | Python | tests/conftest.py | sarvi/synthrunner | 93004d97d05fea849ee720793792fb9af9e7dd0e | [
"MIT"
] | 1 | 2021-06-09T07:57:16.000Z | 2021-06-09T07:57:16.000Z | tests/conftest.py | sarvi/synthrunner | 93004d97d05fea849ee720793792fb9af9e7dd0e | [
"MIT"
] | null | null | null | tests/conftest.py | sarvi/synthrunner | 93004d97d05fea849ee720793792fb9af9e7dd0e | [
"MIT"
] | null | null | null | """
tests.conftest.py
~~~~~~~~~~~~~~~~~
This module is used by PyTest to detect test fixtures that are used by
multiple test modules. For more imformation on fixtures in PyTest, see
https://docs.pytest.org/en/latest/fixture.html.
"""
import json
from typing import Any, Dict, List
import pytest
from synthrunner.cur... | 21.571429 | 70 | 0.694536 |
79747040d8073e37323e83710d1f116b6cb8eb7e | 1,563 | py | Python | examples/scripts/thermal_lithium_ion.py | zlgenuine/pybamm | 5c43d17225710c5bea8e61b3863688eb7080e678 | [
"BSD-3-Clause"
] | null | null | null | examples/scripts/thermal_lithium_ion.py | zlgenuine/pybamm | 5c43d17225710c5bea8e61b3863688eb7080e678 | [
"BSD-3-Clause"
] | null | null | null | examples/scripts/thermal_lithium_ion.py | zlgenuine/pybamm | 5c43d17225710c5bea8e61b3863688eb7080e678 | [
"BSD-3-Clause"
] | null | null | null | #
# Compares the full and lumped thermal models for a single layer Li-ion cell
#
import pybamm
import numpy as np
# load model
pybamm.set_logging_level("INFO")
options = {"thermal": "x-full"}
full_thermal_model = pybamm.lithium_ion.SPMe(options)
options = {"thermal": "x-lumped"}
lumped_thermal_model = pybamm.lithiu... | 27.910714 | 76 | 0.732566 |
797470d64ed11b29cd8dceccabd403bda90f673c | 2,429 | py | Python | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/check_password_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/check_password_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/check_password_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class CheckPasswordResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
... | 28.244186 | 79 | 0.550021 |
7974715a2fdf7f6bfc224057a475d6f119dd8396 | 22,389 | py | Python | openstack_dashboard/dashboards/identity/domains/tests.py | ankur-gupta91/block_storage | 938548a3d4507dc56c1c26b442767eb41aa2e610 | [
"Apache-2.0"
] | 9 | 2016-06-03T03:53:24.000Z | 2017-05-20T16:53:23.000Z | openstack_dashboard/dashboards/identity/domains/tests.py | ankur-gupta91/block_storage | 938548a3d4507dc56c1c26b442767eb41aa2e610 | [
"Apache-2.0"
] | 1 | 2016-09-08T10:57:46.000Z | 2016-09-08T10:59:06.000Z | openstack_dashboard/dashboards/identity/domains/tests.py | ankur-gupta91/block_storage | 938548a3d4507dc56c1c26b442767eb41aa2e610 | [
"Apache-2.0"
] | 4 | 2016-08-01T10:50:15.000Z | 2017-02-22T12:11:19.000Z | # Copyright 2013 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 requir... | 42.323251 | 78 | 0.56233 |
7974719dc0fb309904a66de18b1e84d5dc7d9ea8 | 1,092 | py | Python | kubernetes/test/test_v2beta1_horizontal_pod_autoscaler_spec.py | itholic/python | dffe577a062e17057270ae80fa677ffd83e9d183 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v2beta1_horizontal_pod_autoscaler_spec.py | itholic/python | dffe577a062e17057270ae80fa677ffd83e9d183 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v2beta1_horizontal_pod_autoscaler_spec.py | itholic/python | dffe577a062e17057270ae80fa677ffd83e9d183 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.15.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import kube... | 27.3 | 132 | 0.757326 |
79747248b7ec738ebe04bce78347f20230020624 | 3,131 | py | Python | loginas/utils.py | asfaltboy/django-loginas | 48286ec82280b489add0301cc554b63539ed8886 | [
"BSD-3-Clause"
] | null | null | null | loginas/utils.py | asfaltboy/django-loginas | 48286ec82280b489add0301cc554b63539ed8886 | [
"BSD-3-Clause"
] | null | null | null | loginas/utils.py | asfaltboy/django-loginas | 48286ec82280b489add0301cc554b63539ed8886 | [
"BSD-3-Clause"
] | null | null | null | import logging
from django.conf import settings as django_settings
from django.contrib.auth import get_user_model, load_backend, login, logout
from django.contrib.auth.models import update_last_login
from django.contrib.auth.signals import user_logged_in
from django.contrib import messages
from django.core.exceptions ... | 35.988506 | 114 | 0.698818 |
797472909b2685baa5d771519391254a7bc7e4bd | 344 | py | Python | tests/utils_tests/models.py | wfxiang08/django185 | ac07531c40e4d33a898de1c5f378c1625ec5e2f3 | [
"BSD-3-Clause"
] | 3 | 2020-05-30T17:08:51.000Z | 2021-12-14T02:55:19.000Z | tests/utils_tests/models.py | wfxiang08/django185 | ac07531c40e4d33a898de1c5f378c1625ec5e2f3 | [
"BSD-3-Clause"
] | 1 | 2021-03-24T12:21:05.000Z | 2021-03-24T12:31:52.000Z | tests/utils_tests/models.py | wfxiang08/django185 | ac07531c40e4d33a898de1c5f378c1625ec5e2f3 | [
"BSD-3-Clause"
] | 2 | 2021-03-24T12:11:48.000Z | 2021-06-10T19:56:03.000Z | from django.db import models
class Category(models.Model):
name = models.CharField(max_length=100)
def next(self):
return self
class Thing(models.Model):
name = models.CharField(max_length=100)
category = models.ForeignKey(Category)
class CategoryInfo(models.Model):
category = models.... | 19.111111 | 45 | 0.723837 |
7974730f60608243c9228811220e776dc5efb3a1 | 7,747 | py | Python | WMemPy/wmem_scannable.py | fitancinpet/WMemPy | ed9b3bece2aca465635e09526060165b2704cfcc | [
"MIT"
] | null | null | null | WMemPy/wmem_scannable.py | fitancinpet/WMemPy | ed9b3bece2aca465635e09526060165b2704cfcc | [
"MIT"
] | 2 | 2021-11-11T18:05:04.000Z | 2022-03-14T05:58:01.000Z | WMemPy/wmem_scannable.py | fitancinpet/WMemPy | ed9b3bece2aca465635e09526060165b2704cfcc | [
"MIT"
] | null | null | null | # pylint: disable=c-extension-no-member
"""Scannable classes are used to represent live memory of a process that can be scanned"""
import os
import ctypes
import win32process
import numpy as np
from wmempy.wmem_structs import MODULEINFO
class ProcScannable:
"""
Scannable interface has to be implemented if you ... | 33.392241 | 97 | 0.624371 |
79747352bd0dbb7456e1ab18d78ba6c527143ccb | 1,158 | py | Python | pcdsdevices/mrco_motion.py | jyotiphy/pcdsdevices | d2bd7ed52311e1fa2d9f97b433059197b3e86387 | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdsdevices/mrco_motion.py | jyotiphy/pcdsdevices | d2bd7ed52311e1fa2d9f97b433059197b3e86387 | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdsdevices/mrco_motion.py | jyotiphy/pcdsdevices | d2bd7ed52311e1fa2d9f97b433059197b3e86387 | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
MRCO Motion Classes
This module contains classes related to the TMO-MRCO Motion System
"""
from ophyd import Component as Cpt
from ophyd import Device
from .epics_motor import BeckhoffAxisNoOffset
from .interface import BaseInterface
class MRCO(BaseInterface, Device):
"""
MRCO Motion Class
This cl... | 27.571429 | 74 | 0.700345 |
797474ca24f957bb0f0a567a35dba99acf7b73b0 | 6,577 | py | Python | airlab/regulariser/displacement.py | jlevy44/airlab | 7d8439339bea11e680716f1c70bf8a21559df0c6 | [
"Apache-2.0"
] | 330 | 2018-06-27T16:44:21.000Z | 2022-03-13T16:07:34.000Z | airlab/regulariser/displacement.py | jlevy44/airlab | 7d8439339bea11e680716f1c70bf8a21559df0c6 | [
"Apache-2.0"
] | 33 | 2018-08-13T00:51:45.000Z | 2022-01-27T10:16:11.000Z | airlab/regulariser/displacement.py | jlevy44/airlab | 7d8439339bea11e680716f1c70bf8a21559df0c6 | [
"Apache-2.0"
] | 84 | 2018-06-27T11:28:00.000Z | 2022-03-11T15:24:04.000Z | # Copyright 2018 University of Basel, Center for medical Image Analysis and Navigation
#
# 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
#
# U... | 37.369318 | 105 | 0.63494 |
797475a732c4f039ded8b99eba940ff8ba763fe4 | 8,016 | py | Python | taotao-cloud-python/taotao-cloud-oldboy/day12-python-list-tuple-dict/s1.py | shuigedeng/taotao-cloud-paren | 3d281b919490f7cbee4520211e2eee5da7387564 | [
"Apache-2.0"
] | 47 | 2021-04-13T10:32:13.000Z | 2022-03-31T10:30:30.000Z | taotao-cloud-python/taotao-cloud-oldboy/day12-python-list-tuple-dict/s1.py | shuigedeng/taotao-cloud-paren | 3d281b919490f7cbee4520211e2eee5da7387564 | [
"Apache-2.0"
] | 1 | 2021-11-01T07:41:04.000Z | 2021-11-01T07:41:10.000Z | taotao-cloud-python/taotao-cloud-oldboy/day12-python-list-tuple-dict/s1.py | shuigedeng/taotao-cloud-paren | 3d281b919490f7cbee4520211e2eee5da7387564 | [
"Apache-2.0"
] | 21 | 2021-04-13T10:32:17.000Z | 2022-03-26T07:43:22.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# v = "李杰"
# for item in v:
# print(item)
####################################################################################################
# str
# name = "alex"
# list # 类,列表
# li = [1, 12, 9, "age", ["石振文", ["19", 10], "庞麦郎"], "alex", True] # 通过list类创建的对象,li
# l... | 14.927374 | 100 | 0.414172 |
797476d728c02f5f12ba88e7fdce191c5b2cd020 | 1,269 | py | Python | day14/day14part1.py | opcecco/AOC2017 | 45530c8483e3f02b58b4ad33b057fae9f13a5bd0 | [
"MIT"
] | 1 | 2020-04-12T17:57:30.000Z | 2020-04-12T17:57:30.000Z | day14/day14part1.py | opcecco/AOC2017 | 45530c8483e3f02b58b4ad33b057fae9f13a5bd0 | [
"MIT"
] | null | null | null | day14/day14part1.py | opcecco/AOC2017 | 45530c8483e3f02b58b4ad33b057fae9f13a5bd0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Advent of Code 2017: Day 14 Part 1
https://adventofcode.com/2017/day/14
"""
import sys
# Calcualte the knot-hash for a string, using a given formatter
def knot_hash(string):
data = [ord(character) for character in string] + [17, 31, 73, 47, 23]
circular_list = range(256)
current_position... | 25.897959 | 99 | 0.688731 |
797479b8d3e20422f6b37b36e5496ab62a2935d8 | 1,368 | py | Python | applications/FluidDynamicsApplication/python_scripts/apply_noslip_process.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 778 | 2017-01-27T16:29:17.000Z | 2022-03-30T03:01:51.000Z | applications/FluidDynamicsApplication/python_scripts/apply_noslip_process.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 6,634 | 2017-01-15T22:56:13.000Z | 2022-03-31T15:03:36.000Z | applications/FluidDynamicsApplication/python_scripts/apply_noslip_process.py | lkusch/Kratos | e8072d8e24ab6f312765185b19d439f01ab7b27b | [
"BSD-4-Clause"
] | 224 | 2017-02-07T14:12:49.000Z | 2022-03-06T23:09:34.000Z | import KratosMultiphysics
from KratosMultiphysics.assign_vector_variable_process import AssignVectorVariableProcess
def Factory(settings, Model):
if(type(settings) != KratosMultiphysics.Parameters):
raise Exception("expected input shall be a Parameters object, encapsulating a json string")
return Apply... | 35.076923 | 99 | 0.624269 |
79747a4f669169a0530c467c171ee4365e7cb8d9 | 250 | py | Python | parser_set.py | peterzheng98/C2Mx | 4c1d8bb69da0bbb88254e60ae48f1cbc00c609c6 | [
"MIT"
] | null | null | null | parser_set.py | peterzheng98/C2Mx | 4c1d8bb69da0bbb88254e60ae48f1cbc00c609c6 | [
"MIT"
] | null | null | null | parser_set.py | peterzheng98/C2Mx | 4c1d8bb69da0bbb88254e60ae48f1cbc00c609c6 | [
"MIT"
] | null | null | null | import clang
import sys
import clang.cindex
from clang.cindex import Config
from clang.cindex import Cursor
from clang.cindex import CursorKind
from ASTNode import *
from ASTNode.AbstractType import _type_kind_to_validType
from parser import parse
| 20.833333 | 56 | 0.848 |
79747b4d85c0ffbd9e3096194000040276358110 | 1,119 | py | Python | app.py | alainchiasson/flask-app | 3bcd17bd04137023697b395c03cc8e0b974fbe45 | [
"MIT"
] | null | null | null | app.py | alainchiasson/flask-app | 3bcd17bd04137023697b395c03cc8e0b974fbe45 | [
"MIT"
] | 1 | 2018-05-16T18:57:31.000Z | 2018-05-16T18:57:31.000Z | app.py | alainchiasson/flask-app | 3bcd17bd04137023697b395c03cc8e0b974fbe45 | [
"MIT"
] | null | null | null | import socket
import os
from flask import Flask,request
# if "TAG" in os.environ:
# tag = os.getenv('TAG')
tag = os.getenv('TAG', 'default')
app = Flask(__name__)
@app.route('/')
def hello_world():
return '%s : Hello! I am a Flask application.' % tag + get_raw_headers(request)
@app.route('/request')
def pri... | 28.692308 | 123 | 0.675603 |
79747b9b0ab9a7920050f3240327f01a846db22f | 3,747 | py | Python | rasa_nlu/cli/server.py | madkote/rasa-nlu-contrib | 38804da8a1debb172a3ad06a9b867a0ae8ee9b59 | [
"Apache-2.0"
] | 18 | 2019-05-07T10:28:32.000Z | 2022-01-22T02:30:30.000Z | rasa_nlu/cli/server.py | madkote/rasa-nlu-contrib | 38804da8a1debb172a3ad06a9b867a0ae8ee9b59 | [
"Apache-2.0"
] | 2 | 2019-06-14T17:57:27.000Z | 2020-11-30T02:39:39.000Z | rasa_nlu/cli/server.py | madkote/rasa-nlu-contrib | 38804da8a1debb172a3ad06a9b867a0ae8ee9b59 | [
"Apache-2.0"
] | 15 | 2019-03-18T02:21:13.000Z | 2022-01-22T02:32:19.000Z | def add_server_arguments(parser):
parser.add_argument('-e', '--emulate',
choices=['wit', 'luis', 'dialogflow'],
help='which service to emulate (default: None i.e. use'
' simple built in format)')
parser.add_argument('-P', '--port',
... | 54.304348 | 80 | 0.45423 |
79747c1ab8bd68d07d84e19c38d00a1dcc91817b | 1,125 | py | Python | river/compat/test_sklearn.py | mathco-wf/river | c6ff38fa4ce4843ede1cba77248e0370a67a36f6 | [
"BSD-3-Clause"
] | 2,184 | 2020-11-11T12:31:12.000Z | 2022-03-31T16:45:41.000Z | river/compat/test_sklearn.py | raphaelsty/river | 2e0b25a2ef2d2ba9ec080cf86a491f7465433b18 | [
"BSD-3-Clause"
] | 262 | 2020-11-11T17:15:47.000Z | 2022-03-31T23:54:03.000Z | river/compat/test_sklearn.py | raphaelsty/river | 2e0b25a2ef2d2ba9ec080cf86a491f7465433b18 | [
"BSD-3-Clause"
] | 240 | 2020-11-11T14:25:03.000Z | 2022-03-31T08:25:50.000Z | import pytest
from sklearn import linear_model as sk_linear_model
from sklearn.utils import estimator_checks
from river import base, cluster, compat, linear_model, preprocessing
@pytest.mark.parametrize(
"estimator",
[
pytest.param(estimator, id=str(estimator))
for estimator in [
... | 35.15625 | 85 | 0.763556 |
79747c262583e7d683b78f2f88a224ecdcde1b74 | 260 | py | Python | src/nfz_module/processor/SensorDataProcessor.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/processor/SensorDataProcessor.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/processor/SensorDataProcessor.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod, abstractproperty
__author__ = 'Hans-Werner Roitzsch'
class SensorDataProcessor(metaclass=ABCMeta):
"""
Abstract Base Class: SensorDataProcessor
"""
@abstractmethod
def process_data(self, sensor_data):
return
| 18.571429 | 57 | 0.784615 |
79747d023da726dfcd4911c48d2397776b17cd87 | 3,054 | py | Python | tests/gamestonk_terminal/stocks/screener/test_yahoofinance_view.py | elan17/GamestonkTerminal | f958f8275dc15ffaf30c1f0652f5b033725b7f10 | [
"MIT"
] | 1,835 | 2021-05-09T02:55:06.000Z | 2022-03-29T12:37:05.000Z | tests/gamestonk_terminal/stocks/screener/test_yahoofinance_view.py | elan17/GamestonkTerminal | f958f8275dc15ffaf30c1f0652f5b033725b7f10 | [
"MIT"
] | 569 | 2021-05-09T15:59:41.000Z | 2022-03-29T12:25:16.000Z | tests/gamestonk_terminal/stocks/screener/test_yahoofinance_view.py | elan17/GamestonkTerminal | f958f8275dc15ffaf30c1f0652f5b033725b7f10 | [
"MIT"
] | 268 | 2021-05-10T21:46:50.000Z | 2022-03-28T09:18:38.000Z | # IMPORTATION STANDARD
from datetime import datetime
# IMPORTATION THIRDPARTY
import pytest
# IMPORTATION INTERNAL
from gamestonk_terminal.stocks.screener import yahoofinance_view
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": [("User-Agent", None)],
"filter_query_p... | 26.102564 | 88 | 0.670923 |
79747d0e5afd81e0b3cd0125173e976c04c3ecea | 7,451 | py | Python | pyamg/krylov/tests/test_simple_iterations.py | nschloe/pyamg | 005a71754015f050ac3d39241365cbfa4998c374 | [
"MIT"
] | null | null | null | pyamg/krylov/tests/test_simple_iterations.py | nschloe/pyamg | 005a71754015f050ac3d39241365cbfa4998c374 | [
"MIT"
] | null | null | null | pyamg/krylov/tests/test_simple_iterations.py | nschloe/pyamg | 005a71754015f050ac3d39241365cbfa4998c374 | [
"MIT"
] | 2 | 2022-01-03T00:20:22.000Z | 2022-03-01T12:02:54.000Z | from pyamg.krylov import minimal_residual, steepest_descent
import numpy as np
from pyamg.util.linalg import norm
import pyamg
from numpy.testing import TestCase
class TestSimpleIterations(TestCase):
def setUp(self):
self.definite_cases = []
self.spd_cases = []
# 1x1
A = np.array... | 40.494565 | 89 | 0.428533 |
79747e6941d508318e9b5c3158a0cf1ff4ff0404 | 2,548 | py | Python | src/authenticate/views.py | naeem-bebit/django-data | 79802f9907de15bd3a712fbd1333c2fd8ffcafb9 | [
"MIT"
] | null | null | null | src/authenticate/views.py | naeem-bebit/django-data | 79802f9907de15bd3a712fbd1333c2fd8ffcafb9 | [
"MIT"
] | null | null | null | src/authenticate/views.py | naeem-bebit/django-data | 79802f9907de15bd3a712fbd1333c2fd8ffcafb9 | [
"MIT"
] | null | null | null | """View url."""
from django.shortcuts import render, redirect
from django.contrib.auth import authenticate, login, logout, update_session_auth_hash
from django.contrib.auth.forms import UserCreationForm, UserChangeForm, PasswordChangeForm
from django.contrib import messages
from .forms import SignUpForm, EditProfile
... | 33.973333 | 90 | 0.700549 |
79747f6227dacfe85ab94c9cd840f4634ef65113 | 760 | py | Python | botorch/sampling/__init__.py | stevemandala/botorch | 4c094b8fe46513f895ce7c4409ff40f34fa9ddd6 | [
"MIT"
] | null | null | null | botorch/sampling/__init__.py | stevemandala/botorch | 4c094b8fe46513f895ce7c4409ff40f34fa9ddd6 | [
"MIT"
] | null | null | null | botorch/sampling/__init__.py | stevemandala/botorch | 4c094b8fe46513f895ce7c4409ff40f34fa9ddd6 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from torch.quasirandom import SobolEngine
from .pairwise_samplers import (
PairwiseIIDNormalSampler,
Pairwise... | 26.206897 | 72 | 0.761842 |
7974800e750e11f74a6db4d68bf8d83d71ca2b85 | 9,357 | py | Python | glance/tests/unit/test_quota.py | cloudbau/glance | 616b097c052f5bf59b05326ed1d2d1ae1c703dc9 | [
"Apache-2.0"
] | null | null | null | glance/tests/unit/test_quota.py | cloudbau/glance | 616b097c052f5bf59b05326ed1d2d1ae1c703dc9 | [
"Apache-2.0"
] | null | null | null | glance/tests/unit/test_quota.py | cloudbau/glance | 616b097c052f5bf59b05326ed1d2d1ae1c703dc9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013, Red Hat, 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 b... | 35.988462 | 78 | 0.60404 |
79748031b0d9b6482236eb3eff99ab0db52ecb2a | 287 | py | Python | commonutils/dbutils.py | opennlp/DeepPhrase | 54bd6ca96c12475e3c3ff3745a4eb7c245b6e870 | [
"MIT"
] | 2 | 2019-06-19T12:52:31.000Z | 2020-05-20T15:29:56.000Z | commonutils/dbutils.py | opennlp/DeepPhrase | 54bd6ca96c12475e3c3ff3745a4eb7c245b6e870 | [
"MIT"
] | 5 | 2019-12-17T05:44:10.000Z | 2022-02-10T00:29:31.000Z | commonutils/dbutils.py | opennlp/DeepPhrase | 54bd6ca96c12475e3c3ff3745a4eb7c245b6e870 | [
"MIT"
] | 3 | 2019-10-06T13:31:31.000Z | 2022-03-16T16:13:09.000Z | from db import mongobase
from constants import dbconstants
def get_mongodb_connection(uri=dbconstants.LOCAL_MONGO_HOSTNAME, port_no=dbconstants.LOCAL_MONGO_PORT, db_name=dbconstants.DB_NAME):
mongo = mongobase.MongoConnector(uri,port_no)
mongo.set_db(db_name)
return mongo
| 31.888889 | 132 | 0.8223 |
797481eb0251756d0e860f8fda08eb163af07408 | 790 | py | Python | git_gopher/TrackRemote.py | derekhamilton/git-gud | 7fd377a39796b0aa1268e7ecda6808e8e45173fe | [
"MIT"
] | 15 | 2019-11-13T20:59:53.000Z | 2020-12-15T05:21:21.000Z | git_gopher/TrackRemote.py | derekhamilton/git-gud | 7fd377a39796b0aa1268e7ecda6808e8e45173fe | [
"MIT"
] | 50 | 2019-10-12T16:57:11.000Z | 2019-10-27T21:03:22.000Z | git_gopher/TrackRemote.py | derekhamilton/git-gud | 7fd377a39796b0aa1268e7ecda6808e8e45173fe | [
"MIT"
] | 1 | 2019-11-14T03:20:21.000Z | 2019-11-14T03:20:21.000Z | from git_gopher.CommandInterface import CommandInterface
from git_gopher.HistoryCommandRunner import HistoryCommandRunner
from git_gopher.GitDataGetter import GitDataGetter
class TrackRemote(CommandInterface):
def __init__(self, hist_command_runner: HistoryCommandRunner, git_data_getter: GitDataGetter):
se... | 46.470588 | 104 | 0.725316 |
797483e951a251151aedaf3fe14b2ba1d7c526e5 | 562 | py | Python | Src/Fetcher/fetchers/Fetcher14.py | QingGo/ProxyPool | 7bb4b2b0f0352385824254f3e32be9ec67e8c3d7 | [
"MIT"
] | 1 | 2019-02-14T03:34:30.000Z | 2019-02-14T03:34:30.000Z | Src/Fetcher/fetchers/Fetcher14.py | yuejinzhan/ProxyPool | c8a9e0741f76b5a7b6c05f825b114e4dea5540ac | [
"MIT"
] | null | null | null | Src/Fetcher/fetchers/Fetcher14.py | yuejinzhan/ProxyPool | c8a9e0741f76b5a7b6c05f825b114e4dea5540ac | [
"MIT"
] | 1 | 2022-02-06T03:29:57.000Z | 2022-02-06T03:29:57.000Z |
# -*- coding: utf-8 -*-
# !/usr/bin/env python
import re
from Util.WebRequest import WebRequest
from Util.utilFunction import getHtmlTree
class Fetcher14():
fetcher_name = "Fetcher14"
def run(self):
urls = ['http://cn-proxy.com/', 'http://cn-proxy.com/archives/218']
request = WebRequest()... | 24.434783 | 110 | 0.553381 |
79748406014e266fa2b046690f41e49e506ceff8 | 3,310 | py | Python | plugins/russian_roulette/data_source.py | JustUndertaker/tuanzi_bot | 8bb989aceb1a89569f2fcb804c73f7b650feb1f0 | [
"MIT"
] | 8 | 2021-07-22T02:57:02.000Z | 2021-12-30T03:55:38.000Z | plugins/russian_roulette/data_source.py | JustUndertaker/tuanzi_bot | 8bb989aceb1a89569f2fcb804c73f7b650feb1f0 | [
"MIT"
] | 1 | 2021-12-05T17:58:07.000Z | 2021-12-06T12:59:36.000Z | plugins/russian_roulette/data_source.py | JustUndertaker/tuanzi_bot | 8bb989aceb1a89569f2fcb804c73f7b650feb1f0 | [
"MIT"
] | 3 | 2021-07-22T02:57:05.000Z | 2022-01-30T12:18:59.000Z | import datetime
import random
from typing import Union
from modules.duel_history import DuelHistory
def get_latest_duel(group_id: int) -> Union[DuelHistory, None]:
"""
:说明:
根据群号获取最近一场决斗记录
:参数
* group_id:QQ群号
:返回
* DuelHistory:俄罗斯轮盘决斗记录
* None:不存在记录
"""
r = Due... | 20.060606 | 74 | 0.554381 |
7974840e194c3e9f86870b8e24a6567f35d833e6 | 2,888 | py | Python | QNet.py | phiandre/ToricCodeRL | c62a33124e427307cc462caed02382cea0f74c47 | [
"MIT"
] | 1 | 2020-07-02T05:47:31.000Z | 2020-07-02T05:47:31.000Z | QNet.py | phiandre/ToricCodeRL | c62a33124e427307cc462caed02382cea0f74c47 | [
"MIT"
] | null | null | null | QNet.py | phiandre/ToricCodeRL | c62a33124e427307cc462caed02382cea0f74c47 | [
"MIT"
] | 1 | 2020-04-25T18:08:08.000Z | 2020-04-25T18:08:08.000Z | """""""""""""""""""""""""""""""""""""""""""""""""""
Neural network for approximation of Q-function.
Will take in concatenated state- and action data
and ouput the associated approximation Q(s,a).
"""""""""""""""""""""""""""""""""""""""""""""""""""
# Imports
from keras.models import Sequential
from keras.layers impo... | 37.506494 | 154 | 0.613573 |
7974847b8f075863849aba29ec0037eb8d1682ab | 1,606 | py | Python | setup.py | guiscaranse/fastapi-sqlalchemy | fdfe86330435c342e2ca6dfa278cf123a87670a3 | [
"MIT"
] | null | null | null | setup.py | guiscaranse/fastapi-sqlalchemy | fdfe86330435c342e2ca6dfa278cf123a87670a3 | [
"MIT"
] | null | null | null | setup.py | guiscaranse/fastapi-sqlalchemy | fdfe86330435c342e2ca6dfa278cf123a87670a3 | [
"MIT"
] | null | null | null | import re
from setuptools import setup
with open("README.rst", "rt", encoding="utf-8") as f:
long_description = f.read()
with open("fastapi_sqlalchemy/__init__.py", "rt", encoding="utf-8") as f:
version = re.search(r'__version__ = "(.*?)"', f.read(), re.M).group(1)
setup(
name="FastAPI-SQLAlchemy",
... | 36.5 | 82 | 0.623288 |
797484a41c1698a9f6b2520157915ff5aa12c008 | 2,480 | py | Python | counter.py | olned/cc-orderbook-python | b90ad8235500c1752093a3cd88e7adfdb10ac641 | [
"MIT"
] | 1 | 2019-05-18T21:54:52.000Z | 2019-05-18T21:54:52.000Z | counter.py | olned/cc-orderbook-python | b90ad8235500c1752093a3cd88e7adfdb10ac641 | [
"MIT"
] | null | null | null | counter.py | olned/cc-orderbook-python | b90ad8235500c1752093a3cd88e7adfdb10ac641 | [
"MIT"
] | null | null | null | class Parameter:
min_time = 0.0
max_time = 0.0
total_time = 0.0
count = 0
def __init__(self, name, code):
self.name = name
self.code = code
def count_it(self, new_time):
self.count += 1
if not self.min_time or new_time < self.min_time:
self.min_time ... | 34.929577 | 99 | 0.587903 |
79748556f10f2501cadd9fecfd5bd81e29319ff4 | 2,098 | py | Python | pytorch_ca/src/utils/utils.py | LetteraUnica/neural_cellular_automata | 360aed252d31529b02460cdf50d752acbd6edaf8 | [
"MIT"
] | 2 | 2021-08-25T15:46:59.000Z | 2021-10-01T20:38:36.000Z | pytorch_ca/src/utils/utils.py | LetteraUnica/neural_cellular_automata | 360aed252d31529b02460cdf50d752acbd6edaf8 | [
"MIT"
] | 5 | 2021-10-01T20:43:13.000Z | 2021-11-19T15:47:45.000Z | pytorch_ca/src/utils/utils.py | LetteraUnica/neural_cellular_automata | 360aed252d31529b02460cdf50d752acbd6edaf8 | [
"MIT"
] | null | null | null | import torch
from random import randint
def make_seed(n_images: int,
n_channels: int,
image_size: int,
n_CAs: int = 1,
alpha_channel: int = -1,
device: torch.device = "cpu") -> torch.Tensor:
"""Makes n_images seeds to start the CA, the seed is... | 33.83871 | 99 | 0.621544 |
797485647f9f18b723b55e0be246310aeea48da1 | 8,741 | py | Python | numba/runtime/context.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | numba/runtime/context.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | numba/runtime/context.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-09-18T15:03:46.000Z | 2020-09-18T15:03:46.000Z | from __future__ import print_function, absolute_import, division
from llvmlite import ir
from numba import cgutils, types
class NRTContext(object):
"""
An object providing access to NRT APIs in the lowering pass.
"""
def __init__(self, context, enabled):
self._context = context
self... | 36.881857 | 80 | 0.615833 |
7974857d750ea486f544dddce7ff10ac9321bc3b | 4,927 | py | Python | aerolyzer/image_restriction_functions.py | wingarlo/Aerolyzer | 16c91740ba561b988e67fdcd6ef802ed8a826da2 | [
"Apache-2.0"
] | null | null | null | aerolyzer/image_restriction_functions.py | wingarlo/Aerolyzer | 16c91740ba561b988e67fdcd6ef802ed8a826da2 | [
"Apache-2.0"
] | null | null | null | aerolyzer/image_restriction_functions.py | wingarlo/Aerolyzer | 16c91740ba561b988e67fdcd6ef802ed8a826da2 | [
"Apache-2.0"
] | null | null | null | '''
Image Restriction Function File
Description: This file contains all functions for the verifying image restrictions.
'''
import os
import re
import cv2
import yaml
from datetime import datetime
import exifread
import numpy as np
class imgRestFuncs(object):
'Class containing all image restriction functions'
... | 34.697183 | 120 | 0.595494 |
797485bdc1ce48f54719eb17be6965666a4d11bf | 970 | py | Python | ironic_python_agent/tests/functional/test_commands.py | bigcockroach/ironic-python-agent | 15f47b390da42bdf69f0c17b7907debcf82e434f | [
"Apache-2.0"
] | null | null | null | ironic_python_agent/tests/functional/test_commands.py | bigcockroach/ironic-python-agent | 15f47b390da42bdf69f0c17b7907debcf82e434f | [
"Apache-2.0"
] | null | null | null | ironic_python_agent/tests/functional/test_commands.py | bigcockroach/ironic-python-agent | 15f47b390da42bdf69f0c17b7907debcf82e434f | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Rackspace, 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... | 35.925926 | 74 | 0.734021 |
7974861ae994707faf9401228efb124ac8d011af | 4,560 | py | Python | cardpay/model/refunds_list.py | Sinkler/python-sdk-v2 | a1ad7cc9900f8adf967ca4dec0bb05d8eddc2999 | [
"MIT"
] | 6 | 2019-07-16T06:27:25.000Z | 2021-03-04T14:24:05.000Z | cardpay/model/refunds_list.py | Sinkler/python-sdk-v2 | a1ad7cc9900f8adf967ca4dec0bb05d8eddc2999 | [
"MIT"
] | 5 | 2019-11-18T09:07:51.000Z | 2021-02-12T13:59:55.000Z | cardpay/model/refunds_list.py | Sinkler/python-sdk-v2 | a1ad7cc9900f8adf967ca4dec0bb05d8eddc2999 | [
"MIT"
] | 5 | 2019-07-18T13:42:15.000Z | 2021-11-18T12:40:32.000Z | # coding: utf-8
"""
CardPay REST API
Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to c... | 31.448276 | 546 | 0.586404 |
797486acd02c6d84c00d88e6ca12368c15bc8ac8 | 13,229 | py | Python | sdk/python/feast/infra/provider.py | ptoman-pa/feast | 068389d829866063be741a5fc82ef18bc832698b | [
"Apache-2.0"
] | 2,258 | 2020-05-17T02:41:07.000Z | 2022-03-31T22:30:57.000Z | sdk/python/feast/infra/provider.py | feast-dev/feast | c9ff695372e7cfff4c0f5eed3a2eb044e88c1e1e | [
"Apache-2.0"
] | 1,768 | 2020-05-16T05:37:28.000Z | 2022-03-31T23:30:05.000Z | sdk/python/feast/infra/provider.py | ptoman-pa/feast | 068389d829866063be741a5fc82ef18bc832698b | [
"Apache-2.0"
] | 415 | 2020-05-16T18:21:27.000Z | 2022-03-31T09:59:10.000Z | import abc
from collections import defaultdict
from datetime import datetime
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
import pandas
import pyarrow
from tqdm import tqdm
from feast import errors, importer
from feast.entity import Entity
from feast.feature_... | 37.160112 | 108 | 0.673218 |
7974873447f96f6ebb990d347fd4aafb2bdbf634 | 5,597 | py | Python | modeling/_gimpact_cdhelper.py | Photon26/wrs-main-210414 | 71efab6f8680af48ba269244136acf69c36cb730 | [
"MIT"
] | null | null | null | modeling/_gimpact_cdhelper.py | Photon26/wrs-main-210414 | 71efab6f8680af48ba269244136acf69c36cb730 | [
"MIT"
] | null | null | null | modeling/_gimpact_cdhelper.py | Photon26/wrs-main-210414 | 71efab6f8680af48ba269244136acf69c36cb730 | [
"MIT"
] | null | null | null | import numpy as np
import gimpact as gi
# util functions
def gen_cdmesh_vvnf(vertices, vertex_normals, faces):
"""
generate cdmesh given vertices, _, and faces
:return: gimpact.TriMesh (require gimpact to be installed)
author: weiwei
date: 20210118
"""
return gi.TriMesh(vertices, faces.flat... | 43.387597 | 123 | 0.650527 |
79748816a2cbc091b362d99c3faa4d9ead6d4aed | 36,812 | py | Python | orttraining/orttraining/test/python/orttraining_test_ortmodule_autograd.py | toothache/onnxruntime | 217b2c9f931b5b0f704df0c8336def47025d2148 | [
"MIT"
] | 1 | 2021-09-15T08:20:39.000Z | 2021-09-15T08:20:39.000Z | orttraining/orttraining/test/python/orttraining_test_ortmodule_autograd.py | toothache/onnxruntime | 217b2c9f931b5b0f704df0c8336def47025d2148 | [
"MIT"
] | 1 | 2021-03-01T23:16:36.000Z | 2021-03-01T23:16:36.000Z | orttraining/orttraining/test/python/orttraining_test_ortmodule_autograd.py | toothache/onnxruntime | 217b2c9f931b5b0f704df0c8336def47025d2148 | [
"MIT"
] | 3 | 2019-01-08T12:19:04.000Z | 2020-05-09T21:33:12.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# Import external libraries.
import onnxruntime
import pytest
import torch
from torch.nn.parameter import Parameter
# Import ORT modules.
from _test_helpers import *
from onnxruntime.training.ortmodule import ORTModule
torc... | 35.844206 | 189 | 0.634141 |
797488b6a69808fab9b17c2f1064e1a7faf38aa4 | 148 | py | Python | leads/apps.py | cybrvybe/FactorBeats-Platform | 7ee4b7bd2db6f41ca8def77db826dd21db2f28c8 | [
"MIT"
] | null | null | null | leads/apps.py | cybrvybe/FactorBeats-Platform | 7ee4b7bd2db6f41ca8def77db826dd21db2f28c8 | [
"MIT"
] | null | null | null | leads/apps.py | cybrvybe/FactorBeats-Platform | 7ee4b7bd2db6f41ca8def77db826dd21db2f28c8 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class LeadsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'leads'
| 21.142857 | 57 | 0.722973 |
797489e67588f60ef4e902036e3e2ddbe022780e | 11,730 | py | Python | src/odin/odin/chores.py | kiennguyen94/odin | be4f69a46570f7768489c37a06aa9d3a3b0fed2b | [
"Apache-2.0"
] | 4 | 2020-12-15T15:57:14.000Z | 2020-12-16T21:52:23.000Z | src/odin/odin/chores.py | kiennguyen94/odin | be4f69a46570f7768489c37a06aa9d3a3b0fed2b | [
"Apache-2.0"
] | 2 | 2021-03-15T02:49:56.000Z | 2021-03-27T12:42:38.000Z | src/odin/odin/chores.py | kiennguyen94/odin | be4f69a46570f7768489c37a06aa9d3a3b0fed2b | [
"Apache-2.0"
] | 5 | 2020-12-15T19:09:00.000Z | 2021-04-21T20:40:38.000Z | """DSL to execute common chores
"""
import argparse
import logging
import os
import shutil
from contextlib import contextmanager
from pathlib import Path
from typing import List, Dict, Callable, NewType, Optional
import git
from eight_mile.utils import read_config_stream
from baseline.utils import exporter, optional_p... | 32.583333 | 117 | 0.673572 |
79748b7d5d76c79d1021791a02e39c774e2fe700 | 11,877 | py | Python | lib/py/src/server/TNonblockingServer.py | maxspencer/thrift | 7f01e2a8f869d8622bc56e7584cce98865fa8b0f | [
"Apache-2.0"
] | 3 | 2016-11-22T15:37:18.000Z | 2021-04-15T13:55:21.000Z | lib/py/src/server/TNonblockingServer.py | maxspencer/thrift | 7f01e2a8f869d8622bc56e7584cce98865fa8b0f | [
"Apache-2.0"
] | 1 | 2016-03-18T01:41:55.000Z | 2016-03-18T01:41:55.000Z | lib/py/src/server/TNonblockingServer.py | maxspencer/thrift | 7f01e2a8f869d8622bc56e7584cce98865fa8b0f | [
"Apache-2.0"
] | 4 | 2016-01-05T00:04:00.000Z | 2021-12-23T08:51:16.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.934286 | 79 | 0.590806 |
79748be78397628079669d8d47017622fec8727b | 884 | py | Python | contrib/generate-asinfo.py | clobrother/AS-Stats | 93fb606c465a89ba22153b4167871ad11448960a | [
"BSD-2-Clause"
] | 143 | 2015-02-12T19:10:31.000Z | 2021-10-11T20:28:29.000Z | contrib/generate-asinfo.py | clobrother/AS-Stats | 93fb606c465a89ba22153b4167871ad11448960a | [
"BSD-2-Clause"
] | 57 | 2015-01-23T19:33:12.000Z | 2022-03-09T12:06:28.000Z | contrib/generate-asinfo.py | clobrother/AS-Stats | 93fb606c465a89ba22153b4167871ad11448960a | [
"BSD-2-Clause"
] | 54 | 2015-01-30T14:50:18.000Z | 2022-02-12T19:34:36.000Z | #!/usr/bin/env python
# (echo begin; echo verbose; for i in `seq 1 65535`; do echo "AS$i"; done; echo end) | netcat whois.cymru.com 43 | ./generate-asinfo.py > asinfo.txt
import sys
for line in sys.stdin:
try:
asn,country,_,_,data = [_.strip() for _ in line.split('|')]
except ValueError:
conti... | 25.257143 | 148 | 0.552036 |
79748d37e8d41aa0dadaeb134b355886b419c297 | 7,957 | py | Python | tests/server/extensions/test_loqusdb_exe_extension.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 111 | 2015-01-15T11:53:20.000Z | 2022-03-26T19:55:24.000Z | tests/server/extensions/test_loqusdb_exe_extension.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 2,995 | 2015-01-15T16:14:20.000Z | 2022-03-31T13:36:32.000Z | tests/server/extensions/test_loqusdb_exe_extension.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 55 | 2015-05-31T19:09:49.000Z | 2021-11-01T10:50:31.000Z | """Tests for the loqusdb executable extension"""
import subprocess
import pytest
from scout.exceptions.config import ConfigError
from scout.server.app import create_app
from scout.server.extensions import LoqusDB, loqus_extension, loqusdb
def test_set_coordinates_no_variant_type():
"""Test update coordinates w... | 33.57384 | 111 | 0.695237 |
79748f81917406ea354e56cb5713ebf886ebfb95 | 18,566 | py | Python | schevo/test/base.py | Schevo/schevo | d57a41f8b7b514ed48dc0164dcd3412a89e9873b | [
"MIT"
] | 1 | 2020-09-05T00:47:50.000Z | 2020-09-05T00:47:50.000Z | schevo/test/base.py | Schevo/schevo | d57a41f8b7b514ed48dc0164dcd3412a89e9873b | [
"MIT"
] | null | null | null | schevo/test/base.py | Schevo/schevo | d57a41f8b7b514ed48dc0164dcd3412a89e9873b | [
"MIT"
] | null | null | null | """Test base classes."""
# Copyright (c) 2001-2009 ElevenCraft Inc.
# See LICENSE for details.
import inspect
import os
import sys
from schevo import database
from schevo.lib import module
import schevo.schema
import schevo.trace
from schevo.script.path import package_path
from schevo.url import make_url
from textw... | 33.153571 | 79 | 0.623721 |
79748fc32a0aa6a1561f2c6acc5c014be2e7831b | 4,796 | py | Python | modules/node_.py | Oleksandra2020/TED_Search | 879e55a7e541bdd3e44d907bc9a638b496d18d90 | [
"MIT"
] | null | null | null | modules/node_.py | Oleksandra2020/TED_Search | 879e55a7e541bdd3e44d907bc9a638b496d18d90 | [
"MIT"
] | 2 | 2020-04-06T17:09:36.000Z | 2020-05-11T12:32:13.000Z | modules/node_.py | Oleksandra2020/TED_Search | 879e55a7e541bdd3e44d907bc9a638b496d18d90 | [
"MIT"
] | null | null | null | """
Initializes Node and TwoWayNode classes for building
linked list data structure
"""
class Node:
"""
Node representation for building linked lists
"""
def __init__(self, data=None, next=None):
"""
str, obj -> None
Initializes the knot
"""
self.data = data
... | 23.281553 | 87 | 0.48603 |
79748fdda56f549dbe6c30ac044b2944a250eb0b | 86 | py | Python | code/haitiwater/apps/log/apps.py | exavince/HaitiWater | 8c870401b50609c19e23c8be082cbfb17d8e9f5f | [
"MIT"
] | 4 | 2018-10-28T17:31:19.000Z | 2020-04-08T12:31:32.000Z | code/haitiwater/apps/log/apps.py | exavince/HaitiWater | 8c870401b50609c19e23c8be082cbfb17d8e9f5f | [
"MIT"
] | 9 | 2018-11-05T18:51:57.000Z | 2021-03-19T22:14:26.000Z | code/haitiwater/apps/log/apps.py | AdrienHalletUCL/HaitiWater | 6bf893bf778c9438eb8a6a329cfa4bb4acdd3c45 | [
"MIT"
] | 2 | 2018-10-28T17:38:21.000Z | 2019-09-01T15:12:50.000Z | from django.apps import AppConfig
class LogConfig(AppConfig):
name = 'apps.log'
| 14.333333 | 33 | 0.732558 |
7974905bcbf9b1b69acffd646e2202ca0f7c8cdf | 9,595 | py | Python | limatix/bin/dc_paramdb2.py | nscheirer/limatix | bd22ce349a59194834879aac5b2452d85d12293e | [
"BSD-3-Clause"
] | null | null | null | limatix/bin/dc_paramdb2.py | nscheirer/limatix | bd22ce349a59194834879aac5b2452d85d12293e | [
"BSD-3-Clause"
] | 3 | 2018-06-26T22:56:24.000Z | 2018-07-09T18:33:00.000Z | limatix/bin/dc_paramdb2.py | nscheirer/limatix | bd22ce349a59194834879aac5b2452d85d12293e | [
"BSD-3-Clause"
] | 1 | 2022-03-03T19:26:11.000Z | 2022-03-03T19:26:11.000Z | #! /usr/bin/env python
import sys
import os
import os.path
import string
import datetime
import socket
import subprocess
if "--gtk3" in sys.argv or sys.version_info[0] >= 3: # gtk3
import gi
gi.require_version('Gtk','3.0')
from gi.repository import Gtk as gtk
pass
else : # gtk2
import gobject
... | 28.727545 | 198 | 0.673163 |
797490f206b44ab171601895717b45a3fd66dfb9 | 9,999 | py | Python | tensorflow_probability/python/distributions/probit_bernoulli.py | chrism0dwk/probability | ab260f15cae94c6802c2f2769fb448ad213b79cd | [
"Apache-2.0"
] | 1 | 2021-08-23T17:17:52.000Z | 2021-08-23T17:17:52.000Z | tensorflow_probability/python/distributions/probit_bernoulli.py | chrism0dwk/probability | ab260f15cae94c6802c2f2769fb448ad213b79cd | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/probit_bernoulli.py | chrism0dwk/probability | ab260f15cae94c6802c2f2769fb448ad213b79cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability 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 o... | 38.755814 | 91 | 0.710871 |
797490ffdc8a89748be907895e1c78243e10c6a8 | 356 | py | Python | root/main.py | BrendanBall/root-insurance-python-1 | 5b38e6ee2c9d685db2d5dec487f11bf73e4d97ec | [
"MIT"
] | null | null | null | root/main.py | BrendanBall/root-insurance-python-1 | 5b38e6ee2c9d685db2d5dec487f11bf73e4d97ec | [
"MIT"
] | 2 | 2018-03-15T13:42:26.000Z | 2021-06-01T21:51:54.000Z | root/main.py | BrendanBall/root-insurance-python-1 | 5b38e6ee2c9d685db2d5dec487f11bf73e4d97ec | [
"MIT"
] | 4 | 2018-02-17T09:33:00.000Z | 2018-03-29T17:50:45.000Z | from insurance import Client
import os
def main():
baseURL = "https://sandbox.root.co.za/v1/insurance"
appID = os.environ.get('ROOT_APP_ID')
appSecret = os.environ.get('ROOT_APP_SECRET')
client = Client(baseURL, appID, appSecret)
print(client.gadgets.get_phone_value("iPhone 6 Plus 128GB LTE"))
if... | 25.428571 | 68 | 0.699438 |
7974911e26f99e1a198f353fb7c74e03816d073d | 3,842 | py | Python | Crossbar/crossbar_test/dockersubscription/subscription.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | Crossbar/crossbar_test/dockersubscription/subscription.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | Crossbar/crossbar_test/dockersubscription/subscription.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | ###############################################################################
#
# Copyright (C) 2014, Tavendo GmbH and/or collaborators. 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. Redi... | 37.300971 | 167 | 0.69469 |
797492f01db5e4f0811a86caf4d8d1f210ab25f5 | 2,919 | py | Python | commands/currency/rob.py | ii-Python/Prism | a404a61ddb16d045aa29d81908ce4ad80b24e24d | [
"MIT"
] | 6 | 2020-09-28T13:19:37.000Z | 2021-07-13T10:37:22.000Z | commands/currency/rob.py | BenjaminGotBanned/Prism | a404a61ddb16d045aa29d81908ce4ad80b24e24d | [
"MIT"
] | 2 | 2020-10-06T17:59:40.000Z | 2020-10-06T20:12:39.000Z | commands/currency/rob.py | BenjaminGotBanned/Prism | a404a61ddb16d045aa29d81908ce4ad80b24e24d | [
"MIT"
] | 3 | 2021-01-05T13:33:58.000Z | 2021-07-13T10:37:37.000Z | # Modules
import discord
from random import randint
from json import loads, dumps
from discord.ext import commands
from assets.prism import Cooldowns, Tools
# Main Command Class
class Rob(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.desc = "Robs a user of their goodies ;)"
... | 31.053191 | 185 | 0.574169 |
79749313fb8e3102a54af8324572465e177550ab | 4,155 | py | Python | pwndb.py | alex14324/pwndb | ed8ecb5a24ef38a55eec07a91cd48a3c5bcbaebe | [
"MIT"
] | null | null | null | pwndb.py | alex14324/pwndb | ed8ecb5a24ef38a55eec07a91cd48a3c5bcbaebe | [
"MIT"
] | null | null | null | pwndb.py | alex14324/pwndb | ed8ecb5a24ef38a55eec07a91cd48a3c5bcbaebe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Authors:
# - davidtavarez
# - D4Vinci
import sys
import requests
import argparse
from email.utils import getaddresses
import json
from requests import ConnectionError
if sys.version_info >= (3, 0):
sys.stdout = open(sys.stdout.fileno(), mode='w', encoding='utf8', buffering=1)
G, B, R, ... | 29.678571 | 118 | 0.550903 |
797493183c7add3dc165d4ab2779eeabc176d625 | 3,381 | py | Python | BioSTEAM 1.x.x/build/lib/biorefineries/cornstover/tea.py | blsymens/Bioindustrial-Park | c1173646185d52f4b8d595ad088ade8e5216614d | [
"MIT"
] | 18 | 2020-05-12T21:46:14.000Z | 2022-03-14T00:35:35.000Z | build/lib/biosteam/biorefineries/cornstover/tea.py | lilanyu/biosteam | b025bbe138bfd0b016af58583792fb4f3ff9186e | [
"MIT"
] | 24 | 2020-03-05T14:39:15.000Z | 2022-03-25T22:24:50.000Z | build/lib/biosteam/biorefineries/cornstover/tea.py | lilanyu/biosteam | b025bbe138bfd0b016af58583792fb4f3ff9186e | [
"MIT"
] | 9 | 2020-05-14T13:02:32.000Z | 2022-03-27T19:41:07.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 1 21:48:12 2019
@author: yoelr
"""
from biosteam import TEA
__slots__ = ('CornstoverTEA',)
class CornstoverTEA(TEA):
__slots__ = ('OSBL_units', 'warehouse', 'site_development',
'additional_piping', 'proratable_costs', 'field_expenses',
... | 42.797468 | 108 | 0.622893 |
79749387ce4314b8c4d6dbce736b534a1d7f7613 | 10,164 | py | Python | parlai_hred/seq2seq.py | anidhi/ParlAI | aa684894300eececd6d000900e1821e9a7393da4 | [
"MIT"
] | null | null | null | parlai_hred/seq2seq.py | anidhi/ParlAI | aa684894300eececd6d000900e1821e9a7393da4 | [
"MIT"
] | null | null | null | parlai_hred/seq2seq.py | anidhi/ParlAI | aa684894300eececd6d000900e1821e9a7393da4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai_internal.agents.seq2seq.torch_generator_agent2 import TorchGeneratorAgent2
from parlai.utils.misc import war... | 35.663158 | 115 | 0.557458 |
797493b8ff4ed081efb4eb6848e2118ba86cf4e0 | 10,969 | py | Python | zipline/utils/data.py | npezolano/zipline | 71effa5e98bd0425ac1863e1861c9b51fbc77242 | [
"Apache-2.0"
] | 1 | 2016-03-16T12:54:07.000Z | 2016-03-16T12:54:07.000Z | zipline/utils/data.py | Miles0918/zipline | e7a5e097c419bed7816d3cd6c370b5171db37b33 | [
"Apache-2.0"
] | null | null | null | zipline/utils/data.py | Miles0918/zipline | e7a5e097c419bed7816d3cd6c370b5171db37b33 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2013 Quantopian, 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 wr... | 32.356932 | 79 | 0.599872 |
7974944a003df95ee0097ff166c0ad28e7db04e1 | 214 | py | Python | server/src/scripts/video_to_audio.py | Darlene-Naz/RelAi | 2278dc55a49fc00adb68ed78143a8cce59128273 | [
"MIT"
] | 2 | 2021-02-25T22:14:58.000Z | 2021-02-26T04:27:57.000Z | server/src/scripts/video_to_audio.py | Darlene-Naz/RelAi | 2278dc55a49fc00adb68ed78143a8cce59128273 | [
"MIT"
] | null | null | null | server/src/scripts/video_to_audio.py | Darlene-Naz/RelAi | 2278dc55a49fc00adb68ed78143a8cce59128273 | [
"MIT"
] | 2 | 2021-07-01T05:48:30.000Z | 2021-07-01T06:42:11.000Z | import moviepy.editor
import sys
path = sys.argv[1]
video = moviepy.editor.VideoFileClip(path)
audio = video.audio
audio.write_audiofile('src/uploads/upload.wav')
print('Converted video to audio successfully!') | 19.454545 | 47 | 0.780374 |
79749488278e5f2d4c4612281013f9059a5d8558 | 125 | py | Python | payments/admin.py | RahulDas782/MoneyBee | ad6d6e4ac7ac71ca230a61d9c941922b38c59cb5 | [
"Apache-2.0"
] | null | null | null | payments/admin.py | RahulDas782/MoneyBee | ad6d6e4ac7ac71ca230a61d9c941922b38c59cb5 | [
"Apache-2.0"
] | null | null | null | payments/admin.py | RahulDas782/MoneyBee | ad6d6e4ac7ac71ca230a61d9c941922b38c59cb5 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from . import models
admin.site.register(models.Rooms)
admin.site.register(models.Members)
| 20.833333 | 35 | 0.816 |
7974953ec51dd1649e0eff10c43f4f9d7f7bcb53 | 3,322 | py | Python | django for beginners/Chapter_06/config/settings.py | sharaf-qeshta/django-for-beginners | f869807c8ace2e048655cecde9ffa8443ffd0da7 | [
"MIT"
] | null | null | null | django for beginners/Chapter_06/config/settings.py | sharaf-qeshta/django-for-beginners | f869807c8ace2e048655cecde9ffa8443ffd0da7 | [
"MIT"
] | null | null | null | django for beginners/Chapter_06/config/settings.py | sharaf-qeshta/django-for-beginners | f869807c8ace2e048655cecde9ffa8443ffd0da7 | [
"MIT"
] | null | null | null | """
Django settings for config project.
Generated by 'django-admin startproject' using Django 4.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
from pathlib ... | 26.365079 | 91 | 0.702288 |
79749962ced375a6276db2aa10524195fe0ba81e | 12,860 | py | Python | xroms/interp.py | ocefpaf/xroms | 763d6e678e28fe074e0aaab26fecd2b74e51a8b0 | [
"MIT"
] | 4 | 2020-01-21T21:24:17.000Z | 2020-10-02T03:09:32.000Z | xroms/interp.py | ocefpaf/xroms | 763d6e678e28fe074e0aaab26fecd2b74e51a8b0 | [
"MIT"
] | 1 | 2020-04-08T00:11:39.000Z | 2020-04-25T08:03:45.000Z | xroms/interp.py | ocefpaf/xroms | 763d6e678e28fe074e0aaab26fecd2b74e51a8b0 | [
"MIT"
] | 1 | 2020-04-06T06:42:36.000Z | 2020-04-06T06:42:36.000Z | from scipy.spatial import Delaunay
import matplotlib.tri as mtri
import numpy as np
import xroms
import xarray as xr
def setup(ds, whichgrids=None):
'''Set up for using ll2xe().
Set up Delaunay triangulation by calculating triangulation and functions for
calculating grid coords from lon/lat pairs an... | 45.441696 | 134 | 0.656376 |
79749b857918f2b7134a50b7ab608ffecc01d3dc | 616 | py | Python | mStructureTypes.py | SkyLined/mWindowsSDK | 931cc9d30316893662a3dc4e200dabe97122d216 | [
"CC-BY-4.0"
] | 2 | 2019-08-01T15:08:25.000Z | 2021-01-30T07:29:34.000Z | mStructureTypes.py | SkyLined/mWindowsSDK | 931cc9d30316893662a3dc4e200dabe97122d216 | [
"CC-BY-4.0"
] | null | null | null | mStructureTypes.py | SkyLined/mWindowsSDK | 931cc9d30316893662a3dc4e200dabe97122d216 | [
"CC-BY-4.0"
] | null | null | null | from .iStructureBaseType import iStructureBaseType;
from .uProcessBits import uProcessBits;
iStructureType8 = type("iStructureBaseType8", (iStructureBaseType,), {"_pack_": 1, "uAlignmentInBits": 8});
iStructureType16 = type("iStructureBaseType16", (iStructureBaseType,), {"_pack_": 2, "uAlignmentInBits": 16});
iStruc... | 61.6 | 110 | 0.76461 |
79749ba4dd64479e7a325a728a7df742a2cec106 | 5,032 | py | Python | aether-odk-module/aether/odk/api/tests/test_surveyors_utils.py | eHealthAfrica/aether | 6845d7eeebd4ae57332f73d74db3617e00032204 | [
"Apache-2.0"
] | 14 | 2018-08-09T20:57:16.000Z | 2020-10-11T12:22:18.000Z | aether-odk-module/aether/odk/api/tests/test_surveyors_utils.py | eHealthAfrica/aether | 6845d7eeebd4ae57332f73d74db3617e00032204 | [
"Apache-2.0"
] | 148 | 2018-07-24T10:52:29.000Z | 2022-02-10T09:06:44.000Z | aether-odk-module/aether/odk/api/tests/test_surveyors_utils.py | eHealthAfrica/aether | 6845d7eeebd4ae57332f73d74db3617e00032204 | [
"Apache-2.0"
] | 6 | 2018-07-25T13:33:10.000Z | 2019-09-23T03:02:09.000Z | # Copyright (C) 2019 by eHealth Africa : http://www.eHealthAfrica.org
#
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with
# the License. Y... | 43.756522 | 83 | 0.686606 |
79749baf9945febd5c89cb442b17943c2b082f70 | 263 | py | Python | build/hitwall/catkin_generated/installspace/hitwall-msg-paths-context.py | rafafigueroa/cws | daf7a433354354be79c4093352d9c325cba2afb3 | [
"Apache-2.0"
] | 1 | 2015-03-06T06:01:17.000Z | 2015-03-06T06:01:17.000Z | build/hitwall/catkin_generated/installspace/hitwall-msg-paths-context.py | rafafigueroa/cws | daf7a433354354be79c4093352d9c325cba2afb3 | [
"Apache-2.0"
] | null | null | null | build/hitwall/catkin_generated/installspace/hitwall-msg-paths-context.py | rafafigueroa/cws | daf7a433354354be79c4093352d9c325cba2afb3 | [
"Apache-2.0"
] | null | null | null | # generated from genmsg/cmake/pkg-msg-paths.context.in
DEVELSPACE = 'FALSE' == 'TRUE'
INSTALLSPACE = 'TRUE' == 'TRUE'
PROJECT_NAME = 'hitwall'
PKG_MSG_INCLUDE_DIRS = ''
ARG_DEPENDENCIES = 'std_msgs;geometry_msgs;kobuki_msgs;nav_msgs;sensor_msgs;gazebo_msgs;tf'
| 29.222222 | 91 | 0.768061 |
79749be3e5f6026b2471225e36367d3460d0f668 | 136 | py | Python | codeforces/anirudhak47/507/B.py | anirudhakulkarni/codes | d7a907951033b57314dfc0b837123aaa5c25a39a | [
"MIT"
] | 3 | 2020-07-09T16:15:42.000Z | 2020-07-17T13:19:42.000Z | codeforces/anirudhak47/507/B.py | anirudhakulkarni/codes | d7a907951033b57314dfc0b837123aaa5c25a39a | [
"MIT"
] | null | null | null | codeforces/anirudhak47/507/B.py | anirudhakulkarni/codes | d7a907951033b57314dfc0b837123aaa5c25a39a | [
"MIT"
] | 1 | 2020-07-17T13:19:48.000Z | 2020-07-17T13:19:48.000Z | import math
r,x,y,a,b=map(int,input().split())
#arr=list(map(int,input().split()))
print(math.ceil((((x-a)**2+(y-b)**2)**0.5)/(2*r))) | 34 | 50 | 0.566176 |
79749bfa5dd92df8119cbf1267111800777c87a3 | 54 | py | Python | cara_sample_module/implementation/__init__.py | Snusmumr1000/cara-sample-module | a8d6a83b4472d27ea0d3dc4b2fedc1fb8f8929c1 | [
"MIT"
] | null | null | null | cara_sample_module/implementation/__init__.py | Snusmumr1000/cara-sample-module | a8d6a83b4472d27ea0d3dc4b2fedc1fb8f8929c1 | [
"MIT"
] | null | null | null | cara_sample_module/implementation/__init__.py | Snusmumr1000/cara-sample-module | a8d6a83b4472d27ea0d3dc4b2fedc1fb8f8929c1 | [
"MIT"
] | null | null | null | from .exp import Exp
from .generator import Generator
| 18 | 32 | 0.814815 |
79749c3095e7653b185fd98e1e5c2f48f97c6f84 | 781 | py | Python | src/pyams_chat/zmi/viewlet/interfaces.py | Py-AMS/pyams-chat | b85f423430365a636fd47d05e1f819ec1482b767 | [
"ZPL-2.1"
] | null | null | null | src/pyams_chat/zmi/viewlet/interfaces.py | Py-AMS/pyams-chat | b85f423430365a636fd47d05e1f819ec1482b767 | [
"ZPL-2.1"
] | null | null | null | src/pyams_chat/zmi/viewlet/interfaces.py | Py-AMS/pyams-chat | b85f423430365a636fd47d05e1f819ec1482b767 | [
"ZPL-2.1"
] | null | null | null | #
# Copyright (c) 2015-2021 Thierry Florac <tflorac AT ulthar.net>
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRAN... | 31.24 | 75 | 0.78233 |
79749da14615cfca0b26b1934753d3fcd20eabfd | 7,398 | py | Python | tests/components/auth/test_init.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | tests/components/auth/test_init.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | tests/components/auth/test_init.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | """Integration tests for the auth component."""
from datetime import timedelta
from unittest.mock import patch
from homeassistant.auth.models import Credentials
from homeassistant.components.auth import RESULT_TYPE_USER
from homeassistant.setup import async_setup_component
from homeassistant.util.dt import utcnow
from... | 32.590308 | 79 | 0.659367 |
79749e22850f6b2e5212e6b792f53aa398373200 | 3,946 | py | Python | elasticapm/utils/threading.py | dpaluch-rp/apm-agent-python | 8b11d232f37c0affe0a7c92f590b05106c55b3b3 | [
"BSD-3-Clause"
] | null | null | null | elasticapm/utils/threading.py | dpaluch-rp/apm-agent-python | 8b11d232f37c0affe0a7c92f590b05106c55b3b3 | [
"BSD-3-Clause"
] | null | null | null | elasticapm/utils/threading.py | dpaluch-rp/apm-agent-python | 8b11d232f37c0affe0a7c92f590b05106c55b3b3 | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License
#
# Copyright (c) 2019, Elasticsearch BV
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, t... | 41.104167 | 117 | 0.698936 |
7974a044f51ee9a72692bfe7523aeae41e9168d9 | 3,985 | py | Python | tools/mo/openvino/tools/mo/ops/tile.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 1,127 | 2018-10-15T14:36:58.000Z | 2020-04-20T09:29:44.000Z | tools/mo/openvino/tools/mo/ops/tile.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 439 | 2018-10-20T04:40:35.000Z | 2020-04-19T05:56:25.000Z | tools/mo/openvino/tools/mo/ops/tile.py | ryanloney/openvino-1 | 4e0a740eb3ee31062ba0df88fcf438564f67edb7 | [
"Apache-2.0"
] | 414 | 2018-10-17T05:53:46.000Z | 2020-04-16T17:29:53.000Z | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from openvino.tools.mo.front.common.partial_infer.utils import int64_array, dynamic_dimension_value, dynamic_dimension, \
is_fully_defined, shape_array, shape_insert
from openvino.tools.mo.graph.graph import Node,... | 38.317308 | 121 | 0.633626 |
7974a1d13f6f7c93c1ebfee4c37bd7e6f27ec025 | 2,151 | py | Python | test/conftest.py | tracsa/cacahuate | 14cb799695a4a49ca13d8037a1e15a398f5e70da | [
"MIT"
] | 3 | 2018-05-18T01:49:13.000Z | 2019-02-22T22:03:18.000Z | test/conftest.py | tracsa/cacahuate | 14cb799695a4a49ca13d8037a1e15a398f5e70da | [
"MIT"
] | 23 | 2018-04-05T22:44:53.000Z | 2021-09-14T20:33:34.000Z | test/conftest.py | tracsa/pvm | 14cb799695a4a49ca13d8037a1e15a398f5e70da | [
"MIT"
] | 5 | 2018-07-06T14:07:41.000Z | 2022-02-28T12:26:00.000Z | from coralillo import Engine
from itacate import Config
import os
import pytest
import pymongo
from cacahuate.models import bind_models as bimo
def ismybirthday(value):
if value.month == 5 and value.day == 10:
return 'Today is my birthday!'
return 'Is not my birthday'
TESTING_SETTINGS = {
'CUST... | 22.882979 | 74 | 0.662018 |
7974a2150277c0f5f4deaab3a183f210fea661c1 | 4,741 | py | Python | main.py | thibaultsmnt/gesync | 7fa0e4ef4d950aef8a849f64d00966a64378594d | [
"MIT"
] | null | null | null | main.py | thibaultsmnt/gesync | 7fa0e4ef4d950aef8a849f64d00966a64378594d | [
"MIT"
] | null | null | null | main.py | thibaultsmnt/gesync | 7fa0e4ef4d950aef8a849f64d00966a64378594d | [
"MIT"
] | null | null | null | from datetime import datetime, time
import argparse
import json
from googleapiclient.discovery import build
# from googleapiclient.errors import HttpError
from httplib2 import Http
from oauth2client import file, client, tools
from guichet_etudiant import GuichetEtudiant
import rfc3339
from creds import USERNAME, PA... | 31.818792 | 76 | 0.632356 |
7974a289fbf86c4e45a1e5d4ae8f6732d4dcf87b | 2,513 | py | Python | python_demos/src/rates_demo/get_rates.py | t4d-classes/python_10042021 | e2c28448ad66784c429655ab766f902b76d6ac79 | [
"MIT"
] | null | null | null | python_demos/src/rates_demo/get_rates.py | t4d-classes/python_10042021 | e2c28448ad66784c429655ab766f902b76d6ac79 | [
"MIT"
] | null | null | null | python_demos/src/rates_demo/get_rates.py | t4d-classes/python_10042021 | e2c28448ad66784c429655ab766f902b76d6ac79 | [
"MIT"
] | null | null | null | """ get rates module """
from concurrent.futures import ThreadPoolExecutor
from datetime import date, timedelta
import threading
import requests
from rates_demo.business_days import business_days_gen
def get_rates() -> None:
""" get rates """
print("get rates")
start_date = date(2021, 1, 1)
end_dat... | 23.933333 | 77 | 0.60008 |
7974a4190facb5c5aa10d568a08a8d4d5704aced | 257 | py | Python | catcmd/config/qconfigs/__init__.py | project-catapult/catapult_cmd | 439527b9d986ebdadd154a1245d851a74ac5b83a | [
"MIT"
] | null | null | null | catcmd/config/qconfigs/__init__.py | project-catapult/catapult_cmd | 439527b9d986ebdadd154a1245d851a74ac5b83a | [
"MIT"
] | null | null | null | catcmd/config/qconfigs/__init__.py | project-catapult/catapult_cmd | 439527b9d986ebdadd154a1245d851a74ac5b83a | [
"MIT"
] | null | null | null | from .q_env import questions as env_qs
from .q_git import questions as git_qs
from .q_user import questions as user_qs
from .q_cloud import questions as cloud_qs
from .q_project import questions as project_qs
from .q_catapult import questions as catapult_qs | 42.833333 | 48 | 0.840467 |
7974a4ef79ce3cc9e23626a56ee2c2f4c5b3a18b | 12,552 | py | Python | gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_document.py | gooddata/gooddata-python-sdk | df4d4a4d730ab376960ae2ed01e7d86498e85c6a | [
"MIT"
] | 7 | 2022-01-24T16:27:06.000Z | 2022-02-25T10:18:49.000Z | gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_document.py | gooddata/gooddata-python-sdk | df4d4a4d730ab376960ae2ed01e7d86498e85c6a | [
"MIT"
] | 29 | 2022-01-20T15:45:38.000Z | 2022-03-31T09:39:25.000Z | gooddata-metadata-client/gooddata_metadata_client/model/json_api_workspace_data_filter_setting_out_document.py | gooddata/gooddata-python-sdk | df4d4a4d730ab376960ae2ed01e7d86498e85c6a | [
"MIT"
] | 7 | 2022-01-20T07:11:15.000Z | 2022-03-09T14:50:17.000Z | """
OpenAPI definition
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0
Contact: support@gooddata.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sy... | 44.353357 | 131 | 0.590663 |
7974a50e1eb8d9eaa24af689d1e09841889b2aaf | 2,768 | py | Python | make_queue/admin.py | MAKENTNU/web | 7a5b512bf4c087d1561cdb623d7df4b3d04811a2 | [
"MIT"
] | 10 | 2017-11-25T01:47:20.000Z | 2020-03-24T18:28:24.000Z | make_queue/admin.py | MAKENTNU/web | 7a5b512bf4c087d1561cdb623d7df4b3d04811a2 | [
"MIT"
] | 319 | 2017-11-16T09:56:03.000Z | 2022-03-28T00:24:37.000Z | make_queue/admin.py | MAKENTNU/web | 7a5b512bf4c087d1561cdb623d7df4b3d04811a2 | [
"MIT"
] | 6 | 2017-11-12T14:04:08.000Z | 2021-03-10T09:41:18.000Z | from django.contrib import admin
from django.db.models import Count
from django.utils.html import format_html
from django.utils.translation import gettext_lazy as _
from util.admin_utils import TextFieldOverrideMixin
from web.multilingual.admin import MultiLingualFieldAdmin
from .models.course import Printer3DCourse
f... | 36.421053 | 117 | 0.72435 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.