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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
333d4e6e19021e92dec749996212398f877bff85 | 11,303 | py | Python | Attacks/l2_attack.py | minimario/CNN-Cert | 0dd60a8e8277cfecef3ab4d1ed055e62f92fd71c | [
"Apache-2.0"
] | 54 | 2020-09-09T12:43:43.000Z | 2022-03-17T17:31:19.000Z | Attacks/l2_attack.py | jinzh154/CNN-Cert | 0dd60a8e8277cfecef3ab4d1ed055e62f92fd71c | [
"Apache-2.0"
] | 9 | 2019-04-26T15:33:21.000Z | 2022-02-17T13:20:47.000Z | Attacks/l2_attack.py | jinzh154/CNN-Cert | 0dd60a8e8277cfecef3ab4d1ed055e62f92fd71c | [
"Apache-2.0"
] | 16 | 2019-02-17T03:02:36.000Z | 2021-05-17T13:59:07.000Z | ## l2_attack.py -- attack a network optimizing for l_2 distance
##
## Copyright (C) 2016, Nicholas Carlini <nicholas@carlini.com>.
##
## This program is licenced under the BSD 2-Clause licence,
## contained in the LICENCE file in this directory.
import sys
import tensorflow as tf
import numpy as np
BINARY_SEARCH_STEP... | 46.706612 | 302 | 0.602053 |
333d73bc0411f336cbd25291a6ab101a69df8834 | 4,801 | py | Python | src/modes/positionDefiner.py | Peviroy/PokemonHelper | 0f4d3d25a929ba03de9cf211a3dbd49a6c0d3a8b | [
"Apache-2.0"
] | null | null | null | src/modes/positionDefiner.py | Peviroy/PokemonHelper | 0f4d3d25a929ba03de9cf211a3dbd49a6c0d3a8b | [
"Apache-2.0"
] | 1 | 2021-06-08T22:09:42.000Z | 2021-06-08T22:09:42.000Z | src/modes/positionDefiner.py | Peviroy/PokemonHelper | 0f4d3d25a929ba03de9cf211a3dbd49a6c0d3a8b | [
"Apache-2.0"
] | null | null | null | """
@Author: peviroy
@Last Modified by: peviroy
@Last Modified time: 2020-09-24
@Note: Script for defining key areas or keyboard map
"""
from utils.jsonHandler import json_getter, json_saver, json_transformer
from utils.positionGetter import PositionGetter
class PostionDefiner():
'''
Constructor of positionDa... | 38.717742 | 93 | 0.566549 |
333e08c62b49b60b355dd46422054700ec4a5e6e | 3,347 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/_auto_rest_swagger_batxml_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/_auto_rest_swagger_batxml_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/legacy/Expected/AcceptanceTests/Xml/xmlservice/_auto_rest_swagger_batxml_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.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 ... | 37.606742 | 99 | 0.654019 |
333e17bdf0d888bbc9b72f3f41c0d588f1e51da1 | 452 | py | Python | modl/feature_extraction/setup.py | johnbanq/modl | dcabb6b4793db57b858221a1c184741255b6396d | [
"BSD-2-Clause"
] | 135 | 2016-05-04T01:52:44.000Z | 2022-03-01T18:38:13.000Z | modl/feature_extraction/setup.py | johnbanq/modl | dcabb6b4793db57b858221a1c184741255b6396d | [
"BSD-2-Clause"
] | 20 | 2016-06-03T12:53:27.000Z | 2020-05-12T22:35:52.000Z | modl/feature_extraction/setup.py | johnbanq/modl | dcabb6b4793db57b858221a1c184741255b6396d | [
"BSD-2-Clause"
] | 49 | 2016-05-09T02:48:04.000Z | 2022-03-01T18:40:55.000Z | from distutils.extension import Extension
import numpy
from Cython.Build import cythonize
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('feature_extraction', parent_package, top_path)
config.add_subpackage('tests')
re... | 25.111111 | 74 | 0.763274 |
333e1a95d0db278773d31c9b1b97758984d796d2 | 4,484 | py | Python | cases/constants.py | johngriebel/APDIncidentReports | 491b91bcc7eef9a32bda05ad3236b14748ba3b50 | [
"MIT"
] | null | null | null | cases/constants.py | johngriebel/APDIncidentReports | 491b91bcc7eef9a32bda05ad3236b14748ba3b50 | [
"MIT"
] | 16 | 2019-05-23T03:25:01.000Z | 2022-02-10T08:54:24.000Z | cases/constants.py | johngriebel/APDIncidentReports | 491b91bcc7eef9a32bda05ad3236b14748ba3b50 | [
"MIT"
] | null | null | null | from reportlab.rl_config import defaultPageSize
EMPTY_CHOICE = ("", "-------")
STATES = {
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
"DC": "District Of... | 25.191011 | 73 | 0.492194 |
333e2f4259e5c9daa7db7f34237404513e2c8d87 | 951 | py | Python | djangogeo/contrib/sites/migrations/0002_set_site_domain_and_name.py | savioabuga/django-geo | ea5cd51e6e5d6d2828c60e2178535031f42e4383 | [
"BSD-3-Clause"
] | 1 | 2018-08-17T20:02:35.000Z | 2018-08-17T20:02:35.000Z | djangogeo/contrib/sites/migrations/0002_set_site_domain_and_name.py | savioabuga/django-geo | ea5cd51e6e5d6d2828c60e2178535031f42e4383 | [
"BSD-3-Clause"
] | null | null | null | djangogeo/contrib/sites/migrations/0002_set_site_domain_and_name.py | savioabuga/django-geo | ea5cd51e6e5d6d2828c60e2178535031f42e4383 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import models, migrations
def update_site_forward(apps, schema_editor):
"""Set site domain and name."""
Site = apps.get_model("sites", "Site")
Site.objects.update_or_create(
id=settings... | 23.195122 | 72 | 0.615142 |
333e33d77ee800d4a7853e7421ab7d34c2e5729f | 19,811 | py | Python | grit/tool/android2grd.py | MIPS/external-chromium_org-tools-grit | 646f47f4f3b103f878faabfa7f8a4cd2860822a5 | [
"BSD-2-Clause"
] | 1 | 2017-08-06T01:12:23.000Z | 2017-08-06T01:12:23.000Z | tools/grit/grit/tool/android2grd.py | ufologist/qx | a2d64a337ecb2cd5752bd848afb2315c93e0fabe | [
"MIT"
] | null | null | null | tools/grit/grit/tool/android2grd.py | ufologist/qx | a2d64a337ecb2cd5752bd848afb2315c93e0fabe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""The 'grit android2grd' tool."""
import getopt
import os.path
import StringIO
from xml.dom import Node
import xml.dom.minidom
... | 39.622 | 80 | 0.652264 |
333e7f510b374d2e524f7065bb7f37117802aab1 | 4,562 | py | Python | ecto_rbo_yaml/src/plasm_yaml_ros_node.py | SoMa-Project/vision | ea8199d98edc363b2be79baa7c691da3a5a6cc86 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-07-24T23:40:01.000Z | 2020-07-24T23:40:01.000Z | ecto_rbo_yaml/src/plasm_yaml_ros_node.py | SoMa-Project/vision | ea8199d98edc363b2be79baa7c691da3a5a6cc86 | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2020-05-19T18:14:33.000Z | 2021-03-19T15:53:43.000Z | ecto_rbo_yaml/src/plasm_yaml_ros_node.py | SoMa-Project/vision | ea8199d98edc363b2be79baa7c691da3a5a6cc86 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | #!/usr/bin/env python
import argparse
import os
import rospkg
import sys
import threading
import ecto
import ecto_pcl
import ecto_rbo_pcl
import ecto_ros
import numpy as np
import plasm_yaml_factory
import rospy
from geometry_graph_msgs.msg import Graph
from geometry_graph_msgs.msg import ObjectList
from geometry_msgs... | 34.824427 | 125 | 0.673389 |
333e9f82ad79e7e5540009245d4e66934edc7e69 | 754 | py | Python | client/verta/verta/_swagger/_public/modeldb/model/ModeldbUpdateProjectAttributes.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbUpdateProjectAttributes.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbUpdateProjectAttributes.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ModeldbUpdateProjectAttributes(BaseType):
def __init__(self, id=None, attribute=None):
required = {
"id": False,
"attribute": False,
}
self.id = id
self.attribute = attribute
for k, v in re... | 24.322581 | 62 | 0.648541 |
333eb325a2d642dbd7b62c06e1f0d8157a4a9502 | 1,839 | py | Python | paper_downloader/downloader/science_hub.py | Syhen/paper-downloader | b2a6c66bbdf2cc9d9c618973ba1a404ed7776e05 | [
"MIT"
] | null | null | null | paper_downloader/downloader/science_hub.py | Syhen/paper-downloader | b2a6c66bbdf2cc9d9c618973ba1a404ed7776e05 | [
"MIT"
] | null | null | null | paper_downloader/downloader/science_hub.py | Syhen/paper-downloader | b2a6c66bbdf2cc9d9c618973ba1a404ed7776e05 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
create on 2021-01-01 15:42
author @66492
"""
import json
from urllib import parse as urlparse
from lxml import etree
from paper_downloader import exceptions
from paper_downloader.agent.webvpn import WebVPNAgent
from paper_downloader.downloader.base import BaseDownloader
from paper_download... | 36.78 | 103 | 0.692768 |
333ec97247f33e63d2987fc1db3445faa501b682 | 4,099 | py | Python | tests/test_commands.py | luiscberrocal/django-acp-calendar | 7251d7cbb1ba16983bbc3ba9af6178eb31408bee | [
"BSD-3-Clause"
] | 1 | 2016-10-05T05:17:35.000Z | 2016-10-05T05:17:35.000Z | tests/test_commands.py | luiscberrocal/django-acp-calendar | 7251d7cbb1ba16983bbc3ba9af6178eb31408bee | [
"BSD-3-Clause"
] | 17 | 2016-09-30T13:43:20.000Z | 2021-06-10T20:44:40.000Z | tests/test_commands.py | luiscberrocal/django-acp-calendar | 7251d7cbb1ba16983bbc3ba9af6178eb31408bee | [
"BSD-3-Clause"
] | 6 | 2016-04-11T14:41:44.000Z | 2017-10-20T21:16:39.000Z | import os
from io import StringIO
import environ
from django.core.management import call_command
from django.test import TestCase
from django.test import override_settings
from acp_calendar.initial_data import get_holidays_list
from acp_calendar.models import ACPHoliday, HolidayType
from .utils import add_date_to_fil... | 44.554348 | 112 | 0.677238 |
333ecec4db31cf44f113e9ee3c8726b56a374cd8 | 8,353 | py | Python | gamebasics.py | chvillap/JATC | 99e660a6129ebc0cd61127ba12d5ea95ed9a3109 | [
"MIT"
] | null | null | null | gamebasics.py | chvillap/JATC | 99e660a6129ebc0cd61127ba12d5ea95ed9a3109 | [
"MIT"
] | null | null | null | gamebasics.py | chvillap/JATC | 99e660a6129ebc0cd61127ba12d5ea95ed9a3109 | [
"MIT"
] | null | null | null | # -*- coding: utf-8
import pygame
#______________________________________________________________________________
class Game:
"""Basic game superclass.
A game is composed of multiple named and interchangeable scenes, where only
one is executed at a time. Most methods in this class just delegate tasks
... | 29.725979 | 83 | 0.608644 |
333ee3b93ce5dfea4ffd5e35fcc365a86c93fee7 | 13,348 | py | Python | cosmogrb/lightcurve/light_curve_storage.py | grburgess/cosmogrb | 55182f2223a329f598bcbc43448f3b0ae9f45448 | [
"BSD-2-Clause"
] | 3 | 2020-03-08T18:20:32.000Z | 2022-03-10T17:27:26.000Z | cosmogrb/lightcurve/light_curve_storage.py | grburgess/cosmogrb | 55182f2223a329f598bcbc43448f3b0ae9f45448 | [
"BSD-2-Clause"
] | 11 | 2020-03-04T17:21:15.000Z | 2020-06-09T12:20:00.000Z | cosmogrb/lightcurve/light_curve_storage.py | grburgess/cosmogrb | 55182f2223a329f598bcbc43448f3b0ae9f45448 | [
"BSD-2-Clause"
] | 5 | 2020-03-18T18:05:05.000Z | 2022-03-21T16:06:38.000Z | import collections
import logging
import matplotlib.pyplot as plt
import numba as nb
import numpy as np
import pandas as pd
from IPython.display import display
from cosmogrb.utils.logging import setup_logger
from cosmogrb.utils.plotting import channel_plot, step_plot
logger = setup_logger(__name__)
class LightCurv... | 21.153724 | 85 | 0.538283 |
333eeffd7199f515500d3629b4227cbd11b0be58 | 601 | py | Python | solutions/two-sum.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | solutions/two-sum.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | 1 | 2022-02-22T15:42:54.000Z | 2022-02-25T00:10:04.000Z | solutions/two-sum.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | # Leetcode 1. Two Sum
#
# Link: https://leetcode.com/problems/two-sum/
# Difficulty: Easy
# Solution using HashMap
# Complexity:
# O(N) time | where N represent the number of elements in the input array
# O(N) space | where N represent the number of elements in the input array
class Solution:
def twoSum(self,... | 28.619048 | 76 | 0.625624 |
333ef87cc205a7b1eda273a08f5bc8d6af700b0d | 76,123 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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.
# ---------------------------------------------------------------------... | 36.318225 | 117 | 0.291633 |
333f00f8bf825b47d4c666eeaf91c407e74c5523 | 1,323 | py | Python | river/datasets/water_flow.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/datasets/water_flow.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/datasets/water_flow.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | from river import stream
from . import base
class WaterFlow(base.FileDataset):
"""Water flow through a pipeline branch.
The series includes hourly values for about 2 months, March 2022 to May 2022. The values are
expressed in liters per second. There are four anomalous segments in the series:
* 3 "... | 33.923077 | 98 | 0.653061 |
333f45ea7a53f847aba284850cc0211d69100804 | 1,241 | py | Python | conduit/exceptions.py | coinotc/coinotc-py | 64c5b930b0f96874b0ae61da3d22f1a7bf57ad9f | [
"MIT"
] | null | null | null | conduit/exceptions.py | coinotc/coinotc-py | 64c5b930b0f96874b0ae61da3d22f1a7bf57ad9f | [
"MIT"
] | null | null | null | conduit/exceptions.py | coinotc/coinotc-py | 64c5b930b0f96874b0ae61da3d22f1a7bf57ad9f | [
"MIT"
] | 1 | 2020-04-06T22:52:16.000Z | 2020-04-06T22:52:16.000Z | from flask import jsonify
def template(data, code=500):
return {'message': {'errors': {'body': data}}, 'status_code': code}
USER_NOT_FOUND = template(['User not found'], code=404)
USER_ALREADY_REGISTERED = template(['User already registered'], code=422)
UKNOWN_ERROR = template([], code=500)
ARTICLE_NOT_FOUND = ... | 25.854167 | 73 | 0.674456 |
333f577ea08e440f75614b2305d1ea80910883ea | 218 | py | Python | Python-Study/Study/Day4/decorator1.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | Python-Study/Study/Day4/decorator1.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null | Python-Study/Study/Day4/decorator1.py | Qiaozhi94/Python-Projects | aefc6cf49c1f4f2cc9beba8dbe80cfa826ba75c4 | [
"MIT"
] | null | null | null |
import time
def bar():
time.sleep(2)
print("in the bar")
def test1(func):
start_time=time.time()
func()
stop_time=time.time()
print("running time: %s" %(stop_time-start_time))
test1(bar)
| 12.111111 | 53 | 0.614679 |
333f79f5c3df877b18056688c7c6b8fdb9f339a9 | 15,477 | py | Python | 0900-hp/hplip-3.21.12/upgrade.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/upgrade.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/upgrade.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) Copyright 2011-2015 HP Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (a... | 34.624161 | 167 | 0.623635 |
333f96d3b4009b2bcca6fa9bf1c2c0ec6f273c81 | 1,024 | py | Python | tests/regressiontests/forms/localflavor/pt.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | 4 | 2015-08-27T22:03:47.000Z | 2017-09-04T08:13:44.000Z | tests/regressiontests/forms/localflavor/pt.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/forms/localflavor/pt.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | 1 | 2020-01-04T14:51:18.000Z | 2020-01-04T14:51:18.000Z | from django.contrib.localflavor.pt.forms import PTZipCodeField, PTPhoneNumberField
from utils import LocalFlavorTestCase
class PTLocalFlavorTests(LocalFlavorTestCase):
def test_PTZipCodeField(self):
error_format = [u'Enter a zip code in the format XXXX-XXX.']
valid = {
'3030-034': '30... | 32 | 82 | 0.583008 |
333fbc8024a88f7a9417865b36e5175372d8d53f | 9,774 | py | Python | grower/grower.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | grower/grower.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | grower/grower.py | ftrimble/route-grower | d4343ecc9b13a3e1701c8460c8a1792d08b74567 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2
#
################################################################################
#
# Cycles for cycling using OSM data and extending pyroutelib2.
#
################################################################################
#
# Copyright 2013, Forest Trimble
#
# This program is free software: ... | 32.045902 | 81 | 0.58318 |
3340116f4a02d225feb49752ca87eb23ce9acc8f | 10,106 | py | Python | nni/retiarii/nn/pytorch/component.py | Microsoft/nni | b99e26833287c901f6d808d07ea6882014b05f58 | [
"MIT"
] | 2,305 | 2018-09-07T12:42:26.000Z | 2019-05-06T20:14:24.000Z | nni/retiarii/nn/pytorch/component.py | Eurus-Holmes/nni | 45af1d6b79b355d3e013f1eae2f4c193bbd84074 | [
"MIT"
] | 379 | 2018-09-10T10:19:50.000Z | 2019-05-06T18:04:46.000Z | nni/retiarii/nn/pytorch/component.py | Eurus-Holmes/nni | 45af1d6b79b355d3e013f1eae2f4c193bbd84074 | [
"MIT"
] | 314 | 2018-09-08T05:36:08.000Z | 2019-05-06T08:48:51.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
import warnings
from collections import OrderedDict
from typing import Callable, List, Dict, Union, Tuple, Optional
import torch
import torch.nn as nn
from nni.retiarii.utils import NoContextError, STATE_DICT_PY_MAPPING_PARTIAL
fro... | 42.822034 | 140 | 0.62072 |
3340127f28c01c8d2e2323f9edfa8c2ced10de57 | 318 | py | Python | npu/core/__init__.py | xloem/npu | ed6da8599b04e9a5f2eded88d6c6ca433d46aa03 | [
"MIT"
] | null | null | null | npu/core/__init__.py | xloem/npu | ed6da8599b04e9a5f2eded88d6c6ca433d46aa03 | [
"MIT"
] | null | null | null | npu/core/__init__.py | xloem/npu | ed6da8599b04e9a5f2eded88d6c6ca433d46aa03 | [
"MIT"
] | null | null | null | from .compile import compile
from .common import check_data as upload_data
from .predict import predict
from .train import train
from .common import api
from .Dataset import Dataset
from .Model import Model, NLPHFModel, nlp_constructor
from .export import export, export_task_result
from .DataLoader import DataLoader
| 31.8 | 53 | 0.833333 |
334015fcc20d2e55fe07fa4a82f4db6487825f10 | 1,380 | py | Python | oscar/lib/python2.7/site-packages/isort/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/isort/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/isort/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """__init__.py.
Defines the isort module to include the SortImports utility class as well as any defined settings.
Copyright (C) 2013 Timothy Edmund Crosley
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to de... | 47.586207 | 113 | 0.785507 |
33403490bc948576ae2b9bd2a8e301dd49b86508 | 801 | py | Python | djangopeople/clusterlizard/utils/render.py | timgraham/djangopeople | de595ac8d7e8540871c282294a332a835ac0c177 | [
"MIT"
] | null | null | null | djangopeople/clusterlizard/utils/render.py | timgraham/djangopeople | de595ac8d7e8540871c282294a332a835ac0c177 | [
"MIT"
] | null | null | null | djangopeople/clusterlizard/utils/render.py | timgraham/djangopeople | de595ac8d7e8540871c282294a332a835ac0c177 | [
"MIT"
] | null | null | null |
import cairo
import sys
import os
import math
width, height = 600.0, 600.0
mx1, my1, mx2, my2 = [-20037508.34, 20037508.34, 20037508.34, -20037508.34]
mxr = mx2 - mx1
myr = my2 - my1
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
context = cairo.Context(surface)
def m_to_px(x, y):
return ((x ... | 21.648649 | 75 | 0.632959 |
334061826e11fdba0432b14b5e8024fe9c0b7453 | 15,435 | py | Python | build/lib/TEF/dfmeta.py | tll549/TEF | 8dc50b0d0966b782b04fcd9fc846c0756820782f | [
"MIT"
] | 2 | 2019-08-07T15:44:28.000Z | 2019-08-08T07:34:24.000Z | build/lib/TEF/dfmeta.py | tll549/TEF | 8dc50b0d0966b782b04fcd9fc846c0756820782f | [
"MIT"
] | null | null | null | build/lib/TEF/dfmeta.py | tll549/TEF | 8dc50b0d0966b782b04fcd9fc846c0756820782f | [
"MIT"
] | 1 | 2019-08-06T15:40:16.000Z | 2019-08-06T15:40:16.000Z | import numpy as np
import pandas as pd
import io
import re
import warnings
from scipy.stats import skew, skewtest
from scipy.stats import rankdata
from .plot_1var import *
# from plot_1var import * # for local testing only
from IPython.display import HTML
def print_list(l, br=', '):
o = ''
for e in l:
... | 41.380697 | 161 | 0.5299 |
3340e0ad603f8f003b251576b6b8169ed48070c5 | 2,743 | py | Python | homeassistant/components/ring/light.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/ring/light.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/ring/light.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """This component provides HA switch support for Ring Door Bell/Chimes."""
from datetime import timedelta
import logging
import requests
from homeassistant.components.light import Light
from homeassistant.core import callback
import homeassistant.util.dt as dt_util
from . import DOMAIN
from .entity import RingEntity... | 29.180851 | 87 | 0.671528 |
3340ea205b1c59c1a86688a561dbead46962672a | 1,868 | py | Python | tests/test_solid186.py | AdrlVmadriel/pyansys | 3f97f970546f7cdf1f301f683c9a6bdcd92357c2 | [
"MIT"
] | 1 | 2019-04-16T14:49:28.000Z | 2019-04-16T14:49:28.000Z | tests/test_solid186.py | AdrlVmadriel/pyansys | 3f97f970546f7cdf1f301f683c9a6bdcd92357c2 | [
"MIT"
] | null | null | null | tests/test_solid186.py | AdrlVmadriel/pyansys | 3f97f970546f7cdf1f301f683c9a6bdcd92357c2 | [
"MIT"
] | null | null | null | # import pytest
import numpy as np
import os
import pyansys
from pyansys import examples
test_path = os.path.dirname(os.path.abspath(__file__))
testfiles_path = os.path.join(test_path, 'testfiles', 'solid186')
class TestResultReader(object):
result = pyansys.open_result(examples.rstfile)
archive = pyansys.Arc... | 35.923077 | 68 | 0.678266 |
3340f478749080ae4fe1089c82e47d979bf9347f | 7,957 | py | Python | alipay/aop/api/domain/AlipayOpenMiniInnerversionQueryModel.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/domain/AlipayOpenMiniInnerversionQueryModel.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/domain/AlipayOpenMiniInnerversionQueryModel.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.constant.ParamConstants import *
class AlipayOpenMiniInnerversionQueryModel(object):
def __init__(self):
self._bundle_id = None
self._bundle_ids = None
self._first_sort_col = None
self._first_sort_col_o... | 35.681614 | 91 | 0.594068 |
3340f5c32748e85c57e1e4592d2538d7d043916e | 165 | py | Python | abc/146/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/146/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/146/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | N = int(input())
S = list(map(str, input()))
for i, c in enumerate(S):
next = chr(ord('A') + ((ord(c) - ord('A') + N) % 26))
S[i] = next
print("".join(S))
| 18.333333 | 57 | 0.484848 |
33411e63b6867cfc8c02e07912d72cc0a31f9143 | 1,053 | py | Python | src/api/main.py | HALLOWe3n/StockCompAPI | 696bd6e70d97ac7748a542ff3e95ce4347a198b0 | [
"MIT"
] | null | null | null | src/api/main.py | HALLOWe3n/StockCompAPI | 696bd6e70d97ac7748a542ff3e95ce4347a198b0 | [
"MIT"
] | null | null | null | src/api/main.py | HALLOWe3n/StockCompAPI | 696bd6e70d97ac7748a542ff3e95ce4347a198b0 | [
"MIT"
] | null | null | null | # Created by PyCharm Professional.
# User: romandemyanchuk
# Date: 11.06.2020
# Time: 19:17
# To change this template use File | Settings | File and Code Templates.
from fastapi import FastAPI
from src.api.db.queries.stocks import StockQueries
from src.api.v1.views import user, stocks
from src.api.db.base import Base... | 27.710526 | 75 | 0.735992 |
334126c0a5e1bb764e0b8b863afd8f9b100e1984 | 4,830 | py | Python | panoptes_aggregation/extractors/poly_line_text_extractor.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/extractors/poly_line_text_extractor.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/extractors/poly_line_text_extractor.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | '''
Polygon As Line Tool for Text Extractor
---------------------------------------
This module provides a fuction to eaxtract panoptes annotations
from porjects using a polygon tool to mark word in a transcribed
document and provide the transcribed text as a sub-task.
'''
from collections import OrderedDict
import cop... | 39.590164 | 88 | 0.469358 |
3341298fe46f58b68e013a4ae26f54b5b2e15aba | 2,261 | py | Python | sc-project/SC101_Assignment0/class_reviews.py | Allen5256/sc-projects | 7b6c161f18e32f64f6847b0de712ebffd50fb79c | [
"MIT"
] | null | null | null | sc-project/SC101_Assignment0/class_reviews.py | Allen5256/sc-projects | 7b6c161f18e32f64f6847b0de712ebffd50fb79c | [
"MIT"
] | null | null | null | sc-project/SC101_Assignment0/class_reviews.py | Allen5256/sc-projects | 7b6c161f18e32f64f6847b0de712ebffd50fb79c | [
"MIT"
] | null | null | null | """
File: class_reviews.py
Name: Allen Lee
-------------------------------
At the beginning of this program, the user is asked to input
the class name (either SC001 or SC101).
Attention: your program should be case-insensitive.
If the user input -1 for class name, your program would output
the maximum, minimum, and ave... | 32.3 | 130 | 0.542238 |
334130373fb3dcb19aa42ca7218ed6a758b8bf81 | 10,456 | py | Python | appengine/findit/libs/gitiles/gitiles_repository.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/libs/gitiles/gitiles_repository.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 16 | 2020-09-07T11:55:09.000Z | 2022-03-02T05:47:58.000Z | appengine/findit/libs/gitiles/gitiles_repository.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 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.
import base64
from datetime import datetime
import json
import re
import urllib
from google.appengine.api import app_identity
from libs.gitiles import comm... | 35.686007 | 80 | 0.675593 |
33415dcc4a8573fd58ccef5dc1f7e50c36c37ff8 | 8,901 | py | Python | src/biome/text/loggers.py | ignacioct/biome-text | e4eab5fd4ea9115bd600f61e97429977053da2a5 | [
"Apache-2.0"
] | null | null | null | src/biome/text/loggers.py | ignacioct/biome-text | e4eab5fd4ea9115bd600f61e97429977053da2a5 | [
"Apache-2.0"
] | null | null | null | src/biome/text/loggers.py | ignacioct/biome-text | e4eab5fd4ea9115bd600f61e97429977053da2a5 | [
"Apache-2.0"
] | null | null | null | import dataclasses
import logging
import os
from pathlib import Path
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from allennlp.training import EpochCallback
from allennlp.training import GradientDescentTrainer
from mlflow.entities import Experiment
from mlflow.tra... | 28.993485 | 107 | 0.614875 |
334168c2670394e02f4fef429d0354aa4b1bed33 | 27,141 | py | Python | neural_sp/bin/args_asr.py | Cescfangs/neural_sp | 2c12d25d2078d3dacdb80c5c367c2e90feba7b6c | [
"Apache-2.0"
] | null | null | null | neural_sp/bin/args_asr.py | Cescfangs/neural_sp | 2c12d25d2078d3dacdb80c5c367c2e90feba7b6c | [
"Apache-2.0"
] | null | null | null | neural_sp/bin/args_asr.py | Cescfangs/neural_sp | 2c12d25d2078d3dacdb80c5c367c2e90feba7b6c | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2018 Kyoto University (Hirofumi Inaguma)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""Args option for the ASR task."""
import configargparse
from distutils.util import strtobool
import os
from neural_sp.bin.train_utils import load_config
... | 60.718121 | 123 | 0.614826 |
334168c87005ca431a9fae8af30d6d1872bb8607 | 5,186 | py | Python | checkov/terraform/checks/resource/base_resource_value_check.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | 4,013 | 2019-12-09T13:16:54.000Z | 2022-03-31T14:31:01.000Z | checkov/terraform/checks/resource/base_resource_value_check.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | 1,258 | 2019-12-17T09:55:51.000Z | 2022-03-31T19:17:17.000Z | checkov/terraform/checks/resource/base_resource_value_check.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | 638 | 2019-12-19T08:57:38.000Z | 2022-03-30T21:38:37.000Z | from abc import abstractmethod
from typing import List, Dict, Any
import dpath.util
import re
from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
from checkov.common.models.enums import CheckResult, CheckCategories
from checkov.common.models.consts import ANY_VALUE
from checkov.common.u... | 43.216667 | 124 | 0.639799 |
33416dda842ec036f1a4a5a94de32dd7f7ab1339 | 723 | py | Python | backend/src/apiserver/visualization/types/tfma.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | backend/src/apiserver/visualization/types/tfma.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | backend/src/apiserver/visualization/types/tfma.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2019 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... | 40.166667 | 94 | 0.780083 |
3341acac7997b4ece6ffee13017808f7ce03e6be | 109,038 | py | Python | yaksh/views.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | 1 | 2022-03-21T11:14:17.000Z | 2022-03-21T11:14:17.000Z | yaksh/views.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | null | null | null | yaksh/views.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | null | null | null | import os
import csv
from django.http import HttpResponse, JsonResponse
from django.contrib.auth import login, logout, authenticate
from django.shortcuts import render, get_object_or_404, redirect
from django.template import Context, Template
from django.http import Http404
from django.db.models import Max, Q, F
from d... | 38.789755 | 81 | 0.625644 |
3341adaaf404e37ce92a739460be39d401c589f5 | 97 | py | Python | tests/stub/forms.py | everhide/everbug | 72da1372510a2116e45c23da934a40dca1f4dbd5 | [
"MIT"
] | 182 | 2018-06-15T07:07:11.000Z | 2021-06-15T21:53:58.000Z | tests/stub/forms.py | everhide/everbug | 72da1372510a2116e45c23da934a40dca1f4dbd5 | [
"MIT"
] | 7 | 2018-06-15T07:03:58.000Z | 2018-09-13T08:43:19.000Z | tests/stub/forms.py | everhide/everbug | 72da1372510a2116e45c23da934a40dca1f4dbd5 | [
"MIT"
] | 3 | 2018-06-15T20:44:51.000Z | 2018-09-12T19:05:39.000Z | from django import forms
class TestForm(forms.Form):
item = forms.CharField(max_length=30)
| 16.166667 | 41 | 0.752577 |
3341b1e0310ff536031d90eb5061e410a43b66f3 | 283 | py | Python | test/python/LIM2Metrics/py3/base/common/Python065/Python065.py | sagodiz/SonarQube-plug-in | 4f8e111baecc4c9f9eaa5cd3d7ebeb1e365ace2c | [
"BSD-4-Clause"
] | 20 | 2015-06-16T17:39:10.000Z | 2022-03-20T22:39:40.000Z | test/python/LIM2Metrics/py3/base/common/Python065/Python065.py | sagodiz/SonarQube-plug-in | 4f8e111baecc4c9f9eaa5cd3d7ebeb1e365ace2c | [
"BSD-4-Clause"
] | 29 | 2015-12-29T19:07:22.000Z | 2022-03-22T10:39:02.000Z | test/python/LIM2Metrics/py3/base/common/Python065/Python065.py | sagodiz/SonarQube-plug-in | 4f8e111baecc4c9f9eaa5cd3d7ebeb1e365ace2c | [
"BSD-4-Clause"
] | 12 | 2015-08-28T01:22:18.000Z | 2021-09-25T08:17:31.000Z | def f1():
x = 88
def f2():
print(x)
f2()
f1()
def f1():
x = 88
def f2(x=x):
print(x)
f2()
f1()
def func():
x = 4
action = (lambda n: x ** n) # x in enclosing def
return action
x = func()
print(x(2)) # prints 16
| 11.32 | 61 | 0.420495 |
3341c3c7601a08f9ddacfeaabadc6885b7949266 | 7,926 | py | Python | python/ray/tune/logger.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 1 | 2019-01-03T04:02:30.000Z | 2019-01-03T04:02:30.000Z | python/ray/tune/logger.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | null | null | null | python/ray/tune/logger.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import json
import logging
import numpy as np
import os
import yaml
import distutils.version
import ray.cloudpickle as cloudpickle
from ray.tune.log_sync import get_syncer
from ray.tune.result impor... | 30.72093 | 79 | 0.615569 |
3341e6006813825c06061b4e5f772b8d4096edcc | 5,733 | py | Python | feature_space_tree/attributes/postfilter_config.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | feature_space_tree/attributes/postfilter_config.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | feature_space_tree/attributes/postfilter_config.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# coding: utf-8
# Copyright (C) 2011-2012 FeatureSpaceTree Project
#
# 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
... | 45.5 | 146 | 0.685505 |
3341fe097ddfba790e9246e2a969483996a15b70 | 1,907 | py | Python | tests/envs/llvm/benchmark_semantics_validation_test.py | sparkingdark/CompilerGym | 48b4fda4bd336729f941ce932cd82d773fee6024 | [
"MIT"
] | 3 | 2021-02-25T17:51:27.000Z | 2021-05-23T10:33:28.000Z | tests/envs/llvm/benchmark_semantics_validation_test.py | soumith/CompilerGym | a5422ea856588107b257951383c1c821bcdf65da | [
"MIT"
] | null | null | null | tests/envs/llvm/benchmark_semantics_validation_test.py | soumith/CompilerGym | a5422ea856588107b257951383c1c821bcdf65da | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Integrations tests for the LLVM CompilerGym environments."""
import re
import sys
import tempfile
from pathlib import Path
from typing impor... | 30.758065 | 85 | 0.742003 |
334213e370d8ada64d440d66b3d9e305193fa9ad | 4,441 | py | Python | tests/resources/test_concept_net.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | 1 | 2021-11-03T19:11:11.000Z | 2021-11-03T19:11:11.000Z | tests/resources/test_concept_net.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | null | null | null | tests/resources/test_concept_net.py | tbsexton/textacy | 964614213c7261f91f09c106334269388d45f790 | [
"Apache-2.0"
] | 1 | 2022-02-20T14:23:03.000Z | 2022-02-20T14:23:03.000Z | import pytest
import textacy
import textacy.resources
RESOURCE = textacy.resources.ConceptNet()
pytestmark = pytest.mark.skipif(
RESOURCE.filepath is None,
reason="ConceptNet resource must be downloaded before running tests",
)
@pytest.fixture(scope="module")
def spacy_doc():
text = "The quick brown f... | 34.161538 | 89 | 0.626661 |
334264609145c673afd650a8e7d830ae93bedfc7 | 829 | py | Python | esst/atis/tts.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 4 | 2018-06-24T14:03:44.000Z | 2019-01-21T01:20:02.000Z | esst/atis/tts.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 106 | 2018-06-24T13:59:52.000Z | 2019-11-26T09:05:14.000Z | esst/atis/tts.py | theendsofinvention/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Manages TTS utilities
"""
import typing
from pathlib import Path
import gtts
from esst import LOGGER
def text_to_speech(text: str, file_path: typing.Union[str, Path], overwrite: bool = False) -> Path:
"""
Creates MP3 file from text
Args:
text: text to encode
file_path... | 23.685714 | 99 | 0.667069 |
334298c232e1171d0fa0a31b49dcb50f83e90f4b | 2,542 | py | Python | tensorflow/python/saved_model/loader.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/saved_model/loader.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/saved_model/loader.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 36 | 2017-07-27T21:12:40.000Z | 2022-02-03T16:45:56.000Z | # Copyright 2015 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... | 36.314286 | 81 | 0.711251 |
3342a2ba236cb4742b03cb1ee225a670ce049033 | 6,395 | py | Python | fabric_cf/actor/core/apis/abc_mgmt_actor.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | fabric_cf/actor/core/apis/abc_mgmt_actor.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | 67 | 2020-12-21T15:39:49.000Z | 2022-02-27T17:55:00.000Z | fabric_cf/actor/core/apis/abc_mgmt_actor.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to ... | 34.945355 | 99 | 0.650195 |
3342a4ebdf71d6a23c03d1e8b6d5dbd79a155dd9 | 4,650 | py | Python | homeassistant/components/extalife/switch.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 5 | 2020-01-21T16:06:49.000Z | 2021-12-20T11:54:20.000Z | homeassistant/components/extalife/switch.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 68 | 2018-10-04T16:01:20.000Z | 2022-03-31T06:21:46.000Z | homeassistant/components/extalife/switch.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 7 | 2018-10-04T10:12:45.000Z | 2021-12-29T20:55:40.000Z | """Support for Exta Life on/off switches: ROP, ROM, ROG devices"""
import logging
from pprint import pformat
from homeassistant.components.switch import DOMAIN as DOMAIN_SWITCH, SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.typing import HomeAssistantType
from . import E... | 34.191176 | 96 | 0.623871 |
3342e91667502f66ab528bbaeb54640e2ab4289c | 1,427 | py | Python | src/get_sheet.py | Hiroya-W/Get_Info_Class_Cancellation | 2710f1cd62c9a45f9357e44d490c80cdcd8fe4c8 | [
"MIT"
] | 1 | 2019-11-22T16:50:57.000Z | 2019-11-22T16:50:57.000Z | src/get_sheet.py | Hiroya-W/Get_Info_Class_Cancellation | 2710f1cd62c9a45f9357e44d490c80cdcd8fe4c8 | [
"MIT"
] | 4 | 2019-08-12T04:07:52.000Z | 2021-04-09T08:41:34.000Z | src/get_sheet.py | Hiroya-W/Get_Info_Class_Cancellation | 2710f1cd62c9a45f9357e44d490c80cdcd8fe4c8 | [
"MIT"
] | null | null | null | from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
def main(sheetname):
# test
creds = None
SCOPES = "https://www.googleapis.com/auth/spread... | 30.361702 | 80 | 0.660827 |
3342f03823c672da6e5ff6058f4319753b810c91 | 3,491 | py | Python | app/models.py | Monroe100/personalblog | d4fc0cee23adc8927814077f734413efb8dad21d | [
"MIT"
] | null | null | null | app/models.py | Monroe100/personalblog | d4fc0cee23adc8927814077f734413efb8dad21d | [
"MIT"
] | null | null | null | app/models.py | Monroe100/personalblog | d4fc0cee23adc8927814077f734413efb8dad21d | [
"MIT"
] | null | null | null |
from . import db
from werkzeug.security import generate_password_hash,check_password_hash
from flask_login import UserMixin
from . import login_manager
from datetime import datetime
@login_manager.user_loader
def load_user(user_id):
'''
Given *user_id*, return the associated User object.
'''
retu... | 27.062016 | 80 | 0.645947 |
334317483ab413f7347238bd6ae4d9704f083405 | 8,357 | py | Python | maskrcnn_benchmark/data/datasets/evaluation/voc/voc_eval.py | isrc-cas/ACM-MM-2019-ACO | abfb5c7e70f8c14e4894bf5416aa704b3ebfda90 | [
"MIT"
] | 7 | 2020-05-07T00:27:30.000Z | 2022-01-23T08:17:46.000Z | maskrcnn_benchmark/data/datasets/evaluation/voc/voc_eval.py | isrc-cas/ACM-MM-2019-ACO | abfb5c7e70f8c14e4894bf5416aa704b3ebfda90 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/data/datasets/evaluation/voc/voc_eval.py | isrc-cas/ACM-MM-2019-ACO | abfb5c7e70f8c14e4894bf5416aa704b3ebfda90 | [
"MIT"
] | 3 | 2020-05-07T00:28:08.000Z | 2021-08-12T13:03:57.000Z | # A modification version from chainercv repository.
# (See https://github.com/chainer/chainercv/blob/master/chainercv/evaluations/eval_detection_voc.py)
from __future__ import division
import os
from collections import defaultdict
from datetime import datetime
import numpy as np
from maskrcnn_benchmark.structures.bou... | 37.644144 | 100 | 0.592318 |
334330596331c3ece479477845ec2f4495365541 | 298 | py | Python | terrascript/resource/chanzuckerberg/bless.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/resource/chanzuckerberg/bless.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/resource/chanzuckerberg/bless.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/resource/chanzuckerberg/bless.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:13:34 UTC)
import terrascript
class bless_ca(terrascript.Resource):
pass
class bless_ecdsa_ca(terrascript.Resource):
pass
__all__ = [
"bless_ca",
"bless_ecdsa_ca",
]
| 16.555556 | 73 | 0.741611 |
3343577931af2545cf118912452390cbf89f5dd0 | 999 | py | Python | applications/osk/controllers/uploader.py | coil398/osk-web | 924d86f118d499669e958c165d51b5de9b28fd54 | [
"BSD-3-Clause"
] | null | null | null | applications/osk/controllers/uploader.py | coil398/osk-web | 924d86f118d499669e958c165d51b5de9b28fd54 | [
"BSD-3-Clause"
] | null | null | null | applications/osk/controllers/uploader.py | coil398/osk-web | 924d86f118d499669e958c165d51b5de9b28fd54 | [
"BSD-3-Clause"
] | null | null | null | @auth.requires_login()
def index():
images = db().select(db.image.ALL,orderby=~db.image.upload_on)
if request.args(0) > 0:
page=request.args(0,cast=int)
else:
page=0
if page*10+10 > len(images):
pageEnd = len(images)
else:
pageEnd = page*10+10
return dict(page=pag... | 30.272727 | 74 | 0.673674 |
334363c0444f3919e5471d5b884234838a8e40ab | 3,727 | py | Python | froide/publicbody/csv_import.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | froide/publicbody/csv_import.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | 3 | 2020-02-11T21:43:56.000Z | 2021-11-15T17:47:06.000Z | froide/publicbody/csv_import.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
import requests
from django.contrib.auth import get_user_model
from django.contrib.sites.models import Site
from django.template.defaultfilters import slugify
from django.utils.six import StringIO, BytesIO, PY3
from taggit.utils import parse_tags
if PY3:
import csv
else:
import unico... | 34.509259 | 88 | 0.595653 |
334370c44e3b435299c6e7d230ec83feafda5bce | 1,268 | py | Python | antarest/study/storage/rawstudy/model/filesystem/root/input/areas/item/optimization.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2020-09-30T11:40:22.000Z | 2020-11-09T09:06:30.000Z | antarest/study/storage/rawstudy/model/filesystem/root/input/areas/item/optimization.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/study/storage/rawstudy/model/filesystem/root/input/areas/item/optimization.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | from antarest.study.storage.rawstudy.model.filesystem.config.model import (
FileStudyTreeConfig,
)
from antarest.study.storage.rawstudy.model.filesystem.context import (
ContextServer,
)
from antarest.study.storage.rawstudy.model.filesystem.ini_file_node import (
IniFileNode,
)
class InputAreasOptimizatio... | 30.926829 | 79 | 0.642744 |
3343856d5f740bb16666b1877267fe14d7069421 | 22 | py | Python | JDjango/frames/encryptionFrame/common.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | 3 | 2020-12-28T05:09:02.000Z | 2021-06-23T10:02:03.000Z | JDjango/frames/encryptionFrame/common.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | JDjango/frames/encryptionFrame/common.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | from ..common import * | 22 | 22 | 0.727273 |
3343a1e7300d6478b346e0abb9897d5d38f4f6b4 | 18,930 | py | Python | eval_models.py | Guo-Xiaoqing/Skin-Seg | a23fabc5478d9d199778b51dd7def82252ad309d | [
"MIT"
] | 14 | 2020-01-13T07:53:12.000Z | 2022-01-03T17:36:05.000Z | eval_models.py | CityU-AIM-Group/Skin-Seg | a23fabc5478d9d199778b51dd7def82252ad309d | [
"MIT"
] | 1 | 2021-10-08T08:11:04.000Z | 2021-10-08T08:39:45.000Z | eval_models.py | CityU-AIM-Group/Skin-Seg | a23fabc5478d9d199778b51dd7def82252ad309d | [
"MIT"
] | 4 | 2020-01-13T07:53:14.000Z | 2021-04-08T11:58:53.000Z | """
Generic training script that trains a model using a given dataset.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from datasets import dataset_factory
from deployment import model_deploy
from nets import nets_factory
fro... | 49.425587 | 222 | 0.584311 |
3343a2b30cbb60ed03bbc86512b590915c5839f6 | 4,472 | py | Python | test/temp/temp_fix_gradients.py | geolovic/topopy | 0ccfc4bfc0364b99489d08a1d4b87582deb08b81 | [
"MIT"
] | 5 | 2020-04-05T18:42:45.000Z | 2022-02-17T11:15:32.000Z | test/temp/temp_fix_gradients.py | geolovic/topopy | 0ccfc4bfc0364b99489d08a1d4b87582deb08b81 | [
"MIT"
] | null | null | null | test/temp/temp_fix_gradients.py | geolovic/topopy | 0ccfc4bfc0364b99489d08a1d4b87582deb08b81 | [
"MIT"
] | 5 | 2019-07-02T11:14:54.000Z | 2021-12-15T08:43:42.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 15 12:05:10 2021
@author: Usuario
"""
# def calculate_gradients(self, npoints, kind='slp'):
# """
# This function calculates gradients (slope or ksn) for all channel cells.
# Gradients of each cell are calculated by linear regression using a number
# of ... | 29.813333 | 91 | 0.576029 |
3343a9ca4510ac64ba8d3741891a1952483ef491 | 314 | py | Python | tolqc-api/app/main/service/sex.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/main/service/sex.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/main/service/sex.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Genome Research Ltd.
#
# SPDX-License-Identifier: MIT
from main.model import TolqcSex
from main.schema import SexSchema
from .base import BaseService, setup_service
@setup_service
class SexService(BaseService):
class Meta:
model = TolqcSex
schema = SexSchema
| 19.625 | 51 | 0.751592 |
3343afc65866846ee7b6045fc6d1b11522a4259c | 7,478 | py | Python | cai/domains/mazeDomain/simulator/.waf3-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/extras/compat15.py | alexander-hagg/phdexperiments | 6506c8f2a438c67ca7c808df8715711fde73dfce | [
"MIT"
] | null | null | null | cai/domains/mazeDomain/simulator/.waf3-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/extras/compat15.py | alexander-hagg/phdexperiments | 6506c8f2a438c67ca7c808df8715711fde73dfce | [
"MIT"
] | null | null | null | cai/domains/mazeDomain/simulator/.waf3-1.7.16-9ca17eb492c97b689870b4ff9db75880/waflib/extras/compat15.py | alexander-hagg/phdexperiments | 6506c8f2a438c67ca7c808df8715711fde73dfce | [
"MIT"
] | 2 | 2018-06-06T14:10:23.000Z | 2020-04-07T17:20:55.000Z | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import sys
from waflib import ConfigSet,Logs,Options,Scripting,Task,Build,Configure,Node,Runner,TaskGen,Utils,Errors,Context
sys.modules['Environment']=ConfigSet
ConfigSet.Env... | 33.837104 | 113 | 0.763038 |
3343b39a879382bef29d1fe6cea38db19371cdd3 | 25 | py | Python | btd6_memory_info/generated/Assets/Scripts/Simulation/Towers/Behaviors/MoabShoveZone/moab_shove_zone.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Simulation/Towers/Behaviors/MoabShoveZone/moab_shove_zone.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Simulation/Towers/Behaviors/MoabShoveZone/moab_shove_zone.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class MoabShoveZone: pass | 25 | 25 | 0.88 |
3343f0d3e186105e514d8945c44cf5a9271f1fd5 | 3,367 | py | Python | asyncpraw/models/reddit/more.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 72 | 2020-07-14T02:02:21.000Z | 2022-03-15T13:10:02.000Z | asyncpraw/models/reddit/more.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 68 | 2020-07-16T05:29:43.000Z | 2022-03-14T12:04:56.000Z | asyncpraw/models/reddit/more.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 19 | 2020-07-22T15:34:30.000Z | 2022-03-27T20:28:46.000Z | """Provide the MoreComments class."""
from typing import TYPE_CHECKING, Any, Dict, List, Union
from ...const import API_PATH
from ..base import AsyncPRAWBase
if TYPE_CHECKING: # pragma: no cover
import asyncpraw
class MoreComments(AsyncPRAWBase):
"""A class indicating there are more comments."""
def _... | 41.567901 | 87 | 0.617167 |
33440318a67356eddd9a34c479b6a6aeb89bb4c0 | 166,935 | py | Python | distributed/tests/test_client.py | marco-neumann-jdas/distributed | 86b5743ae1be52c80ebe440f5b58e8529fe2817e | [
"BSD-3-Clause"
] | null | null | null | distributed/tests/test_client.py | marco-neumann-jdas/distributed | 86b5743ae1be52c80ebe440f5b58e8529fe2817e | [
"BSD-3-Clause"
] | null | null | null | distributed/tests/test_client.py | marco-neumann-jdas/distributed | 86b5743ae1be52c80ebe440f5b58e8529fe2817e | [
"BSD-3-Clause"
] | null | null | null | import asyncio
from collections import deque
from contextlib import suppress
from functools import partial
import gc
import logging
from operator import add
import os
import pickle
import psutil
import random
import subprocess
import sys
import threading
from threading import Semaphore
from time import sleep
import tra... | 27.263596 | 100 | 0.605385 |
334426eed08e5781fcc30a5107d9d4d009be647b | 20,454 | py | Python | cinder/api/contrib/quotas.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/api/contrib/quotas.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/api/contrib/quotas.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# 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 requ... | 44.272727 | 79 | 0.614892 |
33444a25f69cd7ecc033b0a783758ab6e52702e8 | 1,435 | py | Python | test_reader.py | MaxASchwarzer/TDVAE-RL-Project | 55e7c7761be7772b51e01d43bedb387544f6f1ef | [
"MIT"
] | 3 | 2019-05-30T08:21:53.000Z | 2021-01-13T13:46:11.000Z | test_reader.py | MaxASchwarzer/TDVAE-RL-Project | 55e7c7761be7772b51e01d43bedb387544f6f1ef | [
"MIT"
] | null | null | null | test_reader.py | MaxASchwarzer/TDVAE-RL-Project | 55e7c7761be7772b51e01d43bedb387544f6f1ef | [
"MIT"
] | null | null | null | from pylego.misc import save_comparison_grid
from readers.gym_reader import GymReader, ReplayBuffer
if __name__ == '__main__':
emulator = GymReader('Seaquest-v0', 6, 4, 2, 100)
reader = ReplayBuffer(emulator, 5000, 100, 1, 4, 0.99)
print('EMULATOR:')
for i, batch in enumerate(emulator.iter_batches('... | 37.763158 | 104 | 0.593728 |
33449f8e061430e9b788e458a00ae9a47c85ab9f | 970 | py | Python | igibson_usage/hrl_igibson_env_sample.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 1 | 2022-02-03T13:27:19.000Z | 2022-02-03T13:27:19.000Z | igibson_usage/hrl_igibson_env_sample.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | igibson_usage/hrl_igibson_env_sample.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | from gibson2.envs.locomotor_env import (
NavigateEnv,
NavigateRandomEnv,
InteractiveNavigateEnv,
)
import os
import gibson2
config_file = os.path.join(
os.path.dirname(gibson2.__file__), "../examples/configs", "jr_interactive_nav.yaml"
)
env = InteractiveNavigateEnv(
config_file=config_file,
m... | 24.25 | 87 | 0.670103 |
3344b1e7d6db20be005d259157853406ae5964bf | 5,377 | py | Python | tests/test_confgen.py | fieldaware/confgen | 2b177aeb465de1cb8b55bbc61a33289e1e9d1d2d | [
"MIT"
] | 2 | 2016-04-22T15:47:46.000Z | 2016-05-31T15:52:54.000Z | tests/test_confgen.py | fieldaware/confgen | 2b177aeb465de1cb8b55bbc61a33289e1e9d1d2d | [
"MIT"
] | 5 | 2017-01-13T13:14:13.000Z | 2017-08-22T10:17:58.000Z | tests/test_confgen.py | fieldaware/confgen | 2b177aeb465de1cb8b55bbc61a33289e1e9d1d2d | [
"MIT"
] | null | null | null | import pytest
from os.path import join
def test_confgen_tree_build(confgen):
'''
Based on:
hierarchy:
- GLOBAL
- STAGE
- CLUSTER
- SERVICE
infra:
prod: # stage
main: # cluster
- webapp # service
multiapp: # cluster
*services # service
... | 35.375 | 91 | 0.583039 |
3344d45a142fc159bbb8fbfe6965eebd9a9b5826 | 27,812 | py | Python | sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_digitaltwins_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_digitaltwins_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_digitaltwins_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import uu... | 42.139394 | 110 | 0.652956 |
3344decc9b58ced3d2c77338f689683b688f8f2d | 20,925 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/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/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/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... | 42.879098 | 247 | 0.67632 |
33456dcdd28b143833a2e424abf79c55533065cc | 1,799 | py | Python | pmg2.py | towicode/verssa-automation | a2fe6f8f3675058b761927ee6e5a50e40fffd738 | [
"Unlicense"
] | null | null | null | pmg2.py | towicode/verssa-automation | a2fe6f8f3675058b761927ee6e5a50e40fffd738 | [
"Unlicense"
] | null | null | null | pmg2.py | towicode/verssa-automation | a2fe6f8f3675058b761927ee6e5a50e40fffd738 | [
"Unlicense"
] | null | null | null | import requests
def plugin_main(args, **kwargs):
'''
Runs the PowerState Classifier Cyvere app with the input of the irods object obj
'''
try:
logger = args['logger']
auth_headers = args['auth_headers']
db = args['db']
obj = args['obj']
query_params = {"search":... | 32.709091 | 109 | 0.560311 |
33457bd0bcadca57aa9f0aa93a981ddc8ee86d49 | 10,886 | py | Python | viz/sunburst.py | Avaneesh-Ramesh-07/Dashing | 4e8d5a28ade1d627d51ad3de5d360a57b763b323 | [
"MIT"
] | null | null | null | viz/sunburst.py | Avaneesh-Ramesh-07/Dashing | 4e8d5a28ade1d627d51ad3de5d360a57b763b323 | [
"MIT"
] | 1 | 2020-09-14T18:44:09.000Z | 2020-11-10T22:04:12.000Z | viz/sunburst.py | Avaneesh-Ramesh-07/Dashing | 4e8d5a28ade1d627d51ad3de5d360a57b763b323 | [
"MIT"
] | 2 | 2021-12-20T21:53:25.000Z | 2022-02-16T22:22:45.000Z | from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import plotly.graph_objs as go
import plotly.io as pio
import plotly
import csv
import copy
import os
import pandas as pd
import numpy as np
from numpy import inf
from difflib import get_close_matches
import re
def sunburst(data_loader):
... | 36.653199 | 151 | 0.618409 |
3345865179f13262e67ddc956beb14cc23260299 | 804 | py | Python | exa/core/error.py | rdmontgomery/exa | 8fc5cbda80dd8834a8b63cdee999a8394af90e5c | [
"Apache-2.0"
] | null | null | null | exa/core/error.py | rdmontgomery/exa | 8fc5cbda80dd8834a8b63cdee999a8394af90e5c | [
"Apache-2.0"
] | null | null | null | exa/core/error.py | rdmontgomery/exa | 8fc5cbda80dd8834a8b63cdee999a8394af90e5c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015-2019, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Exceptions
#################################
"""
import re
class ExaException(Exception):
"""
Exception with support for logging.
"""
def __init__(self, msg):
... | 25.935484 | 88 | 0.595771 |
3345c9b46f866da1ff0cd45968bdb05fe093ca7c | 11,728 | py | Python | xmldestroyer/__init__.py | danr/xmldestroyer | 7d0a3da65ad10dc1f12757988c218e43b1a65fa4 | [
"MIT"
] | null | null | null | xmldestroyer/__init__.py | danr/xmldestroyer | 7d0a3da65ad10dc1f12757988c218e43b1a65fa4 | [
"MIT"
] | null | null | null | xmldestroyer/__init__.py | danr/xmldestroyer | 7d0a3da65ad10dc1f12757988c218e43b1a65fa4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
`xmldestroyer`
Bottom-up transformation of XML into XML, JSON or text.
"""
import xml.etree.cElementTree as ET
import six
import bz2
import gzip
import itertools
import json
import inspect
from contextlib import contextmanager
from functools import wraps
def Tag(tag, text, *children, **a... | 32.668524 | 79 | 0.595157 |
3345f42631084b82fb6c344faac177046f957042 | 273 | py | Python | office365/graph/onedrive/sharepointIds.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/graph/onedrive/sharepointIds.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | office365/graph/onedrive/sharepointIds.py | stardust85/Office365-REST-Python-Client | cd369c607c7d137a000734e9c5e8f03ae3e3c603 | [
"MIT"
] | null | null | null | from office365.runtime.client_value_object import ClientValueObject
class SharePointIds(ClientValueObject):
"""The SharePointIds resource groups the various identifiers for an item stored in a SharePoint site or OneDrive
for Business into a single structure. """
| 39 | 116 | 0.809524 |
3345fc66fec8b0a30b9c9318eefaaa49d480d1f3 | 3,228 | py | Python | password.py | Derrick-Nyongesa/PasswordLocker | 9c9acbceea7a250f8042e2e4f5e5aff6ef49ae71 | [
"MIT"
] | null | null | null | password.py | Derrick-Nyongesa/PasswordLocker | 9c9acbceea7a250f8042e2e4f5e5aff6ef49ae71 | [
"MIT"
] | null | null | null | password.py | Derrick-Nyongesa/PasswordLocker | 9c9acbceea7a250f8042e2e4f5e5aff6ef49ae71 | [
"MIT"
] | null | null | null | import pyperclip
import random
import string
class User:
"""
Class that generates new instances of the user
"""
user_list = []
def __init__(self, username, password):
"""
Method to define the properties for each user object will hold.
Args:
username: Users use... | 26.9 | 96 | 0.60316 |
33465ad3094a76e04c80923c0aa147d876862e11 | 1,070 | py | Python | palindrome.py | superswan/beginner | e3c6dcfb376799c839fbfe45615e9d9c734694fd | [
"Unlicense"
] | 42 | 2015-07-20T22:17:37.000Z | 2022-03-07T04:43:50.000Z | palindrome.py | superswan/beginner | e3c6dcfb376799c839fbfe45615e9d9c734694fd | [
"Unlicense"
] | 5 | 2020-10-01T17:13:52.000Z | 2021-09-29T21:07:55.000Z | palindrome.py | superswan/beginner | e3c6dcfb376799c839fbfe45615e9d9c734694fd | [
"Unlicense"
] | 89 | 2015-07-20T22:17:40.000Z | 2021-11-24T15:41:31.000Z | """ Simple Program to Check Palindrome String"""
print(('*' * 18) + 'HELLO THERE!' + ('*' * 18) + '\n Welcome to the Python Palindrome Prober!\n')
def palidrome():
print("Please enter the word you would like to check\nFor example: racecar")
word = input(">> ").lower()
print('Yes, your word is a palindr... | 32.424242 | 165 | 0.614953 |
3346bd4473710fafb9e74a2173c2dc3f184f5cf5 | 9,838 | py | Python | lib/rucio/tests/test_undertaker.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_undertaker.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_undertaker.py | jamesp-epcc/rucio | d36d346ea569e89ea413d4241bb69189dfeee7db | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013-2021 CERN
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 42.960699 | 146 | 0.634275 |
3346c666be3b034b6c8bd862f0a6a62f2900fe80 | 1,160 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_ble_adafruit/light_sensor_service.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_ble_adafruit/light_sensor_service.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_ble_adafruit/light_sensor_service.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2020 Dan Halbert for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_ble_adafruit.light_sensor_service`
================================================================================
BLE access to light sensor data.
* Author(s): Dan Halbert
"""
__version__ = "1.2.3"
__... | 33.142857 | 84 | 0.726724 |
3346cb20ed88ea7ce0ebf973d712e417e40e6c81 | 520 | py | Python | tests_api/conftest.py | LoshmanovNA/pet-project | 127e8efc11738ef681220dc7dece18dd3f14ec08 | [
"MIT"
] | 1 | 2020-01-18T18:18:33.000Z | 2020-01-18T18:18:33.000Z | tests_api/conftest.py | LoshmanovNA/moesk | 127e8efc11738ef681220dc7dece18dd3f14ec08 | [
"MIT"
] | 3 | 2021-03-31T19:32:57.000Z | 2021-12-13T20:33:50.000Z | tests_api/conftest.py | LoshmanovNA/moesk | 127e8efc11738ef681220dc7dece18dd3f14ec08 | [
"MIT"
] | null | null | null | import logging
import pytest
import configparser
from . import constants
def pytest_addoption(parser):
parser.addoption(
"--env",
action="store",
dest="environment",
type=str.lower,
choices=(
constants.Environment.PRODUCTION,
constants.Environment.TE... | 21.666667 | 52 | 0.640385 |
3346e409138fb62899483ee125549e32a490bb3d | 1,011 | py | Python | cusplibrary/testing/data/random_10x10/generator.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | cusplibrary/testing/data/random_10x10/generator.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | cusplibrary/testing/data/random_10x10/generator.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null |
##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unt... | 29.735294 | 78 | 0.583581 |
334705569346641c038394c20838caafe228c2f3 | 511 | py | Python | backend/app_api/migrations/0012_remove_taskcaserelevance_case_and_more.py | defnngj/quick | 98031a0fddf325820ec135a62253468f46aa2ba6 | [
"Apache-2.0"
] | 1 | 2021-12-21T16:25:29.000Z | 2021-12-21T16:25:29.000Z | backend/app_api/migrations/0012_remove_taskcaserelevance_case_and_more.py | defnngj/quick | 98031a0fddf325820ec135a62253468f46aa2ba6 | [
"Apache-2.0"
] | null | null | null | backend/app_api/migrations/0012_remove_taskcaserelevance_case_and_more.py | defnngj/quick | 98031a0fddf325820ec135a62253468f46aa2ba6 | [
"Apache-2.0"
] | 1 | 2022-03-26T14:01:28.000Z | 2022-03-26T14:01:28.000Z | # Generated by Django 4.0.2 on 2022-05-04 08:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_api', '0011_taskcaserelevance_module_id'),
]
operations = [
migrations.RemoveField(
model_name='taskcaserelevance',
... | 22.217391 | 56 | 0.587084 |
33470ec4238b585b5890db0fd598c129a6ae1358 | 776 | py | Python | limix/data/geno_iterator.py | fpcasale/limix | a6bc2850f243fe779991bb53a24ddbebe0ab74d2 | [
"Apache-2.0"
] | null | null | null | limix/data/geno_iterator.py | fpcasale/limix | a6bc2850f243fe779991bb53a24ddbebe0ab74d2 | [
"Apache-2.0"
] | null | null | null | limix/data/geno_iterator.py | fpcasale/limix | a6bc2850f243fe779991bb53a24ddbebe0ab74d2 | [
"Apache-2.0"
] | null | null | null | from limix.data import build_geno_query
class GIter:
def __init__(self, geno_reader, start=0, end=None, batch_size=1000):
self.gr = geno_reader
self.current = start
if end is None:
end = self.gr.getSnpInfo().shape[0]
self.end = end
self.batch_size = batch_size
... | 27.714286 | 74 | 0.596649 |
33470f86c47a5f3701197fc28490be9f233e20b1 | 31,384 | py | Python | src/toil/worker.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 348 | 2018-07-08T03:38:28.000Z | 2022-03-11T18:57:44.000Z | src/toil/worker.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 1,700 | 2018-07-05T18:28:49.000Z | 2022-03-31T14:09:04.000Z | src/toil/worker.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 126 | 2018-07-11T18:59:29.000Z | 2022-01-24T03:14:02.000Z | # Copyright (C) 2015-2021 Regents of the University of California
#
# 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 app... | 43.832402 | 159 | 0.610757 |
33471264f505f0f5771a0b6b11499f1e164ed400 | 5,528 | py | Python | indico/util/spreadsheets.py | javfg/indico | 2634756ba1e9caf6dd8fc9afc3f47291fda5816d | [
"MIT"
] | 1 | 2021-12-27T17:51:27.000Z | 2021-12-27T17:51:27.000Z | indico/util/spreadsheets.py | javfg/indico | 2634756ba1e9caf6dd8fc9afc3f47291fda5816d | [
"MIT"
] | null | null | null | indico/util/spreadsheets.py | javfg/indico | 2634756ba1e9caf6dd8fc9afc3f47291fda5816d | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import csv
import re
from contextlib import contextmanager
from datetime import datetime
from io import By... | 35.896104 | 118 | 0.679088 |
33472a64fd4897c27841d7c34616aba2f826f4d8 | 5,385 | py | Python | docs/conf.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 11 | 2018-11-18T21:57:16.000Z | 2021-07-20T12:23:28.000Z | docs/conf.py | qzhu2017/ML-DOS | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 34 | 2018-10-23T14:54:48.000Z | 2019-03-26T18:07:09.000Z | docs/conf.py | qzhu2017/ML-Materials | c58ebdfc77746175771af0862ed5737c4eaa3eec | [
"MIT"
] | 3 | 2018-11-15T06:34:37.000Z | 2019-01-04T02:04:25.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ----------------------------------------------------... | 31.863905 | 80 | 0.626555 |
33472ba58923b2ffbb083516e4856c8d1eac7e29 | 2,186 | py | Python | plugins/ledger/qt.py | schancel/electrum | ee125e0723a9345757b741aed93be906af80d327 | [
"MIT"
] | 1 | 2020-05-24T08:50:13.000Z | 2020-05-24T08:50:13.000Z | plugins/ledger/qt.py | Santobak/electrum | ee125e0723a9345757b741aed93be906af80d327 | [
"MIT"
] | null | null | null | plugins/ledger/qt.py | Santobak/electrum | ee125e0723a9345757b741aed93be906af80d327 | [
"MIT"
] | 1 | 2017-12-22T03:57:04.000Z | 2017-12-22T03:57:04.000Z | import threading
from PyQt5.Qt import (QDialog, QInputDialog, QLineEdit,
QVBoxLayout, QLabel)
import PyQt5.QtCore as QtCore
from electroncash.i18n import _
from .ledger import LedgerPlugin
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase
from electroncash_gui.qt.util import *
from btchip.... | 28.025641 | 121 | 0.627173 |
334730074b003ca7ecd9cc81a27315de793f543d | 121,277 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_plans_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_plans_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_plans_operations.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 ... | 41.776438 | 254 | 0.66565 |
33474726efb385739412184c763403b5e23a30dc | 1,432 | py | Python | test/webdnn_test/graph_test/operators_test/im2col_test.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | test/webdnn_test/graph_test/operators_test/im2col_test.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | test/webdnn_test/graph_test/operators_test/im2col_test.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | from webdnn.graph.axis import Axis, AxisKeyDict
from webdnn.graph.operators.im2col import Im2Col
from webdnn.graph.order import OrderHWNC, OrderNHWC, OrderCHWN, OrderCNHW, OrderNCHW, \
OrderHWCN
from webdnn.graph.variable import Variable
orders4 = [OrderNHWC, OrderHWNC, OrderHWCN, OrderNCHW, OrderCNHW, OrderCHWN]
... | 31.822222 | 100 | 0.620112 |
33475ba47db7e621fc82aeffb12b61bed63254b1 | 639 | py | Python | visualize/MultiPersonVisualizer/LiveDemo.py | ys1998/motion-forecast | ef8fa9d597906a756f28952a731f6bc8d178f2bf | [
"MIT"
] | null | null | null | visualize/MultiPersonVisualizer/LiveDemo.py | ys1998/motion-forecast | ef8fa9d597906a756f28952a731f6bc8d178f2bf | [
"MIT"
] | null | null | null | visualize/MultiPersonVisualizer/LiveDemo.py | ys1998/motion-forecast | ef8fa9d597906a756f28952a731f6bc8d178f2bf | [
"MIT"
] | null | null | null | from Scene import *
from Visualizer import *
from Skeleton import *
from AnimatorCOCO import *
# from AnimatorTemporal import *
# from AnimatorCSV import *
import sys, os
import subprocess
import numpy as np
if __name__ == "__main__":
cs = "tcp://localhost:5563"
# os.system('mkdir -p ../MPII' + sys.argv[1])
... | 25.56 | 52 | 0.613459 |
33479797f7f3ce9621e345f047016b6ce01562b9 | 15,379 | py | Python | modelscript/base/printers.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 1 | 2019-02-22T14:27:06.000Z | 2019-02-22T14:27:06.000Z | modelscript/base/printers.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 4 | 2015-12-18T10:30:02.000Z | 2015-12-18T10:36:28.000Z | modelscript/base/printers.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | null | null | null | # coding=utf-8
"""Base classes for printers and string/color utilities. """
__all__ = (
'indent',
'box',
'AbstractPrinterConfig',
'AbstractPrinterConfigs',
'StructuredPrinterConfig',
'StructuredPrinterConfigs',
'StructuredPrinter',
'ContentPrinterConfig',
'ContentPrinterConfigs',
... | 29.237643 | 78 | 0.519475 |
33479824168716ad55e854c8f4dab82217ee6369 | 1,724 | py | Python | recipeProject/user/serializers.py | Mazziitoozz/Django_REST_recipe_api | b248342aed1bda5d4d39a17509dcd11962fecf10 | [
"MIT"
] | null | null | null | recipeProject/user/serializers.py | Mazziitoozz/Django_REST_recipe_api | b248342aed1bda5d4d39a17509dcd11962fecf10 | [
"MIT"
] | null | null | null | recipeProject/user/serializers.py | Mazziitoozz/Django_REST_recipe_api | b248342aed1bda5d4d39a17509dcd11962fecf10 | [
"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):
'''serializer for the users object'''
class Meta:
model = get_user_model()
fields = ('e... | 33.803922 | 73 | 0.647332 |
3347b4ced58ccf91edbe39ac6e6ee83c04d12cbc | 388,278 | py | Python | nova/tests/virt/libvirt/test_libvirt.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/virt/libvirt/test_libvirt.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/tests/virt/libvirt/test_libvirt.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 OpenStack Foundation
# Copyright 2012 University Of Minho
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | 42.439392 | 79 | 0.577012 |
3347b8a31854a6a177d4c657547f594c3c717341 | 2,112 | py | Python | project/api/models.py | repodevs/flask-microservices | 021cb2f178753e429c0388202045fa53ac33427a | [
"MIT"
] | 2 | 2018-08-02T18:19:19.000Z | 2019-08-18T14:49:44.000Z | project/api/models.py | repodevs/flask-microservices | 021cb2f178753e429c0388202045fa53ac33427a | [
"MIT"
] | null | null | null | project/api/models.py | repodevs/flask-microservices | 021cb2f178753e429c0388202045fa53ac33427a | [
"MIT"
] | 2 | 2019-05-30T11:19:20.000Z | 2019-08-18T14:49:54.000Z |
import datetime
import jwt
from flask import current_app
from project import db, bcrypt
class User(db.Model):
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
username = db.Column(db.String(128), unique=True, nullable=False)
email = db.Column(db.String(128), u... | 33.52381 | 82 | 0.602273 |
3347bdc42ed4acbca02453896be1dfcc249526b0 | 5,928 | py | Python | DeepLearning/PythonCoding/03_Python_ChoTH/python_2.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | 1 | 2019-06-27T04:05:59.000Z | 2019-06-27T04:05:59.000Z | DeepLearning/PythonCoding/03_Python_ChoTH/python_2.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | null | null | null | DeepLearning/PythonCoding/03_Python_ChoTH/python_2.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | null | null | null | # CHAPTER 2
# 2.1 변수, 이름, 객체
# 파이썬 데이터 타입
# 부울, 정수, 실수, 문자열
# 파이썬은 객체의 타입을 바꿀 수 없다! (강타입)
a = 7
print(a)
# 변수는 객체의 참조일 뿐 객체를 포함하는 개념이 아니다.
a = 7
print(a)
b = a
print(b)
#
# 변수 혹은 리터럴값의 타입 확인
type(a)
type(b)
type(58)
type(99.9)
type('abc')
# 클래스는 객체의 정의를 의미한다. 파이썬에서 'class'와 'type'은 그 의미가 거의 같다.
# 변수이름에 사용가능한 문자
# 소문자... | 20.727273 | 93 | 0.636302 |
3347dce53da4419d0339257e576ee131599a64ba | 509 | py | Python | test2.py | panthersuper/r2n2 | db75a70e4425840f0deaf96004bd4ce429b69b51 | [
"MIT"
] | null | null | null | test2.py | panthersuper/r2n2 | db75a70e4425840f0deaf96004bd4ce429b69b51 | [
"MIT"
] | null | null | null | test2.py | panthersuper/r2n2 | db75a70e4425840f0deaf96004bd4ce429b69b51 | [
"MIT"
] | null | null | null | import numpy as np
from scipy import io
import os
import tensorflow as tf
from fnmatch import fnmatch
from lib.binvox_rw import read_as_3d_array
vox_root = './ShapeNet/ShapeNetVox32'
count= 0
for path, subdirs, files in os.walk(vox_root):
for name in files:
if fnmatch(name, '*.mat'):
... | 21.208333 | 47 | 0.644401 |
3347e1e313cb07ac0867dbddc48eb5f6dda2e2db | 11,002 | py | Python | NBA Project/venv/Lib/site-packages/plotly/graph_objs/sankey/hoverlabel/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/sankey/hoverlabel/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/sankey/hoverlabel/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000'... | 34.38125 | 82 | 0.563988 |
3347f44b84acd5add956f25a1adb463ed197629f | 3,284 | py | Python | base_model/vgg.py | bobenxia/Centripetal-SGD | e33350464504085a641a2a969d3c06e3d5cc4765 | [
"Apache-2.0"
] | 767 | 2019-10-08T01:32:47.000Z | 2022-03-27T14:39:44.000Z | base_model/vgg.py | ShawnDing1994/ACNet | 9586a269d7065805aafb8f1d69d425e84cec55f1 | [
"MIT"
] | 48 | 2019-11-04T12:05:15.000Z | 2021-11-28T06:50:30.000Z | base_model/vgg.py | ShawnDing1994/ACNet | 9586a269d7065805aafb8f1d69d425e84cec55f1 | [
"MIT"
] | 140 | 2019-10-29T07:49:24.000Z | 2022-03-27T13:01:22.000Z | import torch.nn as nn
from builder import ConvBuilder
from constants import VGG_ORIGIN_DEPS
def _create_vgg_stem(builder, deps):
sq = builder.Sequential()
sq.add_module('conv1',
builder.Conv2dBNReLU(in_channels=3, out_channels=deps[0], kernel_size=3, stride=1, padding=1))
sq.add_module('c... | 50.523077 | 120 | 0.673264 |
334812d4e2850ad273220c37495bf24794da5f5a | 24,164 | py | Python | api_tests/files/views/test_file_detail.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | api_tests/files/views/test_file_detail.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | 4 | 2016-05-13T14:24:16.000Z | 2017-03-30T15:28:31.000Z | api_tests/files/views/test_file_detail.py | hmoco/osf.io | a02869f9b5c198bafae7cea0c216674bbcba62f7 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import itsdangerous
import mock
import pytz
from nose.tools import * # flake8: noqa
from addons.github.models import GithubFileNode
from addons.osfstorage import settings as osfstorage_settings
from api.base.settings.defaults import API_BASE
from api_tests import utils as api_... | 41.5189 | 130 | 0.625559 |
334816aeca6919372ace5333d3a0565db9e5af09 | 4,008 | py | Python | src/py/export_useg.py | rtiglobalhealth/trachoma | 5aac19f7af45ed99a14e6712cda7e8c1f4118bbd | [
"Apache-2.0"
] | null | null | null | src/py/export_useg.py | rtiglobalhealth/trachoma | 5aac19f7af45ed99a14e6712cda7e8c1f4118bbd | [
"Apache-2.0"
] | null | null | null | src/py/export_useg.py | rtiglobalhealth/trachoma | 5aac19f7af45ed99a14e6712cda7e8c1f4118bbd | [
"Apache-2.0"
] | 2 | 2021-01-07T17:21:05.000Z | 2021-09-14T19:18:30.000Z | import tensorflow as tf
from tensorflow.keras import layers
def IoU(y_true, y_pred):
y_true = tf.cast(y_true, tf.float32)
num_classes = tf.shape(y_true)[-1]
y_true = tf.reshape(y_true, [-1, num_classes])
y_pred = tf.reshape(y_pred, [-1, num_classes])
intersection = 2.0*tf.reduce_sum(y_true * y_pr... | 32.852459 | 123 | 0.623503 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.