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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
987625aed27022a5df4eb280324d0d404b977420 | 5,890 | py | Python | p3json/test/test_scanstring.py | wenbobuaa/pykit | 43e38fe40297a1e7a9329bcf3db3554c7ca48ead | [
"MIT"
] | 13 | 2016-12-16T09:23:09.000Z | 2018-03-10T08:04:00.000Z | p3json/test/test_scanstring.py | wenbobuaa/pykit | 43e38fe40297a1e7a9329bcf3db3554c7ca48ead | [
"MIT"
] | 74 | 2017-03-23T11:36:22.000Z | 2018-04-02T06:19:09.000Z | p3json/test/test_scanstring.py | drmingdrmer/pykit | e25a71146e81aaf79625cf8d4f4c439ccd515b82 | [
"MIT"
] | 5 | 2016-12-27T07:30:47.000Z | 2018-03-10T07:06:21.000Z | import sys
from pykit.p3json.test import PyTest
class TestScanstring(object):
def test_scanstring(self):
scanstring = self.json.decoder.scanstring
if sys.maxunicode == 65535:
self.assertEqual(
scanstring(u'"z\U0001d120x"', 1, None, True),
(u'z\U0001d120x... | 36.583851 | 106 | 0.514431 |
a2714e27e72a216abd5d327a1868b8253fc57b2f | 7,751 | py | Python | utils/testrail/testrail_service.py | thirdshelf/qa-kom-framework | c04d05d4ef1aad580a0a1aeab601a3d0b2b5dbbb | [
"Apache-2.0"
] | null | null | null | utils/testrail/testrail_service.py | thirdshelf/qa-kom-framework | c04d05d4ef1aad580a0a1aeab601a3d0b2b5dbbb | [
"Apache-2.0"
] | 1 | 2021-09-24T12:40:58.000Z | 2021-10-04T12:42:14.000Z | utils/testrail/testrail_service.py | thirdshelf/qa-kom-framework | c04d05d4ef1aad580a0a1aeab601a3d0b2b5dbbb | [
"Apache-2.0"
] | null | null | null | from .api_client import APIClient
class TestCaseStatuses:
PASSED = 1
BLOCKED = 2
SKIPPED = 2
PENDING = 2
UNTESTED = 3
RETEST = 4
BROKEN = 4
FAILED = 5
FLAKY = 6
NOT_APPLICABLE = 7
@classmethod
def all(cls):
return [cls.PASSED, cls.BLOCKED, cls.UNTESTED, cls.RET... | 34.145374 | 116 | 0.595923 |
c585d6279ec942fad02ec2fe8dc01f36c7e35a4a | 14,388 | py | Python | tests/api/api/test_utils.py | shul/mlrun | d99e08ba8dce9833fca3ab00cdd246d873cf16b6 | [
"Apache-2.0"
] | null | null | null | tests/api/api/test_utils.py | shul/mlrun | d99e08ba8dce9833fca3ab00cdd246d873cf16b6 | [
"Apache-2.0"
] | null | null | null | tests/api/api/test_utils.py | shul/mlrun | d99e08ba8dce9833fca3ab00cdd246d873cf16b6 | [
"Apache-2.0"
] | 1 | 2019-12-10T01:54:27.000Z | 2019-12-10T01:54:27.000Z | from http import HTTPStatus
from deepdiff import DeepDiff
from fastapi.testclient import TestClient
from sqlalchemy.orm import Session
import mlrun
from mlrun.api.api.utils import _parse_submit_run_body
def test_parse_submit_job_body_override_values(db: Session, client: TestClient):
task_name = "task_name"
... | 33.538462 | 101 | 0.518071 |
ef8e1f3b531c697980a5631a69238a2dca091b34 | 8,142 | py | Python | Lib/site-packages/pythonwin/pywin/framework/toolmenu.py | egorcompany/telegram-chat-members | 19a7c2bffe2fb832b79a4475ca324c438d5f548d | [
"MIT"
] | 3 | 2016-11-24T03:57:22.000Z | 2019-02-27T15:19:50.000Z | Lib/site-packages/pythonwin/pywin/framework/toolmenu.py | egorcompany/telegram-chat-members | 19a7c2bffe2fb832b79a4475ca324c438d5f548d | [
"MIT"
] | 67 | 2016-10-19T01:23:47.000Z | 2016-12-14T04:30:38.000Z | Lib/site-packages/pythonwin/pywin/framework/toolmenu.py | egorcompany/telegram-chat-members | 19a7c2bffe2fb832b79a4475ca324c438d5f548d | [
"MIT"
] | 1 | 2020-08-08T12:44:48.000Z | 2020-08-08T12:44:48.000Z | # toolmenu.py
import win32ui
import win32con
import win32api
from . import app
import sys
import string
tools = {}
idPos = 100
# The default items should no tools menu exist in the INI file.
defaultToolMenuItems = [
('Browser', 'win32ui.GetApp().OnViewBrowse(0,0)'),
('Browse PythonPath', 'from pywin... | 31.680934 | 140 | 0.709899 |
a77f3aa59d1804c80fc6f24608db1d7a3d552300 | 3,825 | py | Python | sdk/python/pulumi_azure/monitoring/get_diagnostic_categories.py | suresh198526/pulumi-azure | bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/monitoring/get_diagnostic_categories.py | suresh198526/pulumi-azure | bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/monitoring/get_diagnostic_categories.py | suresh198526/pulumi-azure | bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilitie... | 34.772727 | 165 | 0.677386 |
14fcfd600f9d3e0f16af66b34160eb3958b35e58 | 163 | py | Python | tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_Seasonal_Second_SVR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_Seasonal_Second_SVR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_Seasonal_Second_SVR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Logit'] , ['MovingAverage'] , ['Seasonal_Second'] , ['SVR'] ); | 40.75 | 85 | 0.754601 |
8c786944eee1428256017d16211c442f7260aa80 | 17,749 | py | Python | kafka/client.py | meandthewallaby/kafka-python | d08c0e813bf6dd04442d181f122f656cd63e7cce | [
"Apache-2.0"
] | null | null | null | kafka/client.py | meandthewallaby/kafka-python | d08c0e813bf6dd04442d181f122f656cd63e7cce | [
"Apache-2.0"
] | null | null | null | kafka/client.py | meandthewallaby/kafka-python | d08c0e813bf6dd04442d181f122f656cd63e7cce | [
"Apache-2.0"
] | null | null | null | import binascii
import collections
import copy
import functools
import itertools
import logging
import time
import kafka.common
from kafka.common import (TopicAndPartition, BrokerMetadata,
ConnectionError, FailedPayloadsError,
KafkaTimeoutError, KafkaUnavailableError... | 35.569138 | 89 | 0.590681 |
653d266559d8b437e322fe76749fa460c358b57c | 554 | py | Python | solutions/python3/241.py | sm2774us/amazon_interview_prep_2021 | f580080e4a6b712b0b295bb429bf676eb15668de | [
"MIT"
] | 42 | 2020-08-02T07:03:49.000Z | 2022-03-26T07:50:15.000Z | solutions/python3/241.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | null | null | null | solutions/python3/241.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | 40 | 2020-02-08T02:50:24.000Z | 2022-03-26T15:38:10.000Z | class Solution:
def diffWaysToCompute(self, input):
if input.isdigit():
return [int(input)]
res = []
for i in range(len(input)):
if input[i] in "-+*":
l = self.diffWaysToCompute(input[:i])
r = self.diffWaysToCompute(input[i + 1:])
... | 36.933333 | 68 | 0.451264 |
c9385c4c997b04163f9eab42d5f90a6908e8adfa | 4,640 | py | Python | system/indy-node-tests/TestConsensusSuite.py | devinleighsmith/indy-test-automation | 32d27c8cf8e233d5e365672358752ae3a8b5bf00 | [
"Apache-2.0"
] | 7 | 2019-03-14T10:52:50.000Z | 2021-12-03T00:02:15.000Z | system/indy-node-tests/TestConsensusSuite.py | devinleighsmith/indy-test-automation | 32d27c8cf8e233d5e365672358752ae3a8b5bf00 | [
"Apache-2.0"
] | 27 | 2018-10-24T15:28:32.000Z | 2022-03-29T21:30:35.000Z | system/indy-node-tests/TestConsensusSuite.py | devinleighsmith/indy-test-automation | 32d27c8cf8e233d5e365672358752ae3a8b5bf00 | [
"Apache-2.0"
] | 22 | 2018-10-03T17:05:23.000Z | 2021-12-03T00:02:04.000Z | import pytest
import asyncio
from system.utils import *
@pytest.mark.usefixtures('docker_setup_and_teardown')
@pytest.mark.usefixtures('check_no_failures_fixture')
class TestConsensusSuite:
@pytest.mark.asyncio
async def test_consensus_restore_after_f_plus_one(
self, pool_handler, wallet_handler,... | 42.181818 | 109 | 0.695474 |
d8c5edd8a77817e15d638e24e12c8e0bcfa72267 | 8,908 | py | Python | libcst/_parser/tests/test_detect_config.py | mvismonte/LibCST | fc430343b5f7e0c30d6d0ca30b5251b74bd3890d | [
"MIT"
] | 1 | 2021-08-12T11:52:00.000Z | 2021-08-12T11:52:00.000Z | libcst/_parser/tests/test_detect_config.py | mvismonte/LibCST | fc430343b5f7e0c30d6d0ca30b5251b74bd3890d | [
"MIT"
] | null | null | null | libcst/_parser/tests/test_detect_config.py | mvismonte/LibCST | fc430343b5f7e0c30d6d0ca30b5251b74bd3890d | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-strict
from typing import Union
from libcst._parser.detect_config import detect_config
from libcst._parser.parso.utils import PythonVe... | 41.821596 | 88 | 0.462169 |
f2236b0db3bdc578d21201d8c6e8540c1c9e3c0a | 3,396 | py | Python | Mirror.py | jkedra/PodcastMirror | 5dcfbb1d2b3904662b62aa2a7a4e8d8471660b29 | [
"MIT"
] | null | null | null | Mirror.py | jkedra/PodcastMirror | 5dcfbb1d2b3904662b62aa2a7a4e8d8471660b29 | [
"MIT"
] | null | null | null | Mirror.py | jkedra/PodcastMirror | 5dcfbb1d2b3904662b62aa2a7a4e8d8471660b29 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# vim:ts=4:expandtab
# (c) Jerzy Kędra 2013-2019
""" Mirror.py : Mirror a podcast to local resource.
This script is intended to be run daily from cron,
and copies incoming podcasts into a local directory.
Primarily designed to mirror Daily Audio Bible podcasts,
... | 28.779661 | 75 | 0.652827 |
1b3c7f0b1715897ea8beb93df74f3fabdac59d8c | 868,498 | py | Python | nova/tests/unit/virt/libvirt/test_driver.py | bopopescu/nova-8 | 768d7cc0a632e1a880f00c5840c1ec8051e161be | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/virt/libvirt/test_driver.py | bopopescu/nova-8 | 768d7cc0a632e1a880f00c5840c1ec8051e161be | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/virt/libvirt/test_driver.py | bopopescu/nova-8 | 768d7cc0a632e1a880f00c5840c1ec8051e161be | [
"Apache-2.0"
] | 1 | 2020-07-22T21:09:15.000Z | 2020-07-22T21:09:15.000Z | # Copyright 2010 OpenStack Foundation
# Copyright 2012 University Of Minho
#
# 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.... | 45.554576 | 79 | 0.587927 |
a2d46cc5a6d9d05c5eb2af522cafe3fb4c6f14d3 | 10,722 | py | Python | web.py | marta18a/openfda | 78aab92d7d565a4b32ea6334a2c251dd8f06ee9c | [
"Apache-2.0"
] | null | null | null | web.py | marta18a/openfda | 78aab92d7d565a4b32ea6334a2c251dd8f06ee9c | [
"Apache-2.0"
] | null | null | null | web.py | marta18a/openfda | 78aab92d7d565a4b32ea6334a2c251dd8f06ee9c | [
"Apache-2.0"
] | null | null | null | import http.server
import socketserver
import json
import http.client
#DEFINITIVO
class OpenFDAHTML():
def get_main_page(self):
html="""
<html>
<head>
<title>Marta Castillo ortiz</title>
</head>
<body>
<h1 align=CENTER style="... | 30.722063 | 164 | 0.543369 |
ce4f0250fa79d05ac29fec5134c966a399a6cb9c | 3,107 | py | Python | make_train.py | GetYourLocation/Tools | e2d80a088c8b4f43572caff834ee2541eae7a4d5 | [
"MIT"
] | null | null | null | make_train.py | GetYourLocation/Tools | e2d80a088c8b4f43572caff834ee2541eae7a4d5 | [
"MIT"
] | null | null | null | make_train.py | GetYourLocation/Tools | e2d80a088c8b4f43572caff834ee2541eae7a4d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import shutil
import sys
import urllib.request
import time
import platform
def timestamp():
return time.strftime('%Y%m%d%H%M%S', time.localtime(time.time()))
if platform.system() == 'Windows':
KCF_URL = 'https://... | 32.030928 | 80 | 0.624397 |
8d0a34127854d991776f4a6c3687e45aa94169f1 | 7,750 | py | Python | code/tt_extra.py | ion-g-ion/paper-cme-tt | 274e1c32d8d58a33e57e3ce47f662e512e59161a | [
"MIT"
] | null | null | null | code/tt_extra.py | ion-g-ion/paper-cme-tt | 274e1c32d8d58a33e57e3ce47f662e512e59161a | [
"MIT"
] | null | null | null | code/tt_extra.py | ion-g-ion/paper-cme-tt | 274e1c32d8d58a33e57e3ce47f662e512e59161a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 27 22:06:20 2020
@author: ion
"""
#import tt
import numpy as np
import scipy.sparse as sps
import scipy.sparse.linalg
import tensorflow as tf
import t3f
import timeit
# from sparsesvd import sparsesvd
import matplotlib.pyplot as plt
# import tt
de... | 24.919614 | 116 | 0.481548 |
cbfced1cb79908ae22dee1eb116ecba521813d44 | 2,151 | py | Python | kongoauth/tests/test_authentication.py | SchoolOrchestration/kongoauth | fe81a4a802e062141d121d590203e48f1a206784 | [
"MIT"
] | 1 | 2018-10-06T20:30:49.000Z | 2018-10-06T20:30:49.000Z | kongoauth/tests/test_authentication.py | SchoolOrchestration/kongoauth | fe81a4a802e062141d121d590203e48f1a206784 | [
"MIT"
] | 7 | 2019-12-04T21:46:51.000Z | 2021-06-10T17:34:52.000Z | kongoauth/tests/test_authentication.py | SchoolOrchestration/kongoauth | fe81a4a802e062141d121d590203e48f1a206784 | [
"MIT"
] | 1 | 2019-06-10T12:19:58.000Z | 2019-06-10T12:19:58.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from django.test.client import RequestFactory
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from ..authentication import KongOAuthAuthentication
from ..helpers import get_redis
from ... | 31.632353 | 68 | 0.709437 |
dda3b35b12496e59b1462b619e9f1ff8d2d848b5 | 2,925 | py | Python | layout_deeds.py | rlowrance/re-avm | d4cfa62e9f65d325e8ac98caa61d3fb666b8a6a2 | [
"BSD-3-Clause"
] | 25 | 2016-10-07T05:08:15.000Z | 2022-03-22T01:36:51.000Z | layout_deeds.py | rlowrance/re-avm | d4cfa62e9f65d325e8ac98caa61d3fb666b8a6a2 | [
"BSD-3-Clause"
] | 1 | 2021-01-14T22:27:23.000Z | 2021-01-14T22:27:23.000Z | layout_deeds.py | rlowrance/re-avm | d4cfa62e9f65d325e8ac98caa61d3fb666b8a6a2 | [
"BSD-3-Clause"
] | 8 | 2016-08-12T07:26:29.000Z | 2021-07-05T01:22:42.000Z | 'hold all the knowledge about the layout and codes of the Corlogic deeds file'
# called record type 1080 in the CoreLogic documentation
import numpy as np
import pandas as pd
import pdb
import zipfile
def is_deeds(df):
return df.columns[2] == 'MUNICIPALITY CODE'
# map feature names to columns names
apn_forma... | 25.657895 | 94 | 0.660513 |
4cfdd8f2f851e96afc4f3db64f09ffd7e80eba2f | 11,013 | py | Python | src/ndl/utils/utils.py | jvendrow/Network-Dictionary-Learning | 5834adba4ef444a41341805590228d8d3ae7d7d3 | [
"MIT"
] | 1 | 2020-10-05T20:05:35.000Z | 2020-10-05T20:05:35.000Z | src/ndl/utils/utils.py | jvendrow/Network-Dictionary-Learning | 5834adba4ef444a41341805590228d8d3ae7d7d3 | [
"MIT"
] | null | null | null | src/ndl/utils/utils.py | jvendrow/Network-Dictionary-Learning | 5834adba4ef444a41341805590228d8d3ae7d7d3 | [
"MIT"
] | 1 | 2020-11-15T12:22:30.000Z | 2020-11-15T12:22:30.000Z | import numpy as np
import networkx as nx
from ndl.NNetwork import Wtd_NNetwork
from sklearn.metrics import roc_curve
from sklearn.metrics import auc
from scipy.spatial import ConvexHull
import matplotlib.pyplot as plt
def recons_accuracy(G, G_recons):
"""
Calculates the Jaccard index (accuracy) between the or... | 29.845528 | 114 | 0.597657 |
f4dd9f6358b2b96a5c1aea4b80e3f9c5326178af | 20,391 | py | Python | salt/modules/napalm_yang_mod.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2021-08-14T13:48:38.000Z | 2021-08-14T13:48:38.000Z | salt/modules/napalm_yang_mod.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 3 | 2015-03-31T14:44:05.000Z | 2015-06-18T19:02:24.000Z | salt/modules/napalm_yang_mod.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:24.000Z | 2020-01-02T09:03:24.000Z | # -*- coding: utf-8 -*-
'''
NAPALM YANG
===========
NAPALM YANG basic operations.
.. versionadded:: 2017.7.0
'''
from __future__ import absolute_import
# Import python stdlib
import logging
# Import third party libs
try:
import napalm_yang
HAS_NAPALM_YANG = True
except ImportError:
HAS_NAPALM_YANG = Fal... | 33.704132 | 113 | 0.355892 |
2a10bfd6de2bba8119b9163f3f8cdcfd62f2eaeb | 865 | py | Python | xlsxwriter/test/comparison/test_object_position18.py | timgates42/XlsxWriter | 129044ed821de67895b4562c6b71f90eba5be6b4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_object_position18.py | timgates42/XlsxWriter | 129044ed821de67895b4562c6b71f90eba5be6b4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_object_position18.py | timgates42/XlsxWriter | 129044ed821de67895b4562c6b71f90eba5be6b4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 24.027778 | 83 | 0.613873 |
4837a4c84a683f3cd5d914f8780edfbf884e4635 | 128 | py | Python | cumulusci/tasks/salesforce/BaseSalesforceTask.py | davisagli/CumulusCI | fd74c324ad3ff662484b159395c639879011e711 | [
"BSD-3-Clause"
] | 163 | 2018-09-13T18:49:34.000Z | 2022-03-25T08:37:15.000Z | cumulusci/tasks/salesforce/BaseSalesforceTask.py | davisagli/CumulusCI | fd74c324ad3ff662484b159395c639879011e711 | [
"BSD-3-Clause"
] | 1,280 | 2018-09-11T20:09:37.000Z | 2022-03-31T18:40:21.000Z | cumulusci/tasks/salesforce/BaseSalesforceTask.py | davisagli/CumulusCI | fd74c324ad3ff662484b159395c639879011e711 | [
"BSD-3-Clause"
] | 125 | 2015-01-17T16:05:39.000Z | 2018-09-06T19:05:00.000Z | # This moved to prevent an import cycle.
from cumulusci.core.tasks import BaseSalesforceTask
__all__ = ("BaseSalesforceTask",)
| 25.6 | 51 | 0.796875 |
ec0e244c534944197d1dab68735be31144516deb | 552 | py | Python | chat/migrations/0015_auto_20190706_0212.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-05-20T08:42:49.000Z | 2020-05-20T08:42:49.000Z | chat/migrations/0015_auto_20190706_0212.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 14 | 2020-03-24T17:31:08.000Z | 2022-03-11T23:59:30.000Z | chat/migrations/0015_auto_20190706_0212.py | akindele214/181hub_2 | 48b8814b5f66ad87f9a54721506076ddf70fe9bc | [
"MIT"
] | 1 | 2020-04-13T12:37:37.000Z | 2020-04-13T12:37:37.000Z | # Generated by Django 2.1.5 on 2019-07-06 01:12
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('chat', '0014_chat_receiver'),
]
operations = [
migrations.AlterField(
... | 26.285714 | 158 | 0.666667 |
4f33bddc3da071f46296ef45ed693cd97246dad7 | 597 | py | Python | appium/__init__.py | vascon8/python-client | f16ce8719f6012a890bc0b6613edb975a17090bd | [
"Apache-2.0"
] | 1,383 | 2015-01-02T20:38:52.000Z | 2022-03-30T13:20:42.000Z | appium/__init__.py | vascon8/python-client | f16ce8719f6012a890bc0b6613edb975a17090bd | [
"Apache-2.0"
] | 460 | 2015-01-06T22:10:41.000Z | 2022-03-31T14:35:28.000Z | appium/__init__.py | mykola-mokhnach/python-client | 2a462becfe31dc4e18559ba246b0856fd3eb2488 | [
"Apache-2.0"
] | 554 | 2015-01-06T13:36:05.000Z | 2022-03-30T10:20:20.000Z | #!/usr/bin/env python
# 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, software... | 33.166667 | 74 | 0.752094 |
afc86a87063c5d689616d9d6a3bf7f0d756492e4 | 395 | py | Python | emojifier/wsgi.py | icoder18/Emojifier | 79851f9c5b69243feca1be208838a2fdf0f44880 | [
"Apache-2.0"
] | null | null | null | emojifier/wsgi.py | icoder18/Emojifier | 79851f9c5b69243feca1be208838a2fdf0f44880 | [
"Apache-2.0"
] | null | null | null | emojifier/wsgi.py | icoder18/Emojifier | 79851f9c5b69243feca1be208838a2fdf0f44880 | [
"Apache-2.0"
] | null | null | null | """
WSGI config for emojifier project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SET... | 23.235294 | 78 | 0.787342 |
e242914ebb1f537c276a558690e35eb587fcd615 | 4,196 | py | Python | CarCreator.py | MaazKhurram/Emergency-Response-System | e69e25aa135fd05a6cb88df8fad52b59d61cf4ef | [
"MIT"
] | 1 | 2020-01-24T21:41:34.000Z | 2020-01-24T21:41:34.000Z | CarCreator.py | MaazKhurram/Emergency-Response-System | e69e25aa135fd05a6cb88df8fad52b59d61cf4ef | [
"MIT"
] | null | null | null | CarCreator.py | MaazKhurram/Emergency-Response-System | e69e25aa135fd05a6cb88df8fad52b59d61cf4ef | [
"MIT"
] | null | null | null |
from random import randint
from Car import Car
class CarCreator:
permission_to_create_car=1
car_number=1
car_creation_tries=0
Inner_Car_List=[]
Outer_Car_List=[]
priority_counter=1 # only for outer lane cars. Lower number means higher priority
def __init__(self, outer_cars, inner_cars... | 40.737864 | 186 | 0.548618 |
8c4228db9e4af64c8ce208a02c47a12b607cd898 | 10,131 | py | Python | udify/models/tag_decoder.py | ufal/udify | 115351a29db642d585ef181b1f47a18d736eecfb | [
"MIT"
] | null | null | null | udify/models/tag_decoder.py | ufal/udify | 115351a29db642d585ef181b1f47a18d736eecfb | [
"MIT"
] | 3 | 2020-06-24T10:58:42.000Z | 2020-12-29T15:14:05.000Z | udify/models/tag_decoder.py | ufal/udify | 115351a29db642d585ef181b1f47a18d736eecfb | [
"MIT"
] | 2 | 2020-12-19T10:40:49.000Z | 2021-05-06T21:00:42.000Z | """
Decodes sequences of tags, e.g., POS tags, given a list of contextualized word embeddings
"""
from typing import Optional, Any, Dict, List
from overrides import overrides
import numpy
import torch
from torch.nn.modules.linear import Linear
from torch.nn.modules.adaptive import AdaptiveLogSoftmaxWithLoss
import to... | 43.294872 | 108 | 0.59619 |
bb1d34ebc713fdd87a13d017d4019601b815e740 | 2,002 | py | Python | imblearn/ensemble/base.py | fengtongtong/imbalanced-learning | 2e5956a4b54dd94003133f11fbe6d6152731ef63 | [
"MIT"
] | 1 | 2018-05-02T09:26:56.000Z | 2018-05-02T09:26:56.000Z | imblearn/ensemble/base.py | AnnYN/imbalanced-learn | 2e5956a4b54dd94003133f11fbe6d6152731ef63 | [
"MIT"
] | null | null | null | imblearn/ensemble/base.py | AnnYN/imbalanced-learn | 2e5956a4b54dd94003133f11fbe6d6152731ef63 | [
"MIT"
] | null | null | null | """
Base class for the ensemble method.
"""
# Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com>
# License: MIT
import numpy as np
from sklearn.preprocessing import label_binarize
from sklearn.utils import check_X_y
from sklearn.utils.validation import check_is_fitted
from ..base import BaseSampler
from ..utils im... | 29.441176 | 76 | 0.61988 |
81374e101e1b130533bafca56690522074c9ee29 | 1,029 | py | Python | microsetta_public_api/server.py | wasade/microsetta-public-api | cdbaa18103bbb2e49927a35ad956e079ad445f53 | [
"BSD-3-Clause"
] | null | null | null | microsetta_public_api/server.py | wasade/microsetta-public-api | cdbaa18103bbb2e49927a35ad956e079ad445f53 | [
"BSD-3-Clause"
] | null | null | null | microsetta_public_api/server.py | wasade/microsetta-public-api | cdbaa18103bbb2e49927a35ad956e079ad445f53 | [
"BSD-3-Clause"
] | null | null | null | import json
from pkg_resources import resource_filename
from microsetta_public_api import config
from microsetta_public_api.resources import resources
import connexion
def build_app(resources_config_json=None):
app = connexion.FlaskApp(__name__)
# default configuration for resources is provided in
# mic... | 30.264706 | 76 | 0.724004 |
f7293d96cfc10e9d38e19644eab6c50924cd6563 | 429 | py | Python | rl/core/online_learners/online_learner.py | gtrll/librl | 39709c3e485e232865b3e08b7211cd9d871c666a | [
"MIT"
] | 5 | 2020-07-14T23:01:53.000Z | 2020-12-09T08:11:29.000Z | rl/core/online_learners/online_learner.py | chinganc/mamba | e8adf0cf91660aed2c025508137a14f9d062248c | [
"MIT"
] | 1 | 2022-03-27T04:43:31.000Z | 2022-03-27T04:43:31.000Z | rl/core/online_learners/online_learner.py | chinganc/mamba | e8adf0cf91660aed2c025508137a14f9d062248c | [
"MIT"
] | 4 | 2020-08-05T14:13:26.000Z | 2022-02-26T00:46:03.000Z | # Copyright (c) 2019 Georgia Tech Robot Learning Lab
# Licensed under the MIT License.
from abc import ABC, abstractmethod
class OnlineLearner(ABC):
""" An abstract interface of iterative algorithms. """
@abstractmethod
def update(self, *args, **kwargs):
""" Update the state given feedback. """
... | 23.833333 | 58 | 0.666667 |
1c5de50948579c9cf0e0055810862443438515c5 | 119 | py | Python | ex49c.py | Poethalphyu/python_exercises | c5a02923f3198a7715fb02704e8c2a2c6e3eadf5 | [
"MIT"
] | null | null | null | ex49c.py | Poethalphyu/python_exercises | c5a02923f3198a7715fb02704e8c2a2c6e3eadf5 | [
"MIT"
] | null | null | null | ex49c.py | Poethalphyu/python_exercises | c5a02923f3198a7715fb02704e8c2a2c6e3eadf5 | [
"MIT"
] | null | null | null | def peek(word_list):
if word_list:
word=word_list[0]
return word[0]
else:
return None
| 14.875 | 25 | 0.554622 |
c438c8c3fa835e1ee5e6d75f53457226398f5892 | 409 | py | Python | mayan/apps/appearance/migrations/0023_auto_20220317_1503.py | onprawee/Mayan-EDMS | cbe8570a991561db79edf1ecb15a2e8446ccc94f | [
"Apache-2.0"
] | null | null | null | mayan/apps/appearance/migrations/0023_auto_20220317_1503.py | onprawee/Mayan-EDMS | cbe8570a991561db79edf1ecb15a2e8446ccc94f | [
"Apache-2.0"
] | null | null | null | mayan/apps/appearance/migrations/0023_auto_20220317_1503.py | onprawee/Mayan-EDMS | cbe8570a991561db79edf1ecb15a2e8446ccc94f | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.24 on 2022-03-17 15:03
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('appearance', '0022_auto_20220317_1423'),
]
operations = [
migrations.AlterModelOptions(
name='theme',
options={'ordering': ... | 22.722222 | 104 | 0.611247 |
20b4620a50f38b3ffae4a03d14931258a69a1c80 | 397 | py | Python | week-9/pSet-9/finance/routes/profile_route.py | AH-SALAH/CS50X | 1753b0c403968a574821131fa33afc5c86699c86 | [
"Xnet",
"X11"
] | null | null | null | week-9/pSet-9/finance/routes/profile_route.py | AH-SALAH/CS50X | 1753b0c403968a574821131fa33afc5c86699c86 | [
"Xnet",
"X11"
] | null | null | null | week-9/pSet-9/finance/routes/profile_route.py | AH-SALAH/CS50X | 1753b0c403968a574821131fa33afc5c86699c86 | [
"Xnet",
"X11"
] | null | null | null | from controllers.profilectrl import ProfileController
from helpers import login_required
class ProfileRoute:
"""Handle Profile route
"""
def __init__(self, app, db):
self.app = app
self.db = db
@app.route("/user/profile", methods=["GET", "POST"])
@login_required
... | 24.8125 | 60 | 0.619647 |
5363fec4d4ff0523db4d11a45b2dc23f9cf56476 | 13,456 | py | Python | backend/impl/rust/rust_backend.py | Time0o/CPPBind | 88dafba49d366fd96f9d7367dd7c20ead5fac20d | [
"MIT"
] | 3 | 2021-04-16T21:14:51.000Z | 2022-03-07T18:42:35.000Z | backend/impl/rust/rust_backend.py | Time0o/CPPBind | 88dafba49d366fd96f9d7367dd7c20ead5fac20d | [
"MIT"
] | 2 | 2020-12-21T14:47:25.000Z | 2021-09-23T19:10:31.000Z | backend/impl/rust/rust_backend.py | Time0o/CPPBind | 88dafba49d366fd96f9d7367dd7c20ead5fac20d | [
"MIT"
] | null | null | null | from backend import Backend, backend, switch_backend
from cppbind import Env, Identifier as Id, Options, Type
from itertools import chain
from rust_patcher import RustPatcher
from rust_type_translator import RustTypeTranslator
from text import code
class RustBackend(Backend('rust')):
def __init__(self, *args, **k... | 30.721461 | 97 | 0.515606 |
b6d01badc155afeca181443b28676eb0943090ed | 1,013 | py | Python | hello/migrations/0003_promocao.py | michelcarvalho22/ecommerce_simples | a2ba147cac5dab054b373c9ebbb752d8f1eb484a | [
"CC0-1.0"
] | 1 | 2020-07-23T15:40:58.000Z | 2020-07-23T15:40:58.000Z | hello/migrations/0003_promocao.py | michelcarvalho22/ecommerce_simples | a2ba147cac5dab054b373c9ebbb752d8f1eb484a | [
"CC0-1.0"
] | null | null | null | hello/migrations/0003_promocao.py | michelcarvalho22/ecommerce_simples | a2ba147cac5dab054b373c9ebbb752d8f1eb484a | [
"CC0-1.0"
] | null | null | null | # Generated by Django 2.0.2 on 2018-02-24 23:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hello', '0002_auto_20180120_1203'),
]
operations = [
migrations.CreateModel(
name='Promocao',
fields=[
... | 34.931034 | 114 | 0.57157 |
6e7d913fbae078a1e9035d5e859f2ac013fd60a6 | 1,690 | py | Python | main.py | Au1st3in/spring2017-ssw215-flask | 4c02ac0a00eda1b167c55fa7aa7660ebbaa1dabd | [
"MIT"
] | 1 | 2017-05-04T03:28:57.000Z | 2017-05-04T03:28:57.000Z | main.py | Au1st3in/spring2017-ssw215-flask | 4c02ac0a00eda1b167c55fa7aa7660ebbaa1dabd | [
"MIT"
] | null | null | null | main.py | Au1st3in/spring2017-ssw215-flask | 4c02ac0a00eda1b167c55fa7aa7660ebbaa1dabd | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template
from flask import request
import models as dbHandler
#import sys
#from termcolor import colored
app = Flask(__name__)
@app.route('/about', methods=["GET", "POST"])
def home():
return render_template('index.html')
@app.route('/', methods=['P... | 35.957447 | 148 | 0.633136 |
c063bca29ec0721d25a5d23110510ce2c03c5afb | 646 | py | Python | jparse/__init__.py | elisong/jparse | 1dd28f05c5bdc65ec8358b534fe0e2d739c36f09 | [
"Apache-2.0"
] | 1 | 2018-08-13T10:53:36.000Z | 2018-08-13T10:53:36.000Z | jparse/__init__.py | elisong/jparse | 1dd28f05c5bdc65ec8358b534fe0e2d739c36f09 | [
"Apache-2.0"
] | null | null | null | jparse/__init__.py | elisong/jparse | 1dd28f05c5bdc65ec8358b534fe0e2d739c36f09 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2018 Eli Song <elisong.ah@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 35.888889 | 69 | 0.752322 |
e0f80a578e99041ad6c82f9e79e9a651e93212cd | 25,556 | py | Python | google/cloud/compute_v1/services/region_backend_services/transports/rest.py | Ctfbuster/python-compute | 7a9e8324e08c46a93050908760b2b5aca054a863 | [
"Apache-2.0"
] | 19 | 2021-02-10T21:17:20.000Z | 2022-02-20T03:16:36.000Z | google/cloud/compute_v1/services/region_backend_services/transports/rest.py | Ctfbuster/python-compute | 7a9e8324e08c46a93050908760b2b5aca054a863 | [
"Apache-2.0"
] | 121 | 2021-01-08T23:46:58.000Z | 2022-03-26T04:34:36.000Z | google/cloud/compute_v1/services/region_backend_services/transports/rest.py | Ctfbuster/python-compute | 7a9e8324e08c46a93050908760b2b5aca054a863 | [
"Apache-2.0"
] | 20 | 2021-01-08T23:14:16.000Z | 2022-02-25T01:27:20.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... | 40.629571 | 129 | 0.618563 |
2e44025959f101a4ddbe39ff23a401324c3ea502 | 6,365 | py | Python | simplejson_test/testdata/pyspider/message_queue/tmp.py | rahman-mahmudur/PyART | 36591cd10b2b7a560bbcb47a6cf744b72466f92a | [
"Apache-2.0"
] | 7 | 2021-03-20T21:12:51.000Z | 2022-01-30T09:26:52.000Z | DataFlowEvaluation/data/pyspider/message_queue/tmp.py | PYART0/PyART-demo | 9a889662fb2610b7be2687a8304620855e7c76de | [
"Apache-2.0"
] | null | null | null | DataFlowEvaluation/data/pyspider/message_queue/tmp.py | PYART0/PyART-demo | 9a889662fb2610b7be2687a8304620855e7c76de | [
"Apache-2.0"
] | 4 | 2021-03-25T14:10:09.000Z | 2022-03-09T09:23:30.000Z | import time
import socket
import select
import logging
import umsgpack
import threading
import amqp
from six.moves.urllib.parse import unquote
try:
from urllib import parse as urlparse
except ImportError:
import urlparse
from six.moves import queue as BaseQueue
def catch_error(func):
import amqp
try:... | 29.742991 | 90 | 0.56198 |
765dbb00cef5e056ef299014855a7ecb9877a855 | 12,063 | py | Python | src/genie/libs/parser/iosxe/show_diagnostic.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/show_diagnostic.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/show_diagnostic.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | """show_diagnostics.py
supported commands:
* show diagnostic events
* show diagnostic description module {include} test all
* show diagnostic content module {mod_num}
* show diagnostic result module {mod_num} test {include} detail
"""
# Python
import re
# Metaparser
from ge... | 36.334337 | 168 | 0.482301 |
f9e32e7604bbec7ba51876fd9ef41982bfff0f8f | 13,530 | py | Python | s2angs/s2_angs.py | dmjoy/sentinel2_angle_bands | 717554c98b7a252adb9e5d989868ac4b752b7bd2 | [
"MIT"
] | 1 | 2020-10-02T14:11:34.000Z | 2020-10-02T14:11:34.000Z | s2angs/s2_angs.py | dmjoy/sentinel2_angle_bands | 717554c98b7a252adb9e5d989868ac4b752b7bd2 | [
"MIT"
] | null | null | null | s2angs/s2_angs.py | dmjoy/sentinel2_angle_bands | 717554c98b7a252adb9e5d989868ac4b752b7bd2 | [
"MIT"
] | null | null | null | # Python Native
import glob
import os
import shutil
import sys
import time
import xml.etree.ElementTree as ET
from zipfile import ZipFile
# 3rdparty
import numpy
from osgeo import gdal
################################################################################
## Generate Sentinel Angle view bands
##############... | 37.272727 | 189 | 0.640133 |
737e967efb5cf5327f31f0da1109276878d70cbd | 903 | py | Python | notification/migrations/0001_initial.py | DeanNevins/twitterclone | e713627f352f8a7d34b493384fbc86818db841c6 | [
"MIT"
] | null | null | null | notification/migrations/0001_initial.py | DeanNevins/twitterclone | e713627f352f8a7d34b493384fbc86818db841c6 | [
"MIT"
] | null | null | null | notification/migrations/0001_initial.py | DeanNevins/twitterclone | e713627f352f8a7d34b493384fbc86818db841c6 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-06-05 02:33
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('tweet', '0002_tweet_poster'),
migrations.swappable_dependency(s... | 32.25 | 123 | 0.642303 |
2bfa7bc9af1bd1e9163463d547b0c765a057e95b | 466 | py | Python | circle.py | serin-delaunay/tracery_game | 8011a742b068fb4d1d42101ecc6ebac9765bd826 | [
"MIT"
] | null | null | null | circle.py | serin-delaunay/tracery_game | 8011a742b068fb4d1d42101ecc6ebac9765bd826 | [
"MIT"
] | 23 | 2018-09-23T21:37:38.000Z | 2018-10-02T21:42:30.000Z | circle.py | serin-delaunay/tracery_game | 8011a742b068fb4d1d42101ecc6ebac9765bd826 | [
"MIT"
] | null | null | null | from game import Game
class Circle(Game):
def __init__(self, n):
self.n = n
def start_state(self):
return 0
def options(self, state):
return ['+', '-']
def result(self, state, input):
return (state + {'+':1, '-':-1}[input])%self.n
def display(self, state):
re... | 24.526316 | 54 | 0.562232 |
11a3a3dfbcf4cd9ba2fd3a2776ddd344419deed5 | 3,859 | py | Python | jp.atcoder/arc120/arc120_c/24186589.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/arc120/arc120_c/24186589.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/arc120/arc120_c/24186589.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import typing
class ReadStdin:
def __call__(
self,
) -> bytes:
return next(self.__chunks)
def __init__(
self,
) -> typing.NoReturn:
import sys
self.__buf = (
sys.stdin.buffer
)
self.__chunks = (
self.__read_chunks()
)
def int(
self,
) -> int:
return ... | 13.445993 | 35 | 0.509977 |
65784fb9fef0ffb86baf8b4a669dcb838d7a0045 | 4,321 | py | Python | goci-python-scripts/api-sample-scripts/association_by_rsId.py | tburdett/goci | 3d3bf63a36df0536b77a3c208c7912ca54f5ccaf | [
"Apache-2.0"
] | 23 | 2015-03-30T15:23:32.000Z | 2022-03-22T18:17:07.000Z | goci-python-scripts/api-sample-scripts/association_by_rsId.py | tburdett/goci | 3d3bf63a36df0536b77a3c208c7912ca54f5ccaf | [
"Apache-2.0"
] | 549 | 2015-02-23T15:54:21.000Z | 2022-03-31T11:43:49.000Z | goci-python-scripts/api-sample-scripts/association_by_rsId.py | tburdett/goci | 3d3bf63a36df0536b77a3c208c7912ca54f5ccaf | [
"Apache-2.0"
] | 19 | 2015-02-23T15:21:05.000Z | 2022-01-10T16:08:57.000Z | import argparse
import json
import requests
import properties
def retrieve_data(pubmedIds):
base_url = properties.base_url
snps = properties.snps
search = properties.rsidSearch
print("rs ID, risk allele, risk allele frequency, functional class")
print(" gene names")
print(" chromosome numbe... | 34.293651 | 169 | 0.568156 |
f0c8d0545efa5ce613ee4db185ef0ee6d6e7be37 | 2,643 | py | Python | Merops/extra/py_module/meshGroups.py | sho7noka/KARAS | e2f78551a45a9a899d3a32829b8686a88dca4b31 | [
"BSD-3-Clause"
] | 6 | 2018-12-21T02:16:14.000Z | 2019-07-02T11:15:11.000Z | Merops/extra/py_module/meshGroups.py | sho7noka/KARAS | e2f78551a45a9a899d3a32829b8686a88dca4b31 | [
"BSD-3-Clause"
] | 4 | 2018-05-19T13:49:12.000Z | 2019-05-06T12:47:50.000Z | Merops/extra/py_module/meshGroups.py | sho7noka/KARAS | e2f78551a45a9a899d3a32829b8686a88dca4b31 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# Creates a cube mesh with two mesh groups and assigns each a separate material
from pxr import *
filename = 'meshGroups'
stage = Usd.Stage.CreateNew('assets/'+filename+'.usd')
# create mesh
mesh = UsdGeom.Mesh.Define(stage, '/cube')
mesh.CreateSubdivisionSchemeAttr().Set(UsdGeom.Tokens.none)
mesh... | 48.944444 | 171 | 0.752932 |
c89e1ee03e0cd6877d9a647cc4f55867151d2888 | 96 | py | Python | testmaster/dummyprograms/error.py | S-P-A-N-N-E-R-S/Testmaster | e0804b30a6f77c136eca890e692ea54195a31bb9 | [
"BSD-3-Clause"
] | null | null | null | testmaster/dummyprograms/error.py | S-P-A-N-N-E-R-S/Testmaster | e0804b30a6f77c136eca890e692ea54195a31bb9 | [
"BSD-3-Clause"
] | null | null | null | testmaster/dummyprograms/error.py | S-P-A-N-N-E-R-S/Testmaster | e0804b30a6f77c136eca890e692ea54195a31bb9 | [
"BSD-3-Clause"
] | null | null | null | from decimal import DivisionByZero
try:
1/0
except DivisionByZero:
raise DivisionByZero | 16 | 34 | 0.78125 |
c716934a2608851f05dd11f2a268128cfa5283b0 | 551 | py | Python | cpc/geofiles/__init__.py | noaa-nws-cpc/cpc.geofiles | f335aa947e5993e9e6da90b540a07adcf2f2b1b8 | [
"CC0-1.0"
] | null | null | null | cpc/geofiles/__init__.py | noaa-nws-cpc/cpc.geofiles | f335aa947e5993e9e6da90b540a07adcf2f2b1b8 | [
"CC0-1.0"
] | null | null | null | cpc/geofiles/__init__.py | noaa-nws-cpc/cpc.geofiles | f335aa947e5993e9e6da90b540a07adcf2f2b1b8 | [
"CC0-1.0"
] | null | null | null | import shutil
from .exceptions import GeofilesError, LoadingError, ReadingError
def test_wgrib():
success = True
if not shutil.which('wgrib'):
success = False
print('wgrib not installed')
if not shutil.which('wgrib2'):
success = False
print('wgrib2 not installed')
if su... | 23.956522 | 69 | 0.69873 |
2f89ffb19c6c230c35dc8ad1826ad1bf2d3addd0 | 789 | py | Python | tests/test_wps_gr4j_cemaneige.py | davidcaron/raven | c8dd818e42b81120acf57cef0a340f42785074cf | [
"MIT"
] | null | null | null | tests/test_wps_gr4j_cemaneige.py | davidcaron/raven | c8dd818e42b81120acf57cef0a340f42785074cf | [
"MIT"
] | null | null | null | tests/test_wps_gr4j_cemaneige.py | davidcaron/raven | c8dd818e42b81120acf57cef0a340f42785074cf | [
"MIT"
] | null | null | null | import pytest
from pywps import Service
from pywps.tests import assert_response_success
from raven.processes import GR4JCemaNeigeProcess
from .common import client_for, TESTDATA, CFG_FILE
@pytest.mark.skip
class TestGR4JCemaNeigeProcess:
def test_simple(self):
client = client_for(Service(processes=[GR4J... | 34.304348 | 93 | 0.666667 |
4cc9d9f5a5870ad57e3c6785e927805a29a29ec7 | 18,969 | py | Python | etl/parsers/etw/Microsoft_Windows_ModernDeployment_Diagnostics_Provider.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 104 | 2020-03-04T14:31:31.000Z | 2022-03-28T02:59:36.000Z | etl/parsers/etw/Microsoft_Windows_ModernDeployment_Diagnostics_Provider.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 7 | 2020-04-20T09:18:39.000Z | 2022-03-19T17:06:19.000Z | etl/parsers/etw/Microsoft_Windows_ModernDeployment_Diagnostics_Provider.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 16 | 2020-03-05T18:55:59.000Z | 2022-03-01T10:19:28.000Z | # -*- coding: utf-8 -*-
"""
Microsoft-Windows-ModernDeployment-Diagnostics-Provider
GUID : bab3ad92-fb96-5902-450b-b8421bdec7bd
"""
from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct
from etl.utils import WString, CString, SystemTime, Guid
from et... | 30.995098 | 123 | 0.730929 |
e98f56cc9ccaac791b529a7ac8cc29c253c4214a | 11,259 | py | Python | tensorflow/targetDirectory/lib/python3.7/site-packages/tensorflow/python/platform/benchmark.py | amyhxqin/heartbit | ebb67349e90654e275760d081b80b343bd2f45eb | [
"MIT"
] | 1 | 2019-02-16T10:41:53.000Z | 2019-02-16T10:41:53.000Z | tensorflow/python/platform/benchmark.py | PedroLelis/tensorflow | 8852b0032ad49acbc59009776665c60f86c06f91 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/platform/benchmark.py | PedroLelis/tensorflow | 8852b0032ad49acbc59009776665c60f86c06f91 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.75 | 80 | 0.68292 |
24ee52499f1bb65a2a0eee7a36d016480db14fc2 | 39,487 | py | Python | external/openglcts/scripts/build_mustpass.py | aosp-caf-upstream/platform_external_deqp | c76160521ae25619f7e0f698673654faed55e057 | [
"Apache-2.0"
] | null | null | null | external/openglcts/scripts/build_mustpass.py | aosp-caf-upstream/platform_external_deqp | c76160521ae25619f7e0f698673654faed55e057 | [
"Apache-2.0"
] | null | null | null | external/openglcts/scripts/build_mustpass.py | aosp-caf-upstream/platform_external_deqp | c76160521ae25619f7e0f698673654faed55e057 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
#
# Copyright 2015 The Android Open Source Project
# Copyright (C) 2016 The Khronos Group Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the ... | 36.663881 | 219 | 0.651379 |
54c924a469011bdc73956ddd7eff9afaece6fc30 | 2,029 | py | Python | projects/migrations/0004_auto_20210722_1252.py | ThiraTheNerd/rankme | cbbf54509596ec8f498f06925095af7cca489988 | [
"MIT"
] | null | null | null | projects/migrations/0004_auto_20210722_1252.py | ThiraTheNerd/rankme | cbbf54509596ec8f498f06925095af7cca489988 | [
"MIT"
] | 1 | 2021-07-27T08:38:16.000Z | 2021-07-27T08:38:16.000Z | projects/migrations/0004_auto_20210722_1252.py | ThiraTheNerd/rankme | cbbf54509596ec8f498f06925095af7cca489988 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-22 12:52
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),
('projects', '0... | 47.186047 | 198 | 0.532282 |
dded1f82f3f39767a3e5d3e45d979502a85e0866 | 946 | py | Python | kubernetes/test/test_v1_node_affinity.py | iguazio/python | c2684bb479d44a49a2010ec4ede5ffa7b17349dd | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_node_affinity.py | iguazio/python | c2684bb479d44a49a2010ec4ede5ffa7b17349dd | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_node_affinity.py | iguazio/python | c2684bb479d44a49a2010ec4ede5ffa7b17349dd | [
"Apache-2.0"
] | 1 | 2019-01-10T11:13:52.000Z | 2019-01-10T11:13:52.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 21.022222 | 105 | 0.704017 |
2e92b452a6301c1a29b6e706aa0ff551470a561f | 9,894 | py | Python | UI/WinShow.py | ShowingCloud/Capricorn | cfe521975ca23f7502509595f1fd3f8c6c5e1c55 | [
"MIT"
] | null | null | null | UI/WinShow.py | ShowingCloud/Capricorn | cfe521975ca23f7502509595f1fd3f8c6c5e1c55 | [
"MIT"
] | null | null | null | UI/WinShow.py | ShowingCloud/Capricorn | cfe521975ca23f7502509595f1fd3f8c6c5e1c55 | [
"MIT"
] | null | null | null | from PySide import QtGui,QtCore
from UI import ui_mainWindow
from Device import protocol
from Models.EngineeringDB import ScriptData,IgnitorsData,ParametersData,FieldsData
from Models.LocalDB import ProjectsData
import Queue
import time
from datetime import datetime
from config import appdata
import tarfile, os, sys, s... | 39.106719 | 153 | 0.563877 |
d5b2aec294427534384bdcdc49b2370021a4a47a | 5,724 | py | Python | src/app.py | mfschumann/adguard-sync | d1a1749cd19b59eb1e69dbc4c1954d18dc48e42b | [
"Apache-2.0"
] | null | null | null | src/app.py | mfschumann/adguard-sync | d1a1749cd19b59eb1e69dbc4c1954d18dc48e42b | [
"Apache-2.0"
] | null | null | null | src/app.py | mfschumann/adguard-sync | d1a1749cd19b59eb1e69dbc4c1954d18dc48e42b | [
"Apache-2.0"
] | null | null | null | import requests
import os
import json
import time
ADGUARD_PRIMARY = os.environ['ADGUARD_PRIMARY']
ADGUARD_SECONDARY = os.environ['ADGUARD_SECONDARY']
ADGUARD_USER = os.environ['ADGUARD_USER']
ADGUARD_PASS = os.environ['ADGUARD_PASS']
# Optional, use if your secondary AdGuard has different credentials
SECONDARY_ADGUA... | 33.869822 | 121 | 0.595912 |
ba6704a8d2ba4069d68c40153b0251647030a0a3 | 3,870 | py | Python | tests/pgconfig_test.py | rustprooflabs/pgconfig-ce | 174ac0ce5296a7eb7825e8a9a58e3466d97d415d | [
"MIT"
] | 5 | 2020-10-17T14:19:37.000Z | 2021-11-24T18:59:32.000Z | tests/pgconfig_test.py | rustprooflabs/pgconfig-ce | 174ac0ce5296a7eb7825e8a9a58e3466d97d415d | [
"MIT"
] | 2 | 2021-03-02T23:40:58.000Z | 2021-06-08T01:12:27.000Z | tests/pgconfig_test.py | rustprooflabs/pgconfig-ce | 174ac0ce5296a7eb7825e8a9a58e3466d97d415d | [
"MIT"
] | 1 | 2021-03-01T08:50:01.000Z | 2021-03-01T08:50:01.000Z | """ Unit tests to cover the pgconfig module."""
import unittest
import pandas as pd
from webapp import pgconfig
CONFIG_DUPLICATED = """
listen_addresses = '0.0.0.0'
listen_addresses = '*'
listen_addresses = '123.456.12.3'
"""
CONFIG_NO_DUPS = """
listen_addresses = '*'
"""
CONFIG_WITH_EMPTY_LINE = """
listen_address... | 32.521008 | 87 | 0.699742 |
0aa221c608543d22ad715afd9cb143c1a1f9958f | 771 | py | Python | bab/stan_utils.py | volkale/bab | 265e2387fa1e55db9c77088d6c20140880f1da44 | [
"MIT"
] | 3 | 2020-01-17T06:04:42.000Z | 2022-02-03T12:38:13.000Z | bab/stan_utils.py | volkale/bab | 265e2387fa1e55db9c77088d6c20140880f1da44 | [
"MIT"
] | 2 | 2020-09-02T10:46:31.000Z | 2020-09-02T19:49:47.000Z | bab/stan_utils.py | volkale/bab | 265e2387fa1e55db9c77088d6c20140880f1da44 | [
"MIT"
] | 1 | 2020-08-30T16:46:59.000Z | 2020-08-30T16:46:59.000Z | from hashlib import md5
import logging
import os
import pickle
import pystan
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger()
logger.setLevel('INFO')
def stan_model_cache(model_file):
with open(model_file, 'r') as f:
model_code = f.read()
code_hash = md5(model_code.encode('ascii... | 25.7 | 59 | 0.671855 |
2cfa61bf5c067c602ff3956d25b3fe22f25c1467 | 6,604 | py | Python | yzw/spiders/schools.py | Edward-HE/yzw | 489d9c2f5d570996a29a1f5d3fa879d78d0e496c | [
"MIT"
] | null | null | null | yzw/spiders/schools.py | Edward-HE/yzw | 489d9c2f5d570996a29a1f5d3fa879d78d0e496c | [
"MIT"
] | null | null | null | yzw/spiders/schools.py | Edward-HE/yzw | 489d9c2f5d570996a29a1f5d3fa879d78d0e496c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import re
import traceback
import scrapy
from yzw.items import YzwItem
class SchoolsSpider(scrapy.Spider):
name = 'schools'
allowed_domains = ['chsi.com.cn']
start_urls = []
firstClassSubjectIndex = {}
st = {}
PROJECT_ROOT = os.path.dirname(os.path.dirname(o... | 44.026667 | 111 | 0.523168 |
5a075cf38a851c91ae4c916f00652d4c020fa6e9 | 16,040 | py | Python | tools/accuracy_checker/openvino/tools/accuracy_checker/evaluators/custom_evaluators/lpcnet_evaluator.py | alpkn/open_model_zoo | 15230340eea7677ea457560a3b3e16baedf4be8f | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/openvino/tools/accuracy_checker/evaluators/custom_evaluators/lpcnet_evaluator.py | alpkn/open_model_zoo | 15230340eea7677ea457560a3b3e16baedf4be8f | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/openvino/tools/accuracy_checker/evaluators/custom_evaluators/lpcnet_evaluator.py | alpkn/open_model_zoo | 15230340eea7677ea457560a3b3e16baedf4be8f | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2018-2022 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 47.176471 | 117 | 0.666708 |
491aca442767e28201d325043d6bf2fd20d4c404 | 393 | py | Python | Mastering Django source/section6/section6/wsgi.py | PacktPublishing/Mastering-Django-Web-Development | c4b18a4759f443e9dabdb81e13503737aa682bee | [
"MIT"
] | 5 | 2020-06-10T05:40:54.000Z | 2021-11-08T13:10:16.000Z | Mastering Django source/section6/section6/wsgi.py | PacktPublishing/Mastering-Django-Web-Development | c4b18a4759f443e9dabdb81e13503737aa682bee | [
"MIT"
] | null | null | null | Mastering Django source/section6/section6/wsgi.py | PacktPublishing/Mastering-Django-Web-Development | c4b18a4759f443e9dabdb81e13503737aa682bee | [
"MIT"
] | 3 | 2019-05-29T09:27:02.000Z | 2021-05-30T17:57:30.000Z | """
WSGI config for section6 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
bd3b2668ddfab869a99743b6950096b49f53063a | 388 | py | Python | vut/lib/python3.8/site-packages/pipenv/vendor/yaspin/base_spinner.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 6,263 | 2017-01-20T17:41:36.000Z | 2022-02-15T20:48:57.000Z | vut/lib/python3.8/site-packages/pipenv/vendor/yaspin/base_spinner.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 1,100 | 2017-01-20T19:41:52.000Z | 2017-12-06T09:15:13.000Z | vut/lib/python3.8/site-packages/pipenv/vendor/yaspin/base_spinner.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 366 | 2017-01-21T10:06:52.000Z | 2021-11-25T17:09:19.000Z | # -*- coding: utf-8 -*-
#
# :copyright: (c) 2020 by Pavlo Dmytrenko.
# :license: MIT, see LICENSE for more details.
"""
yaspin.base_spinner
~~~~~~~~~~~~~~~~~~~
Spinner class, used to construct other spinners.
"""
from __future__ import absolute_import
from collections import namedtuple
Spinner = namedtuple("Spinn... | 19.4 | 50 | 0.670103 |
3d2f158576e4c3d2b74f852c912df93e24d04404 | 8,339 | py | Python | openmdao/test_suite/parametric_suite.py | hwangjt/blue | 609defbe476c86a4a2eddd12977b47e649ea7f50 | [
"Apache-2.0"
] | null | null | null | openmdao/test_suite/parametric_suite.py | hwangjt/blue | 609defbe476c86a4a2eddd12977b47e649ea7f50 | [
"Apache-2.0"
] | null | null | null | openmdao/test_suite/parametric_suite.py | hwangjt/blue | 609defbe476c86a4a2eddd12977b47e649ea7f50 | [
"Apache-2.0"
] | null | null | null | from __future__ import division, print_function
import itertools
from six.moves import zip
from six import iteritems, iterkeys, itervalues, string_types
import collections
from parameterized import parameterized
from unittest import SkipTest
from openmdao.core.problem import Problem
from openmdao.jacobians.assembled... | 33.898374 | 103 | 0.612903 |
ae1673f34a48303c183870457d9b05066c23574b | 2,983 | py | Python | zaqar/cmd/server.py | mail2nsrajesh/zaqar | a68a03a228732050b33c2a7f35d1caa9f3467718 | [
"Apache-2.0"
] | null | null | null | zaqar/cmd/server.py | mail2nsrajesh/zaqar | a68a03a228732050b33c2a7f35d1caa9f3467718 | [
"Apache-2.0"
] | null | null | null | zaqar/cmd/server.py | mail2nsrajesh/zaqar | a68a03a228732050b33c2a7f35d1caa9f3467718 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 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 agreed to in writ... | 33.897727 | 75 | 0.668119 |
f3cc270abf04f11c777a3e7ab8ecc3b52329783a | 2,198 | py | Python | StanCode projects/boggle_game_solver/sierpinski.py | st5703/SC-Project | 09082354e7087c2f932ad8041a3cad36683e5801 | [
"MIT"
] | 2 | 2020-10-21T13:21:35.000Z | 2020-10-21T13:21:37.000Z | StanCode projects/boggle_game_solver/sierpinski.py | st5703/SC-Project | 09082354e7087c2f932ad8041a3cad36683e5801 | [
"MIT"
] | null | null | null | StanCode projects/boggle_game_solver/sierpinski.py | st5703/SC-Project | 09082354e7087c2f932ad8041a3cad36683e5801 | [
"MIT"
] | null | null | null | """
File: sierpinski.py
Name: Che-Hsien Chiu
---------------------------
This file recursively prints the Sierpinski triangle on GWindow.
The Sierpinski triangle is a fractal described in 1915 by Waclaw Sierpinski.
It is a self similar structure that occurs at different levels of iterations.
"""
from campy.graphics.gw... | 36.032787 | 100 | 0.730209 |
2864f4de81895ad1d7ef9e9675803709a6afb98e | 496 | py | Python | db_replication/mysql/mysql_logs_listener.py | agarwal-nitesh/db_replication | c412d9176fc2b633bd70a3ae2789f7fef288f1dd | [
"MIT"
] | 2 | 2018-08-17T15:15:01.000Z | 2018-09-18T04:16:09.000Z | db_replication/mysql/mysql_logs_listener.py | therudite/db_replication | c412d9176fc2b633bd70a3ae2789f7fef288f1dd | [
"MIT"
] | null | null | null | db_replication/mysql/mysql_logs_listener.py | therudite/db_replication | c412d9176fc2b633bd70a3ae2789f7fef288f1dd | [
"MIT"
] | 2 | 2018-10-03T09:37:36.000Z | 2019-07-31T02:13:58.000Z | from pymysqlreplication import BinLogStreamReader
from kafka_pub.kafka_pub import Pub
class MysqlLogsListener(object):
def __init__(self, mysqlsettings, serverid):
self.mysqlsettings = mysqlsettings
self.serverid = serverid
def run(self):
stream = BinLogStreamReader(
conn... | 24.8 | 51 | 0.667339 |
c094e5186145392f7f406d6a4e26ee1f91e83781 | 22,876 | py | Python | uhd_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_4f256c2aad08b4874b63c5f688afb1de.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | uhd_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_4f256c2aad08b4874b63c5f688afb1de.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | uhd_restpy/testplatform/sessions/ixnetwork/quicktest/testconfig_4f256c2aad08b4874b63c5f688afb1de.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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,... | 42.520446 | 431 | 0.636213 |
b8127a09bb7f187364502a8d9a0985ac49dc0e46 | 5,731 | py | Python | autofit/non_linear/samples/sample.py | rhayes777/PyAutoF | 87f56419348833b285b00da1a524e329588e0b01 | [
"MIT"
] | null | null | null | autofit/non_linear/samples/sample.py | rhayes777/PyAutoF | 87f56419348833b285b00da1a524e329588e0b01 | [
"MIT"
] | null | null | null | autofit/non_linear/samples/sample.py | rhayes777/PyAutoF | 87f56419348833b285b00da1a524e329588e0b01 | [
"MIT"
] | null | null | null | import csv
from typing import List
from autofit.mapper.prior_model.abstract import AbstractPriorModel
class Sample:
def __init__(
self,
log_likelihood: float,
log_prior: float,
weight: float,
kwargs=None
):
"""
One sample taken durin... | 25.471111 | 85 | 0.462921 |
3dd0361c669d34b5e1298549f51a041c28359160 | 10,209 | py | Python | distributed/queues.py | gerrymanoim/distributed | ac35e0f8104baaccfb44f98b67a48ee359069316 | [
"BSD-3-Clause"
] | null | null | null | distributed/queues.py | gerrymanoim/distributed | ac35e0f8104baaccfb44f98b67a48ee359069316 | [
"BSD-3-Clause"
] | null | null | null | distributed/queues.py | gerrymanoim/distributed | ac35e0f8104baaccfb44f98b67a48ee359069316 | [
"BSD-3-Clause"
] | null | null | null | import asyncio
import logging
import uuid
from collections import defaultdict
from dask.utils import stringify
from .client import Client, Future
from .utils import parse_timedelta, sync, thread_state
from .worker import get_client, get_worker
logger = logging.getLogger(__name__)
class QueueExtension:
"""An ex... | 34.72449 | 88 | 0.57655 |
7fb3e34750c88276eb9412446c95250f0d86e247 | 34,634 | py | Python | Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/nnvm/python/nnvm/frontend/darknet.py | mengkai94/training_results_v0.6 | 43dc3e250f8da47b5f8833197d74cb8cf1004fc9 | [
"Apache-2.0"
] | 64 | 2021-05-02T14:42:34.000Z | 2021-05-06T01:35:03.000Z | nnvm/python/nnvm/frontend/darknet.py | clhne/tvm | d59320c764bd09474775e1b292f3c05c27743d24 | [
"Apache-2.0"
] | 23 | 2019-07-29T05:21:52.000Z | 2020-08-31T18:51:42.000Z | nnvm/python/nnvm/frontend/darknet.py | clhne/tvm | d59320c764bd09474775e1b292f3c05c27743d24 | [
"Apache-2.0"
] | 51 | 2019-07-12T05:10:25.000Z | 2021-07-28T16:19:06.000Z | """
DarkNet symbol frontend.
"""
from __future__ import absolute_import as _abs
import numpy as np
import tvm
from .. import symbol as _sym
class LAYERTYPE(object):
"""Darknet LAYERTYPE Class constant."""
CONVOLUTIONAL = 0
DECONVOLUTIONAL = 1
CONNECTED = 2
MAXPOOL = 3
SOFTMAX = 4
DETECTION... | 38.610925 | 97 | 0.611018 |
8ffcca9432a127d16002bcc5aa79aef9ddf47f4a | 23,084 | py | Python | contrib/devtools/copyright_header.py | mulecore/mulecoin | e52131742938ae433463f32680837981a5cedc0f | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | mulecore/mulecoin | e52131742938ae433463f32680837981a5cedc0f | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | mulecore/mulecoin | e52131742938ae433463f32680837981a5cedc0f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Copyright (c) 2017-2019 The Raven Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import re
import fnmatch
import sys
import subprocess
impo... | 37.05297 | 92 | 0.605484 |
42087e11e3251d01ed776460687ef44d4770dd89 | 3,341 | py | Python | cmsplugin_rt/text_minimal_markup/migrations/0001_initial.py | RacingTadpole/cmsplugin-rt | e77192629fc5df4c1ce9d53611d67e94435b7d72 | [
"BSD-3-Clause"
] | 1 | 2015-09-28T10:10:32.000Z | 2015-09-28T10:10:32.000Z | cmsplugin_rt/text_minimal_markup/migrations/0001_initial.py | RacingTadpole/cmsplugin-rt | e77192629fc5df4c1ce9d53611d67e94435b7d72 | [
"BSD-3-Clause"
] | null | null | null | cmsplugin_rt/text_minimal_markup/migrations/0001_initial.py | RacingTadpole/cmsplugin-rt | e77192629fc5df4c1ce9d53611d67e94435b7d72 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'TextMinimalMarkupPluginModel'
db.create_table('cmsplugin_textminimalmarkuppluginmodel', (
... | 59.660714 | 156 | 0.6088 |
f6b82afcb7d62c1c6bbffa403ce63700e14c53d2 | 1,563 | py | Python | recipe/serializers.py | adityasingh108/api-advance | cca7686567b30bd9d7897d66887fdd760718ed4c | [
"MIT"
] | null | null | null | recipe/serializers.py | adityasingh108/api-advance | cca7686567b30bd9d7897d66887fdd760718ed4c | [
"MIT"
] | null | null | null | recipe/serializers.py | adityasingh108/api-advance | cca7686567b30bd9d7897d66887fdd760718ed4c | [
"MIT"
] | null | null | null | from django.db import models
from django.db.models import fields
from django.db.models.query import QuerySet
from core.models import Ingredient, Recipe, Tag
from rest_framework import serializers
class TagSerializer(serializers.ModelSerializer):
class Meta:
model = Tag
fields = ('id','name',)
... | 28.418182 | 91 | 0.630198 |
7fb8dfd6da70112677df978711d0c807f2300a4c | 3,771 | py | Python | src/pbn_api/models/sentdata.py | iplweb/bpp | f027415cc3faf1ca79082bf7bacd4be35b1a6fdf | [
"BSD-3-Clause"
] | null | null | null | src/pbn_api/models/sentdata.py | iplweb/bpp | f027415cc3faf1ca79082bf7bacd4be35b1a6fdf | [
"BSD-3-Clause"
] | 41 | 2019-11-07T00:07:02.000Z | 2022-02-27T22:09:39.000Z | src/pbn_api/models/sentdata.py | iplweb/bpp | f027415cc3faf1ca79082bf7bacd4be35b1a6fdf | [
"BSD-3-Clause"
] | null | null | null | from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.contrib.postgres.fields import JSONField
from bpp.models import LinkDoPBNMixin, const
class SentD... | 29.232558 | 106 | 0.63564 |
e10e3b5f9e3a5a5e893579d4f8ddf630319dfb54 | 1,667 | py | Python | shopping/customer/urls.py | pranavjandu/cashier-less-shopping | d067f4087f3c511d081aa798c5b185254b9e3517 | [
"MIT"
] | null | null | null | shopping/customer/urls.py | pranavjandu/cashier-less-shopping | d067f4087f3c511d081aa798c5b185254b9e3517 | [
"MIT"
] | null | null | null | shopping/customer/urls.py | pranavjandu/cashier-less-shopping | d067f4087f3c511d081aa798c5b185254b9e3517 | [
"MIT"
] | null | null | null | """shopping URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | 42.74359 | 79 | 0.709658 |
4614a87566f8eda9681485cda617aea2f916e7a1 | 7,309 | py | Python | pyiron_base/objects/server/queuestatus.py | OwenMcDonnell/pyiron_base | 16230ee6d456c5e01bc832673461b19bf3024e87 | [
"BSD-3-Clause"
] | null | null | null | pyiron_base/objects/server/queuestatus.py | OwenMcDonnell/pyiron_base | 16230ee6d456c5e01bc832673461b19bf3024e87 | [
"BSD-3-Clause"
] | null | null | null | pyiron_base/objects/server/queuestatus.py | OwenMcDonnell/pyiron_base | 16230ee6d456c5e01bc832673461b19bf3024e87 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department
# Distributed under the terms of "New BSD License", see the LICENSE file.
import subprocess
import pandas
import time
from pyiron_base.core.settings.generic import Settings
from pyiron_base.obje... | 34.804762 | 126 | 0.636612 |
c98218d65cc809e21b8e65d7ed1745e387c9084e | 9,468 | py | Python | sopel/modules/clock.py | paulmadore/funkshelper | cfe60ef4015381b6c4fb01e453523d571af0b2de | [
"EFL-2.0"
] | null | null | null | sopel/modules/clock.py | paulmadore/funkshelper | cfe60ef4015381b6c4fb01e453523d571af0b2de | [
"EFL-2.0"
] | null | null | null | sopel/modules/clock.py | paulmadore/funkshelper | cfe60ef4015381b6c4fb01e453523d571af0b2de | [
"EFL-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2008-9, Sean B. Palmer, inamidst.com
# Copyright 2012, Elsie Powell, embolalia.com
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division
import datetime
import time
try:
import pytz
except ImportError:
pytz = N... | 32.536082 | 142 | 0.619138 |
a7d5ab9d730a8f811a9d071317bbbfdf6ee1d23e | 311 | py | Python | shipyard2/shipyard2/rules/__init__.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | 3 | 2016-01-04T06:28:52.000Z | 2020-09-20T13:18:40.000Z | shipyard2/shipyard2/rules/__init__.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | shipyard2/shipyard2/rules/__init__.py | clchiou/garage | 446ff34f86cdbd114b09b643da44988cf5d027a3 | [
"MIT"
] | null | null | null | """Helpers for writing build rules."""
import logging
logging.getLogger(__name__).addHandler(logging.NullHandler())
def canonicalize_name_prefix(name_prefix):
if name_prefix:
if not name_prefix.endswith('/'):
name_prefix += '/'
return name_prefix
else:
return ''
| 20.733333 | 61 | 0.659164 |
1d0e3a49b1007557557daa69faea262eec46728a | 15,667 | py | Python | ENV/lib/python2.7/site-packages/flake8/processor.py | jupitercl/meatme-oscar-dev | 40583cbb3c6762640a403956e41bffac0bb2ad48 | [
"BSD-3-Clause"
] | null | null | null | ENV/lib/python2.7/site-packages/flake8/processor.py | jupitercl/meatme-oscar-dev | 40583cbb3c6762640a403956e41bffac0bb2ad48 | [
"BSD-3-Clause"
] | null | null | null | ENV/lib/python2.7/site-packages/flake8/processor.py | jupitercl/meatme-oscar-dev | 40583cbb3c6762640a403956e41bffac0bb2ad48 | [
"BSD-3-Clause"
] | null | null | null | """Module containing our file processor that tokenizes a file for checks."""
import contextlib
import io
import logging
import sys
import tokenize
import flake8
from flake8 import defaults
from flake8 import exceptions
from flake8 import utils
LOG = logging.getLogger(__name__)
PyCF_ONLY_AST = 1024
NEWLINE = frozenset... | 35.206742 | 78 | 0.592711 |
ca1b1341d54e28601f286dac05a3be4dcbcb7643 | 5,282 | py | Python | query-engine/tests/test_factory.py | visulate/visulate-for-oracle | 6b1cb656cf37f9aa9a3f6ece24efe241dad32b40 | [
"Apache-2.0"
] | null | null | null | query-engine/tests/test_factory.py | visulate/visulate-for-oracle | 6b1cb656cf37f9aa9a3f6ece24efe241dad32b40 | [
"Apache-2.0"
] | 78 | 2019-11-11T19:56:52.000Z | 2022-03-31T20:59:20.000Z | query-engine/tests/test_factory.py | pgoldtho/visulate-for-oracle | 87fce59a051ea578d259e90b9e0ccf6fe75f0e81 | [
"Apache-2.0"
] | 2 | 2019-12-15T15:09:35.000Z | 2020-09-10T16:39:05.000Z | from sql2csv import create_app
import os
import json
from base64 import b64encode
basedir = os.path.abspath(os.path.dirname(__file__))
conf_file = os.path.join(basedir, 'conftest.json')
with open(conf_file, "r") as file:
config = json.loads(file.read())
validEndpoint = config.get('validEndpoint')
validCredentials... | 44.386555 | 149 | 0.696895 |
b5be4516065f9962ffb5fe3aca2fa1e73ba3e729 | 3,081 | py | Python | AutomatedTesting/Gem/PythonTests/Physics/tests/Physics_UndoRedoWorksOnEntityWithPhysComponents.py | LB-ArturZieba/o3de | 441b334486a14132f49c69624e693c6a7885fafa | [
"Apache-2.0",
"MIT"
] | 1 | 2022-03-28T08:06:58.000Z | 2022-03-28T08:06:58.000Z | AutomatedTesting/Gem/PythonTests/Physics/tests/Physics_UndoRedoWorksOnEntityWithPhysComponents.py | LB-ArturZieba/o3de | 441b334486a14132f49c69624e693c6a7885fafa | [
"Apache-2.0",
"MIT"
] | null | null | null | AutomatedTesting/Gem/PythonTests/Physics/tests/Physics_UndoRedoWorksOnEntityWithPhysComponents.py | LB-ArturZieba/o3de | 441b334486a14132f49c69624e693c6a7885fafa | [
"Apache-2.0",
"MIT"
] | null | null | null | """
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
# Test case ID : C15425929
# Test Case Title : Verify that undo - redo operations do not create any error
# ... | 33.129032 | 101 | 0.689711 |
323a02805162a07c9a06c4c094a4f32c1cebc3fb | 723 | py | Python | spiderCrypto.py | 4ssef/public_spiderCrypto | f429edd6361afb3e928c2338d7196256c39a91de | [
"MIT"
] | 1 | 2022-03-05T06:06:17.000Z | 2022-03-05T06:06:17.000Z | spiderCrypto.py | 4ssef/public_spider_crypto | f429edd6361afb3e928c2338d7196256c39a91de | [
"MIT"
] | null | null | null | spiderCrypto.py | 4ssef/public_spider_crypto | f429edd6361afb3e928c2338d7196256c39a91de | [
"MIT"
] | null | null | null | from shutil import copyfile
from library.functions import *
projectPath = "C:/Users/youruser/path/to/spiderCrypto"
emailsPath = projectPath + "/emails"
btc = open(projectPath + "/btc.csv", 'a') # opens local .csv file on append mode
btcDrive = "G:/path/to/csvfile/in/cloudStorageApp/btcDrive.csv" # (Google Drive, Micro... | 48.2 | 115 | 0.764869 |
3bc4947ea5ad4a4d0bd6176458d8ad2df2696ad2 | 44,297 | py | Python | scripts/imagebuilder.py | Acidburn0zzz/cord | 21e4fe4aa5591b9581769cfeaa052749446a41ce | [
"Apache-2.0"
] | null | null | null | scripts/imagebuilder.py | Acidburn0zzz/cord | 21e4fe4aa5591b9581769cfeaa052749446a41ce | [
"Apache-2.0"
] | null | null | null | scripts/imagebuilder.py | Acidburn0zzz/cord | 21e4fe4aa5591b9581769cfeaa052749446a41ce | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 34.715517 | 79 | 0.529742 |
7347dac5d9eb2ce0187df84d4f9e463357126337 | 269 | tac | Python | website/production.tac | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 61 | 2015-11-10T17:13:46.000Z | 2021-08-06T17:58:30.000Z | website/production.tac | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 13 | 2015-11-11T07:49:41.000Z | 2021-06-09T03:45:31.000Z | website/production.tac | bopopescu/drawquest-web | 8d8f9149b6efeb65202809a5f8916386f58a1b3b | [
"BSD-3-Clause"
] | 18 | 2015-11-11T04:50:04.000Z | 2021-08-20T00:57:11.000Z | import sys
if sys.platform == 'linux2':
from twisted.internet import epollreactor
epollreactor.install()
from twisted.internet.protocol import Factory
from realtime.server import CanvasApp
Factory.noisy = False # Fuck off
application = CanvasApp(nginx=True)
| 22.416667 | 45 | 0.780669 |
e1fb48889d03d681f0406d8d126f67ad539121d2 | 1,398 | py | Python | detector/bbox_regressor.py | Donny3000/pyimagesearch_object_detector | 2ebcb7189540f996d26bec3a875ad50e677db678 | [
"MIT"
] | null | null | null | detector/bbox_regressor.py | Donny3000/pyimagesearch_object_detector | 2ebcb7189540f996d26bec3a875ad50e677db678 | [
"MIT"
] | null | null | null | detector/bbox_regressor.py | Donny3000/pyimagesearch_object_detector | 2ebcb7189540f996d26bec3a875ad50e677db678 | [
"MIT"
] | null | null | null | from torch.nn import Dropout
from torch.nn import Identity
from torch.nn import Linear
from torch.nn import Module
from torch.nn import ReLU
from torch.nn import Sequential
from torch.nn import Sigmoid
class ObjectDetector(Module):
def __init__(self, baseModel, numClasses):
super(ObjectDetector, self).__init__()
... | 25.888889 | 66 | 0.713162 |
e15254540722c083febbd0b93705d6346915cd15 | 2,020 | py | Python | walk-tracker.py | abrahamq/walk-tracker | e2836ebbd89df4a110679aea80fad79b38a1cd3d | [
"MIT"
] | null | null | null | walk-tracker.py | abrahamq/walk-tracker | e2836ebbd89df4a110679aea80fad79b38a1cd3d | [
"MIT"
] | null | null | null | walk-tracker.py | abrahamq/walk-tracker | e2836ebbd89df4a110679aea80fad79b38a1cd3d | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
from stravaio import strava_oauth2
from stravaio import StravaIO
load_dotenv()
# run this to get a browser w/ oauth flow
STRAVA_CLIENT_ID = os.environ['STRAVA_CLIENT_ID']
STRAVA_CLIENT_SECRET= os.environ['STRAVA_CLIENT_SECRET']
STRAVA_ACCESS_TOKEN= os.environ['STRAVA_ACCESS_... | 37.407407 | 168 | 0.745545 |
95603cf08a3495a80bd66206def4bb677a49b1f6 | 3,043 | py | Python | tests/domain/test_question.py | jdiazromeral/django-ddd-quizs-demo | 3cbb0ece8cc2440fd344069849c132c4b9502f5b | [
"MIT"
] | null | null | null | tests/domain/test_question.py | jdiazromeral/django-ddd-quizs-demo | 3cbb0ece8cc2440fd344069849c132c4b9502f5b | [
"MIT"
] | null | null | null | tests/domain/test_question.py | jdiazromeral/django-ddd-quizs-demo | 3cbb0ece8cc2440fd344069849c132c4b9502f5b | [
"MIT"
] | null | null | null | import uuid
from unittest import TestCase
from service.domain.answer import Answer
from service.domain.question import Question
from service.domain.skill_enum import SkillEnum
class TestQuestion(TestCase):
def setUp(self) -> None:
self.question_1 = Question(
id=uuid.uuid4(),
text=... | 33.43956 | 88 | 0.648045 |
ae64ced0a42c9a3345d9ff879b7584eadd6750bd | 603 | py | Python | tamcolors/tests/utils_tests/compress_tests.py | cmcmarrow/tamcolors | 65a5f2455bbe35a739b98d14af158c3df7feb786 | [
"Apache-2.0"
] | 29 | 2020-07-17T23:46:17.000Z | 2022-02-06T05:36:44.000Z | tamcolors/tests/utils_tests/compress_tests.py | sudo-nikhil/tamcolors | 65a5f2455bbe35a739b98d14af158c3df7feb786 | [
"Apache-2.0"
] | 42 | 2020-07-25T19:39:52.000Z | 2021-02-24T01:19:58.000Z | tamcolors/tests/utils_tests/compress_tests.py | sudo-nikhil/tamcolors | 65a5f2455bbe35a739b98d14af158c3df7feb786 | [
"Apache-2.0"
] | 8 | 2020-07-18T23:02:48.000Z | 2020-12-30T04:07:35.000Z | # built in libraries
import unittest
# tamcolors libraries
from tamcolors.utils import compress
class CompressTests(unittest.TestCase):
def test_1(self):
self._compress_and_compare(bytes((12,)))
def test_2(self):
self._compress_and_compare(bytes(1237))
def test_3(self):
self._co... | 26.217391 | 80 | 0.688226 |
74e4c4271f54547709c2b12a7ae0747d2f7dc4b3 | 1,827 | py | Python | ORStools/common/__init__.py | Mappboy/orstools-qgis-plugin | 07cac3f331cd96cc12c8555b01d84d75bda7970d | [
"MIT"
] | null | null | null | ORStools/common/__init__.py | Mappboy/orstools-qgis-plugin | 07cac3f331cd96cc12c8555b01d84d75bda7970d | [
"MIT"
] | null | null | null | ORStools/common/__init__.py | Mappboy/orstools-qgis-plugin | 07cac3f331cd96cc12c8555b01d84d75bda7970d | [
"MIT"
] | 1 | 2020-10-13T22:37:52.000Z | 2020-10-13T22:37:52.000Z | # -*- coding: utf-8 -*-
"""
/***************************************************************************
ORStools
A QGIS plugin
QGIS client to query openrouteservice
-------------------
begin : 2017-02-01
git sha ... | 39.717391 | 77 | 0.403394 |
d60bb6d878859b5d0e27ea8ab62160f92688f2a1 | 1,933 | py | Python | sample.py | jjj-design/pyhees | d63e7cd84abfc2f509bc1cd1256598a10aac1825 | [
"MIT"
] | null | null | null | sample.py | jjj-design/pyhees | d63e7cd84abfc2f509bc1cd1256598a10aac1825 | [
"MIT"
] | 3 | 2022-01-04T07:29:52.000Z | 2022-03-19T08:02:51.000Z | sample.py | jjj-design/pyhees | d63e7cd84abfc2f509bc1cd1256598a10aac1825 | [
"MIT"
] | 2 | 2022-01-19T07:57:10.000Z | 2022-03-07T00:25:54.000Z | from pyhees.section2_1 import calc_E_T
if __name__ == '__main__':
spec = {"region": 6, "type": "一般住宅", "reference": {"reference_year": None
}, "tatekata": "戸建住宅", "sol_region": None, "A_A": 120.08, "A_MR": 29.81, "A_OR": 51.34, "NV_MR": 0, "NV_OR": 0, "TS": False, "r_A_ufvnt": None, "underfloor_insulation... | 92.047619 | 359 | 0.615106 |
a0c9934f4ea9b1fab20369ab3256e1a1210922f4 | 214 | py | Python | electra/electra/doctype/cost_estimation/test_cost_estimation.py | thispl/electra | eb52364cc6949924c0665be31d560d758bf5f8e5 | [
"MIT"
] | null | null | null | electra/electra/doctype/cost_estimation/test_cost_estimation.py | thispl/electra | eb52364cc6949924c0665be31d560d758bf5f8e5 | [
"MIT"
] | null | null | null | electra/electra/doctype/cost_estimation/test_cost_estimation.py | thispl/electra | eb52364cc6949924c0665be31d560d758bf5f8e5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, TeamPRO and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestCostEstimation(unittest.TestCase):
pass
| 19.454545 | 46 | 0.766355 |
a8ab80687ad25849548d66d8eb382116a8a8ebaf | 529 | py | Python | examples/05 - Avoid intermediate outputs/intermediateBad.py | ordasf/pythonperformance2 | e9e0e763320af7e65330f8cd10a587f9ce253bda | [
"MIT"
] | null | null | null | examples/05 - Avoid intermediate outputs/intermediateBad.py | ordasf/pythonperformance2 | e9e0e763320af7e65330f8cd10a587f9ce253bda | [
"MIT"
] | null | null | null | examples/05 - Avoid intermediate outputs/intermediateBad.py | ordasf/pythonperformance2 | e9e0e763320af7e65330f8cd10a587f9ce253bda | [
"MIT"
] | null | null | null | import config
import time
my_config = config.get_config()
number_of_loops = my_config.getint("Global", "number_of_loops")
def intermediate_testing():
for loop_count in range(number_of_loops):
print('Hi')
print('How')
print('Are')
print('You')
def intermediate_no_print_testing():... | 18.892857 | 63 | 0.642722 |
1fabe3e2847c30b13a6de25b1f99fef1a3d74b23 | 5,735 | py | Python | tests/hwsim/test_suite_b.py | AMacedoP/hostapd | d0a6ec203295372342093abcf4eca7caa45acda5 | [
"Unlicense"
] | 4 | 2015-06-18T05:25:10.000Z | 2019-07-09T13:57:28.000Z | tests/hwsim/test_suite_b.py | AMacedoP/hostapd | d0a6ec203295372342093abcf4eca7caa45acda5 | [
"Unlicense"
] | null | null | null | tests/hwsim/test_suite_b.py | AMacedoP/hostapd | d0a6ec203295372342093abcf4eca7caa45acda5 | [
"Unlicense"
] | null | null | null | # Suite B tests
# Copyright (c) 2014-2015, Jouni Malinen <j@w1.fi>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import time
import logging
logger = logging.getLogger()
import hostapd
from utils import HwsimSkip
def test_suite_b(dev, apdev):
"""WPA2-PSK/G... | 43.778626 | 78 | 0.593374 |
b73640e62f9495d5ba02f3524b48c1f2de0665cf | 41,312 | py | Python | vispy/gloo/glir.py | robmcmullen/vispy | 8d5092fdae4a24fc364ae51c7e34e12d3fd6d0a2 | [
"BSD-3-Clause"
] | null | null | null | vispy/gloo/glir.py | robmcmullen/vispy | 8d5092fdae4a24fc364ae51c7e34e12d3fd6d0a2 | [
"BSD-3-Clause"
] | null | null | null | vispy/gloo/glir.py | robmcmullen/vispy | 8d5092fdae4a24fc364ae51c7e34e12d3fd6d0a2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | 38.075576 | 80 | 0.561096 |
b98e3542dde29a227e5cf8c9fee6d9dbe1b564bc | 1,867 | py | Python | envisage/ui/tasks/task_window.py | robmcmullen/envisage | 57338fcb0ea69c75bc3c86de18a5967d8e78c6c1 | [
"BSD-3-Clause"
] | null | null | null | envisage/ui/tasks/task_window.py | robmcmullen/envisage | 57338fcb0ea69c75bc3c86de18a5967d8e78c6c1 | [
"BSD-3-Clause"
] | null | null | null | envisage/ui/tasks/task_window.py | robmcmullen/envisage | 57338fcb0ea69c75bc3c86de18a5967d8e78c6c1 | [
"BSD-3-Clause"
] | null | null | null |
# Enthought library imports.
from pyface.image_resource import ImageResource
from pyface.tasks.api import TaskWindow as PyfaceTaskWindow
from traits.api import Instance, Property
# Local imports.
from envisage._compat import unicode_str
class TaskWindow(PyfaceTaskWindow):
""" A TaskWindow for use with the Envis... | 32.754386 | 79 | 0.577397 |
1721e02792be0a7fcef7af01cc3a2758a14c19a2 | 552 | py | Python | gh/ghfacecamera.py | tkahng/trkRhinoPython | a7d11ed1007355393c141d1584528a49951cbab4 | [
"MIT"
] | null | null | null | gh/ghfacecamera.py | tkahng/trkRhinoPython | a7d11ed1007355393c141d1584528a49951cbab4 | [
"MIT"
] | null | null | null | gh/ghfacecamera.py | tkahng/trkRhinoPython | a7d11ed1007355393c141d1584528a49951cbab4 | [
"MIT"
] | 2 | 2020-11-05T22:24:10.000Z | 2021-06-20T17:02:38.000Z | # input is guid of referenced block
import rhinoscriptsyntax as rs
import ghpythonlib.treehelpers as th
import scriptcontext as sc
import Rhino as rc
sc.doc = rc.RhinoDoc.ActiveDoc
cameraPos = rs.ViewCamera()
cameraPos.Z = 0
xform = rs.BlockInstanceXform(x)
plane = rs.PlaneTransform(rs.WorldXYPlane(), xform)
view... | 15.333333 | 52 | 0.751812 |
a14e98ed791faa77356d8d637c8d8dbe4ba5ff95 | 1,123 | py | Python | examples/pbr.py | mmhhkk123/easy_pbr | ca1b01d24d1ab8b4c6e160c8e00f4acd0bbff5d9 | [
"MIT"
] | 13 | 2020-01-07T15:31:30.000Z | 2022-01-24T22:30:42.000Z | examples/pbr.py | mmhhkk123/easy_pbr | ca1b01d24d1ab8b4c6e160c8e00f4acd0bbff5d9 | [
"MIT"
] | 6 | 2020-01-07T13:14:33.000Z | 2021-03-02T10:33:47.000Z | examples/pbr.py | mmhhkk123/easy_pbr | ca1b01d24d1ab8b4c6e160c8e00f4acd0bbff5d9 | [
"MIT"
] | 3 | 2019-12-16T14:43:18.000Z | 2022-02-28T17:20:35.000Z | #!/usr/bin/env python3
try:
import torch
except ImportError:
pass
from easypbr import *
config_file="./config/pbr.cfg"
view=Viewer.create(config_file)
#puts the camera in a nicer view than default. You can also comment these two lines and EasyPBR will place the camera by default for you so that the scene is fu... | 31.194444 | 171 | 0.699911 |
8bbe5ef3c5497e421976e6e175ec1c175ef92026 | 4,787 | py | Python | asmaefinal.py | fireman0865/BIG-DATA | 0600098f2c6545a3830181023246b906984b4c62 | [
"Apache-2.0"
] | null | null | null | asmaefinal.py | fireman0865/BIG-DATA | 0600098f2c6545a3830181023246b906984b4c62 | [
"Apache-2.0"
] | null | null | null | asmaefinal.py | fireman0865/BIG-DATA | 0600098f2c6545a3830181023246b906984b4c62 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pyspark
import matplotlib.pyplot as plt
# In[131]:
from wordcloud import WordCloud
# In[2]:
import csv
# In[121]:
import numpy as np
# In[3]:
import pandas as pd
# In[4]:
from pyspark import SparkConf,SparkContext,SQLContext
# In[5]:
from ... | 11.507212 | 225 | 0.659494 |
0682a071cd11ec8d8956fd0bcb06b77fe5ca9a7b | 662 | py | Python | batchglm/train/tf1/base_glm_all/external.py | le-ander/batchglm | 31b905b99b6baa7c94b82550d6a74f00d81966ea | [
"BSD-3-Clause"
] | null | null | null | batchglm/train/tf1/base_glm_all/external.py | le-ander/batchglm | 31b905b99b6baa7c94b82550d6a74f00d81966ea | [
"BSD-3-Clause"
] | null | null | null | batchglm/train/tf1/base_glm_all/external.py | le-ander/batchglm | 31b905b99b6baa7c94b82550d6a74f00d81966ea | [
"BSD-3-Clause"
] | null | null | null | import batchglm.data as data_utils
import batchglm.train.tf1.train as train_utils
from batchglm.train.tf1.base import TFEstimatorGraph, _TFEstimator
from batchglm.train.tf1.base_glm import GradientGraphGLM, NewtonGraphGLM, TrainerGraphGLM, EstimatorGraphGLM, FullDataModelGraphGLM, BatchedDataModelGraphGLM, BasicModelG... | 50.923077 | 177 | 0.86858 |
53b26cc16f3ae256bc9fa55e7f8e13a9e256a742 | 956 | py | Python | mastertickets/tests/model.py | aroth-arsoft/trac-mastertickets | 09c17e0ae030cd8725f58a73ab4e6db12bea55ae | [
"BSD-3-Clause"
] | null | null | null | mastertickets/tests/model.py | aroth-arsoft/trac-mastertickets | 09c17e0ae030cd8725f58a73ab4e6db12bea55ae | [
"BSD-3-Clause"
] | null | null | null | mastertickets/tests/model.py | aroth-arsoft/trac-mastertickets | 09c17e0ae030cd8725f58a73ab4e6db12bea55ae | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2007-2012 Noah Kantrowitz <noah@coderanger.net>
# Copyright (c) 2013-2016 Ryan J Ollos <ryan.j.ollos@gmail.com>
#
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
import shut... | 23.9 | 72 | 0.669456 |
2e47473b261b3575050828c5aa749bdc9d5b0a8f | 3,415 | py | Python | tethys_gizmos/gizmo_options/range_slider.py | rfun/tethys | a19df1658c0e525ef8b0442df6a23c3fd067551b | [
"BSD-2-Clause"
] | 79 | 2015-10-05T13:13:28.000Z | 2022-02-01T12:30:33.000Z | tethys_gizmos/gizmo_options/range_slider.py | rfun/tethys | a19df1658c0e525ef8b0442df6a23c3fd067551b | [
"BSD-2-Clause"
] | 542 | 2015-08-12T22:11:32.000Z | 2022-03-29T22:18:08.000Z | tethys_gizmos/gizmo_options/range_slider.py | rfun/tethys | a19df1658c0e525ef8b0442df6a23c3fd067551b | [
"BSD-2-Clause"
] | 71 | 2016-01-16T01:03:41.000Z | 2022-03-31T17:55:54.000Z | """
********************************************************************************
* Name: range_slider.py
* Author: Nathan Swain and Ezra Rice
* Created On: May 2015
* Copyright: (c) Brigham Young University 2015
* License: BSD 2-Clause
********************************************************************************... | 33.480392 | 197 | 0.532064 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.