hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
db767c65011a681c58dbf51cac2c345033142ec5 | 4,500 | py | Python | sdk/python/pulumi_azure_native/documentdb/v20200601preview/list_database_account_keys.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20200601preview/list_database_account_keys.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20200601preview/list_database_account_keys.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 42.857143 | 165 | 0.722444 |
12fa3e1d30572ae37a24e15b16de01fb45ad622b | 9,733 | py | Python | lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py | MochalovaAn/llvm | 528aa5ca4aa9df447dc3497ef19da3b124e88d7d | [
"Apache-2.0"
] | 1 | 2021-02-17T04:40:38.000Z | 2021-02-17T04:40:38.000Z | lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py | MochalovaAn/llvm | 528aa5ca4aa9df447dc3497ef19da3b124e88d7d | [
"Apache-2.0"
] | null | null | null | lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py | MochalovaAn/llvm | 528aa5ca4aa9df447dc3497ef19da3b124e88d7d | [
"Apache-2.0"
] | null | null | null | """
Test lldb-vscode setBreakpoints request
"""
from __future__ import print_function
import unittest2
import vscode
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import lldbvscode_testcase
def make_buffer_verify_dict(start_idx, count, offset=0):
... | 43.450893 | 78 | 0.5468 |
1de8a29d2b9bcf0b7955bd0dddc04118a6074287 | 42 | py | Python | ch6/review1.py | hajin-kim/2020-HighSchool-Python-Tutoring | 352025a954bff37d21cc3d59e7d5e0f0269a1f17 | [
"MIT"
] | null | null | null | ch6/review1.py | hajin-kim/2020-HighSchool-Python-Tutoring | 352025a954bff37d21cc3d59e7d5e0f0269a1f17 | [
"MIT"
] | null | null | null | ch6/review1.py | hajin-kim/2020-HighSchool-Python-Tutoring | 352025a954bff37d21cc3d59e7d5e0f0269a1f17 | [
"MIT"
] | null | null | null | print("์๋
ํ์ธ์?")
print("์ ์ด๋ฆ์ ๊นํ์ง ์
๋๋ค.")
| 8.4 | 23 | 0.595238 |
9b48dd7a5e4bdd8bf86aca1b924331c854d9f28f | 9,927 | py | Python | mindspore/nn/probability/distribution/bernoulli.py | Joejiong/mindspore | 083fd6565cab1aa1d3114feeacccf1cba0d55e80 | [
"Apache-2.0"
] | null | null | null | mindspore/nn/probability/distribution/bernoulli.py | Joejiong/mindspore | 083fd6565cab1aa1d3114feeacccf1cba0d55e80 | [
"Apache-2.0"
] | null | null | null | mindspore/nn/probability/distribution/bernoulli.py | Joejiong/mindspore | 083fd6565cab1aa1d3114feeacccf1cba0d55e80 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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 applicable law or agreed to... | 37.602273 | 102 | 0.556764 |
6b92622d31572ad8b547fc0e3904e16aba021716 | 1,187 | py | Python | Python Emulation/code.py | NevynUK/ManchesterBabyPython | 1b3a1192c48af23b2b8bc51e55da66cd1c17f73d | [
"MIT"
] | 1 | 2021-01-30T18:01:02.000Z | 2021-01-30T18:01:02.000Z | Python Emulation/code.py | NevynUK/ManchesterBabyPython | 1b3a1192c48af23b2b8bc51e55da66cd1c17f73d | [
"MIT"
] | null | null | null | Python Emulation/code.py | NevynUK/ManchesterBabyPython | 1b3a1192c48af23b2b8bc51e55da66cd1c17f73d | [
"MIT"
] | 2 | 2020-11-13T12:32:16.000Z | 2021-01-30T17:38:10.000Z | #
# System and external libraries.
#
import time
import board
import busio
from digitalio import DigitalInOut, Direction, Pull
#
# Project libraries.
#
from RGBMatrixDisplayTube import RGBMatrixDisplayTube
from ManchesterBaby import ManchesterBaby
from UserInterface import UserInterface
displayTube = RGBMatrixDis... | 25.255319 | 123 | 0.714406 |
eef23cb0a48e861a50ebe9502b70a9e0a97ec4ec | 2,961 | py | Python | tests/test_consul_service.py | LaEmma/sparrow_cloud | fb9f76ea70b3ba5782c33f3b3379e2ffe4bab08c | [
"MIT"
] | 15 | 2019-09-24T09:32:32.000Z | 2021-12-30T08:07:41.000Z | tests/test_consul_service.py | LaEmma/sparrow_cloud | fb9f76ea70b3ba5782c33f3b3379e2ffe4bab08c | [
"MIT"
] | 13 | 2019-09-06T03:20:02.000Z | 2021-09-27T03:37:25.000Z | tests/test_consul_service.py | LaEmma/sparrow_cloud | fb9f76ea70b3ba5782c33f3b3379e2ffe4bab08c | [
"MIT"
] | 17 | 2019-09-02T06:31:05.000Z | 2021-10-08T04:23:23.000Z | # import os
# import unittest
# from unittest import mock
# from sparrow_cloud.registry.service_discovery import consul_service
# from django.core.exceptions import ImproperlyConfigured
#
# # ไธ SPARROW_SERVICE_REGISTER_NAME ๅฏนๅบ็ _HOST
# SPARROW_SERVICE_REGISTER_NAME_HOST = "162.23.7.247:8001"
#
#
# SERVICE_CONF = {
# ... | 33.269663 | 84 | 0.611618 |
9d9bebc7b1e672f8c829930fd60fdc9838383f91 | 1,261 | py | Python | util.py | jonathonmcmurray/tvsorter | 5eec943c81dd0bce4d52ec226d717cc4906194d1 | [
"MIT"
] | null | null | null | util.py | jonathonmcmurray/tvsorter | 5eec943c81dd0bce4d52ec226d717cc4906194d1 | [
"MIT"
] | null | null | null | util.py | jonathonmcmurray/tvsorter | 5eec943c81dd0bce4d52ec226d717cc4906194d1 | [
"MIT"
] | null | null | null | def mineach(x,y):
"""
Return a dictionary with min for each key
"""
# output dictionary, intially empty
o = {}
# complete set of keys
ks = set(list(x.keys()) + list(y.keys()))
# iterate over each key
for k in ks:
# if in both, take the min of the two
if k in x.keys() ... | 28.659091 | 92 | 0.521015 |
4bf0bb5e9080246fc0b9c0032c22b39520e9b2fa | 9,324 | py | Python | tests/fields/test_types.py | LucidDan/strawberry-graphql-django | c48652f4ecc2434384be66894feefddb3975ace5 | [
"MIT"
] | null | null | null | tests/fields/test_types.py | LucidDan/strawberry-graphql-django | c48652f4ecc2434384be66894feefddb3975ace5 | [
"MIT"
] | null | null | null | tests/fields/test_types.py | LucidDan/strawberry-graphql-django | c48652f4ecc2434384be66894feefddb3975ace5 | [
"MIT"
] | null | null | null | import datetime
import decimal
import enum
import uuid
from typing import List
import django
import pytest
import strawberry
from django.db import models
from strawberry.enum import EnumDefinition, EnumValue
from strawberry.type import StrawberryList, StrawberryOptional
import strawberry_django
from strawberry_django... | 26.117647 | 85 | 0.597169 |
51b93500871378b3618cc40d5821263872ade357 | 137 | py | Python | agent/maestro_agent/services/running_test/handlers/__init__.py | Farfetch/maestro | 837d93866123aea8b90ad0e2aaf3f13bf3ef6907 | [
"MIT"
] | 21 | 2022-02-02T11:52:14.000Z | 2022-02-06T02:44:16.000Z | agent/maestro_agent/services/running_test/handlers/__init__.py | Farfetch/maestro | 837d93866123aea8b90ad0e2aaf3f13bf3ef6907 | [
"MIT"
] | 78 | 2022-02-02T12:13:12.000Z | 2022-03-29T08:10:42.000Z | agent/maestro_agent/services/running_test/handlers/__init__.py | Farfetch/maestro | 837d93866123aea8b90ad0e2aaf3f13bf3ef6907 | [
"MIT"
] | null | null | null | # flake8: noqa: F401
from .collect_metrics import collect_metrics_handler
from .run_jmeter_container import run_jmeter_container_handler
| 34.25 | 62 | 0.875912 |
cd7f9a1fbe256b92a560e93af766f4dc705bae63 | 114 | py | Python | epic_barcoder/__init__.py | manutamminen/epic_barcoder | a9055539fe89fb77bb9661926da1da80691b775d | [
"MIT"
] | null | null | null | epic_barcoder/__init__.py | manutamminen/epic_barcoder | a9055539fe89fb77bb9661926da1da80691b775d | [
"MIT"
] | null | null | null | epic_barcoder/__init__.py | manutamminen/epic_barcoder | a9055539fe89fb77bb9661926da1da80691b775d | [
"MIT"
] | null | null | null | from .epic_barcoder import process_barcode_info, add_otus_to_fasta, run_array_job, run_batch_job, make_split_dict
| 57 | 113 | 0.885965 |
ea51aa8fd7299cf95713f9eb54fa0c84f5d3aad1 | 20,113 | py | Python | logging/tests/system/test_system.py | conwaychriscosmo/google-cloud-python | 8e7b7f8a5f4bb04d13f4d88ec3848f017faf834a | [
"Apache-2.0"
] | 1 | 2019-03-26T21:44:51.000Z | 2019-03-26T21:44:51.000Z | logging/tests/system/test_system.py | conwaychriscosmo/google-cloud-python | 8e7b7f8a5f4bb04d13f4d88ec3848f017faf834a | [
"Apache-2.0"
] | 40 | 2019-07-16T10:04:48.000Z | 2020-01-20T09:04:59.000Z | logging/tests/system/test_system.py | conwaychriscosmo/google-cloud-python | 8e7b7f8a5f4bb04d13f4d88ec3848f017faf834a | [
"Apache-2.0"
] | 2 | 2019-07-18T00:05:31.000Z | 2019-11-27T14:17:22.000Z | # Copyright 2016 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, s... | 37.246296 | 88 | 0.67956 |
36ec292bc1aef92588dcd9e69811a7d29a1020e4 | 784 | py | Python | source_code/central_monitor/api/permissions.py | Doctor-Venom/Cyber-Oracle | 0cc3475416ea552704f4b1086d850fa90117ccc6 | [
"MIT"
] | null | null | null | source_code/central_monitor/api/permissions.py | Doctor-Venom/Cyber-Oracle | 0cc3475416ea552704f4b1086d850fa90117ccc6 | [
"MIT"
] | null | null | null | source_code/central_monitor/api/permissions.py | Doctor-Venom/Cyber-Oracle | 0cc3475416ea552704f4b1086d850fa90117ccc6 | [
"MIT"
] | null | null | null | from rest_framework import permissions
import json
from pathlib import Path
from django.conf import settings
#https://stackoverflow.com/questions/55081085/validate-user-on-update-request-in-django-rest-framework
class RequestTypesWhitelist(permissions.BasePermission):
"""
Global permission to allow only POST a... | 43.555556 | 174 | 0.715561 |
08954b24a13379a53987ac42c77c2ef75ede8085 | 16,671 | py | Python | sherlock/__init__.py | mirrorrim/sherlock | 8910450e07a2b91495119ba0362e4ffd9c81b562 | [
"MIT"
] | null | null | null | sherlock/__init__.py | mirrorrim/sherlock | 8910450e07a2b91495119ba0362e4ffd9c81b562 | [
"MIT"
] | null | null | null | sherlock/__init__.py | mirrorrim/sherlock | 8910450e07a2b91495119ba0362e4ffd9c81b562 | [
"MIT"
] | null | null | null | '''
Sherlock: Distributed Locks with a choice of backend
====================================================
:mod:`sherlock` is a library that provides easy-to-use distributed inter-process
locks and also allows you to choose a backend of your choice for lock
synchronization.
|Build Status| |Coverage Status|
.. |Bu... | 34.876569 | 100 | 0.611361 |
0b5860e2bfdd4fddf0610432e532257b45cc1d1e | 42 | py | Python | asy_rabbitmq/__init__.py | sasano8/asy_rabbitmq | efeca681378c09b431a9b644be5723fa73dcf5c0 | [
"MIT"
] | null | null | null | asy_rabbitmq/__init__.py | sasano8/asy_rabbitmq | efeca681378c09b431a9b644be5723fa73dcf5c0 | [
"MIT"
] | null | null | null | asy_rabbitmq/__init__.py | sasano8/asy_rabbitmq | efeca681378c09b431a9b644be5723fa73dcf5c0 | [
"MIT"
] | null | null | null | from .app import Consumer, Task, Rabbitmq
| 21 | 41 | 0.785714 |
2dd4cc50e1ceb80ca83ff3c4460be1b88c914bef | 20,084 | py | Python | nncf/torch/quantization/metrics.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | null | null | null | nncf/torch/quantization/metrics.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | null | null | null | nncf/torch/quantization/metrics.py | xiao1228/nncf | 307262119ee3f50eec2fa4022b2ef96693fd8448 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2021 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 writin... | 47.819048 | 115 | 0.673471 |
e2e2663d03282bb1b8f5bb22901888737ad4c16c | 1,784 | py | Python | examples/Mentor/07.1.BasicTexture.py | cclauss/pivy | 55de2ba4dd32f62ce2d4e33ca28459cf3ea5167a | [
"ISC"
] | 29 | 2019-12-28T10:37:16.000Z | 2022-02-09T10:48:04.000Z | examples/Mentor/07.1.BasicTexture.py | cclauss/pivy | 55de2ba4dd32f62ce2d4e33ca28459cf3ea5167a | [
"ISC"
] | 29 | 2019-12-26T13:46:11.000Z | 2022-03-29T18:14:33.000Z | examples/Mentor/07.1.BasicTexture.py | cclauss/pivy | 55de2ba4dd32f62ce2d4e33ca28459cf3ea5167a | [
"ISC"
] | 17 | 2019-12-29T11:49:32.000Z | 2022-02-23T00:28:18.000Z | #!/usr/bin/env python
###
# Copyright (c) 2002-2007 Systems in Motion
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS I... | 28.31746 | 74 | 0.721413 |
41483b1840600be7f4552ab7a62181b66de1a109 | 567 | py | Python | otcore/relation/migrations/0003_auto_20160519_1638.py | NYULibraries/dlts-enm-tct-backend | 07455a660fb2cb8bc91a54f7f12d150923678157 | [
"Apache-2.0"
] | null | null | null | otcore/relation/migrations/0003_auto_20160519_1638.py | NYULibraries/dlts-enm-tct-backend | 07455a660fb2cb8bc91a54f7f12d150923678157 | [
"Apache-2.0"
] | 2 | 2017-10-30T21:19:07.000Z | 2017-10-31T18:06:30.000Z | otcore/relation/migrations/0003_auto_20160519_1638.py | NYULibraries/dlts-enm-tct-backend | 07455a660fb2cb8bc91a54f7f12d150923678157 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-19 20:38
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('relation', '0002_auto_20160519_1149'),
]
operations = [
migrations.RemoveFie... | 22.68 | 53 | 0.59612 |
f19d25b45f00ef0ccc3c1dba69c294eab8a2f567 | 3,290 | py | Python | demo_queries.py | lucaswerkmeister/python-mwapi | 756b815cceeb77eca4128ca642e8046a6dee1f0d | [
"MIT"
] | null | null | null | demo_queries.py | lucaswerkmeister/python-mwapi | 756b815cceeb77eca4128ca642e8046a6dee1f0d | [
"MIT"
] | null | null | null | demo_queries.py | lucaswerkmeister/python-mwapi | 756b815cceeb77eca4128ca642e8046a6dee1f0d | [
"MIT"
] | null | null | null | """
Query demonstrations
====================
This script demonstrates interesting use of the `mwapi` library to login and
query English Wikipedia's MediaWiki API. Here's the basic flow:
0. Create session with user-agent
1. Log in
2. Confirm logged-in status
3. Query for the last 5 revisions of User_talk:EpochFail
4... | 31.037736 | 80 | 0.5769 |
16789c18e052904c49a4694185842767604e2d33 | 3,426 | py | Python | research/object_detection/utils/model_util.py | baranshad/models | aaf008855e9764f32d974e86f8e1f9cfddfafd9a | [
"Apache-2.0"
] | 3 | 2019-12-15T18:05:04.000Z | 2021-04-30T16:26:04.000Z | research/object_detection/utils/model_util.py | baranshad/models | aaf008855e9764f32d974e86f8e1f9cfddfafd9a | [
"Apache-2.0"
] | 10 | 2020-01-28T23:15:47.000Z | 2022-03-12T00:11:34.000Z | research/object_detection/utils/model_util.py | baranshad/models | aaf008855e9764f32d974e86f8e1f9cfddfafd9a | [
"Apache-2.0"
] | 5 | 2020-06-02T09:14:45.000Z | 2022-02-05T17:32:44.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.494382 | 80 | 0.728255 |
a4e8e2f4918ed2f83cb7806f39d5e4b130b881c2 | 3,424 | py | Python | typhoon/core/components.py | biellls/typhoon-orchestrator | f8e40c905fda8143562fc286359233f29d30c6bb | [
"Apache-2.0"
] | 1 | 2021-03-26T07:14:25.000Z | 2021-03-26T07:14:25.000Z | typhoon/core/components.py | biellls/typhoon-orchestrator | f8e40c905fda8143562fc286359233f29d30c6bb | [
"Apache-2.0"
] | null | null | null | typhoon/core/components.py | biellls/typhoon-orchestrator | f8e40c905fda8143562fc286359233f29d30c6bb | [
"Apache-2.0"
] | null | null | null | import re
from types import SimpleNamespace
from pydantic import BaseModel, Field
from typhoon.core.dags import IDENTIFIER_REGEX, TaskDefinition, Py, MultiStep, add_yaml_constructors, evaluate_item
from typing import Dict, List, Union
def task_name(name_in_dag: str, task: str) -> str:
return f'_{name_in_dag}__{t... | 36.817204 | 136 | 0.595794 |
2421930b00ba16285e89cf13b5b695f51a3f1d90 | 2,034 | py | Python | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Missions/Segments/Cruise/Constant_Speed_Constant_Altitude.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Missions/Segments/Cruise/Constant_Speed_Constant_Altitude.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Missions/Segments/Cruise/Constant_Speed_Constant_Altitude.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | ## @ingroup Methods-Missions-Segments-Cruise
# Constant_Speed_Constant_Altitude.py
#
# Created: Jul 2014, SUAVE Team
# Modified: Jan 2016, E. Botero
# May 2019, T. MacDonald
# ----------------------------------------------------------------------
# Initialize Conditions
# ---------------------------------... | 35.068966 | 92 | 0.609145 |
4c5a323c7e8fc283551e3b4808a3fa3f251b3174 | 1,297 | py | Python | pyslave/drivers/minicircuits/rcdat.py | NS2LPS/pyslave | adc30a4f762f42811587be1f10b08f1d2865098e | [
"MIT"
] | 1 | 2020-10-01T15:12:12.000Z | 2020-10-01T15:12:12.000Z | pyslave/drivers/minicircuits/rcdat.py | NS2LPS/pyslave | adc30a4f762f42811587be1f10b08f1d2865098e | [
"MIT"
] | null | null | null | pyslave/drivers/minicircuits/rcdat.py | NS2LPS/pyslave | adc30a4f762f42811587be1f10b08f1d2865098e | [
"MIT"
] | null | null | null | import requests
from numpy import nan
import time
class rcdat:
__inst_id__ = 'RCDAT variable attenuator'
def __init__(self, url="http://192.168.0.85/"):
self.url = url
r1 = requests.get(url+'MN?\n')
r2 = requests.get(url+'SN?\n')
print (r1.text.split('=')[1],'loaded with SN',... | 34.131579 | 82 | 0.517348 |
445180cc9919d33e4872c6d823e36f9a6a57e1de | 6,237 | py | Python | code/deepbind_train_selex.py | gifford-lab/deepbind-docker | 9a6e48d3ee550cc8c7bf06173a78442a6ba10ac8 | [
"Unlicense"
] | 17 | 2016-03-07T04:05:32.000Z | 2021-06-04T17:04:14.000Z | code/deepbind_train_selex.py | gifford-lab/deepbind-docker | 9a6e48d3ee550cc8c7bf06173a78442a6ba10ac8 | [
"Unlicense"
] | 2 | 2017-07-04T15:53:55.000Z | 2022-01-06T03:01:47.000Z | code/deepbind_train_selex.py | gifford-lab/deepbind-docker | 9a6e48d3ee550cc8c7bf06173a78442a6ba10ac8 | [
"Unlicense"
] | 4 | 2017-06-18T18:51:34.000Z | 2020-05-06T19:33:29.000Z | # Copyright (c) 2015, Andrew Delong and Babak Alipanahi All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of... | 36.052023 | 200 | 0.648709 |
8a2c99cc3203239a07d18aa8b79c2e7e335988f4 | 269 | py | Python | tournamentcontrol/competition/fields.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | null | null | null | tournamentcontrol/competition/fields.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | 28 | 2016-12-09T21:14:19.000Z | 2022-01-11T07:17:16.000Z | tournamentcontrol/competition/fields.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | null | null | null | from django import forms
class URLInput(forms.URLInput):
def __init__(self, attrs=None):
if attrs is None:
attrs = {'class': 'form-control'}
super(URLInput, self).__init__(attrs)
class URLField(forms.URLField):
widget = URLInput
| 20.692308 | 45 | 0.650558 |
355c0eb26b33d5ed40c1d7bad8b57ad66595c058 | 13,475 | py | Python | test/units/test_oci_dhcp_options.py | slmjy/oci-ansible-modules | 4713699064f4244b4554b5b2f97b5e5443fa2d6e | [
"Apache-2.0"
] | 106 | 2018-06-29T16:38:56.000Z | 2022-02-16T16:38:56.000Z | test/units/test_oci_dhcp_options.py | slmjy/oci-ansible-modules | 4713699064f4244b4554b5b2f97b5e5443fa2d6e | [
"Apache-2.0"
] | 122 | 2018-09-11T12:49:39.000Z | 2021-05-01T04:54:22.000Z | test/units/test_oci_dhcp_options.py | slmjy/oci-ansible-modules | 4713699064f4244b4554b5b2f97b5e5443fa2d6e | [
"Apache-2.0"
] | 78 | 2018-07-04T05:48:54.000Z | 2022-03-09T06:33:12.000Z | # Copyright (c) 2017, 2018, Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for details.
import p... | 36.917808 | 106 | 0.736994 |
f04615451191740d1e3bb280768dbefb05ef90ba | 2,024 | py | Python | face-detection-recognition/src/siameseTest.py | kapilkalra04/face-off | defd8e81145ebba763ed5bcc1344da1d8c20f80f | [
"MIT"
] | 4 | 2019-04-08T14:24:20.000Z | 2020-04-22T15:32:06.000Z | face-detection-recognition/src/siameseTest.py | kapilkalra04/face-off | defd8e81145ebba763ed5bcc1344da1d8c20f80f | [
"MIT"
] | null | null | null | face-detection-recognition/src/siameseTest.py | kapilkalra04/face-off | defd8e81145ebba763ed5bcc1344da1d8c20f80f | [
"MIT"
] | null | null | null | # The pre-trained model was provided by https://github.com/iwantooxxoox/Keras-OpenFace #
import tensorflow as tf
import numpy as np
import cv2
import glob
import pre_processing2 as pre
import matplotlib.pyplot as plt
# loader function to load the tf model from a frozen graph
def load_graph(frozen_graph_filename):
... | 34.896552 | 98 | 0.673419 |
c86e8be436b2a435b3f702ab0f0da5411db886b3 | 488 | py | Python | network/test_server.py | appinho/SASelfDrivingCar | 87ba63e0fb929d407d3d2b39fdc62feaba35fed9 | [
"MIT"
] | 3 | 2021-01-11T01:34:21.000Z | 2021-11-10T10:21:04.000Z | network/test_server.py | appinho/SASelfDrivingCar | 87ba63e0fb929d407d3d2b39fdc62feaba35fed9 | [
"MIT"
] | null | null | null | network/test_server.py | appinho/SASelfDrivingCar | 87ba63e0fb929d407d3d2b39fdc62feaba35fed9 | [
"MIT"
] | null | null | null | import socket
HOST = '192.168.0.100' # Standard loopback interface address (localhost)
PORT = 65432 # Port to listen on (non-privileged ports are > 1023)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
print(HOST)
s.bind((HOST, PORT))
print("bind ... | 27.111111 | 73 | 0.721311 |
d5d7f7a7159c292fcea01dc1f441ad7a9eae393e | 1,497 | py | Python | api/slicing/BitPlane.py | DevranCanikli/imsafe | 837fb487596b778d9f2439f8eeea9c0238d4161c | [
"MIT"
] | 2 | 2019-10-14T20:45:53.000Z | 2019-10-16T15:29:06.000Z | api/slicing/BitPlane.py | alpsakaci/imsafe | b5f97a39fe4e7393ea0b497254655c44bb872b63 | [
"MIT"
] | 3 | 2021-04-08T19:26:05.000Z | 2021-09-22T18:33:57.000Z | api/slicing/BitPlane.py | alpsakaci/imsafe | b5f97a39fe4e7393ea0b497254655c44bb872b63 | [
"MIT"
] | 3 | 2020-02-18T19:03:14.000Z | 2020-09-07T17:47:05.000Z | import cv2
import numpy as np
class BitPlane:
def __init__(self):
self.bit_planes = []
def slice(self, img_path):
# Read the image in greyscale
img = cv2.imread(img_path, 0)
lst = []
for i in range(img.shape[0]):
for j in range(img.shape[1]):
... | 34.022727 | 107 | 0.55177 |
28ab12ba3c548b5168d13ba6f613bb95e217bb2f | 336 | py | Python | src/ex6/extract_frequent_words.py | shimech/higashi | c99cb028c642be3c63a3e76de1194d114284b29b | [
"MIT"
] | 1 | 2020-06-14T20:27:09.000Z | 2020-06-14T20:27:09.000Z | src/ex6/extract_frequent_words.py | shimech/higashi | c99cb028c642be3c63a3e76de1194d114284b29b | [
"MIT"
] | null | null | null | src/ex6/extract_frequent_words.py | shimech/higashi | c99cb028c642be3c63a3e76de1194d114284b29b | [
"MIT"
] | null | null | null | def extract_frequent_words(word_frequency, coverage):
n_freq = 0
answer = []
for word, freq in sorted(word_frequency.items(), key=lambda x: -x[1]):
if 1.0 * n_freq / sum(word_frequency.values()) < coverage:
n_freq += freq
answer.append(word)
else:
break
... | 30.545455 | 74 | 0.589286 |
b9baf21484cdec975fa72cfb71afe7aff484f232 | 5,335 | py | Python | tornwamp/session.py | ef-ctx/tornwamp | 872e3f300cacf0a9cc4c9c6a7760a7f54cd284f9 | [
"Apache-2.0"
] | 8 | 2015-02-11T17:52:52.000Z | 2017-05-03T15:55:22.000Z | tornwamp/session.py | ef-ctx/tornwamp | 872e3f300cacf0a9cc4c9c6a7760a7f54cd284f9 | [
"Apache-2.0"
] | 9 | 2015-07-07T13:17:33.000Z | 2019-04-08T10:15:34.000Z | tornwamp/session.py | ef-ctx/tornwamp | 872e3f300cacf0a9cc4c9c6a7760a7f54cd284f9 | [
"Apache-2.0"
] | 3 | 2016-12-13T02:28:56.000Z | 2019-03-09T01:51:58.000Z | """
Abstract websocket connections (dual channel between clients and server).
"""
import socket
import errno
from datetime import datetime
from tornwamp import topic
from tornwamp.identifier import create_global_id
class ConnectionDict(dict):
"""
Connections manager.
"""
@property
def dict(self... | 31.755952 | 95 | 0.614433 |
a9fbb9f742042e14a02188cae728491b02b84f7f | 11,799 | py | Python | mialab/utilities/multi_processor.py | ameen-khosrowzadeh/MIAProject | 9f52d3c01def3f7c6d7ea8fd091d740fcfa8610f | [
"Apache-2.0"
] | 1 | 2022-01-24T14:00:25.000Z | 2022-01-24T14:00:25.000Z | mialab/utilities/multi_processor.py | ameen-khosrowzadeh/MIAProject | 9f52d3c01def3f7c6d7ea8fd091d740fcfa8610f | [
"Apache-2.0"
] | 3 | 2019-10-14T11:49:02.000Z | 2019-11-04T13:59:51.000Z | mialab/utilities/multi_processor.py | ameen-khosrowzadeh/MIAProject | 9f52d3c01def3f7c6d7ea8fd091d740fcfa8610f | [
"Apache-2.0"
] | 1 | 2020-10-25T14:07:57.000Z | 2020-10-25T14:07:57.000Z | """Module for the management of multi-process function calls."""
import typing as t
import numpy as np
import SimpleITK as sitk
from pathos import multiprocessing as pmp
import pymia.data.conversion as conversion
import mialab.data.structure as structure
class PickableAffineTransform:
"""Represents a transforma... | 40.269625 | 118 | 0.678193 |
37c0ea97f027ac878aa996e7b57b003c8476d43e | 11,815 | py | Python | ptb_word_lm.py | JupiLogy/psrnn | a63f6e765b4c1379f4985628db32b654b62b2330 | [
"Apache-2.0"
] | null | null | null | ptb_word_lm.py | JupiLogy/psrnn | a63f6e765b4c1379f4985628db32b654b62b2330 | [
"Apache-2.0"
] | null | null | null | ptb_word_lm.py | JupiLogy/psrnn | a63f6e765b4c1379f4985628db32b654b62b2330 | [
"Apache-2.0"
] | null | null | null | """Example / benchmark for building a PTB PSRNN model for character prediction.
To run:
$ python ptb_word_lm.py --data_path=data/
python c:/Users/Carlton/Dropbox/psrnn_tensorflow/psrnn_code/ptb_psrnn_random/ptb_word_lm.py --data_path=c:/Users/Carlton/Dropbox/psrnn_tensorflow/git/psrnn/data/
"""
from __future__ impo... | 33.470255 | 161 | 0.677613 |
86144d112a3e55dd007b649c24478699b9468076 | 26,912 | py | Python | parlai/scripts/train_model.py | esteng/ParlAI | 709f43b41d5a377228d2d89ed8f29bc3896a24b5 | [
"MIT"
] | 1 | 2020-11-08T11:23:02.000Z | 2020-11-08T11:23:02.000Z | parlai/scripts/train_model.py | esteng/ParlAI | 709f43b41d5a377228d2d89ed8f29bc3896a24b5 | [
"MIT"
] | null | null | null | parlai/scripts/train_model.py | esteng/ParlAI | 709f43b41d5a377228d2d89ed8f29bc3896a24b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# 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.
"""
Training script for ParlAI.
The standard way to train a model. After training, also computes validation
and test er... | 35.503958 | 107 | 0.559565 |
eadb367e9ecd806f16924af32bfd8d7c10814ebe | 2,000 | py | Python | finance_manager/cli/db/loadcsv.py | jehboyes/finance_manager | d310a3a4c2c6b6e5564e2a83e3f355b23266b773 | [
"MIT"
] | null | null | null | finance_manager/cli/db/loadcsv.py | jehboyes/finance_manager | d310a3a4c2c6b6e5564e2a83e3f355b23266b773 | [
"MIT"
] | null | null | null | finance_manager/cli/db/loadcsv.py | jehboyes/finance_manager | d310a3a4c2c6b6e5564e2a83e3f355b23266b773 | [
"MIT"
] | null | null | null | # pylint: disable=no-member
import click
import os
import progressbar
import csv as csv_
from finance_manager.database import DB
from finance_manager.database.spec import table_map
@click.command()
@click.option("--overwrite", is_flag=True, help="Clear table first")
@click.argument("table_name")
@click.argument("file... | 35.714286 | 93 | 0.5665 |
33a75ffc55c7bed9ddbd93df42f1988d71df836f | 5,565 | py | Python | src/donuts_datasets.py | msk822/DoNuTS | e3c38154ba2df12aef99c114036128e57ff15ac6 | [
"MIT"
] | null | null | null | src/donuts_datasets.py | msk822/DoNuTS | e3c38154ba2df12aef99c114036128e57ff15ac6 | [
"MIT"
] | null | null | null | src/donuts_datasets.py | msk822/DoNuTS | e3c38154ba2df12aef99c114036128e57ff15ac6 | [
"MIT"
] | null | null | null | def return_json_temprate(MODALITY: str) -> dict:
"""ใใณใใฌใผใ่พๆธใ่ฟใ
Args:
MODALITY (str): MODALITY
Returns:
[dict]: temprate
"""
header = {
'PRIMARY KEY':' ',
'Identified Modality':"",
"SOPInstanceUID":" ",
"StudyID":" ",
"ManufacturerModelName":... | 32.16763 | 49 | 0.445103 |
19084c19f5a09ff081e70635999e80bace5e3138 | 1,236 | py | Python | indy_common/test/types/test_get_context_schema.py | jandayanan/indy-node | 98d0c8165d45b2e38b95c82a134d835085e56a9f | [
"Apache-2.0"
] | null | null | null | indy_common/test/types/test_get_context_schema.py | jandayanan/indy-node | 98d0c8165d45b2e38b95c82a134d835085e56a9f | [
"Apache-2.0"
] | null | null | null | indy_common/test/types/test_get_context_schema.py | jandayanan/indy-node | 98d0c8165d45b2e38b95c82a134d835085e56a9f | [
"Apache-2.0"
] | null | null | null | from collections import OrderedDict
from indy_common.types import ClientGetContextOperation, GetContextField
from plenum.common.messages.fields import ConstantField, IdentifierField, VersionField, LimitedLengthStringField
EXPECTED_ORDERED_FIELDS_SCHEMA = OrderedDict([
("name", LimitedLengthStringField),
("ver... | 31.692308 | 112 | 0.782362 |
479d1f0caf4574aa269de6e504db90918755ebcf | 624 | py | Python | scripts/geojson/folium_02.py | IQSS/geoconnect | 09c91be7ffbc04fbfa9850f6b740277d971ac8a7 | [
"Apache-2.0"
] | 6 | 2015-10-28T15:35:04.000Z | 2020-08-20T10:18:33.000Z | scripts/geojson/folium_02.py | IQSS/geoconnect | 09c91be7ffbc04fbfa9850f6b740277d971ac8a7 | [
"Apache-2.0"
] | 50 | 2015-01-05T15:09:00.000Z | 2021-06-30T04:11:36.000Z | scripts/geojson/folium_02.py | IQSS/geoconnect | 09c91be7ffbc04fbfa9850f6b740277d971ac8a7 | [
"Apache-2.0"
] | 2 | 2017-02-28T02:18:49.000Z | 2017-07-14T02:40:43.000Z | import shapefile
# read the shapefile
reader = shapefile.Reader("data/social_disorder_in_boston/social_disorder_in_boston_yqh")
fields = reader.fields[1:]
field_names = [field[0] for field in fields]
buffer = []
for sr in reader.shapeRecords():
atr = dict(zip(field_names, sr.record))
geom = sr.shape.__geo_interfa... | 36.705882 | 89 | 0.725962 |
774834962eeb0d443b514d3821445b7bddcb11ca | 495 | py | Python | snippets/split.py | PapenfussLab/Mungo | 02c5b0e48ecd28596cb9481b282753859f47fed6 | [
"Artistic-2.0"
] | 1 | 2015-09-16T07:53:18.000Z | 2015-09-16T07:53:18.000Z | snippets/split.py | PapenfussLab/Mungo | 02c5b0e48ecd28596cb9481b282753859f47fed6 | [
"Artistic-2.0"
] | null | null | null | snippets/split.py | PapenfussLab/Mungo | 02c5b0e48ecd28596cb9481b282753859f47fed6 | [
"Artistic-2.0"
] | 3 | 2016-01-02T16:34:59.000Z | 2021-07-21T04:21:55.000Z | #!/usr/bin/env python
import re
import Fasta
classes = {
'Extended B': (14850000, 15460000),
'Class I-II': (15460000, 17100000),
'Class III': (17100000, 17950000),
'Framework': (17950000, 19265000),
'Extended A': (19265000, 19400000)
}
header,seq = Fasta.load('scaffold_42.fa')
for name,(start,e... | 22.5 | 60 | 0.620202 |
15dde1e3c20477a153ee9f5f20728b2aad29d7b3 | 501 | py | Python | dense_coattn/evaluate/accuracy.py | yuzhiw/Dense-CoAttention-Network | 4bd82682b30a471edf19f6d88a87ef4399e7c4ba | [
"MIT"
] | 1 | 2018-11-17T13:17:42.000Z | 2018-11-17T13:17:42.000Z | dense_coattn/evaluate/accuracy.py | yuzhiw/Dense-CoAttention-Network | 4bd82682b30a471edf19f6d88a87ef4399e7c4ba | [
"MIT"
] | null | null | null | dense_coattn/evaluate/accuracy.py | yuzhiw/Dense-CoAttention-Network | 4bd82682b30a471edf19f6d88a87ef4399e7c4ba | [
"MIT"
] | null | null | null |
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import torch
import torch.nn as nn
from torch.autograd import Variable
class Accuracy(nn.Module):
def __init__(self):
super(Accuracy, self).__init__()
def forward(self, score, ans_idx):
batch = scor... | 20.875 | 53 | 0.744511 |
14ec081d009743f64b543b782fedde5f71c207b6 | 3,615 | py | Python | beta_rec/models/gmf.py | ChaosCodes/beta-recsys | 8a0b47f154dab5d23a572c75cf64cef4400b3f12 | [
"MIT"
] | null | null | null | beta_rec/models/gmf.py | ChaosCodes/beta-recsys | 8a0b47f154dab5d23a572c75cf64cef4400b3f12 | [
"MIT"
] | null | null | null | beta_rec/models/gmf.py | ChaosCodes/beta-recsys | 8a0b47f154dab5d23a572c75cf64cef4400b3f12 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from beta_rec.models.torch_engine import ModelEngine
from beta_rec.utils.common_util import timeit
class GMF(torch.nn.Module):
"""GMF Class."""
def __init__(self, config):
"""Initialize GMF Class."""
super(GMF, self).__init__()
self.config = config
... | 35.792079 | 86 | 0.627386 |
3a07b55ca477a0e8cb5a01d251abc6c848984805 | 4,189 | py | Python | fixture/group.py | BarablinVS/python_training | 56f1f390323fea6e0d5c1982fd6a021dc11cc652 | [
"Apache-2.0"
] | null | null | null | fixture/group.py | BarablinVS/python_training | 56f1f390323fea6e0d5c1982fd6a021dc11cc652 | [
"Apache-2.0"
] | null | null | null | fixture/group.py | BarablinVS/python_training | 56f1f390323fea6e0d5c1982fd6a021dc11cc652 | [
"Apache-2.0"
] | null | null | null | __author__ = 'viktor'
from model.group import Group
class GroupHelper:
def __init__(self, app):
self.app = app
def open_groups_page(self):
wd = self.app.wd
if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_link_text("new")) > 0):
wd.f... | 31.977099 | 106 | 0.614944 |
6df8c77243284dd51a3592d8b2be19bf8bc9b96b | 538 | py | Python | Amazon-ASINs.py | SunDevilThor/Amazon-ASINs | 4ac8fd3c3031039944d307524ea619c5b25aff7f | [
"MIT"
] | null | null | null | Amazon-ASINs.py | SunDevilThor/Amazon-ASINs | 4ac8fd3c3031039944d307524ea619c5b25aff7f | [
"MIT"
] | null | null | null | Amazon-ASINs.py | SunDevilThor/Amazon-ASINs | 4ac8fd3c3031039944d307524ea619c5b25aff7f | [
"MIT"
] | null | null | null | # Amazon ASINs from Search Page
# Tutorial from John Watson Rooney YouTube channel
from requests_html import HTMLSession
url = 'https://www.amazon.com/s?k=nvme+1tb'
s = HTMLSession()
r = s.get(url)
r.html.render(sleep=1)
#print(r.html.find('title', first=True).full_text)
products = r.html.find('div[data-asin]')
a... | 20.692308 | 50 | 0.693309 |
2496940511f942225d98226ea1edd858dc0900e4 | 6,962 | py | Python | userbot/__init__.py | dhenisusanto/Userbot | cacf4da0b7b3cd05aea050b0742264ff0b645f9f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/__init__.py | dhenisusanto/Userbot | cacf4da0b7b3cd05aea050b0742264ff0b645f9f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/__init__.py | dhenisusanto/Userbot | cacf4da0b7b3cd05aea050b0742264ff0b645f9f | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot initialization. """
import os
from sys import version_info
from logging import basicConfig, getLogger, IN... | 32.231481 | 143 | 0.689888 |
66945b7f4b247db50d3c00cecae8f78032cabb18 | 3,374 | py | Python | deepchem/feat/tests/test_mol_graph_conv_featurizer.py | deloragaskins/deepchem | 234ab699cdb997e5963966a8b6926cb2cda7c064 | [
"MIT"
] | 3,782 | 2016-02-21T03:53:11.000Z | 2022-03-31T16:10:26.000Z | deepchem/feat/tests/test_mol_graph_conv_featurizer.py | deloragaskins/deepchem | 234ab699cdb997e5963966a8b6926cb2cda7c064 | [
"MIT"
] | 2,666 | 2016-02-11T01:54:54.000Z | 2022-03-31T11:14:33.000Z | deepchem/feat/tests/test_mol_graph_conv_featurizer.py | deloragaskins/deepchem | 234ab699cdb997e5963966a8b6926cb2cda7c064 | [
"MIT"
] | 1,597 | 2016-02-21T03:10:08.000Z | 2022-03-30T13:21:28.000Z | import unittest
from deepchem.feat import MolGraphConvFeaturizer
from deepchem.feat import PagtnMolGraphFeaturizer
class TestMolGraphConvFeaturizer(unittest.TestCase):
def test_default_featurizer(self):
smiles = ["C1=CC=CN=C1", "O=C(NCc1cc(OC)c(O)cc1)CCCC/C=C/C(C)C"]
featurizer = MolGraphConvFeaturizer()
... | 35.515789 | 68 | 0.697688 |
d0e3dbe8145379cf939f101d4d849ee7630d6f26 | 5,798 | py | Python | examples/pipeline/hetero_fast_sbt/pipeline-hetero-sbt-mix-binary-with-predict.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 3,787 | 2019-08-30T04:55:10.000Z | 2022-03-31T23:30:07.000Z | examples/pipeline/hetero_fast_sbt/pipeline-hetero-sbt-mix-binary-with-predict.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 1,439 | 2019-08-29T16:35:52.000Z | 2022-03-31T11:55:31.000Z | examples/pipeline/hetero_fast_sbt/pipeline-hetero-sbt-mix-binary-with-predict.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 1,179 | 2019-08-29T16:18:32.000Z | 2022-03-31T12:55:38.000Z | #
# Copyright 2019 The FATE 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 appli... | 46.015873 | 117 | 0.699034 |
6925a9da3e8f5af2a7a2ababa22b981ac6216053 | 474 | py | Python | tools/sleepless/filterdiff.py | Hypexion/HamSandwich | e5adb6b45d822cbef1be1a52d0ce51513dc24bc8 | [
"MIT"
] | 24 | 2019-05-12T12:03:21.000Z | 2022-03-30T01:05:46.000Z | tools/sleepless/filterdiff.py | Hypexion/HamSandwich | e5adb6b45d822cbef1be1a52d0ce51513dc24bc8 | [
"MIT"
] | 6 | 2019-05-12T11:54:54.000Z | 2022-02-26T11:47:20.000Z | tools/sleepless/filterdiff.py | Hypexion/HamSandwich | e5adb6b45d822cbef1be1a52d0ce51513dc24bc8 | [
"MIT"
] | 12 | 2019-05-12T13:48:57.000Z | 2022-02-25T15:25:24.000Z | # Lunatic lines.py
# Tad Hardesty, aka SpaceManiac, 2011
# Counts lines of code
# usage: 'python tools/lines.py'
from glob import glob
from sys import argv
from os import path
import os, re
f = open("tools/diff.diff")
lines = f.read().splitlines()
f.close()
diff = []
only = []
same = []
for line in lines:
if li... | 17.555556 | 37 | 0.658228 |
571453381c631db38d34a254ff646387b84ab6a1 | 2,758 | py | Python | xknx/remote_value/remote_value_raw.py | gr0vity-dev/xknx | d19e343166c6bcd4ebb02f91eef57e98d9735c0c | [
"MIT"
] | 179 | 2016-12-29T00:24:47.000Z | 2022-03-11T23:46:06.000Z | xknx/remote_value/remote_value_raw.py | gr0vity-dev/xknx | d19e343166c6bcd4ebb02f91eef57e98d9735c0c | [
"MIT"
] | 820 | 2016-12-25T22:45:12.000Z | 2022-03-31T10:18:25.000Z | xknx/remote_value/remote_value_raw.py | magenbrot/xknx | dc012c8b53606b591d4ba3c006700576149c268e | [
"MIT"
] | 111 | 2016-12-30T00:02:13.000Z | 2022-03-20T15:18:33.000Z | """
Module for managing a remote value typically used within a sensor.
The module maps a given value_type to a DPT class and uses this class
for serialization and deserialization of the KNX value.
"""
from __future__ import annotations
from typing import TYPE_CHECKING, Union
from xknx.dpt.dpt import DPTArray, DPTBin... | 35.358974 | 88 | 0.640319 |
6dfa42bd36b9cefab3d624efa128e36a1950c2ff | 10,703 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_roaming_consortium.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_roaming_consortium.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/fortios/fortios_wireless_controller_hotspot20_anqp_roaming_consortium.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | 31.479412 | 155 | 0.61422 |
869d1c020f404e3bbd877f8b4fbc080d688782b5 | 9,873 | py | Python | kubernetes/client/models/v1beta1_network_policy_spec.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | 1 | 2019-02-17T15:28:39.000Z | 2019-02-17T15:28:39.000Z | kubernetes/client/models/v1beta1_network_policy_spec.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_network_policy_spec.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 46.570755 | 767 | 0.678315 |
a557592a1862ffa49babb80896325702d4a494f1 | 14,634 | py | Python | corehq/apps/couch_sql_migration/asyncforms.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/couch_sql_migration/asyncforms.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/couch_sql_migration/asyncforms.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | import logging
from collections import defaultdict, deque
from datetime import datetime, timedelta
import attr
import gevent
from gevent.pool import Pool
from casexml.apps.case.xform import get_case_ids_from_form, get_case_updates
from couchforms.models import XFormInstance, XFormOperation
from dimagi.utils.chunked i... | 36.222772 | 94 | 0.64152 |
fc26720ef281ced2c074caefe9dd09612743139a | 1,309 | py | Python | messages/core.py | thegreathippo/calamity | a58a42a7dd828159f5730c9b49aa474bce6ee51a | [
"MIT"
] | null | null | null | messages/core.py | thegreathippo/calamity | a58a42a7dd828159f5730c9b49aa474bce6ee51a | [
"MIT"
] | null | null | null | messages/core.py | thegreathippo/calamity | a58a42a7dd828159f5730c9b49aa474bce6ee51a | [
"MIT"
] | null | null | null | """
Implements signals based on blinker if available; otherwise,
implements a fake signaler.
Shamelessly stolen from flask:
https://github.com/pallets/flask/blob/master/flask/signals.py
"""
signals_available = False
try:
from blinker import Namespace
signals_available = True
except ImportError:
clas... | 27.270833 | 71 | 0.632544 |
cde9743d653bcf8a129e70fa914d9dc12b6623d4 | 124 | py | Python | lambda-generator/poster.py | Vishakha1990/Lambdas | 803028633f25911cbc74c28e4c1ec11276912102 | [
"Apache-2.0"
] | null | null | null | lambda-generator/poster.py | Vishakha1990/Lambdas | 803028633f25911cbc74c28e4c1ec11276912102 | [
"Apache-2.0"
] | null | null | null | lambda-generator/poster.py | Vishakha1990/Lambdas | 803028633f25911cbc74c28e4c1ec11276912102 | [
"Apache-2.0"
] | 1 | 2020-01-08T18:00:04.000Z | 2020-01-08T18:00:04.000Z | #!/usr/bin/python
import requests
import json
r = requests.post("http://localhost:5000", data=json.dumps({}))
print r.text
| 17.714286 | 63 | 0.717742 |
5652247cde8075ea95dfe06bc43bc57f78b14ae7 | 1,590 | py | Python | gitlabform/gitlab/project_badges.py | barryib/gitlabform | c07b434bd50706ad69e69b37a7eb39230a4414f5 | [
"MIT"
] | 299 | 2017-08-21T21:07:44.000Z | 2021-11-25T09:43:11.000Z | gitlabform/gitlab/project_badges.py | barryib/gitlabform | c07b434bd50706ad69e69b37a7eb39230a4414f5 | [
"MIT"
] | 258 | 2017-08-23T09:32:53.000Z | 2021-11-29T11:09:45.000Z | gitlabform/gitlab/project_badges.py | barryib/gitlabform | c07b434bd50706ad69e69b37a7eb39230a4414f5 | [
"MIT"
] | 70 | 2017-08-22T02:40:00.000Z | 2021-11-16T09:17:22.000Z | from gitlabform.gitlab.projects import GitLabProjects
class GitLabProjectBadges(GitLabProjects):
def get_project_badges(self, project_and_group_name):
badges = self._make_requests_to_api(
"projects/%s/badges",
project_and_group_name,
expected_codes=200,
)
... | 30 | 77 | 0.601258 |
48090e7b3957c23dd2e46222c935e283227f5d77 | 332 | py | Python | 001.py | zlsun/ProjectEuler | 813ec545484924a052f1bd7fd90a4c676eea3bba | [
"MIT"
] | null | null | null | 001.py | zlsun/ProjectEuler | 813ec545484924a052f1bd7fd90a4c676eea3bba | [
"MIT"
] | null | null | null | 001.py | zlsun/ProjectEuler | 813ec545484924a052f1bd7fd90a4c676eea3bba | [
"MIT"
] | null | null | null | """
Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
"""
N = 1000
mod = lambda l, n: [x for x in range(n) if any(x % a == 0 for a in l)]
print sum(mod([3, 5], N... | 27.666667 | 129 | 0.653614 |
963173ca227eaa4316358c938455f3ba8fcf4f65 | 1,348 | py | Python | configs/lvis/cascade_rcnn_r50_fpn_sample1e-3_mstrain_2x_lvis_v1.py | kostas1515/GumbelActivationForLLongTailSegmentation | c97a1f6abe02877518de9c266a366ae0fe07d59a | [
"Apache-2.0"
] | 5 | 2021-11-18T17:12:46.000Z | 2021-12-14T16:19:39.000Z | configs/lvis/cascade_rcnn_r50_fpn_sample1e-3_mstrain_2x_lvis_v1.py | kostas1515/GumbelActivationForLongTailSegmentation | c97a1f6abe02877518de9c266a366ae0fe07d59a | [
"Apache-2.0"
] | null | null | null | configs/lvis/cascade_rcnn_r50_fpn_sample1e-3_mstrain_2x_lvis_v1.py | kostas1515/GumbelActivationForLongTailSegmentation | c97a1f6abe02877518de9c266a366ae0fe07d59a | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/cascade_mask_rcnn_r50_fpn.py',
'../_base_/datasets/lvis_v1_instance.py',
'../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py'
]
model = dict(
backbone=dict(
depth=101,
init_cfg=dict(type='Pretrained',
checkpoint='torchvis... | 37.444444 | 80 | 0.616469 |
28bbbed10412e2a4d0599f24626539dbde6f1fda | 2,481 | py | Python | src/xSACdb/settings/test.py | minyiky/xSACdb | 8c407e9a9da196750a66ad53613ad67c8c56e1c3 | [
"MIT"
] | 2 | 2017-08-14T14:40:17.000Z | 2019-02-07T13:10:23.000Z | src/xSACdb/settings/test.py | minyiky/xSACdb | 8c407e9a9da196750a66ad53613ad67c8c56e1c3 | [
"MIT"
] | 19 | 2016-02-07T18:02:53.000Z | 2019-11-03T17:48:13.000Z | src/xSACdb/settings/test.py | minyiky/xSACdb | 8c407e9a9da196750a66ad53613ad67c8c56e1c3 | [
"MIT"
] | 4 | 2015-10-19T17:24:35.000Z | 2021-05-12T07:30:32.000Z | # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
TEMPLATE_DEBUG = False
# noinspection PyUnresolvedReferences
from .common import *
ALLOWED_HOSTS = ['*']
# Club config
CLUB = {
# Name of your club
'name': 'MadeUpSAC',
# Are you a student club? This adds fields like student... | 30.62963 | 119 | 0.692866 |
f0341a7c117e0815571a1e2ab88776bfc2dbf76e | 7,588 | py | Python | salt/log/handlers/__init__.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2021-08-14T13:48:38.000Z | 2021-08-14T13:48:38.000Z | salt/log/handlers/__init__.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 3 | 2015-03-31T14:44:05.000Z | 2015-06-18T19:02:24.000Z | salt/log/handlers/__init__.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:24.000Z | 2020-01-02T09:03:24.000Z | # -*- coding: utf-8 -*-
'''
salt.log.handlers
~~~~~~~~~~~~~~~~~
.. versionadded:: 0.17.0
Custom logging handlers to be used in salt.
'''
from __future__ import absolute_import
# Import python libs
import sys
import logging
import threading
import logging.handlers
# Import salt libs
from salt.log.mix... | 34.967742 | 119 | 0.625461 |
630298eb3e74bea1040e701d493c24e6850e9cd0 | 3,098 | py | Python | setup-scripts/funds-checker.py | kwypchlo/skynet-webportal | d1549a638d6109d2540dfcdd326a130d90687461 | [
"OML"
] | 211 | 2020-02-10T21:40:43.000Z | 2022-02-05T18:51:24.000Z | setup-scripts/funds-checker.py | kwypchlo/skynet-webportal | d1549a638d6109d2540dfcdd326a130d90687461 | [
"OML"
] | 550 | 2020-02-12T14:25:11.000Z | 2021-04-12T15:42:55.000Z | setup-scripts/funds-checker.py | kwypchlo/skynet-webportal | d1549a638d6109d2540dfcdd326a130d90687461 | [
"OML"
] | 49 | 2020-01-30T18:43:41.000Z | 2021-05-27T09:11:42.000Z | #!/usr/bin/env python3
"""
funds-checker runs simple checks on a portal node using the siad API and
dispatches messages to a Discord channel.
"""
import discord, traceback, asyncio, os
from bot_utils import setup, send_msg, siad, sc_precision
bot_token = setup()
client = discord.Client()
async def exit_after(delay... | 36.023256 | 104 | 0.710458 |
f953484f56e83c442afa42dbc453a78a044d336c | 12,134 | py | Python | disk/check.py | chadharvey/integrations-core | 7f97b3f1b10f37c01cd598640145444072cd7aec | [
"BSD-3-Clause"
] | 1 | 2021-06-17T20:22:35.000Z | 2021-06-17T20:22:35.000Z | disk/check.py | chadharvey/integrations-core | 7f97b3f1b10f37c01cd598640145444072cd7aec | [
"BSD-3-Clause"
] | null | null | null | disk/check.py | chadharvey/integrations-core | 7f97b3f1b10f37c01cd598640145444072cd7aec | [
"BSD-3-Clause"
] | 1 | 2020-02-12T02:15:27.000Z | 2020-02-12T02:15:27.000Z | # (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# stdlib
import os
import re
# 3p
try:
import psutil
except ImportError:
psutil = None
# datadog
from checks import AgentCheck
from config import _is_affirmative
from utils.platform import Platform
from ... | 41.554795 | 104 | 0.606395 |
c91b64b3db03504bf92d6df8455ec585ea3a4f34 | 969 | py | Python | var/spack/repos/builtin/packages/geoip-api-c/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/geoip-api-c/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/geoip-api-c/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class GeoipApiC(AutotoolsPackage):
"""The GeoIP Legacy C library enables the user to find geogra... | 40.375 | 96 | 0.742002 |
a4a2824cba214e8b05e25e08719a4c3fe012407a | 1,014 | py | Python | backend/stockApp/models.py | thetongz/stock_trading | 756a95d17cbbd2e3ea18e8e18d6d9da877cd71db | [
"MIT"
] | null | null | null | backend/stockApp/models.py | thetongz/stock_trading | 756a95d17cbbd2e3ea18e8e18d6d9da877cd71db | [
"MIT"
] | null | null | null | backend/stockApp/models.py | thetongz/stock_trading | 756a95d17cbbd2e3ea18e8e18d6d9da877cd71db | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class Stock(models.Model):
symbol = models.CharField(max_length = 20)
fullname = models.CharField(max_length = 1000)
industry = models.CharField(max_length = 10, blank=True, null = True)
sector = models.CharFi... | 34.965517 | 73 | 0.67357 |
c16942c13e76a175e4c2acc6d8624f9b0a682ecf | 1,376 | py | Python | Matematicas/Funciones_Matematica.py | w2k31984/Selenium_WebDriver_Python | 73e509813c6a5e508677920fa76c8cc56371134b | [
"MIT",
"MIT-0"
] | null | null | null | Matematicas/Funciones_Matematica.py | w2k31984/Selenium_WebDriver_Python | 73e509813c6a5e508677920fa76c8cc56371134b | [
"MIT",
"MIT-0"
] | null | null | null | Matematicas/Funciones_Matematica.py | w2k31984/Selenium_WebDriver_Python | 73e509813c6a5e508677920fa76c8cc56371134b | [
"MIT",
"MIT-0"
] | null | null | null | #Los paquetes son carpetas con multiples modulos.
#Son archivos con funciones
def suma(num1, num2):
print(num1+num2)
def resta(num1, num2):
print(num1-num2)
def multiplicacion(num1, num2):
print(num1*num2)
def division(num1, num2):
print(num1/num2)
def menu():
while True:
print('''
Calculador... | 30.577778 | 74 | 0.566134 |
241cce24023d31f04391f645d79b5ca92a843a89 | 1,387 | py | Python | yapscheme/MyStream.py | furrykef/yapscheme | 8b169bdd8f8453acdf670ddaf61154d29f68e791 | [
"MIT"
] | null | null | null | yapscheme/MyStream.py | furrykef/yapscheme | 8b169bdd8f8453acdf670ddaf61154d29f68e791 | [
"MIT"
] | null | null | null | yapscheme/MyStream.py | furrykef/yapscheme | 8b169bdd8f8453acdf670ddaf61154d29f68e791 | [
"MIT"
] | null | null | null | # A wrapper around Python streams
#
# Rationale:
# * Cannot always seek backwards on a stream, which the parser needs
# * I got tired of checking for EOF after every single read instead of
# letting an exception handler take care of it. The idea here is,
# if I forget to check for EOF, I want an exception... | 28.306122 | 72 | 0.60995 |
6e7598b5f0e7dbbb47c15218e3ff21875b3f6cf9 | 1,582 | py | Python | 2-15-SelectedData/select1.py | juliaviolet/Pierian-Data-Plotly-Dashboards-with-Dash | a3ec7f4de9efa7a3ea05fef993525ba121b24938 | [
"MIT"
] | null | null | null | 2-15-SelectedData/select1.py | juliaviolet/Pierian-Data-Plotly-Dashboards-with-Dash | a3ec7f4de9efa7a3ea05fef993525ba121b24938 | [
"MIT"
] | 1 | 2021-06-01T23:20:59.000Z | 2021-06-01T23:20:59.000Z | 2-15-SelectedData/select1.py | juliaviolet/Pierian-Data-Plotly-Dashboards-with-Dash | a3ec7f4de9efa7a3ea05fef993525ba121b24938 | [
"MIT"
] | null | null | null | #######
# This makes a 3x3 scatterplot of wheels.csv, and sends
# the results of a selection to the screen as a JSON object.
######
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.graph_objs as go
import pandas as pd
import jso... | 27.754386 | 78 | 0.498736 |
44541d230d1433e12de62572870a96b4d38aa541 | 166 | py | Python | musicplayer/__init__.py | Gabe-Corral/Music_Player | 9352266aa86e5927e4a603b6238cea4745cc6b26 | [
"MIT"
] | null | null | null | musicplayer/__init__.py | Gabe-Corral/Music_Player | 9352266aa86e5927e4a603b6238cea4745cc6b26 | [
"MIT"
] | null | null | null | musicplayer/__init__.py | Gabe-Corral/Music_Player | 9352266aa86e5927e4a603b6238cea4745cc6b26 | [
"MIT"
] | null | null | null | from musicplayer.file_getter import FileGetter
from musicplayer.main import MainWindow
from musicplayer.database import Database
from musicplayer.migrate import main
| 33.2 | 46 | 0.879518 |
39d82747f9e6ff9bb90a9ed7ee4ffbfd71ebbdfa | 11,088 | py | Python | controller.py | simoneorlando/Corinne | 215ab4f10a3655366fe5b476d1bc98a3bd967613 | [
"MIT"
] | 1 | 2020-02-17T12:41:57.000Z | 2020-02-17T12:41:57.000Z | controller.py | simoneorlando/Corinne | 215ab4f10a3655366fe5b476d1bc98a3bd967613 | [
"MIT"
] | null | null | null | controller.py | simoneorlando/Corinne | 215ab4f10a3655366fe5b476d1bc98a3bd967613 | [
"MIT"
] | null | null | null | import os
from graphviz import render, Digraph, view
from cfsm import CFSM
from global_graph_parser.main import main as global_graph_parser
from dot_parser.main import main
from dot_parser.domitilla_converter import domitilla_converter
from dot_parser.MyErrorListener import parseError
from dot_parser.MyVisitor import F... | 43.3125 | 100 | 0.569444 |
ed0e635ca5f99c91e661744b03bff17408505383 | 1,340 | py | Python | src/classes/views/alert_view.py | bergthor13/VehicleGPS | 643413b3cb910102689081d692223a4a03fccea4 | [
"MIT"
] | 3 | 2019-06-21T23:39:22.000Z | 2020-08-17T03:39:04.000Z | src/classes/views/alert_view.py | bergthor13/VehicleGPS | 643413b3cb910102689081d692223a4a03fccea4 | [
"MIT"
] | null | null | null | src/classes/views/alert_view.py | bergthor13/VehicleGPS | 643413b3cb910102689081d692223a4a03fccea4 | [
"MIT"
] | 1 | 2020-02-04T16:13:06.000Z | 2020-02-04T16:13:06.000Z | """"""
from tkinter import font, Label, Frame
from classes.widgets.speed_gauge import SpeedGauge
from classes.widgets.main_gauge import MainGauge
class AlertView(Frame):
title_label = None
message_label = None
title_font = None
message_font = None
def __init__(self, *args, **kwargs):
... | 33.5 | 83 | 0.570896 |
d3b96ed025c53630988cd224d3e12766f1ef169c | 1,316 | py | Python | neutron/conf/policies/auto_allocated_topology.py | EwaldvanGeffen/neutron | 858d7f33950a80c73501377a4b2cd36b915d0f40 | [
"Apache-2.0"
] | 1 | 2020-01-29T17:06:17.000Z | 2020-01-29T17:06:17.000Z | neutron/conf/policies/auto_allocated_topology.py | EwaldvanGeffen/neutron | 858d7f33950a80c73501377a4b2cd36b915d0f40 | [
"Apache-2.0"
] | 5 | 2018-05-31T13:09:00.000Z | 2022-01-13T15:23:29.000Z | neutron/conf/policies/auto_allocated_topology.py | EwaldvanGeffen/neutron | 858d7f33950a80c73501377a4b2cd36b915d0f40 | [
"Apache-2.0"
] | 2 | 2017-12-05T15:05:26.000Z | 2019-09-09T16:03:49.000Z | # 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
# distributed u... | 26.857143 | 76 | 0.630699 |
b59881f6d1bebb1f1da00cfe6e56ce022e30c1e8 | 274 | py | Python | Lintcode/569 Add Digits.py | Xiaoyu-Xing/algorithms | 93936aeeef64487285db360b5884e844e0662b8e | [
"MIT"
] | null | null | null | Lintcode/569 Add Digits.py | Xiaoyu-Xing/algorithms | 93936aeeef64487285db360b5884e844e0662b8e | [
"MIT"
] | null | null | null | Lintcode/569 Add Digits.py | Xiaoyu-Xing/algorithms | 93936aeeef64487285db360b5884e844e0662b8e | [
"MIT"
] | null | null | null | class Solution:
"""
@param num: a non-negative integer
@return: one digit
"""
def addDigits(self, num):
if num == 0:
return 0
return 9 if num % 9 == 0 else num % 9
# See https://www.lintcode.com/problem/add-digits/note/192463 | 24.909091 | 61 | 0.569343 |
617d81a627b6dc1b3e940f8ece8dff6ad27eda81 | 2,808 | py | Python | binance_d/impl/restapiinvoker.py | xiandong79/Binance_Futures_python | 99e172108b42d5b54001231474ae60a5deaa37b6 | [
"MIT"
] | null | null | null | binance_d/impl/restapiinvoker.py | xiandong79/Binance_Futures_python | 99e172108b42d5b54001231474ae60a5deaa37b6 | [
"MIT"
] | null | null | null | binance_d/impl/restapiinvoker.py | xiandong79/Binance_Futures_python | 99e172108b42d5b54001231474ae60a5deaa37b6 | [
"MIT"
] | null | null | null | import requests
from binance_d.exception.binanceapiexception import BinanceApiException
from binance_d.impl.utils import *
# from binance_d.base.printobject import *
def check_response(json_wrapper):
if json_wrapper.contain_key("success"):
success = json_wrapper.get_boolean("success")
if ... | 45.290323 | 123 | 0.663462 |
79a5540c416c59b8932df75e4f4c2d7f1d1bf8ce | 354 | py | Python | cron_1.py | saintthor/tornado-guide-examples | 23cb302790c17ec72b070a2c52adce7dcedaea9b | [
"MIT"
] | 11 | 2016-12-06T03:13:11.000Z | 2019-03-27T14:39:29.000Z | cron_1.py | saintthor/tornado-guide-examples | 23cb302790c17ec72b070a2c52adce7dcedaea9b | [
"MIT"
] | 1 | 2016-12-29T05:59:48.000Z | 2016-12-29T14:28:33.000Z | cron_1.py | saintthor/tornado-guide-examples | 23cb302790c17ec72b070a2c52adce7dcedaea9b | [
"MIT"
] | 7 | 2017-06-29T08:38:49.000Z | 2019-07-24T01:56:00.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 26 14:32:52 2016
@author: thor
"""
from tornado import ioloop, gen
from time import time
@gen.coroutine
def Ring():
print 'it\'s time to get up.'
if __name__ == '__main__':
loop = ioloop.IOLoop.current()
loop.call_at( time() + 5, Ring )
#loop.call_l... | 16.857143 | 36 | 0.615819 |
438f163c1bf153d7eee1b9b1501e5c60be19b9ee | 981 | py | Python | app/core/admin.py | xelahaippa/recipe-app-api | 29a42c10e9a57e778d1a3a319da0de82b206f5fd | [
"MIT"
] | null | null | null | app/core/admin.py | xelahaippa/recipe-app-api | 29a42c10e9a57e778d1a3a319da0de82b206f5fd | [
"MIT"
] | null | null | null | app/core/admin.py | xelahaippa/recipe-app-api | 29a42c10e9a57e778d1a3a319da0de82b206f5fd | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from core import models
from django.utils.translation import gettext as _
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
(None, {'fields': ('email', '... | 26.513514 | 64 | 0.528033 |
66999f0b285c6cdb5a6f2a3e6e79770b511081df | 32,157 | py | Python | test/functional/fundrawtransaction.py | bhccoin/bhcoin | a5a24c3f019893fdb04b38f24d0f76607deb2e8a | [
"MIT"
] | null | null | null | test/functional/fundrawtransaction.py | bhccoin/bhcoin | a5a24c3f019893fdb04b38f24d0f76607deb2e8a | [
"MIT"
] | null | null | null | test/functional/fundrawtransaction.py | bhccoin/bhcoin | a5a24c3f019893fdb04b38f24d0f76607deb2e8a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the fundrawtransaction RPC."""
from test_framework.test_framework import BitcoinTestFramework
fro... | 44.600555 | 223 | 0.569798 |
9182fcca96ad0384866784d9c5bffd7918ff9cbf | 5,350 | py | Python | src/wolball/wolball.py | HumanCellAtlas/hca-jamboree-cell-identification | 82dcaf93d9e7013e36f8c9c2d448a42af153c360 | [
"MIT"
] | 4 | 2018-04-27T22:37:24.000Z | 2018-09-06T23:43:32.000Z | src/wolball/wolball.py | HumanCellAtlas/hca-jamboree-cell-identification | 82dcaf93d9e7013e36f8c9c2d448a42af153c360 | [
"MIT"
] | null | null | null | src/wolball/wolball.py | HumanCellAtlas/hca-jamboree-cell-identification | 82dcaf93d9e7013e36f8c9c2d448a42af153c360 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.decomposition import PCA
#========================================================================================#
## These are standard sub-routines involved with knn graph construction
def get_vscores(E, min_mean=0, nBins=50, fit_percentile=0.1, error_wt=1):
''' Sub-routine for choo... | 31.845238 | 101 | 0.664299 |
f48af839f18a396a5d43c48246d69ecd13db7105 | 5,065 | py | Python | my_vim_files/python27/Lib/bsddb/test/test_db.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | 1 | 2019-05-14T05:05:42.000Z | 2019-05-14T05:05:42.000Z | my_vim_files/python27/Lib/bsddb/test/test_db.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | null | null | null | my_vim_files/python27/Lib/bsddb/test/test_db.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | 2 | 2018-07-15T06:35:21.000Z | 2019-05-14T05:05:31.000Z | import unittest
import os, glob
from test_all import db, test_support, get_new_environment_path, \
get_new_database_path
#----------------------------------------------------------------------
class DB(unittest.TestCase):
import sys
if sys.version_info < (2, 4) :
def assertTrue(sel... | 35.41958 | 81 | 0.54156 |
6b7bef0de988d6f11a22433fd8b81fa0b8ca171a | 511 | py | Python | Tacos/pathWrap.py | lsmoriginal/Tacos | 31ea6d6c03a08a995ca30a8f291f63c4b4ff1c4e | [
"MIT"
] | null | null | null | Tacos/pathWrap.py | lsmoriginal/Tacos | 31ea6d6c03a08a995ca30a8f291f63c4b4ff1c4e | [
"MIT"
] | null | null | null | Tacos/pathWrap.py | lsmoriginal/Tacos | 31ea6d6c03a08a995ca30a8f291f63c4b4ff1c4e | [
"MIT"
] | null | null | null |
from pathlib import Path
def nextName(name:str)->str:
"""
Given a directory,
return the available name to this name,
if the name already exist, then increase the suffix by 1
"""
originalPath = Path(name)
if not originalPath.exists():
return name
index = 1
while... | 25.55 | 97 | 0.661448 |
3c2768c796b775c7ba698e928489583ea7697ef4 | 11,407 | py | Python | blender/arm/lightmapper/utility/pack.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | blender/arm/lightmapper/utility/pack.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | blender/arm/lightmapper/utility/pack.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | import bpy, os, sys, math, mathutils, importlib
import numpy as np
from . rectpack import newPacker, PackingMode, PackingBin
def postpack():
cv_installed = False
cv2 = importlib.util.find_spec("cv2")
if cv2 is None:
print("CV2 not found - Ignoring postpacking")
return 0
else:
... | 37.646865 | 179 | 0.534146 |
359b8b971b58c399cab645c65feaf345ec653ccd | 3,438 | py | Python | train.py | steermomo/pytorch-template | bddd62ee292c9f356b4b0a305fb0832176912c80 | [
"MIT"
] | 1 | 2021-08-21T09:37:07.000Z | 2021-08-21T09:37:07.000Z | train.py | steermomo/pytorch-template | bddd62ee292c9f356b4b0a305fb0832176912c80 | [
"MIT"
] | null | null | null | train.py | steermomo/pytorch-template | bddd62ee292c9f356b4b0a305fb0832176912c80 | [
"MIT"
] | null | null | null | import argparse
import collections
import torch
import os
import numpy as np
# import data_loader.data_loaders as module_data
import data_loader as module_data
import model.loss as module_loss
import model.metric as module_metric
import model.model as module_arch
from parse_config import ConfigParser
from utils.calcula... | 40.447059 | 114 | 0.679756 |
161d2996e438039f6dd6ca39137ff4382c50c9c9 | 624 | py | Python | desafios/iniciante/distancia.py | JulioCFSdev/ipc-python | 44ba77d3949782094d41052cdabcfce708e0945e | [
"MIT"
] | 9 | 2021-08-31T04:25:51.000Z | 2021-09-16T06:40:30.000Z | desafios/iniciante/distancia.py | MayuDev/ipc-python | d2380675a5f874ff850876600e5c70e227d765ae | [
"MIT"
] | 2 | 2021-09-05T20:49:01.000Z | 2021-09-06T23:34:37.000Z | desafios/iniciante/distancia.py | MayuDev/ipc-python | d2380675a5f874ff850876600e5c70e227d765ae | [
"MIT"
] | 8 | 2021-08-31T23:55:18.000Z | 2021-09-29T23:33:49.000Z | '''
Dois carros (X e Y) partem em uma mesma direรงรฃo. O carro X sai com velocidade constante de 60 Km/h e o carro Y
sai com velocidade constante de 90 Km/h. Em uma hora (60 minutos) o carro Y consegue se distanciar
30 quilรดmetros do carro X, ou seja, consegue se afastar um quilรดmetro a cada 2 minutos.
Leia a distรขncia ... | 32.842105 | 110 | 0.740385 |
d3d0dffb536e1a92c93a4f8f9f8cb2be3f16af25 | 1,723 | py | Python | meraki_v0/api/netflow_settings.py | zabrewer/dashboard-api-python | bc21b6852e3167dcdf79585928a963efebb9d0ee | [
"MIT"
] | 2 | 2020-01-09T08:35:39.000Z | 2020-01-09T09:23:53.000Z | meraki_v0/api/netflow_settings.py | zabrewer/dashboard-api-python | bc21b6852e3167dcdf79585928a963efebb9d0ee | [
"MIT"
] | null | null | null | meraki_v0/api/netflow_settings.py | zabrewer/dashboard-api-python | bc21b6852e3167dcdf79585928a963efebb9d0ee | [
"MIT"
] | null | null | null | class NetFlowSettings(object):
def __init__(self, session):
super(NetFlowSettings, self).__init__()
self._session = session
def getNetworkNetflowSettings(self, networkId: str):
"""
**Return the NetFlow traffic reporting settings for a network**
https://api.meraki.com... | 37.456522 | 129 | 0.63668 |
f7918598e13bbc3c8b40b03d1304aa15c2575d26 | 1,408 | py | Python | primenum-2.py | shyed2001/Python_Programming | 93ef958e3d8aa77f9191b550972235ce4fe4a6cb | [
"bzip2-1.0.6"
] | 2 | 2019-05-01T04:32:14.000Z | 2019-05-04T11:28:18.000Z | primenum-2.py | shyed2001/python-learning-basics | 93ef958e3d8aa77f9191b550972235ce4fe4a6cb | [
"bzip2-1.0.6"
] | null | null | null | primenum-2.py | shyed2001/python-learning-basics | 93ef958e3d8aa77f9191b550972235ce4fe4a6cb | [
"bzip2-1.0.6"
] | null | null | null |
print("""primelist2=[]
lower=int(input("please enter the 'lower' or first value: " ))
upper=int(input("please enter the 'upper' or last value: " ))
for num in range (lower, upper+1):
if num>1:
for i in range (2,num):
if num%i==0:
break
else:
primelist.append(n... | 32.744186 | 79 | 0.600852 |
6b1760e5edde843f5099ffdff5a2561e096331c9 | 69,572 | py | Python | tests/test_cognitoidp/test_cognitoidp.py | Visya/moto | e5b3f4181dcad2f5fadb5dc080aa43cdf547f973 | [
"Apache-2.0"
] | 1 | 2021-12-12T04:23:06.000Z | 2021-12-12T04:23:06.000Z | tests/test_cognitoidp/test_cognitoidp.py | Visya/moto | e5b3f4181dcad2f5fadb5dc080aa43cdf547f973 | [
"Apache-2.0"
] | 2 | 2018-08-07T10:47:18.000Z | 2018-08-08T15:13:04.000Z | tests/test_cognitoidp/test_cognitoidp.py | Visya/moto | e5b3f4181dcad2f5fadb5dc080aa43cdf547f973 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import json
import os
import random
import re
import hmac
import hashlib
import base64
import requests
import uuid
import boto3
# noinspection PyUnresolvedReferences
import sure # noqa
from botocore.exceptions import ClientError
from jose import jws, jwk, jwt
import pytest
... | 35.137374 | 110 | 0.690623 |
b3127ed1be7e866c41cc29c27cfe06a28fe5ca19 | 322 | py | Python | app/models/Model/UserModels.py | OpenHill/OpenHi | 92279362b6513e066dd10f6ccbff8ab8a30b066e | [
"Apache-2.0"
] | null | null | null | app/models/Model/UserModels.py | OpenHill/OpenHi | 92279362b6513e066dd10f6ccbff8ab8a30b066e | [
"Apache-2.0"
] | null | null | null | app/models/Model/UserModels.py | OpenHill/OpenHi | 92279362b6513e066dd10f6ccbff8ab8a30b066e | [
"Apache-2.0"
] | null | null | null | class UserModel:
def __init__(self, uid, nikename, email, img, statement, post, flag, comment):
self.uid = uid
self.nikename = nikename
self.email = email
self.img = img
self.statement = statement
self.flag = flag
self.post = post
self.comment = commen... | 29.272727 | 82 | 0.590062 |
03b0d21ba7601dbf35971b9730942dbbfe975f07 | 10,583 | py | Python | src/sardana/pool/poolcontrollers/test/base.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 43 | 2016-11-25T15:21:23.000Z | 2021-08-20T06:09:40.000Z | src/sardana/pool/poolcontrollers/test/base.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 1,263 | 2016-11-25T15:58:37.000Z | 2021-11-02T22:23:47.000Z | src/sardana/pool/poolcontrollers/test/base.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 58 | 2016-11-21T11:33:55.000Z | 2021-09-01T06:21:21.000Z | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.tango-controls.org/static/sardana/latest/doc/html/index.html
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redi... | 34.472313 | 82 | 0.621185 |
5fefa90e9f3ac1276eed6daa988dfee40680fc50 | 4,835 | py | Python | hyperparameter_tuning/keras_bring_your_own/trainer/start.py | timmattison/amazon-sagemaker-examples | 4277a89d4279827bcdcacb30076ec18bf355b00d | [
"Apache-2.0"
] | 7 | 2018-10-25T16:35:54.000Z | 2022-02-12T15:24:11.000Z | hyperparameter_tuning/keras_bring_your_own/trainer/start.py | timmattison/amazon-sagemaker-examples | 4277a89d4279827bcdcacb30076ec18bf355b00d | [
"Apache-2.0"
] | 6 | 2020-01-28T22:54:35.000Z | 2022-02-10T00:44:46.000Z | hyperparameter_tuning/keras_bring_your_own/trainer/start.py | timmattison/amazon-sagemaker-examples | 4277a89d4279827bcdcacb30076ec18bf355b00d | [
"Apache-2.0"
] | 8 | 2020-12-14T15:49:24.000Z | 2022-03-23T18:38:36.000Z | # Copyright 2018 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file acc... | 40.630252 | 117 | 0.759462 |
84831e9e624b1b07e7b74663ef8bc48c178fecbd | 1,347 | py | Python | testing/data/list_constants.py | lizschley/number_six | a427202397822fca1f49d43d138c24fffdbe95da | [
"MIT"
] | 1 | 2020-07-14T20:13:05.000Z | 2020-07-14T20:13:05.000Z | testing/data/list_constants.py | lizschley/number_six | a427202397822fca1f49d43d138c24fffdbe95da | [
"MIT"
] | 3 | 2021-04-06T20:40:08.000Z | 2021-06-03T21:54:21.000Z | testing/data/list_constants.py | lizschley/number_six | a427202397822fca1f49d43d138c24fffdbe95da | [
"MIT"
] | null | null | null | ''' This is for list data that is stored in constants and used for Testing'''
KEYS_FOR_PARA_DISPLAY_CONTEXT = ['title', 'title_note', 'paragraphs']
TEXT_LIST_WITH_PARA_TAGS = [
'<p>If the stem on your ground-trailing vine is reddish in color with',
'red-tinted hairs and thin, fine thorns, it\'s a dewberry. Bl... | 51.807692 | 86 | 0.723088 |
a5ec818d849f26ecb5a31551a50cc05f8edbeb90 | 82 | py | Python | resourceful/tests/__init__.py | rca/django-resourceful | 48e8b8b7c1b47b45a9ebd14c00b1a01623074e9b | [
"Apache-2.0"
] | 2 | 2016-12-05T13:23:20.000Z | 2019-08-14T02:06:31.000Z | resourceful/tests/__init__.py | rca/django-resourceful | 48e8b8b7c1b47b45a9ebd14c00b1a01623074e9b | [
"Apache-2.0"
] | 4 | 2015-11-02T05:21:49.000Z | 2020-06-05T16:59:24.000Z | resourceful/tests/__init__.py | rca/django-resourceful | 48e8b8b7c1b47b45a9ebd14c00b1a01623074e9b | [
"Apache-2.0"
] | 1 | 2019-09-06T16:07:58.000Z | 2019-09-06T16:07:58.000Z | from util import find_test_modules
locals().update(find_test_modules(__file__))
| 16.4 | 44 | 0.829268 |
58c835d72b629d48a466c044ebfe823651f1f975 | 16,468 | py | Python | pybind/slxos/v16r_1_00b/isis_state/ipv4_routes/ipv4_route_entry/nh_info/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/isis_state/ipv4_routes/ipv4_route_entry/nh_info/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/isis_state/ipv4_routes/ipv4_route_entry/nh_info/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 65.349206 | 740 | 0.728807 |
3aa13e40620229a93dd161f66c4e18a925ae1d67 | 25,871 | py | Python | claudio_funcoes_sub.py | claudiovaliense/compression_sparse | 7f67129c205249ee817a720ca6af188c687c227b | [
"MIT"
] | null | null | null | claudio_funcoes_sub.py | claudiovaliense/compression_sparse | 7f67129c205249ee817a720ca6af188c687c227b | [
"MIT"
] | null | null | null | claudio_funcoes_sub.py | claudiovaliense/compression_sparse | 7f67129c205249ee817a720ca6af188c687c227b | [
"MIT"
] | 1 | 2021-10-31T17:22:25.000Z | 2021-10-31T17:22:25.000Z | #Author: Claudio Moises Valiense de Andrade. Licence: MIT. Objective: Create general purpose library
import unidecode # remove accents
import io
import json # Manipulate extension json
import collections # quantifica elementos em listas e conjuntos
import random
from datetime import datetime # Datetime for time in fi... | 49.847784 | 394 | 0.632291 |
3deede584a86d2444508d70260fe2c57119cda8e | 2,896 | py | Python | src/tests/MultiplierStreamTester.py | datenlord/poseidon-spinalhdl | 1e4ce3f0ae06d6c264e103629dd28a75c119a548 | [
"MIT"
] | null | null | null | src/tests/MultiplierStreamTester.py | datenlord/poseidon-spinalhdl | 1e4ce3f0ae06d6c264e103629dd28a75c119a548 | [
"MIT"
] | null | null | null | src/tests/MultiplierStreamTester.py | datenlord/poseidon-spinalhdl | 1e4ce3f0ae06d6c264e103629dd28a75c119a548 | [
"MIT"
] | 1 | 2021-12-18T08:44:10.000Z | 2021-12-18T08:44:10.000Z | from operator import truediv
import cocotb
import random
from cocotb.clock import Clock
from cocotb.result import TestSuccess
from cocotb.triggers import RisingEdge
from queue import Queue
CASES_NUM = 3000 # the number of test cases
class MultiplierTester:
def __init__(self, target, mul_width, stages_num):
... | 31.824176 | 83 | 0.614296 |
376fbde6d8b9c63dc964118c011be5108a23d73a | 6,649 | py | Python | faucet/faucet_pipeline.py | tduqu/faucet | 62325eacae1c79cabc06d4d1a0e413d82530639f | [
"Apache-2.0"
] | null | null | null | faucet/faucet_pipeline.py | tduqu/faucet | 62325eacae1c79cabc06d4d1a0e413d82530639f | [
"Apache-2.0"
] | null | null | null | faucet/faucet_pipeline.py | tduqu/faucet | 62325eacae1c79cabc06d4d1a0e413d82530639f | [
"Apache-2.0"
] | null | null | null | """Standard FAUCET pipeline."""
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2018 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file... | 33.923469 | 93 | 0.680102 |
316363c4267d8321bb67eb2ec429109c71dec788 | 284,562 | py | Python | vegaapiclient/generated/vega/snapshot/v1/snapshot_pb2.py | vegaprotocol/sdk-python | 2491f62704afd806a47cb8467a7edf0dd65bbf1b | [
"MIT"
] | 1 | 2022-01-10T01:20:21.000Z | 2022-01-10T01:20:21.000Z | vegaapiclient/generated/vega/snapshot/v1/snapshot_pb2.py | vegaprotocol/sdk-python | 2491f62704afd806a47cb8467a7edf0dd65bbf1b | [
"MIT"
] | 8 | 2021-10-01T12:54:27.000Z | 2022-03-24T12:22:40.000Z | vegaapiclient/generated/vega/snapshot/v1/snapshot_pb2.py | vegaprotocol/sdk-python | 2491f62704afd806a47cb8467a7edf0dd65bbf1b | [
"MIT"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: vega/snapshot/v1/snapshot.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf im... | 46.053083 | 30,324 | 0.760685 |
65af2bcb1a9e8f38761020e9269eb4ba11597fd6 | 1,100 | py | Python | openstack_dashboard/dashboards/sdscontroller/storagepolicies/policies/models.py | iostackproject/SDS-dashboard | efa3d7968c738bfb10bc19776f24f2937d5802d8 | [
"Apache-2.0"
] | 1 | 2021-01-20T00:14:15.000Z | 2021-01-20T00:14:15.000Z | openstack_dashboard/dashboards/sdscontroller/storagepolicies/policies/models.py | iostackproject/SDS-dashboard | efa3d7968c738bfb10bc19776f24f2937d5802d8 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/sdscontroller/storagepolicies/policies/models.py | iostackproject/SDS-dashboard | efa3d7968c738bfb10bc19776f24f2937d5802d8 | [
"Apache-2.0"
] | null | null | null | class StaticPolicy:
"""
StaticPolicy class represents the policy data
"""
def __init__(self, static_policy_id, target_id, target_name, filter_name, object_type, object_size, execution_server, execution_server_reverse, execution_order, params):
self.id = target_id + ':' + static_policy_id
... | 35.483871 | 173 | 0.693636 |
d29592fc7509052f13d05c83301d82329baa0c93 | 2,335 | py | Python | artellapipe/libs/alembic/core/alembic.py | ArtellaPipe/artellapipe-libs-alembic | 16e4262baeb4ad28abe591628fc0f0510223d2ee | [
"MIT"
] | null | null | null | artellapipe/libs/alembic/core/alembic.py | ArtellaPipe/artellapipe-libs-alembic | 16e4262baeb4ad28abe591628fc0f0510223d2ee | [
"MIT"
] | null | null | null | artellapipe/libs/alembic/core/alembic.py | ArtellaPipe/artellapipe-libs-alembic | 16e4262baeb4ad28abe591628fc0f0510223d2ee | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains utilities functions to work with Alembics
"""
from __future__ import print_function, division, absolute_import
import logging
from tpDcc.core import dcc as core_dcc
from tpDcc.core import library, reroute
from artellapipe.libs.alembic.core impo... | 28.82716 | 111 | 0.671092 |
31bfd1631a0f645628f008a3d8093ce4d9e4c0eb | 2,404 | py | Python | ply/tcukparser.py | yanne/rfparser | 19e064f8afd94f4492646160538e7327b777751b | [
"Apache-2.0"
] | null | null | null | ply/tcukparser.py | yanne/rfparser | 19e064f8afd94f4492646160538e7327b777751b | [
"Apache-2.0"
] | null | null | null | ply/tcukparser.py | yanne/rfparser | 19e064f8afd94f4492646160538e7327b777751b | [
"Apache-2.0"
] | null | null | null | import re
from util import accumulate_to_list
class TCUKParser(object):
tokens = ('NAME', 'SEPARATOR', 'KEYWORD', 'ARGUMENT', 'CONTINUATION', 'ASSIGNMENT', 'SETTING', 'SETTING_VALUE')
t_ignore = '\n'
def t_NAME(self, t):
r'^(\S+\ )*\S+'
self._kw_seen = False
self._setting_seen = ... | 25.574468 | 115 | 0.476705 |
450608ad4e6b56b982e1d2a7e1149333a4014359 | 30,503 | py | Python | openerp/addons/procurement/procurement.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 3 | 2016-01-29T14:39:49.000Z | 2018-12-29T22:42:00.000Z | openerp/addons/procurement/procurement.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 2 | 2016-03-23T14:29:41.000Z | 2017-02-20T17:11:30.000Z | openerp/addons/procurement/procurement.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | 48.340729 | 321 | 0.616071 |
b8b9661824ccc4c8facc586c071c969cb5efddfe | 9,793 | py | Python | third-party/paxos/.waf3-2.0.18-96675f149f50dab16c9e2e6aaf5e787b/waflib/Tools/ifort.py | shenweihai1/rolis-eurosys2022 | 59b3fd58144496a9b13415e30b41617b34924323 | [
"MIT"
] | 1 | 2022-02-13T13:01:25.000Z | 2022-02-13T13:01:25.000Z | third-party/paxos/.waf3-2.0.18-96675f149f50dab16c9e2e6aaf5e787b/waflib/Tools/ifort.py | shenweihai1/rolis-eurosys2022 | 59b3fd58144496a9b13415e30b41617b34924323 | [
"MIT"
] | null | null | null | third-party/paxos/.waf3-2.0.18-96675f149f50dab16c9e2e6aaf5e787b/waflib/Tools/ifort.py | shenweihai1/rolis-eurosys2022 | 59b3fd58144496a9b13415e30b41617b34924323 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
import os,re,traceback
from waflib import Utils,Logs,Errors
from waflib.Tools import fc,fc_config,fc_scan,ar,ccroot
from waflib.Configure import conf
from waflib.TaskGen import after_method,feature
@... | 32.213816 | 126 | 0.745226 |
5278d716de234db45568c684dc0771fe480fe3ac | 64,511 | py | Python | Lib/test/test_float.py | mbeacom/cpython | 65d98d0f53f558d7c799098da0abf376068c15fd | [
"CNRI-Python-GPL-Compatible"
] | 2 | 2019-05-26T16:03:33.000Z | 2019-06-15T10:18:13.000Z | Lib/test/test_float.py | mbeacom/cpython | 65d98d0f53f558d7c799098da0abf376068c15fd | [
"CNRI-Python-GPL-Compatible"
] | 4 | 2022-03-30T01:50:22.000Z | 2022-03-30T01:50:28.000Z | Lib/test/test_float.py | mbeacom/cpython | 65d98d0f53f558d7c799098da0abf376068c15fd | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2019-04-15T21:39:21.000Z | 2019-04-15T21:39:21.000Z | import fractions
import operator
import os
import random
import sys
import struct
import time
import unittest
from test import support
from test.test_grammar import (VALID_UNDERSCORE_LITERALS,
INVALID_UNDERSCORE_LITERALS)
from math import isinf, isnan, copysign, ldexp
INF = float("inf")... | 44.551796 | 88 | 0.582676 |
480191266715ce31fd98a0a39eba23771ace6571 | 2,961 | py | Python | Q/questionnaire/models/models_references.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | Q/questionnaire/models/models_references.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | 477 | 2015-01-07T18:22:27.000Z | 2017-07-17T15:05:48.000Z | Q/questionnaire/models/models_references.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | ####################
# ES-DOC CIM Questionnaire
# Copyright (c) 2017 ES-DOC. All rights reserved.
#
# University of Colorado, Boulder
# http://cires.colorado.edu/
#
# This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT].
####################
from coll... | 34.835294 | 115 | 0.680176 |
5340ec3722076325b04733478f801d58073b8bf2 | 3,341 | py | Python | qcdb/programs/psi4/read_options.py | loriab/qccddb | d9e156ef8b313ac0633211fc6b841f84a3ddde24 | [
"BSD-3-Clause"
] | 8 | 2019-03-28T11:54:59.000Z | 2022-03-19T03:31:37.000Z | qcdb/programs/psi4/read_options.py | loriab/qccddb | d9e156ef8b313ac0633211fc6b841f84a3ddde24 | [
"BSD-3-Clause"
] | 39 | 2018-10-31T23:02:18.000Z | 2021-12-12T22:11:37.000Z | qcdb/programs/psi4/read_options.py | loriab/qccddb | d9e156ef8b313ac0633211fc6b841f84a3ddde24 | [
"BSD-3-Clause"
] | 9 | 2018-03-12T20:51:50.000Z | 2022-02-28T15:18:34.000Z | import collections
from ...keywords import Keyword, Keywords, parsers
def load_psi4_keywords(options: Keywords) -> None:
opts = _query_options_defaults_from_psi()
def p4_validator(val):
try:
nuval = val.upper()
except AttributeError:
nuval = val
return nuval
... | 26.307087 | 104 | 0.557019 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.