hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794ab32b5932561453d6667cdf03981f5834b496 | 54 | py | Python | bin/programmanager.py | pyDarkVOS/InarkOS | 21b57a7f0e5a06d276e18e25ac8c30232eb0d8de | [
"Apache-2.0"
] | 3 | 2022-02-20T17:22:18.000Z | 2022-03-20T02:56:07.000Z | bin/programmanager.py | InarkVOS/InarkOS | 21b57a7f0e5a06d276e18e25ac8c30232eb0d8de | [
"Apache-2.0"
] | null | null | null | bin/programmanager.py | InarkVOS/InarkOS | 21b57a7f0e5a06d276e18e25ac8c30232eb0d8de | [
"Apache-2.0"
] | 2 | 2022-03-11T13:36:37.000Z | 2022-03-18T23:47:20.000Z | import os
def run(p):
os.system(f"python3 {p}")
| 10.8 | 27 | 0.592593 |
794ab40206460f242570eab47b2398553de8af36 | 7,985 | py | Python | Collections-a-installer/community-general-2.4.0/plugins/modules/remote_management/redfish/idrac_redfish_facts.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | Collections-a-installer/community-general-2.4.0/plugins/modules/remote_management/redfish/idrac_redfish_facts.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | Collections-a-installer/community-general-2.4.0/plugins/modules/remote_management/redfish/idrac_redfish_facts.py | d-amien-b/simple-getwordpress | da90d515a0aa837b633d50db4d91d22b031c04a2 | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2019 Dell EMC Inc.
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: idrac_redfish_info
short_desc... | 33.691983 | 156 | 0.665373 |
794ab4049b71b24e9ef1ef43cc06677b29a78388 | 2,995 | py | Python | scripts/p600/main_p600_low_res.py | sakurakhadag/escp2-client | f8d58bdaedc4f7ca811769538586b759c37eb355 | [
"MIT"
] | null | null | null | scripts/p600/main_p600_low_res.py | sakurakhadag/escp2-client | f8d58bdaedc4f7ca811769538586b759c37eb355 | [
"MIT"
] | 5 | 2019-10-10T13:53:48.000Z | 2019-10-16T19:09:28.000Z | scripts/p600/main_p600_low_res.py | sakurakhadag/escp2-client | f8d58bdaedc4f7ca811769538586b759c37eb355 | [
"MIT"
] | 2 | 2019-10-11T17:56:31.000Z | 2021-01-15T11:33:58.000Z | import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
'..', '..')))
import binascii
import math
from hex_functions import *
from esc_functions import *
from characters import *
import numpy as np
# cd to project base directory
ab... | 27.990654 | 90 | 0.691152 |
794ab41008d0ac086e0964a2a75758193146f1df | 3,699 | py | Python | lib/galaxy/managers/taggable.py | KyleL1998/galaxy | 10be2cd8ac05680f8291eea7996f4d3fc76197de | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/taggable.py | KyleL1998/galaxy | 10be2cd8ac05680f8291eea7996f4d3fc76197de | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/managers/taggable.py | KyleL1998/galaxy | 10be2cd8ac05680f8291eea7996f4d3fc76197de | [
"CC-BY-3.0"
] | null | null | null | """
Mixins for Taggable model managers and serializers.
"""
# from galaxy import exceptions as galaxy_exceptions
import logging
from galaxy.util import unicodify
log = logging.getLogger(__name__)
# TODO: work out the relation between serializers and managers and then fold these into the parent of the two
def _tag... | 30.073171 | 112 | 0.633685 |
794ab6d682d48d1fd11d8eb4e7b620152d9e3259 | 514 | py | Python | load.py | TranslatorIIPrototypes/NodeNormalization | 52461e0940e618984452b3fdf8cc13698ec71390 | [
"MIT"
] | 2 | 2021-01-12T19:34:38.000Z | 2022-03-08T22:40:20.000Z | load.py | TranslatorSRI/NodeNormalization | 3e8ca8440dd4bf831c901c048bc334661ca9aa5a | [
"MIT"
] | 71 | 2020-10-02T12:35:49.000Z | 2022-03-28T20:58:46.000Z | load.py | TranslatorSRI/NodeNormalization | 3e8ca8440dd4bf831c901c048bc334661ca9aa5a | [
"MIT"
] | 2 | 2020-10-06T16:01:50.000Z | 2021-07-19T21:24:36.000Z | from node_normalizer.loader import NodeLoader
import asyncio
async def load_redis():
# instantiate the class that does all the work
loader = NodeLoader()
# call to load redis instances with normalized node data
success: bool = await loader.load(1_000)
# check the return
if not success:
... | 24.47619 | 80 | 0.70428 |
794ab75caaf75c071f6775f075f5c26ed0f8ddad | 4,049 | py | Python | src/robotide/application/releasenotes.py | veryl-technologies/t24-tests-ide | 16cd803895916a785c0e1fec3f71f9388c21edc9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robotide/application/releasenotes.py | veryl-technologies/t24-tests-ide | 16cd803895916a785c0e1fec3f71f9388c21edc9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robotide/application/releasenotes.py | veryl-technologies/t24-tests-ide | 16cd803895916a785c0e1fec3f71f9388c21edc9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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 applic... | 34.313559 | 108 | 0.663621 |
794aba662fded38d8df0dd71a2abc06dceceb757 | 106 | py | Python | lbry/__init__.py | SNOmad1/lbry-sdk | 268decd6556619625151c574890eba9f8dc2c90d | [
"MIT"
] | 2 | 2021-12-24T18:29:49.000Z | 2021-12-26T02:04:57.000Z | lbry/__init__.py | SNOmad1/lbry-sdk | 268decd6556619625151c574890eba9f8dc2c90d | [
"MIT"
] | null | null | null | lbry/__init__.py | SNOmad1/lbry-sdk | 268decd6556619625151c574890eba9f8dc2c90d | [
"MIT"
] | null | null | null | __version__ = "0.102.0"
version = tuple(map(int, __version__.split('.'))) # pylint: disable=invalid-name
| 35.333333 | 81 | 0.698113 |
794aba680c0c281a148a75220cc54e9ca3b83457 | 1,056 | py | Python | scripts/examples/OpenMV/14-WiFi-Shield/http_client_ssl.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 1,761 | 2015-07-10T23:14:17.000Z | 2022-03-30T07:49:49.000Z | scripts/examples/OpenMV/14-WiFi-Shield/http_client_ssl.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 487 | 2015-07-07T23:21:20.000Z | 2022-03-30T17:13:22.000Z | scripts/examples/OpenMV/14-WiFi-Shield/http_client_ssl.py | jiskra/openmv | a0f321836f77f94d8118910598dcdb79eb784d58 | [
"MIT"
] | 882 | 2015-08-01T08:34:19.000Z | 2022-03-30T07:36:23.000Z | # Simple HTTPS client example.
import network, usocket, ussl
# AP info
SSID="" # Network SSID
KEY="" # Network key
PORT = 443
HOST = "www.google.com"
# Init wlan module and connect to network
print("Trying to connect... (may take a while)...")
wlan = network.WINC()
wlan.connect(SSID, key=KEY, security=wlan.WPA_PS... | 21.55102 | 61 | 0.708333 |
794abb083955bc5d92be1f7fc8a92b93ac3b8745 | 3,994 | py | Python | src/python/dxpy/templating/templates/python/parallelized/src/code.py | yesimon/dx-toolkit | c13a16d570a55bde7778d6db9268f5c3fca81d0f | [
"Apache-2.0"
] | null | null | null | src/python/dxpy/templating/templates/python/parallelized/src/code.py | yesimon/dx-toolkit | c13a16d570a55bde7778d6db9268f5c3fca81d0f | [
"Apache-2.0"
] | null | null | null | src/python/dxpy/templating/templates/python/parallelized/src/code.py | yesimon/dx-toolkit | c13a16d570a55bde7778d6db9268f5c3fca81d0f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# DX_APP_WIZARD_NAME DX_APP_WIZARD_VERSION
# Generated by dx-app-wizard.
#
# Parallelized execution pattern: Your app will generate multiple jobs
# to perform some computation in parallel, followed by a final
# "postprocess" stage that will perform any additional computations as
# necessary.
#
# S... | 40.755102 | 125 | 0.710566 |
794abb215412ad2a470d84ea519053f7e0e39ef7 | 4,248 | py | Python | src/transformers/models/electra/__init__.py | kct22aws/transformers | 04cddaf402591e9f5bdb5f116a111d829a0ce4f4 | [
"Apache-2.0"
] | 5 | 2020-10-30T13:07:02.000Z | 2021-03-17T12:18:30.000Z | src/transformers/models/electra/__init__.py | guang7400613/transformers | 28e091430eea9e0d40839e56fd0d57aec262f5f9 | [
"Apache-2.0"
] | 1 | 2022-01-17T03:24:35.000Z | 2022-01-17T03:24:35.000Z | src/transformers/models/electra/__init__.py | guang7400613/transformers | 28e091430eea9e0d40839e56fd0d57aec262f5f9 | [
"Apache-2.0"
] | 1 | 2022-02-08T19:37:39.000Z | 2022-02-08T19:37:39.000Z | # flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | 34.258065 | 118 | 0.703154 |
794abb80a002be7f7bff494974c6d6c89f0ff17c | 11,493 | py | Python | tests/test_elements.py | gatling-nrl/scikit-fem | 04730d80d612470b7e802eed4c21dd96b89cef61 | [
"BSD-3-Clause"
] | 1 | 2019-12-07T15:28:13.000Z | 2019-12-07T15:28:13.000Z | tests/test_elements.py | gatling-nrl/scikit-fem | 04730d80d612470b7e802eed4c21dd96b89cef61 | [
"BSD-3-Clause"
] | 3 | 2022-01-07T00:56:47.000Z | 2022-01-12T20:06:34.000Z | tests/test_elements.py | gdmcbain/scikit-fem | 73890816c2142385abf4a9ffcd8d233e2d25e865 | [
"BSD-3-Clause"
] | null | null | null | from unittest import TestCase, main
import numpy as np
from numpy.testing import assert_allclose, assert_array_equal
import pytest
from skfem.element import (
ElementHex1,
ElementHexS2,
ElementLineP0,
ElementLineP1,
ElementLineP2,
ElementLinePp,
ElementLineMini,
ElementQuad0,
Eleme... | 28.876884 | 78 | 0.507178 |
794abbe2fa47dc251d96ee54829be7ee1b916ab6 | 305 | py | Python | 30_of_codes/Day 3 - Intro to Conditional Statements/2-conditionalStatements.py | Kani712/Hacker_Rank | d208ef88ac33c056b89785688cf43d90275d00da | [
"MIT"
] | null | null | null | 30_of_codes/Day 3 - Intro to Conditional Statements/2-conditionalStatements.py | Kani712/Hacker_Rank | d208ef88ac33c056b89785688cf43d90275d00da | [
"MIT"
] | null | null | null | 30_of_codes/Day 3 - Intro to Conditional Statements/2-conditionalStatements.py | Kani712/Hacker_Rank | d208ef88ac33c056b89785688cf43d90275d00da | [
"MIT"
] | null | null | null | import math
import os
import random
import re
import sys
if __name__ == '__main__':
N = int(input())
if N % 2 != 0:
print("Weird")
if N % 2 == 0 and N in range(2, 6):
print("Not Weird")
if N % 2 == 0 and N in range(6, 21):
print("Weird")
if N % 2 == 0 and N > 20:
print("Not Weird") | 16.944444 | 36 | 0.567213 |
794abd0ba787033014c9661e708d6f864f34373b | 655 | py | Python | src/python-version/src/main.py | mopsfl/RLO-Jail-Time-Converter | 0d5966eb77f702b44e2a8fd2c72aa63355595f10 | [
"Apache-2.0"
] | 1 | 2021-11-17T20:59:22.000Z | 2021-11-17T20:59:22.000Z | src/python-version/src/main.py | mopsfl/RLO-Jail-Time-Converter | 0d5966eb77f702b44e2a8fd2c72aa63355595f10 | [
"Apache-2.0"
] | null | null | null | src/python-version/src/main.py | mopsfl/RLO-Jail-Time-Converter | 0d5966eb77f702b44e2a8fd2c72aa63355595f10 | [
"Apache-2.0"
] | null | null | null | import os
print("mopsfl - Real Life Online - Jail Time Convert - v.0.1\n")
try:
months = int(input("Enter the months: "))
method = input("Enter to what you want to convert it (hour, day): ")
if method == "hour":
print("\nResults: " + str(months/60) + " hour(s)")
print("Results rounde... | 27.291667 | 76 | 0.564885 |
794abd1670254d8b032ba59ef5f59d6dfd13f283 | 1,689 | py | Python | google/cloud/essentialcontacts/v1/essentialcontacts-v1-py/google/cloud/essential_contacts_v1/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/essentialcontacts/v1/essentialcontacts-v1-py/google/cloud/essential_contacts_v1/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/essentialcontacts/v1/essentialcontacts-v1-py/google/cloud/essential_contacts_v1/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 34.469388 | 84 | 0.818828 |
794abe94168e7c232d9581f529ed568b88ececf3 | 491 | py | Python | plotly/validators/layout/mapbox/layer/symbol/_icon.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/layout/mapbox/layer/symbol/_icon.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/layout/mapbox/layer/symbol/_icon.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class IconValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self,
plotly_name='icon',
parent_name='layout.mapbox.layer.symbol',
**kwargs
):
super(IconValidator, self).__init__(
plotly_name=plotly_name... | 25.842105 | 66 | 0.602851 |
794abec225ffcfad4f89aa5eab00f36dde0406ec | 9,142 | py | Python | salika/views/store_views.py | BarisSari/django_crud | ce9586c10da2f865d29d9a18e9ff5582abe5e3a0 | [
"MIT"
] | null | null | null | salika/views/store_views.py | BarisSari/django_crud | ce9586c10da2f865d29d9a18e9ff5582abe5e3a0 | [
"MIT"
] | null | null | null | salika/views/store_views.py | BarisSari/django_crud | ce9586c10da2f865d29d9a18e9ff5582abe5e3a0 | [
"MIT"
] | null | null | null | from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.views.generic.list import ListView
from ..models import Store
from ..forms import StoreForm
from django.urls import reverse_lazy
from django.urls import reverse
from django.http import... | 34.2397 | 115 | 0.698644 |
794abf88eb9add26c41f62c631e3b661446de974 | 16,233 | py | Python | mindquantum/core/parameterresolver/parameterresolver.py | mindspore-ai/mindquantum | 785150e6b44bb79b37f2fa4a3d86edc0ab3c83ce | [
"Apache-2.0"
] | 13 | 2021-06-04T00:47:53.000Z | 2022-03-20T14:30:38.000Z | mindquantum/core/parameterresolver/parameterresolver.py | mindspore-ai/mindquantum | 785150e6b44bb79b37f2fa4a3d86edc0ab3c83ce | [
"Apache-2.0"
] | null | null | null | mindquantum/core/parameterresolver/parameterresolver.py | mindspore-ai/mindquantum | 785150e6b44bb79b37f2fa4a3d86edc0ab3c83ce | [
"Apache-2.0"
] | 4 | 2022-01-17T02:43:34.000Z | 2022-02-20T16:03:44.000Z | # -*- coding: utf-8 -*-
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 33.608696 | 114 | 0.562558 |
794abfa34738f78f99c260e408b150aa5d1b526d | 974 | py | Python | RotSite/polls/views.py | Mot93/Website-Rotaract-Valle-del-Savena | 3d409f2d77978331cae5fde82616f47de2b8d59b | [
"MIT"
] | null | null | null | RotSite/polls/views.py | Mot93/Website-Rotaract-Valle-del-Savena | 3d409f2d77978331cae5fde82616f47de2b8d59b | [
"MIT"
] | null | null | null | RotSite/polls/views.py | Mot93/Website-Rotaract-Valle-del-Savena | 3d409f2d77978331cae5fde82616f47de2b8d59b | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
from django.http import Http404
# Models I created
from .models import Question
def index(request):
latest_question_list = Question.objects.order_by('-pub_date')[:5]
template = loader.get_template('polls... | 34.785714 | 71 | 0.738193 |
794abfb9c8e1de418909af3b10b9c4e677cb140f | 461 | py | Python | python/test/test.py | mrondin1/StarSpace | fc2cd39472b3aadf00b6254edf00e099e13e598f | [
"MIT"
] | 2,914 | 2017-10-04T21:55:41.000Z | 2022-03-31T04:25:31.000Z | python/test/test.py | mrondin1/StarSpace | fc2cd39472b3aadf00b6254edf00e099e13e598f | [
"MIT"
] | 215 | 2017-10-06T14:12:13.000Z | 2022-03-18T06:56:27.000Z | python/test/test.py | mrondin1/StarSpace | fc2cd39472b3aadf00b6254edf00e099e13e598f | [
"MIT"
] | 483 | 2017-10-07T20:09:47.000Z | 2022-03-01T02:23:20.000Z | import starwrap as sw
import numpy as np
arg = sw.args()
arg.trainFile = './input.txt'
arg.testFile = './input.txt'
arg.trainMode = 5
sp = sw.starSpace(arg)
sp.init()
sp.train()
# sp.evaluate()
sp.nearestNeighbor('some text', 10)
sp.saveModel('model')
sp.saveModelTsv('model.tsv')
sp.initFromSavedModel('model'... | 19.208333 | 56 | 0.691974 |
794ac0413d710f7c3106974ec8a0798ef6422ab1 | 64,517 | py | Python | tests/unit/pypyr/context_test.py | FooBarQuaxx/pypyr | ebe56b2200a53e2f38c78bbb42d466bb1556c37c | [
"Apache-2.0"
] | null | null | null | tests/unit/pypyr/context_test.py | FooBarQuaxx/pypyr | ebe56b2200a53e2f38c78bbb42d466bb1556c37c | [
"Apache-2.0"
] | null | null | null | tests/unit/pypyr/context_test.py | FooBarQuaxx/pypyr | ebe56b2200a53e2f38c78bbb42d466bb1556c37c | [
"Apache-2.0"
] | null | null | null | """context.py unit tests."""
from collections.abc import MutableMapping
from pypyr.context import Context, ContextItemInfo
from pypyr.dsl import PyString, SicString
from pypyr.errors import (
ContextError,
KeyInContextHasNoValueError,
KeyNotInContextError)
import pytest
import typing
# ------------------- ... | 32.194112 | 79 | 0.547794 |
794ac2b2d01c183e0439a705180002060790a073 | 1,958 | py | Python | verilator/detect2600_verilator/check.py | tacertain/Tutorials_MiSTer | ffa0c2d01d7c40b2dce893470e9144d39644f321 | [
"Apache-2.0"
] | 50 | 2019-02-05T22:58:19.000Z | 2022-03-15T05:15:23.000Z | verilator/detect2600_verilator/check.py | tacertain/Tutorials_MiSTer | ffa0c2d01d7c40b2dce893470e9144d39644f321 | [
"Apache-2.0"
] | 3 | 2021-05-03T08:18:06.000Z | 2021-08-09T01:27:48.000Z | verilator/detect2600_verilator/check.py | tacertain/Tutorials_MiSTer | ffa0c2d01d7c40b2dce893470e9144d39644f321 | [
"Apache-2.0"
] | 15 | 2019-09-03T10:18:43.000Z | 2022-01-19T06:09:41.000Z | import csv
import subprocess
size_table = { "00008400":"--","00006300":"--","00008000":"--","00010000":"--","00000800": "2K", "00001000" : "4K" }
cart_data = []
md5_name = {}
missing = []
match = []
incorrect = []
with open('romschecklist.chk') as csv_file:
csv_reader = csv.reader(csv_file, delimiter=',')
... | 20.610526 | 116 | 0.55618 |
794ac36bc53f15d59f7ef701d279b3402d7bc92d | 1,034 | py | Python | _/Chapter 7/myshop/orders/views.py | paullewallencom/django-978-1-7872-8366-4 | 8677b798412cb28389ecf211b8af9692bb34bfcc | [
"Apache-2.0"
] | 26 | 2019-10-04T20:37:43.000Z | 2021-11-15T19:54:29.000Z | _/Chapter 7/myshop/orders/views.py | paullewallencom/django-978-1-7872-8366-4 | 8677b798412cb28389ecf211b8af9692bb34bfcc | [
"Apache-2.0"
] | 1 | 2022-01-14T11:29:11.000Z | 2022-01-14T11:29:11.000Z | _/Chapter 7/myshop/orders/views.py | paullewallencom/django-978-1-7872-8366-4 | 8677b798412cb28389ecf211b8af9692bb34bfcc | [
"Apache-2.0"
] | 29 | 2019-05-19T11:43:02.000Z | 2021-11-16T13:05:30.000Z | from django.shortcuts import render
from .models import OrderItem
from .forms import OrderCreateForm
from .tasks import order_created
from cart.cart import Cart
def order_create(request):
cart = Cart(request)
if request.method == 'POST':
form = OrderCreateForm(request.POST)
if form.is_valid():... | 36.928571 | 81 | 0.526112 |
794ac4488173e551ff7ebec54fe253c853aa3281 | 35,062 | py | Python | pyzoo/test/zoo/pipeline/nnframes/test_nn_classifier.py | jiaxinying/analytics-zoo | c3669b1736088df911c84b38fde3e90a571f51b7 | [
"Apache-2.0"
] | 4 | 2018-06-19T05:38:30.000Z | 2020-06-22T14:26:26.000Z | pyzoo/test/zoo/pipeline/nnframes/test_nn_classifier.py | jiaxinying/analytics-zoo | c3669b1736088df911c84b38fde3e90a571f51b7 | [
"Apache-2.0"
] | 5 | 2021-06-08T23:28:18.000Z | 2022-02-10T05:31:27.000Z | pyzoo/test/zoo/pipeline/nnframes/test_nn_classifier.py | jiaxinying/analytics-zoo | c3669b1736088df911c84b38fde3e90a571f51b7 | [
"Apache-2.0"
] | 1 | 2018-09-05T02:16:10.000Z | 2018-09-05T02:16:10.000Z | #
# Copyright 2018 Analytics Zoo 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... | 40.628042 | 96 | 0.587331 |
794ac455a8adc30cfc215aae1c51c385a0ba1c07 | 8,621 | py | Python | jobs/ztb_data_job.py | masling/stock | f7a0add2b7533ff43d1ed1a238ec14f55b39e488 | [
"Apache-2.0"
] | null | null | null | jobs/ztb_data_job.py | masling/stock | f7a0add2b7533ff43d1ed1a238ec14f55b39e488 | [
"Apache-2.0"
] | null | null | null | jobs/ztb_data_job.py | masling/stock | f7a0add2b7533ff43d1ed1a238ec14f55b39e488 | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
__author__ = 'Masling'
# 每天的涨跌停 数据来源金融界及东方财富网
import xlwt
import pandas as pd
import tushare as ts
import datetime
import libs.common as common
import libs.stock_ztb as ztb
ts.set_token('0d60b78ce095601b582c78f71b954e0e87a6e352b738a6a225d71649')
# c代码 ,m 1沪 0深 ,n 名称,p 最... | 41.647343 | 114 | 0.554808 |
794ac5320b0439c006ae983c177023eae28cf09d | 1,001 | py | Python | uamobile/data/cidr/ezweb.py | SandySalvatore/uamobile | 51c637effc65b863c8f1897d971a13bb099bdb84 | [
"MIT"
] | null | null | null | uamobile/data/cidr/ezweb.py | SandySalvatore/uamobile | 51c637effc65b863c8f1897d971a13bb099bdb84 | [
"MIT"
] | null | null | null | uamobile/data/cidr/ezweb.py | SandySalvatore/uamobile | 51c637effc65b863c8f1897d971a13bb099bdb84 | [
"MIT"
] | null | null | null | DATA = [ '111.107.116.64/26',
'106.162.214.160/29',
'111.107.116.192/28',
'210.230.128.224/28',
'219.108.158.0/27',
'219.125.146.0/28',
'61.117.2.32/29',
'61.117.2.40/29',
'219.108.158.40/29',
'111.86.142.0/26',
'111.86.141.64/26',
'111.86.141.128/26',
'111.86.141.192/26',
'27.90.136.0/27',
... | 21.297872 | 29 | 0.546454 |
794ac57238462f0fc1ff2db1a817f51ccc2dab7b | 64,766 | py | Python | Lib/Plugin.py | iCH3F/ToonTime | 7efeb94f748706df72b766b2ce5dade3dc171fed | [
"MIT"
] | 2 | 2020-05-31T23:29:54.000Z | 2022-01-11T18:11:07.000Z | Lib/Plugin.py | iCH3F/ToonTime | 7efeb94f748706df72b766b2ce5dade3dc171fed | [
"MIT"
] | null | null | null | Lib/Plugin.py | iCH3F/ToonTime | 7efeb94f748706df72b766b2ce5dade3dc171fed | [
"MIT"
] | 1 | 2020-05-31T23:19:16.000Z | 2020-05-31T23:19:16.000Z | # -*- coding: utf-8 -*-
import re
import sys
import requests
from itertools import chain
from base64 import b64decode
from time import time, sleep
from urlparse import parse_qsl
from string import ascii_uppercase
from urllib import quote_plus, urlencode
import xbmc
import xbmcgui
import xbmcaddon
import xbmcplugin
f... | 42.386126 | 181 | 0.605379 |
794ac688acc3387f549226d07d0fc9dfa6794ae4 | 1,155 | py | Python | database/schemas/user.py | DiegoLing33/prestij.xyz-api | 69a11a2c93dd98975f9becbc4b8f596e4941a05f | [
"MIT"
] | 2 | 2020-10-28T14:00:05.000Z | 2020-10-30T11:55:27.000Z | database/schemas/user.py | DiegoLing33/prestij.xyz-api | 69a11a2c93dd98975f9becbc4b8f596e4941a05f | [
"MIT"
] | null | null | null | database/schemas/user.py | DiegoLing33/prestij.xyz-api | 69a11a2c93dd98975f9becbc4b8f596e4941a05f | [
"MIT"
] | null | null | null | # ██╗░░░░░██╗███╗░░██╗░██████╗░░░░██████╗░██╗░░░░░░█████╗░░█████╗░██╗░░██╗
# ██║░░░░░██║████╗░██║██╔════╝░░░░██╔══██╗██║░░░░░██╔══██╗██╔══██╗██║░██╔╝
# ██║░░░░░██║██╔██╗██║██║░░██╗░░░░██████╦╝██║░░░░░███████║██║░░╚═╝█████═╝░
# ██║░░░░░██║██║╚████║██║░░╚██╗░░░██╔══██╗██║░░░░░██╔══██║██║░░██╗██╔═██╗░
# ███████╗██║██... | 25.108696 | 75 | 0.41039 |
794ac6a3389aee903d2040ab138922e0b6b2557f | 10,730 | py | Python | custom/world_vision/__init__.py | bglar/commcare-hq | 972129fc26864c08c7bef07874bd2a7218550bff | [
"BSD-3-Clause"
] | 1 | 2017-02-10T03:14:51.000Z | 2017-02-10T03:14:51.000Z | custom/world_vision/__init__.py | bglar/commcare-hq | 972129fc26864c08c7bef07874bd2a7218550bff | [
"BSD-3-Clause"
] | null | null | null | custom/world_vision/__init__.py | bglar/commcare-hq | 972129fc26864c08c7bef07874bd2a7218550bff | [
"BSD-3-Clause"
] | null | null | null | from custom.world_vision.reports.child_report import ChildTTCReport
from custom.world_vision.reports.mixed_report import MixedTTCReport
from custom.world_vision.reports.mother_report import MotherTTCReport
from collections import OrderedDict
DEFAULT_REPORT_CLASS = MixedTTCReport
WORLD_VISION_DOMAINS = ('wvindia2', )
... | 53.118812 | 112 | 0.67055 |
794ac918c0f31aced8b153bf76a35063d319b331 | 2,448 | py | Python | maro/rl/models/torch/mlp_representation.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/rl/models/torch/mlp_representation.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/rl/models/torch/mlp_representation.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import torch
import torch.nn as nn
class MLPRepresentation(nn.Module):
"""
Deep Q network.
Choose multi-layer full connection with dropout as the basic network architecture.
"""
def __init__(self, name: str, input_dim: ... | 33.534247 | 105 | 0.602124 |
794ac919c3ec01a8602699480bddb8e6e313c533 | 5,482 | py | Python | model/cpn/ade.cpn.R50_v1c.v37/train.py | akinoriosamura/TorchSeg-mirror | 34033fe85fc24015bcef7a92aad39d2a25a001a5 | [
"MIT"
] | null | null | null | model/cpn/ade.cpn.R50_v1c.v37/train.py | akinoriosamura/TorchSeg-mirror | 34033fe85fc24015bcef7a92aad39d2a25a001a5 | [
"MIT"
] | 1 | 2021-06-08T20:36:43.000Z | 2021-06-08T20:36:43.000Z | model/cpn/ade.cpn.R50_v1c.v37/train.py | akinoriosamura/TorchSeg-mirror | 34033fe85fc24015bcef7a92aad39d2a25a001a5 | [
"MIT"
] | null | null | null | from __future__ import division
import os.path as osp
import sys
import argparse
from tqdm import tqdm
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.distributed as dist
import torch.backends.cudnn as cudnn
from config import config
from dataloader import get_train_loader
from network... | 35.597403 | 82 | 0.609814 |
794ac9b5d77445bad9f987d710f17899a6976849 | 28,804 | py | Python | patches/mario.py | unhold/game-and-watch-patch | dc33f2228d7c791a746502aef27a5331c0076503 | [
"BSD-3-Clause"
] | 48 | 2021-08-19T19:34:51.000Z | 2022-03-29T02:02:35.000Z | patches/mario.py | unhold/game-and-watch-patch | dc33f2228d7c791a746502aef27a5331c0076503 | [
"BSD-3-Clause"
] | 5 | 2021-09-04T12:15:46.000Z | 2022-01-21T07:47:06.000Z | patches/mario.py | unhold/game-and-watch-patch | dc33f2228d7c791a746502aef27a5331c0076503 | [
"BSD-3-Clause"
] | 11 | 2021-10-15T23:36:08.000Z | 2022-03-05T12:38:23.000Z | from pathlib import Path
from PIL import Image
import patches
from .compression import lzma_compress
from .exception import BadImageError, InvalidStockRomError
from .firmware import Device, ExtFirmware, Firmware, IntFirmware
from .tileset import bytes_to_tilemap, decode_backdrop, tilemap_to_bytes
from .utils import ... | 39.242507 | 111 | 0.594119 |
794ac9f59a5ba7fdc2e4ed869476ced19ffbaf50 | 338 | py | Python | import.py | muhdzakirahmat/unit6proj | 5c1e260a2b5146f5e2a33e4e140404df74a80030 | [
"Apache-2.0"
] | null | null | null | import.py | muhdzakirahmat/unit6proj | 5c1e260a2b5146f5e2a33e4e140404df74a80030 | [
"Apache-2.0"
] | null | null | null | import.py | muhdzakirahmat/unit6proj | 5c1e260a2b5146f5e2a33e4e140404df74a80030 | [
"Apache-2.0"
] | null | null | null | """
python import.py export.zip challenges,teams,both,metadata
"""
from Unit6 import create_app
from Unit6.utils import import_ctf
import sys
app = create_app()
with app.app_context():
if len(sys.argv) == 3:
segments = sys.argv[2].split(',')
else:
segments = None
import_ctf(sys.argv[1], s... | 19.882353 | 58 | 0.677515 |
794aca4f26a8139ea16fbc6032d37ac6f93deced | 9,117 | py | Python | lib/datasets/imdb.py | alkymi-io/faster-rcnn.pytorch | 2613b8d643d90ae16f9593a357ab4ba0de7f82a6 | [
"MIT"
] | 6 | 2018-11-28T08:09:40.000Z | 2020-12-06T10:07:29.000Z | lib/datasets/imdb.py | alkymi-io/faster-rcnn.pytorch | 2613b8d643d90ae16f9593a357ab4ba0de7f82a6 | [
"MIT"
] | 1 | 2020-09-24T19:21:24.000Z | 2020-09-24T19:21:24.000Z | lib/datasets/imdb.py | alkymi-io/faster-rcnn.pytorch | 2613b8d643d90ae16f9593a357ab4ba0de7f82a6 | [
"MIT"
] | 1 | 2019-05-22T01:33:36.000Z | 2019-05-22T01:33:36.000Z | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick and Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ i... | 34.274436 | 74 | 0.595591 |
794acb039946667442f68855501e53ee0b4b9987 | 46,094 | py | Python | plenum/test/helper.py | cam-parra/indy-plenum | a891defac546488c6ec2f4a12d23894742d1427f | [
"Apache-2.0"
] | null | null | null | plenum/test/helper.py | cam-parra/indy-plenum | a891defac546488c6ec2f4a12d23894742d1427f | [
"Apache-2.0"
] | null | null | null | plenum/test/helper.py | cam-parra/indy-plenum | a891defac546488c6ec2f4a12d23894742d1427f | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
import itertools
import os
import random
import string
from _signal import SIGINT
from contextlib import contextmanager
from functools import partial
from itertools import permutations, combinations
from shutil import copyfile
from sys import executable
from time import sleep
from typing i... | 35.484219 | 120 | 0.657374 |
794acb0d5f6018dbf7359cd8cf1afecb132a88a6 | 8,025 | py | Python | lxmls/sequences/bak/forward_backward.py | SimonSuster/lxmls-toolkit | 6a57884f8b7c98da816a60eb88593e0a1585d434 | [
"MIT"
] | 1 | 2015-09-20T05:16:38.000Z | 2015-09-20T05:16:38.000Z | lxmls/sequences/bak/forward_backward.py | daviddao/LxMLS-labs-solution | 78413c1ee61752ca33988c454e3b2c27326e7063 | [
"MIT"
] | null | null | null | lxmls/sequences/bak/forward_backward.py | daviddao/LxMLS-labs-solution | 78413c1ee61752ca33988c454e3b2c27326e7063 | [
"MIT"
] | null | null | null | import numpy as np
######
# Computes the forward backward trellis for a given sequence.
# N - Length of sequence
# H - Number of hidden states
# Receives:
# Node potentials (N,H) vector
# Edge potentials (N-1,H,H)
#
# Emission probabilities: (length, num_states) array
# Initial probabilities: (num_states) array
# Tran... | 38.214286 | 105 | 0.62866 |
794acc9e2d5260575008284823c3db2dec34914a | 5,404 | py | Python | tmp.py | pandezhao/Paperwork | 7a8a82eb2d85949c467b15ea634806269b0f902c | [
"MIT"
] | null | null | null | tmp.py | pandezhao/Paperwork | 7a8a82eb2d85949c467b15ea634806269b0f902c | [
"MIT"
] | null | null | null | tmp.py | pandezhao/Paperwork | 7a8a82eb2d85949c467b15ea634806269b0f902c | [
"MIT"
] | null | null | null | import torch
from torchvision import datasets, transforms
from torch import nn, optim
from torch.nn import init, functional
from torch.nn.utils import clip_grad_norm
from torch.autograd import Variable
from torch.utils.data import DataLoader
import matplotlib.pyplot as plt
from norm import show_data
import torch.nn.fun... | 37.79021 | 129 | 0.599556 |
794accbe8738a4937be52abd3771a290cff29729 | 2,165 | py | Python | VGG-19/vgg-19/tensornet/layers/linear.py | zfgao66/deeplearning-mpo-tensorflow | c345b9fea79e16f98f9b50e0b4e0bcaf4ed4c8e6 | [
"MIT"
] | 24 | 2019-04-30T14:59:43.000Z | 2021-11-16T03:47:38.000Z | VGG-19/vgg-19/tensornet/layers/linear.py | HC1022/deeplearning-mpo | c345b9fea79e16f98f9b50e0b4e0bcaf4ed4c8e6 | [
"MIT"
] | null | null | null | VGG-19/vgg-19/tensornet/layers/linear.py | HC1022/deeplearning-mpo | c345b9fea79e16f98f9b50e0b4e0bcaf4ed4c8e6 | [
"MIT"
] | 9 | 2019-08-14T10:50:37.000Z | 2022-03-15T14:41:52.000Z | import tensorflow as tf
from .auxx import get_var_wrap
def linear(inp,
out_size,
weights_initializer=tf.contrib.layers.xavier_initializer(uniform=False),
weights_regularizer=None,
biases_initializer=tf.zeros_initializer,
biases_regularizer=None,
trainab... | 42.45098 | 94 | 0.53903 |
794acd0e6f327be540f49fbb4c25674a0a16c051 | 3,441 | py | Python | experiments/vgg16/VGG16_qDCA.py | petrapoklukar/DCA | e5b3f3481433306a4b33e712272f8bbf5e9d05ce | [
"MIT"
] | 2 | 2022-02-14T15:54:22.000Z | 2022-02-15T18:43:36.000Z | experiments/vgg16/VGG16_qDCA.py | petrapoklukar/DCA | e5b3f3481433306a4b33e712272f8bbf5e9d05ce | [
"MIT"
] | null | null | null | experiments/vgg16/VGG16_qDCA.py | petrapoklukar/DCA | e5b3f3481433306a4b33e712272f8bbf5e9d05ce | [
"MIT"
] | null | null | null | import os
import pickle
from dca.DCA import DCA
from dca.schemes import (
DCALoggers,
DelaunayGraphParams,
ExperimentDirs,
GeomCAParams,
HDBSCANParams,
QueryData,
REData,
)
import typer
from VGG16_utils import _analyze_query_point_assignment
app = typer.Typer()
@app.command()
def vgg16_qD... | 28.675 | 89 | 0.637315 |
794acd1a438c20fa8cd3bdda0d24a850066f9baf | 206 | py | Python | file_FindString.py | karus4226/ulti_code | 55c10ca4bd4210c7d784efcb6276d288f253bb40 | [
"MIT"
] | null | null | null | file_FindString.py | karus4226/ulti_code | 55c10ca4bd4210c7d784efcb6276d288f253bb40 | [
"MIT"
] | null | null | null | file_FindString.py | karus4226/ulti_code | 55c10ca4bd4210c7d784efcb6276d288f253bb40 | [
"MIT"
] | null | null | null | import mmap
def ListFile(input_str, input_file):
with open(input_file) as f:
s = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
if s.find(input_str) != -1:
print('true')
| 25.75 | 61 | 0.606796 |
794acf35b66827ee323d19ae7acdda01babc7973 | 64,941 | py | Python | nova/tests/unit/objects/test_request_spec.py | nfvri/nova | 2ce5a440c44eb512f07adacd313304e226bb56a0 | [
"Apache-2.0"
] | 1 | 2021-12-27T00:47:30.000Z | 2021-12-27T00:47:30.000Z | nova/tests/unit/objects/test_request_spec.py | nfvri/nova | 2ce5a440c44eb512f07adacd313304e226bb56a0 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/objects/test_request_spec.py | nfvri/nova | 2ce5a440c44eb512f07adacd313304e226bb56a0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 41.870406 | 79 | 0.601962 |
794acf808a7856e2c4b9f9889650b521c10f2b89 | 28,233 | py | Python | torch/testing/_internal/jit_utils.py | vulcantron/pytorch | bbbf00a8a83879e687fb7e96e31a619388b6b54e | [
"Intel"
] | null | null | null | torch/testing/_internal/jit_utils.py | vulcantron/pytorch | bbbf00a8a83879e687fb7e96e31a619388b6b54e | [
"Intel"
] | null | null | null | torch/testing/_internal/jit_utils.py | vulcantron/pytorch | bbbf00a8a83879e687fb7e96e31a619388b6b54e | [
"Intel"
] | null | null | null | # Torch
from torch.autograd import Variable
from torch.autograd.function import _nested_map
from torch.jit.annotations import BroadcastingList2, BroadcastingList3 # noqa: F401
from torch.onnx import OperatorExportTypes
import torch
import torch.cuda
import torch.jit
import torch.jit._logging
import torch.jit.frontend... | 38.675342 | 124 | 0.609145 |
794acfb4facf81e0d36a23bcb12e938b97d763c8 | 3,285 | py | Python | nodemcu/usocketio/client.py | adrianalin/bme680_nodemcu_socketio | 1d2264b593bf70c5248c3db8fbbaa34d8f15f50e | [
"MIT"
] | 1 | 2021-06-16T21:38:13.000Z | 2021-06-16T21:38:13.000Z | nodemcu/usocketio/client.py | juergs/bme680_nodemcu_socketio | 1d2264b593bf70c5248c3db8fbbaa34d8f15f50e | [
"MIT"
] | null | null | null | nodemcu/usocketio/client.py | juergs/bme680_nodemcu_socketio | 1d2264b593bf70c5248c3db8fbbaa34d8f15f50e | [
"MIT"
] | 2 | 2019-09-08T08:35:58.000Z | 2022-03-29T07:22:06.000Z | """
Micropython Socket.IO client.
"""
import ure as re
import ujson as json
import usocket as socket
from ucollections import namedtuple
from .protocol import *
from .transport import SocketIO
URL_RE = re.compile(r'http://([A-Za-z0-9\-\.]+)(?:\:([0-9]+))?(/.+)?')
URI = namedtuple('URI', ('hostname', 'port', 'path... | 26.071429 | 74 | 0.606697 |
794acfbb01d70027e24fcc220ee04f9d32d4c84b | 1,638 | py | Python | symphony/cli/pyinventory/graphql/users_query.py | marosmars/magma | 51177a6ad7e66216184693a7b3d1dc58f901cd0e | [
"BSD-3-Clause"
] | 2 | 2020-11-05T18:58:26.000Z | 2021-02-09T06:42:49.000Z | symphony/cli/pyinventory/graphql/users_query.py | marosmars/magma | 51177a6ad7e66216184693a7b3d1dc58f901cd0e | [
"BSD-3-Clause"
] | 2 | 2021-03-31T19:41:55.000Z | 2021-12-13T20:39:15.000Z | symphony/cli/pyinventory/graphql/users_query.py | marosmars/magma | 51177a6ad7e66216184693a7b3d1dc58f901cd0e | [
"BSD-3-Clause"
] | 1 | 2021-04-16T02:19:25.000Z | 2021-04-16T02:19:25.000Z | #!/usr/bin/env python3
# @generated AUTOGENERATED file. Do not Change!
from dataclasses import dataclass
from datetime import datetime
from gql.gql.datetime_utils import DATETIME_FIELD
from gql.gql.graphql_client import GraphqlClient
from functools import partial
from numbers import Number
from typing import Any, Call... | 24.447761 | 77 | 0.637973 |
794ad26db5e0be67bb9b35936c8558a8df02c219 | 4,752 | py | Python | sandbox/optimal_args_hashbits.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | sandbox/optimal_args_hashbits.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | sandbox/optimal_args_hashbits.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | #! /usr/bin/env python
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) 2015, Michigan State University.
# Copyright (C) 2015, The Regents of the University of California.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided... | 37.417323 | 79 | 0.700547 |
794ad46945130273d4a03ed2144fbd3d9d8d6cac | 355 | py | Python | app/src/resources/remove_files.py | gerardovitale/covid-project | b4e28e8ee095070f2a2433f61725fd8c0374365e | [
"MIT"
] | null | null | null | app/src/resources/remove_files.py | gerardovitale/covid-project | b4e28e8ee095070f2a2433f61725fd8c0374365e | [
"MIT"
] | null | null | null | app/src/resources/remove_files.py | gerardovitale/covid-project | b4e28e8ee095070f2a2433f61725fd8c0374365e | [
"MIT"
] | null | null | null | import os
from shutil import rmtree
from typing import List
def remove_files(files: List[str]) -> None:
for file in files:
if os.path.isfile(file):
os.remove(file)
print(f'[INFO] {file} has been removed')
elif os.path.isdir(file):
rmtree(file)
print(... | 25.357143 | 52 | 0.591549 |
794ad46e1921906f5f20516f312868538270e0f5 | 2,525 | py | Python | heppy/Response.py | bladeroot/heppy | b597916ff80890ca057b17cdd156e90bbbd9a87a | [
"BSD-3-Clause"
] | null | null | null | heppy/Response.py | bladeroot/heppy | b597916ff80890ca057b17cdd156e90bbbd9a87a | [
"BSD-3-Clause"
] | null | null | null | heppy/Response.py | bladeroot/heppy | b597916ff80890ca057b17cdd156e90bbbd9a87a | [
"BSD-3-Clause"
] | null | null | null | import xml.etree.ElementTree as ET
from Doc import Doc
class Response(Doc):
def __init__(self, root):
self.data = {}
self.root = root
self.parse(self.root[0])
def find(self, tag, name):
return tag.find(name, namespaces=self.nsmap)
def findall(self, tag, name):
ret... | 29.360465 | 86 | 0.556436 |
794ad4a65ab33a25f44fbb339c7380a6d133a15f | 461 | py | Python | pythonnest/tests/__init__.py | d9pouces/PythonNest | 53ad0c53f5c1b411a2af630099869e55a3549d22 | [
"CECILL-B"
] | 1 | 2017-05-01T20:00:14.000Z | 2017-05-01T20:00:14.000Z | pythonnest/tests/__init__.py | d9pouces/PythonNest | 53ad0c53f5c1b411a2af630099869e55a3549d22 | [
"CECILL-B"
] | null | null | null | pythonnest/tests/__init__.py | d9pouces/PythonNest | 53ad0c53f5c1b411a2af630099869e55a3549d22 | [
"CECILL-B"
] | 2 | 2015-07-30T18:14:50.000Z | 2019-11-02T10:06:59.000Z | """
Package gathering all unitary tests for pythonnest.
Module names must start with `test_` to be taken into account.
You should consider to install :mod:`Distribute` to run all tests with::
$ python setup.py test
"""
import unittest
__author__ = 'Matthieu Gallet'
# __copyright__ = "Copyright 2013, 19pouces.net... | 25.611111 | 72 | 0.73102 |
794ad50f5cb8e2917881acdf35f43b5e911cec4d | 224 | py | Python | sw/2.0/ostur_frontend/src/profile-flask.py | alvarop/ostur | 6e56a3f53ac3ca09c12586cd35d0b829dd3d6e78 | [
"MIT"
] | 7 | 2017-11-30T20:22:02.000Z | 2021-01-03T02:22:52.000Z | sw/2.0/ostur_frontend/src/profile-flask.py | alvarop/ostur | 6e56a3f53ac3ca09c12586cd35d0b829dd3d6e78 | [
"MIT"
] | null | null | null | sw/2.0/ostur_frontend/src/profile-flask.py | alvarop/ostur | 6e56a3f53ac3ca09c12586cd35d0b829dd3d6e78 | [
"MIT"
] | 1 | 2018-02-26T02:53:14.000Z | 2018-02-26T02:53:14.000Z | #!flask/bin/python
from werkzeug.contrib.profiler import ProfilerMiddleware
from ostur_frontend import app
app.config["PROFILE"] = True
app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30])
app.run(debug=True)
| 28 | 66 | 0.808036 |
794ad53a08efe2d55a8b2cb4c1848400a2c212dc | 6,126 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/program_enrollments/management/commands/tests/test_migrate_saml_uids.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Tests for the migrate_saml_uids management command.
"""
from unittest.mock import mock_open, patch
from django.core.management import call_command
from django.test import TestCase
from social_django.models import UserSocialAuth
from common.djangoapps.student.tests.factories import UserFactory
from lms.djangoapps.... | 35.410405 | 113 | 0.635162 |
794ad6a233ff93f8c755e160c3aaf3ff416cd4e1 | 39,853 | py | Python | examples/benchmark/utils/bert_modeling.py | Ezra-H/autodist | b5ab28d0d867c22742daa3c1d324fe20c1852bd7 | [
"Apache-2.0"
] | 127 | 2020-07-16T16:33:10.000Z | 2022-03-25T09:58:50.000Z | examples/benchmark/utils/bert_modeling.py | Ezra-H/autodist | b5ab28d0d867c22742daa3c1d324fe20c1852bd7 | [
"Apache-2.0"
] | 17 | 2020-07-16T20:03:44.000Z | 2021-02-24T19:53:12.000Z | examples/benchmark/utils/bert_modeling.py | Ezra-H/autodist | b5ab28d0d867c22742daa3c1d324fe20c1852bd7 | [
"Apache-2.0"
] | 26 | 2020-07-21T01:23:55.000Z | 2022-02-24T03:43:08.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... | 41.341286 | 95 | 0.63935 |
794ad7811fc6d0e26a30cf119ba413cf8840674c | 23,057 | py | Python | python_scripts/02_basic_preprocessing.py | lucyleeow/euroscipy-2019-scikit-learn-tutorial | 81ec6483c5529af4655bf64ba0513f3f28cf565e | [
"CC0-1.0"
] | 27 | 2019-07-24T15:14:23.000Z | 2021-12-02T10:13:47.000Z | python_scripts/02_basic_preprocessing.py | lucyleeow/euroscipy-2019-scikit-learn-tutorial | 81ec6483c5529af4655bf64ba0513f3f28cf565e | [
"CC0-1.0"
] | 6 | 2019-08-07T13:07:10.000Z | 2019-11-27T14:57:57.000Z | python_scripts/02_basic_preprocessing.py | lucyleeow/euroscipy-2019-scikit-learn-tutorial | 81ec6483c5529af4655bf64ba0513f3f28cf565e | [
"CC0-1.0"
] | 16 | 2019-07-24T09:13:08.000Z | 2021-11-04T19:24:42.000Z | # -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# formats: notebooks//ipynb,python_scripts//py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.2'
# jupytext_version: 1.2.2
# kernelspec:
# display_name: Python 3
# language: pyth... | 33.127874 | 181 | 0.742421 |
794ad91e6b4b902022a35fa59f5d0d92a0decdfd | 802 | py | Python | python/batch-compute-with-step-functions/workshop/stack/cicdpipeline_stack.py | hy714335634/aws-cdk-examples | c66198642985e68e0541a4777d2a8e9acd222b7d | [
"Apache-2.0"
] | null | null | null | python/batch-compute-with-step-functions/workshop/stack/cicdpipeline_stack.py | hy714335634/aws-cdk-examples | c66198642985e68e0541a4777d2a8e9acd222b7d | [
"Apache-2.0"
] | null | null | null | python/batch-compute-with-step-functions/workshop/stack/cicdpipeline_stack.py | hy714335634/aws-cdk-examples | c66198642985e68e0541a4777d2a8e9acd222b7d | [
"Apache-2.0"
] | null | null | null | from aws_cdk import (
core
)
from construct.cicdpipeline.cicd_batch import CICDBatch
from construct.cicdpipeline.cicd_web import CICDWeb
class CICDPipelineStack(core.Stack):
def __init__(self, scope: core.Construct, id: str,
UserName="default",
EmailAddress="default",
BatchRepo="defau... | 25.870968 | 55 | 0.5798 |
794ad95513d571a04f14ed62d1a3d09cc27d8657 | 1,813 | py | Python | python-the-hard-way/21-functions-can-return-something.py | Valka7a/python-playground | f08d4374f2cec2e8b1afec3753854b1ec10ff480 | [
"MIT"
] | null | null | null | python-the-hard-way/21-functions-can-return-something.py | Valka7a/python-playground | f08d4374f2cec2e8b1afec3753854b1ec10ff480 | [
"MIT"
] | null | null | null | python-the-hard-way/21-functions-can-return-something.py | Valka7a/python-playground | f08d4374f2cec2e8b1afec3753854b1ec10ff480 | [
"MIT"
] | null | null | null | # Exercise 21: Functions Can Return Something
def add(a, b):
print "ADDING %d + %d" % (a, b)
return a + b
def subtract(a, b):
print "SUBTRACTING %d - %d" % (a, b)
return a - b
def multiply(a, b):
print "MULTIPLYING %d * %d" % (a, b)
return a * b
def divide(a, b):
print "DIVIDING %d / %d" % (a, b)
return a /... | 31.807018 | 75 | 0.688913 |
794ad96dcb9388fb4d6e61885714b7abe06bf22d | 2,347 | py | Python | imageapp/models.py | Edwin-Karanu-Muiruri/django-gallery-karanu | 06f456189ce1a3a164df1d6ce0971b684159ccfb | [
"MIT"
] | null | null | null | imageapp/models.py | Edwin-Karanu-Muiruri/django-gallery-karanu | 06f456189ce1a3a164df1d6ce0971b684159ccfb | [
"MIT"
] | 8 | 2020-05-26T08:37:17.000Z | 2022-01-13T02:46:44.000Z | imageapp/models.py | Edwin-Karanu-Muiruri/django-gallery-karanu | 06f456189ce1a3a164df1d6ce0971b684159ccfb | [
"MIT"
] | null | null | null | from django.db import models
from cloudinary.models import CloudinaryField
# Create your models here.
class Category(models.Model):
name = models.CharField(max_length = 50)
def __str__(self):
return self.name
def save_category(self):
self.save()
def delete_category(self):
... | 27.940476 | 102 | 0.659139 |
794ad97eb8176cc86f403a372f2d42b4b097b84b | 1,021 | py | Python | molecool/tests/test_measure.py | ywang40/molecool | 4ec6af6d894c3152b1cd9d616e44521b3c6a5a46 | [
"BSD-3-Clause"
] | null | null | null | molecool/tests/test_measure.py | ywang40/molecool | 4ec6af6d894c3152b1cd9d616e44521b3c6a5a46 | [
"BSD-3-Clause"
] | 1 | 2020-12-18T19:24:59.000Z | 2020-12-18T19:24:59.000Z | molecool/tests/test_measure.py | ywang40/molecool | 4ec6af6d894c3152b1cd9d616e44521b3c6a5a46 | [
"BSD-3-Clause"
] | null | null | null | """
Tests for the measure module.
"""
import molecool
import numpy as np
import pytest
def test_calculate_distance():
r1 = np.array([0, 0, 0])
r2 = np.array([0, 1, 0])
expected_distance = 1
calculated_diatance = molecool.calculate_distance(r1, r2)
assert expected_distance == calculated_diatanc... | 24.902439 | 94 | 0.644466 |
794ada23c90178a7c63699908b299622fc11437c | 8,977 | py | Python | libqtile/dgroups.py | luanfagu/pyBox | a91308a4131dbe244555521f3dd248ff53d20588 | [
"MIT"
] | null | null | null | libqtile/dgroups.py | luanfagu/pyBox | a91308a4131dbe244555521f3dd248ff53d20588 | [
"MIT"
] | null | null | null | libqtile/dgroups.py | luanfagu/pyBox | a91308a4131dbe244555521f3dd248ff53d20588 | [
"MIT"
] | null | null | null | # Copyright (c) 2011-2012 Florian Mounier
# Copyright (c) 2012-2014 roger
# Copyright (c) 2012 Craig Barnes
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2014 ramnes
# Copyright (c) 2014 Sebastian Kricner
# Copyright (c) 2014 Sean Vig
#
# Permission is hereby granted, free of... | 34.929961 | 90 | 0.574134 |
794adae09b3013480d9b5a52fdd962a0bc51d495 | 4,982 | py | Python | TimeSformer/timesformer/utils/c2_model_loading.py | balaganeshmohan/Emotion-recognition | ad4816226598155c273d99fa4a4ca80953adcaa1 | [
"MIT"
] | null | null | null | TimeSformer/timesformer/utils/c2_model_loading.py | balaganeshmohan/Emotion-recognition | ad4816226598155c273d99fa4a4ca80953adcaa1 | [
"MIT"
] | null | null | null | TimeSformer/timesformer/utils/c2_model_loading.py | balaganeshmohan/Emotion-recognition | ad4816226598155c273d99fa4a4ca80953adcaa1 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
"""Caffe2 to PyTorch checkpoint name converting utility."""
import re
def get_name_convert_func():
"""
Get the function to convert Caffe2 layer names to PyTorch layer names.
Returns:
(func): function to convert parameter nam... | 41.516667 | 80 | 0.483541 |
794adae9d3325381cb36e9c7ba403c9ad78226a0 | 4,017 | py | Python | venv/Lib/site-packages/ldap3/extend/microsoft/dirSync.py | pileofscraps/wordcloud_backend | 2b2feff5e58de2bbdb0393d78d703f21ee1cf3ba | [
"MIT"
] | 4 | 2021-01-31T20:30:40.000Z | 2022-02-19T08:56:28.000Z | venv/Lib/site-packages/ldap3/extend/microsoft/dirSync.py | pileofscraps/wordcloud_backend | 2b2feff5e58de2bbdb0393d78d703f21ee1cf3ba | [
"MIT"
] | null | null | null | venv/Lib/site-packages/ldap3/extend/microsoft/dirSync.py | pileofscraps/wordcloud_backend | 2b2feff5e58de2bbdb0393d78d703f21ee1cf3ba | [
"MIT"
] | 6 | 2021-08-24T19:28:52.000Z | 2022-02-20T18:21:34.000Z | """
"""
# Created on 2015.10.21
#
# Author: Giovanni Cannata
#
# Copyright 2015 - 2018 Giovanni Cannata
#
# This file is part of ldap3.
#
# ldap3 is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either ... | 43.663043 | 122 | 0.564849 |
794adbf916a38d41b39eefd1c1009715f429f0a1 | 3,522 | py | Python | saleor/graphql/checkout/tests/deprecated/test_checkout_line_delete.py | SlashKing/saleor | bdd78044d542ef5650af7f5c0fd177001661c5b2 | [
"CC-BY-4.0"
] | 1 | 2022-02-21T07:17:08.000Z | 2022-02-21T07:17:08.000Z | saleor/graphql/checkout/tests/deprecated/test_checkout_line_delete.py | SlashKing/saleor | bdd78044d542ef5650af7f5c0fd177001661c5b2 | [
"CC-BY-4.0"
] | 81 | 2021-10-11T04:26:07.000Z | 2022-03-28T04:46:43.000Z | saleor/graphql/checkout/tests/deprecated/test_checkout_line_delete.py | SlashKing/saleor | bdd78044d542ef5650af7f5c0fd177001661c5b2 | [
"CC-BY-4.0"
] | 1 | 2022-02-16T22:00:59.000Z | 2022-02-16T22:00:59.000Z | from unittest import mock
import graphene
from .....checkout.error_codes import CheckoutErrorCode
from .....checkout.fetch import fetch_checkout_info, fetch_checkout_lines
from .....checkout.utils import calculate_checkout_quantity
from .....plugins.manager import get_plugins_manager
from ....tests.utils import get_g... | 34.871287 | 87 | 0.703861 |
794adc05261b372410d8a043aa6918e595e6bfe2 | 631 | py | Python | setup.py | frcl/gitdir | 65d85ca01adf506374a75a6b56d7b985c0d7bd0b | [
"MIT"
] | null | null | null | setup.py | frcl/gitdir | 65d85ca01adf506374a75a6b56d7b985c0d7bd0b | [
"MIT"
] | null | null | null | setup.py | frcl/gitdir | 65d85ca01adf506374a75a6b56d7b985c0d7bd0b | [
"MIT"
] | 1 | 2021-04-03T13:41:58.000Z | 2021-04-03T13:41:58.000Z | import setuptools
with open('README.md', 'r') as fh:
long_description = fh.read()
setuptools.setup(
name='gitdir',
version='1.2.4',
author='Siddharth Dushantha',
author_email='siddharth.dushantha@gmail.com',
description='Download a single directory/folder from a GitHub repo',
long_descript... | 27.434783 | 72 | 0.671949 |
794adc5e5f593aae0f60d1cb70d8bff5a5df7877 | 3,092 | py | Python | pontoon/base/urls.py | rhencke/pontoon | d530830acd4e03f3e29cae3273a5fede9f246499 | [
"BSD-3-Clause"
] | null | null | null | pontoon/base/urls.py | rhencke/pontoon | d530830acd4e03f3e29cae3273a5fede9f246499 | [
"BSD-3-Clause"
] | null | null | null | pontoon/base/urls.py | rhencke/pontoon | d530830acd4e03f3e29cae3273a5fede9f246499 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from django.views.generic import RedirectView, TemplateView
import views
urlpatterns = [
# Home
url(r'^$', views.home, name='pontoon.home'),
# Terms
url(r'^terms/$',
TemplateView.as_view(template_name='terms.html'),
name='pontoon.terms'),
# TRANSL... | 36.376471 | 98 | 0.611902 |
794adc63730a7a9f443e4fd343d4d02a17fe901b | 1,159 | py | Python | examples/cutensor/elementwise_binary.py | Dahlia-Chehata/cupy | 1005f55075f89aa17e60074aaa6494ff8d033251 | [
"MIT"
] | null | null | null | examples/cutensor/elementwise_binary.py | Dahlia-Chehata/cupy | 1005f55075f89aa17e60074aaa6494ff8d033251 | [
"MIT"
] | null | null | null | examples/cutensor/elementwise_binary.py | Dahlia-Chehata/cupy | 1005f55075f89aa17e60074aaa6494ff8d033251 | [
"MIT"
] | null | null | null | #
# D_{x,y,z} = alpha * A_{z,y,x} + gamma * C_{x,y,z}
#
import numpy
import cupy
from cupy import cutensor
import cupyx.time
dtype = numpy.float32
mode_a = ('z', 'y', 'x')
mode_c = ('x', 'y', 'z')
extent = {'x': 400, 'y': 200, 'z': 300}
a = cupy.random.random([extent[i] for i in mode_a])
c = cupy.random.random([ex... | 24.659574 | 58 | 0.679034 |
794adcfb959d52f6b697bbd2b7040e3254c6436c | 820 | py | Python | shop/shop_backend/api/migrations/0010_profile.py | CSchool/lksh-web-services | 2558bd7a07f8cb501634e5eb1f37345a38d34f2e | [
"Apache-2.0"
] | null | null | null | shop/shop_backend/api/migrations/0010_profile.py | CSchool/lksh-web-services | 2558bd7a07f8cb501634e5eb1f37345a38d34f2e | [
"Apache-2.0"
] | null | null | null | shop/shop_backend/api/migrations/0010_profile.py | CSchool/lksh-web-services | 2558bd7a07f8cb501634e5eb1f37345a38d34f2e | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.6 on 2021-08-05 10:26
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('api', '0009_auto_2021080... | 32.8 | 149 | 0.65122 |
794addabf568faf10fc1c581e5bfbf36d9e7fc3c | 23,857 | py | Python | adbForTest/Utils/adbUtils.py | LiuTianen/PackManage | 4b067954cc223baa14569a6f1517954b9cdb968f | [
"MIT"
] | null | null | null | adbForTest/Utils/adbUtils.py | LiuTianen/PackManage | 4b067954cc223baa14569a6f1517954b9cdb968f | [
"MIT"
] | null | null | null | adbForTest/Utils/adbUtils.py | LiuTianen/PackManage | 4b067954cc223baa14569a6f1517954b9cdb968f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
import os
import platform
import re
import time
import subprocess
class AdbTools(object):
def __init__(self, device_id=''):
self.__system = platform.system()
self.__find = ''
self.__command = ''
self.__device_id = device_id
self.__get_f... | 29.636025 | 119 | 0.499476 |
794addb6a7b397814132af4b6a926938a9a2864e | 10,349 | py | Python | configs/common/Options.py | dspencer001/usu_gem5 | ff3150a999cb141908e134304811714cfc2500e4 | [
"BSD-3-Clause"
] | null | null | null | configs/common/Options.py | dspencer001/usu_gem5 | ff3150a999cb141908e134304811714cfc2500e4 | [
"BSD-3-Clause"
] | null | null | null | configs/common/Options.py | dspencer001/usu_gem5 | ff3150a999cb141908e134304811714cfc2500e4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2006-2008 The Regents of The University of Michigan
# All rights reserved.
#
# 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
# notice, this ... | 55.047872 | 85 | 0.638516 |
794ade2213d5045c673eb601fdac23fd2e6a8d14 | 300 | py | Python | tests/asserts/attribute.py | FilippoBoido/py2puml | 9f25ca7ea0bcb2f9e7b25751bcda680a0e8f7d90 | [
"MIT"
] | 59 | 2020-06-04T11:32:10.000Z | 2022-03-22T18:37:28.000Z | tests/asserts/attribute.py | mayshukla/py2puml | 9f25ca7ea0bcb2f9e7b25751bcda680a0e8f7d90 | [
"MIT"
] | 21 | 2020-05-14T14:31:23.000Z | 2022-03-25T02:44:05.000Z | tests/asserts/attribute.py | mayshukla/py2puml | 9f25ca7ea0bcb2f9e7b25751bcda680a0e8f7d90 | [
"MIT"
] | 11 | 2021-01-07T04:11:47.000Z | 2022-03-01T21:32:32.000Z |
from py2puml.domain.umlclass import UmlAttribute
def assert_attribute(attribute: UmlAttribute, expected_name: str, expected_type: str, expected_staticity: bool):
assert attribute.name == expected_name
assert attribute.type == expected_type
assert attribute.static == expected_staticity
| 37.5 | 112 | 0.8 |
794adec29f9a6d57ea58fa35c13c4a673cd69d9c | 3,408 | py | Python | galsendev_demo/settings.py | PapiHack/galsendev-demo-docker | f3563fc7756dc14b88a3710d26f91937de94a2ea | [
"MIT"
] | 2 | 2021-06-27T19:35:26.000Z | 2021-07-03T13:19:28.000Z | galsendev_demo/settings.py | PapiHack/galsendev-demo-docker | f3563fc7756dc14b88a3710d26f91937de94a2ea | [
"MIT"
] | null | null | null | galsendev_demo/settings.py | PapiHack/galsendev-demo-docker | f3563fc7756dc14b88a3710d26f91937de94a2ea | [
"MIT"
] | null | null | null | """
Django settings for galsendev_demo project.
Generated by 'django-admin startproject' using Django 3.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from ... | 25.818182 | 91 | 0.692782 |
794adf08540e2d5096120f2a51c3122fa639a650 | 492 | py | Python | plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name='sizesrc',
parent_name='mesh3d.hoverlabel.font',
**kwargs
):
super(SizesrcValidator, self).__init__(
plotly_name=plotly_na... | 25.894737 | 66 | 0.605691 |
794adf2f271a0eca3be9e230b094681670cdb629 | 3,891 | py | Python | software/glasgow/platform/ice40.py | emilazy/Glasgow | 4575ad07ccce76b0b92d29a76fc18a3700a68823 | [
"Apache-2.0",
"0BSD"
] | null | null | null | software/glasgow/platform/ice40.py | emilazy/Glasgow | 4575ad07ccce76b0b92d29a76fc18a3700a68823 | [
"Apache-2.0",
"0BSD"
] | null | null | null | software/glasgow/platform/ice40.py | emilazy/Glasgow | 4575ad07ccce76b0b92d29a76fc18a3700a68823 | [
"Apache-2.0",
"0BSD"
] | null | null | null | import asyncio
from nmigen import *
from nmigen.vendor.lattice_ice40 import *
from ..device.hardware import *
from ..gateware import GatewareBuildError
__all__ = ["GlasgowPlatformICE40"]
class GlasgowPlatformICE40(LatticeICE40Platform):
def toolchain_program(self, products, name):
bitstream = products.... | 35.697248 | 96 | 0.52917 |
794ae01501c75f2cf1e708dd9e72e109f8078f69 | 6,998 | py | Python | rev-sim-recommender-veto/VeTo.py | schatzopoulos/VeTo-workloads | 1475c4d1638b9897c9e52c9192d3a6723bb1bdc4 | [
"Apache-2.0"
] | null | null | null | rev-sim-recommender-veto/VeTo.py | schatzopoulos/VeTo-workloads | 1475c4d1638b9897c9e52c9192d3a6723bb1bdc4 | [
"Apache-2.0"
] | null | null | null | rev-sim-recommender-veto/VeTo.py | schatzopoulos/VeTo-workloads | 1475c4d1638b9897c9e52c9192d3a6723bb1bdc4 | [
"Apache-2.0"
] | null | null | null | import sys
import csv
import os
# Define CSV dialect to be used.
csv.register_dialect(
'exp_dialect',
delimiter = '\t'
)
class VeTo:
def score(self, coeff, method, rrf_k, topk_thr, lines_to_read, sim_score):
if method == 'borda':
return coeff * lines_to_read
elif method == 'r... | 48.262069 | 191 | 0.508574 |
794ae06e34a11f05cd8176aae3b10696070f3e89 | 187,839 | py | Python | locations/spiders/carrefour.py | cmecklenborg/alltheplaces | e62b59fb0071b6e289c4622d368fdb203a28347e | [
"MIT"
] | null | null | null | locations/spiders/carrefour.py | cmecklenborg/alltheplaces | e62b59fb0071b6e289c4622d368fdb203a28347e | [
"MIT"
] | null | null | null | locations/spiders/carrefour.py | cmecklenborg/alltheplaces | e62b59fb0071b6e289c4622d368fdb203a28347e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import re
CITIES = [
{
"zip": 3636,
"name": "POZO CERCADO (EL CHORRO (F), DPTO. RIVADAVIA (S))",
"state": "SALTA",
"lat": -23.4933,
"lon": -61.9267,
},
{
"zip": 4123,
"name": "LAS SALADAS",
"state": "SALTA... | 21.933559 | 94 | 0.379075 |
794ae2122656da6525de9364c5f00519abc36bf9 | 1,384 | py | Python | cogs/Twitch.py | loukayl/virtualv-Managmentbot | 246eb2057a1d9cd772a3115de40436bf1e46ffb6 | [
"Apache-2.0",
"MIT"
] | null | null | null | cogs/Twitch.py | loukayl/virtualv-Managmentbot | 246eb2057a1d9cd772a3115de40436bf1e46ffb6 | [
"Apache-2.0",
"MIT"
] | null | null | null | cogs/Twitch.py | loukayl/virtualv-Managmentbot | 246eb2057a1d9cd772a3115de40436bf1e46ffb6 | [
"Apache-2.0",
"MIT"
] | null | null | null | from TwitchApiPy import TwitchApiPy
from discord.ext import commands
import settings
from TwitchApiPy import TwitchApiPy
from discord.ext import commands
import settings
import discord
import os, sys, discord, platform, random, aiohttp, json
from discord.ext import commands
if not os.path.isfile("config.py"):
sys... | 30.755556 | 121 | 0.668353 |
794ae22d978bd846053688382be0abb5d4da53d7 | 66 | py | Python | libs/p3270/__init__.py | rocketbot-cl/Terminal_emulator | 34f2e50f23908fb645f93e58aa579f03ad8e02d9 | [
"MIT"
] | null | null | null | libs/p3270/__init__.py | rocketbot-cl/Terminal_emulator | 34f2e50f23908fb645f93e58aa579f03ad8e02d9 | [
"MIT"
] | null | null | null | libs/p3270/__init__.py | rocketbot-cl/Terminal_emulator | 34f2e50f23908fb645f93e58aa579f03ad8e02d9 | [
"MIT"
] | 2 | 2022-03-17T20:50:04.000Z | 2022-03-30T12:26:10.000Z | from p3270.p3270 import S3270, P3270Client, Config, StatusMessage
| 33 | 65 | 0.833333 |
794ae462681c2df26e0a30de9b67fc61d3a7c27c | 5,140 | py | Python | esmvalcore/_recipe_checks.py | Peter9192/ESMValCore | febd96a39480cc837afbf4e1f5b0ef61571af76a | [
"Apache-2.0"
] | null | null | null | esmvalcore/_recipe_checks.py | Peter9192/ESMValCore | febd96a39480cc837afbf4e1f5b0ef61571af76a | [
"Apache-2.0"
] | null | null | null | esmvalcore/_recipe_checks.py | Peter9192/ESMValCore | febd96a39480cc837afbf4e1f5b0ef61571af76a | [
"Apache-2.0"
] | null | null | null | """Module with functions to check a recipe."""
import logging
import os
import subprocess
import yamale
from ._data_finder import get_start_end_year
from ._task import get_flattened_tasks, which
from .preprocessor import PreprocessingTask
logger = logging.getLogger(__name__)
class RecipeError(Exception):
"""Re... | 36.453901 | 78 | 0.620039 |
794ae5f8c94523c844f42ca9005708562d7e11d5 | 124 | py | Python | run.py | DoubleDoorDevelopment/MultiStream | 2cf789d03c2206f56b0d861dd8f8c3943dc7e061 | [
"BSD-3-Clause"
] | null | null | null | run.py | DoubleDoorDevelopment/MultiStream | 2cf789d03c2206f56b0d861dd8f8c3943dc7e061 | [
"BSD-3-Clause"
] | null | null | null | run.py | DoubleDoorDevelopment/MultiStream | 2cf789d03c2206f56b0d861dd8f8c3943dc7e061 | [
"BSD-3-Clause"
] | null | null | null | # Run this file to start the app during development
from app import app
if __name__ == '__main__':
app.run(debug=True) | 20.666667 | 51 | 0.725806 |
794ae610beaa167c547d84e22f613f439c8c1948 | 57,776 | py | Python | sympy/core/basic.py | torsknod/sympy-torsknod | 19425c8d2d876710413987eaa6e69ff9d47a0380 | [
"BSD-3-Clause"
] | 1 | 2020-03-12T02:52:16.000Z | 2020-03-12T02:52:16.000Z | sympy/core/basic.py | torsknod/sympy-torsknod | 19425c8d2d876710413987eaa6e69ff9d47a0380 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/basic.py | torsknod/sympy-torsknod | 19425c8d2d876710413987eaa6e69ff9d47a0380 | [
"BSD-3-Clause"
] | null | null | null | """Base class for all the objects in SymPy"""
from __future__ import print_function, division
from sympy.core.assumptions import ManagedProperties
from sympy.core.cache import cacheit
from sympy.core.core import BasicType, C
from sympy.core.sympify import _sympify, sympify, SympifyError
from sympy.core.compatibility i... | 31.606127 | 94 | 0.526966 |
794ae66ce4d1e65b2a0a4063feaace439b5480eb | 6,445 | py | Python | config/train.py | prismformore/SDSEN | 815d1afcf8091eed4c3b35e8a3d56b28b7f3979d | [
"MIT"
] | 18 | 2019-09-16T10:27:45.000Z | 2021-02-22T13:52:03.000Z | config/train.py | prismformore/SDSEN | 815d1afcf8091eed4c3b35e8a3d56b28b7f3979d | [
"MIT"
] | null | null | null | config/train.py | prismformore/SDSEN | 815d1afcf8091eed4c3b35e8a3d56b28b7f3979d | [
"MIT"
] | 5 | 2019-09-16T14:04:56.000Z | 2022-03-22T12:59:01.000Z | import os
import sys
import cv2
import argparse
import numpy as np
import torch
from torch import nn
from torch.nn import MSELoss
from torch.optim import Adam
from torch.optim.lr_scheduler import MultiStepLR
from torch.autograd import Variable
from torch.utils.data import DataLoader
from tensorboardX import SummaryWri... | 31.593137 | 88 | 0.569123 |
794ae68b2348153a632fd1c7b30fc597877a3414 | 9,934 | py | Python | src/m7_loops_within_loops_graphics.py | wilsonta/20-Exam3Practice | 840c3bf0cf73c05db83c412f71771d05d5baafab | [
"MIT"
] | null | null | null | src/m7_loops_within_loops_graphics.py | wilsonta/20-Exam3Practice | 840c3bf0cf73c05db83c412f71771d05d5baafab | [
"MIT"
] | null | null | null | src/m7_loops_within_loops_graphics.py | wilsonta/20-Exam3Practice | 840c3bf0cf73c05db83c412f71771d05d5baafab | [
"MIT"
] | null | null | null | """
PRACTICE Exam 3.
This problem provides practice at:
*** LOOPS WITHIN LOOPS in 2D GRAPHICS problems. ***
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues,
and Tim Wilson.
""" # DONE: 1. PUT YOUR NAME IN THE ABOVE LIN... | 42.452991 | 120 | 0.54993 |
794ae6ee782c9df7ff718b035f612193ad85b487 | 7,438 | py | Python | tests/unit/ops/test_ops_schema.py | davidxia/NVTabular | 97b05ac74204d4e21fa31d522d0f84fb37cf94a9 | [
"Apache-2.0"
] | null | null | null | tests/unit/ops/test_ops_schema.py | davidxia/NVTabular | 97b05ac74204d4e21fa31d522d0f84fb37cf94a9 | [
"Apache-2.0"
] | null | null | null | tests/unit/ops/test_ops_schema.py | davidxia/NVTabular | 97b05ac74204d4e21fa31d522d0f84fb37cf94a9 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pytest
import nvtabular as nvt
from nvtabular import ColumnSchema, ColumnSelector, Schema, dispatch, ops
@pytest.mark.parametrize("properties", [{}, {"p1": "1"}])
@pytest.mark.parametrize("tags", [[], ["TAG1", "TAG2"]])
@pytest.mark.parametrize(
"op",
[
ops.Bucketize([1]),
... | 35.932367 | 93 | 0.642915 |
794ae76ed74e0e253b874598d9df1653ac0b7641 | 6,578 | py | Python | Wrapping/Generators/Python/Tests/extras.py | gift-surg/ITK_NiftyMIC | 26415ac2e6197de7b07ffcb0c3f740aa937ba7e9 | [
"Apache-2.0"
] | 3 | 2019-11-19T09:47:25.000Z | 2022-02-24T00:32:31.000Z | Wrapping/Generators/Python/Tests/extras.py | gift-surg/ITK_NiftyMIC | 26415ac2e6197de7b07ffcb0c3f740aa937ba7e9 | [
"Apache-2.0"
] | 1 | 2019-03-18T14:19:49.000Z | 2020-01-11T13:54:33.000Z | Wrapping/Generators/Python/Tests/extras.py | gift-surg/ITK_NiftyMIC | 26415ac2e6197de7b07ffcb0c3f740aa937ba7e9 | [
"Apache-2.0"
] | 1 | 2022-02-24T00:32:36.000Z | 2022-02-24T00:32:36.000Z | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | 28.23176 | 77 | 0.656887 |
794ae7d5f07e8d7af583cb71d8f547e92e1d5561 | 3,880 | py | Python | nipype/interfaces/fsl/tests/test_auto_FNIRT.py | dPys/nipype | 75030b29297808e7c9a9e91b411b685154dff60b | [
"Apache-2.0"
] | 1 | 2019-03-25T14:11:18.000Z | 2019-03-25T14:11:18.000Z | nipype/interfaces/fsl/tests/test_auto_FNIRT.py | dPys/nipype | 75030b29297808e7c9a9e91b411b685154dff60b | [
"Apache-2.0"
] | 1 | 2017-01-05T01:24:33.000Z | 2017-01-05T01:24:33.000Z | nipype/interfaces/fsl/tests/test_auto_FNIRT.py | wtriplett/nipype | 388f140fceaf55438a987e9cdfa2a8e995428afd | [
"Apache-2.0"
] | 1 | 2020-12-16T16:36:48.000Z | 2020-12-16T16:36:48.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..preprocess import FNIRT
def test_FNIRT_inputs():
input_map = dict(
affine_file=dict(argstr="--aff=%s", extensions=None,),
apply_inmask=dict(argstr="--applyinmask=%s", sep=",", xor=["skip_inmask"],),
apply_intensity_mapping=dict(
... | 47.317073 | 87 | 0.622938 |
794ae7dd093c1a9464ff107010330d1f8903aa13 | 15,924 | py | Python | main.py | SIRAJULHUDA/samples | 2aff7aa9b1e2a5250260b2459e0ab9084c7b3f94 | [
"MIT"
] | null | null | null | main.py | SIRAJULHUDA/samples | 2aff7aa9b1e2a5250260b2459e0ab9084c7b3f94 | [
"MIT"
] | null | null | null | main.py | SIRAJULHUDA/samples | 2aff7aa9b1e2a5250260b2459e0ab9084c7b3f94 | [
"MIT"
] | null | null | null | import sys, io, os
from PyQt4 import QtCore, QtGui, uic
from PyQt4.QtGui import QPainter, QColor, QFont
from os.path import expanduser
import subprocess as sp
import numpy
from PIL import Image, ImageDraw, ImageFont
from PIL.ImageQt import ImageQt
import atexit
from queue import Queue
from PyQt4.QtCore import QSettings... | 41.795276 | 136 | 0.716152 |
794ae9d47cd348e73a34ba5bd696f2b537a2718a | 26,037 | py | Python | hops/application_4_alignment.py | ExoWorldsSpies/hops | a33e434befe17318c064210a289b453c6f91b44f | [
"MIT"
] | 5 | 2020-02-22T13:51:47.000Z | 2021-12-10T20:24:11.000Z | hops/application_4_alignment.py | ExoWorldsSpies/hops | a33e434befe17318c064210a289b453c6f91b44f | [
"MIT"
] | 6 | 2020-02-24T16:29:11.000Z | 2021-11-27T22:57:19.000Z | hops/application_4_alignment.py | ExoWorldsSpies/hops | a33e434befe17318c064210a289b453c6f91b44f | [
"MIT"
] | 2 | 2020-04-04T17:33:05.000Z | 2021-03-04T20:10:23.000Z |
import os
import time
import numpy as np
import matplotlib.patches as mpatches
import hops.pylightcurve3 as plc
from astropy.io import fits as pf
from hops.application_windows import MainWindow
class AlignmentWindow(MainWindow):
def __init__(self, log):
MainWindow.__init__(self, log, name='HOPS - Alig... | 43.395 | 124 | 0.53616 |
794aeb145ac4f80ebe094c058e7ec3173c5a14a9 | 3,161 | py | Python | mdanalysis/runConfGen.py | otayfuroglu/mdutils | 481148316d9347c1136c22f581a3668da4192168 | [
"MIT"
] | null | null | null | mdanalysis/runConfGen.py | otayfuroglu/mdutils | 481148316d9347c1136c22f581a3668da4192168 | [
"MIT"
] | null | null | null | mdanalysis/runConfGen.py | otayfuroglu/mdutils | 481148316d9347c1136c22f581a3668da4192168 | [
"MIT"
] | null | null | null | #! /home/omert/miniconda3/bin/python
from gmx_md_utils import *
import sys, os, shutil
from rdkit import Chem
from rdkit.Chem import AllChem, TorsionFingerprints
from rdkit.ML.Cluster import Butina
def mainCalcRMS(mols_path, ref_path):
ref_mol = Chem.MolFromMolFile(ref_path)
suppl = Chem.SDMolSupplier(mols... | 36.755814 | 113 | 0.608035 |
794aeb15e34e805bb4cb518de4515271d3f2f13f | 360 | py | Python | pmu-tools-master/ucevent/ucmsg.py | patinnc/60secs | 45ad68e4359e0dfd506f9e3a898c216ed38e7fd0 | [
"MIT"
] | null | null | null | pmu-tools-master/ucevent/ucmsg.py | patinnc/60secs | 45ad68e4359e0dfd506f9e3a898c216ed38e7fd0 | [
"MIT"
] | null | null | null | pmu-tools-master/ucevent/ucmsg.py | patinnc/60secs | 45ad68e4359e0dfd506f9e3a898c216ed38e7fd0 | [
"MIT"
] | 1 | 2021-03-22T20:38:10.000Z | 2021-03-22T20:38:10.000Z | # Handle warnings and errors
# Separate module to avoid circular imports
import sys
import fnmatch
quiet = False
debug = None
def debug_msg(x, y):
if debug and any(map(lambda p: fnmatch.fnmatch(x, p), debug.split(","))):
print >>sys.stderr, "debug:", x + ": " + str(y)
def warning(x):
if not quiet:
... | 22.5 | 77 | 0.638889 |
794aeb1606271051d05972f7162bf659643d7dc4 | 7,547 | py | Python | python/netsnmp/client.py | aristanetworks/net-snmp | 49efeb8092af1d6be8b7535a7556ac24b25d2b6d | [
"Net-SNMP"
] | 1 | 2015-07-08T20:43:18.000Z | 2015-07-08T20:43:18.000Z | python/netsnmp/client.py | aristanetworks/net-snmp | 49efeb8092af1d6be8b7535a7556ac24b25d2b6d | [
"Net-SNMP"
] | 1 | 2016-11-14T16:42:51.000Z | 2016-11-14T19:55:59.000Z | python/netsnmp/client.py | aristanetworks/net-snmp | 49efeb8092af1d6be8b7535a7556ac24b25d2b6d | [
"Net-SNMP"
] | null | null | null | import client_intf
import string
import re
import types
from sys import stderr
from client_intf import read_module, read_mib
# control verbosity of error output
verbose = 1
secLevelMap = { 'noAuthNoPriv':1, 'authNoPriv':2, 'authPriv':3 }
def _parse_session_args(kargs):
sessArgs = {
'Version':3,
... | 28.055762 | 78 | 0.543395 |
794aeb575b765228142bcdec088214db472bf427 | 2,311 | py | Python | venv/Lib/site-packages/win32comext/shell/demos/viewstate.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 150 | 2021-11-02T05:31:51.000Z | 2022-03-24T06:22:22.000Z | venv/Lib/site-packages/win32comext/shell/demos/viewstate.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 4 | 2021-12-01T11:55:58.000Z | 2022-02-24T16:14:37.000Z | venv/Lib/site-packages/win32comext/shell/demos/viewstate.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 33 | 2021-11-03T00:29:41.000Z | 2022-03-15T13:15:56.000Z | """
Demonstrates how to propagate a folder's view state to all its subfolders
The format of the ColInfo stream is apparently undocumented, but
it can be read raw from one folder and copied to another's view state.
"""
from win32com.shell import shell, shellcon
import pythoncom
import os, sys
template_folder = os.path... | 34.492537 | 95 | 0.621809 |
794aeb8d7f0ab1256b43c35ea4fb64c0820c38ee | 1,940 | py | Python | nowcasting_dataset/square.py | lenassero/nowcasting_dataset | deaf098c4d318f3ef532bac73f9cc4fa2858479b | [
"MIT"
] | null | null | null | nowcasting_dataset/square.py | lenassero/nowcasting_dataset | deaf098c4d318f3ef532bac73f9cc4fa2858479b | [
"MIT"
] | null | null | null | nowcasting_dataset/square.py | lenassero/nowcasting_dataset | deaf098c4d318f3ef532bac73f9cc4fa2858479b | [
"MIT"
] | null | null | null | """ Square objects """
from numbers import Number
from typing import NamedTuple, Union
from nowcasting_dataset.consts import Array
class BoundingBox(NamedTuple):
"""Bounding box tuple"""
top: Union[Number, float]
bottom: Union[Number, float]
left: Union[Number, float]
right: Union[Number, float]... | 26.944444 | 94 | 0.63299 |
794aeba8187a07b167c1891ce4e55acf97fbc78e | 2,812 | py | Python | test/helpers.py | DalavanCloud/hpc-container-maker | 555093c0a5c98bd2b0114831b8c676c0c3c50dd7 | [
"Apache-2.0"
] | 1 | 2019-02-25T22:54:31.000Z | 2019-02-25T22:54:31.000Z | test/helpers.py | DalavanCloud/hpc-container-maker | 555093c0a5c98bd2b0114831b8c676c0c3c50dd7 | [
"Apache-2.0"
] | null | null | null | test/helpers.py | DalavanCloud/hpc-container-maker | 555093c0a5c98bd2b0114831b8c676c0c3c50dd7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018, NVIDIA CORPORATION. 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 appli... | 32.321839 | 76 | 0.711238 |
794aec20bcb82f4b0a81082338dbfaee65785904 | 7,477 | py | Python | infiltrate/models/deck.py | Qazzquimby/eternalCardEvaluator | ef8640ed819a89e5198f8aedf0861a29c57c5720 | [
"MIT"
] | 4 | 2019-04-08T09:30:10.000Z | 2020-09-15T19:25:30.000Z | infiltrate/models/deck.py | Qazzquimby/eternalCardEvaluator | ef8640ed819a89e5198f8aedf0861a29c57c5720 | [
"MIT"
] | 19 | 2019-04-09T19:02:14.000Z | 2020-12-25T05:22:45.000Z | infiltrate/models/deck.py | Qazzquimby/eternalCardEvaluator | ef8640ed819a89e5198f8aedf0861a29c57c5720 | [
"MIT"
] | null | null | null | """The Deck model and related utilities"""
import enum
import logging
import typing as t
import urllib.error
from datetime import datetime
import tqdm
import infiltrate.browsers as browsers
import infiltrate.global_data as global_data
import infiltrate.models.card as card
# todo replace application with config injec... | 31.284519 | 86 | 0.589408 |
794aec21d21c068ce8a50d5b32a032b7b1b4ebf1 | 874 | py | Python | libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/tmp117_limits_test.py | Yarik9008/SoftAcademic | 118c9dc4620ca444c1557edd141a838820577202 | [
"MIT"
] | 1 | 2021-04-24T05:25:43.000Z | 2021-04-24T05:25:43.000Z | libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/tmp117_limits_test.py | Yarik9008/SoftAcademic | 118c9dc4620ca444c1557edd141a838820577202 | [
"MIT"
] | 4 | 2021-01-07T17:25:13.000Z | 2021-12-14T20:23:00.000Z | libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/tmp117_limits_test.py | Yarik9008/SoftAcademic | 118c9dc4620ca444c1557edd141a838820577202 | [
"MIT"
] | 6 | 2021-01-07T07:18:13.000Z | 2021-11-20T06:23:14.000Z | # SPDX-FileCopyrightText: 2020 Bryan Siepert, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
import time
import board
from adafruit_tmp117 import TMP117, AlertMode
i2c = board.I2C() # uses board.SCL and board.SDA
tmp117 = TMP117(i2c)
tmp117.high_limit = 25
tmp117.low_limit = 10
print("\nHig... | 28.193548 | 79 | 0.745995 |
794aec60e5f189a7da5a8f7df61d20197417bf21 | 108,580 | py | Python | databricks/koalas/tests/test_groupby.py | AishwaryaKalloli/koalas | 8d35a74508c1319996c8c27e2a5e24af52b9ee31 | [
"Apache-2.0"
] | null | null | null | databricks/koalas/tests/test_groupby.py | AishwaryaKalloli/koalas | 8d35a74508c1319996c8c27e2a5e24af52b9ee31 | [
"Apache-2.0"
] | null | null | null | databricks/koalas/tests/test_groupby.py | AishwaryaKalloli/koalas | 8d35a74508c1319996c8c27e2a5e24af52b9ee31 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2019 Databricks, 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 i... | 41.585599 | 100 | 0.479085 |
794af019c7a36bc1aedf7b78af40e3210237544e | 2,558 | py | Python | python_modules/dagster/dagster/core/storage/output_manager.py | ericct/dagster | dd2c9f05751e1bae212a30dbc54381167a14f6c5 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/storage/output_manager.py | ericct/dagster | dd2c9f05751e1bae212a30dbc54381167a14f6c5 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/storage/output_manager.py | ericct/dagster | dd2c9f05751e1bae212a30dbc54381167a14f6c5 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod, abstractproperty
from dagster import check
from dagster.core.definitions.definition_config_schema import (
convert_user_facing_definition_config_schema,
)
from dagster.core.definitions.resource import ResourceDefinition
class IOutputManagerDefinition:
@abstractproperty
... | 34.106667 | 100 | 0.702893 |
794af0436dd7ce6ca83a21bb8970cd7e6f2ca1e4 | 19,542 | py | Python | boxes/secnotes/psexec.py | jasonperhaps/HTB | 85c2b6ea551b8f20b72dad0f1941278e10be015d | [
"MIT"
] | null | null | null | boxes/secnotes/psexec.py | jasonperhaps/HTB | 85c2b6ea551b8f20b72dad0f1941278e10be015d | [
"MIT"
] | null | null | null | boxes/secnotes/psexec.py | jasonperhaps/HTB | 85c2b6ea551b8f20b72dad0f1941278e10be015d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# PSEXEC like functionality example using RemComSvc (ht... | 39.638945 | 162 | 0.579623 |
794af0b36086db972b14e2b4ada89a0b64e84ce0 | 3,100 | py | Python | source/scripts/python/frontend/source/frontend/settings.py | Tabzz98/core | 02ddfe5e0f7ecaa833a8c36dbc059a968479d8ce | [
"Apache-2.0"
] | 1 | 2022-02-08T17:56:53.000Z | 2022-02-08T17:56:53.000Z | source/scripts/python/frontend/source/frontend/settings.py | Tabzz98/core | 02ddfe5e0f7ecaa833a8c36dbc059a968479d8ce | [
"Apache-2.0"
] | null | null | null | source/scripts/python/frontend/source/frontend/settings.py | Tabzz98/core | 02ddfe5e0f7ecaa833a8c36dbc059a968479d8ce | [
"Apache-2.0"
] | null | null | null | """
Django settings for frontend project.
Generated by 'django-admin startproject' using Django 1.10.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
... | 25.619835 | 91 | 0.699032 |
794af12c7d480e2d45fcc4cb8504bacffdbc7f2c | 4,211 | py | Python | tests/layers/graph/test_usage.py | FrostByte266/neupy | 4b7127e5e4178b0cce023ba36542f5ad3f1d798c | [
"MIT"
] | 801 | 2015-09-23T09:24:47.000Z | 2022-03-29T19:19:03.000Z | tests/layers/graph/test_usage.py | FrostByte266/neupy | 4b7127e5e4178b0cce023ba36542f5ad3f1d798c | [
"MIT"
] | 277 | 2015-09-22T19:48:50.000Z | 2022-03-11T23:25:32.000Z | tests/layers/graph/test_usage.py | FrostByte266/neupy | 4b7127e5e4178b0cce023ba36542f5ad3f1d798c | [
"MIT"
] | 194 | 2015-09-23T15:03:57.000Z | 2022-03-31T13:54:46.000Z | import numpy as np
from neupy import layers
from neupy.utils import asfloat
from base import BaseTestCase
class UsageTestCase(BaseTestCase):
def test_network_wrong_number_of_input_values(self):
network = layers.join(
layers.Input(2),
layers.Relu(10),
layers.Relu(1),
... | 31.425373 | 78 | 0.580622 |
794af1d47040ea5ff6943c00215c0fcc0668353b | 2,902 | py | Python | scripts/cross_f1.py | JD-AI-Research-NLP/RoR | 201a7cc08c8b2911204d0dd966039fe99cce15a4 | [
"Apache-2.0"
] | 15 | 2021-11-18T10:10:32.000Z | 2022-03-16T07:58:06.000Z | scripts/cross_f1.py | JD-AI-Research-NLP/RoR | 201a7cc08c8b2911204d0dd966039fe99cce15a4 | [
"Apache-2.0"
] | 2 | 2021-11-30T12:15:49.000Z | 2022-01-19T09:21:48.000Z | scripts/cross_f1.py | JD-AI-Research-NLP/RoR | 201a7cc08c8b2911204d0dd966039fe99cce15a4 | [
"Apache-2.0"
] | 2 | 2021-12-03T01:27:17.000Z | 2021-12-22T02:44:16.000Z | import json
import numpy as np
import re
import string
from collections import Counter
import argparse
def add_arguments(parser):
parser.add_argument("--regional_answer", help="path to regional answer", required=True)
parser.add_argument("--global_answer", help="path to global answer", required=True)
pars... | 34.963855 | 103 | 0.670917 |
794af2056466bf6f25fe5d53468c520fed4c79eb | 22,921 | py | Python | google/estimators/importance_sampling_ci.py | SnowflyLXF/FedDICE | a63a3233037e37ae27d6c130f37ffc4b92190d5e | [
"Apache-2.0"
] | null | null | null | google/estimators/importance_sampling_ci.py | SnowflyLXF/FedDICE | a63a3233037e37ae27d6c130f37ffc4b92190d5e | [
"Apache-2.0"
] | null | null | null | google/estimators/importance_sampling_ci.py | SnowflyLXF/FedDICE | a63a3233037e37ae27d6c130f37ffc4b92190d5e | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 42.76306 | 92 | 0.66306 |
794af20f72d7184e76e6ca2f4cf13acda37ebcfe | 1,811 | py | Python | fwtest/comms/grbl_comms.py | firmware-testing/fwtest | 4ab5303ebe94efd224ee21370200dd4f3e1fa997 | [
"MIT"
] | null | null | null | fwtest/comms/grbl_comms.py | firmware-testing/fwtest | 4ab5303ebe94efd224ee21370200dd4f3e1fa997 | [
"MIT"
] | null | null | null | fwtest/comms/grbl_comms.py | firmware-testing/fwtest | 4ab5303ebe94efd224ee21370200dd4f3e1fa997 | [
"MIT"
] | null | null | null | import time
import serial
class GrblComms:
def __init__(self, port: str) -> None:
# This ought to either look at the usb tree, or trigger a re-enumeration
# and watch dmesg... for now, require hardcoding the port.
self.port = port
self.serial = serial.Serial(self.port, timeout=0.1, ... | 28.746032 | 95 | 0.556599 |
794af36ab2e0b0dc3e9178242c3cf74bf0d467da | 8,417 | py | Python | greenglacier.py | TobyAbel/greenglacier | 602fdd59ddb7d6bbc34d1ca38504c7d3d7bfe404 | [
"Apache-2.0"
] | null | null | null | greenglacier.py | TobyAbel/greenglacier | 602fdd59ddb7d6bbc34d1ca38504c7d3d7bfe404 | [
"Apache-2.0"
] | null | null | null | greenglacier.py | TobyAbel/greenglacier | 602fdd59ddb7d6bbc34d1ca38504c7d3d7bfe404 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2.7
from __future__ import print_function
import os
import hashlib
import math
import binascii
import gevent
import gevent.pool
import gevent.queue
import gevent.monkey
import pprint
gevent.monkey.patch_socket()
gevent.monkey.patch_ssl()
gevent.monkey.patch_os()
from retrying import retry
# ... | 37.914414 | 198 | 0.663538 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.