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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d045dd7d8065e060ae46feca61a4cacbd267a31a | 201 | py | Python | DLplatform/parameters/__init__.py | chelseajohn/dlplatform | 429e42c598039d1e9fd1df3da4247f391915a31b | [
"Apache-2.0"
] | 5 | 2020-05-05T08:54:26.000Z | 2021-02-20T07:36:28.000Z | DLplatform/parameters/__init__.py | zagazao/dlplatform | ab32af8f89cfec4b478203bd5d13ce2d30e89ba7 | [
"Apache-2.0"
] | 1 | 2020-11-16T14:15:53.000Z | 2020-11-16T14:15:53.000Z | DLplatform/parameters/__init__.py | zagazao/dlplatform | ab32af8f89cfec4b478203bd5d13ce2d30e89ba7 | [
"Apache-2.0"
] | 4 | 2020-05-05T08:56:57.000Z | 2020-07-22T11:28:52.000Z | from DLplatform.parameters.parameters import Parameters
#from DLplatform.parameters.kerasNNParameters import KerasNNParameters
#from DLplatform.parameters.pyTorchNNParameters import PyTorchNNParameters | 67 | 74 | 0.905473 |
967eb0aaa9fa8310c4ad1c881f8c0c263bc36ad8 | 998 | py | Python | modules/explore_anot.py | garthee/gnot | ac698c5cce0e2ebb77dd84c5d050417b735f5fbf | [
"MIT"
] | 3 | 2015-01-29T10:11:10.000Z | 2016-04-11T05:32:23.000Z | modules/explore_anot.py | garthee/gnot | ac698c5cce0e2ebb77dd84c5d050417b735f5fbf | [
"MIT"
] | 1 | 2015-01-10T17:52:06.000Z | 2015-01-10T20:50:16.000Z | modules/explore_anot.py | garthee/gnot | ac698c5cce0e2ebb77dd84c5d050417b735f5fbf | [
"MIT"
] | 4 | 2015-01-29T11:56:31.000Z | 2018-04-12T01:48:11.000Z | #!/usr/bin/python
from werkzeug.wrappers import Response
from db import export_sql
def render(vis, request, info):
info["message"] = []
table = request.args.get("table", '')
Date = request.args.get("Date", '')
TargetField = request.args.get("TargetField", '')
ShortText = request.ar... | 30.242424 | 84 | 0.602204 |
4e9ea11817fec8a376768e36fa2405a5c53fe545 | 3,768 | py | Python | submission_form/views/user_create.py | NAKKA-K/dw2018_server | 63d74b1206860d0d2213efbc8a7969be7976c4fd | [
"MIT"
] | null | null | null | submission_form/views/user_create.py | NAKKA-K/dw2018_server | 63d74b1206860d0d2213efbc8a7969be7976c4fd | [
"MIT"
] | 6 | 2018-02-08T12:26:04.000Z | 2018-02-09T06:14:12.000Z | submission_form/views/user_create.py | NAKKA-K/dw2018_server | 63d74b1206860d0d2213efbc8a7969be7976c4fd | [
"MIT"
] | null | null | null | from django.views.generic.base import TemplateView, View
from django.contrib.sites.shortcuts import get_current_site
from django.urls import reverse, reverse_lazy
from django.http import Http404
from django.contrib import messages
from django.shortcuts import render, redirect
from django.db import transaction
from sub... | 30.387097 | 85 | 0.687367 |
868b0b0b2d63f8288774def2a9d841c4c167b4f8 | 2,838 | py | Python | dags/data_ingest_gcs_fhv.py | olegaobini/airflow-demo-ny-taxi-dataset | 1b7db71dcfd728686054e1342077b7fa56f2236a | [
"MIT"
] | null | null | null | dags/data_ingest_gcs_fhv.py | olegaobini/airflow-demo-ny-taxi-dataset | 1b7db71dcfd728686054e1342077b7fa56f2236a | [
"MIT"
] | null | null | null | dags/data_ingest_gcs_fhv.py | olegaobini/airflow-demo-ny-taxi-dataset | 1b7db71dcfd728686054e1342077b7fa56f2236a | [
"MIT"
] | null | null | null | import os
from airflow import DAG
from airflow.utils.dates import days_ago
from airflow.operators.bash import BashOperator
from airflow.operators.python import PythonOperator
from airflow.providers.google.cloud.operators.bigquery import BigQueryCreateExternalTableOperator
from scripts.ingest_gcs_script import _format... | 31.88764 | 105 | 0.672304 |
d52c6a7d2d4b371277a733aaf138d273f2d243a2 | 228 | py | Python | tests/conftest.py | BrotherSymeon/yaabook | a7dfb9599b6cd3b9720aa87e42f1cf827a5c2dc4 | [
"MIT"
] | null | null | null | tests/conftest.py | BrotherSymeon/yaabook | a7dfb9599b6cd3b9720aa87e42f1cf827a5c2dc4 | [
"MIT"
] | null | null | null | tests/conftest.py | BrotherSymeon/yaabook | a7dfb9599b6cd3b9720aa87e42f1cf827a5c2dc4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Dummy conftest.py for yaabook.
If you don't know what this is for, just leave it empty.
Read more about conftest.py under:
https://pytest.org/latest/plugins.html
"""
# import pytest
| 20.727273 | 60 | 0.649123 |
0376455f5e3b8f475e7d1368908dca66d094221b | 35,700 | py | Python | src/transformers/trainer.py | theorist17/adapter-transformers | 17a1e3f24aca59e3b131a47685dcefdfc69fa090 | [
"Apache-2.0"
] | null | null | null | src/transformers/trainer.py | theorist17/adapter-transformers | 17a1e3f24aca59e3b131a47685dcefdfc69fa090 | [
"Apache-2.0"
] | null | null | null | src/transformers/trainer.py | theorist17/adapter-transformers | 17a1e3f24aca59e3b131a47685dcefdfc69fa090 | [
"Apache-2.0"
] | null | null | null | import json
import logging
import math
import os
import random
import re
import shutil
from contextlib import contextmanager
from pathlib import Path
from typing import Callable, Dict, List, Optional, Tuple
import numpy as np
import torch
from packaging import version
from torch import nn
from torch.utils.data.dataloa... | 41.901408 | 131 | 0.626807 |
f2f6b2a5b81fd8cc7f7ae8ca7b093f426a2cbfc2 | 3,672 | py | Python | huaweicloud-sdk-waf/huaweicloudsdkwaf/v1/model/list_event_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-waf/huaweicloudsdkwaf/v1/model/list_event_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-waf/huaweicloudsdkwaf/v1/model/list_event_response.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ListEventResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
a... | 25.859155 | 79 | 0.548747 |
2f57c4c2b916da43e0bcf3cea00422c67529b9e2 | 2,929 | py | Python | lib/smoothstreams/windowutils.py | slackr/kodi-smoothstreams-addon | c41fc02c8fe27e7123057298c1f3223d4d9ae261 | [
"BSD-3-Clause"
] | null | null | null | lib/smoothstreams/windowutils.py | slackr/kodi-smoothstreams-addon | c41fc02c8fe27e7123057298c1f3223d4d9ae261 | [
"BSD-3-Clause"
] | null | null | null | lib/smoothstreams/windowutils.py | slackr/kodi-smoothstreams-addon | c41fc02c8fe27e7123057298c1f3223d4d9ae261 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, unicode_literals
import threading
import xbmcgui, xbmc
from . import player
class ActionHandler(object):
def __init__(self,callback):
self.callback = callback
self.event = threading.Event()
self.event.clear()
self.timer = None
self.delay = 0.001
def onActi... | 24.613445 | 80 | 0.722431 |
6f077ef28914fc78b92263aeab218c6cef6e6887 | 233 | py | Python | packages/algo-py/solutions/algo_03_test.py | protiumx/algo | 0c4d8dc9ca8f8ec30793f73bef9718fee2300297 | [
"MIT"
] | null | null | null | packages/algo-py/solutions/algo_03_test.py | protiumx/algo | 0c4d8dc9ca8f8ec30793f73bef9718fee2300297 | [
"MIT"
] | null | null | null | packages/algo-py/solutions/algo_03_test.py | protiumx/algo | 0c4d8dc9ca8f8ec30793f73bef9718fee2300297 | [
"MIT"
] | null | null | null | import unittest
from solutions import max_substr
class TestAlgo_03(unittest.TestCase):
def test(self):
input = "abcbghjkb"
self.assertEqual(max_substr(input), 6)
if __name__ == '__main__':
unittest.main()
| 17.923077 | 46 | 0.690987 |
4175c5749272175f21659d8893d818d1df2cea4e | 299 | py | Python | scripts/smooth_image.py | acse-yz11721/environments_mpm | 84367a0eb41fd06883b44d2c2dfe2f4f47efd465 | [
"MIT"
] | null | null | null | scripts/smooth_image.py | acse-yz11721/environments_mpm | 84367a0eb41fd06883b44d2c2dfe2f4f47efd465 | [
"MIT"
] | null | null | null | scripts/smooth_image.py | acse-yz11721/environments_mpm | 84367a0eb41fd06883b44d2c2dfe2f4f47efd465 | [
"MIT"
] | null | null | null | from envtest import smooth_image
from scipy import misc
import matplotlib.pyplot as plt
image = misc.ascent()
sigma = 5
smoothed_image = smooth_image(image, sigma)
f = plt.figure()
f.add_subplot(1, 2, 1)
plt.imshow(image)
f.add_subplot(1, 2, 2)
plt.imshow(smoothed_image)
plt.show(block=True)
| 15.736842 | 43 | 0.752508 |
678bc438e2f831439965dcada8eda3b0e3f06bec | 751 | py | Python | problems/tree/Solution1315.py | akalu/cs-problems-python | 9b1bd8e3932be62135a38a77f955ded9a766b654 | [
"MIT"
] | null | null | null | problems/tree/Solution1315.py | akalu/cs-problems-python | 9b1bd8e3932be62135a38a77f955ded9a766b654 | [
"MIT"
] | null | null | null | problems/tree/Solution1315.py | akalu/cs-problems-python | 9b1bd8e3932be62135a38a77f955ded9a766b654 | [
"MIT"
] | null | null | null | """ Given a binary tree, return the sum of values of nodes with even-valued
grandparent. (A grandparent of a node is the parent of its parent, if it
exists.)
If there are no nodes with an even-valued grandparent, return 0
IDEA:
traverse the tree using a simulation:
wrap each "traversed" node in... | 31.291667 | 83 | 0.49534 |
b2c681b33c10ba1b195ff5ca926254e361a70415 | 5,198 | py | Python | django/utils/deprecation.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 7 | 2021-07-10T14:32:29.000Z | 2021-07-10T16:14:09.000Z | django/utils/deprecation.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 21 | 2021-02-04T01:37:44.000Z | 2022-03-12T01:00:55.000Z | django/utils/deprecation.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 27 | 2021-11-10T08:44:10.000Z | 2022-03-30T08:19:46.000Z | import asyncio
import inspect
import warnings
from asgiref.sync import sync_to_async
class RemovedInDjango40Warning(DeprecationWarning):
pass
class RemovedInDjango41Warning(PendingDeprecationWarning):
pass
RemovedInNextVersionWarning = RemovedInDjango40Warning
class warn_about_renamed_method:
def _... | 35.121622 | 90 | 0.63005 |
ec7822f7846571e59c54fac56e729766062f7f8b | 1,729 | py | Python | solutions/day11/test_lib.py | benjaminarjun/AdventOfCode2020 | b9ca2f5c6121c401eb79911dbbbd0d3188f38034 | [
"MIT"
] | 1 | 2020-12-04T17:57:24.000Z | 2020-12-04T17:57:24.000Z | solutions/day11/test_lib.py | benjaminarjun/AdventOfCode2020 | b9ca2f5c6121c401eb79911dbbbd0d3188f38034 | [
"MIT"
] | null | null | null | solutions/day11/test_lib.py | benjaminarjun/AdventOfCode2020 | b9ca2f5c6121c401eb79911dbbbd0d3188f38034 | [
"MIT"
] | null | null | null | import unittest
import pathlib
from parameterized import parameterized
from .results import Grid, TerminalSeating
def _load_data(file_name):
full_path = pathlib.Path(__file__).parent.joinpath('test_vals', file_name)
with open(full_path, 'r') as f:
return [line.strip() for line in f.readlines()]
cla... | 29.810345 | 78 | 0.659341 |
4fa933537305faf5e3b123afc79671c365a0a0c4 | 1,443 | py | Python | exercises/nth-prime/nth_prime_test.py | kishankj/python | 82042de746128127502e109111e6c4e8ab002af6 | [
"MIT"
] | 2 | 2019-10-02T07:18:44.000Z | 2019-10-07T11:11:39.000Z | exercises/nth-prime/nth_prime_test.py | kishankj/python | 82042de746128127502e109111e6c4e8ab002af6 | [
"MIT"
] | 7 | 2021-03-31T18:51:01.000Z | 2022-02-03T16:40:58.000Z | exercises/nth-prime/nth_prime_test.py | kishankj/python | 82042de746128127502e109111e6c4e8ab002af6 | [
"MIT"
] | 2 | 2020-05-08T19:00:28.000Z | 2020-06-05T02:04:12.000Z | import unittest
from nth_prime import prime
# Tests adapted from `problem-specifications//canonical-data.json` @ v2.1.0
def prime_range(n):
"""Returns a list of the first n primes"""
return [prime(i) for i in range(1, n + 1)]
class NthPrimeTest(unittest.TestCase):
def test_first_prime(self):
s... | 21.863636 | 75 | 0.495495 |
709ed2305023db10cc041e135de5431a13a6c366 | 2,072 | py | Python | jaconv/__init__.py | ikegami-yukino/jaconv | a12ffd3814e530d22af0faf7b50f06bc92b44f11 | [
"MIT"
] | 215 | 2016-04-02T10:38:10.000Z | 2022-03-29T07:56:23.000Z | jaconv/__init__.py | ikegami-yukino/jaconv | a12ffd3814e530d22af0faf7b50f06bc92b44f11 | [
"MIT"
] | 18 | 2017-02-20T05:05:08.000Z | 2021-10-11T13:55:07.000Z | jaconv/__init__.py | ikegami-yukino/jaconv | a12ffd3814e530d22af0faf7b50f06bc92b44f11 | [
"MIT"
] | 25 | 2016-10-03T21:37:13.000Z | 2022-02-01T03:44:34.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import jaconv
"""jaconv
This module provides Japanese and ASCII character interconverting between
Hiragana and full-/half-width Katakana/ASCII characters.
Author:
Yukino Ikegami
Lisence:
MIT License
Usage:
import jaconv
jaconv.hi... | 37 | 78 | 0.7389 |
3b644d67578b8aea3f784d3eda5720706df065a4 | 2,710 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/azure_firewall_network_rule_collection_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/azure_firewall_network_rule_collection_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/azure_firewall_network_rule_collection_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 41.692308 | 144 | 0.637638 |
2789646d91a850470c0e8b0dbb5af2f2df9cb620 | 7,180 | py | Python | sdk/python/pulumi_aws_native/cloudfront/streaming_distribution.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/cloudfront/streaming_distribution.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/cloudfront/streaming_distribution.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.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, overload
from .. import _utilities
from... | 47.236842 | 212 | 0.692061 |
51003e667ed4b3afd9fa7c7fc19d163879d59dbe | 4,176 | py | Python | coremltools/converters/mil/frontend/torch/test/testing_utils.py | prakriti07/coremltools | 82c916d4925ac4dc380e20a595011abb44a35335 | [
"BSD-3-Clause"
] | null | null | null | coremltools/converters/mil/frontend/torch/test/testing_utils.py | prakriti07/coremltools | 82c916d4925ac4dc380e20a595011abb44a35335 | [
"BSD-3-Clause"
] | null | null | null | coremltools/converters/mil/frontend/torch/test/testing_utils.py | prakriti07/coremltools | 82c916d4925ac4dc380e20a595011abb44a35335 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import numpy as np
import torch
from six import string_types as _string_types
from coremltools impor... | 34.512397 | 94 | 0.702826 |
e84e362e47b190a8c03f8b56f326101c33393323 | 10,685 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/cs/csvserver_cachepolicy_binding.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/cs/csvserver_cachepolicy_binding.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/cs/csvserver_cachepolicy_binding.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | 29.435262 | 131 | 0.724193 |
682250be8a879361de6a36516a6cc2a65dac4b6b | 13,317 | py | Python | deutschland/jobsuche/rest.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/jobsuche/rest.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/jobsuche/rest.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | """
Bundesagentur für Arbeit: Jobsuche API
Die größte Stellendatenbank Deutschlands durchsuchen, Details zu Stellenanzeigen und Informationen über Arbeitgeber abrufen. <br><br> Die Authentifizierung funktioniert per OAuth 2 Client Credentials mit JWTs. Folgende Client-Credentials können dafür verwendet werden:... | 33.799492 | 405 | 0.539836 |
3dd32e4baab3f18eed768348426cfd80166212a8 | 65 | py | Python | hitherdither/ordered/__init__.py | bewar313/probable-octo-eureka | aa04303d217745e81dc2c3edd3c10212bc298497 | [
"MIT"
] | 149 | 2016-09-15T08:39:50.000Z | 2022-03-30T01:52:22.000Z | BubbleBoiBot v1.92/hitherdither/ordered/__init__.py | TheLoveableBananaNoodle/-PATCHED-BubbleBoiBot | 2faa7b40b4f8f1104aab336ab556a7a451fcfc4a | [
"MIT"
] | 56 | 2019-02-19T01:57:19.000Z | 2021-06-14T10:10:18.000Z | BubbleBoiBot v1.92/hitherdither/ordered/__init__.py | TheLoveableBananaNoodle/-PATCHED-BubbleBoiBot | 2faa7b40b4f8f1104aab336ab556a7a451fcfc4a | [
"MIT"
] | 61 | 2019-02-28T18:25:20.000Z | 2022-01-21T20:03:44.000Z | from . import bayer
from . import yliluoma
from . import cluster
| 16.25 | 22 | 0.769231 |
8e1f2a59fa469c7b47d7d7f118ae23acc54cd660 | 1,857 | py | Python | venv/lib/python3.6/site-packages/pylint/test/functional/line_too_long.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/pylint/test/functional/line_too_long.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | 1 | 2021-06-01T23:32:38.000Z | 2021-06-01T23:32:38.000Z | venv/lib/python3.6/site-packages/pylint/test/functional/line_too_long.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | # pylint: disable=invalid-encoded-data, fixme, unnecessary-pass
# +1: [line-too-long]
#####################################################################################################
# +1: [line-too-long]
""" that one is too long tooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo loooooong"""
... | 42.204545 | 200 | 0.684437 |
baaea93049af0130ece395254654e8970568b80f | 4,684 | py | Python | config.py | FelixFu520/PANet | 26b9efcb7b8c44a39a32bcd9d2fa1f4c0cd9ac6e | [
"Apache-2.0"
] | null | null | null | config.py | FelixFu520/PANet | 26b9efcb7b8c44a39a32bcd9d2fa1f4c0cd9ac6e | [
"Apache-2.0"
] | null | null | null | config.py | FelixFu520/PANet | 26b9efcb7b8c44a39a32bcd9d2fa1f4c0cd9ac6e | [
"Apache-2.0"
] | null | null | null | """Experiment Configuration"""
import os
import re
import glob
import itertools
import sacred
from sacred import Experiment
from sacred.observers import FileStorageObserver
from sacred.utils import apply_backspaces_and_linefeeds
sacred.SETTINGS['CONFIG']['READ_ONLY_CONFIG'] = False
sacred.SETTINGS.CAPTURE_MODE = 'no'... | 31.226667 | 118 | 0.591375 |
5c5c1b06545353ed38f6f555c9813737843e4270 | 986 | py | Python | test/distributed/rpc/test_faulty_agent.py | jamestwebber/pytorch | cac9ae1506feabfc87d37a208b3d39ed46c59483 | [
"Intel"
] | 7 | 2021-05-29T16:31:51.000Z | 2022-02-21T18:52:25.000Z | test/distributed/rpc/test_faulty_agent.py | jamestwebber/pytorch | cac9ae1506feabfc87d37a208b3d39ed46c59483 | [
"Intel"
] | 1 | 2021-03-25T13:42:15.000Z | 2021-03-25T13:42:15.000Z | test/distributed/rpc/test_faulty_agent.py | jamestwebber/pytorch | cac9ae1506feabfc87d37a208b3d39ed46c59483 | [
"Intel"
] | 1 | 2021-12-26T23:20:06.000Z | 2021-12-26T23:20:06.000Z | #!/usr/bin/env python3
import sys
import torch
import torch.distributed as dist
if not dist.is_available():
print("Distributed not available, skipping tests", file=sys.stderr)
sys.exit(0)
from torch.testing._internal.common_utils import IS_PYTORCH_CI, run_tests
from torch.testing._internal.distributed.rpc.f... | 25.282051 | 83 | 0.710953 |
92579d391f6ab8bf5ced83ba5b517b9b38f426cd | 2,752 | py | Python | specrel/graphics/__init__.py | johanngan/special_relativity | cd372c7460d2c0d4040c81bc1bd0090086dba735 | [
"MIT"
] | 4 | 2020-08-19T04:56:40.000Z | 2022-02-07T22:09:45.000Z | specrel/graphics/__init__.py | johanngan/special_relativity | cd372c7460d2c0d4040c81bc1bd0090086dba735 | [
"MIT"
] | null | null | null | specrel/graphics/__init__.py | johanngan/special_relativity | cd372c7460d2c0d4040c81bc1bd0090086dba735 | [
"MIT"
] | null | null | null | """Core graphics-generation code for spacetime plots."""
graphrc = {
'fig': None,
'ax': None,
'axs': None,
'grid': False,
'legend': False,
'legend_loc': 'best',
'title': None,
'tlabel': 'Time (seconds)',
'xlabel': 'Position (light-seconds)',
'worldline.lim_padding': 0.1,
'wo... | 36.210526 | 79 | 0.672238 |
26b957feb52a235c59a9d66dc3c3620a95e456ef | 6,613 | py | Python | display-stuff/OLEDdisplay/demo_oled.py | flashypepo/myMicropython-Examples | b2b63df865b5ad471b351ca5f279135025859f5d | [
"MIT"
] | 3 | 2017-09-03T17:17:44.000Z | 2017-12-10T12:26:46.000Z | display-stuff/OLEDdisplay/demo_oled.py | flashypepo/myMicropython-Examples | b2b63df865b5ad471b351ca5f279135025859f5d | [
"MIT"
] | null | null | null | display-stuff/OLEDdisplay/demo_oled.py | flashypepo/myMicropython-Examples | b2b63df865b5ad471b351ca5f279135025859f5d | [
"MIT"
] | 2 | 2017-10-01T01:10:55.000Z | 2018-07-15T19:49:29.000Z | # Example of WeMOS Mini + OLED startup file in MicroPython
# Arduino style: setup and loop
#
# History:
# 2017_0715 PePo updated LoLin-ESP32-OLED - SDA/SCL, _DISPLAY_HEIGHT
# 2017-0708 PePo updated for NodeMCU, use 'import machine'
# 2017_0625 PePo updated for WeMOS mini + OLED-display (MicroPython 1.9.1)
# 2017-0101 P... | 38.672515 | 98 | 0.647059 |
0cd07ed6e6cd77882c9740905d38a6f836f3a4b7 | 49,345 | py | Python | src/transformers/models/fsmt/modeling_fsmt.py | ddkalamk/transformers | ae333d04b29a25be1a70eaccd6260c294c243c5b | [
"Apache-2.0"
] | 1 | 2020-12-31T16:39:09.000Z | 2020-12-31T16:39:09.000Z | src/transformers/models/fsmt/modeling_fsmt.py | ddkalamk/transformers | ae333d04b29a25be1a70eaccd6260c294c243c5b | [
"Apache-2.0"
] | null | null | null | src/transformers/models/fsmt/modeling_fsmt.py | ddkalamk/transformers | ae333d04b29a25be1a70eaccd6260c294c243c5b | [
"Apache-2.0"
] | 1 | 2021-11-01T20:42:12.000Z | 2021-11-01T20:42:12.000Z | # coding=utf-8
# Copyright 2020 The Facebook AI Research Team Authors 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/LIC... | 40.020276 | 270 | 0.662945 |
4fe288a2b33119daeb37e6d4cc82e26f5de8706f | 43,604 | py | Python | xgboost_ray/tests/test_sklearn.py | edoakes/xgboost_ray | 1e16381f42c523caa854bd625ddb969553fee87d | [
"Apache-2.0"
] | 80 | 2020-10-13T10:10:05.000Z | 2022-03-25T12:16:47.000Z | xgboost_ray/tests/test_sklearn.py | edoakes/xgboost_ray | 1e16381f42c523caa854bd625ddb969553fee87d | [
"Apache-2.0"
] | 104 | 2020-11-07T11:06:29.000Z | 2022-03-29T07:48:21.000Z | xgboost_ray/tests/test_sklearn.py | edoakes/xgboost_ray | 1e16381f42c523caa854bd625ddb969553fee87d | [
"Apache-2.0"
] | 22 | 2020-10-13T10:10:07.000Z | 2022-02-20T08:51:58.000Z | """Copied almost verbatim from https://github.com/dmlc/xgboost/blob/a5c852660b1056204aa2e0cbfcd5b4ecfbf31adf/tests/python/test_with_sklearn.py
in order to ensure 1:1 coverage, with minimal modifications.
Some tests were disabled due to not being applicable for a
distributed setting.""" # noqa: E501
# Copyright 2021 b... | 35.917628 | 142 | 0.595266 |
34cf93f7e9573765c178e1cb4a839324a5421ee0 | 9,386 | py | Python | recipe/tests/test_recipe_api.py | Taythaytu0905/Django_Advance | e63e34787d3c3a648c2f434a8c99d81e347b7b6a | [
"MIT"
] | null | null | null | recipe/tests/test_recipe_api.py | Taythaytu0905/Django_Advance | e63e34787d3c3a648c2f434a8c99d81e347b7b6a | [
"MIT"
] | null | null | null | recipe/tests/test_recipe_api.py | Taythaytu0905/Django_Advance | e63e34787d3c3a648c2f434a8c99d81e347b7b6a | [
"MIT"
] | null | null | null | import tempfile
from PIL import Image
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Recipe, Tag, Ingredient
from recipe.serializers import RecipeSeriali... | 38.467213 | 78 | 0.645003 |
a6e63fbfeb3d6ad5bd2ca0b65c9e93042ef5cbb7 | 9,923 | py | Python | src/abaqus/Load/ConcentratedForce.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | 7 | 2022-01-21T09:15:45.000Z | 2022-02-15T09:31:58.000Z | src/abaqus/Load/ConcentratedForce.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | src/abaqus/Load/ConcentratedForce.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | import typing
from abaqusConstants import *
from .Load import Load
from ..Region.Region import Region
class ConcentratedForce(Load):
"""The ConcentratedForce object defines a concentrated force.
The ConcentratedForce object is derived from the Load object.
Attributes
----------
name: str
... | 49.368159 | 135 | 0.657059 |
e4fba515382456ff1defc8c6eee542eebb5a9466 | 524 | py | Python | hms-gateway/scratch-space/configuration-examples/ini_config.py | PacktPublishing/Hands-On-Software-Engineering-with-Python | b1b57f8989d5e5a40ebcdebf5998324c501a15d9 | [
"MIT"
] | 40 | 2019-01-03T15:23:45.000Z | 2022-03-07T10:15:42.000Z | hms-gateway/scratch-space/configuration-examples/ini_config.py | PacktPublishing/Hands-On-Software-Engineering-with-Python | b1b57f8989d5e5a40ebcdebf5998324c501a15d9 | [
"MIT"
] | 2 | 2020-04-15T16:40:08.000Z | 2021-03-26T00:18:52.000Z | hms-gateway/scratch-space/configuration-examples/ini_config.py | PacktPublishing/Hands-On-Software-Engineering-with-Python | b1b57f8989d5e5a40ebcdebf5998324c501a15d9 | [
"MIT"
] | 35 | 2018-08-07T09:00:19.000Z | 2022-03-19T22:10:37.000Z | #!/usr/bin/env python
import configparser
config = configparser.ConfigParser()
config.read('myservice.ini')
for section in config:
# - Show each section's name
print(('-- %s ' % section).ljust(80, '-'))
section = config[section]
# - Show each configured value in the section
for key in section... | 23.818182 | 49 | 0.526718 |
4139d5e61bf6a1e5ceafd2ccbd069f44d67567a1 | 300 | py | Python | atbash/core.py | alecbush/python-atbash-cipher-cli | d463660f3c8dd353ae7983bf99446a12d00c665d | [
"MIT"
] | null | null | null | atbash/core.py | alecbush/python-atbash-cipher-cli | d463660f3c8dd353ae7983bf99446a12d00c665d | [
"MIT"
] | null | null | null | atbash/core.py | alecbush/python-atbash-cipher-cli | d463660f3c8dd353ae7983bf99446a12d00c665d | [
"MIT"
] | null | null | null | def cipher(text=''):
return ''.join(
cipher_char(char) for char in list(str(text))
)
def cipher_char(char=' '):
if not char.isalpha():
return char
offset = ord('A') if char.isupper() else ord('a')
value = ord(char) - offset
return chr((25 - value) + offset)
| 23.076923 | 53 | 0.576667 |
3cdfa9cfa2af174d74d36e3e8342036b9c6d8b8c | 642 | py | Python | main.py | aejester/autoclicker | 17139a56b81b2ebe96a0b530639b63e88c6233b3 | [
"MIT"
] | null | null | null | main.py | aejester/autoclicker | 17139a56b81b2ebe96a0b530639b63e88c6233b3 | [
"MIT"
] | null | null | null | main.py | aejester/autoclicker | 17139a56b81b2ebe96a0b530639b63e88c6233b3 | [
"MIT"
] | null | null | null | from pynput.keyboard import Key, Controller
from pynput import keyboard
print("autoclicker v1.0.0")
print("by aejester (https://github.com/aejester)\n\n")
def choice():
print("""Choose an option:
1: Run a profile
2: Create a profile
3: Remove a profile
4: Edit setting
""")
choice = input(... | 19.454545 | 60 | 0.570093 |
945253a47cd1ddb17be974975dfab26934e308fb | 3,108 | py | Python | scripts/collection_copy.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | 2 | 2020-02-07T18:12:12.000Z | 2020-02-11T14:59:03.000Z | scripts/collection_copy.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | 173 | 2020-01-29T17:48:02.000Z | 2020-03-20T02:52:58.000Z | scripts/collection_copy.py | HumanCellAtlas/dcp-prototype | 44ca66a266004124f39d7d3e3dd75e9076012ff0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import json
import logging
import os
import sys
import click
import requests
pkg_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) # noqa
sys.path.insert(0, pkg_root) # noqa
logging.basicConfig()
logger = logging.getLogger(__name__)
@click.group()
@click.option("--deploy... | 36.139535 | 116 | 0.664093 |
bb7094ab87e6dd923dfcedc7075368012b3fd679 | 2,693 | py | Python | lib/network.py | jabbalaci/Bash-Utils | c6fb115834a221c4aaba8eaa37f650beea45ef29 | [
"MIT"
] | 73 | 2015-03-31T01:12:26.000Z | 2021-07-10T19:45:04.000Z | lib/network.py | doc22940/Bash-Utils | c6fb115834a221c4aaba8eaa37f650beea45ef29 | [
"MIT"
] | 2 | 2017-01-06T17:17:42.000Z | 2017-08-23T18:35:55.000Z | lib/network.py | doc22940/Bash-Utils | c6fb115834a221c4aaba8eaa37f650beea45ef29 | [
"MIT"
] | 27 | 2015-01-03T18:51:23.000Z | 2020-11-15T11:49:51.000Z | #!/usr/bin/env python3
"""
Network-related stuff.
# from jplib import network
"""
import json
import re
import socket
from lib import process
from lib.process import get_return_code_of_simple_cmd
from lib.web import get_page
from six.moves.urllib import error, request
URL = 'http://www.google.com'
def is_interne... | 27.479592 | 107 | 0.588563 |
3c01e86a319dd9e3f51f6060e451697eb7dd923d | 1,788 | py | Python | snake.py | Lee-RoyMannier/snake_game | 0344405b837b8402ac7ad165bc47d70d7bff6758 | [
"MIT"
] | null | null | null | snake.py | Lee-RoyMannier/snake_game | 0344405b837b8402ac7ad165bc47d70d7bff6758 | [
"MIT"
] | null | null | null | snake.py | Lee-RoyMannier/snake_game | 0344405b837b8402ac7ad165bc47d70d7bff6758 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 22 18:07:39 2022
@author: Mannier
"""
from turtle import Turtle
STARTING_POSITION = [(0, 0), (-20, 0), (-40, 0)]
MOVE_DISTANCE = 20
UP = 90
DOWN = 270
LEFT = 180
RIGHT = 0
class Snake:
def __init__(self):
self.segments = []
self... | 26.686567 | 61 | 0.567114 |
e6b0d8ee6f6bb1b5424e8fad499316821f384728 | 6,569 | py | Python | opstestfw/switch/CLI/InterfaceLacpPortIdConfig.py | r-cc-c/ops-ft-framework | 06ffd5a292e9bd0398d76b91dc327bf12025f9e2 | [
"Apache-2.0"
] | null | null | null | opstestfw/switch/CLI/InterfaceLacpPortIdConfig.py | r-cc-c/ops-ft-framework | 06ffd5a292e9bd0398d76b91dc327bf12025f9e2 | [
"Apache-2.0"
] | null | null | null | opstestfw/switch/CLI/InterfaceLacpPortIdConfig.py | r-cc-c/ops-ft-framework | 06ffd5a292e9bd0398d76b91dc327bf12025f9e2 | [
"Apache-2.0"
] | 1 | 2021-09-10T08:21:59.000Z | 2021-09-10T08:21:59.000Z | # (C) Copyright 2015 Hewlett Packard Enterprise Development LP
# 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/LICEN... | 38.869822 | 79 | 0.587456 |
09f8e52ea0c2646226cc7366e4b5cf76f2e9e9c9 | 1,895 | py | Python | tests/h/accounts/__init___test.py | discodavey/h | 7bff8478b3a5b936de82ac9fcd89b355f4afd3aa | [
"MIT"
] | 2 | 2021-11-07T23:14:54.000Z | 2021-11-17T10:11:55.000Z | tests/h/accounts/__init___test.py | 0b01/h | d13cbc3ec5cf92fbfb40ad360c7a5e0d937fbd14 | [
"MIT"
] | 16 | 2018-03-14T21:23:46.000Z | 2019-04-29T18:55:28.000Z | tests/h/accounts/__init___test.py | 0b01/h | d13cbc3ec5cf92fbfb40ad360c7a5e0d937fbd14 | [
"MIT"
] | 1 | 2021-03-12T09:45:04.000Z | 2021-03-12T09:45:04.000Z | # -*- coding: utf-8 -*-
import mock
import pytest
from h import accounts
@pytest.mark.usefixtures('user_service')
class TestGetUser(object):
def test_fetches_user_using_service(self,
factories,
pyramid_config,
... | 32.672414 | 79 | 0.58153 |
899c2ce8cac04e5c69c931ba1da49ed7d1b25749 | 2,899 | py | Python | fleetfmt/reader.py | guillermo-jimenez/fleet-format | da554ef9cb94cddfd1a33fb5877ae8d2ee8aa035 | [
"MIT"
] | null | null | null | fleetfmt/reader.py | guillermo-jimenez/fleet-format | da554ef9cb94cddfd1a33fb5877ae8d2ee8aa035 | [
"MIT"
] | null | null | null | fleetfmt/reader.py | guillermo-jimenez/fleet-format | da554ef9cb94cddfd1a33fb5877ae8d2ee8aa035 | [
"MIT"
] | null | null | null | # Copyright 2020 Pure Storage Inc.
# SPDX-License-Identifier: Apache-2.0
# ==============================================================================
""" Fleet Format File Reader """
from fleetfmt.base import _FileAccessorBase
import io
import pyarrow as pa
import pickle
from .format import FILE_HEAD_SERDES, ... | 28.421569 | 80 | 0.57882 |
fc53fdac294f9c5e7424305ddb267eaa29d2381f | 849 | py | Python | DatabaseGrabber.py | adamrvfisher/TechnicalAnalysisLibrary | 38a22b2b2b5052623f81edb11b3c5460fc254e45 | [
"Apache-2.0"
] | 3 | 2019-04-26T11:13:14.000Z | 2020-01-10T05:58:16.000Z | DatabaseGrabber.py | adamrvfisher/TechnicalAnalysisLibrary | 38a22b2b2b5052623f81edb11b3c5460fc254e45 | [
"Apache-2.0"
] | null | null | null | DatabaseGrabber.py | adamrvfisher/TechnicalAnalysisLibrary | 38a22b2b2b5052623f81edb11b3c5460fc254e45 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Adam Reinhold Von Fisher - https://www.linkedin.com/in/adamrvfisher/
"""
#This is a directory management/query tool
#Define function
def DatabaseGrabber(ticker):
#Import modules
import pandas as pd
#Assign dataframe by reading pickle
da... | 29.275862 | 78 | 0.639576 |
e29c0750080e9e59f9ed3425eb225967b915877d | 6,575 | py | Python | Lib/Scripts/font/glyphs/language coverage.py | gferreira/hTools2 | a75a671b81a0f4ce5c82b2ad3e2f971ca3e3d98c | [
"BSD-3-Clause"
] | 11 | 2015-01-06T15:43:56.000Z | 2019-07-27T00:35:20.000Z | Lib/Scripts/font/glyphs/language coverage.py | gferreira/hTools2 | a75a671b81a0f4ce5c82b2ad3e2f971ca3e3d98c | [
"BSD-3-Clause"
] | 2 | 2017-05-17T10:11:46.000Z | 2018-11-21T21:43:43.000Z | Lib/Scripts/font/glyphs/language coverage.py | gferreira/hTools2 | a75a671b81a0f4ce5c82b2ad3e2f971ca3e3d98c | [
"BSD-3-Clause"
] | 4 | 2015-01-10T13:58:50.000Z | 2019-12-18T15:40:14.000Z | # [h] diacritics coverage dialog
from vanilla import *
from hTools2 import hDialog
from hTools2.modules.languages import diacritics_chars, diacritics_glyphnames, check_languages_coverage
from hTools2.modules.messages import no_font_open
# objects
class diacriticsCoverageDialog(hDialog):
list_height = 180
l... | 31.014151 | 113 | 0.538251 |
f30a069e38274b47fa13eaa838aa5a36b5b97c5b | 677 | py | Python | src/ang/views.py | paradizer/car_shop | 3c4eb0f234fab0301f5ff11063b8e267e0a76537 | [
"MIT"
] | 53 | 2016-09-29T09:34:46.000Z | 2022-02-03T05:13:10.000Z | src/ang/views.py | paradizer/car_shop | 3c4eb0f234fab0301f5ff11063b8e267e0a76537 | [
"MIT"
] | 9 | 2019-12-27T18:28:31.000Z | 2022-03-12T00:09:48.000Z | src/ang/views.py | youngwarrior126/Django_Angular | 1aba51e71db31528ddbe8f6c51193121b287e118 | [
"MIT"
] | 41 | 2016-10-10T18:50:46.000Z | 2022-03-10T15:56:38.000Z | import os
from django.conf import settings
from django.http import HttpResponse, Http404
from django.views.generic import View
from django.shortcuts import render
class AngularTemplateView(View):
def get(self, request, item=None, *args, **kwargs):
print(item)
template_dir_path = settings.TEMPLAT... | 27.08 | 83 | 0.658789 |
1b88f4a2ff4fb432f8ab95a45a17a32ded367dbf | 5,133 | py | Python | ibeis/algo/preproc/preproc_image.py | SU-ECE-17-7/ibeis | b12a45b06d8ce8f52585494c15f6776f5889ed67 | [
"Apache-2.0"
] | null | null | null | ibeis/algo/preproc/preproc_image.py | SU-ECE-17-7/ibeis | b12a45b06d8ce8f52585494c15f6776f5889ed67 | [
"Apache-2.0"
] | null | null | null | ibeis/algo/preproc/preproc_image.py | SU-ECE-17-7/ibeis | b12a45b06d8ce8f52585494c15f6776f5889ed67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from os.path import splitext, basename
import warnings # NOQA
import vtool.exif as vtexif
import utool as ut
#import numpy as np # NOQA
#import hashlib
#import uuid
(print, rrr, profile) = ut.inject2(__name__, '... | 30.372781 | 110 | 0.607052 |
e1cc7e0977f123946d07d27f5675923aeb227139 | 6,781 | py | Python | DecryptLogin/modules/core/douban.py | 0honus0/DecryptLogin | 8cc4527d37bee4ff0aeecbaf93e2d3910abf44f7 | [
"MIT"
] | null | null | null | DecryptLogin/modules/core/douban.py | 0honus0/DecryptLogin | 8cc4527d37bee4ff0aeecbaf93e2d3910abf44f7 | [
"MIT"
] | null | null | null | DecryptLogin/modules/core/douban.py | 0honus0/DecryptLogin | 8cc4527d37bee4ff0aeecbaf93e2d3910abf44f7 | [
"MIT"
] | null | null | null | '''
Function:
豆瓣模拟登录
Author:
Charles
微信公众号:
Charles的皮卡丘
更新日期:
2022-03-09
'''
import os
import re
import time
import requests
from ..utils import removeImage, saveImage, showImage
'''PC端登录豆瓣'''
class doubanPC():
is_callable = True
def __init__(self, **kwargs):
for key, value in kwargs.i... | 38.310734 | 148 | 0.598289 |
2be38d8e7ad1f8caa76b9a731a50b850857497a0 | 29,121 | py | Python | lib/efficientnet.py | wonderit/aptos-retinopathy-detection | 8402ce798fa0419627fb878788fa771849e34516 | [
"MIT"
] | null | null | null | lib/efficientnet.py | wonderit/aptos-retinopathy-detection | 8402ce798fa0419627fb878788fa771849e34516 | [
"MIT"
] | null | null | null | lib/efficientnet.py | wonderit/aptos-retinopathy-detection | 8402ce798fa0419627fb878788fa771849e34516 | [
"MIT"
] | null | null | null | # Code from https://github.com/abhuse/pytorch-efficientnet
from math import ceil
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch._six import container_abcs
from torch.utils import model_zoo
def _pair(x):
if isinstance(x, container_abcs.Iterable):
return x
return (x, x)
... | 37.770428 | 114 | 0.56406 |
88ce58f1a51a1b04b8c64c6df613e2f6de774375 | 876 | py | Python | medium/8. String to Integer (atoi).py | junyinglucn/leetcode | 1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7 | [
"MIT"
] | null | null | null | medium/8. String to Integer (atoi).py | junyinglucn/leetcode | 1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7 | [
"MIT"
] | null | null | null | medium/8. String to Integer (atoi).py | junyinglucn/leetcode | 1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7 | [
"MIT"
] | null | null | null | class Solution:
def myAtoi(self, str: str) -> int:
str = str.strip()
if not str: return 0
result = ''
flag = 1
for i in range(len(str)):
if i == 0:
if str[i] not in ['+', '-'] and not str[i].isdigit():
return 0
i... | 29.2 | 69 | 0.336758 |
af53f880d59462e260170c02a027ce18552e58b5 | 9,826 | py | Python | 1d/shelf.py | RunxinNi/multilayer-examples | 53c8525969193130005ff08e2a6fd25e842d9a99 | [
"MIT"
] | 1 | 2021-05-23T04:25:48.000Z | 2021-05-23T04:25:48.000Z | 1d/shelf.py | RunxinNi/multilayer-examples | 53c8525969193130005ff08e2a6fd25e842d9a99 | [
"MIT"
] | null | null | null | 1d/shelf.py | RunxinNi/multilayer-examples | 53c8525969193130005ff08e2a6fd25e842d9a99 | [
"MIT"
] | 4 | 2017-06-21T13:33:44.000Z | 2020-02-25T18:34:51.000Z | #!/usr/bin/env python
# encoding: utf-8
r"""Runs idealized jump and sloped 1d shelf tests"""
import sys
from clawpack.riemann import layered_shallow_water_1D
import clawpack.clawutil.runclaw as runclaw
from clawpack.pyclaw.plot import plot
import multilayer as ml
def jump_shelf(num_cells,eigen_method,**kar... | 34.720848 | 89 | 0.609709 |
d711e607d3c17253e02602c09c80a84ca2b373b6 | 4,282 | py | Python | utils.py | shredderzwj/isoline | 46056251192d58019fa820c663c8affc60d58882 | [
"Apache-2.0"
] | 2 | 2020-02-07T04:56:33.000Z | 2020-08-19T10:49:58.000Z | utils.py | shredderzwj/isoline | 46056251192d58019fa820c663c8affc60d58882 | [
"Apache-2.0"
] | null | null | null | utils.py | shredderzwj/isoline | 46056251192d58019fa820c663c8affc60d58882 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import numpy as np
import random
import os
import time
import grid
def mask_grid_data(mgrid, grid_data, ax, ay):
"""
过滤网格数据至指定封闭图形区域内部,将区域外的 griddata值设置为 np.nan 以达到屏蔽的效果。
:param mgrid: np.mgrid Type -> 整个网格
:param grid_data: scipy.interpolate.griddata Type -> 整个网格数据
:param ax: ... | 31.718519 | 134 | 0.564923 |
4f01e397373b78a3d62757122034ed4859160b75 | 14,540 | py | Python | tests/test_client.py | northtree/google-maps-services-python | 891321c3209e13130b760661d23b2e5cd741e39f | [
"Apache-2.0"
] | 3,797 | 2015-01-08T05:42:35.000Z | 2022-03-30T11:45:13.000Z | tests/test_client.py | northtree/google-maps-services-python | 891321c3209e13130b760661d23b2e5cd741e39f | [
"Apache-2.0"
] | 344 | 2015-01-09T05:39:11.000Z | 2022-03-22T07:08:56.000Z | tests/test_client.py | northtree/google-maps-services-python | 891321c3209e13130b760661d23b2e5cd741e39f | [
"Apache-2.0"
] | 1,368 | 2015-01-08T13:04:52.000Z | 2022-03-29T13:13:31.000Z | #
# Copyright 2014 Google Inc. All rights reserved.
#
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 33.579677 | 88 | 0.608735 |
6f5150ac6e8470c8db16274c396a857a7eceaa72 | 605 | py | Python | album/migrations/0001_initial.py | Chebichii-Lab/Personal-Gallery | efdcf232513d41b2e3d1ba283cde0e88170968cd | [
"MIT"
] | null | null | null | album/migrations/0001_initial.py | Chebichii-Lab/Personal-Gallery | efdcf232513d41b2e3d1ba283cde0e88170968cd | [
"MIT"
] | null | null | null | album/migrations/0001_initial.py | Chebichii-Lab/Personal-Gallery | efdcf232513d41b2e3d1ba283cde0e88170968cd | [
"MIT"
] | 1 | 2021-09-07T10:41:37.000Z | 2021-09-07T10:41:37.000Z | # Generated by Django 3.2.5 on 2021-07-02 16:05
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Image',
fields=[
('id', models.AutoField(au... | 25.208333 | 114 | 0.561983 |
d9b83347332aa139c46972a57ab780ba6d27b854 | 8,853 | py | Python | fairseq/tasks/multilingual_denoising.py | Csinclair0/fairseq | 6d9cf6a850c31d12a3ac63e89b005756b09cebeb | [
"MIT"
] | null | null | null | fairseq/tasks/multilingual_denoising.py | Csinclair0/fairseq | 6d9cf6a850c31d12a3ac63e89b005756b09cebeb | [
"MIT"
] | null | null | null | fairseq/tasks/multilingual_denoising.py | Csinclair0/fairseq | 6d9cf6a850c31d12a3ac63e89b005756b09cebeb | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
import numpy as np
from fairseq.data import (
AppendTokenDataset,
ConcatDataset,
DenoisingDataset,
D... | 34.313953 | 91 | 0.537897 |
6085315557723f734d92a5aa2490c8f5c9eed1c3 | 9,840 | py | Python | predict_shap_local.py | showkeyjar/beauty | 7c944cf896c899d9e23b2e50e293103bb03fe6cd | [
"MulanPSL-1.0"
] | 1 | 2022-01-29T12:32:38.000Z | 2022-01-29T12:32:38.000Z | predict_shap_local.py | showkeyjar/beauty | 7c944cf896c899d9e23b2e50e293103bb03fe6cd | [
"MulanPSL-1.0"
] | null | null | null | predict_shap_local.py | showkeyjar/beauty | 7c944cf896c899d9e23b2e50e293103bb03fe6cd | [
"MulanPSL-1.0"
] | null | null | null | # %% coding=utf-8
import sys
import shap
import dlib
import dill
import warnings
import numpy as np
import pandas as pd
from sklearn.externals import joblib
from gen_report import gen_report
from shap.common import convert_to_link, Instance, Model, Data, DenseData, Link
"""
预测解释 shap
"""
#%%
predictor_path = "model/s... | 39.047619 | 151 | 0.608943 |
2c194f65bbeac943ad17c27fe7145a2dd8b1ac0a | 4,798 | py | Python | jax/experimental/jax2tf/tests/jax2tf_test.py | JonyEpsilon/jax | 7f9835aa4426690277230dacc5389f7ed42c290e | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-07-10T03:59:22.000Z | 2021-07-10T03:59:22.000Z | jax/experimental/jax2tf/tests/jax2tf_test.py | JonyEpsilon/jax | 7f9835aa4426690277230dacc5389f7ed42c290e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/experimental/jax2tf/tests/jax2tf_test.py | JonyEpsilon/jax | 7f9835aa4426690277230dacc5389f7ed42c290e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 35.279412 | 79 | 0.679658 |
4b0722dff46deebcffa2d33f128b5e131833bc60 | 32,072 | py | Python | chapter2.py | Yourself1011/pukage | 809601c355ac4a544a6007c179c7aa6797ebbbe9 | [
"MIT"
] | 2 | 2020-08-26T22:17:18.000Z | 2020-09-07T01:05:02.000Z | chapter2.py | Yourself1011/pukage | 809601c355ac4a544a6007c179c7aa6797ebbbe9 | [
"MIT"
] | 1 | 2020-09-08T19:33:36.000Z | 2020-09-09T15:40:51.000Z | chapter2.py | Yourself1011/pukage | 809601c355ac4a544a6007c179c7aa6797ebbbe9 | [
"MIT"
] | 1 | 2020-08-04T15:43:35.000Z | 2020-08-04T15:43:35.000Z | """
Pukage
Choose-your-own-adventure game.
https://github.com/Yourself1011/Pukage/
Copyright 2020 Daniel Zhang, Jeffrey Zang, Li Feng Yin, and all Pukage contributors https://github.com/Yourself1011/Pukage/graphs/contributors/
MIT License
"""
from random import randint
from time import sleep
import scrolltype
from s... | 34.082891 | 415 | 0.6665 |
0b47a25c7eb63529d60273ab2609fc99064953fc | 2,928 | py | Python | alipay/aop/api/domain/AlipayFundTransOrderCloseModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayFundTransOrderCloseModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayFundTransOrderCloseModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"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 AlipayFundTransOrderCloseModel(object):
def __init__(self):
self._biz_scene = None
self._close_reason = None
self._order_id = None
self._out_biz_no = None
... | 28.990099 | 75 | 0.592213 |
a334f3a02d2bc2eb5c69c1a42bf6f0931b0ce97f | 309 | py | Python | 337-Combination-Sum-IV/solution.py | alfmunny/leetcode | e35d2164c7e6e66410309fe1667ceab5a7689bef | [
"MIT"
] | null | null | null | 337-Combination-Sum-IV/solution.py | alfmunny/leetcode | e35d2164c7e6e66410309fe1667ceab5a7689bef | [
"MIT"
] | null | null | null | 337-Combination-Sum-IV/solution.py | alfmunny/leetcode | e35d2164c7e6e66410309fe1667ceab5a7689bef | [
"MIT"
] | null | null | null | class Solution:
def combinationSum4(self, nums, target):
dp = [0] * (target + 1)
dp[0] = 1
for i in range(target+1):
for j in nums:
if i < j:
continue
dp[i] += dp[i-j]
return dp[-1]
| 23.769231 | 44 | 0.372168 |
e42814bf50a1c03b22c45861b9531d6b3f50f65a | 576 | py | Python | src/shooopie/store/migrations/0003_siteconfig.py | martdi/shooopie | 50fe0151b35fe8f628893e7d11a82a6b4072ec03 | [
"MIT"
] | null | null | null | src/shooopie/store/migrations/0003_siteconfig.py | martdi/shooopie | 50fe0151b35fe8f628893e7d11a82a6b4072ec03 | [
"MIT"
] | 1 | 2022-01-19T19:44:59.000Z | 2022-01-19T19:50:22.000Z | src/shooopie/store/migrations/0003_siteconfig.py | martdi/shooopie | 50fe0151b35fe8f628893e7d11a82a6b4072ec03 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-14 00:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('store', '0002_inital_data'),
]
operations = [
migrations.CreateModel(
name='SiteConfig',
fields=[
('... | 26.181818 | 117 | 0.576389 |
c58ad26112d896ede6cb2e0550d1ea74ada041b6 | 619 | py | Python | homeassistant/components/nest/sensor.py | mikan-megane/core | 837220cce40890e296920d33a623adbc11bd15a6 | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | homeassistant/components/nest/sensor.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 79 | 2020-07-23T07:13:37.000Z | 2022-03-22T06:02:37.000Z | homeassistant/components/nest/sensor.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 6 | 2018-02-04T03:48:55.000Z | 2022-01-24T20:37:04.000Z | """Support for Nest sensors that dispatches between API versions."""
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from .const import DATA_SDM
from .legacy.sensor import async_setup_legacy_entry
from .sensor_sdm import async_setup_sdm_entry
async def async_setup_e... | 30.95 | 71 | 0.783522 |
33c7511b2659a3a57e7e275265ce5a3894055adb | 2,514 | py | Python | examples/dagster_examples_tests/airline_demo_tests/test_airflow.py | flowersw/dagster | 0de6baf2bd6a41bfacf0be532b954e23305fb6b4 | [
"Apache-2.0"
] | 3 | 2020-09-09T04:10:23.000Z | 2021-11-08T02:10:42.000Z | examples/dagster_examples_tests/airline_demo_tests/test_airflow.py | flowersw/dagster | 0de6baf2bd6a41bfacf0be532b954e23305fb6b4 | [
"Apache-2.0"
] | 2 | 2021-05-11T13:36:27.000Z | 2021-09-03T01:53:11.000Z | examples/dagster_examples_tests/airline_demo_tests/test_airflow.py | flowersw/dagster | 0de6baf2bd6a41bfacf0be532b954e23305fb6b4 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=redefined-outer-name
import os
import pytest
from dagster_examples.airline_demo.pipelines import ( # pylint: disable=unused-import
define_airline_demo_ingest_pipeline,
define_airline_demo_warehouse_pipeline,
)
from dagster import ExecutionTargetHandle
from dagster.utils import script_relati... | 29.928571 | 97 | 0.610581 |
89fca28f5f46c13fb35bd69126752b22de8347b6 | 19,857 | py | Python | xsamtools/cram.py | xbrianh/xsamtools | 12a44d3183a7ffa603e630a96580d3c0d5eec1a7 | [
"MIT"
] | 1 | 2020-06-09T17:02:00.000Z | 2020-06-09T17:02:00.000Z | xsamtools/cram.py | DataBiosphere/xsamtools | 08fdc7309645f949e07e2f17a2d111863da82ba4 | [
"MIT"
] | 9 | 2020-08-13T23:21:25.000Z | 2021-01-08T20:59:22.000Z | xsamtools/cram.py | xbrianh/xsamtools | 12a44d3183a7ffa603e630a96580d3c0d5eec1a7 | [
"MIT"
] | null | null | null | """
Tools for working with CRAM files.
CRAM/CRAI spec here:
http://samtools.github.io/hts-specs/CRAMv3.pdf
"""
import os
import datetime
import logging
import gzip
import io
from collections import namedtuple
from tempfile import TemporaryDirectory
from typing import Optional, Dict, Any, Union
from urllib.request imp... | 44.925339 | 152 | 0.535882 |
e71a2d233ab48764eda6700cc8efad1051d6144d | 774 | py | Python | middletier/dal/filesystem_dal.py | amoldms/BloomFilter | 49acd05751886fb67e454568eb4b58869b9d5959 | [
"MIT"
] | null | null | null | middletier/dal/filesystem_dal.py | amoldms/BloomFilter | 49acd05751886fb67e454568eb4b58869b9d5959 | [
"MIT"
] | null | null | null | middletier/dal/filesystem_dal.py | amoldms/BloomFilter | 49acd05751886fb67e454568eb4b58869b9d5959 | [
"MIT"
] | null | null | null | import middletier.logger as logger
import configparser
import sys
def get_data(filepath):
try:
with open(filepath, 'r') as file:
document = file.read().replace('\n', ' ')
return document
except NameError as e:
logger.log("File not found:{}".format(str(e)))
sys.exit(... | 25.8 | 61 | 0.595607 |
c07275ca79cc93152c36a947fe9f686b968cec67 | 2,144 | py | Python | deluca/agents/_pid.py | vvanirudh/deluca | 673e66038547db90a7b23335cfe7508728076a4d | [
"Apache-2.0"
] | 25 | 2020-10-27T19:10:36.000Z | 2022-01-04T14:34:29.000Z | deluca/agents/_pid.py | vvanirudh/deluca | 673e66038547db90a7b23335cfe7508728076a4d | [
"Apache-2.0"
] | 5 | 2020-10-15T00:52:30.000Z | 2021-01-18T18:42:40.000Z | deluca/agents/_pid.py | vvanirudh/deluca | 673e66038547db90a7b23335cfe7508728076a4d | [
"Apache-2.0"
] | 5 | 2020-12-04T23:12:13.000Z | 2021-06-26T12:38:06.000Z | # Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 28.972973 | 99 | 0.61334 |
fa6bfac94b341d253b9735769c90589d0f9ce9a3 | 7,725 | py | Python | ginga/rv/plugins/ScreenShot.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | ginga/rv/plugins/ScreenShot.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | ginga/rv/plugins/ScreenShot.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | # This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
"""
Capture PNG or JPEG images of the channel viewer image.
**Usage**
1. Select the RGB graphics type for the snap from the "Type" combo box.
2. Press "Snap" when you have the channel image the way you want to ... | 31.659836 | 79 | 0.616699 |
4687f3f01cdd300c09d8b4c5df3416ed6988a6dc | 2,271 | py | Python | test/test_oneview_sas_logical_jbod_attachment_facts.py | nabhajit-ray/oneview-ansible | b31af8a696013bac7a1900748a2fa5ba491fe8e2 | [
"Apache-2.0"
] | 108 | 2016-06-28T18:14:08.000Z | 2022-02-21T09:16:06.000Z | test/test_oneview_sas_logical_jbod_attachment_facts.py | HPE-Japan-Presales/oneview-ansible | 26eb13354333d862d9e80f07e3fe9bbe2eb59af3 | [
"Apache-2.0"
] | 248 | 2016-07-14T12:50:17.000Z | 2022-02-06T18:57:16.000Z | test/test_oneview_sas_logical_jbod_attachment_facts.py | HPE-Japan-Presales/oneview-ansible | 26eb13354333d862d9e80f07e3fe9bbe2eb59af3 | [
"Apache-2.0"
] | 88 | 2016-06-29T15:52:44.000Z | 2022-03-10T12:34:41.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
#
# 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/licen... | 33.895522 | 96 | 0.747248 |
016e36c2ac31ecc157bb162fed764779ca10b108 | 1,086 | py | Python | coding_problems/first_unique_character.py | NescobarAlopLop/miscellaneous | 8e33cb34ddc54dad233d2418d4a90a96ce3c393e | [
"MIT"
] | null | null | null | coding_problems/first_unique_character.py | NescobarAlopLop/miscellaneous | 8e33cb34ddc54dad233d2418d4a90a96ce3c393e | [
"MIT"
] | null | null | null | coding_problems/first_unique_character.py | NescobarAlopLop/miscellaneous | 8e33cb34ddc54dad233d2418d4a90a96ce3c393e | [
"MIT"
] | null | null | null | """
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.
Examples:
s = "leetcode"
return 0.
s = "loveleetcode",
return 2.
Note: You may assume the string contain only lowercase letters.
"""
import unittest
class Solution:
def firstUniqChar(self, ... | 20.111111 | 116 | 0.540516 |
14b9029ab9cf14ee3a6dc37287c68d3f0c4670df | 555 | py | Python | examples/make_stake_pool_keys.py | Canuckz-NFT/Cardano-Tools | 1cbe9041a9ab7fd0fc9018975acff3490aa1d8ca | [
"Apache-2.0"
] | null | null | null | examples/make_stake_pool_keys.py | Canuckz-NFT/Cardano-Tools | 1cbe9041a9ab7fd0fc9018975acff3490aa1d8ca | [
"Apache-2.0"
] | null | null | null | examples/make_stake_pool_keys.py | Canuckz-NFT/Cardano-Tools | 1cbe9041a9ab7fd0fc9018975acff3490aa1d8ca | [
"Apache-2.0"
] | 1 | 2021-09-11T12:26:27.000Z | 2021-09-11T12:26:27.000Z | import sys
sys.path.append('../')
from cardano_tools import ShelleyTools
# Inputs
genesis_file = "/home/lovelace/cardano-node/shelley_testnet-genesis.json"
working_dir = "/home/lovelace/cardano-node/"
# Create a ShelleyTools object
shelley = ShelleyTools(
"/usr/local/bin/cardano-cli",
"/home/lovelace/cardano-... | 27.75 | 77 | 0.740541 |
78f96486a38050ccefe6663da34082a661ef8076 | 925 | py | Python | app.py | itcosplay/bot_test | 64d2e1e0333d44df69732447af3160c3cf23c11d | [
"MIT"
] | null | null | null | app.py | itcosplay/bot_test | 64d2e1e0333d44df69732447af3160c3cf23c11d | [
"MIT"
] | null | null | null | app.py | itcosplay/bot_test | 64d2e1e0333d44df69732447af3160c3cf23c11d | [
"MIT"
] | null | null | null | import logging
from aiogram import Bot, types
from aiogram.contrib.middlewares.logging import LoggingMiddleware
from aiogram.dispatcher import Dispatcher
from aiogram.dispatcher.webhook import SendMessage
from aiogram.utils.executor import start_webhook
API_TOKEN = 'BOT_TOKEN_HERE'
# webhook settings
WEBHOOK_HOST =... | 22.560976 | 65 | 0.731892 |
365d182fa48cb1b4e6d9e126b236e5f52763ab56 | 751 | py | Python | aliexpresscoupons/settings.py | ils78/aliexpresscoupons | 19d922515412206784ab299c2b853b5c67d89679 | [
"MIT"
] | 6 | 2015-04-10T12:27:24.000Z | 2020-12-19T20:19:16.000Z | aliexpresscoupons/settings.py | ils78/aliexpresscoupons | 19d922515412206784ab299c2b853b5c67d89679 | [
"MIT"
] | null | null | null | aliexpresscoupons/settings.py | ils78/aliexpresscoupons | 19d922515412206784ab299c2b853b5c67d89679 | [
"MIT"
] | 2 | 2018-07-30T10:14:41.000Z | 2021-02-21T00:55:53.000Z | # -*- coding: utf-8 -*-
# Scrapy settings for aliexpress project
#
# For simplicity, this file contains only the most important settings by
# default. All the other settings are documented here:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
#
BOT_NAME = 'aliexpresscoupons'
SPIDER_MODULES = ['aliexpres... | 31.291667 | 150 | 0.761651 |
092704e16f596997d2f0ea741eddd67a1475c22b | 4,166 | py | Python | profit/types/spend_bundle.py | zcomputerwiz/profit-blockchain | d6d4337ea7c418c66f05f22a263e94190452aed6 | [
"Apache-2.0"
] | 7 | 2022-03-15T01:33:35.000Z | 2022-03-26T21:29:45.000Z | profit/types/spend_bundle.py | zcomputerwiz/profit-blockchain | d6d4337ea7c418c66f05f22a263e94190452aed6 | [
"Apache-2.0"
] | 3 | 2022-03-19T23:02:18.000Z | 2022-03-19T23:02:19.000Z | profit/types/spend_bundle.py | zcomputerwiz/profit-blockchain | d6d4337ea7c418c66f05f22a263e94190452aed6 | [
"Apache-2.0"
] | null | null | null | import dataclasses
import warnings
from dataclasses import dataclass
from typing import List
from blspy import AugSchemeMPL, G2Element
from profit.consensus.default_constants import DEFAULT_CONSTANTS
from profit.types.blockchain_format.coin import Coin
from profit.types.blockchain_format.sized_bytes import bytes32
f... | 37.872727 | 115 | 0.68747 |
8fec80e666953ced60ce42f1388a98742fbf1f4d | 117 | py | Python | restaurants/admin.py | sgr-smile2015/website | a6a90e8fff52a3d8adb797cfe2e6f74c4ad0e3c0 | [
"Apache-2.0"
] | 1 | 2018-02-27T08:24:12.000Z | 2018-02-27T08:24:12.000Z | restaurants/admin.py | sgr-smile2015/website | a6a90e8fff52a3d8adb797cfe2e6f74c4ad0e3c0 | [
"Apache-2.0"
] | null | null | null | restaurants/admin.py | sgr-smile2015/website | a6a90e8fff52a3d8adb797cfe2e6f74c4ad0e3c0 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import RestaurantsLocation
admin.site.register(RestaurantsLocation)
| 16.714286 | 40 | 0.846154 |
2dbce44693509a02dbe7914586afcb4c0959cb6b | 3,761 | py | Python | tests/test_bmp2sysex.py | Skoddiethecat/bmp2sysex | 33f1fccc5dfd25491df2477e06b98b236ea0f3f4 | [
"MIT"
] | null | null | null | tests/test_bmp2sysex.py | Skoddiethecat/bmp2sysex | 33f1fccc5dfd25491df2477e06b98b236ea0f3f4 | [
"MIT"
] | null | null | null | tests/test_bmp2sysex.py | Skoddiethecat/bmp2sysex | 33f1fccc5dfd25491df2477e06b98b236ea0f3f4 | [
"MIT"
] | null | null | null | import tempfile
import warnings
from unittest import TestCase
import numpy as np
from PIL import Image
from bmp2sysex.__main__ import main
class TestMain(TestCase):
def test_16x16_1bit_png(self):
expected = "101010000000000110101000000000001110100000000001101010000000000010101000000000010000000000000000... | 43.229885 | 291 | 0.654347 |
13fba01734591fdaf32314af34a71b6f50bec222 | 137,853 | py | Python | whoville/cloudbreak/apis/v2stacks_api.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/apis/v2stacks_api.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | whoville/cloudbreak/apis/v2stacks_api.py | mikchaos/whoville | 6eabaea4b74ac0b632c03db8252590131c6ce63b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Cloudbreak API
Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud... | 45.436058 | 984 | 0.585043 |
339a56287c98095d3ef95540c4e0c671867baae0 | 32,839 | py | Python | google/cloud/compute_v1/services/region_network_endpoint_groups/client.py | auphofBSF/python-compute | c81bfa752c9db93edd0cd56fec3a79599704d792 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/region_network_endpoint_groups/client.py | auphofBSF/python-compute | c81bfa752c9db93edd0cd56fec3a79599704d792 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/region_network_endpoint_groups/client.py | auphofBSF/python-compute | c81bfa752c9db93edd0cd56fec3a79599704d792 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | 44.197847 | 106 | 0.624745 |
c6b0ad6e7dd63ae541b518cf97cd025d397247ac | 10,860 | py | Python | lib/model/config.py | Scofieldtangsiwei/small_object_detection | fb86b06f3301f9e1f9d66fd4caf662750ac9a44e | [
"MIT"
] | 3 | 2018-11-07T22:49:30.000Z | 2019-06-22T06:23:46.000Z | lib/model/config.py | Scofieldtangsiwei/small_object_detection | fb86b06f3301f9e1f9d66fd4caf662750ac9a44e | [
"MIT"
] | null | null | null | lib/model/config.py | Scofieldtangsiwei/small_object_detection | fb86b06f3301f9e1f9d66fd4caf662750ac9a44e | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import os.path as osp
import numpy as np
# `pip install easydict` if you don't have it
from easydict import EasyDict as edict
__C = edict()
# Consumers can get config by:
# from fast_rcnn_config im... | 27.917738 | 91 | 0.72523 |
60e049376c0a9c2f5a535634373514585f0ca708 | 5,176 | py | Python | docs/conf.py | ejhigson/perfectns | f20339281bfa45797fcd7815ed3aeab4101d9e95 | [
"MIT"
] | 4 | 2018-06-08T02:16:38.000Z | 2018-11-02T13:44:06.000Z | docs/conf.py | ejhigson/PerfectNS | f20339281bfa45797fcd7815ed3aeab4101d9e95 | [
"MIT"
] | null | null | null | docs/conf.py | ejhigson/PerfectNS | f20339281bfa45797fcd7815ed3aeab4101d9e95 | [
"MIT"
] | 2 | 2018-10-12T17:34:23.000Z | 2020-06-19T20:55:54.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | 30.447059 | 79 | 0.651662 |
925dc4ea75970c8b41bdf2dae908d99b15095ff5 | 7,093 | py | Python | src/runtime/crt/host/microtvm_api_server.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 4,640 | 2017-08-17T19:22:15.000Z | 2019-11-04T15:29:46.000Z | src/runtime/crt/host/microtvm_api_server.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 3,022 | 2020-11-24T14:02:31.000Z | 2022-03-31T23:55:31.000Z | src/runtime/crt/host/microtvm_api_server.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 1,352 | 2017-08-17T19:30:38.000Z | 2019-11-04T16:09:29.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.100962 | 111 | 0.642887 |
5e41eaf695e0f150d71efc0d4c260e387c7a1929 | 2,030 | py | Python | code-docs/conf.py | acope3/riboviz | 03a4f13b2d833b8650ebf33bdce81fe2639eb9cf | [
"Apache-2.0"
] | null | null | null | code-docs/conf.py | acope3/riboviz | 03a4f13b2d833b8650ebf33bdce81fe2639eb9cf | [
"Apache-2.0"
] | null | null | null | code-docs/conf.py | acope3/riboviz | 03a4f13b2d833b8650ebf33bdce81fe2639eb9cf | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 37.592593 | 103 | 0.674877 |
44f24401fdbc92da285693e3b36cb684f25ddbeb | 559 | py | Python | cogs/lenny.py | Itai12/Amanager | a470f92a645115ad51adaec4f517dd4d00b2c05e | [
"Apache-2.0"
] | null | null | null | cogs/lenny.py | Itai12/Amanager | a470f92a645115ad51adaec4f517dd4d00b2c05e | [
"Apache-2.0"
] | null | null | null | cogs/lenny.py | Itai12/Amanager | a470f92a645115ad51adaec4f517dd4d00b2c05e | [
"Apache-2.0"
] | null | null | null | import discord, random, json
from discord.ext import commands
from discord_slash import cog_ext, SlashContext
class Slash(commands.Cog):
def __init__(self, bot):
self.bot = bot
@cog_ext.cog_slash(name="lenny", description="Envoyer un lenny !")
async def _lenny(self, ctx):
a_file = open("no... | 27.95 | 70 | 0.674419 |
594d3ada041ff0579658431723cb6d60c91e8065 | 3,732 | py | Python | cpovc_registry/admin.py | Rebeccacheptoek/cpims-ovc-3.0 | 25d34dca2f93fcdb6fc934093b625604b46ddd8d | [
"Apache-2.0"
] | 3 | 2022-02-18T13:25:29.000Z | 2022-02-25T11:49:11.000Z | cpovc_registry/admin.py | Rebeccacheptoek/cpims-ovc-3.0 | 25d34dca2f93fcdb6fc934093b625604b46ddd8d | [
"Apache-2.0"
] | null | null | null | cpovc_registry/admin.py | Rebeccacheptoek/cpims-ovc-3.0 | 25d34dca2f93fcdb6fc934093b625604b46ddd8d | [
"Apache-2.0"
] | 22 | 2022-02-05T13:43:53.000Z | 2022-02-26T14:29:06.000Z | """Admin backend for editing some admin details."""
import csv
import time
from django.contrib import admin
from django.http import HttpResponse
from .models import (RegPerson, RegOrgUnit, RegOrgUnitsAuditTrail,
RegPersonsAuditTrail, RegPersonsTypes)
from cpovc_auth.models import AppUser... | 30.842975 | 75 | 0.640675 |
d05af9259ff4186e495475edba976dfa6e26c77b | 519 | py | Python | runtests.py | Kreios-S-A-R-L/django-languages-plus | d1d3e52468b4b010634cc0b531ebc34c035c30f1 | [
"MIT"
] | null | null | null | runtests.py | Kreios-S-A-R-L/django-languages-plus | d1d3e52468b4b010634cc0b531ebc34c035c30f1 | [
"MIT"
] | null | null | null | runtests.py | Kreios-S-A-R-L/django-languages-plus | d1d3e52468b4b010634cc0b531ebc34c035c30f1 | [
"MIT"
] | 1 | 2021-11-10T16:09:40.000Z | 2021-11-10T16:09:40.000Z | #!/usr/bin/env python
# -*- coding: utf-8
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
def run_tests(*test_args):
if not test_args:
test_args = ['tests']
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
django.setup()
T... | 19.222222 | 59 | 0.695568 |
86e19f9d7bb0d43941cb4c24f497d6f90dbbd62f | 2,005 | py | Python | conduit/settings.py | PierreDarcas/2020-2021-devops-final-back | b0da5cb36ec3626b0f2f1ce467b2fa4e8e28125c | [
"MIT"
] | null | null | null | conduit/settings.py | PierreDarcas/2020-2021-devops-final-back | b0da5cb36ec3626b0f2f1ce467b2fa4e8e28125c | [
"MIT"
] | 2 | 2020-12-03T08:45:59.000Z | 2021-01-18T08:40:58.000Z | conduit/settings.py | PierreDarcas/2020-2021-devops-final-back | b0da5cb36ec3626b0f2f1ce467b2fa4e8e28125c | [
"MIT"
] | 1 | 2021-01-17T23:05:51.000Z | 2021-01-17T23:05:51.000Z | # -*- coding: utf-8 -*-
"""Application configuration."""
import os
from datetime import timedelta
class Config(object):
"""Base configuration."""
SECRET_KEY = os.environ.get('CONDUIT_SECRET', 'secret-key') # TODO: Change me
APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory
PROJE... | 31.825397 | 82 | 0.612469 |
f6fc2adc18b30fae772d5091c928cd0a093f6a76 | 9,960 | py | Python | libai/evaluation/evaluator.py | Kitten97/libai | 4ca0341628dc0b850acbc30d3766797cfc8a6c86 | [
"Apache-2.0"
] | null | null | null | libai/evaluation/evaluator.py | Kitten97/libai | 4ca0341628dc0b850acbc30d3766797cfc8a6c86 | [
"Apache-2.0"
] | null | null | null | libai/evaluation/evaluator.py | Kitten97/libai | 4ca0341628dc0b850acbc30d3766797cfc8a6c86 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The OneFlow 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 require... | 37.584906 | 100 | 0.629217 |
037cf130623124d4b2a02c3dd7bd73617961f7a7 | 2,810 | py | Python | pyleecan/GUI/Dialog/DMachineSetup/SWSlot/PWSlot23/Gen_PWSlot23.py | Kelos-Zhu/pyleecan | 368f8379688e31a6c26d2c1cd426f21dfbceff2a | [
"Apache-2.0"
] | 2 | 2019-06-08T15:04:39.000Z | 2020-09-07T13:32:22.000Z | pyleecan/GUI/Dialog/DMachineSetup/SWSlot/PWSlot23/Gen_PWSlot23.py | lyhehehe/pyleecan | 421e9a843bf30d796415c77dc934546adffd1cd7 | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SWSlot/PWSlot23/Gen_PWSlot23.py | lyhehehe/pyleecan | 421e9a843bf30d796415c77dc934546adffd1cd7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""File generated according to PWSlot23/gen_list.json
WARNING! All changes made in this file will be lost!
"""
from pyleecan.GUI.Dialog.DMachineSetup.SWSlot.PWSlot23.Ui_PWSlot23 import Ui_PWSlot23
class Gen_PWSlot23(Ui_PWSlot23):
def setupUi(self, PWSlot23):
"""Abstract class to up... | 31.573034 | 85 | 0.598221 |
6458652c02f9ace430e661bbebd2bc585d766a59 | 522 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/shader_integer_mix.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/shader_integer_mix.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/shader_integer_mix.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import... | 32.625 | 120 | 0.772031 |
4c2ae7932733263f45acff2a82759cdd385f0309 | 6,919 | py | Python | src/cache/update_cache.py | aeneasr/cloud-launcher | 823ee95bb1cd12fa9508333269debebcb925f821 | [
"Apache-2.0"
] | 1 | 2020-12-16T13:20:31.000Z | 2020-12-16T13:20:31.000Z | src/cache/update_cache.py | aeneasr/cloud-launcher | 823ee95bb1cd12fa9508333269debebcb925f821 | [
"Apache-2.0"
] | null | null | null | src/cache/update_cache.py | aeneasr/cloud-launcher | 823ee95bb1cd12fa9508333269debebcb925f821 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2014 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 34.595 | 83 | 0.665992 |
c2f172349429d189dbcfbe4d36e357fc05ec1733 | 111,560 | py | Python | salt/modules/cmdmod.py | hvnsweeting/salt | abc9d3a0b51e6f5c4738cf71c221daf8b46fddcf | [
"Apache-2.0"
] | 2 | 2015-09-21T14:13:30.000Z | 2016-02-12T11:33:46.000Z | salt/modules/cmdmod.py | hvnsweeting/salt | abc9d3a0b51e6f5c4738cf71c221daf8b46fddcf | [
"Apache-2.0"
] | null | null | null | salt/modules/cmdmod.py | hvnsweeting/salt | abc9d3a0b51e6f5c4738cf71c221daf8b46fddcf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
A module for shelling out.
Keep in mind that this module is insecure, in that it can give whomever has
access to the master root execution access to all salt minions.
'''
from __future__ import absolute_import
# Import python libs
import functools
import glob
import json
import logging
imp... | 34.379045 | 121 | 0.571683 |
7d34a881609a0792c0bbab90dac82920560b7737 | 4,546 | py | Python | tests/plugins/test_server_discovery.py | angry-tony/ceph-lcm-decapod | 535944d3ee384c3a7c4af82f74041b0a7792433f | [
"Apache-2.0"
] | 41 | 2016-11-03T16:40:17.000Z | 2019-05-23T08:39:17.000Z | tests/plugins/test_server_discovery.py | Mirantis/ceph-lcm | fad9bad0b94f2ef608362953583b10a54a841d24 | [
"Apache-2.0"
] | 30 | 2016-10-14T10:54:46.000Z | 2017-10-20T15:58:01.000Z | tests/plugins/test_server_discovery.py | angry-tony/ceph-lcm-decapod | 535944d3ee384c3a7c4af82f74041b0a7792433f | [
"Apache-2.0"
] | 28 | 2016-09-17T01:17:36.000Z | 2019-07-05T03:32:54.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2016 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 27.889571 | 76 | 0.658381 |
00518a5424d50237443a7424dd4f287c8d86f230 | 841 | py | Python | custom/ilsgateway/migrations/0005_add_pending_reporting_data_recalculation.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | custom/ilsgateway/migrations/0005_add_pending_reporting_data_recalculation.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | custom/ilsgateway/migrations/0005_add_pending_reporting_data_recalculation.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models, migrations
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('locations', '0001_initial'),
('ilsgateway', '0004_merge'),
]
operations = [
migrations.CreateModel(
name='PendingReportingDataRecalculation',
... | 31.148148 | 114 | 0.570749 |
09e8dc288e087bb3d650e7c6242d7c420f71e87b | 1,073 | py | Python | mtp_api/apps/prison/urls.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-api | fdf74298284804779e95294cf418ce97e5ea8666 | [
"MIT"
] | null | null | null | mtp_api/apps/prison/urls.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-api | fdf74298284804779e95294cf418ce97e5ea8666 | [
"MIT"
] | null | null | null | mtp_api/apps/prison/urls.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-api | fdf74298284804779e95294cf418ce97e5ea8666 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from rest_framework import routers
from prison import views
router = routers.DefaultRouter()
router.register(r'prisoner_locations', views.PrisonerLocationView, base_name='prisonerlocation')
router.register(r'prisoner_validity', views.PrisonerValidityView, base_name='prisoner_... | 46.652174 | 117 | 0.794035 |
e68669581065c08095f05d35b3157e902c8c44a1 | 4,661 | py | Python | tern/formats/spdx/spdxtagvalue/image_helpers.py | the-wright-engineer/tern | 8716e12eba85d36e566f0d4ec25a7ed9d4b1b51f | [
"BSD-2-Clause"
] | null | null | null | tern/formats/spdx/spdxtagvalue/image_helpers.py | the-wright-engineer/tern | 8716e12eba85d36e566f0d4ec25a7ed9d4b1b51f | [
"BSD-2-Clause"
] | null | null | null | tern/formats/spdx/spdxtagvalue/image_helpers.py | the-wright-engineer/tern | 8716e12eba85d36e566f0d4ec25a7ed9d4b1b51f | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2020 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: BSD-2-Clause
"""
Helper functions for image level SPDX document blocks
Images for SPDX act like a Package
"""
from tern.formats.spdx import formats as spdx_formats
from tern.formats.spdx.spdxtagvalue import laye... | 40.181034 | 77 | 0.687621 |
14be368a589f2426fa54cd166d7903cdd0aef1a8 | 5,911 | py | Python | blueprint/qml_modules_indexing/no2_all_qml_types.py | Likianta/pyml | b0005b36aa94958a7d3e306a9df65fea46669d18 | [
"MIT"
] | 1 | 2021-04-11T00:32:52.000Z | 2021-04-11T00:32:52.000Z | blueprint/qml_modules_indexing/no2_all_qml_types.py | Likianta/pyml | b0005b36aa94958a7d3e306a9df65fea46669d18 | [
"MIT"
] | null | null | null | blueprint/qml_modules_indexing/no2_all_qml_types.py | Likianta/pyml | b0005b36aa94958a7d3e306a9df65fea46669d18 | [
"MIT"
] | null | null | null | """
Requirements:
如需运行本模块, 请先安装 Qt 5.0+ (推荐 5.15) 完整版.
本模块所用到的离线文件读取自:
"{YourQtProgram}/Docs/Qt-{version}/qtdoc/qmltypes.html".
"""
import re
from collections import defaultdict
from bs4 import BeautifulSoup
from lk_logger import lk
from lk_utils import read_and_write
def main(file_i, file_o):
""... | 37.649682 | 80 | 0.554221 |
fb24f19035b1e7752dc77b39e88ff03c37f038cc | 1,810 | py | Python | basis/namedtuple.py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | basis/namedtuple.py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | basis/namedtuple.py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
@ Author : Max_Pengjb
@ date : 2018/9/20
@ IDE : PyCharm
@ Site :
-------------------------------------------------
"""
__author__ = 'Max_Pengjb'
import coll... | 22.625 | 98 | 0.574586 |
e0ccd98c7e2464e4b2ab68ac7684e8879ef2e89e | 1,504 | py | Python | smartphones_parse/spiders/fora_kz.py | Vital77766688/smartphones_parse | a768d7e7f9605b3a4cc3c5eaaaeecfd5ec7610a3 | [
"MIT"
] | null | null | null | smartphones_parse/spiders/fora_kz.py | Vital77766688/smartphones_parse | a768d7e7f9605b3a4cc3c5eaaaeecfd5ec7610a3 | [
"MIT"
] | null | null | null | smartphones_parse/spiders/fora_kz.py | Vital77766688/smartphones_parse | a768d7e7f9605b3a4cc3c5eaaaeecfd5ec7610a3 | [
"MIT"
] | null | null | null | import scrapy
from ..utils import clean_price, clean_title
class ForaKzSpider(scrapy.Spider):
name = 'fora.kz'
def start_requests(self, **kwargs):
url = 'https://fora.kz/catalog/smartfony-plansety/smartfony/almaty'
yield scrapy.Request(url=url, callback=self.parse_pages)
def parse_pages(self, response, **kw... | 32 | 96 | 0.680851 |
9c691352d031fa60a02eaa54d8993f0d8f24c674 | 1,229 | py | Python | nova/virt/powervm/constants.py | NetApp/nova | ca490d48a762a423449c654d5a7caeadecf2f6ca | [
"Apache-2.0"
] | 2 | 2015-11-05T04:52:34.000Z | 2016-03-07T03:00:06.000Z | nova/virt/powervm/constants.py | NetApp/nova | ca490d48a762a423449c654d5a7caeadecf2f6ca | [
"Apache-2.0"
] | null | null | null | nova/virt/powervm/constants.py | NetApp/nova | ca490d48a762a423449c654d5a7caeadecf2f6ca | [
"Apache-2.0"
] | 1 | 2020-07-24T08:14:24.000Z | 2020-07-24T08:14:24.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 IBM Corp.
#
# 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
#
# ... | 30.725 | 78 | 0.754272 |
af4380285555262bab398e9f8878118ea0a4a6a1 | 1,470 | py | Python | scripts/qcomp2020_generate_invocations.py | MKlauck/qcomp2020 | 25bc4295754bec07e6b91779ff9d9b34e3bf18dc | [
"CC-BY-4.0"
] | 3 | 2020-08-04T05:59:41.000Z | 2021-04-18T16:55:53.000Z | scripts/qcomp2020_generate_invocations.py | MKlauck/qcomp2020 | 25bc4295754bec07e6b91779ff9d9b34e3bf18dc | [
"CC-BY-4.0"
] | null | null | null | scripts/qcomp2020_generate_invocations.py | MKlauck/qcomp2020 | 25bc4295754bec07e6b91779ff9d9b34e3bf18dc | [
"CC-BY-4.0"
] | null | null | null | from benchmark import *
from utility import *
from invocation import Invocation
import tool
"""
This script creates a list of invocations for the QCOMP 2020 benchmarks.
The invocations can be executed via 'execute_invocations.py'
"""
qcomp_benchmarks = []
if __name__ == "__main__":
benchmarks = load_csv(os.path.... | 43.235294 | 137 | 0.670748 |
71bb94a6bb8e484cea8144b56b3b38a79797a25a | 1,482 | py | Python | semtk3/runtimeconstraint.py | ge-semtk/semtk-python3 | d6d8e749121ec9309b47d17b01bdcd98935f7e70 | [
"Apache-2.0"
] | 1 | 2020-04-30T16:48:05.000Z | 2020-04-30T16:48:05.000Z | semtk3/runtimeconstraint.py | ge-semtk/semtk-python3 | d6d8e749121ec9309b47d17b01bdcd98935f7e70 | [
"Apache-2.0"
] | 7 | 2020-07-09T18:31:41.000Z | 2021-09-02T12:23:36.000Z | semtk3/runtimeconstraint.py | ge-semtk/semtk-python3 | d6d8e749121ec9309b47d17b01bdcd98935f7e70 | [
"Apache-2.0"
] | 2 | 2020-07-17T22:35:41.000Z | 2020-07-28T16:16:09.000Z | #
# Copyright 2019-20 General Electric Company
#
#
# 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 ... | 32.933333 | 81 | 0.688259 |
a468cedf04cdb15aaed12d08da21a4790a36787d | 120 | py | Python | thonny.py | dotimothy/TPIOPi | 13a68ca88f5a71f1d6984c5f6c3c84d107b12fd8 | [
"MIT"
] | 3 | 2020-09-24T22:33:20.000Z | 2021-08-29T06:08:33.000Z | thonny.py | dotimothy/TPIOPi | 13a68ca88f5a71f1d6984c5f6c3c84d107b12fd8 | [
"MIT"
] | null | null | null | thonny.py | dotimothy/TPIOPi | 13a68ca88f5a71f1d6984c5f6c3c84d107b12fd8 | [
"MIT"
] | null | null | null | def factorial(n):
if(n != 0):
return n * factorial((n-1))
else:
return 1;
print (factorial(100)) | 20 | 35 | 0.525 |
9c8071342a90515a217f70edb243cca401b2df1e | 3,171 | py | Python | permpy/avclass.py | cheyneh/permpy | ceff68d7b4b3189506ef8c15d5bcc078f0cd1aa2 | [
"MIT"
] | 7 | 2015-02-24T22:05:36.000Z | 2022-01-27T12:22:38.000Z | permpy/avclass.py | cheyneh/permpy | ceff68d7b4b3189506ef8c15d5bcc078f0cd1aa2 | [
"MIT"
] | 2 | 2019-08-19T21:28:26.000Z | 2021-03-14T22:00:26.000Z | permpy/avclass.py | cheyneh/permpy | ceff68d7b4b3189506ef8c15d5bcc078f0cd1aa2 | [
"MIT"
] | 7 | 2015-09-20T20:08:43.000Z | 2022-01-27T12:22:43.000Z | from math import factorial
import logging
import sys
import types
from .permutation import Permutation
from .permset import PermSet
from .permclass import PermClass
# from .propertyclass import PropertyClass
class AvClass(PermClass):
"""An object representing an avoidance class.
Notes:
Does not contain the emp... | 28.567568 | 108 | 0.673605 |
015a2698755efc8b8702b3e3d9d92d0679cfdf8a | 9,268 | py | Python | naturalnets/tools/episode_runner_autoencoder.py | bjuergens/NaturalNets | fd67f1b3c443761270adaf9877ed2a6358d830f0 | [
"MIT"
] | null | null | null | naturalnets/tools/episode_runner_autoencoder.py | bjuergens/NaturalNets | fd67f1b3c443761270adaf9877ed2a6358d830f0 | [
"MIT"
] | 2 | 2021-04-13T11:47:01.000Z | 2021-04-30T11:44:46.000Z | naturalnets/tools/episode_runner_autoencoder.py | bjuergens/NaturalNets | fd67f1b3c443761270adaf9877ed2a6358d830f0 | [
"MIT"
] | 1 | 2021-11-03T09:36:40.000Z | 2021-11-03T09:36:40.000Z | import copy
import multiprocessing as mp
import os
import time
import gym
import numpy as np
import torch
from gym.spaces import flatdim
from procgen import ProcgenGym3Env
from autoencoder.conv_unpool import ConvUnpoolAutoencoder
# print("Setting number of Torch threads and interop threads to 1.")
# torch.set_num_t... | 40.471616 | 116 | 0.612646 |
41758437b286411f9dd5a13cc1171a9a7be3a4a3 | 1,406 | py | Python | python/tests/app_interscalehub.py | multiscale-cosim/EBRAINS-translators | ac48debf85e83674dad4b54aa1daf5419465f805 | [
"BSD-3-Clause"
] | 1 | 2021-06-11T09:11:33.000Z | 2021-06-11T09:11:33.000Z | python/tests/app_interscalehub.py | multiscale-cosim/EBRAINS-translators | ac48debf85e83674dad4b54aa1daf5419465f805 | [
"BSD-3-Clause"
] | 2 | 2020-07-17T08:34:54.000Z | 2020-07-17T08:35:31.000Z | python/tests/app_interscalehub.py | multiscale-cosim/EBRAINS-translators | ac48debf85e83674dad4b54aa1daf5419465f805 | [
"BSD-3-Clause"
] | 1 | 2021-06-08T07:33:21.000Z | 2021-06-08T07:33:21.000Z | # ------------------------------------------------------------------------------
# Copyright 2020 Forschungszentrum Jülich GmbH
# "Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0. "
#
# Forschungszentrum Jülich
# In... | 31.954545 | 81 | 0.610953 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.