hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797e6ea62c65115f024487488ef973d4b9dc63d7 | 3,687 | py | Python | projects/pointnav_baselines/experiments/habitat/pointnav_habitat_rgbd_simpleconvgru_ddppo.py | mattdeitke/allenact-1 | 70f106b32a38424e862399a76d84f607838063be | [
"MIT"
] | null | null | null | projects/pointnav_baselines/experiments/habitat/pointnav_habitat_rgbd_simpleconvgru_ddppo.py | mattdeitke/allenact-1 | 70f106b32a38424e862399a76d84f607838063be | [
"MIT"
] | null | null | null | projects/pointnav_baselines/experiments/habitat/pointnav_habitat_rgbd_simpleconvgru_ddppo.py | mattdeitke/allenact-1 | 70f106b32a38424e862399a76d84f607838063be | [
"MIT"
] | null | null | null | import gym
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import LambdaLR
from core.algorithms.onpolicy_sync.losses import PPO
from core.algorithms.onpolicy_sync.losses.ppo import PPOConfig
from plugins.habitat_plugin.habitat_sensors import (
RGBSensorHabitat,
DepthSensorHabita... | 33.216216 | 88 | 0.650393 |
797e6ead09a2466fb4b99e4023ea9f60be6b138b | 8,431 | py | Python | ebs_snapper/snapshot.py | smllycat/ebs_snapper | 785293bb65931d06e2290856a8ea5e52f21a3e8d | [
"Apache-2.0"
] | 53 | 2016-11-15T23:31:50.000Z | 2020-02-27T21:07:07.000Z | ebs_snapper/snapshot.py | smllycat/ebs_snapper | 785293bb65931d06e2290856a8ea5e52f21a3e8d | [
"Apache-2.0"
] | 56 | 2016-10-07T07:02:13.000Z | 2021-03-19T15:30:06.000Z | ebs_snapper/snapshot.py | smllycat/ebs_snapper | 785293bb65931d06e2290856a8ea5e52f21a3e8d | [
"Apache-2.0"
] | 17 | 2016-11-06T13:58:51.000Z | 2021-02-16T18:35:12.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2016 Rackspace US, Inc.
#
# 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 ... | 37.140969 | 90 | 0.677737 |
797e6edfbb6832cce1cc4d9d88845bde7b6bf3cf | 2,808 | py | Python | django_test_runner/__main__.py | sobolevn/baldr | 6413de0b87722957e5a49bd441b18dcb934864f5 | [
"BSD-3-Clause"
] | 4 | 2019-08-07T22:29:33.000Z | 2021-12-19T14:25:39.000Z | django_test_runner/__main__.py | sobolevn/baldr | 6413de0b87722957e5a49bd441b18dcb934864f5 | [
"BSD-3-Clause"
] | 2 | 2016-12-15T15:46:26.000Z | 2020-06-06T23:07:56.000Z | django_test_runner/__main__.py | sobolevn/baldr | 6413de0b87722957e5a49bd441b18dcb934864f5 | [
"BSD-3-Clause"
] | 3 | 2015-09-27T16:43:40.000Z | 2020-06-06T23:04:07.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from optparse import OptionParser
import django
from django.conf import settings
from django.core.management import call_command
def main():
"""
The entry point for the script. This script is fairly basic. Here is a
quick example of how t... | 33.428571 | 119 | 0.616453 |
797e7058f92dab0b5e3dfc17c9ecad9f5eaeac97 | 7,942 | py | Python | python/streamer/camera.py | GTkernel/streamer | fe3abc4c85bb56a142ae6ef3e280dca1ff349a63 | [
"Apache-2.0"
] | null | null | null | python/streamer/camera.py | GTkernel/streamer | fe3abc4c85bb56a142ae6ef3e280dca1ff349a63 | [
"Apache-2.0"
] | null | null | null | python/streamer/camera.py | GTkernel/streamer | fe3abc4c85bb56a142ae6ef3e280dca1ff349a63 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The Streamer Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 31.391304 | 149 | 0.633216 |
797e70695da9025cf9102995e6e7d7d71265b8cb | 362 | py | Python | taobao-tianmao/top/api/rest/TopAuthTokenCreateRequest.py | ScottLeeF/python-example | 0b230ba80fe5020d70329a9d73e058013f0ca111 | [
"Apache-2.0"
] | null | null | null | taobao-tianmao/top/api/rest/TopAuthTokenCreateRequest.py | ScottLeeF/python-example | 0b230ba80fe5020d70329a9d73e058013f0ca111 | [
"Apache-2.0"
] | 7 | 2021-03-19T02:12:42.000Z | 2022-03-12T00:25:28.000Z | taobao-tianmao/top/api/rest/TopAuthTokenCreateRequest.py | ScottLeeF/python-example | 0b230ba80fe5020d70329a9d73e058013f0ca111 | [
"Apache-2.0"
] | null | null | null | '''
Created by auto_sdk on 2018.07.25
'''
from top.api.base import RestApi
class TopAuthTokenCreateRequest(RestApi):
def __init__(self, domain='gw.api.taobao.com', port=80):
RestApi.__init__(self, domain, port)
self.code = None
self.uuid = None
def getapiname(self):
... | 24.133333 | 61 | 0.640884 |
797e707afbf806ba0bff5fe6adcaa5671af3a5b7 | 4,332 | py | Python | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_dept_and_child_dept_request.py | githubmilesma/huaweicloud-sdk-python-v3 | 9d9449ed68a609ca65f0aa50b5b2a1c28445bf03 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_dept_and_child_dept_request.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/show_dept_and_child_dept_request.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class ShowDeptAndChildDeptRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and ... | 27.417722 | 88 | 0.590259 |
797e70f9f9eded2ab6950ecee0e69f2c11407482 | 14,037 | py | Python | oslo_policy/tests/test_external.py | openstack/oslo.policy | 4ecbcf280ad008f17ab4a72bc56a9793c32f7dc7 | [
"Apache-2.0"
] | 48 | 2015-01-29T20:10:46.000Z | 2021-04-24T19:16:39.000Z | oslo_policy/tests/test_external.py | openstack/oslo.policy | 4ecbcf280ad008f17ab4a72bc56a9793c32f7dc7 | [
"Apache-2.0"
] | 1 | 2016-04-07T22:05:30.000Z | 2016-04-07T22:05:30.000Z | oslo_policy/tests/test_external.py | openstack/oslo.policy | 4ecbcf280ad008f17ab4a72bc56a9793c32f7dc7 | [
"Apache-2.0"
] | 35 | 2015-02-02T15:04:05.000Z | 2021-11-16T09:06:42.000Z | # Copyright (c) 2015 OpenStack Foundation.
# All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 43.865625 | 88 | 0.599487 |
797e71834b88a9193ecc097ba924dbf8205ead12 | 1,963 | py | Python | tools/convert_release_notes.py | MakeItZone/circuitpython | 7f803c0b51c333210ed267502422ed7bb28b9be7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 13 | 2021-01-27T13:12:17.000Z | 2022-02-25T20:16:00.000Z | tools/convert_release_notes.py | MakeItZone/circuitpython | 7f803c0b51c333210ed267502422ed7bb28b9be7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 1 | 2020-12-30T11:48:24.000Z | 2020-12-30T11:48:24.000Z | tools/convert_release_notes.py | MakeItZone/circuitpython | 7f803c0b51c333210ed267502422ed7bb28b9be7 | [
"Unlicense",
"BSD-3-Clause",
"MIT-0",
"MIT"
] | 6 | 2021-05-12T20:45:46.000Z | 2021-12-27T04:51:56.000Z | # SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
# SPDX-License-Identifier: MIT
import sys
import mistune
import mistune.renderers
print(sys.argv[1])
with open(sys.argv[1], "r") as source_file:
source = source_file.read()
h... | 26.527027 | 135 | 0.607743 |
797e71a23ee2edcaddde3ba88e0ec29c68ca5660 | 13,326 | py | Python | zerver/views/users.py | yicongwu/zulip | 6026314bebd93ec032e5c8732cc8e7cd03b3f7f7 | [
"Apache-2.0"
] | 1 | 2021-02-13T20:43:29.000Z | 2021-02-13T20:43:29.000Z | zerver/views/users.py | eric-erki/zulip | a063dd3b26f7ada794e14ace0d24ea1834611446 | [
"Apache-2.0"
] | 9 | 2021-02-08T20:22:39.000Z | 2022-02-11T03:40:19.000Z | zerver/views/users.py | tobby2002/zulip | 66e7c455759f9368bae16b9a604cf63f8e3524cd | [
"Apache-2.0"
] | 1 | 2021-04-09T05:50:23.000Z | 2021-04-09T05:50:23.000Z | from __future__ import absolute_import
from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext as _
from django.shortcuts import redirect
from six.moves import map
from zerver.decorator import has_request_variables, REQ, JsonableError, \
require_realm_admin
from zerver.for... | 42.711538 | 144 | 0.699835 |
797e724030630616b51a417625ec989cffe15559 | 5,356 | py | Python | data/p3BR/R1/benchmark/startQiskit_noisy345.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R1/benchmark/startQiskit_noisy345.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R1/benchmark/startQiskit_noisy345.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=63
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from... | 28.951351 | 140 | 0.628267 |
797e73b4a012c326915466c9360856e9455dfc8b | 587 | py | Python | components/collector/src/source_collectors/random_number/all_metrics.py | Erik-Stel/quality-time | 602b6970e5d9088cb89cc6d488337349e54e1c9a | [
"Apache-2.0"
] | null | null | null | components/collector/src/source_collectors/random_number/all_metrics.py | Erik-Stel/quality-time | 602b6970e5d9088cb89cc6d488337349e54e1c9a | [
"Apache-2.0"
] | null | null | null | components/collector/src/source_collectors/random_number/all_metrics.py | Erik-Stel/quality-time | 602b6970e5d9088cb89cc6d488337349e54e1c9a | [
"Apache-2.0"
] | null | null | null | """Metric collector that returns random values."""
import random
from typing import Final
from base_collectors import SourceCollector
from collector_utilities.type import Value
from source_model import SourceResponses
class Random(SourceCollector):
"""Random number metric collector."""
MIN: Final[int] = 1
... | 29.35 | 119 | 0.732538 |
797e744bbf7d56755a6d81180f6743975935a9e3 | 112,544 | py | Python | src/transformers/models/longformer/modeling_longformer.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/longformer/modeling_longformer.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/longformer/modeling_longformer.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Allen Institute for AI team and The HuggingFace Inc. team.
#
# 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... | 48.594128 | 176 | 0.678224 |
797e749d2b850b9c128093bceaae474091b73b41 | 1,826 | py | Python | nonebot/typing.py | DeSireFire/nonebot | c492d1bf3215a83311417c216609edd208a05598 | [
"MIT"
] | 1 | 2022-01-16T08:02:04.000Z | 2022-01-16T08:02:04.000Z | nonebot/typing.py | DeSireFire/nonebot | c492d1bf3215a83311417c216609edd208a05598 | [
"MIT"
] | null | null | null | nonebot/typing.py | DeSireFire/nonebot | c492d1bf3215a83311417c216609edd208a05598 | [
"MIT"
] | null | null | null | from typing import TYPE_CHECKING, Optional, Union, List, Dict, Any, Sequence, Callable, Tuple, Awaitable, Pattern, Iterable
if TYPE_CHECKING:
from aiocqhttp import Event as CQEvent
from nonebot import NoneBot
from nonebot.plugin import PluginManager
from nonebot.command import CommandSession
from n... | 38.041667 | 123 | 0.729463 |
797e761fcd0ae45a66c7ebf3a37ce3f5315705fb | 2,305 | py | Python | ppci/lang/ocaml/bytefile.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | null | null | null | ppci/lang/ocaml/bytefile.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | null | null | null | ppci/lang/ocaml/bytefile.py | rakati/ppci-mirror | 8f5b0282fd1122d7c389b39c86fcf5d9352b7bb2 | [
"BSD-2-Clause"
] | 1 | 2021-11-23T14:23:04.000Z | 2021-11-23T14:23:04.000Z | """ Handling of OCaml bytecode files ending with .byte extension. """
import logging
from .code import load_code
from .marshall import read_value
logger = logging.getLogger("ocaml")
class ByteCodeReader:
""" Reader for bytecode files.
"""
MAGIC_V023 = "Caml1999X023"
def __init__(self, reader):
... | 31.148649 | 71 | 0.606941 |
797e77192a68889bf9e767fbd073cd31c0406305 | 2,479 | py | Python | WEEK 1/python-5/main.py | VictorCampelo/Codenation-Aceleracao-Python | 3adf5248a7d50b2c56495ffec1f4575fd2a407f4 | [
"MIT"
] | null | null | null | WEEK 1/python-5/main.py | VictorCampelo/Codenation-Aceleracao-Python | 3adf5248a7d50b2c56495ffec1f4575fd2a407f4 | [
"MIT"
] | 8 | 2021-04-08T21:19:15.000Z | 2022-02-10T12:44:54.000Z | WEEK 1/python-5/main.py | VictorCampelo/Codenation-Aceleracao-Python | 3adf5248a7d50b2c56495ffec1f4575fd2a407f4 | [
"MIT"
] | null | null | null | from datetime import datetime
from operator import itemgetter
records = [
{'source': '48-996355555', 'destination': '48-666666666', 'end': 1564610974, 'start': 1564610674},
{'source': '41-885633788', 'destination': '41-886383097', 'end': 1564506121, 'start': 1564504821},
{'source': '48-996383697', 'destina... | 52.744681 | 102 | 0.593384 |
797e7722770a5f15ccdba3036e7eadcfd7a1b3b7 | 3,619 | py | Python | lib/pacmodule/iMatrix.py | liguowang/epage | 2ce60ddbcd23f06dc4d635681e8e52b66ba519f9 | [
"MIT"
] | null | null | null | lib/pacmodule/iMatrix.py | liguowang/epage | 2ce60ddbcd23f06dc4d635681e8e52b66ba519f9 | [
"MIT"
] | null | null | null | lib/pacmodule/iMatrix.py | liguowang/epage | 2ce60ddbcd23f06dc4d635681e8e52b66ba519f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 30 11:47:21 2019
@author: m102324
"""
import sys
import math
from pacmodule import iReader
from scipy import stats
def read_matrix(infile, g_list, s_list, outfile, zfile,log=False):
'''
Slice a subset from matrix file.
Parameters
... | 34.466667 | 99 | 0.519204 |
797e7794923f983d24b33b0fbdb83d09d840e329 | 41,797 | py | Python | myems-api/reports/equipmentsaving.py | lijinchang3/myems | ede74ec2982e610d218095904817268951d3bc06 | [
"MIT"
] | 2 | 2021-02-19T10:22:36.000Z | 2021-02-19T10:23:22.000Z | myems-api/reports/equipmentsaving.py | tianlinzhong/myems | 07dd1eb8060f4145be66c8d1a20b5e064a68281b | [
"MIT"
] | null | null | null | myems-api/reports/equipmentsaving.py | tianlinzhong/myems | 07dd1eb8060f4145be66c8d1a20b5e064a68281b | [
"MIT"
] | 1 | 2022-01-29T14:18:47.000Z | 2022-01-29T14:18:47.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.equipmentsaving
class Reporting:
@staticmethod
def __init__():
pass
@staticmethod
def on... | 62.197917 | 120 | 0.524272 |
797e77e43a006cdcc39aa55f53b807327b2f7233 | 2,427 | py | Python | setup.py | pvavra/datalad-hirni | 375eea8377ba7497bf6030a028d64e59b36cf46b | [
"MIT"
] | null | null | null | setup.py | pvavra/datalad-hirni | 375eea8377ba7497bf6030a028d64e59b36cf46b | [
"MIT"
] | null | null | null | setup.py | pvavra/datalad-hirni | 375eea8377ba7497bf6030a028d64e59b36cf46b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os.path as op
from setuptools import setup
from setuptools import find_packages
from setup_support import BuildManPage
from setup_support import get_version
# extension version
version = get_version()
cmdclass = {
'build_manpage': BuildManPage,
#'build_examples': BuildRSTExampl... | 30.721519 | 80 | 0.655542 |
797e782d3188e717e45fa2cf7bda54fdae112246 | 12,237 | py | Python | test/automl/test_forecast.py | int-chaos/FLAML | 99667dad5f4931120551b56aa9a955b4ff0e6f15 | [
"MIT"
] | null | null | null | test/automl/test_forecast.py | int-chaos/FLAML | 99667dad5f4931120551b56aa9a955b4ff0e6f15 | [
"MIT"
] | null | null | null | test/automl/test_forecast.py | int-chaos/FLAML | 99667dad5f4931120551b56aa9a955b4ff0e6f15 | [
"MIT"
] | null | null | null | import numpy as np
from flaml import AutoML
def test_forecast_automl(budget=5):
# using dataframe
import statsmodels.api as sm
data = sm.datasets.co2.load_pandas().data["co2"].resample("MS").mean()
data = (
data.fillna(data.bfill())
.to_frame()
.reset_index()
.rename(c... | 33.618132 | 107 | 0.628177 |
797e784cae4c23754276eebe04388fa398756b60 | 451 | py | Python | paderbox/visualization/matplotlib_fix.py | JanekEbb/paderbox | 7cd3bf92380e05ec856936d21a64d0a8a3ff0fca | [
"MIT"
] | 25 | 2019-12-21T21:10:08.000Z | 2022-02-04T10:40:19.000Z | paderbox/visualization/matplotlib_fix.py | JanekEbb/paderbox | 7cd3bf92380e05ec856936d21a64d0a8a3ff0fca | [
"MIT"
] | 32 | 2019-12-21T21:48:24.000Z | 2022-03-31T08:20:39.000Z | paderbox/visualization/matplotlib_fix.py | JanekEbb/paderbox | 7cd3bf92380e05ec856936d21a64d0a8a3ff0fca | [
"MIT"
] | 254 | 2019-12-16T08:15:08.000Z | 2021-11-26T12:41:12.000Z | import os
import matplotlib
# Fix matplotlib when no display is available
# https://github.com/ipython/ipython/pull/10974
if os.environ.get('DISPLAY', '') == '':
if matplotlib.get_backend() in [
'module://ipykernel.pylab.backend_inline', # %matplotlib inline
'NbAgg', # %matplotlib notebook
]:... | 30.066667 | 76 | 0.654102 |
797e7874eba51be4decfbfcde4f04941c79dde02 | 5,687 | py | Python | tests/installation/test_pip_installer.py | pkoch/poetry | d22c5a7187d8b5a30196a7df58111b3c90be7d22 | [
"MIT"
] | null | null | null | tests/installation/test_pip_installer.py | pkoch/poetry | d22c5a7187d8b5a30196a7df58111b3c90be7d22 | [
"MIT"
] | null | null | null | tests/installation/test_pip_installer.py | pkoch/poetry | d22c5a7187d8b5a30196a7df58111b3c90be7d22 | [
"MIT"
] | null | null | null | from __future__ import annotations
import re
import shutil
from pathlib import Path
from typing import TYPE_CHECKING
import pytest
from cleo.io.null_io import NullIO
from poetry.core.packages.package import Package
from poetry.installation.pip_installer import PipInstaller
from poetry.repositories.legacy_repositor... | 27.47343 | 88 | 0.668718 |
797e78fcd05adb91b94015be62afd322fcf1c252 | 399 | py | Python | mundo-1/ex025.py | PedroSantana2/exercicios-python-canal-curso-em-video | 154ae9771e88906c7fcef5efc5799e44acfc2ae3 | [
"MIT"
] | 1 | 2021-03-17T20:16:36.000Z | 2021-03-17T20:16:36.000Z | mundo-1/ex025.py | PedroSantana2/exercicios-python-canal-curso-em-video | 154ae9771e88906c7fcef5efc5799e44acfc2ae3 | [
"MIT"
] | null | null | null | mundo-1/ex025.py | PedroSantana2/exercicios-python-canal-curso-em-video | 154ae9771e88906c7fcef5efc5799e44acfc2ae3 | [
"MIT"
] | null | null | null | '''
Crie um programa que leia o nome de uma pessoa e diga se ela tem "SILVA" no nome.
'''
#Recebendo valor:
nome = str(input('Digite seu nome: ')).strip()
#Variaveis:
#Coloca tudo em maiusculo e dividi a string de acordo com os espaços:
dividir = nome.upper().split()
#Retorna valor boleano:
resultado = bool('SILVA' ... | 23.470588 | 81 | 0.709273 |
797e7907a7adedaadada873fc3ed3fce62507409 | 6,646 | py | Python | course_difficulty.py | kokikapoor/kokikapoor_dailytimedschedule | 2f8de8e45aaf7f1b92211af93ba2c972bdddeaf6 | [
"MIT"
] | null | null | null | course_difficulty.py | kokikapoor/kokikapoor_dailytimedschedule | 2f8de8e45aaf7f1b92211af93ba2c972bdddeaf6 | [
"MIT"
] | 2 | 2020-10-14T03:18:50.000Z | 2020-10-22T16:29:19.000Z | course_difficulty.py | kokikapoor/kokikapoor_dailytimedschedule | 2f8de8e45aaf7f1b92211af93ba2c972bdddeaf6 | [
"MIT"
] | 10 | 2020-10-09T03:59:06.000Z | 2020-11-15T05:06:30.000Z | # Koki Kapoor
# CSC 630
# Course Difficulty.py file
# have each homework assignment be ranked based on difficulty of the course and on difficulty of the assignment itself
# list_of_courses_and_difficulty only takes into consideration the difficulty of the course, not the assignment
from array import *
# install num... | 42.602564 | 175 | 0.601565 |
797e79b8b9b1ca06714fdb66d946506ae3f5b3bd | 7,115 | py | Python | predict.py | TongXinNSSC/my_galaxyclassification | 43aa55540916d0f2c37fa955cb9f5b19c23b1399 | [
"MIT"
] | null | null | null | predict.py | TongXinNSSC/my_galaxyclassification | 43aa55540916d0f2c37fa955cb9f5b19c23b1399 | [
"MIT"
] | null | null | null | predict.py | TongXinNSSC/my_galaxyclassification | 43aa55540916d0f2c37fa955cb9f5b19c23b1399 | [
"MIT"
] | null | null | null | from torchvision import transforms
#from PIL import Image
import torch
import numpy as np
import math
import random
import cv2
import numpy as np
from loadmodel import *
from model import *
cv2.ocl.setUseOpenCL(False)
from torch.utils.data import Dataset
import logging
#import matplotlib.image as mpimg
# from MLP impor... | 36.487179 | 116 | 0.60759 |
797e7ac6245f0991e4f5c31506d9021290dc3b51 | 5,182 | py | Python | isi_sdk_8_1_1/isi_sdk_8_1_1/models/hdfs_rack_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/hdfs_rack_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/hdfs_rack_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_1_1.models.hdfs_ra... | 29.781609 | 132 | 0.59726 |
797e7b7dc80f4fb814958fac60030a8f782afcd7 | 885 | py | Python | contrib/jupyter/orbitutils/orbit_capture_test.py | vwbaker/orbit | 361cc416d1b3ecbc07318275c1bdbc1bb1bc9651 | [
"BSD-2-Clause"
] | 1 | 2021-12-26T06:43:40.000Z | 2021-12-26T06:43:40.000Z | contrib/jupyter/orbitutils/orbit_capture_test.py | jayant99acharya/orbit | f713721e33448a6b0dc8ea4c5aa587855337e32c | [
"BSD-2-Clause"
] | null | null | null | contrib/jupyter/orbitutils/orbit_capture_test.py | jayant99acharya/orbit | f713721e33448a6b0dc8ea4c5aa587855337e32c | [
"BSD-2-Clause"
] | 1 | 2021-03-10T15:21:19.000Z | 2021-03-10T15:21:19.000Z | """
Copyright (c) 2021 The Orbit Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
"""
import os
import unittest
import orbitutils.orbit_capture
class TestOrbitCapture(unittest.TestCase):
def test_opening_capture(self):
dir_path... | 35.4 | 78 | 0.696045 |
797e7b9488bad8f4a544875a9f639613d2510719 | 25,241 | py | Python | botlistbot/routing.py | Rostgnom/BotListBot | 083e2c2a11056dc23d153c58ef6e9e79d63e0894 | [
"MIT"
] | 66 | 2017-07-21T07:16:14.000Z | 2022-02-13T03:52:52.000Z | botlistbot/routing.py | Rostgnom/BotListBot | 083e2c2a11056dc23d153c58ef6e9e79d63e0894 | [
"MIT"
] | 10 | 2017-10-20T00:51:43.000Z | 2021-06-02T00:07:32.000Z | botlistbot/routing.py | Rostgnom/BotListBot | 083e2c2a11056dc23d153c58ef6e9e79d63e0894 | [
"MIT"
] | 44 | 2018-01-05T15:01:47.000Z | 2022-02-10T20:32:41.000Z | import json
import traceback
from peewee import DoesNotExist
import re
from functools import partial
from logzero import logger as log
from telegram.ext import (
CallbackQueryHandler,
ChosenInlineResultHandler,
CommandHandler,
ConversationHandler,
Dispatcher,
DispatcherHandlerStop,
Filters,... | 39.194099 | 105 | 0.59435 |
797e7cb0f5794d10c8e591d50711fadcdc43c95f | 17,978 | py | Python | morelia/matchers.py | waiteperspectives/Morelia | e6e6180d688c6bdf538f6b43a97755c76329646a | [
"MIT"
] | null | null | null | morelia/matchers.py | waiteperspectives/Morelia | e6e6180d688c6bdf538f6b43a97755c76329646a | [
"MIT"
] | null | null | null | morelia/matchers.py | waiteperspectives/Morelia | e6e6180d688c6bdf538f6b43a97755c76329646a | [
"MIT"
] | null | null | null | r"""
Steps
=====
.. _matching-steps:
Matching steps
--------------
When Morelia executes steps described in feature files it looks
inside passed :py:class:`unittest.TestCase` object and search for methods
which name starts with `step_`. Then it selects correct method using:
* `Regular expressions`_
* `Format-like s... | 31.707231 | 144 | 0.606742 |
797e7dea4d08d84e86214de3455f760c927593a9 | 513 | py | Python | test/04_verification_test.py | piovere/beschi | 53982844759440ce91d393a8e238551f77d45633 | [
"MIT"
] | null | null | null | test/04_verification_test.py | piovere/beschi | 53982844759440ce91d393a8e238551f77d45633 | [
"MIT"
] | null | null | null | test/04_verification_test.py | piovere/beschi | 53982844759440ce91d393a8e238551f77d45633 | [
"MIT"
] | null | null | null | import test_util
def test_basic_harness_compilation(generator_label):
test_util.build_for(generator_label, "basic", "ComprehensiveMessage")
def test_writing_and_reading(generator_label):
test_util.run_for(generator_label, "basic")
# checks that all generated messages from each language are byte-identical
## ... | 36.642857 | 74 | 0.793372 |
797e7f4614b9fef15a0d4dc154b27856a4e5ffa6 | 916 | py | Python | tests/binary/CROMU_00009_a.py | toshipiazza/memsight | 4c5c5db7fa4c674b0d5cc7321f7d5fef56bd3ff9 | [
"BSD-2-Clause"
] | 18 | 2017-11-02T11:04:33.000Z | 2020-12-01T08:39:10.000Z | tests/binary/CROMU_00009_a.py | toshipiazza/memsight | 4c5c5db7fa4c674b0d5cc7321f7d5fef56bd3ff9 | [
"BSD-2-Clause"
] | 2 | 2020-04-16T17:24:16.000Z | 2020-04-25T19:36:43.000Z | tests/binary/CROMU_00009_a.py | toshipiazza/memsight | 4c5c5db7fa4c674b0d5cc7321f7d5fef56bd3ff9 | [
"BSD-2-Clause"
] | 2 | 2019-06-07T06:24:30.000Z | 2020-03-09T22:53:24.000Z |
def start():
return None
def end():
return [] #[0x804e3a2]
def avoid():
return []
def do_start(state):
import claripy
#buf = [0x1, 0xf5, 0xa]
buf = [0x40, 0x20, 0xa]
for i in range(len(buf)):
c = state.posix.files[0].read_from(1)
state.se.add(c == buf[i])
state.posix.files[0].size = len(buf)
state.... | 18.32 | 69 | 0.621179 |
797e80a5fc3655c33a7f4719ad3f72376acbf383 | 39,869 | py | Python | core/domain/user_domain.py | huntermaxfield/oppia | c0fac18a9fc7ea9fed555fb06818496f5ba92dcb | [
"Apache-2.0"
] | 1 | 2021-06-17T12:46:33.000Z | 2021-06-17T12:46:33.000Z | core/domain/user_domain.py | huntermaxfield/oppia | c0fac18a9fc7ea9fed555fb06818496f5ba92dcb | [
"Apache-2.0"
] | null | null | null | core/domain/user_domain.py | huntermaxfield/oppia | c0fac18a9fc7ea9fed555fb06818496f5ba92dcb | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 42.41383 | 82 | 0.652336 |
797e80a621441acbd16bae2574af1c39fbbbbfb6 | 1,113 | py | Python | ckanext/issues/commands.py | rhabbachi/ckanext-issues | d8c3dde8372e88dd5dc173023df34c90034ca777 | [
"MIT"
] | 8 | 2016-06-16T20:45:54.000Z | 2020-09-24T12:06:15.000Z | ckanext/issues/commands.py | rhabbachi/ckanext-issues | d8c3dde8372e88dd5dc173023df34c90034ca777 | [
"MIT"
] | 50 | 2015-03-25T16:59:11.000Z | 2016-01-10T21:35:26.000Z | ckanext/issues/commands.py | rhabbachi/ckanext-issues | d8c3dde8372e88dd5dc173023df34c90034ca777 | [
"MIT"
] | 11 | 2016-09-14T13:34:53.000Z | 2020-08-28T05:48:58.000Z | from ckan.lib.cli import CkanCommand
import logging
import sys
class Issues(CkanCommand):
"""
Usage:
paster issues init_db
- Creates the database table issues needs to run
paster issues upgrade_db
- Does any database migrations required (idempotent)
"""
summary... | 25.883721 | 69 | 0.57053 |
797e8161265e83d92c9b93f026531dcf43bde062 | 5,388 | py | Python | main.py | EpicKidCreations/tic-tac-toe | 495cf110a5c15930ac886e53b9a691e3c1495d92 | [
"MIT"
] | null | null | null | main.py | EpicKidCreations/tic-tac-toe | 495cf110a5c15930ac886e53b9a691e3c1495d92 | [
"MIT"
] | null | null | null | main.py | EpicKidCreations/tic-tac-toe | 495cf110a5c15930ac886e53b9a691e3c1495d92 | [
"MIT"
] | null | null | null |
import random
row1 = ["", "|", "", "|", ""]
row2 = ["", "|", "", "|", ""]
row3 = ["", "|", "", "|", ""]
def board(row1, row2, row3):
print(f"""
{row1}
-----------------------
{row2}
-----------------------
{row3}
""")
def game(board, row1, row2, row3, play, p, pplays):
if play in ... | 25.903846 | 63 | 0.440423 |
797e8244c946603cbb307735e88e4093f3f7a312 | 2,461 | py | Python | scripts/download_and_index.py | Medwynd/myb | a56bc5583e14804cb957c1403e185d9ad9f679d1 | [
"MIT"
] | 50 | 2018-05-11T13:40:21.000Z | 2022-03-25T12:09:09.000Z | scripts/download_and_index.py | Medwynd/myb | a56bc5583e14804cb957c1403e185d9ad9f679d1 | [
"MIT"
] | 45 | 2018-05-11T14:25:56.000Z | 2022-01-22T22:14:25.000Z | scripts/download_and_index.py | Medwynd/myb | a56bc5583e14804cb957c1403e185d9ad9f679d1 | [
"MIT"
] | 99 | 2018-05-11T12:56:48.000Z | 2022-03-25T12:09:24.000Z | import json
from mybgg.downloader import Downloader
from mybgg.indexer import Indexer
def main(args):
SETTINGS = json.load(open("config.json", "rb"))
downloader = Downloader(
project_name=SETTINGS["project"]["name"],
cache_bgg=args.cache_bgg,
debug=args.debug,
)
collection = ... | 31.551282 | 116 | 0.634701 |
797e82782d78fad32423250a8a8168d5f411958a | 1,236 | py | Python | NAS/files/kerastuner/applications/metric.py | Neronjust2017/keras-project | 919e67e10b0bf518eb9cc63df68c79fe2bb71b36 | [
"Apache-2.0"
] | 2 | 2020-07-07T12:29:02.000Z | 2020-09-16T15:33:02.000Z | NAS/files/kerastuner/applications/metric.py | Neronjust2017/keras-project | 919e67e10b0bf518eb9cc63df68c79fe2bb71b36 | [
"Apache-2.0"
] | 1 | 2020-10-04T12:08:27.000Z | 2020-10-05T05:05:39.000Z | utils/uts_classification/metric.py | Neronjust2017/keras-project | 919e67e10b0bf518eb9cc63df68c79fe2bb71b36 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from tensorflow.keras import backend as K
def recall(y_true,y_pred):
"""Recall metric.
Only computes a batch-wise average of recall.
Computes the recall, a metric for multi-label classification of
how many relevant items are selected.
"""
... | 33.405405 | 93 | 0.656149 |
797e829fb703643adcbd1202e48b29049b2b10a7 | 3,627 | py | Python | sdk/python/pulumi_azure_nextgen/machinelearningservices/v20200301/list_machine_learning_compute_nodes.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/machinelearningservices/v20200301/list_machine_learning_compute_nodes.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/machinelearningservices/v20200301/list_machine_learning_compute_nodes.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"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... | 37.391753 | 188 | 0.680176 |
797e84d3c57d6673bc07fd03def2105503ae134b | 714 | py | Python | lab07/tests/q2_3.py | ucsb-int5/int5-f19-notebooks | 5b3d1ee6964d9357f211f4706787403ec5a3079c | [
"MIT"
] | 1 | 2019-10-02T21:43:12.000Z | 2019-10-02T21:43:12.000Z | lab07/tests/q2_3.py | ucsb-int5/int5-f19-notebooks | 5b3d1ee6964d9357f211f4706787403ec5a3079c | [
"MIT"
] | 3 | 2019-12-14T06:20:14.000Z | 2019-12-14T07:12:33.000Z | lab07/tests/q2_3.py | ucsb-int5/int5-f19-notebooks | 5b3d1ee6964d9357f211f4706787403ec5a3079c | [
"MIT"
] | 3 | 2019-10-02T18:36:06.000Z | 2019-12-03T18:16:45.000Z | test = { 'name': 'q2_3',
'points': 2,
'suites': [ { 'cases': [ { 'code': '>>> '
'np.isclose(expected_value_card, '
'np.sum(np.arange(1,14)) * '
'prob_non_joker +... | 47.6 | 81 | 0.231092 |
797e851120ec28a714757e73020b870035ed8195 | 5,174 | py | Python | Malmo/samples/Python_examples/tutorial_8.py | Diffblue-benchmarks/Microsoft-malmo | 4c4f789040db72a77f3f838319a5c02f2c66e829 | [
"MIT"
] | 3,570 | 2016-07-08T04:04:25.000Z | 2019-05-05T12:05:38.000Z | Malmo/samples/Python_examples/tutorial_8.py | Diffblue-benchmarks/Microsoft-malmo | 4c4f789040db72a77f3f838319a5c02f2c66e829 | [
"MIT"
] | 592 | 2016-07-08T10:33:40.000Z | 2019-05-03T15:08:15.000Z | Malmo/samples/Python_examples/tutorial_8.py | Diffblue-benchmarks/Microsoft-malmo | 4c4f789040db72a77f3f838319a5c02f2c66e829 | [
"MIT"
] | 607 | 2016-07-08T01:01:52.000Z | 2019-05-05T22:06:40.000Z | from __future__ import print_function
# ------------------------------------------------------------------------------------------------
# Copyright (c) 2016 Microsoft Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the... | 34.959459 | 105 | 0.651913 |
797e8545e2e1fea27e12b345f491a8d3031f7fae | 495 | py | Python | ex104.py | jefernathan/Python | 2f840a625e8d46d41ab36df07ef50ae15a03c5ab | [
"MIT"
] | null | null | null | ex104.py | jefernathan/Python | 2f840a625e8d46d41ab36df07ef50ae15a03c5ab | [
"MIT"
] | null | null | null | ex104.py | jefernathan/Python | 2f840a625e8d46d41ab36df07ef50ae15a03c5ab | [
"MIT"
] | null | null | null | # Crie um programa que tenha a função leiaInt(), que vai funcionar de forma semelhante a função input() do Python, só que fazendo a validação para aceitar apenas um valor numérico.
# Ex: n = leiaInt('Digite um n: ')
def leiaint(leia):
num = ' '
while not num.isnumeric():
num = input(leia)
if n... | 33 | 181 | 0.654545 |
797e854fdaa2392f35cb8f20b8eb65e11de7a8e6 | 1,083 | py | Python | modules/news.py | sayanmondal2098/Discord-bot | 9e8671525c1e96040a488f00e29612c75ae227f3 | [
"MIT"
] | null | null | null | modules/news.py | sayanmondal2098/Discord-bot | 9e8671525c1e96040a488f00e29612c75ae227f3 | [
"MIT"
] | 1 | 2021-06-01T23:49:23.000Z | 2021-06-01T23:49:23.000Z | modules/news.py | sayanmondal2098/Discord-bot | 9e8671525c1e96040a488f00e29612c75ae227f3 | [
"MIT"
] | 1 | 2020-06-18T14:11:42.000Z | 2020-06-18T14:11:42.000Z | import os
import requests
from random import randint
import discord
NEWS_API_TOKEN = 'a3b6770420a8435bb81c79c3d4f7ea71'
def top_headlines():
"""
Gets top headlines from NewsAPI
:return: <dict> discord.Embed message
"""
source = "google-news-in" # TODO: Add option to choose source
try:
... | 32.818182 | 112 | 0.625115 |
797e862fb0d87003ea2e759f5bfc9c6c7f79b689 | 2,618 | py | Python | server/website/script/fixture_generators/knob_identification/create_ranked_knobs.py | newopscn/ottertune | 1d57ad99019b669dfbfd099bae031037c66e822d | [
"Apache-2.0"
] | null | null | null | server/website/script/fixture_generators/knob_identification/create_ranked_knobs.py | newopscn/ottertune | 1d57ad99019b669dfbfd099bae031037c66e822d | [
"Apache-2.0"
] | null | null | null | server/website/script/fixture_generators/knob_identification/create_ranked_knobs.py | newopscn/ottertune | 1d57ad99019b669dfbfd099bae031037c66e822d | [
"Apache-2.0"
] | null | null | null | #
# OtterTune - create_ranked_knobs.py
#
# Copyright (c) 2017-18, Carnegie Mellon University Database Group
#
import logging
import os
import shutil
import json
import itertools
LOG = logging.getLogger(__name__)
DATADIR = '/dataset/oltpbench/first_paper_experiments/analysis/knob_identification'
DBMSS = {'postgres-9.... | 32.320988 | 91 | 0.574102 |
797e867fdce8899fdcc38072d69eff180eb76d01 | 4,272 | py | Python | benchmark/startQiskit_noisy3179.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy3179.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy3179.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=43
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... | 34.451613 | 140 | 0.652622 |
797e86970a75ff1ac96adc4f6886d4af1dad25a7 | 7,818 | py | Python | frappe-bench/env/lib/python2.7/site-packages/faker/providers/color/color.py | ibrahmm22/library-management | b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/faker/providers/color/color.py | ibrahmm22/library-management | b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/faker/providers/color/color.py | ibrahmm22/library-management | b88a2129a5a2e96ce1f945ec8ba99a0b63b8c506 | [
"MIT"
] | null | null | null | """
Code adapted from:
- https://github.com/davidmerfield/randomColor (CC0)
- https://github.com/kevinwuhoo/randomcolor-py (MIT License)
Additional reference from:
- https://en.wikipedia.org/wiki/HSL_and_HSV
"""
import colorsys
import math
import random
import sys
import six
COLOR_MAP = {
'monochrome': {
... | 27.921429 | 97 | 0.494628 |
797e876f761e5e20812ed18bb3d83ba0a2df71b0 | 12,303 | py | Python | qa/pull-tester/rpc-tests.py | rllola/dogecoin | 458b4a7ee93b0f8c94c7a5de0c110bfda2335d6c | [
"MIT"
] | 9 | 2015-03-02T11:30:29.000Z | 2018-08-26T14:38:39.000Z | qa/pull-tester/rpc-tests.py | rllola/dogecoin | 458b4a7ee93b0f8c94c7a5de0c110bfda2335d6c | [
"MIT"
] | null | null | null | qa/pull-tester/rpc-tests.py | rllola/dogecoin | 458b4a7ee93b0f8c94c7a5de0c110bfda2335d6c | [
"MIT"
] | 5 | 2015-03-02T10:29:36.000Z | 2020-12-30T13:38:05.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.
"""
Run Regression Test Suite
This module calls down into individual test cases via subprocess. It will
... | 32.633952 | 133 | 0.616516 |
797e87f44028ed90f49de88b119f5cd5b1485542 | 2,859 | py | Python | venv/lib/python2.7/site-packages/ansible/parsing/plugin_docs.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | venv/lib/python2.7/site-packages/ansible/parsing/plugin_docs.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | venv/lib/python2.7/site-packages/ansible/parsing/plugin_docs.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | # Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import ast
import yaml
from ansible.module_utils._text import to_tex... | 34.445783 | 113 | 0.560686 |
797e8837311c424d63606e5278ef1480ab6743c8 | 5,182 | py | Python | mutireqPost.py | MrLovelyCbb/LoraDataSender | 8e4939f710420888978bc46854e318bcbe0369a5 | [
"Apache-2.0"
] | 1 | 2021-01-12T09:50:43.000Z | 2021-01-12T09:50:43.000Z | mutireqPost.py | MrLovelyCbb/LoraDataSender | 8e4939f710420888978bc46854e318bcbe0369a5 | [
"Apache-2.0"
] | null | null | null | mutireqPost.py | MrLovelyCbb/LoraDataSender | 8e4939f710420888978bc46854e318bcbe0369a5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import requests
import time
import random
import json
import datetime
import string
import threading
# payload random mac
data_macs = [
"004a77012e130209",
"004a770124008ffa",
"004a77012400ce7b",
"004a77012400ce44",
"004a77012400dac5",
"004a77012400edba"
]
... | 26.849741 | 562 | 0.60768 |
797e88bbadd48d0717cdc477cedea564e2ba6bf2 | 905 | py | Python | m-learn/l5/task8.py | alekseiliachko/w-ml | e31603346bb32e6aa5c5127b3afa01f827ec520c | [
"MIT"
] | null | null | null | m-learn/l5/task8.py | alekseiliachko/w-ml | e31603346bb32e6aa5c5127b3afa01f827ec520c | [
"MIT"
] | null | null | null | m-learn/l5/task8.py | alekseiliachko/w-ml | e31603346bb32e6aa5c5127b3afa01f827ec520c | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from sklearn import preprocessing, svm
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from sklearn.svm import SVR
from sklearn.metrics import mean_squared_error
df = pd.read_csv(... | 32.321429 | 78 | 0.687293 |
797e89331c85819d354f16f7ddff97abb38b98d4 | 3,278 | py | Python | src/srcom/whois.py | Skycloudd/speedrunbot-plusplus | ced248f23464aa03f032f36e32f803997dfe4a5a | [
"Unlicense"
] | null | null | null | src/srcom/whois.py | Skycloudd/speedrunbot-plusplus | ced248f23464aa03f032f36e32f803997dfe4a5a | [
"Unlicense"
] | null | null | null | src/srcom/whois.py | Skycloudd/speedrunbot-plusplus | ced248f23464aa03f032f36e32f803997dfe4a5a | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3.9
"""
This program gets information for a given user (argv[1])
"""
from datetime import datetime
from getopt import GetoptError, getopt
from sys import argv, exit, stderr
from typing import Literal, Optional
from utils import *
USAGE = "Usage: `+whois src [USERNAME]`\n" + "Example: `+whois s... | 30.635514 | 87 | 0.478951 |
797e8a2125a21ea380428e9d01c86f8c9a2928fc | 4,949 | py | Python | util/test/tests/D3D11/D3D11_Overlay_Test.py | asimiklit/renderdoc | a9a2c3e3595cf1f0e2aacaeb9cffc2f9494ecc1f | [
"MIT"
] | null | null | null | util/test/tests/D3D11/D3D11_Overlay_Test.py | asimiklit/renderdoc | a9a2c3e3595cf1f0e2aacaeb9cffc2f9494ecc1f | [
"MIT"
] | null | null | null | util/test/tests/D3D11/D3D11_Overlay_Test.py | asimiklit/renderdoc | a9a2c3e3595cf1f0e2aacaeb9cffc2f9494ecc1f | [
"MIT"
] | null | null | null | import rdtest
import renderdoc as rd
class D3D11_Overlay_Test(rdtest.TestCase):
demos_test_name = 'D3D11_Overlay_Test'
def check_clearbeforedraw_depth(self, out, depthId):
# Test ClearBeforeDraw with a depth target
tex = rd.TextureDisplay()
tex.overlay = rd.DebugOverlay.ClearBeforeDra... | 39.277778 | 146 | 0.671853 |
797e8a3cc9aea13c00ed703357dbeeae7645df7a | 2,993 | py | Python | test/functional/wallet_keypool_topup.py | vipcore/VIP-2 | b5328c58076ee13fc44a58ff7229629546310bee | [
"MIT"
] | 83 | 2018-11-17T02:20:34.000Z | 2022-01-26T05:05:44.000Z | test/functional/wallet_keypool_topup.py | vipcore/VIP-2 | b5328c58076ee13fc44a58ff7229629546310bee | [
"MIT"
] | 22 | 2020-07-31T20:01:16.000Z | 2020-08-13T09:58:21.000Z | test/functional/wallet_keypool_topup.py | vipcore/VIP-2 | b5328c58076ee13fc44a58ff7229629546310bee | [
"MIT"
] | 36 | 2018-12-07T09:10:20.000Z | 2021-12-22T10:51:57.000Z | #!/usr/bin/env python3
# Copyright (c) 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 HD Wallet keypool restore function.
Two nodes. Node1 is under test. Node0 is providing transactions an... | 37.4125 | 164 | 0.680254 |
797e8aade1275ba203017306dab30c5e67c7dd07 | 397 | py | Python | Visualizer/asgi.py | KnownAsNob/SOStimate | 852ce9264013540af96bd95fdf6a072f35c7895c | [
"MIT"
] | null | null | null | Visualizer/asgi.py | KnownAsNob/SOStimate | 852ce9264013540af96bd95fdf6a072f35c7895c | [
"MIT"
] | null | null | null | Visualizer/asgi.py | KnownAsNob/SOStimate | 852ce9264013540af96bd95fdf6a072f35c7895c | [
"MIT"
] | null | null | null | """
ASGI config for Visualizer project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
797e8b06be429e49d5c98a113a14b6f0dba9c8db | 35,069 | py | Python | integration-tests/clipper_admin_tests.py | YogeshSomawar/clipper | 3e90147f708779fa87166cb9e521758c3a9a35fe | [
"Apache-2.0"
] | null | null | null | integration-tests/clipper_admin_tests.py | YogeshSomawar/clipper | 3e90147f708779fa87166cb9e521758c3a9a35fe | [
"Apache-2.0"
] | null | null | null | integration-tests/clipper_admin_tests.py | YogeshSomawar/clipper | 3e90147f708779fa87166cb9e521758c3a9a35fe | [
"Apache-2.0"
] | null | null | null | """
Executes a test suite consisting of two separate cases: short tests and long tests.
Before each case, an instance of Clipper is created. Tests
are then performed by invoking methods on this instance, often resulting
in the execution of docker commands.
"""
from __future__ import absolute_import, division, print_fu... | 38.622247 | 92 | 0.623114 |
797e8b2d1ef97fd2086bb518267f6eff1b709843 | 5,338 | py | Python | lab4/runner.py | fgulan/ai-fer | 1631c1a8c58a2b11db21ae40061b2e618a529fa6 | [
"MIT"
] | null | null | null | lab4/runner.py | fgulan/ai-fer | 1631c1a8c58a2b11db21ae40061b2e618a529fa6 | [
"MIT"
] | null | null | null | lab4/runner.py | fgulan/ai-fer | 1631c1a8c58a2b11db21ae40061b2e618a529fa6 | [
"MIT"
] | 3 | 2018-03-26T13:40:24.000Z | 2019-06-07T14:02:26.000Z | from networkLayers import *
from transferFunctions import *
from neuralNet import *
from geneticAlgorithm import *
import random
import plotter
import matplotlib.pyplot as plt
import numpy as np
import dataLoader
###
# Global constants, I/O paths
###
SIN_TRAIN = './data/sine_train.txt'
SIN_TEST = './data/sine_test... | 36.067568 | 91 | 0.64275 |
797e8bb51dfc9f8e275b8d6a82f5493d4fe02666 | 5,623 | py | Python | src/internet-analyzer/azext_internet_analyzer/custom.py | blackchoey/azure-cli-extensions | bbfd80ba164c4605dbdbe5e2b8dc26c3aa0f29e4 | [
"MIT"
] | null | null | null | src/internet-analyzer/azext_internet_analyzer/custom.py | blackchoey/azure-cli-extensions | bbfd80ba164c4605dbdbe5e2b8dc26c3aa0f29e4 | [
"MIT"
] | null | null | null | src/internet-analyzer/azext_internet_analyzer/custom.py | blackchoey/azure-cli-extensions | bbfd80ba164c4605dbdbe5e2b8dc26c3aa0f29e4 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 46.858333 | 136 | 0.53299 |
797e8de536fa24c0fbca6e7337e311a2daef8d13 | 15,918 | py | Python | wurb_rec/api_app.py | cloudedbats/cloudedbats_wurb_2020 | ddbf4352ee1eae53f34b3cb6b30bf6b2c2044cc8 | [
"MIT"
] | 13 | 2020-07-18T10:40:30.000Z | 2022-03-23T10:06:05.000Z | wurb_rec/api_app.py | cloudedbats/cloudedbats_wurb_2020 | ddbf4352ee1eae53f34b3cb6b30bf6b2c2044cc8 | [
"MIT"
] | 38 | 2020-06-13T07:36:55.000Z | 2022-03-31T19:21:20.000Z | wurb_rec/api_app.py | cloudedbats/cloudedbats_wurb_2020 | ddbf4352ee1eae53f34b3cb6b30bf6b2c2044cc8 | [
"MIT"
] | 1 | 2020-12-03T19:23:51.000Z | 2020-12-03T19:23:51.000Z | #!/usr/bin/python3
# -*- coding:utf-8 -*-
# Project: http://cloudedbats.org, https://github.com/cloudedbats
# Copyright (c) 2020-present Arnold Andreasson
# License: MIT License (see LICENSE.txt or http://opensource.org/licenses/mit).
import time
import datetime
import asyncio
import fastapi
from fastapi.staticfiles i... | 37.720379 | 88 | 0.6683 |
797e90c1e07ec7d724ceb9f5b941a2d10bca83a9 | 948 | py | Python | aea/test_tools/exceptions.py | ejfitzgerald/agents-aea | 6411fcba8af2cdf55a3005939ae8129df92e8c3e | [
"Apache-2.0"
] | 126 | 2019-09-07T09:32:44.000Z | 2022-03-29T14:28:41.000Z | aea/test_tools/exceptions.py | ejfitzgerald/agents-aea | 6411fcba8af2cdf55a3005939ae8129df92e8c3e | [
"Apache-2.0"
] | 1,814 | 2019-08-24T10:08:07.000Z | 2022-03-31T14:28:36.000Z | aea/test_tools/exceptions.py | ejfitzgerald/agents-aea | 6411fcba8af2cdf55a3005939ae8129df92e8c3e | [
"Apache-2.0"
] | 46 | 2019-09-03T22:13:58.000Z | 2022-03-22T01:25:16.000Z | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI 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 ... | 37.92 | 80 | 0.600211 |
797e921a87f90a80196c01dfd4ba74c672d23c42 | 4,888 | py | Python | docs/conf.py | abidibo/django-lineup | 4699360af487c397d8af70b0fcff557362b651f8 | [
"MIT"
] | 8 | 2020-12-15T11:38:33.000Z | 2021-06-15T21:03:50.000Z | docs/conf.py | abidibo/django-lineup | 4699360af487c397d8af70b0fcff557362b651f8 | [
"MIT"
] | 2 | 2021-04-25T14:27:23.000Z | 2021-04-27T10:26:09.000Z | docs/conf.py | abidibo/django-lineup | 4699360af487c397d8af70b0fcff557362b651f8 | [
"MIT"
] | 1 | 2021-04-25T13:48:39.000Z | 2021-04-25T13:48:39.000Z | # -*- coding: utf-8 -*-
#
# django-baton documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 15 12:25:38 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... | 31.133758 | 79 | 0.685761 |
797e924198e2c7ed333cc238a9ad38f270ecc8fa | 26,060 | py | Python | protoroute/migrations/0001_initial.py | openactive/routes-api | b2ad825a57dea280870c10977d45f738e9e6f02a | [
"MIT"
] | null | null | null | protoroute/migrations/0001_initial.py | openactive/routes-api | b2ad825a57dea280870c10977d45f738e9e6f02a | [
"MIT"
] | null | null | null | protoroute/migrations/0001_initial.py | openactive/routes-api | b2ad825a57dea280870c10977d45f738e9e6f02a | [
"MIT"
] | null | null | null | # Generated by Django 3.1 on 2020-10-08 12:17
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Activity',
fields=[
... | 65.15 | 219 | 0.625633 |
797e95e9c65836a986425408c6e77f1b699a1461 | 9,861 | py | Python | holoviews/operation/stats.py | TheoMathurin/holoviews | 0defcef994d6dd6d2054f75a0e332d02d121f8b0 | [
"BSD-3-Clause"
] | 864 | 2019-11-13T08:18:27.000Z | 2022-03-31T13:36:13.000Z | holoviews/operation/stats.py | chrinide/holoviews | e1234a60ae0809ac561c204b1998dff0452b2bf0 | [
"BSD-3-Clause"
] | 1,117 | 2019-11-12T16:15:59.000Z | 2022-03-30T22:57:59.000Z | holoviews/operation/stats.py | chrinide/holoviews | e1234a60ae0809ac561c204b1998dff0452b2bf0 | [
"BSD-3-Clause"
] | 180 | 2019-11-19T16:44:44.000Z | 2022-03-28T22:49:18.000Z | import param
import numpy as np
from ..core import Dimension, Dataset, NdOverlay
from ..core.operation import Operation
from ..core.util import cartesian_product, isfinite
from ..element import (Curve, Area, Image, Distribution, Bivariate,
Contours, Polygons)
from .element import contours
def... | 42.141026 | 103 | 0.611601 |
797e974edf9fcb28242ca9e2a72744affefb9655 | 465 | py | Python | a04e07-percorra-vetor-maior-posicao.py | Bhclira/NExT | 192353a139089d0fed003bfb7e2523aa02a0a737 | [
"MIT"
] | null | null | null | a04e07-percorra-vetor-maior-posicao.py | Bhclira/NExT | 192353a139089d0fed003bfb7e2523aa02a0a737 | [
"MIT"
] | null | null | null | a04e07-percorra-vetor-maior-posicao.py | Bhclira/NExT | 192353a139089d0fed003bfb7e2523aa02a0a737 | [
"MIT"
] | null | null | null | # Faça um programa que recebe do usuário 10 valores de números inteiros, armazena em um vetor e apos percorre-lo exibe qual é o maior valor e a sua posição.
n = 10
valores = []
print('\n')
for i in range (1, 11):
valor = int(input(f'Valor {i}: '))
valores.append(valor)
print('-' * 45)
print(valores)
print('... | 27.352941 | 156 | 0.668817 |
797e975e205628cf3bf53dcd06a1fbc9fe2ce43b | 49,637 | py | Python | tests/func/test_repro.py | dickmao/dvc | 6958901d98c316340b46be08e959593f40129b8a | [
"Apache-2.0"
] | 3 | 2020-01-31T05:33:14.000Z | 2021-05-20T08:19:25.000Z | tests/func/test_repro.py | dmpetrov/dvc | a42d4f2c90ae604d6cb98bfc37c1fef9840b5ff9 | [
"Apache-2.0"
] | null | null | null | tests/func/test_repro.py | dmpetrov/dvc | a42d4f2c90ae604d6cb98bfc37c1fef9840b5ff9 | [
"Apache-2.0"
] | null | null | null | import filecmp
import getpass
import os
import posixpath
import re
import shutil
import uuid
from pathlib import Path
from subprocess import PIPE
from subprocess import Popen
from urllib.parse import urljoin
from unittest import SkipTest
import boto3
import paramiko
import pytest
from flaky.flaky_decorator import flak... | 30.101273 | 79 | 0.571892 |
797e979963ae24d905f3db45ba0417ffa73dcf8f | 10,449 | py | Python | pandas/core/config_init.py | ssalonen/pandas | 1929563fdb5358a41420d103a388aa2bd494d543 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2015-11-25T19:12:03.000Z | 2015-11-25T19:12:03.000Z | pandas/core/config_init.py | pierre-haessig/pandas | f9e0b7df8ca8a92133d3cea0a26181140f991e2d | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/config_init.py | pierre-haessig/pandas | f9e0b7df8ca8a92133d3cea0a26181140f991e2d | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | import pandas.core.config as cf
from pandas.core.config import (is_int, is_bool, is_text, is_float,
is_instance_factory,is_one_of_factory,get_default_val)
from pandas.core.format import detect_console_encoding
"""
This module is imported from the pandas package __init__.py file
in order... | 34.485149 | 108 | 0.69021 |
797e97d393fbb5a0af017e4f35fcd3cc8d73685b | 17,995 | py | Python | src/sage/schemes/toric/weierstrass_covering.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | 2 | 2015-08-11T05:05:47.000Z | 2019-05-15T17:27:25.000Z | src/sage/schemes/toric/weierstrass_covering.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/toric/weierstrass_covering.py | switzel/sage | 7eb8510dacf61b691664cd8f1d2e75e5d473e5a0 | [
"BSL-1.0"
] | 1 | 2020-07-24T11:56:55.000Z | 2020-07-24T11:56:55.000Z | r"""
Map to the Weierstrass form of a toric elliptic curve.
There are 16 reflexive polygons in 2-d. Each defines a toric Fano
variety, which (since it is 2-d) has a unique crepant resolution to a smooth
toric surface. An anticanonical hypersurface defines a genus one curve
`C` in this ambient space, with Jacobian elli... | 39.290393 | 90 | 0.575326 |
797e983e21aa787cfb577f3fe3a572da605bf573 | 40,677 | py | Python | lib/mc_bin_client.py | pavithra-mahamani/TAF | ff854adcc6ca3e50d9dc64e7756ca690251128d3 | [
"Apache-2.0"
] | null | null | null | lib/mc_bin_client.py | pavithra-mahamani/TAF | ff854adcc6ca3e50d9dc64e7756ca690251128d3 | [
"Apache-2.0"
] | null | null | null | lib/mc_bin_client.py | pavithra-mahamani/TAF | ff854adcc6ca3e50d9dc64e7756ca690251128d3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Binary memcached test client.
Copyright (c) 2007 Dustin Sallings <dustin@spy.net>
"""
import array
import exceptions
import hmac
import random
import select
import socket
import struct
import zlib
from memcacheConstants import REQ_MAGIC_BYTE, RES_MAGIC_BYTE
from memcacheConstants import RE... | 42.727941 | 138 | 0.6248 |
797e98f7f939a9b7674f49ed40ec591d92a57536 | 3,813 | py | Python | PINNFramework/models/Finger_Net.py | varun1423/NeuralSolvers | 0036319ec3e7cd570a029aa5e154d0bc995ae9ce | [
"MIT"
] | null | null | null | PINNFramework/models/Finger_Net.py | varun1423/NeuralSolvers | 0036319ec3e7cd570a029aa5e154d0bc995ae9ce | [
"MIT"
] | null | null | null | PINNFramework/models/Finger_Net.py | varun1423/NeuralSolvers | 0036319ec3e7cd570a029aa5e154d0bc995ae9ce | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class FingerNet(nn.Module):
def __init__(self, lb, ub, numFeatures = 500, numLayers = 8, activation = torch.relu, normalize=True, scaling=1.):
torch.manual_seed(1234)
super(FingerNet, self).__init__()
self.numFeatures = numFeatures
self.numLayers ... | 33.156522 | 118 | 0.56963 |
797e9933924522e131c335a9b8633f211c0ccf6d | 729 | py | Python | openstack_dashboard/dashboards/mydashboard/transcoder/urls.py | CplusShen/aurora-horizon | 8df16b3b87097d5a19bae3752d4b341ac64bda75 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/mydashboard/transcoder/urls.py | CplusShen/aurora-horizon | 8df16b3b87097d5a19bae3752d4b341ac64bda75 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/mydashboard/transcoder/urls.py | CplusShen/aurora-horizon | 8df16b3b87097d5a19bae3752d4b341ac64bda75 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 34.714286 | 75 | 0.758573 |
797e99d522535dce297387073c1a52e6ca054637 | 69 | py | Python | TP/TP1/Code/Python/3.py | sumaxime/LIFAP1 | b5da0395de9775cd8b319b56af7a6d0257d542db | [
"MIT"
] | 1 | 2019-06-19T08:40:24.000Z | 2019-06-19T08:40:24.000Z | TP/TP1/Code/Python/3.py | sumaxime/LIFAP1 | b5da0395de9775cd8b319b56af7a6d0257d542db | [
"MIT"
] | 13 | 2016-11-15T16:44:23.000Z | 2016-12-16T09:42:48.000Z | TP/TP1/Code/Python/3.py | sumaxime/LIFAP1 | b5da0395de9775cd8b319b56af7a6d0257d542db | [
"MIT"
] | 1 | 2019-12-06T11:48:09.000Z | 2019-12-06T11:48:09.000Z | #!/usr/bin/python
# Premier programme en C++
print('Hello, World !')
| 17.25 | 26 | 0.666667 |
797e9c09669385bab0179544b12a5cae79e5eb65 | 63,591 | py | Python | tests/test_views.py | mulaievaRH/freshmaker | 809b435d7cab1907eb74ecd898693835a92db9d8 | [
"MIT"
] | 5 | 2020-06-17T11:29:16.000Z | 2022-03-24T07:20:16.000Z | tests/test_views.py | mulaievaRH/freshmaker | 809b435d7cab1907eb74ecd898693835a92db9d8 | [
"MIT"
] | 96 | 2020-06-29T15:01:23.000Z | 2022-03-30T08:07:06.000Z | tests/test_views.py | mulaievaRH/freshmaker | 809b435d7cab1907eb74ecd898693835a92db9d8 | [
"MIT"
] | 20 | 2020-06-16T01:30:08.000Z | 2022-02-19T15:34:55.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2017 Red Hat, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modi... | 43.795455 | 138 | 0.594534 |
797e9c5b0e57c83391cb9731b0677779ca826326 | 1,759 | py | Python | batch_censor.py | bharathcs/batch-censor | e3a1199456506c000ae8f0a83916355e0457d30f | [
"NASA-1.3"
] | null | null | null | batch_censor.py | bharathcs/batch-censor | e3a1199456506c000ae8f0a83916355e0457d30f | [
"NASA-1.3"
] | null | null | null | batch_censor.py | bharathcs/batch-censor | e3a1199456506c000ae8f0a83916355e0457d30f | [
"NASA-1.3"
] | null | null | null | from PIL import Image
from os import listdir, chdir, getcwd
from os.path import isfile, join
#### SETTINGS HERE ######################################################################
path_img_folder = '/Users/bhcs/code/batch_censor/sample_pics'
# replace the path above with the path to your folder
# ensure that only i... | 38.23913 | 89 | 0.627629 |
797e9c85720470ade1cfc282934a86fad755e050 | 14,060 | py | Python | runway/blueprints/k8s/k8s_workers.py | blade2005/runway | 6e0d543512325a92265c140f386c163f6be410b4 | [
"Apache-2.0"
] | null | null | null | runway/blueprints/k8s/k8s_workers.py | blade2005/runway | 6e0d543512325a92265c140f386c163f6be410b4 | [
"Apache-2.0"
] | 153 | 2021-10-13T13:36:58.000Z | 2022-03-09T13:21:03.000Z | runway/blueprints/k8s/k8s_workers.py | blade2005/runway | 6e0d543512325a92265c140f386c163f6be410b4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Module with k8s nodegroup."""
import json
import os
from typing import Any
import botocore
from troposphere import Base64, Equals, If, Not, NoValue, Output, Sub, autoscaling, ec2
from troposphere.policies import AutoScalingRollingUpdate, UpdatePolicy
from runway.cfngin.blueprints.base import ... | 38.415301 | 93 | 0.481223 |
797e9c8cb69710316eeead3488f5adaade8c4db0 | 74,975 | py | Python | Bio/Blast/NCBIStandalone.py | rht/biopython | 3a44496d7bd79446266a4951b7d1f64569e4a96d | [
"BSD-3-Clause"
] | 3 | 2021-08-17T15:28:41.000Z | 2022-02-12T06:43:22.000Z | Bio/Blast/NCBIStandalone.py | rht/biopython | 3a44496d7bd79446266a4951b7d1f64569e4a96d | [
"BSD-3-Clause"
] | 32 | 2016-11-21T07:38:21.000Z | 2017-08-16T13:00:03.000Z | Bio/Blast/NCBIStandalone.py | rht/biopython | 3a44496d7bd79446266a4951b7d1f64569e4a96d | [
"BSD-3-Clause"
] | 8 | 2016-11-24T18:57:35.000Z | 2022-01-16T08:15:25.000Z | # Copyright 1999-2000 by Jeffrey Chang. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Patches by Mike Poidinger to support multiple databases.
# Updated by Peter Cock in 2007... | 40.76944 | 107 | 0.587996 |
797e9d10b31e0154735695f19b493f7a436304d5 | 1,478 | py | Python | test/geweke_test.py | SebastianBruijns/pgmult | b727e31f58474c53d6cbf3abf6823db3b2bb4797 | [
"MIT"
] | 58 | 2015-06-22T15:07:17.000Z | 2022-03-08T20:27:22.000Z | test/geweke_test.py | afcarl/pgmult | 60631edda247486532b3269d0954b91bad7b8159 | [
"MIT"
] | 13 | 2015-06-22T15:00:53.000Z | 2017-10-05T23:58:41.000Z | test/geweke_test.py | afcarl/pgmult | 60631edda247486532b3269d0954b91bad7b8159 | [
"MIT"
] | 25 | 2015-07-07T16:31:42.000Z | 2021-12-28T11:25:34.000Z | """
Simple Geweke test for the PG-augmented Multinomial distribution
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm, probplot
from pgmult.distributions import PGMultinomial
def geweke_test(K, N_iter=10000):
"""
"""
# Create a multinomial distribution
mu = np.zeros... | 26.872727 | 74 | 0.622463 |
797e9d33e45d7fe3fa1385c1bfc484ffb5362d62 | 608 | py | Python | opencensus/trace/exporters/gen/opencensus/trace/v1/__init__.py | geobeau/opencensus-python | 84e8f9a2dc8604584e8bb79444c3a76c1ee6e095 | [
"Apache-2.0"
] | null | null | null | opencensus/trace/exporters/gen/opencensus/trace/v1/__init__.py | geobeau/opencensus-python | 84e8f9a2dc8604584e8bb79444c3a76c1ee6e095 | [
"Apache-2.0"
] | 1 | 2021-06-10T23:59:36.000Z | 2021-06-10T23:59:36.000Z | opencensus/trace/exporters/gen/opencensus/trace/v1/__init__.py | geobeau/opencensus-python | 84e8f9a2dc8604584e8bb79444c3a76c1ee6e095 | [
"Apache-2.0"
] | 1 | 2019-09-01T06:00:13.000Z | 2019-09-01T06:00:13.000Z | # Copyright 2018, OpenCensus Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 38 | 74 | 0.759868 |
797e9e1d081298525479f2da090862bc2d27df7b | 522 | py | Python | tasks/MTAT.03.100/2013/Midterm_2/KT3_R8_3_tabeli_kuvamine_solution.py | Chrisk12/python-grader | 9bfe9beeffdeb8e50be1a9e2ae3b4fbf0728aa52 | [
"MIT"
] | 9 | 2015-06-06T06:15:12.000Z | 2020-05-27T21:37:16.000Z | tasks/MTAT.03.100/2013/Midterm_2/KT3_R8_3_tabeli_kuvamine_solution.py | Chrisk12/python-grader | 9bfe9beeffdeb8e50be1a9e2ae3b4fbf0728aa52 | [
"MIT"
] | null | null | null | tasks/MTAT.03.100/2013/Midterm_2/KT3_R8_3_tabeli_kuvamine_solution.py | Chrisk12/python-grader | 9bfe9beeffdeb8e50be1a9e2ae3b4fbf0728aa52 | [
"MIT"
] | 3 | 2018-11-17T22:51:45.000Z | 2021-01-22T14:07:48.000Z | f = open("tulemused.csv", encoding="utf-8")
päis = f.readline().strip('\n').split(",")
kriips = ""
for veerg in päis:
kriips += "-" * (len(veerg) + 3)
kriips += '-'
print(kriips)
for veerg in päis:
print("| " + veerg + " ", end="")
print("|")
print(kriips)
for rida in f:
veerud = rid... | 18 | 62 | 0.494253 |
797ea012fe258cff7f4477b48030c29907755488 | 463 | py | Python | zazi/core/storage_backends.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | null | null | null | zazi/core/storage_backends.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | 1 | 2021-08-20T06:41:57.000Z | 2021-08-20T06:41:57.000Z | zazi/core/storage_backends.py | felixcheruiyot/zazi-core-banking | 0a2dac42235adcac3cf8c114961e407f54844223 | [
"Apache-2.0"
] | null | null | null | from django.conf import settings
from storages.backends.s3boto3 import S3Boto3Storage
class StaticStorage(S3Boto3Storage):
location = settings.AWS_STATIC_LOCATION
class DefaultMediaStorage(S3Boto3Storage):
location = settings.AWS_PRIVATE_MEDIA_LOCATION
default_acl = 'private'
file_overwrite = False
... | 30.866667 | 52 | 0.807775 |
797ea1958ac33226c7f19a9f0030199ce24e53a1 | 1,397 | py | Python | huoutil/seq.py | 2212168851/huoutil | ac00ca4eb7ba23f2fddbce7ce3a8a2c34ce61188 | [
"MIT"
] | null | null | null | huoutil/seq.py | 2212168851/huoutil | ac00ca4eb7ba23f2fddbce7ce3a8a2c34ce61188 | [
"MIT"
] | 2 | 2019-09-02T09:06:28.000Z | 2019-12-26T12:52:46.000Z | huoutil/seq.py | 2212168851/huoutil | ac00ca4eb7ba23f2fddbce7ce3a8a2c34ce61188 | [
"MIT"
] | 1 | 2019-08-11T09:58:58.000Z | 2019-08-11T09:58:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
def longest_range(index_list):
"""
select longest index range
eg. [1, 0, 1, 1, 1] ==> (2, 5)
@param index_list: list, element is 0 or 1
@return: a tuple (a, b). a is the range begin, and b is the range off end.
"""
range_li... | 32.488372 | 82 | 0.560487 |
797ea31bae3e2ba2f28ee5a8ce71df01d0524cb4 | 10,886 | py | Python | data/word2vec.py | yuagnun/HauntedTweet | 04b31ac23cb52e68aa60f7d22e5ae0da96c35646 | [
"MIT"
] | 2 | 2020-01-28T07:45:40.000Z | 2020-02-22T11:41:02.000Z | data/word2vec.py | Sidus-smg/HauntedTweet | 04b31ac23cb52e68aa60f7d22e5ae0da96c35646 | [
"MIT"
] | 4 | 2019-09-29T06:59:58.000Z | 2019-11-26T15:01:39.000Z | data/word2vec.py | yuagnun/HauntedTweet | 04b31ac23cb52e68aa60f7d22e5ae0da96c35646 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''Referred to TensorFlow word2vec tutorial
(https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/word2vec/word2vec_basic.py),
which follows Apache License, Ver. 2.0.'''
import tensorflow as tf
import numpy as np
import math
import os.path
from six.moves import xrang... | 43.718876 | 136 | 0.56908 |
797ea3e041324ca8cd6b4d7872906708c625164f | 39,929 | py | Python | mindspore/python/mindspore/dataset/engine/datasets_user_defined.py | zhz44/mindspore | 6044d34074c8505dd4b02c0a05419cbc32a43f86 | [
"Apache-2.0"
] | null | null | null | mindspore/python/mindspore/dataset/engine/datasets_user_defined.py | zhz44/mindspore | 6044d34074c8505dd4b02c0a05419cbc32a43f86 | [
"Apache-2.0"
] | null | null | null | mindspore/python/mindspore/dataset/engine/datasets_user_defined.py | zhz44/mindspore | 6044d34074c8505dd4b02c0a05419cbc32a43f86 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 42.980624 | 120 | 0.619825 |
797ea4209170fd935f96f18cf6eab67bffe81eb5 | 634 | py | Python | scripts/db/create_tables.py | hsadler/con-science-twitter-bot | e502636393ef9d9dee771edf98e59c0bdb4981a8 | [
"MIT"
] | null | null | null | scripts/db/create_tables.py | hsadler/con-science-twitter-bot | e502636393ef9d9dee771edf98e59c0bdb4981a8 | [
"MIT"
] | null | null | null | scripts/db/create_tables.py | hsadler/con-science-twitter-bot | e502636393ef9d9dee771edf98e59c0bdb4981a8 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
import MySQLdb as mdb
con = mdb.connect(host='localhost', user='root', passwd='', db='con_science_bot')
cur = con.cursor()
with con:
# cur.execute('DROP TABLE quotes;')
# create quotes table
cur.execute("""
CREATE TABLE IF NOT EXISTS quotes(
... | 21.862069 | 81 | 0.578864 |
797ea436950e15ddc5c1653a9f6270cfd5cde48a | 38,322 | py | Python | parlai/core/torch_agent.py | supercatnguyen/rank_convai2 | 53f4880c152d9ba7e93883ef6941ba25024fd4ec | [
"BSD-3-Clause"
] | null | null | null | parlai/core/torch_agent.py | supercatnguyen/rank_convai2 | 53f4880c152d9ba7e93883ef6941ba25024fd4ec | [
"BSD-3-Clause"
] | null | null | null | parlai/core/torch_agent.py | supercatnguyen/rank_convai2 | 53f4880c152d9ba7e93883ef6941ba25024fd4ec | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from parlai.core.agents im... | 44.251732 | 159 | 0.592062 |
797ea4647a5149b4910f3e25ac37bb1ebd70b727 | 387 | py | Python | geokey_dataimports/migrations/0002_auto_20160329_0957.py | frasanz/geokey-dataimports | b736bf916415818ac3168ab1a68e034d36e3e4b8 | [
"MIT"
] | 1 | 2016-03-15T17:15:02.000Z | 2016-03-15T17:15:02.000Z | geokey_dataimports/migrations/0002_auto_20160329_0957.py | frasanz/geokey-dataimports | b736bf916415818ac3168ab1a68e034d36e3e4b8 | [
"MIT"
] | 5 | 2016-03-18T12:53:51.000Z | 2018-10-25T10:56:06.000Z | geokey_dataimports/migrations/0002_auto_20160329_0957.py | frasanz/geokey-dataimports | b736bf916415818ac3168ab1a68e034d36e3e4b8 | [
"MIT"
] | 1 | 2022-02-22T20:26:41.000Z | 2022-02-22T20:26:41.000Z | # -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('geokey_dataimports', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='datafield',
name='key',
field=models.... | 19.35 | 74 | 0.581395 |
797ea541b46108224b378f8d2fddfed7a2de7611 | 1,346 | py | Python | isplogger/logger.py | tjkessler/ISPLogger | 46e2f57ebc456322ef0bf57f08f2313ea9f04d18 | [
"MIT"
] | null | null | null | isplogger/logger.py | tjkessler/ISPLogger | 46e2f57ebc456322ef0bf57f08f2313ea9f04d18 | [
"MIT"
] | null | null | null | isplogger/logger.py | tjkessler/ISPLogger | 46e2f57ebc456322ef0bf57f08f2313ea9f04d18 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# isplogger/logger.py
# v.0.2.1
# Developed in 2019 by Travis Kessler <travis.j.kessler@gmail.com>
#
# Console/text file logging
#
# stdlib imports
import logging
import datetime
import os
_MSG_FORMAT = '%(asctime)s [%(host_port)s] [%(levelname)s] %(message)s'
FILE_FOR... | 28.041667 | 75 | 0.684993 |
797ea5a5d33ee1cc7148245f27103520ff8957d3 | 14,597 | py | Python | sympy/concrete/expr_with_limits.py | nishithshah2211/sympy | edc620ca662f7163637c7fb5823f22523b7f2fe9 | [
"BSD-3-Clause"
] | null | null | null | sympy/concrete/expr_with_limits.py | nishithshah2211/sympy | edc620ca662f7163637c7fb5823f22523b7f2fe9 | [
"BSD-3-Clause"
] | null | null | null | sympy/concrete/expr_with_limits.py | nishithshah2211/sympy | edc620ca662f7163637c7fb5823f22523b7f2fe9 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division
from sympy.core.basic import C
from sympy.core.expr import Expr
from sympy.sets.sets import Interval
from sympy.core.singleton import S
from sympy.core.symbol import Symbol
from sympy.core.sympify import sympify
from sympy.core.compatibility import is_sequence, range
fro... | 35.173494 | 90 | 0.55436 |
797ea61cefd7d2be620ac59a50722d9a332c0903 | 706 | py | Python | schematizer/schemas/base.py | eb08a167/schematizer | 9acfc6de7446902a077c83794996e99c96b89c1b | [
"MIT"
] | null | null | null | schematizer/schemas/base.py | eb08a167/schematizer | 9acfc6de7446902a077c83794996e99c96b89c1b | [
"MIT"
] | null | null | null | schematizer/schemas/base.py | eb08a167/schematizer | 9acfc6de7446902a077c83794996e99c96b89c1b | [
"MIT"
] | null | null | null | from schematizer.exceptions import SimpleValidationError
class BaseSchema:
def to_native(self, obj):
raise NotImplementedError
def to_primitive(self, obj):
raise NotImplementedError
class BaseCoercibleSchema(BaseSchema):
def coerce_primitive(self, obj):
raise NotImplementedError... | 26.148148 | 88 | 0.692635 |
797ea63b34ade8ebb3b343de92b392659cd07fce | 12,679 | py | Python | doc/conf.py | jyeatman/nilearn | fdc64f2c5191992bcba41f092514efbf16caebc7 | [
"BSD-2-Clause"
] | null | null | null | doc/conf.py | jyeatman/nilearn | fdc64f2c5191992bcba41f092514efbf16caebc7 | [
"BSD-2-Clause"
] | null | null | null | doc/conf.py | jyeatman/nilearn | fdc64f2c5191992bcba41f092514efbf16caebc7 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# nilearn documentation build configuration file, created by
# sphinx-quickstart on Fri Jan 8 09:13:42 2010.
#
# This file is execfile()d with the current directory set to its containing
# dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | 33.191099 | 83 | 0.687909 |
797ea68aab80b05f3e5b1438fab303b244c98609 | 71,735 | py | Python | src/pyrad_proc/pyrad/proc/process_aux.py | jfigui/pyrad | 7811d593bb09a7f8a621c0e8ae3f32c2b85a0254 | [
"BSD-3-Clause"
] | null | null | null | src/pyrad_proc/pyrad/proc/process_aux.py | jfigui/pyrad | 7811d593bb09a7f8a621c0e8ae3f32c2b85a0254 | [
"BSD-3-Clause"
] | null | null | null | src/pyrad_proc/pyrad/proc/process_aux.py | jfigui/pyrad | 7811d593bb09a7f8a621c0e8ae3f32c2b85a0254 | [
"BSD-3-Clause"
] | null | null | null | """
pyrad.proc.process_aux
======================
Auxiliary functions. Functions to determine the process type, pass raw data to
the product generation functions, save radar data and extract data at
determined points or regions of interest.
.. autosummary::
:toctree: generated/
get_process_func
process_r... | 38.965236 | 79 | 0.610762 |
797ea6bff5e0c958dd25bdc36375110311fa13f1 | 4,907 | py | Python | configs/ct/mask_rcnn_x101_32x4d_sbn_fpn_1x.py | zhengsx/GCNet | 38b0b8ebdf976a72f24a48fc7c31bdcc84c3b941 | [
"Apache-2.0"
] | 1 | 2019-05-08T04:19:24.000Z | 2019-05-08T04:19:24.000Z | configs/ct/mask_rcnn_x101_32x4d_sbn_fpn_1x.py | zhengsx/GCNet | 38b0b8ebdf976a72f24a48fc7c31bdcc84c3b941 | [
"Apache-2.0"
] | null | null | null | configs/ct/mask_rcnn_x101_32x4d_sbn_fpn_1x.py | zhengsx/GCNet | 38b0b8ebdf976a72f24a48fc7c31bdcc84c3b941 | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='MaskRCNN',
pretrained='open-mmlab://resnext101_32x4d',
backbone=dict(
type='ResNeXt',
depth=101,
groups=32,
base_width=4,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch',
nor... | 28.201149 | 77 | 0.581618 |
797ea760d0904f7d0c70824b96ea357ac34b6224 | 127 | py | Python | No5.py | crotsu/Study_Python_forBegginer | 036dc0a973208c21282a8c49c1ecdc6d870d89d9 | [
"MIT"
] | 10 | 2015-09-01T18:47:28.000Z | 2019-01-31T11:01:15.000Z | No5.py | crotsu/Study_Python_forBegginer | 036dc0a973208c21282a8c49c1ecdc6d870d89d9 | [
"MIT"
] | null | null | null | No5.py | crotsu/Study_Python_forBegginer | 036dc0a973208c21282a8c49c1ecdc6d870d89d9 | [
"MIT"
] | null | null | null | # 問題5
# ランダムに0から9までの値を10個出力しなさい.
import random
val = []
for i in range(10):
val.append(random.randint(0, 9))
print(val)
| 11.545455 | 36 | 0.677165 |
797ea83bd9d63d8ee3047952b23456cf6a9d7bee | 1,287 | py | Python | section_9/4_rss/filter.py | hgohel/Python-for-Everyday-Life | 957963e67dca8c2d20a86fc7e66e818c80d013aa | [
"MIT"
] | 43 | 2018-04-09T11:59:11.000Z | 2022-01-29T14:27:37.000Z | section_9/4_rss/filter.py | hgohel/Python-for-Everyday-Life | 957963e67dca8c2d20a86fc7e66e818c80d013aa | [
"MIT"
] | 12 | 2019-11-03T16:50:39.000Z | 2021-09-07T23:52:37.000Z | section_9/4_rss/filter.py | hgohel/Python-for-Everyday-Life | 957963e67dca8c2d20a86fc7e66e818c80d013aa | [
"MIT"
] | 45 | 2018-05-10T21:40:46.000Z | 2022-03-01T05:50:07.000Z | # -*- coding: utf-8 -*-
# !/usr/bin/env python3
import feedparser
def filter_if_title_contains(feed, query, case_insensitive=True):
if case_insensitive:
check = lambda entry: query.lower() in entry.title.lower()
else:
check = lambda entry: query in entry.title
return filter(check, feed.en... | 33.868421 | 86 | 0.653458 |
797ea857a1db19ca9c72ecdfe160b11a84a4eed5 | 5,184 | py | Python | venv/lib/python3.8/site-packages/ete3/parser/text_arraytable.py | bjru/dendogram-traversal | 410bea2dd852caef5fd9d4dde9306203a2d29220 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/ete3/parser/text_arraytable.py | bjru/dendogram-traversal | 410bea2dd852caef5fd9d4dde9306203a2d29220 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/ete3/parser/text_arraytable.py | bjru/dendogram-traversal | 410bea2dd852caef5fd9d4dde9306203a2d29220 | [
"MIT"
] | null | null | null | # #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://etetoolkit.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the... | 32.810127 | 93 | 0.596258 |
797eaa7154ccb12344631267a14695277766339f | 6,954 | py | Python | backend/ideapros_llc_sayann_32126/settings.py | crowdbotics-apps/ideapros-llc-sayann-32126 | 908f0ad1400e6f58efd75a7f3c47dafc6b985a6a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/ideapros_llc_sayann_32126/settings.py | crowdbotics-apps/ideapros-llc-sayann-32126 | 908f0ad1400e6f58efd75a7f3c47dafc6b985a6a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/ideapros_llc_sayann_32126/settings.py | crowdbotics-apps/ideapros-llc-sayann-32126 | 908f0ad1400e6f58efd75a7f3c47dafc6b985a6a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for ideapros_llc_sayann_32126 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/... | 29.717949 | 112 | 0.731953 |
797eaafc603666576f3bd226cfa13df20db9332c | 36,621 | py | Python | MuyGPyS/gp/muygps.py | igoumiri/MuyGPyS | f60e67108a94d556ab330645bc792acbb84a8a3a | [
"MIT-0",
"MIT"
] | null | null | null | MuyGPyS/gp/muygps.py | igoumiri/MuyGPyS | f60e67108a94d556ab330645bc792acbb84a8a3a | [
"MIT-0",
"MIT"
] | null | null | null | MuyGPyS/gp/muygps.py | igoumiri/MuyGPyS | f60e67108a94d556ab330645bc792acbb84a8a3a | [
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2021 Lawrence Livermore National Security, LLC and other MuyGPyS
# Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: MIT
"""MuyGPs implementation
"""
import numpy as np
from typing import Dict, Generator, Optional, Tuple, Union
from MuyGPyS.gp.distance import... | 41.379661 | 81 | 0.597581 |
797eabaa49c1b1f706e0793ecb5fec6cdb8cc8b6 | 149 | py | Python | backend/flask/app/api/database/models/__init__.py | tvdhout/twitchess | 398e6390a456d432893a7e1e1c880c92cdcadf7c | [
"MIT"
] | 1 | 2022-01-08T05:55:37.000Z | 2022-01-08T05:55:37.000Z | backend/flask/app/api/database/models/__init__.py | tvdhout/twitchess | 398e6390a456d432893a7e1e1c880c92cdcadf7c | [
"MIT"
] | 1 | 2022-01-08T05:53:49.000Z | 2022-01-28T15:03:33.000Z | backend/flask/app/api/database/models/__init__.py | tvdhout/twitchess | 398e6390a456d432893a7e1e1c880c92cdcadf7c | [
"MIT"
] | null | null | null | from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
__all__ = ['RandomSubscriberChallenge', 'Authentication', 'Base']
| 29.8 | 65 | 0.805369 |
797eac83a9f45b034500793a1ba0ecd09464261b | 3,920 | py | Python | longchecker/allennlp_feedforward.py | dwadden/longchecker | 9efdc2f13130146dfea187c76037e69008ad62d5 | [
"MIT"
] | 7 | 2021-12-07T02:26:03.000Z | 2022-03-31T01:10:41.000Z | longchecker/allennlp_feedforward.py | dwadden/longchecker | 9efdc2f13130146dfea187c76037e69008ad62d5 | [
"MIT"
] | 1 | 2022-02-02T12:14:11.000Z | 2022-02-27T11:19:13.000Z | longchecker/allennlp_feedforward.py | dwadden/longchecker | 9efdc2f13130146dfea187c76037e69008ad62d5 | [
"MIT"
] | null | null | null | from typing import List, Union
import torch
class ConfigurationError(Exception):
pass
class FeedForward(torch.nn.Module):
"""
This `Module` is a feed-forward neural network, just a sequence of `Linear` layers with
activation functions in between.
# Parameters
input_dim : `int`, required
... | 38.431373 | 98 | 0.610969 |
797eaeffbb38273a021610298410a1d5500a0dbe | 2,301 | py | Python | games/game_gta-vice-city-de.py | clayne/modorganizer-basic_games | 16939ac6c737c5b136801f869f9b52c6e2feb515 | [
"MIT"
] | null | null | null | games/game_gta-vice-city-de.py | clayne/modorganizer-basic_games | 16939ac6c737c5b136801f869f9b52c6e2feb515 | [
"MIT"
] | null | null | null | games/game_gta-vice-city-de.py | clayne/modorganizer-basic_games | 16939ac6c737c5b136801f869f9b52c6e2feb515 | [
"MIT"
] | 1 | 2022-02-25T23:09:53.000Z | 2022-02-25T23:09:53.000Z | import os
from pathlib import Path
from PyQt5.QtCore import QDir, QFileInfo
import mobase
from ..basic_game import BasicGame
class GTAViceCitysDefinitiveEditionModDataChecker(mobase.ModDataChecker):
def __init__(self):
super().__init__()
def dataLooksValid(
self, tree: mobase.IFileTree
... | 31.958333 | 84 | 0.656236 |
797eafbbaccdda62750992d4b24e289bda6cc96e | 129 | py | Python | latex/slides/resources/01_getting_started/present_loop_question.py | AntonObersteiner/python-lessons | 1d5536f0777853fba437566672cfb1d613984945 | [
"CC-BY-4.0"
] | null | null | null | latex/slides/resources/01_getting_started/present_loop_question.py | AntonObersteiner/python-lessons | 1d5536f0777853fba437566672cfb1d613984945 | [
"CC-BY-4.0"
] | null | null | null | latex/slides/resources/01_getting_started/present_loop_question.py | AntonObersteiner/python-lessons | 1d5536f0777853fba437566672cfb1d613984945 | [
"CC-BY-4.0"
] | null | null | null | def present_list(name, infos):
return f"{name}@({...})"
positions = ["APB", "E005", "Di5"]
debug_list("Py-Kurs", positions)
| 21.5 | 34 | 0.612403 |
797eafd774222e13d416f369630414defa2a62e3 | 1,062 | py | Python | room_choice.py | jasonpettit/game | 432800b66b6e50d0b4c6423b158f32d44717e9f4 | [
"MIT"
] | null | null | null | room_choice.py | jasonpettit/game | 432800b66b6e50d0b4c6423b158f32d44717e9f4 | [
"MIT"
] | null | null | null | room_choice.py | jasonpettit/game | 432800b66b6e50d0b4c6423b158f32d44717e9f4 | [
"MIT"
] | null | null | null | def room():
#remove the options that are NOT valid for your room
valid = ['u','d','r','l']
#Add the story about your room
print "Your room's story"
#see what they decided to do
result = choice(valid)
print result
###########################
#CHOICE NEEDS WORK
... | 24.697674 | 89 | 0.573446 |
797eb17cf903e3ecf1d3a8ea85f4bd39637f2cac | 6,156 | py | Python | pynetbox/core/app.py | markkuleinio/pynetbox | bee2ae9219ca78f3e587fcf0d2cc36c6533146ff | [
"Apache-2.0"
] | 78 | 2021-04-22T07:39:11.000Z | 2022-03-24T10:59:22.000Z | pynetbox/core/app.py | markkuleinio/pynetbox | bee2ae9219ca78f3e587fcf0d2cc36c6533146ff | [
"Apache-2.0"
] | 81 | 2021-04-21T14:23:35.000Z | 2022-03-31T12:25:39.000Z | pynetbox/core/app.py | markkuleinio/pynetbox | bee2ae9219ca78f3e587fcf0d2cc36c6533146ff | [
"Apache-2.0"
] | 27 | 2021-04-23T19:36:45.000Z | 2022-03-30T08:40:51.000Z | """
(c) 2017 DigitalOcean
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distribut... | 31.248731 | 86 | 0.577973 |
797eb1b425f18d97560643176fd0e9f1a02ffac0 | 1,619 | py | Python | sudoku-solver.py | aditya270520/sudoku-solver | 2bbf9f0f3cef6ea7d39b40e1bed3f01f960fe30d | [
"MIT"
] | null | null | null | sudoku-solver.py | aditya270520/sudoku-solver | 2bbf9f0f3cef6ea7d39b40e1bed3f01f960fe30d | [
"MIT"
] | null | null | null | sudoku-solver.py | aditya270520/sudoku-solver | 2bbf9f0f3cef6ea7d39b40e1bed3f01f960fe30d | [
"MIT"
] | null | null | null | board=[
[5,3,0,0,7,0,0,0,0],
[6,0,0,1,9,5,0,0,0],
[0,9,8,0,0,0,0,6,0],
[8,0,0,0,6,0,0,0,3],
[4,0,0,8,0,3,0,0,1],
[7,0,0,0,2,0,0,0,6],
[0,6,0,0,0,0,2,8,0],
[0,0,0,4,1,9,0,0,5],
[0,0,0,0,8,0,0,7,9]]
def print_board(bo):
for i in range(len(bo)):
if i%3 == 0 and i!=0:
... | 27.440678 | 49 | 0.442866 |
797eb1bccf4bcfa6072da65e2ff3fc5786cc81fc | 1,360 | py | Python | search/547_find_circle_num.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | search/547_find_circle_num.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | search/547_find_circle_num.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | from typing import *
class Solution:
"""
班上有 N 名学生。其中有些人是朋友,有些则不是。他们的友谊具有是传递性。如果已知 A 是 B 的朋友,B 是 C 的朋友,那么我们可以认为 A 也是 C 的朋友。所谓的朋友圈,是指所有朋友的集合。
给定一个 N * N 的矩阵 M,表示班级中学生之间的朋友关系。如果M[i][j] = 1,表示已知第 i 个和 j 个学生互为朋友关系,否则为不知道。你必须输出所有学生中的已知的朋友圈总数。
示例 1:
输入:
[[1,1,0],
[1,1,0],
[0,0,1]]
... | 19.15493 | 103 | 0.517647 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.