hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c709a775fc2c2a745cb1ed61a6cbd8778daaee06 | 609 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/env/__init__.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 1 | 2021-01-28T01:45:37.000Z | 2021-01-28T01:45:37.000Z | datadog_checks_dev/datadog_checks/dev/tooling/commands/env/__init__.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 3 | 2021-01-27T04:56:40.000Z | 2021-02-26T06:29:22.000Z | datadog_checks_dev/datadog_checks/dev/tooling/commands/env/__init__.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 1 | 2021-04-07T16:58:27.000Z | 2021-04-07T16:58:27.000Z | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import click
from ..console import CONTEXT_SETTINGS
from .check import check_run
from .ls import ls
from .prune import prune
from .reload import reload_env
from .shell import shell
from .start import star... | 23.423077 | 81 | 0.771757 |
c709d0df6d7c96b0dace86ff6283e481bd4f3000 | 8,584 | py | Python | sdk/python/pulumi_azure_nextgen/marketplace/private_store_offer.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/marketplace/private_store_offer.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/marketplace/private_store_offer.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # 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! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from ... | 40.11215 | 230 | 0.646086 |
c70a49b112aadc6ae32c90aac8b9581dc39ca540 | 1,491 | py | Python | examples/custom_shape/stages.py | oksumoron/locust | fddfefe7ef1082bc5284cd2dd8477221484dfb0c | [
"MIT"
] | 18,336 | 2015-01-03T20:38:40.000Z | 2022-03-31T16:02:35.000Z | examples/custom_shape/stages.py | oksumoron/locust | fddfefe7ef1082bc5284cd2dd8477221484dfb0c | [
"MIT"
] | 1,779 | 2015-01-01T02:09:30.000Z | 2022-03-31T09:58:10.000Z | examples/custom_shape/stages.py | oksumoron/locust | fddfefe7ef1082bc5284cd2dd8477221484dfb0c | [
"MIT"
] | 2,689 | 2015-01-05T02:01:50.000Z | 2022-03-31T13:13:09.000Z | from locust import HttpUser, TaskSet, task, constant
from locust import LoadTestShape
| 29.82 | 90 | 0.602951 |
c70b23f1cce14640f16607fb8ec77754089292bc | 2,115 | py | Python | db/seed_ids.py | xtuyaowu/jtyd_python_spider | ca5c3efd5519f592c0d587c22f03812e7756c8ea | [
"MIT"
] | 7 | 2017-08-19T22:36:29.000Z | 2018-06-03T07:02:04.000Z | db/seed_ids.py | xtuyaowu/jtyd_python_spider | ca5c3efd5519f592c0d587c22f03812e7756c8ea | [
"MIT"
] | 2 | 2021-04-30T20:37:14.000Z | 2021-12-13T19:46:29.000Z | db/seed_ids.py | xtuyaowu/jtyd_python_spider | ca5c3efd5519f592c0d587c22f03812e7756c8ea | [
"MIT"
] | 4 | 2017-09-06T03:00:11.000Z | 2017-12-10T08:04:21.000Z | # coding:utf-8
from sqlalchemy import text
from db.basic_db import db_session
from db.models import SeedIds
from decorators.decorator import db_commit_decorator
def get_seed():
"""
Get all user id to be crawled
:return: user ids
"""
return db_session.query(SeedIds).filter(text('status=0')).all()
d... | 24.593023 | 99 | 0.659102 |
c70b35ed30f0bbb93f6ab0a59185f9e44b410fce | 16,745 | py | Python | tobler/area_weighted/area_interpolate.py | sjsrey/tobler | 8e3ebd5d01de459e4387fabd57cbb12cb6735596 | [
"BSD-3-Clause"
] | 1 | 2019-06-21T19:32:22.000Z | 2019-06-21T19:32:22.000Z | tobler/area_weighted/area_interpolate.py | sjsrey/tobler | 8e3ebd5d01de459e4387fabd57cbb12cb6735596 | [
"BSD-3-Clause"
] | null | null | null | tobler/area_weighted/area_interpolate.py | sjsrey/tobler | 8e3ebd5d01de459e4387fabd57cbb12cb6735596 | [
"BSD-3-Clause"
] | null | null | null | """
Area Weighted Interpolation
"""
import numpy as np
import geopandas as gpd
from ._vectorized_raster_interpolation import _fast_append_profile_in_gdf
import warnings
from scipy.sparse import dok_matrix, diags, coo_matrix
import pandas as pd
from tobler.util.util import _check_crs, _nan_check, _inf_check, _check_p... | 33.828283 | 225 | 0.657928 |
c70bc413822aaad70486fa31ce67b5a7d9e44d76 | 49,568 | py | Python | cave/com.raytheon.viz.gfe/python/autotest/VTEC_GHG_FFA_TestScript.py | srcarter3/awips2 | 37f31f5e88516b9fd576eaa49d43bfb762e1d174 | [
"Apache-2.0"
] | null | null | null | cave/com.raytheon.viz.gfe/python/autotest/VTEC_GHG_FFA_TestScript.py | srcarter3/awips2 | 37f31f5e88516b9fd576eaa49d43bfb762e1d174 | [
"Apache-2.0"
] | null | null | null | cave/com.raytheon.viz.gfe/python/autotest/VTEC_GHG_FFA_TestScript.py | srcarter3/awips2 | 37f31f5e88516b9fd576eaa49d43bfb762e1d174 | [
"Apache-2.0"
] | 1 | 2021-10-30T00:03:05.000Z | 2021-10-30T00:03:05.000Z | ##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to ... | 47.342884 | 261 | 0.588162 |
c70bf8219d2bb2dabd3039c6feeeaba05de046c4 | 1,701 | py | Python | main.py | hasanzadeh99/mapna_test_2021 | 1e2e50a9aff32e2d730bf3d0fd20393e5aea0872 | [
"MIT"
] | null | null | null | main.py | hasanzadeh99/mapna_test_2021 | 1e2e50a9aff32e2d730bf3d0fd20393e5aea0872 | [
"MIT"
] | null | null | null | main.py | hasanzadeh99/mapna_test_2021 | 1e2e50a9aff32e2d730bf3d0fd20393e5aea0872 | [
"MIT"
] | null | null | null | import time
old_input_value = False
flag_falling_edge = None
start = None
flag_output_mask = False
DELAY_CONST = 10 # delay time from falling edge ... .
output = None
if __name__ == '__main__':
DELAY_CONST=int(input("Hello \nPlease Enter Your delay value here :"))
while True:
... | 25.772727 | 79 | 0.621399 |
c70c23e78ecc9c77169196b937ad121dbbab19c4 | 1,345 | py | Python | ansiblemetrics/playbook/num_deprecated_modules.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | 1 | 2020-04-24T16:09:14.000Z | 2020-04-24T16:09:14.000Z | ansiblemetrics/playbook/num_deprecated_modules.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | ansiblemetrics/playbook/num_deprecated_modules.py | radon-h2020/AnsibleMetrics | 8a8e27d9b54fc1578d00526c8663184a2e686cb2 | [
"Apache-2.0"
] | null | null | null | from ansiblemetrics.ansible_modules import DEPRECATED_MODULES_LIST
from ansiblemetrics.ansible_metric import AnsibleMetric
| 25.377358 | 90 | 0.553903 |
c70c9127731c0e67539a6749c14a06e75f1c3481 | 789 | py | Python | app/api/v1/validators/validators.py | GraceKiarie/iReporter | 1011f878f9fb643798192aeed1b68c3e6de4dedc | [
"MIT"
] | 1 | 2018-12-14T09:52:39.000Z | 2018-12-14T09:52:39.000Z | app/api/v1/validators/validators.py | GraceKiarie/iReporter | 1011f878f9fb643798192aeed1b68c3e6de4dedc | [
"MIT"
] | 6 | 2018-12-08T11:15:46.000Z | 2018-12-15T11:04:36.000Z | app/api/v1/validators/validators.py | GraceKiarie/iReporter | 1011f878f9fb643798192aeed1b68c3e6de4dedc | [
"MIT"
] | 5 | 2018-12-04T11:00:54.000Z | 2019-06-13T12:53:50.000Z | """ This module does validation for data input in incidents """
import re
| 24.65625 | 70 | 0.532319 |
c70da4e644f1e748e2087d4c879dc99b2751ebd0 | 2,710 | py | Python | bin/find_latest_versions.py | ebreton/ghost-in-a-shell | 8b3382d60a86322c74c6ee1b52f068dfcfc3d79e | [
"MIT"
] | 2 | 2018-05-31T08:56:16.000Z | 2020-01-23T15:12:44.000Z | bin/find_latest_versions.py | ebreton/ghost-in-a-shell | 8b3382d60a86322c74c6ee1b52f068dfcfc3d79e | [
"MIT"
] | null | null | null | bin/find_latest_versions.py | ebreton/ghost-in-a-shell | 8b3382d60a86322c74c6ee1b52f068dfcfc3d79e | [
"MIT"
] | null | null | null | #!/usr/bin/python
from distutils.version import LooseVersion
import argparse
import logging
import requests
import re
session = requests.Session()
# authorization token
TOKEN_URL = "https://auth.docker.io/token?service=registry.docker.io&scope=repository:%s:pull"
# find all tags
TAGS_URL = "https://index.docker.io... | 30.449438 | 94 | 0.667897 |
c70ef8c2db16a8357afdb58004c2cb5a69fd6d01 | 326 | py | Python | tests/conftest.py | badarsebard/terraform-pytest | 58c8096f0405ec1d0061723fc1dd2d099655c3c5 | [
"MIT"
] | null | null | null | tests/conftest.py | badarsebard/terraform-pytest | 58c8096f0405ec1d0061723fc1dd2d099655c3c5 | [
"MIT"
] | null | null | null | tests/conftest.py | badarsebard/terraform-pytest | 58c8096f0405ec1d0061723fc1dd2d099655c3c5 | [
"MIT"
] | 1 | 2021-11-19T16:36:31.000Z | 2021-11-19T16:36:31.000Z | from .terraform import TerraformManager
import pytest
from _pytest.tmpdir import TempPathFactory
| 25.076923 | 90 | 0.760736 |
c70f068d9386d59199952ccdcd03582e192c0909 | 2,933 | py | Python | pelicanconf.py | myrle-krantz/treasurer-site | e0beca3d0d724ae09300974f7020a5611fbd3034 | [
"Apache-2.0"
] | 1 | 2021-11-09T21:42:44.000Z | 2021-11-09T21:42:44.000Z | pelicanconf.py | myrle-krantz/treasurer-site | e0beca3d0d724ae09300974f7020a5611fbd3034 | [
"Apache-2.0"
] | 1 | 2021-11-01T11:14:10.000Z | 2021-11-01T11:14:10.000Z | pelicanconf.py | isabella232/treasurer-site | 9a2e33c85e040183df049d63814ef6b1b0bb7a46 | [
"Apache-2.0"
] | 3 | 2021-06-04T09:07:48.000Z | 2021-11-09T21:42:31.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
# vim: encoding=utf-8
#
# 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 yo... | 27.411215 | 99 | 0.715309 |
c70f37923d6264953c0f43a70aaafcb143563524 | 10,935 | py | Python | TurtleArt/taturtle.py | sugar-activities/4585-activity | 38e6efd7b4fcb9cf820efaf7406ce7abde92406e | [
"MIT"
] | null | null | null | TurtleArt/taturtle.py | sugar-activities/4585-activity | 38e6efd7b4fcb9cf820efaf7406ce7abde92406e | [
"MIT"
] | null | null | null | TurtleArt/taturtle.py | sugar-activities/4585-activity | 38e6efd7b4fcb9cf820efaf7406ce7abde92406e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#Copyright (c) 2010,12 Walter Bender
#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, ... | 34.936102 | 78 | 0.561225 |
c71003847371f17bbe96951b791e894ed7483c4a | 1,384 | py | Python | django_backend/group.py | holg/django_backend | 6cef76a378664e6621619862e6db476788a58992 | [
"BSD-3-Clause"
] | null | null | null | django_backend/group.py | holg/django_backend | 6cef76a378664e6621619862e6db476788a58992 | [
"BSD-3-Clause"
] | null | null | null | django_backend/group.py | holg/django_backend | 6cef76a378664e6621619862e6db476788a58992 | [
"BSD-3-Clause"
] | null | null | null | try:
from django.forms.utils import pretty_name
except ImportError:
from django.forms.forms import pretty_name
from django.template import Context
from django.template.loader import render_to_string
from .compat import context_flatten
| 28.833333 | 77 | 0.66474 |
c7102803d3080f23edcd56ddbfc0360cc305ab8a | 971 | py | Python | src/eodc_openeo_bindings/map_comparison_processes.py | eodcgmbh/eodc-openeo-bindings | 4e80eba036771a0c81359e1ac66862f1eead407b | [
"MIT"
] | null | null | null | src/eodc_openeo_bindings/map_comparison_processes.py | eodcgmbh/eodc-openeo-bindings | 4e80eba036771a0c81359e1ac66862f1eead407b | [
"MIT"
] | 7 | 2020-02-18T17:12:31.000Z | 2020-09-24T07:19:04.000Z | src/eodc_openeo_bindings/map_comparison_processes.py | eodcgmbh/eodc-openeo-bindings | 4e80eba036771a0c81359e1ac66862f1eead407b | [
"MIT"
] | null | null | null | """
"""
from eodc_openeo_bindings.map_utils import map_default
def map_lt(process):
"""
"""
param_dict = {'y': 'float'}
return map_default(process, 'lt', 'apply', param_dict)
def map_lte(process):
"""
"""
param_dict = {'y': 'float'}
return map_default(process, 'lte', 'apply',... | 15.918033 | 59 | 0.589083 |
c711129f24117223c3e97558213be4cfb18083e6 | 38 | py | Python | scripts/flow_tests/__init__.py | rombie/contrail-test | a68c71d6f282142501a7e2e889bbb232fdd82dc3 | [
"Apache-2.0"
] | 5 | 2020-09-29T00:36:57.000Z | 2022-02-16T06:51:32.000Z | serial_scripts/system_test/flow_tests/__init__.py | vkolli/contrail-test-perf | db04b8924a2c330baabe3059788b149d957a7d67 | [
"Apache-2.0"
] | 27 | 2019-11-02T02:18:34.000Z | 2022-02-24T18:49:08.000Z | serial_scripts/system_test/flow_tests/__init__.py | vkolli/contrail-test-perf | db04b8924a2c330baabe3059788b149d957a7d67 | [
"Apache-2.0"
] | 20 | 2019-11-28T16:02:25.000Z | 2022-01-06T05:56:58.000Z | """FLOW RELATED SYSTEM TEST CASES."""
| 19 | 37 | 0.684211 |
c711b732931b1daa135dbab87c710f6b0e8237b0 | 1,444 | py | Python | server/main.py | KejiaQiang/Spicy_pot_search | 72aaa9618e54178da513371802c2bcb751037bb0 | [
"MIT"
] | 1 | 2021-03-04T09:02:05.000Z | 2021-03-04T09:02:05.000Z | server/main.py | yanansong0930/Spicy_pot_search | 72aaa9618e54178da513371802c2bcb751037bb0 | [
"MIT"
] | null | null | null | server/main.py | yanansong0930/Spicy_pot_search | 72aaa9618e54178da513371802c2bcb751037bb0 | [
"MIT"
] | 1 | 2021-03-04T08:59:02.000Z | 2021-03-04T08:59:02.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from flask import Flask, request, abort, render_template
from datetime import timedelta
import pymysql
from search import start_search, decorate
page_dir = "E:/WEBPAGES_RAW"
app = Flask(__name__)
app.config['DEBUG'] = True
app.config['SEND_FILE_MAX_AGE_DEFAULT'] ... | 29.469388 | 103 | 0.637812 |
c711e0dd9090b2b45a4e1e0eca15dbcffe106551 | 5,355 | py | Python | examples/3d/subduction/viz/plot_dispwarp.py | cehanagan/pylith | cf5c1c34040460a82f79b6eb54df894ed1b1ee93 | [
"MIT"
] | 93 | 2015-01-08T16:41:22.000Z | 2022-02-25T13:40:02.000Z | examples/3d/subduction/viz/plot_dispwarp.py | sloppyjuicy/pylith | ac2c1587f87e45c948638b19560813d4d5b6a9e3 | [
"MIT"
] | 277 | 2015-02-20T16:27:35.000Z | 2022-03-30T21:13:09.000Z | examples/3d/subduction/viz/plot_dispwarp.py | sloppyjuicy/pylith | ac2c1587f87e45c948638b19560813d4d5b6a9e3 | [
"MIT"
] | 71 | 2015-03-24T12:11:08.000Z | 2022-03-03T04:26:02.000Z | #!/usr/bin/env pvpython
# -*- Python -*- (syntax highlighting)
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infr... | 35 | 118 | 0.651727 |
c713402fab437e2023ffb914ab06de89a1b21a69 | 220 | py | Python | src/spaceone/inventory/manager/rds_manager.py | jean1042/plugin-aws-cloud-services | 1cf192557b03478af33ae81f40b2a49f735716bb | [
"Apache-2.0"
] | 4 | 2020-06-22T01:48:07.000Z | 2020-08-24T00:51:09.000Z | src/spaceone/inventory/manager/rds_manager.py | jean1042/plugin-aws-cloud-services | 1cf192557b03478af33ae81f40b2a49f735716bb | [
"Apache-2.0"
] | 2 | 2020-07-20T01:58:32.000Z | 2020-08-04T07:41:37.000Z | src/spaceone/inventory/manager/rds_manager.py | jean1042/plugin-aws-cloud-services | 1cf192557b03478af33ae81f40b2a49f735716bb | [
"Apache-2.0"
] | 6 | 2020-06-22T09:19:40.000Z | 2020-09-17T06:35:37.000Z | from spaceone.inventory.libs.manager import AWSManager
# todo: __init__
#
| 24.444444 | 54 | 0.777273 |
c714251263633c1447c106182ffec957c2c483cc | 1,775 | py | Python | script/upload-checksums.py | fireball-x/atom-shell | d229338e40058a9b4323b2544f62818a3c55748c | [
"MIT"
] | 4 | 2016-04-02T14:53:54.000Z | 2017-07-26T05:47:43.000Z | script/upload-checksums.py | cocos-creator/atom-shell | d229338e40058a9b4323b2544f62818a3c55748c | [
"MIT"
] | null | null | null | script/upload-checksums.py | cocos-creator/atom-shell | d229338e40058a9b4323b2544f62818a3c55748c | [
"MIT"
] | 2 | 2015-07-18T09:31:03.000Z | 2019-12-24T09:55:03.000Z | #!/usr/bin/env python
import argparse
import hashlib
import os
import tempfile
from lib.config import s3_config
from lib.util import download, rm_rf, s3put
DIST_URL = 'https://atom.io/download/atom-shell/'
if __name__ == '__main__':
import sys
sys.exit(main())
| 23.666667 | 75 | 0.668169 |
c71481b1ca69523b36b0345fe995b27fb6d37535 | 2,533 | py | Python | pythoncode/kmeansimage.py | loganpadon/PokemonOneShot | 22f9904250c8c90b4fe4573d6ca060fd9f95c1d3 | [
"MIT"
] | null | null | null | pythoncode/kmeansimage.py | loganpadon/PokemonOneShot | 22f9904250c8c90b4fe4573d6ca060fd9f95c1d3 | [
"MIT"
] | 1 | 2019-04-04T20:40:20.000Z | 2019-04-04T20:40:20.000Z | pythoncode/kmeansimage.py | loganpadon/PokemonOneShot | 22f9904250c8c90b4fe4573d6ca060fd9f95c1d3 | [
"MIT"
] | null | null | null | # import the necessary packages
from sklearn.cluster import KMeans
import skimage
import matplotlib.pyplot as plt
import argparse
import cv2
# import the necessary packages
import numpy as np
import cv2
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i... | 28.460674 | 78 | 0.696802 |
c716271a9b4b9b525bfcb14f8c07170e7179b37f | 134 | py | Python | tests/encode.py | EddieBreeg/C_b64 | d49b155d1ae889c2ab779f54e6215f9d5e1031e6 | [
"MIT"
] | null | null | null | tests/encode.py | EddieBreeg/C_b64 | d49b155d1ae889c2ab779f54e6215f9d5e1031e6 | [
"MIT"
] | null | null | null | tests/encode.py | EddieBreeg/C_b64 | d49b155d1ae889c2ab779f54e6215f9d5e1031e6 | [
"MIT"
] | null | null | null | from sys import argv
from base64 import b64encode
with open("data", 'rb') as fIn:
b = fIn.read()
print(b64encode(b).decode()) | 22.333333 | 32 | 0.671642 |
c7162d1c243872610bbf29a5583204c35093859d | 1,691 | py | Python | src/json_sort/lib.py | cdumay/json-sort | a76fe2deaad649264e8ca0d1cc096d9741c60a04 | [
"Apache-2.0"
] | 3 | 2017-01-03T14:36:25.000Z | 2021-03-06T05:42:08.000Z | src/json_sort/lib.py | cdumay/json-sort | a76fe2deaad649264e8ca0d1cc096d9741c60a04 | [
"Apache-2.0"
] | null | null | null | src/json_sort/lib.py | cdumay/json-sort | a76fe2deaad649264e8ca0d1cc096d9741c60a04 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. codeauthor:: Cdric Dumay <cedric.dumay@gmail.com>
"""
import logging
import sys, os, json
from cdumay_rest_client.client import RESTClient
from cdumay_rest_client.exceptions import NotFound, HTTPException
def oncritical(exc):
"""description of oncritical"""... | 23.486111 | 73 | 0.622708 |
c7165074ee0affcd71c302a41edf2c2139ea9a06 | 4,484 | py | Python | test/test_create_dataset.py | gregstarr/ttools | fc8dcbf094370e9885311126724697830167d931 | [
"MIT"
] | null | null | null | test/test_create_dataset.py | gregstarr/ttools | fc8dcbf094370e9885311126724697830167d931 | [
"MIT"
] | null | null | null | test/test_create_dataset.py | gregstarr/ttools | fc8dcbf094370e9885311126724697830167d931 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import apexpy
import tempfile
import os
import h5py
from ttools import create_dataset, config, io, utils
map_periods = [np.timedelta64(10, 'm'), np.timedelta64(30, 'm'), np.timedelta64(1, 'h'), np.timedelta64(2, 'h')]
def test_calculate_bins():
mlat = np.arange(10)[None, :, N... | 40.396396 | 115 | 0.599242 |
c717ca8a8d1e158509ebb8f364af201eeca89e64 | 296 | py | Python | docs_src/options/callback/tutorial001.py | madkinsz/typer | a1520dcda685220a9a796288f5eaaebd00d68845 | [
"MIT"
] | 7,615 | 2019-12-24T13:08:20.000Z | 2022-03-31T22:07:53.000Z | docs_src/options/callback/tutorial001.py | madkinsz/typer | a1520dcda685220a9a796288f5eaaebd00d68845 | [
"MIT"
] | 351 | 2019-12-24T22:17:54.000Z | 2022-03-31T15:35:08.000Z | docs_src/options/callback/tutorial001.py | jina-ai/typer | 8b5e14b25ddf0dd777403015883301b17bedcee0 | [
"MIT"
] | 360 | 2019-12-24T15:29:59.000Z | 2022-03-30T20:33:10.000Z | import typer
if __name__ == "__main__":
typer.run(main)
| 18.5 | 64 | 0.658784 |
c719c2fbf99902f8dda33cce99ae748883db934d | 3,276 | py | Python | qft-client-py2.py | bocajspear1/qft | 7a8f3bb5d24bf173489dc4ad6159021e9365e9c4 | [
"MIT"
] | null | null | null | qft-client-py2.py | bocajspear1/qft | 7a8f3bb5d24bf173489dc4ad6159021e9365e9c4 | [
"MIT"
] | null | null | null | qft-client-py2.py | bocajspear1/qft | 7a8f3bb5d24bf173489dc4ad6159021e9365e9c4 | [
"MIT"
] | null | null | null | import socket
import threading
from time import sleep
from threading import Thread
import json
import sys
try:
timeout = 5
if len(sys.argv) > 1:
if (len(sys.argv) -1 ) % 2 != 0:
print "\nInvalid number of arguments\n\n-t Time between tests in seconds\n"
... | 30.616822 | 108 | 0.514042 |
c719cc42bfa09eeceed2d7963f0cd71faeceedf7 | 14,277 | py | Python | mdemanipulation/src/mdeoperation.py | modelia/ai-for-model-manipulation | 0b15b9d59b0f6009a5709b20db4e55b7d511ac38 | [
"BSD-3-Clause"
] | null | null | null | mdemanipulation/src/mdeoperation.py | modelia/ai-for-model-manipulation | 0b15b9d59b0f6009a5709b20db4e55b7d511ac38 | [
"BSD-3-Clause"
] | 1 | 2022-01-10T14:16:48.000Z | 2022-01-10T14:16:48.000Z | mdemanipulation/src/mdeoperation.py | modelia/ai-for-model-manipulation | 0b15b9d59b0f6009a5709b20db4e55b7d511ac38 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
import math
import os
import random
import sys
import time
import logging
import argparse
import numpy as np
from six.moves import xrange
import json
import torch
import torch.nn as nn
import torch.optim as optim
from torch import cuda
from torch.autograd import Variable
from torch.nn.utils im... | 43.794479 | 155 | 0.665826 |
c71a546240f7c071174fd45a93cc36d20aa838b4 | 5,388 | py | Python | barbican/common/resources.py | stanzikratel/barbican-2 | 10fae57c1cae3e140c19069a48f562d62ca53663 | [
"Apache-2.0"
] | null | null | null | barbican/common/resources.py | stanzikratel/barbican-2 | 10fae57c1cae3e140c19069a48f562d62ca53663 | [
"Apache-2.0"
] | null | null | null | barbican/common/resources.py | stanzikratel/barbican-2 | 10fae57c1cae3e140c19069a48f562d62ca53663 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013-2014 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 37.416667 | 76 | 0.625464 |
c71ac734d6782f901c4c5400d878122dd11ea416 | 567 | py | Python | 7/prime.py | redfast00/euler | 98fc49a1fcb8b49415cc4384952a6447378bd4f4 | [
"MIT"
] | null | null | null | 7/prime.py | redfast00/euler | 98fc49a1fcb8b49415cc4384952a6447378bd4f4 | [
"MIT"
] | null | null | null | 7/prime.py | redfast00/euler | 98fc49a1fcb8b49415cc4384952a6447378bd4f4 | [
"MIT"
] | null | null | null | from math import sqrt
for prime in stream_primes(10001):
print(prime)
| 22.68 | 45 | 0.560847 |
c71be407b214b6130f22496ab986a3ca003cfe56 | 777 | py | Python | app/utils.py | HealYouDown/flo-league | c729cad1daddfb89e997c101bd2da505b7137d98 | [
"MIT"
] | null | null | null | app/utils.py | HealYouDown/flo-league | c729cad1daddfb89e997c101bd2da505b7137d98 | [
"MIT"
] | 3 | 2021-05-03T19:05:11.000Z | 2021-06-12T09:43:02.000Z | app/utils.py | HealYouDown/flo-league | c729cad1daddfb89e997c101bd2da505b7137d98 | [
"MIT"
] | null | null | null | import datetime
from app.models import Log
from flask_login import current_user
from app.extensions import db
# https://stackoverflow.com/questions/6558535/find-the-date-for-the-first-monday-after-a-given-date
| 28.777778 | 99 | 0.705277 |
c71c00b730b4e3cf508cdefb7968765436ad7ce3 | 68,625 | py | Python | benchmarks/SimResults/combinations_spec_mylocality/oldstuff/cmp_soplexmcfcalculixgcc/power.py | TugberkArkose/MLScheduler | e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061 | [
"Unlicense"
] | null | null | null | benchmarks/SimResults/combinations_spec_mylocality/oldstuff/cmp_soplexmcfcalculixgcc/power.py | TugberkArkose/MLScheduler | e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061 | [
"Unlicense"
] | null | null | null | benchmarks/SimResults/combinations_spec_mylocality/oldstuff/cmp_soplexmcfcalculixgcc/power.py | TugberkArkose/MLScheduler | e493b6cbf7b9d29a2c9300d7dd6f0c2f102e4061 | [
"Unlicense"
] | null | null | null | power = {'BUSES': {'Area': 1.33155,
'Bus/Area': 1.33155,
'Bus/Gate Leakage': 0.00662954,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0691322,
'Bus/Subthreshold Leakage with power gating': 0.0259246,
'Gate... | 75.082057 | 124 | 0.682157 |
c71c6e80583baf2cb3846a4c3d378463d41f4b27 | 9,582 | py | Python | packages/gtmcore/gtmcore/environment/conda.py | gigabackup/gigantum-client | 70fe6b39b87b1c56351f2b4c551b6f1693813e4f | [
"MIT"
] | 60 | 2018-09-26T15:46:00.000Z | 2021-10-10T02:37:14.000Z | packages/gtmcore/gtmcore/environment/conda.py | gigabackup/gigantum-client | 70fe6b39b87b1c56351f2b4c551b6f1693813e4f | [
"MIT"
] | 1,706 | 2018-09-26T16:11:22.000Z | 2021-08-20T13:37:59.000Z | packages/gtmcore/gtmcore/environment/conda.py | griffinmilsap/gigantum-client | 70fe6b39b87b1c56351f2b4c551b6f1693813e4f | [
"MIT"
] | 11 | 2019-03-14T13:23:51.000Z | 2022-01-25T01:29:16.000Z | from typing import List, Dict
import json
from gtmcore.http import ConcurrentRequestManager, ConcurrentRequest
from gtmcore.environment.packagemanager import PackageManager, PackageResult, PackageMetadata
from gtmcore.container import container_for_context
from gtmcore.labbook import LabBook
from gtmcore.logging impor... | 40.774468 | 120 | 0.611668 |
c71da90915f08f68f935060eea6dba44dc3beaac | 1,147 | py | Python | netchos/io/io_mpl_to_px.py | brainets/netchos | ccfcd2ec85894adffbd20fbc67410dbdacfe6812 | [
"BSD-3-Clause"
] | 11 | 2021-04-20T19:45:23.000Z | 2021-11-17T15:18:33.000Z | netchos/io/io_mpl_to_px.py | brainets/netchos | ccfcd2ec85894adffbd20fbc67410dbdacfe6812 | [
"BSD-3-Clause"
] | 3 | 2021-04-26T09:01:42.000Z | 2021-06-30T12:09:15.000Z | netchos/io/io_mpl_to_px.py | brainets/netchos | ccfcd2ec85894adffbd20fbc67410dbdacfe6812 | [
"BSD-3-Clause"
] | 2 | 2021-05-06T20:28:46.000Z | 2021-05-24T10:36:44.000Z | """Conversion of Matplotlib / Seaborn inputs to plotly."""
import os.path as op
from pkg_resources import resource_filename
import json
def mpl_to_px_inputs(inputs, plt_types=None):
"""Convert typical matplotlib inputs to plotly to simplify API.
Parameters
----------
inputs : dict
Dictionary ... | 25.488889 | 77 | 0.62075 |
c71dc157e40f86937d395921d62896697e8b4c70 | 186 | py | Python | fizzbuzz_for_02.py | toastyxen/FizzBuzz | 094270e3882e743a80c5d32b3903c2483d37755f | [
"MIT"
] | null | null | null | fizzbuzz_for_02.py | toastyxen/FizzBuzz | 094270e3882e743a80c5d32b3903c2483d37755f | [
"MIT"
] | null | null | null | fizzbuzz_for_02.py | toastyxen/FizzBuzz | 094270e3882e743a80c5d32b3903c2483d37755f | [
"MIT"
] | null | null | null | """Fizzbuzz for loop variant 3"""
for x in range(1, 101):
OUTPUT = ""
if x % 3 == 0:
OUTPUT += "Fizz"
if x % 5 == 0:
OUTPUT += "Buzz"
print(OUTPUT or x)
| 18.6 | 33 | 0.473118 |
c71ef3a9007aa0aebc08a606ded35bff47c69406 | 242 | py | Python | cnn/struct/layer/parse_tensor_module.py | hslee1539/GIS_GANs | 6901c830b924e59fd06247247db3f925bab26583 | [
"MIT"
] | null | null | null | cnn/struct/layer/parse_tensor_module.py | hslee1539/GIS_GANs | 6901c830b924e59fd06247247db3f925bab26583 | [
"MIT"
] | null | null | null | cnn/struct/layer/parse_tensor_module.py | hslee1539/GIS_GANs | 6901c830b924e59fd06247247db3f925bab26583 | [
"MIT"
] | null | null | null | from tensor.main_module import Tensor
import numpy as np | 24.2 | 41 | 0.68595 |
c71f19c3cf33a6be263067d8b8a273844fc916bd | 3,337 | py | Python | openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py | hemantsonawane95/horizon-apelby | 01a5e72219aeca8c1451701ee85e232ed0618751 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py | hemantsonawane95/horizon-apelby | 01a5e72219aeca8c1451701ee85e232ed0618751 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py | hemantsonawane95/horizon-apelby | 01a5e72219aeca8c1451701ee85e232ed0618751 | [
"Apache-2.0"
] | null | null | null | # 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
# distributed under t... | 39.72619 | 77 | 0.585556 |
c71fc189fa6f73122afbe242bbfd89bd9a8a50ea | 9,050 | py | Python | data_structure/const_tree.py | alipay/StructuredLM_RTDT | 6edf2acf8747e17015523d78b6c580431a4f7b5c | [
"Apache-2.0"
] | 42 | 2021-06-01T07:07:12.000Z | 2022-03-18T02:38:53.000Z | data_structure/const_tree.py | alipay/StructuredLM_RTDT | 6edf2acf8747e17015523d78b6c580431a4f7b5c | [
"Apache-2.0"
] | 1 | 2021-12-15T03:50:24.000Z | 2021-12-15T08:46:56.000Z | data_structure/const_tree.py | alipay/StructuredLM_RTDT | 6edf2acf8747e17015523d78b6c580431a4f7b5c | [
"Apache-2.0"
] | 7 | 2021-06-02T02:28:01.000Z | 2022-01-14T06:59:29.000Z | # coding=utf-8
# Copyright (c) 2021 Ant Group
import sys
LABEL_SEP = '@'
INDENT_STRING1 = ' '
INDENT_STRING2 = ''
EMPTY_TOKEN = '___EMPTY___'
| 30.782313 | 98 | 0.575912 |
c71fcfdd300a9f0f56bf5188a7e7a694d05f3faa | 4,098 | py | Python | tests/test_minimize.py | The-Ludwig/iminuit | 8eef7b711846d6c8db9fe1fc883f6fa0977eb514 | [
"MIT"
] | null | null | null | tests/test_minimize.py | The-Ludwig/iminuit | 8eef7b711846d6c8db9fe1fc883f6fa0977eb514 | [
"MIT"
] | null | null | null | tests/test_minimize.py | The-Ludwig/iminuit | 8eef7b711846d6c8db9fe1fc883f6fa0977eb514 | [
"MIT"
] | null | null | null | import pytest
from iminuit import minimize
import numpy as np
from numpy.testing import assert_allclose, assert_equal
opt = pytest.importorskip("scipy.optimize")
| 26.269231 | 85 | 0.59346 |
c72190831a83ec1b623a951d123f7148309fad86 | 2,468 | py | Python | murtanto/parsing.py | amandatv20/botfb | 2be3ce0265fd86f48f24d2b496d36fd346e49d29 | [
"MIT"
] | 1 | 2021-03-24T13:54:33.000Z | 2021-03-24T13:54:33.000Z | murtanto/parsing.py | amandatv20/botfb | 2be3ce0265fd86f48f24d2b496d36fd346e49d29 | [
"MIT"
] | 2 | 2020-06-15T08:10:55.000Z | 2020-06-16T15:03:19.000Z | murtanto/parsing.py | amandatv20/botfb | 2be3ce0265fd86f48f24d2b496d36fd346e49d29 | [
"MIT"
] | null | null | null | # coded by: salism3
# 23 - 05 - 2020 23:18 (Malam Takbir)
from bs4 import BeautifulSoup as parser
from . import sorting
import re
| 31.641026 | 113 | 0.636548 |
c721ab40af9f4d2f1e869b104c622361e1311025 | 878 | py | Python | test/test_watchdog_status.py | ike709/tgs4-api-pyclient | 97918cfe614cc4ef06ef2485efff163417a8cd44 | [
"MIT"
] | null | null | null | test/test_watchdog_status.py | ike709/tgs4-api-pyclient | 97918cfe614cc4ef06ef2485efff163417a8cd44 | [
"MIT"
] | null | null | null | test/test_watchdog_status.py | ike709/tgs4-api-pyclient | 97918cfe614cc4ef06ef2485efff163417a8cd44 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
TGS API
A production scale tool for BYOND server management # noqa: E501
OpenAPI spec version: 9.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.model... | 21.95 | 86 | 0.702733 |
c721d7a43c6300b41e4a0357169d5ebc646135d1 | 235 | py | Python | setup.py | joesan/housing-classification-example | 93f921cf01c79ab63732ef302ab52d2c9ffedee1 | [
"FTL"
] | null | null | null | setup.py | joesan/housing-classification-example | 93f921cf01c79ab63732ef302ab52d2c9ffedee1 | [
"FTL"
] | null | null | null | setup.py | joesan/housing-classification-example | 93f921cf01c79ab63732ef302ab52d2c9ffedee1 | [
"FTL"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='Python codebase for the housing classification ML problem',
author='Joesan',
license='',
)
| 21.363636 | 76 | 0.685106 |
c7226ff1219f925df17003fe42d233729469035d | 4,187 | py | Python | tests/test_models/test_backbones/test_sr_backbones/test_edvr_net.py | wangruohui/mmediting | 6577d307caf9edfb34c6e46547994e6314fffc37 | [
"Apache-2.0"
] | 45 | 2022-03-05T06:54:34.000Z | 2022-03-30T02:15:42.000Z | tests/test_models/test_backbones/test_sr_backbones/test_edvr_net.py | wangruohui/mmediting | 6577d307caf9edfb34c6e46547994e6314fffc37 | [
"Apache-2.0"
] | 1 | 2022-03-25T14:04:39.000Z | 2022-03-31T04:48:38.000Z | tests/test_models/test_backbones/test_sr_backbones/test_edvr_net.py | wangruohui/mmediting | 6577d307caf9edfb34c6e46547994e6314fffc37 | [
"Apache-2.0"
] | 1 | 2022-03-10T01:00:24.000Z | 2022-03-10T01:00:24.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import pytest
import torch
from mmedit.models.backbones.sr_backbones.edvr_net import (EDVRNet,
PCDAlignment,
TSAFusion)
def test_pcd_alignment():
"... | 28.482993 | 76 | 0.578696 |
c72294488588ee770a6039927fb6209367d51df5 | 225 | py | Python | mat2py/core/datastoreio.py | mat2py/mat2py | 2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8 | [
"MIT"
] | null | null | null | mat2py/core/datastoreio.py | mat2py/mat2py | 2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8 | [
"MIT"
] | 37 | 2021-12-23T03:22:20.000Z | 2022-02-16T15:40:47.000Z | mat2py/core/datastoreio.py | mat2py/mat2py | 2776fbe9ca4ad2aaa3eac6aa79d17747a9ec24a8 | [
"MIT"
] | 2 | 2022-01-23T07:59:10.000Z | 2022-02-03T09:15:54.000Z | # type: ignore
__all__ = [
"readDatastoreImage",
"datastore",
]
| 15 | 51 | 0.711111 |
c7235d9e02846d039085054a4375d4bc687a9231 | 12,229 | py | Python | enjoliver-api/tests/test_generate_groups.py | netturpin/enjoliver | 9700470939da40ff84304af6e8c7210a5fd693a4 | [
"MIT"
] | 11 | 2017-11-06T08:42:55.000Z | 2021-01-08T11:01:02.000Z | enjoliver-api/tests/test_generate_groups.py | netturpin/enjoliver | 9700470939da40ff84304af6e8c7210a5fd693a4 | [
"MIT"
] | 7 | 2017-12-28T12:05:50.000Z | 2021-04-02T15:04:46.000Z | enjoliver-api/tests/test_generate_groups.py | netturpin/enjoliver | 9700470939da40ff84304af6e8c7210a5fd693a4 | [
"MIT"
] | 4 | 2017-11-08T10:03:31.000Z | 2018-06-03T17:59:43.000Z | import os
from shutil import rmtree
from tempfile import mkdtemp
from unittest import TestCase
from enjoliver import generator
| 35.446377 | 93 | 0.568485 |
c72423d0c9647d3f45e1ae401dca8a26496518f2 | 265 | py | Python | HackerRank/Calendar Module/solution.py | nikku1234/Code-Practise | 94eb6680ea36efd10856c377000219285f77e5a4 | [
"Apache-2.0"
] | 9 | 2020-07-02T06:06:17.000Z | 2022-02-26T11:08:09.000Z | HackerRank/Calendar Module/solution.py | nikku1234/Code-Practise | 94eb6680ea36efd10856c377000219285f77e5a4 | [
"Apache-2.0"
] | 1 | 2021-11-04T17:26:36.000Z | 2021-11-04T17:26:36.000Z | HackerRank/Calendar Module/solution.py | nikku1234/Code-Practise | 94eb6680ea36efd10856c377000219285f77e5a4 | [
"Apache-2.0"
] | 8 | 2021-01-31T10:31:12.000Z | 2022-03-13T09:15:55.000Z | # Enter your code here. Read input from STDIN. Print output to STDOUT
import calendar
mm,dd,yyyy = map(int,input().split())
day = ["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]
val = int (calendar.weekday(yyyy,mm,dd))
print(day[val])
| 22.083333 | 78 | 0.698113 |
c7245a8913ae3a1c31f00b1392df9f4dd3d991e9 | 7,560 | py | Python | scale/trigger/models.py | stevevarner/scale | 9623b261db4ddcf770f00df16afc91176142bb7c | [
"Apache-2.0"
] | null | null | null | scale/trigger/models.py | stevevarner/scale | 9623b261db4ddcf770f00df16afc91176142bb7c | [
"Apache-2.0"
] | null | null | null | scale/trigger/models.py | stevevarner/scale | 9623b261db4ddcf770f00df16afc91176142bb7c | [
"Apache-2.0"
] | null | null | null | """Defines the models for trigger rules and events"""
from __future__ import unicode_literals
import django.contrib.postgres.fields
from django.db import models, transaction
from django.utils.timezone import now
| 38.769231 | 120 | 0.693783 |
c724bce6559444b809161c07169a0eaf827f8a70 | 1,125 | py | Python | leetcode/0506_relative_ranks.py | chaosWsF/Python-Practice | ff617675b6bcd125933024bb4c246b63a272314d | [
"BSD-2-Clause"
] | null | null | null | leetcode/0506_relative_ranks.py | chaosWsF/Python-Practice | ff617675b6bcd125933024bb4c246b63a272314d | [
"BSD-2-Clause"
] | null | null | null | leetcode/0506_relative_ranks.py | chaosWsF/Python-Practice | ff617675b6bcd125933024bb4c246b63a272314d | [
"BSD-2-Clause"
] | null | null | null | """
Given scores of N athletes, find their relative ranks and the people with the top
three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and
"Bronze Medal".
Example 1:
Input: [5, 4, 3, 2, 1]
Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"]
Explanation: The fir... | 32.142857 | 84 | 0.593778 |
c724c503b44eb473d695fa13f0446956650e0c2b | 987 | py | Python | barriers/models/history/assessments/economic_impact.py | felix781/market-access-python-frontend | 3b0e49feb4fdf0224816326938a46002aa4a2b1c | [
"MIT"
] | 1 | 2021-12-15T04:14:03.000Z | 2021-12-15T04:14:03.000Z | barriers/models/history/assessments/economic_impact.py | felix781/market-access-python-frontend | 3b0e49feb4fdf0224816326938a46002aa4a2b1c | [
"MIT"
] | 19 | 2019-12-11T11:32:47.000Z | 2022-03-29T15:40:57.000Z | barriers/models/history/assessments/economic_impact.py | felix781/market-access-python-frontend | 3b0e49feb4fdf0224816326938a46002aa4a2b1c | [
"MIT"
] | 2 | 2021-02-09T09:38:45.000Z | 2021-03-29T19:07:09.000Z | from ..base import BaseHistoryItem, GenericHistoryItem
from ..utils import PolymorphicBase
| 24.675 | 59 | 0.68997 |
c72537aa56e0fec5c2e19ae544ffe17dd652b46b | 727 | py | Python | link_prob_show.py | Rheinwalt/spatial-effects-networks | 7b77a22b45341b024a57e1759b7b61cd91d90849 | [
"MIT"
] | 3 | 2018-12-21T20:19:18.000Z | 2021-01-02T12:58:56.000Z | link_prob_show.py | rick-foo/spatial-effects-networks | 7b77a22b45341b024a57e1759b7b61cd91d90849 | [
"MIT"
] | null | null | null | link_prob_show.py | rick-foo/spatial-effects-networks | 7b77a22b45341b024a57e1759b7b61cd91d90849 | [
"MIT"
] | 2 | 2020-09-03T14:18:37.000Z | 2021-10-01T18:06:42.000Z | import sys
import numpy as np
from sern import *
ids, lon, lat = np.loadtxt('nodes', unpack = True)
links = np.loadtxt('links', dtype = 'int')
A, b = AdjacencyMatrix(ids, links)
lon, lat = lon[b], lat[b]
n = A.shape[0]
# LinkProbability expects A as triu
A = A[np.triu_indices(n, 1)]
# play around with the scale, may... | 25.964286 | 63 | 0.707015 |
c7268aa939534725180b033986da1a690622e70b | 3,899 | py | Python | controller/components/app.py | isabella232/flight-lab | bd666b1d2bcec6f928a2e8da9f13fd5dae21319f | [
"Apache-2.0"
] | 15 | 2018-10-18T07:50:46.000Z | 2021-10-21T03:40:55.000Z | controller/components/app.py | google/flight-lab | bd666b1d2bcec6f928a2e8da9f13fd5dae21319f | [
"Apache-2.0"
] | 9 | 2018-09-17T23:00:02.000Z | 2019-01-22T21:08:04.000Z | controller/components/app.py | isabella232/flight-lab | bd666b1d2bcec6f928a2e8da9f13fd5dae21319f | [
"Apache-2.0"
] | 12 | 2019-01-07T12:43:37.000Z | 2021-10-21T03:40:44.000Z | # Copyright 2018 Flight Lab 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 33.612069 | 77 | 0.691459 |
c727467c9c5f9cbcf49804ff4103bf27f2140c3f | 1,504 | py | Python | botorch/acquisition/__init__.py | jmren168/botorch | 6c067185f56d3a244c4093393b8a97388fb1c0b3 | [
"MIT"
] | 1 | 2020-03-29T20:06:45.000Z | 2020-03-29T20:06:45.000Z | botorch/acquisition/__init__.py | jmren168/botorch | 6c067185f56d3a244c4093393b8a97388fb1c0b3 | [
"MIT"
] | null | null | null | botorch/acquisition/__init__.py | jmren168/botorch | 6c067185f56d3a244c4093393b8a97388fb1c0b3 | [
"MIT"
] | 1 | 2020-03-29T20:06:48.000Z | 2020-03-29T20:06:48.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from .acquisition import AcquisitionFunction
from .analytic import (
AnalyticAcquisitionFunction,
ConstrainedExpectedImprovement,
ExpectedImprovement,
NoisyExpectedImprovement,
PosteriorMean,
Probabil... | 25.491525 | 70 | 0.757979 |
c72c87715b18d844a4d1e6b4c82ec44a40f2bde2 | 2,810 | py | Python | examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_alternating_legs_env_randomizer.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 9,136 | 2015-01-02T00:41:45.000Z | 2022-03-31T15:30:02.000Z | examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_alternating_legs_env_randomizer.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,424 | 2015-01-05T08:55:58.000Z | 2022-03-30T19:34:55.000Z | examples/pybullet/gym/pybullet_envs/minitaur/envs/env_randomizers/minitaur_alternating_legs_env_randomizer.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,921 | 2015-01-02T10:19:30.000Z | 2022-03-31T02:48:42.000Z | """Randomize the minitaur_gym_alternating_leg_env when reset() is called.
The randomization include swing_offset, extension_offset of all legs that mimics
bent legs, desired_pitch from user input, battery voltage and motor damping.
"""
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(in... | 45.322581 | 86 | 0.70605 |
c72ca1c8b4319d09d601fa708b5ddc14cb8e0859 | 14,704 | py | Python | pygsti/modelmembers/states/tensorprodstate.py | pyGSTi-Developers/pyGSTi | bfedc1de4d604f14b0f958615776fb80ddb59e33 | [
"Apache-2.0"
] | 73 | 2016-01-28T05:02:05.000Z | 2022-03-30T07:46:33.000Z | pygsti/modelmembers/states/tensorprodstate.py | pyGSTi-Developers/pyGSTi | bfedc1de4d604f14b0f958615776fb80ddb59e33 | [
"Apache-2.0"
] | 113 | 2016-02-25T15:32:18.000Z | 2022-03-31T13:18:13.000Z | pygsti/modelmembers/states/tensorprodstate.py | pyGSTi-Developers/pyGSTi | bfedc1de4d604f14b0f958615776fb80ddb59e33 | [
"Apache-2.0"
] | 41 | 2016-03-15T19:32:07.000Z | 2022-02-16T10:22:05.000Z | """
The TensorProductState class and supporting functionality.
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.... | 42.994152 | 118 | 0.609698 |
c72d167470fc1e484c9ed6ee92db56b541a26d0c | 3,216 | py | Python | edivorce/apps/core/views/graphql.py | gerritvdm/eDivorce | e3c0a4037a7141769250b96df6cc4eb4ea5ef3af | [
"Apache-2.0"
] | 6 | 2017-03-24T18:20:33.000Z | 2021-01-29T03:25:07.000Z | edivorce/apps/core/views/graphql.py | gerritvdm/eDivorce | e3c0a4037a7141769250b96df6cc4eb4ea5ef3af | [
"Apache-2.0"
] | 13 | 2018-10-12T17:20:37.000Z | 2021-11-05T23:13:21.000Z | edivorce/apps/core/views/graphql.py | gerritvdm/eDivorce | e3c0a4037a7141769250b96df6cc4eb4ea5ef3af | [
"Apache-2.0"
] | 11 | 2017-03-15T12:36:39.000Z | 2021-03-05T14:35:59.000Z | import graphene
import graphene_django
from django.http import HttpResponseForbidden
from graphene_django.views import GraphQLView
from graphql import GraphQLError
from edivorce.apps.core.models import Document
graphql_schema = graphene.Schema(query=Query, mutation=Mutations)
| 36.545455 | 135 | 0.668221 |
c72e729bd791fda04d1f1bf87cc60496068da071 | 5,862 | py | Python | amazing/maze.py | danieloconell/maze-solver | f60e476d827d59bfa17cd2148787332707846882 | [
"MIT"
] | null | null | null | amazing/maze.py | danieloconell/maze-solver | f60e476d827d59bfa17cd2148787332707846882 | [
"MIT"
] | 2 | 2021-06-08T19:35:19.000Z | 2021-09-08T00:44:59.000Z | amazing/maze.py | danieloconell/amazing | f60e476d827d59bfa17cd2148787332707846882 | [
"MIT"
] | null | null | null | from .exceptions import MazeNotSolved, AlgorithmNotFound
from .dijkstra import Dijkstra
from .astar import Astar
from functools import wraps
import warnings
from daedalus import Maze as _maze
from PIL import Image
warnings.simplefilter("once", UserWarning)
| 32.932584 | 114 | 0.525589 |
c72eaa2b73efe739c3a50690c7c96660b59023bd | 4,215 | py | Python | config.py | FarbodFarhangfar/midi_player_python | 924cd164b7867d294c761a70d06ab330fa1b8373 | [
"MIT"
] | null | null | null | config.py | FarbodFarhangfar/midi_player_python | 924cd164b7867d294c761a70d06ab330fa1b8373 | [
"MIT"
] | null | null | null | config.py | FarbodFarhangfar/midi_player_python | 924cd164b7867d294c761a70d06ab330fa1b8373 | [
"MIT"
] | null | null | null | import os
| 38.669725 | 106 | 0.474496 |
c72f4c5b309a87813b09f64b422ca7519b3e740b | 2,182 | py | Python | roles/openshift_health_checker/library/ocutil.py | shgriffi/openshift-ansible | 6313f519307cf50055589c3876d8bec398bbc4d4 | [
"Apache-2.0"
] | 164 | 2015-07-29T17:35:04.000Z | 2021-12-16T16:38:04.000Z | roles/openshift_health_checker/library/ocutil.py | shgriffi/openshift-ansible | 6313f519307cf50055589c3876d8bec398bbc4d4 | [
"Apache-2.0"
] | 3,634 | 2015-06-09T13:49:15.000Z | 2022-03-23T20:55:44.000Z | roles/openshift_health_checker/library/ocutil.py | shgriffi/openshift-ansible | 6313f519307cf50055589c3876d8bec398bbc4d4 | [
"Apache-2.0"
] | 250 | 2015-06-08T19:53:11.000Z | 2022-03-01T04:51:23.000Z | #!/usr/bin/python
"""Interface to OpenShift oc command"""
import os
import shlex
import shutil
import subprocess
from ansible.module_utils.basic import AnsibleModule
ADDITIONAL_PATH_LOOKUPS = ['/usr/local/bin', os.path.expanduser('~/bin')]
def locate_oc_binary():
"""Find and return oc binary file"""
# htt... | 29.486486 | 91 | 0.636114 |
c7300e0d4920ea9bf3233fb48ec01feb851a08ad | 4,125 | py | Python | code/network/__init__.py | michalochman/complex-networks | 49337376e32fac253d8de9919d5acd00a9b566bb | [
"MIT"
] | null | null | null | code/network/__init__.py | michalochman/complex-networks | 49337376e32fac253d8de9919d5acd00a9b566bb | [
"MIT"
] | null | null | null | code/network/__init__.py | michalochman/complex-networks | 49337376e32fac253d8de9919d5acd00a9b566bb | [
"MIT"
] | null | null | null | import fractions
| 42.96875 | 109 | 0.615758 |
c730483de9837a25bc1e629091819a776f0b1ff3 | 3,055 | py | Python | invoke_ansible.py | samvarankashyap/ansible_api_usage | d03c67b4606d2e101ef7341bd31161b4db39cd5b | [
"Apache-2.0"
] | null | null | null | invoke_ansible.py | samvarankashyap/ansible_api_usage | d03c67b4606d2e101ef7341bd31161b4db39cd5b | [
"Apache-2.0"
] | null | null | null | invoke_ansible.py | samvarankashyap/ansible_api_usage | d03c67b4606d2e101ef7341bd31161b4db39cd5b | [
"Apache-2.0"
] | null | null | null | import ansible
import pprint
from ansible import utils
from jinja2 import Environment, PackageLoader
from collections import namedtuple
from ansible import utils
from ansible.parsing.dataloader import DataLoader
from ansible.vars import VariableManager
from ansible.inventory import Inventory
from ansible.executor.playb... | 40.197368 | 89 | 0.466776 |
c733c87e85c1c4f5626af759efe7bb3290f415c6 | 2,336 | py | Python | bin/python/csv2es.py | reid-wagner/proteomics-pipelines | 2214c2ad4c14fabcb50a3c0800e9d383ce73df3d | [
"MIT"
] | 2 | 2018-09-06T14:05:59.000Z | 2022-02-18T10:09:06.000Z | bin/python/csv2es.py | reid-wagner/proteomics-pipelines | 2214c2ad4c14fabcb50a3c0800e9d383ce73df3d | [
"MIT"
] | 7 | 2018-09-30T00:49:04.000Z | 2022-01-27T07:55:26.000Z | bin/python/csv2es.py | reid-wagner/proteomics-pipelines | 2214c2ad4c14fabcb50a3c0800e9d383ce73df3d | [
"MIT"
] | 3 | 2019-10-29T12:20:45.000Z | 2021-10-06T14:38:43.000Z | #!/usr/bin/env python3
import itertools
import string
from elasticsearch import Elasticsearch,helpers
import sys
import os
from glob import glob
import pandas as pd
import json
host = sys.argv[1]
port = int(sys.argv[2])
alias = sys.argv[3]
print(host)
print(port)
print(alias)
es = Elasticsearch([{'host':... | 28.144578 | 99 | 0.644264 |
c7345842917a4fbe78846b66040cbcd50b2fa112 | 45 | py | Python | main/src/preparation/parsers/tree-sitter-python/examples/crlf-line-endings.py | jason424217/Artificial-Code-Gen | a6e2c097c5ffe8cb0929e6703035b526f477e514 | [
"MIT"
] | null | null | null | main/src/preparation/parsers/tree-sitter-python/examples/crlf-line-endings.py | jason424217/Artificial-Code-Gen | a6e2c097c5ffe8cb0929e6703035b526f477e514 | [
"MIT"
] | null | null | null | main/src/preparation/parsers/tree-sitter-python/examples/crlf-line-endings.py | jason424217/Artificial-Code-Gen | a6e2c097c5ffe8cb0929e6703035b526f477e514 | [
"MIT"
] | null | null | null | print a
if b:
if c:
d
e
| 6.428571 | 9 | 0.311111 |
c7349ec685ce1af0110178abaaf2eb1878a5bd71 | 106 | py | Python | Src/main.py | DukeA/DAT02X-19-03-MachineLearning-Starcraft2 | ade31deb4cf6cacd0c411c39310aeb1300561936 | [
"MIT"
] | null | null | null | Src/main.py | DukeA/DAT02X-19-03-MachineLearning-Starcraft2 | ade31deb4cf6cacd0c411c39310aeb1300561936 | [
"MIT"
] | null | null | null | Src/main.py | DukeA/DAT02X-19-03-MachineLearning-Starcraft2 | ade31deb4cf6cacd0c411c39310aeb1300561936 | [
"MIT"
] | null | null | null |
from absl import app
from mainLoop import main
if __name__ == '__main__':
app.run(main)
| 13.25 | 27 | 0.632075 |
c735745b02553eb9e477617ad9c63df5e4730b1c | 3,793 | py | Python | bos_sarcat_scraper/__main__.py | hysds/bos_sarcat_scraper | 1bf3612e7d8fad80c8704a909087be19cc3e1db2 | [
"Apache-2.0"
] | 1 | 2020-06-24T00:25:30.000Z | 2020-06-24T00:25:30.000Z | bos_sarcat_scraper/__main__.py | aria-jpl/bos_sarcat_scraper | 1bf3612e7d8fad80c8704a909087be19cc3e1db2 | [
"Apache-2.0"
] | null | null | null | bos_sarcat_scraper/__main__.py | aria-jpl/bos_sarcat_scraper | 1bf3612e7d8fad80c8704a909087be19cc3e1db2 | [
"Apache-2.0"
] | 1 | 2019-05-08T17:15:00.000Z | 2019-05-08T17:15:00.000Z | from __future__ import absolute_import
from builtins import str
from builtins import input
import sys
import argparse
from . import bosart_scrape
import datetime
import json
if __name__ == '__main__':
main()
| 39.926316 | 240 | 0.675718 |
c73803a506dad8312572b3d3624ec1ddd2985a19 | 23,181 | py | Python | vgm2electron.py | simondotm/vgm2electron | 38e340d2baeaa3e5722ac982c82e58fb9858f9d9 | [
"MIT"
] | 2 | 2021-03-08T13:55:02.000Z | 2021-05-02T12:50:38.000Z | vgm2electron.py | simondotm/vgm2electron | 38e340d2baeaa3e5722ac982c82e58fb9858f9d9 | [
"MIT"
] | null | null | null | vgm2electron.py | simondotm/vgm2electron | 38e340d2baeaa3e5722ac982c82e58fb9858f9d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# vgm2electron.py
# Tool for converting SN76489-based PSG VGM data to Acorn Electron
# By Simon Morris (https://github.com/simondotm/)
# See https://github.com/simondotm/vgm-packer
#
# Copyright (c) 2019 Simon Morris. All rights reserved.
#
# "MIT License":
# Permission is hereby granted, free of ... | 31.798354 | 230 | 0.60981 |
c739f9c426d2980ab50d3acc428d5d636d5dd280 | 14,198 | py | Python | twitter_sent.py | rthorst/TwitterSentiment | b719feffbfed1dfe9028db0900b3158d19322284 | [
"MIT"
] | 6 | 2020-02-21T15:50:34.000Z | 2021-11-09T19:45:50.000Z | twitter_sent.py | rthorst/TwitterSentiment | b719feffbfed1dfe9028db0900b3158d19322284 | [
"MIT"
] | null | null | null | twitter_sent.py | rthorst/TwitterSentiment | b719feffbfed1dfe9028db0900b3158d19322284 | [
"MIT"
] | null | null | null | import webapp2
import tweepy
import json
import csv
import os
import statistics
import bokeh
from bokeh.io import show, output_file
from bokeh.plotting import figure
from bokeh.models import HoverTool, ColumnDataSource
from bokeh.embed import components, json_item
from bokeh.resources import INLINE
from bokeh.models.gl... | 33.885442 | 120 | 0.623257 |
c73a657eabaaa5580cd95fd8f430b160b1e8e216 | 8,956 | py | Python | tests/testcgatools.py | ereide/pyga-camcal | fd25748ddb11c5b05ef24a2deca2689e0d899875 | [
"MIT"
] | 5 | 2018-05-22T09:11:31.000Z | 2022-03-11T02:32:01.000Z | tests/testcgatools.py | ereide/pyga-camcal | fd25748ddb11c5b05ef24a2deca2689e0d899875 | [
"MIT"
] | null | null | null | tests/testcgatools.py | ereide/pyga-camcal | fd25748ddb11c5b05ef24a2deca2689e0d899875 | [
"MIT"
] | null | null | null | import unittest
import clifford as cl
from clifford import g3c
from numpy import pi, e
import numpy as np
from scipy.sparse.linalg.matfuncs import _sinch as sinch
from clifford import MultiVector
from pygacal.common.cgatools import ( Sandwich, Dilator, Translator, Reflector,
inversion, Ro... | 33.17037 | 125 | 0.546226 |
c73c3d02ecdfac6eb2c791e1853c9f4bcf52f552 | 6,909 | py | Python | router/posts.py | DiegoLing33/prestij.xyz-api | 69a11a2c93dd98975f9becbc4b8f596e4941a05f | [
"MIT"
] | null | null | null | router/posts.py | DiegoLing33/prestij.xyz-api | 69a11a2c93dd98975f9becbc4b8f596e4941a05f | [
"MIT"
] | null | null | null | router/posts.py | DiegoLing33/prestij.xyz-api | 69a11a2c93dd98975f9becbc4b8f596e4941a05f | [
"MIT"
] | null | null | null | #
#
#
#
#
#
#
# Developed by Yakov V. Panov (C) Ling Black 2020
# @site http://ling.black
#
#
#
#
#
#
#
# Developed by Yakov V. Panov (C) Ling Black 2020
# @site http://ling.black
from typing import List
from fastapi import APIRouter, Depends, HTTPException
from pydantic import BaseModel... | 25.876404 | 118 | 0.568823 |
c73c5c8e9b60dd28827b865f9cd0c2682cc0cd16 | 3,216 | py | Python | toontown/catalog/CatalogChatBalloon.py | CrankySupertoon01/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | toontown/catalog/CatalogChatBalloon.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | toontown/catalog/CatalogChatBalloon.py | CrankySupertoonArchive/Toontown-2 | 60893d104528a8e7eb4aced5d0015f22e203466d | [
"MIT"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | from pandac.PandaModules import *
| 34.212766 | 81 | 0.589552 |
c73c9cd86a4a585bb09b4cbd3f15cf16c3ddc42d | 831 | py | Python | TTS/vocoder/tf/utils/io.py | mightmay/Mien-TTS | 8a22ff0a79558b3cf4981ce1b63f4d1485ea6338 | [
"MIT"
] | null | null | null | TTS/vocoder/tf/utils/io.py | mightmay/Mien-TTS | 8a22ff0a79558b3cf4981ce1b63f4d1485ea6338 | [
"MIT"
] | null | null | null | TTS/vocoder/tf/utils/io.py | mightmay/Mien-TTS | 8a22ff0a79558b3cf4981ce1b63f4d1485ea6338 | [
"MIT"
] | 1 | 2021-04-28T17:30:03.000Z | 2021-04-28T17:30:03.000Z | import datetime
import pickle
import tensorflow as tf
def save_checkpoint(model, current_step, epoch, output_path, **kwargs):
""" Save TF Vocoder model """
state = {
'model': model.weights,
'step': current_step,
'epoch': epoch,
'date': datetime.date.today().strftime("%B %d, %Y"... | 29.678571 | 74 | 0.65704 |
c73caaa0e2719e60ad785aecaaee84cf63518c02 | 1,497 | py | Python | tests/test_path_choice.py | jataware/flee | 67c00c4572e71dd2bbfb390d7d7ede13ffb9594e | [
"BSD-3-Clause"
] | 3 | 2021-05-24T14:07:48.000Z | 2022-01-10T03:20:36.000Z | tests/test_path_choice.py | jataware/flee | 67c00c4572e71dd2bbfb390d7d7ede13ffb9594e | [
"BSD-3-Clause"
] | 15 | 2020-06-05T11:42:23.000Z | 2022-03-09T20:17:29.000Z | tests/test_path_choice.py | jataware/flee | 67c00c4572e71dd2bbfb390d7d7ede13ffb9594e | [
"BSD-3-Clause"
] | 3 | 2020-05-29T15:10:28.000Z | 2022-03-09T19:51:41.000Z | from flee import flee
"""
Generation 1 code. Incorporates only distance, travel always takes one day.
"""
if __name__ == "__main__":
test_path_choice()
| 33.266667 | 75 | 0.663327 |
c73dae2399d233b79b4e4ba84ebee8f7d71a6c22 | 10,463 | py | Python | archive/old_plots/plot_supplemental_divergence_correlations.py | garudlab/mother_infant | 98a27c83bf5ece9497d5a030c6c9396a8c514781 | [
"BSD-2-Clause"
] | 2 | 2020-08-09T06:19:11.000Z | 2021-08-18T17:12:23.000Z | archive/old_plots/plot_supplemental_divergence_correlations.py | garudlab/mother_infant | 98a27c83bf5ece9497d5a030c6c9396a8c514781 | [
"BSD-2-Clause"
] | null | null | null | archive/old_plots/plot_supplemental_divergence_correlations.py | garudlab/mother_infant | 98a27c83bf5ece9497d5a030c6c9396a8c514781 | [
"BSD-2-Clause"
] | 8 | 2019-02-20T22:21:55.000Z | 2021-02-13T00:55:40.000Z | import matplotlib
matplotlib.use('Agg')
import config
import parse_midas_data
import parse_HMP_data
import os.path
import pylab
import sys
import numpy
import diversity_utils
import gene_diversity_utils
import calculate_substitution_rates
import stats_utils
import matplotlib.colors as colors
import matplotlib.cm a... | 38.047273 | 203 | 0.750454 |
c73e6e9b07e0e5afa67a521f170e1521081ec4b3 | 34,246 | py | Python | multivis/plotFeatures.py | brettChapman/cimcb_vis | b373ed426b24ece1dcc20febd7c8023921b024d6 | [
"MIT"
] | 1 | 2021-06-27T23:52:40.000Z | 2021-06-27T23:52:40.000Z | multivis/plotFeatures.py | brettChapman/cimcb_vis | b373ed426b24ece1dcc20febd7c8023921b024d6 | [
"MIT"
] | null | null | null | multivis/plotFeatures.py | brettChapman/cimcb_vis | b373ed426b24ece1dcc20febd7c8023921b024d6 | [
"MIT"
] | 2 | 2021-06-27T23:53:03.000Z | 2021-07-12T12:59:23.000Z | import sys
import copy
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
from collections import Counter
from .utils import *
import numpy as np
import pandas as pd | 52.605223 | 586 | 0.5464 |
c73eca01ba5620a706110aaabb7ea66ae754f7f0 | 1,183 | py | Python | core/data/DataWriter.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 25 | 2015-11-08T16:36:54.000Z | 2022-01-20T16:03:28.000Z | core/data/DataWriter.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 2 | 2016-12-01T23:13:08.000Z | 2017-07-25T02:40:49.000Z | core/data/DataWriter.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 10 | 2016-07-05T14:39:16.000Z | 2022-01-01T02:05:55.000Z | """
DataWriter.py
"""
from DataController import DataController
from DataReader import DataReader
from vtk import vtkMetaImageWriter
from vtk import vtkXMLImageDataWriter
| 27.511628 | 76 | 0.752325 |
c73ff4534e3b71c1974b4bf7835f8ec9472d9d62 | 7,483 | py | Python | parkings/models/permit.py | klemmari1/parkkihubi | 93218c6046c0910e8a4c723dc7128c6eec085b8c | [
"MIT"
] | 12 | 2016-11-29T15:13:10.000Z | 2021-06-12T06:45:38.000Z | parkings/models/permit.py | niuzhipeng123/parkkihubi | 93218c6046c0910e8a4c723dc7128c6eec085b8c | [
"MIT"
] | 154 | 2016-11-30T09:07:58.000Z | 2022-02-12T08:29:36.000Z | parkings/models/permit.py | niuzhipeng123/parkkihubi | 93218c6046c0910e8a4c723dc7128c6eec085b8c | [
"MIT"
] | 15 | 2016-11-29T19:32:48.000Z | 2022-01-05T11:31:39.000Z | from itertools import chain
from django.conf import settings
from django.contrib.gis.db import models as gis_models
from django.db import models, router, transaction
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from ..fields import CleaningJsonField
from ..validators import... | 37.415 | 103 | 0.667379 |
c744286930e6918cebec7544521adbaf000c03cc | 4,265 | py | Python | poi_mining/biz/LSA/logEntropy.py | yummydeli/machine_learning | 54471182ac21ef0eee26557a7bd6f3a3dc3a09bd | [
"MIT"
] | 1 | 2019-09-29T13:36:29.000Z | 2019-09-29T13:36:29.000Z | poi_mining/biz/LSA/logEntropy.py | yummydeli/machine_learning | 54471182ac21ef0eee26557a7bd6f3a3dc3a09bd | [
"MIT"
] | null | null | null | poi_mining/biz/LSA/logEntropy.py | yummydeli/machine_learning | 54471182ac21ef0eee26557a7bd6f3a3dc3a09bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding:utf-8
# ##############################################################################
# The MIT License (MIT)
#
# Copyright (c) [2015] [baidu.com]
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (th... | 35.541667 | 100 | 0.557562 |
c7465ff1ea985cda2b457c6697cd774f312adad2 | 40 | py | Python | Python/swap_numbers.py | saurabhcommand/Hello-world | 647bad9da901a52d455f05ecc37c6823c22dc77e | [
"MIT"
] | 1,428 | 2018-10-03T15:15:17.000Z | 2019-03-31T18:38:36.000Z | Python/swap_numbers.py | saurabhcommand/Hello-world | 647bad9da901a52d455f05ecc37c6823c22dc77e | [
"MIT"
] | 1,162 | 2018-10-03T15:05:49.000Z | 2018-10-18T14:17:52.000Z | Python/swap_numbers.py | saurabhcommand/Hello-world | 647bad9da901a52d455f05ecc37c6823c22dc77e | [
"MIT"
] | 3,909 | 2018-10-03T15:07:19.000Z | 2019-03-31T18:39:08.000Z | a = 5
b = 7
a,b = b,a
print a
print b
| 5 | 9 | 0.5 |
c746b2ee9cd86b479c95bc6e51b1c40a08b1d7da | 2,162 | py | Python | algorithms/tests/test_unionfind.py | tommyod/PythonAlgorithms | f0a0f67be069fc9e9fa3027ed83942d6401223fe | [
"MIT"
] | 1 | 2021-08-23T17:15:06.000Z | 2021-08-23T17:15:06.000Z | algorithms/tests/test_unionfind.py | tommyod/PythonAlgorithms | f0a0f67be069fc9e9fa3027ed83942d6401223fe | [
"MIT"
] | 1 | 2018-05-02T17:29:42.000Z | 2018-05-02T17:31:18.000Z | algorithms/tests/test_unionfind.py | tommyod/PythonAlgorithms | f0a0f67be069fc9e9fa3027ed83942d6401223fe | [
"MIT"
] | 1 | 2018-05-02T12:31:52.000Z | 2018-05-02T12:31:52.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests for the union find data structure.
"""
try:
from ..unionfind import UnionFind
except ValueError:
pass
def test_unionfind_basics():
"""
Test the basic properties of unionfind.
"""
u = UnionFind([1, 2, 3])
assert u.in_same_set(1,... | 21.62 | 68 | 0.584181 |
c746ec91b306e818609b2388a6f07e590b53157d | 10,961 | py | Python | a3/ga.py | mishless/LearningSystems | 635d9af9d00ae0360d7ca8571bf47f782fdcdfe9 | [
"MIT"
] | 1 | 2021-08-01T03:30:49.000Z | 2021-08-01T03:30:49.000Z | a3/ga.py | mishless/LearningSystems | 635d9af9d00ae0360d7ca8571bf47f782fdcdfe9 | [
"MIT"
] | null | null | null | a3/ga.py | mishless/LearningSystems | 635d9af9d00ae0360d7ca8571bf47f782fdcdfe9 | [
"MIT"
] | null | null | null | # Genetic Algorithm for solving the Traveling Salesman problem
# Authors: Mihaela Stoycheva, Vukan Turkulov
# Includes
import configparser
import math
import matplotlib.pyplot as plt
import numpy
import random
import sys
from operator import itemgetter
#Global variables(yay!)
# Configuration variables(read from co... | 26.159905 | 77 | 0.624487 |
c7477304b232543e959b4e41d7f4db3d8d55814b | 334 | py | Python | products/migrations/0010_remove_product_updated_at.py | UB-ES-2021-A1/wannasell-backend | 84360b2985fc28971867601373697f39303e396b | [
"Unlicense"
] | null | null | null | products/migrations/0010_remove_product_updated_at.py | UB-ES-2021-A1/wannasell-backend | 84360b2985fc28971867601373697f39303e396b | [
"Unlicense"
] | 62 | 2021-11-22T21:52:44.000Z | 2021-12-17T15:07:02.000Z | products/migrations/0010_remove_product_updated_at.py | UB-ES-2021-A1/wannasell-backend | 84360b2985fc28971867601373697f39303e396b | [
"Unlicense"
] | null | null | null | # Generated by Django 3.2.8 on 2021-11-25 17:50
from django.db import migrations
| 18.555556 | 48 | 0.598802 |
c74852ff0006431dcf627c07119eece06aae36cb | 160 | py | Python | ResumeAnalyser/apps.py | samyakj2307/recruitai_resume_backend | 52f8eda63d479b28fc19fe2d7149ab9ee9be122f | [
"MIT"
] | null | null | null | ResumeAnalyser/apps.py | samyakj2307/recruitai_resume_backend | 52f8eda63d479b28fc19fe2d7149ab9ee9be122f | [
"MIT"
] | null | null | null | ResumeAnalyser/apps.py | samyakj2307/recruitai_resume_backend | 52f8eda63d479b28fc19fe2d7149ab9ee9be122f | [
"MIT"
] | 1 | 2021-06-03T13:56:53.000Z | 2021-06-03T13:56:53.000Z | from django.apps import AppConfig
| 22.857143 | 56 | 0.78125 |
c748ba40f4f42a2340be17f0209db3df304f6bd7 | 196 | py | Python | plugins/core/player_manager_plugin/__init__.py | StarryPy/StarryPy-Historic | b9dbd552b8c4631a5a8e9dda98b7ba447eca59da | [
"WTFPL"
] | 38 | 2015-02-12T11:57:59.000Z | 2018-11-15T16:03:45.000Z | plugins/core/player_manager_plugin/__init__.py | StarryPy/StarryPy-Historic | b9dbd552b8c4631a5a8e9dda98b7ba447eca59da | [
"WTFPL"
] | 68 | 2015-02-05T23:29:47.000Z | 2017-12-27T08:26:25.000Z | plugins/core/player_manager_plugin/__init__.py | StarryPy/StarryPy-Historic | b9dbd552b8c4631a5a8e9dda98b7ba447eca59da | [
"WTFPL"
] | 21 | 2015-02-06T18:58:21.000Z | 2017-12-24T20:08:59.000Z | from plugins.core.player_manager_plugin.plugin import PlayerManagerPlugin
from plugins.core.player_manager_plugin.manager import (
Banned,
UserLevels,
permissions,
PlayerManager
)
| 24.5 | 73 | 0.795918 |
c74916514901ff1d3dbfb832b264c70329520805 | 3,063 | py | Python | src/config/svc-monitor/svc_monitor/services/loadbalancer/drivers/ha_proxy/custom_attributes/haproxy_validator.py | jnpr-pranav/contrail-controller | 428eee37c28c31830fd764315794e1a6e52720c1 | [
"Apache-2.0"
] | 37 | 2020-09-21T10:42:26.000Z | 2022-01-09T10:16:40.000Z | src/config/svc-monitor/svc_monitor/services/loadbalancer/drivers/ha_proxy/custom_attributes/haproxy_validator.py | jnpr-pranav/contrail-controller | 428eee37c28c31830fd764315794e1a6e52720c1 | [
"Apache-2.0"
] | null | null | null | src/config/svc-monitor/svc_monitor/services/loadbalancer/drivers/ha_proxy/custom_attributes/haproxy_validator.py | jnpr-pranav/contrail-controller | 428eee37c28c31830fd764315794e1a6e52720c1 | [
"Apache-2.0"
] | 21 | 2020-08-25T12:48:42.000Z | 2022-03-22T04:32:18.000Z | from builtins import str
from builtins import range
from builtins import object
import logging
import inspect
import os
def validate_custom_attributes(custom_attributes_dict, section,
custom_attributes):
section_dict = {}
if custom_attributes and section in custom_attributes_dict... | 39.269231 | 79 | 0.479595 |
c74949362f59fa0673a80dd80fbdd7f5a0af70d8 | 1,405 | py | Python | python/janitor/typecache.py | monkeyman79/janitor | a41187c1b58b736a5de2b0b30eb51d85a65b17c3 | [
"MIT"
] | 2 | 2018-11-06T13:02:27.000Z | 2021-02-22T19:07:22.000Z | python/janitor/typecache.py | monkeyman79/janitor | a41187c1b58b736a5de2b0b30eb51d85a65b17c3 | [
"MIT"
] | 1 | 2016-09-28T12:24:43.000Z | 2016-09-28T13:47:35.000Z | python/janitor/typecache.py | monkeyman79/janitor | a41187c1b58b736a5de2b0b30eb51d85a65b17c3 | [
"MIT"
] | null | null | null |
import gdb
cache = TypeCache()
| 26.509434 | 59 | 0.540925 |
c74a04a139575fe8c546ea452d0215d058b4fa6f | 805 | py | Python | key_phrase.py | Santara/autoSLR | 8c524b8a0023d1434cb7be4e110103605d0d2cab | [
"MIT"
] | 1 | 2020-08-12T23:17:38.000Z | 2020-08-12T23:17:38.000Z | key_phrase.py | Santara/autoSLR | 8c524b8a0023d1434cb7be4e110103605d0d2cab | [
"MIT"
] | null | null | null | key_phrase.py | Santara/autoSLR | 8c524b8a0023d1434cb7be4e110103605d0d2cab | [
"MIT"
] | 1 | 2019-08-29T09:36:46.000Z | 2019-08-29T09:36:46.000Z | import os
import sys
directory = sys.argv[1]
outfile = open("key_phrases.csv","w")
files = {}
for filename in os.listdir(directory):
text=[]
with open(os.path.join(directory, filename)) as f:
text=[l.strip() for l in f if len(l.strip())>2]
data=''
for t in text:
if len(t.split()) > 1:
data = data+'. '+t.s... | 25.15625 | 105 | 0.695652 |
c74ab0b0f80631d9cb06c8040217e1f860dd10c2 | 1,127 | py | Python | tests/test_utils.py | aced-differentiate/dft-input-gen | 14bee323517714c433682bad2dcb897b223dd5ec | [
"Apache-2.0"
] | 1 | 2021-04-15T09:54:52.000Z | 2021-04-15T09:54:52.000Z | tests/test_utils.py | CitrineInformatics/dft-input-gen | 14bee323517714c433682bad2dcb897b223dd5ec | [
"Apache-2.0"
] | 1 | 2021-01-28T22:12:07.000Z | 2021-01-28T22:12:07.000Z | tests/test_utils.py | aced-differentiate/dft-input-gen | 14bee323517714c433682bad2dcb897b223dd5ec | [
"Apache-2.0"
] | 2 | 2020-12-08T18:14:13.000Z | 2020-12-18T19:01:11.000Z | """Unit tests for helper utilities in :mod:`dftinputgen.utils`."""
import os
import pytest
from ase import io as ase_io
from dftinputgen.utils import get_elem_symbol
from dftinputgen.utils import read_crystal_structure
from dftinputgen.utils import get_kpoint_grid_from_spacing
from dftinputgen.utils import DftInputG... | 28.897436 | 75 | 0.754215 |
c74b3631946b737bd9c4684c29b89101e0d8c544 | 6,044 | py | Python | core/models.py | nforesperance/Django-Channels-ChatApp | b244954206214f7dc1b8793291d957a5bf80f0e2 | [
"MIT"
] | 2 | 2020-07-18T05:19:36.000Z | 2020-07-18T05:19:38.000Z | core/models.py | nforesperance/Django-Channels-ChatApp | b244954206214f7dc1b8793291d957a5bf80f0e2 | [
"MIT"
] | 4 | 2021-03-19T02:37:45.000Z | 2021-06-04T23:02:41.000Z | core/models.py | nforesperance/Django-Channels-ChatApp | b244954206214f7dc1b8793291d957a5bf80f0e2 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.db.models import (Model, TextField, DateTimeField, ForeignKey,
CASCADE)
from asgiref.sync import async_to_sync
from channels.layers import get_channel_layer
from django.db import models
import json
| 32.67027 | 93 | 0.603077 |
c74bed1c84a21dce43450d469d8869b0372e61e0 | 15,798 | py | Python | backup/model.py | jsikyoon/ASNP-RMR | ddd3e586b01ba3a7f8b3721582aca7403649400e | [
"MIT"
] | 8 | 2020-07-21T02:49:54.000Z | 2021-09-28T02:22:37.000Z | backup/model.py | jsikyoon/ASNP-RMR | ddd3e586b01ba3a7f8b3721582aca7403649400e | [
"MIT"
] | null | null | null | backup/model.py | jsikyoon/ASNP-RMR | ddd3e586b01ba3a7f8b3721582aca7403649400e | [
"MIT"
] | 1 | 2020-09-02T06:39:49.000Z | 2020-09-02T06:39:49.000Z | import tensorflow as tf
import numpy as np
# utility methods
def batch_mlp(input, output_sizes, variable_scope):
"""Apply MLP to the final axis of a 3D tensor (reusing already defined MLPs).
Args:
input: input tensor of shape [B,n,d_in].
output_sizes: An iterable containing the output sizes of the MLP a... | 36.068493 | 81 | 0.660653 |
c74e4682a52e8afc4e35ad4f69f1a64dccbd1416 | 3,520 | py | Python | minotaur/_minotaur.py | giannitedesco/minotaur | 1a043818775e14054cc3467ba6d1c07cbf128c6b | [
"Apache-2.0"
] | 172 | 2020-08-24T14:34:00.000Z | 2021-12-29T21:56:33.000Z | minotaur/_minotaur.py | giannitedesco/minotaur | 1a043818775e14054cc3467ba6d1c07cbf128c6b | [
"Apache-2.0"
] | 3 | 2020-08-25T13:46:30.000Z | 2021-02-27T01:25:38.000Z | minotaur/_minotaur.py | giannitedesco/minotaur | 1a043818775e14054cc3467ba6d1c07cbf128c6b | [
"Apache-2.0"
] | 4 | 2020-08-24T17:21:18.000Z | 2021-12-29T21:57:42.000Z | from typing import Dict, Tuple, Optional
from pathlib import Path
import asyncio
from ._mask import Mask
from ._event import Event
from ._base import InotifyBase
__all__ = ('Minotaur',)
| 26.268657 | 75 | 0.559659 |
c7508c28b649dccba896625618759517bbe0fd13 | 161 | py | Python | pyclustering/container/examples/__init__.py | JosephChataignon/pyclustering | bf4f51a472622292627ec8c294eb205585e50f52 | [
"BSD-3-Clause"
] | 1,013 | 2015-01-26T19:50:14.000Z | 2022-03-31T07:38:48.000Z | pyclustering/container/examples/__init__.py | peterlau0626/pyclustering | bf4f51a472622292627ec8c294eb205585e50f52 | [
"BSD-3-Clause"
] | 542 | 2015-01-20T16:44:32.000Z | 2022-01-29T14:57:20.000Z | pyclustering/container/examples/__init__.py | peterlau0626/pyclustering | bf4f51a472622292627ec8c294eb205585e50f52 | [
"BSD-3-Clause"
] | 262 | 2015-03-19T07:28:12.000Z | 2022-03-30T07:28:24.000Z | """!
@brief Collection of examples devoted to containers.
@authors Andrei Novikov (pyclustering@yandex.ru)
@date 2014-2020
@copyright BSD-3-Clause
""" | 17.888889 | 53 | 0.714286 |
c751066d68d4e91afb71f1ee11d13e9bcbb998a8 | 8,802 | py | Python | novelty-detection/train_wood_vgg19.py | matherm/python-data-science | bdb49b18c5ef6044f8a9e6f95c81d5f7bb1d511f | [
"MIT"
] | 1 | 2020-03-24T09:22:04.000Z | 2020-03-24T09:22:04.000Z | novelty-detection/train_wood_vgg19.py | matherm/python-data-science | bdb49b18c5ef6044f8a9e6f95c81d5f7bb1d511f | [
"MIT"
] | 1 | 2020-06-16T14:42:29.000Z | 2020-06-16T14:42:29.000Z | novelty-detection/train_wood_vgg19.py | matherm/python-data-science | bdb49b18c5ef6044f8a9e6f95c81d5f7bb1d511f | [
"MIT"
] | null | null | null | import argparse
import sys
import torch
import numpy as np
import torch.nn as nn
from torch.utils.data import DataLoader
from torchvision.datasets import MNIST
from torchvision.datasets import CIFAR10
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser(descripti... | 34.249027 | 213 | 0.546353 |
c7511256bf0b0f8d7c0f1ccc084e2e9144ad8ab3 | 2,948 | py | Python | sample_architectures/cnn.py | hvarS/PyTorch-Refer | 020445e3ae1f3627f39e1ab957cdff44a2127289 | [
"MIT"
] | null | null | null | sample_architectures/cnn.py | hvarS/PyTorch-Refer | 020445e3ae1f3627f39e1ab957cdff44a2127289 | [
"MIT"
] | null | null | null | sample_architectures/cnn.py | hvarS/PyTorch-Refer | 020445e3ae1f3627f39e1ab957cdff44a2127289 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""CNN.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1Tq6HUya2PrC0SmyOIFo2c_eVtguRED2q
"""
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.utils.data import DataL... | 28.07619 | 128 | 0.700136 |
c7551a216f55773fcf2668fcef4ad367660f3169 | 21,599 | py | Python | aispace/layers/callbacks/qa_evaluators.py | SmileGoat/AiSpace | 35fc120667e4263c99b300815e0bf018f5064a40 | [
"Apache-2.0"
] | 32 | 2020-01-16T07:59:03.000Z | 2022-03-31T09:24:00.000Z | aispace/layers/callbacks/qa_evaluators.py | SmileGoat/AiSpace | 35fc120667e4263c99b300815e0bf018f5064a40 | [
"Apache-2.0"
] | 9 | 2020-06-05T03:27:06.000Z | 2022-03-12T01:00:17.000Z | aispace/layers/callbacks/qa_evaluators.py | SmileGoat/AiSpace | 35fc120667e4263c99b300815e0bf018f5064a40 | [
"Apache-2.0"
] | 3 | 2020-06-09T02:22:50.000Z | 2021-07-19T06:07:07.000Z | # -*- coding: utf-8 -*-
# @Time : 2020-07-30 15:06
# @Author : yingyuankai
# @Email : yingyuankai@aliyun.com
# @File : qa_evaluators.py
import os
import logging
import numpy as np
import tensorflow as tf
import json
from pprint import pprint
from collections import defaultdict
from aispace.utils.eval_utils ... | 44.997917 | 146 | 0.570582 |
c75685d19bc8be9c76eb30777f9bd2a54b73db11 | 682 | py | Python | tests/conftest.py | junjunjunk/torchgpipe | 3db11e1da0fc432eb3f3807ddcb22967973c8b28 | [
"Apache-2.0"
] | 532 | 2019-05-27T09:23:04.000Z | 2022-03-31T04:07:55.000Z | tests/conftest.py | junjunjunk/torchgpipe | 3db11e1da0fc432eb3f3807ddcb22967973c8b28 | [
"Apache-2.0"
] | 29 | 2019-07-01T19:49:54.000Z | 2021-11-28T00:51:00.000Z | tests/conftest.py | junjunjunk/torchgpipe | 3db11e1da0fc432eb3f3807ddcb22967973c8b28 | [
"Apache-2.0"
] | 68 | 2019-05-27T09:27:32.000Z | 2022-03-27T13:52:18.000Z | import pytest
import torch
def pytest_report_header():
return f'torch: {torch.__version__}'
| 22 | 62 | 0.696481 |
c756e2f724651746fcaf020b50f3e0f2bdeb6442 | 54,090 | py | Python | lib/python/treadmill/scheduler/__init__.py | drienyov/treadmill | ce21537cd9a2fdb0567ac2aa3de1afcb2f6861de | [
"Apache-2.0"
] | null | null | null | lib/python/treadmill/scheduler/__init__.py | drienyov/treadmill | ce21537cd9a2fdb0567ac2aa3de1afcb2f6861de | [
"Apache-2.0"
] | null | null | null | lib/python/treadmill/scheduler/__init__.py | drienyov/treadmill | ce21537cd9a2fdb0567ac2aa3de1afcb2f6861de | [
"Apache-2.0"
] | null | null | null | """Treadmill hierarchical scheduler.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import abc
import collections
import datetime
import heapq
import itertools
import logging
import operator
import sys
import tim... | 30.016648 | 79 | 0.578203 |
c758c753c3644ae1a4c381597cfe0cc82c7e378b | 1,260 | py | Python | banners/bannerRan.py | gothyyy/AIDungeon | c198371c34d914e9d996559ef850c87a76f572c4 | [
"MIT"
] | 1 | 2019-12-30T21:45:06.000Z | 2019-12-30T21:45:06.000Z | banners/bannerRan.py | gothyyy/AIDungeon | c198371c34d914e9d996559ef850c87a76f572c4 | [
"MIT"
] | null | null | null | banners/bannerRan.py | gothyyy/AIDungeon | c198371c34d914e9d996559ef850c87a76f572c4 | [
"MIT"
] | null | null | null | import random
import sys
import time
import json
import os
import warnings
import numpy as np
import glob, os
stat_mini = 1
stat_max = 0
listBanners = []
#HOW TO USE IT:
#1 copy the opening.txt
#2 remove the graphic (but do keep top logo for consistency)
#3 add ASCII art that is 78 or less characters in widt... | 14.823529 | 86 | 0.640476 |
c758e049e83a8786ae62f5c9ab2545ec4624de3e | 511 | py | Python | BondMarket/app/theme_lib.py | Meith0717/BondMarket | 83d99bd5930758e73b4fe74a92e706c7bc0eadb6 | [
"Apache-2.0"
] | null | null | null | BondMarket/app/theme_lib.py | Meith0717/BondMarket | 83d99bd5930758e73b4fe74a92e706c7bc0eadb6 | [
"Apache-2.0"
] | null | null | null | BondMarket/app/theme_lib.py | Meith0717/BondMarket | 83d99bd5930758e73b4fe74a92e706c7bc0eadb6 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
LIGHT = theme(
name='LIGHT',
bg_color=None,
fg_color='black',
lb_color='#f0f0f0',
ttk_theme='xpnative'
)
DARK = theme(
name='DARK',
bg_color='#424242',
fg_color='white',
lb_color='#4... | 19.653846 | 35 | 0.485323 |
c7592054e40573b08b4d8a7a1efd9326b5695f4f | 3,877 | py | Python | run.py | rimijoker/CA-MTL | 068e25e0860a8ec81462018126eace4c004bacd4 | [
"MIT"
] | 1 | 2021-08-03T03:54:02.000Z | 2021-08-03T03:54:02.000Z | run.py | rimijoker/CA-MTL | 068e25e0860a8ec81462018126eace4c004bacd4 | [
"MIT"
] | null | null | null | run.py | rimijoker/CA-MTL | 068e25e0860a8ec81462018126eace4c004bacd4 | [
"MIT"
] | 1 | 2021-07-31T09:44:00.000Z | 2021-07-31T09:44:00.000Z | import os
import sys
import re
import json
import logging
import torch
from transformers import (
HfArgumentParser,
set_seed,
AutoTokenizer,
AutoConfig,
EvalPrediction,
)
from src.model.ca_mtl import CaMtl, CaMtlArguments
from src.utils.misc import MultiTaskDataArguments, Split
from src.mtl_traine... | 26.923611 | 98 | 0.660562 |
c75af988694e7b9961b260a9f014fab177797bfa | 1,033 | py | Python | examples/readWebsocket.py | uadlq/PhyPiDAQ-PiOS11 | fc6060551be2cc0143a157081341bf3c338d9fbd | [
"BSD-2-Clause"
] | null | null | null | examples/readWebsocket.py | uadlq/PhyPiDAQ-PiOS11 | fc6060551be2cc0143a157081341bf3c338d9fbd | [
"BSD-2-Clause"
] | null | null | null | examples/readWebsocket.py | uadlq/PhyPiDAQ-PiOS11 | fc6060551be2cc0143a157081341bf3c338d9fbd | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Read data in CSV format from websocket
"""
import sys
import asyncio
import websockets
# read url from command line
if len(sys.argv) >= 2:
uri = sys.argv[1]
else:
# host url and port
uri = "ws://localhost:8314"
print("*==* ", sys.argv[0], " Lese Daten von url ", uri)
# run web... | 25.195122 | 72 | 0.580833 |
c75b6da97a2671884ced55ad3cbef590baf2e5c6 | 2,187 | py | Python | settings/__init__.py | arcana261/python-grpc-boilerplate | dd20767ad5540a49e1db802ce578c7b8e416ccbb | [
"Unlicense"
] | null | null | null | settings/__init__.py | arcana261/python-grpc-boilerplate | dd20767ad5540a49e1db802ce578c7b8e416ccbb | [
"Unlicense"
] | null | null | null | settings/__init__.py | arcana261/python-grpc-boilerplate | dd20767ad5540a49e1db802ce578c7b8e416ccbb | [
"Unlicense"
] | null | null | null | import os
import sys
import itertools
import json
_NONE = object()
sys.modules[__name__] = SettingManager()
| 27.683544 | 99 | 0.577503 |
c75c60f75fce7285b991ad22486e1b1b13a02fed | 1,990 | py | Python | roblox/partials/partialgroup.py | speer-kinjo/ro.py | 2d5b80aec8fd143b11101fbbfdf3b557f798a27f | [
"MIT"
] | 28 | 2021-11-04T11:13:38.000Z | 2022-03-11T05:00:16.000Z | roblox/partials/partialgroup.py | speer-kinjo/ro.py | 2d5b80aec8fd143b11101fbbfdf3b557f798a27f | [
"MIT"
] | 12 | 2021-11-24T06:25:24.000Z | 2022-03-18T14:37:01.000Z | roblox/partials/partialgroup.py | speer-kinjo/ro.py | 2d5b80aec8fd143b11101fbbfdf3b557f798a27f | [
"MIT"
] | 21 | 2021-10-20T16:36:55.000Z | 2022-03-27T21:43:53.000Z | """
This file contains partial objects related to Roblox groups.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
from ..bases.basegroup import BaseGroup
from ..bases.baseuser import BaseUser
if TYPE_CHECKING:
from ..client import Client
| 28.028169 | 91 | 0.628643 |