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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794101a4fb5697e2fe58ffc343a4c8a5111ada44 | 5,329 | py | Python | tutorials/language/extern_op.py | eleflea/tvm | d199243d8907b2d8062dd9c20b69dcb9765a970f | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 40 | 2021-06-14T23:14:46.000Z | 2022-03-21T14:32:23.000Z | tutorials/language/extern_op.py | eleflea/tvm | d199243d8907b2d8062dd9c20b69dcb9765a970f | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 14 | 2021-06-08T03:15:54.000Z | 2022-02-01T23:50:24.000Z | tutorials/language/extern_op.py | eleflea/tvm | d199243d8907b2d8062dd9c20b69dcb9765a970f | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 11 | 2021-06-14T05:56:18.000Z | 2022-02-27T06:52:07.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... | 38.064286 | 90 | 0.65791 |
79410283245fa516fe7801d7937f9da6e28f77d1 | 808 | py | Python | turbosnake/test/test_utils.py | AlexeyBond/turbosnake | 832c924c2cf29a741234848792bf750aa72fece2 | [
"MIT"
] | 2 | 2021-09-23T01:11:22.000Z | 2022-02-04T21:08:24.000Z | turbosnake/test/test_utils.py | AlexeyBond/turbosnake | 832c924c2cf29a741234848792bf750aa72fece2 | [
"MIT"
] | null | null | null | turbosnake/test/test_utils.py | AlexeyBond/turbosnake | 832c924c2cf29a741234848792bf750aa72fece2 | [
"MIT"
] | null | null | null | from unittest import TestCase
from unittest.mock import Mock
from turbosnake import event_prop_invoker
class EventPropInvokerTest(TestCase):
def setUp(self) -> None:
class ComponentStub:
...
self.target = ComponentStub()
self.target.props = {}
def test_prop_missing(self)... | 26.064516 | 56 | 0.631188 |
7941028c41441115c5951efdd014ed949ca5c0a9 | 14,534 | py | Python | OmniMarkupLib/Renderers/libs/pygments/lexers/idl.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 652 | 2015-07-26T00:00:17.000Z | 2022-02-24T18:30:04.000Z | OmniMarkupLib/Renderers/libs/pygments/lexers/idl.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 82 | 2015-01-15T12:30:43.000Z | 2022-01-06T02:56:53.000Z | OmniMarkupLib/Renderers/libs/pygments/lexers/idl.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 99 | 2015-01-14T19:53:45.000Z | 2021-08-11T15:17:26.000Z | # -*- coding: utf-8 -*-
"""
pygments.lexers.idl
~~~~~~~~~~~~~~~~~~~
Lexers for IDL.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, words
from pygments.token import Text, Comment, Oper... | 55.262357 | 79 | 0.58862 |
794102ccf643951ff91587a43256c3795a8211ba | 3,145 | py | Python | app.py | yxxhero/opskit-api | 01b2ba64e1bde1c1f4755e8a87624f04b037629f | [
"MIT"
] | null | null | null | app.py | yxxhero/opskit-api | 01b2ba64e1bde1c1f4755e8a87624f04b037629f | [
"MIT"
] | null | null | null | app.py | yxxhero/opskit-api | 01b2ba64e1bde1c1f4755e8a87624f04b037629f | [
"MIT"
] | null | null | null | import logging
from flask import Blueprint
from flask_cors import CORS
from flask_restful import Api
from opskit_api.models import app
from opskit_api.resources.admin.comments import AdminComment
from opskit_api.resources.admin.essays import AdminNote
from opskit_api.resources.admin.users import AdminUser
from opskit... | 32.091837 | 70 | 0.814626 |
794102e863916b180ae3fe80c836f5ca09b15cc8 | 7,955 | py | Python | MILNet.py | dafeigediaozhatian/MILNet | d60c894952f9b153051ccc8397608a06b6661d2b | [
"MIT"
] | null | null | null | MILNet.py | dafeigediaozhatian/MILNet | d60c894952f9b153051ccc8397608a06b6661d2b | [
"MIT"
] | null | null | null | MILNet.py | dafeigediaozhatian/MILNet | d60c894952f9b153051ccc8397608a06b6661d2b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import numpy as np
import torch
import torch.optim as optim
from tensorboardX import SummaryWriter
from scipy import stats
from tqdm import tqdm
from config_aesthetic import get_args
from utils.filter_nan import filter_nan
from data.gcn_dataloader_6144 import AVADataset
from model.s... | 38.616505 | 150 | 0.581772 |
7941032c95c73d92ed8d763da6bc0a0439a4e989 | 2,136 | py | Python | opensfm/synthetic_data/synthetic_examples.py | chengchunhsu/OpenSfM | 9abc20707c55a2e3cdfe9212bc2155a98b0e6979 | [
"BSD-2-Clause"
] | 1 | 2019-05-31T13:50:41.000Z | 2019-05-31T13:50:41.000Z | opensfm/synthetic_data/synthetic_examples.py | Pandinosaurus/OpenSfM | b892ba9fd5e7fd6c7a9e3c81edddca80f71c1cd5 | [
"BSD-2-Clause"
] | null | null | null | opensfm/synthetic_data/synthetic_examples.py | Pandinosaurus/OpenSfM | b892ba9fd5e7fd6c7a9e3c81edddca80f71c1cd5 | [
"BSD-2-Clause"
] | 2 | 2017-03-31T16:54:34.000Z | 2018-07-10T11:32:22.000Z | import opensfm.synthetic_data.synthetic_scene as ss
def synthetic_circle_scene():
scene_length = 60
points_count = 5000
generator = ss.get_scene_generator("circle", scene_length)
scene = ss.SyntheticStreetScene(generator)
scene.add_street(points_count, 7, 7).perturb_floor([0, 0, 0.1]).perturb_wall... | 27.384615 | 84 | 0.612828 |
7941033c88397f8adf0c96551952397941d27dd0 | 495 | py | Python | registration/forms.py | timgates42/timestrap | 744ebcb0cd5fc536245c18058236169f4f36cb8b | [
"BSD-2-Clause"
] | 1,758 | 2017-04-21T08:42:59.000Z | 2022-03-09T22:58:53.000Z | registration/forms.py | timgates42/timestrap | 744ebcb0cd5fc536245c18058236169f4f36cb8b | [
"BSD-2-Clause"
] | 172 | 2017-04-23T21:30:03.000Z | 2022-02-10T20:10:06.000Z | registration/forms.py | timgates42/timestrap | 744ebcb0cd5fc536245c18058236169f4f36cb8b | [
"BSD-2-Clause"
] | 138 | 2017-04-23T23:02:16.000Z | 2022-03-25T04:44:19.000Z | from django.contrib.auth.forms import PasswordResetForm
from conf.models import Site
from conf.utils import current_site_id
class TimestrapPasswordResetForm(PasswordResetForm):
"""
Override the 'domain' and 'site_name' email context variables to use the
current site.
"""
def save(self, **kwargs)... | 29.117647 | 87 | 0.705051 |
7941036d06df89f660ec226878684a48428decd4 | 7,216 | py | Python | tools/fix_power_pin.py | tgingold/opentdc | d74fe70a1295ae3808f7abd98d84bf488ac16bb5 | [
"Apache-2.0"
] | 10 | 2020-12-03T02:41:23.000Z | 2022-02-21T06:12:42.000Z | tools/fix_power_pin.py | tgingold/opentdc | d74fe70a1295ae3808f7abd98d84bf488ac16bb5 | [
"Apache-2.0"
] | 1 | 2020-11-30T01:35:09.000Z | 2020-11-30T19:15:56.000Z | tools/fix_power_pin.py | tgingold/OpenTDC | d74fe70a1295ae3808f7abd98d84bf488ac16bb5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# SPDX-FileCopyrightText: (c) 2020 Tristan Gingold <tgingold@free.fr>
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# h... | 33.719626 | 79 | 0.467988 |
7941051ad31bf58f109a23e6821908ddba692cfb | 1,259 | py | Python | networkx/tests/test.py | rakschahsa/networkx | 6cac55b1064c3c346665f9281680fa3b66442ad0 | [
"BSD-3-Clause"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | networkx/tests/test.py | rakschahsa/networkx | 6cac55b1064c3c346665f9281680fa3b66442ad0 | [
"BSD-3-Clause"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | networkx/tests/test.py | rakschahsa/networkx | 6cac55b1064c3c346665f9281680fa3b66442ad0 | [
"BSD-3-Clause"
] | 136 | 2018-01-09T22:52:06.000Z | 2022-02-24T13:26:18.000Z | #!/usr/bin/env python
import sys
from os import path, getcwd
def run(verbosity=1, doctest=False, numpy=True):
"""Run NetworkX tests.
Parameters
----------
verbosity: integer, optional
Level of detail in test reports. Higher numbers provide more detail.
doctest: bool, optional
True t... | 27.369565 | 75 | 0.618745 |
7941053e9d16d82568cfd93244a400f48a8eff01 | 2,301 | py | Python | ml_service/pipelines/sales_forecast_verify_train_pipeline.py | owaiskhalid21/mlops-sales-forecasting | ae092f125d0b970f892b361ad4ced3a8dd9b3b3b | [
"MIT"
] | null | null | null | ml_service/pipelines/sales_forecast_verify_train_pipeline.py | owaiskhalid21/mlops-sales-forecasting | ae092f125d0b970f892b361ad4ced3a8dd9b3b3b | [
"MIT"
] | null | null | null | ml_service/pipelines/sales_forecast_verify_train_pipeline.py | owaiskhalid21/mlops-sales-forecasting | ae092f125d0b970f892b361ad4ced3a8dd9b3b3b | [
"MIT"
] | null | null | null | import argparse
import sys
import os
from azureml.core import Run, Experiment, Workspace
from ml_service.util.env_variables import Env
from sales_forecast.util.model_helper import get_latest_model
def main():
run = Run.get_context()
if (run.id.startswith('OfflineRun')):
from dotenv import load_doten... | 30.276316 | 73 | 0.637983 |
794105540e33b7369b987008ead7504c528a23d8 | 145 | py | Python | Task1/chapter50.py | shkhaider2015/AI_Lab_Task | 642a0d5e30515dac6972da194741b829cdc63f30 | [
"Unlicense"
] | null | null | null | Task1/chapter50.py | shkhaider2015/AI_Lab_Task | 642a0d5e30515dac6972da194741b829cdc63f30 | [
"Unlicense"
] | null | null | null | Task1/chapter50.py | shkhaider2015/AI_Lab_Task | 642a0d5e30515dac6972da194741b829cdc63f30 | [
"Unlicense"
] | null | null | null | def fun():
def extra():
print("Hello ")
def extra1():
print("Shakeel")
fun1 = extra()
fun2 = extra1()
fun()
| 14.5 | 24 | 0.462069 |
794105ed0f307a1fd1cfacbb9cb65cac1264d3f0 | 799 | py | Python | Lib/corpuscrawler/crawl_lcm.py | cash/corpuscrawler | 8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d | [
"Apache-2.0"
] | 95 | 2019-06-13T23:34:21.000Z | 2022-03-12T05:22:49.000Z | Lib/corpuscrawler/crawl_lcm.py | sahwar/corpuscrawler | 8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d | [
"Apache-2.0"
] | 31 | 2019-06-02T18:56:53.000Z | 2021-08-10T20:16:02.000Z | Lib/corpuscrawler/crawl_lcm.py | sahwar/corpuscrawler | 8913fe1fb2b6bfdfbf2ba01d2ce88057b3b5ba3d | [
"Apache-2.0"
] | 35 | 2019-06-18T08:26:24.000Z | 2022-01-11T13:59:40.000Z | # coding: utf-8
# Copyright 2017 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 agreed... | 34.73913 | 74 | 0.764706 |
794107259dd9c8aafcbbfa1b66ccc60c753120ff | 476 | py | Python | tests/plan/factories.py | hmpf/easydmp | 650b241fedd839635335c1044f2d695f9c076e4c | [
"MIT"
] | 5 | 2018-09-25T15:48:39.000Z | 2020-06-04T11:56:36.000Z | tests/plan/factories.py | hmpf/easydmp | 650b241fedd839635335c1044f2d695f9c076e4c | [
"MIT"
] | 233 | 2018-01-10T17:28:41.000Z | 2022-03-30T09:38:03.000Z | tests/plan/factories.py | hmpf/easydmp | 650b241fedd839635335c1044f2d695f9c076e4c | [
"MIT"
] | 2 | 2019-02-07T10:34:09.000Z | 2019-03-12T07:25:09.000Z | import factory
from easydmp.plan.models import Plan
from tests.auth.factories import UserFactory
from tests.dmpt.factories import TemplateFactory
__all__ = [
'PlanFactory',
]
class PlanFactory(factory.django.DjangoModelFactory):
class Meta:
model = Plan
template = factory.SubFactory(Template... | 20.695652 | 53 | 0.752101 |
794108acb4c0758ccd6f9972c9a950b8a44d1134 | 5,285 | py | Python | pykeigan/utils.py | keigan-motor/pykeigan_motor | 884c742e38d07a057be62a5f58c2ea1a6f4d30a9 | [
"MIT"
] | 10 | 2018-01-24T00:28:22.000Z | 2022-03-30T04:20:57.000Z | pykeigan/utils.py | keigan-motor/pykeigan_motor | 884c742e38d07a057be62a5f58c2ea1a6f4d30a9 | [
"MIT"
] | 8 | 2018-03-12T06:09:56.000Z | 2022-03-01T03:58:30.000Z | pykeigan/utils.py | keigan-motor/pykeigan_motor | 884c742e38d07a057be62a5f58c2ea1a6f4d30a9 | [
"MIT"
] | 10 | 2018-03-06T04:54:34.000Z | 2021-10-04T04:53:40.000Z | # -*- coding: utf-8 -*-
import struct
def float2bytes(float_value):
float_value=float(float_value)
return struct.pack("!f", float_value)
def bytes2float(byte_array):
return struct.unpack('!f',byte_array)[0]
def uint8_t2bytes(uint8_value):
uint8_value=int(uint8_value)
if uint8_value<0:
ra... | 40.037879 | 81 | 0.635951 |
794108eab634b2e9281158fd4c913c43dec2a8cc | 9,109 | py | Python | melodic/lib/python2.7/dist-packages/geometry_msgs/msg/_PoseWithCovarianceStamped.py | Dieptranivsr/Ros_Diep | d790e75e6f5da916701b11a2fdf3e03b6a47086b | [
"MIT"
] | 1 | 2021-11-08T12:24:24.000Z | 2021-11-08T12:24:24.000Z | devel/lib/python3/dist-packages/geometry_msgs/msg/_PoseWithCovarianceStamped.py | hyu-nani/ydlidar_ws | 56316db999c057c4315a20ba8277826d6a043120 | [
"MIT"
] | 1 | 2021-07-08T10:26:06.000Z | 2021-07-08T10:31:11.000Z | devel/lib/python3/dist-packages/geometry_msgs/msg/_PoseWithCovarianceStamped.py | hyu-nani/ydlidar_ws | 56316db999c057c4315a20ba8277826d6a043120 | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from geometry_msgs/PoseWithCovarianceStamped.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import geometry_msgs.msg
import std_msgs.msg
class PoseWithCova... | 37.640496 | 236 | 0.654518 |
794109c5303f9b6fa5b315f054ffd4cbeba7df17 | 1,477 | py | Python | requests/config.py | jasenguyen/requests | 6d25fff3f93eb89a87742bf3be24fa87724fe550 | [
"0BSD"
] | 1 | 2016-08-29T01:49:37.000Z | 2016-08-29T01:49:37.000Z | requests/config.py | jasenguyen/requests | 6d25fff3f93eb89a87742bf3be24fa87724fe550 | [
"0BSD"
] | null | null | null | requests/config.py | jasenguyen/requests | 6d25fff3f93eb89a87742bf3be24fa87724fe550 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""
requests.config
~~~~~~~~~~~~~~~
This module provides the Requests settings feature set.
"""
class Settings(object):
_singleton = {}
# attributes with defaults
__attrs__ = []
def __init__(self, **kwargs):
super(Settings, self).__init__()
self.__dict__ = ... | 21.405797 | 61 | 0.634394 |
79410a4d390e09895e329b13158cafc4c2798228 | 799 | py | Python | mcelfish/plot_beta.py | pgdr/mcelfish | 55c736f8425d0ab425dab999094ada4bafb9ca54 | [
"MIT"
] | null | null | null | mcelfish/plot_beta.py | pgdr/mcelfish | 55c736f8425d0ab425dab999094ada4bafb9ca54 | [
"MIT"
] | null | null | null | mcelfish/plot_beta.py | pgdr/mcelfish | 55c736f8425d0ab425dab999094ada4bafb9ca54 | [
"MIT"
] | null | null | null | from scipy.stats import beta
import matplotlib.pyplot as plt
import numpy as np
import sys
def _gen(alpha_, beta_, loc_=0, scale_=1):
return np.linspace(
beta.ppf(0.01, alpha_, beta_, loc_, scale_),
beta.ppf(0.99, alpha_, beta_, loc_, scale_),
100,
)
def _plot(x, alpha_, beta_, loc_=... | 22.194444 | 76 | 0.566959 |
79410a717098bceac4de42241287d8cecde8a1e1 | 567 | py | Python | delft3dfmpy/__init__.py | SiebeBosch/delft3dfmpy | 562c00dd05c0137b588fdd0f281018beaa0b9775 | [
"MIT"
] | null | null | null | delft3dfmpy/__init__.py | SiebeBosch/delft3dfmpy | 562c00dd05c0137b588fdd0f281018beaa0b9775 | [
"MIT"
] | null | null | null | delft3dfmpy/__init__.py | SiebeBosch/delft3dfmpy | 562c00dd05c0137b588fdd0f281018beaa0b9775 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for delft3dfmpy."""
__author__ = """Guus Rongen"""
__email__ = 'rongen@hkv.nl'
__version__ = '1.1.3'
from delft3dfmpy.core.dfm import DFlowFMModel
from delft3dfmpy.core.drr import DFlowRRModel
from delft3dfmpy.core.mesh2d import Rectangular
from delft3dfmpy.datamodels.hyd... | 29.842105 | 54 | 0.809524 |
79410c2081b8709cff2133d2c5555bf51d4a4f96 | 39,169 | py | Python | scripts/install-unity.py | schneems/OpenMined | f8d6433c51e9838e2eef4d7f4935508b8f0bf789 | [
"Apache-2.0"
] | null | null | null | scripts/install-unity.py | schneems/OpenMined | f8d6433c51e9838e2eef4d7f4935508b8f0bf789 | [
"Apache-2.0"
] | null | null | null | scripts/install-unity.py | schneems/OpenMined | f8d6433c51e9838e2eef4d7f4935508b8f0bf789 | [
"Apache-2.0"
] | 1 | 2020-05-27T10:09:17.000Z | 2020-05-27T10:09:17.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2015 Adrian Stutz
#
# 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 wit... | 36.882298 | 147 | 0.614261 |
79410c670e8c2dd4f4730735723d12c8cc9ce4ca | 927 | py | Python | test/test_template_registration.py | cons3rt/cons3rt-python-sdk | f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0 | [
"RSA-MD"
] | null | null | null | test/test_template_registration.py | cons3rt/cons3rt-python-sdk | f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0 | [
"RSA-MD"
] | null | null | null | test/test_template_registration.py | cons3rt/cons3rt-python-sdk | f0bcb295735ac55bbe47448fcbd95d2c7beb3ec0 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
CONS3RT Web API
A CONS3RT ReSTful API # noqa: E501
The version of the OpenAPI document: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import openapi_client
from openapi_client.mode... | 22.609756 | 98 | 0.717368 |
79410e2c6369500a0ffe3b8c2e0cbc351890d3de | 142 | py | Python | scripts/save_next_appointment.py | rugo/sac_client | 64b4a2bb1c2fadbc28facac3149e8d5cc097ba63 | [
"Apache-2.0"
] | null | null | null | scripts/save_next_appointment.py | rugo/sac_client | 64b4a2bb1c2fadbc28facac3149e8d5cc097ba63 | [
"Apache-2.0"
] | null | null | null | scripts/save_next_appointment.py | rugo/sac_client | 64b4a2bb1c2fadbc28facac3149e8d5cc097ba63 | [
"Apache-2.0"
] | null | null | null | #!/opt/sac/bin/python
from sac import util
from sac import config
util.save_appointment_to_file(config.APP_CACHE_PATH, config.APP_ERROR_PATH) | 28.4 | 75 | 0.838028 |
79410ef988f942089b54e4f650293b82fb47a886 | 120,069 | py | Python | resources.py | jurjendejong/QGIS3_Delft3D_FM | 058f1ab20974fb0a36e61fe5942e131917d612c7 | [
"MIT"
] | 1 | 2019-10-21T07:42:49.000Z | 2019-10-21T07:42:49.000Z | resources.py | jurjendejong/QGIS3_Delft3D_FM | 058f1ab20974fb0a36e61fe5942e131917d612c7 | [
"MIT"
] | 1 | 2021-09-20T08:42:56.000Z | 2021-09-20T08:42:56.000Z | resources.py | jurjendejong/QGIS3_Delft3D_FM | 058f1ab20974fb0a36e61fe5942e131917d612c7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.13.1)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x18\x0d\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x02\x00\x... | 63.832536 | 129 | 0.726932 |
79411204668a1c4adf3b7510f8801b4afc42c25a | 525 | py | Python | NFC_Reader/quick2wire/syscall.py | lleon95/NFC_Points_Service | 1d59fe23ff5d2e9ee635dfbcbe874e801bc8b336 | [
"MIT"
] | 46 | 2016-04-18T07:51:58.000Z | 2021-12-01T14:12:27.000Z | quick2wire/syscall.py | ilumitr/py532lib | 09afdb3b5a0f560c3ddeb1659c02dfbfdb8547ce | [
"BSD-2-Clause"
] | 4 | 2020-05-25T15:39:35.000Z | 2022-01-22T14:16:54.000Z | quick2wire/syscall.py | ilumitr/py532lib | 09afdb3b5a0f560c3ddeb1659c02dfbfdb8547ce | [
"BSD-2-Clause"
] | 36 | 2015-02-12T20:27:19.000Z | 2022-01-18T06:34:44.000Z |
import os
import errno
import ctypes
libc = ctypes.CDLL(None, use_errno=True)
def errcheck(result, func, args):
if result < 0:
e = ctypes.get_errno()
raise OSError(e, errno.strerror(e))
return result
def lookup(restype, name, argtypes):
f = libc[name]
f.restye = restype
f.argtype... | 16.935484 | 43 | 0.626667 |
7941125416c75c62bdf713a8e9398c152091e03e | 26,917 | py | Python | test/functional/interface_zmq.py | blinkhash/blinkhash-core | e05662019c2fa4cb2dc3736f38e48492712c23b1 | [
"MIT"
] | 3 | 2021-07-27T16:59:47.000Z | 2021-12-31T20:55:46.000Z | test/functional/interface_zmq.py | blinkhash/blinkhash-core | e05662019c2fa4cb2dc3736f38e48492712c23b1 | [
"MIT"
] | null | null | null | test/functional/interface_zmq.py | blinkhash/blinkhash-core | e05662019c2fa4cb2dc3736f38e48492712c23b1 | [
"MIT"
] | 1 | 2021-12-31T12:58:23.000Z | 2021-12-31T12:58:23.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2021 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 the ZMQ notification interface."""
import struct
from test_framework.address import (
ADDRESS... | 45.699491 | 149 | 0.631014 |
79411254cf95f489ad64e96f5ea40f5580e75b05 | 943 | py | Python | ExerciciosPYTHON/PythonCeV/modulos/moeda.py | Samuel-Melo890/Python-Desafios | 2abc7734d6a6c1f5ab67421f792d6889d93bac94 | [
"MIT"
] | null | null | null | ExerciciosPYTHON/PythonCeV/modulos/moeda.py | Samuel-Melo890/Python-Desafios | 2abc7734d6a6c1f5ab67421f792d6889d93bac94 | [
"MIT"
] | 2 | 2022-03-18T16:06:07.000Z | 2022-03-18T16:55:29.000Z | ExerciciosPYTHON/PythonCeV/modulos/moeda.py | Samuel-Melo890/Python-Desafios | 2abc7734d6a6c1f5ab67421f792d6889d93bac94 | [
"MIT"
] | null | null | null | def aumentar(p=0, t=0, c=False):
t = t / 100
res = p * (1 + t)
if c:
return moeda(res)
else:
return res
def diminuir(p=0, t=0, c=False):
t = t / 100
res = p * (1 - t)
if c:
return moeda(res)
else:
return res
def dobro(p=0, c=False):
res = p * 2
... | 19.645833 | 59 | 0.497349 |
794112d5c20ea5b72fd9018417ada65ef2ab8938 | 108,972 | py | Python | model.py | phoebsc/mask_ild | 2a960b33a3952a39edcb30b44a3e6ea27157fedb | [
"MIT"
] | null | null | null | model.py | phoebsc/mask_ild | 2a960b33a3952a39edcb30b44a3e6ea27157fedb | [
"MIT"
] | null | null | null | model.py | phoebsc/mask_ild | 2a960b33a3952a39edcb30b44a3e6ea27157fedb | [
"MIT"
] | null | null | null | """
Mask R-CNN
The main Mask R-CNN model implemenetation.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import os
import sys
import glob
import random
import math
import datetime
import itertools
import json
import re
import logging
from col... | 43.311606 | 115 | 0.603504 |
794113342d82ccd328c78cb773b16d666a06e7d7 | 2,459 | py | Python | PythonAPI/agents/navigation/roaming_agent.py | magh24/carla_RL_IAs | a38fb353bd84330c6c20b9cc8e824d7bbb02cfe5 | [
"MIT"
] | 39 | 2020-03-17T10:12:49.000Z | 2022-03-12T14:18:45.000Z | PythonAPI/agents/navigation/roaming_agent.py | marintoro/LearningByCheating | a13b331ee8d69071570c97b35f1348758d658ee5 | [
"MIT"
] | null | null | null | PythonAPI/agents/navigation/roaming_agent.py | marintoro/LearningByCheating | a13b331ee8d69071570c97b35f1348758d658ee5 | [
"MIT"
] | 16 | 2020-06-11T20:15:57.000Z | 2022-03-13T01:55:16.000Z | #!/usr/bin/env python
# Copyright (c) 2018 Intel Labs.
# authors: German Ros (german.ros@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
""" This module implements an agent that roams around a track following
random waypoints and avoidi... | 31.935065 | 78 | 0.652704 |
7941145524ea474c54af1a798e242b8a96919315 | 2,097 | py | Python | Main.py | ChinaKevinLi/Leaving-Lock | 9a57f2cca5c294fd413ca1306676731579723cfb | [
"Apache-2.0"
] | 5 | 2020-01-20T15:51:06.000Z | 2020-01-21T09:55:43.000Z | Main.py | cy333/Leaving-Lock | 9a57f2cca5c294fd413ca1306676731579723cfb | [
"Apache-2.0"
] | null | null | null | Main.py | cy333/Leaving-Lock | 9a57f2cca5c294fd413ca1306676731579723cfb | [
"Apache-2.0"
] | 1 | 2020-01-21T06:12:52.000Z | 2020-01-21T06:12:52.000Z | import face_recognition
import cv2
import numpy as np
import os
import time
end_time = 0
video_capture = cv2.VideoCapture(0)
known_face_encodings = [
]
user_path = "./users/"
user_name = "Owner"
saved_encodings = os.listdir(user_path + user_name + "/")
for file in saved_encodings:
file = user_p... | 30.838235 | 93 | 0.618503 |
79411854c09b9c43283264b3341d7643c4673988 | 35,586 | py | Python | atoMEC/postprocess/conductivity.py | timcallow/atoMEC | 8c945caf6afcfffbeebe4356edd3c968eb7833dc | [
"BSD-3-Clause"
] | null | null | null | atoMEC/postprocess/conductivity.py | timcallow/atoMEC | 8c945caf6afcfffbeebe4356edd3c968eb7833dc | [
"BSD-3-Clause"
] | null | null | null | atoMEC/postprocess/conductivity.py | timcallow/atoMEC | 8c945caf6afcfffbeebe4356edd3c968eb7833dc | [
"BSD-3-Clause"
] | null | null | null | """
The conductivity module handles routines used to model the electrical conductivity.
So far just the Kubo-Greenwood method is implemented.
Classes
-------
* :class:`KuboGreenwood` : Holds various routines needed to compute the Kubo-Greenwood \
conducivity, including its various component... | 32.767956 | 91 | 0.552268 |
7941186b6329ee619ffa553b68ea6005c5082a73 | 1,244 | py | Python | test.py | jannctu/TIN | bb1a49a16e4f206b114aa3abf3dda3726a8a6b45 | [
"MIT"
] | 35 | 2020-05-23T09:20:52.000Z | 2022-03-25T02:09:04.000Z | test.py | jannctu/TIN | bb1a49a16e4f206b114aa3abf3dda3726a8a6b45 | [
"MIT"
] | 7 | 2020-05-29T08:41:51.000Z | 2021-05-28T08:24:55.000Z | test.py | jannctu/TIN | bb1a49a16e4f206b114aa3abf3dda3726a8a6b45 | [
"MIT"
] | 11 | 2020-05-29T06:57:38.000Z | 2022-03-06T08:11:59.000Z | import torch
from model import TIN
import os
from os.path import join
import numpy as np
from PIL import Image
import scipy.io as io
import cv2
import time
test_img = 'img/mri_brain.jpg'
## READ IMAGE
im = np.array(cv2.imread(test_img), dtype=np.float32)
## Multiscale
scales = [0.5,1.0,1.5]
images = []
for scl in scal... | 24.88 | 84 | 0.659164 |
7941186f68e1801a850754ef50254b529df91fbd | 1,279 | py | Python | youtv/utils/random_data.py | tomejorge/SeleniumBase | e3e50bbd80594c52131b0d88ca3e2c2f7692e340 | [
"MIT"
] | null | null | null | youtv/utils/random_data.py | tomejorge/SeleniumBase | e3e50bbd80594c52131b0d88ca3e2c2f7692e340 | [
"MIT"
] | null | null | null | youtv/utils/random_data.py | tomejorge/SeleniumBase | e3e50bbd80594c52131b0d88ca3e2c2f7692e340 | [
"MIT"
] | null | null | null | import random
import string
def letters_lower_case(length=5, chars=string.ascii_lowercase):
return ''.join(random.choice(chars) for i in range(length))
def random_lower_string_with_numbers(length):
return ''.join(random.choice(string.ascii_lowercase + string.digits) for i in range(length))
def letters_upp... | 31.195122 | 117 | 0.724003 |
7941189f2dcd54afa035720814d2d2bcb6069229 | 2,919 | py | Python | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_metadata_activity.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_metadata_activity.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/get_metadata_activity.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 42.926471 | 94 | 0.643714 |
794118a571e90ba74c7040c331046ba9013e7609 | 680 | py | Python | sa/migrations/0143_managed_object_profile_report_attempts.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | sa/migrations/0143_managed_object_profile_report_attempts.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | sa/migrations/0143_managed_object_profile_report_attempts.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# managedobjectprofile report_ping_attempts
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ------------------------------------------------------------... | 30.909091 | 72 | 0.476471 |
794118ccf0e6ddae74a2941442b8f828952047e3 | 5,770 | py | Python | tests/model/test_base_component.py | taiga4112/pDESy | ff2a77a3f7ad1714960dfabfcb977279a0b53d09 | [
"MIT"
] | null | null | null | tests/model/test_base_component.py | taiga4112/pDESy | ff2a77a3f7ad1714960dfabfcb977279a0b53d09 | [
"MIT"
] | 2 | 2020-09-20T10:23:28.000Z | 2020-09-23T02:34:13.000Z | tests/model/test_base_component.py | taiga4112/pDESy | ff2a77a3f7ad1714960dfabfcb977279a0b53d09 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from pDESy.model.base_component import BaseComponent
from pDESy.model.base_task import BaseTask, BaseTaskState
from pDESy.model.base_factory import BaseFactory
import datetime
def test_init():
c1 = BaseComponent("c1")
assert c1.name == "c1"
assert len(c1.ID) > 0... | 28.009709 | 79 | 0.654766 |
79411919189c8dfdd78707a956f145c2a62b2e0c | 3,352 | py | Python | cleff/profiles/urls.py | lancekrogers/music-network | e8b21f3f1bbeb1ee46fb41c2b25f3b3e26e97097 | [
"Apache-2.0"
] | null | null | null | cleff/profiles/urls.py | lancekrogers/music-network | e8b21f3f1bbeb1ee46fb41c2b25f3b3e26e97097 | [
"Apache-2.0"
] | null | null | null | cleff/profiles/urls.py | lancekrogers/music-network | e8b21f3f1bbeb1ee46fb41c2b25f3b3e26e97097 | [
"Apache-2.0"
] | 1 | 2015-08-12T20:51:04.000Z | 2015-08-12T20:51:04.000Z | from django.conf.urls import include, url
from django.contrib.auth.views import login, logout
from django.http import Http404
from .views import musician_registration, non_musician_registration, choose, musician_profile, \
non_musician_profile, update_musician_profile, musician_add_time_frame, musician_update_time_... | 34.556701 | 115 | 0.663783 |
79411924d4ef7a9cb7ca61d98db9018f3ea695ec | 1,054 | py | Python | kubernetes/test/test_v1_persistent_volume_claim_list.py | Scalr/kubernetes-client-python | 07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38 | [
"Apache-2.0"
] | 3 | 2019-05-19T05:05:37.000Z | 2020-03-20T04:56:20.000Z | kubernetes/test/test_v1_persistent_volume_claim_list.py | Scalr/kubernetes-client-python | 07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_persistent_volume_claim_list.py | Scalr/kubernetes-client-python | 07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 23.422222 | 105 | 0.734345 |
79411963c55e8016bb5d9e7440580663617c8785 | 5,493 | py | Python | hw/ip/otbn/dv/otbnsim/test/stats_test.py | vsukhoml/opentitan | bb0bd16b3eca0ef2dd4144b5df49b8663c59101f | [
"Apache-2.0"
] | 1 | 2020-05-11T05:18:20.000Z | 2020-05-11T05:18:20.000Z | hw/ip/otbn/dv/otbnsim/test/stats_test.py | vsukhoml/opentitan | bb0bd16b3eca0ef2dd4144b5df49b8663c59101f | [
"Apache-2.0"
] | 1 | 2022-02-15T22:20:51.000Z | 2022-02-15T22:20:51.000Z | hw/ip/otbn/dv/otbnsim/test/stats_test.py | vsukhoml/opentitan | bb0bd16b3eca0ef2dd4144b5df49b8663c59101f | [
"Apache-2.0"
] | 1 | 2021-12-04T06:08:11.000Z | 2021-12-04T06:08:11.000Z | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import py
import os
from sim.sim import OTBNSim
from sim.stats import ExecutionStats
import testutil
def _run_sim_for_stats(sim: OTBNSim) -> ExecutionStats:
sim.run(... | 30.859551 | 81 | 0.636264 |
79411965511090477d1ffd366bcf57553a64b2b7 | 1,625 | py | Python | ermaket/api/system/hierarchy_manager.py | SqrtMinusOne/ERMaket_Experiment | c4a7b61651edd15a619d9b690e2aaeaab4de282d | [
"Apache-2.0"
] | null | null | null | ermaket/api/system/hierarchy_manager.py | SqrtMinusOne/ERMaket_Experiment | c4a7b61651edd15a619d9b690e2aaeaab4de282d | [
"Apache-2.0"
] | null | null | null | ermaket/api/system/hierarchy_manager.py | SqrtMinusOne/ERMaket_Experiment | c4a7b61651edd15a619d9b690e2aaeaab4de282d | [
"Apache-2.0"
] | null | null | null | import atexit
import logging
import os
from ermaket.api.config import Config
from ermaket.api.system.hierarchy import Hierachy
from ermaket.utils import Singleton
__all__ = ['HierachyManager']
_hierarchy = None
class HierachyManager(metaclass=Singleton):
def __init__(self, reload=False, save=True, path=None):
... | 26.639344 | 74 | 0.576615 |
79411af7e97cff105b96ea41c2581aeaf7bc651b | 15,666 | py | Python | lib/sqlalchemy/testing/assertions.py | Thhhza/sqlalchemy | f2b267043e17b2b769dc2a5b8139f6be2a3d4e84 | [
"MIT"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | lib/sqlalchemy/testing/assertions.py | Thhhza/sqlalchemy | f2b267043e17b2b769dc2a5b8139f6be2a3d4e84 | [
"MIT"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | lib/sqlalchemy/testing/assertions.py | Thhhza/sqlalchemy | f2b267043e17b2b769dc2a5b8139f6be2a3d4e84 | [
"MIT"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # testing/assertions.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from __future__ import absolute_import
from . import util as testutil
from sq... | 34.506608 | 78 | 0.588217 |
79411b7e3a0100048f0c9d786f2e9b11509cf93e | 18,321 | py | Python | calendarapp/accounts/migrations/0007_auto_20201117_1616.py | rozumalex/calendar | ef58c4b221845a32cb4398f2838b94f03cd25d1e | [
"MIT"
] | null | null | null | calendarapp/accounts/migrations/0007_auto_20201117_1616.py | rozumalex/calendar | ef58c4b221845a32cb4398f2838b94f03cd25d1e | [
"MIT"
] | null | null | null | calendarapp/accounts/migrations/0007_auto_20201117_1616.py | rozumalex/calendar | ef58c4b221845a32cb4398f2838b94f03cd25d1e | [
"MIT"
] | 1 | 2021-05-22T21:29:40.000Z | 2021-05-22T21:29:40.000Z | # Generated by Django 3.1.3 on 2020-11-17 16:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0006_auto_20201117_0819'),
]
operations = [
migrations.AlterField(
model_name='user',
name='timezone',
... | 964.263158 | 17,984 | 0.699853 |
79411bd05d6ab83862becdc9e029de46302ef4ab | 1,883 | py | Python | Crawler/canadagames_schedule/schedule.py | AlbatrossBill/COSC4P02Project | c48682c014ab9de4847d46cffc710d386db93c0f | [
"MIT"
] | 4 | 2022-01-15T22:04:06.000Z | 2022-01-24T01:46:46.000Z | Crawler/canadagames_schedule/schedule.py | AlbatrossBill/COSC4P02Project | c48682c014ab9de4847d46cffc710d386db93c0f | [
"MIT"
] | null | null | null | Crawler/canadagames_schedule/schedule.py | AlbatrossBill/COSC4P02Project | c48682c014ab9de4847d46cffc710d386db93c0f | [
"MIT"
] | 1 | 2022-01-24T01:31:57.000Z | 2022-01-24T01:31:57.000Z | import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
from bs4 import BeautifulSoup
import json
import codecs
import os
import sys
import json
from datetime import datetime
import base64
# Config
api_url = "https://cg2... | 27.289855 | 229 | 0.690919 |
79411c84970652816635737bfdfff38c3ce9ed71 | 1,128 | py | Python | xlsxwriter/test/comparison/test_header_image15.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-07-01T07:24:37.000Z | 2020-07-01T07:24:37.000Z | xlsxwriter/test/comparison/test_header_image15.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_header_image15.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 29.684211 | 91 | 0.606383 |
79411d9576cb624b264f8bf245c3900665df5faf | 1,118 | py | Python | car/servers/imu_server_2.py | mwmajew/Tonic | f09b9f95ac5281e9299638e4bd513d31ef703bc9 | [
"MIT"
] | 91 | 2019-03-21T22:27:34.000Z | 2022-02-17T09:19:09.000Z | car/servers/imu_server_2.py | mwmajew/Tonic | f09b9f95ac5281e9299638e4bd513d31ef703bc9 | [
"MIT"
] | 19 | 2018-11-30T16:53:15.000Z | 2021-01-04T20:32:51.000Z | car/servers/imu_server_2.py | mwmajew/Tonic | f09b9f95ac5281e9299638e4bd513d31ef703bc9 | [
"MIT"
] | 11 | 2019-07-02T13:07:43.000Z | 2021-12-17T04:43:00.000Z | 1#!/usr/bin/env python
''' Async TCP server to make first tests of newly received GPS trackers '''
import asyncore
import socket
import logging
import json
from server_management import BaseServer, BaseClientHandler
from imu_interceptor import ImuEuler
class ImuClientHandler(BaseClientHandler):
def __in... | 24.844444 | 90 | 0.684258 |
79411dfcac9dbbcb441fe0c77648bc714582535a | 1,638 | py | Python | test/base/workflows_format_2/main.py | emily101-gif/immport-galaxy | 8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c | [
"CC-BY-3.0"
] | 1 | 2020-01-06T21:04:22.000Z | 2020-01-06T21:04:22.000Z | test/base/workflows_format_2/main.py | emily101-gif/immport-galaxy | 8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c | [
"CC-BY-3.0"
] | 7 | 2019-04-26T12:29:58.000Z | 2022-03-02T04:33:12.000Z | test/base/workflows_format_2/main.py | emily101-gif/immport-galaxy | 8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c | [
"CC-BY-3.0"
] | 7 | 2016-11-03T19:11:01.000Z | 2020-05-11T14:23:52.000Z | """Module containing :func:`convert_and_import_workflow`."""
import os
import yaml
from .converter import python_to_workflow, yaml_to_workflow
from .interface import BioBlendImporterGalaxyInterface
def convert_and_import_workflow(has_workflow, **kwds):
"""Function is main entry for conversion and import of Form... | 33.428571 | 89 | 0.711844 |
79411e53298519e13262625917c9dc5d9c261af8 | 29 | py | Python | version.py | Darkunov/OoT-Randomizer | 23cef8939bd68c12b76bd6e39e07af9a2e6bd9e2 | [
"MIT"
] | null | null | null | version.py | Darkunov/OoT-Randomizer | 23cef8939bd68c12b76bd6e39e07af9a2e6bd9e2 | [
"MIT"
] | null | null | null | version.py | Darkunov/OoT-Randomizer | 23cef8939bd68c12b76bd6e39e07af9a2e6bd9e2 | [
"MIT"
] | null | null | null | __version__ = '5.2.12 f.LUM'
| 14.5 | 28 | 0.655172 |
79411e566da6f517535dfdc3b4fa57bc6706d1a8 | 5,670 | py | Python | launch/nav2_bringup_launch.py | skylerpan/nav2_step | 54f25ff640549234ab5eb33736c6267cfdddf3b4 | [
"Apache-2.0"
] | 1 | 2021-07-03T17:47:04.000Z | 2021-07-03T17:47:04.000Z | launch/nav2_bringup_launch.py | skylerpan/nav2_step | 54f25ff640549234ab5eb33736c6267cfdddf3b4 | [
"Apache-2.0"
] | null | null | null | launch/nav2_bringup_launch.py | skylerpan/nav2_step | 54f25ff640549234ab5eb33736c6267cfdddf3b4 | [
"Apache-2.0"
] | 1 | 2020-04-15T10:13:53.000Z | 2020-04-15T10:13:53.000Z | # Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 36.11465 | 96 | 0.724691 |
79411ecc58b5b561457ad79a93bc9a682a4ef59b | 1,670 | py | Python | Settings/set5-osm-model-variable-widths-depths/set5_w64_depth3_d1.py | previtus/MGR-Project-Code | 1126215059eb3f731dcf78ec24d9a480e73abce6 | [
"MIT"
] | null | null | null | Settings/set5-osm-model-variable-widths-depths/set5_w64_depth3_d1.py | previtus/MGR-Project-Code | 1126215059eb3f731dcf78ec24d9a480e73abce6 | [
"MIT"
] | null | null | null | Settings/set5-osm-model-variable-widths-depths/set5_w64_depth3_d1.py | previtus/MGR-Project-Code | 1126215059eb3f731dcf78ec24d9a480e73abce6 | [
"MIT"
] | null | null | null | def Setup(Settings, DefaultModel):
# set5-osm-model-variable-widths-depths/set5_w64_depth3_d1.py
Settings["experiment_name"] = "set5_w64_depth3_d1"
Settings["graph_histories"] = [] # ['all','together',[],[1,0],[0,0,0],[]]
n = 0
#d1 5556x_markable_640x640 SegmentsData_marked_R100_4... | 35.531915 | 95 | 0.671257 |
794120372331b4568c449dfd508089619021c8ec | 11,900 | py | Python | src/python/pants/backend/project_info/source_file_validator.py | thamenato/pants | bc4a8fb3f07f6145649f02b06a1e5599aa28b36c | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/project_info/source_file_validator.py | thamenato/pants | bc4a8fb3f07f6145649f02b06a1e5599aa28b36c | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/project_info/source_file_validator.py | thamenato/pants | bc4a8fb3f07f6145649f02b06a1e5599aa28b36c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import re
import textwrap
from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, Set, Tuple, cast
from pants.base.exiter import PANTS_FAILED_EXIT_CODE, PANT... | 35.522388 | 99 | 0.661176 |
7941209b8313fd0bf5c8cbc9bfdf9f50bfd98e85 | 4,692 | py | Python | test/integrationtests/voight_kampff/tools.py | assistent-cat/mycroft-core | 6f8bae6ba136c9dd66ca47aaadd75e214d006190 | [
"Apache-2.0"
] | 1 | 2021-01-25T01:06:23.000Z | 2021-01-25T01:06:23.000Z | test/integrationtests/voight_kampff/tools.py | assistent-cat/mycroft-core | 6f8bae6ba136c9dd66ca47aaadd75e214d006190 | [
"Apache-2.0"
] | null | null | null | test/integrationtests/voight_kampff/tools.py | assistent-cat/mycroft-core | 6f8bae6ba136c9dd66ca47aaadd75e214d006190 | [
"Apache-2.0"
] | 2 | 2020-09-28T01:38:34.000Z | 2020-12-03T03:14:32.000Z | # Copyright 2020 Mycroft AI 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 writin... | 34.5 | 77 | 0.639812 |
794121ef5de5814cb43a36c8f5e3c5b4aaae90cc | 2,749 | py | Python | study-drills/sdex33.py | dark-teal-coder/book-learn-python-the-hard-way | e63abddde8c29dcb1c24d8a98116a78b05be67eb | [
"MIT"
] | null | null | null | study-drills/sdex33.py | dark-teal-coder/book-learn-python-the-hard-way | e63abddde8c29dcb1c24d8a98116a78b05be67eb | [
"MIT"
] | null | null | null | study-drills/sdex33.py | dark-teal-coder/book-learn-python-the-hard-way | e63abddde8c29dcb1c24d8a98116a78b05be67eb | [
"MIT"
] | null | null | null | # Study Drills 33
# 1. Convert this while-loop to a function that you can call, and replace 6 in the test (i < 6) with a variable.
# 2. Use this function to rewrite the script to try different numbers.
# 3. Add another variable to the function arguments that you can pass in that lets you change the
# + 1 on line 8 so ... | 27.217822 | 112 | 0.650782 |
79412238168f44be8732d91cc8c6d8d669348edd | 2,955 | py | Python | python-packages/mne-python-0.10/mne/io/kit/constants.py | rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | ee45bee6f96cdb6d91184abc16f41bba1546c943 | [
"BSD-3-Clause"
] | 2 | 2017-08-13T14:09:32.000Z | 2018-07-16T23:39:00.000Z | python-packages/mne-python-0.10/mne/io/kit/constants.py | rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | ee45bee6f96cdb6d91184abc16f41bba1546c943 | [
"BSD-3-Clause"
] | null | null | null | python-packages/mne-python-0.10/mne/io/kit/constants.py | rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | ee45bee6f96cdb6d91184abc16f41bba1546c943 | [
"BSD-3-Clause"
] | 2 | 2018-04-02T06:45:11.000Z | 2018-07-16T23:39:02.000Z | """KIT constants"""
# Author: Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
from ..constants import Bunch
KIT = Bunch()
# byte values
KIT.SHORT = 2
KIT.INT = 4
KIT.DOUBLE = 8
KIT.STRING = 128
# pointer locations
KIT.AMPLIFIER_INFO = 112
KIT.BASIC_INFO = 16
KIT.CHAN_SENS = 80
KIT.RAW_OFFSET = 144... | 29.55 | 78 | 0.654822 |
7941226d6b559991bb5620aaf3133ac31e2672d2 | 4,478 | py | Python | oncopolicy/utils/learn.py | yala/Tempo | bf3e0e78d64869bb2079c582a4a35982f78386ad | [
"MIT"
] | 6 | 2022-01-15T11:57:19.000Z | 2022-02-13T21:15:22.000Z | oncopolicy/utils/learn.py | yala/Tempo | bf3e0e78d64869bb2079c582a4a35982f78386ad | [
"MIT"
] | null | null | null | oncopolicy/utils/learn.py | yala/Tempo | bf3e0e78d64869bb2079c582a4a35982f78386ad | [
"MIT"
] | 2 | 2022-02-02T13:09:29.000Z | 2022-02-18T07:06:19.000Z | import pickle
import json
import warnings
import torch
import numpy as np
from torch.utils import data
import sklearn.metrics
from collections import defaultdict, OrderedDict, Counter
from oncopolicy.metrics.factory import get_metrics_with_cis
def init_metrics_dictionary():
'''
Return empty metrics dict
'... | 40.709091 | 211 | 0.663243 |
7941240daad3b90b75a20512e3197256dc1e8148 | 10,127 | py | Python | src/policy/nn_q_table.py | matpalm/drivebot | 2b6c30209f7a50e289fa70b68fdc93f5e2bd7e88 | [
"MIT"
] | 70 | 2016-02-20T02:59:14.000Z | 2021-12-30T04:19:09.000Z | src/policy/nn_q_table.py | matpalm/drivebot | 2b6c30209f7a50e289fa70b68fdc93f5e2bd7e88 | [
"MIT"
] | 1 | 2016-05-03T15:57:58.000Z | 2016-05-04T13:55:53.000Z | src/policy/nn_q_table.py | matpalm/drivebot | 2b6c30209f7a50e289fa70b68fdc93f5e2bd7e88 | [
"MIT"
] | 17 | 2016-02-20T03:53:46.000Z | 2021-03-17T07:38:18.000Z | from collections import Counter
import numpy as np
import random
import rospy
import states
import tensorflow as tf
import util as u
def flatten(state):
return np.asarray(state).reshape(1, -1)
# build a (grouped) copy op that copies the values of all variables between two namespaces.
# use an affine_coefficient t... | 54.740541 | 133 | 0.643132 |
794124161b981f5a84341d2dd395cd293561d08c | 4,195 | py | Python | setup.py | Ery4z/PyClip | 259c9e255aef818a7ed5cf6fe5ebff8215c93c6d | [
"X11"
] | 1 | 2021-11-23T14:11:33.000Z | 2021-11-23T14:11:33.000Z | setup.py | Ery4z/PyClip | 259c9e255aef818a7ed5cf6fe5ebff8215c93c6d | [
"X11"
] | null | null | null | setup.py | Ery4z/PyClip | 259c9e255aef818a7ed5cf6fe5ebff8215c93c6d | [
"X11"
] | null | null | null | import os
import tkinter
from tkinter import ttk
import json
import sounddevice as sd
def Settings():
config = load_setings()
devices_selected = []
for entry in config["entries"]:
devices_selected.append([entry["name"], entry["label"]])
list_devices = sd.query_devices()
real_list = []
... | 27.24026 | 86 | 0.622884 |
794124575e1316aed68ca7c718df5047682335ec | 5,104 | py | Python | src/transformers/models/data2vec/__init__.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/data2vec/__init__.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/data2vec/__init__.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2022 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | 36.457143 | 113 | 0.717281 |
794124c921c54dd632151d767629cef0887cf2b8 | 15,661 | py | Python | desdeo_emo/EAs/IOPIS.py | giomara-larraga/desdeo-emo | d891e9a12b25d02af5dfba5b17b4c2c4c0bd3d53 | [
"MIT"
] | 3 | 2021-05-02T17:42:39.000Z | 2022-02-16T05:22:56.000Z | desdeo_emo/EAs/IOPIS.py | giomara-larraga/desdeo-emo | d891e9a12b25d02af5dfba5b17b4c2c4c0bd3d53 | [
"MIT"
] | 32 | 2019-10-30T08:33:13.000Z | 2022-03-12T00:54:02.000Z | desdeo_emo/EAs/IOPIS.py | giomara-larraga/desdeo-emo | d891e9a12b25d02af5dfba5b17b4c2c4c0bd3d53 | [
"MIT"
] | 12 | 2019-10-16T10:00:47.000Z | 2022-03-17T13:31:41.000Z | from typing import Dict, Union, List
from desdeo_emo.EAs.BaseEA import eaError
from desdeo_emo.EAs.BaseEA import BaseDecompositionEA, BaseEA
from desdeo_emo.EAs.RVEA import RVEA
from desdeo_emo.population.Population import Population
from desdeo_emo.selection.IOPIS_APD import IOPIS_APD_Select
from desdeo_emo.selection... | 43.991573 | 88 | 0.661133 |
794124d695a4650cf4201b7ca0fe3002296ad401 | 279 | py | Python | models/sum.py | INTENS-FI/intens | b2a2131241a88b0d80a5091679d6efb6c56098fb | [
"MIT"
] | null | null | null | models/sum.py | INTENS-FI/intens | b2a2131241a88b0d80a5091679d6efb6c56098fb | [
"MIT"
] | null | null | null | models/sum.py | INTENS-FI/intens | b2a2131241a88b0d80a5091679d6efb6c56098fb | [
"MIT"
] | null | null | null | """A mock model for simulator server testing.
"""
from concurrent.futures import CancelledError
import dask
@dask.delayed
def task(spec, cancel):
if cancel.get():
raise CancelledError("Cancelled by request")
return {"sum": spec.inputs['x'] + spec.inputs['y']}
| 21.461538 | 55 | 0.691756 |
7941253d2ef3e790034259c5eebe7430bfaef1f2 | 61 | py | Python | 03_EstruturasRepeticao/09_impares_ate_150.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | 03_EstruturasRepeticao/09_impares_ate_150.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | 03_EstruturasRepeticao/09_impares_ate_150.py | eduardovivi/Python_tests | b70d009d6180b136c50ccfec343a13f2c09b8029 | [
"MIT"
] | null | null | null | for i in range(0, 150):
if (i % 2 != 0):
print i
| 15.25 | 23 | 0.42623 |
7941270513c577b1480f840375ae85678bf6d829 | 13,894 | py | Python | projeto/main/consumers.py | neilom18/g5-chess | 8998199b3432f0b83aa27e5c2126173ecc87f311 | [
"MIT"
] | null | null | null | projeto/main/consumers.py | neilom18/g5-chess | 8998199b3432f0b83aa27e5c2126173ecc87f311 | [
"MIT"
] | 1 | 2021-10-03T22:26:45.000Z | 2021-10-03T22:26:45.000Z | projeto/main/consumers.py | neilom18/g5-chess | 8998199b3432f0b83aa27e5c2126173ecc87f311 | [
"MIT"
] | null | null | null |
# chat/consumers.py
from time import time
import json
from main.game.especialMoves import EnPassant
from main.game.game import selectPiece
from main.game.ConvertStringArray import arrayToStringallPieces, arrayTostring, stringToArray, arrayToHistory
from asgiref.sync import async_to_sync
from channels.generic.websocket... | 43.01548 | 121 | 0.456168 |
79412766f3a33106150c3d3c9f538d4d3e0179be | 2,521 | py | Python | experiments/YOLOv3/creating-files-data-and-name.py | moeraza/juice-box | 6bf9ae9bf95ebc68ef0620466467e97ff4260774 | [
"MIT"
] | 1 | 2021-02-18T02:16:17.000Z | 2021-02-18T02:16:17.000Z | experiments/YOLOv3/creating-files-data-and-name.py | moeraza/juice-box | 6bf9ae9bf95ebc68ef0620466467e97ff4260774 | [
"MIT"
] | null | null | null | experiments/YOLOv3/creating-files-data-and-name.py | moeraza/juice-box | 6bf9ae9bf95ebc68ef0620466467e97ff4260774 | [
"MIT"
] | null | null | null |
"""
Course: Training YOLO v3 for Objects Detection with Custom Data
Section-3
Labelling new Dataset in YOLO format
File: creating-files-data-and-name.py
"""
# Creating files labelled_data.data and classes.names
# for training in Darknet framework
#
# Algorithm:
# Setting up full paths --> Reading file classes.txt... | 24.009524 | 79 | 0.668386 |
794128769b1695c2bb32c73d7c9b78f58f7108e4 | 6,286 | py | Python | octavia/tests/unit/common/test_base_taskflow.py | zhangi/octavia | e68c851fecf55e1b5ffe7d5b849f729626af28a3 | [
"Apache-2.0"
] | 129 | 2015-06-23T08:06:23.000Z | 2022-03-31T12:38:20.000Z | octavia/tests/unit/common/test_base_taskflow.py | zhangi/octavia | e68c851fecf55e1b5ffe7d5b849f729626af28a3 | [
"Apache-2.0"
] | 6 | 2016-05-20T11:05:27.000Z | 2021-03-23T06:05:52.000Z | octavia/tests/unit/common/test_base_taskflow.py | zhangi/octavia | e68c851fecf55e1b5ffe7d5b849f729626af28a3 | [
"Apache-2.0"
] | 166 | 2015-07-15T16:24:05.000Z | 2022-03-02T20:54:36.000Z | # 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... | 40.294872 | 78 | 0.664333 |
79412905ff6bc3ca4afbf35ff3ff4fc4c7bdbb06 | 22,696 | py | Python | sidechainnet/utils/load.py | heiidii/sidechainnet | d0d04447af567d2ebf0f80427b0d9330d922de27 | [
"BSD-3-Clause"
] | 1 | 2022-03-09T01:56:37.000Z | 2022-03-09T01:56:37.000Z | sidechainnet/utils/load.py | heiidii/sidechainnet | d0d04447af567d2ebf0f80427b0d9330d922de27 | [
"BSD-3-Clause"
] | null | null | null | sidechainnet/utils/load.py | heiidii/sidechainnet | d0d04447af567d2ebf0f80427b0d9330d922de27 | [
"BSD-3-Clause"
] | null | null | null | """Implements SidechainNet loading functionality."""
import pickle
import os
from sidechainnet.dataloaders.SCNDataset import SCNDataset
import requests
import tqdm
import sidechainnet as scn
from sidechainnet.create import format_sidechainnet_path
from sidechainnet.dataloaders.collate import prepare_dataloaders
de... | 46.318367 | 92 | 0.653816 |
7941291d62cd99f57cf67a266d4892d74386e623 | 800 | py | Python | weatherapp/weatherapp/urls.py | dhavall13/Weather-App | cac3f997612d2ab2d80c6f8ad4917f04821762bc | [
"MIT"
] | null | null | null | weatherapp/weatherapp/urls.py | dhavall13/Weather-App | cac3f997612d2ab2d80c6f8ad4917f04821762bc | [
"MIT"
] | null | null | null | weatherapp/weatherapp/urls.py | dhavall13/Weather-App | cac3f997612d2ab2d80c6f8ad4917f04821762bc | [
"MIT"
] | null | null | null | """weatherapp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 34.782609 | 77 | 0.70375 |
794129fafddb523c15abdfc1b29e4767038bb575 | 12,174 | py | Python | montreal_forced_aligner/alignment/adapting.py | nrgslp/Montreal-Forced-Aligner | 582d841694537f2c69f45ec9ef7b8235ddd84b24 | [
"MIT"
] | null | null | null | montreal_forced_aligner/alignment/adapting.py | nrgslp/Montreal-Forced-Aligner | 582d841694537f2c69f45ec9ef7b8235ddd84b24 | [
"MIT"
] | null | null | null | montreal_forced_aligner/alignment/adapting.py | nrgslp/Montreal-Forced-Aligner | 582d841694537f2c69f45ec9ef7b8235ddd84b24 | [
"MIT"
] | null | null | null | """Class definitions for adapting acoustic models"""
from __future__ import annotations
import multiprocessing as mp
import os
import shutil
import subprocess
import time
from queue import Empty
from typing import TYPE_CHECKING, List
import tqdm
from montreal_forced_aligner.abc import AdapterMixin
from montreal_forc... | 36.890909 | 110 | 0.578364 |
79412ad4772d8e039983c05481ed4a3fd1fafadd | 2,827 | py | Python | api/namex/services/nro/utils.py | sumesh-aot/namex | 53e11aed5ea550b71b7b983f1b57b65db5a06766 | [
"Apache-2.0"
] | 4 | 2018-10-05T23:41:05.000Z | 2019-06-19T16:17:50.000Z | api/namex/services/nro/utils.py | sumesh-aot/namex | 53e11aed5ea550b71b7b983f1b57b65db5a06766 | [
"Apache-2.0"
] | 635 | 2018-05-31T04:12:46.000Z | 2022-03-31T18:45:42.000Z | api/namex/services/nro/utils.py | rarmitag/namex | 1b308bf96130619d4a61d44e075cc7ab177dc6cd | [
"Apache-2.0"
] | 71 | 2018-05-14T20:47:55.000Z | 2022-03-31T23:08:30.000Z | import re
def nro_examiner_name(examiner_name): # -> (str)
"""returns an examiner name, formated and tuncated to fit in NRO
:examiner_name (str): an examiner name, as found in NameX
:returns (str): an examiner name that is 7 or less chars in length
"""
# namex examiner_names are {domain}{/}{usern... | 27.446602 | 80 | 0.577998 |
79412bbf5d4dda16ab7f9cd234e43c71c29f2775 | 34,926 | py | Python | tensorflow/contrib/framework/python/ops/variables_test.py | breandan/tensorflow | 7509bad95200e1baed4eb488dbeaaa2c505a2824 | [
"Apache-2.0"
] | 4 | 2016-09-26T08:55:23.000Z | 2019-05-06T15:26:03.000Z | tensorflow/contrib/framework/python/ops/variables_test.py | breandan/tensorflow | 7509bad95200e1baed4eb488dbeaaa2c505a2824 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/framework/python/ops/variables_test.py | breandan/tensorflow | 7509bad95200e1baed4eb488dbeaaa2c505a2824 | [
"Apache-2.0"
] | 4 | 2017-01-17T10:19:15.000Z | 2019-05-13T02:23:07.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.065351 | 80 | 0.654498 |
79412bed4c546a319c7278215291d61b98dbfd99 | 2,916 | py | Python | inspector-pkg/src/shminspector/components/network.py | sha1n/macos-devenv-dump-poc | be439ad4a0c0ac265fe62d44bded73eab1a0c31d | [
"MIT"
] | null | null | null | inspector-pkg/src/shminspector/components/network.py | sha1n/macos-devenv-dump-poc | be439ad4a0c0ac265fe62d44bded73eab1a0c31d | [
"MIT"
] | null | null | null | inspector-pkg/src/shminspector/components/network.py | sha1n/macos-devenv-dump-poc | be439ad4a0c0ac265fe62d44bded73eab1a0c31d | [
"MIT"
] | null | null | null | import urllib.request as request
from collections import namedtuple
from time import time
from typing import List
from shminspector.api.collector import Collector
from shminspector.api.context import Context
from shminspector.api.validator import Validator, ValidationResult, Status
from shminspector.util.diag import t... | 39.945205 | 120 | 0.653978 |
79412c5e0d4fc98507eba74edc341eba77ce936e | 1,230 | py | Python | ddtrace/contrib/pymongo/__init__.py | mykytarudenko/new-project | e06a912382239739dd3f93b54d545b9506102372 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/pymongo/__init__.py | mykytarudenko/new-project | e06a912382239739dd3f93b54d545b9506102372 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-27T04:53:24.000Z | 2021-01-27T04:53:24.000Z | ddtrace/contrib/pymongo/__init__.py | mykytarudenko/new-project | e06a912382239739dd3f93b54d545b9506102372 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | """Instrument pymongo to report MongoDB queries.
The pymongo integration works by wrapping pymongo's MongoClient to trace
network calls. Pymongo 3.0 and greater are the currently supported versions.
``patch_all`` will automatically patch your MongoClient instance to make it work.
::
# Be sure to import pymongo a... | 33.243243 | 81 | 0.730894 |
79412cf73ff1e0ad7347f9f74746f63b981b9173 | 10,442 | py | Python | pymel/mayautils.py | GlenWalker/pymel | 8b69b72e1bb726a66792707af39626a987bf5c21 | [
"BSD-3-Clause"
] | null | null | null | pymel/mayautils.py | GlenWalker/pymel | 8b69b72e1bb726a66792707af39626a987bf5c21 | [
"BSD-3-Clause"
] | null | null | null | pymel/mayautils.py | GlenWalker/pymel | 8b69b72e1bb726a66792707af39626a987bf5c21 | [
"BSD-3-Clause"
] | null | null | null | """Utilities for getting Maya resource directories, sourcing scripts, and executing deferred.
These do not require initialization of maya.standalone"""
import os
import sys
import re
import platform
import pymel.versions as versions
import pymel.internal as _internal
_logger = _internal.getLogger(__name__)
from pymel... | 34.462046 | 93 | 0.598736 |
79412e82faa8a1923206331d715fd0da2de3f2ae | 22,764 | py | Python | pymatgen/symmetry/maggroups.py | hpatel1567/pymatgen | 8304b25464206c74305214e45935df90bab95500 | [
"MIT"
] | 1 | 2021-01-12T03:17:58.000Z | 2021-01-12T03:17:58.000Z | pymatgen/symmetry/maggroups.py | hpatel1567/pymatgen | 8304b25464206c74305214e45935df90bab95500 | [
"MIT"
] | null | null | null | pymatgen/symmetry/maggroups.py | hpatel1567/pymatgen | 8304b25464206c74305214e45935df90bab95500 | [
"MIT"
] | null | null | null | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Magnetic space groups.
"""
import os
from fractions import Fraction
import numpy as np
from monty.design_patterns import cached_class
import textwrap
from pymatgen.electronic_structure.core import Magmom... | 44.460938 | 120 | 0.543841 |
79412ebd1aa5ea0d8c16c20add56bd170d7666fd | 23,558 | py | Python | scipy/optimize/_linprog.py | avivajpeyi/scipy | dbfe06e6618232b26c241cbe8861e2ea1489b535 | [
"BSD-3-Clause"
] | 353 | 2020-12-10T10:47:17.000Z | 2022-03-31T23:08:29.000Z | scipy/optimize/_linprog.py | avivajpeyi/scipy | dbfe06e6618232b26c241cbe8861e2ea1489b535 | [
"BSD-3-Clause"
] | 80 | 2020-12-10T09:54:22.000Z | 2022-03-30T22:08:45.000Z | scipy/optimize/_linprog.py | avivajpeyi/scipy | dbfe06e6618232b26c241cbe8861e2ea1489b535 | [
"BSD-3-Clause"
] | 63 | 2020-12-10T17:10:34.000Z | 2022-03-28T16:27:07.000Z | """
A top-level linear programming interface. Currently this interface solves
linear programming problems via the Simplex and Interior-Point methods.
.. versionadded:: 0.15.0
Functions
---------
.. autosummary::
:toctree: generated/
linprog
linprog_verbose_callback
linprog_terse_callback
"""
import ... | 40.899306 | 143 | 0.628279 |
79412f2fdac659cde5534fb23cde8df4895cd4f4 | 841 | py | Python | src/homework/homework1.py | acc-cosc-1336/cosc-1336-spring-2018-brianmiller7 | 78bb08379aba7a07838ed91643b8bf274f2227ae | [
"MIT"
] | null | null | null | src/homework/homework1.py | acc-cosc-1336/cosc-1336-spring-2018-brianmiller7 | 78bb08379aba7a07838ed91643b8bf274f2227ae | [
"MIT"
] | null | null | null | src/homework/homework1.py | acc-cosc-1336/cosc-1336-spring-2018-brianmiller7 | 78bb08379aba7a07838ed91643b8bf274f2227ae | [
"MIT"
] | null | null | null | def get_hours_since_midnight(seconds):
'''
Type the code to calculate total hours given n(number) of seconds
For example, given 3800 seconds the total hours is 1
'''
return seconds // 3600
'''
IF YOU ARE OK WITH A GRADE OF 70 FOR THIS ASSIGNMENT STOP HERE.
'''
def get_minutes(seconds):
'''
... | 30.035714 | 87 | 0.694411 |
79412fe78db5f3b6df7e1dc45623da5c27166298 | 1,208 | py | Python | tests/python_on_whales/components/test_node.py | ucam-department-of-psychiatry/python-on-whales | f3171814089b16b88c407f316048f830f45eaa4e | [
"MIT"
] | 191 | 2020-12-02T19:35:00.000Z | 2022-03-31T22:41:48.000Z | tests/python_on_whales/components/test_node.py | ucam-department-of-psychiatry/python-on-whales | f3171814089b16b88c407f316048f830f45eaa4e | [
"MIT"
] | 94 | 2020-12-18T16:36:38.000Z | 2022-03-31T00:06:39.000Z | tests/python_on_whales/components/test_node.py | ucam-department-of-psychiatry/python-on-whales | f3171814089b16b88c407f316048f830f45eaa4e | [
"MIT"
] | 33 | 2020-12-17T20:32:31.000Z | 2022-03-29T10:23:06.000Z | import pytest
from python_on_whales import docker
from python_on_whales.components.node.models import NodeInspectResult
from python_on_whales.test_utils import get_all_jsons
@pytest.mark.parametrize("json_file", get_all_jsons("nodes"))
def test_load_json(json_file):
json_as_txt = json_file.read_text()
... | 30.974359 | 83 | 0.675497 |
794131318245e811c80755b45f7d9c08a4e91f04 | 47,012 | py | Python | test/integration/component/test_project_limits.py | redbridge/cloudstack | 2218053fb11d501950e4beb80e9bee4ae472b5b4 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2015-02-10T07:21:58.000Z | 2021-05-07T08:52:17.000Z | test/integration/component/test_project_limits.py | redbridge/cloudstack | 2218053fb11d501950e4beb80e9bee4ae472b5b4 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2015-06-11T02:17:06.000Z | 2015-06-22T20:46:42.000Z | test/integration/component/test_project_limits.py | redbridge/cloudstack | 2218053fb11d501950e4beb80e9bee4ae472b5b4 | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2015-05-25T15:53:52.000Z | 2018-05-23T14:08:07.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... | 43.61039 | 128 | 0.429656 |
794131454b4ef2d21bd20f95d194eca0db5dddf1 | 636 | py | Python | first_lambda/aws-lambdavxuq2swg/bin/rst2man.py | mylar-pr/DaaS | e41fa9e9fbda66d7150f00e6db13dd3a76cd3501 | [
"MIT"
] | null | null | null | first_lambda/aws-lambdavxuq2swg/bin/rst2man.py | mylar-pr/DaaS | e41fa9e9fbda66d7150f00e6db13dd3a76cd3501 | [
"MIT"
] | null | null | null | first_lambda/aws-lambdavxuq2swg/bin/rst2man.py | mylar-pr/DaaS | e41fa9e9fbda66d7150f00e6db13dd3a76cd3501 | [
"MIT"
] | null | null | null | #!/home/prajwal_mylar/anaconda3/envs/lambda1/bin/python
# Author:
# Contact: grubert@users.sf.net
# Copyright: This module has been placed in the public domain.
"""
man.py
======
This module provides a simple command line interface that uses the
man page writer to output from ReStructuredText source.
"""
import loc... | 23.555556 | 80 | 0.773585 |
79413169bfd0ed815c03cdb7eea4d1045160f2e9 | 512 | py | Python | python/python_crash_course/chapter_5/5-8.hello_admin.py | lmonsalve22/Learning-to-Code | 2e32eba3fbd0bd63cc539e1e6d372ca346b765c9 | [
"MIT"
] | null | null | null | python/python_crash_course/chapter_5/5-8.hello_admin.py | lmonsalve22/Learning-to-Code | 2e32eba3fbd0bd63cc539e1e6d372ca346b765c9 | [
"MIT"
] | null | null | null | python/python_crash_course/chapter_5/5-8.hello_admin.py | lmonsalve22/Learning-to-Code | 2e32eba3fbd0bd63cc539e1e6d372ca346b765c9 | [
"MIT"
] | null | null | null | """ Make a list with 5 usernames and make an if-else statement,
for admin print an special message, but for the other just print
a simple 'hello' """
username = input('Please enter your username:\n')
usernames = ['admin', 'jamesnoria', 'jnoria', 'user95', 'ctirado']
if username in usernames and username == 'admin':
... | 36.571429 | 66 | 0.707031 |
79413171e816f395c0191e67251331df265439d9 | 611 | py | Python | m-encode.py | shantanu561993/foolavc | 3014cf99c653275be408a3e7f7309f7130172116 | [
"MIT"
] | null | null | null | m-encode.py | shantanu561993/foolavc | 3014cf99c653275be408a3e7f7309f7130172116 | [
"MIT"
] | null | null | null | m-encode.py | shantanu561993/foolavc | 3014cf99c653275be408a3e7f7309f7130172116 | [
"MIT"
] | 1 | 2020-12-15T06:51:55.000Z | 2020-12-15T06:51:55.000Z | import os,sys
if len(sys.argv) == 1:
sys.stderr.write('Usage: {} [files...]\n'.format(sys.argv[0]))
sys.exit(1)
for i in sys.argv[1:]:
if os.path.exists(i):
ext = i.split('.')[-1]
filename = '.'.join(i.split('.')[:-1])
extensions = dict(exe='me', dll='ml')
if ext in extensi... | 32.157895 | 98 | 0.505728 |
794131a3acc5a5859f4971c97cc5035b20729e02 | 2,854 | py | Python | examples/widgets/table/lv_example_table_2.py | ggvl/lvgl | d56ce08782852ff274141f69271464da87de96bc | [
"MIT"
] | 8 | 2022-02-11T08:20:49.000Z | 2022-03-22T06:19:59.000Z | examples/widgets/table/lv_example_table_2.py | ggvl/lvgl | d56ce08782852ff274141f69271464da87de96bc | [
"MIT"
] | 2 | 2022-03-22T03:22:45.000Z | 2022-03-22T06:09:13.000Z | examples/widgets/table/lv_example_table_2.py | ggvl/lvgl | d56ce08782852ff274141f69271464da87de96bc | [
"MIT"
] | 2 | 2022-02-19T10:51:00.000Z | 2022-03-22T03:11:35.000Z | from utime import ticks_ms
import gc
ITEM_CNT = 200
def draw_event_cb(e):
obj = e.get_target()
dsc = lv.obj_draw_part_dsc_t.__cast__(e.get_param())
# If the cells are drawn...
if dsc.part == lv.PART.ITEMS:
chk = obj.has_cell_ctrl(dsc.id, 0, lv.table.CELL_CTRL.CUSTOM_1)
rect_dsc = lv.d... | 29.729167 | 124 | 0.655922 |
79413205425ba509658c91258a11ef0bc352c550 | 239 | py | Python | test/mitmproxy/data/addonscripts/stream_modify.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | test/mitmproxy/data/addonscripts/stream_modify.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | test/mitmproxy/data/addonscripts/stream_modify.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | from mitmproxy import ctx
def modify(chunks):
for chunk in chunks:
yield chunk.replace(b"foo", b"bar")
def running():
ctx.log.info("stream_modify running")
def responseheaders(flow):
flow.response.stream = modify
| 15.933333 | 43 | 0.686192 |
7941322cf5b41e6423f3bdb5dd9a1f321dd7f2f0 | 3,554 | py | Python | gds_metrics/__init__.py | alphagov-mirror/gds_metrics_python | 8e350f067765a57fd3f86d949caa786eadb3c982 | [
"MIT"
] | 1 | 2018-10-30T09:54:50.000Z | 2018-10-30T09:54:50.000Z | gds_metrics/__init__.py | alphagov-mirror/gds_metrics_python | 8e350f067765a57fd3f86d949caa786eadb3c982 | [
"MIT"
] | 10 | 2018-04-20T10:35:44.000Z | 2020-12-31T10:12:41.000Z | gds_metrics/__init__.py | alphagov-mirror/gds_metrics_python | 8e350f067765a57fd3f86d949caa786eadb3c982 | [
"MIT"
] | 5 | 2019-01-08T13:35:07.000Z | 2021-04-10T20:20:05.000Z | import gzip
import hmac
import json
import os
from time import monotonic
from flask import abort, g, request, Response
from flask.signals import got_request_exception, request_finished
# set multiprocess temp directory before we import prometheus_client
os.environ.setdefault('prometheus_multiproc_dir', '/tmp') # noqa... | 35.188119 | 104 | 0.660664 |
7941322e93d57f799e62599bd06b93d01f90983a | 3,641 | py | Python | tests/unit/stage/test_stage.py | sahilbhosale63/dvc | 999c9e188801f971b75f51ca84f5bad533cb462c | [
"Apache-2.0"
] | null | null | null | tests/unit/stage/test_stage.py | sahilbhosale63/dvc | 999c9e188801f971b75f51ca84f5bad533cb462c | [
"Apache-2.0"
] | null | null | null | tests/unit/stage/test_stage.py | sahilbhosale63/dvc | 999c9e188801f971b75f51ca84f5bad533cb462c | [
"Apache-2.0"
] | null | null | null | import os
import signal
import subprocess
import threading
import mock
import pytest
from dvc.dependency.repo import RepoDependency
from dvc.stage import Stage
from dvc.stage.exceptions import StageUpdateError
TEST_STAGE_DICT = {
"md5": "123456",
"cmd": "mycmd",
"outs": [{"path": "a", "md5": "123456789"}... | 30.090909 | 78 | 0.69047 |
7941344f5d6bc160a909b62ddee12555eab78be2 | 2,462 | py | Python | doc/source/conf.py | mateusz-blaszkowski/searchlight-ui | 27763ffc3d309697b3492f0f9c93b2dc3dfc6e49 | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | mateusz-blaszkowski/searchlight-ui | 27763ffc3d309697b3492f0f9c93b2dc3dfc6e49 | [
"Apache-2.0"
] | 1 | 2016-04-20T23:50:10.000Z | 2016-04-20T23:50:10.000Z | doc/source/conf.py | mateusz-blaszkowski/searchlight-ui | 27763ffc3d309697b3492f0f9c93b2dc3dfc6e49 | [
"Apache-2.0"
] | 1 | 2016-04-05T23:33:23.000Z | 2016-04-05T23:33:23.000Z | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 32.394737 | 79 | 0.696994 |
794134cc53beab1c7e0b35d18a88f1e99037ac30 | 9,311 | py | Python | examples/stats/plot_cluster_stats_time_frequency_repeated_measures_anova.py | TanayGahlot/mne-python | 857aa97c201451b82931c5eba50642975afc423d | [
"BSD-3-Clause"
] | null | null | null | examples/stats/plot_cluster_stats_time_frequency_repeated_measures_anova.py | TanayGahlot/mne-python | 857aa97c201451b82931c5eba50642975afc423d | [
"BSD-3-Clause"
] | null | null | null | examples/stats/plot_cluster_stats_time_frequency_repeated_measures_anova.py | TanayGahlot/mne-python | 857aa97c201451b82931c5eba50642975afc423d | [
"BSD-3-Clause"
] | null | null | null | """
====================================================================
Mass-univariate twoway repeated measures ANOVA on single trial power
====================================================================
This script shows how to conduct a mass-univariate repeated measures
ANOVA. As the model to be fitted assume... | 41.566964 | 84 | 0.683922 |
794134cff5d543463496cb7c77d3629f48dab77f | 937 | py | Python | eval.py | quangdaist123/catr | 3c6cb95b6be2f82ed45178bd6039bc49e1b973c7 | [
"Apache-2.0"
] | null | null | null | eval.py | quangdaist123/catr | 3c6cb95b6be2f82ed45178bd6039bc49e1b973c7 | [
"Apache-2.0"
] | null | null | null | eval.py | quangdaist123/catr | 3c6cb95b6be2f82ed45178bd6039bc49e1b973c7 | [
"Apache-2.0"
] | null | null | null | from nltk.translate.bleu_score import corpus_bleu
import json
truth_json = json.load(open("C:/Users/quang/Desktop/temp_test.json"))
pred_json = json.load(open("C:/Users/quang/Desktop/temp_test_res.json"))
references = []
candidates = []
for prediction in pred_json:
ref_temp = []
candidates.append([prediction[... | 46.85 | 102 | 0.707577 |
7941355a76edd9e4bff4988571bb3a5d0068a242 | 33,242 | py | Python | rally_openstack/task/scenarios/neutron/utils.py | jogeo/rally-openstack | 83437e7c5925d5d647cd28f1821b6d51687b0123 | [
"Apache-2.0"
] | null | null | null | rally_openstack/task/scenarios/neutron/utils.py | jogeo/rally-openstack | 83437e7c5925d5d647cd28f1821b6d51687b0123 | [
"Apache-2.0"
] | null | null | null | rally_openstack/task/scenarios/neutron/utils.py | jogeo/rally-openstack | 83437e7c5925d5d647cd28f1821b6d51687b0123 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014: Intel 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 a... | 38.430058 | 79 | 0.641357 |
794135f7408600359a33164754d7110c831bcaa8 | 151 | py | Python | manager.py | TuringEmmy/Movies | 54597698edd8f9d88a240970c180649a83cfddab | [
"MIT"
] | 1 | 2018-10-02T02:33:37.000Z | 2018-10-02T02:33:37.000Z | manager.py | TuringEmmy/Movies | 54597698edd8f9d88a240970c180649a83cfddab | [
"MIT"
] | null | null | null | manager.py | TuringEmmy/Movies | 54597698edd8f9d88a240970c180649a83cfddab | [
"MIT"
] | null | null | null | # coding=utf-8
# author TuringEmmy
# emial yonglonggeng@163.com
from app import app
if __name__ == '__main__':
# print(app.url_map)
app.run() | 16.777778 | 28 | 0.688742 |
7941372f855aa71c2579b434b917618f320ed3eb | 4,620 | py | Python | experiment.py | JeyDi/BayesianMLOptimization | ba3ddf5bb9919a5043b4e982dea46425631696d3 | [
"Apache-2.0"
] | 1 | 2019-06-30T08:50:54.000Z | 2019-06-30T08:50:54.000Z | experiment.py | JeyDi/BayesianMLOptimization | ba3ddf5bb9919a5043b4e982dea46425631696d3 | [
"Apache-2.0"
] | null | null | null | experiment.py | JeyDi/BayesianMLOptimization | ba3ddf5bb9919a5043b4e982dea46425631696d3 | [
"Apache-2.0"
] | null | null | null | # import of the required libraries
import numpy as np
import timeit
from pyGPGO.covfunc import squaredExponential
from pyGPGO.surrogates.GaussianProcess import GaussianProcess
from pyGPGO.surrogates.RandomForest import RandomForest
from pyGPGO.GPGO import GPGO
from pyGPGO.acquisition import Acquisition
from pyGPGO.co... | 35.267176 | 81 | 0.774459 |
794137329b37795e9b4cf779d0ca3888862a1e5d | 1,241 | py | Python | py/load_data.py | fedderw/polls | 70d997d9d91ac90501cb91f5e7aef536cb5df9dd | [
"MIT"
] | 1 | 2020-08-25T18:14:45.000Z | 2020-08-25T18:14:45.000Z | py/load_data.py | fedderw/polls | 70d997d9d91ac90501cb91f5e7aef536cb5df9dd | [
"MIT"
] | 94 | 2020-08-25T18:23:55.000Z | 2022-01-26T15:48:39.000Z | py/load_data.py | fedderw/polls | 70d997d9d91ac90501cb91f5e7aef536cb5df9dd | [
"MIT"
] | 3 | 2021-05-19T01:30:13.000Z | 2021-06-23T20:49:17.000Z | import pandas as pd
VARIABLE_MAPPING = {
"Poll ID": "poll_id",
"Question ID": "question_id",
"Cross-tab variable 1": "xtab1_var",
"Cross-tab value 1": "xtab1_val",
"Cross-tab variable 2": "xtab2_var",
"Cross-tab value 2": "xtab2_val",
"Sample size": "sample_size",
"Question text": "ques... | 26.978261 | 60 | 0.601934 |
794139c3cb4d1db9fc8a5a1dbd3a676374f069c6 | 1,295 | py | Python | mkt/constants/submit.py | oremj/zamboni | a751dc6d22f7af947da327b0a091cbab0a999f49 | [
"BSD-3-Clause"
] | null | null | null | mkt/constants/submit.py | oremj/zamboni | a751dc6d22f7af947da327b0a091cbab0a999f49 | [
"BSD-3-Clause"
] | null | null | null | mkt/constants/submit.py | oremj/zamboni | a751dc6d22f7af947da327b0a091cbab0a999f49 | [
"BSD-3-Clause"
] | null | null | null | from tower import ugettext_lazy as _
APP_STEPS = [
('terms', _('Agreement')),
('manifest', _('Submit')),
('details', _('Details')),
('done', _('Done!')),
]
APP_STEPS_TITLE = dict(APP_STEPS)
# The sizes for the image assets for apps.
APP_IMAGE_SIZES = [
{'size': (32, 32),
'has_background': Fa... | 28.777778 | 79 | 0.579923 |
79413a76bc7c641286e0e8dcbfbe6a80c043bfa7 | 7,316 | py | Python | mimesis/schema.py | gptubpkCsHKzjC8fKcRXUdK6SbECPM49P5Xu46U/mimesis | 675bd3a8702508c585d808aeb503c4397ada123d | [
"MIT"
] | 1 | 2021-12-21T12:03:54.000Z | 2021-12-21T12:03:54.000Z | mimesis/schema.py | gptubpkCsHKzjC8fKcRXUdK6SbECPM49P5Xu46U/mimesis | 675bd3a8702508c585d808aeb503c4397ada123d | [
"MIT"
] | null | null | null | mimesis/schema.py | gptubpkCsHKzjC8fKcRXUdK6SbECPM49P5Xu46U/mimesis | 675bd3a8702508c585d808aeb503c4397ada123d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Implements classes for generating data by schema."""
import warnings
from typing import Any, Callable, ClassVar, Iterator, List, Optional, Sequence
from mimesis.exceptions import FieldError, SchemaError
from mimesis.locales import Locale
from mimesis.providers.generic import Generic
from mi... | 32.515556 | 95 | 0.585429 |
79413b0913242ef44aae9921eb9da2987dd13b22 | 1,792 | py | Python | Source/Server/mqtt.py | HgN37/HGN_LVTN | 1ccdca5bb41665cbd70b360f8cac82037b4a8518 | [
"MIT"
] | null | null | null | Source/Server/mqtt.py | HgN37/HGN_LVTN | 1ccdca5bb41665cbd70b360f8cac82037b4a8518 | [
"MIT"
] | null | null | null | Source/Server/mqtt.py | HgN37/HGN_LVTN | 1ccdca5bb41665cbd70b360f8cac82037b4a8518 | [
"MIT"
] | null | null | null | import paho.mqtt.client as mqtt
import json
import ast
class MQTT():
''' Communication with server via WiFi or Ethernet '''
payload_queue = []
def __init__(self, broker, port, topicin, topicout):
self.topicin = topicin
self.topicout = topicout
def on_connect(client, userdata, flags, rc):
print('Connected w... | 24.547945 | 59 | 0.654018 |
79413b42c5ea6b69dc7650fcafd6f3caa4c9de62 | 1,733 | py | Python | validate_export.py | salman1993/twitter-customer-support-collector | ed1f8bc8c8401da57cd3c0ddc430b2c83779e0f6 | [
"MIT"
] | 2 | 2017-11-28T14:48:03.000Z | 2019-02-28T09:17:41.000Z | validate_export.py | salman1993/twitter-customer-support-collector | ed1f8bc8c8401da57cd3c0ddc430b2c83779e0f6 | [
"MIT"
] | 2 | 2017-10-05T07:56:29.000Z | 2017-11-30T01:30:01.000Z | validate_export.py | salman1993/twitter-customer-support-collector | ed1f8bc8c8401da57cd3c0ddc430b2c83779e0f6 | [
"MIT"
] | 2 | 2017-11-28T20:14:57.000Z | 2020-01-30T14:00:46.000Z | """ Validates exported dataset. """
import csv
import logging
import os
import sys
from collections import namedtuple
import toolz
def validate_export(export_path: str):
logging.info(f'Validating export at "{export_path}"...')
logging.info("Reading exported dataset...")
with open(export_path) as infile:
... | 35.367347 | 99 | 0.660704 |
79413c5ed0215231083aa12c68aead7d23464ea7 | 21,423 | py | Python | astropy/io/fits/hdu/groups.py | zonca/astropy | 522ad1db0e5e419ba4bc57aead3ec7fb8e4fc50f | [
"BSD-3-Clause"
] | null | null | null | astropy/io/fits/hdu/groups.py | zonca/astropy | 522ad1db0e5e419ba4bc57aead3ec7fb8e4fc50f | [
"BSD-3-Clause"
] | 10 | 2017-03-15T16:14:43.000Z | 2018-11-22T14:40:54.000Z | astropy/io/fits/hdu/groups.py | tstickel/astropy | 351fa20305886a907ec0829dd5fa53f30a5ba6ff | [
"BSD-3-Clause"
] | 1 | 2020-01-23T00:41:10.000Z | 2020-01-23T00:41:10.000Z | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import sys
import numpy as np
from .base import DTYPE2BITPIX
from .image import PrimaryHDU
from .table import _TableLikeHDU
from astropy.io.fits.column import Column, ColDefs, FITS2NUMPY
from astropy.io.fits.fitsrec import FITS_rec, FITS_record
from astro... | 34.386838 | 79 | 0.545255 |
79413d7c6869695a73f64d30744aca8e883f5501 | 131,135 | py | Python | src/python/packages/amwg/amwg.py | susburrows/uvcmetrics | 5a3c1266f3e5e97398a7671b01fa2816fb307c38 | [
"X11",
"MIT"
] | null | null | null | src/python/packages/amwg/amwg.py | susburrows/uvcmetrics | 5a3c1266f3e5e97398a7671b01fa2816fb307c38 | [
"X11",
"MIT"
] | null | null | null | src/python/packages/amwg/amwg.py | susburrows/uvcmetrics | 5a3c1266f3e5e97398a7671b01fa2816fb307c38 | [
"X11",
"MIT"
] | null | null | null | #!/usr/local/uvcdat/1.3.1/bin/python
# Top-leve definition of AMWG Diagnostics.
# AMWG = Atmospheric Model Working Group
import pdb
from metrics.packages.diagnostic_groups import *
from metrics.computation.reductions import *
from metrics.computation.plotspec import *
from metrics.frontend.uvcdat import *
from metric... | 51.689003 | 160 | 0.588264 |
79413e700ce3aa19b9d6f56157bd3b288b10c269 | 7,547 | py | Python | slither/core/analysis.py | AlexanderFabisch/slither | c527e0412cf89197f907a42699a554f26cb2af59 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2021-04-23T09:06:51.000Z | 2021-08-19T07:18:32.000Z | slither/core/analysis.py | AlexanderFabisch/slither | c527e0412cf89197f907a42699a554f26cb2af59 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2021-04-01T08:55:46.000Z | 2022-02-20T18:00:53.000Z | slither/core/analysis.py | AlexanderFabisch/slither | c527e0412cf89197f907a42699a554f26cb2af59 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from collections import deque
import numpy as np
from scipy.signal import medfilt
from .config import config
def check_coords(coords):
"""Filter non-finite GPS coordinates.
Parameters
----------
coords : array, shape (n_steps, 2)
Latitudes and longitudes
Returns
-------
filtere... | 25.670068 | 77 | 0.627004 |
79413eaab87ef488a9b28a13e0be24c806c1b310 | 456 | py | Python | sphinx/source/docs/first_steps/examples/first_steps_4_plot_size.py | arefeena/bokeh | 4dd2b6536ad672532b47f52b04a2c3292c947c15 | [
"BSD-3-Clause"
] | null | null | null | sphinx/source/docs/first_steps/examples/first_steps_4_plot_size.py | arefeena/bokeh | 4dd2b6536ad672532b47f52b04a2c3292c947c15 | [
"BSD-3-Clause"
] | null | null | null | sphinx/source/docs/first_steps/examples/first_steps_4_plot_size.py | arefeena/bokeh | 4dd2b6536ad672532b47f52b04a2c3292c947c15 | [
"BSD-3-Clause"
] | null | null | null | from bokeh.plotting import figure, output_file, show
# prepare some data
x = [1, 2, 3, 4, 5]
y = [4, 5, 5, 7, 2]
# set output to static HTML file
output_file("first_steps.html")
# create a new plot with a specific size
p = figure(
title="Plot sizing example",
plot_width=350,
plot_height=250,
x_axis_l... | 19 | 52 | 0.66886 |
79413ec68d10cb3167608052cefcc8e8182ba0bc | 5,777 | py | Python | Tax-Calculator-2.9.0/taxcalc/tests/test_consumption.py | grantseiter/Biden-Tax-Proposals | c215ff845264f3fce9281c7fbb343ed10758a4b6 | [
"MIT"
] | null | null | null | Tax-Calculator-2.9.0/taxcalc/tests/test_consumption.py | grantseiter/Biden-Tax-Proposals | c215ff845264f3fce9281c7fbb343ed10758a4b6 | [
"MIT"
] | null | null | null | Tax-Calculator-2.9.0/taxcalc/tests/test_consumption.py | grantseiter/Biden-Tax-Proposals | c215ff845264f3fce9281c7fbb343ed10758a4b6 | [
"MIT"
] | null | null | null | # CODING-STYLE CHECKS:
# pycodestyle test_consumption.py
import numpy as np
import pytest
import copy
from taxcalc import Policy, Records, Calculator, Consumption
def test_year_consistency():
assert Consumption.JSON_START_YEAR == Policy.JSON_START_YEAR
assert Consumption.DEFAULT_NUM_YEARS == Policy.DEFAULT_N... | 40.118056 | 79 | 0.672494 |
79413ee9a9b448722ada0e140a2b9c72fb7efb25 | 1,019 | py | Python | release/stubs.min/Autodesk/Revit/DB/__init___parts/SATImportOptions.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/Autodesk/Revit/DB/__init___parts/SATImportOptions.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/Autodesk/Revit/DB/__init___parts/SATImportOptions.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class SATImportOptions(BaseImportOptions,IDisposable):
"""
The import options used to import SAT format files.
SATImportOptions(option: SATImportOptions)
SATImportOptions()
"""
def Dispose(self):
""" Dispose(self: BaseImportOptions,A_0: bool) """
pass
def ReleaseUnmanagedResources(self,*arg... | 29.970588 | 215 | 0.698724 |
79413eff8f41961d06e6a2b629c1e7adc42944d0 | 1,925 | py | Python | lib/systems/olympicene.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | lib/systems/olympicene.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | lib/systems/olympicene.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | import pulsar as psr
def load_ref_system():
""" Returns olympicene as found in the IQMol fragment library.
All credit to https://github.com/nutjunkie/IQmol
"""
return psr.make_system("""
C -0.00000 0.61250 2.46369
C -0.00000 -0.09959 1.24408
... | 49.358974 | 66 | 0.38026 |
79413f13161baf66f9d15f4194a10256e825a630 | 39,613 | py | Python | sympy/integrals/tests/test_transforms.py | gum3ng/sympy | e9414fafa976b26aa0b701a0217ab0f3b561989f | [
"BSD-3-Clause"
] | 1 | 2022-01-17T12:38:24.000Z | 2022-01-17T12:38:24.000Z | sympy/integrals/tests/test_transforms.py | gum3ng/sympy | e9414fafa976b26aa0b701a0217ab0f3b561989f | [
"BSD-3-Clause"
] | null | null | null | sympy/integrals/tests/test_transforms.py | gum3ng/sympy | e9414fafa976b26aa0b701a0217ab0f3b561989f | [
"BSD-3-Clause"
] | null | null | null | from sympy.integrals.transforms import (mellin_transform,
inverse_mellin_transform, laplace_transform, inverse_laplace_transform,
fourier_transform, inverse_fourier_transform,
sine_transform, inverse_sine_transform,
cosine_transform, inverse_cosine_transform,
hankel_transform, inverse_hankel_transfo... | 43.435307 | 151 | 0.526595 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.