hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c02b45a8f695333458665968e09c2c1f509da5d6 | 791 | py | Python | tests/util4tests.py | vliz-be-opsci/py-xmlasdict | 783ab9ecbce47650800f3b9fa4d85c433792670d | [
"MIT"
] | null | null | null | tests/util4tests.py | vliz-be-opsci/py-xmlasdict | 783ab9ecbce47650800f3b9fa4d85c433792670d | [
"MIT"
] | 5 | 2022-02-16T10:11:09.000Z | 2022-03-31T15:28:44.000Z | tests/util4tests.py | vliz-be-opsci/py-xmlasdict | 783ab9ecbce47650800f3b9fa4d85c433792670d | [
"MIT"
] | 1 | 2022-02-14T10:38:58.000Z | 2022-02-14T10:38:58.000Z | import logging
import logging.config
import os
import sys
import pytest
import yaml
from dotenv import load_dotenv
log = logging.getLogger('tests')
def enable_test_logging():
load_dotenv()
if 'PYTEST_LOGCONF' in os.environ:
logconf = os.environ['PYTEST_LOGCONF']
with open(logconf, 'r') as ym... | 27.275862 | 85 | 0.683944 |
1c0832d0296309956fc0b1ed09c32b7f92ace24e | 556 | py | Python | Instructions.py | TomDouris/solitaire | 255ad0f7b0959479aad98c55817457cd1c7037ea | [
"MIT"
] | null | null | null | Instructions.py | TomDouris/solitaire | 255ad0f7b0959479aad98c55817457cd1c7037ea | [
"MIT"
] | null | null | null | Instructions.py | TomDouris/solitaire | 255ad0f7b0959479aad98c55817457cd1c7037ea | [
"MIT"
] | null | null | null | # Instructions.py
import pygame
import constants
from Location import Location
class Instructions:
def __init__(self, instructions):
self.instructions = instructions
def draw(self, screen):
font = pygame.font.SysFont(constants.FONT_ARIAL, int(round(constants.CELL_WIDTH*1/2)), False, False)
... | 30.888889 | 114 | 0.726619 |
1318b50c046c157f87b40e2c01b999abe49874f4 | 16,278 | py | Python | pytweet/paginations.py | TheFarGG/PyTweet | d8dbade5957fc6aba184806ffd44a9b431bd324a | [
"MIT"
] | 614 | 2021-10-30T04:27:34.000Z | 2021-11-11T22:16:00.000Z | pytweet/paginations.py | PyTweet/PyTweet | d8dbade5957fc6aba184806ffd44a9b431bd324a | [
"MIT"
] | 14 | 2021-11-17T07:29:19.000Z | 2022-03-29T08:48:23.000Z | pytweet/paginations.py | PyTweet/PyTweet | d8dbade5957fc6aba184806ffd44a9b431bd324a | [
"MIT"
] | 16 | 2021-11-13T17:20:31.000Z | 2022-02-21T18:57:24.000Z | from __future__ import annotations
from typing import Any, List, Tuple, Optional, TYPE_CHECKING
from .errors import NoPageAvailable
if TYPE_CHECKING:
from .http import HTTPClient
from .type import Payload
class Pagination:
"""Represents the base class of all pagination objects.
.. versionadded:: 1... | 30.426168 | 224 | 0.602224 |
853f85e5abff2e69a3d31d1e2d1ccc8806ced4b2 | 623 | py | Python | je_auto_control/utils/timeout/multiprocess_timeout.py | JE-Chen/Python_JEAutoControl | 477bf9612e28e9ab6d0a8e269db2f699e50a3744 | [
"MIT"
] | 9 | 2020-10-12T06:33:36.000Z | 2021-09-13T07:07:36.000Z | je_auto_control/utils/timeout/multiprocess_timeout.py | JE-Chen/Python_JEAutoControl | 477bf9612e28e9ab6d0a8e269db2f699e50a3744 | [
"MIT"
] | 2 | 2021-11-19T13:45:37.000Z | 2021-12-03T12:25:28.000Z | je_auto_control/utils/timeout/multiprocess_timeout.py | JE-Chen/Python_JEAutoControl | 477bf9612e28e9ab6d0a8e269db2f699e50a3744 | [
"MIT"
] | null | null | null | from multiprocessing import Process
from je_auto_control.utils.exception.exceptions import AutoControlTimeoutException
from je_auto_control.utils.exception.exception_tag import timeout_need_on_main_error
def multiprocess_timeout(check_function, time: int):
try:
new_process = Process(target=check_function)... | 34.611111 | 84 | 0.772071 |
8b9b1d6d5c3c64f635f4fcdf7f528eff4ce0daea | 460 | py | Python | plugins/__init__.py | Jesus-E-Rodriguez/DiscordRedditPoster | fede2328a1bc488a90c637dbbc7d20dc7f9404b9 | [
"MIT"
] | null | null | null | plugins/__init__.py | Jesus-E-Rodriguez/DiscordRedditPoster | fede2328a1bc488a90c637dbbc7d20dc7f9404b9 | [
"MIT"
] | null | null | null | plugins/__init__.py | Jesus-E-Rodriguez/DiscordRedditPoster | fede2328a1bc488a90c637dbbc7d20dc7f9404b9 | [
"MIT"
] | null | null | null | import importlib
import inspect
import os
from discord.ext import commands
Cogs = []
for module in os.listdir(os.path.dirname(os.path.abspath(__file__))):
if module == "__init__.py" or module[-3:] != ".py":
continue
mdl = importlib.import_module(f"plugins.{module[:-3]}")
Cogs.extend(
obj
... | 25.555556 | 82 | 0.669565 |
59eb86e4f8d54b89b350c5585da089f166336173 | 3,261 | py | Python | ODE2.py | niktryf/RungeKutta_2ndOrder | dbb6af34fbaee08ca348a8273b72c158bb2db93f | [
"MIT"
] | 1 | 2019-02-12T22:18:26.000Z | 2019-02-12T22:18:26.000Z | ODE2.py | niktryf/Python_RungeKutta_2ndOrder | dbb6af34fbaee08ca348a8273b72c158bb2db93f | [
"MIT"
] | null | null | null | ODE2.py | niktryf/Python_RungeKutta_2ndOrder | dbb6af34fbaee08ca348a8273b72c158bb2db93f | [
"MIT"
] | null | null | null | ##############################################################################
### Python 2nd Order ODE solver, using the Runge-Kutta 4th order method
### Solves ordinary differential equations of the form
###
### (d^2)x/(dt^2) = f(t, x, v)
###
### As usual, the 2nd order ODE is split into two coupled 1st order O... | 31.057143 | 81 | 0.560564 |
d68e8d560c8159d5ea982b775a79bd87d1bb1030 | 260 | py | Python | ticktick/managers/pomo.py | prnake/ticktick-py | 33f2131deca65dc322f0c6a8447c50122fa9006b | [
"MIT"
] | null | null | null | ticktick/managers/pomo.py | prnake/ticktick-py | 33f2131deca65dc322f0c6a8447c50122fa9006b | [
"MIT"
] | null | null | null | ticktick/managers/pomo.py | prnake/ticktick-py | 33f2131deca65dc322f0c6a8447c50122fa9006b | [
"MIT"
] | null | null | null | class PomoManager:
def __init__(self, client_class):
self._client = client_class
self.access_token = ''
def start(self):
pass
def statistics(self):
# https://api.dida365.com/api/v2/statistics/general
pass
| 20 | 59 | 0.611538 |
866e11d79fe6747354a3caa3492f636422cd3f9e | 624 | py | Python | couchbase/analytics.py | griels/couchbase-python-client-ng | bcda55109f82e41041cf727d604bb335546f64e4 | [
"Apache-2.0"
] | 1 | 2019-10-01T19:06:29.000Z | 2019-10-01T19:06:29.000Z | couchbase/analytics.py | pauldx/couchbase-python-client | 98bdd44604675f7ad844b39f72e754dec6445cbb | [
"Apache-2.0"
] | null | null | null | couchbase/analytics.py | pauldx/couchbase-python-client | 98bdd44604675f7ad844b39f72e754dec6445cbb | [
"Apache-2.0"
] | null | null | null | from .n1ql import *
from couchbase_core.n1ql import N1QLRequest
class AnalyticsResult(QueryResult):
def client_context_id(self):
return super(AnalyticsResult, self).client_context_id()
def signature(self):
return super(AnalyticsResult, self).signature()
def warnings(self):
return... | 27.130435 | 63 | 0.669872 |
dfb816afd4701b6a0dcbfd18d8b4f557cf035703 | 16,281 | py | Python | pycwr/io/CCFile.py | zhaopingsun/pycwr | 7459371588e6d0d6d0737e249afa3921fe073151 | [
"MIT"
] | 4 | 2019-12-24T06:07:59.000Z | 2020-10-13T02:24:18.000Z | pycwr/io/CCFile.py | zhaopingsun/pycwr | 7459371588e6d0d6d0737e249afa3921fe073151 | [
"MIT"
] | null | null | null | pycwr/io/CCFile.py | zhaopingsun/pycwr | 7459371588e6d0d6d0737e249afa3921fe073151 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
from .BaseDataProtocol.CCProtocol import dtype_cc
from .util import _prepare_for_read, _unpack_from_buf, get_radar_info, make_time_unit_str, get_radar_sitename
import datetime
import pandas as pd
from ..core.NRadar import PRD
from ..configure.pyart_config import get_metadata, ... | 39.904412 | 119 | 0.592531 |
d191db9d3897d5a9d6134d100d3719b90c1e9852 | 2,624 | py | Python | examples/async/client_batch.py | brubbel/Pyro4 | 791f5aff6e0c89e74264843defdd694cdaf99cc5 | [
"MIT"
] | 638 | 2015-01-04T14:59:55.000Z | 2022-03-29T02:28:39.000Z | examples/async/client_batch.py | brubbel/Pyro4 | 791f5aff6e0c89e74264843defdd694cdaf99cc5 | [
"MIT"
] | 173 | 2015-01-05T17:29:19.000Z | 2021-12-25T01:47:07.000Z | examples/async/client_batch.py | brubbel/Pyro4 | 791f5aff6e0c89e74264843defdd694cdaf99cc5 | [
"MIT"
] | 103 | 2015-01-10T10:00:08.000Z | 2022-03-06T14:19:20.000Z | from __future__ import print_function
import sys
import time
import Pyro4
if sys.version_info < (3, 0):
input = raw_input
def asyncFunction(values):
results = [value + 1 for value in values]
print(">>> async batch function called, returning:", results)
return results
uri = input("enter async serv... | 32.8 | 109 | 0.73247 |
4017a9efd4813dddbd618d164b86dea4735b33c9 | 8,710 | py | Python | py/test/selenium/webdriver/common/frame_switching_tests.py | chromium-googlesource-mirror/selenium | fcf26da81afa5d3e8edfc776f558eebf2e7d28b3 | [
"Apache-2.0"
] | 1 | 2018-08-24T18:01:34.000Z | 2018-08-24T18:01:34.000Z | py/test/selenium/webdriver/common/frame_switching_tests.py | chromium-googlesource-mirror/selenium | fcf26da81afa5d3e8edfc776f558eebf2e7d28b3 | [
"Apache-2.0"
] | 1 | 2021-10-18T12:23:37.000Z | 2021-10-18T12:23:37.000Z | py/test/selenium/webdriver/common/frame_switching_tests.py | chromium-googlesource-mirror/selenium | fcf26da81afa5d3e8edfc776f558eebf2e7d28b3 | [
"Apache-2.0"
] | 2 | 2018-04-30T21:35:30.000Z | 2021-05-14T08:11:46.000Z | #!/usr/bin/python
# Copyright 2008-2010 WebDriver committers
# Copyright 2008-2010 Google 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-... | 37.222222 | 90 | 0.707922 |
f435c1f45144c25135fa5924bbca446862c7a86a | 1,261 | py | Python | tests/feature/test_no_scenario.py | veliakiner/pytest-bdd | dc82652f82a08df3410d51afc30891f8ec0c5d37 | [
"MIT"
] | null | null | null | tests/feature/test_no_scenario.py | veliakiner/pytest-bdd | dc82652f82a08df3410d51afc30891f8ec0c5d37 | [
"MIT"
] | 1 | 2019-01-12T13:09:35.000Z | 2019-01-12T13:09:35.000Z | tests/feature/test_no_scenario.py | veliakiner/pytest-bdd | dc82652f82a08df3410d51afc30891f8ec0c5d37 | [
"MIT"
] | null | null | null | """Test no scenarios defined in the feature file."""
import textwrap
def test_no_scenarios(testdir):
"""Test no scenarios defined in the feature file."""
features = testdir.mkdir('features')
features.join('test.feature').write_text(textwrap.dedent(u"""
Given foo
When bar
Then baz
... | 26.270833 | 85 | 0.626487 |
b7f2cc77b85a4bbc1915a1b506882079a65acab8 | 5,877 | py | Python | cloudify_aws/codepipeline/tests/test_pipeline.py | szpotona/cloudify-aws-plugin | 52c5240aaa6638816e7973742ad8b6f5d1c59e79 | [
"Apache-2.0"
] | null | null | null | cloudify_aws/codepipeline/tests/test_pipeline.py | szpotona/cloudify-aws-plugin | 52c5240aaa6638816e7973742ad8b6f5d1c59e79 | [
"Apache-2.0"
] | null | null | null | cloudify_aws/codepipeline/tests/test_pipeline.py | szpotona/cloudify-aws-plugin | 52c5240aaa6638816e7973742ad8b6f5d1c59e79 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 Cloudify Platform Ltd. 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 ap... | 32.469613 | 77 | 0.670921 |
570914b45fb44c7831d88ce26836d3e5793c0a7c | 648 | py | Python | payroll/manage.py | the-krafty-koder/pay-3 | 20426ef00b78c2a65fb4031a7692866bd22a991a | [
"MIT"
] | 1 | 2021-03-26T19:39:30.000Z | 2021-03-26T19:39:30.000Z | payroll/manage.py | the-krafty-koder/pay-3 | 20426ef00b78c2a65fb4031a7692866bd22a991a | [
"MIT"
] | 12 | 2020-10-27T22:47:01.000Z | 2022-03-12T00:42:49.000Z | payroll/manage.py | the-krafty-koder/pay-3 | 20426ef00b78c2a65fb4031a7692866bd22a991a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'payroll.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
r... | 29.454545 | 74 | 0.660494 |
01c719c4f24136821389b8e42bb6684219f906c9 | 4,853 | py | Python | ShadowPager/src/pager_client.py | cPolaris/Toys | 3aae402144d43813633e39110786b5eab5a906a3 | [
"MIT"
] | 2 | 2018-04-02T17:22:58.000Z | 2018-04-02T17:23:05.000Z | ShadowPager/src/pager_client.py | cPolaris/toys | 3aae402144d43813633e39110786b5eab5a906a3 | [
"MIT"
] | null | null | null | ShadowPager/src/pager_client.py | cPolaris/toys | 3aae402144d43813633e39110786b5eab5a906a3 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function, \
with_statement
from shadowsocks import shell, daemon, eventloop, tcprelay, udprelay, asyncdns, encrypt
from db import ServersManager
import os
import random
import string
import sys
import json
import logging
import signal
import socket
sys.path.i... | 34.41844 | 98 | 0.612199 |
4709dff73fca513e2ad364ebe0824fb995cd80d1 | 25,379 | py | Python | codes/FA-SRGAN/models/modules/architecture.py | SamirMitha/SuperResolution | 233b2736c7187d5c0c214af5eb60dba3f96bb48c | [
"MIT"
] | 2 | 2021-12-21T21:06:23.000Z | 2021-12-24T18:56:15.000Z | codes/FA-SRGAN/models/modules/architecture.py | SamirMitha/SuperResolution | 233b2736c7187d5c0c214af5eb60dba3f96bb48c | [
"MIT"
] | null | null | null | codes/FA-SRGAN/models/modules/architecture.py | SamirMitha/SuperResolution | 233b2736c7187d5c0c214af5eb60dba3f96bb48c | [
"MIT"
] | 1 | 2021-12-21T21:14:05.000Z | 2021-12-21T21:14:05.000Z | import math
import torch
import torch.nn as nn
import torchvision
from . import block as B
from . import spectral_norm as SN
####################
# Generator
####################
class SRResNet(nn.Module):
def __init__(self, in_nc, out_nc, nf, nb, upscale=4, norm_type='batch', act_type='relu', \
mode... | 40.220285 | 122 | 0.600812 |
5d25f0f9bbbf7a06836e92a6dbd6ccf8d0b9ee02 | 57,413 | py | Python | main.py | wolf498/fun2 | 9ee17c803f6818913c9c1b91a729e7866bb57897 | [
"MIT"
] | 1 | 2021-10-02T12:51:59.000Z | 2021-10-02T12:51:59.000Z | main.py | wolf498/fun2 | 9ee17c803f6818913c9c1b91a729e7866bb57897 | [
"MIT"
] | null | null | null | main.py | wolf498/fun2 | 9ee17c803f6818913c9c1b91a729e7866bb57897 | [
"MIT"
] | 1 | 2022-01-04T13:42:23.000Z | 2022-01-04T13:42:23.000Z | import discord
from discord.ext import commands
from discord.ext import tasks
from discord.ext.commands import cooldown, BucketType
from discord.ext.commands import (CommandOnCooldown)
from PIL import Image, ImageFont, ImageDraw, ImageOps
from unidecode import unidecode
from io import BytesIO
import asyncio
import disc... | 35.287646 | 958 | 0.633376 |
314eebdf65caa8e224f4c6b1da964410e7b905e7 | 371 | py | Python | contacts_searcher/domain/contact_repository.py | sabkaryan/contacts-searcher | b9a1682d72ac517a970a78e7fd960ced156a0adb | [
"MIT"
] | null | null | null | contacts_searcher/domain/contact_repository.py | sabkaryan/contacts-searcher | b9a1682d72ac517a970a78e7fd960ced156a0adb | [
"MIT"
] | null | null | null | contacts_searcher/domain/contact_repository.py | sabkaryan/contacts-searcher | b9a1682d72ac517a970a78e7fd960ced156a0adb | [
"MIT"
] | null | null | null | from typing import List
from contacts_searcher.domain.contact import Contact
class ContactRepository:
def __init__(self, datasource):
self.collection = datasource.get_collection('contacts')
def write_all(self, contacts: List[Contact]):
contacts_dict = [vars(contact) for contact in contacts]
... | 28.538462 | 63 | 0.746631 |
5b24c5147c2abf137999514b97fd4957ea841269 | 9,243 | py | Python | src/m2e_iterating.py | Freedom4501/11-Sequences | 4762ced7538de7c115503b99827d7c55423013c3 | [
"MIT"
] | null | null | null | src/m2e_iterating.py | Freedom4501/11-Sequences | 4762ced7538de7c115503b99827d7c55423013c3 | [
"MIT"
] | null | null | null | src/m2e_iterating.py | Freedom4501/11-Sequences | 4762ced7538de7c115503b99827d7c55423013c3 | [
"MIT"
] | null | null | null | """
This module shows how to ITERATE (i.e. loop) through a SEQUENCE:
-- list
-- string
-- tuple
It shows two ways to do so:
-- using RANGE
-- using just IN (no RANGE)
Authors: David Mutchler, Valerie Galluzzi, Mark Hays, Amanda Stouder,
and their colleagues.
"""
import rosegraphics as rg
def mai... | 35.964981 | 73 | 0.509358 |
055e131954dc75e227fb42d97bc3312ab8c7b53a | 8,212 | py | Python | readthedocs/api/v2/utils.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,092 | 2019-06-29T07:47:30.000Z | 2022-03-31T14:54:59.000Z | readthedocs/api/v2/utils.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,389 | 2019-06-29T04:22:55.000Z | 2022-03-31T22:57:49.000Z | readthedocs/api/v2/utils.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 1,185 | 2019-06-29T21:49:31.000Z | 2022-03-30T09:57:15.000Z | """Utility functions that are used by both views and celery tasks."""
import itertools
import structlog
from rest_framework.pagination import PageNumberPagination
from readthedocs.builds.constants import (
BRANCH,
INTERNAL,
LATEST,
LATEST_VERBOSE_NAME,
NON_REPOSITORY_VERSIONS,
STABLE,
STA... | 30.191176 | 99 | 0.63529 |
e6d68efc79f1dabb5ee889082f9089f49a143604 | 5,195 | py | Python | python2/koans/about_class_attributes.py | rameshugar/koans | 35f2407dac045040bfd54ebe9f95ce77fd8a1b23 | [
"MIT"
] | null | null | null | python2/koans/about_class_attributes.py | rameshugar/koans | 35f2407dac045040bfd54ebe9f95ce77fd8a1b23 | [
"MIT"
] | null | null | null | python2/koans/about_class_attributes.py | rameshugar/koans | 35f2407dac045040bfd54ebe9f95ce77fd8a1b23 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Based on AboutClassMethods in the Ruby Koans
#
from runner.koan import *
class AboutClassAttributes(Koan):
class Dog(object):
pass
def test_new_style_class_objects_are_objects(self):
# Note: Old style class instances are not objects but they... | 31.295181 | 79 | 0.616362 |
2587b451e7fccef4725bc0f4eac39826fa783d97 | 869 | py | Python | qiskit/test/mock/backends/valencia/fake_valencia.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 11 | 2019-06-27T09:53:29.000Z | 2021-03-02T04:40:30.000Z | qiskit/test/mock/backends/valencia/fake_valencia.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 24 | 2021-01-27T08:20:27.000Z | 2021-07-06T09:42:28.000Z | qiskit/test/mock/backends/valencia/fake_valencia.py | ajavadia/qiskit-sdk-py | a59e8e6be1793197e19998c1f7dcfc45e6f2f3af | [
"Apache-2.0"
] | 4 | 2019-08-05T15:35:33.000Z | 2020-09-18T18:55:02.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# 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 modifications or derivative wo... | 29.965517 | 77 | 0.745685 |
cd51d8958e972b16f5e67b96a52f74c87b5654ae | 17,898 | py | Python | tests/web/classes/test_objects.py | priya1puresoftware/python-slack-sdk | 3503182feaaf4d41b57fd8bf10038ebc99f1f3c7 | [
"MIT"
] | 2,486 | 2016-11-03T14:31:43.000Z | 2020-10-26T23:07:44.000Z | tests/web/classes/test_objects.py | priya1puresoftware/python-slack-sdk | 3503182feaaf4d41b57fd8bf10038ebc99f1f3c7 | [
"MIT"
] | 721 | 2016-11-03T21:26:56.000Z | 2020-10-26T12:41:29.000Z | tests/web/classes/test_objects.py | priya1puresoftware/python-slack-sdk | 3503182feaaf4d41b57fd8bf10038ebc99f1f3c7 | [
"MIT"
] | 627 | 2016-11-02T19:04:19.000Z | 2020-10-25T19:21:13.000Z | import copy
import unittest
from typing import Optional, List, Union
from slack.errors import SlackObjectFormationError
from slack.web.classes import JsonObject, JsonValidator
from slack.web.classes.objects import (
ChannelLink,
ConfirmObject,
DateLink,
EveryoneLink,
HereLink,
Link,
Markdow... | 34.419231 | 88 | 0.568052 |
9f51d718e882de96ff7abf8365476dc6cd21d4d5 | 2,091 | py | Python | listings/migrations/0001_initial.py | jubayer-hossain/real-estate-app | b2999f5b0d6311aeaa87275f7c979a9573f2b4ed | [
"MIT"
] | null | null | null | listings/migrations/0001_initial.py | jubayer-hossain/real-estate-app | b2999f5b0d6311aeaa87275f7c979a9573f2b4ed | [
"MIT"
] | null | null | null | listings/migrations/0001_initial.py | jubayer-hossain/real-estate-app | b2999f5b0d6311aeaa87275f7c979a9573f2b4ed | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-02-15 17:43
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('realtors', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 46.466667 | 118 | 0.580583 |
8687ff23eb5a3eff89e3a7976106be26334cf164 | 966 | py | Python | tests/datasets/loaders/test_criteo_uplift_prediction.py | duketemon/pyuplift | 33daa0768ff333387cb8223ebfaedaffa57de335 | [
"MIT"
] | 26 | 2019-02-24T07:41:59.000Z | 2022-01-03T05:07:26.000Z | tests/datasets/loaders/test_criteo_uplift_prediction.py | duketemon/pyuplift | 33daa0768ff333387cb8223ebfaedaffa57de335 | [
"MIT"
] | 8 | 2019-03-17T07:57:16.000Z | 2019-08-02T19:55:49.000Z | tests/datasets/loaders/test_criteo_uplift_prediction.py | duketemon/pyuplift | 33daa0768ff333387cb8223ebfaedaffa57de335 | [
"MIT"
] | 4 | 2019-07-17T12:36:37.000Z | 2020-07-16T11:36:35.000Z | import os
import shutil
import pytest
from pyuplift.datasets import load_criteo_uplift_prediction
from pyuplift.datasets import download_criteo_uplift_prediction
data_home = os.path.join(os.sep.join(__file__.split(os.sep)[:-1]), 'data')
def test_load_criteo_uplift_prediction__do_not_download_if_missing():
with ... | 32.2 | 118 | 0.807453 |
fb2d1d12098312c270d4a6e2a50ba1bd24bba051 | 48,085 | py | Python | edb/pgsql/compiler/pathctx.py | sfermigier/edgedb | 13aff7004aa682777287157dea52642c374967e8 | [
"Apache-2.0"
] | null | null | null | edb/pgsql/compiler/pathctx.py | sfermigier/edgedb | 13aff7004aa682777287157dea52642c374967e8 | [
"Apache-2.0"
] | null | null | null | edb/pgsql/compiler/pathctx.py | sfermigier/edgedb | 13aff7004aa682777287157dea52642c374967e8 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB 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... | 33.767556 | 79 | 0.634938 |
e685f866c61ff91e0452538442db45529d01cf6b | 856 | py | Python | sa/profiles/Eltex/MES5448/get_config.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | sa/profiles/Eltex/MES5448/get_config.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | sa/profiles/Eltex/MES5448/get_config.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Eltex.MES5448.get_config
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# -------------------------------------------------------... | 32.923077 | 71 | 0.490654 |
773e4908e88299d8b803998ce0a395959e683cea | 2,068 | py | Python | scripts/generate_buffet.py | evolutics/code-cleaner-buffet | 73ba3f8e322b24b019d9e85e7e6704338109da67 | [
"MIT"
] | null | null | null | scripts/generate_buffet.py | evolutics/code-cleaner-buffet | 73ba3f8e322b24b019d9e85e7e6704338109da67 | [
"MIT"
] | null | null | null | scripts/generate_buffet.py | evolutics/code-cleaner-buffet | 73ba3f8e322b24b019d9e85e7e6704338109da67 | [
"MIT"
] | 1 | 2020-07-17T15:45:19.000Z | 2020-07-17T15:45:19.000Z | #!/usr/bin/env python3
import argparse
import json
import os
import pathlib
import subprocess
def main():
os.chdir(pathlib.Path(os.path.realpath(__file__)).parent.parent)
parser = argparse.ArgumentParser()
parser.add_argument("--tag", default=_get_latest_tag())
arguments = parser.parse_args()
_... | 25.530864 | 87 | 0.605899 |
1aa0c8474d06397e109a0d0bac4ad9e40b2256e8 | 8,257 | py | Python | model/norm_module.py | ZejianLi/LAMA | f8737926e47b197c94c1254eb900fb6d56fb7ddd | [
"MIT"
] | 2 | 2021-08-23T13:01:39.000Z | 2021-12-14T07:22:19.000Z | model/norm_module.py | ZejianLi/LAMA | f8737926e47b197c94c1254eb900fb6d56fb7ddd | [
"MIT"
] | null | null | null | model/norm_module.py | ZejianLi/LAMA | f8737926e47b197c94c1254eb900fb6d56fb7ddd | [
"MIT"
] | 1 | 2022-02-17T05:51:23.000Z | 2022-02-17T05:51:23.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
# Adaptive instance normalization
# modified from https://github.com/NVlabs/MUNIT/blob/d79d62d99b588ae341f9826799980ae7298da553/networks.py#L453-L482
class AdaptiveInstanceNorm2d(nn.Module):
def __init__(self, num_features, num_w=512, eps=1e-5, m... | 41.70202 | 115 | 0.622502 |
a26716b6c1f216f12b6509cd9ddf2e307d447192 | 619 | py | Python | laboratorios/Laboratorio_9/A -Jesse and Cookies.py | yeisonbarreto/ayed-2019-1 | 4d65c52b60b0b9b98860e323b9514edd580aae8d | [
"MIT"
] | null | null | null | laboratorios/Laboratorio_9/A -Jesse and Cookies.py | yeisonbarreto/ayed-2019-1 | 4d65c52b60b0b9b98860e323b9514edd580aae8d | [
"MIT"
] | null | null | null | laboratorios/Laboratorio_9/A -Jesse and Cookies.py | yeisonbarreto/ayed-2019-1 | 4d65c52b60b0b9b98860e323b9514edd580aae8d | [
"MIT"
] | null | null | null | from sys import stdin
from collections import deque
def Jesse(arr,y):
dequeue = deque(arr)
cont = 0
for i in range(len(arr)):
if sweetness <= y:
sweetness = 1 * dequeue[0] + 2 * dequeue[1]
print('--',sweetness)
print(dequeue.popleft())
print(deque... | 24.76 | 60 | 0.529887 |
7c18b0453ac53e188b2dfdae3a9dda21a73246a0 | 4,857 | py | Python | build_img.py | teeks99/boost-cpp-docker | 96e4b8a245ecb2fea330c693a15002aeeb72156f | [
"MIT"
] | 8 | 2018-05-04T18:06:52.000Z | 2022-02-16T06:38:50.000Z | build_img.py | teeks99/boost-cpp-docker | 96e4b8a245ecb2fea330c693a15002aeeb72156f | [
"MIT"
] | 4 | 2018-02-08T03:59:01.000Z | 2019-06-03T11:43:29.000Z | build_img.py | teeks99/boost-cpp-docker | 96e4b8a245ecb2fea330c693a15002aeeb72156f | [
"MIT"
] | 3 | 2018-02-10T19:03:35.000Z | 2020-03-20T15:48:01.000Z | import sys
import subprocess
import datetime
import argparse
import re
options = None
versions = [
# Precise
# "gcc-4.4", "gcc-4.5",
# Trusty
# "clang-2.9", "clang-3.0", "clang-3.1", "clang-3.2", "clang-3.3",
# "clang-3.4", "clang-3.5", "clang-3.6", "clang-3.7", "clang-3.8",
"gcc-4.6", "gcc-4.... | 25.429319 | 75 | 0.603871 |
acd2093b1fcfb83e17ca776dd0a8197c7c4a16a5 | 11,520 | py | Python | build/android/install_emulator_deps.py | TwistedCore/external_v8 | c6725dab9be251fbfc6fd7d53c3513a23e78c36c | [
"BSD-3-Clause"
] | 777 | 2017-08-29T15:15:32.000Z | 2022-03-21T05:29:41.000Z | build/android/install_emulator_deps.py | TwistedCore/external_v8 | c6725dab9be251fbfc6fd7d53c3513a23e78c36c | [
"BSD-3-Clause"
] | 66 | 2017-08-30T18:31:18.000Z | 2021-08-02T10:59:35.000Z | build/android/install_emulator_deps.py | TwistedCore/external_v8 | c6725dab9be251fbfc6fd7d53c3513a23e78c36c | [
"BSD-3-Clause"
] | 123 | 2017-08-30T01:19:34.000Z | 2022-03-17T22:55:31.000Z | #!/usr/bin/env python
# Copyright (c) 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.
"""Installs deps for using SDK emulator for testing.
The script will download the SDK and system images, if they are not present, ... | 36.112853 | 80 | 0.650347 |
1edef073fe9d763fe6fba3791183321ead5c2857 | 517 | py | Python | Basics/main.py | miku/batchdata | 25446f7d9c6baad24de7ee8b964c62726bf27ea5 | [
"MIT"
] | 8 | 2018-11-17T17:17:29.000Z | 2019-09-23T17:31:09.000Z | Basics/main.py | miku/batchdata | 25446f7d9c6baad24de7ee8b964c62726bf27ea5 | [
"MIT"
] | null | null | null | Basics/main.py | miku/batchdata | 25446f7d9c6baad24de7ee8b964c62726bf27ea5 | [
"MIT"
] | null | null | null | """
Basic example, a minimal task and command line integration.
Fill in the blanks.
Run:
$ python main.py
Luigi requires a scheduler and comes with a local scheduler for development.
$ python main.py --local-scheduler
Specify the task name (name of the class) to execute:
$ python main.py <taskname> -... | 18.464286 | 76 | 0.694391 |
1d26e026f89c7acf328898793ab8d737a2bf664b | 2,874 | py | Python | setup.py | adamcharnock/lightbus | 5e7069da06cd37a8131e8c592ee957ccb73603d5 | [
"Apache-2.0"
] | 178 | 2017-07-22T12:35:00.000Z | 2022-03-28T07:53:13.000Z | setup.py | adamcharnock/warren | 5e7069da06cd37a8131e8c592ee957ccb73603d5 | [
"Apache-2.0"
] | 26 | 2017-08-03T12:09:29.000Z | 2021-10-19T16:47:18.000Z | setup.py | adamcharnock/warren | 5e7069da06cd37a8131e8c592ee957ccb73603d5 | [
"Apache-2.0"
] | 19 | 2017-09-15T17:51:24.000Z | 2022-02-28T13:00:16.000Z | # -*- coding: utf-8 -*-
# DO NOT EDIT THIS FILE!
# This file has been autogenerated by dephell <3
# https://github.com/dephell/dephell
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os.path
readme = ""
here = os.path.abspath(os.path.dirname(__file__))
readme_p... | 31.582418 | 81 | 0.607864 |
2929b9aa761afd9f654fb1eaf0761a397c46d4e8 | 12,342 | py | Python | server.py | PuffinDev/PyChat | 47fef1fe33a4e0f9f622aa7f74fe5fd4fcaa45ab | [
"MIT"
] | 6 | 2020-11-12T17:49:03.000Z | 2021-04-29T16:45:34.000Z | server.py | harleytml/enhancedPyChat | 47fef1fe33a4e0f9f622aa7f74fe5fd4fcaa45ab | [
"MIT"
] | null | null | null | server.py | harleytml/enhancedPyChat | 47fef1fe33a4e0f9f622aa7f74fe5fd4fcaa45ab | [
"MIT"
] | 2 | 2021-02-14T13:27:50.000Z | 2021-03-16T06:35:46.000Z | import socket
import threading
import pickle
import time
import traceback
import json
HEADER = 64
PORT = input("Type a port >> ")
if PORT == "":
PORT = 49001 #Default port
try:
PORT = int(PORT)
except:
print("Not a valid port. running on default port...")
SERVER = "0.0.0.0"
ADDR = (SERVER, PORT)
FORMAT = ... | 34.188366 | 127 | 0.482742 |
4cece89e47ab50e50172525e4db5abc73c6fa8ba | 16,560 | py | Python | pymatgen/apps/battery/battery_abc.py | wangyusu/pymatgen | a90af2fe71eff15134ca33c6e58f07caba425ae9 | [
"MIT"
] | 2 | 2020-01-28T19:19:15.000Z | 2020-03-30T18:10:32.000Z | pymatgen/apps/battery/battery_abc.py | wangyusu/pymatgen | a90af2fe71eff15134ca33c6e58f07caba425ae9 | [
"MIT"
] | 3 | 2021-08-03T17:59:02.000Z | 2021-08-12T00:43:59.000Z | pymatgen/apps/battery/battery_abc.py | wangyusu/pymatgen | a90af2fe71eff15134ca33c6e58f07caba425ae9 | [
"MIT"
] | 13 | 2015-03-05T09:42:11.000Z | 2018-08-28T15:22:53.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module defines the abstract base classes for battery-related classes.
Regardless of the kind of electrode, conversion or insertion, there are many
common definitions and properties, e.g., average volt... | 38.244804 | 118 | 0.664493 |
5e4a78d6d580fbba05bec322797cdaeb1bcd7bd6 | 19,679 | py | Python | MLPYthonEnv/ml-agents-release_17/ml-agents/mlagents/trainers/tests/test_settings.py | cihan-demir/NineMensMorris | 05f4fe3c096fab1d31d110c4fd106410e248fc21 | [
"MIT"
] | 3 | 2021-04-16T06:17:07.000Z | 2021-07-04T06:36:37.000Z | ml-agents/mlagents/trainers/tests/test_settings.py | neils94/ml-agents | d3f5ca73d2cc6cfae0d02021cd370bae2fe5b592 | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/tests/test_settings.py | neils94/ml-agents | d3f5ca73d2cc6cfae0d02021cd370bae2fe5b592 | [
"Apache-2.0"
] | null | null | null | import attr
import cattr
import pickle
import pytest
import yaml
from typing import Dict, List, Optional
from mlagents.trainers.settings import (
RunOptions,
TrainerSettings,
NetworkSettings,
PPOSettings,
SACSettings,
RewardSignalType,
RewardSignalSettings,
CuriositySettings,
Envir... | 35.267025 | 102 | 0.626607 |
c9af70361d30b992ebd48cb68770479dca4710c9 | 61,524 | py | Python | moto/awslambda/models.py | malekhnovich/moto | 0fcf6529ab549faf7a2555d209ce2418391b7f9f | [
"Apache-2.0"
] | null | null | null | moto/awslambda/models.py | malekhnovich/moto | 0fcf6529ab549faf7a2555d209ce2418391b7f9f | [
"Apache-2.0"
] | null | null | null | moto/awslambda/models.py | malekhnovich/moto | 0fcf6529ab549faf7a2555d209ce2418391b7f9f | [
"Apache-2.0"
] | null | null | null | import base64
import time
from collections import defaultdict
import copy
import datetime
from gzip import GzipFile
from sys import platform
import docker
import docker.errors
import hashlib
import io
import logging
import os
import json
import re
import zipfile
import uuid
import tarfile
import calendar
import thread... | 36.404734 | 184 | 0.601115 |
a46ae01ec069a948aeea795e886d39818f50aaa8 | 191,858 | py | Python | nova/tests/unit/api/openstack/compute/test_serversV21.py | sarafraj-singh/nova | 677594480ecb9c093a3d81ae49dead120798a5c4 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/api/openstack/compute/test_serversV21.py | sarafraj-singh/nova | 677594480ecb9c093a3d81ae49dead120798a5c4 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/api/openstack/compute/test_serversV21.py | sarafraj-singh/nova | 677594480ecb9c093a3d81ae49dead120798a5c4 | [
"Apache-2.0"
] | 1 | 2020-07-24T01:18:44.000Z | 2020-07-24T01:18:44.000Z | # Copyright 2010-2011 OpenStack Foundation
# Copyright 2011 Piston Cloud Computing, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www... | 42.921253 | 79 | 0.59235 |
0f772a9bb74577463772ff6fd8227033eafd59bc | 4,213 | py | Python | nozomi/__init__.py | thatch/nozomi | 547fb5c554f79cda1b038b1500c513fbec8bee0b | [
"MIT"
] | null | null | null | nozomi/__init__.py | thatch/nozomi | 547fb5c554f79cda1b038b1500c513fbec8bee0b | [
"MIT"
] | null | null | null | nozomi/__init__.py | thatch/nozomi | 547fb5c554f79cda1b038b1500c513fbec8bee0b | [
"MIT"
] | null | null | null | from nozomi.ancillary.immutable import Immutable
from nozomi.ancillary.configuration import Configuration
from nozomi.ancillary.database_credentials import DatabaseCredentials
from nozomi.ancillary.server_name import ServerName
from nozomi.ancillary.file_content import FileBody
from nozomi.ancillary.command_line import... | 44.347368 | 70 | 0.87681 |
406029865a12545eedb9156d61ad30ef142e917f | 15,143 | py | Python | src/pykeen/triples/leakage.py | DJRavinszkha/pykeen | d79fe39f83bc2831137f22be6421b37568694cf4 | [
"MIT"
] | 1 | 2021-03-24T13:25:54.000Z | 2021-03-24T13:25:54.000Z | src/pykeen/triples/leakage.py | Moon-xm/pykeen | eeaf1d623aa881c0c897772372988390e1d8302d | [
"MIT"
] | null | null | null | src/pykeen/triples/leakage.py | Moon-xm/pykeen | eeaf1d623aa881c0c897772372988390e1d8302d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tools for removing the leakage from datasets.
Leakage is when the inverse of a given training triple appears in either
the testing or validation set. This scenario generally leads to inflated
and misleading evaluation because predicting an inverse triple is usually
very easy and not a sign ... | 34.652174 | 119 | 0.668824 |
6895e7188b65cf5cc75a6948144a93d2f50a0c35 | 1,310 | py | Python | venv/lib/python2.7/site-packages/IPython/html/terminal/api_handlers.py | mutaihillary/mycalculator | 55685dd7c968861f18ae0701129f5af2bc682d67 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/IPython/html/terminal/api_handlers.py | mutaihillary/mycalculator | 55685dd7c968861f18ae0701129f5af2bc682d67 | [
"MIT"
] | 7 | 2021-02-08T20:22:15.000Z | 2022-03-11T23:19:41.000Z | venv/lib/python2.7/site-packages/IPython/html/terminal/api_handlers.py | mutaihillary/mycalculator | 55685dd7c968861f18ae0701129f5af2bc682d67 | [
"MIT"
] | null | null | null | import json
from tornado import web, gen
from ..base.handlers import IPythonHandler, json_errors
from ..utils import url_path_join
class TerminalRootHandler(IPythonHandler):
@web.authenticated
@json_errors
def get(self):
tm = self.terminal_manager
terms = [{'name': name} for name in tm.term... | 29.111111 | 72 | 0.633588 |
f31f9a9c649793994e7cc243217b0df8d65e9137 | 2,299 | py | Python | main.py | adakoda/U-2-Net-http | 7010a7099aea067dea5c6c904e3ea64ee9833c2e | [
"MIT"
] | 1 | 2020-12-24T06:40:14.000Z | 2020-12-24T06:40:14.000Z | main.py | adakoda/U-2-Net-http | 7010a7099aea067dea5c6c904e3ea64ee9833c2e | [
"MIT"
] | null | null | null | main.py | adakoda/U-2-Net-http | 7010a7099aea067dea5c6c904e3ea64ee9833c2e | [
"MIT"
] | null | null | null | import io
import os
import sys
import cv2
import numpy as np
import torch
from PIL import Image
from flask import Flask, request, send_file
from flask_cors import CORS
sys.path.append('U-2-Net')
from u2net_portrait_demo import detect_single_face, crop_face, inference
from model import U2NET
app = Flask(__name__)
COR... | 27.369048 | 88 | 0.658112 |
0b4534fa19c2416782b92c20b996ac75fc801f92 | 1,019 | py | Python | __init__.py | craymichael/ArgValidation | 05369edd1ad4c345f655a0e153b60ec56366d76a | [
"Apache-2.0"
] | null | null | null | __init__.py | craymichael/ArgValidation | 05369edd1ad4c345f655a0e153b60ec56366d76a | [
"Apache-2.0"
] | null | null | null | __init__.py | craymichael/ArgValidation | 05369edd1ad4c345f655a0e153b60ec56366d76a | [
"Apache-2.0"
] | null | null | null | # ======================================================================================================================
# Copyright 2016 Zachariah Carmichael
#
# 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 ... | 63.6875 | 121 | 0.578018 |
ea08a1c7cbf33927d7770ca9147509b2bee0bd15 | 3,299 | py | Python | src/gan-dogs/model/callbacks.py | caciolai/Generative-Dog-Images-with-BigGan | 535d5a9c35ad4187a6f0099c4a02772a45c4a064 | [
"MIT"
] | null | null | null | src/gan-dogs/model/callbacks.py | caciolai/Generative-Dog-Images-with-BigGan | 535d5a9c35ad4187a6f0099c4a02772a45c4a064 | [
"MIT"
] | null | null | null | src/gan-dogs/model/callbacks.py | caciolai/Generative-Dog-Images-with-BigGan | 535d5a9c35ad4187a6f0099c4a02772a45c4a064 | [
"MIT"
] | null | null | null | import tensorflow as tf
from keras.applications.inception_v3 import InceptionV3
from .utils import scale_images, calculate_fid, plot_imgs_grid
class FIDCallback(tf.keras.callbacks.Callback):
"""Callback to calculate FID score during training
"""
def __init__(self, dataset, num_classes, period=5):
... | 28.686957 | 102 | 0.630494 |
fae60cb8a75710a31bba52135ace73cfce224429 | 54,401 | py | Python | jamf/api/departments_api.py | jensenbox/python-jamf | 85213085b1064a00375a7aa7df5e33c19f5178eb | [
"RSA-MD"
] | 1 | 2021-04-20T15:28:57.000Z | 2021-04-20T15:28:57.000Z | jamf/api/departments_api.py | jensenbox/python-jamf | 85213085b1064a00375a7aa7df5e33c19f5178eb | [
"RSA-MD"
] | null | null | null | jamf/api/departments_api.py | jensenbox/python-jamf | 85213085b1064a00375a7aa7df5e33c19f5178eb | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
Jamf Pro API
## Overview This is a sample Jamf Pro server which allows for usage without any authentication. The Jamf Pro environment which supports the Try it Out functionality does not run the current beta version of Jamf Pro, thus any newly added endpoints will result in an error and sh... | 45.371977 | 359 | 0.599401 |
faa2597f1837886b608f6380b4bbc0f0d8ce5c9d | 830 | py | Python | pytype/tools/xref/testdata/attr.py | jjedele/pytype | 3c5d920d26ac583bdfd68080e7db454ecb1dc900 | [
"Apache-2.0"
] | null | null | null | pytype/tools/xref/testdata/attr.py | jjedele/pytype | 3c5d920d26ac583bdfd68080e7db454ecb1dc900 | [
"Apache-2.0"
] | null | null | null | pytype/tools/xref/testdata/attr.py | jjedele/pytype | 3c5d920d26ac583bdfd68080e7db454ecb1dc900 | [
"Apache-2.0"
] | null | null | null | # pylint: skip-file
#- @A defines/binding ClassA
#- ClassA.node/kind class
class A(object):
#- @__init__ defines/binding FnInit
#- @self defines/binding ArgSelf
#- FnInit.node/kind function
#- FnInit param.0 ArgSelf
def __init__(self):
#- @self ref ArgSelf
#- @foo defines/binding AttrFoo
self.foo... | 22.432432 | 60 | 0.661446 |
dfb4bd93b9bebe7aa48b9b232c986866b59182de | 5,143 | py | Python | QuickDrawApp.py | VikasChowdary/QuickDraw | 5eb201c8a59162961878289ebeefd13aaa6159e5 | [
"MIT"
] | null | null | null | QuickDrawApp.py | VikasChowdary/QuickDraw | 5eb201c8a59162961878289ebeefd13aaa6159e5 | [
"MIT"
] | null | null | null | QuickDrawApp.py | VikasChowdary/QuickDraw | 5eb201c8a59162961878289ebeefd13aaa6159e5 | [
"MIT"
] | null | null | null | import cv2
from keras.models import load_model
import numpy as np
from collections import deque
import os
model = load_model('QuickDraw.h5')
def main():
emojis = get_QD_emojis()
cap = cv2.VideoCapture(0)
Lower_green = np.array([110, 50, 50])
Upper_green = np.array([130, 255, 255])
pts = deque(max... | 38.669173 | 108 | 0.590317 |
6dbf97240e66718d72732428fec9a50525ac08f1 | 1,478 | py | Python | sympy/plotting/pygletplot/plot_rotation.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | sympy/plotting/pygletplot/plot_rotation.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | sympy/plotting/pygletplot/plot_rotation.py | ovolve/sympy | 0a15782f20505673466b940454b33b8014a25c13 | [
"BSD-3-Clause"
] | 1 | 2018-10-22T09:17:11.000Z | 2018-10-22T09:17:11.000Z | from __future__ import print_function, division
try:
from pyglet.gl.gl import c_float
except ImportError:
pass
from pyglet.gl import *
from math import sqrt as _sqrt, acos as _acos
def cross(a, b):
return (a[1] * b[2] - a[2] * b[1],
a[2] * b[0] - a[0] * b[2],
a[0] * b[1] - a[1] *... | 20.816901 | 70 | 0.535183 |
d5102a78079166d4e98094c0f0b03a735563a60e | 3,934 | py | Python | scripts/score_links4.py | aakashsur/docker-hirise | 9b97cc4e7522e287aa2ee39c2993270e75b43a6d | [
"MIT"
] | null | null | null | scripts/score_links4.py | aakashsur/docker-hirise | 9b97cc4e7522e287aa2ee39c2993270e75b43a6d | [
"MIT"
] | null | null | null | scripts/score_links4.py | aakashsur/docker-hirise | 9b97cc4e7522e287aa2ee39c2993270e75b43a6d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2015 Dovetail Genomics LLC
#
#
from __future__ import print_function
from builtins import str
from builtins import map
import sys
import networkx as nx
import chicago_edge_scores as ces
import numpy as np
from scipy.stats import poisson
import math
#G=3.0e9
N=100000000.0
pn=0.3
G... | 31.472 | 178 | 0.579563 |
f2a72bf6750d5ef8930cc4514b3aa5473ca75a19 | 1,233 | py | Python | scenarios/data_access/client1/submit_job.py | SecConNet/proof_of_concept | 80f6b27ff6b97796803e554387ca2881a792be79 | [
"Apache-2.0"
] | 4 | 2021-03-26T09:17:51.000Z | 2021-05-17T10:31:59.000Z | scenarios/data_access/client1/submit_job.py | SecConNet/proof_of_concept | 80f6b27ff6b97796803e554387ca2881a792be79 | [
"Apache-2.0"
] | 58 | 2020-03-02T10:02:51.000Z | 2021-07-09T09:23:49.000Z | scenarios/data_access/client1/submit_job.py | SecConNet/proof_of_concept | 80f6b27ff6b97796803e554387ca2881a792be79 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from mahiru.definitions.workflows import Job, Workflow, WorkflowStep
from mahiru.rest.internal_client import InternalSiteRestClient
if __name__ == '__main__':
# create single-step workflow
workflow = Workflow(
['input'], {'result': 'compute.output0'}, [
Work... | 33.324324 | 71 | 0.570965 |
5d57e62b0e4b15d28881b6c1785e621ec7c25bd2 | 3,298 | py | Python | sdk/python/pulumi_azure_native/azureactivedirectory/v20190101preview/outputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_native/azureactivedirectory/v20190101preview/outputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_native/azureactivedirectory/v20190101preview/outputs.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # 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
from ... import _utilities, _tables
from... | 35.847826 | 254 | 0.650697 |
74ddedbee4ecd450a3a54576df5b2e63fc8e5d62 | 3,676 | py | Python | microbenchmarks/re_split_ubench.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:28:45.000Z | 2020-02-06T14:28:45.000Z | microbenchmarks/re_split_ubench.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | microbenchmarks/re_split_ubench.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-02-06T14:29:00.000Z | 2020-02-06T14:29:00.000Z | import re
FILTER_SEPARATOR = '|'
FILTER_ARGUMENT_SEPARATOR = ':'
VARIABLE_ATTRIBUTE_SEPARATOR = '.'
BLOCK_TAG_START = '{%'
BLOCK_TAG_END = '%}'
VARIABLE_TAG_START = '{{'
VARIABLE_TAG_END = '}}'
COMMENT_TAG_START = '{#'
COMMENT_TAG_END = '#}'
TRANSLATOR_COMMENT_MARK = 'Translators'
SINGLE_BRACE_START = '{'
SINGLE_BRACE... | 34.037037 | 173 | 0.509793 |
7cec8c189539bd868c3c46be87696774d5a16518 | 347 | py | Python | erpnext_shipping/config/docs.py | arahimfahim40/erpnext_shipping1 | c86bfe865cff31ec3e6f54f0acbe57def42d7a06 | [
"MIT"
] | 3 | 2021-06-22T01:36:22.000Z | 2022-02-26T00:12:19.000Z | erpnext_shipping/config/docs.py | arahimfahim40/erpnext_shipping | 625a7e41b5bfcfb6a3a55dc345f262bd8398ad83 | [
"MIT"
] | null | null | null | erpnext_shipping/config/docs.py | arahimfahim40/erpnext_shipping | 625a7e41b5bfcfb6a3a55dc345f262bd8398ad83 | [
"MIT"
] | 1 | 2021-08-01T11:46:12.000Z | 2021-08-01T11:46:12.000Z | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/erpnext_shipping"
# docs_base_url = "https://[org_name].github.io/erpnext_shipping"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html =... | 28.916667 | 68 | 0.743516 |
334e5e08f931ba2cf50791b0b0e8b3fe8afdd839 | 1,383 | py | Python | djangoBlog/urls.py | snehalkhandve/djangoBlog | a579396a7c4cce68b294d06787ea8249aa59e1e6 | [
"MIT"
] | null | null | null | djangoBlog/urls.py | snehalkhandve/djangoBlog | a579396a7c4cce68b294d06787ea8249aa59e1e6 | [
"MIT"
] | null | null | null | djangoBlog/urls.py | snehalkhandve/djangoBlog | a579396a7c4cce68b294d06787ea8249aa59e1e6 | [
"MIT"
] | 1 | 2020-03-29T14:18:08.000Z | 2020-03-29T14:18:08.000Z | """djangoBlog URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 38.416667 | 101 | 0.725958 |
1835180eb1a11f3089ad78d05335b1495562ca8a | 1,329 | py | Python | escala/migrations/0001_initial.py | renannoronha/iasd | 2fd94af8c08cf16ae028f587e35431b99a64ec57 | [
"MIT"
] | null | null | null | escala/migrations/0001_initial.py | renannoronha/iasd | 2fd94af8c08cf16ae028f587e35431b99a64ec57 | [
"MIT"
] | null | null | null | escala/migrations/0001_initial.py | renannoronha/iasd | 2fd94af8c08cf16ae028f587e35431b99a64ec57 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2022-03-08 12:34
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Departamento',
fields=[
... | 33.225 | 123 | 0.562077 |
ae01d989fcac56fce4e32b13215c92b46f284274 | 681 | py | Python | tests/nnapi/specs/V1_0/mul_4D_nnfw.mod.py | juitem/ONE | 8c6a4b7738074573b6ac5c82dcf1f6697520d1ed | [
"Apache-2.0"
] | 255 | 2020-05-22T07:45:29.000Z | 2022-03-29T23:58:22.000Z | tests/nnapi/specs/V1_0/mul_4D_nnfw.mod.py | juitem/ONE | 8c6a4b7738074573b6ac5c82dcf1f6697520d1ed | [
"Apache-2.0"
] | 5,102 | 2020-05-22T07:48:33.000Z | 2022-03-31T23:43:39.000Z | tests/nnapi/specs/V1_0/mul_4D_nnfw.mod.py | juitem/ONE | 8c6a4b7738074573b6ac5c82dcf1f6697520d1ed | [
"Apache-2.0"
] | 120 | 2020-05-22T07:51:08.000Z | 2022-02-16T19:08:05.000Z | # model
model = Model()
i1 = Input("op1", "TENSOR_FLOAT32", "{2, 2, 2, 2}")
i2 = Input("op2", "TENSOR_FLOAT32", "{2, 2, 2, 2}")
act = Int32Scalar("act", 0) # an int32_t scalar fuse_activation
i3 = Output("op3", "TENSOR_FLOAT32", "{2, 2, 2, 2}")
model = model.Operation("MUL", i1, i2, act).To(i3)
# Example 1. Input in o... | 34.05 | 83 | 0.50514 |
141c5878e06495bc0dd01151236b6dcfd40fe652 | 15,885 | py | Python | env/lib/python3.7/site-packages/docusign_rooms/apis/task_lists_api.py | davidgacc/docusign | e63167101656d0066d481844576ce687ea80eb91 | [
"MIT"
] | null | null | null | env/lib/python3.7/site-packages/docusign_rooms/apis/task_lists_api.py | davidgacc/docusign | e63167101656d0066d481844576ce687ea80eb91 | [
"MIT"
] | null | null | null | env/lib/python3.7/site-packages/docusign_rooms/apis/task_lists_api.py | davidgacc/docusign | e63167101656d0066d481844576ce687ea80eb91 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
DocuSign Rooms API - v2
An API for an integrator to access the features of DocuSign Rooms # noqa: E501
OpenAPI spec version: v2
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
impor... | 42.473262 | 126 | 0.581366 |
02a7b74cc57fa455338766970daebce567c92f6d | 1,235 | py | Python | tekstovni_vmesnik.py | TurkAndreja/vislice | f8b3b7dbdde8af92a55bbf85b53c7e5b324af9b5 | [
"MIT"
] | null | null | null | tekstovni_vmesnik.py | TurkAndreja/vislice | f8b3b7dbdde8af92a55bbf85b53c7e5b324af9b5 | [
"MIT"
] | null | null | null | tekstovni_vmesnik.py | TurkAndreja/vislice | f8b3b7dbdde8af92a55bbf85b53c7e5b324af9b5 | [
"MIT"
] | null | null | null | import model
lojtrice = "#################################################\n"
def izpis_zmage(igra):
tekst = lojtrice + "Uganili ste geslo {0}.\n".format(igra.geslo)
return tekst
def izpis_poraza(igra):
tekst = lojtrice + "Obešeni ste! Pravilno geslo je bilo {0}.\n".format(igra.geslo)
return tekst
de... | 28.068182 | 217 | 0.606478 |
cc9c851964cbb223b6607852b1c390a6be1c0ac1 | 11,433 | py | Python | tests/extensions/artificial_intelligence/intents/test_intents_extensions.py | mirlarof/blip-sdk-python | f958149b2524d4340eeafad8739a33db71df45ed | [
"MIT"
] | 2 | 2021-07-02T20:10:48.000Z | 2021-07-13T20:51:18.000Z | tests/extensions/artificial_intelligence/intents/test_intents_extensions.py | mirlarof/blip-sdk-python | f958149b2524d4340eeafad8739a33db71df45ed | [
"MIT"
] | 3 | 2021-06-24T13:27:21.000Z | 2021-07-30T15:37:43.000Z | tests/extensions/artificial_intelligence/intents/test_intents_extensions.py | mirlarof/blip-sdk-python | f958149b2524d4340eeafad8739a33db71df45ed | [
"MIT"
] | 3 | 2021-06-23T19:53:20.000Z | 2022-01-04T17:50:44.000Z | from lime_python import Command
from pytest import fixture, mark
from pytest_mock import MockerFixture
from src import AIExtension
from ....async_mock import async_return
AI_TO = 'postmaster@ai.msging.net'
class TestIntentsExtension:
@fixture
def target(self, mocker: MockerFixture) -> AIExtension:
y... | 27.549398 | 94 | 0.576139 |
8fe4e944325a6e642c5196600cda47cf0987395c | 2,952 | py | Python | accounts/migrations/0001_initial.py | knowapi/DeveloperPortalExamples | bbe50f333d1257fdbb107b507c09221b543e7d8d | [
"MIT"
] | 2 | 2016-10-30T20:28:03.000Z | 2017-03-28T08:55:20.000Z | accounts/migrations/0001_initial.py | knowapi/DeveloperPortalExamples | bbe50f333d1257fdbb107b507c09221b543e7d8d | [
"MIT"
] | 11 | 2016-09-10T09:43:16.000Z | 2022-01-13T00:42:40.000Z | accounts/migrations/0001_initial.py | knowapi/DeveloperPortalExamples | bbe50f333d1257fdbb107b507c09221b543e7d8d | [
"MIT"
] | 3 | 2017-01-02T11:54:54.000Z | 2018-01-02T05:58:43.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
import django.core.validators
import django.contrib.auth.models
class Migration(migrations.Migration):
dependencies = [
('auth', '0006_require_contenttypes_0002'),
]
... | 67.090909 | 432 | 0.659892 |
fa0077eb3367e3260386b25d96577ac91f0ff645 | 4,348 | py | Python | test_project/components/social_auth_app_django_spa.py | ebenh/django-flex-user | efffb21e4ce33d2ea8665756334e2a391f4b5a72 | [
"MIT"
] | 1 | 2021-09-13T20:26:02.000Z | 2021-09-13T20:26:02.000Z | test_project/components/social_auth_app_django_spa.py | ebenh/django-flex-user | efffb21e4ce33d2ea8665756334e2a391f4b5a72 | [
"MIT"
] | null | null | null | test_project/components/social_auth_app_django_spa.py | ebenh/django-flex-user | efffb21e4ce33d2ea8665756334e2a391f4b5a72 | [
"MIT"
] | null | null | null | #
# Configure social-auth-app-django for single-page apps
#
from test_project.components.django_environ import env
#
# Production Variables ... Needed for social-auth-app-django
#
ALLOWED_HOSTS = ['localhost', '127.0.0.1']
# Configure social-auth-app-django
# SOCIAL_AUTH_POSTGRES_JSONFIELD = True # social-auth-ap... | 41.807692 | 120 | 0.75851 |
76e1835f98eab191361af8510023d65babac0d08 | 960 | py | Python | examples/tensorflow/text-generator/predictor.py | honeypotz-eu/cortex | c6a3894009dae55de5cec68deb97c7d832514da0 | [
"Apache-2.0"
] | 1 | 2020-09-18T04:29:24.000Z | 2020-09-18T04:29:24.000Z | examples/tensorflow/text-generator/predictor.py | awesomemachinelearning/cortex | 7c2b5b07f9dbf9bf56def8a6e3a60763e271bd39 | [
"Apache-2.0"
] | null | null | null | examples/tensorflow/text-generator/predictor.py | awesomemachinelearning/cortex | 7c2b5b07f9dbf9bf56def8a6e3a60763e271bd39 | [
"Apache-2.0"
] | null | null | null | # WARNING: you are on the master branch; please refer to examples on the branch corresponding to your `cortex version` (e.g. for version 0.19.*, run `git checkout -b 0.19` or switch to the `0.19` branch on GitHub)
import os
import boto3
from botocore import UNSIGNED
from botocore.client import Config
from encoder impo... | 38.4 | 213 | 0.701042 |
ed75342a1c759e01453a9ce8dd4a6dc5584f3aad | 10,715 | py | Python | tools/rle_encode.py | StarGate01/pinetime-mcuboot-bootloader | 2e1a66e10310f94d3af6e090b736ba84b7dbc177 | [
"Apache-2.0"
] | 33 | 2020-12-27T16:34:19.000Z | 2021-12-16T21:18:04.000Z | tools/rle_encode.py | StarGate01/pinetime-mcuboot-bootloader | 2e1a66e10310f94d3af6e090b736ba84b7dbc177 | [
"Apache-2.0"
] | 7 | 2021-01-25T20:32:46.000Z | 2021-11-28T18:28:49.000Z | tools/rle_encode.py | StarGate01/pinetime-mcuboot-bootloader | 2e1a66e10310f94d3af6e090b736ba84b7dbc177 | [
"Apache-2.0"
] | 10 | 2021-01-04T06:58:10.000Z | 2021-08-02T15:39:58.000Z | #!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
import argparse
import sys
import os.path
from PIL import Image
def clut8_rgb888(i):
"""Reference CLUT for wasp-os.
Technically speaking this is not a CLUT because the we lookup the colours
algorithm... | 28.197368 | 83 | 0.526645 |
d1cd211273b1809c0e335b036f56db0269df32f0 | 45 | py | Python | src/Calculator/Addition.py | gitvicky97/Statistical-Calculator- | f5f413b43833fe1f0eec45b363fc86e3d962f825 | [
"MIT"
] | null | null | null | src/Calculator/Addition.py | gitvicky97/Statistical-Calculator- | f5f413b43833fe1f0eec45b363fc86e3d962f825 | [
"MIT"
] | null | null | null | src/Calculator/Addition.py | gitvicky97/Statistical-Calculator- | f5f413b43833fe1f0eec45b363fc86e3d962f825 | [
"MIT"
] | 3 | 2020-03-22T01:56:45.000Z | 2020-03-22T20:20:48.000Z | def add(a, b):
return float(a) + float(b) | 22.5 | 30 | 0.577778 |
618d02108973d4f7e2245e13acccda6fea103dcb | 532 | py | Python | Download/PythonExercicios/ex076.py | r-luis/Python-CursoemVideo | f978b2f4ab8444ebb746b4c85bd6db6d7775cbb4 | [
"MIT"
] | null | null | null | Download/PythonExercicios/ex076.py | r-luis/Python-CursoemVideo | f978b2f4ab8444ebb746b4c85bd6db6d7775cbb4 | [
"MIT"
] | null | null | null | Download/PythonExercicios/ex076.py | r-luis/Python-CursoemVideo | f978b2f4ab8444ebb746b4c85bd6db6d7775cbb4 | [
"MIT"
] | null | null | null | '''Desafio 76 Crie um programa que tenha uma tupla única com nomes de produtos e seus respectivos preços, na sequencia.
No final, mostre uma listagem de preços, organizando os dados em forma tabular.'''
produto = ('25 coins', 25, '50 coins', 50, '75 coins', 75, '80 coins', 80, '100 coins', 100, '250 coins', 250)
i, f ... | 20.461538 | 119 | 0.62406 |
de06a7884f66425562ba7bf418bbe52596f3a2c1 | 24 | py | Python | venv/Lib/site-packages/thumbnail/__init__.py | Vishwas-bit/Ecommerce-Recommender-System | edf1ab1a6116720b7fb2038de18b494cdc7f08fb | [
"BSD-3-Clause"
] | 5 | 2021-06-30T13:15:33.000Z | 2022-03-01T22:00:02.000Z | venv/Lib/site-packages/thumbnail/__init__.py | Vishwas-bit/Ecommerce-Recommender-System | edf1ab1a6116720b7fb2038de18b494cdc7f08fb | [
"BSD-3-Clause"
] | 1 | 2021-04-21T15:38:55.000Z | 2021-04-21T15:38:55.000Z | venv/Lib/site-packages/thumbnail/__init__.py | Vishwas-bit/Ecommerce-Recommender-System | edf1ab1a6116720b7fb2038de18b494cdc7f08fb | [
"BSD-3-Clause"
] | 4 | 2021-09-06T04:43:49.000Z | 2022-03-11T21:18:14.000Z | from .thumbnail import * | 24 | 24 | 0.791667 |
4c00c0d4b8c8e15ee3bb8e2276303865e5b5a542 | 7,955 | py | Python | dataset/total_text.py | xieyufei1993/TextSnake.pytorch | e5eafdfc3845823dfef297ca6e576a1d72af57f7 | [
"MIT"
] | null | null | null | dataset/total_text.py | xieyufei1993/TextSnake.pytorch | e5eafdfc3845823dfef297ca6e576a1d72af57f7 | [
"MIT"
] | null | null | null | dataset/total_text.py | xieyufei1993/TextSnake.pytorch | e5eafdfc3845823dfef297ca6e576a1d72af57f7 | [
"MIT"
] | null | null | null | import copy
import cv2
import os
import torch.utils.data as data
import scipy.io as io
import numpy as np
from util.config import config as cfg
from skimage.draw import polygon as drawpoly
from util.misc import find_bottom, find_long_edges, split_edge_seqence, \
norm2, vector_cos, vector_sin
from dataset.data_util... | 35.355556 | 127 | 0.591578 |
24b9db949fde96c536255ee1ffff997d0dd0b2f8 | 7,313 | py | Python | ceilometer/tests/unit/hardware/inspector/test_snmp.py | muralidharan10/ceilometer | 70c30578b994694550bcd24dfc36c7f3be4946dc | [
"Apache-2.0"
] | 1 | 2018-11-18T16:03:10.000Z | 2018-11-18T16:03:10.000Z | ceilometer/tests/unit/hardware/inspector/test_snmp.py | muralidharan10/ceilometer | 70c30578b994694550bcd24dfc36c7f3be4946dc | [
"Apache-2.0"
] | null | null | null | ceilometer/tests/unit/hardware/inspector/test_snmp.py | muralidharan10/ceilometer | 70c30578b994694550bcd24dfc36c7f3be4946dc | [
"Apache-2.0"
] | 2 | 2015-12-28T14:36:47.000Z | 2018-11-18T16:03:11.000Z | #
# Copyright 2013 Intel Corp
#
# Authors: Lianhao Lu <lianhao.lu@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
#
# Unless req... | 38.898936 | 79 | 0.52646 |
d9f10d914519f9f61193dbc467831bbceaef2882 | 2,314 | py | Python | userbot/modules/quotly.py | RoyalBoy69/OUB | d450fd55bbf2e292bc1a70e669217b79106edc7a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 39 | 2020-05-11T11:51:34.000Z | 2022-03-04T19:23:40.000Z | userbot/modules/quotly.py | RoyalBoy69/OUB | d450fd55bbf2e292bc1a70e669217b79106edc7a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 41 | 2020-04-29T16:56:53.000Z | 2021-05-25T20:46:44.000Z | userbot/modules/quotly.py | RoyalBoy69/OUB | d450fd55bbf2e292bc1a70e669217b79106edc7a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 615 | 2020-04-27T14:50:53.000Z | 2022-03-12T19:54:32.000Z | # Copyright (C) 2020 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
# Port From UniBorg to UserBot by MoveAngel
import telethon
from asyncio.exceptions import TimeoutError
from telethon... | 37.322581 | 104 | 0.61452 |
346cd1ccc82bfa4d9e43fd951ce1dfcddc991853 | 1,409 | py | Python | apartment_price_server/util.py | kushal-from-dolpo/project_apartment_price | 33c911915c2194327936d4db7c6da916ef5aa943 | [
"MIT"
] | null | null | null | apartment_price_server/util.py | kushal-from-dolpo/project_apartment_price | 33c911915c2194327936d4db7c6da916ef5aa943 | [
"MIT"
] | null | null | null | apartment_price_server/util.py | kushal-from-dolpo/project_apartment_price | 33c911915c2194327936d4db7c6da916ef5aa943 | [
"MIT"
] | null | null | null | import pickle
import json
import numpy as np
__locations = None
__data_columns = None
__model = None
def get_estimated_price(location,sqft,bhk,bath):
try:
loc_index = __data_columns.index(location.lower())
except:
loc_index = -1
x = np.zeros(len(__data_columns))
x[0] = sqft
x[1] =... | 27.096154 | 79 | 0.671398 |
fd800cf67d5f605fa067bebafd9a6f46bb87026f | 40,626 | bzl | Python | tensorflow/workspace.bzl | cmpt376Kor/tensorflow | 0f87d26ed7c8ab3427f75eacfeba797262ab7483 | [
"Apache-2.0"
] | 1 | 2018-11-18T12:53:23.000Z | 2018-11-18T12:53:23.000Z | tensorflow/workspace.bzl | Quin1an/tensorflow | 3b4b45dd4436d007dc954d1a6c8061f2d276a6d4 | [
"Apache-2.0"
] | null | null | null | tensorflow/workspace.bzl | Quin1an/tensorflow | 3b4b45dd4436d007dc954d1a6c8061f2d276a6d4 | [
"Apache-2.0"
] | 1 | 2018-11-30T01:35:01.000Z | 2018-11-30T01:35:01.000Z | # TensorFlow external dependencies that can be loaded in WORKSPACE files.
load("//third_party/gpus:cuda_configure.bzl", "cuda_configure")
load("//third_party/gpus:rocm_configure.bzl", "rocm_configure")
load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure")
load("//third_party:nccl/nccl_configure.b... | 44.158696 | 177 | 0.671639 |
4cd9ffa64893fc5ec564054f7d553fc0a6c6b6de | 2,967 | py | Python | rdr_service/lib_fhir/fhirclient_1_0_6/models/schedule.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 39 | 2017-10-13T19:16:27.000Z | 2021-09-24T16:58:21.000Z | fhirclient/models/schedule.py | NematiLab/Streaming-Sepsis-Prediction-System-for-Intensive-Care-Units | fb5ad260fb8d264d85aea9e6c895d1700eea4d11 | [
"Apache-2.0"
] | 312 | 2017-09-08T15:42:13.000Z | 2022-03-23T18:21:40.000Z | rdr_service/lib_fhir/fhirclient_1_0_6/models/schedule.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 19 | 2017-09-15T13:58:00.000Z | 2022-02-07T18:33:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 1.0.2.7202 (http://hl7.org/fhir/StructureDefinition/Schedule) on 2016-06-23.
# 2016, SMART Health IT.
from . import domainresource
class Schedule(domainresource.DomainResource):
""" A container for slot(s) of time that may be available for b... | 41.208333 | 153 | 0.650826 |
e4fcd518a3262a9282cf4f308ccf0a10b286a732 | 9,927 | py | Python | RoboticProcessAutomation/img_recog.py | bartmazur90/RoboticProcessAutomation | cc547223562a280a9bc780e919aff14a5524c949 | [
"MIT"
] | null | null | null | RoboticProcessAutomation/img_recog.py | bartmazur90/RoboticProcessAutomation | cc547223562a280a9bc780e919aff14a5524c949 | [
"MIT"
] | null | null | null | RoboticProcessAutomation/img_recog.py | bartmazur90/RoboticProcessAutomation | cc547223562a280a9bc780e919aff14a5524c949 | [
"MIT"
] | null | null | null | from pyautogui import locateOnScreen, click, doubleClick, rightClick
import time
from pyscreeze import Box
def click_img( target: str,
target_region: tuple = (),
target_confidence: float = 0.98,
target_retries: int = 1,
click_type: str = 'single',
... | 39.86747 | 95 | 0.503173 |
9d3efc8e7e3e89be17c91ecf1c0a98a6f691fe68 | 1,927 | py | Python | postman/management/commands/postman_cleanup.py | chhell/django-postman | dbd48a7a94f4abd4748c174cf052b8da6f66800b | [
"BSD-3-Clause"
] | null | null | null | postman/management/commands/postman_cleanup.py | chhell/django-postman | dbd48a7a94f4abd4748c174cf052b8da6f66800b | [
"BSD-3-Clause"
] | null | null | null | postman/management/commands/postman_cleanup.py | chhell/django-postman | dbd48a7a94f4abd4748c174cf052b8da6f66800b | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from datetime import timedelta
from django.core.management.base import BaseCommand
from django.db.models import Max, Count, F, Q
from django.utils.timezone import now
from postman.models import Message
ARGUMENT_ARGS = ('-d', '--days')
ARGUMENT_KWARGS = {'default': 30 }
class... | 44.813953 | 107 | 0.663726 |
34d642ca2deae4a65a841833e24eea986e35b25a | 1,745 | py | Python | src/music/music_group.py | janbrrr/dndj | b0557481f301adf82cae74e5c619fff016402a36 | [
"MIT"
] | 8 | 2020-01-15T20:50:14.000Z | 2021-08-09T15:36:56.000Z | src/music/music_group.py | janbrrr/dndj-discord | 078ce5a0367134117f6184b2612648e9a25bcf9f | [
"MIT"
] | null | null | null | src/music/music_group.py | janbrrr/dndj-discord | 078ce5a0367134117f6184b2612648e9a25bcf9f | [
"MIT"
] | 2 | 2020-01-15T20:50:18.000Z | 2021-12-18T13:09:46.000Z | from typing import Dict
from src.music.track_list import TrackList
class MusicGroup:
def __init__(self, config: Dict):
"""
Initializes a `MusicGroup` instance.
A ``MusicGroup`` groups multiple `TrackList` instances.
For more information have a look at the `TrackList` class.
... | 42.560976 | 112 | 0.643553 |
408bfa1c02010a90d1efaa64649eb2620bd978bf | 3,725 | py | Python | test/scanner/string.py | chrismalcolm/jspec | 053835a562be5c4f304f7982a1ccbf60f1489ca9 | [
"MIT"
] | 2 | 2022-01-11T21:48:50.000Z | 2022-01-12T12:23:45.000Z | test/scanner/string.py | chrismalcolm/jspec | 053835a562be5c4f304f7982a1ccbf60f1489ca9 | [
"MIT"
] | 1 | 2021-12-29T20:11:57.000Z | 2021-12-29T20:11:57.000Z | test/scanner/string.py | chrismalcolm/jspec | 053835a562be5c4f304f7982a1ccbf60f1489ca9 | [
"MIT"
] | null | null | null | """JSPEC Testing Module for scanning JSPEC documents for
``JSPECTestScannerString``.
"""
from test.scanner import JSPECTestScanner
from jspec.entity import (
JSPEC,
JSPECString,
)
class JSPECTestScannerString(JSPECTestScanner):
"""Class for testing the behaviour when using the ``scan`` method for
str... | 29.8 | 77 | 0.408054 |
dd86ec60d4019be50ef36fdc854ea593da1853a6 | 1,893 | py | Python | MNIST-Image-Generation-Reference/training.py | Abhishek-Aditya-bs/Anime-Face-Generation-Pytorch | 1766259212141b9b04c2fcdc2aef501efb802e3e | [
"MIT"
] | null | null | null | MNIST-Image-Generation-Reference/training.py | Abhishek-Aditya-bs/Anime-Face-Generation-Pytorch | 1766259212141b9b04c2fcdc2aef501efb802e3e | [
"MIT"
] | null | null | null | MNIST-Image-Generation-Reference/training.py | Abhishek-Aditya-bs/Anime-Face-Generation-Pytorch | 1766259212141b9b04c2fcdc2aef501efb802e3e | [
"MIT"
] | null | null | null | import torch
import torchvision
from discriminator import D, d_optimizer
from generator import G, g_optimizer
from parameters import *
from IPython.display import Image
from torchvision.utils import save_image
from dataLoader import denorm
import os
def reset_grad():
d_optimizer.zero_grad()
g_optimizer.zero_... | 27.838235 | 82 | 0.71738 |
02f9641de0c68fde26218d963b79c6fac87eaa25 | 1,844 | py | Python | core/data/vote_info.py | mofengboy/Chain-of-all-beings | b7f9750391a702b83728118f5db533ecb4d38bf0 | [
"Apache-2.0"
] | 2 | 2022-03-26T15:20:40.000Z | 2022-03-26T15:24:02.000Z | core/data/vote_info.py | mofengboy/Chain-of-all-beings | b7f9750391a702b83728118f5db533ecb4d38bf0 | [
"Apache-2.0"
] | null | null | null | core/data/vote_info.py | mofengboy/Chain-of-all-beings | b7f9750391a702b83728118f5db533ecb4d38bf0 | [
"Apache-2.0"
] | 1 | 2022-03-26T15:20:45.000Z | 2022-03-26T15:20:45.000Z | import hashlib
class WaitVote:
def __init__(self):
self.electionPeriod = 0
self.toNodeId = ""
self.blockId = ""
self.vote = 0
self.simpleUserPk = ""
self.signature = ""
self.voteType = 1 # 1为推荐区块投票,2为标记区块投票
def setInfo(self, election_period, to_node_id... | 32.350877 | 125 | 0.584599 |
d70c65a012a99db29d3edfa87f315cbb496683fc | 3,401 | py | Python | nipype/pipeline/plugins/tests/test_callback.py | grlee77/nipype | 73f3a733ac1b7d9b09ec32a387905a9302423b87 | [
"BSD-3-Clause"
] | null | null | null | nipype/pipeline/plugins/tests/test_callback.py | grlee77/nipype | 73f3a733ac1b7d9b09ec32a387905a9302423b87 | [
"BSD-3-Clause"
] | null | null | null | nipype/pipeline/plugins/tests/test_callback.py | grlee77/nipype | 73f3a733ac1b7d9b09ec32a387905a9302423b87 | [
"BSD-3-Clause"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Tests for workflow callbacks
"""
from tempfile import mkdtemp
from shutil import rmtree
from nipype.testing import assert_equal
import nipype.interfaces.utility as niu
import nipype.pipeline.engine as ... | 32.084906 | 77 | 0.620994 |
0b2a15e3a0cac964e9e0f97976f6bcfc56b911b5 | 1,447 | py | Python | samples.py | NovelleP/dict_query | 83a44119093df452890b0449103fce00aa85dc6b | [
"MIT"
] | 2 | 2020-11-22T17:00:05.000Z | 2020-11-22T17:16:10.000Z | samples.py | NovelleP/dict_query | 83a44119093df452890b0449103fce00aa85dc6b | [
"MIT"
] | null | null | null | samples.py | NovelleP/dict_query | 83a44119093df452890b0449103fce00aa85dc6b | [
"MIT"
] | null | null | null | from dict_query import DictQuery
if __name__ == '__main__':
d = {
'a': {
'a1': ['1', '2'],
'a2': {'a21': '1'}
},
'b': 2,
'c': {
'c1': 3,
'c2': 4
},
'd': {
'd1': {
'flag': 'Si',
... | 23.721311 | 118 | 0.320663 |
42228138f3b868684cda59e1e4a21f8b1f45802d | 8,111 | py | Python | test/functional/wallet_listreceivedby.py | markblundeberg/bitcoin-abc | 449bfe2bb4b2edc17e2c8618f04bce1bc05fe466 | [
"MIT"
] | 1 | 2019-02-18T02:18:33.000Z | 2019-02-18T02:18:33.000Z | test/functional/wallet_listreceivedby.py | markblundeberg/bitcoin-abc | 449bfe2bb4b2edc17e2c8618f04bce1bc05fe466 | [
"MIT"
] | null | null | null | test/functional/wallet_listreceivedby.py | markblundeberg/bitcoin-abc | 449bfe2bb4b2edc17e2c8618f04bce1bc05fe466 | [
"MIT"
] | 2 | 2019-05-26T05:28:14.000Z | 2019-06-11T01:13:08.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 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 the listreceivedbyaddress RPC."""
from decimal import Decimal
from test_framework.test_framework... | 44.812155 | 153 | 0.625694 |
add9d6de21c2e83581186c7fa628457ac7a252bc | 106 | py | Python | src/the_tale/the_tale/common/meta_relations/conf.py | Alacrate/the-tale | 43b211f3a99e93964e95abc20a8ed649a205ffcf | [
"BSD-3-Clause"
] | 85 | 2017-11-21T12:22:02.000Z | 2022-03-27T23:07:17.000Z | src/the_tale/the_tale/common/meta_relations/conf.py | Alacrate/the-tale | 43b211f3a99e93964e95abc20a8ed649a205ffcf | [
"BSD-3-Clause"
] | 545 | 2017-11-04T14:15:04.000Z | 2022-03-27T14:19:27.000Z | src/the_tale/the_tale/common/meta_relations/conf.py | Alacrate/the-tale | 43b211f3a99e93964e95abc20a8ed649a205ffcf | [
"BSD-3-Clause"
] | 45 | 2017-11-11T12:36:30.000Z | 2022-02-25T06:10:44.000Z |
import smart_imports
smart_imports.all()
settings = utils_app_settings.app_settings('META_RELATIONS')
| 13.25 | 60 | 0.820755 |
e0a40d1f9104961ba49e7e45e8fd096b3e59197b | 5,116 | py | Python | xfel/command_line/upload_mtz.py | BobWangRobot/cctbx_project | bb3cd05f628ce7e4340a5de7fe40813316bb050f | [
"BSD-3-Clause-LBNL"
] | null | null | null | xfel/command_line/upload_mtz.py | BobWangRobot/cctbx_project | bb3cd05f628ce7e4340a5de7fe40813316bb050f | [
"BSD-3-Clause-LBNL"
] | null | null | null | xfel/command_line/upload_mtz.py | BobWangRobot/cctbx_project | bb3cd05f628ce7e4340a5de7fe40813316bb050f | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
# LIBTBX_SET_DISPATCHER_NAME cctbx.xfel.upload_mtz
from libtbx.phil import parse
from dials.util import Sorry
import os, sys
import re
help_message = """
Upload an .mtz file and merging log to a shared Google Drive folder.
"""
phil_str = """
drive {... | 28.903955 | 86 | 0.687647 |
f52543e6855ee73fc8b3922c1ad3a21f47e830b6 | 951 | py | Python | kubernetes/test/test_v1_node_system_info.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 2 | 2020-06-21T08:03:18.000Z | 2020-06-21T09:53:29.000Z | kubernetes/test/test_v1_node_system_info.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_node_system_info.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 1 | 2020-06-21T08:03:17.000Z | 2020-06-21T08:03:17.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.16
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import... | 23.775 | 124 | 0.721346 |
78e46fcc50e4850d2094ec07289d835448802f31 | 22,559 | py | Python | kedro/pipeline/node.py | andromeida-maritime-solutions-pvt-ltd/kedro | 005cec83ca52a8cdadc9cb428ec1c4cd86682da3 | [
"Apache-2.0"
] | 3 | 2019-06-06T15:36:10.000Z | 2019-06-09T22:27:55.000Z | kedro/pipeline/node.py | andromeida-maritime-solutions-pvt-ltd/kedro | 005cec83ca52a8cdadc9cb428ec1c4cd86682da3 | [
"Apache-2.0"
] | null | null | null | kedro/pipeline/node.py | andromeida-maritime-solutions-pvt-ltd/kedro | 005cec83ca52a8cdadc9cb428ec1c4cd86682da3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2019 QuantumBlack Visual Analytics Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# THE SOFTWARE IS PROVIDED "AS IS"... | 38.431005 | 88 | 0.553571 |
fa17193925619017346b2c8102c910230d5a38b1 | 3,012 | py | Python | tests/contract/KT1FtKk4EzjwwkT31VqbKvPAG1dpmaDpct3V/test_ftkk4e.py | bantalon/pytezos | e538fb47a0879e70af3c0c074348a5edc3a94372 | [
"MIT"
] | null | null | null | tests/contract/KT1FtKk4EzjwwkT31VqbKvPAG1dpmaDpct3V/test_ftkk4e.py | bantalon/pytezos | e538fb47a0879e70af3c0c074348a5edc3a94372 | [
"MIT"
] | null | null | null | tests/contract/KT1FtKk4EzjwwkT31VqbKvPAG1dpmaDpct3V/test_ftkk4e.py | bantalon/pytezos | e538fb47a0879e70af3c0c074348a5edc3a94372 | [
"MIT"
] | null | null | null | from unittest import TestCase
from os.path import dirname, join
import json
from pytezos.michelson.micheline import get_script_section
from pytezos.michelson.types.base import MichelsonType
from pytezos.michelson.program import MichelsonProgram
from pytezos.michelson.format import micheline_to_michelson
from pytezos.m... | 40.702703 | 106 | 0.699867 |
1b2f9b27a105cee42cf5d72d7bfc44fcf6f7851a | 580 | py | Python | L1Trigger/TrackFindingTracklet/python/ProducerTrackBuilderChannel_cfi.py | dally96/cmssw | c37b9bfa391850cb349c71190b0bbb2d04224cc8 | [
"Apache-2.0"
] | 1 | 2022-02-24T15:01:09.000Z | 2022-02-24T15:01:09.000Z | L1Trigger/TrackFindingTracklet/python/ProducerTrackBuilderChannel_cfi.py | dally96/cmssw | c37b9bfa391850cb349c71190b0bbb2d04224cc8 | [
"Apache-2.0"
] | 8 | 2022-03-03T14:24:02.000Z | 2022-03-22T19:53:45.000Z | L1Trigger/TrackFindingTracklet/python/ProducerTrackBuilderChannel_cfi.py | dally96/cmssw | c37b9bfa391850cb349c71190b0bbb2d04224cc8 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
TrackBuilderChannel_params = cms.PSet (
UseDuplicateRemoval = cms.bool ( True ), # use tracklet seed type as channel id if False, binned track pt used if True
NumSeedTypes = cms.int32 ( 8 ), # number of u... | 58 | 150 | 0.617241 |
00c6e63eb1f557a22b2f810e5bf0f034eb74b0b1 | 7,349 | py | Python | nomadgram/images/views.py | marrywill/nomadgram | c10c3f4cb1dfc833d2ef1e74caeee0ed420eacdd | [
"MIT"
] | 2 | 2018-07-13T00:50:15.000Z | 2019-08-30T09:58:44.000Z | nomadgram/images/views.py | marrywill/nomadgram | c10c3f4cb1dfc833d2ef1e74caeee0ed420eacdd | [
"MIT"
] | null | null | null | nomadgram/images/views.py | marrywill/nomadgram | c10c3f4cb1dfc833d2ef1e74caeee0ed420eacdd | [
"MIT"
] | 2 | 2017-11-01T19:03:42.000Z | 2019-11-15T02:10:12.000Z | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from . import models, serializers
from nomadgram.notifications import views as notification_views
from nomadgram.users import models as user_models
from nomadgram.users import serializers as user_seri... | 27.732075 | 129 | 0.638862 |
c9b94966c34255be522dedf6cba93b83bc2736d2 | 496 | py | Python | reventlov/bot_plugin.py | EDyO/reventlov | 2c2a399dbbe0166ddf5845ef801c542ed263e2d4 | [
"MIT"
] | null | null | null | reventlov/bot_plugin.py | EDyO/reventlov | 2c2a399dbbe0166ddf5845ef801c542ed263e2d4 | [
"MIT"
] | 20 | 2018-05-12T10:40:40.000Z | 2018-05-27T18:52:01.000Z | reventlov/bot_plugin.py | EDyO/reventlov | 2c2a399dbbe0166ddf5845ef801c542ed263e2d4 | [
"MIT"
] | 1 | 2018-05-06T00:33:46.000Z | 2018-05-06T00:33:46.000Z | from telegram.ext import CommandHandler
class BotPlugin(object):
@property
def commands(self):
return [
handler
for handler in self.handlers
if handler.__class__ == CommandHandler
]
def add_handlers(self, dispatcher):
for handler in self.handler... | 24.8 | 50 | 0.635081 |
1e4be94d5408eb2d87e2a987f7b8d46034bc2e97 | 1,292 | py | Python | awesome/parsers/nodejs.py | jcardibo/awesome-finder | fa13fbad98319537e8db48b861f5e82e27cadb93 | [
"MIT"
] | 248 | 2017-09-11T00:17:15.000Z | 2022-03-30T16:44:21.000Z | awesome/parsers/nodejs.py | jcardibo/awesome-finder | fa13fbad98319537e8db48b861f5e82e27cadb93 | [
"MIT"
] | 13 | 2017-09-13T00:07:47.000Z | 2021-06-07T15:22:55.000Z | awesome/parsers/nodejs.py | jcardibo/awesome-finder | fa13fbad98319537e8db48b861f5e82e27cadb93 | [
"MIT"
] | 29 | 2017-09-12T19:44:55.000Z | 2022-01-17T00:20:28.000Z | from . import AbstractAwesomeParser
class AwesomeNodejsParser(AbstractAwesomeParser):
AWESOME_TITLE = 'nodejs'
AWESOME_README_URL = 'https://raw.githubusercontent.com/sindresorhus/awesome-nodejs/master/readme.md'
def find_content(self):
readme = self.read_readme()
content = readme.split('... | 34 | 105 | 0.533282 |
f6f92d98f5e82a724645aca67b8cc3266b0ee3e6 | 4,891 | py | Python | osm_nbi/html_out.py | ed1000/osm_nbi_flask | d942b4d8aecea0a10b07a466d1694151636d9e7b | [
"Apache-2.0"
] | null | null | null | osm_nbi/html_out.py | ed1000/osm_nbi_flask | d942b4d8aecea0a10b07a466d1694151636d9e7b | [
"Apache-2.0"
] | null | null | null | osm_nbi/html_out.py | ed1000/osm_nbi_flask | d942b4d8aecea0a10b07a466d1694151636d9e7b | [
"Apache-2.0"
] | 1 | 2022-03-15T15:45:57.000Z | 2022-03-15T15:45:57.000Z | """
Contains html text in variables to make and html response
"""
import yaml
from http import HTTPStatus
__author__ = "Alfonso Tierno <alfonso.tiernosepulveda@telefonica.com>"
html_start = """
<!DOCTYPE html>
<html>
<head>
<link href="/osm/static/style.css" rel="stylesheet">
<title>Welcome to OSM</title>
</head>... | 35.442029 | 143 | 0.611736 |
b5b21d3eb048ac0efa766614a0dcbdc3ce293264 | 6,068 | py | Python | pointcloud/run/zand/deep.py | stpsomad/thesis | e7ef1d1ab2118e95cfda7e98a0e952c8d1c393d0 | [
"0BSD"
] | 1 | 2019-03-18T05:50:41.000Z | 2019-03-18T05:50:41.000Z | pointcloud/run/zand/deep.py | stpsomad/thesis | e7ef1d1ab2118e95cfda7e98a0e952c8d1c393d0 | [
"0BSD"
] | null | null | null | pointcloud/run/zand/deep.py | stpsomad/thesis | e7ef1d1ab2118e95cfda7e98a0e952c8d1c393d0 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 04 14:38:34 2016
@author: Stella Psomadaki
"""
from pointcloud.AbstractBulkLoader import BulkLoader
from pointcloud.AbstractQuerier import Querier
import time
from tabulate import tabulate
import pointcloud.oracleTools as ora
import os
####################... | 41.848276 | 160 | 0.464733 |
32a2ea40b4a6f3956a720c6884e9d44e9ddecb65 | 192 | py | Python | normal_distribution.py | rein-chihaya/dise_and_normal_distribution | b0f642c1900da66f3d57b3ab0f6556a3d41455b1 | [
"MIT"
] | null | null | null | normal_distribution.py | rein-chihaya/dise_and_normal_distribution | b0f642c1900da66f3d57b3ab0f6556a3d41455b1 | [
"MIT"
] | null | null | null | normal_distribution.py | rein-chihaya/dise_and_normal_distribution | b0f642c1900da66f3d57b3ab0f6556a3d41455b1 | [
"MIT"
] | null | null | null | #coding: UTF-8
from scipy import stats
from numpy.random import *
import matplotlib.pyplot as plt
NUM=10000;
# 描画範囲の指定
r = randn(NUM)
# 横軸の変数。縦軸の変数。
plt.hist(r, bins=100)
# 描画実行
plt.show()
| 12.8 | 31 | 0.71875 |
bd5e92687989b5c1fbcc842489791723ead234ea | 1,026 | py | Python | whoahqa/views/__init__.py | onaio/who-adolescent-hqa | 108a7e60b025d0723247f5f02eab2c4d41f5a02a | [
"Apache-2.0"
] | null | null | null | whoahqa/views/__init__.py | onaio/who-adolescent-hqa | 108a7e60b025d0723247f5f02eab2c4d41f5a02a | [
"Apache-2.0"
] | 2 | 2018-01-09T08:58:11.000Z | 2019-01-18T09:20:14.000Z | whoahqa/views/__init__.py | onaio/who-adolescent-hqa | 108a7e60b025d0723247f5f02eab2c4d41f5a02a | [
"Apache-2.0"
] | null | null | null | from whoahqa.views.auth import oauth_authorize, oauth_callback # noqa
from whoahqa.views.clinics import ClinicViews # noqa
from whoahqa.views.default_views import default # noqa
from whoahqa.views.default_views import set_locale # noqa
from whoahqa.views.request_methods import get_request_user, can_list_clinics # ... | 60.352941 | 84 | 0.840156 |
87835a70373a4e9a0e558de357614f8b141e9a9f | 2,615 | py | Python | pytorch3d/renderer/mesh/renderer.py | martinruenz/pytorch3d | 7f1e63aed1252ba8145d4a66ce2272331d60cdae | [
"BSD-3-Clause"
] | 3 | 2022-03-09T08:12:54.000Z | 2022-03-10T01:57:03.000Z | pytorch3d/renderer/mesh/renderer.py | martinruenz/pytorch3d | 7f1e63aed1252ba8145d4a66ce2272331d60cdae | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/renderer/mesh/renderer.py | martinruenz/pytorch3d | 7f1e63aed1252ba8145d4a66ce2272331d60cdae | [
"BSD-3-Clause"
] | 1 | 2020-11-27T11:52:45.000Z | 2020-11-27T11:52:45.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import torch
import torch.nn as nn
from .rasterizer import Fragments
from .utils import _clip_barycentric_coordinates, _interpolate_zbuf
# A renderer class should be initialized with a
# function for rasterization and a function for shading.
#... | 37.357143 | 88 | 0.68413 |
66dfd417be656f6e291d02b002a4836fb1b00eb3 | 2,982 | py | Python | torchflare/experiments/scheduler_utilities.py | earlbabson/torchflare | 15db06d313a53a3ec4640869335ba87730562b28 | [
"Apache-2.0"
] | 1 | 2021-04-28T19:57:57.000Z | 2021-04-28T19:57:57.000Z | torchflare/experiments/scheduler_utilities.py | earlbabson/torchflare | 15db06d313a53a3ec4640869335ba87730562b28 | [
"Apache-2.0"
] | null | null | null | torchflare/experiments/scheduler_utilities.py | earlbabson/torchflare | 15db06d313a53a3ec4640869335ba87730562b28 | [
"Apache-2.0"
] | null | null | null | """Implements scheduler utilities."""
import torch
import transformers
# Structure of dictionary is as follows:
# 'key' -> scheduler , 'step_on_batch' -> whether to step after batch.
# Set True is step is after batch.
scheduler_step = {
"LambdaLR": False,
"MultiplicativeLR": False,
"StepLR": False,
"Mu... | 28.4 | 108 | 0.634474 |
4fafb83c6bf1e718418a2af65d4ba403297e76bc | 7,190 | py | Python | platform.py | Mar10us/chubby75 | 36dd1c9e1f347aff6c2f8342f2ef24e135012cf7 | [
"CC0-1.0"
] | 2 | 2019-10-07T06:10:28.000Z | 2020-06-17T21:41:54.000Z | platform.py | Mar10us/chubby75 | 36dd1c9e1f347aff6c2f8342f2ef24e135012cf7 | [
"CC0-1.0"
] | null | null | null | platform.py | Mar10us/chubby75 | 36dd1c9e1f347aff6c2f8342f2ef24e135012cf7 | [
"CC0-1.0"
] | null | null | null | from litex.build.generic_platform import *
from litex.build.xilinx import XilinxPlatform
_io = [
# clock
("clk25", 0, Pins("M9"), IOStandard("LVCMOS33")),
# led
("user_led", 0, Pins("F7"), IOStandard("LVCMOS33")),
# serial
("serial", 0,
Subsignal("tx", Pins("H5")),
Subsignal(... | 25.770609 | 79 | 0.474826 |
8634c7a3a4ae82687c7244611cced79086aa95cd | 71 | py | Python | tgbot/__main__.py | dannofx/tgbot | 2c6a69f11359121c533fa4867bb38a6fbd63601b | [
"BSD-3-Clause"
] | 4 | 2015-09-16T19:08:55.000Z | 2021-02-08T16:11:10.000Z | tgbot/__main__.py | dannofx/tgbot | 2c6a69f11359121c533fa4867bb38a6fbd63601b | [
"BSD-3-Clause"
] | null | null | null | tgbot/__main__.py | dannofx/tgbot | 2c6a69f11359121c533fa4867bb38a6fbd63601b | [
"BSD-3-Clause"
] | 2 | 2015-09-16T19:16:54.000Z | 2015-09-16T20:40:02.000Z | if __name__ == '__main__':
from tgbot.tgbot import main
main()
| 17.75 | 32 | 0.647887 |
26ff2e4a404504cc38268da688d1e9c50b785022 | 436 | py | Python | TRANSFORM/Resources/Scripts/jModelica/HeatAndMassTransfer/Examples/ExamplesFrom_NellisAndKlein/Example_1_8_1_PipeInARoof/part_a_UseExtendedSurface.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 29 | 2018-04-24T17:06:19.000Z | 2021-11-21T05:17:28.000Z | TRANSFORM/Resources/Scripts/jModelica/HeatAndMassTransfer/Examples/ExamplesFrom_NellisAndKlein/Example_1_8_1_PipeInARoof/part_a_UseExtendedSurface.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 13 | 2018-04-05T08:34:27.000Z | 2021-10-04T14:24:41.000Z | TRANSFORM/Resources/Scripts/jModelica/HeatAndMassTransfer/Examples/ExamplesFrom_NellisAndKlein/Example_1_8_1_PipeInARoof/part_a_UseExtendedSurface.py | greenwoodms/TRANSFORM-Library | dc152d4f0298d3f18385f2ea33645d87d7812915 | [
"Apache-2.0"
] | 17 | 2018-08-06T22:18:01.000Z | 2022-01-29T21:38:17.000Z | from pymodelica import compile_fmu
from pyfmi import load_fmu
libPath = r'C:\Users\vmg\Documents\Modelica\TRANSFORM-Library/TRANSFORM'
modelName = 'TRANSFORM.HeatAndMassTransfer.Examples.ExamplesFrom_NellisAndKlein.Example_1_8_1_PipeInARoof.part_a_UseExtendedSurface'
fmu = compile_fmu(modelName,libPath,target='cs')
m... | 31.142857 | 132 | 0.827982 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.