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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
acfe2d3caaa38637a67afcef9250ffcd4adba436 | 11,637 | py | Python | src/repobee_plug/_pluginmeta.py | DD2480-Group-18/repobee | 1dd79bb6ace3c00b920ef0b32664847cd5b12f84 | [
"MIT"
] | 39 | 2019-04-02T15:53:23.000Z | 2022-03-07T02:38:41.000Z | src/repobee_plug/_pluginmeta.py | DD2480-Group-18/repobee | 1dd79bb6ace3c00b920ef0b32664847cd5b12f84 | [
"MIT"
] | 788 | 2019-03-31T13:55:53.000Z | 2022-03-29T20:41:02.000Z | src/repobee_plug/_pluginmeta.py | slarse/repobee | 03fcf90dc0244e0274a890d2a897752889c70326 | [
"MIT"
] | 18 | 2020-06-15T11:49:50.000Z | 2022-03-06T19:05:53.000Z | import argparse
import shlex
import itertools
import inspect
import re
from typing import List, Tuple, Union, Iterator, Any, Optional
import repobee_plug.config
from repobee_plug import exceptions
from repobee_plug import _corehooks
from repobee_plug import _exthooks
from repobee_plug import cli
from repobee_plug.cli... | 35.051205 | 94 | 0.673713 |
acfe2e87235e07521b7b597f671efe0219576cfe | 6,320 | py | Python | sis-api/core/repository/quote.py | maxbilbow/7054CEM-sis | 1c5067c9afc38e340fcce046048f8ae21d267365 | [
"MIT"
] | null | null | null | sis-api/core/repository/quote.py | maxbilbow/7054CEM-sis | 1c5067c9afc38e340fcce046048f8ae21d267365 | [
"MIT"
] | null | null | null | sis-api/core/repository/quote.py | maxbilbow/7054CEM-sis | 1c5067c9afc38e340fcce046048f8ae21d267365 | [
"MIT"
] | null | null | null | import dataclasses
import time
from typing import Optional, List
from core.model.driver_details import DriverDetails
from core.model.driver_history import DriverHistory
from core.model.home_details import HomeDetails
from core.model.home_quote_sections import HomeQuoteSections
from core.model.insurance_policy import I... | 50.56 | 129 | 0.664873 |
acfe30089f1a181284507a6c3fadd02e1db86d09 | 3,468 | py | Python | newrelic_lambda_cli/subscriptions.py | salvatorious/newrelic-lambda-cli | 22fb46930bbf138d2ad65cf46040b185072d775a | [
"Apache-2.0"
] | null | null | null | newrelic_lambda_cli/subscriptions.py | salvatorious/newrelic-lambda-cli | 22fb46930bbf138d2ad65cf46040b185072d775a | [
"Apache-2.0"
] | null | null | null | newrelic_lambda_cli/subscriptions.py | salvatorious/newrelic-lambda-cli | 22fb46930bbf138d2ad65cf46040b185072d775a | [
"Apache-2.0"
] | null | null | null | import botocore
import click
from .cli.cliutils import failure
from .functions import get_function
def get_subscription_filters(session, function_name):
"""Returns all the log subscription filters for the function"""
log_group_name = "/aws/lambda/%s" % function_name
try:
res = session.client("log... | 38.533333 | 88 | 0.684833 |
acfe30cf926557dd7281aee077c7d1a5f2f80f62 | 3,912 | py | Python | imix/models/vqa_models/oscar/run_nlvr.py | linxi1158/iMIX | af87a17275f02c94932bb2e29f132a84db812002 | [
"Apache-2.0"
] | 23 | 2021-06-26T08:45:19.000Z | 2022-03-02T02:13:33.000Z | imix/models/vqa_models/oscar/run_nlvr.py | XChuanLee/iMIX | 99898de97ef8b45462ca1d6bf2542e423a73d769 | [
"Apache-2.0"
] | null | null | null | imix/models/vqa_models/oscar/run_nlvr.py | XChuanLee/iMIX | 99898de97ef8b45462ca1d6bf2542e423a73d769 | [
"Apache-2.0"
] | 9 | 2021-06-10T02:36:20.000Z | 2021-11-09T02:18:16.000Z | # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2020 Microsoft Corporation. Licensed under the MIT license.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file ... | 37.615385 | 118 | 0.674591 |
acfe3195aad6fefedc02c0d6b9ad5719a36781a1 | 46 | py | Python | tests/components/alarmdecoder/__init__.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/alarmdecoder/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/alarmdecoder/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """The tests for AlarmDecoder integration."""
| 23 | 45 | 0.73913 |
acfe31b626ab0bc0289652e0d6b9f6bb551bcd38 | 38,561 | py | Python | tests/dashboard/test_product.py | adonig/saleor | 41f2148da45acd8309faeda5331ca5fc93a0d201 | [
"BSD-3-Clause"
] | 6 | 2019-01-06T08:39:20.000Z | 2022-03-04T18:07:47.000Z | tests/dashboard/test_product.py | adonig/saleor | 41f2148da45acd8309faeda5331ca5fc93a0d201 | [
"BSD-3-Clause"
] | 3 | 2020-02-11T23:51:31.000Z | 2022-02-10T22:42:12.000Z | tests/dashboard/test_product.py | adonig/saleor | 41f2148da45acd8309faeda5331ca5fc93a0d201 | [
"BSD-3-Clause"
] | 1 | 2021-04-22T12:10:35.000Z | 2021-04-22T12:10:35.000Z | import json
from unittest.mock import MagicMock, Mock
from django.forms import HiddenInput
from django.forms.models import model_to_dict
from django.urls import reverse
from prices import Money, MoneyRange, TaxedMoney, TaxedMoneyRange
from tests.utils import get_redirect_location
from saleor.dashboard.product import ... | 34.583857 | 79 | 0.697907 |
acfe31c1edbeace803f7ff5ad82ed4a44633bead | 2,888 | py | Python | maskrcnn_benchmark/modeling/roi_heads/box_head/box_head.py | cxq1/paddle_VinVL | f9136871c43b033cd209ddc7579fa986208e37db | [
"MIT"
] | null | null | null | maskrcnn_benchmark/modeling/roi_heads/box_head/box_head.py | cxq1/paddle_VinVL | f9136871c43b033cd209ddc7579fa986208e37db | [
"MIT"
] | null | null | null | maskrcnn_benchmark/modeling/roi_heads/box_head/box_head.py | cxq1/paddle_VinVL | f9136871c43b033cd209ddc7579fa986208e37db | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# Copyright (c) 2021 Microsoft Corporation. Licensed under the MIT license.
import paddle
from torch import nn
from .roi_box_feature_extractors import make_roi_box_feature_extractor
from .roi_box_predictors import make_roi_box_predictor
from .inf... | 39.027027 | 96 | 0.667244 |
acfe31c62f589b4efebf857fa9dfd0e944f06e0a | 3,124 | py | Python | app/main/views.py | markdan58/danmark-blog | 191e86217cd35e243208108067ee944b20f32115 | [
"MIT"
] | null | null | null | app/main/views.py | markdan58/danmark-blog | 191e86217cd35e243208108067ee944b20f32115 | [
"MIT"
] | 7 | 2021-03-18T21:32:13.000Z | 2022-03-11T23:34:18.000Z | app/main/views.py | markdan58/danmark-blog | 191e86217cd35e243208108067ee944b20f32115 | [
"MIT"
] | null | null | null | from flask import render_template,request,redirect,url_for,abort
from ..models import User
from .forms import UpdateProfile
from .. import db,photos
from flask_login import login_required
from flask_login import login_required, current_user
from . import main
from ..auth.forms import LoginForm
from ..models import Newb... | 25.606557 | 79 | 0.685019 |
acfe31e1928f6f7eba0cafb5b8b6ec9973099423 | 42 | py | Python | ADVECTOR/__init__.py | john-science/ADVECTOR | 5c5ca7595c2c051f1a088b1f0e694936c3da3610 | [
"MIT"
] | 7 | 2021-09-07T02:32:00.000Z | 2022-01-15T11:35:02.000Z | ADVECTOR/__init__.py | TheOceanCleanupAlgorithms/ADVECT | e27ce15da6a2fcbccbe363f8c2415b0122696d1f | [
"MIT"
] | 1 | 2021-12-24T15:16:26.000Z | 2021-12-24T15:16:26.000Z | ADVECTOR/__init__.py | TheOceanCleanupAlgorithms/ADVECT | e27ce15da6a2fcbccbe363f8c2415b0122696d1f | [
"MIT"
] | 1 | 2021-12-12T15:13:52.000Z | 2021-12-12T15:13:52.000Z | from ADVECTOR._version import __version__
| 21 | 41 | 0.880952 |
acfe344e00c5feedf76d98c0a7a25f3726169335 | 22,823 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_virtual_network_peerings_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_virtual_network_peerings_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_virtual_network_peerings_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.870455 | 250 | 0.680103 |
acfe35c4be069e9d2fde87c60b0bc7b97cdc40af | 12,901 | py | Python | chrome/test/chromedriver/test/run_java_tests.py | metux/chromium-deb | 3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/test/chromedriver/test/run_java_tests.py | metux/chromium-deb | 3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/test/chromedriver/test/run_java_tests.py | metux/chromium-deb | 3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Runs the WebDriver Java acceptance tests.
This script is called from chrome/test/chromedriver/run_all_tests.py and reports
results ... | 37.071839 | 80 | 0.655143 |
acfe37579baaa040f420fcce27c66754ddf57152 | 11,958 | py | Python | the_ark/s3_client.py | meltmedia/the-ark | d559897494e02a2e2048fdc44014f17af89691bb | [
"Apache-2.0"
] | null | null | null | the_ark/s3_client.py | meltmedia/the-ark | d559897494e02a2e2048fdc44014f17af89691bb | [
"Apache-2.0"
] | 51 | 2015-01-27T18:13:41.000Z | 2022-03-11T23:16:29.000Z | the_ark/s3_client.py | meltmedia/the-ark | d559897494e02a2e2048fdc44014f17af89691bb | [
"Apache-2.0"
] | null | null | null | import boto.s3.connection
import mimetypes
import os
import shutil
import tempfile
import urllib
import urlparse
import logging
from boto.s3.key import Key
from StringIO import StringIO
logger = logging.getLogger(__name__)
MAX_FILE_SPLITS = 9999
DEFAULT_FILE_SPLIT_SIZE = 6291456
DEFAULT_MINIMUM_SPLIT_AT_SIZE = 20000... | 45.124528 | 120 | 0.608965 |
acfe3792aabca90be7d7fbe95dc975f507492e3d | 2,154 | py | Python | setup.py | ebellocchia/telegram_periodic_msg_bot | 183e2dae88504c26deb337fc1ad0845cc0cb8cb8 | [
"MIT"
] | 4 | 2021-10-09T10:49:55.000Z | 2022-02-06T22:52:48.000Z | setup.py | ebellocchia/telegram_periodic_msg_bot | 183e2dae88504c26deb337fc1ad0845cc0cb8cb8 | [
"MIT"
] | null | null | null | setup.py | ebellocchia/telegram_periodic_msg_bot | 183e2dae88504c26deb337fc1ad0845cc0cb8cb8 | [
"MIT"
] | 1 | 2021-12-04T15:11:09.000Z | 2021-12-04T15:11:09.000Z | import os
import setuptools
import re
# Load long description
def load_long_description(desc_file):
return open(desc_file).read()
# Load version
def load_version(*path_parts):
version_file = os.path.join(*path_parts)
version_line = open(os.path.join(*path_parts)).read().rstrip()
vre = re.compile(r'_... | 33.65625 | 105 | 0.687558 |
acfe393e6c93a0199864320e97aa935eba4bef63 | 4,292 | py | Python | lib/python2.7/site-packages/networkx/linalg/tests/test_graphmatrix.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | 15 | 2018-04-26T08:17:18.000Z | 2021-03-05T08:44:13.000Z | lib/python2.7/site-packages/networkx/linalg/tests/test_graphmatrix.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | null | null | null | lib/python2.7/site-packages/networkx/linalg/tests/test_graphmatrix.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | 6 | 2018-04-12T15:49:27.000Z | 2022-01-27T12:34:50.000Z | from nose import SkipTest
import networkx as nx
from networkx.generators.degree_seq import havel_hakimi_graph
class TestGraphMatrix(object):
numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test
@classmethod
def setupClass(cls):
global numpy
global assert_equal
g... | 47.688889 | 89 | 0.520503 |
acfe394c8fe8f340d5820e1f663c583ebe712473 | 6,102 | py | Python | config/settings/test.py | cgsunkel/data-hub-api | a92faabf73fb93b5bfd94fd465eafc3e29aa6d8e | [
"MIT"
] | null | null | null | config/settings/test.py | cgsunkel/data-hub-api | a92faabf73fb93b5bfd94fd465eafc3e29aa6d8e | [
"MIT"
] | 4 | 2021-06-30T10:34:50.000Z | 2021-06-30T10:34:51.000Z | config/settings/test.py | cgsunkel/data-hub-api | a92faabf73fb93b5bfd94fd465eafc3e29aa6d8e | [
"MIT"
] | null | null | null | import environ
environ.Env.read_env() # reads the .env file
env = environ.Env()
from config.settings.common import *
# The automatic connection configuration is disabled during tests because the connection is set up
# using different environment variables in the _es_client pytest fixture
SEARCH_CONFIGURE_CONNECTION... | 31.947644 | 98 | 0.712553 |
acfe3b5b558118b8c54b036f7afce62793140d23 | 2,317 | py | Python | epi_forecast_stat_mech/statistical_models/linear_model_test.py | HopkinsIDD/EpiForecastStatMech | 4ba57edff1ece0c56ec6dfa41eac4cfe4a1c66cb | [
"Apache-2.0"
] | 4 | 2020-04-11T17:24:00.000Z | 2022-01-21T09:28:03.000Z | epi_forecast_stat_mech/statistical_models/linear_model_test.py | HopkinsIDD/EpiForecastStatMech | 4ba57edff1ece0c56ec6dfa41eac4cfe4a1c66cb | [
"Apache-2.0"
] | 2 | 2021-05-03T23:48:22.000Z | 2022-03-08T12:15:58.000Z | epi_forecast_stat_mech/statistical_models/linear_model_test.py | HopkinsIDD/EpiForecastStatMech | 4ba57edff1ece0c56ec6dfa41eac4cfe4a1c66cb | [
"Apache-2.0"
] | 3 | 2020-04-13T18:39:56.000Z | 2020-04-14T02:02:54.000Z | # Lint as: python3
"""Tests for epi_forecast_stat_mech.statistical_models.linear_model."""
from absl.testing import parameterized
from epi_forecast_stat_mech.statistical_models import linear_model
from epi_forecast_stat_mech.statistical_models import tree_util
import jax.numpy as jnp
from absl.testing import absltes... | 35.646154 | 77 | 0.698317 |
acfe3c43765d53202bdd417e5ea72226c33650dc | 40,992 | py | Python | syncplay/messages_it.py | AndrewAmmerlaan/syncplay | f880d4773238a31ac7046ff290910a4ff4920d53 | [
"Apache-2.0"
] | null | null | null | syncplay/messages_it.py | AndrewAmmerlaan/syncplay | f880d4773238a31ac7046ff290910a4ff4920d53 | [
"Apache-2.0"
] | null | null | null | syncplay/messages_it.py | AndrewAmmerlaan/syncplay | f880d4773238a31ac7046ff290910a4ff4920d53 | [
"Apache-2.0"
] | null | null | null | # coding:utf8
"""Italian dictionary"""
it = {
"LANGUAGE": "Italiano",
# Client notifications
"config-cleared-notification": "Impostazioni iniziali ripristinate. I cambiamenti saranno memorizzati quando salverai una configurazione valida.",
"relative-config-notification": "Caricato i file di configur... | 78.528736 | 703 | 0.731899 |
acfe3c77e33314b8e3569f8909fe71e9f7673b46 | 3,683 | py | Python | muranodashboard/common/utils.py | sbrf-clouddev/murano-dashboard | f98e08d827a006db5fd054ac4fb6abba786bb414 | [
"Apache-2.0"
] | null | null | null | muranodashboard/common/utils.py | sbrf-clouddev/murano-dashboard | f98e08d827a006db5fd054ac4fb6abba786bb414 | [
"Apache-2.0"
] | null | null | null | muranodashboard/common/utils.py | sbrf-clouddev/murano-dashboard | f98e08d827a006db5fd054ac4fb6abba786bb414 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Mirantis, 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... | 29.701613 | 78 | 0.680152 |
acfe3c95386629a4d9824a440a310f9a8018b176 | 1,007 | py | Python | examples/index.py | hodgesds/solnado | a3a3190fcad724bb0e72e5666643e1556102ec14 | [
"Apache-2.0"
] | 1 | 2015-11-01T17:49:24.000Z | 2015-11-01T17:49:24.000Z | examples/index.py | hodgesds/solnado | a3a3190fcad724bb0e72e5666643e1556102ec14 | [
"Apache-2.0"
] | null | null | null | examples/index.py | hodgesds/solnado | a3a3190fcad724bb0e72e5666643e1556102ec14 | [
"Apache-2.0"
] | null | null | null | from functools import partial
from solnado import SolrClient
from tornado import ioloop, gen
c = SolrClient()
@gen.coroutine
def create_core():
p = partial(
c.core_create,
'foo',
)
res = yield gen.Task(p)
raise gen.Return(res)
@gen.coroutine
def create_collection():
p = partia... | 18.648148 | 48 | 0.574975 |
acfe3d25b158d26afe31007dbf05d66bdb863e86 | 10,689 | py | Python | scripts-history/posecam-threads-zmq-loop.py | freewebfish/lightweight-human-pose-estimation-3d-demo.pytorch | a75759b2950ecfd60c686b8b58f0184b3c8306d6 | [
"Apache-2.0"
] | null | null | null | scripts-history/posecam-threads-zmq-loop.py | freewebfish/lightweight-human-pose-estimation-3d-demo.pytorch | a75759b2950ecfd60c686b8b58f0184b3c8306d6 | [
"Apache-2.0"
] | null | null | null | scripts-history/posecam-threads-zmq-loop.py | freewebfish/lightweight-human-pose-estimation-3d-demo.pytorch | a75759b2950ecfd60c686b8b58f0184b3c8306d6 | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentParser
import sys
import cv2
import json
import numpy as np
from modules.myconst import *
from modules.draw import Plotter3d
import modules.myutils as mu
from modules.thread_video_streaming import *
from modules.thread_video_processing import *
import zmq
# python demo_unitycam.py --model... | 50.419811 | 238 | 0.579661 |
acfe3e3276d49813855d984c4667f3c7ff90d50b | 3,751 | py | Python | shaderjig/axes.py | mkvenkit/nocg | 42311010f5e822b014d5668e2653333430394e40 | [
"MIT"
] | 3 | 2021-06-04T14:53:22.000Z | 2021-07-09T14:31:28.000Z | shaderjig/axes.py | mkvenkit/nocg | 42311010f5e822b014d5668e2653333430394e40 | [
"MIT"
] | null | null | null | shaderjig/axes.py | mkvenkit/nocg | 42311010f5e822b014d5668e2653333430394e40 | [
"MIT"
] | null | null | null | """
axes.py
Python OpenGL program that draws XYZ axes
Author: Mahesh Venkitachalam
"""
import OpenGL
from OpenGL.GL import *
import numpy as np
import math, sys, os
import glutils
import glfw
strVS = """
#version 410 core
in vec3 aVert;
in vec3 aCol;
uniform mat4 uMVMatrix;
uniform mat4 uPMatrix;
out vec4 v... | 25.691781 | 75 | 0.568115 |
acfe3eb7e24c23e366cbc022af0fcb783d32d56e | 2,942 | py | Python | code/src/main/python/codejam/fig_generator.py | anonfse/COSAL_Anonymized | 709906294fd775131f3e019862bbdd554d83773d | [
"Unlicense"
] | null | null | null | code/src/main/python/codejam/fig_generator.py | anonfse/COSAL_Anonymized | 709906294fd775131f3e019862bbdd554d83773d | [
"Unlicense"
] | 1 | 2021-11-03T08:28:31.000Z | 2021-11-03T08:28:31.000Z | code/src/main/python/codejam/fig_generator.py | anonfse/COSAL_Anonymized | 709906294fd775131f3e019862bbdd554d83773d | [
"Unlicense"
] | 1 | 2022-03-22T14:24:13.000Z | 2022-03-22T14:24:13.000Z | from __future__ import division, print_function
import sys
import os
sys.path.append(os.path.abspath("."))
sys.dont_write_bytecode = True
__author__ = "COSAL"
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
sns.set_style("white")
def plot():
java_functions = np.cumsum([1680,1572,439,321,... | 38.207792 | 147 | 0.645819 |
acfe3fc23737003b9e14a7c4c1775889d6ae3983 | 16,751 | py | Python | dev/archery/archery/release.py | boaz-codota/arrow-datafusion | 00b4a845dc80aee59c1de36c9450f0b8f9ee2f36 | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0"
] | 1 | 2019-03-21T16:02:48.000Z | 2019-03-21T16:02:48.000Z | dev/archery/archery/release.py | boaz-codota/arrow-datafusion | 00b4a845dc80aee59c1de36c9450f0b8f9ee2f36 | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0"
] | 84 | 2022-01-13T09:59:21.000Z | 2022-03-22T06:42:44.000Z | dev/archery/archery/release.py | boaz-codota/arrow-datafusion | 00b4a845dc80aee59c1de36c9450f0b8f9ee2f36 | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0"
] | 1 | 2018-03-24T13:18:45.000Z | 2018-03-24T13:18:45.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 31.251866 | 79 | 0.595964 |
acfe3fd54d72dd30e0c34b3f48551856e84289a4 | 3,638 | py | Python | tests/test_object_utils.py | zimeon/ocfl-py | 3d696d797aa89a90a2a471d907acff07ef4a364d | [
"MIT"
] | 14 | 2018-09-10T20:08:04.000Z | 2022-03-29T18:10:43.000Z | tests/test_object_utils.py | zimeon/ocfl-py | 3d696d797aa89a90a2a471d907acff07ef4a364d | [
"MIT"
] | 73 | 2019-02-13T20:35:09.000Z | 2022-03-24T15:21:34.000Z | tests/test_object_utils.py | zimeon/ocfl-py | 3d696d797aa89a90a2a471d907acff07ef4a364d | [
"MIT"
] | 3 | 2019-02-13T18:39:50.000Z | 2021-05-04T15:39:04.000Z | # -*- coding: utf-8 -*-
"""Object tests."""
import argparse
import unittest
from ocfl.object_utils import remove_first_directory, make_unused_filepath, next_version, add_object_args, add_shared_args, check_shared_args, find_path_type
class TestAll(unittest.TestCase):
"""TestAll class to run tests."""
def tes... | 47.246753 | 157 | 0.667675 |
acfe40021930624d0999d265e394e77b744a088e | 283 | py | Python | mindhome_alpha/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | mindhome_alpha/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | null | null | null | mindhome_alpha/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
def get_data():
return {
'fieldname': 'fee_schedule',
'transactions': [
{
'items': ['Fees']
}
]
} | 21.769231 | 68 | 0.681979 |
acfe404d3b8824f0a228bba894960a5bdd898e12 | 1,934 | py | Python | solidity/python/PerformanceUniTestSale.py | frankwei98/contracts | 18fa00ec598058459d96950523c3fc23d2c00bd6 | [
"Apache-2.0"
] | 13 | 2018-09-18T09:55:27.000Z | 2021-01-07T02:35:08.000Z | solidity/python/PerformanceUniTestSale.py | frankwei98/contracts | 18fa00ec598058459d96950523c3fc23d2c00bd6 | [
"Apache-2.0"
] | 47 | 2019-02-13T06:25:37.000Z | 2021-07-30T05:23:44.000Z | solidity/python/PerformanceUniTestSale.py | frankwei98/contracts | 18fa00ec598058459d96950523c3fc23d2c00bd6 | [
"Apache-2.0"
] | 12 | 2018-09-05T07:13:33.000Z | 2019-05-28T09:53:06.000Z | import Web3Wrapper
import InputGenerator
MINIMUM_VALUE_SUPPLY = 100
MAXIMUM_VALUE_SUPPLY = 10 ** 34
SAMPLES_COUNT_SUPPLY = 50
MINIMUM_VALUE_BALANCE = 100
MAXIMUM_VALUE_BALANCE = 10 ** 34
SAMPLES_COUNT_BALANCE = 50
MINIMUM_VALUE_WEIGHT = 100000
MAXIMUM_VALUE_WEIGHT = 900000
SAMPLES_COUNT_WEIGHT = 10
MINIMUM_VALUE_A... | 35.163636 | 177 | 0.641675 |
acfe4222bf1b8173f9a647a218772116ee1da311 | 8,002 | py | Python | GUIFinal.py | ElefthManolis/NASA-Space-Apps-Challenge-2021 | a2c5109f34b4b53a6295c1afbaa20b68c2830e16 | [
"Apache-2.0"
] | 1 | 2021-10-09T17:56:16.000Z | 2021-10-09T17:56:16.000Z | GUIFinal.py | ElefthManolis/NASA-Space-Apps-Challenge-2021 | a2c5109f34b4b53a6295c1afbaa20b68c2830e16 | [
"Apache-2.0"
] | null | null | null | GUIFinal.py | ElefthManolis/NASA-Space-Apps-Challenge-2021 | a2c5109f34b4b53a6295c1afbaa20b68c2830e16 | [
"Apache-2.0"
] | null | null | null | from tkinter import *
from tkinter import filedialog
from PIL import ImageTk, Image
#import matplotlib.pyplot as plt
from matplotlib.figure import Figure
import matplotlib
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
import os
#In this function we check if the variables are valid
# Function f... | 34.791304 | 492 | 0.613347 |
acfe428ba1b267c754471d0574002d2e8eb6b78b | 8,574 | py | Python | generator/lib/commands.py | tedteng/ops-toolbelt | 6b84e8425ccb8a7d2be19f813b34cbd58c565a65 | [
"Apache-2.0"
] | null | null | null | generator/lib/commands.py | tedteng/ops-toolbelt | 6b84e8425ccb8a7d2be19f813b34cbd58c565a65 | [
"Apache-2.0"
] | null | null | null | generator/lib/commands.py | tedteng/ops-toolbelt | 6b84e8425ccb8a7d2be19f813b34cbd58c565a65 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance w... | 37.770925 | 201 | 0.652787 |
acfe42c154871b7fef7d97bb5e19390274a37dac | 3,368 | py | Python | examples/spn_custom_leaf.py | deeprob-org/deeprob-kit | c46050eb8047dcfa0cc2420887624184c042e32e | [
"MIT"
] | 38 | 2021-09-27T11:39:23.000Z | 2022-02-09T15:33:44.000Z | examples/spn_custom_leaf.py | deeprob-org/deeprob-kit | c46050eb8047dcfa0cc2420887624184c042e32e | [
"MIT"
] | 14 | 2021-09-27T15:04:46.000Z | 2021-12-08T21:08:01.000Z | examples/spn_custom_leaf.py | deeprob-org/deeprob-kit | c46050eb8047dcfa0cc2420887624184c042e32e | [
"MIT"
] | 3 | 2021-09-30T08:05:06.000Z | 2022-01-02T04:44:19.000Z | import numpy as np
import scipy.stats as ss
import deeprob.spn.structure as spn
import deeprob.spn.algorithms as spnalg
import deeprob.spn.utils as spnutils
from deeprob.spn.learning import learn_spn
class Cauchy(spn.Leaf):
LEAF_TYPE = spn.LeafType.CONTINUOUS
def __init__(self, scope: int, loc: float = 0.0,... | 35.083333 | 105 | 0.65291 |
acfe437efd31384d38fe8badf91721c153fa3cdb | 9,075 | py | Python | tests/test_bytehand.py | AOrazaev/bytehand | f1bb7591e4192238cf04137a3c4a26512c188078 | [
"MIT"
] | null | null | null | tests/test_bytehand.py | AOrazaev/bytehand | f1bb7591e4192238cf04137a3c4a26512c188078 | [
"MIT"
] | null | null | null | tests/test_bytehand.py | AOrazaev/bytehand | f1bb7591e4192238cf04137a3c4a26512c188078 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import bytehand
import unittest
import urllib
import requests
import urlparse
import json
class TestCaseWithPatchedRequests(unittest.TestCase):
"""Monkey-patch requests.get and requests.post functions for tests
"""
ok_response = requests.Response()
ok_r... | 34.770115 | 78 | 0.582369 |
acfe44009f7765aa273c463bb3565012d37a363e | 474 | py | Python | django/cantusdb_project/articles/views.py | DDMAL/CantusDB | 63c7b8df3c703008bd331097c7fb5e72c8890bb0 | [
"MIT"
] | 2 | 2020-10-16T09:50:54.000Z | 2021-07-29T08:38:34.000Z | django/cantusdb_project/articles/views.py | DDMAL/CantusDB | 63c7b8df3c703008bd331097c7fb5e72c8890bb0 | [
"MIT"
] | 65 | 2020-05-11T19:22:30.000Z | 2022-03-30T22:30:02.000Z | django/cantusdb_project/articles/views.py | DDMAL/CantusDB | 63c7b8df3c703008bd331097c7fb5e72c8890bb0 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.generic import DetailView, ListView
from articles.models import Article
class ArticleDetailView(DetailView):
model = Article
context_object_name = "article"
template_name = "article_detail.html"
class ArticleListView(ListView):
model = Article
... | 26.333333 | 56 | 0.761603 |
acfe449a60ab82ad1da091019ce6e0c885459091 | 5,490 | py | Python | ac2/plugins/metadata/lastfm.py | schnabel/audiocontrol2 | baee6def6f6d25b8da1bcdacb6b6b6714aafce33 | [
"MIT"
] | 36 | 2020-01-10T23:59:03.000Z | 2022-03-28T07:04:16.000Z | ac2/plugins/metadata/lastfm.py | schnabel/audiocontrol2 | baee6def6f6d25b8da1bcdacb6b6b6714aafce33 | [
"MIT"
] | 22 | 2019-11-04T05:46:52.000Z | 2022-03-22T08:18:59.000Z | ac2/plugins/metadata/lastfm.py | schnabel/audiocontrol2 | baee6def6f6d25b8da1bcdacb6b6b6714aafce33 | [
"MIT"
] | 16 | 2020-06-12T16:34:51.000Z | 2022-01-23T17:24:11.000Z | '''
Copyright (c) 2019 Modul 9/HiFiBerry
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribu... | 34.3125 | 82 | 0.618033 |
acfe458f9326760072682aa3b97b9c696fd72aab | 5,777 | py | Python | neuralpredictors/layers/activations.py | kellirestivo/neuralpredictors | 57205a90d2e3daa5f8746c6ef6170be9e35cb5f5 | [
"MIT"
] | null | null | null | neuralpredictors/layers/activations.py | kellirestivo/neuralpredictors | 57205a90d2e3daa5f8746c6ef6170be9e35cb5f5 | [
"MIT"
] | null | null | null | neuralpredictors/layers/activations.py | kellirestivo/neuralpredictors | 57205a90d2e3daa5f8746c6ef6170be9e35cb5f5 | [
"MIT"
] | null | null | null | import logging
from torch import nn as nn
from torch.nn import functional as F
import torch
import numpy as np
logger = logging.getLogger(__name__)
def elu1(x):
return F.elu(x, inplace=True) + 1.0
class Elu1(nn.Module):
"""
Elu activation function shifted by 1 to ensure that the
output stays posi... | 30.405263 | 120 | 0.584213 |
acfe45af2b1035c4416c589e0b2054e4dcd35e6a | 2,613 | py | Python | CIM15/CDPSM/Asset/IEC61968/AssetModels/OverheadConductorInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 58 | 2015-04-22T10:41:03.000Z | 2022-03-29T16:04:34.000Z | CIM15/CDPSM/Asset/IEC61968/AssetModels/OverheadConductorInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 12 | 2015-08-26T03:57:23.000Z | 2020-12-11T20:14:42.000Z | CIM15/CDPSM/Asset/IEC61968/AssetModels/OverheadConductorInfo.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 35 | 2015-01-10T12:21:03.000Z | 2020-09-09T08:18:16.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 50.25 | 123 | 0.753923 |
acfe45db2616724a48ec21c0ac385f6ed6303ab0 | 8,771 | py | Python | vision/nn/mobilenetv3.py | chwj81/pytorch-ssd | 1c666d498216b6a569016d010fc6f98b4d14a559 | [
"MIT"
] | null | null | null | vision/nn/mobilenetv3.py | chwj81/pytorch-ssd | 1c666d498216b6a569016d010fc6f98b4d14a559 | [
"MIT"
] | null | null | null | vision/nn/mobilenetv3.py | chwj81/pytorch-ssd | 1c666d498216b6a569016d010fc6f98b4d14a559 | [
"MIT"
] | null | null | null | '''MobileNetV3 in PyTorch.
See the paper "Inverted Residuals and Linear Bottlenecks:
Mobile Networks for Classification, Detection and Segmentation" for more details.
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import init
#class hswish(nn.Module):
# def forward(self, x):... | 38.30131 | 152 | 0.587846 |
acfe4608023fec722341537aabb74d27eaf2f042 | 1,422 | py | Python | tests/test_day10.py | FollowTheProcess/advent_of_code_2021 | 27427bf76732f5257d369a9455dbbb337dd7a0bc | [
"MIT"
] | null | null | null | tests/test_day10.py | FollowTheProcess/advent_of_code_2021 | 27427bf76732f5257d369a9455dbbb337dd7a0bc | [
"MIT"
] | null | null | null | tests/test_day10.py | FollowTheProcess/advent_of_code_2021 | 27427bf76732f5257d369a9455dbbb337dd7a0bc | [
"MIT"
] | null | null | null | import pytest
from src.day10.day10 import (
calculate_syntax_score,
complete,
first_illegal_character,
get_middle,
)
RAW = """[({(<(())[]>[[{[]{<()<>>
[(()[<>])]({[<{<<[]>>(
{([(<{}[<>[]}>{[]{[(<()>
(((({<>}<{<{<>}{[]{[]{}
[[<[([]))<([[{}[[()]]]
[{[{({}]{}}([{[{{{}}([]
{<[[]]>}<{[{[{[]{()[[[]
[<(<(<(<... | 23.311475 | 71 | 0.351617 |
acfe479a76175ffcd99eb4d4a2f54daaf94ccca3 | 188 | py | Python | src/bgmtinygrail/strategy/self_service.py | no1xsyzy/bgmtinygrail | 4e762a58337f3021440a070967f1cb7a0213f8a6 | [
"MIT"
] | 5 | 2020-05-17T02:41:01.000Z | 2020-07-01T23:24:41.000Z | src/bgmtinygrail/strategy/self_service.py | no1xsyzy/bgmtinygrail | 4e762a58337f3021440a070967f1cb7a0213f8a6 | [
"MIT"
] | null | null | null | src/bgmtinygrail/strategy/self_service.py | no1xsyzy/bgmtinygrail | 4e762a58337f3021440a070967f1cb7a0213f8a6 | [
"MIT"
] | 1 | 2021-02-09T04:41:15.000Z | 2021-02-09T04:41:15.000Z | from ._base import *
class SelfServiceStrategy(ABCCharaStrategy):
strategy = Strategy.SELF_SERVICE
def transition(self):
return self
def output(self):
pass
| 15.666667 | 44 | 0.675532 |
acfe47f1c49c06db42900fc43e7ef3a75f51715b | 1,320 | py | Python | api/v1.py | gyl-coder/friends | f03439ebe83b3411209a2595a7545411cb718aa6 | [
"MIT"
] | null | null | null | api/v1.py | gyl-coder/friends | f03439ebe83b3411209a2595a7545411cb718aa6 | [
"MIT"
] | 3 | 2021-08-07T03:02:39.000Z | 2021-08-07T05:19:41.000Z | api/v1.py | gyl-coder/friends | f03439ebe83b3411209a2595a7545411cb718aa6 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from flask import Flask, jsonify, redirect, make_response
import requests
import json
from bs4 import BeautifulSoup
import re
app = Flask(__name__)
# author: https://github.com/Zfour
def github_json(owner, repo, branch):
source_url = 'https://raw.githubusercontent.com/' + owner ... | 33.846154 | 125 | 0.654545 |
acfe4913ea5fed97bf509ba0fdcac619ee54f5f2 | 71 | py | Python | hello.py | strattan/gene211 | c1f23e65f88bac5c0201abef9238db562e764751 | [
"MIT"
] | null | null | null | hello.py | strattan/gene211 | c1f23e65f88bac5c0201abef9238db562e764751 | [
"MIT"
] | null | null | null | hello.py | strattan/gene211 | c1f23e65f88bac5c0201abef9238db562e764751 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
print("Hello Gene211!")
sys.exit(0)
| 10.142857 | 23 | 0.690141 |
acfe4a268fa19ada74505b5a24c17869d1a20f1b | 876 | py | Python | tests/v1/test_logs_grok_parser_rules.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | tests/v1/test_logs_grok_parser_rules.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | tests/v1/test_logs_grok_parser_rules.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import absolute_import
import sys
import unittest
im... | 25.764706 | 108 | 0.73516 |
acfe4a5435caa37f2cfd42d915b2aed25e5ae438 | 464 | py | Python | rest/api/responsehelpers/http_response.py | estuaryoss/estuary-agent | b8b4264a616be21c86458da75cf29d13a8fb263d | [
"Apache-2.0"
] | null | null | null | rest/api/responsehelpers/http_response.py | estuaryoss/estuary-agent | b8b4264a616be21c86458da75cf29d13a8fb263d | [
"Apache-2.0"
] | null | null | null | rest/api/responsehelpers/http_response.py | estuaryoss/estuary-agent | b8b4264a616be21c86458da75cf29d13a8fb263d | [
"Apache-2.0"
] | null | null | null | import datetime
from flask import request
from about import properties
class HttpResponse:
@staticmethod
def response(code, message, description):
return {
"code": code,
"message": message,
"description": description,
"path": request.full_path,
... | 22.095238 | 54 | 0.573276 |
acfe4a6de44c47679247f1b30d8908e2f273481e | 19,803 | py | Python | py3status/modules/xrandr.py | obestwalter/py3status | a79d50ae252626bacb14bfcc8f369e59ae500fd1 | [
"BSD-3-Clause"
] | null | null | null | py3status/modules/xrandr.py | obestwalter/py3status | a79d50ae252626bacb14bfcc8f369e59ae500fd1 | [
"BSD-3-Clause"
] | null | null | null | py3status/modules/xrandr.py | obestwalter/py3status | a79d50ae252626bacb14bfcc8f369e59ae500fd1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Control screen layout.
This modules allows you to handle your screens outputs directly from your bar!
- Detect and propose every possible screen combinations
- Switch between combinations using click events and mouse scroll
- Activate the screen or screen combination on a single... | 37.364151 | 88 | 0.577943 |
acfe4aa85bdc1d4dd34358a016e7eb02308828ec | 85 | py | Python | microservices/FarmaWebService/delivery/dev_scripter/settings_global.py | lsbloo/FarmaApp | c386eec03938d88e3aaf7da25d86010ac8b98096 | [
"MIT"
] | null | null | null | microservices/FarmaWebService/delivery/dev_scripter/settings_global.py | lsbloo/FarmaApp | c386eec03938d88e3aaf7da25d86010ac8b98096 | [
"MIT"
] | null | null | null | microservices/FarmaWebService/delivery/dev_scripter/settings_global.py | lsbloo/FarmaApp | c386eec03938d88e3aaf7da25d86010ac8b98096 | [
"MIT"
] | null | null | null | import os
URL_ENDPOINT_SENDER = os.environ.get('URL_ENDPOINT_POST', 'DONT SETTER')
| 17 | 72 | 0.776471 |
acfe4b38c9a53edb613fd034bfc35b355b9bff63 | 1,222 | py | Python | kevin-bacon-status.py | jonesinator/kevin-bacon-status | 58e721284d1e58eadc2191dcd7c1c1b9019ff1ab | [
"Unlicense"
] | null | null | null | kevin-bacon-status.py | jonesinator/kevin-bacon-status | 58e721284d1e58eadc2191dcd7c1c1b9019ff1ab | [
"Unlicense"
] | null | null | null | kevin-bacon-status.py | jonesinator/kevin-bacon-status | 58e721284d1e58eadc2191dcd7c1c1b9019ff1ab | [
"Unlicense"
] | null | null | null | import Tkinter
import urllib2
from PIL import Image, ImageTk
def update():
html = urllib2.urlopen('http://www.deadoraliveinfo.com/dead.Nsf/bnames/Bacon+Kevin').read()
if 'alive-record' in html:
panel.config(image = aliveImage)
button.config(text='Kevin Bacon is Alive.')
elif 'dead-record' i... | 38.1875 | 95 | 0.704583 |
acfe4e8d6237dd2d2cfd15f8151c52e45007c4dd | 488 | py | Python | projects/speech_translation/data_prep/spm_encode.py | tran-khoa/fairseq | 558366b3c6970a5dd85ad1909581d43e41fdce9f | [
"MIT"
] | null | null | null | projects/speech_translation/data_prep/spm_encode.py | tran-khoa/fairseq | 558366b3c6970a5dd85ad1909581d43e41fdce9f | [
"MIT"
] | null | null | null | projects/speech_translation/data_prep/spm_encode.py | tran-khoa/fairseq | 558366b3c6970a5dd85ad1909581d43e41fdce9f | [
"MIT"
] | null | null | null | import argparse
import sentencepiece as spm
from tqdm import tqdm
parser = argparse.ArgumentParser()
parser.add_argument('model')
parser.add_argument('raw')
args = parser.parse_args()
sp = spm.SentencePieceProcessor(model_file=args.model)
with open(args.raw, 'rt') as in_file:
for in_line in tqdm(in_file):
... | 27.111111 | 54 | 0.670082 |
acfe4ee8198af3e3744d126cbc47fbba2d83d263 | 3,881 | py | Python | google/ads/google_ads/v1/proto/errors/distinct_error_pb2.py | jwygoda/google-ads-python | 863892b533240cb45269d9c2cceec47e2c5a8b68 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v1/proto/errors/distinct_error_pb2.py | jwygoda/google-ads-python | 863892b533240cb45269d9c2cceec47e2c5a8b68 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v1/proto/errors/distinct_error_pb2.py | jwygoda/google-ads-python | 863892b533240cb45269d9c2cceec47e2c5a8b68 | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v1/proto/errors/distinct_error.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from... | 38.425743 | 657 | 0.785107 |
acfe5035130817b9ffdee77b72eec0ca8075489d | 4,893 | py | Python | lib/candy_editor/qt/controls/EditorCommon/ToolBar/ToolBarService.py | lihaochen910/Candy | d12cb964768459c22f30c22531d3e1734901e814 | [
"MIT"
] | 1 | 2021-11-06T14:38:37.000Z | 2021-11-06T14:38:37.000Z | lib/candy_editor/qt/controls/EditorCommon/ToolBar/ToolBarService.py | lihaochen910/Candy | d12cb964768459c22f30c22531d3e1734901e814 | [
"MIT"
] | 5 | 2021-11-06T04:23:06.000Z | 2022-03-12T01:03:25.000Z | lib/candy_editor/qt/controls/EditorCommon/ToolBar/ToolBarService.py | lihaochen910/Candy | d12cb964768459c22f30c22531d3e1734901e814 | [
"MIT"
] | 1 | 2021-11-07T05:19:51.000Z | 2021-11-07T05:19:51.000Z | from enum import IntEnum
from abc import abstractmethod
from PyQt5.QtCore import Qt, pyqtSignal, QPoint, qWarning, QDataStream, QObject
from PyQt5.QtGui import QPainter
from PyQt5.QtWidgets import QWidget, QSizePolicy, QBoxLayout, QStyleOption, QStyle, QSpacerItem, QApplication
from ..DragDrop import CDragDropData
fr... | 17.66426 | 109 | 0.697731 |
acfe50b9260ad9e3b23be21e68fe8025f5a4ae2c | 2,480 | py | Python | backend/metagrid/users/tests/test_views.py | tomvothecoder/metagrid | a38f3f78fbaf78f909c74a263c03a3f6d376b75c | [
"MIT"
] | 5 | 2020-06-08T23:20:33.000Z | 2021-11-29T15:25:27.000Z | backend/metagrid/users/tests/test_views.py | aims-group/metagrid | 32bd76638d80c3da7529a73ab8509eb53264c8dc | [
"MIT"
] | 359 | 2020-04-24T19:45:56.000Z | 2022-03-31T18:04:12.000Z | backend/metagrid/users/tests/test_views.py | tomvothecoder/metagrid | a38f3f78fbaf78f909c74a263c03a3f6d376b75c | [
"MIT"
] | 1 | 2021-03-01T17:27:43.000Z | 2021-03-01T17:27:43.000Z | import factory
import pytest
from django.contrib.auth.hashers import check_password
from django.urls import reverse
from faker import Faker
from rest_framework import status
from rest_framework.test import APITestCase
from metagrid.users.models import User
from metagrid.users.tests.factories import UserFactory, raw_pa... | 31.392405 | 76 | 0.681452 |
acfe5265c6300f29a773d87a9e6b8059f07e9a50 | 10,745 | py | Python | grapl_analyzerlib/nodes/comparators.py | grapl-security/grapl_analyzerlib | 8591dfe549df71ac319283223b5cff3edac31d51 | [
"MIT"
] | 3 | 2019-06-08T05:52:09.000Z | 2020-01-31T03:19:26.000Z | grapl_analyzerlib/nodes/comparators.py | graplsec/grapl_analyzerlib | 8591dfe549df71ac319283223b5cff3edac31d51 | [
"MIT"
] | 449 | 2020-09-11T07:07:18.000Z | 2021-08-03T06:09:36.000Z | grapl_analyzerlib/nodes/comparators.py | graplsec/grapl_analyzerlib | 8591dfe549df71ac319283223b5cff3edac31d51 | [
"MIT"
] | 2 | 2020-01-31T03:19:57.000Z | 2020-04-17T20:10:05.000Z | import re
from typing import List, Union, TypeVar, Generic, Optional, Sequence, Any, cast, Tuple
from grapl_analyzerlib.nodes.types import PropertyT
T = TypeVar("T", bound=Union[str, int])
PropertyFilter = List[List["Cmp[T]"]]
StrCmp = Union[str, "Not[str]", List[str], List[Union[str, "Not[str]"]]]
IntCmp = Union[in... | 32.170659 | 86 | 0.570126 |
acfe526dc0a2cc38d09050c3c01664cc0ef4c5c8 | 824 | py | Python | tests/test_distribution.py | hakkeroid/configstacker | 69bddeeae98f327f8cd179bdb5e2097437d97822 | [
"BSD-3-Clause"
] | null | null | null | tests/test_distribution.py | hakkeroid/configstacker | 69bddeeae98f327f8cd179bdb5e2097437d97822 | [
"BSD-3-Clause"
] | null | null | null | tests/test_distribution.py | hakkeroid/configstacker | 69bddeeae98f327f8cd179bdb5e2097437d97822 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import pkg_resources
import pytest
SOURCE_FILE_MAP = {
'yaml': 'YAMLFile',
}
DIST = pkg_resources.get_distribution('configstacker')
@pytest.fixture(params=DIST.extras)
def dependencies(request):
extra = request.param
source = SOURCE_FILE_MAP[extra]
requirements = DIST.requir... | 24.969697 | 63 | 0.68932 |
acfe52939c03edd7302ea495bddccadff42e65ab | 2,532 | py | Python | sbg_cwl_upgrader/converter/sbg_draft2_to_cwl_1_0.py | sbg/sevenbridges-cwl-draft2-upgrader | 5ac4d000674e4e2611a7c1816b523cfaeed2cfe7 | [
"Apache-2.0"
] | 6 | 2019-09-03T13:15:33.000Z | 2021-12-22T07:45:26.000Z | sbg_cwl_upgrader/converter/sbg_draft2_to_cwl_1_0.py | sbg/sevenbridges-cwl-draft2-upgrader | 5ac4d000674e4e2611a7c1816b523cfaeed2cfe7 | [
"Apache-2.0"
] | 1 | 2020-02-06T11:39:39.000Z | 2020-02-06T11:39:39.000Z | sbg_cwl_upgrader/converter/sbg_draft2_to_cwl_1_0.py | sbg/sevenbridges-cwl-draft2-upgrader | 5ac4d000674e4e2611a7c1816b523cfaeed2cfe7 | [
"Apache-2.0"
] | null | null | null | import argparse
import sys
from sbg_cwl_upgrader.sbg_utils import (add_sbg_auth_to_args,
configure_logging,
add_logging_to_args)
from sbg_cwl_upgrader.converter.cwl_converter import CWLConverterFacade
from sbg_cwl_upgrader.cwl_utils import ... | 40.190476 | 78 | 0.557662 |
acfe52fa9c2bdd80b5ba5525b3275b84fce1ad14 | 17,848 | py | Python | sdk/python/pulumi_gcp/compute/organization_security_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 121 | 2018-06-18T19:16:42.000Z | 2022-03-31T06:06:48.000Z | sdk/python/pulumi_gcp/compute/organization_security_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 492 | 2018-06-22T19:41:03.000Z | 2022-03-31T15:33:53.000Z | sdk/python/pulumi_gcp/compute/organization_security_policy.py | sisisin/pulumi-gcp | af6681d70ea457843409110c1324817fe55f68ad | [
"ECL-2.0",
"Apache-2.0"
] | 43 | 2018-06-19T01:43:13.000Z | 2022-03-23T22:43:37.000Z | # 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 42.293839 | 146 | 0.648812 |
acfe5341cfb369ac454e5038976504e054b4df20 | 2,370 | py | Python | software/param2tex.py | JDLopes/iob-tex | 45b5dc775e67631ed120740b297c74b78fb5436a | [
"MIT"
] | 2 | 2020-12-08T17:20:21.000Z | 2022-01-01T22:17:24.000Z | software/param2tex.py | JDLopes/iob-tex | 45b5dc775e67631ed120740b297c74b78fb5436a | [
"MIT"
] | 3 | 2021-09-12T08:55:58.000Z | 2021-11-30T19:28:20.000Z | software/param2tex.py | JDLopes/iob-tex | 45b5dc775e67631ed120740b297c74b78fb5436a | [
"MIT"
] | 10 | 2020-11-13T00:18:41.000Z | 2021-07-28T20:23:28.000Z | #!/usr/bin/python2
#
# Build Latex tables of verilog module interface signals and registers
#
import sys
import os.path
import re
from vhparser import header_parse
def param_parse (program, vhfile) :
defines = {}
if 'vhfile' in locals():
#Creates header dictionary
defines = header_parse(vh... | 29.259259 | 132 | 0.546414 |
acfe54c8918d83d89de571337df7c76166511c47 | 2,216 | py | Python | setup.py | Daniel-Han-Yang/catcher_modules | 2eff08d2c19719539f761a7cae0a48b69a3231db | [
"Apache-2.0"
] | null | null | null | setup.py | Daniel-Han-Yang/catcher_modules | 2eff08d2c19719539f761a7cae0a48b69a3231db | [
"Apache-2.0"
] | null | null | null | setup.py | Daniel-Han-Yang/catcher_modules | 2eff08d2c19719539f761a7cae0a48b69a3231db | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
import catcher_modules
def get_requirements() -> list:
with open('requirements.txt', 'r') as f:
return f.readlines()
def extras() -> dict:
modules = {
'kafka': ["pykafka==2.8.0"],
'couchbase': ["couchbase==3.2.4"],
'postgres': ["sq... | 37.559322 | 90 | 0.581227 |
acfe54edfb5bcb4e68db87ab6b06405abbe72a2b | 586 | py | Python | personalcomputer.py | ThanasisTop/OOP-with-Python | 9dd5d69bb2e4f4e9d1a2b99efac4a0277222a453 | [
"MIT"
] | null | null | null | personalcomputer.py | ThanasisTop/OOP-with-Python | 9dd5d69bb2e4f4e9d1a2b99efac4a0277222a453 | [
"MIT"
] | null | null | null | personalcomputer.py | ThanasisTop/OOP-with-Python | 9dd5d69bb2e4f4e9d1a2b99efac4a0277222a453 | [
"MIT"
] | null | null | null | from pctower import *
from pcscreen import *
class PersonalComputer(PCTower, PCScreen):
def __init__(self, memorysize, frequency , screensize, drivercapacity):
PCTower.__init__(self, memorysize, frequency) #Διατηρω τη κληρονομικοτητα απο την PCTower
PCScreen.__init__(self, screensize) #Διατηρω τη κλη... | 48.833333 | 96 | 0.74744 |
acfe55009a97933acc153a8d70f166edd65b9ca0 | 11,776 | py | Python | model_sequence.py | gdgrant/Associative-Transfer | a9c72e5fd01c9ecb81387f80d7b8302a920ab13e | [
"Apache-2.0"
] | 1 | 2019-01-28T20:08:03.000Z | 2019-01-28T20:08:03.000Z | model_sequence.py | gdgrant/Associative-Transfer | a9c72e5fd01c9ecb81387f80d7b8302a920ab13e | [
"Apache-2.0"
] | null | null | null | model_sequence.py | gdgrant/Associative-Transfer | a9c72e5fd01c9ecb81387f80d7b8302a920ab13e | [
"Apache-2.0"
] | null | null | null | ### Authors: Nicolas Y. Masse, Gregory D. Grant
# Required packages
import tensorflow as tf
import numpy as np
import pickle
import os, sys, time
# Plotting suite
import matplotlib
#matplotlib.use('Agg')
import matplotlib.pyplot as plt
# Model modules
from parameters_sequence import *
import stimulus_sequence
import... | 37.148265 | 132 | 0.673573 |
acfe5502003a0194a78c4117143b721c5e9c1d96 | 2,155 | py | Python | tests/models/symbol/new_lock_key_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 5 | 2016-08-23T17:52:22.000Z | 2019-05-16T08:45:30.000Z | tests/models/symbol/new_lock_key_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 2 | 2016-11-10T05:30:21.000Z | 2019-04-05T15:03:37.000Z | tests/models/symbol/new_lock_key_test.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 7 | 2016-08-25T16:11:44.000Z | 2021-02-22T05:31:25.000Z | #!/usr/bin/env python
# coding: utf-8
"""
The Clear BSD License
Copyright (c) – 2016, NetApp, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions... | 56.710526 | 845 | 0.770766 |
acfe553371b34bf0c741f28db46b496ceefbe344 | 2,546 | py | Python | bin/bed2subtractScoresFromBed.py | odingsy/NGStoolkit | 68d73810351550b9ba75f9184f26bc8e55708fcc | [
"MIT"
] | 2 | 2018-05-05T06:24:51.000Z | 2021-07-04T22:24:13.000Z | bin/bed2subtractScoresFromBed.py | odingsy/NGStoolkit | 68d73810351550b9ba75f9184f26bc8e55708fcc | [
"MIT"
] | null | null | null | bin/bed2subtractScoresFromBed.py | odingsy/NGStoolkit | 68d73810351550b9ba75f9184f26bc8e55708fcc | [
"MIT"
] | 2 | 2020-12-27T22:02:29.000Z | 2021-05-28T20:28:26.000Z | #!/usr/bin/env python
import os
import sys
import argparse
import tempfile
from itertools import izip
from bed import bedline
parser = argparse.ArgumentParser(description='subtraction of the scores between two files: b - a')
parser.add_argument('-a', required= False, help='a of b - a')
parser.add_argument('-b', requi... | 25.717172 | 98 | 0.61194 |
acfe55a5e197b407167c2e020a940cf528c898f8 | 3,575 | py | Python | dbtmetabase/__init__.py | davideanastasia/dbt-metabase | 34044d1b7c3ac2db507a43ec6ed653fa2c4312e9 | [
"MIT"
] | null | null | null | dbtmetabase/__init__.py | davideanastasia/dbt-metabase | 34044d1b7c3ac2db507a43ec6ed653fa2c4312e9 | [
"MIT"
] | null | null | null | dbtmetabase/__init__.py | davideanastasia/dbt-metabase | 34044d1b7c3ac2db507a43ec6ed653fa2c4312e9 | [
"MIT"
] | null | null | null | import logging
from .dbt import DbtReader
from .metabase import MetabaseClient
__version__ = '0.5.1'
def export(dbt_path: str,
mb_host: str, mb_user: str, mb_password: str,
database: str, schema: str,
mb_https = True, sync = True, sync_timeout = 30,
includes = [], excludes = []):
... | 44.6875 | 136 | 0.657063 |
acfe56709286bffd5aeff2ef0ef47d0137fd7126 | 18,062 | py | Python | kivy/tests/common.py | HishamAK/kivy | 991ae22ec6af71e5188570daabd62ba128b226e5 | [
"MIT"
] | 1 | 2022-01-24T14:20:05.000Z | 2022-01-24T14:20:05.000Z | kivy/tests/common.py | Fxztam/kivy | 90a4e75f9aebd6ee6c7d8635faac0c492c869e64 | [
"MIT"
] | null | null | null | kivy/tests/common.py | Fxztam/kivy | 90a4e75f9aebd6ee6c7d8635faac0c492c869e64 | [
"MIT"
] | 1 | 2022-01-19T09:10:47.000Z | 2022-01-19T09:10:47.000Z | '''
This is a extended unittest module for Kivy, to make unittests based on
graphics with an OpenGL context.
The idea is to render a Widget tree, and after 1, 2 or more frames, a
screenshot will be made and be compared to the original one.
If no screenshot exists for the current test, the very first one will be used.
... | 34.535373 | 79 | 0.57203 |
acfe57e8bdc9388362940d9496366fc0738f636d | 2,590 | py | Python | server/app.py | adeept/adeept_alter | 6adf00eb141405fc3abad44965f81ba7797dd962 | [
"MIT"
] | 1 | 2021-12-21T15:50:57.000Z | 2021-12-21T15:50:57.000Z | server/app.py | adeept/adeept_alter | 6adf00eb141405fc3abad44965f81ba7797dd962 | [
"MIT"
] | 2 | 2021-03-14T22:05:42.000Z | 2021-07-19T22:13:37.000Z | server/app.py | adeept/adeept_alter | 6adf00eb141405fc3abad44965f81ba7797dd962 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from importlib import import_module
import os
from flask import Flask, render_template, Response, send_from_directory
from flask_cors import *
# import camera driver
from camera_opencv import Camera
from camera_opencv import commandAct
import threading
# Raspberry Pi camera module (requires pica... | 30.116279 | 143 | 0.679537 |
acfe58865166e5eb1b5af3d025f8eaf3c17864ec | 19,507 | py | Python | release/scripts/addons/add_mesh_BoltFactory/Boltfactory.py | simileV/blenderStereo29 | 09b993449aaca671a9eb2a6a22327246936eb3db | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2020-07-20T15:41:58.000Z | 2020-07-20T15:41:58.000Z | release/scripts/addons/add_mesh_BoltFactory/Boltfactory.py | ringsce/Rings3D | 8059d1e2460fc8d6f101eff8e695f68a99f6671d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | release/scripts/addons/add_mesh_BoltFactory/Boltfactory.py | ringsce/Rings3D | 8059d1e2460fc8d6f101eff8e695f68a99f6671d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 35.661792 | 87 | 0.566053 |
acfe58cbd4c863d0884a7d3b62947d294fe39a9c | 24,496 | py | Python | got10k/experiments/vot.py | mhd-medfa/got10k-toolkit | 47f31a11f0ae1d4f7e6b2db6d22e71eb28a6e792 | [
"MIT"
] | 3 | 2020-04-20T16:43:39.000Z | 2021-06-14T09:40:15.000Z | got10k/experiments/vot.py | mhd-medfa/got10k-toolkit | 47f31a11f0ae1d4f7e6b2db6d22e71eb28a6e792 | [
"MIT"
] | null | null | null | got10k/experiments/vot.py | mhd-medfa/got10k-toolkit | 47f31a11f0ae1d4f7e6b2db6d22e71eb28a6e792 | [
"MIT"
] | 2 | 2019-11-14T16:53:32.000Z | 2021-11-11T20:45:25.000Z | from __future__ import absolute_import, division, print_function
import time
import numpy as np
import os
import glob
import warnings
import json
from PIL import Image
from ..datasets import VOT
from ..utils.metrics import poly_iou
from ..utils.viz import show_frame
class ExperimentVOT(object):
r"""Experiment p... | 39.766234 | 94 | 0.494571 |
acfe59306b1e711402f54bffa6fa447b647c75c1 | 430 | py | Python | my_scripts/print_model_args.py | varisd/fairseq | 69e2be6ff9b7d130a7454fd1b6a21031f669c622 | [
"MIT"
] | null | null | null | my_scripts/print_model_args.py | varisd/fairseq | 69e2be6ff9b7d130a7454fd1b6a21031f669c622 | [
"MIT"
] | null | null | null | my_scripts/print_model_args.py | varisd/fairseq | 69e2be6ff9b7d130a7454fd1b6a21031f669c622 | [
"MIT"
] | 1 | 2022-03-30T19:38:11.000Z | 2022-03-30T19:38:11.000Z | #!/usr/bin/env python3
import argparse
import torch
def main(args):
ckpt = torch.load(args.checkpoint)
ns = ckpt["args"]
for line in ns.__dict__.items():
print(line)
def parse_args():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--checkpoint",... | 17.2 | 57 | 0.655814 |
acfe59395534120396139fc27e6463769341de2d | 1,785 | py | Python | applications/plano_de_acao/models/models.py | amaurirg/Web2Py | 235571cd2273a858cbc8f291731672eadf6b8206 | [
"BSD-3-Clause"
] | null | null | null | applications/plano_de_acao/models/models.py | amaurirg/Web2Py | 235571cd2273a858cbc8f291731672eadf6b8206 | [
"BSD-3-Clause"
] | null | null | null | applications/plano_de_acao/models/models.py | amaurirg/Web2Py | 235571cd2273a858cbc8f291731672eadf6b8206 | [
"BSD-3-Clause"
] | null | null | null | DEP = db.define_table('departamento',
Field('setor'),
format = '%(setor)s'
# format=lambda r: r.setor or 'anonymous'
)
PROB = db.define_table('problemas',
Field('problema'),
format = '%(problema)s'
)
PLANO = db.define_table('plano',
Field('depto', 'reference departamento', notnull=True, ondelete='SET NULL', ... | 36.428571 | 100 | 0.673389 |
acfe5a2dfc5c1ee7c86106139ccad203eede6ed2 | 2,702 | py | Python | homeassistant/components/rest/entity.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | homeassistant/components/rest/entity.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 87 | 2020-07-06T22:22:54.000Z | 2022-03-31T06:01:46.000Z | homeassistant/components/rest/entity.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """The base entity for the rest component."""
from abc import abstractmethod
from typing import Any
from homeassistant.core import callback
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from .data import RestData
class RestEntity(Entity):... | 30.022222 | 87 | 0.65359 |
acfe5c53c338f9fae073036dbf7c3a2939f275a0 | 5,063 | py | Python | glassimaging/dataloading/brainmask.py | koenyyy/glassimaging | fade5e849f185e727bc0da6cfeb1eccb8994ca48 | [
"Apache-2.0"
] | 2 | 2019-09-09T14:26:45.000Z | 2020-02-27T10:42:49.000Z | glassimaging/dataloading/brainmask.py | koenyyy/glassimaging | fade5e849f185e727bc0da6cfeb1eccb8994ca48 | [
"Apache-2.0"
] | null | null | null | glassimaging/dataloading/brainmask.py | koenyyy/glassimaging | fade5e849f185e727bc0da6cfeb1eccb8994ca48 | [
"Apache-2.0"
] | 4 | 2019-07-02T08:13:01.000Z | 2020-08-30T06:52:48.000Z | # -*- coding: utf-8 -*-
import glob
import os
import pandas as pd
from glassimaging.dataloading.niftidataset import NiftiDataset
import logging
import json
import nibabel as nib
import numpy as np
from torch.utils.data import Dataset
class BrainmaskDataloader(NiftiDataset):
available_sequences = ['flair', 't1',... | 36.164286 | 162 | 0.56587 |
acfe5cd619759d450788b537a799780efc34d605 | 4,707 | py | Python | cors/cors_options.py | optimizely/cors-python | d3fd6ff20b5c1a05ede0950ce817e584bb969d81 | [
"MIT"
] | null | null | null | cors/cors_options.py | optimizely/cors-python | d3fd6ff20b5c1a05ede0950ce817e584bb969d81 | [
"MIT"
] | null | null | null | cors/cors_options.py | optimizely/cors-python | d3fd6ff20b5c1a05ede0950ce817e584bb969d81 | [
"MIT"
] | 1 | 2021-02-14T11:58:36.000Z | 2021-02-14T11:58:36.000Z | """Options for configuring the CORS handler."""
import types
from cors import validators
ALL_ORIGINS = '*'
DEFAULT_METHODS = ['HEAD', 'GET', 'PUT', 'POST', 'DELETE']
class CorsOptions(object):
"""Stores options for configuring the CORS handler."""
def __init__(self,
allow_origins=True,
... | 40.230769 | 79 | 0.65307 |
acfe5d1bdcc0ba8282f2192c06fcb61beb67c432 | 6,692 | py | Python | tutorials/Tutorial1_Basic_QA_Pipeline.py | IamMarcIvanov/haystack | 4f30f038226886114087fa1369d7b86bafe63bc6 | [
"Apache-2.0"
] | null | null | null | tutorials/Tutorial1_Basic_QA_Pipeline.py | IamMarcIvanov/haystack | 4f30f038226886114087fa1369d7b86bafe63bc6 | [
"Apache-2.0"
] | null | null | null | tutorials/Tutorial1_Basic_QA_Pipeline.py | IamMarcIvanov/haystack | 4f30f038226886114087fa1369d7b86bafe63bc6 | [
"Apache-2.0"
] | null | null | null | # ## Task: Question Answering for Game of Thrones
#
# Question Answering can be used in a variety of use cases. A very common one: Using it to navigate through complex
# knowledge bases or long documents ("search setting").
#
# A "knowledge base" could for example be your website, an internal wiki or a collection of f... | 45.52381 | 118 | 0.771518 |
acfe5d9440df81da0e58194ca2c9931db2f28bca | 1,113 | py | Python | icecaps/estimators/persona_seq2seq_estimator.py | entn-at/icecaps | caba26258e2054f239f39545fae97c9e67da789f | [
"MIT"
] | 277 | 2019-07-31T17:23:42.000Z | 2022-01-28T11:19:16.000Z | icecaps/estimators/persona_seq2seq_estimator.py | arita37/icecaps | caba26258e2054f239f39545fae97c9e67da789f | [
"MIT"
] | 15 | 2019-09-04T14:28:38.000Z | 2022-03-31T09:18:11.000Z | icecaps/estimators/persona_seq2seq_estimator.py | arita37/icecaps | caba26258e2054f239f39545fae97c9e67da789f | [
"MIT"
] | 47 | 2019-08-29T19:54:48.000Z | 2021-09-18T05:30:07.000Z | import tensorflow as tf
import copy
from icecaps.estimators.estimator_chain import EstimatorChain
from icecaps.estimators.seq2seq_encoder_estimator import Seq2SeqEncoderEstimator
from icecaps.estimators.persona_seq2seq_decoder_estimator import PersonaSeq2SeqDecoderEstimator
class PersonaSeq2SeqEstimator(EstimatorCha... | 41.222222 | 99 | 0.734052 |
acfe5da808b1427a1334e7f1e39b2c4508cc5059 | 11,446 | py | Python | OracleWebCenterSites/kubernetes/common/createFMWRestrictedJRFDomain.py | rishiagarwal-oracle/fmw-kubernetes | cf53d0aac782cacaa26cb1f8f1cdb7130f69d64f | [
"UPL-1.0",
"MIT"
] | 20 | 2020-09-18T08:28:06.000Z | 2021-11-04T11:48:53.000Z | OracleWebCenterSites/kubernetes/common/createFMWRestrictedJRFDomain.py | rishiagarwal-oracle/fmw-kubernetes | cf53d0aac782cacaa26cb1f8f1cdb7130f69d64f | [
"UPL-1.0",
"MIT"
] | 17 | 2020-10-29T03:52:52.000Z | 2022-03-29T06:47:05.000Z | OracleWebCenterSites/kubernetes/common/createFMWRestrictedJRFDomain.py | rishiagarwal-oracle/fmw-kubernetes | cf53d0aac782cacaa26cb1f8f1cdb7130f69d64f | [
"UPL-1.0",
"MIT"
] | 27 | 2020-04-30T09:06:37.000Z | 2022-03-29T06:49:06.000Z | # Copyright (c) 2014, 2021, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
import os
import sys
import com.oracle.cie.domain.script.jython.WLSTException as WLSTException
class Infra12213Provisioner:
MACHINES = {
'mac... | 39.19863 | 175 | 0.601171 |
acfe5db7c8ca3a7cb5be561059f1eceb46d2a4d7 | 747 | py | Python | GEOS_Util/coupled_diagnostics/analysis/tseries/sst_gm.py | GEOS-ESM/GMAO_Shared | 022af23abbc7883891006b57379be96d9a50df23 | [
"NASA-1.3",
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-02-01T17:36:53.000Z | 2020-02-01T17:36:53.000Z | GEOS_Util/coupled_diagnostics/analysis/tseries/sst_gm.py | GEOS-ESM/GMAO_Shared | 022af23abbc7883891006b57379be96d9a50df23 | [
"NASA-1.3",
"ECL-2.0",
"Apache-2.0"
] | 105 | 2019-07-08T19:27:23.000Z | 2022-03-22T02:12:16.000Z | GEOS_Util/coupled_diagnostics/analysis/tseries/sst_gm.py | GEOS-ESM/GMAO_Shared | 022af23abbc7883891006b57379be96d9a50df23 | [
"NASA-1.3",
"ECL-2.0",
"Apache-2.0"
] | 10 | 2019-07-05T18:00:44.000Z | 2022-03-11T16:26:29.000Z | #!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import os, sys
import matplotlib.pyplot as pl
from matplotlib import dates
import g5lib.plotters as ptrs
from g5lib import g5dset
exp=g5dset.read_exp(sys.argv[1])
varname='TS'
exp.ctl=g5dset.Ctl(exp,'geosgcm_ocn2d')
exp.gm=exp.ctl(varname).aave(); exp.gm... | 19.153846 | 55 | 0.716198 |
acfe5dc7af8834b4d1adabbd93a270ec23ea7675 | 845 | py | Python | docs/conf.py | ghuntley/rules_haskell | adc3503387fbb54173dc4b4f21ae0aefe33759a4 | [
"Apache-2.0"
] | 222 | 2017-11-06T09:01:12.000Z | 2022-03-28T08:24:22.000Z | docs/conf.py | ghuntley/rules_haskell | adc3503387fbb54173dc4b4f21ae0aefe33759a4 | [
"Apache-2.0"
] | 1,168 | 2017-11-19T07:43:13.000Z | 2022-03-31T12:40:39.000Z | docs/conf.py | ghuntley/rules_haskell | adc3503387fbb54173dc4b4f21ae0aefe33759a4 | [
"Apache-2.0"
] | 94 | 2017-11-17T22:46:37.000Z | 2022-03-15T00:16:56.000Z | project = 'rules_haskell'
copyright = '2018, The rules_haskell authors'
source_suffix = '.rst'
extensions = [
'sphinx.ext.graphviz',
'sphinx.ext.todo',
]
master_doc = 'index'
language = None
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
pygments_style = 'sphinx'
html_theme = 'alabaster'
html_... | 20.119048 | 70 | 0.68284 |
acfe5e42fa391d9ac072e5a2e4d70c721cb543f8 | 8,265 | py | Python | data/models/farmer.py | SIXMON/peps | 48c09a951a0193ada7b91c8bb6efc4b1232c3520 | [
"MIT"
] | 5 | 2019-08-29T13:55:47.000Z | 2021-11-15T08:30:33.000Z | data/models/farmer.py | SIXMON/peps | 48c09a951a0193ada7b91c8bb6efc4b1232c3520 | [
"MIT"
] | 295 | 2019-08-19T12:40:29.000Z | 2022-01-24T14:03:20.000Z | data/models/farmer.py | SIXMON/peps | 48c09a951a0193ada7b91c8bb6efc4b1232c3520 | [
"MIT"
] | 7 | 2020-05-27T06:28:48.000Z | 2021-11-17T10:00:54.000Z | import uuid
from urllib.parse import quote
from django.utils import timezone
from django.contrib.auth import get_user_model
from django.db import models, connection
from django.db.models import JSONField
from django.utils.html import mark_safe
from django_better_admin_arrayfield.models.fields import ArrayField
from dat... | 40.915842 | 125 | 0.697641 |
acfe5e49e4afbc279e91160ea9b864c1835ff9ef | 31,263 | py | Python | evaluate.py | earthobservatory/standard_product_completeness_evaluator | a3eb04bfb9d200615f0480bbd1032fe80026bd0f | [
"Apache-2.0"
] | null | null | null | evaluate.py | earthobservatory/standard_product_completeness_evaluator | a3eb04bfb9d200615f0480bbd1032fe80026bd0f | [
"Apache-2.0"
] | null | null | null | evaluate.py | earthobservatory/standard_product_completeness_evaluator | a3eb04bfb9d200615f0480bbd1032fe80026bd0f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
'''
Input are either an AOI or a GUNW/GUNW-merged. For a given input product, determines which GUNWs/GUNW merged
are complete along track over the AOI (or, if a GUNW, any AOIs). If there are complete
products, it tags the product with <aoi_name> tag, and creates an AOI_TRACK product
for all GUNWs... | 48.620529 | 180 | 0.624892 |
acfe5fe3a35f4d19d1041e7e5344a9b5914b4851 | 610 | py | Python | target_snowflake/upload_clients/base_upload_client.py | dext/pipelinewise-target-snowflake | 8e92166771dcc35302c5d44cc60660cbefdd3564 | [
"Apache-2.0"
] | null | null | null | target_snowflake/upload_clients/base_upload_client.py | dext/pipelinewise-target-snowflake | 8e92166771dcc35302c5d44cc60660cbefdd3564 | [
"Apache-2.0"
] | null | null | null | target_snowflake/upload_clients/base_upload_client.py | dext/pipelinewise-target-snowflake | 8e92166771dcc35302c5d44cc60660cbefdd3564 | [
"Apache-2.0"
] | null | null | null | """
Base class for upload clients
"""
from abc import ABC, abstractmethod
from singer import get_logger
class BaseUploadClient(ABC):
"""
Abstract class for upload clients
"""
def __init__(self, connection_config):
self.connection_config = connection_config
self.logger = get_logger('tar... | 22.592593 | 80 | 0.627869 |
acfe60c22ccc60a0dcf7bc33493ce8f3aea7f7cb | 3,290 | py | Python | api-client/pangea_api/contrib/tagging/tag.py | LongTailBio/pangea-django | 630551dded7f9e38f95eda8c36039e0de46961e7 | [
"MIT"
] | null | null | null | api-client/pangea_api/contrib/tagging/tag.py | LongTailBio/pangea-django | 630551dded7f9e38f95eda8c36039e0de46961e7 | [
"MIT"
] | 27 | 2020-03-26T02:55:12.000Z | 2022-03-12T00:55:04.000Z | api-client/pangea_api/contrib/tagging/tag.py | LongTailBio/pangea-django | 630551dded7f9e38f95eda8c36039e0de46961e7 | [
"MIT"
] | 1 | 2021-09-14T08:15:54.000Z | 2021-09-14T08:15:54.000Z |
from ...remote_object import RemoteObject
from ...sample import Sample
from ...sample_group import SampleGroup
from ...blob_constructors import sample_from_blob, sample_group_from_blob
from ...utils import paginated_iterator
class Tag(RemoteObject):
remote_fields = [
'uuid',
'created_at',
... | 31.941748 | 75 | 0.609726 |
acfe60c34889e4194ab036c7583edae7109958f1 | 712 | py | Python | greenberry/math.py | 5aumy4/greenBerry | d0e292bdb19a554355a0b022118bbfb92f8eba87 | [
"Apache-2.0"
] | 56 | 2018-01-01T16:12:03.000Z | 2022-01-19T06:32:13.000Z | greenberry/math.py | 5aumy4/greenBerry | d0e292bdb19a554355a0b022118bbfb92f8eba87 | [
"Apache-2.0"
] | 49 | 2018-01-02T09:04:40.000Z | 2022-02-14T14:44:55.000Z | greenberry/math.py | 5aumy4/greenBerry | d0e292bdb19a554355a0b022118bbfb92f8eba87 | [
"Apache-2.0"
] | 50 | 2018-01-01T17:01:17.000Z | 2022-02-14T14:45:28.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 9 11:02:15 2018
@author: KraftyCoder
Notes : All Rights Reserved
see theory_notes_simple.py in folder 'greenberry'
"""
L_User = "dear berry"
class M: # math
ODD = "odd"
EVEN = "even"
PRIME = "prime"
PI = "pi"
LOG = "log"
LOG10 = "log10" # log(... | 27.384615 | 71 | 0.613764 |
acfe616ff416c15338d2bbfce7e7e3f3e756beb4 | 10,338 | py | Python | custom_components/sonoff/sonoff_main.py | womeimingzi11/SonoffLAN | a28d69faf5a4d881d7bfd081727a1e27be154e9e | [
"MIT"
] | 1 | 2021-03-27T17:32:12.000Z | 2021-03-27T17:32:12.000Z | custom_components/sonoff/sonoff_main.py | womeimingzi11/SonoffLAN | a28d69faf5a4d881d7bfd081727a1e27be154e9e | [
"MIT"
] | null | null | null | custom_components/sonoff/sonoff_main.py | womeimingzi11/SonoffLAN | a28d69faf5a4d881d7bfd081727a1e27be154e9e | [
"MIT"
] | null | null | null | import asyncio
import json
import logging
import os
import time
from typing import Optional, List, Callable
from aiohttp import ClientSession
from homeassistant.const import ATTR_BATTERY_LEVEL
from .sonoff_cloud import EWeLinkCloud
from .sonoff_local import EWeLinkLocal
_LOGGER = logging.getLogger(__name__)
ATTRS =... | 34.46 | 78 | 0.587444 |
acfe61904c96d94c9c05c1cd829ebd977256acc9 | 5,176 | py | Python | dotapatch/__main__.py | arthurazs/dotapatch | 1b9db278d0d418124bfd3e66fb288ee81cbd66ec | [
"MIT"
] | 12 | 2018-03-02T10:03:14.000Z | 2019-05-30T17:56:09.000Z | dotapatch/__main__.py | arthurazs/dotapatch | 1b9db278d0d418124bfd3e66fb288ee81cbd66ec | [
"MIT"
] | 28 | 2016-11-07T16:16:24.000Z | 2018-07-30T21:16:54.000Z | dotapatch/__main__.py | arthurazs/dotapatch | 1b9db278d0d418124bfd3e66fb288ee81cbd66ec | [
"MIT"
] | 2 | 2018-03-29T07:02:14.000Z | 2018-12-01T16:00:35.000Z | '''dotapatch's entry point'''
from __future__ import absolute_import
import os.path as path
from argparse import ArgumentParser
from logging import DEBUG, StreamHandler, Formatter, FileHandler
from logging import getLogger as get_logger, getLevelName as get_level
from dotapatch.version import __version__
from dotapatch... | 29.078652 | 76 | 0.621716 |
acfe642939549c9ca2ffa058ff16a245c24495aa | 501 | py | Python | episode-12/models/flat.py | CrispyFlowe/python-minecraft-clone | ef6ce2e1381b4c97f03c2106c399ed0a0729a968 | [
"MIT"
] | 1 | 2022-02-23T06:26:41.000Z | 2022-02-23T06:26:41.000Z | episode-12/models/pressure_plate.py | CrispyFlowe/python-minecraft-clone | ef6ce2e1381b4c97f03c2106c399ed0a0729a968 | [
"MIT"
] | null | null | null | episode-12/models/pressure_plate.py | CrispyFlowe/python-minecraft-clone | ef6ce2e1381b4c97f03c2106c399ed0a0729a968 | [
"MIT"
] | null | null | null | transparent = True
is_cube = False
glass = False
colliders = []
vertex_positions = [
[ 0.5, -0.4375, 0.5, 0.5, -0.4375, -0.5, -0.5, -0.4375, -0.5, -0.5, -0.4375, 0.5], # top
[-0.5, -0.4375, 0.5, -0.5, -0.4375, -0.5, 0.5, -0.4375, -0.5, 0.5, -0.4375, 0.5], # bottom
]
tex_coords = [
[0.0, 1.0, 0.0, 0.... | 25.05 | 98 | 0.461078 |
acfe66c0cad2136728b7a721af90c4bc98852f92 | 10,506 | py | Python | mechroutines/pf/models/blocks.py | sjklipp/mechdriver | 17c3d9bc82116954b331955e87a60e9adc5e1de9 | [
"Apache-2.0"
] | null | null | null | mechroutines/pf/models/blocks.py | sjklipp/mechdriver | 17c3d9bc82116954b331955e87a60e9adc5e1de9 | [
"Apache-2.0"
] | null | null | null | mechroutines/pf/models/blocks.py | sjklipp/mechdriver | 17c3d9bc82116954b331955e87a60e9adc5e1de9 | [
"Apache-2.0"
] | null | null | null | """ Writes the MESS strings for various species and treatments
using data read from the save filesystem.
"""
import automol.combine
import mess_io
from phydat import phycon
def barrier_dat_block(ts_dct, reac_dcts, prod_dcts):
""" prepare a block for data for the barrier
"""
flux_dat = {} # zero for... | 30.103152 | 79 | 0.635066 |
acfe691fe5e1f80fb8bd14f465794712ce65b32f | 4,965 | py | Python | torchvision/prototype/datasets/_builtin/voc.py | lorenzo-park/vision | ac561bcefd75f503b27e9154938b2a54d560b276 | [
"BSD-3-Clause"
] | null | null | null | torchvision/prototype/datasets/_builtin/voc.py | lorenzo-park/vision | ac561bcefd75f503b27e9154938b2a54d560b276 | [
"BSD-3-Clause"
] | null | null | null | torchvision/prototype/datasets/_builtin/voc.py | lorenzo-park/vision | ac561bcefd75f503b27e9154938b2a54d560b276 | [
"BSD-3-Clause"
] | null | null | null | import functools
import io
import pathlib
from typing import Any, Callable, Dict, List, Optional, Tuple
from xml.etree import ElementTree
import torch
from torchdata.datapipes.iter import (
IterDataPipe,
Mapper,
Filter,
Demultiplexer,
IterKeyZipper,
LineReader,
)
from torchvision.datasets impor... | 34.006849 | 109 | 0.616717 |
acfe69f0804b9792ad83b4e356803271e57f7b47 | 795 | py | Python | src/spaceone/core/handler/mutation_handler.py | jihyungSong/python-core | 898ead301363d3e599ecd645b73071e639f886b0 | [
"Apache-2.0"
] | null | null | null | src/spaceone/core/handler/mutation_handler.py | jihyungSong/python-core | 898ead301363d3e599ecd645b73071e639f886b0 | [
"Apache-2.0"
] | null | null | null | src/spaceone/core/handler/mutation_handler.py | jihyungSong/python-core | 898ead301363d3e599ecd645b73071e639f886b0 | [
"Apache-2.0"
] | null | null | null | import logging
from spaceone.core.handler import BaseMutationHandler
_LOGGER = logging.getLogger(__name__)
class SpaceONEMutationHandler(BaseMutationHandler):
def request(self, params):
role_type = self.transaction.get_meta('authorization.role_type')
domain_id = self.transaction.get_meta('domain... | 33.125 | 85 | 0.654088 |
acfe6a5d50908a9b6fc012cbab0a5ae0461d4c3b | 7,986 | py | Python | python/setup.py | lzt-pro/ray | cc93fee4a47dc9b9f754d0b53ae2f1e4f598aeb1 | [
"Apache-2.0"
] | null | null | null | python/setup.py | lzt-pro/ray | cc93fee4a47dc9b9f754d0b53ae2f1e4f598aeb1 | [
"Apache-2.0"
] | 3 | 2021-06-08T21:46:35.000Z | 2022-03-12T00:35:21.000Z | python/setup.py | lzt-pro/ray | cc93fee4a47dc9b9f754d0b53ae2f1e4f598aeb1 | [
"Apache-2.0"
] | null | null | null | from itertools import chain
import os
import re
import shutil
import subprocess
import sys
from setuptools import setup, find_packages, Distribution
import setuptools.command.build_ext as _build_ext
# Ideally, we could include these files by putting them in a
# MANIFEST.in or using the package_data argument to setup,... | 34.873362 | 79 | 0.652893 |
acfe6a92828bf1285297bedac5bc3853c46a82cc | 188 | py | Python | Beginner/1064.py | LorranSutter/URI-Online-Judge | aef885b9a7caa83484cf172e29eea8ec92fc3627 | [
"MIT"
] | null | null | null | Beginner/1064.py | LorranSutter/URI-Online-Judge | aef885b9a7caa83484cf172e29eea8ec92fc3627 | [
"MIT"
] | null | null | null | Beginner/1064.py | LorranSutter/URI-Online-Judge | aef885b9a7caa83484cf172e29eea8ec92fc3627 | [
"MIT"
] | null | null | null | count = 0
soma = 0
for k in range(6):
num = float(input())
if num > 0:
count += 1
soma += num
print("%d valores positivos" % (count))
print("%.1f" % (soma/count))
| 17.090909 | 39 | 0.521277 |
acfe6b285152bf3c061799a660f181e89b4380b5 | 666 | py | Python | Python/pyworkout/files/ex18_mod2.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | null | null | null | Python/pyworkout/files/ex18_mod2.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | 3 | 2020-03-24T16:26:35.000Z | 2020-04-15T19:40:41.000Z | Python/pyworkout/files/ex18_mod2.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | null | null | null | from io import StringIO
from venv import create
def create_tsv_content(
lines_cnt: int = 10
) -> StringIO:
content = '\n'.join([
f'{line_idx}\t{line_idx*100}'
for line_idx in range(lines_cnt)
])
tsv_content = StringIO(content)
return tsv_content
def assess_content(
content: S... | 18.5 | 54 | 0.641141 |
acfe6e51771939b22d47704660d3669b1a06dfe4 | 3,814 | py | Python | ts/nni_manager/config/dlc/dlcUtil.py | Microsoft/nni | b99e26833287c901f6d808d07ea6882014b05f58 | [
"MIT"
] | 2,305 | 2018-09-07T12:42:26.000Z | 2019-05-06T20:14:24.000Z | ts/nni_manager/config/dlc/dlcUtil.py | Eurus-Holmes/nni | 45af1d6b79b355d3e013f1eae2f4c193bbd84074 | [
"MIT"
] | 379 | 2018-09-10T10:19:50.000Z | 2019-05-06T18:04:46.000Z | ts/nni_manager/config/dlc/dlcUtil.py | Eurus-Holmes/nni | 45af1d6b79b355d3e013f1eae2f4c193bbd84074 | [
"MIT"
] | 314 | 2018-09-08T05:36:08.000Z | 2019-05-06T08:48:51.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import logging
import os
import pathlib
import sys
import traceback
from argparse import ArgumentParser
# ref: https://help.aliyun.com/document_detail/203290.html?spm=a2c4g.11186623.6.727.6f9b5db6bzJh4x
from alibabacloud_pai_dlc20201203.client i... | 37.762376 | 130 | 0.628474 |
acfe6fab25f40648ff9e9c9321fcec4950ab0a21 | 105 | py | Python | library/__init__.py | cddysq/python | d576270263b0b3fffa3fdd2df87d6710159e1415 | [
"MIT"
] | null | null | null | library/__init__.py | cddysq/python | d576270263b0b3fffa3fdd2df87d6710159e1415 | [
"MIT"
] | null | null | null | library/__init__.py | cddysq/python | d576270263b0b3fffa3fdd2df87d6710159e1415 | [
"MIT"
] | null | null | null | # -*-coding:utf-8 -*-
# @author :cddysq
# @date :2021/12/28 17:04
# @version :v1.0.0
""" 自定义解析包 """
| 15 | 28 | 0.52381 |
acfe708392b03f43ffc2d455044953a8444c84ae | 3,289 | py | Python | lcc/stars_processing/tools/stats_manager.py | mavrix93/LightCurvesClassifier | a0a51f033cb8adf45296913f0de0aa2568e0530c | [
"MIT"
] | 12 | 2017-06-07T12:16:06.000Z | 2021-02-28T10:06:44.000Z | lcc/stars_processing/tools/stats_manager.py | mavrix93/LightCurvesClassifier | a0a51f033cb8adf45296913f0de0aa2568e0530c | [
"MIT"
] | 6 | 2017-03-10T21:52:00.000Z | 2021-08-25T15:02:35.000Z | lcc/stars_processing/tools/stats_manager.py | mavrix93/LightCurvesClassifier | a0a51f033cb8adf45296913f0de0aa2568e0530c | [
"MIT"
] | 3 | 2017-05-21T16:20:24.000Z | 2019-06-10T11:06:42.000Z | from matplotlib import pyplot as plt
import os
from lcc.data_manager.status_resolver import StatusResolver
import numpy as np
class StatsManager(object):
"""
Attributes
----------
stats : list
List of dictionaries. They consists of statistical values.
Or at least with "false_positive_... | 24.183824 | 85 | 0.505625 |
acfe708def1e286cb08edf06219bc3975dee1ca6 | 2,779 | py | Python | datasets/wmt18/wmt18.py | TheophileBlard/nlp | 2e0a8639a79b1abc848cff5c669094d40bba0f63 | [
"Apache-2.0"
] | 3 | 2020-05-19T05:15:12.000Z | 2020-10-03T11:44:42.000Z | datasets/wmt18/wmt18.py | TheophileBlard/nlp | 2e0a8639a79b1abc848cff5c669094d40bba0f63 | [
"Apache-2.0"
] | null | null | null | datasets/wmt18/wmt18.py | TheophileBlard/nlp | 2e0a8639a79b1abc848cff5c669094d40bba0f63 | [
"Apache-2.0"
] | 1 | 2020-12-08T10:36:30.000Z | 2020-12-08T10:36:30.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace NLP 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... | 33.890244 | 93 | 0.61425 |
acfe72a3490272e4bbc24bb2ce674b40d242aab3 | 5,963 | py | Python | network/unmix/source/models/unet.py | splitstrument/training | 03d1edd68f3079dc1fba890eebf16fa90eb900f0 | [
"MIT"
] | 4 | 2019-04-10T22:20:12.000Z | 2020-01-27T17:43:48.000Z | network/unmix/source/models/unet.py | splitstrument/training | 03d1edd68f3079dc1fba890eebf16fa90eb900f0 | [
"MIT"
] | 3 | 2019-03-09T12:03:58.000Z | 2020-01-27T17:42:21.000Z | unmix/source/models/unet.py | unmix-io/unmix-net | 873d99da42f80574543c096fcd5b7c8748d2cca0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf8
"""
Keras model for training using a U-Net architecture.
"""
from keras.models import *
from keras.layers import *
from unmix.source.configuration import Configuration
from unmix.source.models.basemodel import BaseModel
# Base implementation from: https://www.kaggle.com/cjansen... | 44.834586 | 88 | 0.589301 |
acfe736abfd681df122e043052682382525a963c | 1,044 | py | Python | exemplo2.py | Nosbielc/DoNotDoze | 62038d401d13bf9ece1ecc5ef070a744b83d176d | [
"MIT"
] | null | null | null | exemplo2.py | Nosbielc/DoNotDoze | 62038d401d13bf9ece1ecc5ef070a744b83d176d | [
"MIT"
] | null | null | null | exemplo2.py | Nosbielc/DoNotDoze | 62038d401d13bf9ece1ecc5ef070a744b83d176d | [
"MIT"
] | null | null | null | import cv2
classificadorFace = cv2.CascadeClassifier('cascades//haarcascade_frontalface_default.xml')
classificadorOlhos = cv2.CascadeClassifier('cascades//haarcascade_eye.xml')
imagem = cv2.imread('pessoas//pessoas4.jpg')
imagemCinza = cv2.cvtColor(imagem, cv2.COLOR_BGR2GRAY)
faceDectadas = classificadorFace.detec... | 38.666667 | 90 | 0.655172 |
acfe7594e87c84822c1e714bdee1113d40584e6e | 7,647 | py | Python | HyAsP/preprocess_fastq.py | fmaguire/HyAsP | 76029d7e4052262ecbe0c19b6aeba2ad17a75c2d | [
"MIT"
] | 7 | 2019-07-16T21:58:22.000Z | 2022-03-31T16:08:51.000Z | HyAsP/preprocess_fastq.py | fmaguire/HyAsP | 76029d7e4052262ecbe0c19b6aeba2ad17a75c2d | [
"MIT"
] | 3 | 2019-10-27T03:03:06.000Z | 2019-12-17T16:43:56.000Z | HyAsP/preprocess_fastq.py | fmaguire/HyAsP | 76029d7e4052262ecbe0c19b6aeba2ad17a75c2d | [
"MIT"
] | 7 | 2019-07-10T23:05:36.000Z | 2021-07-14T07:35:35.000Z | #!/usr/bin/env python
# Performs adapter trimming, quality filtering and length filtering with Trim Galore and sickle.
# Different combinations of (un)paired short and long reads are possible as input.
#
# The default quality and length thresholds were chosen as in Trim Galore and sickle.
#
# Requirements:
# - sickle... | 66.495652 | 203 | 0.695828 |
acfe75fe33e15fa66676478098c96da26798de03 | 10,052 | py | Python | swift/common/middleware/ratelimit.py | CiscoSystems/swift | d5067017f0509129d8d3e41aeff5d7c2a634643e | [
"Apache-2.0"
] | null | null | null | swift/common/middleware/ratelimit.py | CiscoSystems/swift | d5067017f0509129d8d3e41aeff5d7c2a634643e | [
"Apache-2.0"
] | null | null | null | swift/common/middleware/ratelimit.py | CiscoSystems/swift | d5067017f0509129d8d3e41aeff5d7c2a634643e | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 41.709544 | 79 | 0.59809 |
acfe76002ec2fb289da428fa0fc4bac93367ad94 | 6,767 | py | Python | src/main/managers/conflict/base_conflict_manager.py | malcolmwhite/DungeonsAndDragons | f38f36f29b72a2228005756015d400f49e4339b6 | [
"MIT"
] | 4 | 2015-09-09T23:22:26.000Z | 2020-01-04T20:01:06.000Z | src/main/managers/conflict/base_conflict_manager.py | malcolmwhite/DungeonsAndDragons | f38f36f29b72a2228005756015d400f49e4339b6 | [
"MIT"
] | null | null | null | src/main/managers/conflict/base_conflict_manager.py | malcolmwhite/DungeonsAndDragons | f38f36f29b72a2228005756015d400f49e4339b6 | [
"MIT"
] | null | null | null | import logging
from random import shuffle
from src.main.utils.utils import join_multi_line_strings
class BaseConflictManager(object):
"""
Abstract class with core functionality for managing conflicts.
Implementations must implement :py:meth:`base_conflict_manager.BaseConflictManager._pick_conflict` and
... | 42.29375 | 115 | 0.669277 |
acfe768f0c19bf30041057833288aa0085dc34d7 | 235 | py | Python | fastai/callback/all.py | PalaashAgrawal/fastai | 6148ff303d9b8a7fa8730ec01e81820af0515be3 | [
"Apache-2.0"
] | 23,140 | 2017-09-09T18:23:40.000Z | 2022-03-31T11:49:36.000Z | fastai/callback/all.py | PalaashAgrawal/fastai | 6148ff303d9b8a7fa8730ec01e81820af0515be3 | [
"Apache-2.0"
] | 3,077 | 2017-09-16T07:08:31.000Z | 2022-03-31T20:14:16.000Z | fastai/callback/all.py | PalaashAgrawal/fastai | 6148ff303d9b8a7fa8730ec01e81820af0515be3 | [
"Apache-2.0"
] | 8,740 | 2017-09-11T02:19:40.000Z | 2022-03-31T11:29:18.000Z | from .core import *
from .data import *
from .fp16 import *
from .hook import *
from .mixup import *
from .progress import *
from .schedule import *
from .tracker import *
from .rnn import *
from .training import *
from .preds import * | 21.363636 | 23 | 0.723404 |
acfe76d1cf460cbf015087c4553c2d605c8052dd | 4,987 | py | Python | grocery/customer/serializers.py | DeepakDk04/bigbasketClone | 82820d93876a2c3e6caec2725b1c6078e79e3bfb | [
"MIT"
] | null | null | null | grocery/customer/serializers.py | DeepakDk04/bigbasketClone | 82820d93876a2c3e6caec2725b1c6078e79e3bfb | [
"MIT"
] | null | null | null | grocery/customer/serializers.py | DeepakDk04/bigbasketClone | 82820d93876a2c3e6caec2725b1c6078e79e3bfb | [
"MIT"
] | null | null | null | from deliveryservice.models import DeliveryServicer, DeliveryServicerProfile
from rest_framework.serializers import ModelSerializer
from django.contrib.auth.models import User
from products.models import Product
from order.models import Cart, CartItem, Order, OrderItem
from .models import Customer, CustomerProfile, D... | 23.303738 | 76 | 0.683377 |
acfe78f5fe69cf7a5c25609fa887aa6186cc5701 | 6,607 | py | Python | test/IECoreScene/ObjectInterpolationTest.py | carlosg-ie/cortex | 4c866042bd2a6a6bb2076fbbe46a4e28ce54cc59 | [
"BSD-3-Clause"
] | null | null | null | test/IECoreScene/ObjectInterpolationTest.py | carlosg-ie/cortex | 4c866042bd2a6a6bb2076fbbe46a4e28ce54cc59 | [
"BSD-3-Clause"
] | null | null | null | test/IECoreScene/ObjectInterpolationTest.py | carlosg-ie/cortex | 4c866042bd2a6a6bb2076fbbe46a4e28ce54cc59 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2007-2009, Image Engine Design Inc. All rights reserved.
# Copyright (c) 2012, John Haddon. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... | 47.532374 | 176 | 0.710005 |
acfe79c4ee768217fe8835f235f88e8656059100 | 6,569 | py | Python | src/react/properties.py | tomgilbertson/script-server-v1 | bbdf289d3d993a0c81f20c36bce5f3eb064b0261 | [
"Apache-2.0",
"CC0-1.0"
] | 833 | 2016-09-08T13:27:36.000Z | 2022-03-27T07:10:48.000Z | src/react/properties.py | tomgilbertson/script-server-v1 | bbdf289d3d993a0c81f20c36bce5f3eb064b0261 | [
"Apache-2.0",
"CC0-1.0"
] | 528 | 2016-05-23T09:17:04.000Z | 2022-03-30T12:45:50.000Z | src/react/properties.py | tomgilbertson/script-server-v1 | bbdf289d3d993a0c81f20c36bce5f3eb064b0261 | [
"Apache-2.0",
"CC0-1.0"
] | 214 | 2016-09-08T14:46:41.000Z | 2022-03-25T01:04:14.000Z | from collections import UserList, UserDict
from typing import Optional, Iterable as Iterable, Mapping as Mapping, TypeVar
_T = TypeVar('_T')
_KT = TypeVar('_KT')
_VT = TypeVar('_VT')
class Property:
def __init__(self, value=None):
self._value = value
self._observers = []
self.bound = Fal... | 28.314655 | 88 | 0.576648 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.