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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a082d3c3bcbafaea739319cd0ab16f79ffd0a75 | 3,554 | py | Python | news-crawler/main.py | flavienbwk/news-crawler | f0b940dd8828ccadba6c29783c66b3f72c2d32d7 | [
"Apache-2.0"
] | 1 | 2021-09-28T12:11:34.000Z | 2021-09-28T12:11:34.000Z | news-crawler/main.py | flavienbwk/news-crawler | f0b940dd8828ccadba6c29783c66b3f72c2d32d7 | [
"Apache-2.0"
] | null | null | null | news-crawler/main.py | flavienbwk/news-crawler | f0b940dd8828ccadba6c29783c66b3f72c2d32d7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import time
import slugify
from playwright.sync_api import sync_playwright
from crawlers import CRAWLERS
from crawlers.Crawler import Crawler
from crawlers.Login import Login
from models.Media import Media
from utils import Database, Logger, Persister
FILE_PATH = os.path.realpath(_... | 33.214953 | 93 | 0.662915 |
4a082dbd5f02961c089192e1e21566c7ee562b43 | 1,124 | py | Python | tests/command_line/test_average.py | graeme-winter/dxtbx | 6cd5afee819c5e967cfa0bcd47084b3687b830d5 | [
"BSD-3-Clause"
] | null | null | null | tests/command_line/test_average.py | graeme-winter/dxtbx | 6cd5afee819c5e967cfa0bcd47084b3687b830d5 | [
"BSD-3-Clause"
] | null | null | null | tests/command_line/test_average.py | graeme-winter/dxtbx | 6cd5afee819c5e967cfa0bcd47084b3687b830d5 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import os
import procrunner
import pytest
import dxtbx
@pytest.mark.parametrize("use_mpi", [True, False])
def test_average(dials_data, tmpdir, use_mpi):
# averager uses cbf handling code in the xfel module
pytest.importorskip("xfel")
# O... | 27.414634 | 87 | 0.655694 |
4a0830479c678618b649c3f7247ef458e10c4ae2 | 15,879 | py | Python | tests/unit/fileserver/test_fileclient.py | xiaowei582648206/saltx | 1d17b030b973ce5422e0fbe7e17c98c7ca91c49b | [
"Apache-2.0"
] | 1 | 2022-02-09T06:40:14.000Z | 2022-02-09T06:40:14.000Z | tests/unit/fileserver/test_fileclient.py | xiaowei582648206/saltx | 1d17b030b973ce5422e0fbe7e17c98c7ca91c49b | [
"Apache-2.0"
] | null | null | null | tests/unit/fileserver/test_fileclient.py | xiaowei582648206/saltx | 1d17b030b973ce5422e0fbe7e17c98c7ca91c49b | [
"Apache-2.0"
] | 4 | 2020-11-04T06:28:05.000Z | 2022-02-09T10:54:49.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: Mike Place <mp@saltstack.com>
'''
# Import Python libs
from __future__ import absolute_import
import errno
import logging
import os
import shutil
# Import Salt Testing libs
from tests.integration import AdaptedConfigurationTestCaseMixin
from tests.support.mixins import Load... | 43.864641 | 94 | 0.546949 |
4a08306155c3c1389f7298e94580ff3d8e533811 | 3,072 | py | Python | jmeter_api/thread_groups/ultimate_thread_group/test_ultimate_thread_group.py | dashawn888/jmeter_api | 1ab5b02f3a7c8ad1b84fc50db4fe1fc2fa7c91bd | [
"Apache-2.0"
] | 11 | 2020-03-22T13:30:21.000Z | 2021-12-25T06:23:44.000Z | jmeter_api/thread_groups/ultimate_thread_group/test_ultimate_thread_group.py | dashawn888/jmeter_api | 1ab5b02f3a7c8ad1b84fc50db4fe1fc2fa7c91bd | [
"Apache-2.0"
] | 37 | 2019-12-18T13:12:50.000Z | 2022-02-10T10:52:37.000Z | jmeter_api/thread_groups/ultimate_thread_group/test_ultimate_thread_group.py | dashawn888/jmeter_api | 1ab5b02f3a7c8ad1b84fc50db4fe1fc2fa7c91bd | [
"Apache-2.0"
] | 5 | 2019-12-06T10:55:56.000Z | 2020-06-01T19:32:32.000Z | import xmltodict
import pytest
from jmeter_api.thread_groups.ultimate_thread_group.elements import UltimateThreadGroup, ThreadGroupAction
from jmeter_api.basics.utils import tag_wrapper
class TestUltimateThreadGroupArgs:
class TestSchedule:
def test_check(self):
with pytest.raises(TypeError):... | 54.857143 | 156 | 0.604492 |
4a0830c4c9c8cd0dff24a2d035b24843b268e8ee | 229 | py | Python | ProGitForProgrammers/Program.py | cybercritter/ProGitForProgrammers | e63f8473eb3e2199800979242e1619ecd755e6b2 | [
"MIT"
] | null | null | null | ProGitForProgrammers/Program.py | cybercritter/ProGitForProgrammers | e63f8473eb3e2199800979242e1619ecd755e6b2 | [
"MIT"
] | null | null | null | ProGitForProgrammers/Program.py | cybercritter/ProGitForProgrammers | e63f8473eb3e2199800979242e1619ecd755e6b2 | [
"MIT"
] | null | null | null | class Program:
def __init__(self):
print('Hello World!')
print('I just added this in PyCharm')
print('I just added this to the command line repo')
if __name__ == '__main__':
program = Program()
| 20.818182 | 59 | 0.615721 |
4a0831b22d1c912d91eb0d2c72b0fab7e8e99883 | 1,768 | py | Python | tests/settings.py | adamchainz/django-perf-rec | f543053d9de5bc7f52f5761fc914d342c78e37a1 | [
"MIT"
] | 147 | 2018-08-21T14:18:27.000Z | 2022-03-31T23:16:58.000Z | tests/settings.py | adamchainz/django-perf-rec | f543053d9de5bc7f52f5761fc914d342c78e37a1 | [
"MIT"
] | 48 | 2018-07-15T11:07:08.000Z | 2022-03-26T16:00:22.000Z | tests/settings.py | adamchainz/django-perf-rec | f543053d9de5bc7f52f5761fc914d342c78e37a1 | [
"MIT"
] | 11 | 2018-07-13T10:09:44.000Z | 2021-02-13T18:15:12.000Z | import os
from typing import List
import django
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = "NOTASECRET"
DATABASES = {
"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"},
"replica": {
"ENGINE": "django.db.backends.sqlit... | 26.787879 | 88 | 0.649887 |
4a0831d577593644e1038ce68cd0abf7e98dc575 | 18,181 | py | Python | testing/run_tests.py | rhencke/engine | 1016db292c4e73374a0a11536b18303c9522a224 | [
"BSD-3-Clause"
] | 13 | 2020-08-09T10:30:50.000Z | 2021-09-06T18:26:05.000Z | testing/run_tests.py | rhencke/engine | 1016db292c4e73374a0a11536b18303c9522a224 | [
"BSD-3-Clause"
] | null | null | null | testing/run_tests.py | rhencke/engine | 1016db292c4e73374a0a11536b18303c9522a224 | [
"BSD-3-Clause"
] | 4 | 2020-09-24T05:14:51.000Z | 2021-04-22T19:53:10.000Z | #!/usr/bin/env python
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
A top level harness to run all unit-tests in a specific engine build.
"""
import argparse
import glob
import os
import re
import su... | 35.859961 | 131 | 0.724493 |
4a0832f427047888b41e4338032959ab42927666 | 10,114 | py | Python | threedod/benchmark_scripts/show_3d_bbox_annotation.py | Levintsky/ARKitScenes | d209c6ae512e3638c90da8aeebf2e3a5b345807f | [
"AML"
] | 237 | 2021-12-03T03:35:31.000Z | 2022-03-28T21:05:37.000Z | threedod/benchmark_scripts/show_3d_bbox_annotation.py | Yaldatkk/ARKitScenes | 58bf410f65bc2ae2e35e3c3d2a7c45d8b7863fca | [
"AML"
] | 19 | 2021-12-05T13:58:15.000Z | 2022-03-18T14:23:55.000Z | threedod/benchmark_scripts/show_3d_bbox_annotation.py | Yaldatkk/ARKitScenes | 58bf410f65bc2ae2e35e3c3d2a7c45d8b7863fca | [
"AML"
] | 27 | 2021-12-08T06:08:15.000Z | 2022-03-30T07:08:51.000Z | import vtk
import json
import numpy as np
import argparse
import sys
import subprocess
from plyfile import PlyData
class Render(object):
def __init__(self, ply_file, json_file, back_face_cull=False):
"""
:param ply_file: path of ply file
:param json_file: path of annotation result json fil... | 33.379538 | 101 | 0.602927 |
4a0833946459e839c99d54181eeefd7cdfb6294d | 842 | py | Python | m_src/transaction/range.py | komthanh/v20-python-samples | 27047c332aa3d34217819a593834effb13414d40 | [
"MIT"
] | null | null | null | m_src/transaction/range.py | komthanh/v20-python-samples | 27047c332aa3d34217819a593834effb13414d40 | [
"MIT"
] | null | null | null | m_src/transaction/range.py | komthanh/v20-python-samples | 27047c332aa3d34217819a593834effb13414d40 | [
"MIT"
] | null | null | null | import argparse
import common.config
import common.args
def main():
parser = argparse.ArgumentParser()
common.config.add_argument(parser)
parser.add_argument('fromid')
parser.add_argument('toid')
parser.add_argument('--type', action='append')
args = parser.parse_args("1 60 --type".split() + ... | 25.515152 | 97 | 0.674584 |
4a0834cc54a0f5692b312c51f9eef7d4a2b3e301 | 4,202 | py | Python | data_cleaning/data_cleaning.py | Rishabh1501/discord-review-bot | a9f8f4b42dc88d93e52c7c8e53b9260b2441bf43 | [
"MIT"
] | null | null | null | data_cleaning/data_cleaning.py | Rishabh1501/discord-review-bot | a9f8f4b42dc88d93e52c7c8e53b9260b2441bf43 | [
"MIT"
] | null | null | null | data_cleaning/data_cleaning.py | Rishabh1501/discord-review-bot | a9f8f4b42dc88d93e52c7c8e53b9260b2441bf43 | [
"MIT"
] | null | null | null | """
Copyright (c) 2021 Rishabh Kalra <rishabhkalra1501@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify,... | 35.016667 | 112 | 0.627082 |
4a083625f535cdcfdfb73b66236474206c832670 | 40,057 | py | Python | rig/face_feature_manager.py | jzboylxj/XDLibs | 76ab640502d7e254bc98930d6ebb9e870476ed9a | [
"MIT"
] | 1 | 2021-03-11T02:24:08.000Z | 2021-03-11T02:24:08.000Z | rig/face_feature_manager.py | jzboylxj/XDLibs | 76ab640502d7e254bc98930d6ebb9e870476ed9a | [
"MIT"
] | null | null | null | rig/face_feature_manager.py | jzboylxj/XDLibs | 76ab640502d7e254bc98930d6ebb9e870476ed9a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# @Time : 2020/12/18 9:57
# @Author : Li XiaoJun
# @Site :
# @File : face_feature_manager.py
import os
from imp import reload
import pymel.core as pm
from animation import common as xd_com, helper
reload(xd_com)
version = 0.2
def get_module_list(path="", return_type=... | 40.177533 | 119 | 0.580048 |
4a0836aa83a5697d9da1f7723c7d635057b611fc | 3,625 | gyp | Python | externals/skia/gyp/svg.gyp | terrajobst/linux-packaging-skiasharp | 47dbb2ff9ae01305b190f409ccea00b3b4f0bc79 | [
"MIT"
] | 1 | 2019-10-29T14:36:32.000Z | 2019-10-29T14:36:32.000Z | externals/skia/gyp/svg.gyp | terrajobst/linux-packaging-skiasharp | 47dbb2ff9ae01305b190f409ccea00b3b4f0bc79 | [
"MIT"
] | 1 | 2017-06-18T00:25:03.000Z | 2017-11-29T16:01:48.000Z | externals/skia/gyp/svg.gyp | terrajobst/linux-packaging-skiasharp | 47dbb2ff9ae01305b190f409ccea00b3b4f0bc79 | [
"MIT"
] | 5 | 2017-11-30T06:06:50.000Z | 2022-03-31T21:48:49.000Z | # Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'svg',
'product_name': 'skia_svg',
'type': 'static_library',
'standalone_static_library': 1,
'dependencies': [
... | 35.539216 | 72 | 0.593103 |
4a0836cb0882c92f49f609e23f9a4d2d8cd6b288 | 9,686 | py | Python | hospital/urls.py | romsha28/hospital_python | 1bb86266223df5084321917169156aaec1c5e318 | [
"Apache-2.0"
] | null | null | null | hospital/urls.py | romsha28/hospital_python | 1bb86266223df5084321917169156aaec1c5e318 | [
"Apache-2.0"
] | 1 | 2021-10-18T08:56:11.000Z | 2021-10-18T08:56:11.000Z | hospital/urls.py | romsha28/hospital_python | 1bb86266223df5084321917169156aaec1c5e318 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from django.urls import path
from django.core.exceptions import PermissionDenied
from django.http import HttpResponse
from django.test import SimpleTestCase, override_settings
from . import views
def response_error_handler(request, exception=None):
return HttpResponse('Error handle... | 64.573333 | 123 | 0.6688 |
4a083718d134ede122d5a761c592318a9fa5748e | 14,574 | py | Python | tests/test_extra.py | nicoddemus/promise | 4627315476f6b9fc82818327ae09b04f89f9bda7 | [
"MIT"
] | 339 | 2016-05-18T11:25:39.000Z | 2022-03-27T08:15:53.000Z | tests/test_extra.py | syrusakbary/pypromise | 4627315476f6b9fc82818327ae09b04f89f9bda7 | [
"MIT"
] | 81 | 2016-05-24T17:07:49.000Z | 2021-12-20T15:39:52.000Z | tests/test_extra.py | syrusakbary/pypromise | 4627315476f6b9fc82818327ae09b04f89f9bda7 | [
"MIT"
] | 76 | 2016-05-24T16:55:06.000Z | 2022-03-19T12:42:44.000Z | # This exercises some capabilities above and beyond
# the Promises/A+ test suite
from time import sleep
from pytest import raises, fixture
from threading import Event
from promise import (
Promise,
is_thenable,
promisify,
promise_for_dict as free_promise_for_dict,
)
from concurrent.futures import Futur... | 21.719821 | 121 | 0.619665 |
4a08376c13e6d7f0a8bd52e834bc9b4f1f10ae69 | 18,365 | py | Python | sdk/python/pulumi_azure_native/network/v20200801/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20200801/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20200801/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from ._enums import *
from .application_gateway import *
from .application_gateway_private_endpoint_connect... | 55.990854 | 105 | 0.735148 |
4a0837c419b7a0b71d290ffb78e270f7d80135b1 | 82 | py | Python | ex001.py | natanpaess/Python_CeV | 17126d33ad6a06cbc7947243f0205b131c551fb6 | [
"MIT"
] | null | null | null | ex001.py | natanpaess/Python_CeV | 17126d33ad6a06cbc7947243f0205b131c551fb6 | [
"MIT"
] | null | null | null | ex001.py | natanpaess/Python_CeV | 17126d33ad6a06cbc7947243f0205b131c551fb6 | [
"MIT"
] | null | null | null | # Crie um programa que mostre "Olá mundo" na tela.
msg = 'Olá, Mundo!'
print(msg) | 20.5 | 50 | 0.682927 |
4a0837f9090356b0adbd2cf1b6d57eb72b5557b8 | 3,134 | py | Python | RSS2ATOM/transformation/HoutcategoriesSolveRefChannelCategoryATOMCategory.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 3 | 2017-06-02T19:26:27.000Z | 2021-06-14T04:25:45.000Z | RSS2ATOM/transformation/HoutcategoriesSolveRefChannelCategoryATOMCategory.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 8 | 2016-08-24T07:04:07.000Z | 2017-05-26T16:22:47.000Z | RSS2ATOM/transformation/HoutcategoriesSolveRefChannelCategoryATOMCategory.py | levilucio/SyVOLT | 7526ec794d21565e3efcc925a7b08ae8db27d46a | [
"MIT"
] | 1 | 2019-10-31T06:00:23.000Z | 2019-10-31T06:00:23.000Z | from core.himesis import Himesis
import uuid
class HoutcategoriesSolveRefChannelCategoryATOMCategory(Himesis):
def __init__(self):
"""
Creates the himesis graph representing the DSLTrans rule outcategoriesSolveRefChannelCategoryATOMCategory.
"""
# Flag this instance as compiled now
self.is_compiled = True
... | 35.213483 | 154 | 0.678047 |
4a083849bd39f606877069419396d8c42ef077eb | 3,376 | py | Python | tensorflow/python/grappler/item.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 24 | 2018-02-01T15:49:22.000Z | 2021-01-11T16:31:18.000Z | tensorflow/python/grappler/item.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 13 | 2020-01-28T22:20:14.000Z | 2022-03-11T23:20:14.000Z | tensorflow/python/grappler/item.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 13 | 2018-09-07T13:28:38.000Z | 2020-07-17T15:06:24.000Z | # Copyright 2017 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... | 35.166667 | 80 | 0.695201 |
4a08385702ff6725e29813c1c1a7bc7306bc2fa2 | 7,580 | py | Python | wizard_builder/tests/test_migrations.py | SexualHealthInnovations/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 16 | 2016-06-21T04:05:24.000Z | 2017-09-26T15:40:24.000Z | wizard_builder/tests/test_migrations.py | SexualHealthInnovations/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 141 | 2016-06-21T20:46:46.000Z | 2017-09-28T00:20:49.000Z | wizard_builder/tests/test_migrations.py | project-callisto/django-wizard-builder | f5effe8c462313f16be914b562dbea8ea796b672 | [
"BSD-3-Clause"
] | 7 | 2017-10-04T22:52:18.000Z | 2018-05-31T17:14:39.000Z | from django_migration_testcase import MigrationTest
class SitesMigrationTest(MigrationTest):
app_name = 'wizard_builder'
before = '0005_delete_constraints'
after = '0006_many_sites'
def migrate_kwargs(self):
return {
'verbosity': 1,
'interactive': False,
}
... | 31.452282 | 79 | 0.666095 |
4a0838bd7930a5a43c5cde11bb2874fc9383d769 | 1,714 | py | Python | app/models.py | PatrickRudgeri/financial-mngt | 42754e7ade89805a2297c1783f86a0451dec4674 | [
"MIT"
] | 2 | 2021-08-06T20:26:40.000Z | 2021-09-02T22:47:42.000Z | app/models.py | PHenriqueCEC/financial-mngt | 42754e7ade89805a2297c1783f86a0451dec4674 | [
"MIT"
] | null | null | null | app/models.py | PHenriqueCEC/financial-mngt | 42754e7ade89805a2297c1783f86a0451dec4674 | [
"MIT"
] | 2 | 2021-08-02T23:17:56.000Z | 2021-08-31T23:42:26.000Z | from django.db import models
from django.contrib.auth.models import User
from django.urls import reverse
# https://docs.djangoproject.com/pt-br/3.2/ref/contrib/auth/#user-model
# classe User
class CategoriaReceita(models.Model):
nome = models.CharField(max_length=50)
usuario = models.ForeignKey(User, on_dele... | 30.070175 | 123 | 0.703617 |
4a0838f852690c703efc974cf336fd75555f4a1d | 3,358 | py | Python | tests/integration/TestSQLite3.py | rakhimov/rtk | adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/TestSQLite3.py | rakhimov/rtk | adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/TestSQLite3.py | rakhimov/rtk | adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63 | [
"BSD-3-Clause"
] | 2 | 2020-04-03T04:14:42.000Z | 2021-02-22T05:30:35.000Z | #!/usr/bin/env python -O
"""
This is the test class for testing the Environment class.
"""
# -*- coding: utf-8 -*-
#
# rtk.tests.unit.TestDAO.py is part of The RTK Project
#
# All rights reserved.
# Copyright 2007 - 2017 Andrew Rowland andrew.rowland <AT> reliaqual <DOT> com
#
# Redistribution and use in source ... | 34.979167 | 88 | 0.705479 |
4a083948c5757e969a9fc7e41488969c0db8f29c | 11,778 | py | Python | utils/nuswide_dataset.py | stevehuanghe/multi_label_zsl | 68ac74d4e6ed2c2528fbae7f0a05df7c5e73bc78 | [
"MIT"
] | 4 | 2021-05-14T15:40:38.000Z | 2021-11-02T06:26:58.000Z | utils/nuswide_dataset.py | stevehuanghe/multi_label_zsl | 68ac74d4e6ed2c2528fbae7f0a05df7c5e73bc78 | [
"MIT"
] | null | null | null | utils/nuswide_dataset.py | stevehuanghe/multi_label_zsl | 68ac74d4e6ed2c2528fbae7f0a05df7c5e73bc78 | [
"MIT"
] | 1 | 2021-06-15T15:13:09.000Z | 2021-06-15T15:13:09.000Z | import torch
import torch.utils.data as data
import torchvision.transforms as transforms
import os
from pathlib import Path
import pickle
import numpy as np
from PIL import Image
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
import csv
import copy
class NUSWideDataset(data.Dataset):
"""Custom D... | 35.690909 | 114 | 0.60197 |
4a0839d25dbfa3e9c8bbcc9e5f8b2d307d2face7 | 832 | py | Python | Server/prediction/migrations/0005_auto_20210422_1951.py | mohanj098/Item-Price-Forecasting | 14fc787ad4d9dcc6af03b43fa5e866cd254a99f5 | [
"MIT"
] | null | null | null | Server/prediction/migrations/0005_auto_20210422_1951.py | mohanj098/Item-Price-Forecasting | 14fc787ad4d9dcc6af03b43fa5e866cd254a99f5 | [
"MIT"
] | 2 | 2021-03-15T15:53:22.000Z | 2021-05-03T09:32:34.000Z | Server/prediction/migrations/0005_auto_20210422_1951.py | mohanj098/Item-Price-Forecasting | 14fc787ad4d9dcc6af03b43fa5e866cd254a99f5 | [
"MIT"
] | 1 | 2021-05-04T15:35:06.000Z | 2021-05-04T15:35:06.000Z | # Generated by Django 3.1.7 on 2021-04-22 14:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('prediction', '0004_auto_20210421_1329'),
]
operations = [
migrations.RenameField(
model_name='price',
old_name='cost... | 24.470588 | 51 | 0.545673 |
4a083c2b2c1c09cd7d853947a938f7054e3baa71 | 10,332 | py | Python | model/twossrnet.py | kcv-if/Agendernet-SSD | 4d33ba5623a6869b3f78a490b6e8857d4b70bce3 | [
"MIT"
] | null | null | null | model/twossrnet.py | kcv-if/Agendernet-SSD | 4d33ba5623a6869b3f78a490b6e8857d4b70bce3 | [
"MIT"
] | null | null | null | model/twossrnet.py | kcv-if/Agendernet-SSD | 4d33ba5623a6869b3f78a490b6e8857d4b70bce3 | [
"MIT"
] | null | null | null | import numpy as np
from keras.layers import Dense, Flatten, Dropout, GlobalAveragePooling2D, Input, Conv2D
from keras.layers import Activation, Multiply, Lambda, AveragePooling2D, MaxPooling2D, BatchNormalization
from keras.models import Model
from keras.utils import plot_model
from keras import backend as K
class Tw... | 40.837945 | 131 | 0.555265 |
4a083c3129fc7ea8995a08b39a4205b056c3f32d | 3,114 | py | Python | notebooks/image_models/labs/mnist_models/trainer/model.py | jfesteban/Google-ASL | 8e991a437e348b1950cdc351dba39e2d40a6b08f | [
"Apache-2.0"
] | null | null | null | notebooks/image_models/labs/mnist_models/trainer/model.py | jfesteban/Google-ASL | 8e991a437e348b1950cdc351dba39e2d40a6b08f | [
"Apache-2.0"
] | null | null | null | notebooks/image_models/labs/mnist_models/trainer/model.py | jfesteban/Google-ASL | 8e991a437e348b1950cdc351dba39e2d40a6b08f | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tensorflow.keras import Sequential
from tensorflow.keras.callbacks import TensorBoard
from tensorflow.keras.layers import (
Conv2D, Dense, Dropout, Flatten, MaxPooling2D, Softmax)
from . import util
# Image V... | 28.833333 | 100 | 0.613359 |
4a083d1f6613edbbcf002a209279995d56afa3a7 | 7,608 | py | Python | runtime_mgr_api/api.py | adam-j-turner/runtime-mgr-api | a10b1034ec6f731eb1eaa82bb090913b815cdf09 | [
"MIT"
] | 1 | 2018-11-14T19:02:41.000Z | 2018-11-14T19:02:41.000Z | runtime_mgr_api/api.py | adam-j-turner/runtime-mgr-api | a10b1034ec6f731eb1eaa82bb090913b815cdf09 | [
"MIT"
] | null | null | null | runtime_mgr_api/api.py | adam-j-turner/runtime-mgr-api | a10b1034ec6f731eb1eaa82bb090913b815cdf09 | [
"MIT"
] | null | null | null | from .constants import *
import datetime
import functools
import requests
import hashlib
import time
import re
class UnauthorizedError(Exception):
pass
class AnypointAuthError(Exception):
pass
class AnypointRequestError(Exception):
pass
class OrgError(Exception):
pass
class EnvError(Exception)... | 27.970588 | 79 | 0.57663 |
4a083d7ca57bbe8ab58b40305420bbb32e912a9a | 9,709 | py | Python | images/pannotator/p_procariota/gbf2gff.py | ezequieljsosa/sndg-bio | 5f709b5b572564ec1dfa40d090eca9a34295743e | [
"MIT"
] | null | null | null | images/pannotator/p_procariota/gbf2gff.py | ezequieljsosa/sndg-bio | 5f709b5b572564ec1dfa40d090eca9a34295743e | [
"MIT"
] | null | null | null | images/pannotator/p_procariota/gbf2gff.py | ezequieljsosa/sndg-bio | 5f709b5b572564ec1dfa40d090eca9a34295743e | [
"MIT"
] | 1 | 2020-09-01T15:57:54.000Z | 2020-09-01T15:57:54.000Z | #!/usr/bin/python
import sys
import re
import getopt
from copy import copy
from Bio import SeqIO
def help():
print "Conversion gbf -> tbl + gff3 + fasta.\n\
Opciones:\n\
-i Archivo de entrada gbf. Default: contigs.gbf\n\
-t Archivo de salida tbl. Default: archivo_de_entrada.tbl\n\
-g Archivo de salida gff3.... | 44.949074 | 453 | 0.58523 |
4a083d9bd143996d71fb7d240d9c8704510b9988 | 6,994 | py | Python | paddleseg/models/isanet.py | wen-flow/PaddleSeg | cc18ef1d4d06166539bbeb90c44c79a21d1b8df4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-03-14T13:48:42.000Z | 2021-03-14T13:48:42.000Z | paddleseg/models/isanet.py | wen-flow/PaddleSeg | cc18ef1d4d06166539bbeb90c44c79a21d1b8df4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | paddleseg/models/isanet.py | wen-flow/PaddleSeg | cc18ef1d4d06166539bbeb90c44c79a21d1b8df4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 applic... | 39.072626 | 117 | 0.633543 |
4a083dbbd5f8e1568f9425bce4effef57fe58423 | 13,782 | py | Python | support/android/android.py | kasatani/titanium_mobile | 714ab28ba58ba12f2339e9bfe54d3479676b6503 | [
"Apache-2.0"
] | null | null | null | support/android/android.py | kasatani/titanium_mobile | 714ab28ba58ba12f2339e9bfe54d3479676b6503 | [
"Apache-2.0"
] | 1 | 2018-10-02T13:36:41.000Z | 2018-10-02T13:36:41.000Z | support/android/android.py | kasatani/titanium_mobile | 714ab28ba58ba12f2339e9bfe54d3479676b6503 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Appcelerator Titanium Mobile
# Copyright (c) 2011 by Appcelerator, Inc. All Rights Reserved.
# Licensed under the terms of the Apache Public License
# Please see the LICENSE included with this distribution for details.
#
# Android Application Script
#
import os, sys, s... | 39.83237 | 243 | 0.71753 |
4a083ed7081297469c42be3f1f942781414654e6 | 511 | py | Python | mmdet/models/backbones/__init__.py | azuredsky/RepPointsV2 | 735a585b365e223e5cac10b431d13d279595c144 | [
"MIT"
] | 295 | 2020-07-16T13:03:29.000Z | 2022-03-29T05:20:12.000Z | mmdet/models/backbones/__init__.py | azuredsky/RepPointsV2 | 735a585b365e223e5cac10b431d13d279595c144 | [
"MIT"
] | 23 | 2020-07-17T03:05:08.000Z | 2021-05-20T19:01:07.000Z | mmdet/models/backbones/__init__.py | azuredsky/RepPointsV2 | 735a585b365e223e5cac10b431d13d279595c144 | [
"MIT"
] | 50 | 2020-07-17T02:16:52.000Z | 2022-03-02T12:45:21.000Z | from .detectors_resnet import DetectoRS_ResNet
from .detectors_resnext import DetectoRS_ResNeXt
from .hourglass import HourglassNet
from .hrnet import HRNet
from .mobilenet import MobileNetV2
from .regnet import RegNet
from .res2net import Res2Net
from .resnet import ResNet, ResNetV1d
from .resnext import ResNeXt
from ... | 31.9375 | 77 | 0.782779 |
4a083f4e33d5d8c21484ace1c6b4906b0aa764e8 | 546 | py | Python | utilities/TNPy/TNFunc.py | aniabrown/QuEST-TN | 8e0c8686859531d670d537af5eec03b7232f6b26 | [
"MIT"
] | null | null | null | utilities/TNPy/TNFunc.py | aniabrown/QuEST-TN | 8e0c8686859531d670d537af5eec03b7232f6b26 | [
"MIT"
] | 1 | 2020-02-06T07:02:40.000Z | 2021-03-01T14:44:40.000Z | utilities/TNPy/TNFunc.py | aniabrown/QuEST-TN | 8e0c8686859531d670d537af5eec03b7232f6b26 | [
"MIT"
] | null | null | null | from QuESTPy.QuESTTypes import *
from .TNTypes import *
# Public API
contractIndices = TNTestee ("contractIndices", retType=Tensor, argType=[Tensor, Tensor, POINTER(c_int), POINTER(c_int), c_int, \
POINTER(c_int), c_int, POINTER(c_int), c_int,
QuESTEnv])
initVirtualTarget = TNTestee("initVirtualTarge... | 36.4 | 128 | 0.747253 |
4a084053a1fc3c37636acf6ae60d20e025916221 | 1,050 | py | Python | recorder/main.py | RamtinAlami/BCI-Drone-Project | 4c8c27d16433d3cdd856deac49569d3128c6a254 | [
"MIT"
] | null | null | null | recorder/main.py | RamtinAlami/BCI-Drone-Project | 4c8c27d16433d3cdd856deac49569d3128c6a254 | [
"MIT"
] | null | null | null | recorder/main.py | RamtinAlami/BCI-Drone-Project | 4c8c27d16433d3cdd856deac49569d3128c6a254 | [
"MIT"
] | null | null | null | import curses
import time
import random
from curses.textpad import rectangle
# def start():
def main(stdscr):
curses.curs_set(0)
draw_squares(stdscr)
while True:
selected = random.randint(0, 2)
wait = random.random() * 2 + 1
time.sleep(wait)
draw_squares(stdscr, selected=... | 22.826087 | 73 | 0.591429 |
4a08408f40b51db7fecd4d925dc984b31e772237 | 793 | py | Python | tap_amazon_advertising/__init__.py | fishtown-analytics/tap-amazon-advertising | 04aecf16a9c4f418f00b67b85fc0f4dc5db3f171 | [
"Apache-2.0"
] | 2 | 2019-09-10T15:25:39.000Z | 2019-12-12T14:50:05.000Z | tap_amazon_advertising/__init__.py | dbt-labs/tap-amazon-advertising | 04aecf16a9c4f418f00b67b85fc0f4dc5db3f171 | [
"Apache-2.0"
] | 1 | 2021-02-17T13:32:02.000Z | 2021-02-24T17:52:02.000Z | tap_amazon_advertising/__init__.py | fishtown-analytics/tap-amazon-advertising | 04aecf16a9c4f418f00b67b85fc0f4dc5db3f171 | [
"Apache-2.0"
] | 5 | 2019-09-10T15:25:47.000Z | 2020-11-03T11:55:10.000Z | #!/usr/bin/env python3
import singer
import tap_framework
from tap_amazon_advertising.client import AmazonAdvertisingClient
from tap_amazon_advertising.streams import AVAILABLE_STREAMS
LOGGER = singer.get_logger() # noqa
class AmazonAdvertisingRunner(tap_framework.Runner):
pass
@singer.utils.handle_top_exc... | 22.027778 | 76 | 0.708701 |
4a0841267c9f873f27d72f9aa5e39074e294ff1f | 4,210 | py | Python | tartiflette/executors/basic.py | alexchamberlain/tartiflette | 6904b0f47770c348553e907be5f5bdb0929fe149 | [
"MIT"
] | null | null | null | tartiflette/executors/basic.py | alexchamberlain/tartiflette | 6904b0f47770c348553e907be5f5bdb0929fe149 | [
"MIT"
] | 1 | 2020-08-11T15:41:41.000Z | 2020-08-11T15:41:41.000Z | tartiflette/executors/basic.py | alexchamberlain/tartiflette | 6904b0f47770c348553e907be5f5bdb0929fe149 | [
"MIT"
] | null | null | null | import asyncio
from typing import Any, AsyncIterable, Callable, Dict, List, Optional
from tartiflette.executors.types import ExecutionContext
from tartiflette.types.exceptions.tartiflette import (
UnknownAnonymousdOperation,
UnknownNamedOperation,
)
async def _execute(
root_resolvers: List["NodeField"],... | 28.639456 | 88 | 0.644656 |
4a08418ed105494b1bc9a13dd10a76bbb595e8d6 | 60,723 | py | Python | torchaudio/functional/filtering.py | underdogliu/audio | 38e530d77e5a194d4e5f91356cc1a191207a3b29 | [
"BSD-2-Clause"
] | null | null | null | torchaudio/functional/filtering.py | underdogliu/audio | 38e530d77e5a194d4e5f91356cc1a191207a3b29 | [
"BSD-2-Clause"
] | null | null | null | torchaudio/functional/filtering.py | underdogliu/audio | 38e530d77e5a194d4e5f91356cc1a191207a3b29 | [
"BSD-2-Clause"
] | null | null | null | import math
import warnings
from typing import Optional
import torch
from torch import Tensor
def _dB2Linear(x: float) -> float:
return math.exp(x * math.log(10) / 20.0)
def _generate_wave_table(
wave_type: str,
data_type: str,
table_size: int,
min: float,
max: float,
phase: float,
... | 36.536101 | 119 | 0.630222 |
4a08425ffb167ba8ab6e7c45bc2c4bc6f3f90d11 | 4,008 | py | Python | tools/boostbook/test/more/run-tests.py | lijgame/boost | ec2214a19cdddd1048058321a8105dd0231dac47 | [
"BSL-1.0"
] | null | null | null | tools/boostbook/test/more/run-tests.py | lijgame/boost | ec2214a19cdddd1048058321a8105dd0231dac47 | [
"BSL-1.0"
] | null | null | null | tools/boostbook/test/more/run-tests.py | lijgame/boost | ec2214a19cdddd1048058321a8105dd0231dac47 | [
"BSL-1.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2010 Daniel James.
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
"""Boostbook tests
Usage: python build_docs.py [--generate-gold]
"""
import difflib, getopt, os, re, ... | 31.559055 | 82 | 0.529691 |
4a0842b7433093fa065c0fad56ed1e0a4e524a61 | 75,810 | py | Python | tests/unit/faucet/valve_test_lib.py | snak1219/faucet | 811048bcbc7ed3828ff2f034c2668010c226eacc | [
"Apache-2.0"
] | null | null | null | tests/unit/faucet/valve_test_lib.py | snak1219/faucet | 811048bcbc7ed3828ff2f034c2668010c226eacc | [
"Apache-2.0"
] | null | null | null | tests/unit/faucet/valve_test_lib.py | snak1219/faucet | 811048bcbc7ed3828ff2f034c2668010c226eacc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Library for test_valve.py."""
# Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You... | 38.345979 | 118 | 0.518335 |
4a084379df918ed1341b646644e212e6afae97df | 2,904 | bzl | Python | test/starlark_tests/rules/dsyms_test.bzl | uber-common/rules_apple | 12ac0738c56f8a15c714a7e09ec87a1bbdbcada9 | [
"Apache-2.0"
] | 2 | 2020-06-22T11:57:11.000Z | 2021-04-09T20:20:35.000Z | test/starlark_tests/rules/dsyms_test.bzl | fnazarios/rules_apple | 7d9a469023b55d8c047c4f02e3fe14e64c91e8ff | [
"Apache-2.0"
] | null | null | null | test/starlark_tests/rules/dsyms_test.bzl | fnazarios/rules_apple | 7d9a469023b55d8c047c4f02e3fe14e64c91e8ff | [
"Apache-2.0"
] | 1 | 2021-03-26T20:14:03.000Z | 2021-03-26T20:14:03.000Z | # Copyright 2019 The Bazel 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 applicable la... | 29.333333 | 100 | 0.640496 |
4a084487c244576811ebd58987fa495da7f0f7b2 | 10,141 | py | Python | moments_dnns/run_experiment.py | alabatie/moments-dnns | fea8f96481599be387be7612e8eaa26b097906f7 | [
"Apache-2.0"
] | 4 | 2019-08-11T22:54:38.000Z | 2020-02-14T08:34:10.000Z | moments_dnns/run_experiment.py | labatie-ai/moments-dnns | fea8f96481599be387be7612e8eaa26b097906f7 | [
"Apache-2.0"
] | null | null | null | moments_dnns/run_experiment.py | labatie-ai/moments-dnns | fea8f96481599be387be7612e8eaa26b097906f7 | [
"Apache-2.0"
] | 2 | 2019-08-11T22:57:24.000Z | 2020-04-29T08:06:49.000Z | import numpy as np
from tqdm.auto import tqdm
import fire
import inspect
from moments_dnns.manage_experiments import save_experiment
from moments_dnns.main_utils import get_name_moments, get_submodel_constants
from moments_dnns.main_utils import load_dataset, make_asserts
from moments_dnns.models import init_original... | 38.558935 | 84 | 0.645992 |
4a0845411bcc64b103e36d60f198383ada971d34 | 19,265 | py | Python | scripts/gen_pseudo_label.py | knjcode/kaggle-kuzushiji-recognition-2019 | 2aa47722e961745898f70d40145ecd286666f8b7 | [
"MIT"
] | 20 | 2019-10-25T17:28:26.000Z | 2020-12-24T06:29:04.000Z | scripts/gen_pseudo_label.py | knjcode/kaggle-kuzushiji-recognition-2019 | 2aa47722e961745898f70d40145ecd286666f8b7 | [
"MIT"
] | 3 | 2021-06-08T20:31:34.000Z | 2022-03-12T00:03:05.000Z | scripts/gen_pseudo_label.py | knjcode/kaggle-kuzushiji-recognition-2019 | 2aa47722e961745898f70d40145ecd286666f8b7 | [
"MIT"
] | 6 | 2019-11-24T02:09:08.000Z | 2022-03-24T12:27:21.000Z | #!/usr/bin/env python
# coding: utf-8
import math
import os
import pickle
import pandas as pd
import numpy as np
import torch
from PIL import Image
from sklearn.metrics import accuracy_score, recall_score, precision_score, f1_score
from sklearn.model_selection import train_test_split
import lightgbm as lgb
from sklear... | 41.341202 | 139 | 0.640696 |
4a0845600d5fabc5c8a743429f08006083c1629c | 5,764 | py | Python | psy_win/psy_windrive.py | ppsyOps/psyOps | d01746f64b206984a901ae11a522eabcb8a3d644 | [
"MIT"
] | 1 | 2016-12-01T18:42:41.000Z | 2016-12-01T18:42:41.000Z | psy_win/psy_windrive.py | cuihantao/psyOps | d01746f64b206984a901ae11a522eabcb8a3d644 | [
"MIT"
] | null | null | null | psy_win/psy_windrive.py | cuihantao/psyOps | d01746f64b206984a901ae11a522eabcb8a3d644 | [
"MIT"
] | 1 | 2016-12-01T18:42:58.000Z | 2016-12-01T18:42:58.000Z |
# ********** FOR WINDOWS ONLY **********
# adapted from http://stackoverflow.com/questions/2625877/copy-files-to-windrive-path-or-drive-using-python
#the two NET USE commands come in pair and the second one should always be executed when the first one was executed (even if an exception was raised somewhere in... | 41.768116 | 171 | 0.685808 |
4a0846df3abe67bef7d87b06969825f8dbf7b9ac | 11,443 | py | Python | modules/dials/test/algorithms/refinement/test_parameter_auto_reduction.py | jorgediazjr/dials-dev20191018 | 77d66c719b5746f37af51ad593e2941ed6fbba17 | [
"BSD-3-Clause"
] | null | null | null | modules/dials/test/algorithms/refinement/test_parameter_auto_reduction.py | jorgediazjr/dials-dev20191018 | 77d66c719b5746f37af51ad593e2941ed6fbba17 | [
"BSD-3-Clause"
] | null | null | null | modules/dials/test/algorithms/refinement/test_parameter_auto_reduction.py | jorgediazjr/dials-dev20191018 | 77d66c719b5746f37af51ad593e2941ed6fbba17 | [
"BSD-3-Clause"
] | 1 | 2020-02-04T15:39:06.000Z | 2020-02-04T15:39:06.000Z | from __future__ import absolute_import, division, print_function
import copy
import pytest
from dials.algorithms.refinement.reflection_manager import (
phil_scope as refman_phil_scope,
)
from dials.algorithms.refinement.reflection_manager import ReflectionManagerFactory
from dials.algorithms.refinement.parameteri... | 34.993884 | 95 | 0.688631 |
4a08473ad0d4f3cd00c2212d0dcb6dc3ebcf29e0 | 493 | py | Python | dictionaries.py | Roicochoa/astr-119-hw-1 | 1fb4efd072189d03a6ec8681b354d23adcd3e56c | [
"MIT"
] | null | null | null | dictionaries.py | Roicochoa/astr-119-hw-1 | 1fb4efd072189d03a6ec8681b354d23adcd3e56c | [
"MIT"
] | 1 | 2018-10-09T20:13:15.000Z | 2018-10-09T20:13:15.000Z | dictionaries.py | Roicochoa/astr-119-hw-1 | 1fb4efd072189d03a6ec8681b354d23adcd3e56c | [
"MIT"
] | null | null | null | #define a dictionary data structure
#dictionaries have key : value for the elements
example_dict = {
"class" : "Astr 119",
"prof" : "Brant",
"awesomeness" : 10
}
print(type(example_dict)) #will say dict
#get a value via key
course = example_dict["class"]
print(course)
#change a value via key
example_dict["aw... | 21.434783 | 55 | 0.732252 |
4a084774d58e4c8ee765037998fe912d9a066658 | 3,712 | py | Python | PythonCode/LatencyArbitrageAnalysis/utils/Dtypes.py | ericbudish/HFT-Races | fe9ffc2da98b529e43e25800695aad698b46b10a | [
"BSD-3-Clause"
] | 11 | 2021-09-16T10:05:30.000Z | 2022-02-26T00:18:26.000Z | PythonCode/LatencyArbitrageAnalysis/utils/Dtypes.py | ericbudish/HFT-Races | fe9ffc2da98b529e43e25800695aad698b46b10a | [
"BSD-3-Clause"
] | null | null | null | PythonCode/LatencyArbitrageAnalysis/utils/Dtypes.py | ericbudish/HFT-Races | fe9ffc2da98b529e43e25800695aad698b46b10a | [
"BSD-3-Clause"
] | 4 | 2021-09-23T13:41:54.000Z | 2022-01-11T18:10:13.000Z | '''
dtypes.py
This file stores the Pandas data types for each data field.
Users should refer to Section 3 of the Code and Data Appendix for
detailed instructions on how to pre-process the exchange message
data.
'''
## dtypes for exchange message data after pre-processing
dtypes_raw_msgs = {
'ClientOrderID':'... | 53.797101 | 98 | 0.640356 |
4a0848a35a3418f89ee9237a7804483f87acc661 | 967 | py | Python | tests/packages/sub_package/kitty/speak/purr.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | 1 | 2019-03-31T09:56:11.000Z | 2019-03-31T09:56:11.000Z | tests/packages/sub_package/kitty/speak/purr.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | null | null | null | tests/packages/sub_package/kitty/speak/purr.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python test originally created or extracted from other peoples work. The
# parts from me are licensed as below. It is at least Free Software where
# it's copied from other people. In these cases, that will normally be
# indicated.
#
# L... | 40.291667 | 78 | 0.716649 |
4a084a2c4f357ee666a272e263a1bc855c8b28e8 | 5,642 | py | Python | examples/pytorch/dimenet/modules/basis_utils.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 9,516 | 2018-12-08T22:11:31.000Z | 2022-03-31T13:04:33.000Z | examples/pytorch/dimenet/modules/basis_utils.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 2,494 | 2018-12-08T22:43:00.000Z | 2022-03-31T21:16:27.000Z | examples/pytorch/dimenet/modules/basis_utils.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 2,529 | 2018-12-08T22:56:14.000Z | 2022-03-31T13:07:41.000Z | import numpy as np
import sympy as sym
from scipy.optimize import brentq
from scipy import special as sp
def Jn(r, n):
"""
r: int or list
n: int or list
len(r) == len(n)
return value should be the same shape as the input data
===
example:
r = n = np.array([1, 2, 3, 4])
res ... | 31.875706 | 125 | 0.529777 |
4a084ab148500a8359188ecc2ded819e02881d3a | 79 | py | Python | vq/__init__.py | anonymouspaperowner/range-search | d382278f5db853b645bcd6b83cc4458f386e8f20 | [
"MIT"
] | null | null | null | vq/__init__.py | anonymouspaperowner/range-search | d382278f5db853b645bcd6b83cc4458f386e8f20 | [
"MIT"
] | null | null | null | vq/__init__.py | anonymouspaperowner/range-search | d382278f5db853b645bcd6b83cc4458f386e8f20 | [
"MIT"
] | 1 | 2022-01-08T02:42:27.000Z | 2022-01-08T02:42:27.000Z | from .pq import PQ
from .rq import RQ
from .opq import OPQ
from .neq import NEQ | 19.75 | 20 | 0.759494 |
4a084abb6969fd3db40118ef058cc91849c66b91 | 1,342 | py | Python | ted_talk_video_downloader/__main__.py | WagnoLeaoSergio/ted_talk_video_downloader | 2a91bb41307fc9814500670156d80361df8781b2 | [
"Unlicense"
] | 1 | 2021-12-22T23:21:35.000Z | 2021-12-22T23:21:35.000Z | ted_talk_video_downloader/__main__.py | WagnoLeaoSergio/ted_talk_video_downloader | 2a91bb41307fc9814500670156d80361df8781b2 | [
"Unlicense"
] | null | null | null | ted_talk_video_downloader/__main__.py | WagnoLeaoSergio/ted_talk_video_downloader | 2a91bb41307fc9814500670156d80361df8781b2 | [
"Unlicense"
] | null | null | null | import argparse # pragma: no cover
from .downloader import TED_Downloader # pragma: no cover
def main() -> None: # pragma: no cover
"""
The main function executes on commands:
`python -m ted_talk_video_downloader` and `$ ted_talk_video_downloader `.
This is the program's entry point.
"""
p... | 26.313725 | 77 | 0.607303 |
4a084ac595747ffed3971cd8f1a5135029c7369c | 6,660 | py | Python | kubernetes_asyncio/client/models/v1_pod_template_list.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | 1 | 2020-03-25T01:24:27.000Z | 2020-03-25T01:24:27.000Z | kubernetes_asyncio/client/models/v1_pod_template_list.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_pod_template_list.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.10.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | 33.134328 | 295 | 0.617868 |
4a084b3b65662a2880fd89019620fb55ff2463c0 | 6,807 | py | Python | env.py | andy1771/Multi-Agent-DRL-Routing | 2e0d56132cab181b686005bd69ec79344f8f5907 | [
"MIT"
] | 2 | 2021-12-01T07:40:54.000Z | 2022-03-01T02:31:36.000Z | env.py | andy1771/Multi-Agent-DRL-Routing | 2e0d56132cab181b686005bd69ec79344f8f5907 | [
"MIT"
] | null | null | null | env.py | andy1771/Multi-Agent-DRL-Routing | 2e0d56132cab181b686005bd69ec79344f8f5907 | [
"MIT"
] | null | null | null | import random
from collections import deque
from networkx.algorithms.shortest_paths.unweighted import single_source_shortest_path as sssp
from agent import Agent
import numpy as np
import torch
GAMMA = 0.90
class Packet():
def __init__(self, source, destination):
self.source = source
self.destinat... | 33.367647 | 112 | 0.558836 |
4a084b4b66e4c212ae37f57dcc4a2874999fa4a3 | 3,134 | py | Python | ColorMasking.py | tonyyu0822/RiceBraille | f2f1b3f40f7ce3fa32ea4ffbb22e7e403abd1ece | [
"MIT"
] | 1 | 2019-11-10T00:02:02.000Z | 2019-11-10T00:02:02.000Z | ColorMasking.py | tonyyu0822/RiceBraille | f2f1b3f40f7ce3fa32ea4ffbb22e7e403abd1ece | [
"MIT"
] | null | null | null | ColorMasking.py | tonyyu0822/RiceBraille | f2f1b3f40f7ce3fa32ea4ffbb22e7e403abd1ece | [
"MIT"
] | 1 | 2020-11-03T20:01:17.000Z | 2020-11-03T20:01:17.000Z | # import the necessary packages
import numpy as np
import argparse
import cv2 as cv
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", help="path to the image")
args = vars(ap.parse_args())
def set_masks(colors, delta):
bounds = [(np.array([color... | 27.982143 | 109 | 0.647096 |
4a084bb4be03a905b3cc7b9e842e15a7c077c7a2 | 6,901 | py | Python | env/lib/python3.8/site-packages/plotly/graph_objs/splom/unselected/_marker.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/splom/unselected/_marker.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/splom/unselected/_marker.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "splom.unselected"
_path_str = "splom.unselected.marker"
_valid_props = {"color", "opacity", ... | 33.828431 | 82 | 0.552674 |
4a084c5457a71036bc415196b1bd2416eaf5c355 | 11,733 | py | Python | sunpy/io/fits.py | naltun/sunpy | 86d6b89e1f95e110dfba0a0096e1e66635a4da77 | [
"BSD-2-Clause"
] | null | null | null | sunpy/io/fits.py | naltun/sunpy | 86d6b89e1f95e110dfba0a0096e1e66635a4da77 | [
"BSD-2-Clause"
] | null | null | null | sunpy/io/fits.py | naltun/sunpy | 86d6b89e1f95e110dfba0a0096e1e66635a4da77 | [
"BSD-2-Clause"
] | null | null | null | """
This module provides a FITS file reader.
Notes
-----
1. FITS files allow comments to be attached to every value in the header.
This is implemented in this module as a KEYCOMMENTS dictionary in the
sunpy header. To add a comment to the file on write, add a comment to this
dictionary with the same name as ... | 34.008696 | 96 | 0.603341 |
4a084d2b9472d269df6a78419304204cf1ce9cb7 | 1,449 | py | Python | unittest/rmg/speciestest.py | sean-v8/RMG-Py | 7cc7c3bfb330786526c56113d98c785bcaaa161a | [
"MIT"
] | null | null | null | unittest/rmg/speciestest.py | sean-v8/RMG-Py | 7cc7c3bfb330786526c56113d98c785bcaaa161a | [
"MIT"
] | null | null | null | unittest/rmg/speciestest.py | sean-v8/RMG-Py | 7cc7c3bfb330786526c56113d98c785bcaaa161a | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import unittest
import sys
sys.path.append('.')
import rmg.thermo.data
from rmg.structure import *
from rmg.species import *
################################################################################
class SpeciesCheck(unittest.TestCase):
... | 28.411765 | 105 | 0.625259 |
4a084df517e072a3a849a85ee4d905a6d8f31288 | 27,036 | py | Python | tests/activity/test_activity_publish_final_poa.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 17 | 2015-02-10T07:10:29.000Z | 2021-05-14T22:24:45.000Z | tests/activity/test_activity_publish_final_poa.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 459 | 2015-03-31T18:24:23.000Z | 2022-03-30T19:44:40.000Z | tests/activity/test_activity_publish_final_poa.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 9 | 2015-04-18T16:57:31.000Z | 2020-10-30T11:49:13.000Z | import unittest
import glob
import os
import time
import zipfile
import xml.etree.ElementTree as ET
from xml.etree.ElementTree import Element
from mock import patch
from testfixtures import TempDirectory
from ddt import ddt, data, unpack
import activity.activity_PublishFinalPOA as activity_module
from activity.activity... | 36.683853 | 91 | 0.588142 |
4a085019c218735a49b240a77f4be39ee917c0d4 | 189 | py | Python | products/urls.py | marcomoreschi/Milestone-4 | 0fe5c9b9621f3642ec33c24e4ecd916233300a08 | [
"BSD-Source-Code"
] | null | null | null | products/urls.py | marcomoreschi/Milestone-4 | 0fe5c9b9621f3642ec33c24e4ecd916233300a08 | [
"BSD-Source-Code"
] | 7 | 2021-03-30T14:17:14.000Z | 2022-01-13T03:17:18.000Z | products/urls.py | marcomoreschi/Milestone-4 | 0fe5c9b9621f3642ec33c24e4ecd916233300a08 | [
"BSD-Source-Code"
] | 1 | 2020-10-06T15:32:10.000Z | 2020-10-06T15:32:10.000Z | from django.urls import path
from . import views
urlpatterns = [
path('', views.all_products, name='products'),
path('<product_id>', views.product_detail, name='product_detail'),
] | 27 | 70 | 0.708995 |
4a0850734e13429768418736cdd84fcc7fa48f48 | 1,133 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tests/test_errors.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 18 | 2018-02-23T11:28:54.000Z | 2021-09-23T08:19:54.000Z | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tests/test_errors.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 2 | 2021-02-08T20:19:17.000Z | 2021-04-30T20:32:52.000Z | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tests/test_errors.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 5 | 2019-03-12T14:24:18.000Z | 2021-06-23T13:42:58.000Z | # -*- coding: utf-8 -*-
import pytest
from warnings import catch_warnings
import pandas # noqa
import pandas as pd
@pytest.mark.parametrize(
"exc", ['UnsupportedFunctionCall', 'UnsortedIndexError',
'OutOfBoundsDatetime',
'ParserError', 'PerformanceWarning', 'DtypeWarning',
'E... | 21.377358 | 64 | 0.640777 |
4a0850763508f972b5341f07657ed37446b3c4f5 | 5,325 | py | Python | libraries/botframework-connector/botframework/connector/auth/jwt_token_extractor.py | Shiftersky/botbuilder-python | e00ea990d5cb5b05d545d87c51249dfa8f183581 | [
"MIT"
] | 1 | 2020-02-19T15:50:10.000Z | 2020-02-19T15:50:10.000Z | libraries/botframework-connector/botframework/connector/auth/jwt_token_extractor.py | Fortune-Adekogbe/botbuilder-python | 4e48c874c32a2a7fe7f27a7a1f825e2aa39466c4 | [
"MIT"
] | null | null | null | libraries/botframework-connector/botframework/connector/auth/jwt_token_extractor.py | Fortune-Adekogbe/botbuilder-python | 4e48c874c32a2a7fe7f27a7a1f825e2aa39466c4 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import json
from datetime import datetime, timedelta
from typing import List
import requests
from jwt.algorithms import RSAAlgorithm
import jwt
from .claims_identity import ClaimsIdentity
from .verify_options import VerifyOpt... | 34.354839 | 94 | 0.649765 |
4a085179174503dfd5e4323e58e02c8188c7911f | 3,502 | py | Python | analysis/webservice/algorithms/doms/DatasetListQuery.py | dataplumber/nexus | f25a89e85eba098da9c6db1ff3d408dae8a6b310 | [
"Apache-2.0"
] | 23 | 2016-08-09T22:45:14.000Z | 2020-02-17T08:18:29.000Z | analysis/webservice/algorithms/doms/DatasetListQuery.py | lewismc/incubator-sdap-nexus | ff98fa346303431542b8391cc2a1bf7561d1bd03 | [
"Apache-2.0"
] | 6 | 2017-04-27T21:22:17.000Z | 2021-06-01T21:45:52.000Z | analysis/webservice/algorithms/doms/DatasetListQuery.py | dataplumber/nexus | f25a89e85eba098da9c6db1ff3d408dae8a6b310 | [
"Apache-2.0"
] | 5 | 2016-08-31T13:47:29.000Z | 2017-11-14T21:45:22.000Z | from webservice.NexusHandler import NexusHandler as BaseHandler
from webservice.webmodel import StatsComputeOptions
from webservice.NexusHandler import nexus_handler
from webservice.NexusHandler import DEFAULT_PARAMETERS_SPEC
from webservice.webmodel import NexusResults, NexusProcessingException, DatasetNotFoundExcepti... | 32.728972 | 135 | 0.612793 |
4a0851eba4142ad71c3b2fc68108ed7faed07dee | 2,607 | py | Python | src/arch/mips/MipsSystem.py | YangZhou1997/GEM5_DRAMSim2 | 77aa7d479bba11be97fa455a31e4ea5f556841e0 | [
"BSD-3-Clause"
] | 11 | 2015-03-21T13:35:06.000Z | 2022-01-27T07:31:52.000Z | src/arch/mips/MipsSystem.py | YangZhou1997/GEM5_DRAMSim2 | 77aa7d479bba11be97fa455a31e4ea5f556841e0 | [
"BSD-3-Clause"
] | 4 | 2015-01-13T18:27:31.000Z | 2015-01-13T18:27:57.000Z | src/arch/mips/MipsSystem.py | YangZhou1997/GEM5_DRAMSim2 | 77aa7d479bba11be97fa455a31e4ea5f556841e0 | [
"BSD-3-Clause"
] | 4 | 2015-03-21T13:35:24.000Z | 2020-06-30T02:09:36.000Z | # -*- mode:python -*-
# Copyright (c) 2007 MIPS Technologies, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copyright
# notice, this ... | 42.737705 | 90 | 0.751438 |
4a0852332eb9cd3315d120b3997c3a8c09e9af06 | 35 | py | Python | src/bayes.py | akshayaamukundan/tipr-first-assignment | ee06981debc79166f60f92f7943d61131d3c20a6 | [
"MIT"
] | null | null | null | src/bayes.py | akshayaamukundan/tipr-first-assignment | ee06981debc79166f60f92f7943d61131d3c20a6 | [
"MIT"
] | null | null | null | src/bayes.py | akshayaamukundan/tipr-first-assignment | ee06981debc79166f60f92f7943d61131d3c20a6 | [
"MIT"
] | 7 | 2019-01-24T13:02:26.000Z | 2020-11-10T18:23:53.000Z | # Implement Bayes Classifier here!
| 17.5 | 34 | 0.8 |
4a085263f3bc756a98abbc778c8c3135ae1ff2be | 532 | py | Python | ch2o/tests/node/Softmax.py | disktnk/chainer-compiler | 5cfd027b40ea6e4abf73eb42be70b4fba74d1cde | [
"MIT"
] | null | null | null | ch2o/tests/node/Softmax.py | disktnk/chainer-compiler | 5cfd027b40ea6e4abf73eb42be70b4fba74d1cde | [
"MIT"
] | null | null | null | ch2o/tests/node/Softmax.py | disktnk/chainer-compiler | 5cfd027b40ea6e4abf73eb42be70b4fba74d1cde | [
"MIT"
] | null | null | null | # coding: utf-8
import numpy as np
import chainer
import chainer.functions as F
class Softmax(chainer.Chain):
def forward(self, x):
return F.softmax(x)
class SoftmaxAxis(chainer.Chain):
def forward(self, x):
return F.softmax(x, axis=2)
# ======================================
import ch2o... | 18.344828 | 62 | 0.614662 |
4a0852ec5301f8480ebaacdc78e37f433c6b77f7 | 3,567 | py | Python | Scripts/GetBackgroundProps.py | htung0101/bvp | db318b11d5c41efd59dd04038d41c03500e5c8e1 | [
"BSD-2-Clause"
] | null | null | null | Scripts/GetBackgroundProps.py | htung0101/bvp | db318b11d5c41efd59dd04038d41c03500e5c8e1 | [
"BSD-2-Clause"
] | null | null | null | Scripts/GetBackgroundProps.py | htung0101/bvp | db318b11d5c41efd59dd04038d41c03500e5c8e1 | [
"BSD-2-Clause"
] | null | null | null | """
.B.lender .V.ision .P.roject file operation
Gets properties for all backgrounds in a .blend file. Stores properties in a list
of dictionaries (one dict for each background (group) in the file), and saves that
list in a pickle (.pik) file with the same name as the .blend file.
These .pik files are loaded by the ... | 33.650943 | 104 | 0.694701 |
4a0852f5801ee4dc931d0fc2831537ae812e5cc1 | 560 | py | Python | Curso Python/Aula08/EstruturaWhile/EstruturaDeRepeticaoWhile.py | ElHa07/Python | d8014948a6472daa3dd0c9be5e536fc79742f02e | [
"MIT"
] | null | null | null | Curso Python/Aula08/EstruturaWhile/EstruturaDeRepeticaoWhile.py | ElHa07/Python | d8014948a6472daa3dd0c9be5e536fc79742f02e | [
"MIT"
] | null | null | null | Curso Python/Aula08/EstruturaWhile/EstruturaDeRepeticaoWhile.py | ElHa07/Python | d8014948a6472daa3dd0c9be5e536fc79742f02e | [
"MIT"
] | null | null | null | #Estrutura de Repetição While
#Metdoso de Repetição
# Primeiro Metodo de Repetição FOR
# o For não é possivel usa-lo quando eu não sei o quanto valores serão.
#for c in range(0, 10):
# print(c)
#print('FIM!')
#Segundo Metodo de Repetição WHILE
# While serve para situações diversas quando eu sei quantos valores sã... | 23.333333 | 112 | 0.655357 |
4a08538deb777e00d544e825888b990fa3637e7f | 1,826 | py | Python | py/g1/apps/tests/test_utils.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | 3 | 2016-01-04T06:28:52.000Z | 2020-09-20T13:18:40.000Z | py/g1/apps/tests/test_utils.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | py/g1/apps/tests/test_utils.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | import unittest
import functools
from g1.apps import utils
class GetAnnotationsTest(unittest.TestCase):
def test_get_annotations(self):
class Test:
def __init__(self, p: 'P'):
pass
def __call__(self, q: 'Q') -> 'R':
pass
def test(x: 'X... | 22.54321 | 77 | 0.427163 |
4a0853dcf1d4a80590d92542ed01606f41e709bf | 2,520 | bzl | Python | test/starlark_tests/rules/dsyms_test.bzl | BalestraPatrick/rules_apple | ae2246ebda88e6573a8290ab1f0f4f00fe4c07f2 | [
"Apache-2.0"
] | 3 | 2020-11-30T15:35:37.000Z | 2022-01-06T14:17:18.000Z | test/starlark_tests/rules/dsyms_test.bzl | BalestraPatrick/rules_apple | ae2246ebda88e6573a8290ab1f0f4f00fe4c07f2 | [
"Apache-2.0"
] | 54 | 2020-06-23T17:34:04.000Z | 2022-03-31T02:04:06.000Z | test/starlark_tests/rules/dsyms_test.bzl | BalestraPatrick/rules_apple | ae2246ebda88e6573a8290ab1f0f4f00fe4c07f2 | [
"Apache-2.0"
] | 12 | 2020-07-14T23:59:57.000Z | 2022-03-22T09:59:18.000Z | # Copyright 2019 The Bazel 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 applicable la... | 27.692308 | 100 | 0.637302 |
4a0854e25d9d4939e0ae5ae85587324108055062 | 4,939 | py | Python | test/functional/interface_http.py | mrmikeo/MainNet-critical-fix | 4c1b63af4dad9850fb99ed85d8a015a9440f6654 | [
"MIT"
] | 2 | 2020-10-28T19:46:40.000Z | 2021-08-15T13:22:54.000Z | test/functional/interface_http.py | mrmikeo/MainNet-critical-fix | 4c1b63af4dad9850fb99ed85d8a015a9440f6654 | [
"MIT"
] | null | null | null | test/functional/interface_http.py | mrmikeo/MainNet-critical-fix | 4c1b63af4dad9850fb99ed85d8a015a9440f6654 | [
"MIT"
] | 2 | 2020-07-06T19:59:39.000Z | 2020-09-07T05:42:48.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Copyright (c) 2017-2020 The Zelantus Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the RPC HTTP basics."""
import http.clien... | 44.495495 | 115 | 0.640211 |
4a0855b2ec96a58aba50bc6364d6f1c4410926fe | 6,546 | py | Python | python_scripts/read_genotypes.py | athro/openSNPAnalysis | c5eb9f83bf218b6cbfb1e7fbe48682ceeb1bafb0 | [
"MIT"
] | null | null | null | python_scripts/read_genotypes.py | athro/openSNPAnalysis | c5eb9f83bf218b6cbfb1e7fbe48682ceeb1bafb0 | [
"MIT"
] | null | null | null | python_scripts/read_genotypes.py | athro/openSNPAnalysis | c5eb9f83bf218b6cbfb1e7fbe48682ceeb1bafb0 | [
"MIT"
] | null | null | null | import csv
import sys
import os.path
import os
import glob
import re
import compress
import zipfile
import add_genotypes_to_db as db_geno
debug = True
import logging
logger_instance = logging.getLogger('openSNPAnalysis')
file_re = re.compile('user(\d+)\_file(\d+)\_yearofbirth\_(\w+)\_sex\_(\w+)\.(\S+)\.txt')
def... | 37.83815 | 123 | 0.580507 |
4a0855e1c3a12b64d3be202efa57562930c11351 | 16,534 | py | Python | tccli/services/waf/waf_client.py | ws0416/tencentcloud-cli | 0a90fa77c8be1efa30b196a3eeb31b8be1f6a325 | [
"Apache-2.0"
] | null | null | null | tccli/services/waf/waf_client.py | ws0416/tencentcloud-cli | 0a90fa77c8be1efa30b196a3eeb31b8be1f6a325 | [
"Apache-2.0"
] | null | null | null | tccli/services/waf/waf_client.py | ws0416/tencentcloud-cli | 0a90fa77c8be1efa30b196a3eeb31b8be1f6a325 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import json
import tccli.options_define as OptionsDefine
import tccli.format_output as FormatOutput
from tccli import __version__
from tccli.utils import Utils
from tccli.exceptions import ConfigurationError
from tencentcloud.common import credential
from tencentcloud.common.profile.ht... | 41.647355 | 105 | 0.71985 |
4a0855e9b02835fce4ade0039d3be3b8db5a488b | 818 | py | Python | allocation/utils/propositional_logic/semantics.py | gabrielpereiram10/allocation | 24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14 | [
"MIT"
] | null | null | null | allocation/utils/propositional_logic/semantics.py | gabrielpereiram10/allocation | 24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14 | [
"MIT"
] | null | null | null | allocation/utils/propositional_logic/semantics.py | gabrielpereiram10/allocation | 24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14 | [
"MIT"
] | null | null | null | from allocation.entities.formula import *
from allocation.protocols.types import Interpretation
def truth_value(formula: Formula, interpretation: Interpretation) -> Union[bool, None]:
"""
Determines the true value of a formula for an interpretation (evaluation) complete or partial.
An interpretation can b... | 37.181818 | 98 | 0.690709 |
4a0857cf2c70973ce04e9386762d7b2dabb49c5b | 334 | py | Python | extra_discount/config/docs.py | riconova92/extra_discount | bc866ebb5e4ea147b8802ac650c8bacae97e0268 | [
"MIT"
] | null | null | null | extra_discount/config/docs.py | riconova92/extra_discount | bc866ebb5e4ea147b8802ac650c8bacae97e0268 | [
"MIT"
] | null | null | null | extra_discount/config/docs.py | riconova92/extra_discount | bc866ebb5e4ea147b8802ac650c8bacae97e0268 | [
"MIT"
] | null | null | null | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/extra_discount"
# docs_base_url = "https://[org_name].github.io/extra_discount"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "Ex... | 27.833333 | 68 | 0.736527 |
4a0857f78e2c9697cb38cd4dced246e12dcb62b3 | 4,697 | py | Python | sdk/python/pulumi_azure/mariadb/database.py | stack72/pulumi-azure | 18245b4e74abbd3f768f9eda67adb1df609ff32e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/mariadb/database.py | stack72/pulumi-azure | 18245b4e74abbd3f768f9eda67adb1df609ff32e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/mariadb/database.py | stack72/pulumi-azure | 18245b4e74abbd3f768f9eda67adb1df609ff32e | [
"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 Database(pulumi.CustomResource)... | 51.054348 | 264 | 0.70066 |
4a0858d2721a9f2e23208d59a643f22d082dd970 | 6,054 | py | Python | research/table_extraction_using_block_detection/code/pdf2csv.py | cbgaindia/parsers | 131498adf552ebb82b5c60b6cac3293042c75c7d | [
"MIT"
] | 15 | 2015-12-05T09:41:41.000Z | 2021-05-27T13:27:36.000Z | research/table_extraction_using_block_detection/code/pdf2csv.py | cbgaindia/parsers | 131498adf552ebb82b5c60b6cac3293042c75c7d | [
"MIT"
] | 31 | 2016-04-06T11:02:36.000Z | 2021-12-13T19:43:42.000Z | research/table_extraction_using_block_detection/code/pdf2csv.py | cbgaindia/parsers | 131498adf552ebb82b5c60b6cac3293042c75c7d | [
"MIT"
] | 7 | 2018-04-30T13:34:27.000Z | 2021-01-02T09:07:34.000Z | '''The execution script to convert a folder of ddg pdfs to ddg csvs
'''
import os
import subprocess
import argparse
import cv2
import pandas as pd
from image_to_block_feature_generator import (BlockTextualFeatureGenerator,
filter_unwanted_blocks,
... | 46.930233 | 123 | 0.58672 |
4a0858fb1beba9566db82aa9d10cf6b0c365baf8 | 602 | py | Python | Aug21/Django/learningdjango/qtbooks/books/migrations/0002_review_created.py | pythonbykhaja/intesivepython | d3074f35bf36a04d4d1d9b4ff4631733d40b5817 | [
"Apache-2.0"
] | 2 | 2021-05-29T18:21:50.000Z | 2021-07-24T13:03:30.000Z | Aug21/Django/learningdjango/qtbooks/books/migrations/0002_review_created.py | pythonbykhaja/intesivepython | d3074f35bf36a04d4d1d9b4ff4631733d40b5817 | [
"Apache-2.0"
] | null | null | null | Aug21/Django/learningdjango/qtbooks/books/migrations/0002_review_created.py | pythonbykhaja/intesivepython | d3074f35bf36a04d4d1d9b4ff4631733d40b5817 | [
"Apache-2.0"
] | 2 | 2021-05-25T10:19:54.000Z | 2021-09-21T12:20:48.000Z | # Generated by Django 3.2.7 on 2021-09-05 11:16
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('books', '0001_initial'),... | 26.173913 | 111 | 0.656146 |
4a085999a59191f68cbac73241549828f5198169 | 1,192 | py | Python | tools/line_count/summarize-history.py | samotarnik/grpc | 3278bdceda8030d5aa130f12765e5f07263c860d | [
"Apache-2.0"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools/line_count/summarize-history.py | samotarnik/grpc | 3278bdceda8030d5aa130f12765e5f07263c860d | [
"Apache-2.0"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools/line_count/summarize-history.py | samotarnik/grpc | 3278bdceda8030d5aa130f12765e5f07263c860d | [
"Apache-2.0"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright 2017 gRPC 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... | 30.564103 | 78 | 0.69547 |
4a085a1e5dcc432f3650bd3f091367ce84691679 | 514 | py | Python | labellab-flask/api/serializers/project.py | darkshredder/LabelLab | fc762e6eea52b9023e38ba5f32bbcaa7cbc17dbe | [
"Apache-2.0"
] | 70 | 2019-01-25T19:16:00.000Z | 2022-03-23T14:37:28.000Z | labellab-flask/api/serializers/project.py | darkshredder/LabelLab | fc762e6eea52b9023e38ba5f32bbcaa7cbc17dbe | [
"Apache-2.0"
] | 350 | 2019-01-30T10:50:34.000Z | 2022-03-31T19:58:44.000Z | labellab-flask/api/serializers/project.py | darkshredder/LabelLab | fc762e6eea52b9023e38ba5f32bbcaa7cbc17dbe | [
"Apache-2.0"
] | 140 | 2019-01-30T08:53:35.000Z | 2022-03-25T15:37:12.000Z | from marshmallow import Schema, fields
from api.extensions import db, ma
from api.serializers.image import ImageSchema
from api.serializers.label import LabelSchema
class ProjectSchema(ma.ModelSchema):
"""
Serializer class for project
"""
id = fields.Int(dump_only=True)
project_name = fi... | 28.555556 | 50 | 0.725681 |
4a085a34188a4e62a9ada9c71c9a68863dce2097 | 323 | py | Python | Ejercicio2.py | Octavio785/examen-U1 | 1d0b725435fe98f42ac3f256ce4d91eaf1c2abb0 | [
"Apache-2.0"
] | null | null | null | Ejercicio2.py | Octavio785/examen-U1 | 1d0b725435fe98f42ac3f256ce4d91eaf1c2abb0 | [
"Apache-2.0"
] | null | null | null | Ejercicio2.py | Octavio785/examen-U1 | 1d0b725435fe98f42ac3f256ce4d91eaf1c2abb0 | [
"Apache-2.0"
] | null | null | null | #definicion de variables u otros
print("Ejercicios de examen")
bono=0
#Datos de Entrada
o=int(input("Puntos obtenidos:"))
a=int(input("Salario minimos:"))
#Proceso
if o<=100:
bono=((10*a)/100)
elif o<=150:
bono=((40*a)/100)
elif o>=151:
bono=((70*a)/100)
#Datos de Salida
print("El bono es: ", bono)
print("O.A.R.C... | 20.1875 | 33 | 0.662539 |
4a085b85e97b11f5fdba678a330f997b6f22c8d2 | 1,858 | py | Python | tests/integration/services/news/test_models.py | GSH-LAN/byceps | ab8918634e90aaa8574bd1bb85627759cef122fe | [
"BSD-3-Clause"
] | null | null | null | tests/integration/services/news/test_models.py | GSH-LAN/byceps | ab8918634e90aaa8574bd1bb85627759cef122fe | [
"BSD-3-Clause"
] | null | null | null | tests/integration/services/news/test_models.py | GSH-LAN/byceps | ab8918634e90aaa8574bd1bb85627759cef122fe | [
"BSD-3-Clause"
] | null | null | null | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
import pytest
from byceps.services.news import (
channel_service as news_channel_service,
service as news_service,
)
@pytest.fixture(scope='module')
def editor(make_user):
return make_user('NewsEdit... | 21.604651 | 79 | 0.716362 |
4a085c49d911b3fa8a591f77b26a69f091cfeff8 | 1,036 | py | Python | core/polyaxon/utils/enums_utils.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/polyaxon/utils/enums_utils.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/polyaxon/utils/enums_utils.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | 33.419355 | 74 | 0.742278 |
4a085c55dae9b816231b0dbbe2f4030bb674fb74 | 2,905 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/khmer-1.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/count-median.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/khmer-1.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/count-median.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/khmer-1.1-py2.7-linux-x86_64.egg/EGG-INFO/scripts/count-median.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/python2.7
#
# This file is part of khmer, http://github.com/ged-lab/khmer/, and is
# Copyright (C) Michigan State University, 2009-2014. It is licensed under
# the three-clause BSD license; see doc/LICENSE.txt.
# Contact: khmer-project@idyll.org
#
# pylint: disable=missing-docstring,invalid-name
"""
Count th... | 33.011364 | 78 | 0.681239 |
4a085c58d8c1c66a65d323696395a2bde53ce540 | 6,626 | py | Python | utils/flags.py | hongliangduan/Reproducing-the-invention-of-a-named-reaction-Zero-shot-prediction-of-unseen-chemical-reactions | 2d688bff2202e37321dedba7cdac67cd3c1e1fad | [
"MIT"
] | null | null | null | utils/flags.py | hongliangduan/Reproducing-the-invention-of-a-named-reaction-Zero-shot-prediction-of-unseen-chemical-reactions | 2d688bff2202e37321dedba7cdac67cd3c1e1fad | [
"MIT"
] | null | null | null | utils/flags.py | hongliangduan/Reproducing-the-invention-of-a-named-reaction-Zero-shot-prediction-of-unseen-chemical-reactions | 2d688bff2202e37321dedba7cdac67cd3c1e1fad | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | 51.364341 | 82 | 0.660278 |
4a085d04267ab978eb5b87371b0b45ef64664c17 | 224,744 | py | Python | template_container_opossum/labels/slice_69.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_opossum/labels/slice_69.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_opossum/labels/slice_69.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | coordinates_74EAFF = ((48, 147),
(48, 149), (48, 150), (48, 151), (48, 152), (48, 153), (49, 145), (49, 146), (49, 154), (49, 155), (49, 156), (49, 157), (49, 158), (50, 143), (50, 147), (50, 148), (50, 149), (50, 150), (50, 151), (50, 152), (50, 153), (50, 159), (50, 161), (51, 140), (51, 141), (51, 145), (51, 146),... | 751.652174 | 865 | 0.478553 |
4a085d90360d5d5ddc294c0da3d5e2a9917583fa | 13,833 | py | Python | pycrc/crc_parser.py | dshumko/PhpEPG | 8484b7abc2060c768c0832ee1f50e44c5010ea50 | [
"MIT"
] | 3 | 2017-01-17T12:37:42.000Z | 2021-09-19T19:31:45.000Z | pycrc/crc_parser.py | dshumko/PhpEPG | 8484b7abc2060c768c0832ee1f50e44c5010ea50 | [
"MIT"
] | null | null | null | pycrc/crc_parser.py | dshumko/PhpEPG | 8484b7abc2060c768c0832ee1f50e44c5010ea50 | [
"MIT"
] | null | null | null | # -*- coding: Latin-1 -*-
# pycrc -- parametrisable CRC calculation utility and C source code generator
#
# Copyright (c) 2006-2011 Thomas Pircher <tehpeh@gmx.net>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software... | 32.471831 | 111 | 0.495265 |
4a085dfa7df2752075b212a72482ac05ddeb9faa | 3,707 | py | Python | contrib/macdeploy/custom_dsstore.py | Liquid369/ksoc | e5db7b5ee042372e0f5a5cc5a913714d1eb82a51 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | Liquid369/ksoc | e5db7b5ee042372e0f5a5cc5a913714d1eb82a51 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | Liquid369/ksoc | e5db7b5ee042372e0f5a5cc5a913714d1eb82a51 | [
"MIT"
] | 1 | 2022-02-01T15:10:19.000Z | 2022-02-01T15:10:19.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import biplist
from ds_store import DSStore
from mac_alias import Alias
import sys
output_file = sys.argv... | 61.783333 | 1,817 | 0.724036 |
4a085e64f0e5abe6717aef9e89d187e43ecdfbf8 | 182 | py | Python | backend/authentication/serializers.py | vieirafrancisco/ProjExt-web | 761a60a1842c815cbd00e0faabf3f6af32fcb005 | [
"MIT"
] | null | null | null | backend/authentication/serializers.py | vieirafrancisco/ProjExt-web | 761a60a1842c815cbd00e0faabf3f6af32fcb005 | [
"MIT"
] | null | null | null | backend/authentication/serializers.py | vieirafrancisco/ProjExt-web | 761a60a1842c815cbd00e0faabf3f6af32fcb005 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import User
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = "__all__"
| 18.2 | 50 | 0.71978 |
4a085eaf3d1b5b30a66fedcecbd6e6bca5f97465 | 17,390 | py | Python | src/reader/_sqlite_utils.py | lemon24/reader | d226baa5d320bfedee786163730fe23871414ede | [
"BSD-3-Clause"
] | 205 | 2018-07-14T12:54:21.000Z | 2022-03-29T06:47:13.000Z | src/reader/_sqlite_utils.py | lemon24/reader | d226baa5d320bfedee786163730fe23871414ede | [
"BSD-3-Clause"
] | 275 | 2018-01-28T20:57:13.000Z | 2022-03-29T21:45:11.000Z | src/reader/_sqlite_utils.py | lemon24/reader | d226baa5d320bfedee786163730fe23871414ede | [
"BSD-3-Clause"
] | 12 | 2021-01-01T17:15:53.000Z | 2022-03-22T09:38:12.000Z | """
sqlite3 utilities. Contains no business logic.
"""
import functools
import sqlite3
import time
import traceback
from contextlib import closing
from contextlib import contextmanager
from dataclasses import dataclass
from datetime import datetime
from typing import Any
from typing import Callable
from typing import ... | 31.79159 | 102 | 0.624382 |
4a085ebf7599f21bafb21a0dd0c5bbb5e93536e3 | 8,236 | py | Python | smartcab/smartcab/agent.py | man007yadav/Udacity-Machine-Learning-Nanodegree | 1a82161809a837c38b1bfead6a8c05d074b1d85b | [
"MIT"
] | null | null | null | smartcab/smartcab/agent.py | man007yadav/Udacity-Machine-Learning-Nanodegree | 1a82161809a837c38b1bfead6a8c05d074b1d85b | [
"MIT"
] | null | null | null | smartcab/smartcab/agent.py | man007yadav/Udacity-Machine-Learning-Nanodegree | 1a82161809a837c38b1bfead6a8c05d074b1d85b | [
"MIT"
] | null | null | null | import random
import math
import itertools
from environment import Agent, Environment
from planner import RoutePlanner
from simulator import Simulator
class LearningAgent(Agent):
""" An agent that learns to drive in the Smartcab world.
This is the object you will be modifying. """
def __init__(self,... | 36.122807 | 98 | 0.594828 |
4a085f499f7fcb5a77a82379bf755ea01c767ecf | 8,403 | py | Python | bokeh/pivot_table.py | tswicegood/bokeh | 2e74be5c9288306896e8c76af2e14a8c7513e0e3 | [
"BSD-3-Clause"
] | 2 | 2015-07-23T21:19:52.000Z | 2016-01-25T17:00:15.000Z | bokeh/pivot_table.py | csaid/bokeh | 4312b2de1a15fb24884fcd97eaf6442bf8b4bd7b | [
"BSD-3-Clause"
] | null | null | null | bokeh/pivot_table.py | csaid/bokeh | 4312b2de1a15fb24884fcd97eaf6442bf8b4bd7b | [
"BSD-3-Clause"
] | 2 | 2015-12-22T04:13:10.000Z | 2021-07-06T21:18:04.000Z | from pandas import Series, DataFrame
from pandas.core.index import MultiIndex
from pandas.tools.merge import concat
from pandas.tools.util import cartesian_product
from pandas.compat import range, lrange, zip
from pandas import compat
import numpy as np
from six import string_types, iteritems
_aggregates = {
"coun... | 30.667883 | 112 | 0.593002 |
4a086138151ddafe282d8c3f7cff813ca5c46c00 | 45,288 | py | Python | controllers/plotwindow_ctrl.py | endymecy/NDIToolbox | f7a0a642b4a778d9d0c131871f4bfb9822ecb3da | [
"BSD-4-Clause"
] | 5 | 2017-02-28T16:16:06.000Z | 2020-07-13T06:49:34.000Z | controllers/plotwindow_ctrl.py | endymecy/NDIToolbox | f7a0a642b4a778d9d0c131871f4bfb9822ecb3da | [
"BSD-4-Clause"
] | 1 | 2018-08-19T19:08:14.000Z | 2018-08-19T19:08:14.000Z | controllers/plotwindow_ctrl.py | endymecy/NDIToolbox | f7a0a642b4a778d9d0c131871f4bfb9822ecb3da | [
"BSD-4-Clause"
] | 4 | 2017-10-25T20:17:15.000Z | 2021-07-26T11:39:50.000Z | """plotwindow_ctrl.py - defines the controller for plotwindow.py
Chris R. Coughlin (TRI/Austin, Inc.)
"""
__author__ = 'Chris R. Coughlin'
from views import dialogs
from views import fetchplugin_dialog
from views import colormapcreator
from models import mainmodel
from models import dataio
from models import ndescanh... | 45.288 | 131 | 0.56505 |
4a0862e08cf08c47cdb1d81211e1711c2f0b4148 | 557 | py | Python | data_store.py | Rin-The-QT-Bunny/Glaurung | 4751c89b7e821ab9c7307312aa928cb1323e5c73 | [
"CC0-1.0"
] | null | null | null | data_store.py | Rin-The-QT-Bunny/Glaurung | 4751c89b7e821ab9c7307312aa928cb1323e5c73 | [
"CC0-1.0"
] | null | null | null | data_store.py | Rin-The-QT-Bunny/Glaurung | 4751c89b7e821ab9c7307312aa928cb1323e5c73 | [
"CC0-1.0"
] | null | null | null | import json
programs = { "p1" : 64,
"p2" : 64,
"p3" : 30,
"p4" : 4,
"p5" : 5 }
def save_setup(system_setup):
data_setup = json.dumps(system_setup)
f2 = open('data/programs/program_base.json', 'w')
f2.write(data_setup)
f2.close()
def load_setup... | 23.208333 | 53 | 0.574506 |
4a086333f8aa67e232dcc0dc0d76b2206b385902 | 5,618 | py | Python | code/imagecomp.py | jkfids/cross-correlation | 003c43c1089bacf407ea735ea4b2befca10acd1f | [
"MIT"
] | 1 | 2021-04-09T04:02:00.000Z | 2021-04-09T04:02:00.000Z | code/imagecomp.py | jkfids/stereo-vision | 003c43c1089bacf407ea735ea4b2befca10acd1f | [
"MIT"
] | null | null | null | code/imagecomp.py | jkfids/stereo-vision | 003c43c1089bacf407ea735ea4b2befca10acd1f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue May 18 16:37:40 2021
@author: Fidel
"""
# Standard libraries
from time import time
import numpy as np
from matplotlib import pyplot as plt
from PIL import Image
import matplotlib.image as mpimg
import matplotlib.ticker as plticker
# Local modules
from stereovision import St... | 33.242604 | 83 | 0.699359 |
4a08645f1af53165260ea523ee96bc6e48432184 | 8,887 | py | Python | robocute/scene.py | kfields/robocute | f6f15ab74266053da5fe4ede3cc81310a62146e5 | [
"MIT"
] | 1 | 2015-08-24T21:58:34.000Z | 2015-08-24T21:58:34.000Z | robocute/scene.py | kfields/robocute | f6f15ab74266053da5fe4ede3cc81310a62146e5 | [
"MIT"
] | null | null | null | robocute/scene.py | kfields/robocute | f6f15ab74266053da5fe4ede3cc81310a62146e5 | [
"MIT"
] | null | null | null | from pyglet.gl import *
import robocute.graphics
import robocute.camera
from robocute.node import *
from robocute.world import *
from robocute.pane import *
from robocute.dash import *
from robocute.mouse import Mouse
class Clip(robocute.graphics.Clip):
def __init__(self, world, rowCount = 3, colCount ... | 29.137705 | 98 | 0.497581 |
4a08684a34de8461ee4dccdf18d0821521a65095 | 530 | py | Python | altdeutsch/reader.py | clemsciences/old_high_german_texts | 1fe458613da5f13760d743cee99fc2eaceb59298 | [
"MIT"
] | null | null | null | altdeutsch/reader.py | clemsciences/old_high_german_texts | 1fe458613da5f13760d743cee99fc2eaceb59298 | [
"MIT"
] | null | null | null | altdeutsch/reader.py | clemsciences/old_high_german_texts | 1fe458613da5f13760d743cee99fc2eaceb59298 | [
"MIT"
] | null | null | null | """
"""
import csv
import codecs
__author__ = ["Clément Besnier <clemsciences@aol.com>", ]
def read_export(filename):
with codecs.open(filename, "r", encoding="utf-8") as f:
reader = csv.reader(f, delimiter="\t")
return {row[1]: [tokenize(sent) for sent in sentence_delimit(row[2])] for row in r... | 19.62963 | 112 | 0.65283 |
4a0868ec4a2fad5a3c032e4e9e8a0caa9a0453a6 | 2,986 | py | Python | couchbase_v2/tests/cases/excextra_t.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 189 | 2015-01-07T18:34:31.000Z | 2022-03-21T17:41:56.000Z | couchbase_v2/tests/cases/excextra_t.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 24 | 2015-05-19T14:00:16.000Z | 2022-03-16T22:01:30.000Z | couchbase_v2/tests/cases/excextra_t.py | couchbase/couchbase-python-client | 99ec055835f5aef0cd07905497b3ab4bb3cbbc32 | [
"Apache-2.0"
] | 60 | 2015-03-10T22:12:50.000Z | 2022-03-07T21:57:40.000Z | #
# Copyright 2013, Couchbase, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 34.72093 | 81 | 0.658071 |
4a0869dc255a849c056292f8ff9c764e3254da03 | 6,495 | py | Python | migration/20170713-19-move-third-party-config-to-external-integrations.py | tdilauro/simplified-circulation | f52d333616f63e2bff0cf1de98ef301bf152fba1 | [
"Apache-2.0"
] | null | null | null | migration/20170713-19-move-third-party-config-to-external-integrations.py | tdilauro/simplified-circulation | f52d333616f63e2bff0cf1de98ef301bf152fba1 | [
"Apache-2.0"
] | null | null | null | migration/20170713-19-move-third-party-config-to-external-integrations.py | tdilauro/simplified-circulation | f52d333616f63e2bff0cf1de98ef301bf152fba1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Move integration details from the Configuration file into the
database as ExternalIntegrations
"""
import os
import sys
import json
import logging
bin_dir = os.path.split(__file__)[0]
package_dir = os.path.join(bin_dir, "..")
sys.path.append(os.path.abspath(package_dir))
from core.model impor... | 36.903409 | 91 | 0.694842 |
4a086a0b6c72825dbd1aad7318b545c4b7120d90 | 15,380 | py | Python | ncsnv3/models/ncsnv3.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | ncsnv3/models/ncsnv3.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | ncsnv3/models/ncsnv3.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 33.654267 | 81 | 0.625748 |
4a086b31802a0362a6855390dd0d5b431b3a9551 | 4,494 | py | Python | src/main/python/apache/aurora/config/schema/base.py | wickman/incubator-aurora | 9906d217093568ed4c9cfe620862818f15ce4150 | [
"Apache-2.0"
] | null | null | null | src/main/python/apache/aurora/config/schema/base.py | wickman/incubator-aurora | 9906d217093568ed4c9cfe620862818f15ce4150 | [
"Apache-2.0"
] | null | null | null | src/main/python/apache/aurora/config/schema/base.py | wickman/incubator-aurora | 9906d217093568ed4c9cfe620862818f15ce4150 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2013 Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 35.109375 | 98 | 0.647085 |
4a086c1314061ae757cdb3ed865715855ba47de0 | 2,495 | py | Python | src/sync.py | IronCountySchoolDistrict/naviance-sync | 868e47d2850e751644f909da1157e3226638a38b | [
"MIT"
] | null | null | null | src/sync.py | IronCountySchoolDistrict/naviance-sync | 868e47d2850e751644f909da1157e3226638a38b | [
"MIT"
] | null | null | null | src/sync.py | IronCountySchoolDistrict/naviance-sync | 868e47d2850e751644f909da1157e3226638a38b | [
"MIT"
] | null | null | null | from naviance import Naviance
from db import create_cx_oracle_conn
import argparse
import dotenv
dotenv.load()
def results_to_csv_str(results, cursor):
csv_results = ''
csv_results += ','.join([column[0] for column in cursor.description])
csv_results += '\n'
csv_results += '\n'.join(
# proces... | 34.652778 | 88 | 0.697796 |
4a086d4f3ef96f955e2c1f5d26f3808018be384e | 33,260 | py | Python | deepctr/layers/sequence.py | BradyBromley/DeepCTR | 3d12ffc0e0a5e893dce8bd315824c180445b772e | [
"Apache-2.0"
] | 2 | 2019-11-07T10:17:40.000Z | 2020-04-13T14:25:14.000Z | deepctr/layers/sequence.py | BradyBromley/DeepCTR | 3d12ffc0e0a5e893dce8bd315824c180445b772e | [
"Apache-2.0"
] | 7 | 2019-12-16T22:22:25.000Z | 2022-02-10T00:37:34.000Z | deepctr/layers/sequence.py | BradyBromley/DeepCTR | 3d12ffc0e0a5e893dce8bd315824c180445b772e | [
"Apache-2.0"
] | 1 | 2020-01-07T09:12:21.000Z | 2020-01-07T09:12:21.000Z | # -*- coding:utf-8 -*-
"""
Author:
Weichen Shen,wcshen1994@163.com
"""
import numpy as np
import tensorflow as tf
from tensorflow.python.keras import backend as K
from tensorflow.python.keras.initializers import TruncatedNormal
from tensorflow.python.keras.layers import LSTM, Lambda, Layer
from .core import Loc... | 40.511571 | 280 | 0.608539 |
4a086d604514375a340bbb6e9d0dca501999c674 | 1,654 | py | Python | Disease/urls.py | 11pawan11/E-Health-Care | 53385ca85c40829a68f21190d0d5dc351221158c | [
"MIT"
] | null | null | null | Disease/urls.py | 11pawan11/E-Health-Care | 53385ca85c40829a68f21190d0d5dc351221158c | [
"MIT"
] | null | null | null | Disease/urls.py | 11pawan11/E-Health-Care | 53385ca85c40829a68f21190d0d5dc351221158c | [
"MIT"
] | null | null | null | """Disease URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/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')
Cla... | 41.35 | 94 | 0.685611 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.