hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a1d32b3373f3e99817234925c78374b386baf99e | 297 | py | Python | tests/urls.py | jacklinke/replicat-documents | e05ebd0095cd7c0774de503e5bb71d5de8dcd6e7 | [
"MIT"
] | null | null | null | tests/urls.py | jacklinke/replicat-documents | e05ebd0095cd7c0774de503e5bb71d5de8dcd6e7 | [
"MIT"
] | null | null | null | tests/urls.py | jacklinke/replicat-documents | e05ebd0095cd7c0774de503e5bb71d5de8dcd6e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r"^admin/", admin.site.urls),
url(r"^", include("replicat_documents.urls", namespace="replicat_documents")),
]
| 27 | 82 | 0.727273 |
67e4e7f5381e0c6eaaace25ca8e4919f7e85c85e | 4,849 | py | Python | pypaystack/transactions.py | edwardpopoola/paystack-client | c831b902d2802390fbd5d416df99106487dc2e8d | [
"MIT"
] | 32 | 2016-04-01T16:15:02.000Z | 2022-01-31T13:29:14.000Z | pypaystack/transactions.py | edwardpopoola/paystack-client | c831b902d2802390fbd5d416df99106487dc2e8d | [
"MIT"
] | 10 | 2018-03-23T04:59:59.000Z | 2022-03-21T14:28:50.000Z | pypaystack/transactions.py | edwardpopoola/paystack-client | c831b902d2802390fbd5d416df99106487dc2e8d | [
"MIT"
] | 33 | 2016-06-13T18:33:02.000Z | 2022-03-21T12:42:54.000Z | from .baseapi import BaseAPI
from . import utils
from .errors import InvalidDataError
class Transaction(BaseAPI):
def getall(self, start_date=None, end_date=None, status=None, pagination=10):
"""
Gets all your transactions
args:
pagination -- Count of data to return per call
... | 30.30625 | 85 | 0.576201 |
a6c31eaf5c564c1528d8d3c2cd77e560ed9c1b9b | 2,564 | py | Python | plenum/test/pool_transactions/test_nodes_ha_change_back.py | WandyLau/indy-plenum | b7a4c3df4da78a8897f915ddbb57f7b342486d40 | [
"Apache-2.0"
] | null | null | null | plenum/test/pool_transactions/test_nodes_ha_change_back.py | WandyLau/indy-plenum | b7a4c3df4da78a8897f915ddbb57f7b342486d40 | [
"Apache-2.0"
] | null | null | null | plenum/test/pool_transactions/test_nodes_ha_change_back.py | WandyLau/indy-plenum | b7a4c3df4da78a8897f915ddbb57f7b342486d40 | [
"Apache-2.0"
] | 2 | 2017-12-13T21:14:54.000Z | 2021-06-06T15:48:03.000Z | from plenum.common.util import hexToFriendly
from plenum.test.pool_transactions.helper import sdk_send_update_node
from plenum.test.test_node import TestNode, checkNodesConnected
from stp_core.network.port_dispenser import genHa
from plenum.common.config_helper import PNodeConfigHelper
def testChangeNodeHaBack(loope... | 42.032787 | 82 | 0.652886 |
475952ea29226dc21d3dfee2fccd95098070a231 | 74 | py | Python | main.py | sajith-rahim/fs-em | 2e8dde8b5f36ee1e1dfc5407611ec2fb91630c2a | [
"BSD-3-Clause"
] | null | null | null | main.py | sajith-rahim/fs-em | 2e8dde8b5f36ee1e1dfc5407611ec2fb91630c2a | [
"BSD-3-Clause"
] | null | null | null | main.py | sajith-rahim/fs-em | 2e8dde8b5f36ee1e1dfc5407611ec2fb91630c2a | [
"BSD-3-Clause"
] | null | null | null | from examples.RL_dataset import run
if __name__ == '__main__':
run()
| 14.8 | 35 | 0.702703 |
fdf6f8cae26d91e23c7c5e98bf82ad822020f78e | 3,990 | py | Python | torch_geometric/loader/shadow.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 2,350 | 2021-09-12T08:32:50.000Z | 2022-03-31T18:09:36.000Z | torch_geometric/loader/shadow.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 588 | 2021-09-12T08:49:08.000Z | 2022-03-31T21:02:13.000Z | torch_geometric/loader/shadow.py | NucciTheBoss/pytorch_geometric | e220a2c08fa1b2f1672d616c22eac2a67b5c8967 | [
"MIT"
] | 505 | 2021-09-13T13:13:32.000Z | 2022-03-31T15:54:00.000Z | import copy
from typing import Optional
import torch
from torch import Tensor
from torch_sparse import SparseTensor
from torch_geometric.data import Batch, Data
class ShaDowKHopSampler(torch.utils.data.DataLoader):
r"""The ShaDow :math:`k`-hop sampler from the `"Decoupling the Depth and
Scope of Graph Neura... | 38.737864 | 79 | 0.592481 |
cadd8be9fa7b237f4549ff52dbd42cb2300ac8c7 | 1,092 | py | Python | tests/src/year2019/test_day11a.py | lancelote/advent_of_code | 06dda6ca034bc1e86addee7798bb9b2a34ff565b | [
"Unlicense"
] | 10 | 2017-12-11T17:54:52.000Z | 2021-12-09T20:16:30.000Z | tests/src/year2019/test_day11a.py | lancelote/advent_of_code | 06dda6ca034bc1e86addee7798bb9b2a34ff565b | [
"Unlicense"
] | 260 | 2015-12-09T11:03:03.000Z | 2021-12-12T14:32:23.000Z | tests/src/year2019/test_day11a.py | lancelote/advent_of_code | 06dda6ca034bc1e86addee7798bb9b2a34ff565b | [
"Unlicense"
] | null | null | null | """2019 - Day 11 Part 1: Space Police tests."""
from collections import deque
from dataclasses import dataclass
from dataclasses import field
from typing import Deque
from src.year2019.day11a import Color
from src.year2019.day11a import Computer
from src.year2019.day11a import Coordinates
from src.year2019.day11a impo... | 27.3 | 55 | 0.745421 |
c8954766b93e7fb2b725ef2cc597db068d566531 | 493 | py | Python | shrug.py | titouanc/weechat-shrug | fb32d4799c190882bb087d914ec3db0e83303e7b | [
"Apache-2.0"
] | null | null | null | shrug.py | titouanc/weechat-shrug | fb32d4799c190882bb087d914ec3db0e83303e7b | [
"Apache-2.0"
] | null | null | null | shrug.py | titouanc/weechat-shrug | fb32d4799c190882bb087d914ec3db0e83303e7b | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Colleen Murphy
# Apache 2.0
# Source: https://github.com/cmurphy/weechat-shrug
#
import weechat
SHRUG = u"\u00af\_(\u30c4)_/\u00af"
weechat.register("shrug", "krinkle", "0.0.1", "Apache-2.0", "Shrug", "", "")
def shrug(data, buffer, args):
text = (' '.join([args, SHRUG])) if args else SHRUG
... | 29 | 92 | 0.659229 |
b3df3dd393e6741031d169e57c7d12595d4b66da | 635 | py | Python | homeassistant/components/nest/sensor.py | BrianWithAHat/core | 9c6c8912fb754a942ea95c36281dd95af397325c | [
"Apache-2.0"
] | null | null | null | homeassistant/components/nest/sensor.py | BrianWithAHat/core | 9c6c8912fb754a942ea95c36281dd95af397325c | [
"Apache-2.0"
] | 35 | 2020-10-23T16:11:21.000Z | 2022-03-31T06:03:35.000Z | homeassistant/components/nest/sensor.py | BrianWithAHat/core | 9c6c8912fb754a942ea95c36281dd95af397325c | [
"Apache-2.0"
] | null | null | null | """Support for Nest sensors that dispatches between API versions."""
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.typing import HomeAssistantType
from .const import DATA_SDM
from .sensor_legacy import async_setup_legacy_entry
from .sensor_sdm import async_setup_sdm_entry
async def... | 35.277778 | 78 | 0.801575 |
3b004d028510fa684f21ed01ef1703d14ee93afc | 913 | py | Python | django_backend/auth_backend/permissions.py | holg/django_backend | 6cef76a378664e6621619862e6db476788a58992 | [
"BSD-3-Clause"
] | 3 | 2015-09-10T07:10:49.000Z | 2021-03-16T07:17:58.000Z | django_backend/auth_backend/permissions.py | holg/django_backend | 6cef76a378664e6621619862e6db476788a58992 | [
"BSD-3-Clause"
] | 10 | 2015-09-09T13:40:24.000Z | 2021-02-27T09:12:23.000Z | django_backend/auth_backend/permissions.py | holg/django_backend | 6cef76a378664e6621619862e6db476788a58992 | [
"BSD-3-Clause"
] | 5 | 2016-06-12T08:20:38.000Z | 2021-02-27T09:02:30.000Z | from django.contrib.auth.models import User, Group
from ..permissions import ModelBackendPermissions
class SuperUserOnlyPermissions(ModelBackendPermissions):
def check_list_permissions(self, user, perm, obj):
return user.has_perm('auth.admin_permission')
def check_viewlog_permissions(self, user, per... | 32.607143 | 57 | 0.750274 |
52b3886ec0c4d25ce90f3263871c61482ca9d1fe | 1,727 | py | Python | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/request/v20170613/UpdateDescriptionRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/request/v20170613/UpdateDescriptionRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/request/v20170613/UpdateDescriptionRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"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... | 38.377778 | 96 | 0.773017 |
187d45da743d911ce28d4194379dbe491fc6611d | 2,735 | py | Python | kloppy/tests/test_tracab.py | BenjaminLarrousse/kloppy | 3a958531086719e0653e25085d0d9f100c2822e1 | [
"BSD-3-Clause"
] | null | null | null | kloppy/tests/test_tracab.py | BenjaminLarrousse/kloppy | 3a958531086719e0653e25085d0d9f100c2822e1 | [
"BSD-3-Clause"
] | null | null | null | kloppy/tests/test_tracab.py | BenjaminLarrousse/kloppy | 3a958531086719e0653e25085d0d9f100c2822e1 | [
"BSD-3-Clause"
] | null | null | null | import os
from kloppy import TRACABSerializer
from kloppy.domain import (
Period,
AttackingDirection,
Orientation,
Provider,
Point,
BallState,
Team,
Ground,
)
from kloppy.domain.models.common import DatasetType
class TestTracabTracking:
def test_correct_deserialization(self):
... | 32.176471 | 84 | 0.61426 |
05cbe29a875af458f2a63971ed5a6297dcf44fcd | 365 | py | Python | entity/cards/BARL_023H/LETL_252.py | wenhr/lushi_script | b067e811b0179654046ba0e3b947795f31b44e5e | [
"MIT"
] | null | null | null | entity/cards/BARL_023H/LETL_252.py | wenhr/lushi_script | b067e811b0179654046ba0e3b947795f31b44e5e | [
"MIT"
] | null | null | null | entity/cards/BARL_023H/LETL_252.py | wenhr/lushi_script | b067e811b0179654046ba0e3b947795f31b44e5e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from hearthstone.entities import Entity
from entity.spell_entity import SpellEntity
class LETL_252(SpellEntity):
"""
巨型大恶魔5
<b>突袭</b>。<b>击杀:</b><b>攻击</b>生命值最低的敌人。
"""
def __init__(self, entity: Entity):
super().__init__(entity)
self.damage = 0
... | 18.25 | 46 | 0.591781 |
cd7e6cb2d4cb420fe9181a9055f266648cf369e2 | 19,851 | py | Python | tfx/dsl/compiler/placeholder_utils_test.py | majiang/tfx | 3cf78e30a900059fe9271412ad8912682fdfc448 | [
"Apache-2.0"
] | null | null | null | tfx/dsl/compiler/placeholder_utils_test.py | majiang/tfx | 3cf78e30a900059fe9271412ad8912682fdfc448 | [
"Apache-2.0"
] | 1 | 2021-02-24T00:55:55.000Z | 2021-02-24T01:16:36.000Z | tfx/dsl/compiler/placeholder_utils_test.py | majiang/tfx | 3cf78e30a900059fe9271412ad8912682fdfc448 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 31.11442 | 138 | 0.606065 |
7320e5cbec119fa6bae433b86cefe90d3e2081e4 | 436 | py | Python | setup.py | raulerivassanz/pinterest-scraper | aba46a4af19249bb1da295750cb457aa12b43864 | [
"MIT"
] | null | null | null | setup.py | raulerivassanz/pinterest-scraper | aba46a4af19249bb1da295750cb457aa12b43864 | [
"MIT"
] | null | null | null | setup.py | raulerivassanz/pinterest-scraper | aba46a4af19249bb1da295750cb457aa12b43864 | [
"MIT"
] | null | null | null | from setuptools import setup
#https://docs.python.org/2/distutils/setupscript.html
#Info on including data files
setup(name="pinterest_scraper",version='0.1',description='Automatically find \
and download images from Pinterest boards.',
author='Xiaojian Deng',author_email="xjd001@gmail.com",license='MIT',\... | 48.444444 | 78 | 0.75 |
1f83b21e1a13619e8391f55ecce7f1e488f75dee | 5,486 | py | Python | tests/profiling/test_profile_dataset.py | remram44/openclean-core | 8c09c8302cadbb3bb02c959907f91a3ae343f939 | [
"BSD-3-Clause"
] | 4 | 2021-04-20T09:06:26.000Z | 2021-11-20T20:31:28.000Z | tests/profiling/test_profile_dataset.py | remram44/openclean-core | 8c09c8302cadbb3bb02c959907f91a3ae343f939 | [
"BSD-3-Clause"
] | 14 | 2021-01-19T19:23:16.000Z | 2021-04-28T14:31:03.000Z | tests/profiling/test_profile_dataset.py | remram44/openclean-core | 8c09c8302cadbb3bb02c959907f91a3ae343f939 | [
"BSD-3-Clause"
] | 5 | 2021-08-24T11:57:21.000Z | 2022-03-17T04:39:04.000Z | # This file is part of the Data Cleaning Library (openclean).
#
# Copyright (C) 2018-2021 New York University.
#
# openclean is released under the Revised BSD License. See file LICENSE for
# full license details.
"""Unit tests for the dataset profiling consumer."""
import pandas as pd
from openclean.profiling.column... | 39.467626 | 79 | 0.637623 |
0f620330c971cae48aeb4e4c0c0c30b911ec4c99 | 1,862 | py | Python | recipes/Python/577136_IFS_fractals/recipe-577136.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/577136_IFS_fractals/recipe-577136.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/577136_IFS_fractals/recipe-577136.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | # IFS fractals
# FB - 201003221
from PIL import Image
import random
### Fractint IFS definition of Fern
##mat=[[0.0,0.0,0.0,0.16,0.0,0.0,0.01],
## [0.85,0.04,-0.04,0.85,0.0,1.6,0.85],
## [0.2,-0.26,0.23,0.22,0.0,1.6,0.07],
## [-0.15,0.28,0.26,0.24,0.0,0.44,0.07]]
### Fractint IFS definition of Dragon
##ma... | 23.56962 | 84 | 0.471536 |
8a87d58c73ad9079f0fd8c99016c996e2e6c4620 | 7,253 | py | Python | Lib/site-packages/notebook/tests/test_notebookapp.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/notebook/tests/test_notebookapp.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/notebook/tests/test_notebookapp.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | """Test NotebookApp"""
import getpass
import logging
import os
import re
import sys
from tempfile import NamedTemporaryFile
from unittest.mock import patch
import pytest
from traitlets.tests.utils import check_help_all_output
from jupyter_core.application import NoStart
from ipython_genutils.tempdir import Tempora... | 31.262931 | 98 | 0.649662 |
a06b1f373815bfe1b945653bc5d2905bd69543fc | 1,711 | py | Python | search_soup_lxml_image.py | aeciovc/py_image_search_service | afd59f421645c10e1d69fe59668f1bb0ec783e2f | [
"MIT"
] | null | null | null | search_soup_lxml_image.py | aeciovc/py_image_search_service | afd59f421645c10e1d69fe59668f1bb0ec783e2f | [
"MIT"
] | 3 | 2018-07-21T21:49:01.000Z | 2021-03-31T18:50:06.000Z | search_soup_lxml_image.py | aeciovc/py_image_search_service | afd59f421645c10e1d69fe59668f1bb0ec783e2f | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
from logging import info
import urllib.request
import json
import time
#Models
from models import SearchConfig, Image
class LXMLSearchImage(SearchConfig):
def __init__(self, config):
self.config = config
def search(self):
info("[LXMLSearchImage] searching f... | 32.283019 | 92 | 0.640561 |
14a518a104280b1a3ebc216122aab5943f5f3d46 | 743 | py | Python | examples/high-level/multibot.py | homus32/vkbottle | 8247665ef74835abe0c2c5e5981826540d0ecdb5 | [
"MIT"
] | 698 | 2019-08-09T17:32:52.000Z | 2021-07-22T08:30:32.000Z | examples/high-level/multibot.py | homus32/vkbottle | 8247665ef74835abe0c2c5e5981826540d0ecdb5 | [
"MIT"
] | 216 | 2019-08-18T19:22:50.000Z | 2021-07-30T12:15:17.000Z | examples/high-level/multibot.py | homus32/vkbottle | 8247665ef74835abe0c2c5e5981826540d0ecdb5 | [
"MIT"
] | 268 | 2019-08-10T14:52:04.000Z | 2021-07-28T07:06:42.000Z | import logging
from vkbottle.api import API
from vkbottle.bot import Bot, Message, run_multibot
# API for bot used in multibot is not required and may be
# forbidden later to avoid user-side mistakes with it's usage
# TIP: to access api in multibot handlers api should be
# requested from event.ctx_api
bot = Bot()
log... | 32.304348 | 71 | 0.756393 |
97ccc67a99016ca8634b434a0d57632f82b51236 | 860 | py | Python | python/tests/generated/errors/validation/test_missing_field_value.py | eno-lang/enolib | 4175f7c1e8246493b6758c29bddc80d20eaf15f7 | [
"MIT"
] | 17 | 2019-04-15T21:03:37.000Z | 2022-01-24T11:03:34.000Z | python/tests/generated/errors/validation/test_missing_field_value.py | eno-lang/enolib | 4175f7c1e8246493b6758c29bddc80d20eaf15f7 | [
"MIT"
] | 20 | 2019-03-13T23:23:40.000Z | 2022-03-29T13:40:57.000Z | python/tests/generated/errors/validation/test_missing_field_value.py | eno-lang/enolib | 4175f7c1e8246493b6758c29bddc80d20eaf15f7 | [
"MIT"
] | 4 | 2019-04-15T21:18:03.000Z | 2019-09-21T16:18:10.000Z | import enolib
def test_querying_a_field_for_a_required_but_missing_value_raises_the_expected_validationerror():
error = None
input = ("field:")
try:
enolib.parse(input).field('field').required_string_value()
except enolib.ValidationError as _error:
if isinstance(_error, enolib.Validat... | 28.666667 | 97 | 0.617442 |
8e18b530af28a53cc1ba3defc6e63a61c32d30ed | 4,176 | py | Python | gwlfe/Output/Loading/DisSurfLoad.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | gwlfe/Output/Loading/DisSurfLoad.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | gwlfe/Output/Loading/DisSurfLoad.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | from numpy import repeat
from numpy import where
from numpy import zeros
from gwlfe.BMPs.Stream.FilterEff import FilterEff
from gwlfe.BMPs.Stream.FilterEff import FilterEff_f
from gwlfe.Input.LandUse.NLU import NLU
from gwlfe.Input.WaterBudget.Water import Water
from gwlfe.Input.WaterBudget.Water import Water_f
from g... | 57.205479 | 117 | 0.618534 |
a2d565c1bd0f14621ef321fb1b315251b9125b9f | 705 | py | Python | common/data_refinery_common/migrations/0030_update_sample_manufacturer.py | erflynn/refinebio | 4ead4082a6b98f7fc8cffdc62c4394338a577f3d | [
"BSD-3-Clause"
] | 106 | 2018-03-05T16:24:47.000Z | 2022-03-19T19:12:25.000Z | common/data_refinery_common/migrations/0030_update_sample_manufacturer.py | erflynn/refinebio | 4ead4082a6b98f7fc8cffdc62c4394338a577f3d | [
"BSD-3-Clause"
] | 1,494 | 2018-02-27T17:02:21.000Z | 2022-03-24T15:10:30.000Z | common/data_refinery_common/migrations/0030_update_sample_manufacturer.py | erflynn/refinebio | 4ead4082a6b98f7fc8cffdc62c4394338a577f3d | [
"BSD-3-Clause"
] | 15 | 2019-02-03T01:34:59.000Z | 2022-03-29T01:59:13.000Z | # Generated by Django 2.1.8 on 2019-08-09 16:48
from django.db import migrations
def fix_typo_in_sample_manufacturer(apps, schema_editor):
""" Fixes affymetrix samples that have their manufacturer set to "AFFYMETRTIX" or "NEXTSEQ" """
Sample = apps.get_model("data_refinery_common", "Sample")
Sample.objec... | 32.045455 | 99 | 0.734752 |
17f38dfd0e0948426b67df94c630c310d15b5925 | 1,741 | py | Python | Python3/438.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/438.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/438.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 80 ms submission
from collections import Counter
class Solution:
def findAnagrams(self, s: str, p: str) -> List[int]:
inputHash, strStart, firstPsum, currHash, res = 0, 0, 0, 0, []
if len(s) < l... | 36.270833 | 98 | 0.57668 |
7dbfc4931d641f9e9e2a68e0f4092cac1332bb43 | 7,309 | py | Python | models/algorithms/extremeClassifier.py | ucds-sg/h2oai | 7042860767dc25d1a7d7122103bbd5016d02df53 | [
"Apache-2.0"
] | null | null | null | models/algorithms/extremeClassifier.py | ucds-sg/h2oai | 7042860767dc25d1a7d7122103bbd5016d02df53 | [
"Apache-2.0"
] | null | null | null | models/algorithms/extremeClassifier.py | ucds-sg/h2oai | 7042860767dc25d1a7d7122103bbd5016d02df53 | [
"Apache-2.0"
] | null | null | null | """ Extreme Classifier Model: To speed up train of multiclass model (100s of classes) for lightGBM.
Caution: can only be used for AUC (or GINI) and accuracy metrics.
Based on: Extreme Classification in Log Memory using Count-Min Sketch: https://arxiv.org/abs/1910.13830
"""
import copy
import datatable as dt
fr... | 41.528409 | 120 | 0.604187 |
f769fb2d02cf8287ae285682458c504b75632ee2 | 26,076 | py | Python | nilearn/tests/test_signal.py | majdabd/nilearn | 55e3f26dbd9fc6e89516e5f37e8aae23ec6086a9 | [
"BSD-2-Clause"
] | null | null | null | nilearn/tests/test_signal.py | majdabd/nilearn | 55e3f26dbd9fc6e89516e5f37e8aae23ec6086a9 | [
"BSD-2-Clause"
] | null | null | null | nilearn/tests/test_signal.py | majdabd/nilearn | 55e3f26dbd9fc6e89516e5f37e8aae23ec6086a9 | [
"BSD-2-Clause"
] | null | null | null | """
Test the signals module
"""
# Author: Gael Varoquaux, Alexandre Abraham
# License: simplified BSD
import os.path
import warnings
from distutils.version import LooseVersion
import numpy as np
import pytest
# Use nisignal here to avoid name collisions (using nilearn.signal is
# not possible)
from nilearn import si... | 39.75 | 83 | 0.62268 |
f19f25497cfdd6e40689f730fbf2b50c555c61e4 | 742 | py | Python | src/dummy/toga_dummy/widgets/numberinput.py | luizoti/toga | 3c49e685f325f1aba2ce048b253402d7e4519f97 | [
"BSD-3-Clause"
] | 1,261 | 2019-03-31T16:28:47.000Z | 2022-03-31T09:01:23.000Z | src/dummy/toga_dummy/widgets/numberinput.py | luizoti/toga | 3c49e685f325f1aba2ce048b253402d7e4519f97 | [
"BSD-3-Clause"
] | 597 | 2019-04-02T20:02:42.000Z | 2022-03-30T10:28:47.000Z | src/dummy/toga_dummy/widgets/numberinput.py | luizoti/toga | 3c49e685f325f1aba2ce048b253402d7e4519f97 | [
"BSD-3-Clause"
] | 318 | 2019-03-31T18:32:00.000Z | 2022-03-30T18:07:13.000Z | from .base import Widget
class NumberInput(Widget):
def create(self):
self._action('create NumberInput')
def set_readonly(self, value):
self._set_value('readonly', value)
def set_step(self, step):
self._set_value('step', step)
def set_min_value(self, value):
self._se... | 23.935484 | 45 | 0.645553 |
3e94cb36373eede83c97b2d1e859aec3e91dc1d2 | 2,627 | py | Python | py2_web2py/web2py/scripts/update_languages.py | xiang12835/python-web-framework | 82a28f642ac051ce136b466eab477b4aaf833421 | [
"Apache-2.0"
] | 2 | 2018-05-25T01:36:38.000Z | 2018-06-01T12:20:27.000Z | py2_web2py/web2py/scripts/update_languages.py | xiang12835/python-web-framework | 82a28f642ac051ce136b466eab477b4aaf833421 | [
"Apache-2.0"
] | 1 | 2021-06-01T22:32:25.000Z | 2021-06-01T22:32:25.000Z | py2_web2py/web2py/scripts/update_languages.py | xiang12835/python-web-framework | 82a28f642ac051ce136b466eab477b4aaf833421 | [
"Apache-2.0"
] | 1 | 2019-03-03T07:43:25.000Z | 2019-03-03T07:43:25.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Written by Vinyl Darkscratch, www.queengoob.org
# TODO: add comments
import os
import ast
import sys
import inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, parentd... | 31.650602 | 316 | 0.711458 |
c7b246d8ef656c1d46ad61e72eec4403243b32e5 | 238 | py | Python | report/api_urls.py | maverick-labs-pune/wikirumours | 51651aae651fd88468b54d08abb8ec28a93e65fa | [
"MIT"
] | null | null | null | report/api_urls.py | maverick-labs-pune/wikirumours | 51651aae651fd88468b54d08abb8ec28a93e65fa | [
"MIT"
] | null | null | null | report/api_urls.py | maverick-labs-pune/wikirumours | 51651aae651fd88468b54d08abb8ec28a93e65fa | [
"MIT"
] | null | null | null | from .views import ReportViewSet, SightingViewSet
from rest_framework.routers import SimpleRouter
router = SimpleRouter()
router.register("reports", ReportViewSet)
router.register("sightings", SightingViewSet)
urlpatterns = router.urls
| 26.444444 | 49 | 0.827731 |
dd51dcd448b323b9795df9f5e19ce7f96ee3f1be | 1,501 | py | Python | taggenerator.py | frankmeeuwsen/DTD-Blog | 675f7155b909dd7465a6b8b5319a6489a42c97e0 | [
"MIT"
] | 1 | 2018-04-29T09:29:59.000Z | 2018-04-29T09:29:59.000Z | taggenerator.py | frankmeeuwsen/frankmeeuwsen.github.io | 675f7155b909dd7465a6b8b5319a6489a42c97e0 | [
"MIT"
] | 2 | 2017-12-31T08:39:24.000Z | 2021-02-20T21:20:38.000Z | taggenerator.py | frankmeeuwsen/frankmeeuwsen.github.io | 675f7155b909dd7465a6b8b5319a6489a42c97e0 | [
"MIT"
] | 1 | 2017-12-12T16:08:08.000Z | 2017-12-12T16:08:08.000Z | #!/usr/bin/env python
'''
tag_generator.py
Copyright 2017 Long Qian
Contact: lqian8@jhu.edu
This script creates tags for your Jekyll blog hosted by Github page.
No plugins required.
'''
import glob
import os
import frontmatter
from pprint import pprint
post_dir = '_posts/'
tag_dir = 'tag/'
filenames = glob.glob(p... | 27.796296 | 109 | 0.636909 |
7613335dc6b18abb4f9dba7cc6000ce2a5d10736 | 5,619 | py | Python | pytorch_DGCNN-master/DGCNN_embedding.py | JadeGuisiano/Deep-learning-on-graphs | 8d0c1b935c10f1b2a3537ac219858ed22b6c7963 | [
"MIT"
] | 1 | 2019-06-24T20:17:26.000Z | 2019-06-24T20:17:26.000Z | DGCNN_embedding.py | lqf96/pytorch_DGCNN | 8922db69d212d54531e4289455dd54128b7dd2df | [
"MIT"
] | null | null | null | DGCNN_embedding.py | lqf96/pytorch_DGCNN | 8922db69d212d54531e4289455dd54128b7dd2df | [
"MIT"
] | 2 | 2019-05-09T07:24:16.000Z | 2020-04-06T03:27:22.000Z | from __future__ import print_function
import os
import sys
import numpy as np
import torch
import random
from torch.autograd import Variable
from torch.nn.parameter import Parameter
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from tqdm import tqdm
sys.path.append('%s/pytorch_stru... | 41.014599 | 146 | 0.651183 |
3ab91a86acb11ba1aeab750ed959434d271227a9 | 2,987 | py | Python | jenkinsapi_tests/unittests/test_fingerprint.py | ChandlerSwift/jenkinsapi | 299a1b9834a54e74f5af6582efc69710bff3b4c4 | [
"MIT"
] | 556 | 2016-07-27T03:42:48.000Z | 2022-03-31T15:05:19.000Z | jenkinsapi_tests/unittests/test_fingerprint.py | ChandlerSwift/jenkinsapi | 299a1b9834a54e74f5af6582efc69710bff3b4c4 | [
"MIT"
] | 366 | 2016-07-24T02:51:45.000Z | 2022-03-24T17:02:45.000Z | jenkinsapi_tests/unittests/test_fingerprint.py | ChandlerSwift/jenkinsapi | 299a1b9834a54e74f5af6582efc69710bff3b4c4 | [
"MIT"
] | 308 | 2016-08-01T03:35:45.000Z | 2022-03-31T01:06:57.000Z | import pytest
import hashlib
from jenkinsapi.jenkins import Jenkins
from jenkinsapi.jenkinsbase import JenkinsBase
from jenkinsapi.fingerprint import Fingerprint
from jenkinsapi.utils.requester import Requester
from requests.exceptions import HTTPError
@pytest.fixture(scope='function')
def jenkins(monkeypatch):
d... | 31.114583 | 70 | 0.683629 |
51c3df7e0af7a26ceac5cc36f3616cc8498cc5ad | 198 | py | Python | tests/__init__.py | mojeto/django-in-request-cache | 9ab6558bb92387da7190c433b7ad5baef0bf5100 | [
"MIT"
] | 2 | 2016-07-09T01:01:34.000Z | 2017-05-09T16:35:08.000Z | tests/__init__.py | mojeto/django-in-request-cache | 9ab6558bb92387da7190c433b7ad5baef0bf5100 | [
"MIT"
] | 1 | 2018-10-23T08:05:33.000Z | 2018-10-23T10:22:21.000Z | tests/__init__.py | mojeto/django-in-request-cache | 9ab6558bb92387da7190c433b7ad5baef0bf5100 | [
"MIT"
] | 1 | 2017-05-09T16:35:17.000Z | 2017-05-09T16:35:17.000Z | #!//usr/bin/env python
# -*- coding: utf-8 -*-
# MIT License - full license can be found in LICENSE file.
# Copyright (c) 2016 Jan Nakladal
from __future__ import unicode_literals, absolute_import
| 28.285714 | 58 | 0.732323 |
46c641b79cb6faeb973a45cc6267b66cd60be175 | 368,061 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_08_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_08_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_08_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.58031 | 278 | 0.681966 |
17ca4f34df60cf13007c4335b3c88d7ce5a355a3 | 317 | py | Python | News Sentiment Analysis with Twitter Feeds/main.py | pramodnagare/AppliedLearning | 4ad36fa0d1c1a2b9f1921a2cb5faabaffc7c16f7 | [
"Apache-2.0"
] | 1 | 2021-01-14T09:33:30.000Z | 2021-01-14T09:33:30.000Z | News Sentiment Analysis with Twitter Feeds/main.py | pramodnagare/Applied-Learning | 4ad36fa0d1c1a2b9f1921a2cb5faabaffc7c16f7 | [
"Apache-2.0"
] | null | null | null | News Sentiment Analysis with Twitter Feeds/main.py | pramodnagare/Applied-Learning | 4ad36fa0d1c1a2b9f1921a2cb5faabaffc7c16f7 | [
"Apache-2.0"
] | null | null | null | from Application.app import NewsSentimentAnalysis
import time
conf_file = r"configuration/conf.json"
query = "Trump impeachment"
a = NewsSentimentAnalysis(conf_file)
start_time = time.time()
data = a.pipeline(query)
end_time = time.time()
print("Time for execution: {}".format(end_time-start_time))
# print(data) | 21.133333 | 59 | 0.769716 |
07a15d0619bb6eabecfda19cefac64627d4f0abd | 14,302 | py | Python | env/lib/python3.8/site-packages/pandas/tests/base/test_conversion.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | env/lib/python3.8/site-packages/pandas/tests/base/test_conversion.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | env/lib/python3.8/site-packages/pandas/tests/base/test_conversion.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | import numpy as np
import pytest
from pandas.core.dtypes.common import is_datetime64_dtype, is_timedelta64_dtype
from pandas.core.dtypes.dtypes import DatetimeTZDtype
import pandas as pd
from pandas import CategoricalIndex, Series, Timedelta, Timestamp
import pandas._testing as tm
from pandas.core.arrays import (
... | 32.504545 | 88 | 0.566984 |
7939ec823f6ff86863861482df92e4181f9c0736 | 1,980 | py | Python | qiskit/extensions/standard/rx_pi.py | shaimach/qiskit-terra-osq | 4d321afc84d3b82248112ae0616c3b86bee3d08a | [
"Apache-2.0"
] | null | null | null | qiskit/extensions/standard/rx_pi.py | shaimach/qiskit-terra-osq | 4d321afc84d3b82248112ae0616c3b86bee3d08a | [
"Apache-2.0"
] | null | null | null | qiskit/extensions/standard/rx_pi.py | shaimach/qiskit-terra-osq | 4d321afc84d3b82248112ae0616c3b86bee3d08a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 26.052632 | 80 | 0.628788 |
9d3f475ef06337c543f179fa5506660decf39756 | 1,103 | py | Python | tetuebot/configParser.py | ypix/TeTueTwitchBot | 4f459af7949240283d560166fbe58dc25bc72f64 | [
"BSD-3-Clause"
] | null | null | null | tetuebot/configParser.py | ypix/TeTueTwitchBot | 4f459af7949240283d560166fbe58dc25bc72f64 | [
"BSD-3-Clause"
] | null | null | null | tetuebot/configParser.py | ypix/TeTueTwitchBot | 4f459af7949240283d560166fbe58dc25bc72f64 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from configparser import ConfigParser
import os
from dotenv import load_dotenv
PATH_TO_CONFIG_FILE = 'login_data.cfg'
def get_configuration(section):
"""
create a file ".env" and place it into the root folder, containing:
name=""
owner=""
... | 22.979167 | 96 | 0.640979 |
bf55c4c1c30167c199c81c103d2e25d4fbf27fd0 | 2,824 | py | Python | tests/test_team.py | ClementJ18/ModDB | fce9fecfe29e5269317be674db12db0ad8804b23 | [
"MIT"
] | null | null | null | tests/test_team.py | ClementJ18/ModDB | fce9fecfe29e5269317be674db12db0ad8804b23 | [
"MIT"
] | null | null | null | tests/test_team.py | ClementJ18/ModDB | fce9fecfe29e5269317be674db12db0ad8804b23 | [
"MIT"
] | null | null | null | import pytest
from unittest.mock import patch
from tests.test_utils import patched_request, sample_list
import moddb
DEFAULT = "https://www.moddb.com/company/edainmod-dev-team"
@patch("moddb.utils.request", new=patched_request)
class TestTeam:
@pytest.fixture(params=[DEFAULT], autouse=True)
def _get_object... | 27.686275 | 68 | 0.638456 |
f5b100c38965699fa1f2bc3ed0c1e5999d018999 | 817 | py | Python | setup.py | kcleal/sortedintersect | 956158751d47de40958d85ef771d11cf8817d244 | [
"MIT"
] | null | null | null | setup.py | kcleal/sortedintersect | 956158751d47de40958d85ef771d11cf8817d244 | [
"MIT"
] | null | null | null | setup.py | kcleal/sortedintersect | 956158751d47de40958d85ef771d11cf8817d244 | [
"MIT"
] | null | null | null | from setuptools.extension import Extension
from setuptools import setup, find_packages
ext_modules = list()
ext_modules.append(Extension("sortedintersect.intersect",
["sortedintersect/intersect.pyx"],
# extra_compile_args=extras,
l... | 32.68 | 80 | 0.610771 |
c53a8e0815733484cec7f95688b8aac73339661b | 729 | py | Python | hexrd/config/utils.py | glemaitre/hexrd | b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c | [
"BSD-3-Clause"
] | 27 | 2020-02-18T12:15:08.000Z | 2022-03-24T17:53:46.000Z | hexrd/config/utils.py | glemaitre/hexrd | b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c | [
"BSD-3-Clause"
] | 259 | 2020-02-02T22:18:29.000Z | 2022-03-30T19:59:58.000Z | hexrd/config/utils.py | glemaitre/hexrd | b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c | [
"BSD-3-Clause"
] | 11 | 2020-02-18T12:14:44.000Z | 2022-03-04T16:19:11.000Z | import copy
def merge_dicts(a, b):
"""Return a merged dict, updating values from `a` with values from `b`."""
# need to pass a deep copy of a at the top level only:
return _merge_dicts(copy.deepcopy(a), b)
def _merge_dicts(a, b):
for k, v in b.items():
if isinstance(v, dict):
if ... | 23.516129 | 78 | 0.529492 |
a1f8d279d36b763bcf6c939ef8a5a2d447d88075 | 6,859 | py | Python | sdk/python/pulumi_azure_native/web/v20180201/get_web_app_premier_add_on_slot.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20180201/get_web_app_premier_add_on_slot.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20180201/get_web_app_premier_add_on_slot.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 33.955446 | 184 | 0.62079 |
946f4b326147eea247e1708c57c2c471299ab9af | 2,955 | py | Python | CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/transformer/__init__.py | ishtjot/susereumutep | 56e20c1777e0c938ac42bd8056f84af9e0b76e46 | [
"Apache-2.0"
] | 2 | 2018-11-07T20:52:53.000Z | 2019-10-20T15:57:01.000Z | CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/transformer/__init__.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/Demo/ceilometer/ceilometer/transformer/__init__.py | ishtjot/susereumutep | 56e20c1777e0c938ac42bd8056f84af9e0b76e46 | [
"Apache-2.0"
] | 2 | 2018-11-16T04:20:06.000Z | 2019-03-28T23:49:13.000Z | #
# Copyright 2013 Intel Corp.
#
# Author: Yunhong Jiang <yunhong.jiang@intel.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | 31.43617 | 80 | 0.655161 |
1cdbdcf7ba86331ff743627025f3570489d71c08 | 10,869 | py | Python | BaseTools/Source/Python/GenFds/Capsule.py | maurocolella/cecclient | 42555ce4eefc8e52ca566a33eddf91a8e264bed3 | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Source/Python/GenFds/Capsule.py | maurocolella/cecclient | 42555ce4eefc8e52ca566a33eddf91a8e264bed3 | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Source/Python/GenFds/Capsule.py | maurocolella/cecclient | 42555ce4eefc8e52ca566a33eddf91a8e264bed3 | [
"BSD-2-Clause"
] | 1 | 2021-07-12T16:07:09.000Z | 2021-07-12T16:07:09.000Z | ## @file
# generate capsule
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may b... | 42.127907 | 131 | 0.57181 |
1344290d7e68659f960ebaf93595a0fd48b2aaba | 136 | py | Python | flask_heroku_example/wsgi.py | landynS8990/collabora8e | 40c0fed070f0ec2b51913fc87a9ef9b88feca083 | [
"Apache-2.0"
] | null | null | null | flask_heroku_example/wsgi.py | landynS8990/collabora8e | 40c0fed070f0ec2b51913fc87a9ef9b88feca083 | [
"Apache-2.0"
] | null | null | null | flask_heroku_example/wsgi.py | landynS8990/collabora8e | 40c0fed070f0ec2b51913fc87a9ef9b88feca083 | [
"Apache-2.0"
] | null | null | null | from whitenoise import WhiteNoise
from app import app
application = WhiteNoise(app)
application.add_files('static/', prefix='static/') | 22.666667 | 50 | 0.794118 |
cb821b8ae785c1f1026a9ad8c3f78ac86f43c91d | 5,269 | py | Python | modules/api_gateway__create_api_keys/main.py | 91299792458/pacu | 71914a5d3ba6cac6e26e5f3079f97d187688ca92 | [
"BSD-3-Clause"
] | 1 | 2018-11-18T20:17:22.000Z | 2018-11-18T20:17:22.000Z | modules/api_gateway__create_api_keys/main.py | 91299792458/pacu | 71914a5d3ba6cac6e26e5f3079f97d187688ca92 | [
"BSD-3-Clause"
] | null | null | null | modules/api_gateway__create_api_keys/main.py | 91299792458/pacu | 71914a5d3ba6cac6e26e5f3079f97d187688ca92 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import argparse
from copy import deepcopy
from botocore.exceptions import ClientError
module_info = {
# Name of the module (should be the same as the filename)
'name': 'api_gateway__create_api_keys',
# Name and any other notes about the author
'author': 'Alexander Morgenstern a... | 42.152 | 206 | 0.636743 |
298917e5a89e5ed455de76feac0f25987b5c0a6f | 122 | py | Python | pyspec/cui/__init__.py | jyotijaya/pyspec | ae7a4de39beb3cf2e0838b6c3a9ef73d082445eb | [
"MIT"
] | 1 | 2016-05-08T06:29:49.000Z | 2016-05-08T06:29:49.000Z | pyspec/cui/__init__.py | jyotijaya/pyspec | ae7a4de39beb3cf2e0838b6c3a9ef73d082445eb | [
"MIT"
] | null | null | null | pyspec/cui/__init__.py | jyotijaya/pyspec | ae7a4de39beb3cf2e0838b6c3a9ef73d082445eb | [
"MIT"
] | 4 | 2015-04-15T16:53:52.000Z | 2021-02-09T10:25:22.000Z | # -*- coding: ascii -*-
"""PySpec User Interface for console.
"""
__pyspec = 1
from framework import CUISpecTestRunner
| 13.555556 | 39 | 0.696721 |
b48b46681f2e5c3336aa791d1b2c44655b44c4e3 | 2,650 | py | Python | docs/conf.py | peteris-zealid/pyHanko | 414b3156b8853840b31cf0c3dd50654c868c6ba5 | [
"MIT"
] | 161 | 2020-12-13T08:25:03.000Z | 2022-03-28T20:52:43.000Z | docs/conf.py | alexgitx/pyHanko | 97dcdbca84264b2c6532015053127a6727a34bae | [
"MIT"
] | 56 | 2021-01-05T18:08:52.000Z | 2022-03-31T13:19:20.000Z | docs/conf.py | alexgitx/pyHanko | 97dcdbca84264b2c6532015053127a6727a34bae | [
"MIT"
] | 17 | 2020-12-09T19:01:09.000Z | 2022-03-06T18:54:33.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.125 | 79 | 0.66717 |
19f0bc712daa3939c48188ce28c713789ec4244d | 21,571 | py | Python | myems-api/reports/virtualmetercost.py | guangyuzhang/myems | c88f0620d3e36154a500c755c805333b771d09c0 | [
"MIT"
] | 82 | 2021-02-19T10:24:31.000Z | 2022-03-28T06:30:18.000Z | myems-api/reports/virtualmetercost.py | guangyuzhang/myems | c88f0620d3e36154a500c755c805333b771d09c0 | [
"MIT"
] | 188 | 2021-02-22T07:08:30.000Z | 2022-03-02T04:11:03.000Z | myems-api/reports/virtualmetercost.py | guangyuzhang/myems | c88f0620d3e36154a500c755c805333b771d09c0 | [
"MIT"
] | 54 | 2021-02-19T08:48:46.000Z | 2022-03-30T06:21:34.000Z | import falcon
import simplejson as json
import mysql.connector
import config
from datetime import datetime, timedelta, timezone
from core import utilities
from decimal import Decimal
import excelexporters.virtualmetercost
class Reporting:
@staticmethod
def __init__():
""""Initializes Reporting"""
... | 55.168798 | 120 | 0.529229 |
e31614b4ed5ba0722acd56b496c28727bb10ca47 | 5,887 | py | Python | meiduo_mall/meiduo_mall/apps/users/serializers.py | infotit/mdmall | c1d215ca6314a4ebe4aa1ffdeb6ec6b3486ec751 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/users/serializers.py | infotit/mdmall | c1d215ca6314a4ebe4aa1ffdeb6ec6b3486ec751 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/users/serializers.py | infotit/mdmall | c1d215ca6314a4ebe4aa1ffdeb6ec6b3486ec751 | [
"MIT"
] | null | null | null | import re
from django_redis import get_redis_connection
from rest_framework import serializers
from rest_framework_jwt.settings import api_settings
from .models import User
from .utils import get_user_by_account
from celery_tasks.emails.tasks import send_verify_email
class CreateUserSerializer(serializers.ModelSeri... | 30.82199 | 120 | 0.59436 |
cbbb4a39c3ffe0de2159b4c6dc2d91e17f0eb0b2 | 1,045 | py | Python | python/pyfunc-server/pyfuncserver/prometheus.py | ashwinath/merlin | 087a7fa6fb21e4c771d64418bd58873175226ca1 | [
"Apache-2.0"
] | 97 | 2020-10-15T08:03:56.000Z | 2022-03-31T22:30:59.000Z | python/pyfunc-server/pyfuncserver/prometheus.py | ibnummuhammad/merlin | acf10a350bcacfdfe67f7020d535467b71ff1d89 | [
"Apache-2.0"
] | 91 | 2020-10-26T03:15:27.000Z | 2022-03-31T10:19:55.000Z | python/pyfunc-server/pyfuncserver/prometheus.py | ibnummuhammad/merlin | acf10a350bcacfdfe67f7020d535467b71ff1d89 | [
"Apache-2.0"
] | 26 | 2020-10-21T03:53:36.000Z | 2022-03-16T06:43:15.000Z | # Copyright 2020 The Merlin 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.703704 | 82 | 0.75311 |
eb57bd42e29a9b7974473b57a0c986748c3e438d | 4,652 | py | Python | run_slurm_example.py | agolovanov/quill | 18cf99cc8517f173765d4f56a90a6d53403e90f8 | [
"MIT"
] | 9 | 2021-03-30T12:14:06.000Z | 2022-03-08T02:03:06.000Z | run_slurm_example.py | agolovanov/quill | 18cf99cc8517f173765d4f56a90a6d53403e90f8 | [
"MIT"
] | 9 | 2019-12-09T11:02:56.000Z | 2021-03-18T13:52:06.000Z | run_slurm_example.py | agolovanov/quill | 18cf99cc8517f173765d4f56a90a6d53403e90f8 | [
"MIT"
] | 5 | 2021-02-15T18:27:24.000Z | 2021-03-09T10:58:28.000Z | #!/usr/bin/env python3
import collections
import hashlib
import math
import os
import re
# -- How to run multiple QUILLs with SLURM --
#
# 1. Create config template based on the existing Quill config file:
# - put a variable ($<param>) instead of parameter value for every Quill parameter that needs to be change... | 33.956204 | 116 | 0.597377 |
88940ecc81bb7244f9aadc5c0b28b58ae24e3599 | 1,698 | py | Python | v2ex_daily.py | ZHLHZHU/v2ex | b8458b6834eb22fe337146251f2f1bcd2ecb1a92 | [
"MIT"
] | null | null | null | v2ex_daily.py | ZHLHZHU/v2ex | b8458b6834eb22fe337146251f2f1bcd2ecb1a92 | [
"MIT"
] | null | null | null | v2ex_daily.py | ZHLHZHU/v2ex | b8458b6834eb22fe337146251f2f1bcd2ecb1a92 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import re
import http.cookiejar
import urllib.request
# your v2ex cookie value for key [auth] after login
# refer README.md if cannot find cookie [auth]
V2EX_COOKIE = ''
V2EX_DOMAIN = r'v2ex.com'
V2EX_URL_START = r'https://' + V2EX_DOMAIN
V2EX_MISSION = V2EX_U... | 24.257143 | 92 | 0.636631 |
df30b12a44bdf02c82125d2eec2296f40ae8507a | 136 | py | Python | ARC012/ARC012f.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ARC012/ARC012f.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | ARC012/ARC012f.py | VolgaKurvar/AtCoder | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | [
"Unlicense"
] | null | null | null | #ARC012f
def main():
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)
if __name__ == '__main__':
main() | 17 | 32 | 0.654412 |
63d7d7b49ea58fe4dd68164d870561f9f1e8fafd | 20,549 | py | Python | flux_mito/model_360.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_mito/model_360.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | flux_mito/model_360.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU', 'C3pro'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', '... | 95.134259 | 798 | 0.804127 |
b57003abf749f86a787464e8c111bd604afb525a | 1,203 | py | Python | building_microservices/Python/roundrobin_registration/setup.py | MD-Studio/MDStudio_examples | 16919769ee4d69e598683d192e98649a6345bd0b | [
"Apache-2.0"
] | null | null | null | building_microservices/Python/roundrobin_registration/setup.py | MD-Studio/MDStudio_examples | 16919769ee4d69e598683d192e98649a6345bd0b | [
"Apache-2.0"
] | null | null | null | building_microservices/Python/roundrobin_registration/setup.py | MD-Studio/MDStudio_examples | 16919769ee4d69e598683d192e98649a6345bd0b | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
distribution_name = 'roundrobin'
setup(
name=distribution_name,
version='1.0.0',
license='Apache Software License 2.0',
description='Demonstrating Roundrobin registration with the MDStudio broker',
author='Marc van Dijk - VU University - Amsterdam,' \
... | 38.806452 | 85 | 0.674979 |
7bb1c290399e87244c71959558da495659eb857a | 3,536 | py | Python | holidays/countries/__init__.py | m-ganko/python-holidays | f0d5a91f8bee8661ef3440bde2302332a364877e | [
"MIT"
] | null | null | null | holidays/countries/__init__.py | m-ganko/python-holidays | f0d5a91f8bee8661ef3440bde2302332a364877e | [
"MIT"
] | 1 | 2021-06-08T14:40:55.000Z | 2021-06-08T14:40:55.000Z | holidays/countries/__init__.py | m-ganko/python-holidays | f0d5a91f8bee8661ef3440bde2302332a364877e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Author: ryanss <ryanssdev@iclo... | 36.833333 | 78 | 0.75198 |
717169ade4ac7d7330dbf5e1cfbd3dd8b09c52d8 | 1,660 | py | Python | Lib/pagebot/elements/ui/_future/uiwindow.py | bghryct/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 68 | 2018-10-22T22:42:58.000Z | 2022-03-19T11:07:31.000Z | Lib/pagebot/elements/ui/_future/uiwindow.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 97 | 2017-07-10T23:49:30.000Z | 2018-10-03T08:17:55.000Z | Lib/pagebot/elements/ui/_future/uiwindow.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 9 | 2017-07-11T09:59:00.000Z | 2018-09-12T11:59:30.000Z | # -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T
#
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyx... | 31.320755 | 81 | 0.548795 |
82ae3fba0afb4cdd805f2778e45a2dd24bf3fc84 | 719 | py | Python | Exercicios/ex_105.py | antoniosereno95/Python_Curso_em_Video | d706cba9ca7e5670881e5e06bceb5538971e99c0 | [
"MIT"
] | null | null | null | Exercicios/ex_105.py | antoniosereno95/Python_Curso_em_Video | d706cba9ca7e5670881e5e06bceb5538971e99c0 | [
"MIT"
] | null | null | null | Exercicios/ex_105.py | antoniosereno95/Python_Curso_em_Video | d706cba9ca7e5670881e5e06bceb5538971e99c0 | [
"MIT"
] | null | null | null |
def notas(* nota,sit=False):
maior = 0
menor = 1000
soma = 0
d = dict()
for i in nota:
if int(i) > maior:
maior = int(i)
if int(i) < menor:
menor = int(i)
soma += int(i)
media = float(soma)/len(nota)
d['total'] = len(nota)
d['maior'] = mai... | 23.193548 | 41 | 0.45758 |
2c47695ac419dfa7802984c5a86e7f3cf7e3954a | 729 | py | Python | challenges/concatenateNumbers/python3/concatenateNumbers.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/concatenateNumbers/python3/concatenateNumbers.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/concatenateNumbers/python3/concatenateNumbers.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | def concatenateNumbers(a, b):
return int(str(a) + str(b))
if __name__ == '__main__':
input0 = [23, 962]
input1 = [45, 12345]
expectedOutput = [2345, 96212345]
assert len(input0) == len(expectedOutput), '# input0 = {}, # expectedOutput = {}'.format(len(input0), len(expectedOutput))
assert len(input1) == len(expec... | 56.076923 | 133 | 0.689986 |
b7a3d340b7e9a8c3165ca4bad65caa05867fa8fb | 4,228 | py | Python | Database.py | I-Valchev/UrPas | 7babb5208fab6975891fba440e633cc9ad6e8718 | [
"Apache-2.0"
] | 1 | 2015-03-04T09:00:44.000Z | 2015-03-04T09:00:44.000Z | Database.py | I-Valchev/UrPas | 7babb5208fab6975891fba440e633cc9ad6e8718 | [
"Apache-2.0"
] | null | null | null | Database.py | I-Valchev/UrPas | 7babb5208fab6975891fba440e633cc9ad6e8718 | [
"Apache-2.0"
] | null | null | null | import MySQLdb
import Password
import os
class Database:
def __init__(self):
self.db = MySQLdb.connect(host="localhost", user="root", passwd="", db="UrPasDB", unix_socket="/opt/lampp/var/mysql/mysql.sock")
self.cursor = self.db.cursor()
def _add_data(self, user, destination, password):
user_id = self.get_user... | 30.2 | 130 | 0.71334 |
f40b22a2d3a00be7a1f2ee2d77c41411ac281835 | 4,665 | py | Python | tbf/tools/cpatiger/lib/python-benchmark/benchexec/benchexec/tools/symdivine.py | leostrakosch/testbasedfalsification | 18d08d6cee6fbfbad4d4ebfa7aed235521edec2b | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-02-13T17:46:38.000Z | 2022-03-15T06:20:24.000Z | tbf/tools/cpatiger/lib/python-benchmark/benchexec/benchexec/tools/symdivine.py | leostrakosch/testbasedfalsification | 18d08d6cee6fbfbad4d4ebfa7aed235521edec2b | [
"ECL-2.0",
"Apache-2.0"
] | 8 | 2018-07-17T22:35:02.000Z | 2019-03-11T07:19:00.000Z | tbf/tools/cpatiger/lib/python-benchmark/benchexec/benchexec/tools/symdivine.py | leostrakosch/testbasedfalsification | 18d08d6cee6fbfbad4d4ebfa7aed235521edec2b | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2018-05-05T15:16:28.000Z | 2020-03-23T09:40:28.000Z | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | 38.553719 | 112 | 0.660879 |
cfa2aa530f1ab5c73461009ecf266d0e8819189b | 4,653 | py | Python | HelpUtil.py | mihailoz/python-term-project | 2257e604dcfd9f877db1431d2ac1f1b2ee1e1fc3 | [
"MIT"
] | null | null | null | HelpUtil.py | mihailoz/python-term-project | 2257e604dcfd9f877db1431d2ac1f1b2ee1e1fc3 | [
"MIT"
] | null | null | null | HelpUtil.py | mihailoz/python-term-project | 2257e604dcfd9f877db1431d2ac1f1b2ee1e1fc3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import manager.PermissionManager as PermissionManager
person = None
def print_help():
print_start_text()
print_reservation_help()
print_hotel_help()
print_room_help()
print_service_help()
print_user_help()
print_permission_help()
print_end_text()
def print_... | 51.7 | 168 | 0.474318 |
917dac4a86d9eb6e507dea6ab49535a037f1d37b | 13,950 | py | Python | test/functional/rpc_blockchain.py | phm87/bitcoin-abc | e0c55f5e6fbb3f4c19a9e203223f8ad2f3eba7b9 | [
"MIT"
] | 1 | 2021-06-12T04:50:08.000Z | 2021-06-12T04:50:08.000Z | test/functional/rpc_blockchain.py | phm87/bitcoin-abc | e0c55f5e6fbb3f4c19a9e203223f8ad2f3eba7b9 | [
"MIT"
] | null | null | null | test/functional/rpc_blockchain.py | phm87/bitcoin-abc | e0c55f5e6fbb3f4c19a9e203223f8ad2f3eba7b9 | [
"MIT"
] | 1 | 2019-09-08T15:35:38.000Z | 2019-09-08T15:35:38.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPCs related to blockchainstate.
Test the following RPCs:
- getblockchaininfo
- gettxout... | 39.295775 | 121 | 0.650609 |
4149e3959468f5c2bc69ef052f464ba612e8f60e | 22,501 | py | Python | venv/Lib/site-packages/celery/canvas.py | Verckolf/MyInterfaceTest | e05674bd673a6a43cfb33f7cb4318886ba92a05c | [
"MIT"
] | 39 | 2016-12-05T14:36:37.000Z | 2021-07-29T18:22:34.000Z | venv/Lib/site-packages/celery/canvas.py | Verckolf/MyInterfaceTest | e05674bd673a6a43cfb33f7cb4318886ba92a05c | [
"MIT"
] | 68 | 2016-12-12T20:38:47.000Z | 2020-07-26T18:28:49.000Z | venv/Lib/site-packages/celery/canvas.py | Verckolf/MyInterfaceTest | e05674bd673a6a43cfb33f7cb4318886ba92a05c | [
"MIT"
] | 120 | 2016-08-18T14:53:03.000Z | 2020-06-16T13:27:20.000Z | # -*- coding: utf-8 -*-
"""
celery.canvas
~~~~~~~~~~~~~
Composing task workflows.
Documentation for some of these types are in :mod:`celery`.
You should import these from :mod:`celery` and not this module.
"""
from __future__ import absolute_import
from collections import MutableSequence
from c... | 32.190272 | 79 | 0.587041 |
0752c0e83b8909a24012bf338124be5d793790e2 | 1,236 | py | Python | src/spatiotemporal/models/benchmarks/fbem/oGranule.py | cseveriano/spatio-temporal-forecasting | 8391f3de72b840edb2b35148537502ec5d2ac888 | [
"MIT"
] | 5 | 2018-05-25T17:43:52.000Z | 2021-12-22T13:13:43.000Z | src/spatiotemporal/models/benchmarks/fbem/oGranule.py | cseveriano/spatio-temporal-forecasting | 8391f3de72b840edb2b35148537502ec5d2ac888 | [
"MIT"
] | null | null | null | src/spatiotemporal/models/benchmarks/fbem/oGranule.py | cseveriano/spatio-temporal-forecasting | 8391f3de72b840edb2b35148537502ec5d2ac888 | [
"MIT"
] | 2 | 2021-07-20T12:32:00.000Z | 2021-12-13T05:32:21.000Z |
class oGranule:
def __init__(self):
self.u = 0
self.ups = 0
self.Ups = 0
self.U = 0
self.coef = []
def p(self, x):
"""
Functional consequent with complete data
:param x:
:return:
"""
# Calculate a0
out = self.coe... | 20.6 | 78 | 0.461974 |
7f220f50fea63a2c6e0bdc36cebc7570bb0c57d4 | 789 | py | Python | factorial.py | theamurtagh/exercises | 025cd4619eb97df66c66d73caaa8bd1c2fe908b1 | [
"Apache-2.0"
] | null | null | null | factorial.py | theamurtagh/exercises | 025cd4619eb97df66c66d73caaa8bd1c2fe908b1 | [
"Apache-2.0"
] | null | null | null | factorial.py | theamurtagh/exercises | 025cd4619eb97df66c66d73caaa8bd1c2fe908b1 | [
"Apache-2.0"
] | null | null | null | #Thea M Factorial of a positive no
def func_factorial(n):
# factorial is n * by all the '+' no less than it
#n= 7
#if n == 1:
# if n is 1 return 1
#return n
#else:
#return n * (n-1)
#
# Python program to find the factorial of a number provided by the user.
# ch... | 24.65625 | 72 | 0.579214 |
de4bc2017bc6b47d9a51163eb8da50e51d5e8741 | 436 | py | Python | temp.py | fajarmuslim/competitive_programming | faab2bed8496cf54f35ce6e4ad2ae2eb598e0e3c | [
"MIT"
] | null | null | null | temp.py | fajarmuslim/competitive_programming | faab2bed8496cf54f35ce6e4ad2ae2eb598e0e3c | [
"MIT"
] | null | null | null | temp.py | fajarmuslim/competitive_programming | faab2bed8496cf54f35ce6e4ad2ae2eb598e0e3c | [
"MIT"
] | null | null | null | def generate_all_subset(list_, toggles, i):
if i == len(list_):
res = []
for idx in range(len(toggles)):
if toggles[idx] == 1:
res.append(list_[idx])
print(res)
else:
toggles[i] = 0
generate_all_subset(list_, toggles, i + 1)
toggles[i... | 24.222222 | 56 | 0.522936 |
8550115219cae6b104cf187f33c83a8fdf70ed6f | 2,413 | py | Python | lib/streamlit/elements/json.py | ChangHoon-Sung/streamlit | 83e0b80d2fa13e29e83d092a9fc4d946460bbf73 | [
"Apache-2.0"
] | 1 | 2022-03-14T07:55:33.000Z | 2022-03-14T07:55:33.000Z | lib/streamlit/elements/json.py | ChangHoon-Sung/streamlit | 83e0b80d2fa13e29e83d092a9fc4d946460bbf73 | [
"Apache-2.0"
] | 1 | 2022-03-15T04:05:17.000Z | 2022-03-15T04:05:17.000Z | lib/streamlit/elements/json.py | ChangHoon-Sung/streamlit | 83e0b80d2fa13e29e83d092a9fc4d946460bbf73 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2022 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 32.173333 | 97 | 0.589308 |
dca0a2519ac5e9ef7259769db05b0b24cb983dbd | 4,287 | py | Python | test/unit/test_helper.py | RahmanTeamDevelopment/CARTCreation | 1666d947f1d6e76752df268efb6fb855919c7bfb | [
"MIT"
] | null | null | null | test/unit/test_helper.py | RahmanTeamDevelopment/CARTCreation | 1666d947f1d6e76752df268efb6fb855919c7bfb | [
"MIT"
] | null | null | null | test/unit/test_helper.py | RahmanTeamDevelopment/CARTCreation | 1666d947f1d6e76752df268efb6fb855919c7bfb | [
"MIT"
] | null | null | null | """Unit tests for helper.py"""
from unittest import TestCase
from utils.transcripts import Transcript, Exon
from cartcreation import helper
import uuid
import os
class TestHelper(TestCase):
def setUp(self):
self.outfn = str(uuid.uuid4())
self.out = open(self.outfn, 'w')
self.t_forward... | 31.755556 | 108 | 0.481689 |
687ff61247ccec12b39b76ab75f6d49a8d49eb70 | 3,539 | py | Python | src/split/splitting.py | HitLuca/predict-python | 14f2f55cb29f817a5871d4c0b11a3758285301ca | [
"MIT"
] | null | null | null | src/split/splitting.py | HitLuca/predict-python | 14f2f55cb29f817a5871d4c0b11a3758285301ca | [
"MIT"
] | null | null | null | src/split/splitting.py | HitLuca/predict-python | 14f2f55cb29f817a5871d4c0b11a3758285301ca | [
"MIT"
] | null | null | null | import functools
from typing import Union
from pm4py.objects.log.log import EventLog
from sklearn.model_selection import train_test_split
from src.split.models import Split, SplitTypes, SplitOrderingMethods
from src.utils.event_attributes import get_additional_columns
from src.utils.file_service import get_log
def ... | 44.797468 | 118 | 0.748234 |
a5c6462e7cfaeeaf47f5b685c723d1f079d5bbc2 | 21,449 | py | Python | blib2to3/pgen2/tokenize.py | alexchamberlain/black | d9e71a75ccfefa3d9156a64c03313a0d4ad981e5 | [
"MIT"
] | 1 | 2020-04-28T13:31:40.000Z | 2020-04-28T13:31:40.000Z | blib2to3/pgen2/tokenize.py | alexchamberlain/black | d9e71a75ccfefa3d9156a64c03313a0d4ad981e5 | [
"MIT"
] | 1 | 2020-04-29T03:25:12.000Z | 2020-04-29T03:25:12.000Z | blib2to3/pgen2/tokenize.py | alexchamberlain/black | d9e71a75ccfefa3d9156a64c03313a0d4ad981e5 | [
"MIT"
] | 1 | 2021-02-14T19:11:35.000Z | 2021-02-14T19:11:35.000Z | # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation.
# All rights reserved.
"""Tokenization help for Python programs.
generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens. It accepts a readline-like method which is called
repeatedly to get the next line o... | 37.498252 | 92 | 0.525526 |
4e1204d8986ef0ad507934ef3cf498079751f7bf | 235 | py | Python | resposta_atividade-sem-04-T2/03pt2.py | MacgayverPeixoto/PEC_IFPI_186 | 9cc3a2cc13b028b829e6191e56b2852dfb47998c | [
"MIT"
] | null | null | null | resposta_atividade-sem-04-T2/03pt2.py | MacgayverPeixoto/PEC_IFPI_186 | 9cc3a2cc13b028b829e6191e56b2852dfb47998c | [
"MIT"
] | null | null | null | resposta_atividade-sem-04-T2/03pt2.py | MacgayverPeixoto/PEC_IFPI_186 | 9cc3a2cc13b028b829e6191e56b2852dfb47998c | [
"MIT"
] | null | null | null | #03pt2
preco=float(input())
valor=float(input())
valor_percen= preco * valor/100
aumento_percen = preco + valor_percen
desconto_percen = preco - valor_percen
print(f'{aumento_percen:.2f}')
print(f'{desconto_percen:.2f}')
| 19.583333 | 39 | 0.714894 |
f31a65af7f858c39d52da366da3a5200d8e00120 | 2,427 | py | Python | employee.py | zhumakova/ClassProject | b869258706dae7c8e8ab723c61a45fd78e26494f | [
"MIT"
] | null | null | null | employee.py | zhumakova/ClassProject | b869258706dae7c8e8ab723c61a45fd78e26494f | [
"MIT"
] | null | null | null | employee.py | zhumakova/ClassProject | b869258706dae7c8e8ab723c61a45fd78e26494f | [
"MIT"
] | null | null | null | class Employee(object):
id = 0
def __init__(self,first,last,age):
self.first = first
self.last = last
self.email = f'{self.first}-{self.last}@saturnsoft.sat'
self.age = age
Employee.id += 1
self.emp_id = Employee.id
def desc(self):
print('emp desc')... | 26.380435 | 76 | 0.609394 |
44ae186f0bfc13a18bf20afb0697d7c014c9be60 | 203 | py | Python | django_ops/management/commands/run_housekeep.py | alan404/django-ops | 799128cdc24e98838a7cb88d4dd717a71dd4b85c | [
"Apache-2.0"
] | null | null | null | django_ops/management/commands/run_housekeep.py | alan404/django-ops | 799128cdc24e98838a7cb88d4dd717a71dd4b85c | [
"Apache-2.0"
] | null | null | null | django_ops/management/commands/run_housekeep.py | alan404/django-ops | 799128cdc24e98838a7cb88d4dd717a71dd4b85c | [
"Apache-2.0"
] | null | null | null | from django.core.management.base import BaseCommand
from ...tasks import execute_housekeep_tasks
class Command(BaseCommand):
def handle(self, *args, **options):
execute_housekeep_tasks()
| 20.3 | 51 | 0.753695 |
d4bca2c32abcea1212ed8ef45697b0c4ee8427a1 | 7,828 | py | Python | lsstprojectmeta/cli/ingestdocs.py | lsst-sqre/dochub-adapter | 3c155bc7ffe46f41e8de5108c936aed7587c8cdb | [
"MIT"
] | null | null | null | lsstprojectmeta/cli/ingestdocs.py | lsst-sqre/dochub-adapter | 3c155bc7ffe46f41e8de5108c936aed7587c8cdb | [
"MIT"
] | null | null | null | lsstprojectmeta/cli/ingestdocs.py | lsst-sqre/dochub-adapter | 3c155bc7ffe46f41e8de5108c936aed7587c8cdb | [
"MIT"
] | null | null | null | """Command line interface for lsstprojectmeta-ingest-docs.
"""
import argparse
import asyncio
import logging
import pprint
import aiohttp
from motor.motor_asyncio import AsyncIOMotorClient
from ..ltd import get_ltd_product_urls, get_ltd_product
from ..lsstdocument.handles import DOCUMENT_HANDLE_PATTERN
from ..lsstdoc... | 40.350515 | 79 | 0.639244 |
c4253d96e6717deaecbac71d309463852428185d | 6,736 | py | Python | SOURCE/PACKAGES/OBJECTS/character.py | lathanhthai1905/Wumpus-World-AI | 0aa8c0006c631f8ace98e0a87a74eac1dc975d9a | [
"MIT"
] | 1 | 2021-03-14T09:46:22.000Z | 2021-03-14T09:46:22.000Z | SOURCE/PACKAGES/OBJECTS/character.py | lathanhthai1905/Wumpus-World-AI | 0aa8c0006c631f8ace98e0a87a74eac1dc975d9a | [
"MIT"
] | null | null | null | SOURCE/PACKAGES/OBJECTS/character.py | lathanhthai1905/Wumpus-World-AI | 0aa8c0006c631f8ace98e0a87a74eac1dc975d9a | [
"MIT"
] | null | null | null | ##########################
# Custom Libraries #
from ..SETTINGS import gameflags as flags
# from ..SETTINGS import gamesettings as settings
from ..SETTINGS import gamehandler as handle
from ..OBJECTS import agentcontroller
##########################
# Built-in Libraries #
import pygame as pg
clas... | 36.410811 | 122 | 0.531621 |
9e5cc90e5ca2751e4b1eca47a108923b24a6b45c | 321 | py | Python | tickets/migrations/0022_remove_ticket_teste.py | dieisonborges/sicario | 3282c7bc89e7e6ae087ab4b67a9387dca9c71a4f | [
"MIT"
] | 1 | 2019-04-16T12:42:36.000Z | 2019-04-16T12:42:36.000Z | tickets/migrations/0022_remove_ticket_teste.py | dieisonborges/sicario | 3282c7bc89e7e6ae087ab4b67a9387dca9c71a4f | [
"MIT"
] | 11 | 2019-02-28T02:39:56.000Z | 2019-02-28T19:19:15.000Z | tickets/migrations/0022_remove_ticket_teste.py | dieisonborges/sicario | 3282c7bc89e7e6ae087ab4b67a9387dca9c71a4f | [
"MIT"
] | 1 | 2019-04-28T13:36:44.000Z | 2019-04-28T13:36:44.000Z | # Generated by Django 3.1.3 on 2020-11-11 18:07
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('tickets', '0021_ticket_teste'),
]
operations = [
migrations.RemoveField(
model_name='ticket',
name='teste',
),
]... | 17.833333 | 47 | 0.582555 |
fd3b601b1e4ac63a8f31290c3cade7208b4a5f7f | 50 | py | Python | tests/__init__.py | CursedKeyboard/UofT-Class-selection | 7c69e07b10753566efc049d603e3f52694b07c36 | [
"MIT"
] | 1 | 2020-05-02T05:07:59.000Z | 2020-05-02T05:07:59.000Z | tests/__init__.py | CursedKeyboard/UofT-Class-selection | 7c69e07b10753566efc049d603e3f52694b07c36 | [
"MIT"
] | null | null | null | tests/__init__.py | CursedKeyboard/UofT-Class-selection | 7c69e07b10753566efc049d603e3f52694b07c36 | [
"MIT"
] | null | null | null | """Unit test package for uoft_class_selection."""
| 25 | 49 | 0.76 |
f50f5aba3bc5406a9e27cffbeee316dc05e54094 | 24,310 | py | Python | tests/components/rest/test_sensor.py | JeffersonBledsoe/core | 3825f80a2dd087ae70654079cd9f3071289b8423 | [
"Apache-2.0"
] | 2 | 2021-06-04T18:34:05.000Z | 2021-06-04T18:34:12.000Z | tests/components/rest/test_sensor.py | JeffersonBledsoe/core | 3825f80a2dd087ae70654079cd9f3071289b8423 | [
"Apache-2.0"
] | 87 | 2020-07-06T22:22:54.000Z | 2022-03-31T06:01:46.000Z | tests/components/rest/test_sensor.py | JeffersonBledsoe/core | 3825f80a2dd087ae70654079cd9f3071289b8423 | [
"Apache-2.0"
] | 3 | 2021-05-31T15:32:08.000Z | 2021-08-10T22:08:42.000Z | """The tests for the REST sensor platform."""
import asyncio
from os import path
from unittest.mock import MagicMock, patch
import httpx
import respx
from homeassistant import config as hass_config
from homeassistant.components.homeassistant import SERVICE_UPDATE_ENTITY
import homeassistant.components.sensor as senso... | 31.944809 | 490 | 0.554587 |
d27146241fddf86ea986e29b82a43678164cc5b8 | 28,467 | py | Python | src/zope/app/publication/tests/test_zopepublication.py | zopefoundation/zope.app.publication | fd5cde576c4679aac1f7dc091d2fd6fb5ae51db4 | [
"ZPL-2.1"
] | 1 | 2021-02-01T06:13:49.000Z | 2021-02-01T06:13:49.000Z | src/zope/app/publication/tests/test_zopepublication.py | zopefoundation/zope.app.publication | fd5cde576c4679aac1f7dc091d2fd6fb5ae51db4 | [
"ZPL-2.1"
] | 11 | 2015-08-03T07:40:13.000Z | 2020-12-17T06:54:55.000Z | src/zope/app/publication/tests/test_zopepublication.py | zopefoundation/zope.app.publication | fd5cde576c4679aac1f7dc091d2fd6fb5ae51db4 | [
"ZPL-2.1"
] | 3 | 2015-04-03T07:58:39.000Z | 2016-11-04T06:00:03.000Z | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | 37.163185 | 79 | 0.64148 |
7f20df538c68ad25ff4e320dc31ae733d08db916 | 621 | py | Python | ex44d.py | SuPoPoo/python-exercise | 601b87c38c0090406cf532d2f9676b18650a0e0f | [
"MIT"
] | null | null | null | ex44d.py | SuPoPoo/python-exercise | 601b87c38c0090406cf532d2f9676b18650a0e0f | [
"MIT"
] | null | null | null | ex44d.py | SuPoPoo/python-exercise | 601b87c38c0090406cf532d2f9676b18650a0e0f | [
"MIT"
] | null | null | null | class Parent(object):
def override(self):
print("PARENT override()")
def implicit(self):
print("PARENT implicit()")
def altered(self):
print("PARENT altered()")
class Child(Parent):
def override(self):
print("CHILD override()")
def altered(self):
print("... | 15.525 | 47 | 0.597424 |
ceefb5ba6fed38387e0058aa7e316d6cd529aa45 | 20,535 | py | Python | sdk/python/pulumi_azure_native/network/v20190601/virtual_network_tap.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20190601/virtual_network_tap.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20190601/virtual_network_tap.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 53.616188 | 2,861 | 0.6972 |
7a6fc46f30acc4421f79d65645fce212aab674ae | 1,332 | py | Python | python/cac_tripplanner/destinations/migrations/0040_auto_20180413_1142.py | maurizi/cac-tripplanner | 3f4f1f1edc9be9e52c74eb3e124b6697429a79d6 | [
"Apache-2.0"
] | null | null | null | python/cac_tripplanner/destinations/migrations/0040_auto_20180413_1142.py | maurizi/cac-tripplanner | 3f4f1f1edc9be9e52c74eb3e124b6697429a79d6 | [
"Apache-2.0"
] | null | null | null | python/cac_tripplanner/destinations/migrations/0040_auto_20180413_1142.py | maurizi/cac-tripplanner | 3f4f1f1edc9be9e52c74eb3e124b6697429a79d6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-13 15:42
from __future__ import unicode_literals
import destinations.models
from django.db import migrations
import image_cropping.fields
class Migration(migrations.Migration):
dependencies = [
('destinations', '0039_auto_20180413_1113'),
... | 35.052632 | 137 | 0.66967 |
75af330e25ccd58ea86c9a8ef02e59d6145902a3 | 1,031 | py | Python | reports/report_group_by_const.py | andrasfe/iota-research | 9b2d7ae94b270fb869f1bfefeddece6e8e2959ca | [
"MIT"
] | null | null | null | reports/report_group_by_const.py | andrasfe/iota-research | 9b2d7ae94b270fb869f1bfefeddece6e8e2959ca | [
"MIT"
] | null | null | null | reports/report_group_by_const.py | andrasfe/iota-research | 9b2d7ae94b270fb869f1bfefeddece6e8e2959ca | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
from scipy.interpolate import make_interp_spline, BSpline
import numpy as np
if __name__ == "__main__":
df = pd.read_csv('../benchmarks.const.dfs.csv')
ax = plt.gca()
df.columns = ['V', 'E', 'Time', 'Perc']
# df = df[df['Time'] < 800] # 40 for DFS, 400 for BFS
... | 32.21875 | 90 | 0.634336 |
940ffcd79873cc2a68e457d965adcbda2d729abf | 881 | py | Python | dpmm/pp_plot.py | hannawallach/dpmm | 5c377a30ebbf92c79961f303dbd5a3c95a4cea93 | [
"Apache-2.0"
] | 21 | 2015-10-11T21:07:18.000Z | 2022-03-29T11:58:32.000Z | dpmm/pp_plot.py | wavelets/dpmm | 5c377a30ebbf92c79961f303dbd5a3c95a4cea93 | [
"Apache-2.0"
] | 1 | 2015-01-30T18:55:00.000Z | 2015-01-30T18:55:00.000Z | dpmm/pp_plot.py | wavelets/dpmm | 5c377a30ebbf92c79961f303dbd5a3c95a4cea93 | [
"Apache-2.0"
] | 9 | 2016-01-18T11:48:25.000Z | 2021-02-17T14:34:47.000Z | from numpy import arange, array, empty_like, searchsorted, sort
from pylab import plot, show
def cdf(data):
"""
Returns the empirical CDF (a function) for the specified data.
Arguments:
data -- data from which to compute the CDF
"""
tmp = empty_like(data)
tmp[:] = data
tmp.sort()
... | 16.622642 | 66 | 0.559591 |
07fcb36bed2cd68b253b966eb278aea58fb95f53 | 366 | py | Python | edgarsec/requests_wrapper.py | chaopaoo12/sec-edgar-financials | dfc3afaf224be61dfc511d6d5845420133069b40 | [
"MIT"
] | 112 | 2018-12-03T20:48:26.000Z | 2022-03-24T17:42:27.000Z | edgarsec/requests_wrapper.py | chaopaoo12/sec-edgar-financials | dfc3afaf224be61dfc511d6d5845420133069b40 | [
"MIT"
] | 8 | 2019-03-01T02:37:53.000Z | 2021-11-14T19:57:21.000Z | edgarsec/requests_wrapper.py | chaopaoo12/sec-edgar-financials | dfc3afaf224be61dfc511d6d5845420133069b40 | [
"MIT"
] | 36 | 2019-11-05T16:33:00.000Z | 2021-09-09T02:49:48.000Z | import requests
class GetRequest:
def __init__(self, url):
response = requests.get(url)
response.encoding = 'utf-8'
if response.status_code != requests.codes.ok:
raise RequestException('{}: {}'.format(response.status_code, response.text))
self.response = respons... | 28.153846 | 88 | 0.647541 |
4cee487f4a743f1be148c1a8847208e70f55f960 | 197 | py | Python | LibroDiario/forms.py | princesamee/ManejoVeterinaria | 5ffb89b848a6da8a0577a306dd97086f464c08fc | [
"CC0-1.0"
] | null | null | null | LibroDiario/forms.py | princesamee/ManejoVeterinaria | 5ffb89b848a6da8a0577a306dd97086f464c08fc | [
"CC0-1.0"
] | 1 | 2020-06-13T23:13:57.000Z | 2020-06-13T23:27:59.000Z | LibroDiario/forms.py | princesamee/ManejoVeterinaria | 5ffb89b848a6da8a0577a306dd97086f464c08fc | [
"CC0-1.0"
] | null | null | null | from django import forms
from .models import Producto
class FormularioProducto(forms.ModelForm):
class Meta:
model = Producto
fields = ('nombre', 'descripcion', 'categoria')
| 19.7 | 55 | 0.690355 |
22f2846e9ef4f597227512dd8b5e14836d857c64 | 4,826 | py | Python | hack/generators/lib/genlib/__init__.py | fabianofranz/release | 2ccc2e85469a82cce240a022ae7935ba75dfa380 | [
"Apache-2.0"
] | 185 | 2017-06-15T18:27:16.000Z | 2022-03-31T21:14:10.000Z | hack/generators/lib/genlib/__init__.py | fabianofranz/release | 2ccc2e85469a82cce240a022ae7935ba75dfa380 | [
"Apache-2.0"
] | 26,836 | 2016-12-15T21:04:07.000Z | 2022-03-31T23:56:51.000Z | hack/generators/lib/genlib/__init__.py | fabianofranz/release | 2ccc2e85469a82cce240a022ae7935ba75dfa380 | [
"Apache-2.0"
] | 1,055 | 2016-12-05T17:05:52.000Z | 2022-03-31T17:08:13.000Z | #!/usr/bin/env python3
import yaml
import sys
import os
from inspect import getframeinfo, stack
import pathlib
# If set to True, a call to gendoc will simply read & rewrite a filename in lexical order.
# This may be used as a first pass to help reduce git diffs between hand crafted and generated
# files when first ma... | 38.919355 | 121 | 0.554911 |
3938e7d6b84f4a5d3c47a83b21f89248135844a6 | 2,815 | py | Python | tools/accuracy_checker/accuracy_checker/progress_reporters.py | shinh/dldt | 693ab4e79a428e0801f17f4511b129a3fa8f4a62 | [
"Apache-2.0"
] | 1 | 2021-02-20T21:48:36.000Z | 2021-02-20T21:48:36.000Z | tools/accuracy_checker/accuracy_checker/progress_reporters.py | erinpark33/dldt | edd86d090592f7779f4dbb2681546e1f4e81284f | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/accuracy_checker/progress_reporters.py | erinpark33/dldt | edd86d090592f7779f4dbb2681546e1f4e81284f | [
"Apache-2.0"
] | 1 | 2018-12-14T07:52:51.000Z | 2018-12-14T07:52:51.000Z | """
Copyright (c) 2019 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 License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,... | 30.268817 | 117 | 0.675666 |
3b5107c350180b68395add3732540d2fea4f591d | 2,055 | py | Python | zoobar/settings.py | jonhoo/django-zoobar | a1babfc38a4bc9089dd8a4d73afe86ab0e49c85e | [
"MIT"
] | 1 | 2015-03-28T18:01:36.000Z | 2015-03-28T18:01:36.000Z | zoobar/settings.py | jonhoo/django-zoobar | a1babfc38a4bc9089dd8a4d73afe86ab0e49c85e | [
"MIT"
] | null | null | null | zoobar/settings.py | jonhoo/django-zoobar | a1babfc38a4bc9089dd8a4d73afe86ab0e49c85e | [
"MIT"
] | null | null | null | """
Django settings for zoobar project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | 22.833333 | 71 | 0.728954 |
359cb68e102ce76b4354b5b798c07abe89ba7776 | 1,066 | py | Python | main.py | ingxfm/spotify_api_billboard_scrap | 274a75551b3b222f3970f29299f901f80b8d2cfc | [
"MIT"
] | null | null | null | main.py | ingxfm/spotify_api_billboard_scrap | 274a75551b3b222f3970f29299f901f80b8d2cfc | [
"MIT"
] | null | null | null | main.py | ingxfm/spotify_api_billboard_scrap | 274a75551b3b222f3970f29299f901f80b8d2cfc | [
"MIT"
] | null | null | null | # built-in modules
import os
from time import sleep
# my own modules
from spotify_accesses import AccessSpotify
from billboard_info import RequestBillboardInfo
def clear_console():
command = 'clear'
if os.name in ('nt', 'dos'):
command = 'cls'
os.system(command)
def get_hot100_playlists():
... | 28.810811 | 117 | 0.699812 |
28e3ad377a4eb5cd8aa02fac170746be7e2f3b65 | 5,177 | py | Python | docs/conf.py | Gvinkc/geometry_analysis | 93f66c9847e16aea1aa81ccb0ab62df6bd84d8e3 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | Gvinkc/geometry_analysis | 93f66c9847e16aea1aa81ccb0ab62df6bd84d8e3 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | Gvinkc/geometry_analysis | 93f66c9847e16aea1aa81ccb0ab62df6bd84d8e3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | 31.186747 | 91 | 0.656365 |
8f22b74d7e63a4d73e020c52aa130f3434fcd7c9 | 1,896 | py | Python | tools/docker_images.py | OpenNMT/nmt-wizard-docker | a7f44297168fa0ac5159dbc7c9d49c1badaff7d5 | [
"MIT"
] | 44 | 2018-03-07T13:29:08.000Z | 2022-02-17T08:09:01.000Z | tools/docker_images.py | OpenNMT/nmt-wizard-docker | a7f44297168fa0ac5159dbc7c9d49c1badaff7d5 | [
"MIT"
] | 73 | 2018-03-07T11:06:38.000Z | 2022-01-06T14:31:31.000Z | tools/docker_images.py | OpenNMT/nmt-wizard-docker | a7f44297168fa0ac5159dbc7c9d49c1badaff7d5 | [
"MIT"
] | 20 | 2018-03-06T23:38:26.000Z | 2022-02-15T10:16:06.000Z | from __future__ import print_function
import argparse
import os
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument(
"--org", default="nmtwizard", help="Organization name on Docker Hub."
)
parser.add_argument(
"--path", default="frameworks", help="Path to a directory or a Dockerfile to bu... | 33.263158 | 88 | 0.64135 |
61b3cbc4212f32a30d5a6593ad7cd216f0039919 | 1,363 | py | Python | flask/module.py | sheki/snipy | 311ccbc043fc317b98393f16ebabb1f0f2ad2574 | [
"WTFPL"
] | 1 | 2017-12-19T22:44:19.000Z | 2017-12-19T22:44:19.000Z | flask/module.py | sheki/snipy | 311ccbc043fc317b98393f16ebabb1f0f2ad2574 | [
"WTFPL"
] | null | null | null | flask/module.py | sheki/snipy | 311ccbc043fc317b98393f16ebabb1f0f2ad2574 | [
"WTFPL"
] | null | null | null | # -*- coding: utf-8 -*-
"""
flask.module
~~~~~~~~~~~~
Implements a class that represents module blueprints.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
from .blueprints import Blueprint
def blueprint_is_module(bp):
"""Used to figure ou... | 31.697674 | 76 | 0.65077 |
810c6ba049d6e7379fadb78f1bde17d494d16b8c | 8,936 | py | Python | Policy/SoftmaxPolicy.py | NEAT-RL/Expectation-Maximisation | 68751946aba5db96910cdedb1d9a068f1d794971 | [
"Apache-2.0"
] | null | null | null | Policy/SoftmaxPolicy.py | NEAT-RL/Expectation-Maximisation | 68751946aba5db96910cdedb1d9a068f1d794971 | [
"Apache-2.0"
] | null | null | null | Policy/SoftmaxPolicy.py | NEAT-RL/Expectation-Maximisation | 68751946aba5db96910cdedb1d9a068f1d794971 | [
"Apache-2.0"
] | null | null | null | import random
import numpy as np
import logging
import scipy.stats as stats
import theano.tensor as T
logger = logging.getLogger()
class SoftmaxPolicy(object):
def __init__(self, dimension, num_actions, feature, is_greedy=False):
self.dimension = dimension
self.feature = feature
self.num_a... | 42.552381 | 133 | 0.63496 |
ec1566967ed1616c916c90b6bb3852fd0b20ac42 | 2,285 | py | Python | simple_parsing/wrappers/field_metavar.py | idoby/SimpleParsing | ed8170a32e7765bd98ed42831a428f0cdb645b67 | [
"MIT"
] | null | null | null | simple_parsing/wrappers/field_metavar.py | idoby/SimpleParsing | ed8170a32e7765bd98ed42831a428f0cdb645b67 | [
"MIT"
] | null | null | null | simple_parsing/wrappers/field_metavar.py | idoby/SimpleParsing | ed8170a32e7765bd98ed42831a428f0cdb645b67 | [
"MIT"
] | null | null | null | import functools
from dataclasses import Field
from functools import lru_cache, partial
from logging import getLogger
from typing import Any, Callable, Dict, List, Optional, Type, TypeVar
from ..utils import (
get_item_type,
get_type_arguments,
is_dict,
is_list,
is_optional,
is_set,
is_tupl... | 25.965909 | 79 | 0.618381 |
6cc7f91e35316ded5fc071e9a9e54f7576e75c5c | 3,439 | py | Python | model.py | hyperionfalling/final_assignment | b6c4d7bada3c4da014af8dbf86c1b476877f670e | [
"MIT"
] | 1 | 2020-04-16T03:15:42.000Z | 2020-04-16T03:15:42.000Z | model.py | hyperionfalling/final_assignment | b6c4d7bada3c4da014af8dbf86c1b476877f670e | [
"MIT"
] | 1 | 2020-07-14T07:21:39.000Z | 2020-07-14T07:47:28.000Z | model.py | hyperionfalling/final_assignment | b6c4d7bada3c4da014af8dbf86c1b476877f670e | [
"MIT"
] | 1 | 2020-04-16T03:15:44.000Z | 2020-04-16T03:15:44.000Z | """
-*- coding:utf-8 -*-
@Time :2019/11/29 下午3:29
@Author :wts
@File :model.py
@Version:1.0
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils import Mish
from net import DenseConv3DDownProjectionUnit, DenseConv3DUpProjectionUnit, PixelShuffle3D, NonLocalBlock3D
from torchsummary impo... | 26.867188 | 122 | 0.614714 |
fb253220a03236b5570189d7fb16583cc203fba5 | 7,783 | py | Python | nebula/dao/variable_model_dao.py | threathunterX/nebula_web | 2e32e6e7b225e0bd87ee8c847c22862f12c51bb1 | [
"Apache-2.0"
] | 2 | 2019-05-01T09:42:32.000Z | 2019-05-31T01:08:37.000Z | nebula/dao/variable_model_dao.py | threathunterX/nebula_web | 2e32e6e7b225e0bd87ee8c847c22862f12c51bb1 | [
"Apache-2.0"
] | 1 | 2021-06-01T23:30:04.000Z | 2021-06-01T23:30:04.000Z | nebula/dao/variable_model_dao.py | threathunterX/nebula_web | 2e32e6e7b225e0bd87ee8c847c22862f12c51bb1 | [
"Apache-2.0"
] | 5 | 2019-05-14T09:30:12.000Z | 2020-09-29T04:57:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from threathunter_common.util import millis_now
from nebula_meta.variable_model import sort_variable_models
from .base_dao import BaseDao, BaseDefaultDao
from ..models.default import VariableModelDefault
from ..models import VariableM... | 33.403433 | 107 | 0.631119 |
62fe33e54551bb1d84332e1dcde151ddb0505950 | 954 | py | Python | tests/test_aspsps.py | dogmatic69/nordigen-python | 4bba0782cadc6473a0f113535bf252bc2781ddac | [
"MIT"
] | 2 | 2021-09-08T09:22:52.000Z | 2022-03-11T15:33:45.000Z | tests/test_aspsps.py | dogmatic69/nordigen-python | 4bba0782cadc6473a0f113535bf252bc2781ddac | [
"MIT"
] | 6 | 2022-01-06T22:16:33.000Z | 2022-01-09T01:17:31.000Z | tests/test_aspsps.py | dogmatic69/nordigen-python | 4bba0782cadc6473a0f113535bf252bc2781ddac | [
"MIT"
] | null | null | null | import unittest
from . import test_client_with_token
class TestAspspsClient(unittest.TestCase):
def test_by_country_v1(self):
client = test_client_with_token().aspsps
with self.assertWarns(DeprecationWarning) as warn:
client.by_country("SE")
expected = "AspspsClient() has be... | 34.071429 | 117 | 0.702306 |
5a9aa05eb21f55d4c774b85637801f55f038eb2b | 1,633 | py | Python | dvc/command/checkout.py | zb0th/dvc | 5fdbc1882f73162419d5b84ed47a33e9e321f151 | [
"Apache-2.0"
] | 1 | 2020-07-25T08:23:32.000Z | 2020-07-25T08:23:32.000Z | dvc/command/checkout.py | aliseramirez/dvc | 92cc9f7e6f19f3b92f43e28131fe50c20b297214 | [
"Apache-2.0"
] | null | null | null | dvc/command/checkout.py | aliseramirez/dvc | 92cc9f7e6f19f3b92f43e28131fe50c20b297214 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import argparse
from dvc.command.base import CmdBase, append_doc_link
class CmdCheckout(CmdBase):
def run(self):
if not self.args.targets:
self.repo.checkout(force=self.args.force)
else:
for target in self.args.targets:
... | 29.160714 | 73 | 0.61237 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.