hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21db6f4562ec4edb6b55e0d5a06b2a2aa9c673ad | 5,706 | py | Python | SOSAT/constraints/faulting_regime_constraint.py | pnnl/SOSAT | 610f99e0bb80f2f5e7836e7e3b6b816e029838bb | [
"BSD-3-Clause"
] | null | null | null | SOSAT/constraints/faulting_regime_constraint.py | pnnl/SOSAT | 610f99e0bb80f2f5e7836e7e3b6b816e029838bb | [
"BSD-3-Clause"
] | 1 | 2021-03-22T18:59:05.000Z | 2021-03-22T18:59:05.000Z | SOSAT/constraints/faulting_regime_constraint.py | pnnl/SOSAT | 610f99e0bb80f2f5e7836e7e3b6b816e029838bb | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import numpy.ma as ma
from scipy.stats import rv_continuous
from .constraint_base import StressConstraint
def logistic(x, k, xo):
return 1.0 / (1.0 + np.exp(-k * (x - xo)))
def int_logist(k, xo):
return 2.0 - np.log(1.0 + np.exp(-k * (-xo - 1.0))) / k \
+ np.log(1.0 + np.exp(-k *... | 35.222222 | 72 | 0.61742 |
21db956be8c57b2483aa000ebf5903613607404c | 5,382 | py | Python | examples/dqn/gym_wrapper.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | examples/dqn/gym_wrapper.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | examples/dqn/gym_wrapper.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | from collections import deque
import cv2
import gym
import numpy as np
class ReshapeWrapper(gym.Wrapper):
"""
Reshape the observation provided by open ai gym atari environment to match
the deepmind dqn paper.
"""
def __init__(self, environment):
super(ReshapeWrapper, self).__init__(envir... | 27.88601 | 79 | 0.621516 |
21dbd30c9dc67f5812780e9a1288205dfb5166d2 | 3,191 | py | Python | test/language/structure_types/python/EmptyStructureWithParameterTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 2 | 2019-02-06T17:50:24.000Z | 2019-11-20T16:51:34.000Z | test/language/structure_types/python/EmptyStructureWithParameterTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 1 | 2019-11-25T16:25:51.000Z | 2019-11-25T18:09:39.000Z | test/language/structure_types/python/EmptyStructureWithParameterTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | import unittest
import zserio
from testutils import getZserioApi
class EmptyStructureTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "structure_types.zs").empty_structure_with_parameter
def testParamConstructor(self):
emptyStructureWithParameter... | 46.926471 | 104 | 0.757443 |
21dc61ff1a06bedacc6f5ecbcf5773d163695d9b | 18,881 | py | Python | pisces/request.py | samuelchodur/pisces | 1545db9d8cb2f56ac77dc786909cbfcdd9e0bba4 | [
"MIT"
] | 12 | 2015-04-17T01:57:45.000Z | 2020-05-22T22:54:47.000Z | pisces/request.py | samuelchodur/pisces | 1545db9d8cb2f56ac77dc786909cbfcdd9e0bba4 | [
"MIT"
] | 26 | 2015-03-17T14:10:53.000Z | 2019-06-13T13:08:30.000Z | pisces/request.py | samuelchodur/pisces | 1545db9d8cb2f56ac77dc786909cbfcdd9e0bba4 | [
"MIT"
] | 9 | 2015-11-07T04:49:53.000Z | 2019-04-07T05:13:45.000Z | """
request.py
Convenience functions for common queries.
"""
import numpy as np
from sqlalchemy import func, or_
from obspy.core import UTCDateTime, Stream
import obspy.geodetics as geod
from pisces.io.trace import wfdisc2trace
def get_wfdisc_rows(session, wfdisc, sta=None, chan=None, t1=None, t2=None,
... | 32.001695 | 93 | 0.609237 |
21dc6987c2cd0b99036fe9b91c1ec0fdb89ef5ab | 11,583 | py | Python | cosmotech_api/model/user_workspace.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | cosmotech_api/model/user_workspace.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | cosmotech_api/model/user_workspace.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | """
Cosmo Tech Plaform API
Cosmo Tech Platform API # noqa: E501
The version of the OpenAPI document: 0.0.11-SNAPSHOT
Contact: platform@cosmotech.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from cosmotech_api.model_utils import ( # noqa... | 43.382022 | 121 | 0.56557 |
21dc8fdff7784923654605fc4c1adc4bec9fb410 | 2,665 | py | Python | scripts/practice/Amazon/MaximizeScoreAfterNOperations.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/practice/Amazon/MaximizeScoreAfterNOperations.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/practice/Amazon/MaximizeScoreAfterNOperations.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
Maximize Score After N Operations
You are given nums, an array of positive integers of size 2 * n. You must perform n operations on this array.
In the ith operation (1-indexed), you will:
Choose two elements, x and y.
Receive a score of i * gcd(x, y).
Remove x and y from nums.
Return the maximum score you can r... | 28.967391 | 109 | 0.668668 |
21dcc376fc6636dac99d19d036ff7d22da373f5f | 265 | py | Python | app/config.py | bfeeser/sentinel | db46748463175a3ec8c31034cd25b1a670b0ad53 | [
"MIT"
] | null | null | null | app/config.py | bfeeser/sentinel | db46748463175a3ec8c31034cd25b1a670b0ad53 | [
"MIT"
] | null | null | null | app/config.py | bfeeser/sentinel | db46748463175a3ec8c31034cd25b1a670b0ad53 | [
"MIT"
] | null | null | null | import os
app_dir = os.path.abspath(os.path.dirname(__file__))
EMAIL_USERNAME = "sentinel.alerts.sys"
EMAIL_FROM = EMAIL_USERNAME + "@gmail.com"
EMAIL_PASSWORD = os.getenv("EMAIL_PASSWORD")
WTF_CSRF_ENABLED = True
SECRET_KEY = "96b0ea7500480ff5ea541b238d8733e9"
| 24.090909 | 52 | 0.792453 |
21dcc58fa2d1be56fed3ff4787778bbd55e0acd2 | 2,343 | py | Python | tests/complex/graph_file_gen.py | marcelotrevisani/acorns | 682749b0963ffc0a3998a7065ef505fc95123f50 | [
"MIT"
] | null | null | null | tests/complex/graph_file_gen.py | marcelotrevisani/acorns | 682749b0963ffc0a3998a7065ef505fc95123f50 | [
"MIT"
] | null | null | null | tests/complex/graph_file_gen.py | marcelotrevisani/acorns | 682749b0963ffc0a3998a7065ef505fc95123f50 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import os
import json
import seaborn as sns
import re
sns.set(style="darkgrid")
def atoi(text):
return int(text) if text.isdigit() else text
def natural_keys(text):
'''
alist.sort(key=natural_keys) sorts in human order
http://nedba... | 33.956522 | 184 | 0.63551 |
21dcedf9cc3a4b8c964ac638a5369747ae871a98 | 9,902 | py | Python | DOTA_devkit/dota_utils.py | esgario/BBAVectors-Oriented-Object-Detection | 3d0e5bb5c12fb52558bd5daf61d9a9528d94bd39 | [
"MIT"
] | null | null | null | DOTA_devkit/dota_utils.py | esgario/BBAVectors-Oriented-Object-Detection | 3d0e5bb5c12fb52558bd5daf61d9a9528d94bd39 | [
"MIT"
] | null | null | null | DOTA_devkit/dota_utils.py | esgario/BBAVectors-Oriented-Object-Detection | 3d0e5bb5c12fb52558bd5daf61d9a9528d94bd39 | [
"MIT"
] | 1 | 2021-07-16T17:14:20.000Z | 2021-07-16T17:14:20.000Z | import sys
import codecs
import numpy as np
import shapely.geometry as shgeo
import os
import re
import math
"""
some basic functions which are useful for process DOTA data
"""
wordname_15 = ['plane', 'baseball-diamond', 'bridge', 'ground-track-field', 'small-vehicle', 'large-vehicle', 'ship', 'tennis-court',
... | 34.501742 | 133 | 0.515148 |
21dd12757071c87c00b96d42993a17b124941b48 | 1,065 | py | Python | Week 5 - Regression/submission_1.py | lvolkmann/CS-490-Deep-Learning | 48e637e6892d2e87999ed87b994be659cb30f1e2 | [
"MIT"
] | null | null | null | Week 5 - Regression/submission_1.py | lvolkmann/CS-490-Deep-Learning | 48e637e6892d2e87999ed87b994be659cb30f1e2 | [
"MIT"
] | null | null | null | Week 5 - Regression/submission_1.py | lvolkmann/CS-490-Deep-Learning | 48e637e6892d2e87999ed87b994be659cb30f1e2 | [
"MIT"
] | null | null | null | # @author: Landon Volkmann
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
plt.style.use(style='ggplot')
plt.rcParams['figure.figsize'] = (10, 6)
train = pd.read_csv('train.csv')
# QUESTION 1
# Clean outlier garage data
garage_df = train.get('GarageArea')
print(garag... | 22.1875 | 71 | 0.692019 |
21dd3b23bd0c643e73fee129f1a5d30976674b73 | 5,269 | py | Python | marchena/modules/attachments/admin.py | samuelmaudo/marchena | e9a522a9be66f7043aa61e316f7e733e8ccf1e32 | [
"BSD-3-Clause"
] | null | null | null | marchena/modules/attachments/admin.py | samuelmaudo/marchena | e9a522a9be66f7043aa61e316f7e733e8ccf1e32 | [
"BSD-3-Clause"
] | null | null | null | marchena/modules/attachments/admin.py | samuelmaudo/marchena | e9a522a9be66f7043aa61e316f7e733e8ccf1e32 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
from django.db.models import Count
from django.utils.html import escape, format_html
from django.utils.translation import ugettext, ugettext_lazy as _
from yepes import admin
from yepes.apps import apps
from yepes.contrib.thumbnails.proxies import Config... | 28.481081 | 93 | 0.551907 |
21dd4290aa34c49ed2a56a4c08d34e77cba86bc4 | 5,617 | py | Python | sleap/gui/learning/datagen.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | sleap/gui/learning/datagen.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | sleap/gui/learning/datagen.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | """
Preview of training data (i.e., confidence maps and part affinity fields).
"""
import copy
from collections import defaultdict
from typing import List, Text
import numpy as np
from sleap import Labels, Video
from sleap.gui.learning.configs import ConfigFileInfo
from sleap.gui.overlays.confmaps import demo_confma... | 33.837349 | 87 | 0.658893 |
21dd7aa837a50df950f7e714f7431ef7afb7f355 | 1,626 | py | Python | scripts/artifacts/healthFlights.py | mastenp/iLEAPP | ee40ef7505b36d0b9b04131f284a9d4d036514a5 | [
"MIT"
] | 1 | 2020-10-06T20:28:03.000Z | 2020-10-06T20:28:03.000Z | scripts/artifacts/healthFlights.py | mastenp/iLEAPP | ee40ef7505b36d0b9b04131f284a9d4d036514a5 | [
"MIT"
] | null | null | null | scripts/artifacts/healthFlights.py | mastenp/iLEAPP | ee40ef7505b36d0b9b04131f284a9d4d036514a5 | [
"MIT"
] | null | null | null | import glob
import os
import pathlib
import plistlib
import sqlite3
import json
from scripts.artifact_report import ArtifactHtmlReport
from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows
def get_healthFlights(files_found, report_folder, seeker):
file_found = str(files_found[0])
db = sqlite3.... | 29.035714 | 102 | 0.741697 |
21dd8afa377050951fc6e78c2c440547d5328e48 | 3,359 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.397059 | 172 | 0.70646 |
21dda82b62ac6c49ac382546fdaac5a77d270b62 | 11,045 | py | Python | webapi_active_query_builder/apis/active_query_builder_api.py | ActiveDbSoft/webapi-active-query-builder-python | 81d65f454617d913d8d3b707283a42830c08192d | [
"Apache-2.0"
] | 2 | 2018-11-01T18:03:04.000Z | 2020-03-21T17:34:51.000Z | webapi_active_query_builder/apis/active_query_builder_api.py | ActiveDbSoft/webapi-active-query-builder-python | 81d65f454617d913d8d3b707283a42830c08192d | [
"Apache-2.0"
] | null | null | null | webapi_active_query_builder/apis/active_query_builder_api.py | ActiveDbSoft/webapi-active-query-builder-python | 81d65f454617d913d8d3b707283a42830c08192d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
QueryBuilderApi
Active Query Builder Web API lets create, analyze and modify SQL queries for different database servers using RESTful HTTP requests to a cloud-based service. It requires SQL execution context (information about database schema and used database server) to be stored under th... | 42.318008 | 407 | 0.607153 |
21dde6ffa5e89c078ca7b7d9000649072fc41d8c | 977 | py | Python | ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/status_params.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 5 | 2018-06-03T05:19:40.000Z | 2021-04-16T17:10:49.000Z | ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/status_params.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/status_params.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 6 | 2019-05-07T13:24:39.000Z | 2021-02-15T14:12:37.000Z | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License");... | 36.185185 | 72 | 0.787103 |
21de0fc9c48d6e3eec3e7f887195d8db5f23be5b | 2,448 | py | Python | zephyr-fm/blueprints/subscribe/blueprint.py | jmhull/genz-utils | acf40744fcd77bea5e11c6abaf9cbb65e8d29f9d | [
"MIT"
] | null | null | null | zephyr-fm/blueprints/subscribe/blueprint.py | jmhull/genz-utils | acf40744fcd77bea5e11c6abaf9cbb65e8d29f9d | [
"MIT"
] | null | null | null | zephyr-fm/blueprints/subscribe/blueprint.py | jmhull/genz-utils | acf40744fcd77bea5e11c6abaf9cbb65e8d29f9d | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import json
import logging
import os
import uuid
from datetime import datetime
from pdb import set_trace
from pprint import pprint
import flask
import jsonschema
import requests as HTTP_REQUESTS
from blueprints.resource.blueprint import send_resource
import flask_fat
Journal = self = flask_fat.Jo... | 32.210526 | 81 | 0.597222 |
21de31a91bc33d53522011bbe6c45c33f9d1472b | 6,781 | py | Python | nicos_mlz/refsans/setups/elements/detector.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/refsans/setups/elements/detector.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/refsans/setups/elements/detector.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'all values for detector positon'
group = 'lowlevel'
instrument_values = configdata('instrument.values')
showcase_values = configdata('cf_showcase.showcase_values')
tango_base = instrument_values['tango_base']
code_base = instrument_values['code_base']
devices = dict(
primary_beam = device('nicos.... | 37.258242 | 131 | 0.612447 |
21de3a4604077d97296fa86ed0ed834feffc8a9f | 2,429 | py | Python | examples/python/builtin_echo.py | whileskies/incubator-teaclave | b710a2e97b79e356fe15726b3135fa4ef9132a31 | [
"MIT",
"ECL-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | examples/python/builtin_echo.py | whileskies/incubator-teaclave | b710a2e97b79e356fe15726b3135fa4ef9132a31 | [
"MIT",
"ECL-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | examples/python/builtin_echo.py | whileskies/incubator-teaclave | b710a2e97b79e356fe15726b3135fa4ef9132a31 | [
"MIT",
"ECL-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | 32.386667 | 98 | 0.648415 |
21de585b10f45f9bbe3afb08e261cfc33cc7ba4f | 3,809 | py | Python | src/hdusd/usd_nodes/nodes/usd_file.py | kant/BlenderUSDHydraAddon | 6ff6c65b45054582e2c0806f341eeaa9d676ed9b | [
"Apache-2.0"
] | 1 | 2021-12-24T12:41:25.000Z | 2021-12-24T12:41:25.000Z | src/hdusd/usd_nodes/nodes/usd_file.py | SansiRik/BlenderUSDHydraAddon | 2592849af234523de9e653fc1684bec4d535f81b | [
"Apache-2.0"
] | null | null | null | src/hdusd/usd_nodes/nodes/usd_file.py | SansiRik/BlenderUSDHydraAddon | 2592849af234523de9e653fc1684bec4d535f81b | [
"Apache-2.0"
] | null | null | null | # **********************************************************************
# Copyright 2020 Advanced Micro Devices, 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.o... | 32.555556 | 107 | 0.594119 |
21de65fcf98c02836d518ae8745d938f4c4a044d | 11,715 | py | Python | test/test_extra.py | lorenzgillner/pyinterval | bf35762b87ea807d8a56137c5eb94050eda3ed4f | [
"BSD-3-Clause"
] | 68 | 2015-04-09T16:29:53.000Z | 2021-12-06T10:24:38.000Z | test/test_extra.py | lorenzgillner/pyinterval | bf35762b87ea807d8a56137c5eb94050eda3ed4f | [
"BSD-3-Clause"
] | 27 | 2015-09-12T20:26:52.000Z | 2022-01-04T02:27:05.000Z | test/test_extra.py | lorenzgillner/pyinterval | bf35762b87ea807d8a56137c5eb94050eda3ed4f | [
"BSD-3-Clause"
] | 26 | 2015-05-04T07:20:52.000Z | 2021-11-29T08:36:55.000Z | # Copyright (c) 2008-2016, Stefano Taschini <taschini@ieee.org>
# All rights reserved.
# See LICENSE for details.
import math
import platform
import unittest
from interval import fpu, interval, imath, inf
from test import helpers
class HelpersTestCase(unittest.TestCase):
def test_init(self):
# Alternat... | 48.8125 | 123 | 0.556125 |
21de7004480627f4d7e27fbff18911a6c5004ff2 | 190 | py | Python | tests/test_cli.py | wperkins/usgs | 2a9270a64f1d794af56ebb511d0d86c3ed3f8991 | [
"0BSD"
] | 67 | 2016-11-11T06:09:20.000Z | 2022-03-08T10:56:35.000Z | tests/test_cli.py | wperkins/usgs | 2a9270a64f1d794af56ebb511d0d86c3ed3f8991 | [
"0BSD"
] | 28 | 2017-03-06T02:33:02.000Z | 2022-03-08T22:46:15.000Z | tests/test_cli.py | wperkins/usgs | 2a9270a64f1d794af56ebb511d0d86c3ed3f8991 | [
"0BSD"
] | 32 | 2017-03-22T02:04:37.000Z | 2022-03-31T04:09:15.000Z | #
# from click.testing import CliRunner
#
# from usgs.scripts.cli import cli
#
#
# def test_cli_count():
# runner = CliRunner()
# result = runner.invoke(cli, ['3'])
# assert True | 19 | 40 | 0.642105 |
21de9876da84c9b9d7fde274799802eb05a94cb8 | 2,744 | py | Python | source/apps/crawl_space/tests/test_plots.py | 0x0mar/memex-explorer | e6b0f2da034e746193ee104c7c10f58c0698774f | [
"BSD-2-Clause"
] | null | null | null | source/apps/crawl_space/tests/test_plots.py | 0x0mar/memex-explorer | e6b0f2da034e746193ee104c7c10f58c0698774f | [
"BSD-2-Clause"
] | null | null | null | source/apps/crawl_space/tests/test_plots.py | 0x0mar/memex-explorer | e6b0f2da034e746193ee104c7c10f58c0698774f | [
"BSD-2-Clause"
] | 1 | 2018-12-18T00:45:06.000Z | 2018-12-18T00:45:06.000Z | from __future__ import unicode_literals
import os
import shutil
# Test
from memex.test_utils.unit_test_utils import UnitTestSkeleton, form_errors, get_object
from django.test import TestCase
from django.core.files.uploadedfile import SimpleUploadedFile
# App
from apps.crawl_space.models import Crawl, CrawlModel
from... | 31.54023 | 106 | 0.665087 |
21dec3bbe0562f1b07b4662ee1ba722a727c9acf | 12,289 | py | Python | intersight/models/iam_resource_limits.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_resource_limits.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_resource_limits.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class IamResourceLimits(object):
"""
NOTE: This cla... | 28.446759 | 222 | 0.600049 |
21ded30fdc38c5e2a749906718544f868144f3a8 | 10,699 | py | Python | fastlvm/kmeans.py | autonlab/fastlvm | 05e77da39ca525eacf1a1e3aa2cc551e6cf18dcd | [
"MIT"
] | 4 | 2019-08-06T08:59:28.000Z | 2022-03-21T19:36:48.000Z | fastlvm/kmeans.py | autonlab/fastlvm | 05e77da39ca525eacf1a1e3aa2cc551e6cf18dcd | [
"MIT"
] | 10 | 2019-05-20T20:20:47.000Z | 2020-06-04T14:33:04.000Z | fastlvm/kmeans.py | autonlab/fastlvm | 05e77da39ca525eacf1a1e3aa2cc551e6cf18dcd | [
"MIT"
] | 2 | 2021-03-18T19:29:03.000Z | 2022-03-21T13:41:14.000Z | import os
import kmeansc
import numpy as np
from d3m import container, utils
from d3m.metadata import hyperparams, base as metadata_base
from d3m.metadata import params
from d3m.primitive_interfaces import base
from d3m.primitive_interfaces.unsupervised_learning import UnsupervisedLearnerPrimitiveBase
Inputs = contai... | 42.288538 | 119 | 0.610618 |
21df0ef6a3047da7f6b863bf7341b24f63d46555 | 5,037 | py | Python | artifact_detector/salvage_audio.py | IS2AI/SpeakingFaces | 3435bbab7728bac194f2060c71acdf7bfe88d247 | [
"MIT"
] | 44 | 2020-10-18T01:14:00.000Z | 2022-02-18T07:45:39.000Z | artifact_detector/salvage_audio.py | Caiyq2019/SpeakingFaces | 3435bbab7728bac194f2060c71acdf7bfe88d247 | [
"MIT"
] | 4 | 2020-12-12T03:27:22.000Z | 2021-11-29T12:46:58.000Z | artifact_detector/salvage_audio.py | Caiyq2019/SpeakingFaces | 3435bbab7728bac194f2060c71acdf7bfe88d247 | [
"MIT"
] | 5 | 2020-12-09T10:41:38.000Z | 2021-12-20T06:42:05.000Z | # The code reads a csv file row by row and creates an updated audio (or none) file for each row
import os
import argparse
import pandas as pd
import shutil
from pydub import AudioSegment
def make_dir(dirName):
# create target directory & all intermediate directories if don't exist
if not os.path.e... | 39.97619 | 141 | 0.61763 |
21df78b00a4d07cd317e296237d2e05c09d3540f | 3,776 | py | Python | dev-support/examples/mnist-tensorflow/MultiWorkerMirroredStrategy/mnist_keras_distributed.py | akizminet/submarine | aa6e865f27167a26050d8daa293e0b4f41a144b6 | [
"Apache-2.0"
] | 544 | 2019-10-29T02:35:31.000Z | 2022-03-31T21:22:44.000Z | dev-support/examples/mnist-tensorflow/MultiWorkerMirroredStrategy/mnist_keras_distributed.py | akizminet/submarine | aa6e865f27167a26050d8daa293e0b4f41a144b6 | [
"Apache-2.0"
] | 545 | 2019-10-29T03:21:38.000Z | 2022-03-30T05:21:15.000Z | dev-support/examples/mnist-tensorflow/MultiWorkerMirroredStrategy/mnist_keras_distributed.py | akizminet/submarine | aa6e865f27167a26050d8daa293e0b4f41a144b6 | [
"Apache-2.0"
] | 220 | 2019-10-29T05:14:03.000Z | 2022-03-28T07:29:30.000Z | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use... | 34.018018 | 86 | 0.721398 |
21df7b3a45a17cbc0f3d2102a943455ff8dba80e | 9,467 | py | Python | train_view_tcn.py | msieb1/LTCN | c9432891327774edf8193e885cc4f10f53fcaa60 | [
"MIT"
] | 1 | 2020-08-21T03:47:33.000Z | 2020-08-21T03:47:33.000Z | train_view_tcn.py | msieb1/LTCN | c9432891327774edf8193e885cc4f10f53fcaa60 | [
"MIT"
] | null | null | null | train_view_tcn.py | msieb1/LTCN | c9432891327774edf8193e885cc4f10f53fcaa60 | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use('Agg')
import os
from os.path import join
import argparse
import torch
import numpy as np
import pickle
import sys
import datetime
import math
sys.path.append('./utils')
from torch import optim
from torch import nn
from torch import multiprocessing
from torch.optim import lr_scheduler
... | 38.79918 | 138 | 0.695468 |
21df8be795c3920a29e69aa07a296fa0e9b86081 | 255 | py | Python | go_to_pose.py | ConnorDoesDev/cozmo | dc2e4574d056b6e61e1e7042c3b32d7e0d00f055 | [
"CC0-1.0"
] | null | null | null | go_to_pose.py | ConnorDoesDev/cozmo | dc2e4574d056b6e61e1e7042c3b32d7e0d00f055 | [
"CC0-1.0"
] | null | null | null | go_to_pose.py | ConnorDoesDev/cozmo | dc2e4574d056b6e61e1e7042c3b32d7e0d00f055 | [
"CC0-1.0"
] | null | null | null | import cozmo
from cozmo.util import degrees, Pose
def cozmo_program(robot: cozmo.robot.Robot):
robot.go_to_pose(Pose(0, 0, 0, angle_z=degrees(90)),
relative_to_robot=True).wait_for_completed()
cozmo.run_program(cozmo_program)
| 23.181818 | 65 | 0.717647 |
21dfa20af804858ad9b95f04d1c70726ee910fd8 | 1,770 | py | Python | functions/pipeline/labels/__init__.py | jmspring/active-learning-detect | edb20019f38ae13204a200166281e2a6baafaee4 | [
"MIT"
] | null | null | null | functions/pipeline/labels/__init__.py | jmspring/active-learning-detect | edb20019f38ae13204a200166281e2a6baafaee4 | [
"MIT"
] | null | null | null | functions/pipeline/labels/__init__.py | jmspring/active-learning-detect | edb20019f38ae13204a200166281e2a6baafaee4 | [
"MIT"
] | null | null | null | import logging
import jsonpickle
import azure.functions as func
import json
from ..shared.db_provider import get_postgres_provider
from ..shared.db_access import ImageTagDataAccess, ImageTagState
def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.'... | 35.4 | 102 | 0.620904 |
21dfaa44637830e30201696da6fdd62b83061b06 | 86,995 | py | Python | neutron/tests/unit/agent/dhcp/test_agent.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/agent/dhcp/test_agent.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/agent/dhcp/test_agent.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# 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 requ... | 44.204776 | 79 | 0.625139 |
21dfdb7a933fbf12046813a3f1f4d2832c946cae | 937 | py | Python | stoq/tests/data/invalid_plugins/invalid_config/invalid_config.py | ytreister/stoq | 8bfc78b226ee6500eb78e1bdf361fc83bc5005b7 | [
"Apache-2.0"
] | 385 | 2015-11-20T02:21:18.000Z | 2022-03-24T09:38:24.000Z | stoq/tests/data/invalid_plugins/invalid_config/invalid_config.py | ytreister/stoq | 8bfc78b226ee6500eb78e1bdf361fc83bc5005b7 | [
"Apache-2.0"
] | 127 | 2016-07-08T20:23:20.000Z | 2022-02-23T13:52:19.000Z | stoq/tests/data/invalid_plugins/invalid_config/invalid_config.py | ytreister/stoq | 8bfc78b226ee6500eb78e1bdf361fc83bc5005b7 | [
"Apache-2.0"
] | 68 | 2015-11-20T12:51:44.000Z | 2022-01-25T04:35:54.000Z | #!/usr/bin/env python3
# Copyright 2014-2018 PUNCH Cyber Analytics Group
#
# 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
#
# Un... | 33.464286 | 76 | 0.738527 |
21dfe912ff103169692dc0b69bb8c1b41f3d3012 | 1,153 | py | Python | embiggen/sequences/tensorflow_sequences/__init__.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 2 | 2020-01-30T11:57:37.000Z | 2020-05-02T00:05:49.000Z | embiggen/sequences/tensorflow_sequences/__init__.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 93 | 2020-01-26T00:43:51.000Z | 2020-05-10T03:29:54.000Z | embiggen/sequences/tensorflow_sequences/__init__.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 5 | 2020-02-13T07:18:11.000Z | 2020-03-19T08:03:34.000Z | """Module with Keras Sequences."""
from embiggen.sequences.tensorflow_sequences.node2vec_sequence import Node2VecSequence
from embiggen.sequences.tensorflow_sequences.edge_prediction_training_sequence import EdgePredictionTrainingSequence
from embiggen.sequences.tensorflow_sequences.gcn_edge_prediction_training_sequenc... | 54.904762 | 134 | 0.880312 |
21e01558adf9250c2ce992b5e1ddc57caea0b0f1 | 21,114 | py | Python | caastools/stats/irr.py | Awesomium40/caastools | acfae5e9117f0d9a49ebf78fd20c471070cf3915 | [
"MIT"
] | null | null | null | caastools/stats/irr.py | Awesomium40/caastools | acfae5e9117f0d9a49ebf78fd20c471070cf3915 | [
"MIT"
] | null | null | null | caastools/stats/irr.py | Awesomium40/caastools | acfae5e9117f0d9a49ebf78fd20c471070cf3915 | [
"MIT"
] | null | null | null | from caastools.utils import _progress_bar_
from bisect import bisect_left
from collections import Counter
from scipy import stats
import functools
import io
import itertools
import logging
import numpy
import pandas
logging.getLogger('caastools.stats.irr').addHandler(logging.NullHandler())
__all__ = ['cohens_kappa',... | 40.064516 | 214 | 0.603438 |
21e01bdc482be89053ab41bc3d4cedee13c1454c | 7,024 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_volume_attachment.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_volume_attachment.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_volume_attachment.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Vol... | 31.63964 | 295 | 0.614038 |
21e084a8d42473d1932d421c3bb0a679db2fbf2f | 44,908 | py | Python | sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2022_04_01/operations/_open_shift_clusters_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2022_04_01/operations/_open_shift_clusters_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2022_04_01/operations/_open_shift_clusters_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 42.566825 | 230 | 0.670103 |
21e087a09efec3299fe420f545b56c83a21eb4ba | 341 | py | Python | tests/test_appConfig.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | tests/test_appConfig.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | 21 | 2021-01-08T18:03:32.000Z | 2021-02-02T16:17:34.000Z | tests/test_appConfig.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | import unittest
from src.appConfig import initAppConfig
class TestAppConfig(unittest.TestCase):
def test_run(self) -> None:
"""tests the function that gets the application config
"""
appConf = initAppConfig()
self.assertTrue("pwcDbConnStr" in appConf)
self.assertTrue("appDb... | 28.416667 | 62 | 0.692082 |
21e08d03d213c173d12dfc6676fe7f009811e93f | 11,713 | py | Python | tensorflow/python/ops/sets_impl.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/ops/sets_impl.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/ops/sets_impl.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.658046 | 80 | 0.607872 |
21e0a95490c924b98f53821e37fe1c7cdbe2de75 | 1,422 | py | Python | tests/_validation/test_color_validation.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | tests/_validation/test_color_validation.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | tests/_validation/test_color_validation.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | import apysc as ap
from apysc._validation import color_validation
from tests import testing_helper
def test_validate_hex_color_code_format() -> None:
testing_helper.assert_raises(
expected_error_class=ValueError,
func_or_method=color_validation.validate_hex_color_code_format,
kwar... | 34.682927 | 74 | 0.732068 |
21e174b9b4715daf426e1c0bd44d9ea0865fa39e | 1,316 | py | Python | app/run.py | cmeng94/dog-breed-classifier | 7178d82f9d654e2e95e8f5611c89353554094412 | [
"MIT"
] | null | null | null | app/run.py | cmeng94/dog-breed-classifier | 7178d82f9d654e2e95e8f5611c89353554094412 | [
"MIT"
] | null | null | null | app/run.py | cmeng94/dog-breed-classifier | 7178d82f9d654e2e95e8f5611c89353554094412 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template, request, jsonify
import cv2
import numpy as np
from tqdm import tqdm
from keras.models import Sequential
from keras.layers import Dropout, Flatten, Dense
from keras.layers import Conv2D, MaxPooling2D, GlobalAveragePooling2D, GlobalMaxPooling2D
from keras.call... | 25.803922 | 92 | 0.734043 |
21e1ab02139354a6d164215d66ddfc616a6b03fe | 847 | py | Python | atom/nucleus/python/test/test_page_order.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_page_order.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_page_order.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nu... | 20.658537 | 79 | 0.689492 |
21e1b24724820c0c18d9a24468b7286eb2347da3 | 2,085 | py | Python | MachineLearning/TensorFlow/image-clssifier/tool/regression.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | MachineLearning/TensorFlow/image-clssifier/tool/regression.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | MachineLearning/TensorFlow/image-clssifier/tool/regression.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # coding:utf-8
# 2019-1-16
# regression
import numpy as np
import random as rd
class softmax_classifier(object):
def __init__(self, feature, label, k, max_iteration, alpha):
self.feature = feature
self.label = label
self.k = k
self.max_iteration = max_iteration
self.alpha =... | 30.217391 | 92 | 0.501199 |
21e1d5f787c333bbd519f9b12ac0a59a3cc099c3 | 8,027 | py | Python | synapse/cores/postgres.py | larrycameron80/synapse | 24bf21c40b4a467e5dc28c8204aecaf502d5cddf | [
"Apache-2.0"
] | null | null | null | synapse/cores/postgres.py | larrycameron80/synapse | 24bf21c40b4a467e5dc28c8204aecaf502d5cddf | [
"Apache-2.0"
] | 4 | 2017-10-03T21:50:40.000Z | 2017-11-20T15:49:38.000Z | synapse/cores/postgres.py | larrycameron80/synapse | 24bf21c40b4a467e5dc28c8204aecaf502d5cddf | [
"Apache-2.0"
] | null | null | null | import time
import hashlib
import synapse.common as s_common
import synapse.datamodel as s_datamodel
import synapse.cores.common as s_cores_common
import synapse.cores.sqlite as s_cores_sqlite
def md5(x):
return hashlib.md5(x.encode('utf8')).hexdigest()
def initPsqlCortex(link, conf=None, storconf=None):
''... | 42.247368 | 218 | 0.621278 |
21e1d97e201c4fc18f7da9339686fcd6d52c4281 | 1,029 | py | Python | squawk/output.py | samuel/squawk | 7b142f06a145233f38ff8f74bca4126adf73e5c0 | [
"BSD-3-Clause"
] | 39 | 2015-01-16T03:35:51.000Z | 2022-01-24T13:36:54.000Z | squawk/output.py | samuel/squawk | 7b142f06a145233f38ff8f74bca4126adf73e5c0 | [
"BSD-3-Clause"
] | null | null | null | squawk/output.py | samuel/squawk | 7b142f06a145233f38ff8f74bca4126adf73e5c0 | [
"BSD-3-Clause"
] | 4 | 2015-02-27T13:41:39.000Z | 2019-08-14T14:51:24.000Z |
import csv
import sys
try:
import json
except ImportError:
try:
import simplejson as json
except ImportError:
json = None
def output_tabular(rows, fp=None):
fp = fp or sys.stdout
fp.write("\t| ".join(rows.columns))
fp.write("\n")
fp.write("-"*40+"\n")
for row in rows:
... | 22.866667 | 110 | 0.585034 |
21e1ef98fc55c5592100c98f6c1d0db607baa535 | 126,513 | py | Python | pandas/io/parsers.py | chrisdonlan/pandas | af4e2ce19c9c0b89db4bc06d7730b68068c6aeae | [
"BSD-3-Clause"
] | null | null | null | pandas/io/parsers.py | chrisdonlan/pandas | af4e2ce19c9c0b89db4bc06d7730b68068c6aeae | [
"BSD-3-Clause"
] | null | null | null | pandas/io/parsers.py | chrisdonlan/pandas | af4e2ce19c9c0b89db4bc06d7730b68068c6aeae | [
"BSD-3-Clause"
] | null | null | null | """
Module contains tools for processing files into DataFrames or other objects
"""
from collections import abc, defaultdict
import csv
import datetime
from io import StringIO
import re
import sys
from textwrap import fill
from typing import Any, Dict, Set
import warnings
import numpy as np
import pandas._libs.lib a... | 34.500409 | 88 | 0.568859 |
21e225ed8b23c8ac78d62ebe1c2a2201cc750050 | 3,943 | py | Python | lyaf_optdepth/qso_class.py | VikrantKamble/lyaf_optdepth | 899048ab73e546513b3713b3818abfab3ce3ab05 | [
"MIT"
] | null | null | null | lyaf_optdepth/qso_class.py | VikrantKamble/lyaf_optdepth | 899048ab73e546513b3713b3818abfab3ce3ab05 | [
"MIT"
] | null | null | null | lyaf_optdepth/qso_class.py | VikrantKamble/lyaf_optdepth | 899048ab73e546513b3713b3818abfab3ce3ab05 | [
"MIT"
] | null | null | null | #!/bin/python
""" Script that defines a QSO base class """
import os
import numpy as np
import matplotlib.pyplot as plt
import fitsio
# local imports
from lyaf_optdepth import param_fit, config
class QSO:
""" Class to hold the quasar data used in the project """
def __init__(self, data_file=None, attr_fil... | 30.330769 | 78 | 0.541973 |
21e26cd90e0a2e5fcbcf9dab9695c93d13cc1f14 | 12,402 | py | Python | contrib/model/unet_tile_se_norm.py | alrivero/pixel-nerf | c054befe189602627f021cda8376adc5940c8668 | [
"BSD-2-Clause"
] | null | null | null | contrib/model/unet_tile_se_norm.py | alrivero/pixel-nerf | c054befe189602627f021cda8376adc5940c8668 | [
"BSD-2-Clause"
] | null | null | null | contrib/model/unet_tile_se_norm.py | alrivero/pixel-nerf | c054befe189602627f021cda8376adc5940c8668 | [
"BSD-2-Clause"
] | null | null | null | import torch
from torch import nn
import torch.nn.functional as F
def pad_tensor(input):
height_org, width_org = input.shape[2], input.shape[3]
divide = 16
if width_org % divide != 0 or height_org % divide != 0:
width_res = width_org % divide
height_res = height_org % divide
... | 38.396285 | 111 | 0.599661 |
21e27a7eb5deb8e72fcc9acd60c4eceb809f10ea | 595 | py | Python | LC/128.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | 2 | 2018-02-24T17:20:02.000Z | 2018-02-24T17:25:43.000Z | LC/128.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | LC/128.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | class Solution(object):
def longestConsecutive(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
# use set and start from the first element and sequentially check the following numbers and count numbers, if x-1 in set it means it's not the first element of a seq... | 29.75 | 193 | 0.487395 |
21e2800ede8dabb6ba745395be9e233b1c842f34 | 67,310 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/_registries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/_registries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/_registries_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 42.790846 | 215 | 0.676764 |
21e282b7cbb5a76686eabec202e7674d0b51078b | 3,147 | py | Python | labs/nmap-ssh/client/bot.py | jakuta-tech/Labtainers | f674204022ad5d13ad6bccaf02a14a283470d23f | [
"Apache-2.0"
] | null | null | null | labs/nmap-ssh/client/bot.py | jakuta-tech/Labtainers | f674204022ad5d13ad6bccaf02a14a283470d23f | [
"Apache-2.0"
] | null | null | null | labs/nmap-ssh/client/bot.py | jakuta-tech/Labtainers | f674204022ad5d13ad6bccaf02a14a283470d23f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
'''
A simple bot to login to a telnet server, change a password, and then
just keep logging in, listing a directory and logging out.
'''
import sys
from subprocess import PIPE, Popen
from threading import Thread
import time
import logging
try:
from Queue import Queue, Empty
except ImportError... | 27.605263 | 108 | 0.599301 |
21e29a91a19bd4a97250b11fd9a352996989ca57 | 1,987 | py | Python | python/illusionist/kernel_utils.py | ocefpaf/illusionist | fc4db24230a5ed6f5756df3aacef344fe12fabf3 | [
"Apache-2.0"
] | 9 | 2020-06-11T17:09:17.000Z | 2021-11-16T13:44:05.000Z | python/illusionist/kernel_utils.py | ocefpaf/illusionist | fc4db24230a5ed6f5756df3aacef344fe12fabf3 | [
"Apache-2.0"
] | 2 | 2020-08-30T19:58:30.000Z | 2021-09-29T02:08:55.000Z | python/illusionist/kernel_utils.py | ocefpaf/illusionist | fc4db24230a5ed6f5756df3aacef344fe12fabf3 | [
"Apache-2.0"
] | 1 | 2021-09-30T17:20:32.000Z | 2021-09-30T17:20:32.000Z | # This module is executed on the Kernel that also executes the notebook
try:
# This will fail when executed in the Kernel is just for linting purposes
import ipywidgets as W
from .widgets import (
BOOLEAN_OUTPUT_WIDGETS,
CONTROL_WIDGETS,
NUMERIC_OUTPUT_WIDGETS,
SELECTION_OU... | 29.656716 | 77 | 0.64771 |
21e2a4b16da3085255119d234072f985d0f60edb | 306 | py | Python | src/onevision/data/augment/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/data/augment/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/data/augment/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import annotations
from .base import *
from .default_transform import *
from .image_augment import *
from .image_box_augment import *
from .lowhighres_images_augment import *
from .paired_images_augment import *
from .utils import *
| 19.125 | 40 | 0.745098 |
21e2ad6b21a80014586019066f0cd7c96cc656c4 | 4,780 | py | Python | tests/test_bs4_cases.py | stefanor/soupsieve | 7fa3846c9fac4735f8ec444a7ed3baa355e59f34 | [
"MIT"
] | null | null | null | tests/test_bs4_cases.py | stefanor/soupsieve | 7fa3846c9fac4735f8ec444a7ed3baa355e59f34 | [
"MIT"
] | null | null | null | tests/test_bs4_cases.py | stefanor/soupsieve | 7fa3846c9fac4735f8ec444a7ed3baa355e59f34 | [
"MIT"
] | null | null | null | """Test that we don't fail the same test cases that Beautiful Soup fails for."""
from __future__ import unicode_literals
from bs4 import BeautifulSoup
import unittest
import soupsieve as sv
class SelectorNthOfTypeBugTest(unittest.TestCase):
"""
Original Beautiful soup test html document.
http://bazaar.la... | 32.965517 | 113 | 0.660879 |
21e2c3a9c8e2012c11463a8c0be7efe859072df9 | 1,118 | py | Python | restfulie/links.py | JNRowe-retired/restfulie-py | 8ac2bc401068c7bae6da3d107b004835618165d7 | [
"Apache-2.0"
] | 3 | 2015-03-09T09:17:46.000Z | 2016-05-03T02:51:25.000Z | restfulie/links.py | JNRowe-retired/restfulie-py | 8ac2bc401068c7bae6da3d107b004835618165d7 | [
"Apache-2.0"
] | null | null | null | restfulie/links.py | JNRowe-retired/restfulie-py | 8ac2bc401068c7bae6da3d107b004835618165d7 | [
"Apache-2.0"
] | 1 | 2020-12-14T23:23:26.000Z | 2020-12-14T23:23:26.000Z | import dsl
class Link(object):
"""
Link represents generic link. You can follow it.
"""
def __init__(self, href, rel, content_type='application/xml'):
self.href = href
self.rel = rel
self.content_type = content_type
def follow(self):
"""
Return a DSL objec... | 22.36 | 66 | 0.555456 |
21e2fa32d6a2ac91c71838d871d4e7e6dabe91fa | 4,793 | py | Python | spatialpandas/spatialindex/hilbert_curve.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | null | null | null | spatialpandas/spatialindex/hilbert_curve.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | 1 | 2021-04-17T15:22:28.000Z | 2021-04-17T15:22:28.000Z | spatialpandas/spatialindex/hilbert_curve.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | 1 | 2021-04-17T15:22:00.000Z | 2021-04-17T15:22:00.000Z | import numpy as np
from spatialpandas.utils import ngjit
"""
Initially based on https://github.com/galtay/hilbert_curve, but specialized
for 2 dimensions with numba acceleration
"""
@ngjit
def _int_2_binary(v, width):
"""Return a binary byte array representation of `v` zero padded to `width`
bits."""
res... | 25.631016 | 85 | 0.558731 |
21e3583041c29c0422e7a9f23a0f12798b75c301 | 1,664 | py | Python | Src/arap_interpolate.py | sanjeevmk/GLASS | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | 2 | 2022-03-22T17:36:14.000Z | 2022-03-27T05:03:39.000Z | Src/arap_interpolate.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | Src/arap_interpolate.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | from Escher.tools import deformation_interpolation
import os
import argparse
import trimesh
parser = argparse.ArgumentParser()
parser.add_argument("src_dir",help="Directory containing all meshes",type=str)
parser.add_argument("out_dir",help="Directory containing output interpolations",type=str)
parser.add_argument("in... | 35.404255 | 118 | 0.727163 |
21e3583e7d9900d7f6c01f782a8d514ef2c563d8 | 60,796 | py | Python | pipelinewise/cli/pipelinewise.py | datalytyx/pipelinewise | 6916b105bf1228945c9ae2988b329d9ddeb806d6 | [
"Apache-2.0"
] | null | null | null | pipelinewise/cli/pipelinewise.py | datalytyx/pipelinewise | 6916b105bf1228945c9ae2988b329d9ddeb806d6 | [
"Apache-2.0"
] | 3 | 2019-11-04T11:42:22.000Z | 2019-12-03T12:15:19.000Z | pipelinewise/cli/pipelinewise.py | datalytyx/pipelinewise | 6916b105bf1228945c9ae2988b329d9ddeb806d6 | [
"Apache-2.0"
] | 2 | 2019-11-29T12:30:05.000Z | 2019-12-09T13:13:19.000Z | """
PipelineWise CLI - Pipelinewise class
"""
import os
import shutil
import signal
import sys
import logging
import json
import copy
import pidfile
from datetime import datetime
from time import time
from typing import Dict
from joblib import Parallel, delayed, parallel_backend
from tabulate import tabulate
from . ... | 44.27968 | 120 | 0.57535 |
21e35b59aab88a3833267e1b7ebca69606f01fd9 | 9,494 | py | Python | antarest/core/config.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2021-11-15T09:26:33.000Z | 2022-02-24T09:53:54.000Z | antarest/core/config.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/core/config.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | import logging
import tempfile
from dataclasses import dataclass, field
from pathlib import Path
from typing import Optional, List, Dict, Any
import yaml
from antarest.core.custom_types import JSON
from antarest.core.roles import RoleType
logger = logging.getLogger(__name__)
@dataclass(frozen=True)
class ExternalA... | 28.172107 | 78 | 0.605751 |
21e364376356a623ad749859f8fe22c435bdf259 | 3,056 | py | Python | tests/operation/teststatsoperations.py | jsignell/holoviews | 4f9fd27367f23c3d067d176f638ec82e4b9ec8f0 | [
"BSD-3-Clause"
] | null | null | null | tests/operation/teststatsoperations.py | jsignell/holoviews | 4f9fd27367f23c3d067d176f638ec82e4b9ec8f0 | [
"BSD-3-Clause"
] | null | null | null | tests/operation/teststatsoperations.py | jsignell/holoviews | 4f9fd27367f23c3d067d176f638ec82e4b9ec8f0 | [
"BSD-3-Clause"
] | null | null | null | from unittest import SkipTest
try:
import scipy # noqa
except:
raise SkipTest('SciPy not available')
import numpy as np
from holoviews import Distribution, Bivariate, Area, Image, Contours, Polygons
from holoviews.element.comparison import ComparisonTestCase
from holoviews.operation.stats import (univariate_... | 40.210526 | 82 | 0.626963 |
21e375a7dd62190362082c6646722ed326c987a1 | 3,225 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_06_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.134328 | 130 | 0.701085 |
21e39b88d17beb074cd09eb2a5931fd584170828 | 736 | py | Python | balutils/CatalogFactory/CatalogFactory.py | mattkwiecien/balutils | 9dcd5419a796e23df671fc4dc22c78cf7e2c61fc | [
"MIT"
] | null | null | null | balutils/CatalogFactory/CatalogFactory.py | mattkwiecien/balutils | 9dcd5419a796e23df671fc4dc22c78cf7e2c61fc | [
"MIT"
] | null | null | null | balutils/CatalogFactory/CatalogFactory.py | mattkwiecien/balutils | 9dcd5419a796e23df671fc4dc22c78cf7e2c61fc | [
"MIT"
] | null | null | null | from balutils.CatalogFeature import *
from balutils import Catalog
class CatalogFactory():
_featureLookup = {
'fits': Fits,
'gold_default': GoldDefault,
'gold_SOF': GoldSOF,
'gold_MOF': GoldMOF,
'detection': Detection
}
def Create(self, filename, catalogTypes) -> ... | 27.259259 | 80 | 0.653533 |
21e3d4be4ba91d2b8474e4a4cf63d202e05a4c53 | 2,754 | py | Python | fir_irma/models.py | gcrahay/fir_irma_plugin | a41718fd9ccc7fb9488044755a7c55c97f462b07 | [
"Apache-2.0"
] | null | null | null | fir_irma/models.py | gcrahay/fir_irma_plugin | a41718fd9ccc7fb9488044755a7c55c97f462b07 | [
"Apache-2.0"
] | 2 | 2015-06-06T07:14:11.000Z | 2015-06-06T07:48:54.000Z | fir_irma/models.py | gcrahay/fir_irma_plugin | a41718fd9ccc7fb9488044755a7c55c97f462b07 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.utils.translation import ugettext_lazy as _
from fir_irma.settings import settings
try:
User = settings.AUTH_USER_MODEL
except KeyError:
from django.contrib.auth.models import User
try:
from django.db.models import UUIDField
except ImportError:
from uuidfield ... | 38.25 | 109 | 0.665577 |
21e3dad13f2a8147ef91e567f9e08272dbdb5ed0 | 9,473 | py | Python | docs/conf.py | UT-CHG/ch-sim | 5e9d7c55cc40f409202c0ed68c85e12e70001609 | [
"MIT"
] | 1 | 2021-09-07T16:08:12.000Z | 2021-09-07T16:08:12.000Z | docs/conf.py | bpachev/ch-sim | d98d6ad2225ce0c37e0da87d2152203a0c3359f3 | [
"MIT"
] | null | null | null | docs/conf.py | bpachev/ch-sim | d98d6ad2225ce0c37e0da87d2152203a0c3359f3 | [
"MIT"
] | 1 | 2022-01-11T15:34:52.000Z | 2022-01-11T15:34:52.000Z | # This file is execfile()d with the current directory set to its containing dir.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
#
# All configuration values have a default; values that are comme... | 33.473498 | 85 | 0.694922 |
21e3f0f72ff90b6bf303f7fae23848b47f6a517c | 5,553 | py | Python | arjuna-samples/arjex/test/pkg/parsing/json/check_parse_json_06_schemagen_singleobj.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | arjuna-samples/arjex/test/pkg/parsing/json/check_parse_json_06_schemagen_singleobj.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | arjuna-samples/arjex/test/pkg/parsing/json/check_parse_json_06_schemagen_singleobj.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | # This file is a part of Arjuna
# Copyright 2015-2020 Rahul Verma
# Website: www.RahulVerma.net
# 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... | 28.187817 | 111 | 0.537367 |
21e400a525118c2c75bbe7951c6bf625d919088a | 5,199 | py | Python | docs/conf.py | bierschenk/ode | f6d385a8a44b30fb5a26095f8d6a62b90c741059 | [
"MIT"
] | null | null | null | docs/conf.py | bierschenk/ode | f6d385a8a44b30fb5a26095f8d6a62b90c741059 | [
"MIT"
] | 444 | 2017-07-04T16:48:02.000Z | 2022-03-31T10:54:08.000Z | docs/conf.py | bierschenk/ode | f6d385a8a44b30fb5a26095f8d6a62b90c741059 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.582353 | 79 | 0.645893 |
21e433544eda1ef979807ba1b2073f81a0b4be00 | 9,582 | py | Python | pector/mat4.py | defgsus/pector | 8ac7a42030c6502b25b34133f3972ff109e34ccc | [
"MIT"
] | null | null | null | pector/mat4.py | defgsus/pector | 8ac7a42030c6502b25b34133f3972ff109e34ccc | [
"MIT"
] | null | null | null | pector/mat4.py | defgsus/pector | 8ac7a42030c6502b25b34133f3972ff109e34ccc | [
"MIT"
] | null | null | null | import math
from . import tools, const
from .mat_base import mat_base
from .vec3 import vec3
class mat4(mat_base):
"""
4x4 anisotropic matrix - column-major order
"""
def __len__(self):
return 16
def num_rows(self):
return 4
# ----- public API getter ------
def position... | 29.392638 | 98 | 0.514819 |
21e4362d4085767e33d2294aafe9150dc4d0c3ff | 534 | py | Python | wizard_builder/tests/urls.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/urls.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/urls.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.conf.urls import include, url
from django.contrib import admin
from django.views.generic.base import RedirectView
from .. import views
urlpatterns = [
url(r'^$',
views.NewWizardView.as_view(),
),
url(r'^new/$',
views.NewWizardView.as_view(),
name='wizard_new',
... | 24.272727 | 57 | 0.599251 |
21e4379490cf73f4486959c8aebb88ab28a1aad0 | 1,592 | py | Python | utils/model/build_uml.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | utils/model/build_uml.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | utils/model/build_uml.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | """
This file provides the code generator which transforms gaphor/UML/uml2.gaphor
into gaphor/UML/uml2.py.
Also a distutils tool, build_uml, is provided.
"""
import os.path
from distutils.core import Command
from distutils.dep_util import newer
from distutils.util import byte_compile
from distutils.dir_util import mk... | 25.269841 | 84 | 0.656407 |
21e46076a1676770091943895d5f4fd51af6244a | 719 | py | Python | Practica Plus/Miguel/Plus.py | ComputacionGraficaUnsaac/2020-verano | 9bdeaed8c7cd50acc376c5b850936a22b36337e0 | [
"Apache-2.0"
] | null | null | null | Practica Plus/Miguel/Plus.py | ComputacionGraficaUnsaac/2020-verano | 9bdeaed8c7cd50acc376c5b850936a22b36337e0 | [
"Apache-2.0"
] | null | null | null | Practica Plus/Miguel/Plus.py | ComputacionGraficaUnsaac/2020-verano | 9bdeaed8c7cd50acc376c5b850936a22b36337e0 | [
"Apache-2.0"
] | null | null | null | from Biblioteca import *
import random
def main():
scale = 1
angle = -15
width, height = scale * 500, scale * 500
pygame.init()
display_openGL(width, height, scale)
vertices1 =[[150, 0, 1], [0, 150, 1],[-150, 0, 1]]
colors = [(0, 255, 255), (0, 128, 0), (0, 255, 0), (128, 0, 128), (255, 255, 0), (255, 0, 0), (0,... | 23.966667 | 107 | 0.591099 |
21e47acfc62e09e345c8613e32abccc35aa9ecf6 | 4,046 | py | Python | alipay/aop/api/request/AlipayCommerceEducateBusinessServiceApplyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayCommerceEducateBusinessServiceApplyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayCommerceEducateBusinessServiceApplyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceEducateBusinessServiceApplyModel import AlipayCommerceEducateBusinessServiceApplyModel
class AlipayCommerceEducateBusi... | 27.903448 | 148 | 0.651013 |
21e4941645aa009b1f6a2614d87e36df7b4648b0 | 13,233 | py | Python | spyder/plugins/projects/tests/test_plugin.py | Nicztin/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | 1 | 2019-09-25T15:08:24.000Z | 2019-09-25T15:08:24.000Z | spyder/plugins/projects/tests/test_plugin.py | jorgeps86/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | null | null | null | spyder/plugins/projects/tests/test_plugin.py | jorgeps86/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright © Spyder Project Contributors
#
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
# -----------------------------------------------------------------------------
"""
Te... | 34.193798 | 79 | 0.671276 |
21e4ad7e57ca2068d75c57fb3f2c355ccd309b8c | 13,428 | py | Python | qa/common/gen_qa_noshape_models.py | areche/triton-inference-server | 98469161f8e8acd513af7c0dc12dabb7f033f76b | [
"BSD-3-Clause"
] | 1 | 2021-04-27T18:42:40.000Z | 2021-04-27T18:42:40.000Z | qa/common/gen_qa_noshape_models.py | dhanainme/triton-inference-server | 880db08b8a3a54caa51ae76387cdcea303807faf | [
"BSD-3-Clause"
] | null | null | null | qa/common/gen_qa_noshape_models.py | dhanainme/triton-inference-server | 880db08b8a3a54caa51ae76387cdcea303807faf | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018-2019, NVIDIA CORPORATION. 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 list of conditi... | 41.831776 | 106 | 0.653187 |
21e4ad8a3f011056e1313f8dd32b7f6e87f0fbc5 | 22 | py | Python | btd6_memory_info/generated/SteamNative/Callback/VTableThis/v_table_this.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/Callback/VTableThis/v_table_this.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/Callback/VTableThis/v_table_this.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class VTableThis: pass | 22 | 22 | 0.863636 |
21e4b0566bc8b6536c9dea6ca9a334899cb79b91 | 13,592 | py | Python | codes_src/train.py | ZhenYangIACAS/WeTS | bba33ad64e10efd7d3d95b5a0b6ad125216542cf | [
"Unlicense"
] | 50 | 2021-11-15T02:34:43.000Z | 2021-11-18T07:24:46.000Z | codes_src/train.py | yujun531/WeTS | bba33ad64e10efd7d3d95b5a0b6ad125216542cf | [
"Unlicense"
] | null | null | null | codes_src/train.py | yujun531/WeTS | bba33ad64e10efd7d3d95b5a0b6ad125216542cf | [
"Unlicense"
] | 26 | 2021-11-15T02:35:14.000Z | 2021-11-15T08:25:42.000Z | #!/usr/bin/env python3 -u
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Train a new model on one or across multiple GPUs.
"""
import collections
import math
import random
import torch... | 37.755556 | 102 | 0.65384 |
21e4c728f4e44b1b01e8fe027394a621968b5cca | 15,935 | py | Python | eva_submission/biosamples_submission.py | itsroops/eva-submission | 16c0860e020013ce1d1c2b8a3688676460269f40 | [
"Apache-2.0"
] | null | null | null | eva_submission/biosamples_submission.py | itsroops/eva-submission | 16c0860e020013ce1d1c2b8a3688676460269f40 | [
"Apache-2.0"
] | null | null | null | eva_submission/biosamples_submission.py | itsroops/eva-submission | 16c0860e020013ce1d1c2b8a3688676460269f40 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2020 EMBL - European Bioinformatics Institute
#
# 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 ... | 44.887324 | 128 | 0.606338 |
21e4db13a46ee8fdf646f3e563c47fed565b65c3 | 1,344 | py | Python | mathics/core/systemsymbols.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | mathics/core/systemsymbols.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | mathics/core/systemsymbols.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from mathics.core.symbols import Symbol
# Some other common Symbols. This list is sorted in alphabetic order.
SymbolAborted = Symbol("$Aborted")
SymbolAlternatives = Symbol("Alternatives")
SymbolAssociation = Symbol("Association")
SymbolBlank = Symbol("Blank")
SymbolByteArray = Symbol("ByteArr... | 33.6 | 69 | 0.768601 |
21e4de5abcbc01768f46cebe0b5f8194c8a4e071 | 6,061 | py | Python | BIT_OpenDomain_QA/creeper/url2io.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | BIT_OpenDomain_QA/creeper/url2io.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | BIT_OpenDomain_QA/creeper/url2io.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COP... | 29.42233 | 97 | 0.570368 |
21e4e16323a1e0a3cba6d31fbfd2f5949b7108a2 | 428 | py | Python | migrations/versions/0308_rename_service_whitelist_table.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 41 | 2019-11-28T16:58:41.000Z | 2022-01-28T21:11:16.000Z | migrations/versions/0308_rename_service_whitelist_table.py | cds-snc/notification-api | b1c1064f291eb860b494c3fa65ac256ad70bf47c | [
"MIT"
] | 1,083 | 2019-07-08T12:57:24.000Z | 2022-03-08T18:53:40.000Z | migrations/versions/0308_rename_service_whitelist_table.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 9 | 2020-01-24T19:56:43.000Z | 2022-01-27T21:36:53.000Z | """
Revision ID: 0308_rename_service_whitelist
Revises: 0307_update_email_2fa_template
Create Date: 2020-08-04 12:50:00
"""
from alembic import op
revision = "0308_rename_service_whitelist"
down_revision = "0307_update_email_2fa_template"
def upgrade():
op.execute("ALTER TABLE service_whitelist RENAME TO servi... | 21.4 | 74 | 0.796729 |
21e5246de54e3b785485122d41380f2cf63fdbaf | 469 | py | Python | core/migrations/0015_auto_20200621_0001.py | IS-AgroSmart/MVP | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | null | null | null | core/migrations/0015_auto_20200621_0001.py | IS-AgroSmart/MVP | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | 140 | 2020-01-21T15:42:29.000Z | 2021-08-21T18:04:19.000Z | core/migrations/0015_auto_20200621_0001.py | IS-AgroSmart/AgroSmart-Web | b347e7c846a9a29584a6baee0b825381d5bc62a3 | [
"CNRI-Python"
] | 1 | 2021-05-03T06:12:35.000Z | 2021-05-03T06:12:35.000Z | # Generated by Django 3.0.1 on 2020-06-21 00:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0014_artifact_title'),
]
operations = [
migrations.AlterField(
model_name='artifact',
name='type',
... | 24.684211 | 140 | 0.599147 |
21e53bee018d2a54393b2fe4c34335dd62462200 | 5,618 | py | Python | test_net.py | ivo-gilles/breast-cancer-classification | eb79275ac281d0340ede5d21e3d4a1116d612ddd | [
"MIT"
] | null | null | null | test_net.py | ivo-gilles/breast-cancer-classification | eb79275ac281d0340ede5d21e3d4a1116d612ddd | [
"MIT"
] | null | null | null | test_net.py | ivo-gilles/breast-cancer-classification | eb79275ac281d0340ede5d21e3d4a1116d612ddd | [
"MIT"
] | null | null | null | #import sys,os
# sys.path.append(os.getcwd())
import os
import os.path as ops
import argparse
import time
import math
import random
import tensorflow as tf
import glob
import glog as log
import numpy as np
import matplotlib.pyplot as plt
import cv2
import model
import global_config
CFG = global_config.cfg
IMG_WIDTH... | 33.242604 | 115 | 0.60858 |
21e54060005d67899fbc9f1e47f14df19948a7fc | 3,328 | py | Python | stanCode_projects/01_Campy_Drawing/my_drawing.py | PTLin84/stanCode_projects | 82133ed9f8c431b5d02a722746d0323090a42ed3 | [
"MIT"
] | null | null | null | stanCode_projects/01_Campy_Drawing/my_drawing.py | PTLin84/stanCode_projects | 82133ed9f8c431b5d02a722746d0323090a42ed3 | [
"MIT"
] | null | null | null | stanCode_projects/01_Campy_Drawing/my_drawing.py | PTLin84/stanCode_projects | 82133ed9f8c431b5d02a722746d0323090a42ed3 | [
"MIT"
] | null | null | null | """
File:
Name:
----------------------
TODO:
"""
from campy.graphics.gobjects import GOval, GRect, GLabel
from campy.graphics.gwindow import GWindow
from math import floor
def main():
"""
Sally the chicken.
"""
# build window
window = GWindow(300, 300, title='Sally')
# build all elements
... | 37.818182 | 115 | 0.651142 |
21e54bcf8058300c62c0f523bd119043add0d44d | 62 | py | Python | tests/datastructures/test_queue.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | 5 | 2018-12-03T19:18:50.000Z | 2021-05-31T07:17:06.000Z | tests/datastructures/test_queue.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | 1 | 2020-02-13T20:56:05.000Z | 2020-02-19T18:32:56.000Z | tests/datastructures/test_queue.py | TristenSeth/campy | 9e726c342d682239e1c19e6f5645c0b2167d7fab | [
"MIT"
] | 1 | 2017-06-06T07:29:07.000Z | 2017-06-06T07:29:07.000Z | """Tests for the :mod:`campy.datastructures.queue` module."""
| 31 | 61 | 0.709677 |
21e54e6996ba68987fe432c24e95f98f2d01cb37 | 4,603 | py | Python | experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_29/exp1_relative_distance_10k_beta.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_29/exp1_relative_distance_10k_beta.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_29/exp1_relative_distance_10k_beta.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.pygame import PickAndPlaceEnv
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.sets.vae_launcher import train_set_vae
if __name__ == "__main__":
variant = dict(
env_id='OneObject-PickAndPlace-BigBall-RandomInit-2D-v1',
... | 32.878571 | 90 | 0.519009 |
21e570b19028003c2ba559d13d303c7df7945efd | 931 | py | Python | mails/models.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | 1 | 2020-11-17T18:50:44.000Z | 2020-11-17T18:50:44.000Z | mails/models.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | 9 | 2020-10-23T18:42:45.000Z | 2022-03-12T00:39:57.000Z | mails/models.py | kermox/schronisko-krakow | 8f8c546894e4b683ce463debad27db72ef820f90 | [
"MIT"
] | null | null | null | from django.core.validators import EmailValidator
from django.db import models
from utils.utils import TimeStampMixin
class EmailTemplate(models.Model):
title = models.CharField(
max_length=250,
blank=True,
null=False,
verbose_name='Tytuł'
)
body = models.TextField(
... | 22.707317 | 78 | 0.641246 |
21e58bd40e6354161ac9e6db6902b20c835bec7e | 8,020 | py | Python | tests/classification/test_accuracy.py | awaelchli/metrics | bb5ca011e1b31dfebe04574eb07be0af541c51fb | [
"Apache-2.0"
] | 1 | 2021-03-12T10:33:12.000Z | 2021-03-12T10:33:12.000Z | tests/classification/test_accuracy.py | awaelchli/metrics | bb5ca011e1b31dfebe04574eb07be0af541c51fb | [
"Apache-2.0"
] | null | null | null | tests/classification/test_accuracy.py | awaelchli/metrics | bb5ca011e1b31dfebe04574eb07be0af541c51fb | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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 i... | 42.210526 | 112 | 0.710848 |
21e5992b6d90b1090c08dcd2b862809b09984121 | 449 | py | Python | qiita_ware/__init__.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | qiita_ware/__init__.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | qiita_ware/__init__.py | Jorge-C/qiita | cc502083cdbcf8654f1b467c6b5f0fb9fe6ab5a4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import division
from redis import Redis
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, di... | 32.071429 | 79 | 0.485523 |
21e59c6cd071efcd253736a2805459cfe92b00c0 | 1,739 | py | Python | src/frontend/urls.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | src/frontend/urls.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | 32 | 2016-05-09T19:37:08.000Z | 2022-01-13T01:00:52.000Z | src/frontend/urls.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url, include
from frontend import views
from pacientes.views import historia_clinica_report_pdf
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^personas/$', views.persona_list, name='persona_list'),
url(r'^personas/nueva/$', views.persona_create, name='persona_c... | 59.965517 | 131 | 0.702128 |
21e5de82dacf4d6ac1f080cf8deca087bc7e13d7 | 434,891 | py | Python | lhcb/data/B0_D0mumu/bookkeeping/BK_LHCb_Collision11_Beam3500GeV-VeloClosed-MagDown_RealData_Reco14_Stripping20r1_FullStream.py | ibab/lhcb-b2dmumu | c1334c381032af9459602640e17541377fd16606 | [
"MIT"
] | 3 | 2019-06-24T10:56:34.000Z | 2019-06-24T10:57:11.000Z | lhcb/data/B0_D0mumu/bookkeeping/BK_LHCb_Collision11_Beam3500GeV-VeloClosed-MagDown_RealData_Reco14_Stripping20r1_FullStream.py | ibab/lhcb-b2dmumu | c1334c381032af9459602640e17541377fd16606 | [
"MIT"
] | null | null | null | lhcb/data/B0_D0mumu/bookkeeping/BK_LHCb_Collision11_Beam3500GeV-VeloClosed-MagDown_RealData_Reco14_Stripping20r1_FullStream.py | ibab/lhcb-b2dmumu | c1334c381032af9459602640e17541377fd16606 | [
"MIT"
] | null | null | null | #-- GAUDI jobOptions generated on Wed Nov 12 12:27:12 2014
#-- Contains event types :
#-- 90000000 - 5049 files - 126095607 events - 12311.99 GBytes
#-- Extra information about the data processing phases:
#-- Processing Pass Step-124248
#-- StepId : 124248
#-- StepName : Stripping20r1-Merging-DV-v32r2p3
... | 85.726592 | 114 | 0.825395 |
21e5ec4822fc4afe6d317c87bf9b6e47d5eb8051 | 2,138 | py | Python | recognition/common/rec2image.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | recognition/common/rec2image.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | recognition/common/rec2image.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import mxnet as mx
from mxnet import ndarray as nd
import random
import argparse
import cv2
import time
import sklearn
import numpy as np
def main(args):
include_datasets = args.includ... | 35.04918 | 120 | 0.604771 |
21e5fb1f95c2711e513819bd34d0402a99549c96 | 1,945 | py | Python | reproduce/learning-to-drive-in-minutes-carla/config.py | wangyubin112/selfdrive | 51436d1779cc3d1187aa8c84d432df34266a6b5a | [
"MIT"
] | null | null | null | reproduce/learning-to-drive-in-minutes-carla/config.py | wangyubin112/selfdrive | 51436d1779cc3d1187aa8c84d432df34266a6b5a | [
"MIT"
] | null | null | null | reproduce/learning-to-drive-in-minutes-carla/config.py | wangyubin112/selfdrive | 51436d1779cc3d1187aa8c84d432df34266a6b5a | [
"MIT"
] | null | null | null | # Raw camera input
CAMERA_HEIGHT = 80
CAMERA_WIDTH = 160
CAMERA_RESOLUTION = (CAMERA_WIDTH, CAMERA_HEIGHT)
MARGIN_TOP = 0
# Region Of Interest
# r = [margin_left, margin_top, width, height]
ROI = [0, MARGIN_TOP, CAMERA_WIDTH, CAMERA_HEIGHT - MARGIN_TOP]
# Input dimension for VAE
IMAGE_WIDTH = ROI[2]
IMAGE_HEIGHT = ROI... | 26.643836 | 83 | 0.732648 |
21e61c85b368b906eaea9fdc0d8b68dd78658903 | 840 | py | Python | Datasets/Vectors/world_database_on_protected_areas.py | monocilindro/qgis-earthengine-examples | 82aea8926d34ed3f4ad4a4a345ddbd225819d28f | [
"MIT"
] | 646 | 2019-12-03T06:09:03.000Z | 2022-03-28T03:37:08.000Z | Datasets/Vectors/world_database_on_protected_areas.py | csaybar/qgis-earthengine-examples | ba8942683834d2847ff3246bdd1859b36e50fe44 | [
"MIT"
] | 10 | 2019-12-30T03:42:44.000Z | 2021-05-22T07:34:07.000Z | Datasets/Vectors/world_database_on_protected_areas.py | csaybar/qgis-earthengine-examples | ba8942683834d2847ff3246bdd1859b36e50fe44 | [
"MIT"
] | 219 | 2019-12-06T02:20:53.000Z | 2022-03-30T15:14:27.000Z | # GitHub URL: https://github.com/giswqs/qgis-earthengine-examples/tree/master/Datasets/Vectors/world_database_on_protected_areas.py
import ee
from ee_plugin import Map
dataset = ee.FeatureCollection('WCMC/WDPA/current/polygons')
visParams = {
'palette': ['2ed033', '5aff05', '67b9ff', '5844ff', '0a7618', '2c05ff'],
... | 31.111111 | 131 | 0.714286 |
21e61c9655448e74c8545c3885f16d1f70ea92b9 | 598 | py | Python | abc/223/C.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/223/C.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/223/C.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
def main():
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N = ni()
A = [0] * N
B = [0] * N
half_time = 0
for i in range(N):
A[i], B[i] = na()
... | 18.121212 | 57 | 0.491639 |
21e6258c03b9878ef0518fbcee775fb07f0e60e6 | 332 | py | Python | getkeys.py | Guidosalimbeni/compositionRL | e16774760313720a213e344c857a4a390b92b968 | [
"MIT"
] | null | null | null | getkeys.py | Guidosalimbeni/compositionRL | e16774760313720a213e344c857a4a390b92b968 | [
"MIT"
] | null | null | null | getkeys.py | Guidosalimbeni/compositionRL | e16774760313720a213e344c857a4a390b92b968 | [
"MIT"
] | null | null | null | # Citation: Box Of Hats (https://github.com/Box-Of-Hats )
import win32api as wapi
keyList = ["\b"]
for char in "ABCDEFGHIJKLMNOPQRSTUVWXYZ 123456789,.'£$/\\":
keyList.append(char)
def key_check():
keys = []
for key in keyList:
if wapi.GetAsyncKeyState(ord(key)):
keys.append(key)
... | 20.75 | 59 | 0.635542 |
21e628314f56768fc0ad3d2d8c390c894ef70dbd | 80,956 | py | Python | Iodine_python_API/Unit_test_Iodine.py | zrj26/go-NOM | f4bf025910ac74cb960da0662de6599b2637a7e4 | [
"MIT"
] | 3 | 2020-06-27T05:39:05.000Z | 2020-07-02T19:01:00.000Z | Iodine_python_API/Unit_test_Iodine.py | zrj26/go-NOM | f4bf025910ac74cb960da0662de6599b2637a7e4 | [
"MIT"
] | 1 | 2020-06-26T17:55:08.000Z | 2020-06-26T18:49:14.000Z | Iodine_python_API/Unit_test_Iodine.py | zrj26/go-NOM | f4bf025910ac74cb960da0662de6599b2637a7e4 | [
"MIT"
] | null | null | null | import Iodine as IodineAPI
import unittest
class TestNetworkFunc(unittest.TestCase):
@classmethod
def setUpClass(cls):
pass
@classmethod
def tearDownClass(cls):
pass
def setUp(self):
IodineAPI.newNetwork("network1")
IodineAPI.newNetwork("network2")
def tearDo... | 50.252017 | 93 | 0.675231 |
21e64b4f9037395f88742989a1817f55e0b4fc10 | 1,648 | py | Python | calendarserver/profiling.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | calendarserver/profiling.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | calendarserver/profiling.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2014-2015 Apple 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... | 27.016393 | 74 | 0.643811 |
21e65417a36d1cabbc35b8cd3b81605bf1e88abf | 161 | py | Python | test/mitmproxy/net/dns/test_types.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | test/mitmproxy/net/dns/test_types.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | test/mitmproxy/net/dns/test_types.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | from mitmproxy.net.dns import types
def test_simple():
assert types.A == 1
assert types.to_str(types.A) == "A"
assert types.to_str(0) == "TYPE(0)"
| 20.125 | 39 | 0.645963 |
21e657ffb2453b64a394a7549b37aaf21b5a79ba | 188 | py | Python | terrascript/git/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/git/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/git/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/git/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
| 20.888889 | 79 | 0.760638 |
21e671f38b93a7668f75a3e847d9c727f783b5b2 | 18,183 | py | Python | scqubits/utils/plotting.py | IlyaLSMmisis/scqubits-1 | c4915c998c2d1ef3348db0e4c423e74c7181da40 | [
"BSD-3-Clause"
] | null | null | null | scqubits/utils/plotting.py | IlyaLSMmisis/scqubits-1 | c4915c998c2d1ef3348db0e4c423e74c7181da40 | [
"BSD-3-Clause"
] | null | null | null | scqubits/utils/plotting.py | IlyaLSMmisis/scqubits-1 | c4915c998c2d1ef3348db0e4c423e74c7181da40 | [
"BSD-3-Clause"
] | null | null | null | # plotting.py
#
# This file is part of scqubits.
#
# Copyright (c) 2019, Jens Koch and Peter Groszkowski
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
################################################... | 34.833333 | 119 | 0.664852 |
21e686180d25f54a303cee8b0c7ca1cdc5e0da0f | 1,668 | py | Python | tfx/dependencies.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | 2 | 2019-07-08T20:56:13.000Z | 2020-08-04T17:07:26.000Z | tfx/dependencies.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | null | null | null | tfx/dependencies.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 32.076923 | 74 | 0.655875 |
21e69a9204eedd2b3d01db93b80faee105ae8823 | 208 | py | Python | app/routes/api.py | dixonwhitmire/fastapi-template | eb67b80420c9fe6265190ca1003f18859709fe58 | [
"Apache-2.0"
] | null | null | null | app/routes/api.py | dixonwhitmire/fastapi-template | eb67b80420c9fe6265190ca1003f18859709fe58 | [
"Apache-2.0"
] | null | null | null | app/routes/api.py | dixonwhitmire/fastapi-template | eb67b80420c9fe6265190ca1003f18859709fe58 | [
"Apache-2.0"
] | null | null | null | """
api.py
Configures the API Router for the Fast API application
"""
from fastapi import APIRouter
from app.routes import status
router = APIRouter()
router.include_router(status.router, prefix="/status")
| 18.909091 | 54 | 0.774038 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.