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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c69c6a13aa6ca6f3c8864282f48bd0567a481b75 | 183 | py | Python | env_Pinstaclone/lib/python3.9/site-packages/django_material_icons/templatetags/django_material_icons.py | CosBett/Prime-InstaClone | 08b8ed0c4b6da712e51290dc477063c48b408f96 | [
"Unlicense"
] | null | null | null | env_Pinstaclone/lib/python3.9/site-packages/django_material_icons/templatetags/django_material_icons.py | CosBett/Prime-InstaClone | 08b8ed0c4b6da712e51290dc477063c48b408f96 | [
"Unlicense"
] | null | null | null | env_Pinstaclone/lib/python3.9/site-packages/django_material_icons/templatetags/django_material_icons.py | CosBett/Prime-InstaClone | 08b8ed0c4b6da712e51290dc477063c48b408f96 | [
"Unlicense"
] | null | null | null | from django.template import Library
register = Library()
@register.inclusion_tag('django_material_icon/icon.html')
def material_icon(icon_name):
return {'icon_name': icon_name}
| 22.875 | 57 | 0.786885 |
38bc03c4f515bf562af47fb1c267316beb3e5c24 | 3,840 | py | Python | Calculators/Science/Physcial_Science/Force.py | Matt-Gleich/Multi-Ethnic-Calcs | e9cad11edc812b053f2b3823ff8f491341f82b97 | [
"MIT"
] | 1 | 2021-04-21T17:59:48.000Z | 2021-04-21T17:59:48.000Z | Calculators/Science/Physcial_Science/Force.py | Matt-Gleich/Multi-Lang-Calcs | e9cad11edc812b053f2b3823ff8f491341f82b97 | [
"MIT"
] | 3 | 2019-03-29T17:23:59.000Z | 2019-09-15T03:28:39.000Z | Calculators/Science/Physcial_Science/Force.py | Matt-Gleich/Multi-Lang-Calcs | e9cad11edc812b053f2b3823ff8f491341f82b97 | [
"MIT"
] | null | null | null | # Instructions:
# Just run the file and answer the questions!
# -------------------------------------------
def spacer():
"""
Will clear the output
"""
for i in range(40):
print("\n")
def ask_question(question, cast):
"""
Will ask the user a question
:param question: question tha... | 31.735537 | 100 | 0.557031 |
41819a39a8081b23ef6c6f59cd48f239dfbe4f86 | 351 | py | Python | wysdom/repr.py | jetavator/wysdom | 4c67c82a9df66370da5cf5347abd7450a52d3d03 | [
"Apache-2.0"
] | 1 | 2021-04-20T07:40:28.000Z | 2021-04-20T07:40:28.000Z | wysdom/repr.py | jetavator/wysdom | 4c67c82a9df66370da5cf5347abd7450a52d3d03 | [
"Apache-2.0"
] | 69 | 2020-05-13T07:13:49.000Z | 2021-05-06T18:26:21.000Z | wysdom/repr.py | jetavator/wysdom | 4c67c82a9df66370da5cf5347abd7450a52d3d03 | [
"Apache-2.0"
] | null | null | null | import inspect
def inspect_based_repr(object_to_repr: object):
arg_spec = inspect.getfullargspec(object_to_repr.__init__)
arg_parts = [
f"{arg}={repr(getattr(object_to_repr, arg))}"
for arg in list(arg_spec.args[1:]) + list(arg_spec.kwonlyargs)
]
return f"{object_to_repr.__class__.__na... | 31.909091 | 73 | 0.695157 |
37587f5d8dbf4f648474252c68d93ef847d69f0e | 294 | py | Python | service4/application/routes.py | sophiecosgrove/sfia2 | 195fe931b9c4790bca9481ddd1efb3229a11eadf | [
"MIT"
] | 1 | 2020-07-30T11:00:13.000Z | 2020-07-30T11:00:13.000Z | service4/application/routes.py | sophiecosgrove/sfia2 | 195fe931b9c4790bca9481ddd1efb3229a11eadf | [
"MIT"
] | 1 | 2020-06-15T07:38:44.000Z | 2020-06-15T07:38:44.000Z | service4/application/routes.py | sophiecosgrove/sfia2 | 195fe931b9c4790bca9481ddd1efb3229a11eadf | [
"MIT"
] | 1 | 2020-08-07T08:53:51.000Z | 2020-08-07T08:53:51.000Z | from application import app
import requests
@app.route('/randomfortune', methods=['GET'])
def sentence():
time = requests.get('http://service2:5001/randomtime')
phrase = requests.get('http://service3:5002/randomphrase')
response = time.text + " " + phrase.text
return response | 29.4 | 62 | 0.70068 |
d998f6835f277be97ebb7392282d95fe9c9f3ce7 | 1,924 | py | Python | aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/CreateClusterScriptRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/CreateClusterScriptRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/CreateClusterScriptRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.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... | 32.066667 | 72 | 0.754158 |
81d4c5ccdc22ec682e4077da5b3d382463173155 | 1,071 | py | Python | tests/test_trend_reports.py | jameswilkerson/elex | 27733e3c473fef48676f8bdd56247bee49ad32ea | [
"Apache-2.0"
] | 183 | 2015-11-25T15:13:47.000Z | 2022-01-07T23:02:36.000Z | tests/test_trend_reports.py | jameswilkerson/elex | 27733e3c473fef48676f8bdd56247bee49ad32ea | [
"Apache-2.0"
] | 198 | 2015-11-24T16:48:48.000Z | 2020-10-26T10:38:56.000Z | tests/test_trend_reports.py | jameswilkerson/elex | 27733e3c473fef48676f8bdd56247bee49ad32ea | [
"Apache-2.0"
] | 65 | 2015-12-03T21:29:38.000Z | 2021-08-10T20:03:49.000Z | import tests
class TestDelegateReports(tests.TrendReportTestCase):
"""
@TODO Not very sufficient tests
"""
def test_us_governor_net_winners(self):
trend = self.governor_trends.parties[0]
self.assertEqual(trend.net_winners, '-2')
def test_us_governor_dem_won(self):
trend = ... | 30.6 | 53 | 0.685341 |
f6fc1261270ede6e41f5b6754be1da26bba87af7 | 898 | py | Python | SearchingAlgorithms/Linear_Search.py | OpenGuide/Python---Beginner-s-Guide | 74b853be7f3eaeb490e464b549459bd877c6aa8b | [
"MIT"
] | 35 | 2017-10-09T14:45:34.000Z | 2021-11-11T08:48:52.000Z | SearchingAlgorithms/Linear_Search.py | jawachipcookie/Python-Guide-for-Beginners | 71f87df3a31044d9f6e4e2e7d9617a9e40c039ba | [
"MIT"
] | 35 | 2017-10-09T14:42:54.000Z | 2022-02-26T12:39:36.000Z | SearchingAlgorithms/Linear_Search.py | jawachipcookie/Python-Guide-for-Beginners | 71f87df3a31044d9f6e4e2e7d9617a9e40c039ba | [
"MIT"
] | 112 | 2017-10-09T14:45:42.000Z | 2022-02-25T13:03:30.000Z |
# linear search of an item in the list inputted by the user (python 2.7)
print("Enter numbers to be stored in a list (space separated")
""" map function in order to store the values of the two space separated integers
map (function, iterable..) applies the function on all the items of the iterable """
# linear sear... | 42.761905 | 85 | 0.634744 |
62b3866115ace388dcbf7fac5b4789100f3be22d | 81 | py | Python | exam_reader/__main__.py | 9kin/exam-reader | e255a69f2dba87939a1cbca168d6433bdc6d04c5 | [
"MIT"
] | 1 | 2020-10-26T07:01:27.000Z | 2020-10-26T07:01:27.000Z | exam_reader/__main__.py | 9kin/exam-reader | e255a69f2dba87939a1cbca168d6433bdc6d04c5 | [
"MIT"
] | null | null | null | exam_reader/__main__.py | 9kin/exam-reader | e255a69f2dba87939a1cbca168d6433bdc6d04c5 | [
"MIT"
] | 1 | 2021-01-07T15:27:19.000Z | 2021-01-07T15:27:19.000Z | import sys
from .cli import cli
if __name__ == "__main__":
sys.exit(cli())
| 11.571429 | 26 | 0.654321 |
cd0dccae58867db759392663bca1d375e8f45be8 | 8,511 | py | Python | accelbyte_py_sdk/api/cloudsave/operations/public_player_record/get_player_record_handler_v1.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/cloudsave/operations/public_player_record/get_player_record_handler_v1.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/cloudsave/operations/public_player_record/get_player_record_handler_v1.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
# pylint: disable=duplicate-code
# pylint: disable=li... | 29.96831 | 171 | 0.616261 |
e782d7ab21c96e1dab94095100e69cd843510d4b | 76 | py | Python | python/246.strobogrammatic-number.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | python/246.strobogrammatic-number.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | python/246.strobogrammatic-number.py | stavanmehta/leetcode | 1224e43ce29430c840e65daae3b343182e24709c | [
"Apache-2.0"
] | null | null | null | class Solution:
def isStrobogrammatic(self, num: str) -> bool:
| 19 | 50 | 0.618421 |
9fc55563da711ccc0f68d5e7c36692e97075c1e9 | 2,487 | py | Python | conftest.py | yucheng6039/WebAuto | 13fa954dd58407ee23e89be89f73cb97f5c11108 | [
"Apache-2.0"
] | null | null | null | conftest.py | yucheng6039/WebAuto | 13fa954dd58407ee23e89be89f73cb97f5c11108 | [
"Apache-2.0"
] | null | null | null | conftest.py | yucheng6039/WebAuto | 13fa954dd58407ee23e89be89f73cb97f5c11108 | [
"Apache-2.0"
] | null | null | null | import allure
import pytest
from selenium.webdriver import Chrome
from selenium.webdriver.chrome.options import Options
from common.page_manage import pm
from common.po_base import Page
from config import Driver_Path
page = None
"""
此方法是每次都清除浏览器缓存的
@pytest.fixture(scope="session")
def login_as(browser):
def _lo... | 29.963855 | 81 | 0.667873 |
26e7011d0b2db8ef7295397ae0c9b8e1de20a15d | 2,080 | py | Python | tartiflette/types/type.py | dailymotion/test-ttftt | aa999093a43e4681bec0767d1a15f36621b91baa | [
"MIT"
] | null | null | null | tartiflette/types/type.py | dailymotion/test-ttftt | aa999093a43e4681bec0767d1a15f36621b91baa | [
"MIT"
] | 1 | 2020-08-11T15:41:41.000Z | 2020-08-11T15:41:41.000Z | tartiflette/types/type.py | brasilikum/tartiflette | d31e5462b3764feb6a483fae2c9e47a553e03568 | [
"MIT"
] | null | null | null | from typing import Any, Callable, Optional
class GraphQLType:
def __init__(
self,
name: Optional[str] = None,
description: Optional[str] = None,
is_not_null: Optional[bool] = False,
is_list: Optional[bool] = False,
is_enum_value: Optional[bool] = False,
sche... | 26 | 80 | 0.602404 |
21cfc6e1843e454506058faec5b2e3c5281cc5ef | 427 | py | Python | opsgenie/accounts/requests.py | kumarappan-arumugam/opsgenie-py | 56c6826a25fff5116c46437e0e2795a4c0564841 | [
"BSD-3-Clause"
] | null | null | null | opsgenie/accounts/requests.py | kumarappan-arumugam/opsgenie-py | 56c6826a25fff5116c46437e0e2795a4c0564841 | [
"BSD-3-Clause"
] | null | null | null | opsgenie/accounts/requests.py | kumarappan-arumugam/opsgenie-py | 56c6826a25fff5116c46437e0e2795a4c0564841 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from opsgenie.request import (
BaseRequest,
max_value,
required,
)
class GetAccountRequest(BaseRequest):
def __init__(self):
"""
Used to hold required parameters of Get Account Request call.
https://docs.opsgenie.com/docs/account-api#sectio... | 23.722222 | 75 | 0.665105 |
ba920e26a9481b2d0c25686f46b673e23050f21d | 526 | py | Python | extract_ppt.py | mrsaicharan1/sih-reddys | 31cce88ae323285168854ca6f7c1776961a72b79 | [
"Apache-2.0"
] | null | null | null | extract_ppt.py | mrsaicharan1/sih-reddys | 31cce88ae323285168854ca6f7c1776961a72b79 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:30:35.000Z | 2022-03-11T23:45:42.000Z | extract_ppt.py | mrsaicharan1/sih-reddys | 31cce88ae323285168854ca6f7c1776961a72b79 | [
"Apache-2.0"
] | 2 | 2019-05-14T20:11:18.000Z | 2019-08-15T13:35:40.000Z | from pptx import Presentation
import os
cur_directory = os.path.dirname(os.path.abspath( __file__ ))
files = [x for x in os.listdir(cur_directory) if x.endswith(".pptx")]
raw_text = []
def ppt_to_text():
for eachfile in files:
prs = Presentation(eachfile)
print(eachfile)
print("-----------... | 29.222222 | 69 | 0.587452 |
2962537d70822f9a374af2f907e3abb421746edc | 5,118 | py | Python | s3pooler/migrations/0001_initial.py | Corbelli/django-s3pooler | 586d708916623fc8034dc547cb3b43284510c2aa | [
"BSD-2-Clause"
] | null | null | null | s3pooler/migrations/0001_initial.py | Corbelli/django-s3pooler | 586d708916623fc8034dc547cb3b43284510c2aa | [
"BSD-2-Clause"
] | null | null | null | s3pooler/migrations/0001_initial.py | Corbelli/django-s3pooler | 586d708916623fc8034dc547cb3b43284510c2aa | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-10-17 00:17
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
mig... | 45.696429 | 114 | 0.571512 |
ea7cbe92ecd859308f38577bb6dc0d9c92c07b79 | 298 | py | Python | src/sima/riflex/innerouter.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/riflex/innerouter.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/riflex/innerouter.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | # Generated with InnerOuter
#
from enum import Enum
from enum import auto
class InnerOuter(Enum):
""""""
INNER = auto()
OUTER = auto()
def label(self):
if self == InnerOuter.INNER:
return "Inner"
if self == InnerOuter.OUTER:
return "Outer" | 19.866667 | 36 | 0.577181 |
712331465a4a56407fea5b488c35beb2415ee02f | 24,197 | py | Python | horizon/horizon/base.py | citrix-openstack/horizon | 7987e68f135895728f891c2377b589f701d8106e | [
"Apache-2.0"
] | 2 | 2015-05-18T13:50:21.000Z | 2015-05-18T14:47:47.000Z | horizon/horizon/base.py | andrewsmedina/horizon | 6892653c0573a6a55f359cce6c1796053ef65cbf | [
"Apache-2.0"
] | null | null | null | horizon/horizon/base.py | andrewsmedina/horizon | 6892653c0573a6a55f359cce6c1796053ef65cbf | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Nebula, 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
#
# ... | 36.773556 | 79 | 0.616481 |
d9108376692c5f5ddbaa10ec06f5749a5993064e | 872 | py | Python | pylsd/lsd.py | Salehbigdeli/pylsd | 5f91b349febba16b329f24816a23d662618f5afe | [
"BSD-2-Clause"
] | 2 | 2020-12-19T02:28:14.000Z | 2021-01-24T23:17:56.000Z | pylsd/lsd.py | Salehbigdeli/pylsd | 5f91b349febba16b329f24816a23d662618f5afe | [
"BSD-2-Clause"
] | null | null | null | pylsd/lsd.py | Salehbigdeli/pylsd | 5f91b349febba16b329f24816a23d662618f5afe | [
"BSD-2-Clause"
] | 1 | 2020-12-19T02:27:53.000Z | 2020-12-19T02:27:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2015-12-19 02:09:53
# @Author : Gefu Tang (tanggefu@gmail.com)
# @Link : https://github.com/primetang/pylsd
# @Version : 0.0.1
from .bindings.lsd_ctypes import *
def lsd(src):
rows, cols = src.shape
src = src.reshape(1, rows * cols).t... | 26.424242 | 69 | 0.566514 |
d4f210ab56ca015c567a07366b0223ab669fd90e | 15,350 | py | Python | common/coco_caption/pycocotools/coco.py | jiahuei/tf-sparse-captioning | 9d7b8ecdd44fb1541500ca4f920d6c94fd15bad1 | [
"BSD-3-Clause"
] | null | null | null | common/coco_caption/pycocotools/coco.py | jiahuei/tf-sparse-captioning | 9d7b8ecdd44fb1541500ca4f920d6c94fd15bad1 | [
"BSD-3-Clause"
] | null | null | null | common/coco_caption/pycocotools/coco.py | jiahuei/tf-sparse-captioning | 9d7b8ecdd44fb1541500ca4f920d6c94fd15bad1 | [
"BSD-3-Clause"
] | null | null | null | __author__ = 'tylin'
__version__ = '1.0.1'
# Interface for accessing the Microsoft COCO dataset.
# Microsoft COCO is a large image dataset designed for object detection,
# segmentation, and caption generation. pycocotools is a Python API that
# assists in loading, parsing and visualizing the annotations in COCO.
# Ple... | 41.374663 | 111 | 0.548078 |
02a31441584676069a3ad5a6d74f6b2f9e16e0c8 | 2,956 | py | Python | DemOpenGL/GLUT/tom/lorentz.py | ismaelxyz/graphic-concentration | 2573ed7dc5df907bf5fe89704bf3f009cb083784 | [
"MIT"
] | 1 | 2021-08-22T01:59:27.000Z | 2021-08-22T01:59:27.000Z | DemOpenGL/GLUT/tom/lorentz.py | ismaelxyz/graphic-concentration | 2573ed7dc5df907bf5fe89704bf3f009cb083784 | [
"MIT"
] | null | null | null | DemOpenGL/GLUT/tom/lorentz.py | ismaelxyz/graphic-concentration | 2573ed7dc5df907bf5fe89704bf3f009cb083784 | [
"MIT"
] | null | null | null | """GLUT replacement for the original lorentz.py demonstration code
This is the original lorentz.py demo, with a few changes to
run under GLUT and not require the TK examination widget
extensions.
Code is also broken up somewhat more, with the actual drawing
of the curve in its own function which can be called instead... | 25.050847 | 74 | 0.625846 |
c66528c72b8682d776ce709db2734367f6e20db4 | 3,903 | py | Python | app.py | eniehack/Flask-lightnoveldb | d9e9126358aa6a183dbe50cbf2e7800aa75ca0c3 | [
"MIT"
] | null | null | null | app.py | eniehack/Flask-lightnoveldb | d9e9126358aa6a183dbe50cbf2e7800aa75ca0c3 | [
"MIT"
] | 3 | 2019-01-31T07:03:54.000Z | 2019-01-31T07:08:09.000Z | app.py | eniehack/Flask-lightnoveldb | d9e9126358aa6a183dbe50cbf2e7800aa75ca0c3 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
import sqlite3
app = Flask(__name__)
def send_query(sql):
connector = sqlite3.connect('novels.db')
cursor = connector.cursor()
cursor.execute(sql)
get_query = cursor.fetchall()
cursor.close()
connector.close()
return get_query
def ge... | 25.677632 | 93 | 0.620036 |
d62f644ba751de28ef2de9f7eb43e5c62dea90fb | 8,709 | py | Python | RecoParticleFlow/Configuration/test/RecoToDisplay_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoParticleFlow/Configuration/test/RecoToDisplay_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoParticleFlow/Configuration/test/RecoToDisplay_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
import sys
process = cms.Process("REPROD")
process.load("Configuration.StandardSequences.Reconstruction_cff")
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
#process.load("Configuration.StandardSequences.MagneticField_4T_cff")
process.load("Configuration.... | 45.359375 | 135 | 0.633483 |
8fd3c79f2d7bd0900f21481fdf9809ec4c12406a | 1,286 | py | Python | borrow/migrations/0001_initial.py | PainterPuppets/GlamorganBookStore | 86bd0c86005f66c83c3389effc8da6f65297df1e | [
"Apache-2.0"
] | null | null | null | borrow/migrations/0001_initial.py | PainterPuppets/GlamorganBookStore | 86bd0c86005f66c83c3389effc8da6f65297df1e | [
"Apache-2.0"
] | null | null | null | borrow/migrations/0001_initial.py | PainterPuppets/GlamorganBookStore | 86bd0c86005f66c83c3389effc8da6f65297df1e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2019-03-31 11:55
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | 40.1875 | 251 | 0.642302 |
42684c95e6828171b888a975c9b7dd02b491f0e3 | 1,060 | py | Python | cipher_eat2153/cipher_eat2153.py | QMSS-G5072-2020/cipher_tran_elliott | 946d7bee354c80e7108dd33820b438f967fd1c03 | [
"MIT"
] | null | null | null | cipher_eat2153/cipher_eat2153.py | QMSS-G5072-2020/cipher_tran_elliott | 946d7bee354c80e7108dd33820b438f967fd1c03 | [
"MIT"
] | null | null | null | cipher_eat2153/cipher_eat2153.py | QMSS-G5072-2020/cipher_tran_elliott | 946d7bee354c80e7108dd33820b438f967fd1c03 | [
"MIT"
] | null | null | null | def cipher(text, shift, encrypt=True):
"""
Each letter is replaced by a letter some fixed number of positions down the alphabet.
Parameters
---
text: string value that you wish to encrypt or decrypt
shift: integer value of how many number positions down the alphabet you would like to shift the ... | 31.176471 | 106 | 0.639623 |
41cce896167c8a6957a29519d43a92fd6938124d | 2,028 | py | Python | examples/sslstrip.py | e7appew/pkg-mitmproxy | f427c573805d2af57111142757eff5661a0bb9cf | [
"MIT"
] | null | null | null | examples/sslstrip.py | e7appew/pkg-mitmproxy | f427c573805d2af57111142757eff5661a0bb9cf | [
"MIT"
] | null | null | null | examples/sslstrip.py | e7appew/pkg-mitmproxy | f427c573805d2af57111142757eff5661a0bb9cf | [
"MIT"
] | null | null | null | import re
from six.moves import urllib
# set of SSL/TLS capable hosts
secure_hosts = set()
def request(flow):
flow.request.headers.pop('If-Modified-Since', None)
flow.request.headers.pop('Cache-Control', None)
# do not force https redirection
flow.request.headers.pop('Upgrade-Insecure-Requests', Non... | 41.387755 | 130 | 0.693787 |
c25cb4ece50c00ea7c8de24f0e3384907ea846ef | 4,287 | py | Python | addGameIDsToOdds.py | jbhunter804/NBANeural | 108b30d133398a87db7130bec34f7cccff6ad7a9 | [
"MIT"
] | null | null | null | addGameIDsToOdds.py | jbhunter804/NBANeural | 108b30d133398a87db7130bec34f7cccff6ad7a9 | [
"MIT"
] | null | null | null | addGameIDsToOdds.py | jbhunter804/NBANeural | 108b30d133398a87db7130bec34f7cccff6ad7a9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import py_ball
from nba_api.stats.endpoints import teamgamelog
import csv
import time
import socket
import requests
from datetime import datetime, timedelta, date
from lxml.html import fromstring
from torrequest import TorRequest
import urllib.request
import random
import requests
import numpy as np
... | 49.848837 | 973 | 0.718451 |
3f7bc07e3fdb75bc5e922f5eba9b5922a42095fd | 6,742 | py | Python | aiida_quantumespresso/workflows/ph/base.py | rikigigi/aiida-quantumespresso | 2ca8be36d5692d1000ca92f0419bdb044bebcb35 | [
"MIT"
] | null | null | null | aiida_quantumespresso/workflows/ph/base.py | rikigigi/aiida-quantumespresso | 2ca8be36d5692d1000ca92f0419bdb044bebcb35 | [
"MIT"
] | null | null | null | aiida_quantumespresso/workflows/ph/base.py | rikigigi/aiida-quantumespresso | 2ca8be36d5692d1000ca92f0419bdb044bebcb35 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Workchain to run a Quantum ESPRESSO ph.x calculation with automated error handling and restarts."""
from aiida import orm
from aiida.common import AttributeDict
from aiida.engine import while_, BaseRestartWorkChain, process_handler, ProcessHandlerReport
from aiida.plugins import CalculationFa... | 48.157143 | 120 | 0.700831 |
19dce04ffd054fe94c2a33c389190ae9887c576c | 12,295 | py | Python | reconcile/terraform_resources.py | sugarraysam/qontract-reconcile | a7a8e9ac2e4521d81a21b228547e52a49e071c15 | [
"Apache-2.0"
] | null | null | null | reconcile/terraform_resources.py | sugarraysam/qontract-reconcile | a7a8e9ac2e4521d81a21b228547e52a49e071c15 | [
"Apache-2.0"
] | null | null | null | reconcile/terraform_resources.py | sugarraysam/qontract-reconcile | a7a8e9ac2e4521d81a21b228547e52a49e071c15 | [
"Apache-2.0"
] | null | null | null | import logging
import shutil
import sys
from textwrap import indent
from sretoolbox.utils import threaded
import reconcile.openshift_base as ob
from reconcile import queries
from reconcile.utils import gql
from reconcile.aws_iam_keys import run as disable_keys
from reconcile.utils.semver_helper import make_semver
f... | 23.110902 | 79 | 0.65002 |
62e14cb92789cf06cc5ba3ecea4e962cb98e82c7 | 178 | py | Python | sorting/quickSort.py | grehujt/learningAlgorithms | ca9215c546664fa1c609f2d4d517c60306df389f | [
"MIT"
] | null | null | null | sorting/quickSort.py | grehujt/learningAlgorithms | ca9215c546664fa1c609f2d4d517c60306df389f | [
"MIT"
] | null | null | null | sorting/quickSort.py | grehujt/learningAlgorithms | ca9215c546664fa1c609f2d4d517c60306df389f | [
"MIT"
] | null | null | null | def quick_sort(arr):
if len(arr) < 2: return arr
p, seq = arr[0], arr[1:]
return quick_sort([x for x in seq if x <= p]) + [p] + quick_sort([x for x in seq if x > p])
| 35.6 | 95 | 0.567416 |
7ae55fda1a7c25aef4fdda8002b30384d4961c09 | 603 | py | Python | tests/test_config.py | 0xAurelius/playgrounds | 510bea031df6079e060b1bf3ba7399d45d00e050 | [
"MIT"
] | null | null | null | tests/test_config.py | 0xAurelius/playgrounds | 510bea031df6079e060b1bf3ba7399d45d00e050 | [
"MIT"
] | 4 | 2021-11-17T20:18:55.000Z | 2022-01-12T18:06:58.000Z | tests/test_config.py | 0xAurelius/playgrounds | 510bea031df6079e060b1bf3ba7399d45d00e050 | [
"MIT"
] | null | null | null | import os
from unittest import mock
from ..utils import load_config
@mock.patch.dict(os.environ, {'PLAYGROUNDS_CONFIG': 'klima.yaml'})
def test_klima_config():
config = load_config()
assert type(config) == dict
assert config['protocol'] == 'Klima'
assert config['token'] == 'KLIMA'
load_config.... | 20.793103 | 68 | 0.679934 |
48f351933764eaa4bf59e4e5c0935908873f8c9e | 3,356 | py | Python | face_recongnition.py | polarfreeze/train_model | 64a44e0e56aa799cde2bcd1d782360f31307b517 | [
"Apache-2.0"
] | null | null | null | face_recongnition.py | polarfreeze/train_model | 64a44e0e56aa799cde2bcd1d782360f31307b517 | [
"Apache-2.0"
] | null | null | null | face_recongnition.py | polarfreeze/train_model | 64a44e0e56aa799cde2bcd1d782360f31307b517 | [
"Apache-2.0"
] | null | null | null | import face_recognition
"""
截取出图片中的人脸,并单独保存到路径
"""
import glob
import cv2
from PIL import Image
import os
import pickle
import gc
import numpy as np
import tensorflow as tf
class preprocess(object):
def __init__(self,scale_size=139):
self.img_cant = [] # 记录没有检测出人脸的图片名称,便于后续处理
... | 34.244898 | 112 | 0.575685 |
0ff5a6f747c5306e6dc2261a7f7bda537ef97e30 | 1,023 | py | Python | p2p/lib/python2.7/site-packages/celery/loaders/__init__.py | sivaprakashniet/push_pull | 757be6fcdfdc8e73eeea5cb41a733d1916c7ae20 | [
"BSD-3-Clause"
] | null | null | null | p2p/lib/python2.7/site-packages/celery/loaders/__init__.py | sivaprakashniet/push_pull | 757be6fcdfdc8e73eeea5cb41a733d1916c7ae20 | [
"BSD-3-Clause"
] | 1 | 2018-07-21T03:07:22.000Z | 2018-07-23T03:40:35.000Z | p2p/lib/python2.7/site-packages/celery/loaders/__init__.py | sivaprakashniet/push_pull | 757be6fcdfdc8e73eeea5cb41a733d1916c7ae20 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
celery.loaders
~~~~~~~~~~~~~~
Loaders define how configuration is read, what happens
when workers start, when tasks are executed and so on.
"""
from __future__ import absolute_import
from celery._state import current_app
from celery.utils import deprecated
from celery.util... | 26.921053 | 70 | 0.694037 |
07065b0fa49d37ec0ae565126ca3f4a48d450e7e | 8,419 | py | Python | src/loss.py | rsumnerz/Yolo-pytorch | a513a9d2f92b41030b1b18f7eb9ab5eb9f12834c | [
"MIT"
] | 8 | 2018-08-26T15:09:19.000Z | 2020-10-22T12:36:05.000Z | src/loss.py | rsumnerz/Yolo-pytorch | a513a9d2f92b41030b1b18f7eb9ab5eb9f12834c | [
"MIT"
] | null | null | null | src/loss.py | rsumnerz/Yolo-pytorch | a513a9d2f92b41030b1b18f7eb9ab5eb9f12834c | [
"MIT"
] | 4 | 2019-01-24T11:08:22.000Z | 2019-05-03T15:13:01.000Z | import math
import torch
import torch.nn as nn
class YoloLoss(nn.modules.loss._Loss):
def __init__(self, num_classes, anchors, reduction=32, coord_scale=1.0, noobject_scale=1.0,
object_scale=5.0, class_scale=1.0, thresh=0.6):
super(YoloLoss, self).__init__()
self.num_classes = nu... | 48.385057 | 122 | 0.527854 |
e7c3d3149565f68abc9c14f4413931fbb13d06b2 | 1,314 | py | Python | app/core/tests/test_admin.py | bollend/recipe-app-api | 8e6ebe9781a4c919ba554dbd659bbbcc4987181b | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | bollend/recipe-app-api | 8e6ebe9781a4c919ba554dbd659bbbcc4987181b | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | bollend/recipe-app-api | 8e6ebe9781a4c919ba554dbd659bbbcc4987181b | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='elon@musk.com',
... | 31.285714 | 68 | 0.638508 |
31f7022df616937adfd379f84a40e44e0b5a2be2 | 319 | py | Python | awsscripter/cli/security/security.py | xformation/awsscripter | 0e549c64a216a16e7aedb9ed10aae26274fdb0d7 | [
"Apache-2.0"
] | null | null | null | awsscripter/cli/security/security.py | xformation/awsscripter | 0e549c64a216a16e7aedb9ed10aae26274fdb0d7 | [
"Apache-2.0"
] | null | null | null | awsscripter/cli/security/security.py | xformation/awsscripter | 0e549c64a216a16e7aedb9ed10aae26274fdb0d7 | [
"Apache-2.0"
] | 1 | 2018-11-10T04:36:29.000Z | 2018-11-10T04:36:29.000Z | import click
from awsscripter.cli.security.tcp import security_tcp
from awsscripter.cli.security.udp import security_udp
@click.group(name="security")
def security_group():
"""
packet security check
:return:
"""
pass
security_group.add_command(security_tcp)
security_group.add_command(security_udp) | 24.538462 | 53 | 0.774295 |
fecfb9bedd8476300651dd1b596e35efdd3e96b0 | 493 | py | Python | pandapower/shortcircuit/idx_brch.py | bergkvist/pandapower | 450bbd99888e7e5913905b20b848ee1cfa669ee8 | [
"BSD-3-Clause"
] | 1 | 2020-04-09T08:03:48.000Z | 2020-04-09T08:03:48.000Z | pandapower/shortcircuit/idx_brch.py | bergkvist/pandapower | 450bbd99888e7e5913905b20b848ee1cfa669ee8 | [
"BSD-3-Clause"
] | 1 | 2020-10-20T19:23:18.000Z | 2020-10-24T19:45:47.000Z | pandapower/shortcircuit/idx_brch.py | gdgarcia/pandapower | 630e3278ca012535f78282ae73f1b86f3fe932fc | [
"BSD-3-Clause"
] | 1 | 2020-11-03T01:40:38.000Z | 2020-11-03T01:40:38.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2020 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
from pandapower.pypower.idx_brch import branch_cols as start
IKSS_F = start + 0
IKSS_T = start + 1
ITH_F = start + 2
I... | 23.47619 | 95 | 0.636917 |
3b08544dd37c64e9e6e4e3a223a7f340a166223a | 2,401 | py | Python | client/src/p2pchat/p2p_connection.py | eelkefierstra/p2p-kademlia-chat | ea3c35bed6824dfd8c242c14a17d348d5f3e24b6 | [
"MIT"
] | null | null | null | client/src/p2pchat/p2p_connection.py | eelkefierstra/p2p-kademlia-chat | ea3c35bed6824dfd8c242c14a17d348d5f3e24b6 | [
"MIT"
] | null | null | null | client/src/p2pchat/p2p_connection.py | eelkefierstra/p2p-kademlia-chat | ea3c35bed6824dfd8c242c14a17d348d5f3e24b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
The p2p connection frontend
"""
import os
import json
import hashlib
import logging
from kademlia.network import Server
from twisted.internet import asyncioreactor
import asyncio
from twisted.internet.defer import Deferred
from asyncio.tasks import ensure_future
# asyncioreactor.install(eve... | 28.247059 | 93 | 0.636818 |
a94fc7d7faa4684e4b5bd460599b5af92abf3f9b | 3,073 | py | Python | grortir/test/model/optimizers/test_optimizer.py | wojtekPi/grortir | 0ef8b495527a4f3861e5df5db756d0ee3ed4aa6f | [
"MIT"
] | null | null | null | grortir/test/model/optimizers/test_optimizer.py | wojtekPi/grortir | 0ef8b495527a4f3861e5df5db756d0ee3ed4aa6f | [
"MIT"
] | null | null | null | grortir/test/model/optimizers/test_optimizer.py | wojtekPi/grortir | 0ef8b495527a4f3861e5df5db756d0ee3ed4aa6f | [
"MIT"
] | null | null | null | """Module for testing optimizer."""
from unittest import TestCase
from unittest.mock import patch, Mock, sentinel
from grortir.main.model.core.abstract_process import AbstractProcess
from grortir.main.model.core.abstract_stage import AbstractStage
from grortir.main.model.core.optimization_status import OptimizationSt... | 42.680556 | 74 | 0.720469 |
5617c26149b6d9e644f9e2160d5b0ea4bb9ad701 | 5,963 | py | Python | NLP/common.py | archanl/thetweetrises | b9ac7b9e9df9c4c36da0812a893b1b793f08c48c | [
"MIT"
] | 1 | 2019-03-02T20:14:07.000Z | 2019-03-02T20:14:07.000Z | NLP/common.py | archanl/thetweetrises | b9ac7b9e9df9c4c36da0812a893b1b793f08c48c | [
"MIT"
] | null | null | null | NLP/common.py | archanl/thetweetrises | b9ac7b9e9df9c4c36da0812a893b1b793f08c48c | [
"MIT"
] | null | null | null | import heapq
import math
import numpy as np
from sklearn import linear_model
import re
import sys
from definitions import *
class tweetclass:
def __init__(self, word):
self.term = word
self.positive = 0
self.negative = 0
def get_words(tweet, stop_words):
''' Parses all of the words from a tweet '''
# This wo... | 24.539095 | 105 | 0.676002 |
7d2678ac71299e5ecfc2a27684914590fac45f6e | 85,036 | py | Python | tests/api/test_account.py | jduan/saleor | a03a8d0a19eaeb3df6f60c21f3194b7d802c75cb | [
"CC-BY-4.0"
] | null | null | null | tests/api/test_account.py | jduan/saleor | a03a8d0a19eaeb3df6f60c21f3194b7d802c75cb | [
"CC-BY-4.0"
] | null | null | null | tests/api/test_account.py | jduan/saleor | a03a8d0a19eaeb3df6f60c21f3194b7d802c75cb | [
"CC-BY-4.0"
] | null | null | null | import json
import re
import uuid
from unittest.mock import ANY, MagicMock, Mock, patch
import graphene
import pytest
from django.contrib.auth import get_user_model
from django.contrib.auth.tokens import default_token_generator
from django.core.exceptions import ValidationError
from django.core.files import File
from ... | 31.658972 | 88 | 0.651348 |
258145614ce4653f234721e2be3c83329b96117e | 1,627 | py | Python | src/main/python/encrypt/encrypt_handler.py | photowey/pytest-in-action | e3ce03920cd51b418022cac5aca2b187494054a6 | [
"Apache-2.0"
] | null | null | null | src/main/python/encrypt/encrypt_handler.py | photowey/pytest-in-action | e3ce03920cd51b418022cac5aca2b187494054a6 | [
"Apache-2.0"
] | null | null | null | src/main/python/encrypt/encrypt_handler.py | photowey/pytest-in-action | e3ce03920cd51b418022cac5aca2b187494054a6 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# ---------------------------------------------
# @file encrypt_handler.py
# @description encrypt_handler
# @author WcJun
# @date 2021/07/22
# ---------------------------------------------
import os
import jpype
class EncryptHandler:
instnace = None
def __init__(self):
glob... | 31.901961 | 350 | 0.666257 |
b4c36aba5d9463a9fa8b5adec25edace0c259adf | 4,488 | py | Python | tests/test_CandidateServer.py | adsharma/raft | 49c7bfd472af4c97cc69d7e7e4ffc26808ed88db | [
"MIT"
] | 4 | 2021-01-20T20:29:19.000Z | 2021-09-21T18:20:08.000Z | tests/test_CandidateServer.py | adsharma/raft | 49c7bfd472af4c97cc69d7e7e4ffc26808ed88db | [
"MIT"
] | 11 | 2021-01-07T19:06:42.000Z | 2021-08-22T17:57:27.000Z | tests/test_CandidateServer.py | adsharma/raft | 49c7bfd472af4c97cc69d7e7e4ffc26808ed88db | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import unittest
from raft.servers.server import ZeroMQServer as Server
from raft.states.candidate import Candidate
from raft.states.follower import Follower
from raft.states.leader import Leader
class TestCandidateServer(unittest.IsolatedAsyncioTestCase):
async def asyncSetUp(self):
... | 32.28777 | 88 | 0.657977 |
71b2dae1c1688fb18a376825332b39b27ab94af5 | 987 | py | Python | horizon/horizon/dashboards/syspanel/flavors/panel.py | ttrifonov/horizon | 293c2ee9f76231e12142a733f6f916c533648f8f | [
"Apache-2.0"
] | 1 | 2016-10-11T10:21:14.000Z | 2016-10-11T10:21:14.000Z | horizon/horizon/dashboards/syspanel/flavors/panel.py | ttrifonov/horizon | 293c2ee9f76231e12142a733f6f916c533648f8f | [
"Apache-2.0"
] | null | null | null | horizon/horizon/dashboards/syspanel/flavors/panel.py | ttrifonov/horizon | 293c2ee9f76231e12142a733f6f916c533648f8f | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | 31.83871 | 78 | 0.745694 |
e382ee5823f5f79a51ff4841b22780e7693dd446 | 2,745 | py | Python | recipes/cereal/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 562 | 2019-09-04T12:23:43.000Z | 2022-03-29T16:41:43.000Z | recipes/cereal/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 9,799 | 2019-09-04T12:02:11.000Z | 2022-03-31T23:55:45.000Z | recipes/cereal/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 1,126 | 2019-09-04T11:57:46.000Z | 2022-03-31T16:43:38.000Z | from conans import ConanFile, CMake, tools
import os
import textwrap
required_conan_version = ">=1.33.0"
class CerealConan(ConanFile):
name = "cereal"
description = "Serialization header-only library for C++11."
license = "BSD-3-Clause"
topics = ("conan", "cereal", "header-only", "serialization", "cp... | 37.094595 | 92 | 0.649545 |
e4f7a02710408dfa03a97be63700c2d28e69042d | 3,798 | py | Python | ptafrecon.py | supereldar/ptafrecon | bb08702f8df4e6dade5e02634770d40070e5aaf9 | [
"MIT"
] | null | null | null | ptafrecon.py | supereldar/ptafrecon | bb08702f8df4e6dade5e02634770d40070e5aaf9 | [
"MIT"
] | null | null | null | ptafrecon.py | supereldar/ptafrecon | bb08702f8df4e6dade5e02634770d40070e5aaf9 | [
"MIT"
] | null | null | null | import requests, sys
import re
from bs4 import BeautifulSoup
import xml.etree.ElementTree as ET
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
attack = 0
wafjs = 0
token = 0
header = 0
s... | 24.662338 | 134 | 0.637967 |
71cb163a7d91d07d876405f1e5ca6f01ddb20ee2 | 25,475 | py | Python | tensorflow/python/feature_column/dense_features_v2_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 57 | 2017-09-03T07:08:31.000Z | 2022-02-28T04:33:42.000Z | tensorflow/python/feature_column/dense_features_v2_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 8 | 2019-03-13T23:13:47.000Z | 2020-01-31T21:08:21.000Z | tensorflow/python/feature_column/dense_features_v2_test.py | joshz123/tensorflow | 7841ca029060ab78e221e757d4b1ee6e3e0ffaa4 | [
"Apache-2.0"
] | 28 | 2017-03-25T13:48:09.000Z | 2021-10-14T00:10:50.000Z | # 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... | 38.308271 | 124 | 0.626575 |
b2523d9105bab7d05d5bdc17d6674b66e9508dca | 1,201 | py | Python | app.py | joshy/torch-ask | e86b2701054c1b574f96f1788ae588150e9765da | [
"Apache-2.0"
] | null | null | null | app.py | joshy/torch-ask | e86b2701054c1b574f96f1788ae588150e9765da | [
"Apache-2.0"
] | null | null | null | app.py | joshy/torch-ask | e86b2701054c1b574f96f1788ae588150e9765da | [
"Apache-2.0"
] | null | null | null | import io
import os
from pathlib import Path
import numpy as np
from fastapi import FastAPI, File, UploadFile
from loguru import logger
from skimage.util import img_as_ubyte
from model import load_predictor
app = FastAPI()
version = "0.0.1"
model = None
MODEL_STORE = "model_store"
@app.on_event("startup")
async d... | 24.510204 | 103 | 0.70025 |
61f7c70baa91396bed71ecdb64a7695d3e74f11f | 5,301 | py | Python | build/android/pylib/utils/timeout_retry.py | Letty-Liang/buildroot | 7706416a29d94274e566605c1fd239013bb1e8e6 | [
"BSD-3-Clause"
] | 20 | 2015-08-26T06:46:00.000Z | 2019-02-27T09:05:58.000Z | build/android/pylib/utils/timeout_retry.py | Letty-Liang/buildroot | 7706416a29d94274e566605c1fd239013bb1e8e6 | [
"BSD-3-Clause"
] | 3 | 2019-01-02T17:06:03.000Z | 2019-01-16T23:55:04.000Z | build/android/pylib/utils/timeout_retry.py | Letty-Liang/buildroot | 7706416a29d94274e566605c1fd239013bb1e8e6 | [
"BSD-3-Clause"
] | 5 | 2016-12-23T04:21:10.000Z | 2020-06-18T13:52:33.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A utility to run functions with timeouts and retries."""
# pylint: disable=W0702
import logging
import threading
import time
import traceback
from pylib... | 31.553571 | 79 | 0.695529 |
4c2578b6abf249466a97b58d635cf8f31f6e18a4 | 2,507 | py | Python | var/spack/repos/builtin/packages/py-pytorch-lightning/package.py | lcnzg/spack | 5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-11-16T02:42:57.000Z | 2019-06-06T19:18:50.000Z | var/spack/repos/builtin/packages/py-pytorch-lightning/package.py | lcnzg/spack | 5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 18 | 2021-03-12T16:22:58.000Z | 2022-03-02T17:07:08.000Z | var/spack/repos/builtin/packages/py-pytorch-lightning/package.py | lcnzg/spack | 5b9f60f9bb159113bfd8a0c8f3f4a8a0c2f55d7e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-06-28T04:48:37.000Z | 2021-06-28T04:48:37.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPytorchLightning(PythonPackage):
"""PyTorch Lightning is the lightweight PyTorch wrapper... | 58.302326 | 102 | 0.646988 |
0ec71f4e08870fbb232420d25c0629eb3e576158 | 1,869 | py | Python | tests/test_helpers.py | labd/spaken | 4d3e7d04e50bccbabf27497e2c757f3447288a6a | [
"MIT"
] | 1 | 2018-05-16T19:45:09.000Z | 2018-05-16T19:45:09.000Z | tests/test_helpers.py | labd/spaken | 4d3e7d04e50bccbabf27497e2c757f3447288a6a | [
"MIT"
] | null | null | null | tests/test_helpers.py | labd/spaken | 4d3e7d04e50bccbabf27497e2c757f3447288a6a | [
"MIT"
] | 1 | 2018-12-10T12:47:46.000Z | 2018-12-10T12:47:46.000Z | import textwrap
import boto3
import click
import pytest
from moto import mock_s3
from packaging.requirements import Requirement
from spaken import helpers
from spaken.exceptions import StorageException
@pytest.fixture
def requirements_file(tmpdir):
path = tmpdir.join("requirements.txt")
path.write(
... | 27.485294 | 79 | 0.701445 |
40cb47fd7bc84ca326f5fa6891238a71b84f333a | 5,795 | py | Python | contrib/seeds/makeseeds.py | minblock/Blackcoin | 40cbf6c00d79b2d2d50b0645baa332fc8adc4ba3 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | minblock/Blackcoin | 40cbf6c00d79b2d2d50b0645baa332fc8adc4ba3 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | minblock/Blackcoin | 40cbf6c00d79b2d2d50b0645baa332fc8adc4ba3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
import re
import sys
import dns.resolver
import collect... | 33.49711 | 186 | 0.571182 |
c8472473b1fcd403f76ef01629172880b67c5649 | 6,233 | py | Python | meshing/helpers/build_graph_impl.py | fnrizzi/ElasticShearWaves | b09cde0711562412c6bc24de0d18ad3a972b7289 | [
"BSD-3-Clause"
] | 8 | 2021-12-06T16:17:17.000Z | 2022-03-05T09:23:45.000Z | meshing/helpers/build_graph_impl.py | fnrizzi/ElasticShearWaves | b09cde0711562412c6bc24de0d18ad3a972b7289 | [
"BSD-3-Clause"
] | 6 | 2021-12-01T14:40:38.000Z | 2022-01-13T07:44:41.000Z | meshing/helpers/build_graph_impl.py | fnrizzi/ElasticShearWaves | b09cde0711562412c6bc24de0d18ad3a972b7289 | [
"BSD-3-Clause"
] | 1 | 2021-11-02T02:06:41.000Z | 2021-11-02T02:06:41.000Z | #!/usr/bin/env python
import sys, os, time
import numpy as np
import collections
def buildGraphImpl(fullMeshCells, nth, nr, targetListOfCells, varGroups):
# the total number of cells we have
numCells = len(fullMeshCells)
# graph is an adjecency list (here we use a dictionary) for each dof:
# - key = the gl... | 36.028902 | 100 | 0.58463 |
76f8487d2886a39f385fa3b2746fde62cd759123 | 4,542 | py | Python | papermerge/core/views/access.py | DEMON1A/papermerge-core | 80a8797e2796781cbf67ac80bef135419965641a | [
"Apache-2.0"
] | null | null | null | papermerge/core/views/access.py | DEMON1A/papermerge-core | 80a8797e2796781cbf67ac80bef135419965641a | [
"Apache-2.0"
] | 1 | 2021-02-12T02:28:00.000Z | 2021-02-24T04:08:34.000Z | papermerge/core/views/access.py | DEMON1A/papermerge-core | 80a8797e2796781cbf67ac80bef135419965641a | [
"Apache-2.0"
] | 2 | 2021-02-11T23:10:29.000Z | 2021-02-13T09:06:49.000Z | import json
import logging
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import Group
from django.http import (Http404, HttpResponse, HttpResponseBadRequest,
HttpResponseForbidden)
from django.utils.translation import gettext as _
from papermerge.cor... | 31.541667 | 77 | 0.483487 |
5471c2fb9bcaf084d221ea30c73362ed0ec94385 | 83 | py | Python | segnet/__init__.py | Abdiel-EMT/segnet | 474a68079000a85d1e62ad9723d316074bb1eb8d | [
"MIT"
] | null | null | null | segnet/__init__.py | Abdiel-EMT/segnet | 474a68079000a85d1e62ad9723d316074bb1eb8d | [
"MIT"
] | null | null | null | segnet/__init__.py | Abdiel-EMT/segnet | 474a68079000a85d1e62ad9723d316074bb1eb8d | [
"MIT"
] | null | null | null | name = "segnet"
from .metrics import *
from .models import *
from .utils import *
| 13.833333 | 22 | 0.698795 |
25c31c8868a04954dcc3378dbdd53e7a9acfed06 | 11,420 | py | Python | ALAMO_vector.py | shaunwbell/ArcticHeatExperiment | bd1e1333c8ae02c9a59c402a5ad3c07d1485e1e6 | [
"MIT"
] | 1 | 2017-03-08T15:42:07.000Z | 2017-03-08T15:42:07.000Z | ALAMO_vector.py | shaunwbell/ArcticHeatExperiment | bd1e1333c8ae02c9a59c402a5ad3c07d1485e1e6 | [
"MIT"
] | null | null | null | ALAMO_vector.py | shaunwbell/ArcticHeatExperiment | bd1e1333c8ae02c9a59c402a5ad3c07d1485e1e6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 22 08:11:58 2018
@author: bell
"""
from scipy.io import loadmat
import pandas as pd
import numpy as np
from netCDF4 import Dataset
from geopy.distance import great_circle
from geographiclib.geodesic import Geodesic
"""--------------------------... | 43.09434 | 190 | 0.64028 |
3f3c2cc6289e0536c62c38a13c923365e2a665c4 | 7,740 | py | Python | analysis/classification.py | maxwellyin/arxiv-public-datasets | 18669e14824793bcefa57e9bbfd4de38b5824cdc | [
"MIT"
] | 217 | 2019-02-01T00:03:26.000Z | 2022-03-30T21:40:16.000Z | analysis/classification.py | maxwellyin/arxiv-public-datasets | 18669e14824793bcefa57e9bbfd4de38b5824cdc | [
"MIT"
] | 14 | 2019-05-03T09:44:24.000Z | 2022-02-16T01:54:31.000Z | analysis/classification.py | maxwellyin/arxiv-public-datasets | 18669e14824793bcefa57e9bbfd4de38b5824cdc | [
"MIT"
] | 44 | 2019-03-17T01:38:31.000Z | 2022-03-20T11:20:43.000Z | """
Classification.py
"""
import os
import json
import gzip
import json
import numpy as np
from datetime import datetime
from sklearn.linear_model import LogisticRegression, SGDClassifier
from arxiv_public_data.embeddings.util import load_embeddings, fill_zeros
import arxiv_public_data.tests.cocitation_category_feat... | 31.983471 | 78 | 0.633721 |
fe79247075e4f4f879086022e44e514135adf584 | 419 | py | Python | tests/unit/li_wand_2016/conftest.py | pystiche/papers | 0d8179dc51f6eda0b27fa525dc0b86b866bc88e1 | [
"BSD-3-Clause"
] | 1 | 2021-09-30T09:30:07.000Z | 2021-09-30T09:30:07.000Z | tests/unit/li_wand_2016/conftest.py | pystiche/papers | 0d8179dc51f6eda0b27fa525dc0b86b866bc88e1 | [
"BSD-3-Clause"
] | 20 | 2021-10-10T13:37:25.000Z | 2022-03-31T07:31:45.000Z | tests/unit/li_wand_2016/conftest.py | pystiche/papers | 0d8179dc51f6eda0b27fa525dc0b86b866bc88e1 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from tests import mocks
import pystiche_papers.li_wand_2016 as paper
@pytest.fixture(scope="package", autouse=True)
def multi_layer_encoder(package_mocker):
return mocks.patch_multi_layer_encoder_loader(
targets=mocks.make_mock_target("li_wand_2016", "_loss", "_multi_layer_encoder"),
... | 26.1875 | 88 | 0.735084 |
42b5c89fed9ecdf52b2192fadb38e79e107fd8a9 | 2,863 | py | Python | TrainingInterfaces/TrainingPipelines/FastSpeech2_LowRes.py | Flux9665/IMS-Toucan | dca76d37c5ea35bcdb35f979efd533fec75ed855 | [
"Apache-2.0"
] | null | null | null | TrainingInterfaces/TrainingPipelines/FastSpeech2_LowRes.py | Flux9665/IMS-Toucan | dca76d37c5ea35bcdb35f979efd533fec75ed855 | [
"Apache-2.0"
] | null | null | null | TrainingInterfaces/TrainingPipelines/FastSpeech2_LowRes.py | Flux9665/IMS-Toucan | dca76d37c5ea35bcdb35f979efd533fec75ed855 | [
"Apache-2.0"
] | null | null | null | import os
import random
import soundfile
import torch
from TrainingInterfaces.Text_to_Spectrogram.FastSpeech2.FastSpeech2 import FastSpeech2
from TrainingInterfaces.Text_to_Spectrogram.FastSpeech2.FastSpeechDataset import FastSpeechDataset
from TrainingInterfaces.Text_to_Spectrogram.FastSpeech2.fastspeech2_train_loop... | 34.493976 | 116 | 0.650716 |
cb89c781cc89fad24d44b76baaf0f11dece345b5 | 91 | py | Python | config.py | wbokhari/mt940 | 20c54ffab9878b1665e8d5d166ff048a2d2b4511 | [
"BSD-3-Clause"
] | null | null | null | config.py | wbokhari/mt940 | 20c54ffab9878b1665e8d5d166ff048a2d2b4511 | [
"BSD-3-Clause"
] | null | null | null | config.py | wbokhari/mt940 | 20c54ffab9878b1665e8d5d166ff048a2d2b4511 | [
"BSD-3-Clause"
] | null | null | null | hostname = 'localhost'
username = 'postgres'
password = 'Bokhari***'
database = 'postgres'
| 18.2 | 23 | 0.703297 |
194dc8fa9acc156f582cd82cf2664652923d68dc | 3,031 | py | Python | test/dpt_tests/dpt_datetime_test.py | jonppe/xknx | b08a122b0f3c170d91aae6213a60c7038e451c93 | [
"MIT"
] | 1 | 2020-12-27T13:54:34.000Z | 2020-12-27T13:54:34.000Z | test/dpt_tests/dpt_datetime_test.py | jonppe/xknx | b08a122b0f3c170d91aae6213a60c7038e451c93 | [
"MIT"
] | 1 | 2019-01-06T11:40:16.000Z | 2019-01-06T11:40:16.000Z | test/dpt_tests/dpt_datetime_test.py | mielune/xknx | 57c248c386f2ae150d983f72a5a8da684097265d | [
"MIT"
] | null | null | null | """Unit test for KNX datetime objects."""
import time
import unittest
from xknx.dpt import DPTDateTime
from xknx.exceptions import ConversionError
class TestDPTDateTime(unittest.TestCase):
"""Test class for KNX datetime objects."""
#
# TEST CURRENT DATE
#
def test_from_knx(self):
"""Test... | 36.083333 | 87 | 0.606401 |
da73b09df4e303fe22bede635f939e34eeb157cf | 17,910 | py | Python | wbb/modules/anime_picks.py | mysaraswati/NezukoBot | 9d297a8f9acedc208aaa3d5a97055c6768cdc73e | [
"MIT"
] | null | null | null | wbb/modules/anime_picks.py | mysaraswati/NezukoBot | 9d297a8f9acedc208aaa3d5a97055c6768cdc73e | [
"MIT"
] | null | null | null | wbb/modules/anime_picks.py | mysaraswati/NezukoBot | 9d297a8f9acedc208aaa3d5a97055c6768cdc73e | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2021 rozari0
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distr... | 33.665414 | 92 | 0.677108 |
ef1ac749b836ee8d605857dfcb63f07874e2f99a | 23,204 | py | Python | fedot/core/pipelines/pipeline.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 358 | 2020-06-11T09:34:53.000Z | 2022-03-31T12:56:22.000Z | fedot/core/pipelines/pipeline.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 467 | 2020-06-11T13:49:45.000Z | 2022-03-31T14:19:48.000Z | fedot/core/pipelines/pipeline.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 48 | 2020-07-13T14:50:45.000Z | 2022-03-26T09:37:13.000Z | from copy import copy
from datetime import timedelta
from multiprocessing import Manager, Process
from typing import Callable, List, Optional, Tuple, Union
import pandas as pd
import numpy as np
from fedot.core.composer.cache import OperationsCache
from fedot.core.dag.graph import Graph
from fedot.core.data.data impor... | 41.884477 | 118 | 0.661912 |
424fbd64cbff52d0fce2c09f92dc0064756fca82 | 6,456 | py | Python | src/panoptes/utils/images/plot.py | sarumanplaysguitar/panoptes-utils | d5ac4d716fd1acd4771c0de08b7e2784a8319092 | [
"MIT"
] | null | null | null | src/panoptes/utils/images/plot.py | sarumanplaysguitar/panoptes-utils | d5ac4d716fd1acd4771c0de08b7e2784a8319092 | [
"MIT"
] | null | null | null | src/panoptes/utils/images/plot.py | sarumanplaysguitar/panoptes-utils | d5ac4d716fd1acd4771c0de08b7e2784a8319092 | [
"MIT"
] | null | null | null | from copy import copy
from warnings import warn
from matplotlib import rc
from matplotlib import animation
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
from matplotlib import cm
from mpl_toolkits.axes_grid1 import make_axes_locatable
import numpy as... | 28.069565 | 94 | 0.620508 |
6fab999435b51c67eb139fd5d443900e79397d17 | 201 | py | Python | lib/python/treadmill_vagrant/bootstrap/__init__.py | vrautela/treadmill-vagrant | efdd50e28d6118adfc9bbfb1a243f0eb39c47eb8 | [
"Apache-2.0"
] | null | null | null | lib/python/treadmill_vagrant/bootstrap/__init__.py | vrautela/treadmill-vagrant | efdd50e28d6118adfc9bbfb1a243f0eb39c47eb8 | [
"Apache-2.0"
] | null | null | null | lib/python/treadmill_vagrant/bootstrap/__init__.py | vrautela/treadmill-vagrant | efdd50e28d6118adfc9bbfb1a243f0eb39c47eb8 | [
"Apache-2.0"
] | null | null | null | """Treadmill Vagrant/CentOS7 bootstrap module.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
| 25.125 | 46 | 0.850746 |
dd2cc80f0ca197353d653b2fe025040ee21bf6c9 | 1,408 | py | Python | build-scripts/gen_rt.py | aument-lang/aument | 5db67132fa1976deafbac246c6613d4ebcceb4f8 | [
"Apache-2.0"
] | 30 | 2021-03-13T08:06:32.000Z | 2022-03-21T10:09:58.000Z | build-scripts/gen_rt.py | aument-lang/aument | 5db67132fa1976deafbac246c6613d4ebcceb4f8 | [
"Apache-2.0"
] | 2 | 2021-03-28T14:40:37.000Z | 2021-04-01T08:56:31.000Z | build-scripts/gen_rt.py | chm8d/aulang | 5db67132fa1976deafbac246c6613d4ebcceb4f8 | [
"Apache-2.0"
] | null | null | null | # This source file is part of the Aument language
# Copyright (c) 2021 the aument contributors
#
# Licensed under Apache License v2.0 with Runtime Library Exception
# See LICENSE.txt for license information
import re
import sys
import subprocess
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-... | 27.607843 | 75 | 0.65696 |
fe1628fc05b416002363d949af22de9c3498bcde | 1,362 | py | Python | tests/test_lint.py | egpbos/egp_plot | 4d87fb99fd88f9dcb4c87b4dc3530e475f6b2a1d | [
"Apache-2.0"
] | null | null | null | tests/test_lint.py | egpbos/egp_plot | 4d87fb99fd88f9dcb4c87b4dc3530e475f6b2a1d | [
"Apache-2.0"
] | null | null | null | tests/test_lint.py | egpbos/egp_plot | 4d87fb99fd88f9dcb4c87b4dc3530e475f6b2a1d | [
"Apache-2.0"
] | null | null | null | """ Lint tests """
import os
import textwrap
import pycodestyle # formerly known as pep8
def test_pep8_conformance():
"""Test that we conform to PEP-8."""
check_paths = [
'egp_plot',
'tests',
]
exclude_paths = []
print("PEP8 check of directories: {}\n".format(', '.join(check_pat... | 30.954545 | 75 | 0.638032 |
15073b7742dbe2bfd0fc769e3ad3d9ef8540ef34 | 1,038 | py | Python | TestRunnables/basic_run.py | svencortel/SuperTree-research | b8f66d762546dedf36ac78c2c117363092c9e292 | [
"Apache-2.0"
] | null | null | null | TestRunnables/basic_run.py | svencortel/SuperTree-research | b8f66d762546dedf36ac78c2c117363092c9e292 | [
"Apache-2.0"
] | null | null | null | TestRunnables/basic_run.py | svencortel/SuperTree-research | b8f66d762546dedf36ac78c2c117363092c9e292 | [
"Apache-2.0"
] | null | null | null | from TreeModel.Tree import *
from sklearn.datasets import load_wine, load_iris, load_breast_cancer
from sklearn.tree import DecisionTreeClassifier, export_graphviz
from sklearn.metrics import accuracy_score
import graphviz
from TestRunnables.test_run_methods import test_run_tree
DEPTH = 3
iris = load_breast_cancer()
... | 28.833333 | 69 | 0.747592 |
035a852a7c7390168a30f9eafee06574c7d437bf | 77 | py | Python | rook.py | smabe777/chess_master | a3d67da86ec0849f4c720ea85a9b9c70049edff7 | [
"Apache-2.0"
] | null | null | null | rook.py | smabe777/chess_master | a3d67da86ec0849f4c720ea85a9b9c70049edff7 | [
"Apache-2.0"
] | null | null | null | rook.py | smabe777/chess_master | a3d67da86ec0849f4c720ea85a9b9c70049edff7 | [
"Apache-2.0"
] | null | null | null | from piece import Piece
from chess import Chess
class Rook(Piece):
pass
| 12.833333 | 23 | 0.753247 |
7ead589eb729af40e7e0de73e93cc493f9b41f6c | 8,066 | py | Python | cart/views.py | Mambodiev/ecom_website | ced03d61a99a7d657f7cb0106dbb9cf1ab15e367 | [
"MIT"
] | null | null | null | cart/views.py | Mambodiev/ecom_website | ced03d61a99a7d657f7cb0106dbb9cf1ab15e367 | [
"MIT"
] | 1 | 2022-03-30T21:19:09.000Z | 2022-03-30T21:19:09.000Z | cart/views.py | Mambodiev/ecom_website | ced03d61a99a7d657f7cb0106dbb9cf1ab15e367 | [
"MIT"
] | null | null | null |
import datetime
import json
from django.http import HttpResponse, HttpResponseRedirect
from django.conf import settings
from django.contrib import messages
from django.shortcuts import get_object_or_404, reverse, redirect
from django.http import JsonResponse
from django.views import generic
from .models import Product... | 34.323404 | 95 | 0.652368 |
42a3a5fd19282880abf74408835d2beac82f12de | 15,361 | py | Python | Integrations/PaloAltoNetworks_XDR/PaloAltoNetworks_XDR.py | vibhuabharadwaj/content | 30d639dbea0015536a3040ec18f93e50322bded0 | [
"MIT"
] | null | null | null | Integrations/PaloAltoNetworks_XDR/PaloAltoNetworks_XDR.py | vibhuabharadwaj/content | 30d639dbea0015536a3040ec18f93e50322bded0 | [
"MIT"
] | null | null | null | Integrations/PaloAltoNetworks_XDR/PaloAltoNetworks_XDR.py | vibhuabharadwaj/content | 30d639dbea0015536a3040ec18f93e50322bded0 | [
"MIT"
] | null | null | null | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
''' IMPORTS '''
import json
import requests
from datetime import datetime, timezone
import secrets
import string
import hashlib
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' GLOBALS/PARA... | 33.105603 | 130 | 0.671506 |
4e56ebfd295c04c7b14ee0a8902a1917022c06d0 | 481 | py | Python | sunpy/time/julian.py | samaloney/sunpy | 89142033a7a76bcd3b2791b779b8b43fac65a7f4 | [
"BSD-2-Clause"
] | null | null | null | sunpy/time/julian.py | samaloney/sunpy | 89142033a7a76bcd3b2791b779b8b43fac65a7f4 | [
"BSD-2-Clause"
] | null | null | null | sunpy/time/julian.py | samaloney/sunpy | 89142033a7a76bcd3b2791b779b8b43fac65a7f4 | [
"BSD-2-Clause"
] | null | null | null | from astropy.time import Time
from sunpy.time import parse_time
__all__ = ['julian_day', 'julian_centuries']
def julian_day(t='now'):
"""
Wrap a UTC -> JD conversion from astropy.
"""
return parse_time(t).jd
def julian_centuries(t='now'):
"""Returns the number of Julian centuries since J1900.0 ... | 24.05 | 88 | 0.690229 |
a5ecb7749d688c52b395d03db452fc4c27933a4c | 4,503 | py | Python | app/el/misc/utils.py | vaultah/L | 6e3eb6b0832ae6ccaea23abb0258b5abe0956901 | [
"MIT"
] | 6 | 2015-09-12T04:09:02.000Z | 2016-01-27T15:20:21.000Z | app/el/misc/utils.py | vaultah/L | 6e3eb6b0832ae6ccaea23abb0258b5abe0956901 | [
"MIT"
] | 7 | 2015-10-07T13:25:22.000Z | 2015-12-06T08:23:33.000Z | app/el/misc/utils.py | vaultah/L | 6e3eb6b0832ae6ccaea23abb0258b5abe0956901 | [
"MIT"
] | null | null | null | import os
import ssl
import time
import re
import uuid
import hashlib
import sha3 # Check if we can drop this
import random
from html import escape
from datetime import datetime
from ... import consts
from pathlib import PurePath
def image_url(**ka):
defs = {'schema': 'http',
'domain': consts.ext.MEDI... | 27.290909 | 89 | 0.556296 |
895352ff3c2cb5e76abd6f31c9fad037fd0ea75c | 40 | py | Python | tests/exceptions/valid_package/x.py | kogut/statick | 6cbe43b5ac78275a12af3ac5aa325833368d0767 | [
"CC0-1.0"
] | 54 | 2018-08-27T19:12:41.000Z | 2022-03-31T04:16:40.000Z | tests/exceptions/valid_package/x.py | gregtkogut/statick | 11a8f950d50b52903a25f4f00c7cd52a90eff56c | [
"CC0-1.0"
] | 288 | 2018-08-28T13:17:44.000Z | 2022-03-21T20:05:19.000Z | tests/exceptions/valid_package/x.py | gregtkogut/statick | 11a8f950d50b52903a25f4f00c7cd52a90eff56c | [
"CC0-1.0"
] | 12 | 2018-08-28T13:18:39.000Z | 2022-03-21T19:27:16.000Z | #!/usr/bin/env python3
x = 0 # NOLINT
| 10 | 22 | 0.6 |
7d032e67936b444bf96f7f1eab8df75e2c1b5261 | 6,934 | py | Python | pentestui/pentest_api/attacks/kerberos/modules/smbconnection.py | mustgundogdu/PentestUI | 92263ea73bd2eaa2081fb277c76aa229103a1d54 | [
"Apache-2.0"
] | 21 | 2021-07-26T05:19:45.000Z | 2022-02-01T07:35:21.000Z | pentestui/pentest_api/attacks/kerberos/modules/smbconnection.py | mustgundogdu/PentestUI | 92263ea73bd2eaa2081fb277c76aa229103a1d54 | [
"Apache-2.0"
] | null | null | null | pentestui/pentest_api/attacks/kerberos/modules/smbconnection.py | mustgundogdu/PentestUI | 92263ea73bd2eaa2081fb277c76aa229103a1d54 | [
"Apache-2.0"
] | 2 | 2021-09-21T06:52:10.000Z | 2021-09-26T07:31:27.000Z | """
SMB Protocol Authentication And Connection
- Edited by b3kc4t to using stated references on smbconnection file.
References = https://docs.microsoft.com/en-us/windows-server/storage/file-server/file-server-smb-overview#:~:text=The%20Server%20Message%20Block%20(SMB,protocol%20or%20other%20network%20protocols, https:/... | 34.497512 | 239 | 0.6833 |
11e8a4c1570ee66d7aef237a07cd3417f0bf29ee | 3,485 | py | Python | examples/vn_trader/run.py | jubal/vnpy | f50f2535ed39dd33272e0985ed40c7078e4c19f6 | [
"MIT"
] | 5 | 2020-05-19T07:32:39.000Z | 2022-03-14T09:09:48.000Z | examples/vn_trader/run.py | jubal/vnpy | f50f2535ed39dd33272e0985ed40c7078e4c19f6 | [
"MIT"
] | null | null | null | examples/vn_trader/run.py | jubal/vnpy | f50f2535ed39dd33272e0985ed40c7078e4c19f6 | [
"MIT"
] | 3 | 2020-04-02T08:30:17.000Z | 2020-05-03T12:12:05.000Z | # flake8: noqa
from vnpy.event import EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp
from vnpy_ctp import CtpGateway
# from vnpy_ctptest import CtptestGateway
# from vnpy_mini import MiniGateway
# from vnpy_femas import FemasGateway
# from vnpy_sopt import Sop... | 34.85 | 57 | 0.795983 |
971249db05522b8dd7a0172aa677d092b70a4dea | 2,799 | py | Python | p2m/losses.py | SeanLi-OI/Pixel2Mesh | d5bec9c606b3b163f4104980a67f82b48a183846 | [
"Apache-2.0"
] | 1,273 | 2018-07-29T15:45:02.000Z | 2022-03-30T15:48:35.000Z | p2m/losses.py | SeanLi-OI/Pixel2Mesh | d5bec9c606b3b163f4104980a67f82b48a183846 | [
"Apache-2.0"
] | 101 | 2018-08-24T02:30:22.000Z | 2022-03-09T06:20:54.000Z | p2m/losses.py | SeanLi-OI/Pixel2Mesh | d5bec9c606b3b163f4104980a67f82b48a183846 | [
"Apache-2.0"
] | 292 | 2018-07-29T15:45:10.000Z | 2022-03-06T00:23:37.000Z | # Copyright (C) 2019 Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, Yu-Gang Jiang, Fudan University
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may no... | 40.565217 | 111 | 0.732047 |
4b27985a2e01041e9f9ceca98c059a3b309c3ad6 | 31,947 | py | Python | DFGN/utils.py | mottled233/DFGN-pytorch | 7d9f6a75404cfa429f1e2b57ec5055df382ed0a4 | [
"MIT"
] | null | null | null | DFGN/utils.py | mottled233/DFGN-pytorch | 7d9f6a75404cfa429f1e2b57ec5055df382ed0a4 | [
"MIT"
] | null | null | null | DFGN/utils.py | mottled233/DFGN-pytorch | 7d9f6a75404cfa429f1e2b57ec5055df382ed0a4 | [
"MIT"
] | null | null | null | import pickle
import torch
import json
import collections
from pytorch_pretrained_bert.tokenization import whitespace_tokenize, BasicTokenizer, BertTokenizer
from torch import nn
import numpy as np
import string
import re
import os
import shutil
def load_settings(args, setting_fn):
if setting_fn is None:
... | 37.10453 | 127 | 0.53786 |
004819838eea08cd328f7e4f662e6d753a5af836 | 726 | py | Python | setup.py | brenoskuk/simple_autocorrect_pt | 9a9c3de9d19ecf4dba25d519d44b964771f3eaab | [
"MIT"
] | null | null | null | setup.py | brenoskuk/simple_autocorrect_pt | 9a9c3de9d19ecf4dba25d519d44b964771f3eaab | [
"MIT"
] | null | null | null | setup.py | brenoskuk/simple_autocorrect_pt | 9a9c3de9d19ecf4dba25d519d44b964771f3eaab | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="simple_autocorrect_pt",
version="0.0.1",
author="Breno Skuk, Ana Orsi",
author_email="breno.skuk@gmail.com, ana.orsi@usp.br",
description="Autocorrect to be used in the pipeline of rasa th... | 33 | 82 | 0.688705 |
36211c1ad4905ee8f32ac4ea38df25fa2d1a7013 | 5,885 | py | Python | src/py_v8n/Validator.py | nschejtman/py-v8n | 00210fe4a3dcb586b4551b5be8be0e82771063fb | [
"MIT"
] | null | null | null | src/py_v8n/Validator.py | nschejtman/py-v8n | 00210fe4a3dcb586b4551b5be8be0e82771063fb | [
"MIT"
] | null | null | null | src/py_v8n/Validator.py | nschejtman/py-v8n | 00210fe4a3dcb586b4551b5be8be0e82771063fb | [
"MIT"
] | null | null | null | from .Rule import Rule
from .rules import *
class Validator:
def __init__(self, chain: list, invert: bool, every: bool):
self.chain = chain
self.invert = invert
self._every = every
def test(self, *values):
for value in values:
for rule in self.chain:
... | 40.308219 | 120 | 0.630416 |
c47b1f78d5f7759bbcc83923ab3eb2660c8c1dc7 | 60 | py | Python | hipo_rank/embedders/__init__.py | mukul-mehta/HipoRank | b44490c4f1f3e0ff8015e3eb0f2b1955947dfe80 | [
"MIT"
] | 14 | 2021-02-04T16:05:57.000Z | 2022-03-29T08:31:59.000Z | hipo_rank/embedders/__init__.py | mukul-mehta/HipoRank | b44490c4f1f3e0ff8015e3eb0f2b1955947dfe80 | [
"MIT"
] | 2 | 2021-07-02T10:44:09.000Z | 2022-03-23T12:56:45.000Z | hipo_rank/embedders/__init__.py | mukul-mehta/HipoRank | b44490c4f1f3e0ff8015e3eb0f2b1955947dfe80 | [
"MIT"
] | 3 | 2021-06-10T15:41:19.000Z | 2021-11-11T16:21:43.000Z | """
Generates node embeddings for sentences and sections
""" | 20 | 52 | 0.766667 |
6f4b2a0b0275f11c75702d5a779691b83f37c7f9 | 455 | py | Python | problems/136_single-number.py | okuda-seminar/review_leetcode | 9774dbb85b836c3ebab4b24d77774ed05abb7a32 | [
"MIT"
] | null | null | null | problems/136_single-number.py | okuda-seminar/review_leetcode | 9774dbb85b836c3ebab4b24d77774ed05abb7a32 | [
"MIT"
] | 170 | 2021-05-11T14:03:05.000Z | 2021-11-30T14:22:52.000Z | problems/136_single-number.py | ryuji0123/review_leetcode | 9774dbb85b836c3ebab4b24d77774ed05abb7a32 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=136 lang=python3
#
# [136] Single Number
#
# @lc code=start
class Solution:
def singleNumber(self, nums: List[int]) -> int:
"""
time: O(nlogn) n: len(nums)
space: O(n)
"""
if not nums:
return None
nums.sort()
for i in rang... | 18.2 | 51 | 0.479121 |
2cce32751b22e725d60d012f918bc5700df25b4a | 666 | py | Python | webadmin/src/WebChilds/Script.py | builder08/enigma2-plugins_2 | f8f08b947e23c1c86b011492a7323125774c3482 | [
"OLDAP-2.3"
] | null | null | null | webadmin/src/WebChilds/Script.py | builder08/enigma2-plugins_2 | f8f08b947e23c1c86b011492a7323125774c3482 | [
"OLDAP-2.3"
] | null | null | null | webadmin/src/WebChilds/Script.py | builder08/enigma2-plugins_2 | f8f08b947e23c1c86b011492a7323125774c3482 | [
"OLDAP-2.3"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
from PKG import PKGConsoleStream
from twisted.web import server, resource, http
class Script(resource.Resource):
def render(self, request):
self.args = request.args
self.command = self.getArg("command")
if self.command is not None:
return self... | 21.483871 | 46 | 0.701201 |
b2e82afa22f7c17b1a508d2849ebd484c1b3138d | 520 | py | Python | tools/linter/install/clang_tidy.py | chloeyutianyi/pytorch | 0751a41ab148b34db1f63e14d7c40781e16ef2f2 | [
"Intel"
] | 2 | 2021-03-17T12:00:33.000Z | 2021-03-17T12:18:29.000Z | tools/linter/install/clang_tidy.py | stas00/pytorch | 6a085648d81ce88ff59d6d1438fdb3707a0d6fb7 | [
"Intel"
] | null | null | null | tools/linter/install/clang_tidy.py | stas00/pytorch | 6a085648d81ce88ff59d6d1438fdb3707a0d6fb7 | [
"Intel"
] | null | null | null | import os
from tools.linter.install.download_bin import download, PYTORCH_ROOT, HASH_PATH
PLATFORM_TO_URL = {
"Linux": "https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-tidy",
}
PLATFORM_TO_HASH = {
"Linux": os.path.join(HASH_PATH, "clang-tidy-linux64"),
}
OUTPUT_DIR = os.path.join(PYTORCH_R... | 27.368421 | 86 | 0.703846 |
012642ba4872e2e45b63a350e69c408a94a89f72 | 652 | py | Python | agent_stable_baselines/stable_baselines/deepq/__init__.py | Jannkar/doom_actionspace | 37663341f60a05943202b77394a4203d070fad95 | [
"MIT"
] | 1 | 2020-04-24T13:54:01.000Z | 2020-04-24T13:54:01.000Z | agent_stable_baselines/stable_baselines/deepq/__init__.py | Jannkar/doom_actionspace | 37663341f60a05943202b77394a4203d070fad95 | [
"MIT"
] | null | null | null | agent_stable_baselines/stable_baselines/deepq/__init__.py | Jannkar/doom_actionspace | 37663341f60a05943202b77394a4203d070fad95 | [
"MIT"
] | null | null | null | from stable_baselines.deepq.policies import MlpPolicy, CnnPolicy, LnMlpPolicy, LnCnnPolicy
from stable_baselines.deepq.build_graph import build_act, build_train # noqa
from stable_baselines.deepq.dqn import DQN
from stable_baselines.deepq.replay_buffer import ReplayBuffer, PrioritizedReplayBuffer # noqa
def w... | 40.75 | 95 | 0.777607 |
382eb75fc6a0b6e10cc5a0df896aa3b187f7e12e | 1,287 | py | Python | test/TestAlgorithm/test_sorting_algorithm/test_bubbleSort.py | paolodelia99/dsa-python | 9c10d7e7761b3ddf85ce6525bcd7f72c1d4be10f | [
"MIT"
] | 2 | 2021-03-15T19:14:02.000Z | 2021-03-15T21:29:48.000Z | test/TestAlgorithm/test_sorting_algorithm/test_bubbleSort.py | paolodelia99/dsa-python | 9c10d7e7761b3ddf85ce6525bcd7f72c1d4be10f | [
"MIT"
] | null | null | null | test/TestAlgorithm/test_sorting_algorithm/test_bubbleSort.py | paolodelia99/dsa-python | 9c10d7e7761b3ddf85ce6525bcd7f72c1d4be10f | [
"MIT"
] | null | null | null | # Testing Bubble Sort
from bubbleSort import bubble_sort
from randomListGenerator import small_random_list_generator
def sample_test():
# default list
sample_list = [4, 8, 2, 9, 10, 2, 5, 6, 1]
# copio sample list in sorted_sample_list
sorted_sample_list = sample_list.copy()
# la ordino
bubble... | 31.390244 | 76 | 0.705517 |
7fb0cee4588849b49811cfe8817ae599045193a1 | 6,473 | py | Python | Tests/Data/EllipticPETSc/square_1e1_neumann-insitu.py | garibay-j/ogs | 33340f22e9dbe0b7ccc60f0c828c2a528737c81e | [
"BSD-3-Clause"
] | 111 | 2015-03-20T22:54:17.000Z | 2022-03-30T04:37:21.000Z | Tests/Data/EllipticPETSc/square_1e1_neumann-insitu.py | garibay-j/ogs | 33340f22e9dbe0b7ccc60f0c828c2a528737c81e | [
"BSD-3-Clause"
] | 3,015 | 2015-01-05T21:55:16.000Z | 2021-02-15T01:09:17.000Z | Tests/Data/EllipticPETSc/square_1e1_neumann-insitu.py | garibay-j/ogs | 33340f22e9dbe0b7ccc60f0c828c2a528737c81e | [
"BSD-3-Clause"
] | 250 | 2015-02-10T15:43:57.000Z | 2022-03-30T04:37:20.000Z | # --------------------------------------------------------------
# Global timestep output options
timeStepToStartOutputAt = 0
forceOutputAtFirstCall = False
# Global screenshot output options
imageFileNamePadding = 0
rescale_lookuptable = False
# Whether or not to request specific arrays from the adaptor.
requestSpe... | 34.989189 | 88 | 0.570833 |
73feadf2a1affb9e93c3262ce103a37c1745f57a | 1,443 | py | Python | examples/pagination_ormar.py | XeryusTC/fastapi-pagination | 0e1e8542a9ab36f16b6c0ab7af2125b4a03dd095 | [
"MIT"
] | null | null | null | examples/pagination_ormar.py | XeryusTC/fastapi-pagination | 0e1e8542a9ab36f16b6c0ab7af2125b4a03dd095 | [
"MIT"
] | null | null | null | examples/pagination_ormar.py | XeryusTC/fastapi-pagination | 0e1e8542a9ab36f16b6c0ab7af2125b4a03dd095 | [
"MIT"
] | null | null | null | from typing import Any
import sqlalchemy
import uvicorn
from databases import Database
from faker import Faker
from fastapi import FastAPI
from ormar import Integer, Model, String
from fastapi_pagination import LimitOffsetPage, Page, add_pagination
from fastapi_pagination.ext.ormar import paginate
faker = Faker()
m... | 21.220588 | 69 | 0.697852 |
c7eaa567eca4c3a695599b3f7b276ea6d49c73b1 | 376 | py | Python | catch/datasets/vaccinia.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 58 | 2018-01-24T16:31:37.000Z | 2022-02-25T07:46:35.000Z | catch/datasets/vaccinia.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 29 | 2018-04-17T17:36:06.000Z | 2022-02-25T11:48:58.000Z | catch/datasets/vaccinia.py | broadinstitute/catch | 2fedca15f921116f580de8b2ae7ac9972932e59e | [
"MIT"
] | 16 | 2018-05-23T12:19:41.000Z | 2021-08-09T04:16:00.000Z | """Dataset with 'Vaccinia virus' sequences.
A dataset with 98 'Vaccinia virus' genomes.
THIS PYTHON FILE WAS GENERATED BY A COMPUTER PROGRAM! DO NOT EDIT!
"""
import sys
from catch.datasets import GenomesDatasetSingleChrom
ds = GenomesDatasetSingleChrom(__name__, __file__, __spec__)
ds.add_fasta_path("data/vaccin... | 23.5 | 66 | 0.784574 |
7a44b18a64afc10800e482539f51515caa1458ab | 17,135 | py | Python | usaspending_api/agency/tests/integration/test_agency_budget_function.py | g4brielvs/usaspending-api | bae7da2c204937ec1cdf75c052405b13145728d5 | [
"CC0-1.0"
] | 1 | 2020-06-15T19:59:52.000Z | 2020-06-15T19:59:52.000Z | usaspending_api/agency/tests/integration/test_agency_budget_function.py | g4brielvs/usaspending-api | bae7da2c204937ec1cdf75c052405b13145728d5 | [
"CC0-1.0"
] | null | null | null | usaspending_api/agency/tests/integration/test_agency_budget_function.py | g4brielvs/usaspending-api | bae7da2c204937ec1cdf75c052405b13145728d5 | [
"CC0-1.0"
] | null | null | null | import pytest
from rest_framework import status
from usaspending_api.common.helpers.fiscal_year_helpers import current_fiscal_year
url = "/api/v2/agency/{code}/budget_function/{query_params}"
@pytest.mark.django_db
def test_budget_function_list_success(client, agency_account_data):
resp = client.get(url.forma... | 34.065606 | 112 | 0.516662 |
7944f5f11c31c1b81c4fb28472df394d7ef3bdb9 | 5,647 | py | Python | esda/join_counts_local.py | jeffcsauer/esda | 5a7e4ff67eb18bfc0a529fbac9d5a4aa1d90b2c0 | [
"BSD-3-Clause"
] | 145 | 2017-04-06T06:28:08.000Z | 2022-03-26T18:31:29.000Z | esda/join_counts_local.py | jeffcsauer/esda | 5a7e4ff67eb18bfc0a529fbac9d5a4aa1d90b2c0 | [
"BSD-3-Clause"
] | 150 | 2017-03-13T23:18:56.000Z | 2022-03-07T06:51:54.000Z | esda/join_counts_local.py | jeffcsauer/esda | 5a7e4ff67eb18bfc0a529fbac9d5a4aa1d90b2c0 | [
"BSD-3-Clause"
] | 50 | 2017-03-13T21:19:31.000Z | 2022-03-31T09:30:46.000Z | import numpy as np
import pandas as pd
from sklearn.base import BaseEstimator
from libpysal import weights
from esda.crand import crand as _crand_plus, njit as _njit, _prepare_univariate
PERMUTATIONS = 999
class Join_Counts_Local(BaseEstimator):
"""Univariate Local Join Count Statistic"""
def __init__(
... | 34.018072 | 94 | 0.53586 |
4d7d5bdd1b29fa4735b2e9e8db3a560fe6494fb6 | 279 | py | Python | Server/ACEExceptions.py | ACRONYM-Group/ACRONYM-File-Transfer-System | e155712a1fbb61de35ff5bfd3eb701af7954fd7e | [
"MIT"
] | null | null | null | Server/ACEExceptions.py | ACRONYM-Group/ACRONYM-File-Transfer-System | e155712a1fbb61de35ff5bfd3eb701af7954fd7e | [
"MIT"
] | 13 | 2020-11-27T16:08:30.000Z | 2022-03-25T18:36:20.000Z | Server/ACEExceptions.py | ACRONYM-Group/ACRONYM-Multi-Purpose-Server | e155712a1fbb61de35ff5bfd3eb701af7954fd7e | [
"MIT"
] | 1 | 2018-09-16T20:02:38.000Z | 2018-09-16T20:02:38.000Z | """
Holds all of the exceptions that ACELib makes use of
"""
class ACELibException(Exception):
pass
class BadPacketException(ACELibException):
pass
class BadHandshakeException(ACELibException):
pass
class BadPacketTypeException(ACELibException):
pass
| 13.95 | 56 | 0.749104 |
3bd597afca18d97bd7c817d05cb4b708adc3ad2d | 8,943 | py | Python | project2/src/tune.py | errikos/ml-makarona | 5e0c9efe3405245119bf5aa9bd81a4ca5159eab1 | [
"MIT"
] | null | null | null | project2/src/tune.py | errikos/ml-makarona | 5e0c9efe3405245119bf5aa9bd81a4ca5159eab1 | [
"MIT"
] | null | null | null | project2/src/tune.py | errikos/ml-makarona | 5e0c9efe3405245119bf5aa9bd81a4ca5159eab1 | [
"MIT"
] | 1 | 2019-10-24T22:47:38.000Z | 2019-10-24T22:47:38.000Z | #!/usr/bin/env python3
import click
import itertools
import helpers
import surprise
import numpy as np
def print_dict(d, delim='=', prefix=''):
print(prefix)
if not d:
print('(none)')
for k, v in d.items():
print('{k}{d}{v}'.format(k=k, d=delim, v=v), end=' ')
print()
class Tuner(o... | 43.62439 | 120 | 0.671028 |
fc23131545a5d472e85203ec97a066fb8862f5c7 | 5,549 | py | Python | python/covid19_spain.py | giant-uji/COVID19 | 17c0d1c6b7beb23cd46c2f59aaedc50ad8070343 | [
"Apache-2.0"
] | null | null | null | python/covid19_spain.py | giant-uji/COVID19 | 17c0d1c6b7beb23cd46c2f59aaedc50ad8070343 | [
"Apache-2.0"
] | null | null | null | python/covid19_spain.py | giant-uji/COVID19 | 17c0d1c6b7beb23cd46c2f59aaedc50ad8070343 | [
"Apache-2.0"
] | null | null | null | import os
import pandas as pd
import python.datamanager as dm
from python.plot import plot_dataframe, plot_spain
# spain_covid19_url = 'https://raw.githubusercontent.com/datadista/datasets/master/COVID%2019/nacional_covid19.csv'
spain_c19_casos_url = 'https://raw.githubusercontent.com/datadista/datasets/master/COVID%2... | 51.859813 | 134 | 0.720851 |
4476b0d91230685eeef710a1372f20bdf1d9f908 | 1,452 | py | Python | examples/example_fermi_catalogs.py | contrera/gammapy | aa0a74baa977ee2477b5c63e036075f4219792a3 | [
"BSD-3-Clause"
] | null | null | null | examples/example_fermi_catalogs.py | contrera/gammapy | aa0a74baa977ee2477b5c63e036075f4219792a3 | [
"BSD-3-Clause"
] | null | null | null | examples/example_fermi_catalogs.py | contrera/gammapy | aa0a74baa977ee2477b5c63e036075f4219792a3 | [
"BSD-3-Clause"
] | null | null | null | """Example to show how to plot spectrum of Fermi/LAT sources.
"""
import matplotlib.pyplot as plt
from gammapy.catalog import (
SourceCatalog3FGL,
SourceCatalog2FHL,
SourceCatalog1FHL,
SourceCatalog3FHL,
)
def plot_source_spectrum(source, label, color):
opts = dict(energy_power=2, flux_unit="erg-1... | 28.470588 | 74 | 0.670799 |
513d6d3e217cc16bff23d1bad7176a449d000639 | 3,038 | py | Python | datasets/Part 2 - Convolutional Neural Networks (CNN)/cnn.py | Vacek-Ace/cursodeeplearning | f83b800602985c62a2437d088fdfe3f3d0a85e2d | [
"CC0-1.0"
] | null | null | null | datasets/Part 2 - Convolutional Neural Networks (CNN)/cnn.py | Vacek-Ace/cursodeeplearning | f83b800602985c62a2437d088fdfe3f3d0a85e2d | [
"CC0-1.0"
] | null | null | null | datasets/Part 2 - Convolutional Neural Networks (CNN)/cnn.py | Vacek-Ace/cursodeeplearning | f83b800602985c62a2437d088fdfe3f3d0a85e2d | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 29 19:20:59 2019
@author: juangabriel
"""
# Redes Neuronales Convolucionales
# Instalar Theano
# pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
# Instalar Tensorflow y Keras
# conda install -c conda-forge keras
# Parte 1... | 32.319149 | 151 | 0.642857 |
4ef667a41821c0a500cbcb8dad31aa3016ef7d24 | 4,022 | py | Python | filterpy/stats/tests/test_stats.py | hcarlsso/filterpy | 05a2dd511225759fc58da4725fa23373e3cb4d3a | [
"MIT"
] | 1 | 2018-03-28T11:19:50.000Z | 2018-03-28T11:19:50.000Z | filterpy/stats/tests/test_stats.py | hcarlsso/filterpy | 05a2dd511225759fc58da4725fa23373e3cb4d3a | [
"MIT"
] | null | null | null | filterpy/stats/tests/test_stats.py | hcarlsso/filterpy | 05a2dd511225759fc58da4725fa23373e3cb4d3a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Copyright 2015 Roger R Labbe Jr.
FilterPy library.
http://github.com/rlabbe/filterpy
Documentation at:
https://filterpy.readthedocs.org
Supporting book at:
https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python
This is licensed under an MIT license. See the readme.MD file
for mor... | 29.144928 | 88 | 0.583541 |
31dfe5f1abbb212fe0b21a2fb6157bfe37697804 | 6,296 | py | Python | amostra/objects.py | ke-zhang-rd/amostra | 9d5f3ced1ff802134669d296e6dba5cd41bdfb94 | [
"BSD-3-Clause"
] | null | null | null | amostra/objects.py | ke-zhang-rd/amostra | 9d5f3ced1ff802134669d296e6dba5cd41bdfb94 | [
"BSD-3-Clause"
] | null | null | null | amostra/objects.py | ke-zhang-rd/amostra | 9d5f3ced1ff802134669d296e6dba5cd41bdfb94 | [
"BSD-3-Clause"
] | null | null | null | import uuid
import jsonschema
from traitlets import (
Dict,
HasTraits,
Instance,
Integer,
List,
Unicode,
default,
validate,
)
from .utils import load_schema
def _validate_with_jsonschema(instance, proposal):
"""
Validate that contents satisfy a jsonschema.
This is meant ... | 29.420561 | 83 | 0.608323 |
6ffd0886d4a70bb1de0f7217771e26bf12458003 | 37,749 | py | Python | instances/passenger_demand/pas-20210421-2109-int12e/80.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int12e/80.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int12e/80.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 2846
passenger_arriving = (
(4, 6, 12, 1, 0, 0, 5, 10, 4, 7, 1, 0), # 0
(2, 11, 7, 3, 1, 0, 7, 10, 7, 1, 3, 0), # 1
(2, 2, 8, 0, 1, 0, 4, 10, 4, 3, 4, 0), # 2
(3, 6, 5, 5, 2, 0, 5, 4, 3, 4, 1, 0), # 3
(4, 10, 2, 1, 2, 0, 4, 6, 4, 3, 1, 0), # 4
(2, 4, 5, 4, 2, 0, 3, 7, 3,... | 112.683582 | 213 | 0.728099 |
8ce3eaec551b502d9df290dc8e5134efcfd201f0 | 38,786 | py | Python | lib/rucio/tests/test_request.py | Ruturaj123/rucio | 0e02bc64dc369d4fd253d4789fb3300eaff82ff1 | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_request.py | Ruturaj123/rucio | 0e02bc64dc369d4fd253d4789fb3300eaff82ff1 | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_request.py | Ruturaj123/rucio | 0e02bc64dc369d4fd253d4789fb3300eaff82ff1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration.
#
# 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... | 47.242387 | 207 | 0.60001 |
8425018874b603035fc5f814105df1fe701777c0 | 4,842 | py | Python | bfg_analysis/supplements.py | RyogaLi/BFG_Y2H | cc9006cc6724c87644bf092597ced74e3a06126f | [
"MIT"
] | null | null | null | bfg_analysis/supplements.py | RyogaLi/BFG_Y2H | cc9006cc6724c87644bf092597ced74e3a06126f | [
"MIT"
] | null | null | null | bfg_analysis/supplements.py | RyogaLi/BFG_Y2H | cc9006cc6724c87644bf092597ced74e3a06126f | [
"MIT"
] | 1 | 2021-05-27T15:56:03.000Z | 2021-05-27T15:56:03.000Z | #!/usr/bin/env python3.7
import pandas as pd
####
# purpose of the scripts: read summary files for different projects and output AD genes/ DB genes
# virus
vADNC = "/home/rothlab/rli/02_dev/08_bfg_y2h/summary/vADNC_withNull.csv"
vAD2u = "/home/rothlab/rli/02_dev/08_bfg_y2h/summary/vAD2u_withNull.csv"
vDBNC = "/hom... | 31.038462 | 111 | 0.623503 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.