hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
03b0d12a5b4337551068d349aca1b1a28ff3444a | 838 | py | Python | modules/s3db/__init__.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/s3db/__init__.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/s3db/__init__.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | DEFAULT = lambda: None
from . import assess
from . import asset
from . import auth
from . import br
from . import budget
from . import cap
from . import cms
from . import cr
from . import dc
from . import deploy
from . import disease
from . import doc
from . import dvi
from . import dvr
from . import event
from . impo... | 18.622222 | 23 | 0.74105 |
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 |
03b0f3eaf7821070c88b47a3bf95904c69d4cabd | 21,718 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 39.273056 | 104 | 0.7177 |
03b0f9b5186972942c1c630faa6c5e6f1c0998e9 | 10,207 | py | Python | mittab/urls.py | MIT-Tab/mit-tab | fd7e518bb7252fc1638111ef8a5fe79700ac77ef | [
"MIT"
] | 6 | 2018-04-21T19:26:48.000Z | 2020-06-19T22:34:57.000Z | mittab/urls.py | ClaireBookworm/mit-tab | 0857a3809e1b0113fb3cb0866c3aa227c45bed62 | [
"MIT"
] | 152 | 2018-04-06T14:32:51.000Z | 2022-02-11T22:12:53.000Z | mittab/urls.py | ClaireBookworm/mit-tab | 0857a3809e1b0113fb3cb0866c3aa227c45bed62 | [
"MIT"
] | 10 | 2018-04-06T20:28:16.000Z | 2021-10-02T19:18:42.000Z | from django.views import i18n
from django.conf.urls import url
from django.urls import path
from django.contrib import admin
from django.contrib.auth.views import LoginView
import mittab.apps.tab.views as views
import mittab.apps.tab.judge_views as judge_views
import mittab.apps.tab.team_views as team_views
import mit... | 40.991968 | 83 | 0.664152 |
03b0fa89b9668ecf159032cb984550f3182829b8 | 25,531 | py | Python | appengine/monorail/services/usergroup_svc.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/services/usergroup_svc.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 16 | 2020-09-07T11:55:09.000Z | 2022-03-02T05:47:58.000Z | appengine/monorail/services/usergroup_svc.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Persistence class for user groups.
User groups are represented in the database by:
- A row ... | 39.706065 | 80 | 0.705025 |
03b10a826e9eb7f34bf794c1549db49ca6e8c9de | 76,441 | bzl | Python | tensorflow/workspace.bzl | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 1 | 2017-02-24T05:09:40.000Z | 2017-02-24T05:09:40.000Z | tensorflow/workspace.bzl | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | null | null | null | tensorflow/workspace.bzl | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 1 | 2018-06-05T05:02:16.000Z | 2018-06-05T05:02:16.000Z | # TensorFlow external dependencies that can be loaded in WORKSPACE files.
load("@io_bazel_rules_closure//closure:defs.bzl", "filegroup_external")
load("@io_bazel_rules_closure//closure:defs.bzl", "webfiles_external")
load("//third_party/gpus:cuda_configure.bzl", "cuda_configure")
load("//third_party/sycl:sycl_configur... | 39.361998 | 180 | 0.639447 |
03b133f0f86e2734422de32a2a193dafee13f286 | 975 | py | Python | notebooks/plot_main_evaluation.py | MIT-SPARK/spark_vio_evaluation | 8f747065f8a76c5628d5402eba90fd79ee438e58 | [
"MIT"
] | 15 | 2020-02-20T09:12:36.000Z | 2022-03-31T23:52:00.000Z | notebooks/plot_main_evaluation.py | MIT-SPARK/spark_vio_evaluation | 8f747065f8a76c5628d5402eba90fd79ee438e58 | [
"MIT"
] | 17 | 2020-02-20T22:01:27.000Z | 2021-04-27T14:17:43.000Z | notebooks/plot_main_evaluation.py | ToniRV/spark_vio_evaluation | 9c6826e150f25c2696fe4013537982eca68310e5 | [
"MIT"
] | 6 | 2019-09-21T20:57:35.000Z | 2021-01-11T15:40:53.000Z | # ---
# jupyter:
# jupytext:
# formats: ipynb,py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.11.1
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %%
import yaml
imp... | 21.195652 | 66 | 0.729231 |
03b13f3dea9d0adbd38e7b20c5fb46a302864834 | 16,496 | py | Python | bw_plex/audfprint/hash_table.py | Hellowlol/bw_plex | 86768d6ee89ee1c08d2f6e6468976e4c51135915 | [
"MIT"
] | 371 | 2018-01-01T17:07:06.000Z | 2022-03-30T01:52:28.000Z | bw_plex/audfprint/hash_table.py | Hellowlol/bw_plex | 86768d6ee89ee1c08d2f6e6468976e4c51135915 | [
"MIT"
] | 144 | 2018-01-01T22:36:36.000Z | 2022-01-31T19:26:55.000Z | bw_plex/audfprint/hash_table.py | Hellowlol/bw_plex | 86768d6ee89ee1c08d2f6e6468976e4c51135915 | [
"MIT"
] | 44 | 2018-01-02T07:58:45.000Z | 2021-11-30T10:53:52.000Z | # coding=utf-8
"""
hash_table.py
Python implementation of the very simple, fixed-array hash table
used for the audfprint fingerprinter.
2014-05-25 Dan Ellis dpwe@ee.columbia.edu
"""
from __future__ import division, print_function
import gzip
import math
import os
import random
import numpy as np
import scipy.io
tr... | 41.137157 | 81 | 0.571775 |
03b184f996c38d95779554454b0f930d1bd63bf1 | 4,174 | py | Python | nova/tests/unit/image/test_transfer_modules.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2019-07-29T10:30:24.000Z | 2019-07-29T10:30:24.000Z | nova/tests/unit/image/test_transfer_modules.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 11 | 2017-06-19T01:28:55.000Z | 2017-06-23T02:01:47.000Z | nova/tests/unit/image/test_transfer_modules.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 2 | 2015-12-04T23:51:46.000Z | 2016-06-07T20:01:59.000Z | # 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 agreed to in... | 37.603604 | 78 | 0.663153 |
03b18fe7cbbaaa04957fa9af9fa87196e9a253c2 | 226 | py | Python | Scripts/cata3.py | annelida/stuff | 699d0230d5329a5eaebc8c93f9fba3c53920925f | [
"MIT"
] | null | null | null | Scripts/cata3.py | annelida/stuff | 699d0230d5329a5eaebc8c93f9fba3c53920925f | [
"MIT"
] | 2 | 2021-06-01T21:52:33.000Z | 2021-12-13T19:44:00.000Z | Scripts/cata3.py | annelida/stuff | 699d0230d5329a5eaebc8c93f9fba3c53920925f | [
"MIT"
] | 1 | 2015-10-14T12:16:07.000Z | 2015-10-14T12:16:07.000Z | def longest(s1, s2):
s3 = s1 + s2
result = []
for c in s3:
if c not in result:
result.append(c)
result.sort()
print ''.join(result)
longest("xyaabbbcccdefww", "xxxxyyyabklmopq")
| 22.6 | 45 | 0.544248 |
03b191d8d2900bde28d02b74b514ac599a0376eb | 4,198 | py | Python | src/amba_source.py | ambalytics/amba-analysis-worker-pubfinder | 546d1cc4192f36bfb646f90929996753bbd7f60d | [
"MIT"
] | null | null | null | src/amba_source.py | ambalytics/amba-analysis-worker-pubfinder | 546d1cc4192f36bfb646f90929996753bbd7f60d | [
"MIT"
] | null | null | null | src/amba_source.py | ambalytics/amba-analysis-worker-pubfinder | 546d1cc4192f36bfb646f90929996753bbd7f60d | [
"MIT"
] | null | null | null | import time
from collections import deque
from multiprocessing.pool import ThreadPool
from gql import gql, Client
from gql.transport.requests import RequestsHTTPTransport
import logging
from event_stream.event import Event
from pubfinder_helper import PubFinderHelper
def get_publication_from_amba(doi, amba_client):
... | 32.542636 | 95 | 0.559076 |
03b1b3efc6b1c1a9b098230d89bff495f802390c | 4,798 | py | Python | python-client/swagger_client/models/group.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | 2 | 2017-03-02T13:12:24.000Z | 2017-10-22T10:31:09.000Z | python-client/swagger_client/models/group.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | null | null | null | python-client/swagger_client/models/group.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
kinto
Kinto is a minimalist JSON storage service with synchronisation and sharing abilities. It is meant to be easy to use and easy to self-host. **Limitations of this OpenAPI specification:** 1. Validation on OR clauses is not supported (e.g. provide `data` or `permissions` in patch ... | 31.359477 | 938 | 0.592955 |
03b1d0eaacc3bf22c766f96b96f207538a2d9565 | 3,494 | py | Python | astetik/plots/kde.py | meirm/astetik | ea05ce57a0bf1e8bd7ef18c4d5ca8d7ad3fb4be7 | [
"MIT"
] | 8 | 2017-07-27T11:25:41.000Z | 2019-03-11T12:02:48.000Z | astetik/plots/kde.py | meirm/astetik | ea05ce57a0bf1e8bd7ef18c4d5ca8d7ad3fb4be7 | [
"MIT"
] | 33 | 2018-04-04T20:45:59.000Z | 2019-03-07T12:54:37.000Z | astetik/plots/kde.py | meirm/astetik | ea05ce57a0bf1e8bd7ef18c4d5ca8d7ad3fb4be7 | [
"MIT"
] | 3 | 2020-02-09T14:35:00.000Z | 2020-12-19T13:47:23.000Z | import seaborn as sns
import matplotlib.pyplot as plt
from ..style.formats import _thousand_sep
from ..style.style import params
from ..style.titles import _titles
from ..style.template import _header, _footer
from ..utils.utils import _limiter, _scaler
def kde(data,
x,
y=None,
cumulative=Fal... | 24.957143 | 71 | 0.519748 |
03b1d194b0dbb8670a72d8118204e504c13894e3 | 1,557 | py | Python | acq4/pyqtgraph/widgets/PathButton.py | tropp/ACQ4 | 792e05e99cedfc175593d200aeabecd6fa6304ce | [
"MIT"
] | null | null | null | acq4/pyqtgraph/widgets/PathButton.py | tropp/ACQ4 | 792e05e99cedfc175593d200aeabecd6fa6304ce | [
"MIT"
] | null | null | null | acq4/pyqtgraph/widgets/PathButton.py | tropp/ACQ4 | 792e05e99cedfc175593d200aeabecd6fa6304ce | [
"MIT"
] | null | null | null | from ..Qt import QtGui, QtCore
from .. import functions as fn
__all__ = ['PathButton']
class PathButton(QtGui.QPushButton):
"""Simple PushButton extension that paints a QPainterPath centered on its face.
"""
def __init__(self, parent=None, path=None, pen='default', brush=None, size=(30,30)):
QtGu... | 30.529412 | 106 | 0.572897 |
03b1eab4d95ad0274d5a910e3f3428912ca74bc8 | 1,475 | py | Python | github/methods/users/followers/is_target_user_followed_by_user.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:33:37.000Z | 2022-03-16T21:33:37.000Z | github/methods/users/followers/is_target_user_followed_by_user.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | null | null | null | github/methods/users/followers/is_target_user_followed_by_user.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:28:06.000Z | 2022-03-16T21:28:06.000Z | from github.scaffold import Scaffold
from github.types import Response
class IsTargetUserFollowedByUser(Scaffold):
"""
Check if a user follows another user
"""
def is_target_user_followed_by_user(
self,
*,
username: str,
target_user: str,
) -> 'Resp... | 29.5 | 83 | 0.546441 |
03b20d16a9a61dd9dc3dc5685d55a5d22d542c2a | 735 | py | Python | media/urls.py | aaboffill/django-allmedia | 67ef405623574d90abf9eefac9a512f609300775 | [
"BSD-3-Clause"
] | null | null | null | media/urls.py | aaboffill/django-allmedia | 67ef405623574d90abf9eefac9a512f609300775 | [
"BSD-3-Clause"
] | null | null | null | media/urls.py | aaboffill/django-allmedia | 67ef405623574d90abf9eefac9a512f609300775 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
from django.contrib.auth.decorators import login_required
from django.conf.urls import patterns, url
from .views import HandleAjaxFileUploadedView, HandleYoutubeProcessingView, YoutubeUploadProcessView
urlpatterns = patterns('',
# BASICS
url(
r'^upload/file/$',
login_required(Ha... | 26.25 | 100 | 0.687075 |
03b21e1cfc2a7b11609ea4409c209eb708e6859c | 2,302 | py | Python | panoptes/utils/library.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | panoptes/utils/library.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | panoptes/utils/library.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | import ctypes
import ctypes.util
from astropy.utils import resolve_name
from panoptes.utils import error
def load_c_library(name, path=None, mode=ctypes.DEFAULT_MODE, logger=None):
"""Utility function to load a shared/dynamically linked library (.so/.dylib/.dll).
The name and location of the shared library ... | 32.885714 | 97 | 0.672459 |
03b22863ff23a2490b1d43091d39e78e8b857537 | 6,835 | py | Python | git/objects/base.py | yarikoptic/GitPython | 7576b282013249a2b20ccda4acacefd5e625ea39 | [
"BSD-3-Clause"
] | 1 | 2020-10-15T06:16:48.000Z | 2020-10-15T06:16:48.000Z | git/objects/base.py | yarikoptic/GitPython | 7576b282013249a2b20ccda4acacefd5e625ea39 | [
"BSD-3-Clause"
] | null | null | null | git/objects/base.py | yarikoptic/GitPython | 7576b282013249a2b20ccda4acacefd5e625ea39 | [
"BSD-3-Clause"
] | null | null | null | # base.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
from git.util import LazyMixin, join_path_native, stream_copy
from util import get_object_type_by_name
f... | 38.615819 | 129 | 0.611266 |
03b2a72c6d9dd703e0ed9dd211655454b870281f | 6,106 | py | Python | src/modules/host/dns.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 46 | 2020-04-18T16:42:59.000Z | 2022-01-31T22:08:52.000Z | src/modules/host/dns.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | null | null | null | src/modules/host/dns.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 11 | 2020-04-23T12:46:18.000Z | 2022-02-04T12:53:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*- ########################################################
# ____ _ __ #
# ___ __ __/ / /__ ___ ______ ______(_) /___ __ #
# / _ \/ // / / (_-</ -_) __/ // / __/ / __/ // / ... | 27.137778 | 80 | 0.474779 |
03b2adcde384485d97d8d7ec5ee98f1117f8e31b | 1,680 | py | Python | CodeChef/COOK121B/POLYREL.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | CodeChef/COOK121B/POLYREL.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | CodeChef/COOK121B/POLYREL.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | """
Problem link:
Solution By Keshav Mishra
"""
from sys import stdin,stdout
from collections import Counter , deque
from queue import PriorityQueue
import math
helperConstants = True
helperUtilityFunctions = True
def input(): return stdin.readline().strip()
# def print(s): stdout.write(str(s)+'\n')
if helperCon... | 22.702703 | 57 | 0.572619 |
03b2c32f8bc32662fddd7662fcc70a76027cf815 | 10,016 | py | Python | Train/TPU_training.py | aahouzi/FaceFocus | a864a5f4427938572ea7e9630ccf65c26477ae84 | [
"MIT"
] | 2 | 2020-12-21T03:59:54.000Z | 2020-12-22T09:09:39.000Z | Train/TPU_training.py | aahouzi/FaceFocus-Project | a864a5f4427938572ea7e9630ccf65c26477ae84 | [
"MIT"
] | null | null | null | Train/TPU_training.py | aahouzi/FaceFocus-Project | a864a5f4427938572ea7e9630ccf65c26477ae84 | [
"MIT"
] | null | null | null | ############################################################################################
# Author: Anas AHOUZI #
# File Name: Train/TPU_training.py #
# Creation Date... | 47.023474 | 119 | 0.598842 |
03b2c8c3274e13294cf562d33c9027f75adff0b9 | 1,993 | py | Python | app.py | royhzq/sg-headlines-rnn | cef84f1ffe7f18a37386e9602166082c10e9020b | [
"MIT"
] | null | null | null | app.py | royhzq/sg-headlines-rnn | cef84f1ffe7f18a37386e9602166082c10e9020b | [
"MIT"
] | 13 | 2020-01-28T23:05:24.000Z | 2022-02-10T00:34:57.000Z | app.py | royhzq/sg-headlines-rnn | cef84f1ffe7f18a37386e9602166082c10e9020b | [
"MIT"
] | null | null | null | from flask import Flask, request, jsonify
from utils import generate_headlines
import tensorflow as tf
import json
tf.enable_eager_execution()
import numpy as np
app = Flask(__name__)
char2idx = json.loads(open("./data/st_char2idx.txt", 'br').read().decode(encoding='utf-8'))
idx2char = np.array(json.loads(open("./da... | 30.661538 | 103 | 0.656297 |
03b30084f161615026e51e15fc241f6b75b9f86e | 241 | py | Python | supervisord/datadog_checks/supervisord/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | supervisord/datadog_checks/supervisord/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | supervisord/datadog_checks/supervisord/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2019-03-06T14:30:52.000Z | 2019-03-06T14:30:52.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .supervisord import SupervisordCheck
__all__ = [
'__version__',
'SupervisordCheck'
]
| 21.909091 | 59 | 0.742739 |
03b30ae3f3f8a9576a1eb42a72b8bf2483d9e8a4 | 780 | py | Python | examples/type_conversion.py | maximlt/tranquilizer | 9b4a738d1f24af7f4c2397d43454e0fe2ee5e86b | [
"BSD-3-Clause"
] | 19 | 2018-08-13T05:54:38.000Z | 2020-03-21T11:37:45.000Z | examples/type_conversion.py | maximlt/tranquilizer | 9b4a738d1f24af7f4c2397d43454e0fe2ee5e86b | [
"BSD-3-Clause"
] | 16 | 2018-08-12T20:11:28.000Z | 2020-07-22T21:16:06.000Z | examples/type_conversion.py | maximlt/tranquilizer | 9b4a738d1f24af7f4c2397d43454e0fe2ee5e86b | [
"BSD-3-Clause"
] | 5 | 2021-02-22T18:25:16.000Z | 2021-12-11T18:12:21.000Z | from tranquilizer import tranquilize
from typing import List
from datetime import date
@tranquilize(method='get')
def dates(date: date):
'''Extract components of a datetime string.
:param date: parsible datetime'''
response = {
'month' : date.month,
'day' : date.day,
... | 22.941176 | 58 | 0.621795 |
03b34b171ffe6101772ed2d7600012d3353113f5 | 784 | py | Python | _notebooks/update_srag_database.py | victor-marchesini/covid | 454fd525c462c1a199322d96eed897eab8da36fe | [
"Apache-2.0"
] | null | null | null | _notebooks/update_srag_database.py | victor-marchesini/covid | 454fd525c462c1a199322d96eed897eab8da36fe | [
"Apache-2.0"
] | 3 | 2021-04-16T11:01:57.000Z | 2021-04-16T11:35:10.000Z | _notebooks/update_srag_database.py | victor-marchesini/covid | 454fd525c462c1a199322d96eed897eab8da36fe | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
import sqlite3 as sql
import pandas as pd
from srag_functions import *
# In[2]:
# df_srag = get_srag_data(years=[2019,2020,2021],update=False,treat=True,save_local=True)
frames = []
for year in [2019,2020,2021]:
df = get_srag_data(years=[year],update=... | 15.076923 | 89 | 0.677296 |
03b383ae1fed226c4b8b0f940b56660e81154aa2 | 464 | py | Python | alipay/aop/api/response/KoubeiCateringDishVirtualdishSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/KoubeiCateringDishVirtualdishSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/KoubeiCateringDishVirtualdishSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class KoubeiCateringDishVirtualdishSyncResponse(AlipayResponse):
def __init__(self):
super(KoubeiCateringDishVirtualdishSyncResponse, self).__init__()
def parse_response_cont... | 29 | 114 | 0.790948 |
03b3aceed46c23d5313419bff9141680ea960fc9 | 420 | py | Python | Courses/Udacity/CS101/Lesson_9_Modules_and_Classes/36-chez_bananas/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2019-02-13T12:02:26.000Z | 2019-02-13T12:02:26.000Z | Courses/Udacity/CS101/Lesson_9_Modules_and_Classes/36-chez_bananas/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2018-08-13T15:58:33.000Z | 2018-08-13T15:58:33.000Z | Courses/Udacity/CS101/Lesson_9_Modules_and_Classes/36-chez_bananas/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 2 | 2017-08-10T20:01:29.000Z | 2021-07-01T08:39:13.000Z | # You should edit only this file and do not change restaurant.py
# change something here so that chez_bananas.is_yummy() returns True
from restaurant import Restaurant
# These are test cases
mcdowells = Restaurant("McDowell's Hamgurger Emporium")
mcdowells.is_yummy()
chez_bananas = Restaurant("Chez Bananas Crib of ... | 28 | 68 | 0.783333 |
03b3d28c8a4012d6b30fb5d51b48da76719c9568 | 5,736 | py | Python | lstchain/scripts/lstchain_data_r0_to_dl1.py | misabelber/cta-lstchain | 08fc4dccfe8a05a77fa46fb4ffb6e26f439c0a93 | [
"BSD-3-Clause"
] | null | null | null | lstchain/scripts/lstchain_data_r0_to_dl1.py | misabelber/cta-lstchain | 08fc4dccfe8a05a77fa46fb4ffb6e26f439c0a93 | [
"BSD-3-Clause"
] | null | null | null | lstchain/scripts/lstchain_data_r0_to_dl1.py | misabelber/cta-lstchain | 08fc4dccfe8a05a77fa46fb4ffb6e26f439c0a93 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
Pipeline to calibrate and compute image parameters at single telescope
level for real data.
- Inputs are a protozfits input file and a drs4 pedestal/calibration/time
calibration files
- Output is a dataframe with dl1 data
Usage:
$> python lstchain_data_r0_to_dl1.py
--input-file LST-1.1.Run... | 30.031414 | 95 | 0.691423 |
03b3e43ddd8e466dc0f80eeabbdea1bf689c6392 | 295 | py | Python | core/management/commands/utils/init_country.py | GolamMullick/HR_PROJECT | fc4c76cfc835ad014a62a3da9d32b8fc8d474397 | [
"MIT"
] | null | null | null | core/management/commands/utils/init_country.py | GolamMullick/HR_PROJECT | fc4c76cfc835ad014a62a3da9d32b8fc8d474397 | [
"MIT"
] | 3 | 2020-02-12T02:52:01.000Z | 2021-06-10T22:18:25.000Z | core/management/commands/utils/init_country.py | GolamMullick/HR_PROJECT | fc4c76cfc835ad014a62a3da9d32b8fc8d474397 | [
"MIT"
] | null | null | null | import os
from core.models import Country
def init_country():
project_directory = os.path.abspath(".")
data_directory = os.path.join(project_directory, "core", "data")
country_data_file = os.path.join(data_directory, "countries.json")
Country.load_from_json(country_data_file) | 29.5 | 70 | 0.749153 |
03b3e5fe5b7ba55fdaa87a16be57d2d295e3b852 | 188 | py | Python | pystrings/truncate_string/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | pystrings/truncate_string/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | pystrings/truncate_string/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | def truncate_string(sentence, n):
if n <= 3:
return sentence[0: n] + "..."
if len(sentence) > n:
return sentence[0:n - 3] + "..."
else:
return sentence
| 23.5 | 40 | 0.510638 |
03b3e96ec84ac52a5a0eae39b89bf2b03aa14746 | 241,960 | py | Python | pytorch/test/test_distributions.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/test_distributions.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | pytorch/test/test_distributions.py | zhou3968322/dl-code-read | aca204a986dabe2755becff0f42de1082299d791 | [
"MIT"
] | null | null | null | """
Note [Randomized statistical tests]
-----------------------------------
This note describes how to maintain tests in this file as random sources
change. This file contains two types of randomized tests:
1. The easier type of randomized test are tests that should always pass but are
initialized with random data... | 48.713509 | 123 | 0.566164 |
03b3f87438ea76443e9eb94ea46b12088bbe17cf | 2,126 | py | Python | tests/common/test_op/ascend/gelu_grad.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_op/ascend/gelu_grad.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_op/ascend/gelu_grad.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 42.52 | 110 | 0.630292 |
03b447672081d442736cb8db1055045cc32c38ab | 5,684 | py | Python | detectron_/checkpoint/catalog.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | detectron_/checkpoint/catalog.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | detectron_/checkpoint/catalog.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import logging
from detectron.utils.file_io import PathHandler, PathManager
class ModelCatalog(object):
"""
Store mappings from names to third-party models.
"""
S3_C2_DETECTRON_PREFIX = "https://dl.fbaipublicfiles.com/detectron"
# MSRA models h... | 49 | 155 | 0.709008 |
03b473b168b1d863b479460485bacd0966d6c65a | 1,538 | py | Python | misc/metronome/utils.py | Ganasagar/migration-tools-repo | 73d78f1734ccd04f1475d70b48fa02c6d892524b | [
"Apache-2.0"
] | null | null | null | misc/metronome/utils.py | Ganasagar/migration-tools-repo | 73d78f1734ccd04f1475d70b48fa02c6d892524b | [
"Apache-2.0"
] | null | null | null | misc/metronome/utils.py | Ganasagar/migration-tools-repo | 73d78f1734ccd04f1475d70b48fa02c6d892524b | [
"Apache-2.0"
] | null | null | null | ## Run Tests:
# pytest --doctest-modules
from functools import reduce
import json
from copy import copy
def deep_merge(dest, src):
"""
>>> a = { 'b': [{'d': 1}, 2] }
>>> b = { 'b': [{'c': 1}] }
>>> deep_merge(b, a)
{'b': [{'c': 1, 'd': 1}, 2]}
>>> deep_merge(a, b)
{'b': [{'d': 1, 'c': 1}... | 27.464286 | 83 | 0.536411 |
03b4884f953b724439a163e49d0d04bb95043b13 | 4,184 | py | Python | backend/modules/api/apis/dataset_api.py | LeszekBlazewski/WWZD | 1342334f9facbf520039d1cd0ed9b9dbd1d3565e | [
"MIT"
] | null | null | null | backend/modules/api/apis/dataset_api.py | LeszekBlazewski/WWZD | 1342334f9facbf520039d1cd0ed9b9dbd1d3565e | [
"MIT"
] | null | null | null | backend/modules/api/apis/dataset_api.py | LeszekBlazewski/WWZD | 1342334f9facbf520039d1cd0ed9b9dbd1d3565e | [
"MIT"
] | null | null | null | from ...data.dataset_loader import dataset_loader
from ...data.dimension_reduction_loader import reduction_models_loader
from ...data.exceptions import WrongAlgorithmException, WrongDatasetException
from flask_restx import Resource, reqparse
from ..models.data_models import (
data_point_model,
dataset_model,
... | 36.068966 | 246 | 0.700287 |
03b4df78846947722355b9047e068e302abc63a2 | 2,158 | py | Python | opencga-client/src/main/python/pyOpenCGA/pyopencga/rest_clients/panel_client.py | dapregi/opencga | 9aaee47952ac9e68f831b138945c7939199ab92d | [
"Apache-2.0"
] | null | null | null | opencga-client/src/main/python/pyOpenCGA/pyopencga/rest_clients/panel_client.py | dapregi/opencga | 9aaee47952ac9e68f831b138945c7939199ab92d | [
"Apache-2.0"
] | null | null | null | opencga-client/src/main/python/pyOpenCGA/pyopencga/rest_clients/panel_client.py | dapregi/opencga | 9aaee47952ac9e68f831b138945c7939199ab92d | [
"Apache-2.0"
] | null | null | null | from pyopencga.rest_clients._parent_rest_clients import _ParentBasicCRUDClient, _ParentAclRestClient
class Panels(_ParentBasicCRUDClient, _ParentAclRestClient):
"""
This class contains the methods for Panels webservices
"""
def __init__(self, configuration, session_id=None, login_handler=None, *args, ... | 47.955556 | 122 | 0.687674 |
03b5263e5d594a6f38a4e28fe81482587b0d3f2c | 38,152 | py | Python | ggv2_provisioner/helpers.py | gadams999/greengrassv2-provisioner | dac564e8163aa20db213da14e9ea6df8746afd44 | [
"Apache-2.0"
] | 2 | 2021-03-15T20:27:36.000Z | 2021-03-16T10:11:38.000Z | ggv2_provisioner/helpers.py | gadams999/greengrassv2-provisioner | dac564e8163aa20db213da14e9ea6df8746afd44 | [
"Apache-2.0"
] | null | null | null | ggv2_provisioner/helpers.py | gadams999/greengrassv2-provisioner | dac564e8163aa20db213da14e9ea6df8746afd44 | [
"Apache-2.0"
] | null | null | null | """Helpers - actual logic
Author:
Amazon.com, Inc.
License:
Copyright 2021 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
... | 38.537374 | 151 | 0.638132 |
03b5284cb2bb1cd3bff1a83520f42e2a33679003 | 1,861 | py | Python | ci-scripts/infra-setup/roles/rrcockpit/files/mariadb/bugzilla_bugs_mariadb.py | amolkahat/ci-config | 100ca1248432ba8d1a97a9a02ec35a80f57767ed | [
"Apache-2.0"
] | null | null | null | ci-scripts/infra-setup/roles/rrcockpit/files/mariadb/bugzilla_bugs_mariadb.py | amolkahat/ci-config | 100ca1248432ba8d1a97a9a02ec35a80f57767ed | [
"Apache-2.0"
] | null | null | null | ci-scripts/infra-setup/roles/rrcockpit/files/mariadb/bugzilla_bugs_mariadb.py | amolkahat/ci-config | 100ca1248432ba8d1a97a9a02ec35a80f57767ed | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
import sys
import bugzilla
URL = "https://bugzilla.redhat.com"
# pylint: disable=undefined-variable
api_key = "B5ryD1LwjmAE1ZMhRQGsSBMszyBqnqMq9UpDigxc"
# pylint: enable=undefined-variable
# Login
bzapi = bugzilla.Bugzilla(URL, api_key=api_key)
assert bza... | 31.016667 | 80 | 0.713595 |
03b52aa9f1b41b6b2dff7eb770d4bc58e88ff0e9 | 3,426 | py | Python | dnacentersdk/response_codes.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/response_codes.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/response_codes.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Response Codes.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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 l... | 44.493506 | 79 | 0.714536 |
03b535daeb51bb771e1ebf964ef34cfb55dca41d | 4,869 | py | Python | handcam/train_WRN_Keras.py | luketaverne/handcam | e294ebf2be8b5512c8607d3c8ba3f6946f3b8e30 | [
"MIT"
] | 1 | 2022-02-10T13:19:20.000Z | 2022-02-10T13:19:20.000Z | handcam/train_WRN_Keras.py | luketaverne/handcam | e294ebf2be8b5512c8607d3c8ba3f6946f3b8e30 | [
"MIT"
] | null | null | null | handcam/train_WRN_Keras.py | luketaverne/handcam | e294ebf2be8b5512c8607d3c8ba3f6946f3b8e30 | [
"MIT"
] | null | null | null | from datetime import datetime
from tensorflow.python.keras.callbacks import Callback
from handcam.ltt.datasets.handcam.HandCamDataHandler import HandGenerator
from handcam.ltt.datasets.uw_rgbd.UWDataHandler import (
TrainGenerator,
ValidationGenerator,
)
from handcam.ltt.network.Tools import write_log
from ha... | 28.144509 | 160 | 0.746971 |
03b562f49fa67ae664f34913169726657ba9f020 | 1,058 | py | Python | pandaserver/jobdispatcher/DispatcherUtils.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | 7 | 2015-03-30T14:15:35.000Z | 2021-12-22T06:48:22.000Z | pandaserver/jobdispatcher/DispatcherUtils.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | 16 | 2015-06-01T13:48:01.000Z | 2022-02-08T15:03:32.000Z | pandaserver/jobdispatcher/DispatcherUtils.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | 15 | 2015-03-02T08:57:35.000Z | 2022-03-01T09:48:45.000Z | import os
import sys
import requests
from pandaserver.config import panda_config
# get secret key
def getSecretKey(pandaID):
try:
# get parameters for panda proxy
proxyURLSSL = panda_config.pandaProxy_URLSSL
ca_certs = panda_config.pandaProxy_ca_certs
key_file = os.environ['X509_U... | 33.0625 | 69 | 0.585066 |
03b5740d86f67787dc1db47fecaf44795633b670 | 66,015 | py | Python | InterventionsMIP/reporting/plotting.py | haoxiangyang89/COVID_Staged_Alert | 4c2cc5ef1d38c140875380a5f10a0fe1eaf8a47a | [
"MIT"
] | 1 | 2021-06-24T19:27:01.000Z | 2021-06-24T19:27:01.000Z | InterventionsMIP/reporting/plotting.py | haoxiangyang89/COVID_Staged_Alert | 4c2cc5ef1d38c140875380a5f10a0fe1eaf8a47a | [
"MIT"
] | null | null | null | InterventionsMIP/reporting/plotting.py | haoxiangyang89/COVID_Staged_Alert | 4c2cc5ef1d38c140875380a5f10a0fe1eaf8a47a | [
"MIT"
] | 3 | 2021-12-15T13:32:25.000Z | 2022-02-24T13:57:07.000Z | '''
Module for plotting function
'''
import os
import sys
import numpy as np
import pandas as pd
import time
import argparse
import calendar as py_cal
from pathlib import Path
from matplotlib import pyplot as plt
from matplotlib.ticker import FuncFormatter
import matplotlib.dates as mdates
import matplotlib.cbook as cb... | 46.391427 | 174 | 0.54421 |
03b5836243f749d8944e407e252523f49d9f55a3 | 1,757 | py | Python | src/olympia/hero/migrations/0003_auto_20191001_0756.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/hero/migrations/0003_auto_20191001_0756.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/hero/migrations/0003_auto_20191001_0756.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | # Generated by Django 2.2.5 on 2019-10-01 07:56
from django.db import migrations
import olympia.hero.models
class Migration(migrations.Migration):
dependencies = [
('hero', '0002_auto_20190930_1557'),
]
operations = [
migrations.AlterField(
model_name='secondaryheromodule',
... | 87.85 | 1,394 | 0.643711 |
03b5debe2ea2dca1fb4f87275846357252404a7e | 1,588 | py | Python | app/workspace_management_api/workspace_data_source.py | PSE-TECO-2020-TEAM1/e2e-ml_model-management | 7f01a008648e25a29c639a5e16124b2e399eb821 | [
"MIT"
] | 1 | 2021-05-04T08:46:19.000Z | 2021-05-04T08:46:19.000Z | app/workspace_management_api/workspace_data_source.py | PSE-TECO-2020-TEAM1/e2e-ml_model-management | 7f01a008648e25a29c639a5e16124b2e399eb821 | [
"MIT"
] | null | null | null | app/workspace_management_api/workspace_data_source.py | PSE-TECO-2020-TEAM1/e2e-ml_model-management | 7f01a008648e25a29c639a5e16124b2e399eb821 | [
"MIT"
] | 1 | 2022-01-28T21:21:32.000Z | 2022-01-28T21:21:32.000Z | from app.workspace_management_api.error import NoSampleInWorkspaceError, WorkspaceManagementConnectionError
from typing import List
from app.workspace_management_api.sample_model import SampleFromWorkspace
from app.workspace_management_api.data_source import ExternalDataSource
from app.core.config import WORKSPACE_MANA... | 51.225806 | 116 | 0.767003 |
03b612c92139efec11272b04faff59d980118da7 | 1,578 | py | Python | SCRAPE/Lib/site-packages/filelock/_unix.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 64 | 2021-09-27T09:20:12.000Z | 2022-03-27T06:18:37.000Z | SCRAPE/Lib/site-packages/filelock/_unix.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 49 | 2021-09-27T07:13:36.000Z | 2022-03-24T10:35:50.000Z | SCRAPE/Lib/site-packages/filelock/_unix.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 16 | 2021-09-27T07:28:42.000Z | 2022-03-24T00:43:31.000Z | from __future__ import annotations
import os
import sys
from typing import cast
from ._api import BaseFileLock
#: a flag to indicate if the fcntl API is available
has_fcntl = False
if sys.platform == "win32": # pragma: win32 cover
class UnixFileLock(BaseFileLock):
"""Uses the :func:`fcntl.flock` to har... | 27.684211 | 110 | 0.599493 |
03b62da9c0acda8905cbe3654a68919662310959 | 2,966 | py | Python | dopamine/thesis/scratch/pong_dopamine_and_mine.py | xqz-u/dopamine | d562750a58bcf681a6f8b590f4e4dfb263654b5e | [
"Apache-2.0"
] | null | null | null | dopamine/thesis/scratch/pong_dopamine_and_mine.py | xqz-u/dopamine | d562750a58bcf681a6f8b590f4e4dfb263654b5e | [
"Apache-2.0"
] | null | null | null | dopamine/thesis/scratch/pong_dopamine_and_mine.py | xqz-u/dopamine | d562750a58bcf681a6f8b590f4e4dfb263654b5e | [
"Apache-2.0"
] | null | null | null | import logging
import os
import gin
import optax
from dopamine.discrete_domains import gym_lib, run_experiment
from dopamine.jax import losses
from thesis import config, networks, offline_circular_replay_buffer, patcher, utils
from thesis.agents import DQNAgent
from thesis.reporter import reporter
from thesis.runner i... | 30.265306 | 84 | 0.635873 |
03b63d071396c749a113d817a43ea12e69413664 | 1,966 | py | Python | skimage/transform/tests/test_hough_transform.py | jaberg/scikits-image | 2ab3e2dfb341189ef2ff9370c6cf3d33ef6ec88d | [
"BSD-3-Clause"
] | 2 | 2019-01-17T22:10:17.000Z | 2020-02-22T04:20:38.000Z | skimage/transform/tests/test_hough_transform.py | teoliphant/scikit-image | d0415e6df475157705fd1ef2af69b16e4f7e38cc | [
"BSD-3-Clause"
] | 1 | 2015-09-04T09:25:46.000Z | 2015-09-04T09:25:46.000Z | skimage/transform/tests/test_hough_transform.py | emmanuelle/scikit-image | eccc41907135cf81b99c4be18a480a9bc705485d | [
"BSD-3-Clause"
] | 1 | 2019-12-20T19:19:59.000Z | 2019-12-20T19:19:59.000Z | import numpy as np
from numpy.testing import *
import skimage.transform as tf
import skimage.transform.hough_transform as ht
from skimage.transform import probabilistic_hough
def append_desc(func, description):
"""Append the test function ``func`` and append
``description`` to its name.
"""
func.desc... | 25.532468 | 79 | 0.633774 |
03b64105a9789f0dc3567c74a751f93e9e824fb4 | 8,313 | py | Python | android_env/components/simulators/emulator/emulator_launcher.py | yjaeseok/android_env | b847754e855c3e331d9aaecfb7d01c2d8a71dbea | [
"Apache-2.0"
] | 768 | 2021-05-28T00:40:07.000Z | 2022-03-30T12:01:52.000Z | android_env/components/simulators/emulator/emulator_launcher.py | yjaeseok/android_env | b847754e855c3e331d9aaecfb7d01c2d8a71dbea | [
"Apache-2.0"
] | 17 | 2021-05-29T18:59:23.000Z | 2022-03-08T11:55:54.000Z | android_env/components/simulators/emulator/emulator_launcher.py | yjaeseok/android_env | b847754e855c3e331d9aaecfb7d01c2d8a71dbea | [
"Apache-2.0"
] | 46 | 2021-05-28T15:30:03.000Z | 2022-03-18T08:20:08.000Z | # coding=utf-8
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 36.460526 | 85 | 0.691207 |
03b6496cce0e2f11ce8b998a48acadf94db24b77 | 1,756 | py | Python | utils/comp_ray_dir.py | icannistraci/nerfmm | 514ae420f41ba5b6447be853f73e37beca136f85 | [
"MIT"
] | 266 | 2021-04-19T10:27:52.000Z | 2022-03-31T13:20:30.000Z | utils/comp_ray_dir.py | icannistraci/nerfmm | 514ae420f41ba5b6447be853f73e37beca136f85 | [
"MIT"
] | 22 | 2021-04-20T15:15:59.000Z | 2022-01-20T01:19:44.000Z | utils/comp_ray_dir.py | icannistraci/nerfmm | 514ae420f41ba5b6447be853f73e37beca136f85 | [
"MIT"
] | 35 | 2021-04-20T05:54:15.000Z | 2022-03-21T10:13:22.000Z | import torch
def comp_ray_dir_cam(H, W, focal):
"""Compute ray directions in the camera coordinate, which only depends on intrinsics.
This could be further transformed to world coordinate later, using camera poses.
:return: (H, W, 3) torch.float32
"""
y, x = torch.meshgrid(torch.arange(H, dtype=to... | 40.837209 | 91 | 0.605353 |
03b68c8c377090f003d8562564af4cfca2d44241 | 2,573 | py | Python | nyoka/preprocessing/__init__.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | null | null | null | nyoka/preprocessing/__init__.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:16:45.000Z | 2022-02-10T05:28:52.000Z | nyoka/preprocessing/__init__.py | nimeshgit/nyoka | 43bf049825922213eeb3e6a8f39864f9b75d01d5 | [
"Apache-2.0"
] | null | null | null | import queue
import numpy as np
from sklearn.utils import check_array
from sklearn.base import TransformerMixin
FLOAT_DTYPES = (np.float64, np.float32, np.float16)
class Lag(TransformerMixin):
"""
The Lag class takes `value` number of previous record of the fields where it is applied and applies `aggregation`... | 30.630952 | 134 | 0.557715 |
03b6dd695156f9c54c91e9373262f9b8325e14e0 | 16,929 | py | Python | vnpy_pro/trader/utility.py | caizhanjin/vnpy | c0886dbd8eba7f506634b1700dfd09b0b098ef26 | [
"MIT"
] | 5 | 2020-09-13T05:07:38.000Z | 2020-12-26T15:10:00.000Z | vnpy_pro/trader/utility.py | zhangjf76/vnpy | b7c507a90c84a6a3c34831d8daf5f8947b9858d2 | [
"MIT"
] | null | null | null | vnpy_pro/trader/utility.py | zhangjf76/vnpy | b7c507a90c84a6a3c34831d8daf5f8947b9858d2 | [
"MIT"
] | 2 | 2020-06-03T06:40:31.000Z | 2020-06-12T14:55:17.000Z | """
General utility functions.
"""
import sys
import os
import csv
import re
import talib
from time import time
from datetime import datetime, timedelta
from functools import wraps, lru_cache
from typing import Callable, Dict, Tuple, Union
import numpy as np
from vnpy.trader.utility import ArrayManager
from vnpy.trade... | 27.526829 | 108 | 0.556973 |
03b6f66ae9d3d2e0969f7e4d8efc41225dc8326a | 544 | py | Python | math_and_algorithm/035.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | math_and_algorithm/035.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | math_and_algorithm/035.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import math
import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
def main():
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
x1, y1, r1 = na()
x2, y2, r2 = na()
d = math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
if d ... | 17.548387 | 57 | 0.492647 |
03b7001fe0f5ae5469adaaa86f3e9d4ac2b49d88 | 2,429 | py | Python | Day 48 - Cookie Clicker Game/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | 2 | 2021-12-07T00:39:57.000Z | 2021-12-07T01:44:21.000Z | Day 48 - Cookie Clicker Game/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | null | null | null | Day 48 - Cookie Clicker Game/main.py | atulmkamble/100DaysOfCode | ccfb6cb8582be69c63c666a3b097e0130585e4c9 | [
"MIT"
] | 1 | 2021-09-12T14:02:27.000Z | 2021-09-12T14:02:27.000Z | """
This program plays the cookie clicker game in an aoutmated way using the Selenium Webdriver Browser
"""
# Import required libraries
from selenium import webdriver
from time import time
def main():
chrome_driver_path = 'C:/Development/chromedriver.exe' # TODO: Download the driver and use your folder path
... | 33.273973 | 112 | 0.61548 |
03b70d9fc99168dbe93011f0a55fcf8c089652ea | 492 | py | Python | write_df_csv.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | write_df_csv.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | write_df_csv.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | import pandas as pd
def write_df_csv(
ann_df, image_df, class_df,
output_csv_path, output_image_csv_path,
output_class_csv_path
):
"""
Writing CSVs based on Pandas Dataframe
"""
# Saving the Pandas Dataframe for classes to a CSV file
ann_df.to_csv(output_csv_path)
# Saving the Pand... | 30.75 | 59 | 0.735772 |
03b718d987beb9a70759ed30e9d112d9a4d0a3b2 | 3,638 | py | Python | pystratis/api/staking/tests/test_staking.py | madrazzl3/pystratis | 8b78552e753ae1d12f2afb39e9a322a270fbb7b3 | [
"MIT"
] | null | null | null | pystratis/api/staking/tests/test_staking.py | madrazzl3/pystratis | 8b78552e753ae1d12f2afb39e9a322a270fbb7b3 | [
"MIT"
] | null | null | null | pystratis/api/staking/tests/test_staking.py | madrazzl3/pystratis | 8b78552e753ae1d12f2afb39e9a322a270fbb7b3 | [
"MIT"
] | null | null | null | import pytest
from pytest_mock import MockerFixture
from pystratis.api.staking import Staking
from pystratis.api.staking.responsemodels import *
from pystratis.core.networks import StraxMain
from pystratis.core import WalletSecret
def test_all_strax_endpoints_implemented(strax_swagger_json):
paths = [key.lower() ... | 36.38 | 94 | 0.711655 |
03b71f48e7efb217f409fcdbac1cae6e90dfce58 | 114 | py | Python | backend/application/test/test_MatchingAlgo.py | musicfox/sim-exchange | ddedbfd628ecfe09de0a8e4d46db9eadfe0dedca | [
"MIT"
] | 2 | 2020-05-09T05:32:25.000Z | 2021-04-14T19:29:29.000Z | backend/application/test/test_MatchingAlgo.py | musicfox/sim-exchange | ddedbfd628ecfe09de0a8e4d46db9eadfe0dedca | [
"MIT"
] | 16 | 2020-04-08T18:52:18.000Z | 2020-05-29T17:59:06.000Z | backend/application/test/test_MatchingAlgo.py | musicfox/sim-exchange | ddedbfd628ecfe09de0a8e4d46db9eadfe0dedca | [
"MIT"
] | null | null | null | """
test_MatchingAlgo.py
"""
import pytest
def test_init(contributors):
assert "@philipmuh" in contributors
| 12.666667 | 39 | 0.736842 |
03b7231b19afcc19a6c6485d7b0ccb7df1eeee9e | 25,301 | py | Python | vaxrank/report.py | shah-newaz/vaxrank | 65832878f28ce44ccaaf47be3e0c6d38a1743988 | [
"Apache-2.0"
] | null | null | null | vaxrank/report.py | shah-newaz/vaxrank | 65832878f28ce44ccaaf47be3e0c6d38a1743988 | [
"Apache-2.0"
] | null | null | null | vaxrank/report.py | shah-newaz/vaxrank | 65832878f28ce44ccaaf47be3e0c6d38a1743988 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016-2018. Mount Sinai School of Medicine
#
# 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 applicabl... | 41.274062 | 100 | 0.633374 |
03b743753df6ccd7349397edfd57c1647569f577 | 2,061 | py | Python | power_rankings.py | Jason-ccm/covid19-forecast-hub-evaluation | 8e55ab8a9604cac71c7385f851fdf5e1a597aadb | [
"MIT"
] | 94 | 2020-06-17T17:33:44.000Z | 2021-11-21T08:21:14.000Z | power_rankings.py | Jason-ccm/covid19-forecast-hub-evaluation | 8e55ab8a9604cac71c7385f851fdf5e1a597aadb | [
"MIT"
] | 3 | 2020-07-06T14:43:53.000Z | 2021-03-27T02:24:25.000Z | power_rankings.py | Jason-ccm/covid19-forecast-hub-evaluation | 8e55ab8a9604cac71c7385f851fdf5e1a597aadb | [
"MIT"
] | 35 | 2020-06-27T22:21:22.000Z | 2022-03-22T18:16:33.000Z | from collections import defaultdict
import glob
import numpy as np
import pandas as pd
"""
Compute a "Power Rankings" based on the mean 'N weeks ahead' percentiles,
where N is 1-6 weeks ahead. This includes both US and state-by-state rankings.
There are a total of 12 summaries: US + state-by-state for each of 1... | 40.411765 | 93 | 0.705483 |
03b7c76f499ca7b7d8b08f88ef11ed13a3ca3808 | 3,860 | py | Python | mhw_analysis/scripts/show_system.py | profxj/mwh_analysis | bb3854ee9e6deee7be270967fe5a7e15a7636819 | [
"BSD-3-Clause"
] | 1 | 2020-06-22T21:19:41.000Z | 2020-06-22T21:19:41.000Z | mhw_analysis/scripts/show_system.py | profxj/mwh_analysis | bb3854ee9e6deee7be270967fe5a7e15a7636819 | [
"BSD-3-Clause"
] | 9 | 2020-06-05T16:16:48.000Z | 2020-10-18T18:58:00.000Z | mhw_analysis/scripts/show_system.py | profxj/mwh_analysis | bb3854ee9e6deee7be270967fe5a7e15a7636819 | [
"BSD-3-Clause"
] | null | null | null | """ Script to show an MHW System"""
from IPython import embed
def parser(options=None):
import argparse
# Parse
parser = argparse.ArgumentParser(description='Show an MHW System')
parser.add_argument("dataset", type=str, help="MHW System set: orig, vary")
parser.add_argument("plot_type", type=str,... | 32.436975 | 100 | 0.604663 |
03b7ca3ef522e1221a23ea0fb484a1ae8511b418 | 2,867 | py | Python | src/gedml/client/tmux/manager.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | 25 | 2021-09-06T13:26:02.000Z | 2022-01-06T13:25:24.000Z | src/gedml/client/tmux/manager.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | 1 | 2021-09-09T08:29:29.000Z | 2021-09-13T15:05:59.000Z | src/gedml/client/tmux/manager.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | 2 | 2021-09-07T08:44:41.000Z | 2021-09-09T08:31:55.000Z | import libtmux
def clear_tmux(session_name):
"""Kill the specified tmux session.
Args:
session_name(str):
The name of tmux session to be killed.
"""
target_session = TmuxManager(session_name=session_name)
target_session.close_all()
del target_session
class TmuxManager:
... | 26.794393 | 128 | 0.576212 |
03b7fb3a5138b0d2fab128be49f23b5f49baa9f8 | 5,087 | py | Python | pajbot/web/common/assets.py | aidenwallis/pajbot | eb180dd517e1f25cbc22dc65216b81aadccb597d | [
"MIT"
] | null | null | null | pajbot/web/common/assets.py | aidenwallis/pajbot | eb180dd517e1f25cbc22dc65216b81aadccb597d | [
"MIT"
] | null | null | null | pajbot/web/common/assets.py | aidenwallis/pajbot | eb180dd517e1f25cbc22dc65216b81aadccb597d | [
"MIT"
] | null | null | null | import logging
from flask_assets import Bundle
from flask_assets import Environment
log = logging.getLogger(__name__)
def init(app):
assets = Environment(app)
# Basic CSS and Javascript:
# Available under: base_css, base_js
base_css = Bundle("css/base.scss", filters="pyscss,cssmin", output="gen/css... | 45.828829 | 120 | 0.72243 |
03b7fb9f90b8bf796ee512425e2ecc5db1b7abb8 | 883 | py | Python | tartangan/models/losses.py | awentzonline/tartangan | 2d36a81fa0ae91fe6b9b4e1f26763285630837fb | [
"MIT"
] | null | null | null | tartangan/models/losses.py | awentzonline/tartangan | 2d36a81fa0ae91fe6b9b4e1f26763285630837fb | [
"MIT"
] | null | null | null | tartangan/models/losses.py | awentzonline/tartangan | 2d36a81fa0ae91fe6b9b4e1f26763285630837fb | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
# Found these hinge loss functions in this BigGAN repo:
# https://github.com/ajbrock/BigGAN-PyTorch
def discriminator_hinge_loss(real, fake):
loss_real = torch.mean(F.relu(1. - real))
loss_fake = torch.mean(F.relu(1. + fake))
return loss_real, loss_fake
def g... | 28.483871 | 81 | 0.693092 |
03b8185a5e02b66240e31d3457a9e0bf71e867eb | 1,083 | py | Python | setup.py | mxreppy/restapi-logging-handler | 286bcc6309be897340c05d85bdf8e3e2df7dfc68 | [
"MIT"
] | null | null | null | setup.py | mxreppy/restapi-logging-handler | 286bcc6309be897340c05d85bdf8e3e2df7dfc68 | [
"MIT"
] | null | null | null | setup.py | mxreppy/restapi-logging-handler | 286bcc6309be897340c05d85bdf8e3e2df7dfc68 | [
"MIT"
] | 1 | 2017-01-20T12:32:11.000Z | 2017-01-20T12:32:11.000Z | from setuptools import setup
try:
import pypandoc
description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
description = open('README.md').read()
setup(
name='restapi-logging-handler',
version='0.3.1',
description='A handler for the python logging module that sends lo... | 31.852941 | 74 | 0.652816 |
03b88a68dcf5bb6b5c3acba3e48da6aebe079aa5 | 449 | py | Python | wlanpi_commands/show_cdp.py | nigelbowden/wlanpi-chat-bot | cedab0e83d6e33d47f66c1a3be202564f95ac408 | [
"MIT"
] | 1 | 2021-02-23T11:52:10.000Z | 2021-02-23T11:52:10.000Z | wlanpi_commands/show_cdp.py | nigelbowden/wlanpi-chat-bot | cedab0e83d6e33d47f66c1a3be202564f95ac408 | [
"MIT"
] | 2 | 2021-02-23T12:44:08.000Z | 2021-02-23T19:41:32.000Z | wlanpi_commands/show_cdp.py | nigelbowden/wlanpi-chat-bot | cedab0e83d6e33d47f66c1a3be202564f95ac408 | [
"MIT"
] | 3 | 2021-02-23T12:35:27.000Z | 2021-03-02T12:01:49.000Z | from .command import Command
class ShowCDP(Command):
def __init__(self, telegram_object, conf_obj):
super().__init__(telegram_object, conf_obj)
self.command_name = "show_cdp"
def run(self, args_list):
# read in CDP data is available
cdp_data = self._read_file... | 24.944444 | 55 | 0.623608 |
03b8b4b99620cd2bbc2bae6da64f1860157ae4f1 | 14,480 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_maintenance_configurations_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_maintenance_configurations_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/aio/operations/_maintenance_configurations_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 44.281346 | 232 | 0.676243 |
03b8d700c6726015e2b1615ff53ec94af82db524 | 1,680 | py | Python | cmds/display_networks.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | cmds/display_networks.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | cmds/display_networks.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | from DL_libs import *
train_data_spec = arguments['train_data']
valid_data_spec = arguments['valid_data']
conv_nnet_spec = arguments['conv_nnet_spec']
nnet_spec = arguments['nnet_spec']
wdir = arguments['wdir']
# parse network configuration from arguments, and initialize data reading
cfg = NetworkConfig(); cfg.model... | 44.210526 | 110 | 0.760119 |
03b8ee599ed0d38e48c8df08601bd21a15301113 | 755 | py | Python | mobiletrans/mtimport/management/commands/mt_import_policestations.py | JoeJasinski/WindyTransit | b883c7eebe618923ecc7b1914a696543d8864215 | [
"MIT"
] | 1 | 2015-04-28T14:48:27.000Z | 2015-04-28T14:48:27.000Z | mobiletrans/mtimport/management/commands/mt_import_policestations.py | JoeJasinski/WindyTransit | b883c7eebe618923ecc7b1914a696543d8864215 | [
"MIT"
] | null | null | null | mobiletrans/mtimport/management/commands/mt_import_policestations.py | JoeJasinski/WindyTransit | b883c7eebe618923ecc7b1914a696543d8864215 | [
"MIT"
] | null | null | null | import os, json
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from mobiletrans.mtimport.importers import importer_policestation as importer
class Command(BaseCommand):
args = '<policestations.json>'
help = 'Import Police Stations'
def handle(self, input... | 39.736842 | 107 | 0.731126 |
03b8f3371c6dd4792a27e5b512f91267639db1cf | 64 | py | Python | anchor_topic/__init__.py | forest-snow/anchor-topic | ad947f2ff6aefc28394531fa74ba3e94e5a01fc2 | [
"MIT"
] | 13 | 2019-02-14T15:55:55.000Z | 2022-03-03T01:01:28.000Z | anchor_topic/__init__.py | gkaramanolakis/anchor-topic | e1637fa3965bfe14d8a5241b070c675bcdf4df18 | [
"MIT"
] | 1 | 2020-11-12T22:49:16.000Z | 2020-11-12T22:49:16.000Z | anchor_topic/__init__.py | gkaramanolakis/anchor-topic | e1637fa3965bfe14d8a5241b070c675bcdf4df18 | [
"MIT"
] | 2 | 2019-02-14T15:26:56.000Z | 2021-08-21T02:37:53.000Z | import anchor_topic
name = 'anchor-topic'
__all__ = ['topics'] | 12.8 | 21 | 0.71875 |
03b8faf6f06b8ca175c8781c0cca641af9fcb49c | 37,081 | py | Python | build/lib/pymusepipe/mpdaf_pipe.py | emsellem/pymusepipe | 8d06597ef21f2690921ea08148e223f914a79559 | [
"MIT"
] | 5 | 2018-04-01T22:56:30.000Z | 2020-06-16T12:18:22.000Z | build/lib/pymusepipe/mpdaf_pipe.py | emsellem/pymusepipe | 8d06597ef21f2690921ea08148e223f914a79559 | [
"MIT"
] | 1 | 2019-09-30T00:02:49.000Z | 2019-09-30T10:04:15.000Z | build/lib/pymusepipe/mpdaf_pipe.py | emsellem/pymusepipe | 8d06597ef21f2690921ea08148e223f914a79559 | [
"MIT"
] | 6 | 2019-01-17T15:20:19.000Z | 2021-10-15T12:24:48.000Z | # Licensed under a MIT license - see LICENSE
"""MUSE-PHANGS mpdaf-functions module
"""
__authors__ = "Eric Emsellem"
__copyright__ = "(c) 2017, ESO + CRAL"
__license__ = "MIT License"
__contact__ = " <eric.emsellem@eso.org>"
# This module uses some mpdaf routines and wrap some of their
# functionalities to hel... | 38.95063 | 113 | 0.593485 |
03b9331defec1f55a5998f8d39f20847b3524d43 | 5,375 | py | Python | samples/test/lightweight_python_functions_v2_pipeline.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | samples/test/lightweight_python_functions_v2_pipeline.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | samples/test/lightweight_python_functions_v2_pipeline.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2021 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 38.392857 | 86 | 0.698047 |
03b94374eb30cae5de7a5307aa9d761a288f5c8b | 107 | py | Python | performance/driver/classes/observer/utils/__init__.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 2 | 2018-02-27T18:21:21.000Z | 2018-03-16T12:12:12.000Z | performance/driver/classes/observer/utils/__init__.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 1 | 2018-06-25T07:14:41.000Z | 2018-06-25T07:14:41.000Z | performance/driver/classes/observer/utils/__init__.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 1 | 2020-06-25T10:37:21.000Z | 2020-06-25T10:37:21.000Z | from .rawsse import RawSSE, RawSSEDisconnectedError
from .curlsse import CurlSSE, CurlSSEDisconnectedError
| 35.666667 | 54 | 0.869159 |
03b958cf342db370dc3a0fa3517da50474f7d5a0 | 635 | py | Python | deeplearning/pytorch/src/main/python/examples/twister2worker.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 63 | 2017-08-31T10:02:52.000Z | 2021-12-18T21:42:14.000Z | deeplearning/pytorch/src/main/python/examples/twister2worker.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 284 | 2017-10-20T15:35:26.000Z | 2020-09-11T15:25:40.000Z | deeplearning/pytorch/src/main/python/examples/twister2worker.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 44 | 2017-08-21T19:47:57.000Z | 2020-11-22T22:45:50.000Z | import numpy as np
import mpi4py
import torch
mpi4py.rc(initialize=False, finalize=False)
from mpi4py import MPI
MPI.Init()
comm = MPI.COMM_WORLD
parent = comm.Get_parent()
world_rank = parent.Get_rank()
world_size = parent.Get_size()
recv_data = np.array([0, 0, 0, 0], dtype="i")
if world_rank == 1:
parent.Recv... | 21.166667 | 64 | 0.72126 |
03b9643c5e008a2ee1676ab726016269f9ba0fc3 | 160 | py | Python | algorithms/__init__.py | Taosheng-ty/cs6350MLcourse | 738bc5ccc50b78a1721986e1a703a575adda2ca6 | [
"MIT"
] | null | null | null | algorithms/__init__.py | Taosheng-ty/cs6350MLcourse | 738bc5ccc50b78a1721986e1a703a575adda2ca6 | [
"MIT"
] | null | null | null | algorithms/__init__.py | Taosheng-ty/cs6350MLcourse | 738bc5ccc50b78a1721986e1a703a575adda2ca6 | [
"MIT"
] | null | null | null | from .decision_tree import *
from .simple_perceptron import *
from .SVM import *
from .Random_forest import *
from .Naive_prediction import *
from .Dnn import * | 26.666667 | 32 | 0.78125 |
03b975e4d0e82a9ce99cd9cd2964182b4a8c7bfc | 128 | py | Python | src/hash_dict.py | erickcan/sound-change-applier | f6c1d75933c4f1269c7b158ace61b95488c84843 | [
"MIT"
] | 2 | 2021-04-20T14:30:59.000Z | 2021-10-03T18:58:26.000Z | src/hash_dict.py | erickcan/sound-change-applier | f6c1d75933c4f1269c7b158ace61b95488c84843 | [
"MIT"
] | null | null | null | src/hash_dict.py | erickcan/sound-change-applier | f6c1d75933c4f1269c7b158ace61b95488c84843 | [
"MIT"
] | null | null | null | __all__ = ["HashableDict"]
class HashableDict(dict):
def __hash__(self):
return hash(tuple(sorted(self.items())))
| 18.285714 | 48 | 0.664063 |
03b9925b622b889078116853a718a0c8edfbe1ac | 4,807 | py | Python | utils/CNN_utils.py | ymzayek/asteroidsCNN | b10d1a7b713ef878a0459340d4060cfdad9575a7 | [
"MIT"
] | null | null | null | utils/CNN_utils.py | ymzayek/asteroidsCNN | b10d1a7b713ef878a0459340d4060cfdad9575a7 | [
"MIT"
] | null | null | null | utils/CNN_utils.py | ymzayek/asteroidsCNN | b10d1a7b713ef878a0459340d4060cfdad9575a7 | [
"MIT"
] | null | null | null | import csv
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from matplotlib.ticker import FormatStrFormatter
from tensorflow.keras import backend as K
def load_data_from_images(image_path, datasplit):
"""Load images from directory
Parameters:
image_path (str):... | 30.424051 | 141 | 0.605159 |
03b993bce0416576faad0aa3f5f5c51b98ec5a22 | 2,678 | py | Python | tests/test_control_protocol.py | KimJeongChul/py3iperf3 | e8a0bf0e81a172fb818e8d20b15facd3b011a566 | [
"MIT"
] | 3 | 2018-10-16T11:58:51.000Z | 2019-11-13T14:07:19.000Z | tests/test_control_protocol.py | KimJeongChul/py3iperf3 | e8a0bf0e81a172fb818e8d20b15facd3b011a566 | [
"MIT"
] | 1 | 2019-09-19T13:27:44.000Z | 2019-09-19T13:27:44.000Z | tests/test_control_protocol.py | KimJeongChul/py3iperf3 | e8a0bf0e81a172fb818e8d20b15facd3b011a566 | [
"MIT"
] | 6 | 2019-01-04T07:48:45.000Z | 2022-03-01T08:12:03.000Z | """
Unit-test for control protocol between the client and server.
"""
import unittest
import unittest.mock
from py3iperf3.control_protocol import ControlProtocol
class TestControlProtocol(unittest.TestCase):
"""Unit-test of control protocol"""
@unittest.mock.patch('py3iperf3.utils.logging.getLogger')
def... | 31.880952 | 67 | 0.694175 |
03b996470d37c3d89abdda5ead304ea6961582fb | 13,410 | py | Python | contrib/python/prompt_toolkit/prompt_toolkit/key_binding/bindings/basic.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | 1 | 2017-08-27T20:55:56.000Z | 2017-08-27T20:55:56.000Z | contrib/python/prompt_toolkit/prompt_toolkit/key_binding/bindings/basic.py | dsferz/machinelearning_yandex | 8fde8314c5c70299ece8b8f00075ddfcd5e07ddf | [
"Apache-2.0"
] | 6 | 2020-06-05T18:44:19.000Z | 2022-01-13T00:48:56.000Z | contrib/python/prompt_toolkit/prompt_toolkit/key_binding/bindings/basic.py | dsferz/machinelearning_yandex | 8fde8314c5c70299ece8b8f00075ddfcd5e07ddf | [
"Apache-2.0"
] | 1 | 2018-08-06T14:13:12.000Z | 2018-08-06T14:13:12.000Z | # pylint: disable=function-redefined
from __future__ import unicode_literals
from prompt_toolkit.enums import DEFAULT_BUFFER
from prompt_toolkit.filters import CLIFilter, Always, HasSelection, Condition, EmacsInsertMode, ViInsertMode
from prompt_toolkit.keys import Keys
from prompt_toolkit.layout.screen import Point
f... | 33.863636 | 108 | 0.644146 |
03b9da793307b966632789fd11162306e6cd19f9 | 31,478 | py | Python | tensorflow/contrib/kfac/python/ops/optimizer.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/kfac/python/ops/optimizer.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/kfac/python/ops/optimizer.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # 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... | 43.239011 | 87 | 0.692134 |
03b9f760a48fc44b49e5472134215a7cdc291a6a | 1,933 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/check_name_availability_result.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/check_name_availability_result.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/check_name_availability_result.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 37.901961 | 79 | 0.631661 |
03b9fa906866a56dd02d1ead0c79daab91c3cbb5 | 381 | py | Python | python/myCode/solid.py | dgole/ledBasic | 4a8e77f103022c7f7014ca2b15b73f2b3f56755a | [
"BSD-2-Clause"
] | null | null | null | python/myCode/solid.py | dgole/ledBasic | 4a8e77f103022c7f7014ca2b15b73f2b3f56755a | [
"BSD-2-Clause"
] | null | null | null | python/myCode/solid.py | dgole/ledBasic | 4a8e77f103022c7f7014ca2b15b73f2b3f56755a | [
"BSD-2-Clause"
] | null | null | null | import time
from neopixel import *
import lib
import sys
c1 = int(sys.argv[1])
c2 = int(sys.argv[2])
c3 = int(sys.argv[3])
strip = Adafruit_NeoPixel(lib.LED_COUNT, lib.LED_PIN, lib.LED_FREQ_HZ, lib.LED_DMA, lib.LED_INVERT, lib.LED_BRIGHTNESS, lib.LED_CHANNEL, lib.LED_STRIP)
strip.begin()
for i in range(strip.numPixe... | 23.8125 | 151 | 0.742782 |
03ba05bb0f1dfc277544cbfb54e4f693f2ddec33 | 86,018 | py | Python | certbot-apache/certbot_apache/configurator.py | pklapperich/certbot | dcf388eacb60c4392b5648ce4e06640671b104e6 | [
"Apache-2.0"
] | 1 | 2019-01-20T08:17:47.000Z | 2019-01-20T08:17:47.000Z | certbot-apache/certbot_apache/configurator.py | shanyeshuzi/certbot | 0d4e88d8d94a1f5a6b881ca6401c6a328688a559 | [
"Apache-2.0"
] | null | null | null | certbot-apache/certbot_apache/configurator.py | shanyeshuzi/certbot | 0d4e88d8d94a1f5a6b881ca6401c6a328688a559 | [
"Apache-2.0"
] | null | null | null | """Apache Configuration based off of Augeas Configurator."""
# pylint: disable=too-many-lines
import fnmatch
import logging
import os
import pkg_resources
import re
import six
import socket
import time
import zope.component
import zope.interface
from acme import challenges
from certbot import errors
from certbot imp... | 39.841593 | 99 | 0.600874 |
03ba49b8d72d520231d5975c8a4b15d914f8af78 | 4,129 | py | Python | hallo/modules/convert/convert_unit_add_name.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2018-05-19T22:27:20.000Z | 2018-05-19T22:27:20.000Z | hallo/modules/convert/convert_unit_add_name.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 75 | 2015-09-26T18:07:18.000Z | 2022-01-04T07:15:11.000Z | hallo/modules/convert/convert_unit_add_name.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2021-04-10T12:02:47.000Z | 2021-04-10T12:02:47.000Z | from hallo.function import Function
from hallo.inc.input_parser import InputParser
class ConvertUnitAddName(Function):
"""
Adds a new name to a unit.
"""
NAMES_UNIT = ["unit", "u"]
NAMES_TYPE = ["type", "t"]
NAMES_NEW = ["new name", "new", "new_name"]
def __init__(self):
"""
... | 40.087379 | 97 | 0.591426 |
03ba57884e528d1c7ce20055baa1e2a86a2ba411 | 920 | py | Python | cupyx/fallback_mode/utils.py | okapies/cupy | 4e8394e5e0c4e420295cbc36819e8e0f7de90e9d | [
"MIT"
] | 1 | 2021-10-04T21:57:09.000Z | 2021-10-04T21:57:09.000Z | cupyx/fallback_mode/utils.py | hephaex/cupy | 5cf50a93bbdebe825337ed7996c464e84b1495ba | [
"MIT"
] | null | null | null | cupyx/fallback_mode/utils.py | hephaex/cupy | 5cf50a93bbdebe825337ed7996c464e84b1495ba | [
"MIT"
] | 1 | 2022-03-24T13:19:55.000Z | 2022-03-24T13:19:55.000Z | """
Utilities needed for fallback_mode.
"""
from cupyx.fallback_mode import data_transfer
def _call_cupy(func, args, kwargs):
"""
Calls cupy function with *args and **kwargs.
Args:
func: A cupy function that needs to be called.
args (tuple): Arguments.
kwargs (dict): Keyword argu... | 20.909091 | 74 | 0.65 |
03ba9bfa800c2a293869989a003deb7f01e78fbd | 1,403 | py | Python | imagestore/forms.py | nerdfiles/jahjah_works | 5d7f26dc8001b5dcb0c20b85e6ed247c4c7a00da | [
"WTFPL"
] | null | null | null | imagestore/forms.py | nerdfiles/jahjah_works | 5d7f26dc8001b5dcb0c20b85e6ed247c4c7a00da | [
"WTFPL"
] | null | null | null | imagestore/forms.py | nerdfiles/jahjah_works | 5d7f26dc8001b5dcb0c20b85e6ed247c4c7a00da | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python
# vim:fileencoding=utf-8
try:
import autocomplete_light
AUTOCOMPLETE_LIGHT_INSTALLED = True
except ImportError:
AUTOCOMPLETE_LIGHT_INSTALLED = False
__author__ = 'zeus'
from django import forms
from models import Image, Album
from django.utils.translation import ugettext_lazy as _
... | 32.627907 | 103 | 0.654312 |
03ba9d73087961b6747dc2e82ca8e30e90b41ecc | 2,232 | py | Python | test/test_dice.py | dgnsrekt/baseball | 70c09b9da1712178b030675b44ee6b295e1b1cc9 | [
"MIT"
] | null | null | null | test/test_dice.py | dgnsrekt/baseball | 70c09b9da1712178b030675b44ee6b295e1b1cc9 | [
"MIT"
] | null | null | null | test/test_dice.py | dgnsrekt/baseball | 70c09b9da1712178b030675b44ee6b295e1b1cc9 | [
"MIT"
] | null | null | null | """
Title: test_dice
Author: Kevin Tracey McGee (DGNSREKT)
Date: 4/17/2019
Description: Tests the baseball_simulator dice function.
Url: https://github.com/nolapython/baseball
"""
from pathlib import Path
import sys
import random
import pytest
# Used to change to the correct directory to avoid import errors.
FILEPATH... | 28.253165 | 82 | 0.704749 |
03baa6f81e5c7091d59102868ffe9848f5ce4f0b | 1,942 | py | Python | setup.py | develmaycare/python-scripttease | acaf466f25ab18ba158fefea4d67f11ccfb9b169 | [
"BSD-3-Clause"
] | null | null | null | setup.py | develmaycare/python-scripttease | acaf466f25ab18ba158fefea4d67f11ccfb9b169 | [
"BSD-3-Clause"
] | 8 | 2020-10-19T18:06:05.000Z | 2020-12-30T19:29:01.000Z | setup.py | develmaycare/python-scripttease | acaf466f25ab18ba158fefea4d67f11ccfb9b169 | [
"BSD-3-Clause"
] | null | null | null | # See https://packaging.python.org/en/latest/distributing.html
# and https://docs.python.org/2/distutils/setupscript.html
# and https://pypi.python.org/pypi?%3Aaction=list_classifiers
from setuptools import setup, find_packages
def read_file(path):
with open(path, "r") as f:
contents = f.read()
f.... | 31.836066 | 87 | 0.641092 |
03bab3b2131c0249ea61ed5a8fb60aadbec835fe | 2,526 | py | Python | sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | sdk/fluidrelay/azure-mgmt-fluidrelay/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 34.135135 | 91 | 0.605305 |
03bae26a05afd63f3d438eb7a3c445780a1f8d95 | 7,461 | py | Python | personatus/MPU9250.py | lki1354/Agapornis | e09e68a3327fe248c474f69a661a37380eea560f | [
"MIT"
] | 1 | 2018-02-19T08:28:12.000Z | 2018-02-19T08:28:12.000Z | personatus/MPU9250.py | lki1354/Agapornis | e09e68a3327fe248c474f69a661a37380eea560f | [
"MIT"
] | null | null | null | personatus/MPU9250.py | lki1354/Agapornis | e09e68a3327fe248c474f69a661a37380eea560f | [
"MIT"
] | null | null | null | # MicroPython driver for the IMU sensor MPU9250 from InvenSense
# WHO AM I = 117
# value WHO AM I = 113
from array import array
GyroScaleValues = [250, 500, 1000, 2000]
AccelerometerScaleValues = [2, 4, 8, 16]
def bytes_to_int(msb, lsb):
"""
Convert two bytes to signed integer (big endian)
for little en... | 31.0875 | 120 | 0.605013 |
03bae8fed9d9eb53e6a7143cfd4450fafde27e9b | 2,062 | py | Python | validation-scripts/ice_validator/tests/test_no_unused_parameters_between_env_and_templates.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_no_unused_parameters_between_env_and_templates.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_no_unused_parameters_between_env_and_templates.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf8 -*-
# ============LICENSE_START=======================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ========================================... | 42.958333 | 82 | 0.654219 |
03bb0b7d37e8028a90d3fdbe794b20c1dde05f78 | 3,229 | py | Python | tests/puzzles/test_replace_words.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/puzzles/test_replace_words.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/puzzles/test_replace_words.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | import unittest
from puzzles.replace_words import replace_words_with_prefix_hash, replace_words_with_trie
class ReplaceWordsHashTestCases(unittest.TestCase):
def test_with_cat_bat_rat(self):
dictionary = ["cat", "bat", "rat"]
sentence = "the cattle was rattled by the battery"
expected = ... | 34.351064 | 89 | 0.655931 |
03bb1f7df3a6a54c82b4dad1cc6b845b5a75c16b | 5,915 | py | Python | redis_yy/redis.py | guaidashu/redis_yy | c1ed760bf835414b1c1a66a5a47ca81203610ed0 | [
"MIT"
] | null | null | null | redis_yy/redis.py | guaidashu/redis_yy | c1ed760bf835414b1c1a66a5a47ca81203610ed0 | [
"MIT"
] | null | null | null | redis_yy/redis.py | guaidashu/redis_yy | c1ed760bf835414b1c1a66a5a47ca81203610ed0 | [
"MIT"
] | null | null | null | """
Create by yy on 2019/9/27
I'm looking for a good job, can you provide for me?
Please contact me by email 1023767856@qq.com.
"""
import warnings
import redis
from .lib.tool import Tool
__all__ = ['RedisDB']
class RedisDB(object):
"""
因为之后可能 根据业务需求,对一些方法进行代理,所以才写了这个包。
为了拓展性,和组件化思想(对于我写的Helper这个包,
... | 29.575 | 114 | 0.550296 |
03bb38bb0f9b4783718fe1d7536c3ddda1e50c11 | 8,279 | py | Python | redbull/__init__.py | theSage21/redbull | 2f3cf0c8a8a910c18151ca493984d0a364581710 | [
"MIT"
] | 10 | 2018-09-11T09:11:13.000Z | 2019-09-10T09:47:35.000Z | redbull/__init__.py | theSage21/redbull | 2f3cf0c8a8a910c18151ca493984d0a364581710 | [
"MIT"
] | null | null | null | redbull/__init__.py | theSage21/redbull | 2f3cf0c8a8a910c18151ca493984d0a364581710 | [
"MIT"
] | null | null | null | try:
import bottle
except ImportError:
bottle = None
try:
from aiohttp import web as aioweb
except ImportError:
aioweb = None
from inspect import signature, _empty
from functools import wraps
from typing import get_type_hints
from .doc_html import gen_doc_html
def cors_dict__(origin=None):
"Genera... | 34.785714 | 93 | 0.534485 |
03bb440258a8d4b74355b7a707df609a0bf8ce1d | 3,695 | py | Python | tests/core/test_utils.py | eurocontrol-swim/swim-pubsub | be46664c7ff919d6835ed005218841ea2ba39659 | [
"BSD-3-Clause"
] | null | null | null | tests/core/test_utils.py | eurocontrol-swim/swim-pubsub | be46664c7ff919d6835ed005218841ea2ba39659 | [
"BSD-3-Clause"
] | null | null | null | tests/core/test_utils.py | eurocontrol-swim/swim-pubsub | be46664c7ff919d6835ed005218841ea2ba39659 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright 2019 EUROCONTROL
==========================================
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 conditions an... | 44.518072 | 121 | 0.759946 |
03bb44e18f529f83a73a46f6ddea44b2b955e2a7 | 4,337 | py | Python | afs/utils.py | benchuang11046/afs2-model | c821f078a2c1379b16273dc34d5d488a3d032f06 | [
"Apache-2.0"
] | 2 | 2019-05-27T06:19:33.000Z | 2021-01-24T14:39:25.000Z | afs/utils.py | benchuang11046/afs2-model | c821f078a2c1379b16273dc34d5d488a3d032f06 | [
"Apache-2.0"
] | 24 | 2019-04-26T02:02:02.000Z | 2020-05-14T10:18:55.000Z | afs/utils.py | benchuang11046/afs2-model | c821f078a2c1379b16273dc34d5d488a3d032f06 | [
"Apache-2.0"
] | null | null | null | import json
import requests
import logging
# import botocore.session
from botocore.client import Config
import boto3
import hashlib
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5 as Cipher_PKCS1_v1_5
_logger = logging.getLogger(__name__)
import time
class InvalidStatusCode(Exception):
def... | 28.721854 | 97 | 0.600415 |
03bb508ed83ab649ef1de4bf6ca9831a8db145ad | 22,426 | py | Python | python_modules/libraries/dagster-celery-k8s/dagster_celery_k8s/executor.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-celery-k8s/dagster_celery_k8s/executor.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-celery-k8s/dagster_celery_k8s/executor.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import sys
import time
import kubernetes
from dagster_celery.config import DEFAULT_CONFIG, dict_wrapper
from dagster_celery.core_execution_loop import DELEGATE_MARKER
from dagster_celery.defaults import broker_url, result_backend
from dagster_k8s import DagsterK8sJobConfig, construct_dagster_k... | 40.480144 | 137 | 0.638545 |
03bb51685bc47f80e2442261fca448faf2c364d3 | 3,460 | py | Python | lib/common.py | AlbertoBarbado/unsupervised-outlier-transparency | d80637cd0a9f70a3ff5f327952b4bd6377826707 | [
"Apache-2.0"
] | 5 | 2019-04-18T22:05:26.000Z | 2022-01-09T02:05:06.000Z | lib/common.py | AlbertoBarbado/unsupervised-outlier-transparency | d80637cd0a9f70a3ff5f327952b4bd6377826707 | [
"Apache-2.0"
] | 1 | 2022-01-08T11:57:40.000Z | 2022-01-08T11:57:40.000Z | lib/common.py | AlbertoBarbado/unsupervised-outlier-transparency | d80637cd0a9f70a3ff5f327952b4bd6377826707 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 6 10:13:42 2019
@author: alber
"""
import numpy as np
import pandas as pd
from sklearn import svm
from sklearn.preprocessing import StandardScaler
from joblib import Parallel, delayed
from sklearn.tree import _tree
def train_one_class_svm(dataset_mat, numerical_cols, c... | 34.949495 | 172 | 0.625723 |
03bb6bd07241147205f720aa622c31a8a5e04539 | 311 | py | Python | tests/engine_tests/mocks/mongo_db.py | pitzer42/micro-tcg | eec416fb3b7b992a206ab900f3d85d172f494103 | [
"MIT"
] | null | null | null | tests/engine_tests/mocks/mongo_db.py | pitzer42/micro-tcg | eec416fb3b7b992a206ab900f3d85d172f494103 | [
"MIT"
] | 2 | 2019-06-25T02:15:10.000Z | 2019-06-25T02:22:14.000Z | tests/engine_tests/mocks/mongo_db.py | pitzer42/micro-tcg | eec416fb3b7b992a206ab900f3d85d172f494103 | [
"MIT"
] | 1 | 2019-06-12T00:35:41.000Z | 2019-06-12T00:35:41.000Z | from motor.motor_asyncio import AsyncIOMotorClient
async def create_test_db():
test_db = AsyncIOMotorClient().micro_tcg_test
collection_names = await test_db.list_collection_names()
for collection_name in collection_names:
await test_db.drop_collection(collection_name)
return test_db
| 31.1 | 60 | 0.794212 |
03bb85b05064a6d8276feda752bf7336b7760c2a | 2,711 | py | Python | ice_validator/tests/test_vm_type_resource_id.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2018-08-29T19:33:22.000Z | 2018-08-29T19:33:22.000Z | ice_validator/tests/test_vm_type_resource_id.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | ice_validator/tests/test_vm_type_resource_id.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2019-07-23T15:47:43.000Z | 2021-07-02T15:04:19.000Z | # -*- coding: utf8 -*-
# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ===========================================... | 36.635135 | 83 | 0.644781 |
03bb8fe553aed6c35beacece22010013f85b1d02 | 3,846 | py | Python | intersight/models/iam_ldap_group_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_ldap_group_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_ldap_group_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class IamLdapGroupList(object):
"""
NOTE: This clas... | 24.974026 | 81 | 0.548882 |
03bb9def74ab6df330ca24373cf9fbfef3079215 | 1,549 | py | Python | clif/testing/python/top_level_pass_test.py | timgates42/clif | b865c88beff70b31068889926d1184d5ddc0b9eb | [
"Apache-2.0"
] | null | null | null | clif/testing/python/top_level_pass_test.py | timgates42/clif | b865c88beff70b31068889926d1184d5ddc0b9eb | [
"Apache-2.0"
] | null | null | null | clif/testing/python/top_level_pass_test.py | timgates42/clif | b865c88beff70b31068889926d1184d5ddc0b9eb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.957447 | 74 | 0.747579 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.