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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21ae2f815942ae860ef7b6dcbaf9e3d7a885f3a9 | 31,169 | py | Python | alectryon/pygments_lexer.py | jjhugues/alectryon | 3ef33de5242469b1d0083c20ab7296d70ac248b6 | [
"MIT"
] | null | null | null | alectryon/pygments_lexer.py | jjhugues/alectryon | 3ef33de5242469b1d0083c20ab7296d70ac248b6 | [
"MIT"
] | null | null | null | alectryon/pygments_lexer.py | jjhugues/alectryon | 3ef33de5242469b1d0083c20ab7296d70ac248b6 | [
"MIT"
] | null | null | null | # Original implementation Copyright 2006-2019 by the Pygments team.
# Modifications Copyright © 2019 Clément Pit-Claudel.
# 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... | 58.478424 | 86 | 0.52379 |
21ae35eb750e211f08594b91f2639bd2a43787af | 738 | py | Python | nicos_ess/ymir/setups/syringe_pump_ne1600.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_ess/ymir/setups/syringe_pump_ne1600.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_ess/ymir/setups/syringe_pump_ne1600.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 = 'NE1600 syringe pump'
pv_root = 'E04-SEE-FLUCO:NE1600-001:'
devices = dict(
pump_status_1600=device(
'nicos.devices.epics.EpicsStringReadable',
description='The current pump status',
readpv='{}STATUS_TEXT'.format(pv_root),
lowlevel=True,
epicstimeout=3.0,
... | 30.75 | 69 | 0.644986 |
21ae44987f95bdd9dbc72559d3894a101070727d | 546 | py | Python | pbsmrtpipe/tests/test_schemas.py | PacificBiosciences/pbsmrtpipe | 4d532c823d3a46b82c2eb20b9d46e63544c8ba83 | [
"BSD-3-Clause"
] | 26 | 2015-08-06T02:09:51.000Z | 2021-02-26T02:25:01.000Z | pbsmrtpipe/tests/test_schemas.py | mpkocher/pbsmrtpipe | 4d532c823d3a46b82c2eb20b9d46e63544c8ba83 | [
"BSD-3-Clause"
] | 181 | 2015-08-07T18:13:02.000Z | 2021-04-13T16:24:32.000Z | pbsmrtpipe/tests/test_schemas.py | PacificBiosciences/pbsmrtpipe | 4d532c823d3a46b82c2eb20b9d46e63544c8ba83 | [
"BSD-3-Clause"
] | 29 | 2015-08-07T17:29:42.000Z | 2021-09-15T18:22:37.000Z | import json
import logging
import unittest
from pbsmrtpipe.schemas import validate_pipeline_template
from base import get_data_file
log = logging.getLogger(__name__)
class TestPipelinTemplate(unittest.TestCase):
def test_01(self):
file_name = 'example_pipeline_template_01.json'
path = get_data_... | 26 | 87 | 0.716117 |
21ae52baff8a245ce742a21dc9562b17fd010b23 | 2,125 | py | Python | neutron/plugins/ml2/drivers/type_gre.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/plugins/ml2/drivers/type_gre.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | neutron/plugins/ml2/drivers/type_gre.py | kklimonda/neutron | ccdddad358a4bf802d59b3fbbfe88a1e9881c96c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 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 ... | 35.416667 | 78 | 0.710588 |
21ae8c3eaed5a03897aeeae00273dd97958c51ec | 2,204 | py | Python | st2auth/st2auth/backends/flat_file.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2auth/st2auth/backends/flat_file.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2auth/st2auth/backends/flat_file.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') 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 th... | 36.131148 | 93 | 0.715971 |
21ae95c0e0912fe3553aed73e55a6deafabb6779 | 314 | py | Python | autodp/runner/base_runner.py | IBM/automation-of-image-data-preprocessing | a5327b1b6da3f5fc92dae4dfeb235c5f24378589 | [
"MIT"
] | 5 | 2020-11-26T16:31:56.000Z | 2022-03-02T23:11:19.000Z | autodp/runner/base_runner.py | IBM/automation-of-image-data-preprocessing | a5327b1b6da3f5fc92dae4dfeb235c5f24378589 | [
"MIT"
] | null | null | null | autodp/runner/base_runner.py | IBM/automation-of-image-data-preprocessing | a5327b1b6da3f5fc92dae4dfeb235c5f24378589 | [
"MIT"
] | null | null | null | import abc
class BaseRunner(metaclass=abc.ABCMeta):
"""This abstract class defines basic functions of a model runner."""
@abc.abstractmethod
def train_model(self):
"""Main method for training."""
@abc.abstractmethod
def test_model(self, path):
"""Main method for testing."""
| 24.153846 | 72 | 0.665605 |
21aeb4e90df4808df29a7e42d7998ac503cf7990 | 1,208 | py | Python | permachart/settings.py | justinabrahms/permachart | afdc352436f9ce623cfb108caf36cd8bc2590f06 | [
"BSD-3-Clause"
] | 1 | 2018-09-06T08:47:26.000Z | 2018-09-06T08:47:26.000Z | permachart/settings.py | justinabrahms/permachart | afdc352436f9ce623cfb108caf36cd8bc2590f06 | [
"BSD-3-Clause"
] | null | null | null | permachart/settings.py | justinabrahms/permachart | afdc352436f9ce623cfb108caf36cd8bc2590f06 | [
"BSD-3-Clause"
] | null | null | null | import os
PROJECT_ROOT = os.path.dirname(__file__)
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Justin Lilly', 'justin+permachart@justinlilly.com'),
)
MANAGERS = ADMINS
TIME_ZONE = 'America/New_York'
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
USE_I18N = False
USE_L10N = False
MEDIA_ROOT = ''
MEDIA_URL = '/static/'
A... | 23.230769 | 67 | 0.739238 |
21aec952e9b458aaf8528e5ed07def4e11cf5592 | 291 | py | Python | estampes/data/__init__.py | jbloino/estampes | 39d248cba3541f684c4684661a1664fc42157bdb | [
"MIT"
] | null | null | null | estampes/data/__init__.py | jbloino/estampes | 39d248cba3541f684c4684661a1664fc42157bdb | [
"MIT"
] | 2 | 2021-06-07T12:51:35.000Z | 2021-07-14T17:14:24.000Z | estampes/data/__init__.py | jbloino/estampes | 39d248cba3541f684c4684661a1664fc42157bdb | [
"MIT"
] | null | null | null | """Module providing classes and constants for data manipulation
A module providing basic classes and methods to be used by ESTAMPES:
atom
Atomic data and elements tables
physics
Physical constants and conversions.
property
Property data (units+conversions, names, shape...)
"""
| 26.454545 | 68 | 0.769759 |
21af0fd3e6a312695a430343f00ea2db07860544 | 6,537 | py | Python | tests/integration/optimizers/test_optimizer.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 5 | 2021-10-30T06:07:58.000Z | 2022-02-20T20:43:02.000Z | tests/integration/optimizers/test_optimizer.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 2 | 2021-07-14T14:07:18.000Z | 2022-02-06T05:00:41.000Z | tests/integration/optimizers/test_optimizer.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 2 | 2021-10-06T07:28:11.000Z | 2021-11-18T20:20:18.000Z | import json
import os
import pytest
import yaml
from google.protobuf.json_format import MessageToJson
from jina import Document
from jina.jaml import JAML
from jina.optimizers import FlowOptimizer, EvaluationCallback
from jina.optimizers import run_optimizer_cli
from jina.optimizers.flow_runner import SingleFlowRunne... | 32.361386 | 88 | 0.636072 |
21af66414ddda133f0c4cf798839e59dea3ce0fd | 1,820 | py | Python | tools/azure-devtools/src/azure_devtools/perfstress_tests/_async_random_stream.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | tools/azure-devtools/src/azure_devtools/perfstress_tests/_async_random_stream.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | tools/azure-devtools/src/azure_devtools/perfstress_tests/_async_random_stream.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 31.37931 | 94 | 0.559341 |
21af6a9f08583bbf5253d149dee309feafc38a3b | 2,881 | py | Python | code/hexTile.py | nazaruka/Catan-AI | d7c91c7011ac82ad41d3b80a29c73c23ab7b579e | [
"MIT"
] | 14 | 2020-07-10T16:07:17.000Z | 2022-03-12T15:54:51.000Z | code/hexTile.py | kvombatkere/CatanAI | 007a638d90fb63c7b8a9c7d57f67a208efbfdd01 | [
"MIT"
] | 3 | 2021-08-25T15:04:14.000Z | 2022-02-10T02:53:00.000Z | code/hexTile.py | kvombatkere/CatanAI | 007a638d90fb63c7b8a9c7d57f67a208efbfdd01 | [
"MIT"
] | 2 | 2021-03-16T20:55:11.000Z | 2021-06-24T10:44:54.000Z | #Karan Vombatkere
#Settlers of Catan, 2020
#Imports
import collections
from hexLib import *
##Class to implement Catan board Hexagonal Tile
Resource = collections.namedtuple("Resource", ["type", "num"])
class hexTile():
'Class Definition for Catan Board Hexagonal Tile'
#Object Creation - specify the resourc... | 36.0125 | 150 | 0.672683 |
21afd45bdd6b9024af936733a1d589b880a96bdf | 2,781 | py | Python | codes/3 title match/title_match_749/datamanage_rapidtrailer.py | QiyuanMa/trailer_research | 5276e0f422aeb9ef6bccb4ffd348a600dacc2f75 | [
"MIT"
] | null | null | null | codes/3 title match/title_match_749/datamanage_rapidtrailer.py | QiyuanMa/trailer_research | 5276e0f422aeb9ef6bccb4ffd348a600dacc2f75 | [
"MIT"
] | null | null | null | codes/3 title match/title_match_749/datamanage_rapidtrailer.py | QiyuanMa/trailer_research | 5276e0f422aeb9ef6bccb4ffd348a600dacc2f75 | [
"MIT"
] | 1 | 2020-12-14T04:56:43.000Z | 2020-12-14T04:56:43.000Z | # Mysql Database,PORT:3306,Assure the client is activated
# install pymysql:pip install pymysql(or File->Setting->Project Interpreter->add...)
import pymysql
import threading
from settings import MYSQL_HOST ,MYSQL_DB ,MYSQL_PWD ,MYSQL_USER
class DataManager():
# The singleton mode ensures that an object is ca... | 45.590164 | 116 | 0.626753 |
21afe652504723448d846b37c53d6954c5ebfd32 | 5,388 | py | Python | docs/source/_static/zzz_GENERATED_NOTEBOOK_SOURCE/tertiary/binaryglowgr.py | heuermh/glow | 4a414c62a28fddce6f4428ecdb746a2a58251fc1 | [
"Apache-2.0"
] | null | null | null | docs/source/_static/zzz_GENERATED_NOTEBOOK_SOURCE/tertiary/binaryglowgr.py | heuermh/glow | 4a414c62a28fddce6f4428ecdb746a2a58251fc1 | [
"Apache-2.0"
] | null | null | null | docs/source/_static/zzz_GENERATED_NOTEBOOK_SOURCE/tertiary/binaryglowgr.py | heuermh/glow | 4a414c62a28fddce6f4428ecdb746a2a58251fc1 | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
# MAGIC %md
# MAGIC ##<img src="https://databricks.com/wp-content/themes/databricks/assets/images/databricks-logo.png" alt="logo" width="240"/> + <img src="https://www.regeneron.com/sites/all/themes/regeneron_corporate/images/science/logo-rgc-color.png" alt="logo" width="240"/>
# MAGIC
# M... | 31.881657 | 266 | 0.704343 |
21aff49b557043d6fe7627ab32de055cde9bad39 | 18,076 | py | Python | benchmarking/cnn3d/train_pdbbind.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | benchmarking/cnn3d/train_pdbbind.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | benchmarking/cnn3d/train_pdbbind.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | from __future__ import division, print_function, absolute_import
import argparse
import functools
import json
import logging
import math
import os
import random
import numpy as np
import pandas as pd
import tensorflow as tf
import tqdm
try:
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
except:
... | 37.8159 | 106 | 0.625083 |
21b0383275b16e62ab22120cfb2fe4001d613d80 | 12,626 | py | Python | dpa/ptask/action/version.py | Clemson-DPA/dpa-pipe | 2482b8a0fd96dc19c0be4e82c3eaf0508914a968 | [
"MIT"
] | 55 | 2015-07-15T02:33:55.000Z | 2020-12-28T08:02:54.000Z | dpa/ptask/action/version.py | Clemson-DPA/dpa-pipe | 2482b8a0fd96dc19c0be4e82c3eaf0508914a968 | [
"MIT"
] | 5 | 2015-07-11T03:21:10.000Z | 2016-12-27T12:20:07.000Z | dpa/ptask/action/version.py | Clemson-DPA/dpa-pipe | 2482b8a0fd96dc19c0be4e82c3eaf0508914a968 | [
"MIT"
] | 12 | 2015-07-08T04:48:39.000Z | 2020-06-27T11:35:58.000Z | # -----------------------------------------------------------------------------
# Imports:
# -----------------------------------------------------------------------------
from dpa.action import Action, ActionError, ActionAborted
from dpa.action.registry import ActionRegistry
from dpa.location import current_location_... | 34.975069 | 85 | 0.475447 |
21b05dfd667b986eaa1914e8afac1c47f6849458 | 23,304 | py | Python | trajectory_analysis/trajectory_experiments.py | xinyiwu98/SCoNe_GCN | 1bcdf7ad3e72ccd9a91c45aadf15856682b896bc | [
"MIT"
] | null | null | null | trajectory_analysis/trajectory_experiments.py | xinyiwu98/SCoNe_GCN | 1bcdf7ad3e72ccd9a91c45aadf15856682b896bc | [
"MIT"
] | null | null | null | trajectory_analysis/trajectory_experiments.py | xinyiwu98/SCoNe_GCN | 1bcdf7ad3e72ccd9a91c45aadf15856682b896bc | [
"MIT"
] | null | null | null | """
Author: Nicholas Glaze, Rice ECE (nkg2 at rice.edu)
This is where you actually train models. See below for docs:
Generate a synthetic graph, with holes in upper left and lower right regions, + paths over the graph:
python3 synthetic_data_gen.py
-Edit main of synthetic_data_gen.py to change graph size / # ... | 44.729367 | 222 | 0.627918 |
21b06c0ddc55e2fce130422cc69d14605b3c11fe | 3,487 | py | Python | lib/python3.8/site-packages/botocore/__init__.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 2 | 2020-09-30T00:11:09.000Z | 2021-10-04T13:00:38.000Z | venv/lib/python3.6/site-packages/botocore/__init__.py | databill86/HyperFoods | 9267937c8c70fd84017c0f153c241d2686a356dd | [
"MIT"
] | 7 | 2020-06-06T01:06:19.000Z | 2022-02-10T11:15:14.000Z | venv/lib/python3.6/site-packages/botocore/__init__.py | databill86/HyperFoods | 9267937c8c70fd84017c0f153c241d2686a356dd | [
"MIT"
] | 1 | 2020-11-04T03:21:24.000Z | 2020-11-04T03:21:24.000Z | # Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/
# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http... | 37.494624 | 78 | 0.704044 |
21b08260ea14a5870e02ea4ece632e6d0541cd5e | 36,664 | py | Python | lite-hrnet/src/model.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | lite-hrnet/src/model.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | lite-hrnet/src/model.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2022 Huawei Technologies Co., Ltd
#
# 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... | 36.015717 | 110 | 0.498282 |
21b08320697dc77dcea8e3fccd5530052b922fcd | 37,061 | py | Python | froide/foirequest/models/request.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | froide/foirequest/models/request.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | 3 | 2020-02-11T21:43:56.000Z | 2021-11-15T17:47:06.000Z | froide/foirequest/models/request.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from datetime import timedelta
import json
import re
from django.utils.six import string_types, text_type as str
from django.db import models
from django.db.models import Q, When, Case, Value
from django.conf import settings
from django.utils.translation import ugettext_lazy as... | 37.473205 | 111 | 0.612747 |
21b0930ac548b3f0379d464fc7e5962903dbdf9e | 1,864 | py | Python | accidentUtils/core_optical_flow_farneback.py | MohamedSebaie/Car_Crash_Detection_From_Surveillance_Cameras-PyTorch | b10b3ed26968f998fd100056fce45cbc99079cda | [
"MIT"
] | null | null | null | accidentUtils/core_optical_flow_farneback.py | MohamedSebaie/Car_Crash_Detection_From_Surveillance_Cameras-PyTorch | b10b3ed26968f998fd100056fce45cbc99079cda | [
"MIT"
] | null | null | null | accidentUtils/core_optical_flow_farneback.py | MohamedSebaie/Car_Crash_Detection_From_Surveillance_Cameras-PyTorch | b10b3ed26968f998fd100056fce45cbc99079cda | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from numpy import pi as PI
Y_CROP = 45
X_CROP = 15
TRAIN_SIZE = 15000
TEST_SIZE = 4000
number_of_feature_points = 150
number_of_neighbors = 8
FRAME_SIZE = 100
TOTAL_NUMBER_OF_VIDEOS = 246
#preprocess and prepare each video frame
def process_frame(frame):
if frame is None:
re... | 30.064516 | 96 | 0.675966 |
21b0bc677251a301307d6c8d465b4277715079fa | 1,282 | py | Python | articlee/__init__.py | danielemingolla/BLOG_WEBAPP_FLASK | 19eaad5a674ac255723e0118f5d80eefd5cb08b8 | [
"MIT"
] | 1 | 2019-09-10T14:11:40.000Z | 2019-09-10T14:11:40.000Z | articlee/__init__.py | danielemingolla/BLOG_WEBAPP_FLASK | 19eaad5a674ac255723e0118f5d80eefd5cb08b8 | [
"MIT"
] | 7 | 2019-09-11T21:17:01.000Z | 2022-01-13T01:38:40.000Z | articlee/__init__.py | danielemingolla/ARTICLEES_WEBAPP_FLASK | 19eaad5a674ac255723e0118f5d80eefd5cb08b8 | [
"MIT"
] | null | null | null | import os
from flask import Flask, request
from .config import Config
from flask_mail import Mail
from flask_babel import Babel
from flask_script import Manager
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate, MigrateCommand
db = SQLAlchemy()
mail = Mail()
migrate = Migrate()
babel = Babel()
... | 27.869565 | 75 | 0.773011 |
21b0c674c3b93672357ff656a76a0894d8ad9a8d | 2,591 | py | Python | client/libs/logdog/tests/bootstrap_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools/swarming_client/libs/logdog/tests/bootstrap_test.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools/swarming_client/libs/logdog/tests/bootstrap_test.py | cangulcan/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright 2016 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
import os
import sys
import unittest
ROOT_DIR = os.path.dirname(os.path.abspath(os.path.join(
__file__.decode(sys.getfi... | 33.217949 | 79 | 0.73215 |
21b0dc4af4b7aee9a744d966c4e6c72e2a042ec9 | 26,501 | py | Python | modisco/hit_scoring/exemplar_based_hitscoring.py | Bluedragon137/tfmodisco | d7c56b21e1bb58b07695ef3035f173b7d1a039e6 | [
"MIT"
] | null | null | null | modisco/hit_scoring/exemplar_based_hitscoring.py | Bluedragon137/tfmodisco | d7c56b21e1bb58b07695ef3035f173b7d1a039e6 | [
"MIT"
] | null | null | null | modisco/hit_scoring/exemplar_based_hitscoring.py | Bluedragon137/tfmodisco | d7c56b21e1bb58b07695ef3035f173b7d1a039e6 | [
"MIT"
] | null | null | null | from __future__ import division, print_function
from collections import defaultdict, OrderedDict, namedtuple
import numpy as np
import time
from sklearn.metrics import average_precision_score, precision_recall_curve
from sklearn.isotonic import IsotonicRegression
from .. import affinitymat
from .. import aggregator
fro... | 44.916949 | 99 | 0.667182 |
21b0dcab13b2c141ce5affbac56b7f1484b445fc | 319 | py | Python | test_user.py | victorlomi/Password-Locker | 2bba04e3afa3e70304db8fcdb27557d87bf5a50b | [
"Unlicense"
] | null | null | null | test_user.py | victorlomi/Password-Locker | 2bba04e3afa3e70304db8fcdb27557d87bf5a50b | [
"Unlicense"
] | null | null | null | test_user.py | victorlomi/Password-Locker | 2bba04e3afa3e70304db8fcdb27557d87bf5a50b | [
"Unlicense"
] | null | null | null | import unittest
from user import User
class TestUser(unittest.TestCase):
"""Tests for class User."""
def test_get_account_name(self):
"""Test that user can use index to get the key of account."""
user = User()
self.assertEqual(user.get_account_name(0), "twitter")
unittest.main() | 24.538462 | 69 | 0.664577 |
21b0e97191db2f8f576deb6a26268331b724313b | 1,726 | py | Python | php_fpm/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | php_fpm/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | php_fpm/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import json
import os
import pytest
from datadog_checks.dev import docker_run, get_docker_hostname
from datadog_checks.php_fpm import PHPFPMCheck
HOST = get_docker_hostname()
HERE = os.path.dirname(os.path.abs... | 21.848101 | 62 | 0.616454 |
21b0f8cf49bb6ca4092fbdd6694a1e2d6486dfb5 | 1,490 | py | Python | examples/pllr_interval.py | bruneli/statspy | 7bf07cdd25f7d5118f39fd5465853f4da9116c80 | [
"BSD-3-Clause"
] | 2 | 2015-03-07T08:34:28.000Z | 2016-07-04T18:15:28.000Z | examples/pllr_interval.py | bruneli/statspy | 7bf07cdd25f7d5118f39fd5465853f4da9116c80 | [
"BSD-3-Clause"
] | null | null | null | examples/pllr_interval.py | bruneli/statspy | 7bf07cdd25f7d5118f39fd5465853f4da9116c80 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""pllr_interval.py
This example shows how to estimate a confidence interval using an
approximate profile log-likelihood ratio technique.
.. note:: results with the 'BFGS' minimize method are currently very unstable.
"""
import copy
import math
import matplotlib.pyplot as plt
import numpy as n... | 28.653846 | 78 | 0.68255 |
21b15f06f1e6ea9e5269d97a9d8902277bc48a58 | 17,797 | py | Python | clicktime.py | spectriclabs/clicktimepy | 6ec3ab1b20f643bd5d34c5180b6860ec96f41698 | [
"MIT"
] | null | null | null | clicktime.py | spectriclabs/clicktimepy | 6ec3ab1b20f643bd5d34c5180b6860ec96f41698 | [
"MIT"
] | null | null | null | clicktime.py | spectriclabs/clicktimepy | 6ec3ab1b20f643bd5d34c5180b6860ec96f41698 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# A simple library to interfaces with the ClickTime API as documented
# at http://app.clicktime.com/api/1.3/help
#
# Copyright 2012 Michael Ihde
#
# 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... | 27.807813 | 88 | 0.532899 |
21b176c93a8a15295cdb69a259ec2fbf69dc7966 | 3,652 | py | Python | cloudmesh/shell/cm_security_group.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | cloudmesh/shell/cm_security_group.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | 4 | 2021-06-08T20:20:08.000Z | 2022-03-11T23:30:22.000Z | cloudmesh/shell/cm_security_group.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from docopt import docopt
from cloudmesh.cm_mongo import cm_mongo
from cloudmesh.config.cm_config import cm_config
from cloudmesh_base.logger import LOGGER
from tabulate import tabulate
log = LOGGER(__file__)
def shell_command_security_group(arguments):
... | 28.755906 | 113 | 0.582147 |
21b1edc1a1d05b9ed7a913b6c7f21440a9f6f90b | 3,186 | py | Python | nanonisTCP/MotorTest.py | New-Horizons-SPM/nanonisTCP | e810877fce41c4dc3d9ba2b18cbe619ff04c640a | [
"MIT"
] | null | null | null | nanonisTCP/MotorTest.py | New-Horizons-SPM/nanonisTCP | e810877fce41c4dc3d9ba2b18cbe619ff04c640a | [
"MIT"
] | null | null | null | nanonisTCP/MotorTest.py | New-Horizons-SPM/nanonisTCP | e810877fce41c4dc3d9ba2b18cbe619ff04c640a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue May 3 19:34:49 2022
@author: Julian Ceddia
"""
"""
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!WARNING: RUNNING run_test() WILL CHANGE SETTINGS IN NANONIS. RUN IT ON A SIM!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... | 35.4 | 117 | 0.40521 |
21b1ef960730214af79c2ee27a78a14fbb9d1885 | 3,713 | bzl | Python | metropolis/node/build/efi.bzl | monogon-dev/monogon | 950c26d52a08499ebf45ee2b4b0e46d3bea66dee | [
"Apache-2.0"
] | 31 | 2021-04-04T07:09:41.000Z | 2022-02-14T10:37:35.000Z | metropolis/node/build/efi.bzl | monogon-dev/monogon | 950c26d52a08499ebf45ee2b4b0e46d3bea66dee | [
"Apache-2.0"
] | 116 | 2021-07-05T10:55:20.000Z | 2022-03-29T12:59:30.000Z | metropolis/node/build/efi.bzl | monogon-dev/monogon | 950c26d52a08499ebf45ee2b4b0e46d3bea66dee | [
"Apache-2.0"
] | 2 | 2021-04-13T16:57:06.000Z | 2021-12-17T01:35:18.000Z | """Rules for generating EFI unified kernel images. These are EFI-bootable PE/COFF files containing a stub loader,
a kernel, and optional commandline and initramfs in one file.
See https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images for more information.
"""
load("//build/toolchain/llvm-efi:t... | 38.677083 | 115 | 0.599785 |
21b2055df451d2f5a626cca16e7f0c6102a44958 | 21,123 | py | Python | src/run.py | tanayz/TC-Bot-py3 | 048aca2fe58ced780baa0b24390cb44ce5ef6850 | [
"MIT"
] | null | null | null | src/run.py | tanayz/TC-Bot-py3 | 048aca2fe58ced780baa0b24390cb44ce5ef6850 | [
"MIT"
] | null | null | null | src/run.py | tanayz/TC-Bot-py3 | 048aca2fe58ced780baa0b24390cb44ce5ef6850 | [
"MIT"
] | null | null | null | # """
# Created on May 22, 2016
#
# This should be a simple minimalist run file. It's only responsibility should be to parse the arguments (which agent, user simulator to use) and launch a dialog simulation.
#
# Rule-agent: python run.py --agt 6 --usr 1 --max_turn 40 --episodes 150 --movie_kb_path .\deep_dialog\data\mo... | 50.412888 | 500 | 0.6536 |
21b277b9d00aefaba9036671d8f218eea2905905 | 18,761 | py | Python | autokeras/tasks/structured_data.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | 3,979 | 2019-04-02T02:01:52.000Z | 2022-03-31T16:53:14.000Z | autokeras/tasks/structured_data.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | 939 | 2019-04-02T18:13:53.000Z | 2022-03-31T16:25:08.000Z | autokeras/tasks/structured_data.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | 826 | 2019-04-02T00:53:31.000Z | 2022-03-31T10:11:02.000Z | # Copyright 2020 The AutoKeras Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 45.536408 | 97 | 0.626512 |
21b2aa750c4d699938073ebdfadbeb89ea7c1591 | 7,448 | py | Python | clients/client/python/ory_client/model/settings_profile_form_config.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/settings_profile_form_config.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/settings_profile_form_config.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.17
Contact: support@ory.sh
Generated by: htt... | 39.407407 | 194 | 0.584586 |
21b2b134eb876a2908c4696de72ff6c0e1d441eb | 4,694 | py | Python | wsgi/scripts/subinfo_aggrgate.py | AlexeyProskuryakov/rr | dcf598405159a48826f4214fa33abcf57418b680 | [
"MIT"
] | null | null | null | wsgi/scripts/subinfo_aggrgate.py | AlexeyProskuryakov/rr | dcf598405159a48826f4214fa33abcf57418b680 | [
"MIT"
] | null | null | null | wsgi/scripts/subinfo_aggrgate.py | AlexeyProskuryakov/rr | dcf598405159a48826f4214fa33abcf57418b680 | [
"MIT"
] | null | null | null | import logging
from Queue import Empty
from multiprocessing import Process, Event
from multiprocessing import Queue as mQ
from threading import Thread
from Queue import Queue as Q
from time import sleep
import praw
from wsgi.engine import get_reposts_count
from wsgi.scripts import GET_USER_AGENT_R
from wsgi.scripts.... | 28.448485 | 112 | 0.626545 |
21b2cbe5b8de546bb64cb86b0ec5740c6ae84d7d | 1,079 | py | Python | networking/ip_convert.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | 1 | 2020-07-21T23:24:25.000Z | 2020-07-21T23:24:25.000Z | networking/ip_convert.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | 4 | 2021-06-29T00:38:57.000Z | 2022-01-15T00:22:15.000Z | networking/ip_convert.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | null | null | null |
"""
Summary: Convert IPv4 address to decimal value.
Date created: 2020-09-12
Contributor(s):
Mark Moretto
Ref:
https://mkyong.com/java/java-convert-ip-address-to-decimal-number/
"""
def ipv4_to_dec(ip_address: str):
"""Convert IP to decimal value."""
BASE: int = 256
tokens = list(map(... | 27.666667 | 89 | 0.60797 |
21b336605eb53f1c988478fbaa78993c54bfdcd9 | 17,153 | py | Python | layers/exporters/to_svg.py | Lostar303/attack-scripts | 3ef0ffd9900a8e1321c1b2d7b7c1c6cd3198e11e | [
"Apache-2.0"
] | 1 | 2020-10-12T21:21:55.000Z | 2020-10-12T21:21:55.000Z | layers/exporters/to_svg.py | Lostar303/attack-scripts | 3ef0ffd9900a8e1321c1b2d7b7c1c6cd3198e11e | [
"Apache-2.0"
] | null | null | null | layers/exporters/to_svg.py | Lostar303/attack-scripts | 3ef0ffd9900a8e1321c1b2d7b7c1c6cd3198e11e | [
"Apache-2.0"
] | null | null | null | import json
try:
from core import Layer
from exporters.svg_templates import SvgTemplates
except ModuleNotFoundError:
from ..core import Layer
from ..exporters.svg_templates import SvgTemplates
class NoLayer(Exception):
pass
class SVGConfig:
d_width=8.5
d_height=11
d_headerHeight=1
... | 38.202673 | 119 | 0.601178 |
21b34fc6a1a33756e2d050a01636ae1be44a7c48 | 6,063 | py | Python | src/graph_transpiler/webdnn/graph/operators/attributes/associative.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | src/graph_transpiler/webdnn/graph/operators/attributes/associative.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/graph/operators/attributes/associative.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | from typing import Tuple
from webdnn.graph.attribute import Attribute
from webdnn.graph.operator import Operator
from webdnn.graph.variable import Variable
class Associative(Attribute):
"""Associative(op, var_keys)
Associative property
The operator with this attribute satisfies follow conditions.
... | 31.092308 | 128 | 0.371433 |
21b38f2d34abe2ada0e8e6e345d1a31c473361ad | 2,289 | py | Python | FormalSystems/MUpuzzle.py | andrewherren/GEB | 866c172b554873ff3a226348f5a5b4a2998acc38 | [
"MIT"
] | 1 | 2019-02-18T00:35:54.000Z | 2019-02-18T00:35:54.000Z | FormalSystems/MUpuzzle.py | andrewherren/GEB | 866c172b554873ff3a226348f5a5b4a2998acc38 | [
"MIT"
] | null | null | null | FormalSystems/MUpuzzle.py | andrewherren/GEB | 866c172b554873ff3a226348f5a5b4a2998acc38 | [
"MIT"
] | null | null | null | """Chapter 1: The MU Puzzle"""
class MUpuzzle(object):
"""Creates an string bound by the rules of the MU logic system
MU system based on formal system laid out by Emil Post
https://en.wikipedia.org/wiki/Post_canonical_system
"""
inputstring = ''
def __init__(self, inputstring: str):
... | 28.6125 | 77 | 0.604631 |
21b3987bb88ee44c1e8e78d7ef6f8f053a68ae08 | 1,960 | py | Python | skgstat/plotting/variogram_dd_plot.py | rhugonnet/scikit-gstat | a142ca13aa3b048c46613d1247396c80c32a8145 | [
"MIT"
] | 141 | 2017-10-13T10:25:19.000Z | 2022-03-31T00:41:32.000Z | skgstat/plotting/variogram_dd_plot.py | rhugonnet/scikit-gstat | a142ca13aa3b048c46613d1247396c80c32a8145 | [
"MIT"
] | 109 | 2017-09-23T12:42:44.000Z | 2022-03-28T06:53:44.000Z | skgstat/plotting/variogram_dd_plot.py | rhugonnet/scikit-gstat | a142ca13aa3b048c46613d1247396c80c32a8145 | [
"MIT"
] | 42 | 2017-11-28T18:44:22.000Z | 2022-03-24T02:27:44.000Z | import numpy as np
import matplotlib.pyplot as plt
try:
import plotly.graph_objects as go
except ImportError:
pass
def __calculate_plot_data(variogram):
# get all distances
_dist = variogram.distance
# get all differences
if variogram._diff is None:
variogram._calc_diff()
_diff =... | 22.790698 | 75 | 0.621429 |
21b3b1dee53995aa164151b2ee62dc6e96f9eaa2 | 2,834 | py | Python | bricks/ev3dev/modules/pybricks/experimental.py | ZPhilo/pybricks-micropython | bf3072b6f7dd87b60e50d7c2130ca3c393a5709f | [
"MIT"
] | 115 | 2020-06-15T16:43:14.000Z | 2022-03-21T21:11:57.000Z | bricks/ev3dev/modules/pybricks/experimental.py | ZPhilo/pybricks-micropython | bf3072b6f7dd87b60e50d7c2130ca3c393a5709f | [
"MIT"
] | 83 | 2020-06-17T17:19:29.000Z | 2022-03-08T18:50:35.000Z | bricks/ev3dev/modules/pybricks/experimental.py | BertLindeman/pybricks-micropython | 8f22a99551100e66ddf08d014d9f442f22b33b4d | [
"MIT"
] | 40 | 2020-06-15T18:36:39.000Z | 2022-03-28T13:22:43.000Z | """The experimental module contains unstable APIs for development and testing.
"""
from _pybricks.experimental import pthread_raise
from _thread import start_new_thread, get_ident, allocate_lock
from usignal import pthread_kill, SIGUSR2
# FIXME: Make generic fix for running init of module from builtin package
from _p... | 30.148936 | 86 | 0.621383 |
21b3d90f64d7b2c16d312df4d4ee6a745a32fc3b | 4,208 | py | Python | planetmint/backend/connection.py | liviu-lesan/planetmint | 54cf8e45108947aa8282ddaaf127d08e06ce842e | [
"Apache-2.0"
] | null | null | null | planetmint/backend/connection.py | liviu-lesan/planetmint | 54cf8e45108947aa8282ddaaf127d08e06ce842e | [
"Apache-2.0"
] | null | null | null | planetmint/backend/connection.py | liviu-lesan/planetmint | 54cf8e45108947aa8282ddaaf127d08e06ce842e | [
"Apache-2.0"
] | null | null | null | # Copyright © 2020 Interplanetary Database Association e.V.,
# Planetmint and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
import logging
from importlib import import_module
from planetmint.config import Config
from planetmint.common.exce... | 55.368421 | 135 | 0.621911 |
21b3f6ea782a6e2f021424e14392f9ef728e46e0 | 18,318 | py | Python | readthedocs/core/views.py | yrchen/readthedocs.org | b3580e3f3f08ce79734ffbfd26b04a35689a2f64 | [
"MIT"
] | 1 | 2019-08-02T19:56:43.000Z | 2019-08-02T19:56:43.000Z | readthedocs/core/views.py | yrchen/readthedocs.org | b3580e3f3f08ce79734ffbfd26b04a35689a2f64 | [
"MIT"
] | null | null | null | readthedocs/core/views.py | yrchen/readthedocs.org | b3580e3f3f08ce79734ffbfd26b04a35689a2f64 | [
"MIT"
] | null | null | null | """Core views, including the main homepage, post-commit build hook,
documentation and header rendering, and server errors.
"""
from django.core.urlresolvers import NoReverseMatch, reverse
from django.conf import settings
from django.contrib.auth.models import User
from django.http import (HttpResponse, HttpResponseRe... | 38.483193 | 101 | 0.593515 |
21b3f6f4444a915be1e9761db7014ee5228175e0 | 3,791 | py | Python | openpharmacophore/_private_tools/input_arguments.py | uibcdf/openpharmacophore | 4f563fa206f6e7c081502acab97bb795d27bdeb9 | [
"MIT"
] | 14 | 2021-11-12T10:09:25.000Z | 2022-03-18T08:24:16.000Z | openpharmacophore/_private_tools/input_arguments.py | uibcdf/openpharmacophore | 4f563fa206f6e7c081502acab97bb795d27bdeb9 | [
"MIT"
] | 7 | 2021-11-05T01:37:57.000Z | 2022-01-18T06:03:39.000Z | openpharmacophore/_private_tools/input_arguments.py | uibcdf/openpharmacophore | 4f563fa206f6e7c081502acab97bb795d27bdeb9 | [
"MIT"
] | 3 | 2021-11-05T01:22:47.000Z | 2021-12-12T03:57:09.000Z | from openpharmacophore._private_tools.exceptions import (
BadShapeError, QuantityDataTypeError, WrongDimensionalityError,
IsNotQuantityError, NotArrayLikeError)
import numpy as np
import pint
import pyunitwizard as puw
def validate_input_quantity(quantity, dimensionality, name,
d... | 36.104762 | 111 | 0.613822 |
21b40a409b75f51abfbb91a6c40d79f08c372d66 | 5,709 | py | Python | docs/conf.py | SylvanBrocard/dpu_trees | 688f56a89a09469bf84698ed76ea62a5344b2827 | [
"MIT"
] | 1 | 2021-11-10T15:14:07.000Z | 2021-11-10T15:14:07.000Z | docs/conf.py | SylvanBrocard/dpu_trees | 688f56a89a09469bf84698ed76ea62a5344b2827 | [
"MIT"
] | 2 | 2021-11-10T14:21:39.000Z | 2021-12-15T10:24:24.000Z | docs/conf.py | SylvanBrocard/dpu_trees | 688f56a89a09469bf84698ed76ea62a5344b2827 | [
"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 ------------------------------------------------------------... | 29.734375 | 79 | 0.644421 |
21b4200353c39b84b0320a21d4af7f750eb60eeb | 66,420 | py | Python | pydent/planner/planner.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 5 | 2019-01-21T11:12:05.000Z | 2020-03-05T20:52:14.000Z | pydent/planner/planner.py | aquariumbio/pydent | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 28 | 2020-11-18T02:07:09.000Z | 2021-06-08T15:49:41.000Z | pydent/planner/planner.py | aquariumbio/trident | d1712cae544103fb145e3171894e4b35141f6813 | [
"MIT"
] | 2 | 2021-02-27T19:23:45.000Z | 2021-09-14T10:29:07.000Z | """Planner."""
import itertools
import random
import webbrowser
from collections import defaultdict
from copy import deepcopy
from functools import wraps
from typing import Any
from typing import Callable
from typing import Dict
from typing import Iterable
from typing import List
from typing import Tuple
from typing im... | 37.293655 | 121 | 0.575173 |
21b43ad10a1d70705008b14991f11f800663d43d | 563 | py | Python | jaffle/tests/unit/conftest.py | albert118/jaffle | 55da4d75ad3a9ca633af3865cc35b73e3406a4ef | [
"BSD-3-Clause"
] | 5 | 2018-06-13T14:10:43.000Z | 2020-04-26T20:48:59.000Z | jaffle/tests/unit/conftest.py | albert118/jaffle | 55da4d75ad3a9ca633af3865cc35b73e3406a4ef | [
"BSD-3-Clause"
] | 1 | 2018-05-02T02:31:24.000Z | 2018-05-02T02:31:24.000Z | jaffle/tests/unit/conftest.py | albert118/jaffle | 55da4d75ad3a9ca633af3865cc35b73e3406a4ef | [
"BSD-3-Clause"
] | 2 | 2021-05-17T16:27:16.000Z | 2022-02-09T09:06:12.000Z | # -*- coding: utf-8 -*-
from unittest.mock import Mock
import pytest
from tornado import gen
from tornado.iostream import StreamClosedError
@pytest.fixture(scope='function')
def subprocess_mock():
stdout = '''
aaa
bbb
ccc
'''.strip().split('\n')
lineno = 0
@gen.coroutine
def read_until(end):
... | 18.766667 | 51 | 0.634103 |
21b464e083f6df78da5ca3608c8293997bc13a2c | 1,726 | py | Python | presidio_evaluator/evaluation/evaluation_result.py | anniyanvr/presidio-research | 5619ea908786efa81a106f18a2bed29fd1521e61 | [
"MIT"
] | 55 | 2020-01-10T01:27:59.000Z | 2022-02-25T09:43:36.000Z | presidio_evaluator/evaluation/evaluation_result.py | anniyanvr/presidio-research | 5619ea908786efa81a106f18a2bed29fd1521e61 | [
"MIT"
] | 19 | 2020-02-28T20:17:43.000Z | 2021-12-22T19:18:12.000Z | presidio_evaluator/evaluation/evaluation_result.py | anniyanvr/presidio-research | 5619ea908786efa81a106f18a2bed29fd1521e61 | [
"MIT"
] | 30 | 2020-01-25T21:46:14.000Z | 2021-12-09T06:05:24.000Z | from collections import Counter
from typing import List, Optional
from presidio_evaluator.evaluation import ModelError
class EvaluationResult(object):
def __init__(
self,
results: Counter,
model_errors: Optional[List[ModelError]] = None,
text: str = None,
):
"""
... | 33.192308 | 81 | 0.636732 |
21b469ff3d37ec9dc8b59c14d7a570b9aca8430e | 32,125 | py | Python | sdk/servicebus/azure-servicebus/tests/test_partitioned_sessions.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/servicebus/azure-servicebus/tests/test_partitioned_sessions.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/servicebus/azure-servicebus/tests/test_partitioned_sessions.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import logg... | 40.307403 | 147 | 0.68744 |
21b47bd5c888e63c0fa2f09bf4d171c77b5a2ab9 | 4,644 | py | Python | django-edx-courseware/tasks.py | mjrulesamrat/django-edx-courseware | ec47a67e94b71ff95bb009fa95c47c76c21553da | [
"MIT"
] | null | null | null | django-edx-courseware/tasks.py | mjrulesamrat/django-edx-courseware | ec47a67e94b71ff95bb009fa95c47c76c21553da | [
"MIT"
] | null | null | null | django-edx-courseware/tasks.py | mjrulesamrat/django-edx-courseware | ec47a67e94b71ff95bb009fa95c47c76c21553da | [
"MIT"
] | null | null | null | __author__ = 'Jay Modi'
import logging
import json
from xmodule.modulestore.django import modulestore
# ORA imports
from openassessment.workflow.models import AssessmentWorkflow
from student.models import CourseAccessRole
from django.core.mail import EmailMessage
from openedx.core.djangoapps.content.course_overviews.... | 45.087379 | 117 | 0.526055 |
21b4adab8d0083c24b393a3efb8ff58691b9c6f8 | 7,968 | py | Python | cupcake2/ice2/preClusterProcess.py | smyang2018/cDNA_Cupcake | 5717e5f125070a5d79cd5eb43f2318cb5b6494fa | [
"BSD-3-Clause-Clear"
] | null | null | null | cupcake2/ice2/preClusterProcess.py | smyang2018/cDNA_Cupcake | 5717e5f125070a5d79cd5eb43f2318cb5b6494fa | [
"BSD-3-Clause-Clear"
] | null | null | null | cupcake2/ice2/preClusterProcess.py | smyang2018/cDNA_Cupcake | 5717e5f125070a5d79cd5eb43f2318cb5b6494fa | [
"BSD-3-Clause-Clear"
] | 1 | 2022-03-17T03:12:28.000Z | 2022-03-17T03:12:28.000Z | __author__ = 'etseng@pacb.com'
import os, sys, pdb, subprocess
from collections import defaultdict
from functools import partial
import networkx as nx
from Bio import SeqIO
from cupcake2.ice2.preCluster import preClusterSet2
def sanity_checking(pCS, orphans):
# do some sanity checking
# 1. all members shou... | 40.242424 | 134 | 0.589232 |
21b4f77340b65b14a443c0245a97cfbd1a979c17 | 202 | py | Python | src/pypdevs/accurate_time.py | MISTCARRYYOU/PythonPDEVS | 53cad29832b3c489ab037bdc487affcbf1e3f408 | [
"Apache-2.0"
] | 1 | 2018-09-19T14:42:28.000Z | 2018-09-19T14:42:28.000Z | src/pypdevs/accurate_time.py | MISTCARRYYOU/PythonPDEVS | 53cad29832b3c489ab037bdc487affcbf1e3f408 | [
"Apache-2.0"
] | null | null | null | src/pypdevs/accurate_time.py | MISTCARRYYOU/PythonPDEVS | 53cad29832b3c489ab037bdc487affcbf1e3f408 | [
"Apache-2.0"
] | 1 | 2021-01-14T12:21:35.000Z | 2021-01-14T12:21:35.000Z | import time as python_time
import sys
def time():
if sys.platform == "win32":
return python_time.clock()
else:
return python_time.time()
def sleep(t):
python_time.sleep(t)
| 16.833333 | 34 | 0.643564 |
21b5089dadaf4118688e4c504588506447206fd5 | 1,662 | py | Python | hubspot3/settings.py | kevin2357/hubspot3 | 488f6ff4195034317d99431439087443bca1469f | [
"MIT"
] | 1 | 2019-02-25T01:09:51.000Z | 2019-02-25T01:09:51.000Z | hubspot3/settings.py | kevin2357/hubspot3 | 488f6ff4195034317d99431439087443bca1469f | [
"MIT"
] | null | null | null | hubspot3/settings.py | kevin2357/hubspot3 | 488f6ff4195034317d99431439087443bca1469f | [
"MIT"
] | null | null | null | """
hubspot settings api
"""
from hubspot3.base import BaseClient
from hubspot3.error import HubspotError
SETTINGS_API_VERSION = "v1"
class SettingsClient(BaseClient):
"""
Basic Python client for the HubSpot Settings API.
Use this to read settings for a given API key, as well as update a setting.
... | 30.777778 | 80 | 0.62154 |
21b517bf74ae390028b80f8200e9f42e083d75eb | 1,539 | py | Python | client.py | iomintz/BogoHTTP | 347b97152b6bb2698ee4316f1b789fc74e89452e | [
"BlueOak-1.0.0"
] | 1 | 2019-11-25T05:14:07.000Z | 2019-11-25T05:14:07.000Z | client.py | iomintz/BogoHTTP | 347b97152b6bb2698ee4316f1b789fc74e89452e | [
"BlueOak-1.0.0"
] | null | null | null | client.py | iomintz/BogoHTTP | 347b97152b6bb2698ee4316f1b789fc74e89452e | [
"BlueOak-1.0.0"
] | null | null | null | #!/usr/bin/env python3
# SPDX-License-Identifier: BlueOak-1.0.0
import aiohttp
import headers
from formats import NBYTES, MAX_SIZE, unpack
BUFSIZE = 1024
async def amain():
import sys
url = sys.argv[1]
async with aiohttp.ClientSession(headers={'User-Agent': 'BogoHTTP'}) as sess, sess.get(url) as resp:
if resp... | 26.534483 | 101 | 0.719298 |
21b51bed9a64c969a1f98bd40f7b948a880e0976 | 8,497 | py | Python | python-package/test/geo_data/test_geocoder_in_geom.py | IKupriyanov-HORIS/lets-plot | fe960f43d39844d04a89bd12490cd2dd4dbeaa51 | [
"MIT"
] | null | null | null | python-package/test/geo_data/test_geocoder_in_geom.py | IKupriyanov-HORIS/lets-plot | fe960f43d39844d04a89bd12490cd2dd4dbeaa51 | [
"MIT"
] | null | null | null | python-package/test/geo_data/test_geocoder_in_geom.py | IKupriyanov-HORIS/lets-plot | fe960f43d39844d04a89bd12490cd2dd4dbeaa51 | [
"MIT"
] | null | null | null | # Copyright (c) 2020. JetBrains s.r.o.
# Use of this source code is governed by the MIT license that can be found in the LICENSE file.
import pandas
import pytest
from geopandas import GeoDataFrame
from pandas import DataFrame
from shapely.geometry import Point, Polygon, LinearRing, MultiPolygon
from lets_plot._kbri... | 34.40081 | 121 | 0.651995 |
21b52f3de263152549312fa6278adafc7d69a1a9 | 22,103 | py | Python | fastai/text/data.py | richlipkin/fastai | 4ba76892da5e0a6763a6d0b47395798fcbd0016b | [
"Apache-2.0"
] | 1 | 2022-03-20T17:00:21.000Z | 2022-03-20T17:00:21.000Z | fastai/text/data.py | richlipkin/fastai | 4ba76892da5e0a6763a6d0b47395798fcbd0016b | [
"Apache-2.0"
] | null | null | null | fastai/text/data.py | richlipkin/fastai | 4ba76892da5e0a6763a6d0b47395798fcbd0016b | [
"Apache-2.0"
] | null | null | null | "NLP data loading pipeline. Supports csv, folders, and preprocessed data."
from ..torch_core import *
from .transform import *
from ..basic_data import *
from ..data_block import *
from ..layers import *
from ..callback import Callback
__all__ = ['LanguageModelPreLoader', 'SortSampler', 'SortishSampler', 'TextList', '... | 57.41039 | 137 | 0.66267 |
21b5315a3604389a853c046eec62493d5ce80c8b | 4,237 | py | Python | docs/examples/use_cases/video_superres/tools/extract_frames.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | 11 | 2021-03-16T05:09:16.000Z | 2022-03-29T12:48:44.000Z | docs/examples/use_cases/video_superres/tools/extract_frames.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-08-27T09:25:16.000Z | 2019-08-27T09:25:16.000Z | docs/examples/use_cases/video_superres/tools/extract_frames.py | ancientmooner/DALI | 355e8db8130cee0d20e9ae3d698f195278544995 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2021-05-08T16:51:55.000Z | 2021-07-22T09:02:44.000Z | import argparse
import os
import subprocess
default_format = "png"
default_qscale_jpg = "4"
def extract_frames(master_data, resolution, format, q, quiet,
transcoded, codec, crf, keyint):
if transcoded:
desc = [resolution, 'scenes']
desc += [codec] if codec else []
desc ... | 37.495575 | 95 | 0.550153 |
21b55a2dd552e159c8f8f0973a18ed666a8e7fa5 | 4,943 | py | Python | plot_nij_distributions_from_hdf5.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | plot_nij_distributions_from_hdf5.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | plot_nij_distributions_from_hdf5.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | import sys, os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import h5py
import pandas as pd
import mokas_bestfit as bestfit
def adjust_ax(ax):
ax.get_yaxis().set_tick_params(which='both', direction='in')
ax.get_xaxis().set_tick_params(which='both', direction='in')
... | 35.818841 | 95 | 0.588914 |
21b55e6aa080c69d8e6bfd3c3a88632c327c1a03 | 17,847 | py | Python | update-1/DPS_Control.py | pedropedro/DPS5005-control | 7232a1e5f9e491d9fbeb20263d082596af66b1f6 | [
"MIT"
] | 4 | 2020-02-02T06:29:17.000Z | 2022-03-01T15:53:50.000Z | update-1/DPS_Control.py | pedropedro/DPS5005-control | 7232a1e5f9e491d9fbeb20263d082596af66b1f6 | [
"MIT"
] | null | null | null | update-1/DPS_Control.py | pedropedro/DPS5005-control | 7232a1e5f9e491d9fbeb20263d082596af66b1f6 | [
"MIT"
] | 2 | 2021-03-07T16:37:30.000Z | 2021-04-22T16:45:13.000Z | #!/usr/bin/env python3
#MIT License
#
#Copyright (c) 2019 TheHWcave
#
#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, ... | 28.64687 | 102 | 0.642349 |
21b5869e326fb5198b82d1eb2b10e547848bc197 | 771 | py | Python | blueprints/errorhandler.py | VMAJSTER/openstreamingplatform | f002246db922dab9a3f019f46001f3901326feaf | [
"MIT"
] | null | null | null | blueprints/errorhandler.py | VMAJSTER/openstreamingplatform | f002246db922dab9a3f019f46001f3901326feaf | [
"MIT"
] | null | null | null | blueprints/errorhandler.py | VMAJSTER/openstreamingplatform | f002246db922dab9a3f019f46001f3901326feaf | [
"MIT"
] | null | null | null | from flask import Blueprint, request, render_template
from classes import settings
from functions import themes
from functions import system
errorhandler_bp = Blueprint('errors', __name__)
@errorhandler_bp.app_errorhandler(404)
def page_not_found(e):
sysSettings = settings.settings.query.first()
system.newL... | 38.55 | 125 | 0.776913 |
21b5986437d5b90bec14eb07f6de10d7464335f5 | 5,498 | py | Python | tests/conftest_gkeep.py | bergercookie/taskwarrior_syncall | 0c34023375d0551048c973587d536342fb9d4e2d | [
"MIT"
] | 17 | 2021-12-16T06:17:34.000Z | 2022-03-30T21:14:07.000Z | tests/conftest_gkeep.py | bergercookie/taskwarrior_syncall | 0c34023375d0551048c973587d536342fb9d4e2d | [
"MIT"
] | 3 | 2021-12-14T23:36:01.000Z | 2022-03-30T21:18:38.000Z | tests/conftest_gkeep.py | bergercookie/taskwarrior_syncall | 0c34023375d0551048c973587d536342fb9d4e2d | [
"MIT"
] | 1 | 2022-02-14T14:29:13.000Z | 2022-02-14T14:29:13.000Z | import pytest
@pytest.fixture()
def gkeep_raw_item(request: pytest.FixtureRequest) -> dict:
"""Fixture to parametrize on."""
param = request.param # type: ignore
return request.getfixturevalue(param)
@pytest.fixture()
def gkeep_simple_done_item():
return {
"id": "17dfc18a2f3.8741b729cb5c495... | 31.965116 | 92 | 0.536013 |
21b59f55af0a3f803481e6985cd04922f195624b | 9,463 | py | Python | agents/rl/rl_agent.py | didi/MEEP | eb668fe598e40d244f204363d360babbe1fe0dc2 | [
"Apache-2.0"
] | 17 | 2020-09-09T02:32:14.000Z | 2021-10-01T09:46:40.000Z | agents/rl/rl_agent.py | didi/MEEP | eb668fe598e40d244f204363d360babbe1fe0dc2 | [
"Apache-2.0"
] | 2 | 2020-12-02T09:10:03.000Z | 2020-12-02T20:31:05.000Z | agents/rl/rl_agent.py | didi/MEEP | eb668fe598e40d244f204363d360babbe1fe0dc2 | [
"Apache-2.0"
] | 3 | 2020-10-10T09:14:43.000Z | 2022-01-18T02:36:31.000Z | ''' Generic RL Agent
# Example command:
1) Start policy server
(dest-dialog-py3_6) scotfang@la-nlp:~/gits/macroworld/agents/rl$ export CUDA_VISIBLE_DEVICES=1 && python policy_server.py
2) Start rl agent
(dest-dialog-py3_6) scotfang@la-nlp:~/gits/macroworld/gui/backend$ python main.py --agent_class_name agents.rl.rl_age... | 47.792929 | 212 | 0.627497 |
21b5cde9b931a95110c9a5fd7930a3a4ee74b207 | 8,068 | py | Python | tensorflow/contrib/kfac/python/ops/curvature_matrix_vector_products.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/contrib/kfac/python/ops/curvature_matrix_vector_products.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/kfac/python/ops/curvature_matrix_vector_products.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.847826 | 80 | 0.757313 |
21b5ed7793de918678bddeb652e8c9c31831707d | 5,128 | py | Python | exatrkx/src/tfgraphs/graph.py | sbconlon/exatrkx-iml2020 | 5101a3bae5a15e8e0557837a8d0b9fd9e122a026 | [
"Apache-2.0"
] | 6 | 2020-10-27T21:42:27.000Z | 2021-04-18T02:06:30.000Z | exatrkx/src/tfgraphs/graph.py | sbconlon/exatrkx-iml2020 | 5101a3bae5a15e8e0557837a8d0b9fd9e122a026 | [
"Apache-2.0"
] | null | null | null | exatrkx/src/tfgraphs/graph.py | sbconlon/exatrkx-iml2020 | 5101a3bae5a15e8e0557837a8d0b9fd9e122a026 | [
"Apache-2.0"
] | 6 | 2020-11-04T23:45:10.000Z | 2021-03-26T09:06:00.000Z | """
Make doublet GraphNtuple
"""
import time
import os
import itertools
import random
import numpy as np
import pandas as pd
import tensorflow as tf
from graph_nets import utils_tf
from graph_nets import graphs
graph_types = {
'n_node': tf.int32,
'n_edge': tf.int32,
'nodes': tf.float32,
'edges': tf.f... | 39.446154 | 105 | 0.656006 |
21b5fc80fb6ab4a05107bbadd82b21962e602155 | 11,764 | py | Python | utils/utils.py | CVLAB-Unibo/ATDT | 3ef50ae7682d7362525ec3eab845af3aa2a57fe7 | [
"MIT"
] | 16 | 2019-09-11T16:14:32.000Z | 2021-01-05T17:49:37.000Z | utils/utils.py | CVLAB-Unibo/ATDT | 3ef50ae7682d7362525ec3eab845af3aa2a57fe7 | [
"MIT"
] | 4 | 2020-01-28T22:16:59.000Z | 2021-08-25T14:49:39.000Z | utils/utils.py | CVLAB-Unibo/ATDT | 3ef50ae7682d7362525ec3eab845af3aa2a57fe7 | [
"MIT"
] | 1 | 2021-03-16T13:32:07.000Z | 2021-03-16T13:32:07.000Z | import numpy as np
import tensorflow as tf
import os
from collections import namedtuple
import cv2
import numpy
import matplotlib.pyplot as plt
Parameters = namedtuple('Parameters',[
'encoder',
'crop',
'crop_h',
'crop_w',
... | 55.753555 | 168 | 0.465488 |
21b652c3f1115c70bde1cfc1bc0f1a699c67938c | 2,402 | py | Python | tests/data/test_dataset_manager.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 50 | 2019-09-13T10:32:29.000Z | 2022-02-14T16:52:53.000Z | tests/data/test_dataset_manager.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 31 | 2019-09-03T11:06:03.000Z | 2021-08-20T14:57:09.000Z | tests/data/test_dataset_manager.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 9 | 2019-09-16T03:25:15.000Z | 2021-05-11T10:28:25.000Z | import pytest
from sciwing.datasets.classification.text_classification_dataset import (
TextClassificationDatasetManager,
)
from sciwing.utils.class_nursery import ClassNursery
@pytest.fixture(scope="session")
def clf_dataset_manager(tmpdir_factory, request):
train_file = tmpdir_factory.mktemp("train_data").j... | 36.953846 | 86 | 0.720233 |
21b6a6f53c8cda965e43852a468a8f57a2c30074 | 511 | py | Python | jaffle/tests/unit/test_kernel_manager.py | albert118/jaffle | 55da4d75ad3a9ca633af3865cc35b73e3406a4ef | [
"BSD-3-Clause"
] | 5 | 2018-06-13T14:10:43.000Z | 2020-04-26T20:48:59.000Z | jaffle/tests/unit/test_kernel_manager.py | albert118/jaffle | 55da4d75ad3a9ca633af3865cc35b73e3406a4ef | [
"BSD-3-Clause"
] | 1 | 2018-05-02T02:31:24.000Z | 2018-05-02T02:31:24.000Z | jaffle/tests/unit/test_kernel_manager.py | albert118/jaffle | 55da4d75ad3a9ca633af3865cc35b73e3406a4ef | [
"BSD-3-Clause"
] | 2 | 2021-05-17T16:27:16.000Z | 2022-02-09T09:06:12.000Z | # -*- coding: utf-8 -*-
from jupyter_client.client import KernelClient
from jaffle.kernel_client import JaffleKernelClient
from jaffle.kernel_manager import JaffleKernelManager
class Foo(KernelClient):
pass
def test_kernel_manager():
km = JaffleKernelManager()
km.is_ready is False
km.client_class ... | 22.217391 | 79 | 0.751468 |
21b6b925a52584ba6aa8a597829520346e920078 | 1,381 | py | Python | master/nimmt6-master/nimmt6-master/runner.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/nimmt6-master/nimmt6-master/runner.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/nimmt6-master/nimmt6-master/runner.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | #!/usr/bin/python
""" Single-player game - Nimmt6 with two players and open cards """
import game, player, card
# 10.000 round / 5 seconds with Firstplayer
ROUNDS = 10000
def play():
""" Main function which defines set of games for comuter bots or single game vs human"""
bots = [ player.Firstplayer(), player.Rando... | 30.021739 | 105 | 0.695148 |
21b6d37bae85f41aa938b71e3bbab4d3a511162b | 2,643 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/sticker_set_covered.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/sticker_set_covered.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/sticker_set_covered.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.843373 | 103 | 0.620507 |
21b6ee1ce16d38859b1638f6c8e76da4edeeb449 | 3,041 | py | Python | jwplatform/errors.py | jwplayer/jwplayer-py | 2f478550414145e9d36b1cdf901dcf5360f8fe2b | [
"MIT"
] | 37 | 2016-09-14T20:34:42.000Z | 2022-02-15T06:47:21.000Z | jwplatform/errors.py | jwplayer/jwplayer-py | 2f478550414145e9d36b1cdf901dcf5360f8fe2b | [
"MIT"
] | 24 | 2016-11-16T21:36:13.000Z | 2022-02-18T14:37:35.000Z | jwplatform/errors.py | jwplayer/jwplayer-py | 2f478550414145e9d36b1cdf901dcf5360f8fe2b | [
"MIT"
] | 45 | 2016-10-13T08:41:35.000Z | 2022-03-06T02:31:23.000Z | # -*- coding: utf-8 -*-
from collections import defaultdict
from jwplatform.response import APIResponse
class APIError(APIResponse, Exception):
"""
Class returned when an error happens while JWPlatformClient is used to make an API request.
"""
def __init__(self, response):
super().__init__(re... | 26.675439 | 153 | 0.669517 |
21b6fc2c567319a36ec79e933d4d2b71f9716c6f | 4,052 | py | Python | alipay/aop/api/request/AlipayEbppInvoiceExpensecontrolQuotaModifyRequest.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/AlipayEbppInvoiceExpensecontrolQuotaModifyRequest.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/AlipayEbppInvoiceExpensecontrolQuotaModifyRequest.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.AlipayEbppInvoiceExpensecontrolQuotaModifyModel import AlipayEbppInvoiceExpensecontrolQuotaModifyModel
class AlipayEbppInvoiceExpens... | 27.944828 | 148 | 0.65153 |
21b71ec0cc8452ee623a64c37cd6986120df4d6e | 579 | py | Python | skynet/wallet/puzzles/p2_m_of_n_delegate_direct.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 7 | 2021-09-07T02:14:15.000Z | 2022-03-27T06:42:35.000Z | skynet/wallet/puzzles/p2_m_of_n_delegate_direct.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 1 | 2021-10-21T16:38:56.000Z | 2021-11-15T13:03:15.000Z | skynet/wallet/puzzles/p2_m_of_n_delegate_direct.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | 3 | 2021-10-21T07:17:40.000Z | 2022-03-16T12:57:09.000Z | """
Pay to m of n direct
This puzzle program is like p2_delegated_puzzle except instead of one public key,
it includes N public keys, any M of which needs to sign the delegated puzzle.
"""
from skynet.types.blockchain_format.program import Program
from .load_clvm import load_clvm
MOD = load_clvm("p2_m_of_n_delegate... | 27.571429 | 81 | 0.784111 |
21b7331a2a83f1e286a85a0214fdc8382ef37e23 | 2,334 | py | Python | main.py | lemariva/uPyIMU | 2bb434ff4a29cc1b926abd6cdcf6475dd2c375f2 | [
"Apache-2.0"
] | 7 | 2019-01-12T18:50:35.000Z | 2022-02-06T21:08:06.000Z | main.py | lemariva/uPyIMU | 2bb434ff4a29cc1b926abd6cdcf6475dd2c375f2 | [
"Apache-2.0"
] | null | null | null | main.py | lemariva/uPyIMU | 2bb434ff4a29cc1b926abd6cdcf6475dd2c375f2 | [
"Apache-2.0"
] | 1 | 2021-07-18T00:49:07.000Z | 2021-07-18T00:49:07.000Z | # coding=utf-8
'''
Copyright [2017] [Mauro Riva <lemariva@mail.com> <lemariva.com>]
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... | 31.972603 | 147 | 0.718081 |
21b76ce69b2fa577c65ea6421b3f21c0c2352b0b | 1,231 | py | Python | examples/assistant/voice_intents.py | luketimothyjones/pyretree | c649a9490319d73f580fbbd090d0a1f41a834f0b | [
"MIT"
] | null | null | null | examples/assistant/voice_intents.py | luketimothyjones/pyretree | c649a9490319d73f580fbbd090d0a1f41a834f0b | [
"MIT"
] | null | null | null | examples/assistant/voice_intents.py | luketimothyjones/pyretree | c649a9490319d73f580fbbd090d0a1f41a834f0b | [
"MIT"
] | null | null | null | import os
import sys
import pathlib
import subprocess
try:
from pyretree import pyretree
except ImportError:
# Gross way to import from the package structure
sys.path.append(str(pathlib.Path(__file__).parent.parent.parent.parent.absolute()))
from pyretree import pyretree
import phrases
intentions = p... | 24.137255 | 87 | 0.680747 |
21b7799e51e801f08c9c08edb4b0371210f89bce | 1,607 | py | Python | allocation/main/allocator.py | gabrielpereiram10/allocation | 24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14 | [
"MIT"
] | null | null | null | allocation/main/allocator.py | gabrielpereiram10/allocation | 24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14 | [
"MIT"
] | null | null | null | allocation/main/allocator.py | gabrielpereiram10/allocation | 24bc33ca4b3377ebb02f9c4d2f6a878aa46bac14 | [
"MIT"
] | null | null | null | import time
from typing import List
from allocation.protocols.types import Disciplines
from allocation.protocols.sat import SAT
class Allocator:
def __init__(self, disciplines: Disciplines, n_schedules: int):
self._disciplines = disciplines
self._n_schedules = n_schedules
def execute(self, s... | 31.509804 | 82 | 0.560672 |
21b790160120007d581579bc172b9eb3fa30a827 | 2,832 | py | Python | pytablereader/loadermanager/_file.py | sthagen/thombashi-pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 81 | 2017-03-18T02:57:29.000Z | 2022-03-26T16:54:59.000Z | pytablereader/loadermanager/_file.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 4 | 2017-08-09T14:58:48.000Z | 2020-04-17T12:59:29.000Z | pytablereader/loadermanager/_file.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 11 | 2017-05-02T16:23:59.000Z | 2021-12-10T15:05:39.000Z | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import warnings
import typepy
from ..factory import TableFileLoaderFactory
from ._base import TableLoaderManager
class TableFileLoader(TableLoaderManager):
"""
Loader class to loading tables from a file.
:param str file_path: Path... | 31.120879 | 99 | 0.599223 |
21b79e019f0d9b71e9eac5f1d8ac1ddeecc4dfaa | 1,333 | py | Python | compass/globals.py | YosefLab/Compass | f8ae5b5e0d85693ae27ee834c77ee732c49e04f8 | [
"BSD-3-Clause"
] | 38 | 2020-04-22T06:21:18.000Z | 2022-03-25T08:38:05.000Z | compass/globals.py | YosefLab/Compass | f8ae5b5e0d85693ae27ee834c77ee732c49e04f8 | [
"BSD-3-Clause"
] | 47 | 2020-06-17T08:03:06.000Z | 2022-03-25T19:44:27.000Z | compass/globals.py | YosefLab/Compass | f8ae5b5e0d85693ae27ee834c77ee732c49e04f8 | [
"BSD-3-Clause"
] | 10 | 2020-06-20T12:13:37.000Z | 2022-03-18T06:22:17.000Z | """
Global variables for use by other modules
"""
import os
import logging
import sys
_this_directory = os.path.dirname(os.path.abspath(__file__))
GIT_DIR = os.path.abspath(
os.path.join(_this_directory, '..', '.git')
)
RESOURCE_DIR = os.path.join(_this_directory, "Resources")
MODEL_DIR = os.path.join(RESOURCE_D... | 25.634615 | 60 | 0.712678 |
21b7a9651ca07bcb0e8afea279674a1744431183 | 5,973 | py | Python | docs/source/conf.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | 122 | 2020-02-21T16:06:54.000Z | 2022-03-21T13:53:03.000Z | docs/source/conf.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | 13 | 2020-01-29T16:37:05.000Z | 2022-01-27T21:30:10.000Z | docs/source/conf.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | 20 | 2020-04-10T11:59:29.000Z | 2022-02-10T09:20:26.000Z | # -*- 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 ------------------------------------------------------------... | 28.995146 | 79 | 0.652101 |
21b7da598fe3cb38d757f44e7241ef3785f1f20b | 16,427 | py | Python | ufora/BackendGateway/SubscribableWebObjects/ObjectClassesToExpose/PyforaComputedValue.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/BackendGateway/SubscribableWebObjects/ObjectClassesToExpose/PyforaComputedValue.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/BackendGateway/SubscribableWebObjects/ObjectClassesToExpose/PyforaComputedValue.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora 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 i... | 39.583133 | 124 | 0.59597 |
21b7ed30c1f3b01ffc8ac140953cba10dfa021c9 | 205 | py | Python | scripts/py/delete_nat_refs.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | scripts/py/delete_nat_refs.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | scripts/py/delete_nat_refs.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | from legislative_act import model as dm
s = dm.Search().filter('term', doc_type='nationalreference')
ids = [d.meta.id for d in s.scan()]
for mid in ids:
print('deleting ' + mid)
dm.delete(mid)
| 18.636364 | 60 | 0.668293 |
21b7edef65c070d01fdaaec4095356819eacdacf | 2,857 | py | Python | analysis/fix_task/data_quality.py | TimS70/WebET_Analysis | 32fc2e1b70c2dad5637ee1614a6a651bc8d458b4 | [
"MIT"
] | null | null | null | analysis/fix_task/data_quality.py | TimS70/WebET_Analysis | 32fc2e1b70c2dad5637ee1614a6a651bc8d458b4 | [
"MIT"
] | null | null | null | analysis/fix_task/data_quality.py | TimS70/WebET_Analysis | 32fc2e1b70c2dad5637ee1614a6a651bc8d458b4 | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from utils.combine import merge_by_index
from visualize.all_tasks import save_plot
from utils.save_data import write_csv
def group_within_task_index(data, group_var, var_name):
df_m = data \
.groupby([group_var, 'withinTask... | 32.101124 | 74 | 0.60763 |
21b82d27961fbbf6032c9084b49fe579360ceeb7 | 1,868 | py | Python | demo/sax/saxtrace.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | 2 | 2018-05-28T23:01:20.000Z | 2018-05-29T03:59:38.000Z | demo/sax/saxtrace.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | demo/sax/saxtrace.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | """
A minimal SAX application that just prints out the document-handler events
it receives.
"""
import sys
from xml.sax import saxexts
# --- SAXtracer
class SAXtracer:
def __init__(self,objname):
self.objname=objname
self.met_name=""
def __getattr__(self,name):
self.met_name=name # ... | 26.309859 | 79 | 0.596895 |
21b84d0cbe076b1a8247b28a46f94540d9e5d5a2 | 1,746 | py | Python | pytest_skippy/git.py | a-feld/pytest-skippy | 1d0b1adf16c810a66d5d8dadad765e5b093e1b0b | [
"MIT"
] | 8 | 2018-01-29T16:10:18.000Z | 2019-01-13T07:03:56.000Z | pytest_skippy/git.py | a-feld/pytest-autoskip | 1d0b1adf16c810a66d5d8dadad765e5b093e1b0b | [
"MIT"
] | 6 | 2018-01-27T03:13:59.000Z | 2018-01-29T07:41:46.000Z | pytest_skippy/git.py | a-feld/pytest-skippy | 1d0b1adf16c810a66d5d8dadad765e5b093e1b0b | [
"MIT"
] | null | null | null | import os
import subprocess
def detect_changed_files(target_branch, base_branch='HEAD', git_repo_dir=None):
"""Get a list of changed files in a git repo
:param target_branch: The merge target for a branch.
:type target_branch: str
:param base_branch: The branch that's being merged (default: 'HEAD')
... | 32.943396 | 79 | 0.623711 |
21b85001ef79445c57dbc4428671e67ad044f728 | 10,054 | py | Python | lenstronomy/Analysis/image_reconstruction.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/Analysis/image_reconstruction.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/Analysis/image_reconstruction.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | import copy
import numpy as np
import lenstronomy.Util.class_creator as class_creator
from lenstronomy.ImSim.MultiBand.single_band_multi_model import SingleBandMultiModel
from lenstronomy.Util.package_util import exporter
export, __all__ = exporter()
@export
class MultiBandImageReconstruction(object):
"""
t... | 52.364583 | 256 | 0.687488 |
21b863ba86d516370bebb558601237919644c740 | 273 | py | Python | terrascript/filesystem/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/filesystem/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/filesystem/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/filesystem/__init__.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class filesystem(terrascript.Provider):
pass
| 18.2 | 79 | 0.776557 |
21b8a0e5a24d22d4fef2bef67c7c97f229f42eda | 22,381 | py | Python | util.py | jonnyt886/jpy | 7e950239785de09d1e11c1d81135fa51bf450616 | [
"MIT"
] | null | null | null | util.py | jonnyt886/jpy | 7e950239785de09d1e11c1d81135fa51bf450616 | [
"MIT"
] | null | null | null | util.py | jonnyt886/jpy | 7e950239785de09d1e11c1d81135fa51bf450616 | [
"MIT"
] | null | null | null | # General-purpose util module
import os, locale, sys, select, re, types, datetime, traceback, pprint
from .asrt import *
import imp
debug = False
debug_filters = []
def debug_enabled(d):
"""
Enable debugging. This switches on debug output printed
via dprint().
"""
global debug
debug = d
def s... | 30.616963 | 118 | 0.615388 |
21b8a535100de248c1c61714f9020dd2c60ad04e | 224 | py | Python | pni_customization/pni_customization/doctype/paper_blank_settings/test_paper_blank_settings.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/paper_blank_settings/test_paper_blank_settings.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/paper_blank_settings/test_paper_blank_settings.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Jigar Tarpara and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestPaperBlankSettings(unittest.TestCase):
pass
| 20.363636 | 52 | 0.772321 |
21b8a7da93be8c40edfe6314947a51cb394b0fc6 | 3,426 | py | Python | src/azul/service/responseobjects/cart_export_service.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | src/azul/service/responseobjects/cart_export_service.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | src/azul/service/responseobjects/cart_export_service.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | import logging
from azul.service.responseobjects.cart_item_manager import CartItemManager
from azul.service.responseobjects.collection_data_access import CollectionDataAccess, UnauthorizedClientAccessError
from azul import config
logger = logging.getLogger(__name__)
class CartExportService:
def __init__(self):... | 45.078947 | 115 | 0.634559 |
21b8b8890822ee1ae84371945cce54540ef67a59 | 4,592 | py | Python | whisk_tutorial/migrations/0004_auto__del_field_tutorialuser_http_accept_encoding__add_field_tutorialu.py | apache/openwhisk-tutorial | f3d4e1ef8eb41462cff525df02dbbdd4998e471a | [
"Apache-2.0"
] | 2 | 2019-12-23T19:11:48.000Z | 2021-11-10T15:53:41.000Z | whisk_tutorial/migrations/0004_auto__del_field_tutorialuser_http_accept_encoding__add_field_tutorialu.py | tspannhw/incubator-openwhisk-tutorial | f3d4e1ef8eb41462cff525df02dbbdd4998e471a | [
"Apache-2.0"
] | 5 | 2019-08-15T15:31:21.000Z | 2019-08-15T15:32:00.000Z | whisk_tutorial/migrations/0004_auto__del_field_tutorialuser_http_accept_encoding__add_field_tutorialu.py | tspannhw/incubator-openwhisk-tutorial | f3d4e1ef8eb41462cff525df02dbbdd4998e471a | [
"Apache-2.0"
] | 2 | 2021-11-04T12:32:33.000Z | 2021-11-10T15:53:32.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'TutorialUser.http_accept_encoding'
db.delete_column(u'whisk_tutorial_tutorialuser', 'http_... | 63.777778 | 145 | 0.587979 |
21b8ceaf680cd237421947fc474569097f5fec26 | 92,039 | py | Python | nova/virt/xenapi/vmops.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/virt/xenapi/vmops.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/virt/xenapi/vmops.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2010 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | 43.703229 | 79 | 0.596562 |
21b8e88523ef270430abe21ab7957e07e0d89cd1 | 1,832 | py | Python | xos/tosca/resources/tenant.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/tosca/resources/tenant.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/tosca/resources/tenant.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | import importlib
import os
import pdb
import sys
import tempfile
sys.path.append("/opt/tosca")
from translator.toscalib.tosca_template import ToscaTemplate
import pdb
from core.models import Tenant, Service
from xosresource import XOSResource
class XOSTenant(XOSResource):
provides = "tosca.nodes.Tenant"
xos_... | 30.032787 | 120 | 0.672489 |
21b911f639e8d4d9519ce7305f1c3bec96610785 | 432 | py | Python | reg/__init__.py | sushmaakoju/regression-api | d94376e7c7d30f0ee5e0b3a7815371f9cc32c6cd | [
"MIT"
] | null | null | null | reg/__init__.py | sushmaakoju/regression-api | d94376e7c7d30f0ee5e0b3a7815371f9cc32c6cd | [
"MIT"
] | null | null | null | reg/__init__.py | sushmaakoju/regression-api | d94376e7c7d30f0ee5e0b3a7815371f9cc32c6cd | [
"MIT"
] | null | null | null | from . import reg_plots, regression, model_parameters, permutation_imp
from .permutation_imp import *
from .regression import *
from .reg_plots import *
from .model_parameters import *
__all__ = ['reg_plots', 'regression', 'model_parameters',
'permutation_imp']
__all__.extend(model_parameters.__all__)
_... | 22.736842 | 70 | 0.780093 |
21b9139a35f91b4d791187b854c8f02ada65465b | 255 | py | Python | show_color_scales.py | thisisglee/Data-Visualizations | afe6a597e5c924c47ae6b59f346a08f73e07f73f | [
"MIT"
] | null | null | null | show_color_scales.py | thisisglee/Data-Visualizations | afe6a597e5c924c47ae6b59f346a08f73e07f73f | [
"MIT"
] | null | null | null | show_color_scales.py | thisisglee/Data-Visualizations | afe6a597e5c924c47ae6b59f346a08f73e07f73f | [
"MIT"
] | null | null | null | from plotly import colors
import json
#print(colors.PLOTLY_SCALES)
all_eq_data = colors.PLOTLY_SCALES
#To make the readable file
readable_file='data/readable_colors.json'
with open(readable_file,'w') as f:
json.dump(all_eq_data, f, indent=4) | 23.181818 | 42 | 0.764706 |
21b93c30524e530f706bc05c296b4a20916d884c | 12,334 | py | Python | onadata/apps/logger/xform_instance_parser.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 87 | 2015-02-10T23:36:28.000Z | 2022-01-31T00:51:10.000Z | onadata/apps/logger/xform_instance_parser.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 443 | 2015-04-28T18:50:25.000Z | 2022-03-31T03:29:43.000Z | onadata/apps/logger/xform_instance_parser.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 122 | 2015-01-13T16:27:44.000Z | 2022-01-24T09:35:56.000Z | # coding: utf-8
import logging
import re
import sys
import dateutil.parser
import six
from django.utils.encoding import smart_str
from django.utils.translation import ugettext as _
from django.utils.six import text_type
from xml.dom import minidom, Node
from onadata.libs.utils.common_tags import XFORM_ID_STRING
cla... | 34.166205 | 107 | 0.607427 |
21b93e75dfa563bcbcb20b541a2318e1ba318fd3 | 2,976 | py | Python | tests/pystrings/test_bob.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/pystrings/test_bob.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/pystrings/test_bob.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
from pystrings.bob import hey
class BobTests(unittest.TestCase):
def test_stating_something(self):
self.assertEqual(
'Whatever.',
hey('Tom-ay-to, tom-aaaah-to.')
)
def test_shouting(sel... | 24.595041 | 75 | 0.549059 |
21b98a80435c596a7f3800a9689f3b95c4e25262 | 6,427 | py | Python | activflow/core/views.py | mcgauranc/mosaiq | 33c4b7db8f3dd1ef18dc0b63d06fb05ee8df4de0 | [
"Apache-2.0"
] | null | null | null | activflow/core/views.py | mcgauranc/mosaiq | 33c4b7db8f3dd1ef18dc0b63d06fb05ee8df4de0 | [
"Apache-2.0"
] | null | null | null | activflow/core/views.py | mcgauranc/mosaiq | 33c4b7db8f3dd1ef18dc0b63d06fb05ee8df4de0 | [
"Apache-2.0"
] | null | null | null | """Generic workflow engine views"""
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.core.urlresolvers import reverse, reverse_lazy
from django.db import transaction
from django.http import HttpResponseRedirect
from django.shortcuts import ... | 35.120219 | 72 | 0.624864 |
21b9b8c296542bd1105ea8773e775fa3e45d6e51 | 274 | py | Python | itsi_event_management_sdk/__init__.py | splunk/itsi-event-action-sdk | 6ed2d1d2e304bbe7e00804f9be70c1ac88fdeb02 | [
"Apache-2.0"
] | 4 | 2018-08-16T07:31:57.000Z | 2021-06-03T22:27:33.000Z | itsi_event_management_sdk/__init__.py | dbreddyAI/itsi-event-action-sdk | 9ee861ebc7ee31a8198eb5361ac4490df3e9d45d | [
"Apache-2.0"
] | 1 | 2018-12-06T16:01:42.000Z | 2018-12-06T16:01:42.000Z | itsi_event_management_sdk/__init__.py | dbreddyAI/itsi-event-action-sdk | 9ee861ebc7ee31a8198eb5361ac4490df3e9d45d | [
"Apache-2.0"
] | 5 | 2018-05-30T13:17:42.000Z | 2022-03-27T09:00:07.000Z | from .eventing import EventMeta, Event, EventGroup
from .eventing_base import Client
from .custom_event_action_base import CustomEventActionBase
__all__ = [
'EventMeta',
'Event',
'EventGroup',
'Client',
'CustomEventActionBase'
]
__version__ = '1.0.0'
| 18.266667 | 59 | 0.722628 |
21b9e928947e9063ed3ceafda8506021afcca1e9 | 326 | py | Python | SoftLayer/CLI/dns/zone_create.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/dns/zone_create.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/dns/zone_create.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | """Create a zone."""
# :license: MIT, see LICENSE for more details.
import SoftLayer
from SoftLayer.CLI import environment
import click
@click.command()
@click.argument('zone')
@environment.pass_env
def cli(env, zone):
"""Create a zone."""
manager = SoftLayer.DNSManager(env.client)
manager.create_zone(... | 18.111111 | 46 | 0.714724 |
21b9f4c4fdd1892f37afe61efb3123d136c13f86 | 2,323 | py | Python | end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_integers.py | JamesHinshelwood/openapi-python-client | 08bc2acf91d50d4fcdd7f0e50a8b0d3f00a187d9 | [
"MIT"
] | 1 | 2022-02-17T11:45:13.000Z | 2022-02-17T11:45:13.000Z | end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_integers.py | guioliveirabh/openapi-python-client | d8d9cecffe41c5dc1c43bc667598b90f0d9253ca | [
"MIT"
] | null | null | null | end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_integers.py | guioliveirabh/openapi-python-client | d8d9cecffe41c5dc1c43bc667598b90f0d9253ca | [
"MIT"
] | null | null | null | from typing import Any, Dict, List, Optional, cast
import httpx
from ...client import Client
from ...types import Response
def _get_kwargs(
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/tests/basic_lists/integers".format(client.base_url)
headers: Dict[str, str] = client.get_headers()
cookie... | 18.733871 | 72 | 0.606113 |
21ba3ad4d1dcc6597affd3e5e8529ca5c43bab2f | 10,873 | py | Python | CORE/engines/wingEngine.py | geoffreynyaga/ostrich-project | 157cd7a3c3d9014e31ef21ca21de43f04d039997 | [
"MIT"
] | 15 | 2017-11-08T10:03:26.000Z | 2021-12-21T07:02:44.000Z | CORE/engines/wingEngine.py | geoffreynyaga/ostrich-project | 157cd7a3c3d9014e31ef21ca21de43f04d039997 | [
"MIT"
] | 9 | 2020-01-17T15:09:22.000Z | 2022-03-25T19:02:05.000Z | CORE/engines/wingEngine.py | geoffreynyaga/ostrich-project | 157cd7a3c3d9014e31ef21ca21de43f04d039997 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
##################################################################################
# File: c:\Projects\KENYA ONE PROJECT\CORE\engines\wingEngine.py #
# Project: c:\Projects\KENYA ONE PROJECT\CORE\engines #
# Created Date: Thur... | 37.364261 | 117 | 0.628345 |
21ba3c2c81cd0551a4fad5a70f1862b8adae9a07 | 2,195 | py | Python | toontown/toon/NPCForceAcknowledge.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/toon/NPCForceAcknowledge.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/toon/NPCForceAcknowledge.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from pandac.PandaModules import *
from toontown.toontowngui import TTDialog
from toontown.toonbase import TTLocalizer
from direct.gui import DirectLabel
from toontown.quest import Quests
class NPCForceAcknowledge:
def __init__(self, doneEvent):
self.doneEvent = doneEvent
self.dialog = None
de... | 44.795918 | 164 | 0.623235 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.