hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2cdd5e7f00c248f854f0b16723d9100f318d8caf | 1,624 | py | Python | services/web/apps/inv/reportobjectsummary/views.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | services/web/apps/inv/reportobjectsummary/views.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | services/web/apps/inv/reportobjectsummary/views.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ---------------------------------------------------------------------
# inv.reportobjectsummary
# ---------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# NOC mod... | 35.304348 | 98 | 0.463054 |
41c381c269a4d73e17af491f432575a58f845953 | 17,360 | py | Python | Ansible-AWS-Provisioning/collections/ansible_collections/community/aws/plugins/modules/ecs_task.py | ginigangadharan/ansible-real-life | 897c2fc0d05babbb540768b336b6ad399dad5bfa | [
"MIT"
] | 22 | 2021-07-16T08:11:22.000Z | 2022-03-31T07:15:34.000Z | Ansible-AWS-Provisioning/collections/ansible_collections/community/aws/plugins/modules/ecs_task.py | premsagar0228/ansible-real-life | 1a51193b833ab6ad320100472333b9ffb0da39d4 | [
"MIT"
] | null | null | null | Ansible-AWS-Provisioning/collections/ansible_collections/community/aws/plugins/modules/ecs_task.py | premsagar0228/ansible-real-life | 1a51193b833ab6ad320100472333b9ffb0da39d4 | [
"MIT"
] | 39 | 2021-07-05T02:31:42.000Z | 2022-03-31T02:46:03.000Z | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 38.75 | 137 | 0.625979 |
7d15042a5e4455121ca31ed437decf879afee33b | 1,662 | py | Python | FlaskApp/ModStorage/mountHelper.py | benno16/extraFiles | 82d681a90e199b8efc81017b777d8573e5e5a067 | [
"MIT"
] | null | null | null | FlaskApp/ModStorage/mountHelper.py | benno16/extraFiles | 82d681a90e199b8efc81017b777d8573e5e5a067 | [
"MIT"
] | null | null | null | FlaskApp/ModStorage/mountHelper.py | benno16/extraFiles | 82d681a90e199b8efc81017b777d8573e5e5a067 | [
"MIT"
] | null | null | null | import os
import os.path
from subprocess import call
import platform
def mountShare(m):
if platform.system() == 'Linux':
print("Mounting : " + m['Name'] + "\n")
pathToMountTo= getMountPoint(m['ID'])
share = m['Path']
usernamePart = "username=\"{0}\",".format(m['UserName'])
a... | 33.918367 | 123 | 0.555355 |
bdeee7278c000a25a10b5d22e7adb67dd0459115 | 185 | py | Python | fastx_compressor/fastx_compressor.py | VincentPreikstas/fastx_blocker | 78894b1ff49d8ff674143eae0dfe0a88653d2243 | [
"MIT"
] | null | null | null | fastx_compressor/fastx_compressor.py | VincentPreikstas/fastx_blocker | 78894b1ff49d8ff674143eae0dfe0a88653d2243 | [
"MIT"
] | null | null | null | fastx_compressor/fastx_compressor.py | VincentPreikstas/fastx_blocker | 78894b1ff49d8ff674143eae0dfe0a88653d2243 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Main module."""
def block_fastq_file(fastq_file, block_size=1000):
"""Yield lines from a blocked fastq file starting with the header line."""
pass
| 20.555556 | 78 | 0.664865 |
50e0251cc594ec2d0ae1119a8cc11b19a18d9d87 | 2,362 | py | Python | qanta_web/expo/game.py | vivlai/qanta | 57a162b28961a1d11a82405db4f07ff824ce3faf | [
"MIT"
] | null | null | null | qanta_web/expo/game.py | vivlai/qanta | 57a162b28961a1d11a82405db4f07ff824ce3faf | [
"MIT"
] | null | null | null | qanta_web/expo/game.py | vivlai/qanta | 57a162b28961a1d11a82405db4f07ff824ce3faf | [
"MIT"
] | null | null | null | from enum import Enum
from typing import Optional, List
from qanta.datasets.quiz_bowl import Question as QBQuestion
class AnswerStatus(Enum):
UNANSWERED = 1
CORRECT = 2
WRONG = 3
class Player:
def __init__(self, player_id: int, name: str, score: int, answer_status: AnswerStatus, is_human: bool):
... | 27.149425 | 110 | 0.624047 |
8c75fdd2aeb2d40f6c4b2b004cd9460e01914e66 | 2,653 | py | Python | kuma_utils/common.py | analokmaus/kaggle-panda-challenge-public | ae4c79ddf0606a9f28b4e34d638f1d0d65b620c1 | [
"MIT"
] | 36 | 2020-07-26T13:56:00.000Z | 2022-03-10T07:02:06.000Z | kuma_utils/common.py | analokmaus/kaggle-panda-challenge-public | ae4c79ddf0606a9f28b4e34d638f1d0d65b620c1 | [
"MIT"
] | 16 | 2020-11-13T19:01:11.000Z | 2022-03-12T00:43:55.000Z | kuma_utils/common.py | analokmaus/kaggle-panda-challenge-public | ae4c79ddf0606a9f28b4e34d638f1d0d65b620c1 | [
"MIT"
] | 7 | 2020-07-27T20:27:30.000Z | 2022-02-23T04:08:08.000Z | import os
import sys
import time
import datetime
import re
from pathlib import Path
from copy import deepcopy, copy
import traceback
import warnings
from collections.abc import Iterable
import numpy as np
import pandas as pd
def clean_value(x):
if isinstance(x, str):
if x.isnumeric():
return ... | 23.6875 | 73 | 0.531097 |
266b8cfc50534e7fff5b0b66d5b0acec1b3a1b6a | 736 | py | Python | asset/migrations/0003_auto_20180517_1652.py | zoushiwen/icmdb | 356aea2b970c999c0fafde12835c861b73ea42fb | [
"Apache-2.0"
] | null | null | null | asset/migrations/0003_auto_20180517_1652.py | zoushiwen/icmdb | 356aea2b970c999c0fafde12835c861b73ea42fb | [
"Apache-2.0"
] | null | null | null | asset/migrations/0003_auto_20180517_1652.py | zoushiwen/icmdb | 356aea2b970c999c0fafde12835c861b73ea42fb | [
"Apache-2.0"
] | 1 | 2018-08-03T07:04:11.000Z | 2018-08-03T07:04:11.000Z | # Generated by Django 2.0.5 on 2018-05-17 16:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('asset', '0002_auto_20180517_1646'),
]
operations = [
migrations.AlterField(
model_name='assetinfo',
name='is_active'... | 30.666667 | 160 | 0.580163 |
cc26684943e4d23ca95e29087c295a1e0aa87494 | 601 | py | Python | src/quiz/migrations/0003_auto_20210122_2224.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | src/quiz/migrations/0003_auto_20210122_2224.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | src/quiz/migrations/0003_auto_20210122_2224.py | cbsBiram/xarala__ssr | 863e1362c786daa752b942b796f7a015211d2f1b | [
"FSFAP"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-22 22:24
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("course", "0023_auto_20210115_1332"),
("quiz", "0002_auto_20210120_0738"),
]
operations = [
migratio... | 24.04 | 60 | 0.574043 |
310c7910198f62a1d9422d4fe71feb79076e22ae | 15,190 | py | Python | woke/tests/test_solidity_version_parsing.py | Ackee-Blockchain/woke | 0d27de25720142beb9619a89619b7a94c3556af1 | [
"ISC"
] | 7 | 2022-01-28T06:50:00.000Z | 2022-02-14T11:34:32.000Z | woke/tests/test_solidity_version_parsing.py | Ackee-Blockchain/woke | 0d27de25720142beb9619a89619b7a94c3556af1 | [
"ISC"
] | 30 | 2022-01-26T17:54:48.000Z | 2022-03-21T12:33:53.000Z | woke/tests/test_solidity_version_parsing.py | Ackee-Blockchain/woke | 0d27de25720142beb9619a89619b7a94c3556af1 | [
"ISC"
] | null | null | null | import pytest
from woke.c_regex_parsing.solidity_version import (
SolidityVersion,
SolidityVersionRange,
SolidityVersionExpr,
)
def test_version_basic_usage():
v1 = SolidityVersion.fromstring("0.8.9-alpha.2+commit.12345678")
assert v1.major == 0
assert v1.minor == 8
assert v1.patch == 9
... | 35.162037 | 86 | 0.504279 |
cadfd42bc79abba9e2230b86f6cd293ed3fdadde | 29,180 | py | Python | moto/ec2/_models/instances.py | viren-nadkarni/moto | 61a5d5ca3b7f6b6a48e6b0584ca4336ca27f5bdb | [
"Apache-2.0"
] | null | null | null | moto/ec2/_models/instances.py | viren-nadkarni/moto | 61a5d5ca3b7f6b6a48e6b0584ca4336ca27f5bdb | [
"Apache-2.0"
] | null | null | null | moto/ec2/_models/instances.py | viren-nadkarni/moto | 61a5d5ca3b7f6b6a48e6b0584ca4336ca27f5bdb | [
"Apache-2.0"
] | null | null | null | import copy
import warnings
from collections import OrderedDict
from datetime import datetime
from moto.core import ACCOUNT_ID
from moto.core.models import CloudFormationModel
from moto.core.utils import camelcase_to_underscores
from moto.packages.boto.ec2.blockdevicemapping import BlockDeviceMapping
from moto.package... | 37.219388 | 119 | 0.612988 |
4d9f529fdd33c6f146f0d615d78b64b18e6a72b6 | 362 | py | Python | userbot/plugins/thinklol.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/thinklol.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/thinklol.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | # (c) @UniBorg
import asyncio
from collections import deque
from telethon import events
@borg.on(events.NewMessage(pattern=r"\.lol", outgoing=True))
async def _(event):
if event.fwd_from:
return
deq = deque(list("🤔🧐🤔🧐🤔🧐"))
for _ in range(999):
await asyncio.sleep(0.1)
await... | 20.111111 | 60 | 0.627072 |
16f0067a57cc4559930cdefa51f80edcd0989343 | 645 | py | Python | sample/test_remote.py | cara/webdriver | c03e320cac02a4591df7ac509dd29b0ad4478943 | [
"MIT"
] | null | null | null | sample/test_remote.py | cara/webdriver | c03e320cac02a4591df7ac509dd29b0ad4478943 | [
"MIT"
] | null | null | null | sample/test_remote.py | cara/webdriver | c03e320cac02a4591df7ac509dd29b0ad4478943 | [
"MIT"
] | null | null | null | import os, sys
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
print "Environment Mac", os.environ
try:
os.environ["SELENIUM"]
except KeyError:
print "Please set the environment variable SELENIUM to Selenium URL"
sys.exit(1)
driver = webdriver.... | 28.043478 | 78 | 0.765891 |
1f1a279e6674db90dcccd09dfb30e411654187f1 | 10,217 | py | Python | docs/source/conf.py | ndem0/PyGeM | 1d6500c3f8db179d57b463b4b9b9e41c20058651 | [
"MIT"
] | 223 | 2016-03-30T20:13:03.000Z | 2022-03-23T02:54:45.000Z | docs/source/conf.py | ndem0/PyGeM | 1d6500c3f8db179d57b463b4b9b9e41c20058651 | [
"MIT"
] | 67 | 2016-03-22T14:18:31.000Z | 2022-02-05T21:39:01.000Z | docs/source/conf.py | ndem0/PyGeM | 1d6500c3f8db179d57b463b4b9b9e41c20058651 | [
"MIT"
] | 103 | 2016-03-14T11:13:17.000Z | 2022-03-08T08:38:22.000Z | # -*- coding: utf-8 -*-
#
# pygem documentation build configuration file, created by
# sphinx-quickstart on Mon Jun 22 16:09:40 2015.
#
# 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.
#
# All... | 32.332278 | 85 | 0.711657 |
d3809b6854130e5f9a51236f8da59c0ff4ecb65c | 4,907 | py | Python | docs/conf.py | drinksober/arbitrage | 00ba419d84b7182692b62fed3121dd486cb5c2b9 | [
"MIT"
] | 10 | 2018-03-26T02:19:18.000Z | 2019-12-04T12:20:28.000Z | docs/conf.py | drinks5/arbitrage | 00ba419d84b7182692b62fed3121dd486cb5c2b9 | [
"MIT"
] | null | null | null | docs/conf.py | drinks5/arbitrage | 00ba419d84b7182692b62fed3121dd486cb5c2b9 | [
"MIT"
] | 1 | 2018-05-05T04:52:23.000Z | 2018-05-05T04:52:23.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# cycle_arbitrage documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 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 th... | 29.920732 | 77 | 0.689219 |
c7c6d8c06b8e664af054867f225c0ab9bf22b41a | 440 | py | Python | packages/python/plotly/plotly/validators/layout/xaxis/_categoryarraysrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/xaxis/_categoryarraysrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/xaxis/_categoryarraysrc.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="categoryarraysrc", parent_name="layout.xaxis", **kwargs
):
super(CategoryarraysrcValidator, self).__init__(
plotly_name=plotly_name,
... | 31.428571 | 82 | 0.670455 |
f6f8a7de3aea70c139d6e098ceccbe3756b8fed0 | 4,039 | py | Python | cogan/tools/caffe/classifier.py | sagardsaxena/CoGAN | 6a0fbdb850c9ee78a8c83631aab8ded26195822b | [
"FSFAP"
] | 285 | 2016-09-22T19:48:44.000Z | 2022-03-11T03:30:07.000Z | cogan/tools/caffe/classifier.py | IsChristina/CoGAN | f940c28330ace09b3471d8745bfad7d891dbf095 | [
"FSFAP"
] | 12 | 2016-12-08T03:43:42.000Z | 2020-06-04T05:42:52.000Z | cogan/tools/caffe/classifier.py | IsChristina/CoGAN | f940c28330ace09b3471d8745bfad7d891dbf095 | [
"FSFAP"
] | 76 | 2016-10-03T21:26:24.000Z | 2022-03-28T12:05:57.000Z | #!/usr/bin/env python
"""
Classifier is an image classifier specialization of Net.
"""
import numpy as np
import caffe
class Classifier(caffe.Net):
"""
Classifier extends Net for image class prediction
by scaling, center cropping, or oversampling.
Parameters
----------
image_dims : dimensio... | 36.718182 | 78 | 0.588264 |
1955925c4a528dc792c9d8cce561bde5b72ed87c | 2,727 | py | Python | cheritest/trunk/tests/tlb/test_tlb_invalid_store_h.py | tupipa/beri | cef1b41d52592cfa7454ddf59f9f2994e447cd66 | [
"Apache-2.0"
] | 36 | 2015-05-29T16:47:19.000Z | 2022-02-08T21:16:26.000Z | cheritest/trunk/tests/tlb/test_tlb_invalid_store_h.py | tupipa/beri | cef1b41d52592cfa7454ddf59f9f2994e447cd66 | [
"Apache-2.0"
] | 1 | 2015-10-14T13:05:21.000Z | 2015-10-19T20:34:03.000Z | cheritest/trunk/tests/tlb/test_tlb_invalid_store_h.py | tupipa/beri | cef1b41d52592cfa7454ddf59f9f2994e447cd66 | [
"Apache-2.0"
] | 15 | 2015-06-11T07:10:58.000Z | 2021-06-18T05:14:54.000Z | #-
# Copyright (c) 2011 Robert N. M. Watson
# All rights reserved.
#
# This software was developed by SRI International and the University of
# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
# ("CTSRD"), as part of the DARPA CRASH research programme.
#
# @BERI_LICENSE_HEADER_START@
#
# License... | 33.256098 | 124 | 0.716905 |
73b7364ad4f04d728e46be1c9550f1ab111e1e03 | 3,776 | py | Python | nlpmodels/utils/elt/gpt_dataset.py | will-thompson-k/deeplearning-nlp-models | d3afac437b1ddf563c8d2694ada950bf20ab1c34 | [
"MIT"
] | 77 | 2020-11-01T19:22:32.000Z | 2021-12-12T20:41:34.000Z | nlpmodels/utils/elt/gpt_dataset.py | will-thompson-k/deeplearning-nlp-models | d3afac437b1ddf563c8d2694ada950bf20ab1c34 | [
"MIT"
] | 3 | 2020-11-16T02:59:22.000Z | 2020-12-21T23:22:55.000Z | nlpmodels/utils/elt/gpt_dataset.py | will-thompson-k/deeplearning-nlp-models | d3afac437b1ddf563c8d2694ada950bf20ab1c34 | [
"MIT"
] | 6 | 2020-12-10T10:10:34.000Z | 2020-12-21T14:17:49.000Z | """
This module contains the GPT Dataset and GPT Dataloaders for the GPT problem.
"""
from typing import Tuple, Any
import torch
from torch.utils.data import DataLoader
from datasets import load_dataset
from nlpmodels.utils.elt.dataset import AbstractNLPDataset
from nlpmodels.utils.tokenizer import tokenize_corpus_b... | 34.642202 | 94 | 0.62553 |
58bfb20a7d7178752fa512effe9819cfe40e68bf | 670 | py | Python | sceptre/cli/status.py | acaire/sceptre | bf70aec9f88e095d295c93a40d091d4d45f57b3e | [
"Apache-2.0"
] | null | null | null | sceptre/cli/status.py | acaire/sceptre | bf70aec9f88e095d295c93a40d091d4d45f57b3e | [
"Apache-2.0"
] | null | null | null | sceptre/cli/status.py | acaire/sceptre | bf70aec9f88e095d295c93a40d091d4d45f57b3e | [
"Apache-2.0"
] | 4 | 2019-09-10T13:32:18.000Z | 2021-06-16T19:03:47.000Z | import click
from sceptre.cli.helpers import catch_exceptions, get_stack_or_env, write
@click.command(name="status")
@click.argument("path")
@click.pass_context
@catch_exceptions
def status_command(ctx, path):
"""
Print status of stack or environment.
Prints the stack status or the status of the stacks ... | 25.769231 | 79 | 0.716418 |
456306b534a586ffc9e521600d9121ce94468383 | 1,574 | py | Python | jobs/name-search-script/config.py | sumesh-aot/namex | 53e11aed5ea550b71b7b983f1b57b65db5a06766 | [
"Apache-2.0"
] | 4 | 2018-10-05T23:41:05.000Z | 2019-06-19T16:17:50.000Z | jobs/name-search-script/config.py | sumesh-aot/namex | 53e11aed5ea550b71b7b983f1b57b65db5a06766 | [
"Apache-2.0"
] | 635 | 2018-05-31T04:12:46.000Z | 2022-03-31T18:45:42.000Z | jobs/name-search-script/config.py | sumesh-aot/namex | 53e11aed5ea550b71b7b983f1b57b65db5a06766 | [
"Apache-2.0"
] | 71 | 2018-05-14T20:47:55.000Z | 2022-03-31T23:08:30.000Z | """Config setup for inprogress updater job."""
import os
from dotenv import find_dotenv, load_dotenv
# this will load all the envars from a .env file
load_dotenv(find_dotenv())
class BaseConfig(object):
"""Base config."""
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
MAX_ROW_LIMIT = os.ge... | 25.387097 | 91 | 0.641677 |
8a26e1bcb548fe1c96a10626e20e02561315f444 | 3,475 | py | Python | commands/fun.py | MicrohexHQ/Wilson-Source-Code | 7e0f6f97125b67885c7739c0f40c725aefb8dba8 | [
"MIT"
] | null | null | null | commands/fun.py | MicrohexHQ/Wilson-Source-Code | 7e0f6f97125b67885c7739c0f40c725aefb8dba8 | [
"MIT"
] | null | null | null | commands/fun.py | MicrohexHQ/Wilson-Source-Code | 7e0f6f97125b67885c7739c0f40c725aefb8dba8 | [
"MIT"
] | null | null | null | import discord
import asyncio
import yaml
import random
from discord.ext import commands
# YAML containing reactions
bot_reactions = yaml.load(open('./data/yaml/reactions.yml'))
class Fun(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def puppet(self, ctx, *, m... | 34.405941 | 126 | 0.574964 |
2ebaf4e4a78e26f2d1a81dabe3cfe233f814cad0 | 12,518 | py | Python | datasets/trivia_qa/trivia_qa.py | xiaoya-li/datasets | b153141355d0c3ba3a6933ab901cef379b7830e0 | [
"Apache-2.0"
] | 2 | 2021-08-28T06:48:02.000Z | 2021-08-28T23:18:34.000Z | datasets/trivia_qa/trivia_qa.py | xiaoya-li/datasets | b153141355d0c3ba3a6933ab901cef379b7830e0 | [
"Apache-2.0"
] | null | null | null | datasets/trivia_qa/trivia_qa.py | xiaoya-li/datasets | b153141355d0c3ba3a6933ab901cef379b7830e0 | [
"Apache-2.0"
] | 4 | 2021-07-25T17:09:39.000Z | 2022-02-12T03:30:08.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets 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/LI... | 40.775244 | 116 | 0.56974 |
c78b38fa548f7774dba9a8aa9349f42dc978307b | 8,197 | py | Python | opencontrail_netns/network_manage.py | Doude/opencontrail-netns | 48351f4dd5e5c91e3570a6024e96e4a5f19013b2 | [
"Apache-2.0"
] | null | null | null | opencontrail_netns/network_manage.py | Doude/opencontrail-netns | 48351f4dd5e5c91e3570a6024e96e4a5f19013b2 | [
"Apache-2.0"
] | null | null | null | opencontrail_netns/network_manage.py | Doude/opencontrail-netns | 48351f4dd5e5c91e3570a6024e96e4a5f19013b2 | [
"Apache-2.0"
] | 1 | 2019-01-16T00:04:32.000Z | 2019-01-16T00:04:32.000Z | #!/bin/env python
import argparse
from vnc_api.vnc_api import *
class NetworkManager(object):
def __init__(self, api_server, api_port, project=None):
self._client = VncApi(api_server_host=api_server,
api_server_port=api_port)
self._project = project
def _netname... | 34.297071 | 76 | 0.592778 |
aa7539ae9f09163bf1a2cc9f7dfcc6fc06737ae8 | 1,820 | py | Python | tensorflow/python/ops/nn_grad_test.py | qinchangping/tensorflow | f7f7036d1cdc5716aff976fae0ea4d1b9a931b56 | [
"Apache-2.0"
] | 24 | 2018-02-01T15:49:22.000Z | 2021-01-11T16:31:18.000Z | tensorflow/python/ops/nn_grad_test.py | qinchangping/tensorflow | f7f7036d1cdc5716aff976fae0ea4d1b9a931b56 | [
"Apache-2.0"
] | 2 | 2018-09-09T07:29:07.000Z | 2019-03-11T07:14:45.000Z | tensorflow/python/ops/nn_grad_test.py | qinchangping/tensorflow | f7f7036d1cdc5716aff976fae0ea4d1b9a931b56 | [
"Apache-2.0"
] | 4 | 2018-10-29T18:43:22.000Z | 2020-09-28T07:19:52.000Z | # Copyright 2016 The TensorFlow 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 applica... | 35 | 80 | 0.697802 |
7d96ab622a381dd81ef585a1c073a1ed155c90b4 | 1,143 | py | Python | var/spack/repos/builtin/packages/py-huggingface-hub/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/py-huggingface-hub/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/py-huggingface-hub/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyHuggingfaceHub(PythonPackage):
"""This library allows anyone to work with the Hub
re... | 42.333333 | 96 | 0.708661 |
89edd23b0ecdfa651f3d8d6e127fcb6d2bd26f5a | 2,834 | py | Python | pause_menu.py | mandaw2014/parkour | 8b9a7f6fa47d5de82c9d22c27d8d803cc6a30b07 | [
"MIT"
] | 4 | 2021-09-04T08:22:23.000Z | 2022-01-20T17:35:18.000Z | pause_menu.py | mandaw2014/parkour | 8b9a7f6fa47d5de82c9d22c27d8d803cc6a30b07 | [
"MIT"
] | 1 | 2021-05-31T18:48:10.000Z | 2021-05-31T18:48:10.000Z | pause_menu.py | mandaw2014/parkour | 8b9a7f6fa47d5de82c9d22c27d8d803cc6a30b07 | [
"MIT"
] | 2 | 2021-05-31T17:16:06.000Z | 2021-12-09T13:33:52.000Z | from ursina import *
class PauseMenu(Entity):
def __init__(self):
super().__init__(parent = camera.ui, ignore_paused = True)
self.pause_menu = Entity(parent = self, enabled = True)
self.player = None
self.main_menu = None
self.level01 = None
self.level02 = None
... | 41.072464 | 139 | 0.534227 |
48cbfb1a6e730cdda2d971851de46d2255a455bd | 5,579 | py | Python | bookmarks/views/generic.py | gradel/django-generic-bookmarks | 98d4c2099c019a6767fccebd96ec726f35fd1414 | [
"MIT"
] | null | null | null | bookmarks/views/generic.py | gradel/django-generic-bookmarks | 98d4c2099c019a6767fccebd96ec726f35fd1414 | [
"MIT"
] | null | null | null | bookmarks/views/generic.py | gradel/django-generic-bookmarks | 98d4c2099c019a6767fccebd96ec726f35fd1414 | [
"MIT"
] | null | null | null | """
Class based generic views.
These views are only available if you are using Django >= 1.3.
"""
from django.contrib.auth.models import User
from django.views.generic.detail import DetailView
from bookmarks.handlers import library
class BookmarksMixin(object):
"""
Mixin for bookmarks class based views.
... | 33.011834 | 79 | 0.647069 |
d17d237b844e08f46089321ff1d14b9b1fdb1098 | 12,325 | py | Python | clients/oathkeeper/python/ory_oathkeeper_client/model/upstream.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/oathkeeper/python/ory_oathkeeper_client/model/upstream.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/oathkeeper/python/ory_oathkeeper_client/model/upstream.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | """
ORY Oathkeeper
ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies. # noqa: E501
The version of the OpenAPI document: v0.38.19-beta.1
Contact: hi@ory.am
Generated by: https://o... | 46.509434 | 270 | 0.583286 |
2e10ec95765dc271d1ef348df89461d61f387e9e | 14,541 | py | Python | filetype/types/archive.py | fzzylogic/filetype.py | 1937d2b22b6852655e79f40550306a5e7282e9c5 | [
"MIT"
] | null | null | null | filetype/types/archive.py | fzzylogic/filetype.py | 1937d2b22b6852655e79f40550306a5e7282e9c5 | [
"MIT"
] | null | null | null | filetype/types/archive.py | fzzylogic/filetype.py | 1937d2b22b6852655e79f40550306a5e7282e9c5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .base import Type
class Epub(Type):
"""
Implements the EPUB archive type matcher.
"""
MIME = 'application/epub+zip'
EXTENSION = 'epub'
def __init__(self):
super(Epub, self).__init__(
mime=Epub.MIME,
... | 24.194676 | 55 | 0.455883 |
db320a62c5267c2f32ac2c76aba8aa0712217394 | 7,474 | py | Python | azurelinuxagent/common/utils/textutil.py | longlimsft/WALinuxAgent | abc9c2e396ce8be0e643de5659578a415d9884ce | [
"Apache-2.0"
] | 2 | 2019-05-03T21:59:45.000Z | 2021-01-19T07:17:03.000Z | azurelinuxagent/common/utils/textutil.py | longlimsft/WALinuxAgent | abc9c2e396ce8be0e643de5659578a415d9884ce | [
"Apache-2.0"
] | null | null | null | azurelinuxagent/common/utils/textutil.py | longlimsft/WALinuxAgent | abc9c2e396ce8be0e643de5659578a415d9884ce | [
"Apache-2.0"
] | null | null | null | # Microsoft Azure Linux Agent
#
# Copyright 2014 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 25.508532 | 87 | 0.576532 |
333f0470ffa504fa0d3c4aa40a2de0085a612bbc | 1,063 | py | Python | Base/TestEnum.py | InverseLina/python-practice | 496d2020916d8096a32131cdedd25a4da7b7735e | [
"Apache-2.0"
] | null | null | null | Base/TestEnum.py | InverseLina/python-practice | 496d2020916d8096a32131cdedd25a4da7b7735e | [
"Apache-2.0"
] | null | null | null | Base/TestEnum.py | InverseLina/python-practice | 496d2020916d8096a32131cdedd25a4da7b7735e | [
"Apache-2.0"
] | null | null | null | from enum import Enum
from enum import unique
# encoding=utf-8
__author__ = 'Hinsteny'
def test_enum():
Month = Enum('Month', ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'))
print(Month.Jan, " = ",Month.Jan.value)
for name, member in Month.__members__.items():
... | 20.442308 | 111 | 0.585136 |
23f55bed82ba83e79fcd9c864592ae76171a1799 | 987 | py | Python | var/spack/repos/builtin/packages/py-jupyterlab/package.py | MiddelkoopT/spack | 4d94c4c4600f42a7a3bb3d06ec879140bc259304 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-jupyterlab/package.py | MiddelkoopT/spack | 4d94c4c4600f42a7a3bb3d06ec879140bc259304 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-jupyterlab/package.py | MiddelkoopT/spack | 4d94c4c4600f42a7a3bb3d06ec879140bc259304 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class PyJupyterlab(PythonPackage):
"""JupyterLab is the next-generation web-based user interface
for Project J... | 42.913043 | 95 | 0.702128 |
a7138ae06ae47ff7ddaf3be859efe1bf75ac9e48 | 6,446 | py | Python | main.py | jrupac/nest-wfh | 3b65a04b1dd19d1e0c2bd0aa6a863df19468f4af | [
"MIT"
] | 1 | 2015-06-21T14:52:43.000Z | 2015-06-21T14:52:43.000Z | main.py | jrupac/nest-wfh | 3b65a04b1dd19d1e0c2bd0aa6a863df19468f4af | [
"MIT"
] | null | null | null | main.py | jrupac/nest-wfh | 3b65a04b1dd19d1e0c2bd0aa6a863df19468f4af | [
"MIT"
] | null | null | null | """
Nest-WFH is a project that aims to prevent your Nest thermostat from going into
auto-away mode if you are home.
The program works by querying your calendar to look for specific events. If so,
it will manually set all thermostats to "home". This is meant to be run as a
cron job.
"""
__author__ = 'ajay@roopakalu.com... | 34.843243 | 80 | 0.718585 |
007cb81442d166873a05ab5c944fc7d46a963311 | 1,548 | py | Python | pyqt/pyqt5-master/src/windows/DarkStyleSheet.py | Ding-zhenke/Dcount-s-notebook | 16c29ac7d076c466e053f1b8db4a7f4e43f67a24 | [
"MIT"
] | null | null | null | pyqt/pyqt5-master/src/windows/DarkStyleSheet.py | Ding-zhenke/Dcount-s-notebook | 16c29ac7d076c466e053f1b8db4a7f4e43f67a24 | [
"MIT"
] | null | null | null | pyqt/pyqt5-master/src/windows/DarkStyleSheet.py | Ding-zhenke/Dcount-s-notebook | 16c29ac7d076c466e053f1b8db4a7f4e43f67a24 | [
"MIT"
] | 2 | 2019-06-18T05:53:26.000Z | 2019-06-19T03:26:02.000Z |
'''
QDarkStyleSheet样式
conda install qdarkstyle
'''
import logging
import sys
from PyQt5 import QtWidgets, QtCore
# make the example runnable without the need to install
from os.path import abspath, dirname
sys.path.insert(0, abspath(dirname(abspath(__file__)) + '/..'))
import qdarkstyle
import ui.example_pyqt5_ui as... | 23.815385 | 63 | 0.691214 |
d338a0aaebf2d863ab3dad2863673e7a12962476 | 553 | py | Python | nodes/networkedSingleStepper/updateFirmware.py | imoyer/pygestalt | d332df64264cce4a2bec8a73d698c386f1eaca7b | [
"MIT"
] | 1 | 2017-07-03T08:34:39.000Z | 2017-07-03T08:34:39.000Z | nodes/networkedSingleStepper/updateFirmware.py | imoyer/pygestalt | d332df64264cce4a2bec8a73d698c386f1eaca7b | [
"MIT"
] | 3 | 2015-12-04T23:14:50.000Z | 2016-11-08T16:24:32.000Z | nodes/networkedSingleStepper/updateFirmware.py | imnp/pygestalt | d332df64264cce4a2bec8a73d698c386f1eaca7b | [
"MIT"
] | 1 | 2017-09-13T00:17:39.000Z | 2017-09-13T00:17:39.000Z | ''' Updates the firmware on a networkedSingleStepper node.
April 14th, 2019
Ilan E. Moyer
'''
from pygestalt import nodes, config
import time, sys
# ---- SYNTHETIC MODE ----
# config.syntheticModeOn() #Un-comment this line to run in synthetic mode (i.e. test mode)
# ---- DEFINE TEST NODE ----
targetNode = nodes.n... | 26.333333 | 146 | 0.705244 |
697f48f9b5e7f79083dbff14bf24bb1c925484ec | 8,849 | py | Python | myapp/migrations/0001_initial.py | archerc56/classroomProject2 | 683e6098ea794207d2f3ce409663f88dcbdf082e | [
"MIT"
] | null | null | null | myapp/migrations/0001_initial.py | archerc56/classroomProject2 | 683e6098ea794207d2f3ce409663f88dcbdf082e | [
"MIT"
] | null | null | null | myapp/migrations/0001_initial.py | archerc56/classroomProject2 | 683e6098ea794207d2f3ce409663f88dcbdf082e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-29 16:14
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | 39.86036 | 152 | 0.509323 |
f319a60dd66472e50e07cf15afd6680dbc1069dd | 481 | py | Python | Hilo3.py | GatomanJuarez/Threads. | 8e1fce71303709a54821edd43a084ab72f6f6aaf | [
"BSD-2-Clause"
] | null | null | null | Hilo3.py | GatomanJuarez/Threads. | 8e1fce71303709a54821edd43a084ab72f6f6aaf | [
"BSD-2-Clause"
] | null | null | null | Hilo3.py | GatomanJuarez/Threads. | 8e1fce71303709a54821edd43a084ab72f6f6aaf | [
"BSD-2-Clause"
] | null | null | null | import threading
import time
def worker():
print (threading.currentThread().getName(),'Lanzado')
time.sleep(2)
print (threading.currentThread().getName(),'Detenido')
def servicio():
print (threading.currentThread().getName(),'Lanzado')
print (threading.currentThread().getName(),'Detenido')
t = threading... | 30.0625 | 56 | 0.713098 |
c37c52dbe4e474a2b9507aa9a152b224cb0e5009 | 1,144 | py | Python | {{cookiecutter.project_slug}}/setup.py | mthpower/cc-python-package | e3614d4cd86018bed5af2cf51a96d60ebd3157e9 | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/setup.py | mthpower/cc-python-package | e3614d4cd86018bed5af2cf51a96d60ebd3157e9 | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/setup.py | mthpower/cc-python-package | e3614d4cd86018bed5af2cf51a96d60ebd3157e9 | [
"MIT"
] | null | null | null | import os
import re
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
with open('{{cookiecutter.py_namespace}}/__init__.py', 'r') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
f.read(), re.MULTILINE).group(1)
se... | 30.918919 | 111 | 0.603147 |
ab3468757165224b1e528fe67e7bbce2f62be549 | 2,423 | py | Python | util/__init__.py | 01shruti/Clustering | a79b590316066a4e0e6181add2642190515964fe | [
"MIT"
] | 2 | 2019-01-11T13:22:33.000Z | 2019-01-11T14:48:58.000Z | kmodes/util/__init__.py | mahdigh99/kmodes | 546ea6e72ead6475b62ad40a617188ff650efdb0 | [
"MIT"
] | null | null | null | kmodes/util/__init__.py | mahdigh99/kmodes | 546ea6e72ead6475b62ad40a617188ff650efdb0 | [
"MIT"
] | null | null | null | """
Generic utilities for clustering
"""
import numpy as np
def get_max_value_key(dic):
"""Gets the key for the maximum value in a dict."""
v = np.array(list(dic.values()))
k = np.array(list(dic.keys()))
maxima = np.where(v == np.max(v))[0]
if len(maxima) == 1:
return k[maxima[0]]
el... | 34.126761 | 79 | 0.633925 |
823d8e72e1557a7eaa5f7e9dae7f7e58df6e7e86 | 316 | py | Python | Estimating the Area of a Circle/area.py | rajitbanerjee/kattis | 3a5dd4c84c07e21f09ef45ebd9c1bad2a0adc6ad | [
"CC0-1.0"
] | 2 | 2021-04-13T12:56:30.000Z | 2022-03-21T16:46:58.000Z | Estimating the Area of a Circle/area.py | rajitbanerjee/kattis | 3a5dd4c84c07e21f09ef45ebd9c1bad2a0adc6ad | [
"CC0-1.0"
] | null | null | null | Estimating the Area of a Circle/area.py | rajitbanerjee/kattis | 3a5dd4c84c07e21f09ef45ebd9c1bad2a0adc6ad | [
"CC0-1.0"
] | 1 | 2021-11-14T14:06:46.000Z | 2021-11-14T14:06:46.000Z | """https://open.kattis.com/problems/estimatingtheareaofacircle"""
import math
ans = []
while True:
r, m, c = map(float, input().split())
if (r, m, c) == (0, 0, 0):
break
area = math.pi * r * r
estimate = c/m * ((2 * r) ** 2)
ans.append(f"{area} {estimate}")
for a in ans:
print(a) | 19.75 | 65 | 0.537975 |
84926ffb190601593a9d9dcb76f529eb3475a76b | 2,649 | py | Python | vcf2csv_shell.py | sensecollective/bioinformatics_scripts | 3a23611f382b7f3dd60e5e2abe841b84408c0d44 | [
"BSD-3-Clause"
] | 7 | 2016-03-23T11:31:06.000Z | 2021-05-20T19:07:38.000Z | vcf2csv_shell.py | raonyguimaraes/bioinformatics_scripts | 3a23611f382b7f3dd60e5e2abe841b84408c0d44 | [
"BSD-3-Clause"
] | null | null | null | vcf2csv_shell.py | raonyguimaraes/bioinformatics_scripts | 3a23611f382b7f3dd60e5e2abe841b84408c0d44 | [
"BSD-3-Clause"
] | 8 | 2016-06-01T19:28:46.000Z | 2022-01-09T01:26:10.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#script to convert vcf to csv
import os
import csv
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-v", dest="vcf_file",
help="VCF File to Annotate", metavar="VCF")
(options, args) = parser.parse_args()
vcffile = options.vcf_f... | 26.227723 | 96 | 0.685164 |
5413cc32d02984a351e6a649f1af56386a98dcaf | 989 | py | Python | resize_textframe_main_to_margins.py | innermond/scribus-scripts | 35100ad8740f970c56b8bca4c7e01f1bb638afbb | [
"MIT"
] | 1 | 2021-12-19T09:08:28.000Z | 2021-12-19T09:08:28.000Z | resize_textframe_main_to_margins.py | innermond/scribus-scripts | 35100ad8740f970c56b8bca4c7e01f1bb638afbb | [
"MIT"
] | null | null | null | resize_textframe_main_to_margins.py | innermond/scribus-scripts | 35100ad8740f970c56b8bca4c7e01f1bb638afbb | [
"MIT"
] | 1 | 2021-01-22T03:14:37.000Z | 2021-01-22T03:14:37.000Z | #!/usr/bin/python3
try:
from scribus import *
except ImportErr:
pass
"""Resize a textframe with 'main' attribute with value 'True' to page margins"""
for p in range(1, pageCount() + 1):
gotoPage(p)
typ = getPageType(p)
W, H = getPageSize()
mm = getPageMargins()
ii=getPageItems()
if len... | 24.725 | 80 | 0.482305 |
253c3edde0c56c3acf3379c341686bcf017a59a5 | 4,407 | py | Python | Python2.7-IDCard_Detect_by_AI/idcard_detection.py | TencentCloud/Serverless-examples | 4cfe9183e4fd547762ac610e9370f8c98bf5de70 | [
"Python-2.0",
"OLDAP-2.7"
] | 6 | 2020-05-13T15:48:24.000Z | 2021-01-27T15:59:28.000Z | Python2.7-IDCard_Detect_by_AI/idcard_detection.py | TencentCloud/Serverless-examples | 4cfe9183e4fd547762ac610e9370f8c98bf5de70 | [
"Python-2.0",
"OLDAP-2.7"
] | 2 | 2020-07-18T13:24:20.000Z | 2021-05-10T17:36:53.000Z | Python2.7-IDCard_Detect_by_AI/idcard_detection.py | TencentCloud/Serverless-examples | 4cfe9183e4fd547762ac610e9370f8c98bf5de70 | [
"Python-2.0",
"OLDAP-2.7"
] | 4 | 2020-04-15T13:05:23.000Z | 2021-04-19T02:12:24.000Z | # -*- coding: utf-8 -*-
import json
import os
import logging
import datetime
from qcloud_cos_v5 import CosConfig
from qcloud_cos_v5 import CosS3Client
from qcloud_cos_v5 import CosServiceError
from tencentcloud.common import credential
from tencentcloud.common.profile.client_profile import ClientProfile
from tencentclo... | 36.421488 | 108 | 0.638983 |
5b6d01bfd633f705953af3efeb56ba8c5b83f3bd | 527 | py | Python | 06_Joining Data with pandas/02_Merging Tables With Different Join Types/08_How does pandas handle self joins.py | mohd-faizy/DataScience-With-Python | 13ebb10cf9083343056d5b782957241de1d595f9 | [
"MIT"
] | 5 | 2021-02-03T14:36:58.000Z | 2022-01-01T10:29:26.000Z | 06_Joining Data with pandas/02_Merging Tables With Different Join Types/08_How does pandas handle self joins.py | mohd-faizy/DataScience-With-Python | 13ebb10cf9083343056d5b782957241de1d595f9 | [
"MIT"
] | null | null | null | 06_Joining Data with pandas/02_Merging Tables With Different Join Types/08_How does pandas handle self joins.py | mohd-faizy/DataScience-With-Python | 13ebb10cf9083343056d5b782957241de1d595f9 | [
"MIT"
] | 3 | 2021-02-08T00:31:16.000Z | 2022-03-17T13:52:32.000Z | '''
How does pandas handle self joins?
Select the false statement about merging a table to itself.
Answer the question
Possible Answers
1. You can merge a table to itself with a right join.[X]
2. Merging a table to itself can allow you to compare values in a column to
other values in the same column.[X]
3. The ... | 25.095238 | 79 | 0.743833 |
a09de6dbecf713b694b8a832ed3d9c4ca0285d39 | 1,422 | py | Python | main.py | GunshipPenguin/prospector | fd760dd7f8eff684aa9022cc6c5a8febfaba3ebd | [
"MIT"
] | null | null | null | main.py | GunshipPenguin/prospector | fd760dd7f8eff684aa9022cc6c5a8febfaba3ebd | [
"MIT"
] | 1 | 2017-01-21T22:54:37.000Z | 2017-01-21T22:54:37.000Z | main.py | GunshipPenguin/prospector | fd760dd7f8eff684aa9022cc6c5a8febfaba3ebd | [
"MIT"
] | null | null | null | from flask import Flask
from challengeswrapper import ChallengesWrapper
challengesWrapper = ChallengesWrapper()
app = Flask(__name__)
@app.route('/<challenge_id>')
def challenge(challenge_id):
'''
Controller that gives responses for a specific challenge. challenge_id is
the unique id of the challenge. If ... | 28.44 | 77 | 0.703938 |
64565ac5699fac2b6660bded653a45da4f94c48f | 493 | py | Python | bang/dag/serializers.py | rgoss-waystar/bang | dfc739fbeead20e5dbbf2f39a23d69517a3fac2e | [
"MIT"
] | null | null | null | bang/dag/serializers.py | rgoss-waystar/bang | dfc739fbeead20e5dbbf2f39a23d69517a3fac2e | [
"MIT"
] | 4 | 2021-03-19T04:50:40.000Z | 2022-02-10T09:04:08.000Z | bang/dag/serializers.py | jvhart/bang | 665cc3271130ab9292e5ec4a2e6ec5a41fb5cb05 | [
"MIT"
] | 3 | 2020-07-08T10:43:13.000Z | 2021-03-04T14:06:54.000Z | from . import models
from rest_framework import serializers
class DAGProcessStatusSerializer(serializers.ModelSerializer):
observed_time = serializers.DateTimeField(format="%Y-%m-%dT%H:%M:%S")
class Meta:
model = models.DAGProcessStatus
fields = (
'pk',
'dag_proc... | 24.65 | 73 | 0.578093 |
142f122a6e22141f9e12abddd8469dd77ef8adc9 | 4,401 | py | Python | Agents/mirl.py | TylerJamesMalloy/bullet3 | e357853815c1e0297683218273de79e586b574c8 | [
"Zlib"
] | null | null | null | Agents/mirl.py | TylerJamesMalloy/bullet3 | e357853815c1e0297683218273de79e586b574c8 | [
"Zlib"
] | null | null | null | Agents/mirl.py | TylerJamesMalloy/bullet3 | e357853815c1e0297683218273de79e586b574c8 | [
"Zlib"
] | null | null | null | import logging, os, time, multiprocessing, sys, signal
logging.disable(logging.WARNING)
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
import tensorflow as tf
import gym
import pybullet, pybullet_envs, pybullet_data
import numpy as np
import pandas as pd
from stable_baselines.sac.policies import MlpPolicy
from stable_bas... | 37.615385 | 159 | 0.6778 |
0d398c15301276f39bfc00d923b6ce455e0918c7 | 22,789 | py | Python | tests/providers/google/cloud/hooks/test_pubsub.py | arezamoosavi/airflow | c3c81c3144386d1de535c1c5e777270e727bb69e | [
"Apache-2.0"
] | 2 | 2016-08-23T14:22:15.000Z | 2017-09-28T19:45:26.000Z | tests/providers/google/cloud/hooks/test_pubsub.py | arezamoosavi/airflow | c3c81c3144386d1de535c1c5e777270e727bb69e | [
"Apache-2.0"
] | 4 | 2019-01-24T11:01:17.000Z | 2022-02-28T04:28:07.000Z | tests/providers/google/cloud/hooks/test_pubsub.py | arezamoosavi/airflow | c3c81c3144386d1de535c1c5e777270e727bb69e | [
"Apache-2.0"
] | 6 | 2018-04-09T07:46:05.000Z | 2019-07-16T00:13:15.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 41.209765 | 110 | 0.649743 |
0bdbd134a4f33f4ae87ef0df061ae8afd4b7b957 | 8,139 | py | Python | tensorflow_tts/processor/base_processor.py | fkemeth/TensorFlowTTS | 16b5885e4152f4af19fe99501f1ce4d6c1d61940 | [
"Apache-2.0"
] | null | null | null | tensorflow_tts/processor/base_processor.py | fkemeth/TensorFlowTTS | 16b5885e4152f4af19fe99501f1ce4d6c1d61940 | [
"Apache-2.0"
] | null | null | null | tensorflow_tts/processor/base_processor.py | fkemeth/TensorFlowTTS | 16b5885e4152f4af19fe99501f1ce4d6c1d61940 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 TensorFlowTTS 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.0
#
# Unless required by applicab... | 35.081897 | 93 | 0.595282 |
fe77de3c2757149de9b70b33431998b93bde63e5 | 5,197 | py | Python | src/segments/tests/test_views.py | augustuswm/flagsmith-api | 6f37947fe3791726a92b4df2cdbded11e77387d3 | [
"BSD-3-Clause"
] | 1,259 | 2021-06-10T11:24:09.000Z | 2022-03-31T10:30:44.000Z | src/segments/tests/test_views.py | augustuswm/flagsmith-api | 6f37947fe3791726a92b4df2cdbded11e77387d3 | [
"BSD-3-Clause"
] | 392 | 2021-06-10T11:12:29.000Z | 2022-03-31T10:13:53.000Z | src/segments/tests/test_views.py | augustuswm/flagsmith-api | 6f37947fe3791726a92b4df2cdbded11e77387d3 | [
"BSD-3-Clause"
] | 58 | 2021-06-11T03:18:07.000Z | 2022-03-31T14:39:10.000Z | import json
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from audit.models import AuditLog, RelatedObjectType
from environments.identities.models import Identity
from environments.identities.traits.models i... | 32.48125 | 87 | 0.594381 |
919bd847c02b814fc0c5cfb9fb2cf0c42e03efdf | 13,719 | py | Python | hstrat/hstrat/stratum_retention_predicates/StratumRetentionPredicateGeomSeqNthRoot.py | mmore500/hstrat | 7fedcf3a7203e1e6c99ac16f4ec43ad160da3e6c | [
"MIT"
] | null | null | null | hstrat/hstrat/stratum_retention_predicates/StratumRetentionPredicateGeomSeqNthRoot.py | mmore500/hstrat | 7fedcf3a7203e1e6c99ac16f4ec43ad160da3e6c | [
"MIT"
] | 3 | 2022-02-28T17:33:57.000Z | 2022-02-28T21:41:33.000Z | hstrat/hstrat/stratum_retention_predicates/StratumRetentionPredicateGeomSeqNthRoot.py | mmore500/hstrat | 7fedcf3a7203e1e6c99ac16f4ec43ad160da3e6c | [
"MIT"
] | null | null | null | import itertools as it
import math
import numpy as np
import typing
from ...helpers import bit_floor, is_nondecreasing
class StratumRetentionPredicateGeomSeqNthRoot:
"""Functor to implement the approximate space-filling MRCA-recency-
proportional resolution stratum retention policy, for use with
Heredita... | 37.586301 | 503 | 0.644581 |
7c502a9c213caed88dd248344dbc412f6d7e6a66 | 18 | py | Python | allennlp/tests/fixtures/plugins/project_b/allennlp_plugins/b/__init__.py | justindujardin/allennlp | c4559f3751775aa8bc018db417edc119d29d8051 | [
"Apache-2.0"
] | 1 | 2020-03-30T14:07:02.000Z | 2020-03-30T14:07:02.000Z | allennlp/tests/fixtures/plugins/project_b/allennlp_plugins/b/__init__.py | justindujardin/allennlp | c4559f3751775aa8bc018db417edc119d29d8051 | [
"Apache-2.0"
] | 123 | 2020-04-26T02:41:30.000Z | 2021-08-02T21:18:00.000Z | allennlp/tests/fixtures/plugins/project_b/allennlp_plugins/b/__init__.py | justindujardin/allennlp | c4559f3751775aa8bc018db417edc119d29d8051 | [
"Apache-2.0"
] | 2 | 2019-12-21T05:58:44.000Z | 2021-08-16T07:41:21.000Z | from b.b import B
| 9 | 17 | 0.722222 |
1939818a7e8be168bae1a7d689bc1ec8d85bbde6 | 5,514 | py | Python | test/terra/backends/aer_simulator/test_chunk.py | garrison/qiskit-aer | 24c51a675b8653c8ad2af587d40b795ac94c07c7 | [
"Apache-2.0"
] | 313 | 2018-12-19T09:19:12.000Z | 2022-03-21T18:15:41.000Z | test/terra/backends/aer_simulator/test_chunk.py | garrison/qiskit-aer | 24c51a675b8653c8ad2af587d40b795ac94c07c7 | [
"Apache-2.0"
] | 933 | 2018-12-21T02:56:49.000Z | 2022-03-30T01:19:54.000Z | test/terra/backends/aer_simulator/test_chunk.py | chriseclectic/qiskit-aer | 61b028b7ccd1d6e96c8de48a10648c0bc3c07ff9 | [
"Apache-2.0"
] | 313 | 2018-12-19T14:52:55.000Z | 2022-02-28T20:20:14.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019, 2020, 2021.
#
# 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 modification... | 36.039216 | 90 | 0.649075 |
423a03a8f8e6423010f19833ccb9f75fd214ebb0 | 878 | py | Python | alipay/aop/api/domain/KoubeiCateringTablelistQueryModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/KoubeiCateringTablelistQueryModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/KoubeiCateringTablelistQueryModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class KoubeiCateringTablelistQueryModel(object):
def __init__(self):
self._shop_id = None
@property
def shop_id(self):
return self._shop_id
@shop_id.setter
def shop_id... | 21.414634 | 65 | 0.587699 |
a3f22495213c4cf49f33ac6b407f9698218e262c | 1,829 | py | Python | var/spack/repos/builtin/packages/r-survey/package.py | RemoteConnectionManager/spack | f2967b6c16effd26ce007cf86cadbb645c574f50 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-survey/package.py | RemoteConnectionManager/spack | f2967b6c16effd26ce007cf86cadbb645c574f50 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 17 | 2018-09-20T18:32:50.000Z | 2019-12-04T16:58:12.000Z | var/spack/repos/builtin/packages/r-survey/package.py | RemoteConnectionManager/spack | f2967b6c16effd26ce007cf86cadbb645c574f50 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-09-21T07:45:10.000Z | 2019-09-21T07:45:10.000Z | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RSurvey(RPackage):
"""Summary statistics, two-sample tests, rank tests, generalised linear... | 52.257143 | 96 | 0.694369 |
f399bd0b0266e5bffdbd3b41b802d7e07421c880 | 3,657 | py | Python | tests/test_glob.py | olson-sean-k/peru | 67b14affa621faae2ac4e0ee680065ab611d56d9 | [
"MIT"
] | null | null | null | tests/test_glob.py | olson-sean-k/peru | 67b14affa621faae2ac4e0ee680065ab611d56d9 | [
"MIT"
] | null | null | null | tests/test_glob.py | olson-sean-k/peru | 67b14affa621faae2ac4e0ee680065ab611d56d9 | [
"MIT"
] | null | null | null | import collections
import re
import peru.glob as glob
import shared
class GlobTest(shared.PeruTest):
def test_split_on_stars_interpreting_backslashes(self):
cases = [
('', ['']),
('*', ['', '']),
('abc', ['abc']),
('abc\\', ['abc\\']),
('abc\\n'... | 37.701031 | 79 | 0.411266 |
d7bc9fae7f366ff6e7e593cf72207527ed2ed4f5 | 1,224 | py | Python | travelmap.py | alexmmorgan/alexmmorgan.github.io | d5f63822e865bcecf8539fc337db2fa2fcc642a5 | [
"MIT"
] | null | null | null | travelmap.py | alexmmorgan/alexmmorgan.github.io | d5f63822e865bcecf8539fc337db2fa2fcc642a5 | [
"MIT"
] | null | null | null | travelmap.py | alexmmorgan/alexmmorgan.github.io | d5f63822e865bcecf8539fc337db2fa2fcc642a5 | [
"MIT"
] | null | null | null |
# # Leaflet cluster map of talk locations
#
# (c) 2016-2017 R. Stuart Geiger, released under the MIT license
#
# Run this from the _talks/ directory, which contains .md files of all your talks.
# This scrapes the location YAML field from each .md file, geolocates it with
# geopy/Nominatim, and uses the getorg librar... | 24.48 | 104 | 0.652778 |
0f54c2e66133782dfb4b830ea1ac61519d8b9b37 | 2,148 | py | Python | internal/notes/builtin-SAVE/packages/tycho2/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/tycho2/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/tycho2/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2017, Los Alamos National Security, LLC
# Produced at the Los Alamos National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, ... | 37.684211 | 78 | 0.636406 |
fef0f03740630e3927bc8367f7b0e98d4eb08c75 | 25,832 | py | Python | os_ken/services/protocols/bgp/info_base/vrf.py | rolaya/os-ken | 10009e41539c737c7c423f13e4f5bc5f46d219ff | [
"Apache-2.0"
] | 1 | 2019-04-24T04:01:07.000Z | 2019-04-24T04:01:07.000Z | os_ken/services/protocols/bgp/info_base/vrf.py | anlaneg/os-ken | 379a7694c3129cc0156343af71f4fca8830d9de5 | [
"Apache-2.0"
] | null | null | null | os_ken/services/protocols/bgp/info_base/vrf.py | anlaneg/os-ken | 379a7694c3129cc0156343af71f4fca8830d9de5 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.962293 | 80 | 0.616987 |
3f0a8a139ea67df44cc97157f36d1c1e006062f9 | 5,188 | py | Python | lulu/extractors/ucas.py | fakegit/Lulu | 940c9344df8aab6044ec603f8e78d145b0f9bad7 | [
"MIT"
] | 922 | 2018-01-17T09:22:26.000Z | 2022-03-28T04:10:45.000Z | lulu/extractors/ucas.py | fakegit/Lulu | 940c9344df8aab6044ec603f8e78d145b0f9bad7 | [
"MIT"
] | 83 | 2018-01-16T08:33:55.000Z | 2021-06-25T06:18:24.000Z | lulu/extractors/ucas.py | fakegit/Lulu | 940c9344df8aab6044ec603f8e78d145b0f9bad7 | [
"MIT"
] | 156 | 2018-02-03T06:24:14.000Z | 2022-01-05T05:39:14.000Z | #!/usr/bin/env python
import re
import http.client
from time import time
from copy import copy
from random import random
import xml.etree.ElementTree as ET
from lulu.common import (
match1,
print_info,
get_content,
download_urls,
)
from lulu.config import FAKE_HEADERS
__all__ = ['ucas_download', 'uc... | 27.743316 | 78 | 0.616037 |
cae1ff3eadc97b44f563b6d821687c1e39077b38 | 1,553 | py | Python | umakit/general.py | taruma/belajar-tsa | ded702846f0453993ba90738a4b6b2401abe9177 | [
"MIT"
] | null | null | null | umakit/general.py | taruma/belajar-tsa | ded702846f0453993ba90738a4b6b2401abe9177 | [
"MIT"
] | null | null | null | umakit/general.py | taruma/belajar-tsa | ded702846f0453993ba90738a4b6b2401abe9177 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Oct 5 09:01:45 2018
@author: tarum
"""
# Ignore this block code.
# Define Function for printing result
def cetak(name, val, unit = "", pad=50):
print('| {:>15s} = {:>10.5f} {:<{n}s}|'.format(name, val, unit, n = pad-15-10-7))
def new_line(pad = 50):
print('='*p... | 24.265625 | 85 | 0.547328 |
64f576ad6e5a883dc5fb04220572007d36367796 | 949 | py | Python | simuvex/procedures/libc___so___6/realloc.py | praetorian-inc/simuvex | 7984bc4432a1c2126e6f2eb963c935e9f6a98da5 | [
"BSD-2-Clause"
] | 8 | 2016-01-19T03:13:32.000Z | 2020-11-03T09:30:05.000Z | simuvex/procedures/libc___so___6/realloc.py | praetorian-inc/simuvex | 7984bc4432a1c2126e6f2eb963c935e9f6a98da5 | [
"BSD-2-Clause"
] | null | null | null | simuvex/procedures/libc___so___6/realloc.py | praetorian-inc/simuvex | 7984bc4432a1c2126e6f2eb963c935e9f6a98da5 | [
"BSD-2-Clause"
] | 3 | 2017-04-24T00:22:30.000Z | 2020-11-03T09:30:06.000Z | import simuvex
from simuvex.s_type import SimTypeLength, SimTypeTop
import logging
l = logging.getLogger("simuvex.procedures.libc.realloc")
######################################
# realloc
######################################
class realloc(simuvex.SimProcedure):
#pylint:disable=arguments-differ
def run(se... | 30.612903 | 77 | 0.609062 |
c37676591bba966850b415fbc82b34c3267e8d93 | 6,630 | py | Python | perceptrons.py | Ras-al-Ghul/PerceptronAlgorithms-NeuralNetwork | c8ef655f59d2840e3c27f333a4af7f58295de580 | [
"CECILL-B"
] | 2 | 2018-09-06T09:55:27.000Z | 2020-02-02T17:57:23.000Z | perceptrons.py | Ras-al-Ghul/PerceptronAlgorithms-NeuralNetwork | c8ef655f59d2840e3c27f333a4af7f58295de580 | [
"CECILL-B"
] | null | null | null | perceptrons.py | Ras-al-Ghul/PerceptronAlgorithms-NeuralNetwork | c8ef655f59d2840e3c27f333a4af7f58295de580 | [
"CECILL-B"
] | null | null | null | from random import randrange
import matplotlib.pyplot as plt
from copy import deepcopy
from math import sqrt
from time import time
class1 = [[1, 2, 7], [1, 8, 1], [1, 7, 5], [1, 6, 3], [1, 7, 8], [1, 5, 9], [1, 4, 5]]
class2 = [[1, 4, 2], [1, -1, -1], [1, 1, 3], [1, 3, -2], [1, 5, 3.25], [1, 2, 4], [1, 7, 1]]
global ... | 20.213415 | 213 | 0.611463 |
47e9feaf3c66abbcd76fffa9da115a188db55f3d | 175 | py | Python | x_6_3.py | ofl/kuku | 76eefc0d3d859051473ee0d5f48b5d42d17d05a6 | [
"MIT"
] | null | null | null | x_6_3.py | ofl/kuku | 76eefc0d3d859051473ee0d5f48b5d42d17d05a6 | [
"MIT"
] | 4 | 2021-09-23T03:19:52.000Z | 2021-11-13T10:38:21.000Z | x_6_3.py | ofl/kuku | 76eefc0d3d859051473ee0d5f48b5d42d17d05a6 | [
"MIT"
] | null | null | null | # x_6_3
#
# 全てのメンバーに対して「○○さんこんにちは」と表示できるようにプログラムを追加してください
# ヒント: for文の中でさらにfor文を使う
teams = [
['桃太郎', 'いぬ', 'さる', 'きじ'],
['かに', 'くり', 'うす', 'はち', '牛糞']
]
print(teams)
| 15.909091 | 47 | 0.571429 |
5e971151427000eb78a58d12e4f9c79c58f9bbf1 | 840 | py | Python | pyrival/data_structures/tree_repr.py | MattJDavidson/aoc2021 | 1c26697da55e58408f36525639d201303f808b1b | [
"Apache-2.0"
] | 748 | 2018-09-27T01:08:12.000Z | 2022-03-25T17:31:56.000Z | pyrival/data_structures/tree_repr.py | MattJDavidson/aoc2021 | 1c26697da55e58408f36525639d201303f808b1b | [
"Apache-2.0"
] | 38 | 2019-02-24T14:50:02.000Z | 2022-03-25T01:27:50.000Z | pyrival/data_structures/tree_repr.py | MattJDavidson/aoc2021 | 1c26697da55e58408f36525639d201303f808b1b | [
"Apache-2.0"
] | 288 | 2018-10-29T11:55:57.000Z | 2022-03-20T04:37:27.000Z | def tree_repr(tree):
def recursive_repr(i):
if i >= tree._size:
return [str(tree.data[i])]
left = recursive_repr(2 * i)
right = recursive_repr(2 * i + 1)
lines = ["{} {}".format(l, r) for l, r in zip(left, right)]
width = len(lines[0])
left_width = len... | 33.6 | 88 | 0.519048 |
555271bf11dbbf1eb89076ee3ad26aae8f32596b | 10,228 | py | Python | docs/conf.py | lcv3/SyncGitlab2MSProject | 4a81191b7deb6974e893d44f3b04fcfc1da36571 | [
"MIT"
] | 4 | 2020-11-21T13:53:00.000Z | 2022-02-25T08:26:36.000Z | docs/conf.py | lcv3/SyncGitlab2MSProject | 4a81191b7deb6974e893d44f3b04fcfc1da36571 | [
"MIT"
] | 8 | 2020-11-11T15:30:25.000Z | 2022-02-25T08:28:05.000Z | docs/conf.py | lcv3/SyncGitlab2MSProject | 4a81191b7deb6974e893d44f3b04fcfc1da36571 | [
"MIT"
] | 1 | 2022-02-24T16:11:40.000Z | 2022-02-24T16:11:40.000Z | # -*- coding: utf-8 -*-
#
# 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.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
impo... | 32.062696 | 88 | 0.696031 |
d4cdf413f11b9f560fac58bb146ec2e572eb2ec8 | 2,194 | py | Python | docs_src/tutorial/connect/select/tutorial001.py | javivdm/sqlmodel | 050372be795ff3c292c0e9263b93f94023f38d15 | [
"MIT"
] | 5,490 | 2021-08-24T14:27:44.000Z | 2022-03-31T14:24:20.000Z | docs_src/tutorial/connect/select/tutorial001.py | javivdm/sqlmodel | 050372be795ff3c292c0e9263b93f94023f38d15 | [
"MIT"
] | 231 | 2021-08-24T15:22:14.000Z | 2022-03-30T14:39:44.000Z | docs_src/tutorial/connect/select/tutorial001.py | javivdm/sqlmodel | 050372be795ff3c292c0e9263b93f94023f38d15 | [
"MIT"
] | 245 | 2021-08-24T15:00:27.000Z | 2022-03-30T02:12:56.000Z | from typing import Optional
from sqlmodel import Field, Session, SQLModel, create_engine, select
class Team(SQLModel, table=True):
id: Optional[int] = Field(default=None, primary_key=True)
name: str = Field(index=True)
headquarters: str
class Hero(SQLModel, table=True):
id: Optional[int] = Field(de... | 27.772152 | 81 | 0.658159 |
b31dc8f6afe77a74a084b4c1cd7191ff5abaf6b0 | 1,445 | py | Python | cellacdc/models/cellpose/acdcSegment.py | SchmollerLab/Cell_ACDC | 2be9c0055c3306c4c35da99831f146d8a211baa0 | [
"BSD-3-Clause"
] | 29 | 2021-10-01T09:43:26.000Z | 2022-03-15T10:46:53.000Z | cellacdc/models/cellpose/acdcSegment.py | SchmollerLab/Cell_ACDC | 2be9c0055c3306c4c35da99831f146d8a211baa0 | [
"BSD-3-Clause"
] | 15 | 2022-02-04T09:21:43.000Z | 2022-03-31T08:29:00.000Z | cellacdc/models/cellpose/acdcSegment.py | SchmollerLab/Cell_ACDC | 2be9c0055c3306c4c35da99831f146d8a211baa0 | [
"BSD-3-Clause"
] | 1 | 2022-03-15T02:23:02.000Z | 2022-03-15T02:23:02.000Z | import os
import pathlib
import numpy as np
import skimage.exposure
import skimage.filters
from cellpose import models
from cellacdc.models import CELLPOSE_MODELS
help_url = 'https://cellpose.readthedocs.io/en/latest/api.html'
class Model:
def __init__(self, model_type='cyto', net_avg=False, gpu=False):
... | 28.333333 | 68 | 0.585467 |
71d8e82f8d2c1c2e9da14f753d28badf2a2e1345 | 7,928 | py | Python | nipype/interfaces/ants/visualization.py | Conxz/nipype | 1281723ae56eacd103597ff4081a205583706e62 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/ants/visualization.py | Conxz/nipype | 1281723ae56eacd103597ff4081a205583706e62 | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/ants/visualization.py | Conxz/nipype | 1281723ae56eacd103597ff4081a205583706e62 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""The ants visualisation module provides basic functions based on ITK.
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
... | 49.55 | 108 | 0.584006 |
03cc1096d672161aedce10afe5b5bec7da0e76da | 585 | py | Python | jirani/migrations/0006_auto_20181017_2139.py | samsoluoch/Neighborhood | 8a05b3882290765e06c72c1609767ec36056ba24 | [
"MIT"
] | null | null | null | jirani/migrations/0006_auto_20181017_2139.py | samsoluoch/Neighborhood | 8a05b3882290765e06c72c1609767ec36056ba24 | [
"MIT"
] | null | null | null | jirani/migrations/0006_auto_20181017_2139.py | samsoluoch/Neighborhood | 8a05b3882290765e06c72c1609767ec36056ba24 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-10-17 18:39
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jirani', '0005_business'),
]
operations = [
migrations.AddField(
... | 22.5 | 46 | 0.577778 |
fce3a4a3681d5d28ed4de34cbf57a5989e8f54e8 | 18,315 | py | Python | Main Code/WebService/app.py | abhiagarwal18/Question-Answering-and-Ranking-System | 86fc805cdbbddbf543eddc19151a1f1be264607e | [
"MIT"
] | 2 | 2020-08-25T16:53:35.000Z | 2020-09-20T10:59:16.000Z | Main Code/WebService/app.py | abhiagarwal18/Question-Answering-and-Ranking-System | 86fc805cdbbddbf543eddc19151a1f1be264607e | [
"MIT"
] | null | null | null | Main Code/WebService/app.py | abhiagarwal18/Question-Answering-and-Ranking-System | 86fc805cdbbddbf543eddc19151a1f1be264607e | [
"MIT"
] | 1 | 2020-09-20T11:00:42.000Z | 2020-09-20T11:00:42.000Z | from flask import Flask, request, Response, jsonify, render_template
import flask
import requests
import urllib.request
import time
from bs4 import BeautifulSoup
from urllib.request import urlopen
import csv,json
# Cosine Similarity
import nltk, string, numpy
from nltk.corpus import stopwords
from sklearn.feature_ex... | 32.705357 | 197 | 0.630139 |
5f83a4bf858120d863a9c01a16d800340842b8bb | 24,089 | py | Python | sdk/python/pulumi_vault/mfa_duo.py | pulumi/pulumi-vault | 1682875f4a5d7d508f36e166529ad2b8aec34090 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2019-10-07T17:44:18.000Z | 2022-03-30T20:46:33.000Z | sdk/python/pulumi_vault/mfa_duo.py | pulumi/pulumi-vault | 1682875f4a5d7d508f36e166529ad2b8aec34090 | [
"ECL-2.0",
"Apache-2.0"
] | 79 | 2019-10-11T18:13:07.000Z | 2022-03-31T21:09:41.000Z | sdk/python/pulumi_vault/mfa_duo.py | pulumi/pulumi-vault | 1682875f4a5d7d508f36e166529ad2b8aec34090 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-10-28T10:08:40.000Z | 2020-03-17T14:20:55.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 46.865759 | 303 | 0.636639 |
40b8cadadaa9c20a862062cf0e39883f513b9a89 | 4,686 | py | Python | smacc2_sm_reference_library/sm_dance_bot_warehouse_2/launch/gazebo_launch.py | droidware-ai/SMACC2 | 1aa0680f71c1b22f06e1a9b129a0a42b36911139 | [
"Apache-2.0"
] | 48 | 2021-05-28T01:33:20.000Z | 2022-03-24T03:16:03.000Z | smacc2_sm_reference_library/sm_dance_bot_warehouse_2/launch/gazebo_launch.py | droidware-ai/SMACC2 | 1aa0680f71c1b22f06e1a9b129a0a42b36911139 | [
"Apache-2.0"
] | 75 | 2021-06-25T22:11:21.000Z | 2022-03-30T13:05:38.000Z | smacc2_sm_reference_library/sm_dance_bot_warehouse_2/launch/gazebo_launch.py | droidware-ai/SMACC2 | 1aa0680f71c1b22f06e1a9b129a0a42b36911139 | [
"Apache-2.0"
] | 14 | 2021-06-16T12:10:57.000Z | 2022-03-01T18:23:27.000Z | # Copyright 2021 RobosoftAI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 31.662162 | 99 | 0.673496 |
fcfef06e483ef27f4bfa8e7838435f27896ab732 | 488 | py | Python | clubsuite/suite/migrations/0031_event_image.py | fsxfreak/club-suite | 312b5f41e7ff3f9dd332332f74d77c0667a04404 | [
"MIT"
] | 14 | 2017-03-08T03:35:01.000Z | 2021-01-03T00:26:18.000Z | clubsuite/suite/migrations/0031_event_image.py | fsxfreak/club-suite | 312b5f41e7ff3f9dd332332f74d77c0667a04404 | [
"MIT"
] | 44 | 2017-03-07T08:01:28.000Z | 2017-03-16T07:50:05.000Z | clubsuite/suite/migrations/0031_event_image.py | fsxfreak/club-suite | 312b5f41e7ff3f9dd332332f74d77c0667a04404 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-04 21:28
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('suite', '0030_merge_20170304_2119'),
]
operations = [
migrations.AddField(
... | 23.238095 | 92 | 0.625 |
ce056f67be2a3ed64284ee54f90379537fcae589 | 1,273 | py | Python | keras_guide/4-regressor_example.py | giraffe-tree/play-tf | 30f39f228d55fdeb35f1bd420b3bb29ecd3ade96 | [
"MIT"
] | null | null | null | keras_guide/4-regressor_example.py | giraffe-tree/play-tf | 30f39f228d55fdeb35f1bd420b3bb29ecd3ade96 | [
"MIT"
] | null | null | null | keras_guide/4-regressor_example.py | giraffe-tree/play-tf | 30f39f228d55fdeb35f1bd420b3bb29ecd3ade96 | [
"MIT"
] | null | null | null | import numpy as np
np.random.seed(1337) # for reproducibility
from keras.models import Sequential
from keras.layers import Dense
import matplotlib.pyplot as plt
'''
教程地址
https://morvanzhou.github.io/tutorials/machine-learning/keras/2-1-regressor/
'''
# create some data
X = np.linspace(-1, 1, 200)
np.random.shuffle... | 24.960784 | 76 | 0.681854 |
c4ce40e3751bc9fca5aa7f751e79cf10fbc17716 | 20,556 | py | Python | eve_ros2_examples/whole_body_robot_bringup.py | Halodi/eve-ros2-examples | 22e8f084986ec1f680e3f77814eb008394a3f5d3 | [
"Apache-2.0"
] | 2 | 2021-07-08T13:58:57.000Z | 2021-11-04T12:02:12.000Z | eve_ros2_examples/whole_body_robot_bringup.py | Halodi/eve-ros2-examples | 22e8f084986ec1f680e3f77814eb008394a3f5d3 | [
"Apache-2.0"
] | 6 | 2021-04-06T17:12:47.000Z | 2021-06-16T13:24:00.000Z | eve_ros2_examples/whole_body_robot_bringup.py | Halodi/eve-ros2-examples | 22e8f084986ec1f680e3f77814eb008394a3f5d3 | [
"Apache-2.0"
] | 3 | 2021-07-08T13:59:00.000Z | 2022-01-23T20:52:00.000Z | #!/usr/bin/env python3
# Copyright 2021 Halodi Robotics
#
# 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 o... | 42.122951 | 99 | 0.746108 |
4fcc1fcc4178695bd9c5de3e27983311d683d3f8 | 5,269 | py | Python | phanterpwa/interface/Admin/api/handlers.py | PhanterJR/phanterpwa | 6daff40845b3a853cd08d319c4ce148f8deebed7 | [
"MIT"
] | 2 | 2019-06-06T10:37:01.000Z | 2021-10-16T03:36:28.000Z | phanterpwa/interface/Admin/api/handlers.py | PhanterJR/phanterpwa | 6daff40845b3a853cd08d319c4ce148f8deebed7 | [
"MIT"
] | null | null | null | phanterpwa/interface/Admin/api/handlers.py | PhanterJR/phanterpwa | 6daff40845b3a853cd08d319c4ce148f8deebed7 | [
"MIT"
] | null | null | null | import os
from phanterpwa.backend.request_handlers import (
admin,
auth,
credentials,
i18n_server,
oauth
)
# Your conttrolers
from .controllers import (
welcome,
developer,
)
from core import (
projectConfig,
Translator_api as Translator,
Translator_email,
Translator_captcha... | 29.768362 | 85 | 0.632568 |
53044914324e50207b58d77ee7b3ab0213e4ea75 | 680 | py | Python | dask_sql/physical/rex/base.py | DaceT/dask-sql | c545f2bf9a786b0e9ff7f68c90da4dcc39cdcd73 | [
"MIT"
] | 154 | 2020-08-28T03:03:39.000Z | 2021-08-07T02:02:36.000Z | dask_sql/physical/rex/base.py | ciusji/dask-sql | 3815a494e1e93558fca86a86d59578ba6696c9c5 | [
"MIT"
] | 192 | 2020-08-26T20:05:24.000Z | 2021-08-13T16:14:00.000Z | dask_sql/physical/rex/base.py | ciusji/dask-sql | 3815a494e1e93558fca86a86d59578ba6696c9c5 | [
"MIT"
] | 29 | 2020-08-28T17:15:51.000Z | 2021-08-02T20:19:44.000Z | from typing import Any, Union
import dask.dataframe as dd
import dask_sql
from dask_sql.datacontainer import DataContainer
from dask_sql.java import org
class BaseRexPlugin:
"""
Base class for all plugins to convert between
a RexNode to a python expression (dask dataframe column or raw value).
Deri... | 23.448276 | 74 | 0.686765 |
5e04e31fb26f00a78508e883c2e2e25b9a5b3d1c | 20,879 | py | Python | tests/api/test_attributes.py | cxsper/saleor | 5566ddcdaf8f72ba872eca869798e66eb9cdae44 | [
"BSD-3-Clause"
] | 1 | 2019-05-19T18:41:28.000Z | 2019-05-19T18:41:28.000Z | tests/api/test_attributes.py | cxsper/saleor | 5566ddcdaf8f72ba872eca869798e66eb9cdae44 | [
"BSD-3-Clause"
] | null | null | null | tests/api/test_attributes.py | cxsper/saleor | 5566ddcdaf8f72ba872eca869798e66eb9cdae44 | [
"BSD-3-Clause"
] | 1 | 2021-04-03T10:47:36.000Z | 2021-04-03T10:47:36.000Z | import graphene
import pytest
from django.db.models import Q
from django.template.defaultfilters import slugify
from saleor.graphql.product.enums import AttributeTypeEnum, AttributeValueType
from saleor.graphql.product.types.attributes import resolve_attribute_value_type
from saleor.graphql.product.utils import attrib... | 32.471229 | 88 | 0.637578 |
8e85b921cc4307c99a374ba052dd5d6f58a6b223 | 474 | py | Python | packages/python/plotly/plotly/validators/mesh3d/colorbar/_minexponent.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/mesh3d/colorbar/_minexponent.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/mesh3d/colorbar/_minexponent.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="minexponent", parent_name="mesh3d.colorbar", **kwargs
):
super(MinexponentValidator, self).__init__(
plotly_name=plotly_name,
p... | 31.6 | 80 | 0.647679 |
2f939a72fbb64e7dc423500b36e371b897a8fc9b | 2,168 | py | Python | 01_Plots/plot_time_differences.py | awareseven/Reproducibility-and-Replicability-of-Web-Measurement-Studies | 38953c70a9ab03e1d29e4f9c6da13ffcaaeac84b | [
"Apache-2.0"
] | 3 | 2022-01-27T07:36:24.000Z | 2022-02-22T09:32:53.000Z | 01_Plots/plot_time_differences.py | awareseven/Reproducibility-and-Replicability-of-Web-Measurement-Studies | 38953c70a9ab03e1d29e4f9c6da13ffcaaeac84b | [
"Apache-2.0"
] | null | null | null | 01_Plots/plot_time_differences.py | awareseven/Reproducibility-and-Replicability-of-Web-Measurement-Studies | 38953c70a9ab03e1d29e4f9c6da13ffcaaeac84b | [
"Apache-2.0"
] | 1 | 2022-02-02T08:21:39.000Z | 2022-02-02T08:21:39.000Z | import matplotlib.font_manager as font_manager
import matplotlib.pyplot as plt
import pandas as pd
import os
# Read the data
path = os.path.join(os.getcwd(), "results")
df = pd.read_csv(os.path.join(path, "tracker_AND_cookies.csv"))
x = df["day"]
y1 = df["total_tracker"]
y2 = df["tracker_distinct"]
y3 = df["is_sessio... | 37.37931 | 100 | 0.683579 |
cd12dda2f23e2fd96a7cbb58e97e2ad573761bdb | 6,567 | py | Python | src/OCflow.py | lruthotto/NeuralOC | 3f37c7349527fb1f5890077ebe987f2f77486a54 | [
"MIT"
] | 13 | 2021-05-12T11:52:53.000Z | 2022-03-30T14:50:28.000Z | src/OCflow.py | lruthotto/NeuralOC | 3f37c7349527fb1f5890077ebe987f2f77486a54 | [
"MIT"
] | null | null | null | src/OCflow.py | lruthotto/NeuralOC | 3f37c7349527fb1f5890077ebe987f2f77486a54 | [
"MIT"
] | 3 | 2021-04-20T08:07:50.000Z | 2022-02-15T22:37:12.000Z | # OCflow.py
import math
import torch
from torch.nn.functional import pad
from src.Phi import *
def OCflow(x, Phi, prob, tspan , nt, stepper="rk4", alph =[1.0,1.0,1.0,1.0,1.0,1.0], intermediates=False, noMean=False ):
"""
main workhorse of the approach
:param x: input data tensor nex-by-d
:pa... | 33.676923 | 121 | 0.564489 |
98563e7091d0a948c6a26fd54f07ba0048f714a8 | 2,175 | py | Python | 01_Language/05_Python/study/lesson_03/15.game1.0.py | cliff363825/TwentyFour | 09df59bd5d275e66463e343647f46027397d1233 | [
"MIT"
] | 3 | 2020-06-28T07:42:51.000Z | 2021-01-15T10:32:11.000Z | 01_Language/05_Python/study/lesson_03/15.game1.0.py | cliff363825/TwentyFour | 09df59bd5d275e66463e343647f46027397d1233 | [
"MIT"
] | 9 | 2021-03-10T22:45:40.000Z | 2022-02-27T06:53:20.000Z | 01_Language/05_Python/study/lesson_03/15.game1.0.py | cliff363825/TwentyFour | 09df59bd5d275e66463e343647f46027397d1233 | [
"MIT"
] | 1 | 2021-01-15T10:51:24.000Z | 2021-01-15T10:51:24.000Z | # 显示欢迎信息
print('-' * 20, '欢迎光临《唐僧大战白骨精》', '-' * 20)
# 显示身份选择的信息
print('请选择你的身份:')
print('\t1.唐僧')
print('\t2.白骨精')
# 游戏的身份选择
player_choose = input('请选择[1-2]:')
# 打印一条分割线
print('-' * 66)
# 根据用户的选择来显示不同的提示信息
if player_choose == '1':
# 选择1
print('你已经选择了1,你将以->唐僧<-的身份来进行游戏!')
elif player_choose ... | 22.65625 | 74 | 0.514943 |
3f08a96b4d8aba4a010c336c8ad36fd7f7335952 | 101 | py | Python | Week 2: Conditional statement and while loop/2 (30).py | MLunov/Python-programming-basics-HSE | 7df8bba105db84d6b932c454fdc39193a648254e | [
"MIT"
] | null | null | null | Week 2: Conditional statement and while loop/2 (30).py | MLunov/Python-programming-basics-HSE | 7df8bba105db84d6b932c454fdc39193a648254e | [
"MIT"
] | null | null | null | Week 2: Conditional statement and while loop/2 (30).py | MLunov/Python-programming-basics-HSE | 7df8bba105db84d6b932c454fdc39193a648254e | [
"MIT"
] | null | null | null | x = float(input())
y = float(input())
i = 1
while x < y:
x += 0.1 * x
i += 1
print(i)
| 12.625 | 19 | 0.425743 |
be38b1a4561b1274886efd85665008121c580604 | 23,937 | py | Python | tests/api/common/experimental/test_mark_tasks.py | subrays/airflow | 3c8c0b3b6411762a4e4977e519374d9fb16b541d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | tests/api/common/experimental/test_mark_tasks.py | subrays/airflow | 3c8c0b3b6411762a4e4977e519374d9fb16b541d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | tests/api/common/experimental/test_mark_tasks.py | subrays/airflow | 3c8c0b3b6411762a4e4977e519374d9fb16b541d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 44.575419 | 103 | 0.66416 |
a8eb82c43281050976819501094ed2ce10ec9f7a | 13,938 | py | Python | src/encoded/tests/test_types_biosample.py | 4dn-dcic/fourfron | 29601961706d2371b982e57ae085e8ebec3b2714 | [
"MIT"
] | 11 | 2016-11-23T02:33:13.000Z | 2021-06-18T14:21:20.000Z | src/encoded/tests/test_types_biosample.py | 4dn-dcic/fourfron | 29601961706d2371b982e57ae085e8ebec3b2714 | [
"MIT"
] | 1,159 | 2016-11-21T15:40:24.000Z | 2022-03-29T03:18:38.000Z | src/encoded/tests/test_types_biosample.py | 4dn-dcic/fourfron | 29601961706d2371b982e57ae085e8ebec3b2714 | [
"MIT"
] | 5 | 2017-01-27T16:36:15.000Z | 2019-06-14T14:39:54.000Z | import pytest
# from snovault.schema_utils import load_schema
pytestmark = [pytest.mark.setone, pytest.mark.working, pytest.mark.schema]
@pytest.fixture
def biosample_cc_w_diff(testapp, de_term, lab, award):
item = {
"culture_start_date": "2018-01-01",
"differentiation_state": "Differentiated to... | 41.482143 | 150 | 0.69845 |
f8880474597062a3ddf0b6dee9957a37e866d563 | 8,158 | py | Python | scraper.py | ltasler/nepremicnine.net-scraper | 27da32d500b6e6248c5c2a1d4f6bdf43cc6c199c | [
"Apache-2.0"
] | 3 | 2020-06-30T09:27:37.000Z | 2020-11-11T19:10:39.000Z | scraper.py | ltasler/nepremicnine.net-scraper | 27da32d500b6e6248c5c2a1d4f6bdf43cc6c199c | [
"Apache-2.0"
] | 3 | 2021-03-03T22:44:31.000Z | 2021-12-13T20:03:36.000Z | scraper.py | ltasler/nepremicnine.net-scraper | 27da32d500b6e6248c5c2a1d4f6bdf43cc6c199c | [
"Apache-2.0"
] | 3 | 2020-04-15T14:12:15.000Z | 2021-08-14T13:16:03.000Z | #!/usr/bin/python
import sys
from lxml import html
from time import sleep
from datetime import datetime
import requests
import argparse
import json as jsonOld
import ujson as json
import re
import smtplib
import ssl
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
class Scraper:
... | 35.780702 | 123 | 0.531871 |
506ac0879e0cfedac274b8dd237cdbfdc9c5848a | 3,697 | py | Python | lib/epub.py | ImChinaNB/wenku8dl | c55f4fa5d8144c6973bf447a6d705c9fabc82c55 | [
"MIT"
] | 3 | 2021-11-07T01:35:44.000Z | 2021-11-18T06:52:30.000Z | lib/epub.py | ImChinaNB/wenku8dl | c55f4fa5d8144c6973bf447a6d705c9fabc82c55 | [
"MIT"
] | null | null | null | lib/epub.py | ImChinaNB/wenku8dl | c55f4fa5d8144c6973bf447a6d705c9fabc82c55 | [
"MIT"
] | 1 | 2021-11-25T14:00:41.000Z | 2021-11-25T14:00:41.000Z | import mime, threading, datetime
from ebooklib import epub
from lib.logger import getLogger
from lib.constants import *
L = getLogger("epub")
class Book:
def __init__(self, meta: dict[str], book_id, title, chapter_cnt):
self.book = epub.EpubBook()
self.book.set_identifier(meta['identifier'])
self.book.... | 45.641975 | 173 | 0.656478 |
e2f7d0e59dd4e3dec8caa8d8ab0475cdee562174 | 6,028 | py | Python | app/survey_config/census_config.py | petechd/eq-questionnaire-runner | 1c5b182a7f8bc878cfdd767ae080410fa679abd6 | [
"MIT"
] | 3 | 2020-09-28T13:21:21.000Z | 2021-05-05T14:14:51.000Z | app/survey_config/census_config.py | petechd/eq-questionnaire-runner | 1c5b182a7f8bc878cfdd767ae080410fa679abd6 | [
"MIT"
] | 402 | 2019-11-06T17:23:03.000Z | 2022-03-31T16:03:35.000Z | app/survey_config/census_config.py | petechd/eq-questionnaire-runner | 1c5b182a7f8bc878cfdd767ae080410fa679abd6 | [
"MIT"
] | 10 | 2020-03-03T14:23:27.000Z | 2022-01-31T12:21:21.000Z | from dataclasses import dataclass, field
from typing import Iterable, Mapping, MutableMapping
from flask_babel import lazy_gettext
from flask_babel.speaklater import LazyString
from app.survey_config.link import Link
from app.survey_config.survey_config import SurveyConfig
EN_BASE_URL = "https://census.gov.uk"
CY_BA... | 35.668639 | 108 | 0.597545 |
d9c1847117d8e6f687e3528290ca10fe099228e5 | 24 | py | Python | ciex/version.py | walkr/ciex | bbb61dff82ba767ce1c97caa83be69c0e139a0f5 | [
"MIT"
] | null | null | null | ciex/version.py | walkr/ciex | bbb61dff82ba767ce1c97caa83be69c0e139a0f5 | [
"MIT"
] | null | null | null | ciex/version.py | walkr/ciex | bbb61dff82ba767ce1c97caa83be69c0e139a0f5 | [
"MIT"
] | null | null | null | VERSION = '0.1.0-alpha'
| 12 | 23 | 0.625 |
24f400286e58b4149c14c7019027c83997034a03 | 7,711 | py | Python | projects_automation/automation/handlers.py | konakov-ds/devman_projects_automation | f4298ec4d7b1799cfa7827231fb1fcd21e43a9c5 | [
"MIT"
] | null | null | null | projects_automation/automation/handlers.py | konakov-ds/devman_projects_automation | f4298ec4d7b1799cfa7827231fb1fcd21e43a9c5 | [
"MIT"
] | null | null | null | projects_automation/automation/handlers.py | konakov-ds/devman_projects_automation | f4298ec4d7b1799cfa7827231fb1fcd21e43a9c5 | [
"MIT"
] | null | null | null | from datetime import datetime
from environs import Env
from .models import Student, Group, PM
from telegram import KeyboardButton
from telegram import ReplyKeyboardMarkup
from telegram import ReplyKeyboardRemove
from telegram.ext import CommandHandler
from telegram.ext import ConversationHandler
from telegram.ext impor... | 27.539286 | 77 | 0.638568 |
43f5a50bc13f521cbfc0e8daa181ab1f17ccd6eb | 792 | py | Python | plugin/src/main/resources/org/lcsim/plugin/web/examples/mainLoop.py | omar-moreno/lcsim | ddd2abc441dcbc7b99779abf00e27ebbb5d38f0a | [
"BSD-3-Clause-LBNL"
] | 1 | 2018-10-30T17:37:41.000Z | 2018-10-30T17:37:41.000Z | plugin/src/main/resources/org/lcsim/plugin/web/examples/mainLoop.py | omar-moreno/lcsim | ddd2abc441dcbc7b99779abf00e27ebbb5d38f0a | [
"BSD-3-Clause-LBNL"
] | 26 | 2017-06-28T16:42:04.000Z | 2021-07-22T16:06:59.000Z | plugin/src/main/resources/org/lcsim/plugin/web/examples/mainLoop.py | omar-moreno/lcsim | ddd2abc441dcbc7b99779abf00e27ebbb5d38f0a | [
"BSD-3-Clause-LBNL"
] | 5 | 2017-06-27T14:36:26.000Z | 2020-12-12T22:52:13.000Z | #! /usr/bin/env jython
###
# mainLoop.py
# Wrapper to enable running outside of JAS3
# 03-AUG-2005 Jan Strube
###
from java.io import File
from org.lcsim.util.aida import AIDA
from org.lcsim.util.loop import LCSimLoop
## importing the Java analysis module
import Analysis101
## if Analysis102 cannot be found, please un... | 27.310345 | 66 | 0.763889 |
03967f822f548c644fca6d4174ca5db46959ecf1 | 131 | py | Python | collections/CompanyLogo.py | silvioedu/HackerRank-Python-Practice | e31ebe49d431c0a23fed0cd67a6984e2b0b7a260 | [
"MIT"
] | null | null | null | collections/CompanyLogo.py | silvioedu/HackerRank-Python-Practice | e31ebe49d431c0a23fed0cd67a6984e2b0b7a260 | [
"MIT"
] | null | null | null | collections/CompanyLogo.py | silvioedu/HackerRank-Python-Practice | e31ebe49d431c0a23fed0cd67a6984e2b0b7a260 | [
"MIT"
] | null | null | null | if __name__ == '__main__':
from collections import Counter
[print(*c) for c in Counter(sorted(input())).most_common(3)]
| 32.75 | 65 | 0.671756 |
f8e8891bc61b54d41b5c3c7c5d66b7bf67cb28a2 | 1,151 | py | Python | Datacamp Assignments/Data Engineer Track/7. Command Line Automation in Python/22_fnmatch.py | Ali-Parandeh/Data_Science_Playground | c529e9b3692381572de259e7c93938d6611d83da | [
"MIT"
] | null | null | null | Datacamp Assignments/Data Engineer Track/7. Command Line Automation in Python/22_fnmatch.py | Ali-Parandeh/Data_Science_Playground | c529e9b3692381572de259e7c93938d6611d83da | [
"MIT"
] | null | null | null | Datacamp Assignments/Data Engineer Track/7. Command Line Automation in Python/22_fnmatch.py | Ali-Parandeh/Data_Science_Playground | c529e9b3692381572de259e7c93938d6611d83da | [
"MIT"
] | 1 | 2021-03-10T09:40:05.000Z | 2021-03-10T09:40:05.000Z | # Is this pattern True?
# As the head of data science you often get called in to help a new data scientists
# track down an important intermediate csv file that has gone missing. This has taken
# so much time, that you have decided to write an automated script that identify all
# csv files that are created by a use... | 37.129032 | 106 | 0.735882 |
d1aa4ddac54abb1994b89b79515ae0c840368bf8 | 3,454 | py | Python | oo/carro.py | tarcisosantos/pythonbirds | de4ea90efdeb27b7f77cb9f82b87a1ebf5cea45f | [
"MIT"
] | null | null | null | oo/carro.py | tarcisosantos/pythonbirds | de4ea90efdeb27b7f77cb9f82b87a1ebf5cea45f | [
"MIT"
] | null | null | null | oo/carro.py | tarcisosantos/pythonbirds | de4ea90efdeb27b7f77cb9f82b87a1ebf5cea45f | [
"MIT"
] | 1 | 2020-09-01T04:18:03.000Z | 2020-09-01T04:18:03.000Z | """
vocẽ deve criar uma classe carro que vai possuir
dois atributos compostos por outras duas classes:
1) Motor
2) Direção
O Motor terá a responsabilidade de controlar a velocidade,
ele oferece os seguintes atributos:
1) atributo de dado velocidade
2) Método acelerar, que deverá incrementar a velocidade de uma unidade
... | 24.153846 | 70 | 0.631152 |
a5e569e471cd48c2b7456e97a494b31b38d0a5bd | 580 | py | Python | tests/test_templatetags.py | andreyfedoseev/django-registry | 59b053506f1023c763e49affa41da3f3730ff80d | [
"BSD-3-Clause"
] | null | null | null | tests/test_templatetags.py | andreyfedoseev/django-registry | 59b053506f1023c763e49affa41da3f3730ff80d | [
"BSD-3-Clause"
] | 2 | 2016-02-24T06:49:03.000Z | 2016-02-24T07:13:04.000Z | tests/test_templatetags.py | andreyfedoseev/django-registry | 59b053506f1023c763e49affa41da3f3730ff80d | [
"BSD-3-Clause"
] | null | null | null | from django import template
from djregistry import registry
import pytest
@pytest.mark.parametrize(
"template_string,rendered", (
("""{% load registry %}{{ "1"|from_registry }}""", "2"),
("""{% load registry %}{{ "foo"|from_registry }}""", ""),
("""{% load registry %}{{ "foo"|from_registry... | 32.222222 | 84 | 0.624138 |
c80d19fcae8409b0c842326102c23d0207b8f122 | 6,157 | py | Python | sdk/lusid/models/result_value_string.py | finbourne/lusid-sdk-python-generated-preview | 9c36c953e8149443a4390ed7f0c04d01211401b6 | [
"MIT"
] | null | null | null | sdk/lusid/models/result_value_string.py | finbourne/lusid-sdk-python-generated-preview | 9c36c953e8149443a4390ed7f0c04d01211401b6 | [
"MIT"
] | null | null | null | sdk/lusid/models/result_value_string.py | finbourne/lusid-sdk-python-generated-preview | 9c36c953e8149443a4390ed7f0c04d01211401b6 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.4425
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getf... | 33.644809 | 209 | 0.621407 |
df0a284a56f439044a94a287df63da74658ddf9c | 1,242 | py | Python | script/analyze/script.py | xing969541/SLKG | 76044b363f1f6a19d9b05b2ff37b9f95681829b3 | [
"MIT"
] | null | null | null | script/analyze/script.py | xing969541/SLKG | 76044b363f1f6a19d9b05b2ff37b9f95681829b3 | [
"MIT"
] | null | null | null | script/analyze/script.py | xing969541/SLKG | 76044b363f1f6a19d9b05b2ff37b9f95681829b3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from uv import main
import pickle
import numpy as np
import pandas as pd
with open("embidDict.pkl", "br") as file:
di = pickle.load(file)
gdi = di["gene"]
igdi = {v:k for k,v in gdi.items()}
with open("PredData_gg.pkl", "br") as file:
(src, dst), mat = pickle.load... | 25.346939 | 76 | 0.513688 |
61fdfbca86ae0b578f3bd3062264344f782ea724 | 251 | py | Python | dev/tools/run_tests.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | 674 | 2015-01-14T11:05:39.000Z | 2022-03-29T04:53:50.000Z | dev/tools/run_tests.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | 937 | 2015-01-05T13:24:22.000Z | 2022-03-25T13:10:13.000Z | dev/tools/run_tests.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | 237 | 2015-01-05T13:54:16.000Z | 2022-03-15T22:16:32.000Z | '''
Run all the non-standalone tests using pytest. Exits with error code 1 if a test failed.
'''
import sys
import brian2
if __name__ == '__main__':
if not brian2.test(): # If the test fails, exit with a non-zero error code
sys.exit(1)
| 22.818182 | 88 | 0.681275 |
dc1ce362e5abe7c53b2a0f82919906e6023686fc | 894 | py | Python | day-22-Pong-game/ball.py | simonszuharev/designing-python | ed4c574137fecf43637f9798eef59051ed41fba2 | [
"MIT"
] | 1 | 2021-04-21T00:26:05.000Z | 2021-04-21T00:26:05.000Z | day-22-Pong-game/ball.py | simonszuharev/designing-python | ed4c574137fecf43637f9798eef59051ed41fba2 | [
"MIT"
] | null | null | null | day-22-Pong-game/ball.py | simonszuharev/designing-python | ed4c574137fecf43637f9798eef59051ed41fba2 | [
"MIT"
] | null | null | null | from turtle import Turtle
class Ball(Turtle):
def __init__(self):
super().__init__()
self.color("white")
self.shape("circle")
self.penup()
self.x_move = 10
self.y_move = 10
self.move_speed = 0.1
def __move_the_ball(self):
new_x = self.xcor() + s... | 20.790698 | 41 | 0.560403 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.