hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e7f99c069fa60cb694ca59001f869161287bbe56 | 919 | py | Python | .history/src/visualization/visualize_20191021122840.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/visualization/visualize_20191021122840.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/visualization/visualize_20191021122840.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | # Function for new graph
def importance_plotting(data, x, y, palette, title):
"""
Importance plotting of features came from the Kaggle Kernel of Joshua Reed.
He used importance
https://www.kaggle.com/josh24990/simple-end-to-end-ml-workflow-top-5-score
Arguments:
data {[type]} -- [des... | 36.76 | 82 | 0.622416 |
f50ce673f276d62e200c7c6d9493b2fcb48485c9 | 49,969 | py | Python | src/transformers/modeling_albert.py | hephaex/transformers | 794f2bfb1f304853533aade6d3a198aede88699e | [
"Apache-2.0"
] | 3 | 2020-09-18T06:00:00.000Z | 2020-09-28T05:15:42.000Z | src/transformers/modeling_albert.py | hephaex/transformers | 794f2bfb1f304853533aade6d3a198aede88699e | [
"Apache-2.0"
] | 1 | 2021-07-24T20:40:22.000Z | 2021-07-24T20:40:22.000Z | src/transformers/modeling_albert.py | hephaex/transformers | 794f2bfb1f304853533aade6d3a198aede88699e | [
"Apache-2.0"
] | 2 | 2021-01-25T02:55:11.000Z | 2021-06-05T23:28:38.000Z | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and the HuggingFace Inc. 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
#
# U... | 41.433665 | 168 | 0.663591 |
d9405b27806605966f865ad8e6e868671afe80c6 | 5,599 | py | Python | docs/source/conf.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 11 | 2019-07-29T16:21:53.000Z | 2022-02-02T11:44:57.000Z | docs/source/conf.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 11 | 2019-05-15T09:30:05.000Z | 2021-07-19T16:49:59.000Z | docs/source/conf.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 9 | 2019-08-12T11:14:45.000Z | 2020-12-22T18:22:55.000Z | # -*- coding: utf-8 -*-
#
# PyBILT documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 4 23:50:31 2017.
#
# 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.
#
# Al... | 30.763736 | 79 | 0.689945 |
da2ad27978587020d7c1d2cd624c47b70437b0a9 | 836 | py | Python | plugins/rapid7_metasploit/komand_rapid7_metasploit/connection/connection.py | ax-rpipkin/insightconnect-plugins | 7ff7bd829a67ae3020d8d7ecfda3c2dc76ab398c | [
"MIT"
] | null | null | null | plugins/rapid7_metasploit/komand_rapid7_metasploit/connection/connection.py | ax-rpipkin/insightconnect-plugins | 7ff7bd829a67ae3020d8d7ecfda3c2dc76ab398c | [
"MIT"
] | null | null | null | plugins/rapid7_metasploit/komand_rapid7_metasploit/connection/connection.py | ax-rpipkin/insightconnect-plugins | 7ff7bd829a67ae3020d8d7ecfda3c2dc76ab398c | [
"MIT"
] | null | null | null | import komand
from .schema import ConnectionSchema
# Custom imports below
import ssl
from metasploit.msfrpc import MsfRpcClient
class Connection(komand.Connection):
def __init__(self):
super(self.__class__, self).__init__(input=ConnectionSchema())
self.client = None
def connect(self, params)... | 33.44 | 104 | 0.687799 |
52df9a737283129283cf88079384642fc9435a8a | 1,762 | py | Python | configs/ssl/ssl_deeplabv3plus_r101-d16_512x1024_40k_b16_cityscapes_clossw_20.py | openseg-group/mmsegmentation | 23939f09d2b0bd30fc26eb7f8af974f1f5441210 | [
"Apache-2.0"
] | 2 | 2020-07-10T12:13:56.000Z | 2020-11-09T07:09:29.000Z | configs/ssl/ssl_deeplabv3plus_r101-d16_512x1024_40k_b16_cityscapes_clossw_20.py | openseg-group/mmsegmentation | 23939f09d2b0bd30fc26eb7f8af974f1f5441210 | [
"Apache-2.0"
] | null | null | null | configs/ssl/ssl_deeplabv3plus_r101-d16_512x1024_40k_b16_cityscapes_clossw_20.py | openseg-group/mmsegmentation | 23939f09d2b0bd30fc26eb7f8af974f1f5441210 | [
"Apache-2.0"
] | 2 | 2020-07-28T09:12:55.000Z | 2021-01-04T07:49:59.000Z | _base_ = [
'../_base_/models/deeplabv3plus_r50-d16.py',
'../_base_/datasets/cityscapes_custom.py',
'../_base_/default_runtime.py',
'../_base_/schedules/schedule_40k.py'
]
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='ParallelEncoderDecoder',
pretrained='open-mmlab://resn... | 30.37931 | 86 | 0.624858 |
af00b1cc23d2303abd93bb8cbd835126ab5499ed | 11,237 | py | Python | python/ray/tests/test_multi_node_2.py | Therealchainman/ray | 995d3cb48773fdf14f4ee647587adbb7f7cd108b | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_multi_node_2.py | Therealchainman/ray | 995d3cb48773fdf14f4ee647587adbb7f7cd108b | [
"Apache-2.0"
] | 24 | 2021-10-30T07:08:28.000Z | 2022-03-12T08:07:49.000Z | python/ray/tests/test_multi_node_2.py | Therealchainman/ray | 995d3cb48773fdf14f4ee647587adbb7f7cd108b | [
"Apache-2.0"
] | null | null | null | import logging
import pytest
import time
import ray
import ray.ray_constants as ray_constants
from ray.util.placement_group import placement_group, remove_placement_group
from ray.autoscaler.sdk import request_resources
from ray.autoscaler._private.monitor import Monitor
from ray.cluster_utils import Cluster
from ray.... | 31.742938 | 78 | 0.657204 |
764a1d46703774e3444fc1e3dc0cc41cbb843157 | 2,403 | py | Python | .leetcode/530.minimum-absolute-difference-in-bst.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/530.minimum-absolute-difference-in-bst.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/530.minimum-absolute-difference-in-bst.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=530 lang=python3
#
# [530] Minimum Absolute Difference in BST
#
# https://leetcode.com/problems/minimum-absolute-difference-in-bst/description/
#
# algorithms
# Easy (55.59%)
# Likes: 1558
# Dislikes: 103
# Total Accepted: 130.2K
# Total Submissions: 234.1K
# Testcase Example: '[4,2,6,1,3]'... | 19.859504 | 79 | 0.548481 |
6a4514eb8b37230d425cd7c8a73a297042b16cbd | 2,807 | py | Python | LeetCode/problems/997.py | Muzque/Leetcode | d06365792c9ef48e0a290da00ba5e71f212554d5 | [
"MIT"
] | 1 | 2021-05-11T09:52:38.000Z | 2021-05-11T09:52:38.000Z | LeetCode/problems/997.py | Muzque/Leetcode | d06365792c9ef48e0a290da00ba5e71f212554d5 | [
"MIT"
] | null | null | null | LeetCode/problems/997.py | Muzque/Leetcode | d06365792c9ef48e0a290da00ba5e71f212554d5 | [
"MIT"
] | 1 | 2021-05-05T04:13:17.000Z | 2021-05-05T04:13:17.000Z | """
997. Find the Town Judge
In a town, there are n people labeled from 1 to n.
There is a rumor that one of these people is secretly the town judge.
If the town judge exists, then:
1. The town judge trusts nobody.
2. Everybody (except for the town judge) trusts the town judge.
3. There is exactly one per... | 25.288288 | 82 | 0.493409 |
ec770c371c90433491dbac3d4aa17899010e3ba9 | 398 | py | Python | woodwork/__init__.py | not-so-rabh/woodwork | 18e44c371e77ebc41baae57289bfc4fd1804b122 | [
"BSD-3-Clause"
] | null | null | null | woodwork/__init__.py | not-so-rabh/woodwork | 18e44c371e77ebc41baae57289bfc4fd1804b122 | [
"BSD-3-Clause"
] | null | null | null | woodwork/__init__.py | not-so-rabh/woodwork | 18e44c371e77ebc41baae57289bfc4fd1804b122 | [
"BSD-3-Clause"
] | null | null | null | # flake8: noqa
from .config import config
from .type_sys import type_system
from .type_sys.utils import list_logical_types, list_semantic_tags
from .utils import read_csv
from .version import __version__
import woodwork.column_accessor
import woodwork.demo
import woodwork.table_accessor
from woodwork.accessor_utils im... | 24.875 | 66 | 0.829146 |
0f992714a1f743f0a5e7c62857598cd26468c9af | 5,622 | py | Python | mtp_noms_ops/urls.py | ministryofjustice/money-to-prisoners-noms-ops | b01e5260f57b5aad553c7107ac423e915454093b | [
"MIT"
] | 3 | 2016-12-22T15:56:57.000Z | 2020-03-10T10:37:40.000Z | mtp_noms_ops/urls.py | ministryofjustice/money-to-prisoners-noms-ops | b01e5260f57b5aad553c7107ac423e915454093b | [
"MIT"
] | 61 | 2016-06-10T08:37:23.000Z | 2022-01-28T12:41:29.000Z | mtp_noms_ops/urls.py | ministryofjustice/money-to-prisoners-noms-ops | b01e5260f57b5aad553c7107ac423e915454093b | [
"MIT"
] | 1 | 2021-04-11T06:13:53.000Z | 2021-04-11T06:13:53.000Z | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.http import HttpResponse
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.urls import reverse, reverse_lazy
from django.utils.tran... | 42.270677 | 113 | 0.699573 |
1c8610a32e231b0c49dd552e47d9da728f155805 | 15,748 | py | Python | airflow/providers/microsoft/azure/operators/azure_batch.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 1 | 2020-09-15T02:32:55.000Z | 2020-09-15T02:32:55.000Z | airflow/providers/microsoft/azure/operators/azure_batch.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 20 | 2021-01-23T12:33:08.000Z | 2021-12-07T22:30:37.000Z | airflow/providers/microsoft/azure/operators/azure_batch.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 1 | 2021-07-02T04:23:18.000Z | 2021-07-02T04:23:18.000Z | #
# 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... | 44.611898 | 109 | 0.699898 |
2245fe03d22e27328780ecdf4fb5f3ecb80912ed | 1,421 | py | Python | simulation/aivika/modeler/arrival_timer.py | dsorokin/aivika-modeler | 5c112015f9af6ba1974a3b208842da01e705f9ac | [
"BSD-3-Clause"
] | null | null | null | simulation/aivika/modeler/arrival_timer.py | dsorokin/aivika-modeler | 5c112015f9af6ba1974a3b208842da01e705f9ac | [
"BSD-3-Clause"
] | null | null | null | simulation/aivika/modeler/arrival_timer.py | dsorokin/aivika-modeler | 5c112015f9af6ba1974a3b208842da01e705f9ac | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com>
#
# Licensed under BSD3. See the LICENSE.txt file in the root of this distribution.
from simulation.aivika.modeler.model import *
from simulation.aivika.modeler.port import *
def create_arrival_timer(model, name, descr = None):
"""Return a new timer tha... | 36.435897 | 105 | 0.712878 |
c11a2631bbdd5e3c8fe0568dbe04ab8d4c43314b | 3,130 | py | Python | events/models.py | eddyyonnie/Neighbours | 7eaac93fcca8f6cf695ce65c883bc6515783876b | [
"MIT"
] | null | null | null | events/models.py | eddyyonnie/Neighbours | 7eaac93fcca8f6cf695ce65c883bc6515783876b | [
"MIT"
] | 3 | 2021-03-19T01:11:02.000Z | 2021-09-08T01:02:37.000Z | events/models.py | eddyyonnie/Neighbours | 7eaac93fcca8f6cf695ce65c883bc6515783876b | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
import numpy as np
class Profile(models.Model):
avatar = models.ImageField( blank=True ,upload_to='avatar/')
user = models.OneToOneField(User, on_delete=m... | 28.981481 | 113 | 0.658786 |
1a6a732f540ec5fbf9c201bde3aa664e09dc823b | 2,892 | py | Python | main.py | stereopix/mars-stereo | d73a243ba88627959754bc33844c1d6bf0e3a398 | [
"MIT"
] | null | null | null | main.py | stereopix/mars-stereo | d73a243ba88627959754bc33844c1d6bf0e3a398 | [
"MIT"
] | null | null | null | main.py | stereopix/mars-stereo | d73a243ba88627959754bc33844c1d6bf0e3a398 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from aiohttp import web, client
import asyncio
async def http_root_handler(request):
with open('resources/index.html') as f:
return web.Response(text=f.read(), content_type='text/html')
async def forward(request, url):
#print('>', url)
headers = {'Accept': 'applicati... | 32.863636 | 107 | 0.650415 |
e065f0d2a241319522d3c1f4357c9526d0b2dfcc | 844 | py | Python | tests/universal_functions_tests/exp2_tests/inplace_normal.py | bryevdv/cunumeric | 7965ceb96d3252371c22cf32d38ac91c4db77a38 | [
"Apache-2.0"
] | null | null | null | tests/universal_functions_tests/exp2_tests/inplace_normal.py | bryevdv/cunumeric | 7965ceb96d3252371c22cf32d38ac91c4db77a38 | [
"Apache-2.0"
] | null | null | null | tests/universal_functions_tests/exp2_tests/inplace_normal.py | bryevdv/cunumeric | 7965ceb96d3252371c22cf32d38ac91c4db77a38 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021-2022 NVIDIA Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 24.823529 | 74 | 0.708531 |
d9255c8cd024b7e8fa41fa52b39f97666d370bb0 | 13,055 | py | Python | stdlib3-src/lzma.py | ch1huizong/Scode | c34fb9d0f9b73fe199ba370f2e3ffb30b8f70895 | [
"MIT"
] | null | null | null | stdlib3-src/lzma.py | ch1huizong/Scode | c34fb9d0f9b73fe199ba370f2e3ffb30b8f70895 | [
"MIT"
] | null | null | null | stdlib3-src/lzma.py | ch1huizong/Scode | c34fb9d0f9b73fe199ba370f2e3ffb30b8f70895 | [
"MIT"
] | null | null | null | """Interface to the liblzma compression library.
This module provides a class for reading and writing compressed files,
classes for incremental (de)compression, and convenience functions for
one-shot (de)compression.
These classes and functions support both the XZ and legacy LZMA
container formats, as well as raw com... | 37.193732 | 105 | 0.624129 |
2c96f00316eea25363ff11b0b18c0ea71623af32 | 2,942 | py | Python | monai/handlers/smartcache_handler.py | Irme/MONAI | dc4bf661831b14f4231cb325cc1b15d38c1e406c | [
"Apache-2.0"
] | 3 | 2021-11-23T08:03:02.000Z | 2022-03-18T09:56:01.000Z | monai/handlers/smartcache_handler.py | JZK00/MONAI | 49e693c4e7df83dc1f8ab87349373de9263188a9 | [
"Apache-2.0"
] | 1 | 2020-09-17T12:41:51.000Z | 2020-09-29T15:20:37.000Z | monai/handlers/smartcache_handler.py | JZK00/MONAI | 49e693c4e7df83dc1f8ab87349373de9263188a9 | [
"Apache-2.0"
] | 1 | 2020-06-11T13:03:02.000Z | 2020-06-11T13:03:02.000Z | # Copyright 2020 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, s... | 37.240506 | 94 | 0.687288 |
c1ef70bba86347b1c61a3522892d5e562a3e8e1c | 32,325 | py | Python | pandas/tests/series/test_timeseries.py | mwaskom/pandas | d1010643fea058ba43c2c7124af75cc462ccf242 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | 3 | 2017-02-09T20:01:04.000Z | 2021-08-11T00:33:41.000Z | pandas/tests/series/test_timeseries.py | mwaskom/pandas | d1010643fea058ba43c2c7124af75cc462ccf242 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/tests/series/test_timeseries.py | mwaskom/pandas | d1010643fea058ba43c2c7124af75cc462ccf242 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
# pylint: disable-msg=E1101,W0612
import pytest
import numpy as np
from datetime import datetime, timedelta, time
import pandas as pd
import pandas.util.testing as tm
from pandas._libs.tslib import iNaT
from pandas.compat import lrange, StringIO, product
from pandas.core.indexes.timedeltas import Time... | 33.954832 | 79 | 0.562073 |
b0e9428364e0a21d6ebf724e1063f06cab1b08f8 | 1,555 | py | Python | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 54 | 2016-03-25T17:25:01.000Z | 2018-10-22T17:27:54.000Z | azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/operation_status_jobs_extended_info.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.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 ... | 37.02381 | 76 | 0.636013 |
5d01bad8aa7b069f4d4a87d4becb19f592c3ae10 | 512 | py | Python | helpers/Config.py | alexkingdom/api_gistat | 31ec6b8b6e2d39a5990766371f917b92a5ebf73f | [
"Apache-2.0"
] | null | null | null | helpers/Config.py | alexkingdom/api_gistat | 31ec6b8b6e2d39a5990766371f917b92a5ebf73f | [
"Apache-2.0"
] | null | null | null | helpers/Config.py | alexkingdom/api_gistat | 31ec6b8b6e2d39a5990766371f917b92a5ebf73f | [
"Apache-2.0"
] | null | null | null | import yaml
class Config:
def __init__(self, file):
with open(file, 'r') as stream:
try:
self.config = yaml.safe_load(stream)
except yaml.YAMLError:
raise ConfigException('Not found configuration')
def get(self, name=None, default=None):
... | 21.333333 | 64 | 0.580078 |
29ca095f5b91f54a70a4692e68a4d150d1646b43 | 13,625 | py | Python | fhir/resources/researchdefinition.py | mmabey/fhir.resources | cc73718e9762c04726cd7de240c8f2dd5313cbe1 | [
"BSD-3-Clause"
] | null | null | null | fhir/resources/researchdefinition.py | mmabey/fhir.resources | cc73718e9762c04726cd7de240c8f2dd5313cbe1 | [
"BSD-3-Clause"
] | null | null | null | fhir/resources/researchdefinition.py | mmabey/fhir.resources | cc73718e9762c04726cd7de240c8f2dd5313cbe1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/ResearchDefinition
Release: R4
Version: 4.0.1
Build ID: 9346c8cc45
Last updated: 2019-11-01T09:29:23.356+11:00
"""
import sys
from . import domainresource
class ResearchDefinition(domainresource.DomainResource):
""" A research context... | 33.312958 | 109 | 0.48044 |
892e03abd51c5279a4e2ae94824c6bb4c8a26598 | 8,663 | py | Python | src/awkward/_v2/operations/structure/ak_zip.py | colesbury/awkward-1.0 | d036ab18eb54de8a2571d9f179d315ac8ee22119 | [
"BSD-3-Clause"
] | null | null | null | src/awkward/_v2/operations/structure/ak_zip.py | colesbury/awkward-1.0 | d036ab18eb54de8a2571d9f179d315ac8ee22119 | [
"BSD-3-Clause"
] | null | null | null | src/awkward/_v2/operations/structure/ak_zip.py | colesbury/awkward-1.0 | d036ab18eb54de8a2571d9f179d315ac8ee22119 | [
"BSD-3-Clause"
] | null | null | null | # BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
import awkward as ak
np = ak.nplike.NumpyMetadata.instance()
def zip(
arrays,
depth_limit=None,
parameters=None,
with_name=None,
highlevel=True,
behavior=None,
right_broadcast=False,
optiontype_ou... | 35.504098 | 88 | 0.562854 |
f40b8e28aec648e3c9b1dbdcb1a19e16621b125a | 3,741 | py | Python | huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/file_update.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/file_update.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/file_update.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class FileUpdate:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json... | 23.092593 | 74 | 0.519914 |
680039ea1828302329c992d0e75402a1d17e3f07 | 1,205 | py | Python | leetcode/coin_change_2.py | Joes-BitGit/Leetcode | c117a475ceda915826294ce0cd2bc3280eafa592 | [
"MIT"
] | null | null | null | leetcode/coin_change_2.py | Joes-BitGit/Leetcode | c117a475ceda915826294ce0cd2bc3280eafa592 | [
"MIT"
] | null | null | null | leetcode/coin_change_2.py | Joes-BitGit/Leetcode | c117a475ceda915826294ce0cd2bc3280eafa592 | [
"MIT"
] | null | null | null | # DESCRIPTION
# You are given coins of different denominations and a total amount of money.
# Write a function to compute the number of combinations that make up that amount.
# You may assume that you have infinite number of each kind of coin.
# Example 1:
# Input: amount = 5, coins = [1, 2, 5]
# Output: 4
# Explana... | 26.777778 | 83 | 0.624066 |
540b121f34338164b729b7c0055aeee56e99a261 | 8,545 | py | Python | agents/PublisherAgent.py | AlgoveraAI/tokenspice | e64531ac09e51bcb2d34908fd74f809834767408 | [
"MIT"
] | 81 | 2021-08-01T10:00:15.000Z | 2022-03-30T15:05:52.000Z | agents/PublisherAgent.py | AlgoveraAI/tokenspice | e64531ac09e51bcb2d34908fd74f809834767408 | [
"MIT"
] | 93 | 2021-08-03T16:21:54.000Z | 2022-03-22T05:36:51.000Z | agents/PublisherAgent.py | AlgoveraAI/tokenspice | e64531ac09e51bcb2d34908fd74f809834767408 | [
"MIT"
] | 15 | 2021-08-10T04:02:32.000Z | 2022-03-30T05:51:56.000Z | import random
from typing import List
from enforce_typing import enforce_types
from agents.PoolAgent import PoolAgent
from sol057.contracts.oceanv3 import oceanv3util
from engine import AgentBase
from util import globaltokens
from util.base18 import toBase18
from util.constants import S_PER_DAY
# magic numbers
DEFAU... | 35.020492 | 88 | 0.637332 |
c796b13500eb2d6868d2ce377069934ef5a31266 | 504 | py | Python | setup.py | datahappy1/mssql_to_redshift_data_transfer_tool | c292dc32c2fbcf218d5d00591b22003e1349f0c8 | [
"MIT"
] | 2 | 2019-02-05T19:23:28.000Z | 2019-04-15T13:56:14.000Z | setup.py | datahappy1/mssql_to_redshift_data_transfer_tool | c292dc32c2fbcf218d5d00591b22003e1349f0c8 | [
"MIT"
] | 1 | 2020-03-09T19:21:31.000Z | 2020-09-10T22:17:33.000Z | setup.py | datahappy1/mssql_to_redshift_data_transfer_tool | c292dc32c2fbcf218d5d00591b22003e1349f0c8 | [
"MIT"
] | null | null | null | """ Setup.py """
from setuptools import setup
setup(
name='mssql_to_redshift_data_transfer_tool',
version='1.0',
packages=[''],
url='https://github.com/datahappy1/mssql_to_redshift_data_transfer_tool/',
license='MIT',
author='datahappy1',
author_email='',
description='Python 3.7 tool to... | 31.5 | 81 | 0.670635 |
11644ae3dba67830cb6dac73d3fca5792aa4bfbf | 292 | py | Python | apps/posters/migrations/0005_merge.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 32 | 2017-02-22T13:38:38.000Z | 2022-03-31T23:29:54.000Z | apps/posters/migrations/0005_merge.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 694 | 2017-02-15T23:09:52.000Z | 2022-03-31T23:16:07.000Z | apps/posters/migrations/0005_merge.py | Kpaubert/onlineweb4 | 9ac79f163bc3a816db57ffa8477ea88770d97807 | [
"MIT"
] | 35 | 2017-09-02T21:13:09.000Z | 2022-02-21T11:30:30.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posters", "0004_auto_20151119_1236"),
("posters", "0004_auto_20151119_1239"),
]
operations = []
| 19.466667 | 47 | 0.667808 |
27c14f9a7f8c023fb6dcbc18356442fb889ebc76 | 1,723 | py | Python | app/user/serializers.py | shemaeric/Recipe-api | d9f4af1c94654a8b95141a585e29b1c0d797514b | [
"MIT"
] | null | null | null | app/user/serializers.py | shemaeric/Recipe-api | d9f4af1c94654a8b95141a585e29b1c0d797514b | [
"MIT"
] | null | null | null | app/user/serializers.py | shemaeric/Recipe-api | d9f4af1c94654a8b95141a585e29b1c0d797514b | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model, authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
"""User serializer for the data"""
class Meta:
model = get_user_model()
fields = ('em... | 31.327273 | 75 | 0.644806 |
64881c8e24ee142fce3e1d11ae063c0859bd1211 | 20,199 | py | Python | pswalker/plans.py | ZLLentz/pswalker | 9642489e6add37906998f09cc88290bc95686ac9 | [
"BSD-3-Clause-LBNL"
] | null | null | null | pswalker/plans.py | ZLLentz/pswalker | 9642489e6add37906998f09cc88290bc95686ac9 | [
"BSD-3-Clause-LBNL"
] | 8 | 2018-04-20T21:26:02.000Z | 2021-01-11T19:31:08.000Z | pswalker/plans.py | ZLLentz/pswalker | 9642489e6add37906998f09cc88290bc95686ac9 | [
"BSD-3-Clause-LBNL"
] | 2 | 2018-06-26T00:09:27.000Z | 2018-11-29T19:40:04.000Z | """
Bluesky Plans for the Walker
"""
############
# Standard #
############
import time
import itertools
import logging
from collections import Iterable
from copy import copy
###############
# Third Party #
###############
import numpy as np
import pandas as pd
import bluesky
from scipy.stats import linregress
from o... | 35.750442 | 98 | 0.59196 |
867907f4a009f0e75017c57f7c1c207d998ec682 | 1,169 | py | Python | tests/setup_validation_case_06.py | ThomasSchuetz/ThermalBuildingModel | f1a9417451374ac5632980df62f859a51e91851a | [
"MIT"
] | null | null | null | tests/setup_validation_case_06.py | ThomasSchuetz/ThermalBuildingModel | f1a9417451374ac5632980df62f859a51e91851a | [
"MIT"
] | null | null | null | tests/setup_validation_case_06.py | ThomasSchuetz/ThermalBuildingModel | f1a9417451374ac5632980df62f859a51e91851a | [
"MIT"
] | 1 | 2020-10-17T21:18:56.000Z | 2020-10-17T21:18:56.000Z | # -*- coding: utf-8 -*-
import numpy as np
from base_validation_case import BaseValidationCase
class SetupValidationCase06(BaseValidationCase):
def __init__(self, times_per_hour=60, total_days=60):
super().__init__(times_per_hour, total_days)
def get_building_parameters(self):
return {
... | 29.974359 | 57 | 0.526946 |
cdc0ebf72373852bab673813f035f387c5e96632 | 1,932 | py | Python | pytest/test_weather_models.py | ribuild/delphin_6_automation | 12024381fc1042b46314c55d88b6349229ea33b7 | [
"MIT"
] | 2 | 2017-11-08T18:37:36.000Z | 2018-01-09T12:10:58.000Z | pytest/test_weather_models.py | ribuild/delphin_6_automation | 12024381fc1042b46314c55d88b6349229ea33b7 | [
"MIT"
] | 111 | 2018-02-26T08:25:44.000Z | 2021-03-31T19:17:19.000Z | pytest/test_weather_models.py | thp44/delphin_6_automation | 12024381fc1042b46314c55d88b6349229ea33b7 | [
"MIT"
] | 3 | 2017-11-06T10:01:25.000Z | 2018-02-14T09:45:28.000Z | __author__ = "Christian Kongsgaard"
__license__ = 'MIT'
# -------------------------------------------------------------------------------------------------------------------- #
# IMPORTS
# Modules
import pytest
import numpy as np
# RiBuild Modules
from delphin_6_automation.delphin_setup import weather_modeling
from ... | 39.428571 | 120 | 0.668219 |
1da78e9dd8ba9e0e87c0deb110cd54fd0cd33418 | 9,287 | py | Python | tests/unit/bokeh/util/test_token.py | oviquezr/bokeh | ee9d743def81d41a6ec12cf8a6bc9f92da7c09ba | [
"BSD-3-Clause"
] | null | null | null | tests/unit/bokeh/util/test_token.py | oviquezr/bokeh | ee9d743def81d41a6ec12cf8a6bc9f92da7c09ba | [
"BSD-3-Clause"
] | null | null | null | tests/unit/bokeh/util/test_token.py | oviquezr/bokeh | ee9d743def81d41a6ec12cf8a6bc9f92da7c09ba | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 40.911894 | 124 | 0.577582 |
1e6430f3b3abbdd43bf245d4584cf2834fa0ff19 | 6,803 | py | Python | run/evaluationmagnitudefftwointerpolation.py | QROWD/transportation_mode_detection | fc4c5b586b86f78a152d799d719ad169e564594d | [
"Apache-2.0"
] | null | null | null | run/evaluationmagnitudefftwointerpolation.py | QROWD/transportation_mode_detection | fc4c5b586b86f78a152d799d719ad169e564594d | [
"Apache-2.0"
] | null | null | null | run/evaluationmagnitudefftwointerpolation.py | QROWD/transportation_mode_detection | fc4c5b586b86f78a152d799d719ad169e564594d | [
"Apache-2.0"
] | null | null | null | import csv
from argparse import ArgumentParser
import numpy as np
from accelerometerfeatures.utils.pytorch.dataset import \
AccelerometerDatasetLoader
from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier, \
GradientBoostingClassifier, ExtraTreesClassifier
from sklearn.svm import SVC
from skl... | 40.017647 | 80 | 0.539909 |
440b27a74e8f61f08e81958831aec99db0c2fd71 | 2,116 | py | Python | btproxipy/bt_rssi.py | LukeSkywalker92/btproxipy | 4608cd412fdb0c33de91a54d0b1e513826a6e1ac | [
"MIT"
] | 2 | 2020-03-31T10:16:08.000Z | 2022-02-12T01:00:30.000Z | btproxipy/bt_rssi.py | LukeSkywalker92/btproxipy | 4608cd412fdb0c33de91a54d0b1e513826a6e1ac | [
"MIT"
] | null | null | null | btproxipy/bt_rssi.py | LukeSkywalker92/btproxipy | 4608cd412fdb0c33de91a54d0b1e513826a6e1ac | [
"MIT"
] | 6 | 2019-11-17T12:28:31.000Z | 2022-02-12T00:54:15.000Z | import bluetooth
import bluetooth._bluetooth as bt
import struct
import array
import fcntl
class BluetoothRSSI(object):
"""Object class for getting the RSSI value of a Bluetooth address.
Reference: https://github.com/dagar/bluetooth-proximity
"""
def __init__(self, addr):
self.addr = addr
... | 35.266667 | 91 | 0.595463 |
79156bc54a8eb96d0466ba83a745dec53273efb6 | 3,270 | py | Python | augment-c_and_cpp.py | asah/codesmell | 8295d65343c253a8a2afe6c217396fdcbb965932 | [
"MIT"
] | null | null | null | augment-c_and_cpp.py | asah/codesmell | 8295d65343c253a8a2afe6c217396fdcbb965932 | [
"MIT"
] | 6 | 2017-07-11T20:05:08.000Z | 2017-07-19T14:14:55.000Z | augment-c_and_cpp.py | asah/codesmell | 8295d65343c253a8a2afe6c217396fdcbb965932 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import re, random, sys, difflib
random.seed(123)
for i, line in enumerate(sys.stdin.readlines()):
if i % 1000 == 0: print >>sys.stderr, i, "..."
if i>0 and re.search(r'^id\tsentiment', line): continue # combined files, ignore multiple header rows
line = re.sub(r'\n$', '', line) # stri... | 52.741935 | 117 | 0.478287 |
475ef520b371ec59094775a01d70923e32a16757 | 17,092 | py | Python | naive_bayes less comments.py | adrianxsalazar/Naive-bayes-classifier-python | 4685c38fc4f45d07181934be9cef2418124b7e45 | [
"MIT"
] | null | null | null | naive_bayes less comments.py | adrianxsalazar/Naive-bayes-classifier-python | 4685c38fc4f45d07181934be9cef2418124b7e45 | [
"MIT"
] | null | null | null | naive_bayes less comments.py | adrianxsalazar/Naive-bayes-classifier-python | 4685c38fc4f45d07181934be9cef2418124b7e45 | [
"MIT"
] | null | null | null | import sys
import math
import sys
import os
import csv
import numpy as np
class naive_bayes():
########## SET OF FUNTIONS FOR THE NAIVE BAYES CLASSIFIER ############
####### FUNCTION TO CALCULATE THE PRIOR PROBABILITIES OF EACH CLASS ########
def calculation_prior_probabilities(self,l... | 46.445652 | 91 | 0.658612 |
a6ea54124091da75a7afe13866f927de220c1dbd | 10,433 | py | Python | DBUtils/Testing/TestSteadyPg.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 4 | 2021-10-17T11:17:59.000Z | 2022-02-28T16:58:40.000Z | DBUtils/Testing/TestSteadyPg.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 17 | 2021-10-05T21:44:06.000Z | 2022-03-31T16:58:40.000Z | DBUtils/Testing/TestSteadyPg.py | moibenko/enstore | 6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9 | [
"Intel",
"Unlicense"
] | 8 | 2021-09-02T18:55:49.000Z | 2022-03-09T21:05:28.000Z | """Test the SteadyPg module.
Note:
We do not test the real PyGreSQL module, but we just
mock the basic connection functionality of that module.
We assume that the PyGreSQL module will detect lost
connections correctly and set the status flag accordingly.
Copyright and credit info:
* This test was contributed by Chri... | 29.388732 | 70 | 0.701141 |
193de7db46fc795a1fe365a4b678e814239fc345 | 784 | py | Python | midi_generator/midi_generator_base.py | creightoncook/midi-generator | faba5aecc1bbc520e38c771c4283eeff4b39848c | [
"MIT"
] | null | null | null | midi_generator/midi_generator_base.py | creightoncook/midi-generator | faba5aecc1bbc520e38c771c4283eeff4b39848c | [
"MIT"
] | null | null | null | midi_generator/midi_generator_base.py | creightoncook/midi-generator | faba5aecc1bbc520e38c771c4283eeff4b39848c | [
"MIT"
] | null | null | null | """Main module."""
from __future__ import annotations
from dataclasses import astuple
from midi_generator.music_types import *
def note_to_midi(note: Note) -> MIDINote:
lookup = f"{note.pitch}{note.octave}"
try:
return MIDINote(pitch=NOTE_TO_MIDI_LOOKUP[lookup])
except ValueError:
raise ... | 26.133333 | 70 | 0.670918 |
b2cb694eefea4668a95abdbe2cb1ec344c89ae8b | 2,825 | py | Python | RS-recall/swing.py | LianShuaiLong/Codebook | fd67440d2de80b48aa90b9f7ea5d459baee0a6d8 | [
"MIT"
] | null | null | null | RS-recall/swing.py | LianShuaiLong/Codebook | fd67440d2de80b48aa90b9f7ea5d459baee0a6d8 | [
"MIT"
] | null | null | null | RS-recall/swing.py | LianShuaiLong/Codebook | fd67440d2de80b48aa90b9f7ea5d459baee0a6d8 | [
"MIT"
] | null | null | null | #swing召回算法,代码借鉴 https://blog.csdn.net/Gamer_gyt/article/details/115678598
import json
import argparse
import pandas as pd
from itertools import combinations
from collections import defaultdict
import os
alpha = 0.5
topk=20
def parse_parser():
parser = argparse.ArgumentParser()
parser.add_argument('--train_dat... | 36.217949 | 123 | 0.705133 |
cb4ab41cd56ea01d23a669a72258c61c0c573cb7 | 1,202 | py | Python | venv1/Lib/site-packages/tensorflow/contrib/gan/python/eval/python/summaries.py | Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | [
"Apache-2.0",
"MIT"
] | 6 | 2022-02-04T18:12:24.000Z | 2022-03-21T23:57:12.000Z | Lib/site-packages/tensorflow/contrib/gan/python/eval/python/summaries.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2021-05-20T00:58:04.000Z | 2021-05-20T00:58:04.000Z | Lib/site-packages/tensorflow/contrib/gan/python/eval/python/summaries.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2022-02-08T03:53:23.000Z | 2022-02-08T03:53:23.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... | 41.448276 | 81 | 0.727953 |
f1e0bc04fa5231ab88318714c26d38d0bf9572b5 | 2,034 | py | Python | tests/domain/transform/test_translation.py | mvinoba/stylo | 84f3a74cf9cb29c6d24b990dc9a474562114392b | [
"MIT"
] | null | null | null | tests/domain/transform/test_translation.py | mvinoba/stylo | 84f3a74cf9cb29c6d24b990dc9a474562114392b | [
"MIT"
] | null | null | null | tests/domain/transform/test_translation.py | mvinoba/stylo | 84f3a74cf9cb29c6d24b990dc9a474562114392b | [
"MIT"
] | null | null | null | import numpy.testing as npt
import pytest
from hypothesis import given
from unittest import TestCase
from stylo.domain.square import UnitSquare
from stylo.domain.transform.translation import Translation
from stylo.testing.domain import BaseRealDomainTest
from stylo.testing.strategies import dimension, real
@pytest.m... | 35.684211 | 85 | 0.684857 |
212a1291aa6cb081b8b355a937fd1136653935dc | 1,604 | py | Python | src/python/graph.py | pvandommelen/concurrent-bench | 52d21e782d43c68b8453f1410523235cafc9c2e7 | [
"MIT"
] | null | null | null | src/python/graph.py | pvandommelen/concurrent-bench | 52d21e782d43c68b8453f1410523235cafc9c2e7 | [
"MIT"
] | null | null | null | src/python/graph.py | pvandommelen/concurrent-bench | 52d21e782d43c68b8453f1410523235cafc9c2e7 | [
"MIT"
] | null | null | null | from math import log, exp
import numpy as np
import matplotlib.pyplot as plt
import sys
from descent import gradient_descent
input_filepath = sys.argv[1]
timings = np.fromfile(input_filepath, dtype=float)
N = timings.size
x_range = np.arange(1, N + 1)
x = np.column_stack([
np.ones(N),
x_range,
np.power(... | 23.940299 | 106 | 0.63591 |
3bdb6fcd837d91fa21b7de105a8c516274617b50 | 921 | py | Python | main.py | TheBloodyScreen/Minecraft-Controller | 1b1dda0691cea712f0400aa034e708d9401afc2a | [
"MIT"
] | null | null | null | main.py | TheBloodyScreen/Minecraft-Controller | 1b1dda0691cea712f0400aa034e708d9401afc2a | [
"MIT"
] | null | null | null | main.py | TheBloodyScreen/Minecraft-Controller | 1b1dda0691cea712f0400aa034e708d9401afc2a | [
"MIT"
] | null | null | null | # This file is © TheBloodyscreen
# It was created as part of the Minecraft-Controller project in Jun of 2019
# If you want to use all or part of the code in this file,
# please contact JayDee@TheBloodyScreen.com
import kivy
from rcon import Rcon
from kivy.app import App
from config import config
from kivy.uix.label im... | 24.891892 | 75 | 0.733985 |
d622a68433b602e36a808b9c094d1d0754049896 | 1,053 | py | Python | tern/utils/constants.py | SPriyal/tern | 1341b7f25ccf37aa0dd7a6a12bab54825ff3562e | [
"BSD-2-Clause"
] | null | null | null | tern/utils/constants.py | SPriyal/tern | 1341b7f25ccf37aa0dd7a6a12bab54825ff3562e | [
"BSD-2-Clause"
] | null | null | null | tern/utils/constants.py | SPriyal/tern | 1341b7f25ccf37aa0dd7a6a12bab54825ff3562e | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017, 2019 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: BSD-2-Clause
#
'''
Constants
'''
# temporary folder for extracting container image
# this is relative to where the tern executable is
temp_folder = 'temp'
# temporary tar file
temp_tarfile = 'temp.tar'
# ... | 22.891304 | 60 | 0.735043 |
55a7c9b307fb1073d0adec5608064106ddd1770d | 611 | py | Python | pynpact/tests/test_11_processing.py | NProfileAnalysisComputationalTool/npact | d4495f5cba2a936f2be2f2c821edd5429d1a58da | [
"BSD-3-Clause"
] | 2 | 2015-09-18T02:01:19.000Z | 2021-09-03T18:40:59.000Z | pynpact/tests/test_11_processing.py | NProfileAnalysisComputationalTool/npact | d4495f5cba2a936f2be2f2c821edd5429d1a58da | [
"BSD-3-Clause"
] | null | null | null | pynpact/tests/test_11_processing.py | NProfileAnalysisComputationalTool/npact | d4495f5cba2a936f2be2f2c821edd5429d1a58da | [
"BSD-3-Clause"
] | 1 | 2015-09-25T18:58:21.000Z | 2015-09-25T18:58:21.000Z | import pytest
from pynpact import main
def test_process(mocker, gbkfile, executor, tmpdir):
mock = mocker.patch('pynpact.main.resolve_verb')
assert main.process(
'extract', gbkfile, executor=executor, outputdir=str(tmpdir))
assert mock.called
# def test__process(executor, gbkconfig, mocker):
... | 26.565217 | 84 | 0.662848 |
8445de25e9384af3ba4a87731e2b56646b73d476 | 5,071 | py | Python | Back-End/pytradebot/mysite/migrations/0002_auto_20191119_1715.py | NatanNMB15/tcc-pytradebot | 52b19251a030ab9c1a1b95157b4d57a9cf6df9dc | [
"MIT"
] | 1 | 2020-05-13T14:12:42.000Z | 2020-05-13T14:12:42.000Z | Back-End/pytradebot/mysite/migrations/0002_auto_20191119_1715.py | NatanNMB15/tcc-pytradebot | 52b19251a030ab9c1a1b95157b4d57a9cf6df9dc | [
"MIT"
] | 7 | 2020-02-12T02:58:40.000Z | 2021-06-04T23:24:08.000Z | Back-End/pytradebot/mysite/migrations/0002_auto_20191119_1715.py | NatanNMB15/tcc-pytradebot | 52b19251a030ab9c1a1b95157b4d57a9cf6df9dc | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2019-11-19 20:15
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import mysite.models
class Migration(migrations.Migration):
dependencies = [
('mysite', '0001_initial'),
... | 62.604938 | 189 | 0.623151 |
de1843227bd26b82d27c79bba267165718de6b35 | 2,122 | py | Python | calspread/collect_combo.py | quantrocket-codeload/calspread | 8dbfc66a2ebc1377f4ce4fb1958baf7e95fa52e5 | [
"Apache-2.0"
] | 1 | 2021-07-23T08:34:36.000Z | 2021-07-23T08:34:36.000Z | calspread/collect_combo.py | quantrocket-codeload/calspread | 8dbfc66a2ebc1377f4ce4fb1958baf7e95fa52e5 | [
"Apache-2.0"
] | null | null | null | calspread/collect_combo.py | quantrocket-codeload/calspread | 8dbfc66a2ebc1377f4ce4fb1958baf7e95fa52e5 | [
"Apache-2.0"
] | 5 | 2019-12-26T15:00:27.000Z | 2022-03-17T12:19:24.000Z | # Copyright 2019 QuantRocket 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... | 34.786885 | 92 | 0.717248 |
bca3ecb8bc5461915a1a14362daf735b416b0197 | 955 | py | Python | PracticePython/E2-OddOrEven.py | JLJTECH/TutorialTesting | f2dbbd49a86b3b086d0fc156ac3369fb74727f86 | [
"MIT"
] | null | null | null | PracticePython/E2-OddOrEven.py | JLJTECH/TutorialTesting | f2dbbd49a86b3b086d0fc156ac3369fb74727f86 | [
"MIT"
] | null | null | null | PracticePython/E2-OddOrEven.py | JLJTECH/TutorialTesting | f2dbbd49a86b3b086d0fc156ac3369fb74727f86 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
Ask the user for a number. Depending on whether the number is even or odd, print out an appropriate message to the user.
Extras:
If the number is a multiple of 4, print out a different message.
Ask the user for two numbers: one number to check (call it num) and one number to divide by (check... | 32.931034 | 158 | 0.696335 |
9eb8e52f0b2fe954b971b64721581515eeba225a | 1,892 | py | Python | tests/rate_limiting/test_rate_middleware.py | GDGSNF/piccolo_api | 830a4549907b70f55536884ac7b181b0f1feef28 | [
"MIT"
] | 57 | 2019-07-10T20:41:00.000Z | 2022-03-17T08:13:43.000Z | tests/rate_limiting/test_rate_middleware.py | GDGSNF/piccolo_api | 830a4549907b70f55536884ac7b181b0f1feef28 | [
"MIT"
] | 93 | 2020-10-08T18:56:07.000Z | 2022-03-19T05:47:56.000Z | tests/rate_limiting/test_rate_middleware.py | GDGSNF/piccolo_api | 830a4549907b70f55536884ac7b181b0f1feef28 | [
"MIT"
] | 8 | 2020-11-01T10:36:05.000Z | 2022-01-07T21:27:03.000Z | from time import sleep
from unittest import TestCase
from starlette.endpoints import HTTPEndpoint
from starlette.responses import JSONResponse
from starlette.routing import Route, Router
from starlette.testclient import TestClient
from piccolo_api.rate_limiting.middleware import (
InMemoryLimitProvider,
RateL... | 28.666667 | 77 | 0.626321 |
5ceb49b9437e93324f2aa3eced3bb1364a1a7884 | 11,926 | py | Python | login_universe/universe.py | JASchilz/RoverMUD | b99770a7c55cd6951df872793a54bfa260b145f9 | [
"Apache-2.0"
] | 4 | 2016-01-01T12:06:26.000Z | 2020-05-04T02:36:57.000Z | login_universe/universe.py | JASchilz/RoverMUD | b99770a7c55cd6951df872793a54bfa260b145f9 | [
"Apache-2.0"
] | null | null | null | login_universe/universe.py | JASchilz/RoverMUD | b99770a7c55cd6951df872793a54bfa260b145f9 | [
"Apache-2.0"
] | null | null | null | #------------------------------------------------------------------------------
# login_universe/universe.py
# Copyright 2011-2013 Joseph Schilz
# Licensed under Apache v2
#------------------------------------------------------------------------------
import os
import pickle
import hashlib
from basics import Ba... | 36.582822 | 147 | 0.65026 |
55f31ca45f9489ddb4e676b9fe1ad2cd32409d1b | 1,317 | py | Python | folders/Algorithms/tree_traversal/traversal.py | angelopassaro/Hacktoberfest-1 | 21f90f5d49efba9b1a27f4d9b923f5017ab43f0e | [
"Apache-2.0"
] | 1 | 2020-10-06T01:20:07.000Z | 2020-10-06T01:20:07.000Z | folders/Algorithms/tree_traversal/traversal.py | angelopassaro/Hacktoberfest-1 | 21f90f5d49efba9b1a27f4d9b923f5017ab43f0e | [
"Apache-2.0"
] | null | null | null | folders/Algorithms/tree_traversal/traversal.py | angelopassaro/Hacktoberfest-1 | 21f90f5d49efba9b1a27f4d9b923f5017ab43f0e | [
"Apache-2.0"
] | null | null | null | # Python program to for tree traversals
# A class that represents an individual node in a
# Binary Tree
class Node:
def __init__(self,key):
self.left = None
self.right = None
self.val = key
# A function to do inorder tree traversal
def printInorder(root):
if root:
# First recur on left child
... | 18.291667 | 50 | 0.700076 |
63181e1eb634de084da277db7c5c4a669936d2eb | 504 | py | Python | students/K33402/Velts Andrey/lab0304/backend/home/serializers.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 4 | 2020-09-03T15:41:42.000Z | 2021-12-24T15:28:20.000Z | students/K33402/Velts Andrey/lab0304/backend/home/serializers.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 48 | 2020-09-13T20:22:42.000Z | 2021-04-30T11:13:30.000Z | students/K33402/Velts Andrey/lab0304/backend/home/serializers.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 69 | 2020-09-06T10:32:37.000Z | 2021-11-28T18:13:17.000Z | from rest_framework import serializers
from easy_thumbnails.templatetags.thumbnail import thumbnail_url
class ThumbnailSerializer(serializers.ImageField):
def __init__(self, alias, *args, **kwargs):
super().__init__(*args, **kwargs)
self.read_only = True
self.alias = alias
def to_repr... | 28 | 64 | 0.664683 |
1c15739289c2e739e09dfaa9606e6a7fd656a3cf | 6,102 | py | Python | contrib/runners/orquesta_runner/orquesta_runner/orquesta_runner.py | shusugmt/st2 | 31da26badfb4ca3fb3e8cae07cfeec4791191afd | [
"Apache-2.0"
] | null | null | null | contrib/runners/orquesta_runner/orquesta_runner/orquesta_runner.py | shusugmt/st2 | 31da26badfb4ca3fb3e8cae07cfeec4791191afd | [
"Apache-2.0"
] | null | null | null | contrib/runners/orquesta_runner/orquesta_runner/orquesta_runner.py | shusugmt/st2 | 31da26badfb4ca3fb3e8cae07cfeec4791191afd | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 34.670455 | 100 | 0.655359 |
3bf869d6b029d3db6511ef3b0cc44b0dfe77f28e | 2,503 | py | Python | eing_script/watch_user_likers_stories.py | zeing/instabot | 1b605a102c51f714ba8e1613b5d416b150cdcaab | [
"Apache-2.0"
] | null | null | null | eing_script/watch_user_likers_stories.py | zeing/instabot | 1b605a102c51f714ba8e1613b5d416b150cdcaab | [
"Apache-2.0"
] | null | null | null | eing_script/watch_user_likers_stories.py | zeing/instabot | 1b605a102c51f714ba8e1613b5d416b150cdcaab | [
"Apache-2.0"
] | null | null | null | """
Watch user likers stories!
This script could be very useful to attract someone's audience to your account.
If you will not specify the user_id, the script will use your likers as targets.
Dependencies:
pip install -U instabot
Notes:
You can change file and add there your comme... | 32.506494 | 106 | 0.629245 |
51412f326ec24c2759655675f9ea8bb942b9b360 | 5,037 | py | Python | app/mlp/model.py | jingjieli95/UnarySim | 775b38fa2d6b05a69fd73acb4766e50200a5cc37 | [
"MIT"
] | 17 | 2020-04-26T19:38:03.000Z | 2022-02-23T02:05:08.000Z | app/mlp/model.py | pan185/UnarySim | c03386efdbb8151f3c33f34b44d1d6a6fc960434 | [
"MIT"
] | 3 | 2021-11-03T18:20:29.000Z | 2022-02-11T16:30:16.000Z | app/mlp/model.py | pan185/UnarySim | c03386efdbb8151f3c33f34b44d1d6a6fc960434 | [
"MIT"
] | 9 | 2019-12-03T05:08:55.000Z | 2022-01-04T20:24:55.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import math
class LeNet(nn.Module):
"""
This is a standard LeNet
"""
def __init__(self):
super(LeNet, self).__init__()
# 1 input image channel, 6 output channels, 5x5 square convolution
# kernel
self.conv... | 32.288462 | 74 | 0.554695 |
6642d52218a634cc49a1043b4911628c17cef4d7 | 1,706 | py | Python | hard/1316-distinct-echo-substrings.py | wanglongjiang/leetcode | c61d2e719e81575cfb5bde9d64e15cee7cf01ef3 | [
"MIT"
] | 2 | 2021-03-14T11:38:26.000Z | 2021-03-14T11:38:30.000Z | hard/1316-distinct-echo-substrings.py | wanglongjiang/leetcode | c61d2e719e81575cfb5bde9d64e15cee7cf01ef3 | [
"MIT"
] | null | null | null | hard/1316-distinct-echo-substrings.py | wanglongjiang/leetcode | c61d2e719e81575cfb5bde9d64e15cee7cf01ef3 | [
"MIT"
] | 1 | 2022-01-17T19:33:23.000Z | 2022-01-17T19:33:23.000Z | '''
不同的循环子字符串
给你一个字符串 text ,请你返回满足下述条件的 不同 非空子字符串的数目:
可以写成某个字符串与其自身相连接的形式(即,可以写为 a + a,其中 a 是某个字符串)。
例如,abcabc 就是 abc 和它自身连接形成的。
示例 1:
输入:text = "abcabcabc"
输出:3
解释:3 个子字符串分别为 "abcabc","bcabca" 和 "cabcab" 。
示例 2:
输入:text = "leetcodeleetcode"
输出:2
解释:2 个子字符串为 "ee" 和 "leetcodeleetcode" 。
提示:
1 <= text.lengt... | 25.462687 | 109 | 0.573857 |
21643ce67bde80b06e876207064fa2deae575f23 | 962 | py | Python | lite/api/python/__init__.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | 808 | 2018-04-17T17:43:12.000Z | 2019-08-18T07:39:13.000Z | lite/api/python/__init__.py | 714627034/Paddle-Lite | 015ba88a4d639db0b73603e37f83e47be041a4eb | [
"Apache-2.0"
] | 728 | 2018-04-18T08:15:25.000Z | 2019-08-16T07:14:43.000Z | lite/api/python/__init__.py | yingshengBD/Paddle-Lite | eea59b66f61bb2acad471010c9526eeec43a15ca | [
"Apache-2.0"
] | 364 | 2018-04-18T17:05:02.000Z | 2019-08-18T03:25:38.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 37 | 74 | 0.725572 |
0f7826cdf7e89d01f40df9f7d0f5825b7f2df0e6 | 1,539 | py | Python | deepspeech/frontend/augmentor/base.py | ZeyuChen/DeepSpeech | 1539f3e0a378a3a57ad485e4d6d4650d70b7527d | [
"Apache-2.0"
] | 2 | 2021-11-16T03:18:20.000Z | 2021-12-11T08:31:00.000Z | deepspeech/frontend/augmentor/base.py | chechuangwai008/DeepSpeech | 258307df9ba9006620f0841507ee6eefc975588b | [
"Apache-2.0"
] | null | null | null | deepspeech/frontend/augmentor/base.py | chechuangwai008/DeepSpeech | 258307df9ba9006620f0841507ee6eefc975588b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.977273 | 77 | 0.721897 |
8607980679cc73afa923945411e09e145a4b3948 | 5,934 | py | Python | sdk/python/pulumi_okta/template/email.py | brinnehlops/pulumi-okta | 798be92b13233d23736016b7ae78f256d5c95c06 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_okta/template/email.py | brinnehlops/pulumi-okta | 798be92b13233d23736016b7ae78f256d5c95c06 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_okta/template/email.py | brinnehlops/pulumi-okta | 798be92b13233d23736016b7ae78f256d5c95c06 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from .. import ... | 40.643836 | 148 | 0.622346 |
38939741c0c62f820d85840e07b3798190b9f7da | 7,106 | py | Python | big.py | spectertian/baidu | 30f7851996ec71b7732a8262303c74b6241fb945 | [
"Apache-2.0"
] | null | null | null | big.py | spectertian/baidu | 30f7851996ec71b7732a8262303c74b6241fb945 | [
"Apache-2.0"
] | 1 | 2020-03-13T01:13:30.000Z | 2020-03-13T01:13:30.000Z | big.py | spectertian/baidu | 30f7851996ec71b7732a8262303c74b6241fb945 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
import time
import pickle
import urllib.request
imp... | 28.886179 | 101 | 0.648044 |
873ff6f309f57d56159e8a06d46a66ff22f02c31 | 3,357 | py | Python | datamart/materializers/tradingeconomics_materializer.py | cybergla/datamart | ba377b2d2a25acb8efe8e636b2c6579d3863713f | [
"MIT"
] | null | null | null | datamart/materializers/tradingeconomics_materializer.py | cybergla/datamart | ba377b2d2a25acb8efe8e636b2c6579d3863713f | [
"MIT"
] | null | null | null | datamart/materializers/tradingeconomics_materializer.py | cybergla/datamart | ba377b2d2a25acb8efe8e636b2c6579d3863713f | [
"MIT"
] | null | null | null | from datamart.materializers.materializer_base import MaterializerBase
import pandas as pd
import typing
import os
import sys
import traceback
import datetime
import shutil
LOCATION_COLUMN_INDEX = 0
class TradingEconomicsMaterializer(MaterializerBase):
"""TradingEconomicsMaterializer class extended from Materia... | 33.909091 | 101 | 0.547513 |
a037532adb81913a9a6ef864153909d096e04242 | 10,921 | py | Python | lib/ansible/modules/cloud/alicloud/ali_rds_instance_info.py | talenhao/alibaba.alicloud | 86dff1d4bc6177f9f07054d8fd4cd159a48c356a | [
"Apache-2.0"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | lib/ansible/modules/cloud/alicloud/ali_rds_instance_info.py | talenhao/alibaba.alicloud | 86dff1d4bc6177f9f07054d8fd4cd159a48c356a | [
"Apache-2.0"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | lib/ansible/modules/cloud/alicloud/ali_rds_instance_info.py | talenhao/alibaba.alicloud | 86dff1d4bc6177f9f07054d8fd4cd159a48c356a | [
"Apache-2.0"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin <heguimin36@163.com.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it a... | 32.120588 | 100 | 0.586759 |
07b5b3b13cdc508fbe200252fd32793f35a5cdc6 | 8,507 | py | Python | shotfirst/program.py | thekad/shotfirst | b370e1cf06b597b26d94a85d5b493c03e31221d4 | [
"BSD-2-Clause"
] | null | null | null | shotfirst/program.py | thekad/shotfirst | b370e1cf06b597b26d94a85d5b493c03e31221d4 | [
"BSD-2-Clause"
] | null | null | null | shotfirst/program.py | thekad/shotfirst | b370e1cf06b597b26d94a85d5b493c03e31221d4 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- mode:python; sh-basic-offset:4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim:set tabstop=4 softtabstop=4 expandtab shiftwidth=4 fileencoding=utf-8:
#
import shotfirst
import fnmatch
import hashlib
import importlib
import json
import logging
import mimetypes
import multiprocessing
import os... | 30.934545 | 88 | 0.564359 |
096299711f15d4da03484fac16c3a7353b1c36c6 | 1,468 | py | Python | Blue_Yellow/Blue_Yellow/controllers/account_controller.py | smitsgit/tptm | aaad05e75772795dbb9e16f2ff80196d9069908e | [
"Apache-2.0"
] | null | null | null | Blue_Yellow/Blue_Yellow/controllers/account_controller.py | smitsgit/tptm | aaad05e75772795dbb9e16f2ff80196d9069908e | [
"Apache-2.0"
] | null | null | null | Blue_Yellow/Blue_Yellow/controllers/account_controller.py | smitsgit/tptm | aaad05e75772795dbb9e16f2ff80196d9069908e | [
"Apache-2.0"
] | null | null | null | import pyramid_handlers
import Blue_Yellow.controllers.base_controller as base
from Blue_Yellow.viewmodel.register_view_model import RegisterViewModel
class AccountController(base.BaseController):
@pyramid_handlers.action(renderer='templates/account/index.pt')
def index(self):
return {}
@pyramid... | 33.363636 | 101 | 0.63079 |
5e055ec9f7c53f43a10adf7322172d87483e8f04 | 114 | py | Python | src/api/__main__.py | CarlosAMolina/logs-analyzer | b381d0c7ae4c5a8b6911d2b7019baa74208192c6 | [
"MIT"
] | null | null | null | src/api/__main__.py | CarlosAMolina/logs-analyzer | b381d0c7ae4c5a8b6911d2b7019baa74208192c6 | [
"MIT"
] | null | null | null | src/api/__main__.py | CarlosAMolina/logs-analyzer | b381d0c7ae4c5a8b6911d2b7019baa74208192c6 | [
"MIT"
] | null | null | null | from . import app
from . import config
if __name__ == "__main__":
app.app.run(port=config.PORT, debug=True)
| 16.285714 | 45 | 0.692982 |
b2b2a03561b2c107517fb6fd14c18a1db29e4d0f | 11,335 | py | Python | library/nsxt_upgrade_run.py | lcamarda/nsxtlivefire-v2t | a95cbf25306aee6c115c510a48260b40b38f6be5 | [
"BSD-2-Clause"
] | 6 | 2020-03-25T16:49:52.000Z | 2020-04-11T16:01:35.000Z | library/nsxt_upgrade_run.py | lcamarda/nsxtlivefire-v2t | a95cbf25306aee6c115c510a48260b40b38f6be5 | [
"BSD-2-Clause"
] | 3 | 2020-03-26T19:30:15.000Z | 2020-04-16T22:17:24.000Z | library/nsxt_upgrade_run.py | lcamarda/nsxtlivefire-v2t | a95cbf25306aee6c115c510a48260b40b38f6be5 | [
"BSD-2-Clause"
] | 2 | 2020-03-25T23:49:30.000Z | 2020-03-26T21:52:23.000Z | #!/usr/bin/env python
#
# Copyright 2019 VMware, Inc.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL... | 40.773381 | 136 | 0.649404 |
52ab83512618a8cfddf4aacf2e3f6ccf8b1b792a | 15,989 | py | Python | tools/analyze.py | fanbeatsman/interactive-viewer | b2561b394656fcfd125611553ab56efd3beae0f2 | [
"MIT"
] | null | null | null | tools/analyze.py | fanbeatsman/interactive-viewer | b2561b394656fcfd125611553ab56efd3beae0f2 | [
"MIT"
] | null | null | null | tools/analyze.py | fanbeatsman/interactive-viewer | b2561b394656fcfd125611553ab56efd3beae0f2 | [
"MIT"
] | null | null | null | from __future__ import print_function
"""
A script to analyze performance by comparing images
using different metrics. To be used in conjuction
with Jeri in-browser visualization tool.
"""
import glob
import os, sys
import argparse
import pyexr
import numpy as np
import cv2
import matplotlib.pyplot as plt
from PIL ... | 39.09291 | 165 | 0.596285 |
4f9e6fd266066ce6af299c9d41be3207b4ffa0ec | 5,082 | py | Python | test/functional/rpc_whitelist.py | Saurabgami977/Matilda | 03372a57ca5d18228a48b6ec221fd2323ca58ceb | [
"MIT"
] | 1 | 2021-05-27T03:43:08.000Z | 2021-05-27T03:43:08.000Z | test/functional/rpc_whitelist.py | Saurabgami977/Matilda | 03372a57ca5d18228a48b6ec221fd2323ca58ceb | [
"MIT"
] | null | null | null | test/functional/rpc_whitelist.py | Saurabgami977/Matilda | 03372a57ca5d18228a48b6ec221fd2323ca58ceb | [
"MIT"
] | 1 | 2021-08-06T05:18:10.000Z | 2021-08-06T05:18:10.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2019 The Matilda Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
A test for RPC users with restricted permissions
"""
from test_framework.test_framework import Matilda... | 50.316832 | 184 | 0.653483 |
8131524769fa25681622f3f9b33ad4e370413069 | 5,157 | py | Python | e_invoice/hooks.py | the-bantoo/e_invoice | 2280900687f8789d310902f2537a62c57b02606f | [
"MIT"
] | null | null | null | e_invoice/hooks.py | the-bantoo/e_invoice | 2280900687f8789d310902f2537a62c57b02606f | [
"MIT"
] | null | null | null | e_invoice/hooks.py | the-bantoo/e_invoice | 2280900687f8789d310902f2537a62c57b02606f | [
"MIT"
] | null | null | null | from . import __version__ as app_version
app_name = "e_invoice"
app_title = "E Invoice"
app_publisher = "Bantoo"
app_description = "Adds QR Code to Invoices"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "devs@thebantoo.com"
app_license = "MIT"
# Includes in <head>
# ------------------
#... | 21.944681 | 108 | 0.651348 |
b674d4ccac63e074535de4e2b0adc9473a4d18ed | 140 | py | Python | code/DRAS/PG/cqsim_path.py | lothus/COMP5704 | 6b6d06bf69c82261ae02273a7d4a5dffac35bd75 | [
"MIT"
] | 13 | 2019-04-23T05:19:21.000Z | 2021-12-24T07:19:22.000Z | code/DRAS/PG/cqsim_path.py | lothus/COMP5704 | 6b6d06bf69c82261ae02273a7d4a5dffac35bd75 | [
"MIT"
] | 2 | 2020-12-28T10:01:41.000Z | 2021-03-02T16:54:13.000Z | code/DRAS/PG/cqsim_path.py | lothus/COMP5704 | 6b6d06bf69c82261ae02273a7d4a5dffac35bd75 | [
"MIT"
] | 4 | 2018-09-19T19:52:48.000Z | 2021-12-04T11:58:47.000Z | import sys
path_cqsim="/workspace/Cqsim/"
path_src=path_cqsim+"src"
path_config="Config/"
path_data="../"+"data/"
sys.path.append(path_src)
| 20 | 30 | 0.75 |
5a154a84834b352d0244513c84bf50df18816b79 | 20,134 | py | Python | tricolo/metrics/eval_retrieval.py | AditiJain14/tricolo | b6341737b577695d30a33bbc74111843f5935254 | [
"MIT"
] | null | null | null | tricolo/metrics/eval_retrieval.py | AditiJain14/tricolo | b6341737b577695d30a33bbc74111843f5935254 | [
"MIT"
] | null | null | null | tricolo/metrics/eval_retrieval.py | AditiJain14/tricolo | b6341737b577695d30a33bbc74111843f5935254 | [
"MIT"
] | null | null | null | import argparse
import collections
import datetime
import json
import numpy as np
import os
import pickle
import jsonlines
import tricolo.utils.render as render
def construct_embeddings_matrix(dataset, embeddings_dict, model_id_to_label=None,
label_to_model_id=None):
"""Construct ... | 44.742222 | 171 | 0.659829 |
3a37bf16c4512214de12b2b820b6706941c7da17 | 285 | py | Python | Chap06Recursion/1-7-1.递归求斐波那契数列时间.py | royqh1979/programming_with_python | 7e1e8f88381151b803b6ae6ebda9809d9cc6664a | [
"MIT"
] | 5 | 2019-03-06T12:28:47.000Z | 2022-01-06T14:06:02.000Z | Chap06Recursion/1-7-1.递归求斐波那契数列时间.py | royqh1979/programming_with_python | 7e1e8f88381151b803b6ae6ebda9809d9cc6664a | [
"MIT"
] | 6 | 2021-02-02T22:40:49.000Z | 2022-03-12T00:27:54.000Z | Chap06Recursion/1-7-1.递归求斐波那契数列时间.py | royqh1979/programming_with_python | 7e1e8f88381151b803b6ae6ebda9809d9cc6664a | [
"MIT"
] | 4 | 2019-03-06T14:29:25.000Z | 2020-06-02T15:16:40.000Z | from time import perf_counter
def fibonacci(n):
if n<=2:
return 1
return fibonacci(n-1)+fibonacci(n-2)
n=int(input("请输入n:"))
start_time = perf_counter()
result = fibonacci(n)
end_time = perf_counter()
print(f"斐波那契数列的第{n}项为{result}")
print(f"用时{end_time-start_time}秒") | 21.923077 | 40 | 0.698246 |
e96997648a68cf1cab05fa7678f2157352f831a8 | 2,014 | py | Python | src/python/spawn-readme.py | mtkhawaja/utility-scripts | 35147faab1e82010e45ff09d5fcd6f80e5bf0a58 | [
"Apache-2.0"
] | null | null | null | src/python/spawn-readme.py | mtkhawaja/utility-scripts | 35147faab1e82010e45ff09d5fcd6f80e5bf0a58 | [
"Apache-2.0"
] | null | null | null | src/python/spawn-readme.py | mtkhawaja/utility-scripts | 35147faab1e82010e45ff09d5fcd6f80e5bf0a58 | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentParser
from sys import exit
from string import Template
from os import error, path
from decouple import config
def read_source(source_path):
source_text = ""
if not path.exists(source_path):
raise FileNotFoundError("Source File Not found")
with open(source_path, "r") a... | 27.216216 | 111 | 0.690665 |
e52ccd6793344094cc17ac00e05b6ee5432397b5 | 2,615 | py | Python | jsprettier/const.py | davidhq/SublimeJsPrettier | acb17f023c00c07320fad26a9b12ec7329f5dfbd | [
"MIT"
] | null | null | null | jsprettier/const.py | davidhq/SublimeJsPrettier | acb17f023c00c07320fad26a9b12ec7329f5dfbd | [
"MIT"
] | null | null | null | jsprettier/const.py | davidhq/SublimeJsPrettier | acb17f023c00c07320fad26a9b12ec7329f5dfbd | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import os
import re
from sys import version_info
import sublime
IS_PY2 = version_info[0] == 2
IS_ST3 = int(sublime.version()) >= 3000
PLUGIN_NAME = 'JsPrettier'
PLUGIN_CMD_NAME = 'js_prettier'
PROJECT_SETTINGS_KEY = PLUGIN_CMD_NAME
SETTIN... | 20.429688 | 96 | 0.523136 |
2e6d43f3f84c279095c4ba15b73799c073590c00 | 10,510 | py | Python | src/networkx/algorithms/coloring/tests/test_coloring.py | MarletteFunding/aws-kube-codesuite | ab4e5ce45416b83bffb947ab8d234df5437f4fca | [
"Apache-2.0"
] | 184 | 2017-12-20T21:50:06.000Z | 2022-03-19T13:24:58.000Z | src/networkx/algorithms/coloring/tests/test_coloring.py | MarletteFunding/aws-kube-codesuite | ab4e5ce45416b83bffb947ab8d234df5437f4fca | [
"Apache-2.0"
] | 26 | 2020-03-24T18:07:06.000Z | 2022-03-12T00:12:27.000Z | src/networkx/algorithms/coloring/tests/test_coloring.py | MarletteFunding/aws-kube-codesuite | ab4e5ce45416b83bffb947ab8d234df5437f4fca | [
"Apache-2.0"
] | 136 | 2018-01-09T22:52:06.000Z | 2022-02-24T13:26:18.000Z | # -*- coding: utf-8 -*-
"""Greedy coloring test suite.
Run with nose: nosetests -v test_coloring.py
"""
__author__ = "\n".join(["Christian Olsson <chro@itu.dk>",
"Jan Aagaard Meier <jmei@itu.dk>",
"Henrik Haugbølle <hhau@itu.dk>",
"Jake VanderPla... | 23.407572 | 79 | 0.453568 |
c8b958ea566eca66506df775e37898689ed639c3 | 21,131 | py | Python | sympy/tensor/indexed.py | darknight009/sympy | 618193720b862a41aa295d474793cc12e4de2927 | [
"BSD-3-Clause"
] | 1 | 2017-04-27T15:45:41.000Z | 2017-04-27T15:45:41.000Z | sympy/tensor/indexed.py | darknight009/sympy | 618193720b862a41aa295d474793cc12e4de2927 | [
"BSD-3-Clause"
] | null | null | null | sympy/tensor/indexed.py | darknight009/sympy | 618193720b862a41aa295d474793cc12e4de2927 | [
"BSD-3-Clause"
] | 1 | 2021-12-31T12:31:28.000Z | 2021-12-31T12:31:28.000Z | """Module that defines indexed objects
The classes ``IndexedBase``, ``Indexed``, and ``Idx`` represent a
matrix element ``M[i, j]`` as in the following diagram::
1) The Indexed class represents the entire indexed object.
|
___|___
' '
M[i, j]
... | 31.398217 | 119 | 0.571104 |
f05a53173ad49edc9cc775e49e0884723a0aee59 | 3,886 | py | Python | examples/custom_attributes/active_column_defaults.py | lxl0928/timi_sqlalchemy | ebd3abc1e7bc23f211ef11ed05ef821233d066cc | [
"MIT"
] | 1 | 2021-09-04T18:25:05.000Z | 2021-09-04T18:25:05.000Z | examples/custom_attributes/active_column_defaults.py | lxl0928/timi_sqlalchemy | ebd3abc1e7bc23f211ef11ed05ef821233d066cc | [
"MIT"
] | null | null | null | examples/custom_attributes/active_column_defaults.py | lxl0928/timi_sqlalchemy | ebd3abc1e7bc23f211ef11ed05ef821233d066cc | [
"MIT"
] | 21 | 2017-11-13T13:23:27.000Z | 2019-10-07T02:00:52.000Z | """Illustrates use of the :meth:`.AttributeEvents.init_scalar`
event, in conjunction with Core column defaults to provide
ORM objects that automatically produce the default value
when an un-set attribute is accessed.
"""
from sqlalchemy import event
def configure_listener(mapper, class_):
"""Establish attribute... | 33.5 | 79 | 0.671642 |
ac53dcfa8e6974bd167b888d5c9162fecb399385 | 262 | py | Python | plugin_package/tasks.py | jmadtha/ce-cloudify | e7089ac12d154099da9c769c39fd919093d5d63d | [
"Apache-2.0"
] | null | null | null | plugin_package/tasks.py | jmadtha/ce-cloudify | e7089ac12d154099da9c769c39fd919093d5d63d | [
"Apache-2.0"
] | null | null | null | plugin_package/tasks.py | jmadtha/ce-cloudify | e7089ac12d154099da9c769c39fd919093d5d63d | [
"Apache-2.0"
] | null | null | null | from cloudify.decorators import operation
@operation
def write_to_file(**kwargs):
def write_to_file(**kwargs):
with open('/tmp/cloudify-plugin', 'w') as f:
f.write('This simple example gives you '
'the power to do amazing things.') | 29.111111 | 50 | 0.667939 |
61bd306c90b2ef24afade3fa6175ad353c87ee0c | 303 | py | Python | app/maintainer/search_indexes.py | Dhruv-Sachdev1313/macports-webapp | ed3d8efceac4cfb694a51241cf81023ed10aade6 | [
"BSD-2-Clause"
] | 39 | 2018-05-09T02:14:52.000Z | 2022-03-07T20:31:44.000Z | app/maintainer/search_indexes.py | Dhruv-Sachdev1313/macports-webapp | ed3d8efceac4cfb694a51241cf81023ed10aade6 | [
"BSD-2-Clause"
] | 337 | 2018-05-07T20:09:07.000Z | 2022-03-31T14:16:01.000Z | app/maintainer/search_indexes.py | Dhruv-Sachdev1313/macports-webapp | ed3d8efceac4cfb694a51241cf81023ed10aade6 | [
"BSD-2-Clause"
] | 28 | 2018-05-09T18:03:07.000Z | 2022-03-30T02:21:56.000Z | from haystack import indexes
from maintainer.models import Maintainer
class MaintainerIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
github = indexes.NgramField(model_attr='github')
def get_model(self):
return Maintainer
| 27.545455 | 62 | 0.772277 |
c3132f3ba8a03c59e577404197023ec0dfee7fab | 758 | py | Python | amy/autoemails/migrations/0010_auto_20200517_1803.py | code-review-doctor/amy | 268c1a199510457891459f3ddd73fcce7fe2b974 | [
"MIT"
] | 53 | 2015-01-10T17:39:19.000Z | 2019-06-12T17:36:34.000Z | amy/autoemails/migrations/0010_auto_20200517_1803.py | code-review-doctor/amy | 268c1a199510457891459f3ddd73fcce7fe2b974 | [
"MIT"
] | 1,176 | 2015-01-02T06:32:47.000Z | 2019-06-18T11:57:47.000Z | amy/autoemails/migrations/0010_auto_20200517_1803.py | code-review-doctor/amy | 268c1a199510457891459f3ddd73fcce7fe2b974 | [
"MIT"
] | 44 | 2015-01-03T15:08:56.000Z | 2019-06-09T05:33:08.000Z | # Generated by Django 2.2.10 on 2020-05-17 18:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('autoemails', '0009_auto_20200223_1407'),
]
operations = [
migrations.AlterField(
model_name='trigger',
name='action... | 39.894737 | 417 | 0.675462 |
d9d7e9844bec95c10027680241d4c25f145ea4f0 | 715 | py | Python | docs_src/extending_openapi/tutorial001.py | dmig/fastapi | 497e5e6257a282162a435b4d37f82d567fe73195 | [
"MIT"
] | null | null | null | docs_src/extending_openapi/tutorial001.py | dmig/fastapi | 497e5e6257a282162a435b4d37f82d567fe73195 | [
"MIT"
] | 1 | 2021-07-24T15:25:13.000Z | 2021-07-24T15:25:13.000Z | docs_src/extending_openapi/tutorial001.py | dmig/fastapi | 497e5e6257a282162a435b4d37f82d567fe73195 | [
"MIT"
] | 1 | 2021-01-30T14:29:30.000Z | 2021-01-30T14:29:30.000Z | from fastapi import FastAPI
from fastapi.openapi.utils import get_openapi
app = FastAPI()
@app.get("/items/")
async def read_items():
return [{"name": "Foo"}]
def custom_openapi(openapi_prefix: str):
if app.openapi_schema:
return app.openapi_schema
openapi_schema = get_openapi(
title="C... | 23.833333 | 75 | 0.668531 |
9952835951f7d24194d4f048e32278c0c2579e9d | 20,163 | py | Python | test/functional/test_runner.py | promag/bitcoin | acb11535cb8499fd47fdde7f52457f8945b58856 | [
"MIT"
] | 2 | 2019-06-10T03:16:20.000Z | 2021-11-27T16:02:52.000Z | test/functional/test_runner.py | promag/bitcoin | acb11535cb8499fd47fdde7f52457f8945b58856 | [
"MIT"
] | null | null | null | test/functional/test_runner.py | promag/bitcoin | acb11535cb8499fd47fdde7f52457f8945b58856 | [
"MIT"
] | 1 | 2019-05-13T08:06:54.000Z | 2019-05-13T08:06:54.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Run regression test suite.
This module calls down into individual test cases via subprocess. It will
f... | 38.479008 | 195 | 0.624411 |
3472eb6536460cb9645e49c2848ae4ab5191b64c | 12,492 | py | Python | src/python/turicreate/test/test_sarray_sketch.py | Bpowers4/turicreate | 73dad213cc1c4f74337b905baea2b3a1e5a0266c | [
"BSD-3-Clause"
] | 1 | 2020-02-21T02:24:45.000Z | 2020-02-21T02:24:45.000Z | src/python/turicreate/test/test_sarray_sketch.py | Bpowers4/turicreate | 73dad213cc1c4f74337b905baea2b3a1e5a0266c | [
"BSD-3-Clause"
] | 2 | 2019-03-28T00:17:14.000Z | 2019-03-28T00:17:47.000Z | src/python/turicreate/test/test_sarray_sketch.py | Bpowers4/turicreate | 73dad213cc1c4f74337b905baea2b3a1e5a0266c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
# This software may be modified and distributed under the terms
# of the BSD license... | 38.795031 | 88 | 0.59302 |
f3dd05c08ffe244ce7ff92ef88077e76cfd0d5b0 | 273 | py | Python | test/cuda/test_cuda.py | MECLabTUDA/QA_med_data | 72897cb2d8e520dde6b88318c23bca32eb9210d7 | [
"MIT"
] | 21 | 2021-07-08T13:09:48.000Z | 2022-02-28T07:17:24.000Z | test/cuda/test_cuda.py | camgbus/nnUNet_extensions | 2325d74047db354cf8b6d6d8241c52678a538eaa | [
"Apache-2.0"
] | 1 | 2021-08-02T14:08:43.000Z | 2021-09-01T16:01:28.000Z | test/cuda/test_cuda.py | camgbus/nnUNet_extensions | 2325d74047db354cf8b6d6d8241c52678a538eaa | [
"Apache-2.0"
] | 5 | 2021-11-11T13:22:59.000Z | 2022-02-27T12:35:03.000Z | import torch
def test_cuda():
nr_devices = torch.cuda.device_count()
assert nr_devices > 0
device = nr_devices-1 # Last device chosen
torch.cuda.set_device(device)
tensor = torch.zeros((2,3)).cuda()
assert str(tensor.device) == 'cuda:'+str(device) | 30.333333 | 52 | 0.677656 |
5108acb1844c700e625cb0993bfe1e5359c2d8c2 | 1,322 | py | Python | code/mne_website_example.py | hrayatnia/pycon | cba9b8236db228a74bef32cae55a3a190c77f29f | [
"BSD-2-Clause"
] | 1 | 2016-05-20T15:55:46.000Z | 2016-05-20T15:55:46.000Z | code/mne_website_example.py | hrayatnia/pycon | cba9b8236db228a74bef32cae55a3a190c77f29f | [
"BSD-2-Clause"
] | null | null | null | code/mne_website_example.py | hrayatnia/pycon | cba9b8236db228a74bef32cae55a3a190c77f29f | [
"BSD-2-Clause"
] | null | null | null | import mne
raw = mne.io.read_raw_fif('raw.fif', preload=True) # load data
raw.info['bads'] = ['MEG 2443', 'EEG 053'] # mark bad channels
raw.filter(l_freq=None, h_freq=40.0) # low-pass filter data
# Extract epochs and save them:
picks = mne.pick_types(raw.info, meg=True, eeg=True, eog=True,
... | 48.962963 | 67 | 0.633888 |
5b6fa976edad9cf1f5d9f6c6a58d0b82c0f2bd2c | 1,645 | py | Python | bot.py | innovistar/adf.ly-bot | e55692dcd15478f6d3535be82ca56e9eba58fc6e | [
"MIT"
] | 2 | 2021-12-08T15:50:32.000Z | 2022-02-18T05:06:30.000Z | bot.py | innovistar/adf.ly-bot | e55692dcd15478f6d3535be82ca56e9eba58fc6e | [
"MIT"
] | null | null | null | bot.py | innovistar/adf.ly-bot | e55692dcd15478f6d3535be82ca56e9eba58fc6e | [
"MIT"
] | 1 | 2021-11-16T01:56:39.000Z | 2021-11-16T01:56:39.000Z | from fp.fp import FreeProxy
from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy, ProxyType
import time
import os
# chrome_options = webdriver.ChromeOptions()
# chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")
# chrome_options.add_argument("--headless")
# chrome_options.... | 21.644737 | 102 | 0.693009 |
f8a11c4f39e185de1ecacf142771d723d3de3e72 | 355 | py | Python | tests/integration/numbers/v2/test_regulatory_compliance.py | BrimmingDev/twilio-python | 3226b5fed92b3c2ce64f03e6b19fc4792ef7647f | [
"MIT"
] | 1,362 | 2015-01-04T10:25:18.000Z | 2022-03-24T10:07:08.000Z | tests/integration/numbers/v2/test_regulatory_compliance.py | BrimmingDev/twilio-python | 3226b5fed92b3c2ce64f03e6b19fc4792ef7647f | [
"MIT"
] | 299 | 2015-01-30T09:52:39.000Z | 2022-03-31T23:03:02.000Z | tests/integration/numbers/v2/test_regulatory_compliance.py | BrimmingDev/twilio-python | 3226b5fed92b3c2ce64f03e6b19fc4792ef7647f | [
"MIT"
] | 622 | 2015-01-03T04:43:09.000Z | 2022-03-29T14:11:00.000Z | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class RegulatoryComplianceTestC... | 20.882353 | 56 | 0.695775 |
ffa01a02ca11120492e9b8272cf15d972ce774d7 | 1,277 | py | Python | categories/genericcollection.py | typh289/django-categories | c9eaf6426f7a5be8c236ab9d2860c611ee613196 | [
"Apache-2.0"
] | 211 | 2015-01-01T03:39:27.000Z | 2021-10-31T09:28:23.000Z | categories/genericcollection.py | typh289/django-categories | c9eaf6426f7a5be8c236ab9d2860c611ee613196 | [
"Apache-2.0"
] | 65 | 2015-01-07T22:55:24.000Z | 2021-11-28T14:15:50.000Z | categories/genericcollection.py | typh289/django-categories | c9eaf6426f7a5be8c236ab9d2860c611ee613196 | [
"Apache-2.0"
] | 100 | 2015-01-05T06:04:02.000Z | 2021-11-24T23:16:59.000Z | from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from django.urls import reverse, NoReverseMatch
import json
class GenericCollectionInlineModelAdmin(admin.options.InlineModelAdmin):
ct_field = "content_type"
ct_fk_field = "object_id"
def get_content_types(self):... | 34.513514 | 99 | 0.707909 |
148059bc48c9f3cd0f52681d4648beb0b2454ad5 | 603 | py | Python | nicos_mlz/nectar/setups/linearstage1.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_mlz/nectar/setups/linearstage1.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_mlz/nectar/setups/linearstage1.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | description = 'Additional linear stage'
group = 'optional'
tango_base = 'tango://nectarhw.nectar.frm2.tum.de:10000/nectar'
devices = dict(
linst1_m = device('nicos.devices.entangle.Motor',
tangodevice = tango_base + '/cam/fov',
abslimits = (0.0001, 900),
comtries = 3,
visibility =... | 25.125 | 63 | 0.573798 |
93a5b8199851d3d698f79f3a92cca105ee6e7811 | 1,047 | py | Python | pump.py | FanaticalFighter/pyRankine | 8fa42f803f5ba922c0414a7366eee6884010b169 | [
"MIT"
] | 2 | 2017-10-21T08:22:04.000Z | 2020-06-20T06:06:54.000Z | pump.py | FanaticalFighter/pyRankine | 8fa42f803f5ba922c0414a7366eee6884010b169 | [
"MIT"
] | null | null | null | pump.py | FanaticalFighter/pyRankine | 8fa42f803f5ba922c0414a7366eee6884010b169 | [
"MIT"
] | null | null | null | import iapws
class Pump():
"""
Pump class
Represents a pump in the Rankine cycle
"""
def __init__(self, inletState):
"""
Initializes the pump with the previous conditions
inletState: The state of the steam on the Pump's inlet.
Must be an IAPWS97 object
... | 26.846154 | 73 | 0.627507 |
b210315800bf8b357086679309671102f55a6c12 | 24,950 | py | Python | hypertag/hypertag.py | seedpcseed/HyperTag | 5fe0872e03b8ce81cdeca74b42424e5dbeedba28 | [
"MIT"
] | null | null | null | hypertag/hypertag.py | seedpcseed/HyperTag | 5fe0872e03b8ce81cdeca74b42424e5dbeedba28 | [
"MIT"
] | null | null | null | hypertag/hypertag.py | seedpcseed/HyperTag | 5fe0872e03b8ce81cdeca74b42424e5dbeedba28 | [
"MIT"
] | null | null | null | import os
import re
from typing import Set
from shutil import rmtree, move
import sqlite3
import urllib
import json
from multiprocessing import Pool
from pathlib import Path
import fire # type: ignore
from tqdm import tqdm # type: ignore
import rpyc # type: ignore
from pywebcopy import WebPage, config # type: ignor... | 39.106583 | 100 | 0.575351 |
b20fb347cb951a1961eadeb18a3a837a3f7c4ec1 | 585 | py | Python | K-means and EM/svm_model.py | QinganZhao/Introduction-to-Machine-Learning | 57edb519aaff3851e94c1917c9556180e0bb281a | [
"MIT"
] | 1 | 2019-01-08T02:53:51.000Z | 2019-01-08T02:53:51.000Z | K-means and EM/svm_model.py | QinganZhao/Machine-Learning | 57edb519aaff3851e94c1917c9556180e0bb281a | [
"MIT"
] | null | null | null | K-means and EM/svm_model.py | QinganZhao/Machine-Learning | 57edb519aaff3851e94c1917c9556180e0bb281a | [
"MIT"
] | null | null | null | from numpy.random import uniform
import random
import time
import matplotlib.pyplot as plt
import numpy as np
import numpy.linalg as LA
import sys
from sklearn.svm import LinearSVC
from projection import Project2D, Projections
class SVM_Model():
def __init__(self,class_labels,projection=None):
self.C = 1.0
... | 13.295455 | 49 | 0.717949 |
83caba4299402babad1b66f479a3913cb1191a64 | 1,768 | py | Python | docs/conf.py | murmuras-tech/plasma | 7883a6a1266b69ab49f353bdf9974be408bf0709 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | murmuras-tech/plasma | 7883a6a1266b69ab49f353bdf9974be408bf0709 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | murmuras-tech/plasma | 7883a6a1266b69ab49f353bdf9974be408bf0709 | [
"BSD-3-Clause"
] | null | null | null | import os
source_suffix = ['.rst']
project = 'Plasma'
copyright = '2020, Plasma Contributors'
author = 'Plasma Team'
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = 'v0.1'
# Enable MathJax for Math
extensions = ['sphinx.ext.mathjax',
'sphinx.ext.intersph... | 28.516129 | 77 | 0.692873 |
d5fd83e71b0a69e5b5085efd2d85145d789bf90d | 805 | py | Python | vendor-local/lib/python/django_browserid/tests/test_urls.py | jgmize/nucleus | 1fd9d069103b7be00f5815ae1f3eac6ba0e3530d | [
"BSD-3-Clause"
] | null | null | null | vendor-local/lib/python/django_browserid/tests/test_urls.py | jgmize/nucleus | 1fd9d069103b7be00f5815ae1f3eac6ba0e3530d | [
"BSD-3-Clause"
] | null | null | null | vendor-local/lib/python/django_browserid/tests/test_urls.py | jgmize/nucleus | 1fd9d069103b7be00f5815ae1f3eac6ba0e3530d | [
"BSD-3-Clause"
] | null | null | null | from django.core.urlresolvers import resolve
from django.test.client import RequestFactory
from django.utils.six.moves import reload_module
from mock import Mock
from django_browserid import urls
from django_browserid.tests import TestCase
MyVerifyClass = Mock()
class UrlTests(TestCase):
def setUp(self):
... | 27.758621 | 74 | 0.730435 |
d3851bcd5a839ec9a9ac12ec7be15a8aacdab56b | 2,243 | py | Python | test/samples/sample_test1.py | asifurrouf/Framework_Zopkio | a06e35a884cd26eedca0aac8ba6b9b40c417a01c | [
"Apache-2.0"
] | 138 | 2015-01-01T15:03:35.000Z | 2020-07-31T12:34:05.000Z | test/samples/sample_test1.py | LinkedInAttic/Zopkio | a06e35a884cd26eedca0aac8ba6b9b40c417a01c | [
"Apache-2.0"
] | 47 | 2015-01-05T17:41:01.000Z | 2016-07-01T19:51:33.000Z | test/samples/sample_test1.py | LinkedInAttic/Zopkio | a06e35a884cd26eedca0aac8ba6b9b40c417a01c | [
"Apache-2.0"
] | 41 | 2015-01-31T19:50:18.000Z | 2020-08-07T19:53:29.000Z | # Copyright 2014 LinkedIn Corp.
#
# 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.... | 27.691358 | 105 | 0.748551 |
eb16e469ae715710cd7e0382369ff06a166de087 | 12,758 | py | Python | django_backbone/contact/tests/test_viewsets.py | Jordan-Kowal/django-backbone | 19d123adf00b3f7d22e6ef75ba6da0fe7b5e00b0 | [
"MIT"
] | 1 | 2020-10-05T21:44:18.000Z | 2020-10-05T21:44:18.000Z | django_backbone/contact/tests/test_viewsets.py | Jordan-Kowal/django-backbone | 19d123adf00b3f7d22e6ef75ba6da0fe7b5e00b0 | [
"MIT"
] | null | null | null | django_backbone/contact/tests/test_viewsets.py | Jordan-Kowal/django-backbone | 19d123adf00b3f7d22e6ef75ba6da0fe7b5e00b0 | [
"MIT"
] | null | null | null | """Tests for the 'contact' app viewsets"""
# Built-in
from datetime import date, timedelta
from time import sleep
# Django
from django.core import mail
# Personal
from jklib.django.utils.settings import get_config
# Application
from core.tests import BaseActionTestCase
from security.models import NetworkRule
from u... | 38.896341 | 105 | 0.629723 |
38a0595826040b823d1f9c2b492bbe2367be087f | 3,770 | py | Python | sympy/abc.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | sympy/abc.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | sympy/abc.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | """
This module exports all latin and greek letters as Symbols, so you can
conveniently do
>>> from sympy.abc import x, y
instead of the slightly more clunky-looking
>>> from sympy import symbols
>>> x, y = symbols('x y')
Caveats
=======
1. As of the time of writing this, the names ``C``, ``O``, ``S``,... | 33.070175 | 80 | 0.667905 |
0c0bb57a1e79df62bcc882392325fcc8a89150f3 | 404 | py | Python | alfheimproject/wsgi.py | connorrunyan1/ragnarok | 4c8e7754a6b3c316da982d142f461775cc25d644 | [
"MIT"
] | 6 | 2018-08-11T14:52:40.000Z | 2021-01-06T01:39:15.000Z | alfheimproject/wsgi.py | connorrunyan1/ragnarok | 4c8e7754a6b3c316da982d142f461775cc25d644 | [
"MIT"
] | 10 | 2018-10-25T18:31:36.000Z | 2022-02-10T07:28:39.000Z | alfheimproject/wsgi.py | connorrunyan1/ragnarok | 4c8e7754a6b3c316da982d142f461775cc25d644 | [
"MIT"
] | 5 | 2018-10-25T19:41:07.000Z | 2020-07-11T09:26:50.000Z | """
WSGI config for alfheim_panel project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO... | 23.764706 | 78 | 0.792079 |
6e5b774529d390152ac2e13c986356ca2d3bea2b | 334 | py | Python | demo/categories/models.py | peopledoc/django-ltree-demo | 741de07db550bc8db1e7086ed8cb3d3c443ffe7d | [
"MIT"
] | 60 | 2017-12-21T13:37:38.000Z | 2022-02-18T16:05:30.000Z | demo/categories/models.py | peopledoc/django-ltree-demo | 741de07db550bc8db1e7086ed8cb3d3c443ffe7d | [
"MIT"
] | 4 | 2018-04-17T15:14:09.000Z | 2022-03-11T09:10:30.000Z | demo/categories/models.py | peopledoc/django-ltree-demo | 741de07db550bc8db1e7086ed8cb3d3c443ffe7d | [
"MIT"
] | 10 | 2018-08-02T08:34:59.000Z | 2022-01-14T17:30:10.000Z | from django.db import models
from .ltree import LtreeField
class Category(models.Model):
parent = models.ForeignKey('self', null=True, related_name='children',
on_delete=models.CASCADE)
code = models.CharField(max_length=32, unique=True)
name = models.TextField()
path =... | 27.833333 | 74 | 0.667665 |
22d9d819b86b9c107fde91f8795d966030b62da8 | 622 | py | Python | gpxconverter/__main__.py | linusyoung/GPXConverter | eaa0917fd08ba3c0b76b3983fb86219fffd15678 | [
"MIT"
] | null | null | null | gpxconverter/__main__.py | linusyoung/GPXConverter | eaa0917fd08ba3c0b76b3983fb86219fffd15678 | [
"MIT"
] | null | null | null | gpxconverter/__main__.py | linusyoung/GPXConverter | eaa0917fd08ba3c0b76b3983fb86219fffd15678 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import argparse
from converter import convert
def main():
args = sys.argv[1:]
parser = argparse.ArgumentParser(prog='gpxconvert')
parser.add_argument(
'-i',
nargs=1,
metavar='file path',
help='input file',
)
parser.add_argument(
... | 19.4375 | 55 | 0.585209 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.