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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6a5843ff4e8dfc97c59826299582dc31013c7a62 | 732 | py | Python | pycroft/model/webstorage.py | agdsn/pycroft | ea771141d59c88fdb8a782eafbe106240550a33a | [
"Apache-2.0"
] | 18 | 2016-04-20T19:00:56.000Z | 2021-12-19T16:43:57.000Z | pycroft/model/webstorage.py | agdsn/pycroft | ea771141d59c88fdb8a782eafbe106240550a33a | [
"Apache-2.0"
] | 461 | 2016-07-20T00:42:59.000Z | 2022-03-25T17:03:07.000Z | pycroft/model/webstorage.py | agdsn/pycroft | ea771141d59c88fdb8a782eafbe106240550a33a | [
"Apache-2.0"
] | 15 | 2016-07-15T18:46:43.000Z | 2021-03-17T20:08:39.000Z | # Copyright (c) 2017 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
from pycroft.model.base import IntegerIdModel
from sqlalchemy import Column, func, LargeBinary
from pycroft.mod... | 38.526316 | 88 | 0.752732 |
75638ed0cf8f842aaa865081fd26d8dc0226adb1 | 130 | py | Python | experiments/__init__.py | progwriter/mininet-helper | 7237fa963f04ceb79e602a5fa3bb1ebdc1d83648 | [
"MIT"
] | 1 | 2019-04-17T21:02:11.000Z | 2019-04-17T21:02:11.000Z | experiments/__init__.py | progwriter/mininet-helper | 7237fa963f04ceb79e602a5fa3bb1ebdc1d83648 | [
"MIT"
] | null | null | null | experiments/__init__.py | progwriter/mininet-helper | 7237fa963f04ceb79e602a5fa3bb1ebdc1d83648 | [
"MIT"
] | null | null | null | from .inject_ditg import *
from .test2 import *
# TODO: scan and import functions from all files in this package automatically
| 18.571429 | 78 | 0.769231 |
b6688495df55b23ad2e1fc13f1fc2a75ddf81a8f | 59,125 | py | Python | tests/providers/github/test_provider.py | KakeruMizuno/RDM-waterbutler | 58ecd801385a7572d1ed56568a31f701291c4e3e | [
"Apache-2.0"
] | 1 | 2019-05-08T02:32:17.000Z | 2019-05-08T02:32:17.000Z | tests/providers/github/test_provider.py | KakeruMizuno/RDM-waterbutler | 58ecd801385a7572d1ed56568a31f701291c4e3e | [
"Apache-2.0"
] | null | null | null | tests/providers/github/test_provider.py | KakeruMizuno/RDM-waterbutler | 58ecd801385a7572d1ed56568a31f701291c4e3e | [
"Apache-2.0"
] | null | null | null | import io
import os
import copy
import json
import base64
import hashlib
from http import client
import furl
import pytest
import aiohttpretty
from waterbutler.core import streams
from waterbutler.core import exceptions
from waterbutler.providers.github import GitHubProvider
from waterbutler.providers.github.path im... | 38.593342 | 100 | 0.637294 |
c10c9e10bbece0c1392a244ba64156372883f8b6 | 1,351 | py | Python | Fun/Rain_alphabet.py | kii-chan-iine/MyCode | be7dbd1f806a6874bad96e127f73f788c0a11849 | [
"Artistic-2.0"
] | null | null | null | Fun/Rain_alphabet.py | kii-chan-iine/MyCode | be7dbd1f806a6874bad96e127f73f788c0a11849 | [
"Artistic-2.0"
] | null | null | null | Fun/Rain_alphabet.py | kii-chan-iine/MyCode | be7dbd1f806a6874bad96e127f73f788c0a11849 | [
"Artistic-2.0"
] | null | null | null | import random, pygame
PANEL_width = 400
PANEL_highly = 500
FONT_PX = 15
pygame.init()
# 创建一个窗口
winSur = pygame.display.set_mode((PANEL_width, PANEL_highly))
font = pygame.font.SysFont('123.ttf', 22)
bg_suface = pygame.Surface((PANEL_width, PANEL_highly), flags=pygame.SRCALPHA)
pygame.Surface.convert(bg_suface)
bg_sufa... | 32.166667 | 119 | 0.57809 |
5430e13a9256c20efd3277d16b29e0749d863843 | 4,976 | py | Python | COMMON/multiprocessing_env.py | abcdcamey/RL-learning | 84e3be15a22bc05fec063b4c3dd56c4836c5981a | [
"MIT"
] | 1 | 2021-12-08T15:18:20.000Z | 2021-12-08T15:18:20.000Z | COMMON/multiprocessing_env.py | abcdcamey/RL-learning | 84e3be15a22bc05fec063b4c3dd56c4836c5981a | [
"MIT"
] | null | null | null | COMMON/multiprocessing_env.py | abcdcamey/RL-learning | 84e3be15a22bc05fec063b4c3dd56c4836c5981a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
# Author : Camey
# DateTime : 2022/4/19 10:25 下午
# Description :
"""
# 该代码来自 openai baseline,用于多线程环境
# https://github.com/openai/baselines/tree/master/baselines/common/vec_env
import numpy as np
from multiprocessing import Process, Pipe
def worker(remote, parent_remote, env_fn_wr... | 30.157576 | 102 | 0.586616 |
0e694cb77f47181d61567c493d860ae361ed78f9 | 154 | py | Python | loguru-example/main.py | t-igu/vscode-remote-container-example | 7022cd6fe662eb0422f23e55fc4f6d1a49f3f722 | [
"MIT"
] | null | null | null | loguru-example/main.py | t-igu/vscode-remote-container-example | 7022cd6fe662eb0422f23e55fc4f6d1a49f3f722 | [
"MIT"
] | null | null | null | loguru-example/main.py | t-igu/vscode-remote-container-example | 7022cd6fe662eb0422f23e55fc4f6d1a49f3f722 | [
"MIT"
] | null | null | null | from config import setup_logger
from loguru import logger
def main():
setup_logger()
logger.info("aaaaa")
if __name__ == "__main__":
main() | 17.111111 | 31 | 0.688312 |
f87e012b5c5b6460e24f1a30164d97eb27de1a7b | 3,978 | py | Python | PopulationInInadequateHousing/PopulationInInadequateHousing.py | UPTechMX/UPT-Calculus-Modules | 1568244f0d65121f3b7637cdc8cf9f6deca9765f | [
"MIT"
] | null | null | null | PopulationInInadequateHousing/PopulationInInadequateHousing.py | UPTechMX/UPT-Calculus-Modules | 1568244f0d65121f3b7637cdc8cf9f6deca9765f | [
"MIT"
] | 3 | 2021-04-05T08:09:47.000Z | 2021-04-05T08:14:00.000Z | PopulationInInadequateHousing/PopulationInInadequateHousing.py | UPTechMX/UPT-Calculus-Modules | 1568244f0d65121f3b7637cdc8cf9f6deca9765f | [
"MIT"
] | 2 | 2020-04-13T16:50:28.000Z | 2020-05-04T15:17:27.000Z | # -*- coding: utf-8 -*-
import sys
import os
import multiprocessing
import threading
import _thread as thread
import time
import gc
from random import randint
import json
import math
from plup.indicators.Indicator import Indicator
from plup.Helpers.Vacuum import vacuum
from plup.Helpers.LogEvents import LogEvents
from... | 33.711864 | 123 | 0.477627 |
e9918c649118986c358e62817c5561145aacfb19 | 3,943 | py | Python | tensorflow/python/keras/layers/image_preprocessing_test.py | guoyichan/tensorflow | 0f0b2cd1d59192267d551ba91cb4554e7143e083 | [
"Apache-2.0"
] | 1 | 2019-12-28T06:25:37.000Z | 2019-12-28T06:25:37.000Z | tensorflow/python/keras/layers/image_preprocessing_test.py | yechens/tensorflow | 382261952391abea73884374fb8abbc294a53596 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/layers/image_preprocessing_test.py | yechens/tensorflow | 382261952391abea73884374fb8abbc294a53596 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 44.303371 | 80 | 0.722039 |
a2822978c46da524e2b40c4143ccbdaffcfe3c51 | 1,739 | py | Python | python/lsst/qa/explorer/consolidateQATable.py | lsst-dm/qa_explorer | f5997b3236f8abfc646295b63ecdd4abe8274164 | [
"MIT"
] | 3 | 2018-03-21T01:21:49.000Z | 2019-07-24T13:30:41.000Z | python/lsst/qa/explorer/consolidateQATable.py | lsst-dm/qa_explorer | f5997b3236f8abfc646295b63ecdd4abe8274164 | [
"MIT"
] | 5 | 2018-03-22T19:20:33.000Z | 2018-11-19T17:02:08.000Z | python/lsst/qa/explorer/consolidateQATable.py | lsst-dm/qa_explorer | f5997b3236f8abfc646295b63ecdd4abe8274164 | [
"MIT"
] | null | null | null | """Command-line task and associated config for consolidating QA tables.
The deepCoadd_qa table is a table with QA columns of interest computed
for all filters for which the deepCoadd_obj tables are written.
"""
import os
import pandas as pd
from lsst.pex.config import Config, Field
from lsst.pipe.base import CmdLine... | 34.098039 | 98 | 0.707878 |
e43062f9dcb219051f4147e98d2b7d7ea21fa182 | 1,943 | py | Python | cra_helper/asset_manifest.py | 10686142/django-cra-helper | 295ced7e971878d34f4853e09ec730aebaa50ff2 | [
"MIT"
] | null | null | null | cra_helper/asset_manifest.py | 10686142/django-cra-helper | 295ced7e971878d34f4853e09ec730aebaa50ff2 | [
"MIT"
] | null | null | null | cra_helper/asset_manifest.py | 10686142/django-cra-helper | 295ced7e971878d34f4853e09ec730aebaa50ff2 | [
"MIT"
] | null | null | null | import os
import logging
import json
from django.conf import settings
logger = logging.getLogger(__name__)
_asset_filename = 'asset-manifest.json'
def generate_manifest(is_server_live: bool, bundle_path: str, app_dir: str) -> dict:
# Prepare references to various files frontend
if is_server_live:
r... | 36.660377 | 99 | 0.627895 |
eeec87daf5d4e38ffbbc5445d3f952bd153b2c60 | 4,592 | py | Python | synthetic_test/Plots/plot_precision.py | sritejakv/eval_CG | 259b2d0ee39cbfe3c6961d7bbdeff8c135ec5712 | [
"MIT"
] | null | null | null | synthetic_test/Plots/plot_precision.py | sritejakv/eval_CG | 259b2d0ee39cbfe3c6961d7bbdeff8c135ec5712 | [
"MIT"
] | null | null | null | synthetic_test/Plots/plot_precision.py | sritejakv/eval_CG | 259b2d0ee39cbfe3c6961d7bbdeff8c135ec5712 | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.style as style
def autolabel(rects, plot_axes):
"""
Attach a text label above each bar displaying its width
"""
totals = []
for i in rects:
totals.append(i.get_width())
total = sum(totals)
for rect in rects[:-1]:
... | 38.588235 | 172 | 0.714068 |
7ae18eb6670e3a65f1225fb538ab2e80123c65f0 | 534 | py | Python | ros_ws/build/gripper_pkg/catkin_generated/pkg.develspace.context.pc.py | isuru-m/ROSbot_Gripper_Project | c3d8f46461612a52137ff3f63db45cac20b5364f | [
"MIT"
] | null | null | null | ros_ws/build/gripper_pkg/catkin_generated/pkg.develspace.context.pc.py | isuru-m/ROSbot_Gripper_Project | c3d8f46461612a52137ff3f63db45cac20b5364f | [
"MIT"
] | null | null | null | ros_ws/build/gripper_pkg/catkin_generated/pkg.develspace.context.pc.py | isuru-m/ROSbot_Gripper_Project | c3d8f46461612a52137ff3f63db45cac20b5364f | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/husarion/ros_ws/devel/include;/home/husarion/ros_ws/src/gripper_pkg/include".split(';') if "/home/husarion/ros_ws/devel/include;/home/husarion/ros_ws/src/gripper_pkg/include" != "" else []
PROJEC... | 59.333333 | 229 | 0.749064 |
466863f028b69152b1f8e9621b91d2bca161cbb2 | 1,172 | py | Python | setup.py | petarmaric/metated | 5c7007ffb4aac7968d947e6f9edcd488fdea0eb3 | [
"BSD-3-Clause"
] | null | null | null | setup.py | petarmaric/metated | 5c7007ffb4aac7968d947e6f9edcd488fdea0eb3 | [
"BSD-3-Clause"
] | null | null | null | setup.py | petarmaric/metated | 5c7007ffb4aac7968d947e6f9edcd488fdea0eb3 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
import metaTED
setup(
name='metaTED',
version=metaTED.__version__,
url='https://github.com/petarmaric/metated',
download_url='http://pypi.python.org/pypi/metaTED',
license='BSD',
author='Petar Maric',
author_email='petar.maric@gmail.com',
de... | 31.675676 | 77 | 0.645904 |
85b610545d748034647d7cea0915910dbacca7a9 | 18,072 | py | Python | src/ydata_quality/labelling/engine.py | poga/ydata-quality | 0cdda2774b05101c5f4f773b5e946f2a6544da09 | [
"MIT"
] | 242 | 2021-09-22T17:16:49.000Z | 2022-03-30T10:26:25.000Z | src/ydata_quality/labelling/engine.py | poga/ydata-quality | 0cdda2774b05101c5f4f773b5e946f2a6544da09 | [
"MIT"
] | 13 | 2021-09-23T00:15:10.000Z | 2022-02-04T16:33:42.000Z | src/ydata_quality/labelling/engine.py | poga/ydata-quality | 0cdda2774b05101c5f4f773b5e946f2a6544da09 | [
"MIT"
] | 21 | 2021-09-24T09:59:30.000Z | 2022-03-16T02:48:11.000Z | """
Implementation of LabelInspector engine class to run label quality analysis.
"""
from typing import Optional, Union
from pandas import DataFrame, Series
from src.ydata_quality.core.warnings import Priority
from ..core import QualityEngine, QualityWarning
from ..utils.auxiliary import infer_dtypes
from ..utils.mo... | 52.382609 | 119 | 0.642486 |
74c25ea2dffff1370ed4bf6b821ebf39ae3f6fe7 | 3,583 | py | Python | cloudferry/lib/stage.py | SVilgelm/CloudFerry | 4459c0d21ba7ccffe51176932197b352e426ba63 | [
"Apache-2.0"
] | 6 | 2017-04-20T00:49:49.000Z | 2020-12-20T16:27:10.000Z | cloudferry/lib/stage.py | SVilgelm/CloudFerry | 4459c0d21ba7ccffe51176932197b352e426ba63 | [
"Apache-2.0"
] | 3 | 2017-04-08T15:47:16.000Z | 2017-05-18T17:40:59.000Z | cloudferry/lib/stage.py | SVilgelm/CloudFerry | 4459c0d21ba7ccffe51176932197b352e426ba63 | [
"Apache-2.0"
] | 8 | 2017-04-07T23:42:36.000Z | 2021-08-10T11:05:10.000Z | # Copyright 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 law or agreed to in writing, so... | 30.623932 | 78 | 0.651689 |
502f077fc24fc6221846d116adca1fc7cf02130a | 1,679 | py | Python | actionnetwork_activist_sync/debug.py | afitts/actionnetwork_activist_sync | 40a0cabf36adca92ca17e7087792dc1829289d0a | [
"MIT"
] | null | null | null | actionnetwork_activist_sync/debug.py | afitts/actionnetwork_activist_sync | 40a0cabf36adca92ca17e7087792dc1829289d0a | [
"MIT"
] | null | null | null | actionnetwork_activist_sync/debug.py | afitts/actionnetwork_activist_sync | 40a0cabf36adca92ca17e7087792dc1829289d0a | [
"MIT"
] | null | null | null | from colored import attr, fg
from dictdiffer import diff
from pprint import pprint
class PersonCompare:
def __init__(self, existing, updated):
self.existing = existing
self.existing.merge_primary_email()
self.existing.merge_primary_address()
self.updated = updated
def print_di... | 32.921569 | 84 | 0.481834 |
3944cfa2625949c5d492df9576df8fb52f423251 | 5,143 | py | Python | desktop/libs/indexer/src/indexer/management/commands/indexer_setup.py | vsosrc/hue | d8bc236d8d622759fa5988ff32246e4c750e7503 | [
"Apache-2.0"
] | null | null | null | desktop/libs/indexer/src/indexer/management/commands/indexer_setup.py | vsosrc/hue | d8bc236d8d622759fa5988ff32246e4c750e7503 | [
"Apache-2.0"
] | null | null | null | desktop/libs/indexer/src/indexer/management/commands/indexer_setup.py | vsosrc/hue | d8bc236d8d622759fa5988ff32246e4c750e7503 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 41.144 | 171 | 0.675287 |
08813d7fd436da173f3063fa63e383c85f5a7897 | 56 | py | Python | smartystreets_python_sdk/us_street/match_type.py | jasonrfarkas/smartystreets-python-sdk | bcb94efc09c795222eb1bd85544073a6cc063a46 | [
"Apache-2.0"
] | null | null | null | smartystreets_python_sdk/us_street/match_type.py | jasonrfarkas/smartystreets-python-sdk | bcb94efc09c795222eb1bd85544073a6cc063a46 | [
"Apache-2.0"
] | null | null | null | smartystreets_python_sdk/us_street/match_type.py | jasonrfarkas/smartystreets-python-sdk | bcb94efc09c795222eb1bd85544073a6cc063a46 | [
"Apache-2.0"
] | null | null | null | STRICT = 'strict'
RANGE = 'range'
INVALID = 'invalid'
| 9.333333 | 19 | 0.642857 |
5a3c3e853e14e817415eac556ba636959faaa401 | 4,640 | py | Python | captain_hook.py | charlesreid1/b-captain-hook | 361f59c21a733a484f48e9bd60bce2d94dbf7b1b | [
"Apache-2.0"
] | 1 | 2019-03-20T02:08:06.000Z | 2019-03-20T02:08:06.000Z | captain_hook.py | charlesreid1/b-captain-hook | 361f59c21a733a484f48e9bd60bce2d94dbf7b1b | [
"Apache-2.0"
] | null | null | null | captain_hook.py | charlesreid1/b-captain-hook | 361f59c21a733a484f48e9bd60bce2d94dbf7b1b | [
"Apache-2.0"
] | 1 | 2019-07-31T00:56:25.000Z | 2019-07-31T00:56:25.000Z | import os
import logging
import subprocess
from tempfile import mkstemp
from os import access, X_OK, remove, fdopen
import requests
import json
from flask import Flask, request, abort
app = Flask(__name__)
logging.basicConfig(filename='/tmp/captain_hook.log',
filemode='a',
lev... | 28.466258 | 125 | 0.57069 |
4b2eab52d544fbcce9d35c3b77e231f3033d9e9c | 14,843 | py | Python | tasks/dyn_raffle_handler.py | Ayouuuu/bili2.0 | 1108e39208e56f129fb5eb6605a5b3f1aadc0d8f | [
"MIT"
] | 4 | 2020-03-05T02:07:55.000Z | 2020-06-01T02:20:03.000Z | tasks/dyn_raffle_handler.py | Ayouuuu/bili2.0 | 1108e39208e56f129fb5eb6605a5b3f1aadc0d8f | [
"MIT"
] | null | null | null | tasks/dyn_raffle_handler.py | Ayouuuu/bili2.0 | 1108e39208e56f129fb5eb6605a5b3f1aadc0d8f | [
"MIT"
] | 2 | 2020-03-07T20:34:46.000Z | 2020-04-05T10:03:13.000Z | import json
import asyncio
import random
from typing import Optional
import utils
from dyn import dyn_raffle_sql
from dyn.bili_data_types import DynRaffleStatus, DynRaffleJoined, DynRaffleResults, DynRaffleLuckydog
from reqs.dyn_raffle_handler import DynRaffleHandlerReq
from .utils import UtilsTask
from .bas... | 43.148256 | 117 | 0.571919 |
37938d7270a76bf648bf31c94cc51e602ce01f5d | 1,059 | gyp | Python | Dependencies/gyp-master/test/mac/xctest/test.gyp | knight666/exlibris | b21b46e0c84e5c4f81f8048022cda88e7bb3dca2 | [
"MIT"
] | null | null | null | Dependencies/gyp-master/test/mac/xctest/test.gyp | knight666/exlibris | b21b46e0c84e5c4f81f8048022cda88e7bb3dca2 | [
"MIT"
] | null | null | null | Dependencies/gyp-master/test/mac/xctest/test.gyp | knight666/exlibris | b21b46e0c84e5c4f81f8048022cda88e7bb3dca2 | [
"MIT"
] | null | null | null | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'classes',
'type': 'static_library',
'sources': [
'MyClass.h',
'MyClass.m',
... | 22.0625 | 73 | 0.463645 |
9a2cfb723ea5ef1b54e0b9cf71b50a2d748b0888 | 127,692 | py | Python | src/azure-cli/azure/cli/command_modules/storage/_params.py | phcooper/azure-cli | 1e7f7962df34f3104db4f2eefdcbdfe46ccd4bc1 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/storage/_params.py | phcooper/azure-cli | 1e7f7962df34f3104db4f2eefdcbdfe46ccd4bc1 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/storage/_params.py | phcooper/azure-cli | 1e7f7962df34f3104db4f2eefdcbdfe46ccd4bc1 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 69.73894 | 166 | 0.655781 |
c5befa9da5a8cf19ba3858634560af95900c1a42 | 744 | py | Python | sandbox/lib/jumpscale/JumpscaleLibs/clients/mongodbclient/MongoEngineClient.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | null | null | null | sandbox/lib/jumpscale/JumpscaleLibs/clients/mongodbclient/MongoEngineClient.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 117 | 2019-09-01T11:59:19.000Z | 2020-07-14T11:10:08.000Z | sandbox/lib/jumpscale/JumpscaleLibs/clients/mongodbclient/MongoEngineClient.py | threefoldtech/threebot_prebuilt | 1f0e1c65c14cef079cd80f73927d7c8318755c48 | [
"Apache-2.0"
] | 2 | 2020-04-06T15:21:23.000Z | 2020-05-07T04:29:53.000Z | from Jumpscale import j
try:
from mongoengine import connect
except:
j.builders.runtimes.python3.pip_package_install("mongoengine")
from mongoengine import connect
JSConfigClient = j.baseclasses.object_config
class MongoEngineClient(JSConfigClient):
_SCHEMATEXT = """
@url = jumpscale.MongoE... | 23.25 | 66 | 0.573925 |
9d4627ce2de9066dd559f5fda1cb9ddd23aaa316 | 7,193 | py | Python | huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_request_body.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_request_body.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_request_body.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class HandwritingRequestBody:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the v... | 32.844749 | 265 | 0.608786 |
c225d3b438c7673828bafcc07c81943dedb7c2bd | 6,951 | py | Python | dump_percepnet.py | Ryuk17/PercepNet | 94e91f1db242447593098afc1a844b822e154e09 | [
"BSD-3-Clause"
] | 170 | 2020-11-03T08:00:43.000Z | 2022-03-31T12:35:25.000Z | dump_percepnet.py | Ryuk17/PercepNet | 94e91f1db242447593098afc1a844b822e154e09 | [
"BSD-3-Clause"
] | 31 | 2020-11-23T05:13:03.000Z | 2022-03-25T13:18:58.000Z | dump_percepnet.py | Ryuk17/PercepNet | 94e91f1db242447593098afc1a844b822e154e09 | [
"BSD-3-Clause"
] | 60 | 2020-11-03T08:00:49.000Z | 2022-03-25T03:16:19.000Z |
#!/usr/bin/python3
'''Copyright (c) 2017-2018 Mozilla
2020-2021 Seonghun Noh
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
no... | 44.845161 | 130 | 0.651273 |
d20211d98a98fb41830c0890c55821e6b14a847a | 12,742 | py | Python | convert-scripts/office.py | RedcraneStudio/redcrane-engine | 4da8a7caedd6da5ffb7eda7da8c9a42396273bf6 | [
"BSD-3-Clause"
] | 5 | 2017-05-16T22:25:59.000Z | 2020-02-10T20:19:35.000Z | convert-scripts/office.py | RedCraneStudio/redcrane-engine | 4da8a7caedd6da5ffb7eda7da8c9a42396273bf6 | [
"BSD-3-Clause"
] | 1 | 2017-10-13T00:35:56.000Z | 2017-10-13T00:35:56.000Z | convert-scripts/office.py | RedCraneStudio/redcrane-engine | 4da8a7caedd6da5ffb7eda7da8c9a42396273bf6 | [
"BSD-3-Clause"
] | 2 | 2017-10-07T04:40:52.000Z | 2021-09-27T05:59:05.000Z | # Copyright (C) 2016 Luke San Antonio Bialecki
# All rights reserved.
import sys
import json
import base64
import struct
import pdb
import numpy as np
RGB_FORMAT = 6407
RGB_ALPHA_FORMAT = 6408
SRGB_FORMAT = 0x8C40
SRGB_ALPHA_FORMAT = 0x8C42
TEXTURE_2D_TARGET = 3553
UNSIGNED_BYTE_TYPE = 5121
CLAMP_TO_EDGE = 33071... | 31.230392 | 87 | 0.63789 |
e37d9341d1effdb86e3c4eae11aa1e761621d1d4 | 2,684 | py | Python | models/phase3_eval/assemble_pysb.py | jmuhlich/indra | feab2c08541ea73f328579faa6a21b08082cb026 | [
"BSD-2-Clause"
] | null | null | null | models/phase3_eval/assemble_pysb.py | jmuhlich/indra | feab2c08541ea73f328579faa6a21b08082cb026 | [
"BSD-2-Clause"
] | null | null | null | models/phase3_eval/assemble_pysb.py | jmuhlich/indra | feab2c08541ea73f328579faa6a21b08082cb026 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from os.path import join as pjoin
import os.path
from pysb import Observable
from pysb.export.kappa import KappaExporter
from indra.assemblers import PysbAssembler, IndexCardAssembler
import indra.tools.assemble_corp... | 37.277778 | 77 | 0.65611 |
baae2d45300358856c8b66b3cb2c053b91c69c81 | 3,406 | py | Python | userlog/realtime.py | aaugustin/django-userlog | 6cd34d0a319f6a954fec74420d0d391c32c46060 | [
"BSD-3-Clause"
] | 53 | 2015-01-04T17:53:40.000Z | 2021-07-27T06:53:19.000Z | userlog/realtime.py | aaugustin/django-userlog | 6cd34d0a319f6a954fec74420d0d391c32c46060 | [
"BSD-3-Clause"
] | 1 | 2015-07-04T11:42:45.000Z | 2015-07-04T11:42:45.000Z | userlog/realtime.py | aaugustin/django-userlog | 6cd34d0a319f6a954fec74420d0d391c32c46060 | [
"BSD-3-Clause"
] | 8 | 2015-09-05T08:03:32.000Z | 2020-02-28T08:48:13.000Z | import asyncio
import json
import logging
import asyncio_redis
import django
import websockets
from django.conf import settings
from .util import get_userlog_settings
if settings.DEBUG: # pragma: no cover
logger = logging.getLogger('websockets.server')
logger.setLevel... | 31.831776 | 78 | 0.589548 |
ffa0f7e550c744edd1fc7145e85db9f1a42cb479 | 17,786 | py | Python | pacu/models/awsapi/dataexchange.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | 1 | 2022-03-09T14:51:54.000Z | 2022-03-09T14:51:54.000Z | pacu/models/awsapi/dataexchange.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | pacu/models/awsapi/dataexchange.py | RyanJarv/Pacu2 | 27df4bcf296fc8f467d3dc671a47bf9519ce7a24 | [
"MIT"
] | null | null | null | # generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2021-12-31T02:47:15+00:00
from __future__ import annotations
from datetime import datetime
from enum import Enum
from typing import Annotated, Any, List, Optional
from pydantic import BaseModel, Extra, Field
class ResourceNotFoundExceptio... | 23.158854 | 300 | 0.712358 |
dd5cb9ee41901adca8637b938027e520b0407503 | 88,044 | py | Python | sklearn/linear_model/_ridge.py | merlynjocol/scikit-learn | cd5385e7112c453afff205fa0ce6a67356cbcf32 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T12:18:00.000Z | 2022-03-12T12:18:00.000Z | sklearn/linear_model/_ridge.py | merlynjocol/scikit-learn | cd5385e7112c453afff205fa0ce6a67356cbcf32 | [
"BSD-3-Clause"
] | null | null | null | sklearn/linear_model/_ridge.py | merlynjocol/scikit-learn | cd5385e7112c453afff205fa0ce6a67356cbcf32 | [
"BSD-3-Clause"
] | null | null | null | """
Ridge regression
"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com>
# Fabian Pedregosa <fabian@fseoane.net>
# Michael Eickenberg <michael.eickenberg@nsup.org>
# License: BSD 3 clause
from abc import ABCMeta, abstractmethod
from ... | 35.703163 | 88 | 0.603437 |
0224b3836e2bb4078860ca00d5beee783a70e15a | 988 | py | Python | src/sentry/utils/sms.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 4 | 2019-05-27T13:55:07.000Z | 2021-03-30T07:05:09.000Z | src/sentry/utils/sms.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/utils/sms.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | from __future__ import absolute_import
import logging
import requests
from six.moves.urllib.parse import quote
from sentry import options
logger = logging.getLogger(__name__)
def sms_available():
return bool(options.get('sms.twilio-account'))
def send_sms(body, to, from_=None):
account = options.get('sm... | 24.7 | 88 | 0.605263 |
a66089eca815b0d0d866e0f80b7dcdf26bdb03b6 | 2,739 | py | Python | jarviscli/plugins/caesar_cipher.py | WWFelina/Jarvis | 69c4dba3e4b86478221b3d401a1f9423434309eb | [
"MIT"
] | 2,605 | 2017-03-10T22:44:36.000Z | 2022-03-31T15:33:17.000Z | jarviscli/plugins/caesar_cipher.py | ritikranjan12/Jarvis | 6a1c5ef2c08724b6ff5929bc434209a24226c09f | [
"MIT"
] | 729 | 2017-03-11T00:06:46.000Z | 2022-03-31T22:04:44.000Z | jarviscli/plugins/caesar_cipher.py | ritikranjan12/Jarvis | 6a1c5ef2c08724b6ff5929bc434209a24226c09f | [
"MIT"
] | 1,181 | 2017-03-10T23:24:55.000Z | 2022-03-31T03:59:46.000Z | from colorama import Fore
from plugin import plugin
@plugin("caesar cipher")
def caesar_cipher_converter(jarvis, s):
option = get_option(jarvis)
if option == 1:
plain_to_cipher(jarvis)
elif option == 2:
cipher_to_plain(jarvis)
else:
return
def get_option(jarvis):
jarvis.... | 26.336538 | 92 | 0.493246 |
ad782f5763b64564cea8ece6bdd4f426a501c917 | 2,686 | py | Python | WEB(BE)/community/serializers.py | osamhack2021/WEB_SONAGI-ON_updraft | c63d62b8348ba991811814aeafa337a6b3785ca2 | [
"MIT"
] | 1 | 2022-03-09T17:04:26.000Z | 2022-03-09T17:04:26.000Z | WEB(BE)/community/serializers.py | osamhack2021/WEB_SONAGI-ON_updraft | c63d62b8348ba991811814aeafa337a6b3785ca2 | [
"MIT"
] | null | null | null | WEB(BE)/community/serializers.py | osamhack2021/WEB_SONAGI-ON_updraft | c63d62b8348ba991811814aeafa337a6b3785ca2 | [
"MIT"
] | null | null | null | from .models import Board, Post, Comment
from rest_framework import serializers
from usersetting.models import UserSetting
class BoardListSerializer(serializers.ModelSerializer):
id = serializers.ReadOnlyField()
class Meta:
model = Board
fields = '__all__'
class PostShowSerializer(serializers.... | 33.575 | 113 | 0.676471 |
d62c8e98f895e10acae9db708d575ecf35f329c8 | 2,800 | py | Python | train.py | Emad2018/aipnd-project | 2e04b8370b3e118f7e2e283df03eca2447fec40a | [
"MIT"
] | null | null | null | train.py | Emad2018/aipnd-project | 2e04b8370b3e118f7e2e283df03eca2447fec40a | [
"MIT"
] | null | null | null | train.py | Emad2018/aipnd-project | 2e04b8370b3e118f7e2e283df03eca2447fec40a | [
"MIT"
] | null | null | null | from torchvision import transforms, datasets, models
import train_helper as thelp
import torch
import torch.nn as nn
import torch.optim as optim
in_args = thelp.get_input_args()
data_dir = in_args.dir
train_dir = data_dir + '/train'
valid_dir = data_dir + '/valid'
test_dir = data_dir + '/test'
data_transforms = {"tra... | 51.851852 | 106 | 0.525714 |
f4481ff55e269b8e76f54ffba095fddbe94db89f | 1,396 | py | Python | generate_img_from_seq.py | TeamSundar/CRISP-RCNN | 271de32d676dcf3524ff2d752bb67e6e801ff179 | [
"MIT"
] | null | null | null | generate_img_from_seq.py | TeamSundar/CRISP-RCNN | 271de32d676dcf3524ff2d752bb67e6e801ff179 | [
"MIT"
] | null | null | null | generate_img_from_seq.py | TeamSundar/CRISP-RCNN | 271de32d676dcf3524ff2d752bb67e6e801ff179 | [
"MIT"
] | 1 | 2021-06-25T09:18:11.000Z | 2021-06-25T09:18:11.000Z | import numpy as np
from matplotlib import pyplot as plt
import pandas as pd
from tqdm import tqdm
def custom_onehot(arr):
img = np.zeros((len(arr),4))
for index, value in enumerate(arr):
if value=='-':
pass
elif value=='A':
img[index][0] = 1
elif value=='C':
... | 25.381818 | 103 | 0.567335 |
8df574c20d3bee515ee158031f396cee84b10311 | 9,495 | py | Python | imblearn/over_sampling/_random_over_sampler.py | cdchushig/imbalanced-learn | f02e7c7c2c021c85823cace405ca2c58ad4ff147 | [
"MIT"
] | 1 | 2022-02-17T16:31:16.000Z | 2022-02-17T16:31:16.000Z | imblearn/over_sampling/_random_over_sampler.py | cdchushig/imbalanced-learn | f02e7c7c2c021c85823cace405ca2c58ad4ff147 | [
"MIT"
] | null | null | null | imblearn/over_sampling/_random_over_sampler.py | cdchushig/imbalanced-learn | f02e7c7c2c021c85823cace405ca2c58ad4ff147 | [
"MIT"
] | null | null | null | """Class to perform random over-sampling."""
# Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com>
# Christos Aridas
# License: MIT
from collections.abc import Mapping
from numbers import Real
import numpy as np
from scipy import sparse
from sklearn.utils import check_array, check_random_state
from sklear... | 36.37931 | 86 | 0.619484 |
bed6a4288f115ad24a427f13b486bf6820940a8d | 8,959 | py | Python | nrm/messaging.py | anlsys/nrm-python | c2655ba7e2b939d634094d10231891a92dcdc51d | [
"BSD-3-Clause"
] | 1 | 2021-09-25T20:11:25.000Z | 2021-09-25T20:11:25.000Z | nrm/messaging.py | anlsys/nrm-python | c2655ba7e2b939d634094d10231891a92dcdc51d | [
"BSD-3-Clause"
] | 5 | 2021-10-01T19:32:16.000Z | 2022-02-25T20:21:39.000Z | nrm/messaging.py | anlsys/nrm-python | c2655ba7e2b939d634094d10231891a92dcdc51d | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
# Copyright 2019 UChicago Argonne, LLC.
# (c.f. AUTHORS, LICENSE)
#
# This file is part of the NRM project.
# For more info, see https://github.com/anlsys/nrm-python
#
# SPDX-License-Identifier: BSD-3-Clause
################################... | 30.164983 | 83 | 0.605983 |
a450943b704f941d37f7b29cad22608d1af12340 | 153,480 | py | Python | moto/ec2/models.py | nijave/moto | c2a1f4eb144cd6149d14627ea559e3fa4e7b5ca5 | [
"Apache-2.0"
] | null | null | null | moto/ec2/models.py | nijave/moto | c2a1f4eb144cd6149d14627ea559e3fa4e7b5ca5 | [
"Apache-2.0"
] | null | null | null | moto/ec2/models.py | nijave/moto | c2a1f4eb144cd6149d14627ea559e3fa4e7b5ca5 | [
"Apache-2.0"
] | 1 | 2019-02-01T02:07:56.000Z | 2019-02-01T02:07:56.000Z | from __future__ import unicode_literals
import copy
import itertools
import ipaddress
import json
import os
import re
import six
import warnings
from pkg_resources import resource_filename
import boto.ec2
from collections import defaultdict
import weakref
from datetime import datetime
from boto.ec2.instance import I... | 38.679435 | 136 | 0.631112 |
1850227088baad4245c0f4827c78e79277e0cbbf | 48,104 | py | Python | nltk/sem/boxer.py | abimurali1993/dev | 295182a75b9b6031656b5c6c10866d517a1992cf | [
"Apache-2.0"
] | 2 | 2015-03-10T14:33:16.000Z | 2015-03-10T14:33:18.000Z | nltk/sem/boxer.py | abimurali1993/dev | 295182a75b9b6031656b5c6c10866d517a1992cf | [
"Apache-2.0"
] | null | null | null | nltk/sem/boxer.py | abimurali1993/dev | 295182a75b9b6031656b5c6c10866d517a1992cf | [
"Apache-2.0"
] | null | null | null | # Natural Language Toolkit: Interface to Boxer
# <http://svn.ask.it.usyd.edu.au/trac/candc/wiki/boxer>
#
# Author: Dan Garrette <dhgarrette@gmail.com>
#
# Copyright (C) 2001-2013 NLTK Project
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
An interface to Boxer.
This interface relies on t... | 39.204564 | 147 | 0.598204 |
3acddec8a75960544601f90f8794282fc15c8d76 | 2,885 | py | Python | examples/contrastModel.py | reflectometry/osrefl | ddf55d542f2eab2a29fd6ffc862379820a06d5c7 | [
"BSD-3-Clause"
] | 2 | 2015-05-21T15:16:46.000Z | 2015-10-23T17:47:36.000Z | examples/contrastModel.py | reflectometry/osrefl | ddf55d542f2eab2a29fd6ffc862379820a06d5c7 | [
"BSD-3-Clause"
] | null | null | null | examples/contrastModel.py | reflectometry/osrefl | ddf55d542f2eab2a29fd6ffc862379820a06d5c7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2008 University of Maryland
# All rights reserved.
# See LICENSE.txt for details.
# Author: Christopher Metting
#Starting Date:9/21/2009
import numpy
from osrefl.model.sample_prep import *
from osrefl.model.samples import *
from numpy import log, abs, min, max
from pylab import figure, show, subplot, i... | 34.345238 | 138 | 0.719584 |
0995ae0058a006c22bd17e2c8199afd7caebebd2 | 4,053 | py | Python | build/win/reorder-imports.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | build/win/reorder-imports.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 250 | 2018-02-02T23:16:57.000Z | 2022-03-21T06:09:53.000Z | build/win/reorder-imports.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import glob
import optparse
import os
import shutil
import subprocess
import sys
sys.path.insert(
0,
os.path.join(os.path.dirn... | 40.939394 | 78 | 0.711818 |
a3031202bdc86e979b0c41578f7b3f1f83ae2eda | 2,778 | py | Python | eoxserver/services/ows/common/v20/encoders.py | ESA-VirES/eoxserver | d7b65adf9317538b267d5cbb1281acb72bc0de2c | [
"OML"
] | 1 | 2017-11-21T22:23:30.000Z | 2017-11-21T22:23:30.000Z | eoxserver/services/ows/common/v20/encoders.py | ESA-VirES/eoxserver | d7b65adf9317538b267d5cbb1281acb72bc0de2c | [
"OML"
] | null | null | null | eoxserver/services/ows/common/v20/encoders.py | ESA-VirES/eoxserver | d7b65adf9317538b267d5cbb1281acb72bc0de2c | [
"OML"
] | null | null | null | #-------------------------------------------------------------------------------
# $Id$
#
# Project: EOxServer <http://eoxserver.org>
# Authors: Fabian Schindler <fabian.schindler@eox.at>
#
#-------------------------------------------------------------------------------
# Copyright (C) 2011 EOX IT Services GmbH
#
# Per... | 39.126761 | 108 | 0.654068 |
82a2269e3ace7238070f90e9ebd7ee2fdc926ded | 176 | py | Python | two_qubit_simulator/quantum_gates/hadamard.py | pweb6304/two-qubit-simulator | 101adaf23a0b3632346293b7478c79d71941cf91 | [
"MIT"
] | null | null | null | two_qubit_simulator/quantum_gates/hadamard.py | pweb6304/two-qubit-simulator | 101adaf23a0b3632346293b7478c79d71941cf91 | [
"MIT"
] | null | null | null | two_qubit_simulator/quantum_gates/hadamard.py | pweb6304/two-qubit-simulator | 101adaf23a0b3632346293b7478c79d71941cf91 | [
"MIT"
] | null | null | null | """
Contains the Hadamard gate
"""
from .quantum_gate import QuantumGate
class Hadamard(QuantumGate):
""" Implements the Hadamard gate """
def __init__(self,elements)
| 17.6 | 40 | 0.727273 |
46f42ffd8173b1195c31e40a67c2c61234756387 | 16,798 | py | Python | tests/ignite/contrib/handlers/test_neptune_logger.py | neptune-ai/ignite | 48b449edc888f7f4cd54a9ea397c57e7de0eba64 | [
"BSD-3-Clause"
] | null | null | null | tests/ignite/contrib/handlers/test_neptune_logger.py | neptune-ai/ignite | 48b449edc888f7f4cd54a9ea397c57e7de0eba64 | [
"BSD-3-Clause"
] | null | null | null | tests/ignite/contrib/handlers/test_neptune_logger.py | neptune-ai/ignite | 48b449edc888f7f4cd54a9ea397c57e7de0eba64 | [
"BSD-3-Clause"
] | null | null | null | import math
import warnings
from unittest.mock import call, ANY, MagicMock
import pytest
import torch
from ignite.engine import Engine, Events, State
from ignite.contrib.handlers.neptune_logger import *
def test_optimizer_params_handler_wrong_setup():
with pytest.raises(TypeError):
OptimizerParamsHandle... | 35.364211 | 120 | 0.704727 |
58e1427514b80f428baba38feeaeedc4c09fc739 | 6,685 | py | Python | test/run_portability_test.py | lilab-bcb/skylab | d230f2d31ba877db58948a9ed73486cd7c71dd59 | [
"BSD-3-Clause"
] | 45 | 2017-10-12T19:37:29.000Z | 2022-01-22T02:56:57.000Z | test/run_portability_test.py | lilab-bcb/skylab | d230f2d31ba877db58948a9ed73486cd7c71dd59 | [
"BSD-3-Clause"
] | 203 | 2017-08-15T13:50:21.000Z | 2021-02-18T01:20:25.000Z | test/run_portability_test.py | truwl/skylab | e31492cd0219ff6f236cd0500401004f16f0fe41 | [
"BSD-3-Clause"
] | 42 | 2017-09-13T14:44:36.000Z | 2022-03-15T09:27:52.000Z | """Runs a single portability test from a test directory."""
import argparse
import datetime
import glob
import json
import os
import sys
import time
import requests
# This is what we need to find in a test directory. I guess we'll glob the PR
# test WDL itself since it's named after the pipeline.
TEST_DIR_LAYOUT = {... | 31.833333 | 99 | 0.672401 |
8a4002a7ef6af031f94c3dadf18477cf5ea60c6e | 5,755 | py | Python | gubernator/github/models.py | smarterclayton/test-infra | 13bff73612f370ad8096e8a8d731faa5e3697adb | [
"Apache-2.0"
] | null | null | null | gubernator/github/models.py | smarterclayton/test-infra | 13bff73612f370ad8096e8a8d731faa5e3697adb | [
"Apache-2.0"
] | 1 | 2021-03-20T05:41:39.000Z | 2021-03-20T05:41:39.000Z | gubernator/github/models.py | smarterclayton/test-infra | 13bff73612f370ad8096e8a8d731faa5e3697adb | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 30.13089 | 94 | 0.637011 |
15579af6a77db548baa9b018898ead9572a3a817 | 672 | py | Python | alipay/aop/api/response/KoubeiItemExtitemInfoCreateResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/KoubeiItemExtitemInfoCreateResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/KoubeiItemExtitemInfoCreateResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class KoubeiItemExtitemInfoCreateResponse(AlipayResponse):
def __init__(self):
super(KoubeiItemExtitemInfoCreateResponse, self).__init__()
self._id = None
... | 25.846154 | 108 | 0.693452 |
869b865631a731a92a24030d602e4c8316e187b9 | 1,943 | py | Python | azure-keyvault/azure/keyvault/v7_0/models/certificate_issuer_set_parameters.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-keyvault/azure/keyvault/v7_0/models/certificate_issuer_set_parameters.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-keyvault/azure/keyvault/v7_0/models/certificate_issuer_set_parameters.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 ... | 39.653061 | 86 | 0.645908 |
40a97bf35221b692b566eca0418946f641541e5f | 264 | py | Python | wagtail/wagtailembeds/urls.py | balkantechnologies/BalkanCMS_core | 68625199028fc96abb175e410a4a7a92c02cb261 | [
"BSD-3-Clause"
] | 1 | 2015-11-05T18:02:04.000Z | 2015-11-05T18:02:04.000Z | wagtail/wagtailembeds/urls.py | balkantechnologies/BalkanCMS_core | 68625199028fc96abb175e410a4a7a92c02cb261 | [
"BSD-3-Clause"
] | 1 | 2021-02-24T08:25:30.000Z | 2021-02-24T08:25:30.000Z | wagtail/wagtailembeds/urls.py | balkantechnologies/BalkanCMS_core | 68625199028fc96abb175e410a4a7a92c02cb261 | [
"BSD-3-Clause"
] | 1 | 2020-11-24T10:21:24.000Z | 2020-11-24T10:21:24.000Z | from django.conf.urls import url
from wagtail.wagtailembeds.views import chooser
urlpatterns = [
url(r'^chooser/$', chooser.chooser, name='wagtailembeds_chooser'),
url(r'^chooser/upload/$', chooser.chooser_upload, name='wagtailembeds_chooser_upload'),
]
| 29.333333 | 91 | 0.757576 |
b419444ccca776c53a338a97574a95fde843affc | 859 | py | Python | harvey/test/test_sorted_key_value.py | vrde/harvey | 9a381fd71c543f7e15d07dca72c4324fcc8ce20f | [
"MIT"
] | 1 | 2016-02-13T04:51:23.000Z | 2016-02-13T04:51:23.000Z | harvey/test/test_sorted_key_value.py | vrde/harvey | 9a381fd71c543f7e15d07dca72c4324fcc8ce20f | [
"MIT"
] | null | null | null | harvey/test/test_sorted_key_value.py | vrde/harvey | 9a381fd71c543f7e15d07dca72c4324fcc8ce20f | [
"MIT"
] | null | null | null | from operator import itemgetter
from harvey.sorted_collection import SortedKeyValue
def test_insert():
s = SortedKeyValue(itemgetter(1), itemgetter(0))
s.insert((0, 'en.wikipedia.org'))
assert s.find_le(10)[1] == 'en.wikipedia.org'
s.insert((10, 'en.wikipedia.org'))
s.insert((20, 'en.wikipedia.o... | 24.542857 | 52 | 0.619325 |
e018a42a3c7b4ba0d2f51c1dea75a472166250e5 | 920 | py | Python | ibis/tests/expr/test_struct.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-08-19T03:36:26.000Z | 2020-08-19T03:36:26.000Z | ibis/tests/expr/test_struct.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2021-03-25T14:07:29.000Z | 2021-03-25T14:07:29.000Z | ibis/tests/expr/test_struct.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 2 | 2020-11-27T22:21:50.000Z | 2021-04-03T09:36:25.000Z | import pickle
from collections import OrderedDict
import ibis
import ibis.expr.operations as ops
import ibis.expr.types as ir
def test_struct_operations():
value = OrderedDict(
[
('a', 1),
('b', list('abc')),
('c', OrderedDict([('foo', [1.0, 2.0])])),
]
)
... | 24.210526 | 64 | 0.630435 |
c6933489456db44e52195b61dd7f967262104c7a | 8,188 | py | Python | Protheus_WebApp/Modules/SIGAPLS/PPLCHAPRE02TESTCASE.py | 98llm/tir-script-samples | 0bff8393b79356aa562e9e6512c11ee6e039b177 | [
"MIT"
] | 17 | 2018-09-24T17:27:08.000Z | 2021-09-16T19:09:46.000Z | Protheus_WebApp/Modules/SIGAPLS/PPLCHAPRE02TESTCASE.py | 98llm/tir-script-samples | 0bff8393b79356aa562e9e6512c11ee6e039b177 | [
"MIT"
] | 4 | 2018-09-24T17:30:32.000Z | 2022-01-03T11:39:30.000Z | Protheus_WebApp/Modules/SIGAPLS/PPLCHAPRE02TESTCASE.py | 98llm/tir-script-samples | 0bff8393b79356aa562e9e6512c11ee6e039b177 | [
"MIT"
] | 18 | 2019-06-07T17:41:34.000Z | 2022-01-31T18:17:31.000Z | import unittest
from tir.technologies.apw_internal import ApwInternal
class PPLCHAPRE02TESTCASE(unittest.TestCase):
# test_PPLCHAPRE02_CT001 - Atendimento guia SADT Autorizada com impressão
# test_PPLCHAPRE02_CT002 - Atendimento guia SADT Pacialmente Autorizada com Impressão
# test_PPLCHAPRE02_CT003 - Atendimento ... | 45.743017 | 174 | 0.654006 |
5236e1e1d04488927330339167dbb5ca72dd2f1c | 5,683 | py | Python | backend/forum/utils/djtools/query_cache.py | karolyi/forum-django | a498be3123deb836e0108258c493b88c645b2163 | [
"MIT"
] | 7 | 2016-09-20T11:49:49.000Z | 2017-06-24T23:51:56.000Z | backend/forum/utils/djtools/query_cache.py | karolyi/forum-django | a498be3123deb836e0108258c493b88c645b2163 | [
"MIT"
] | 17 | 2019-12-22T10:41:48.000Z | 2021-11-17T10:58:50.000Z | backend/forum/utils/djtools/query_cache.py | karolyi/forum-django | a498be3123deb836e0108258c493b88c645b2163 | [
"MIT"
] | 1 | 2016-09-20T11:50:57.000Z | 2016-09-20T11:50:57.000Z | from typing import Iterable, Optional
from django import VERSION
from django.db.models.base import Model
from django.db.models.fields.related import ManyToManyField
from django.db.models.fields.reverse_related import ManyToOneRel
from django.db.models.manager import Manager
from django.db.models.query import QuerySet
... | 34.652439 | 78 | 0.655464 |
adcf83f772e99730293ea4e09207a83c40c468a6 | 13,422 | py | Python | tests/dash/app_dataframe_backend_paging.py | r-chris/dash-table | 0d6b7c41ad06a1c67655f7645a4bbcca2160b0ac | [
"MIT"
] | null | null | null | tests/dash/app_dataframe_backend_paging.py | r-chris/dash-table | 0d6b7c41ad06a1c67655f7645a4bbcca2160b0ac | [
"MIT"
] | null | null | null | tests/dash/app_dataframe_backend_paging.py | r-chris/dash-table | 0d6b7c41ad06a1c67655f7645a4bbcca2160b0ac | [
"MIT"
] | null | null | null | from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
from textwrap import dedent
import dash_table
from index import app
from .utils import section_title
ID_PREFIX = "app_data_updating_graph_be"
IDS = {
"table": ID_PREFIX,
"con... | 33.979747 | 99 | 0.521234 |
bae072b575f27548117dcc2d3ec6d6689982171b | 4,190 | py | Python | indico/modules/rb/operations/admin.py | uxmaster/indico | ecd19f17ef6fdc9f5584f59c87ec647319ce5d31 | [
"MIT"
] | 1 | 2019-11-03T11:34:16.000Z | 2019-11-03T11:34:16.000Z | indico/modules/rb/operations/admin.py | NP-compete/indico | 80db7ca0ef9d1f3240a16b9ff2d84bf0bf26c549 | [
"MIT"
] | null | null | null | indico/modules/rb/operations/admin.py | NP-compete/indico | 80db7ca0ef9d1f3240a16b9ff2d84bf0bf26c549 | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from datetime import datetime, time
from indico.core.db import d... | 39.528302 | 114 | 0.730072 |
b071d2e3312b1c95895f5025bcd78b6a04796f58 | 244 | py | Python | webempresa/pages/admin.py | JoseM1101/web-empresa | 190c70e6f2944beeffc224525e0739a14f78a56b | [
"MIT"
] | null | null | null | webempresa/pages/admin.py | JoseM1101/web-empresa | 190c70e6f2944beeffc224525e0739a14f78a56b | [
"MIT"
] | null | null | null | webempresa/pages/admin.py | JoseM1101/web-empresa | 190c70e6f2944beeffc224525e0739a14f78a56b | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Page
# Register your models here.
class PageAdmin(admin.ModelAdmin):
readonly_fields = ('created', 'updated')
list_display = ('title', 'order')
admin.site.register(Page, PageAdmin)
| 24.4 | 44 | 0.737705 |
8ba66c0ca41fa185ba67645136da09f0b8dc92e1 | 5,303 | py | Python | models/ssd_inception_v2_feature_extractor.py | YuelongLi/Be-My-Ass | cf3921ca70bf5cc92593d200c29b2e1ef06109e0 | [
"MIT"
] | 2 | 2018-07-12T15:32:00.000Z | 2018-07-17T14:40:27.000Z | models/ssd_inception_v2_feature_extractor.py | YuelongLi/Project-Dawn | cf3921ca70bf5cc92593d200c29b2e1ef06109e0 | [
"MIT"
] | null | null | null | models/ssd_inception_v2_feature_extractor.py | YuelongLi/Project-Dawn | cf3921ca70bf5cc92593d200c29b2e1ef06109e0 | [
"MIT"
] | 1 | 2018-07-23T18:04:42.000Z | 2018-07-23T18:04:42.000Z | # Copyright 2017 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... | 41.755906 | 81 | 0.67245 |
8df9ee5d9de68dd6bec7e0d9a99b53e43b3406c6 | 1,319 | py | Python | lecture2/tests/question-2_9.py | ggorman/Introduction-Python-programming-2018 | 739b864c1499ccdbf9010d8fe774087a07bb09ee | [
"CC-BY-3.0"
] | 1 | 2019-01-12T12:43:24.000Z | 2019-01-12T12:43:24.000Z | lecture2/tests/question-2_9.py | ggorman/Introduction-Python-programming-2018 | 739b864c1499ccdbf9010d8fe774087a07bb09ee | [
"CC-BY-3.0"
] | null | null | null | lecture2/tests/question-2_9.py | ggorman/Introduction-Python-programming-2018 | 739b864c1499ccdbf9010d8fe774087a07bb09ee | [
"CC-BY-3.0"
] | 3 | 2019-05-16T21:08:48.000Z | 2022-02-21T06:54:57.000Z | test = {
'name': 'question 2.9',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
>>> np.allclose(compute_heights(), [1.0, 0.9, 0.81, 0.7290000000000001, 0.6561000000000001, 0.5904900000000002, 0.5314410000000002, 0.47829690000000014, 0.43046721000000016, 0.38742048900000... | 28.06383 | 226 | 0.477635 |
afabf94381d95b24e1553d515db7d11ce3111929 | 554 | py | Python | agents_playground/renderers/scene.py | sholloway/agents-playground | f4da7acf9b410b4c01c5afc1aa45233960bea861 | [
"MIT"
] | null | null | null | agents_playground/renderers/scene.py | sholloway/agents-playground | f4da7acf9b410b4c01c5afc1aa45233960bea861 | [
"MIT"
] | 37 | 2021-11-25T14:40:49.000Z | 2022-02-23T23:09:28.000Z | agents_playground/renderers/scene.py | sholloway/agents-playground | f4da7acf9b410b4c01c5afc1aa45233960bea861 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Dict
from agents_playground.simulation.tag import Tag
from agents_playground.agents.agent import Agent
from agents_playground.agents.path import InterpolatedPath
@dataclass
class Scene:
agents: Dict[Tag, Agent]
paths: Dict[Tag, InterpolatedPath]
def __init__(... | 26.380952 | 58 | 0.740072 |
b96cc5c7af5c0e5e7fdc2b4c318bfd527cd993f5 | 5,360 | py | Python | docs/conf.py | ebubae/adversarial-robustness-toolbox | 55efab2c1a60ae14c37b72fe84778355314396ea | [
"MIT"
] | 1 | 2022-01-27T09:07:49.000Z | 2022-01-27T09:07:49.000Z | docs/conf.py | ebubae/adversarial-robustness-toolbox | 55efab2c1a60ae14c37b72fe84778355314396ea | [
"MIT"
] | null | null | null | docs/conf.py | ebubae/adversarial-robustness-toolbox | 55efab2c1a60ae14c37b72fe84778355314396ea | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | 31.715976 | 102 | 0.659328 |
4d58db24346e2d0a97ab74920453154f28f10b2c | 265 | py | Python | tests/artificial/transf_Difference/trend_PolyTrend/cycle_7/ar_/test_artificial_32_Difference_PolyTrend_7__100.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Difference/trend_PolyTrend/cycle_7/ar_/test_artificial_32_Difference_PolyTrend_7__100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Difference/trend_PolyTrend/cycle_7/ar_/test_artificial_32_Difference_PolyTrend_7__100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "Difference", sigma = 0.0, exog_count = 100, ar_order = 0); | 37.857143 | 165 | 0.732075 |
ad498b54c1632e786fd6bcc29bb46b4119064d70 | 1,099 | py | Python | setup.py | ajupatatero/neurasim | c1d3f8163a7389b06a13e453daa98ad5157d9b2e | [
"MIT"
] | null | null | null | setup.py | ajupatatero/neurasim | c1d3f8163a7389b06a13e453daa98ad5157d9b2e | [
"MIT"
] | null | null | null | setup.py | ajupatatero/neurasim | c1d3f8163a7389b06a13e453daa98ad5157d9b2e | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='NeuraSim',
version='3.2.1',
description='CNN to accelerate Poisson step in CFD solvers.',
author='Anonymus',
license='LICENSE.txt',
packages=find_packages(include=['NeuraSim']),
install_requires=[
"numpy", "scipy", "matplotli... | 31.4 | 65 | 0.609645 |
a539e0acf56edcc9502338b7ebb4314cd52d0e9f | 8,736 | py | Python | deepbiome/loss_and_metric.py | Hua-Zhou/deepbiome | e168e5677356ef98ac504b587cba2b3d76c9dc5d | [
"BSD-3-Clause"
] | 1 | 2022-01-11T18:42:27.000Z | 2022-01-11T18:42:27.000Z | deepbiome/loss_and_metric.py | Hua-Zhou/deepbiome | e168e5677356ef98ac504b587cba2b3d76c9dc5d | [
"BSD-3-Clause"
] | null | null | null | deepbiome/loss_and_metric.py | Hua-Zhou/deepbiome | e168e5677356ef98ac504b587cba2b3d76c9dc5d | [
"BSD-3-Clause"
] | null | null | null | ######################################################################
## DeepBiome
## - Loss and metrics (mse, cross-entropy)
##
## July 10. 2019
## Youngwon (youngwon08@gmail.com)
##
## Reference
## - Keras (https://github.com/keras-team/keras)
######################################################################
i... | 41.402844 | 144 | 0.602793 |
6d6abf5b12a4baca8dfce50a8863de36be97d610 | 122 | py | Python | prpc/response.py | einsfr/cmc-storage | b8f806ee343accf827c78c556a6bb4023bed4556 | [
"MIT"
] | null | null | null | prpc/response.py | einsfr/cmc-storage | b8f806ee343accf827c78c556a6bb4023bed4556 | [
"MIT"
] | null | null | null | prpc/response.py | einsfr/cmc-storage | b8f806ee343accf827c78c556a6bb4023bed4556 | [
"MIT"
] | null | null | null |
class BaseResponse:
pass
class DataResponse(BaseResponse):
pass
class ErrorResponse(BaseResponse):
pass
| 9.384615 | 34 | 0.721311 |
3030be7ff8d4d3f71c8353cf7efd21180e4ff75f | 13,945 | py | Python | simulation/observations.py | kuntzer/binfind | 28f9cf9474e6b39a55a1a22d19ca8131a0408c84 | [
"MIT"
] | null | null | null | simulation/observations.py | kuntzer/binfind | 28f9cf9474e6b39a55a1a22d19ca8131a0408c84 | [
"MIT"
] | null | null | null | simulation/observations.py | kuntzer/binfind | 28f9cf9474e6b39a55a1a22d19ca8131a0408c84 | [
"MIT"
] | null | null | null | from __future__ import division
import numpy as np
import scipy.interpolate as interp
from scipy.spatial import cKDTree
import sklearn.metrics as metrics
from .. import utils
from .. import diagnostics
import logging
logger = logging.getLogger(__name__)
class Observations():
def __init__(self, ei_max_error, r2_... | 35.214646 | 133 | 0.6583 |
eb72c76ce77f9618c3afc3b07effc2b002cbfed6 | 61 | py | Python | actions/__init__.py | Adrian-Tamas/python-behave-automation-quickstart | 243d58dc52e3bcf7a93cb9dcf4a0175e52ab0131 | [
"MIT"
] | null | null | null | actions/__init__.py | Adrian-Tamas/python-behave-automation-quickstart | 243d58dc52e3bcf7a93cb9dcf4a0175e52ab0131 | [
"MIT"
] | null | null | null | actions/__init__.py | Adrian-Tamas/python-behave-automation-quickstart | 243d58dc52e3bcf7a93cb9dcf4a0175e52ab0131 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger('gdp-automation')
| 15.25 | 44 | 0.786885 |
b6001057e4e79390e86ee7e8a1e8ba26b01bc28b | 7,808 | py | Python | RasPi_Dev/ros_ws/devel/lib/python2.7/dist-packages/world_canvas_msgs/srv/_ResetDatabase.py | QianheYu/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T03:31:15.000Z | 2022-03-11T03:31:15.000Z | RasPi_Dev/ros_ws/devel/lib/python2.7/dist-packages/world_canvas_msgs/srv/_ResetDatabase.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | RasPi_Dev/ros_ws/devel/lib/python2.7/dist-packages/world_canvas_msgs/srv/_ResetDatabase.py | bravetree/xtark_driver_dev | 1708888161cf20c0d1f45c99d0da4467d69c26c8 | [
"BSD-3-Clause"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from world_canvas_msgs/ResetDatabaseRequest.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class ResetDatabaseRequest(genpy.Message):
_md5sum = "d41d8cd98f00b204e98009... | 32.806723 | 145 | 0.658171 |
b124039778d46849d84024bc23719078fdd44a8e | 24,394 | py | Python | gnpy/core/network.py | caffery-chen/oopt-gnpy | 211227288016a75328710ee8d1c78b820dac89d9 | [
"BSD-3-Clause"
] | null | null | null | gnpy/core/network.py | caffery-chen/oopt-gnpy | 211227288016a75328710ee8d1c78b820dac89d9 | [
"BSD-3-Clause"
] | null | null | null | gnpy/core/network.py | caffery-chen/oopt-gnpy | 211227288016a75328710ee8d1c78b820dac89d9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
gnpy.core.network
=================
Working with networks which consist of network elements
'''
from operator import attrgetter
from gnpy.core import ansi_escapes, elements
from gnpy.core.exceptions import ConfigurationError, NetworkTopologyError
from gnpy.core.util... | 43.795332 | 140 | 0.626384 |
12b41a788b03bd1ea7542820c3d5db1b25379b4b | 461 | py | Python | tests/system/test_base.py | chuck-horowitz/pvbeat | eae941db478e585dd42ba43cd84ea27b44c9e90a | [
"Apache-2.0"
] | null | null | null | tests/system/test_base.py | chuck-horowitz/pvbeat | eae941db478e585dd42ba43cd84ea27b44c9e90a | [
"Apache-2.0"
] | null | null | null | tests/system/test_base.py | chuck-horowitz/pvbeat | eae941db478e585dd42ba43cd84ea27b44c9e90a | [
"Apache-2.0"
] | null | null | null | from pvbeat import BaseTest
import os
class Test(BaseTest):
def test_base(self):
"""
Basic test with exiting Pvbeat normally
"""
self.render_config_template(
path=os.path.abspath(self.working_dir) + "/log/*"
)
pvbeat_proc = self.start_beat()
s... | 23.05 | 71 | 0.618221 |
44d8dbbb7d1a182d0dd6cb70e30056d4062a01d7 | 8,636 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_load_balancer_backend_address_pools_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_load_balancer_backend_address_pools_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 15 | 2019-07-12T18:18:04.000Z | 2019-07-25T20:55:51.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/operations/_load_balancer_backend_address_pools_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.977778 | 218 | 0.672186 |
edecd83416736779badde7e006edc43adac3569e | 54,086 | py | Python | astropy/time/formats.py | gpdf/astropy | c487542611276a3361a38d6c4b3954dcd637f847 | [
"BSD-3-Clause"
] | null | null | null | astropy/time/formats.py | gpdf/astropy | c487542611276a3361a38d6c4b3954dcd637f847 | [
"BSD-3-Clause"
] | null | null | null | astropy/time/formats.py | gpdf/astropy | c487542611276a3361a38d6c4b3954dcd637f847 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import collections
import fnmatch
import time
import re
import datetime
import warnings
from collections import OrderedDict, defaultdict
import numpy as np
from astropy.utils.decorators import lazyproperty
from astropy.utils.excep... | 37.533657 | 99 | 0.570443 |
91e5d82bb4661b4cfce83a379e752118919e4e1f | 194 | py | Python | tests/gis_tests/geoapp/sitemaps.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 61,676 | 2015-01-01T00:05:13.000Z | 2022-03-31T20:37:54.000Z | tests/gis_tests/geoapp/sitemaps.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 8,884 | 2015-01-01T00:12:05.000Z | 2022-03-31T19:53:11.000Z | tests/gis_tests/geoapp/sitemaps.py | mustafa0x/django | d7394cfa13a4d1a02356e3a83e10ec100fbb9948 | [
"BSD-3-Clause",
"0BSD"
] | 33,143 | 2015-01-01T02:04:52.000Z | 2022-03-31T19:42:46.000Z | from django.contrib.gis.sitemaps import KMLSitemap, KMZSitemap
from .models import City, Country
sitemaps = {
'kml': KMLSitemap([City, Country]),
'kmz': KMZSitemap([City, Country]),
}
| 21.555556 | 62 | 0.706186 |
24af79ac020a87240e8b1adfaa5838e7c9b29048 | 536 | py | Python | library/lib_study/08_rlcompleter.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | library/lib_study/08_rlcompleter.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | library/lib_study/08_rlcompleter.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | # rlcompeleter 通过补全有效的 Python 标识符和关键字定义了一个适用于 readline 模块的补全函数。
# rlcompleter 模块是为了使用 Python 的 交互模式 而设计的。 除非 Python 是通过 -S 选项运行, 这个模块总是自动地被导入且配置 (参见 Readline configuration)。
import rlcompleter
"""
>>> import rlcompleter
>>> import readline
>>> readline.parse_and_bind("tab: complete")
>>> readline. <TAB PRESSED>
readlin... | 41.230769 | 109 | 0.751866 |
0f5f7d85b30116fa99436eec46adf19b90c19803 | 239 | py | Python | pinakes/main/catalog/tests/unit/test_tenants.py | hsong-rh/pinakes | 2f08cb757ca64c866af3244686b92a3074fc7571 | [
"Apache-2.0"
] | 2 | 2022-03-17T18:53:58.000Z | 2022-03-17T22:04:22.000Z | pinakes/main/catalog/tests/unit/test_tenants.py | hsong-rh/pinakes | 2f08cb757ca64c866af3244686b92a3074fc7571 | [
"Apache-2.0"
] | 9 | 2022-03-18T08:22:57.000Z | 2022-03-30T17:14:49.000Z | pinakes/main/catalog/tests/unit/test_tenants.py | hsong-rh/pinakes | 2f08cb757ca64c866af3244686b92a3074fc7571 | [
"Apache-2.0"
] | 7 | 2022-03-17T22:03:08.000Z | 2022-03-28T21:28:34.000Z | import pytest
from pinakes.main.tests.factories import TenantFactory
class TestTenants:
@pytest.mark.django_db
def test_tenant(self):
tenant = TenantFactory()
assert tenant.external_tenant.startswith("external")
| 21.727273 | 60 | 0.740586 |
74189c7518112af502d83673dc8d20f20f02de84 | 1,377 | py | Python | accounts/models.py | mariuslihet/CRM | 1323dc358a016d027717466f946ffd3af74897f2 | [
"MIT"
] | 2 | 2018-07-25T13:11:19.000Z | 2019-04-19T03:45:40.000Z | accounts/models.py | mariuslihet/CRM | 1323dc358a016d027717466f946ffd3af74897f2 | [
"MIT"
] | 2 | 2020-06-05T19:05:09.000Z | 2021-06-10T21:08:49.000Z | accounts/models.py | mariuslihet/CRM | 1323dc358a016d027717466f946ffd3af74897f2 | [
"MIT"
] | 1 | 2019-05-07T04:30:36.000Z | 2019-05-07T04:30:36.000Z | from django.db import models
from django.utils.translation import pgettext_lazy
from django.utils.translation import ugettext_lazy as _
from common.models import User, Address, Team
from common.utils import INDCHOICES
class Account(models.Model):
name = models.CharField(pgettext_lazy("Name of Account", "Name"), ... | 47.482759 | 139 | 0.761075 |
7a2abfe124f44a4e3ce366ea42f62ef090a72e00 | 509 | py | Python | setup.py | ONS-OpenData/cmd-databaker-utils | a5a80e2da460d85558d814c051c0e40f035ef0a2 | [
"MIT"
] | null | null | null | setup.py | ONS-OpenData/cmd-databaker-utils | a5a80e2da460d85558d814c051c0e40f035ef0a2 | [
"MIT"
] | null | null | null | setup.py | ONS-OpenData/cmd-databaker-utils | a5a80e2da460d85558d814c051c0e40f035ef0a2 | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name = 'databakerUtils',
packages = ['databakerUtils'],
version = '0.1.49',
description = 'Some additional utilities for using databaker within ONS digital publishing',
author = 'Michael Adams',
author_email = 'michael.adams@ons.gov.uk',
url = 'https://github.com/ON... | 36.357143 | 94 | 0.709234 |
d469b508fd478b67fa7fe25acc068ce2dc1fab9f | 18,735 | py | Python | sympy/functions/elementary/tests/test_integers.py | Michal-Gagala/sympy | 3cc756c2af73b5506102abaeefd1b654e286e2c8 | [
"MIT"
] | null | null | null | sympy/functions/elementary/tests/test_integers.py | Michal-Gagala/sympy | 3cc756c2af73b5506102abaeefd1b654e286e2c8 | [
"MIT"
] | null | null | null | sympy/functions/elementary/tests/test_integers.py | Michal-Gagala/sympy | 3cc756c2af73b5506102abaeefd1b654e286e2c8 | [
"MIT"
] | null | null | null | from sympy.calculus.accumulationbounds import AccumBounds
from sympy.core.numbers import (E, Float, I, Rational, nan, oo, pi, zoo)
from sympy.core.relational import (Eq, Ge, Gt, Le, Lt, Ne)
from sympy.core.singleton import S
from sympy.core.symbol import (Symbol, symbols)
from sympy.functions.combinatorial.factori... | 32.025641 | 86 | 0.56632 |
7dd9d4a23a94b2e45ea9ff84eb289e91d5a86429 | 11,085 | py | Python | fairseq/logging/progress_bar.py | gooran/FormalityStyleTransfer | 6c8c92abf54a536a2741f997b857ecc5f0d937eb | [
"MIT"
] | 14 | 2020-08-15T09:26:41.000Z | 2022-03-18T05:24:38.000Z | fairseq/logging/progress_bar.py | gooran/FormalityStyleTransfer | 6c8c92abf54a536a2741f997b857ecc5f0d937eb | [
"MIT"
] | 4 | 2020-12-04T09:15:35.000Z | 2022-01-04T09:10:46.000Z | fairseq/logging/progress_bar.py | gooran/FormalityStyleTransfer | 6c8c92abf54a536a2741f997b857ecc5f0d937eb | [
"MIT"
] | 4 | 2020-05-27T17:20:29.000Z | 2021-11-11T11:43:35.000Z | # 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.
"""
Wrapper around various loggers and progress bars (e.g., tqdm).
"""
import atexit
import json
import logging
import os
import sys
from col... | 31.402266 | 93 | 0.611367 |
90bbf40288b8ec922b143c8e0203e8d00881a48d | 233 | py | Python | pmdarima/preprocessing/endog/__init__.py | tuomijal/pmdarima | 5bf84a2a5c42b81b949bd252ad3d4c6c311343f8 | [
"MIT"
] | 736 | 2019-12-02T01:33:31.000Z | 2022-03-31T21:45:29.000Z | pmdarima/preprocessing/endog/__init__.py | tuomijal/pmdarima | 5bf84a2a5c42b81b949bd252ad3d4c6c311343f8 | [
"MIT"
] | 186 | 2019-12-01T18:01:33.000Z | 2022-03-31T18:27:56.000Z | pmdarima/preprocessing/endog/__init__.py | tuomijal/pmdarima | 5bf84a2a5c42b81b949bd252ad3d4c6c311343f8 | [
"MIT"
] | 126 | 2019-12-07T04:03:19.000Z | 2022-03-31T17:40:14.000Z | # -*- coding: utf-8 -*-
from .boxcox import *
from .log import *
# don't want to accidentally hoist `base` to top-level, since preprocessing has
# its own base
__all__ = [s for s in dir() if not (s.startswith("_") or s == 'base')]
| 25.888889 | 79 | 0.652361 |
3b2acc98435ce9e0fbf0f4182de4b847aeec8ac8 | 600 | py | Python | article/migrations/0006_auto_20180412_2109.py | AmlHanfy/iTrack-Project | 6afe64ff3bd78c6c9dc93d68c0ed52708a8dcb1a | [
"Apache-2.0"
] | null | null | null | article/migrations/0006_auto_20180412_2109.py | AmlHanfy/iTrack-Project | 6afe64ff3bd78c6c9dc93d68c0ed52708a8dcb1a | [
"Apache-2.0"
] | null | null | null | article/migrations/0006_auto_20180412_2109.py | AmlHanfy/iTrack-Project | 6afe64ff3bd78c6c9dc93d68c0ed52708a8dcb1a | [
"Apache-2.0"
] | 3 | 2018-01-23T19:08:22.000Z | 2018-09-25T06:47:24.000Z | # Generated by Django 2.0.2 on 2018-04-12 19:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('article', '0005_auto_20180412_1836'),
]
operations = [
migrations.DeleteModel(
na... | 26.086957 | 136 | 0.601667 |
6461464a64eca62369e4ea3822c262a2fce5bcb3 | 4,355 | py | Python | src/fidibot.py | freestyl3r/fidibot | b40f7663a1f8ff6be8fb19c63b835a3b01fea220 | [
"BSD-2-Clause"
] | null | null | null | src/fidibot.py | freestyl3r/fidibot | b40f7663a1f8ff6be8fb19c63b835a3b01fea220 | [
"BSD-2-Clause"
] | null | null | null | src/fidibot.py | freestyl3r/fidibot | b40f7663a1f8ff6be8fb19c63b835a3b01fea220 | [
"BSD-2-Clause"
] | null | null | null | #! /usr/bin/env python
#
# Author: Nick Raptis <airscorp@gmail.com>
import argparse
import irc.bot
from irc.strings import lower
from logsetup import setup_logging
from modules import activate_modules
from alternatives import alternatives, read_files, _
import logging
log = logging.getLogger(__name__)
# set unicode ... | 37.869565 | 90 | 0.61837 |
6be28b5fb2b73a9ec6fdd79de7f1ea02556531fa | 329 | py | Python | raven/utils/testutils.py | blueyed/raven-python | 1c57b6e129771ceb2faef16d239e33fea45c6293 | [
"BSD-3-Clause"
] | 1 | 2020-04-13T02:43:06.000Z | 2020-04-13T02:43:06.000Z | raven/utils/testutils.py | blueyed/raven-python | 1c57b6e129771ceb2faef16d239e33fea45c6293 | [
"BSD-3-Clause"
] | null | null | null | raven/utils/testutils.py | blueyed/raven-python | 1c57b6e129771ceb2faef16d239e33fea45c6293 | [
"BSD-3-Clause"
] | null | null | null | """
raven.utils.testutils
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from exam import Exam
from .compat import TestCase as BaseTestCase
class TestCase(Exam, BaseTestCase):
... | 19.352941 | 75 | 0.711246 |
2966dc0143757c5e01d967978d1b307f3cc66b9a | 666 | py | Python | Electro.py | razbiralochka/SolarResearchCubeSat | 841db825dc583e7d5884c3f09aa309cdfbdaf7a5 | [
"MIT"
] | null | null | null | Electro.py | razbiralochka/SolarResearchCubeSat | 841db825dc583e7d5884c3f09aa309cdfbdaf7a5 | [
"MIT"
] | null | null | null | Electro.py | razbiralochka/SolarResearchCubeSat | 841db825dc583e7d5884c3f09aa309cdfbdaf7a5 | [
"MIT"
] | null | null | null | import math as m
import numpy as np
import matplotlib.pyplot as plt
E=7.4
C=2500
def U(C):
if C < 3600:
return 7.4*(1-m.exp(-0.001*C))
else:
return 7.4
t=0
h=10
T=[]
Cap=[]
while C < 3600:
T.append(t)
Cap.append(C)
C = C + ((E-U(C))/10) * h
t = t + h
... | 14.478261 | 39 | 0.430931 |
10a851a1e670e5ddd373a4037edd8dd643656749 | 5,946 | py | Python | tests/test_auth.py | latuannetnam/aiosmtplib | 89433f33341441cab3929b20575b0b828b7ba46e | [
"MIT"
] | null | null | null | tests/test_auth.py | latuannetnam/aiosmtplib | 89433f33341441cab3929b20575b0b828b7ba46e | [
"MIT"
] | null | null | null | tests/test_auth.py | latuannetnam/aiosmtplib | 89433f33341441cab3929b20575b0b828b7ba46e | [
"MIT"
] | 1 | 2020-12-02T16:08:13.000Z | 2020-12-02T16:08:13.000Z | import base64
from collections import deque
import pytest
from aiosmtplib.auth import SMTPAuth, crammd5_verify
from aiosmtplib.errors import SMTPAuthenticationError, SMTPException
from aiosmtplib.response import SMTPResponse
from aiosmtplib.status import SMTPStatus
pytestmark = pytest.mark.asyncio()
SUCCESS_RESPO... | 30.96875 | 85 | 0.724016 |
0335b4025446fc709211f85d0080d4d01058a580 | 616 | py | Python | leetcode/easy/same_tree/py/solution.py | lilsweetcaligula/Online-Judges | 48454a8e6b5b86f80e89eca1b396480df8960cfd | [
"MIT"
] | null | null | null | leetcode/easy/same_tree/py/solution.py | lilsweetcaligula/Online-Judges | 48454a8e6b5b86f80e89eca1b396480df8960cfd | [
"MIT"
] | null | null | null | leetcode/easy/same_tree/py/solution.py | lilsweetcaligula/Online-Judges | 48454a8e6b5b86f80e89eca1b396480df8960cfd | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def isSameTree(self, p, q):
"""
:type p: TreeNode
:type q: TreeNode
:rtype: bool
... | 24.64 | 84 | 0.48539 |
0337794490e59afb0d50e7e70f8ff18f29c9d996 | 1,912 | py | Python | Data Manipulation with pandas/Transforming-Data.py | shreejitverma/Data-Scientist | 03c06936e957f93182bb18362b01383e5775ffb1 | [
"MIT"
] | 2 | 2022-03-12T04:53:03.000Z | 2022-03-27T12:39:21.000Z | Data Manipulation with pandas/Transforming-Data.py | shivaniverma1/Data-Scientist | f82939a411484311171465591455880c8e354750 | [
"MIT"
] | null | null | null | Data Manipulation with pandas/Transforming-Data.py | shivaniverma1/Data-Scientist | f82939a411484311171465591455880c8e354750 | [
"MIT"
] | 2 | 2022-03-12T04:52:21.000Z | 2022-03-27T12:45:32.000Z |
# Import pandas using the alias pd
import pandas as pd
# Print the head of the homelessness data
print(homelessness.head())
# Print the values of homelessness
print(homelessness.values)
# Print the column index of homelessness
print(homelessness.columns)
# Print the row index of homelessness
print(homelessness.i... | 26.929577 | 82 | 0.780335 |
d9339bd134712d1c68c4eba371900ca3a83f84ca | 84 | py | Python | PCTC/2022 R0/Q8.py | object-oriented-human/competitive | 9e761020e887d8980a39a64eeaeaa39af0ecd777 | [
"MIT"
] | 1 | 2022-02-21T15:43:01.000Z | 2022-02-21T15:43:01.000Z | PCTC/2022 R0/Q8.py | foooop/competitive | 9e761020e887d8980a39a64eeaeaa39af0ecd777 | [
"MIT"
] | null | null | null | PCTC/2022 R0/Q8.py | foooop/competitive | 9e761020e887d8980a39a64eeaeaa39af0ecd777 | [
"MIT"
] | null | null | null | s, n = int(input()), int(input())
while n:
s *= 2
s += 1
n -= 1
print(s) | 14 | 33 | 0.428571 |
d342489cb3a075d75aa28dba608d8d9dacc6f9e3 | 3,094 | gyp | Python | ion/ion.gyp | isabella232/ion-1 | ef47f3b824050499ce5c6f774b366f6c4dbce0af | [
"Apache-2.0"
] | 1 | 2020-03-12T12:49:31.000Z | 2020-03-12T12:49:31.000Z | ion/ion.gyp | isabella232/ion-1 | ef47f3b824050499ce5c6f774b366f6c4dbce0af | [
"Apache-2.0"
] | null | null | null | ion/ion.gyp | isabella232/ion-1 | ef47f3b824050499ce5c6f774b366f6c4dbce0af | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2017 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 or... | 33.268817 | 79 | 0.628959 |
2619347060d6df394660e61a24ecafcf10e71980 | 3,037 | py | Python | contrib/linearize/linearize-hashes.py | ToranTeam/NewToran | ba40d8884f6f3e0d3aa7a0eb54ada7c6a21e2642 | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | ToranTeam/NewToran | ba40d8884f6f3e0d3aa7a0eb54ada7c6a21e2642 | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | ToranTeam/NewToran | ba40d8884f6f3e0d3aa7a0eb54ada7c6a21e2642 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2014 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import pri... | 26.640351 | 90 | 0.682581 |
fdea05dfed30724a56938efa5ddfe4dfb23a77a5 | 242,217 | py | Python | mem.py | sushmitajaiswal/PythonPrograms | d4fb1b36953185e2f8dd866798ca6965a52563a9 | [
"MIT"
] | null | null | null | mem.py | sushmitajaiswal/PythonPrograms | d4fb1b36953185e2f8dd866798ca6965a52563a9 | [
"MIT"
] | null | null | null | mem.py | sushmitajaiswal/PythonPrograms | d4fb1b36953185e2f8dd866798ca6965a52563a9 | [
"MIT"
] | null | null | null |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" hre... | 71.15658 | 758 | 0.615205 |
3177808f63c3277ffb663cd4bd9f076141be2712 | 49,516 | py | Python | python/ccxt/probit.py | cloudinertia/ccxt | 877316d1e8e9b909d3781c8d23c0ad01f442357f | [
"MIT"
] | 1 | 2021-09-06T00:09:11.000Z | 2021-09-06T00:09:11.000Z | python/ccxt/probit.py | cloudinertia/ccxt | 877316d1e8e9b909d3781c8d23c0ad01f442357f | [
"MIT"
] | null | null | null | python/ccxt/probit.py | cloudinertia/ccxt | 877316d1e8e9b909d3781c8d23c0ad01f442357f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import base64
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import A... | 40.821105 | 512 | 0.482571 |
4ca4aeb513286783dbb9bced30a8ce7e6ce8a898 | 679 | py | Python | setup.py | ClarityCoders/xagents | 73ad38b07e2b2bca7487f0a5ac5a49e4f3f0dc35 | [
"MIT"
] | null | null | null | setup.py | ClarityCoders/xagents | 73ad38b07e2b2bca7487f0a5ac5a49e4f3f0dc35 | [
"MIT"
] | null | null | null | setup.py | ClarityCoders/xagents | 73ad38b07e2b2bca7487f0a5ac5a49e4f3f0dc35 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
install_requires = [dep.strip() for dep in open('requirements.txt')]
setup(
name='xagents',
version='1.0',
packages=find_packages(),
url='https://github.com/schissmantics/xagents',
license='MIT',
author='schissmantics',
author_email='schissmantic... | 28.291667 | 94 | 0.677467 |
709b18228eca8c9a846c24aadf2a717dc4827fa3 | 1,092 | py | Python | tests/command_parse/test_connection.py | qiaocci/iredis | 81892e9083b3ebccef246926076888e986340f96 | [
"BSD-3-Clause"
] | null | null | null | tests/command_parse/test_connection.py | qiaocci/iredis | 81892e9083b3ebccef246926076888e986340f96 | [
"BSD-3-Clause"
] | null | null | null | tests/command_parse/test_connection.py | qiaocci/iredis | 81892e9083b3ebccef246926076888e986340f96 | [
"BSD-3-Clause"
] | null | null | null | def test_auth(judge_command):
judge_command("auth 123", {"command_password": "auth", "password": "123"})
def test_echo(judge_command):
judge_command("echo hello", {"command_message": "echo", "message": "hello"})
def test_ping(judge_command):
judge_command("ping hello", {"command_messagex": "ping", "mess... | 32.117647 | 87 | 0.624542 |
336e90a27b3302eb5cf1bf524dfe66cbb6dc67f1 | 7,462 | py | Python | lib/django-1.4/django/contrib/auth/admin.py | MiCHiLU/google_appengine_sdk | 3da9f20d7e65e26c4938d2c4054bc4f39cbc5522 | [
"Apache-2.0"
] | 26 | 2015-01-20T08:02:38.000Z | 2020-06-10T04:57:41.000Z | lib/django-1.4/django/contrib/auth/admin.py | MiCHiLU/google_appengine_sdk | 3da9f20d7e65e26c4938d2c4054bc4f39cbc5522 | [
"Apache-2.0"
] | 4 | 2016-02-28T05:53:54.000Z | 2017-01-03T07:39:50.000Z | lib/django-1.4/django/contrib/auth/admin.py | MiCHiLU/google_appengine_sdk | 3da9f20d7e65e26c4938d2c4054bc4f39cbc5522 | [
"Apache-2.0"
] | 13 | 2016-02-28T00:14:23.000Z | 2021-05-03T15:47:36.000Z | from django.db import transaction
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.forms import (UserCreationForm, UserChangeForm,
AdminPasswordChangeForm)
from django.contrib.auth.models import User, Group
from django.contrib import messages
from django.core.exceptions imp... | 42.64 | 83 | 0.631332 |
08c79e7b5109bfa55cb76f35ebd3bb72f65d8ed4 | 14,371 | py | Python | Lib/asyncio/futures.py | ErikBjare/cpython | b68431fadb3150134ac6ccbf501cdfeaf4c75678 | [
"0BSD"
] | 2 | 2022-03-27T14:52:48.000Z | 2022-03-27T17:35:22.000Z | Lib/asyncio/futures.py | dalakatt/cpython | 2f49b97cc5426087b46515254b9a97a22ee8c807 | [
"0BSD"
] | 8 | 2022-01-07T11:31:11.000Z | 2022-03-04T00:07:16.000Z | Lib/asyncio/futures.py | dalakatt/cpython | 2f49b97cc5426087b46515254b9a97a22ee8c807 | [
"0BSD"
] | 1 | 2022-03-27T18:34:54.000Z | 2022-03-27T18:34:54.000Z | """A Future class similar to the one in PEP 3148."""
__all__ = (
'Future', 'wrap_future', 'isfuture',
)
import concurrent.futures
import contextvars
import logging
import sys
import warnings
from types import GenericAlias
from . import base_futures
from . import events
from . import exceptions
from . import form... | 33.266204 | 79 | 0.640248 |
d3f0e4b74479385780af521d4e53b4900737d845 | 1,537 | py | Python | sebs/local/deployment.py | opal-mimuw/serverless-benchmarks | 16ac3988b3891a6ad2ae91e7c7175315d924c70c | [
"BSD-3-Clause"
] | 35 | 2020-12-30T19:31:30.000Z | 2022-03-28T11:10:00.000Z | sebs/local/deployment.py | opal-mimuw/serverless-benchmarks | 16ac3988b3891a6ad2ae91e7c7175315d924c70c | [
"BSD-3-Clause"
] | 24 | 2021-01-04T15:37:05.000Z | 2022-03-14T00:45:20.000Z | sebs/local/deployment.py | opal-mimuw/serverless-benchmarks | 16ac3988b3891a6ad2ae91e7c7175315d924c70c | [
"BSD-3-Clause"
] | 10 | 2021-06-13T13:13:39.000Z | 2021-12-20T22:05:50.000Z | import json
from typing import List, Optional
from sebs.cache import Cache
from sebs.local.function import LocalFunction
from sebs.local.storage import Minio
from sebs.utils import serialize
class Deployment:
def __init__(self):
self._functions: List[LocalFunction] = []
self._storage: Optional[Mi... | 31.367347 | 100 | 0.62134 |
4575e998126a2fdf86986a9fcaba9b069e2a9dbd | 1,072 | py | Python | examples/obtain_refresh_token.py | NadimAsad/prawcore | 168aea5ee4284d8eeeb1d2bcfbad84af828f8cdc | [
"BSD-2-Clause"
] | null | null | null | examples/obtain_refresh_token.py | NadimAsad/prawcore | 168aea5ee4284d8eeeb1d2bcfbad84af828f8cdc | [
"BSD-2-Clause"
] | null | null | null | examples/obtain_refresh_token.py | NadimAsad/prawcore | 168aea5ee4284d8eeeb1d2bcfbad84af828f8cdc | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""This example demonstrates the flow for retrieving a refresh token.
In order for this example to work your application's redirect URI must be set
to http://localhost:65010/auth_callback.
This tool can be used to conveniently create refresh tokens for later use with
your web application OAuth2... | 26.8 | 78 | 0.681903 |
e9a9ad0bd880cdcde87e21e799545bea27d39060 | 6,483 | py | Python | telethon/events/common.py | MxAboli/Telethon | 5d13626d7119eb23463495412e0e707d23723680 | [
"MIT"
] | 8 | 2021-06-09T17:26:18.000Z | 2022-02-15T06:13:15.000Z | telethon/events/common.py | MxAboli/Telethon | 5d13626d7119eb23463495412e0e707d23723680 | [
"MIT"
] | 11 | 2021-06-09T17:19:38.000Z | 2021-12-30T07:22:16.000Z | telethon/events/common.py | TAMILVIP007/Telethon | 15c0369b8fb90c991ff241bff34c9d80a171d972 | [
"MIT"
] | 19 | 2021-06-26T13:24:22.000Z | 2022-03-31T07:28:22.000Z | import abc
import asyncio
import warnings
import logging
from .. import utils
from ..tl import TLObject, types
from ..tl.custom.chatgetter import ChatGetter
logger = logging.getLogger(__name__)
async def _into_id_set(client, chats):
"""Helper util to turn the input chat or chats into a set of IDs."""
if chats... | 33.590674 | 84 | 0.607898 |
b3a15d2fb985db29009ddd273877987046b7bfe3 | 1,316 | py | Python | saleor/graphql/page/bulk_mutations.py | famavott/saleor | becf07bf2a4fa8e98b2ea9ad13f910532d48cab0 | [
"BSD-3-Clause"
] | null | null | null | saleor/graphql/page/bulk_mutations.py | famavott/saleor | becf07bf2a4fa8e98b2ea9ad13f910532d48cab0 | [
"BSD-3-Clause"
] | null | null | null | saleor/graphql/page/bulk_mutations.py | famavott/saleor | becf07bf2a4fa8e98b2ea9ad13f910532d48cab0 | [
"BSD-3-Clause"
] | null | null | null | import graphene
from ...page import models
from ..core.mutations import ModelBulkDeleteMutation, ModelBulkPublishMutation
class PageBulkDelete(ModelBulkDeleteMutation):
class Arguments:
ids = graphene.List(
graphene.ID,
required=True,
description='List of page IDs to d... | 24.830189 | 78 | 0.638298 |
5abd80aef365f52a4bf28a2a76ac23676a6e77dc | 18,354 | py | Python | cmd/location-provider/example/gpsfake/simulator/geographiclib/geodesicline.py | edgefarm/edgefarm-service-modules | b72f9b1a9a72906db2bf8c18d6f70ca3518707fd | [
"Apache-2.0"
] | 5 | 2018-10-29T10:33:24.000Z | 2021-02-16T13:41:31.000Z | cmd/location-provider/example/gpsfake/simulator/geographiclib/geodesicline.py | edgefarm/edgefarm-service-modules | b72f9b1a9a72906db2bf8c18d6f70ca3518707fd | [
"Apache-2.0"
] | 1 | 2021-06-13T16:19:32.000Z | 2021-06-13T16:19:32.000Z | gpsfake-module/simulator/geographiclib/geodesicline.py | edgefarm/alm-service-modules | 8f66cf4122ef0df43288a4ac879ecc0098ad0d51 | [
"Apache-2.0"
] | 2 | 2020-09-04T01:14:43.000Z | 2021-03-25T13:47:16.000Z | """Define the :class:`~geographiclib.geodesicline.GeodesicLine` class
The constructor defines the starting point of the line. Points on the
line are given by
* :meth:`~geographiclib.geodesicline.GeodesicLine.Position` position
given in terms of distance
* :meth:`~geographiclib.geodesicline.GeodesicLine.ArcPo... | 42.883178 | 79 | 0.618939 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.