content
stringlengths
7
928k
avg_line_length
float64
3.5
33.8k
max_line_length
int64
6
139k
alphanum_fraction
float64
0.08
0.96
licenses
list
repository_name
stringlengths
7
104
path
stringlengths
4
230
size
int64
7
928k
lang
stringclasses
1 value
# MIT License # # Copyright (c) 2020 PANGAEA (https://www.pangaea.de/) # # 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,...
51.3375
111
0.62917
[ "MIT" ]
EOSC-synergy/FUJI_pipeline.sqaaas
fuji_server/helper/metadata_collector_datacite.py
4,107
Python
#!/usr/bin/env python # -*- coding: utf-8 -*- # # imageprocessor documentation build configuration file. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a ...
30.245283
78
0.671033
[ "MIT" ]
UBC-MDS/524_group4
docs/conf.py
4,809
Python
# coding=utf-8 """ PAT - the name of the current project. main_portfolio_maker.py - the name of the new file which you specify in the New File dialog box during the file creation. Hossein - the login name of the current user. 8 / 8 / 18 - the current system date. 9: 14 AM - the current system time. PyCharm - the name o...
37.030303
94
0.719313
[ "Apache-2.0" ]
pourmatin/Graph
portfolio_maker/main_portfolio_maker.py
1,222
Python
import discord import json import CloudDB import nqrng from cloudant.result import Result global CONFIG client = discord.Client() token = "" #import config file with open('config.json', 'r') as f: getFile = json.load(f) global CONFIG CONFIG = getFile["services"]["discord"][0] token = CONFIG["token"] #...
22.982143
67
0.648796
[ "Apache-2.0" ]
rochisha0/quantum-ugly-duckling
quantum-ugly-duckling-main/discord_bot.py
1,287
Python
from rest_framework.routers import DefaultRouter from rest_framework_nested import routers from kubeops_api import api from django.urls import path from django.conf.urls import url from kubeops_api.apis import host from kubeops_api.apis import item from kubeops_api.apis import grade app_name = "kubeops_api" router = ...
63.931034
117
0.682309
[ "Apache-2.0" ]
jackwiy/KubeOperator
core/apps/kubeops_api/api_url.py
3,708
Python
import tensorflow as tf from tensorflow.contrib.seq2seq.python.ops.attention_wrapper import LuongAttention, \ AttentionWrapper, AttentionWrapperState class AttentionMode: """ Enumerator for the Luong style local attention modes. - See [1]: Effective Approaches to Attention-based Neural Machine Transl...
41.913265
99
0.62321
[ "MIT" ]
yweweler/single-speaker-tts
tacotron/attention.py
24,646
Python
import logging import warnings from rest_framework import serializers from rest_framework.authtoken.models import Token from django.contrib.auth import get_user_model l = logging.getLogger(__name__) class OAuth2InputSerializer(serializers.Serializer): provider = serializers.CharField(required=False) code =...
27.066667
93
0.71133
[ "MIT" ]
silverlogic/django-rest-social-auth
rest_social_auth/serializers.py
2,030
Python
from __future__ import absolute_import, unicode_literals import factory from wagtail.wagtailcore.models import Site, Page from wagtailsystemtext.models import SystemString class PageFactory(factory.DjangoModelFactory): class Meta: model = Page path = factory.Sequence(lambda x: '00010001{:04d}'.form...
24.421053
71
0.712284
[ "MIT" ]
Frojd/wagtail-systemtext
tests/factories.py
928
Python
# -*- coding: utf-8 -*- """Handle orders and pendingOrders endpoints.""" from .apirequest import APIRequest from .decorators import dyndoc_insert, endpoint from .responses.orders import responses from abc import abstractmethod class Orders(APIRequest): """Orders - abstract base class to handle the orders endpoint...
27.202658
77
0.611138
[ "MIT" ]
Milad137/oanda-api-v20
oandapyV20/endpoints/orders.py
8,188
Python
from adafruit_circuitplayground.express import cpx while True: if cpx.shake(shake_threshold=20): print("Shake detected!")
23.333333
51
0.714286
[ "MIT" ]
jadudm/feather-isa
infra/libs-400rc2-20190512/examples/shake_simpletest.py
140
Python
""" Copyright (c) 2019 Microsoft Corporation. All rights reserved. MIT License ...
46.067376
158
0.583404
[ "MIT" ]
gaochangfeng/pykaldi2
bin/train_se.py
12,991
Python
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
41.602787
80
0.673283
[ "Apache-2.0" ]
18802459097/tensorflow
tensorflow/compiler/tests/ftrl_test.py
11,940
Python
# Copyright (c) 2014 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
38.95082
78
0.683502
[ "Apache-2.0" ]
JackyGao2016/OpenStack-ML2
neutron/tests/functional/agent/linux/test_keepalived.py
2,376
Python
from pyquilted.quilted.section import Section class Work(Section): """The work section in a quilted resume The work object is a complex section. It contains blocks of jobs and optionally a list of slugs. As a section it mixes in the sectionable functionality. """ def __init__(self, b...
27.12
75
0.627581
[ "MIT" ]
cocoroutine/pyquilted
pyquilted/quilted/work.py
1,356
Python
# Generated by Django 2.2 on 2019-05-02 16:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('openbook_communities', '0021_auto_20190502_1754'), ] operations = [ migrations.AddIndex( model_name='communitymembership', ...
23.944444
100
0.651972
[ "MIT" ]
OkunaOrg/okuna-api
openbook_communities/migrations/0022_auto_20190502_1804.py
431
Python
"""Collect and parse kobo forms.""" from datetime import datetime, timedelta, timezone from os import getenv from typing import Dict, List from dateutil.parser import parse as dtparser from flask import request import requests from werkzeug.exceptions import BadRequest, InternalServerError, NotFound def get_kobo_...
34.136364
99
0.687916
[ "MIT" ]
tdlinh2712/prism-frontend
api-flask/app/kobo.py
6,008
Python
import logging import ldap import six from collections import Mapping, Iterable from ldap import modlist from nodeconductor.structure import ServiceBackend, ServiceBackendError logger = logging.getLogger(__name__) class LDAPBackendError(ServiceBackendError): pass class UnauthorizedError(LDAPBackendError):...
28.56044
83
0.629088
[ "MIT" ]
opennode/nodeconductor-ldap
src/nodeconductor_ldap/backend.py
2,599
Python
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...
70.298872
812
0.747012
[ "Apache-2.0" ]
extremenetworks/pybind
pybind/slxos/v17r_1_01a/openflow_state/flow_id/__init__.py
74,798
Python
# coding: utf-8 """ Gitea API. This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.16.7 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class WikiCommit(object): """NOTE: This class is auto...
25.666667
89
0.546485
[ "MIT" ]
r7l/python-gitea-api
gitea_api/models/wiki_commit.py
4,851
Python
# 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 from...
42.292683
264
0.647059
[ "Apache-2.0" ]
pulumi-bot/pulumi-azure-native
sdk/python/pulumi_azure_native/insights/v20191101preview/data_collection_rule.py
8,670
Python
# # The Multiverse Platform is made available under the MIT License. # # Copyright (c) 2012 The Multiverse Foundation # # 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 restrict...
32.724138
113
0.676923
[ "MIT" ]
AustralianDisabilityLimited/MultiversePlatform
tools/Machinima/setupRenderHost.py
4,745
Python
# INSTRUCTIONS # Translate the text and write it between the " # EXAMPLE: original -> "This text is in english: value {0}" # translation -> "Aquest text està en anglès: valor {0}" # If you see sth like {0}, {1}, maintain it on the translated sentence # Meke special attention to elements like "...
54.630137
187
0.566825
[ "Apache-2.0" ]
IPriam/ElevenClock
elevenclock/lang/lang_nl.py
7,982
Python
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
37.364238
114
0.701347
[ "Apache-2.0" ]
Abdelrhman-Hosny/metrics
tests/regression/test_tweedie_deviance.py
5,642
Python
{ 'name': 'Chapter 06, Recipe 4 code', 'summary': 'Update values of recordset records', 'depends': ['my_module'], # from Chapter 4 }
24.333333
52
0.609589
[ "MIT" ]
PacktPublishing/Odoo-11-Development-Coobook-Second-Edition
Chapter06/ch06_r05/some_model_ch06r05/__manifest__.py
146
Python
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
41.304348
80
0.683947
[ "Apache-2.0" ]
RossKohler/tfx-bsl
tfx_bsl/public/beam/run_inference.py
3,800
Python
import warnings from time import sleep from pyspedas import time_double from pytplot import get_data, store_data, options import numpy as np try: from hapiclient import hapi as load_hapi except: print('hapiclient not found; install with: "pip install hapiclient"') def hapi(trange=None, server=None, dataset=No...
30.26257
106
0.564335
[ "MIT" ]
pulupa/pyspedas
pyspedas/hapi/hapi.py
5,417
Python
# -*- coding: utf-8 -*- """ Created on Sun Apr 25 21:37:26 2021 @author: brian """ import os os.chdir('C:/Users/brian/Desktop/All/UWEC/DS785_Capstone/Project') import brawl_data as bd import matplotlib.pyplot as plt import seaborn as sns import pandas as pd from statsmodels.stats.proportion import proportion_confint ...
61.426471
238
0.741681
[ "MIT" ]
brianjstroh/BrawlStars
Capstone_Tables&Figures_Results_Graphs.py
4,177
Python
# -*- coding: utf-8 -*- """ hyper/tls ~~~~~~~~~ Contains the TLS/SSL logic for use in hyper. """ import os.path as path import six from .common.exceptions import MissingCertFile from .compat import ignore_missing, ssl NPN_PROTOCOL = 'h2' H2_NPN_PROTOCOLS = [NPN_PROTOCOL, 'h2-16', 'h2-15', 'h2-14'] SUPPORTED_NPN_PROT...
38.59542
79
0.69462
[ "MIT" ]
qtacore/hyper
hyper/tls.py
5,066
Python
'''This module implements concrete agent controllers for the rollout worker''' import numpy as np import os import random import rospkg import rospy from gazebo_msgs.msg import ModelState from gazebo_msgs.srv import SetModelState, SpawnModel from markov.agent_ctrl.constants import ConfigParams, BOT_CAR_Z, OBSTACLE_Z f...
47.335294
120
0.663601
[ "Apache-2.0" ]
LastRemote/amazon-sagemaker-examples
reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/src/markov/agent_ctrl/obstacles_agent_ctrl.py
8,047
Python
import torch import torch.nn as nn class CustomModel(nn.Module): def __init__(self): super().__init__() self.stage1_block = nn.Sequential( nn.Conv2d( in_channels=3, out_channels=64, kernel_size=3, stride=1, ...
21.294118
42
0.380525
[ "MIT" ]
olaals/masteroppgave
machine-learning/ml-projects/locally-connected/models/models/model_bn.py
1,448
Python
# Generated by Django 2.1.5 on 2019-03-16 16:41 from django.db import migrations, models import django.db.models.deletion import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ("people", "0012_auto_20190316_1641"), ("services", "0023_key_points_heading_not_required")...
27.181818
61
0.58194
[ "MIT" ]
elviva404/wagtail-torchbox
tbx/services/migrations/0024_auto_20190316_1641.py
897
Python
#!/usr/bin/env python # # Copyright 2019 YugaByte, Inc. and Contributors # # Licensed under the Polyform Free Trial License 1.0.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # https://github.com/YugaByte/yugabyte-db/blob/master/licenses...
38.933269
100
0.645776
[ "Apache-2.0", "CC0-1.0" ]
bhavin192/yugabyte-db
managed/devops/opscli/ybops/cloud/aws/utils.py
40,257
Python
from typing import List import questionary def get_first_checked( choices: List[questionary.Choice], prev_search=None ) -> questionary.Choice: first_checked = choices[0] if prev_search: first_checked = next(c for c in choices if c.checked) return first_checked
23.916667
61
0.735192
[ "MIT" ]
capellaspace/console-client
capella_console_client/cli/prompt_helpers.py
287
Python
# -*- coding: utf-8 -*- """An implementation of the extension to ERMLP.""" from typing import Optional, Type import torch from torch import nn from ..base import EntityRelationEmbeddingModel from ...losses import BCEAfterSigmoidLoss, Loss from ...regularizers import Regularizer from ...triples import TriplesFactory...
36.155914
112
0.639851
[ "MIT" ]
Sina-Baharlou/pykeen
src/pykeen/models/unimodal/ermlpe.py
6,725
Python
import sqlite3 from abc import ABCMeta, abstractmethod from model.dao.daoexception import DAOException class AbstractDAO(object): __metaclass__ = ABCMeta def __init__(self, conn): self._conn = conn """ base CRUD operation """ # GENERIC CREATE FUNCTION def _insert(self, request, p...
28.090909
50
0.506472
[ "MIT" ]
ChatNoir76/Championnat
model/dao/abstractdao.py
1,854
Python
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/10/31 0031 18:55 # @Author : Hadrianl # @File : realtime_data_server # 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 # # ...
42.699552
134
0.598824
[ "Apache-2.0" ]
hadrianl/rqalpha_kairui
rqalpha/examples/extend_api/HKMod/realtime_data_server.py
9,854
Python
from pygments.style import Style from pygments.token import ( Comment, Error, Keyword, Literal, Name, Number, Operator, String, Text ) class BaseSixteenStyle(Style): base00 = '#151515' base01 = '#202020' base02 = '#303030' base03 = '#505050' base04 = '#B0B0B0' base05 = '#D0D0D0' base06...
25.337838
74
0.570667
[ "MIT" ]
philj56/base16-pygments
pygments_base16/base16-classic-dark.py
1,875
Python
# Copyright 2019 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...
43.571429
126
0.721311
[ "Apache-2.0" ]
anyrenwei/akg
tests/common/test_run/abs_sum_run.py
2,135
Python
import glob import os from distutils.dir_util import copy_tree from shutil import copy from alembic.command import init as _init from metric.cli.conf import Conf from metric.cli.template import Template from metric.src import Base from metric.src.package import Package def init(name): """ ## Init [ID] ...
30.174419
119
0.656647
[ "MIT" ]
kzulfazriawan/metric
metric/cli/__init__.py
2,595
Python
import cv2 import os image = cv2.imread("/content/drive/My Drive/DIC_personal/data/face.jpg") cascade = cv2.CascadeClassifier("/content/drive/My Drive/DIC_personal/haarcascades/haarcascade_upperbody.xml") #image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) face_list = cascade.detectMultiScale(image) #face_list = cascade....
30.565217
110
0.72973
[ "MIT" ]
Mishiba-Toshihiro/IoT_to_AWS
face_1.py
703
Python
# coding: utf-8 """ FlashBlade REST API A lightweight client for FlashBlade REST API 2.3, developed by Pure Storage, Inc. (http://www.purestorage.com/). OpenAPI spec version: 2.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typ...
33.040323
129
0.584818
[ "BSD-2-Clause" ]
Flav-STOR-WL/py-pure-client
pypureclient/flashblade/FB_2_3/models/replication_performance.py
4,097
Python
''' Author: Guanghan Ning E-mail: guanghan.ning@jd.com October 22th, 2018 Unit test for graph. ''' import os import sys sys.path.append(os.path.abspath("../utils/")) from graph import * def test_normalize_diagraph(): num_node = 15 self_link = [(i, i) for i in range(num_node)] neighbor_l...
26.044444
76
0.598123
[ "MIT" ]
MikeoPerfect/video-to-pose3D
pose_trackers/lighttrack/graph/unit_test/test_graph.py
1,172
Python
from django.shortcuts import render def home(request): """ View function for simply rendering the Ionic Angular index.html """ return render(request, 'www/index.html')
19
56
0.684211
[ "Apache-2.0" ]
broden-wanner/practicality
practicality/frontend/views.py
190
Python
""" Remove super classes from the train dataset and keep it only in the validation dataset. Example command: python create_rcv1_heldout_split.py --train_fraction 0.75 --seed 42 """ import argparse import jsonlines from collections import Counter import numpy as np import random import copy import os import json def...
29.632353
145
0.664516
[ "MIT" ]
princeton-nlp/semsup
run_rcv1/preprocessing/create_rcv1_superclass_split.py
2,015
Python
#!/usr/bin/env python """Convert *.json, *.csv and other text data files to js for local use and avoid ajax call. """ import optparse from os import listdir from os.path import abspath, isfile, isdir, join, splitext, basename import json; #curdir = os.path.abspath('.') curdir = "." filter_text_ext = [".json", ".csv"...
26.060606
95
0.584109
[ "MIT" ]
floatinghotpot/ajax-local
tools/jsfy.py
2,580
Python
#!/usr/bin/env python from netmiko import ConnectHandler from getpass import getpass from datetime import datetime device = { 'device_type': 'arista_eos', 'ip': 'arista1.lasthop.io', 'username': 'pyclass', 'password': getpass(), 'global_delay_factor': 5, 'session_log': 'arista.txt', } start ...
21.956522
56
0.693069
[ "Apache-2.0" ]
grenn72/pynet-ons-feb19
nornir/netmiko_test.py
505
Python
try: from heat.common.i18n import _ except ImportError: pass from heat.engine import attributes from heat.engine import constraints from heat.engine import clients from heat.engine import properties from vnc_api import vnc_api from contrail_heat.resources import contrail try: from heat.openstack.common im...
39.36859
81
0.454124
[ "Apache-2.0" ]
atsgen/tf-heat-plugin
contrail_heat/resources/network_policy.py
12,283
Python
""" Serializer fields for django_hal """ from collections import OrderedDict from django.utils.http import urlencode from rest_framework import serializers from .utils import reverse class LinksField(serializers.DictField): """HAL-style _links field. Parameters ---------- *args : tuple A...
31.176471
112
0.556447
[ "MIT" ]
jacktrades/django-hal
django_hal/fields.py
6,360
Python
from app import app if __name__=="__main__": app.run(debug=True)
17.25
24
0.710145
[ "MIT" ]
3salles/rankaa
backend/run.py
69
Python
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
34.529661
80
0.692968
[ "Apache-2.0", "BSD-3-Clause" ]
TimvdLippe/beam
sdks/python/apache_beam/transforms/stats.py
8,149
Python
from meta_policy_search.utils import logger from meta_policy_search.meta_algos.base import MAMLAlgo from meta_policy_search.optimizers.conjugate_gradient_optimizer import ConjugateGradientOptimizer import tensorflow as tf from collections import OrderedDict class TRPOMAML(MAMLAlgo): """ Algorithm for TRPO MAM...
45.578125
162
0.624272
[ "MIT" ]
Manifold-Computing/MMAML-rl
meta_policy_search/meta_algos/trpo_maml.py
8,751
Python
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011-2014, Nigel Small # # 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...
33.238095
74
0.747851
[ "Apache-2.0" ]
alaalqadi/py2neo
py2neo/error/__init__.py
698
Python
import json import os import pandas as pd import sys sys.path.append('scripts/') from polygon import Collection, Footprint class Writer: """ Class that stores smart label values per instance """ def __init__(self, filename): """ Class initialization. :param filename: name of the file to store the data, str...
25.992647
89
0.678642
[ "MIT" ]
STASYA00/CityMorph
scripts/writer.py
3,535
Python
# Author # Angelica ACOSTA ARTETA import unittest from balance import summing, stringarray, need, weighting class TestBalance(unittest.TestCase): def test_summing(self): self.assertEqual(summing([]), 0) self.assertEqual(summing([3]), 3) self.assertEqual(summing([1,1,1,1,1]), 5) se...
32.945946
74
0.631665
[ "MIT" ]
angelicacosta/Ternary-Balance
test_balance.py
1,219
Python
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from tensorflow.python.eager import ...
38.706089
1,593
0.651218
[ "Apache-2.0", "MIT" ]
Soum-Soum/Tensorflow_Face_Finder
venv1/Lib/site-packages/tensorflow/python/debug/ops/gen_debug_ops.py
33,055
Python
from dagster import AssetKey, DagsterEventType, EventRecordsFilter, check, seven from .utils import capture_error def _normalize_asset_cursor_str(cursor_string): # the cursor for assets is derived from a json serialized string of the path. Because there are # json serialization differences between JS and Py...
35.492647
100
0.74249
[ "Apache-2.0" ]
StratoDem/dagster
python_modules/dagster-graphql/dagster_graphql/implementation/fetch_assets.py
4,827
Python
import csv source_file = "/Users/guodong/Downloads/grain_rj_evaluation.csv" target_file = "/Users/guodong/Downloads/grain_rj_avg.csv" target = open(target_file, 'w') with open(source_file, 'r') as source: source_csv = csv.reader(source_file, delimiter=',') hj = [] rid = [] zone = [] rows = [] ...
24.325581
64
0.537285
[ "MIT" ]
graindb/graindb
scripts/calculate.py
1,046
Python
"""This uses the CLUE as a Bluetooth LE sensor node.""" # Adafruit Service demo for Adafruit CLUE board. # Accessible via Adafruit Bluefruit Playground app and Web Bluetooth Dashboard. import time import board from digitalio import DigitalInOut import neopixel_write from adafruit_ble import BLERadio import ulab f...
35.4375
96
0.712774
[ "MIT" ]
zhangxd6/homeautomation
clue/temperature/code.py
7,938
Python
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # 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...
44.7
79
0.774049
[ "MIT" ]
ragne/ansible-lint
lib/ansiblelint/__init__.py
1,341
Python
""" Quick Sort ---------- Uses partitioning to recursively divide and sort the list Time Complexity: O(n**2) worst case Space Complexity: O(n**2) this version Stable: No Psuedo Code: CLRS. Introduction to Algorithms. 3rd ed. """ count = 0 def sort(seq): """ Takes a list of inte...
21.627907
75
0.539785
[ "BSD-3-Clause" ]
appleface2050/algorithms
algorithms/sorting/quick_sort.py
930
Python
import logging from datetime import datetime from pprint import pprint as pp import click from flask.cli import with_appcontext from scout.load import load_exons from scout.server.extensions import store from scout.utils.handle import get_file_handle from scout.utils.scout_requests import fetch_ensembl_exons LOG = l...
31.5
99
0.695676
[ "BSD-3-Clause" ]
Clinical-Genomics/scout
scout/commands/load/exons.py
1,827
Python
n, x = map(int, input().split()) arr = list(map(int, input().split())) for i in arr: if i < x: print(i, end=' ')
23.2
37
0.543103
[ "MIT" ]
KHJcode/Algorithm-study
Baekjoon/Python/10871.py
116
Python
import os import sys as _sys import platform import re PY2 = _sys.version_info < (3,) PY3 = not PY2 RE_NUM = re.compile(r'(\d+).+') if not PY2: # these were moved around for Python 3 from urllib.parse import (quote as url_quote, unquote as url_unquote, urlencode) # Python 3...
26.993506
76
0.624489
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
EnjoyLifeFund/macHighSierra-py36-pkgs
pika/compat.py
4,157
Python
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: cloudsupport@telestream.net Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from telestream_cloud_qc.configuration import Configuration class...
27.764368
116
0.593252
[ "MIT" ]
Telestream/telestream-cloud-python-sdk
telestream_cloud_qc_sdk/telestream_cloud_qc/models/extended_bool_value_test.py
4,831
Python
# Everything we've seen to this point has been a problem known as regression in # which we're trying to predict an actual numeric value for each observation of # N input numeric values. A more common problem is that of classification - # predicting a single binary occurance, class or label for each input. The # example...
47.311475
80
0.64784
[ "MIT" ]
avinoamr/ai-neural
07_classification.py
8,658
Python
from enum import Enum from dataclasses import dataclass class TokenType(Enum): #TYPES INT = 0 FLOAT = 1 #OPERATORS PLUS = 2 MINUS = 3 DIVIDE = 4 MULTIPLY = 5 #PARENTHESES LPAREN = 6 RPAREN = 7 #SQUARE BRACKETS L_SQUAREBRACKET = 8 R_SQ...
20.344828
80
0.574576
[ "Apache-2.0" ]
cattoware/Math-Interpreter
tokens.py
590
Python
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Jan 29, 2021 @file: train_unmixing.py @desc: Perform the training of the models for the unmixing problem. @author: laugh12321 @contact: laugh12321@vip.qq.com """ import os import numpy as np import tensorflow as tf from typing import Dict import src.model.e...
34.116667
78
0.67318
[ "MIT" ]
laugh12321/DACN
src/model/train_unmixing.py
4,094
Python
"""Probability mass function for a beta binomial distribution Functions --------- betabinom_pmf Probability mass function for a beta binomial distribution """ from bbpmf.betabinom_pmf import betabinom_pmf
21.1
62
0.781991
[ "MIT" ]
anthony-aylward/bbpmf
bbpmf/__init__.py
211
Python
from typing import List from scripter.backend.note_text import NoteText from scripter.io.writer_base import WriterBase class FormatWriter(WriterBase): def __init__(self, *, format:str=None, **kwargs): super().__init__() if format is None: self.format = 'P.{page}\n{text}\n' def dum...
27.888889
53
0.603586
[ "MIT" ]
elda27/scripter
scripter/io/format_writer.py
502
Python
import random random.sample(set([1, 2, 3, 4, 5, 6]), 2) # random select from set
27
66
0.654321
[ "MIT" ]
district10/snippet-manager
snippets/python-set-random.py
81
Python
"""Tests for stubs. Verify that various things in stubs are consistent with how things behave at runtime. """ import argparse import copy import enum import importlib import inspect import re import sys import types import warnings from functools import singledispatch from pathlib import Path from typing import Any,...
39.297233
99
0.634427
[ "MIT" ]
HarisHijazi/mojarnik-server
venv/Lib/site-packages/mypy/stubtest.py
49,711
Python
from __future__ import annotations from datetime import ( datetime, timedelta, ) from typing import Hashable import warnings import numpy as np from pandas._libs import ( index as libindex, lib, ) from pandas._libs.tslibs import ( BaseOffset, NaT, Period, Resolution, Tick, ) from ...
32.029268
96
0.593207
[ "MIT" ]
ATJWen/weather-app
env/Lib/site-packages/pandas/core/indexes/period.py
19,698
Python
from __future__ import annotations import re from typing import Callable, ClassVar, List, Optional, Pattern, Sequence, Tuple, Union, cast import discord from discord.ext import commands _ID_RE = re.compile(r"([0-9]{15,21})$") _USER_MENTION_RE = re.compile(r"<@!?([0-9]{15,21})>$") _CHAN_MENTION_RE = re.compile(r"<#(...
33.072727
98
0.580233
[ "MIT" ]
Codin-Nerds/HotWired-Bot
bot/utils/messagepredicate.py
16,371
Python
# pylint: disable=g-bad-file-header # 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/LICENS...
41.420616
80
0.696788
[ "Apache-2.0" ]
AdityaPai2398/tensorflow
tensorflow/contrib/tensor_forest/python/tensor_forest.py
34,959
Python
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class NeutronCreateFloatingIpRequestBody: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map...
27.8125
85
0.575281
[ "Apache-2.0" ]
huaweicloud/huaweicloud-sdk-python-v3
huaweicloud-sdk-eip/huaweicloudsdkeip/v2/model/neutron_create_floating_ip_request_body.py
3,115
Python
#!/usr/bin/env python # Copyright (c) 2020, Palo Alto Networks # # Permission to use, copy, modify, and/or 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 IS" A...
34.493671
80
0.728073
[ "ISC" ]
AnthoBalitrand/pan-os-python
examples/log_forwarding_profile.py
2,725
Python
from mtree.tests.fixtures.generator import ADD, REMOVE, QUERY """ actions = '16a16r16a16r' dimensions = 2 remove_chance = 0.1 """ DIMENSIONS = 2 def PERFORM(callback): callback(ADD((56, 1), QUERY((64, 81), 51.97930568373785, 1))) callback(ADD((87, 41), QUERY((52, 7), 30.190749870740614, 5))) callback(ADD((88, 28),...
58.506667
68
0.654284
[ "MIT" ]
erdavila/M-Tree
py/mtree/tests/fixtures/f16.py
4,388
Python
#!/usr/bin/env python # coding: utf-8 # ## sircat # # Makes a catalog of solar wind stream interaction regions (SIRs) and high speed solar wind streams (HSS) for the Wind, STEREO and MAVEN spacecraft since 2007. # # Authors: [C. Möstl](https://www.iwf.oeaw.ac.at/en/user-site/christian-moestl/) (twitter @chrisoutofsp...
38.94227
4,576
0.698761
[ "MIT" ]
cmoestl/heliocats
sircat.py
39,800
Python
import pandas as pd import numpy as np from scipy import stats def columns_views(player_1_df, player_2_df): columns = list(player_1_df.columns) if list(player_1_df.columns) == list(player_2_df.columns): columns = list(player_1_df.columns) player_1 = list(player_1_df.values[0]) playe...
24.175947
79
0.609857
[ "Apache-2.0" ]
shimakaze-git/football-data-analysis
playstyle_similar/playstyle_similar2.py
11,887
Python
import virtualbox, json, pprint, configparser, time, psutil, sys from pypresence import Presence class RichPresence: def __init__(self): # Initialize the VirtualBox instance, config, and assets. self.virtualbox = virtualbox.VirtualBox() self.config = configparser.ConfigParser() ...
38.786047
115
0.584483
[ "MIT" ]
Nitrodium/virtualbox-rich-presence
main.py
8,339
Python
import cv2 import numpy as np import definitions from playgrounds.core.features import Feature from playgrounds.keras_models.features.girl_boy.workers.custom_workers import CustomWorker1 from playgrounds.opencv import face_detection from playgrounds.utilities import opencv_utilities class GenderClassifier(Feature): ...
33.470588
109
0.577329
[ "Apache-2.0" ]
enohoxha/AxonPy
playgrounds/keras_models/features/girl_boy/girl_boy_feature.py
2,276
Python
#!/usr/bin/env python3 from . import util import json from electrum_civx.network import filter_protocol peers = filter_protocol(util.get_peers()) results = util.send_request(peers, 'blockchain.estimatefee', [2]) print(json.dumps(results, indent=4))
31.125
65
0.787149
[ "MIT" ]
checho1989/electrum-civx
electrum/scripts/estimate_fee.py
249
Python
''' 实验名称:以太网MQTT通信 版本:v1.0 日期:2020.12 作者:01Studio 说明:通过Socket编程实现以太MQTT通信 订阅者(subscribe)。 ''' import network,usocket,time from simple import MQTTClient from tftlcd import LCD43M #定义常用颜色 RED = (255,0,0) GREEN = (0,255,0) BLUE = (0,0,255) BLACK = (0,0,0) #4.3寸LCD初始化 d = LCD43M(portrait=1) d.fill((255,255,255)) #填充白色 ...
20.169231
71
0.656751
[ "MIT" ]
01studio-lab/MicroPython-Examples
哥伦布(STM32F407)/3.通讯实验/2.以太网/3.MQTT通信/2.订阅者(subscribe)/main.py
1,599
Python
from math import ceil import pytest from scipy.stats import norm, randint import numpy as np from sklearn.datasets import make_classification from sklearn.dummy import DummyClassifier from sklearn.experimental import enable_halving_search_cv # noqa from sklearn.model_selection import StratifiedKFold from sklearn.mod...
35.587819
88
0.648358
[ "BSD-3-Clause" ]
3021104750/scikit-learn
sklearn/model_selection/tests/test_successive_halving.py
25,125
Python
# -*- coding: utf-8 -*- # Copyright 2018 Spanish National Research Council (CSIC) # # 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 # # Unle...
37.969512
123
0.546009
[ "Apache-2.0" ]
garciadd/wq_sat
wq_sat/satellites/sentinel_download.py
6,229
Python
from autosar.writer.writer_base import ElementWriter import autosar.constant class XMLConstantWriter(ElementWriter): def __init__(self,version, patch): super().__init__(version, patch) def getSupportedXML(self): return ['Constant'] def getSupportedCode(self): return [] def...
44.522088
119
0.650731
[ "MIT" ]
Amineahd/autosar
autosar/writer/constant_writer.py
11,086
Python
def load(h): return ({'abbr': 0, 'code': 0, 'title': 'Reserved'}, {'abbr': 'sfc', 'code': 1, 'title': 'Ground or water surface'}, {'abbr': 2, 'code': 2, 'title': 'Cloud base level'}, {'abbr': 3, 'code': 3, 'title': 'Level of cloud tops'}, {'abbr': 4, 'code': 4, 'title...
55.412698
91
0.464337
[ "Apache-2.0" ]
ecmwf/pyeccodes
pyeccodes/defs/grib2/tables/8/4_5_table.py
3,491
Python
# INIT data = [] numeric = [] normal = [] keyL = [] KeyL = [] key = input("Enter Key Value: ") # File - Load Function def load(file): handle = open(file) return handle.read() # Text Format def form(file): format = load(file) format = format.replace(' ', '') format = format.replace(',', '') f...
19.084211
53
0.519581
[ "MIT" ]
vandewinckel/Python
crypto/vigenere/crypto.py
1,817
Python
# -*- coding: utf-8 -*- from django.apps import AppConfig class SchoolConfig(AppConfig): name = "school"
15.857143
33
0.675676
[ "MIT" ]
ajaykrprajapati/django_orm
django_orm/school/apps.py
111
Python
# Math Module Part 2 import math # Factorial & Square Root print(math.factorial(3)) print(math.sqrt(64)) # Greatest Common Denominator GCD print(math.gcd(52, 8)) print(math.gcd(8, 52)) print(8/52) print(2/13) # Degrees and Radians print(math.radians(360)) print(math.degrees(math.pi * 2))
17.222222
34
0.680645
[ "MIT" ]
JeffreyAsuncion/LearningPythonStdLib
Chapter02/02_02.py
310
Python
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='wafer project using mlops', author='monika', license='MIT', )
18.727273
44
0.660194
[ "MIT" ]
monika2910/wafer_main
setup.py
206
Python
# Petit exercice utilisant la bibliothèque graphique tkinter from tkinter import * from random import randrange # --- définition des fonctions gestionnaires d'événements : --- def drawline(): "Tracé d'une ligne dans le canevas can1" global x1, y1, x2, y2, coul can1.create_line(x1,y1,x2,y2,width=2,fil...
42.666667
83
0.682528
[ "Apache-2.0" ]
geocot/coursPython
Exemples cours 4/TK_Line.py
1,433
Python
# -*- coding:utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals SECRET_KEY = 'psst' INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'hfut_auth' ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME'...
19.965517
82
0.606218
[ "MIT" ]
er1iang/django-hfut
test_settings.py
579
Python
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from collections import defaultdict import os from tabulate import tabulate # type: ignore import onnx from onnx import defs, helper _all_schemas = defs.get_all_schem...
30.989899
75
0.592243
[ "MIT" ]
KeDengMS/onnx
onnx/backend/test/report/coverage.py
3,068
Python
# -*- coding: utf-8 -*- """poc.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1fTzz1aT2sb8oAXRO1-dr6O_IR6dof36e A simple example for deep-learning-based non-rigid image registration with the MNIST dataset. **README:** If the below error occurs,...
33.92555
101
0.605237
[ "Apache-2.0" ]
jerinka/voxelmorph_demo
register_basics.py
20,050
Python
# import moonshine as ms # from moonshine.curves import discount_factor from .curves import get_discount_factor from .instruments import price_cashflow def egg(num_eggs: int) -> None: """prints the number of eggs. Arguments: num_eggs {int} -- The number of eggs Returns: None. """ ...
17.315789
51
0.651976
[ "MIT" ]
CatchemAl/moonshine
src/moonshine/__main__.py
658
Python
import pandas as pd import streamlit as st from awesome_table import AwesomeTable from awesome_table.column import (Column, ColumnDType) from sample import data as sample_data st.set_page_config(page_title='AwesomeTable by @caiofaar', page_icon='📊', layout='wide') st.title('AwesomeTable with Search') AwesomeTable(pd...
45.529412
148
0.745478
[ "MIT" ]
caiodearaujo/streamlit-awesome-table
samples/with_search/__init__.py
777
Python
import json from decimal import Decimal from django.core.paginator import Paginator from django.db import transaction from django.http import HttpResponseForbidden, JsonResponse from django.shortcuts import render # Create your views here. from django.utils import timezone from django.views import View from django_re...
31.847222
161
0.520279
[ "MIT" ]
Gdavid123/md_project
meiduo_mall/meiduo_mall/apps/orders/views.py
10,324
Python
import discord from discord.ext import commands class Mod: """Useful moderation commands to keep the server under control.""" def __init__(self, bot): self.bot = bot @commands.command() @commands.guild_only() @commands.has_permissions(kick_members=True) async def kick(self, ctx, us...
36
82
0.605297
[ "MIT" ]
bananaboy21/LadyBug-Bot
cogs/mod.py
1,548
Python
from argparse import ArgumentParser from google.cloud.speech import SpeechClient, types, enums from pyaudio import PyAudio, paInt16, paContinue from six.moves.queue import Queue, Empty from sys import stdout import socket # from os import environ # environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'C:/Users/kwea123/Download...
37.681818
102
0.608478
[ "MIT" ]
kwea123/Unity_live_caption
googlesr.py
5,803
Python