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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
337b54e0f0cc80647c9b2d380e3948b22a8b4636 | 1,302 | py | Python | mfranceschi_minesweeper/controller/controller.py | mfranceschi/Minesweeper | d2d3305e0dc1d2a7717379513f708e70fa80f223 | [
"MIT"
] | null | null | null | mfranceschi_minesweeper/controller/controller.py | mfranceschi/Minesweeper | d2d3305e0dc1d2a7717379513f708e70fa80f223 | [
"MIT"
] | 10 | 2021-07-19T00:59:56.000Z | 2021-08-29T23:54:36.000Z | mfranceschi_minesweeper/controller/controller.py | mfranceschi/Minesweeper | d2d3305e0dc1d2a7717379513f708e70fa80f223 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from enum import Enum
from typing import Optional
from ..utils import Point2D
from ..view.gui import GUI
@dataclass(frozen=True)
class DifficultyLevel:
"""
A level of difficulty is defined by the grid size and the number of mines.
"""
nbr_mines: int
grid_dim: Poi... | 26.04 | 80 | 0.698157 |
337b5d223cdfee59179a6bef9f69d45731d1ad75 | 225 | py | Python | Mode/Create.py | gokhangg/Uncertainix | feb86dc9a8152bc133f99c56d8f15bf760754218 | [
"Apache-2.0"
] | null | null | null | Mode/Create.py | gokhangg/Uncertainix | feb86dc9a8152bc133f99c56d8f15bf760754218 | [
"Apache-2.0"
] | null | null | null | Mode/Create.py | gokhangg/Uncertainix | feb86dc9a8152bc133f99c56d8f15bf760754218 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 20 21:08:55 2020
@author: ghngu
"""
import importlib as imLib
def CreateMode(mode):
module_ = imLib.import_module("Mode.{0:s}.Mode".format(mode))
return module_.Mode() | 18.75 | 65 | 0.662222 |
337b6b8105b8c8542e87127e9325c645399772e5 | 1,279 | py | Python | troveclient/osc/v1/base.py | hrnciar/python-troveclient | e41d08d24325a61a213592934b508bf77ce67dac | [
"Apache-2.0"
] | 46 | 2015-01-14T12:26:24.000Z | 2021-01-05T12:54:03.000Z | troveclient/osc/v1/base.py | hrnciar/python-troveclient | e41d08d24325a61a213592934b508bf77ce67dac | [
"Apache-2.0"
] | 3 | 2015-05-22T19:58:11.000Z | 2021-04-30T06:12:21.000Z | troveclient/osc/v1/base.py | hrnciar/python-troveclient | e41d08d24325a61a213592934b508bf77ce67dac | [
"Apache-2.0"
] | 34 | 2015-01-21T12:33:53.000Z | 2021-10-13T00:29:35.000Z | # Copyright 2019 Catalyst Cloud Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 36.542857 | 77 | 0.659109 |
337b92564d8a51433fec2ce2ccc7c1e43f4017d1 | 300 | py | Python | openapi_core/schema/schemas/util.py | grktsh/openapi-core | d4ada7bcbb9b13f5c5dd090988c35be7a0d141b7 | [
"BSD-3-Clause"
] | null | null | null | openapi_core/schema/schemas/util.py | grktsh/openapi-core | d4ada7bcbb9b13f5c5dd090988c35be7a0d141b7 | [
"BSD-3-Clause"
] | null | null | null | openapi_core/schema/schemas/util.py | grktsh/openapi-core | d4ada7bcbb9b13f5c5dd090988c35be7a0d141b7 | [
"BSD-3-Clause"
] | null | null | null | """OpenAPI core schemas util module"""
from distutils.util import strtobool
from json import dumps
from six import string_types
def forcebool(val):
if isinstance(val, string_types):
val = strtobool(val)
return bool(val)
def dicthash(d):
return hash(dumps(d, sort_keys=True))
| 18.75 | 41 | 0.716667 |
337b93e0905b868a23b7c6b736fec3a8f1bbca69 | 4,117 | py | Python | Florence/FunctionSpace/ThreeDimensional/Hex/HexLagrangeGaussLobatto.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 65 | 2017-08-04T10:21:13.000Z | 2022-02-21T21:45:09.000Z | Florence/FunctionSpace/ThreeDimensional/Hex/HexLagrangeGaussLobatto.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 6 | 2018-06-03T02:29:20.000Z | 2022-01-18T02:30:22.000Z | Florence/FunctionSpace/ThreeDimensional/Hex/HexLagrangeGaussLobatto.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 10 | 2018-05-30T09:44:10.000Z | 2021-05-18T08:06:51.000Z | import numpy as np
from Florence.FunctionSpace.OneDimensional import Line as OneD
from Florence.MeshGeneration.NodeArrangement import NodeArrangementHex
def LagrangeGaussLobatto(C,zeta,eta,beta,arrange=1):
"""This routine computes stable higher order Lagrangian bases with Gauss-Lobatto-Legendre points
Refe... | 43.336842 | 111 | 0.580277 |
337b94997c1e8e77d09d27171f87f0afafc7ddd1 | 4,530 | py | Python | src/ggrc_workflows/migrations/versions/20170727144648_47d42c67207f_old_tgt_relative_dates_to_absolute.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc_workflows/migrations/versions/20170727144648_47d42c67207f_old_tgt_relative_dates_to_absolute.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc_workflows/migrations/versions/20170727144648_47d42c67207f_old_tgt_relative_dates_to_absolute.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""
Converts relative task group task dates to absolute ones to fit new
cycles calculation algorithm
Create Date: 2017-07-27 14:46:48.535970
"""
# disable Invalid constant name pylint warning for mandatory ... | 35.116279 | 79 | 0.649448 |
337ba4c723d41f2e04395e118d09cdee787fd606 | 25,480 | py | Python | flask/application/dashapp/callbacks.py | IQTLabs/atlas | 07646fd4052b0ba0be937cc6a950b368e1cc5a54 | [
"Apache-2.0"
] | 9 | 2022-02-10T17:16:36.000Z | 2022-03-11T12:34:10.000Z | flask/application/dashapp/callbacks.py | IQTLabs/atlas | 07646fd4052b0ba0be937cc6a950b368e1cc5a54 | [
"Apache-2.0"
] | null | null | null | flask/application/dashapp/callbacks.py | IQTLabs/atlas | 07646fd4052b0ba0be937cc6a950b368e1cc5a54 | [
"Apache-2.0"
] | 2 | 2022-01-19T21:23:20.000Z | 2022-02-13T23:46:00.000Z | import asyncio
import base64
import os
import urllib
import dash
import dash_html_components as html
import validators
from application.dashapp.styles import styles
from application.gql import get_hasura_connection_with_params, get_headers
from application.queries import searchNetworkData
from dash.dependencies import... | 41.633987 | 143 | 0.458399 |
337ba7ec66d96b77fb9096df6a1b6202b7ca61be | 2,317 | py | Python | pfile_tools/scripts/dump_pfile_header.py | njvack/pfile-tools | fa5d3ed165fae8b0667c7adde0aa45e24becdcb8 | [
"BSD-3-Clause"
] | 17 | 2016-07-20T12:44:38.000Z | 2021-12-22T20:58:21.000Z | pfile_tools/scripts/dump_pfile_header.py | njvack/pfile-tools | fa5d3ed165fae8b0667c7adde0aa45e24becdcb8 | [
"BSD-3-Clause"
] | 6 | 2015-11-09T19:46:42.000Z | 2020-01-27T20:57:40.000Z | pfile_tools/scripts/dump_pfile_header.py | njvack/pfile-tools | fa5d3ed165fae8b0667c7adde0aa45e24becdcb8 | [
"BSD-3-Clause"
] | 10 | 2015-11-09T11:50:50.000Z | 2021-10-21T21:46:40.000Z | #!/usr/bin/env python
# Part of the pfile-tools package
# Copyright (c) 2012, Board of Regents of the University of Wisconsin
# Written by Nathan Vack <njvack@wisc.edu>
#
# An executable script to dump the data from a p-file.
import sys
import optparse
import csv
import pfile_tools
from pfile_tools import headers, st... | 30.486842 | 78 | 0.648252 |
337bd327ed45e292fb4fd174f4596f4c879aaa73 | 600 | py | Python | pandaharvester/harvesterextractor/base_extractor.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 11 | 2017-06-01T10:16:58.000Z | 2019-11-22T08:41:36.000Z | pandaharvester/harvesterextractor/base_extractor.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 34 | 2016-10-25T19:15:24.000Z | 2021-03-05T12:59:04.000Z | pandaharvester/harvesterextractor/base_extractor.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 17 | 2016-10-24T13:29:45.000Z | 2021-03-23T17:35:27.000Z | from pandaharvester.harvestercore.plugin_base import PluginBase
from pandaharvester.harvestercore.file_spec import FileSpec
# base extractor
class BaseExtractor(PluginBase):
# constructor
def __init__(self, **kwarg):
PluginBase.__init__(self, **kwarg)
# make dictionary for aux inputs
def mak... | 30 | 89 | 0.648333 |
337be50432ea280d5a02a5728475f17aac45b9f0 | 2,643 | py | Python | experiments/ashvin/vae/fixed3/sawyer_pusher/vae_dense_wider2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed3/sawyer_pusher/vae_dense_wider2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed3/sawyer_pusher/vae_dense_wider2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.envs.mujoco.sawyer_push_and_reach_env import \
SawyerPushAndReachXYEnv, SawyerPushAndReachXYEasyEnv
from rlkit.envs.mujoco.sawyer_push_env import SawyerPushXYEnv
from rlkit.envs.multitask.point2d import MultitaskImagePoint2DEnv
from rlkit.envs.multitask.pusher2d import FullPusher2DEnv
from rlkit.images.c... | 33.884615 | 85 | 0.643587 |
337bf2ccd5b708e1e4d9ea187471e0972ced3e50 | 2,264 | py | Python | alipay/aop/api/domain/AlipayDataPrinterTokenGetModel.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/AlipayDataPrinterTokenGetModel.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/AlipayDataPrinterTokenGetModel.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 AlipayDataPrinterTokenGetModel(object):
def __init__(self):
self._client_id = None
self._grant_type = None
self._scope = None
self._secret = None
@property
... | 26.325581 | 71 | 0.564488 |
337bf60097fcce2767f49f45a85e5fd6ecb75127 | 2,431 | py | Python | games/spiders/game_object.py | jrcowart/megaminer_spring2016 | 115f71dadde49e170af50b2f55127ba184cfb2cb | [
"MIT"
] | 4 | 2016-07-25T01:06:05.000Z | 2018-11-17T09:02:43.000Z | games/spiders/game_object.py | jrcowart/megaminer_spring2016 | 115f71dadde49e170af50b2f55127ba184cfb2cb | [
"MIT"
] | null | null | null | games/spiders/game_object.py | jrcowart/megaminer_spring2016 | 115f71dadde49e170af50b2f55127ba184cfb2cb | [
"MIT"
] | 2 | 2018-11-17T09:02:43.000Z | 2019-11-13T11:09:41.000Z | # Generated by Creer at 10:56PM on April 20, 2016 UTC, git hash: '087b1901032ab5bed5806b24830233eac5c2de55'
# This is a simple class to represent the GameObject object in the game. You can extend it by adding utility functions here in this file.
from joueur.base_game_object import BaseGameObject
# <<-- Creer-Merge: i... | 36.283582 | 202 | 0.679556 |
337c0faa676eed68089f31724096573b565fd225 | 19,884 | py | Python | ml_data.py | lauromoraes/promoter_paper | 62aea776cb318a13e142f84dd84bb0a29fb0e83f | [
"Apache-2.0"
] | null | null | null | ml_data.py | lauromoraes/promoter_paper | 62aea776cb318a13e142f84dd84bb0a29fb0e83f | [
"Apache-2.0"
] | 9 | 2020-08-12T18:08:46.000Z | 2022-03-12T00:46:11.000Z | ml_data.py | lauromoraes/promoter_paper | 62aea776cb318a13e142f84dd84bb0a29fb0e83f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 31 15:44:05 2017
@author: fnord
"""
import numpy as np
# ================================================================
# BaseData =======================================================
# ============================================... | 35.068783 | 136 | 0.493613 |
337c28bdb861cc743dfe82fb0fee585a96a77ca3 | 960 | py | Python | flexget/plugins/estimators/est_released_movies.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/estimators/est_released_movies.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/estimators/est_released_movies.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from datetime import datetime
import logging
from flexget import plugin
from flexget.event import event
log = logging.getLogger('est_movies')
class EstimatesReleasedMovies(o... | 32 | 107 | 0.69375 |
337c4a5d9694640552d313bca368f3e3b7ea1842 | 4,983 | py | Python | Stereo-Vision-System/bergar/com.simonsen.stereovision/Processing/Image.py | tonybeltramelli/Graphics-And-Vision | a1dbeada8e907b119ecce1fe421ae91e64ff3371 | [
"Apache-2.0"
] | 12 | 2017-05-26T12:04:38.000Z | 2021-07-11T04:42:19.000Z | Stereo-Vision-System/bergar/com.simonsen.stereovision/Processing/Image.py | tonybeltramelli/Graphics-And-Vision | a1dbeada8e907b119ecce1fe421ae91e64ff3371 | [
"Apache-2.0"
] | null | null | null | Stereo-Vision-System/bergar/com.simonsen.stereovision/Processing/Image.py | tonybeltramelli/Graphics-And-Vision | a1dbeada8e907b119ecce1fe421ae91e64ff3371 | [
"Apache-2.0"
] | 4 | 2017-05-09T08:26:44.000Z | 2018-04-23T03:16:01.000Z | #<!--------------------------------------------------------------------------->
#<!-- ITU - IT University of Copenhagen -->
#<!-- SSS - Software and Systems Section -->
#<!-- File : Image.py -... | 45.3 | 89 | 0.430464 |
337c59aff63d5fed88f593f1c2fc399ae66d94c2 | 6,512 | py | Python | influxdb_client/domain/pkg_summary_diff_buckets.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/pkg_summary_diff_buckets.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/pkg_summary_diff_buckets.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class PkgS... | 26.798354 | 127 | 0.582924 |
337c6780b5869c9338333f8640d663b5e01426dc | 6,271 | py | Python | alipay/aop/api/domain/AlipayEbppInvoiceExpensecontrolQuotaCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayEbppInvoiceExpensecontrolQuotaCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayEbppInvoiceExpensecontrolQuotaCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayEbppInvoiceExpensecontrolQuotaCreateModel(object):
def __init__(self):
self._account_id = None
self._agreement_no = None
self._effective_end_date = None
self... | 32.832461 | 91 | 0.610588 |
337c78f5f240b2aa01d154f163df8a4b063d71d3 | 1,084 | py | Python | backend/report/usage.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 7 | 2018-05-20T08:56:08.000Z | 2022-03-11T15:50:54.000Z | backend/report/usage.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 2 | 2021-06-08T21:12:51.000Z | 2022-01-13T01:25:27.000Z | backend/report/usage.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 5 | 2016-10-09T14:52:09.000Z | 2020-12-25T01:04:35.000Z | import logbook
from report import Report
from model import ServiceUsage
class UsageReport(Report):
report_type = "usage"
def aggregate(self, report_id):
logbook.info("Get usage aggregation for {}", report_id)
usage_by_customer = ServiceUsage.customers_get_usage(report_id.start, report_id.end... | 29.297297 | 92 | 0.629151 |
337c83619b098246038c8a67d96a063b5a4df80d | 7,963 | py | Python | src/logger.py | sofiary/EtherMineLogger | 04240723d8ba003918bffc8e28fcdde836127873 | [
"MIT"
] | null | null | null | src/logger.py | sofiary/EtherMineLogger | 04240723d8ba003918bffc8e28fcdde836127873 | [
"MIT"
] | null | null | null | src/logger.py | sofiary/EtherMineLogger | 04240723d8ba003918bffc8e28fcdde836127873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from datetime import datetime
from getpass import getpass
import json
import os
import psycopg2
import sys
from threading import Thread, Event
import urllib.request
# Database defaults. User can change as required.
PG_PARAMS = {
'dbname': 'emldb',
'user': 'emluser',
'host': 'localho... | 44.988701 | 96 | 0.543011 |
337cb3474fc3dde65eafb447173a55d5c92081bd | 3,217 | py | Python | bitbots_head_behaviour/src/bitbots_head_behaviour/decisions/search_and_confirm.py | TAMS-Group/bitbots_behaviour | 84f713060e6be0803dff1bc3df1bdef49bef02e3 | [
"BSD-3-Clause"
] | null | null | null | bitbots_head_behaviour/src/bitbots_head_behaviour/decisions/search_and_confirm.py | TAMS-Group/bitbots_behaviour | 84f713060e6be0803dff1bc3df1bdef49bef02e3 | [
"BSD-3-Clause"
] | null | null | null | bitbots_head_behaviour/src/bitbots_head_behaviour/decisions/search_and_confirm.py | TAMS-Group/bitbots_behaviour | 84f713060e6be0803dff1bc3df1bdef49bef02e3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
"""
SearchAndConfirm
^^^^^^^^^^^^^^^^
Searches and confirms the goal or ball
"""
import rospy
from bitbots_head_behaviour.actions.look_at import LookAtBall, LookAtGoal
from bitbots_head_behaviour.decisions.search_for_object import SearchForBall, SearchForEnemyGoal
from bitbots_stackmachine.abs... | 33.164948 | 105 | 0.686665 |
337cd70a02bdf0fb77166ed09653790de6804085 | 1,598 | py | Python | tests/common/test_op/resnet/fused_bn_update_grad.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_op/resnet/fused_bn_update_grad.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_op/resnet/fused_bn_update_grad.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 36.318182 | 103 | 0.744681 |
337cd9660084c2696817f214a4111a86accfe14e | 7,252 | py | Python | verstack/categoric_encoders/WeightOfEvidenceEncoder.py | DanilZherebtsov/verstack | 56a5f4f8a7dbae17866fbffd45ef0e781bd59215 | [
"MIT"
] | 23 | 2020-09-18T22:38:03.000Z | 2022-02-22T18:30:59.000Z | verstack/categoric_encoders/WeightOfEvidenceEncoder.py | DanilZherebtsov/verstack | 56a5f4f8a7dbae17866fbffd45ef0e781bd59215 | [
"MIT"
] | 9 | 2020-12-05T15:31:14.000Z | 2022-03-17T07:01:44.000Z | verstack/categoric_encoders/WeightOfEvidenceEncoder.py | DanilZherebtsov/verstack | 56a5f4f8a7dbae17866fbffd45ef0e781bd59215 | [
"MIT"
] | 2 | 2020-12-01T23:00:03.000Z | 2021-11-05T11:50:07.000Z | import pandas as pd
import numpy as np
from verstack.categoric_encoders.args_validators import is_bool_na_sentinel, assert_fit_transform_args, assert_transform_args, assert_binary_target
class WeightOfEvidenceEncoder():
'''
Encoder to represent categoric variables by Weight of evidence in regards to the binary... | 41.44 | 150 | 0.637617 |
337cf6891a50f1bef027514f9e9d8365638f5e75 | 4,342 | py | Python | Tools/scons/scons-local/SCons/Platform/posix.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Tools/scons/scons-local/SCons/Platform/posix.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Tools/scons/scons-local/SCons/Platform/posix.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | """SCons.Platform.posix
Platform-specific initialization for POSIX (Linux, UNIX, etc.) systems.
There normally shouldn't be any need to import this module directly. It
will usually be imported through the generic SCons.Platform.Platform()
selection method.
"""
#
# Copyright (c) 2001 - 2017 The SCons Found... | 34.188976 | 77 | 0.637264 |
337d09639a3ef7375dacec9fc6755cad38bc4998 | 1,401 | py | Python | rateapp/urls.py | Mark-Muiri/rater | 865d4450b9c41f4ed12bd5a540b3c31419450902 | [
"MIT"
] | null | null | null | rateapp/urls.py | Mark-Muiri/rater | 865d4450b9c41f4ed12bd5a540b3c31419450902 | [
"MIT"
] | null | null | null | rateapp/urls.py | Mark-Muiri/rater | 865d4450b9c41f4ed12bd5a540b3c31419450902 | [
"MIT"
] | null | null | null | """rateapp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 41.205882 | 106 | 0.716631 |
337d16847992d0f6d291014e9cf50ec851dd3eac | 6,748 | py | Python | ui/camera.py | aditiapratama/blenderseed | 667af6742af4a2a4b94fbad1e0732dd56724afb1 | [
"MIT"
] | 256 | 2015-03-29T06:17:49.000Z | 2022-03-31T03:45:52.000Z | ui/camera.py | aditiapratama/blenderseed | 667af6742af4a2a4b94fbad1e0732dd56724afb1 | [
"MIT"
] | 366 | 2017-02-06T18:45:01.000Z | 2021-09-22T07:25:13.000Z | ui/camera.py | aditiapratama/blenderseed | 667af6742af4a2a4b94fbad1e0732dd56724afb1 | [
"MIT"
] | 56 | 2015-03-09T09:02:57.000Z | 2022-01-07T15:53:43.000Z | #
# This source file is part of appleseed.
# Visit https://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2019 Jonathan Dent, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
#... | 33.909548 | 113 | 0.661529 |
337d33b5dab9a3f315ee8375b07a07210749c8e3 | 2,659 | py | Python | nvflare/app_common/pt/pt_file_model_locator.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 155 | 2021-08-05T18:05:09.000Z | 2022-03-27T15:32:56.000Z | nvflare/app_common/pt/pt_file_model_locator.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 216 | 2021-12-01T06:07:12.000Z | 2022-03-30T23:34:02.000Z | nvflare/app_common/pt/pt_file_model_locator.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 44 | 2021-11-24T16:03:29.000Z | 2022-03-24T23:28:39.000Z | # Copyright (c) 2021-2022, NVIDIA CORPORATION. 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 ... | 35.932432 | 109 | 0.701768 |
337d4f181d6a8192215ccd63f95afb6ea749c421 | 851 | py | Python | beacon_controller/controllers/main_controller.py | NCATS-Tangerine/tkg-beacon | a1738a9a852554427deccd3e6b7a910354af9fbb | [
"MIT"
] | 1 | 2019-07-29T08:17:37.000Z | 2019-07-29T08:17:37.000Z | beacon_controller/controllers/main_controller.py | NCATS-Tangerine/tkg-beacon | a1738a9a852554427deccd3e6b7a910354af9fbb | [
"MIT"
] | 7 | 2018-08-03T17:11:55.000Z | 2019-02-19T20:10:15.000Z | beacon_controller/controllers/main_controller.py | NCATS-Tangerine/tkg-beacon | a1738a9a852554427deccd3e6b7a910354af9fbb | [
"MIT"
] | null | null | null | import connexion
from swagger_server import encoder
from flask import redirect
from beacon_controller import config
BASEPATH = f'/beacon/{config["beacon_name"]}/'
def main(name:str):
"""
Usage in swagger_server/main.py:
from beacon_controller import run
if __name__ == '__main__':
... | 25.029412 | 86 | 0.663925 |
337d5c7ebd8cf683b5e6fb810357aa08410e24f4 | 2,778 | py | Python | appengine/predator/app/backend/handlers/update_component_config.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/predator/app/backend/handlers/update_component_config.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/predator/app/backend/handlers/update_component_config.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 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.
"""Handler to update component classifier config."""
from collections import defaultdict
import json
import logging
import traceback
from google.appengine.... | 34.296296 | 77 | 0.740821 |
337d934896fd961d9bdebb3e419629b01027e00b | 1,669 | py | Python | services/storage/tests/test_resources.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | services/storage/tests/test_resources.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | 2 | 2018-05-13T09:10:57.000Z | 2019-03-06T08:10:40.000Z | services/storage/tests/test_resources.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | # pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-import
import io
import logging
import pathlib
import pytest
# under test
from simcore_service_storage.resources import resources
from simcore_service_storage.settings import RSC_CONFIG_DIR_KEY
log = logging.getLogger(... | 28.288136 | 99 | 0.69263 |
337d9cbc9aadd61a6fc47ea7cef70cc698e3829a | 3,911 | py | Python | experiments/ashvin/icml2020/hand/pen/gaussian2/awr_beta1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/gaussian2/awr_beta1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/gaussian2/awr_beta1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.sac.policies import GaussianP... | 31.540323 | 130 | 0.571209 |
337dc117bf9ba650d3fa5c55ccc2edbf0dce58da | 226 | py | Python | pyvirtualdisplay/examples/lowres.py | Mrfranken/PyVirtualDisplay | b3d45024d1d55033af69d1af29f56fc04e4e4209 | [
"BSD-2-Clause"
] | null | null | null | pyvirtualdisplay/examples/lowres.py | Mrfranken/PyVirtualDisplay | b3d45024d1d55033af69d1af29f56fc04e4e4209 | [
"BSD-2-Clause"
] | null | null | null | pyvirtualdisplay/examples/lowres.py | Mrfranken/PyVirtualDisplay | b3d45024d1d55033af69d1af29f56fc04e4e4209 | [
"BSD-2-Clause"
] | null | null | null | from easyprocess import EasyProcess
from pyvirtualdisplay import Display
if __name__ == "__main__":
# start Xephyr
Display(visible=1, size=(320, 240)).start()
# start Gnumeric
EasyProcess("gnumeric").start()
| 22.6 | 47 | 0.712389 |
337dd62345c269677bc2a27723052b75a3b8f86a | 2,332 | py | Python | nova/tests/functional/api_sample_tests/test_virtual_interfaces.py | windskyer/nova | df485344dfd0f9e927e51273a3aaa71d948f2980 | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/api_sample_tests/test_virtual_interfaces.py | windskyer/nova | df485344dfd0f9e927e51273a3aaa71d948f2980 | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/api_sample_tests/test_virtual_interfaces.py | windskyer/nova | df485344dfd0f9e927e51273a3aaa71d948f2980 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | 38.229508 | 78 | 0.694683 |
337de6d7cfb4d16ba8a13d3ac831c452c78377a2 | 1,685 | py | Python | tests/logmongo_test.py | RobertoPrevato/Flask-three-template | 00b7dd6dd299a1fd91f08f60007fe09235216096 | [
"MIT"
] | 7 | 2015-11-19T20:45:16.000Z | 2020-04-22T22:18:34.000Z | tests/logmongo_test.py | RobertoPrevato/Flask-three-template | 00b7dd6dd299a1fd91f08f60007fe09235216096 | [
"MIT"
] | null | null | null | tests/logmongo_test.py | RobertoPrevato/Flask-three-template | 00b7dd6dd299a1fd91f08f60007fe09235216096 | [
"MIT"
] | 2 | 2016-10-08T20:09:06.000Z | 2020-04-22T22:18:36.000Z | """
* Flask-three-template 1.0.0
* https://github.com/RobertoPrevato/Flask-three-template
*
* Copyright 2015, Roberto Prevato roberto.prevato@gmail.com
* http://ugrose.com
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*
* Tests for the log in MongoDB.
"""
import server
import unittest
fro... | 24.779412 | 95 | 0.620772 |
337dfd3bbbb77fdcbf9594fbf23a59423b1c1691 | 1,823 | py | Python | test/test_showinfo.py | olehermanse/cfbs | ac504410ab46f39001d3af4e8742da77b04fd1f4 | [
"MIT"
] | 3 | 2021-12-10T12:14:21.000Z | 2022-03-03T13:08:40.000Z | test/test_showinfo.py | olehermanse/cfbs | ac504410ab46f39001d3af4e8742da77b04fd1f4 | [
"MIT"
] | 15 | 2021-07-15T12:28:45.000Z | 2022-03-17T08:21:57.000Z | test/test_showinfo.py | olehermanse/cfbs | ac504410ab46f39001d3af4e8742da77b04fd1f4 | [
"MIT"
] | 4 | 2021-07-14T14:20:02.000Z | 2021-11-05T13:31:30.000Z | import os
import re
import pytest
from cfbs.commands import info_command, clear_definition
@pytest.mark.parametrize("chdir", ["sample"], indirect=True)
def test_noargs(capfd, chdir):
clear_definition()
info_command([])
out, _ = capfd.readouterr()
assert out == "\n"
@pytest.mark.parametrize("chdir", ... | 22.231707 | 87 | 0.672518 |
337e07e85a4d940ac87009feec387b86a998d3c4 | 120 | py | Python | alphatwirl_interface/heppy/__init__.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | null | null | null | alphatwirl_interface/heppy/__init__.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | 4 | 2018-03-05T13:48:26.000Z | 2018-03-19T12:28:56.000Z | alphatwirl_interface/heppy/__init__.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | 1 | 2018-02-15T17:10:23.000Z | 2018-02-15T17:10:23.000Z | from .framework_heppy import FrameworkHeppy
from .parallel import build_parallel
from .profile_func import profile_func
| 30 | 43 | 0.875 |
337e08db2ba8deb7e6edeea80daec3b6cbe20c43 | 141 | py | Python | ThirdParty/Twisted/twisted/runner/_version.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 1 | 2021-10-13T01:57:14.000Z | 2021-10-13T01:57:14.000Z | ThirdParty/Twisted/twisted/runner/_version.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/Twisted/twisted/runner/_version.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | # This is an auto-generated file. Do not edit it.
from twisted.python import versions
version = versions.Version('twisted.runner', 12, 3, 0)
| 35.25 | 54 | 0.751773 |
337e139bff8621552e1ca44df5eb34ea0ff0bb2d | 7,485 | py | Python | versatileimagefield/utils.py | Yuego/django-versatileimagefield | beb1dd66ec486de1b8a9774e4e3856e70ebfc9f4 | [
"MIT"
] | null | null | null | versatileimagefield/utils.py | Yuego/django-versatileimagefield | beb1dd66ec486de1b8a9774e4e3856e70ebfc9f4 | [
"MIT"
] | null | null | null | versatileimagefield/utils.py | Yuego/django-versatileimagefield | beb1dd66ec486de1b8a9774e4e3856e70ebfc9f4 | [
"MIT"
] | null | null | null | from functools import reduce
import os
import magic
from django.core.exceptions import ImproperlyConfigured
from .settings import (
IMAGE_SETS,
JPEG_QUAL,
VERSATILEIMAGEFIELD_POST_PROCESSOR,
VERSATILEIMAGEFIELD_SIZED_DIRNAME,
VERSATILEIMAGEFIELD_FILTERED_DIRNAME,
WEBP_QUAL,
)
# PIL-supported... | 29.820717 | 83 | 0.635003 |
337e3c4f132efedea8ba40f19cc8cdf2fe9cbb4c | 1,206 | py | Python | pytablereader/csv/formatter.py | sthagen/thombashi-pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 81 | 2017-03-18T02:57:29.000Z | 2022-03-26T16:54:59.000Z | pytablereader/csv/formatter.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 4 | 2017-08-09T14:58:48.000Z | 2020-04-17T12:59:29.000Z | pytablereader/csv/formatter.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 11 | 2017-05-02T16:23:59.000Z | 2021-12-10T15:05:39.000Z | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import typepy
from tabledata import TableData
from pytablereader import DataError
from ..formatter import TableFormatter
class CsvTableFormatter(TableFormatter):
def to_table_data(self):
if typepy.is_empty_sequence(self._loader.hea... | 28.714286 | 74 | 0.61194 |
337e9293734205b0b81b6e584cc35723b3cf2f04 | 7,662 | py | Python | docs/gem5-configs/configs-microbenchmark-test/run_config1.py | darchr/gem5art | 4a0f47d1103ff68883bb0707cd888c6ac9ade775 | [
"BSD-3-Clause"
] | 19 | 2020-02-05T08:26:30.000Z | 2022-03-04T09:08:37.000Z | docs/gem5-configs/configs-microbenchmark-test/run_config1.py | darchr/gem5art | 4a0f47d1103ff68883bb0707cd888c6ac9ade775 | [
"BSD-3-Clause"
] | 93 | 2019-10-28T22:17:25.000Z | 2021-07-01T10:20:28.000Z | docs/gem5-configs/configs-microbenchmark-test/run_config1.py | darchr/gem5art | 4a0f47d1103ff68883bb0707cd888c6ac9ade775 | [
"BSD-3-Clause"
] | 15 | 2020-02-05T09:30:19.000Z | 2021-07-29T04:50:46.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018 The Regents of the University of California
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source code must retain the above copy... | 34.358744 | 83 | 0.684547 |
337ecc9d9988821965cad1098904fa52507f916c | 2,340 | py | Python | pytorch_widedeep/losses.py | FlyingWing/pytorch-widedeep | 91a255d08bc9bdd5a05669465b7cf0313849ec9c | [
"MIT"
] | null | null | null | pytorch_widedeep/losses.py | FlyingWing/pytorch-widedeep | 91a255d08bc9bdd5a05669465b7cf0313849ec9c | [
"MIT"
] | null | null | null | pytorch_widedeep/losses.py | FlyingWing/pytorch-widedeep | 91a255d08bc9bdd5a05669465b7cf0313849ec9c | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from .wdtypes import *
use_cuda = torch.cuda.is_available()
class FocalLoss(nn.Module):
r"""Implementation of the `focal loss
<https://arxiv.org/pdf/1708.02002.pdf>`_ for both binary and
multiclass classification
Parameters
----... | 31.2 | 88 | 0.548718 |
337edf9f26ba2447b547c9a310634b3fbf39a64d | 2,397 | py | Python | tests/unitary/LiquidityGaugeV4/test_deposit_withdraw.py | hedgx/ribbonomics | 84a212a82eaaa2824ebe3c072413e143eaca02a2 | [
"MIT"
] | 2 | 2022-01-13T21:11:30.000Z | 2022-03-10T08:20:42.000Z | tests/unitary/LiquidityGaugeV4/test_deposit_withdraw.py | hedgx/ribbonomics | 84a212a82eaaa2824ebe3c072413e143eaca02a2 | [
"MIT"
] | null | null | null | tests/unitary/LiquidityGaugeV4/test_deposit_withdraw.py | hedgx/ribbonomics | 84a212a82eaaa2824ebe3c072413e143eaca02a2 | [
"MIT"
] | 2 | 2022-01-30T20:54:55.000Z | 2022-03-05T17:49:19.000Z | import brownie
import pytest
@pytest.fixture(scope="module", autouse=True)
def deposit_setup(accounts, gauge_v4, mock_lp_token):
mock_lp_token.approve(gauge_v4, 2 ** 256 - 1, {"from": accounts[0]})
def test_deposit(accounts, gauge_v4, mock_lp_token):
balance = mock_lp_token.balanceOf(accounts[0])
gauge_... | 34.73913 | 73 | 0.722153 |
337f0bf6d25c700d46e535ba44ff0da059eaf97c | 2,422 | py | Python | whales_meta.py | deepbuzin/humpback-whale-identification | fc4ad7cd0cdb6c76490ee6ba5e100a96c318a2fb | [
"MIT"
] | 1 | 2019-02-16T04:41:32.000Z | 2019-02-16T04:41:32.000Z | whales_meta.py | deepbuzin/humpback-whale-identification | fc4ad7cd0cdb6c76490ee6ba5e100a96c318a2fb | [
"MIT"
] | null | null | null | whales_meta.py | deepbuzin/humpback-whale-identification | fc4ad7cd0cdb6c76490ee6ba5e100a96c318a2fb | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import cv2
import os
from utils.preprocessing import fetch, pad, resize
DATA_DIR = 'D:\\IdeaProjects\\whales\\data\\train'
META_DIR = 'D:\\IdeaProjects\\whales\\data\\meta'
THUMB_SHAPE = (50, 50, 3)
NUM_ROWS = 23
def fetch_img(filename, target_shape=(50, 50, 3)):
img = cv2.... | 35.617647 | 136 | 0.656069 |
337f1b568a771cca8ac3517175d8916d731c5dd2 | 3,472 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/postgres/fields/hstore.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/postgres/fields/hstore.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/postgres/fields/hstore.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import json
from django.contrib.postgres import forms, lookups
from django.contrib.postgres.fields.array import ArrayField
from django.core import exceptions
from django.db.models import Field, TextField, Transform
from django.utils import six
from django.utils.encoding import force_text
from django.utils.tran... | 30.725664 | 78 | 0.633353 |
337f1d4716bec8e710e4bb0ee58ba5491d00bca4 | 10,037 | py | Python | python/nano/test/automl/tf/test_usecases.py | StevenGolden1203/BigDL | 2ae276fcdc3dc63a93917e5fe75d185696139a63 | [
"Apache-2.0"
] | null | null | null | python/nano/test/automl/tf/test_usecases.py | StevenGolden1203/BigDL | 2ae276fcdc3dc63a93917e5fe75d185696139a63 | [
"Apache-2.0"
] | null | null | null | python/nano/test/automl/tf/test_usecases.py | StevenGolden1203/BigDL | 2ae276fcdc3dc63a93917e5fe75d185696139a63 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL 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 ... | 37.875472 | 96 | 0.617017 |
337f207858b3c10f19ca739cab84ef76ad8d33a6 | 1,900 | py | Python | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetSummaryResponse.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/ModeldbGetSummaryResponse.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/ModeldbGetSummaryResponse.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 ModeldbGetSummaryResponse(BaseType):
def __init__(self, name=None, last_updated_time=None, total_experiment=None, total_experiment_runs=None, last_modified_experimentRun_summary=None, metrics=None):
required = {
... | 33.928571 | 163 | 0.71 |
337f3463adf872ad2ed054fef79cbe1c91741457 | 2,839 | py | Python | planetmint/log.py | liviu-lesan/planetmint | 54cf8e45108947aa8282ddaaf127d08e06ce842e | [
"Apache-2.0"
] | null | null | null | planetmint/log.py | liviu-lesan/planetmint | 54cf8e45108947aa8282ddaaf127d08e06ce842e | [
"Apache-2.0"
] | null | null | null | planetmint/log.py | liviu-lesan/planetmint | 54cf8e45108947aa8282ddaaf127d08e06ce842e | [
"Apache-2.0"
] | null | null | null | # Copyright © 2020 Interplanetary Database Association e.V.,
# Planetmint and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
import planetmint
import logging
from planetmint.common.exceptions import ConfigurationError
from logging.config i... | 34.621951 | 74 | 0.703064 |
337f6bec0769991b28ea1ae8749cede49b3c1912 | 5,284 | py | Python | questioner/apps/questions/views.py | sam-karis/questioner-api | bbffe431cc94fc2eeaae29600fb546a1f483920d | [
"MIT"
] | null | null | null | questioner/apps/questions/views.py | sam-karis/questioner-api | bbffe431cc94fc2eeaae29600fb546a1f483920d | [
"MIT"
] | null | null | null | questioner/apps/questions/views.py | sam-karis/questioner-api | bbffe431cc94fc2eeaae29600fb546a1f483920d | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.generics import RetrieveDestroyAPIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework.exceptions import NotFound
from rest_framework.permissions import (
IsAuthenticatedOrReadOnly, IsAuthenticated
)
from... | 35.226667 | 76 | 0.660863 |
337fca407e555726c5a3fa6f6f8a8effcbf28fea | 172 | py | Python | src/__init__.py | uci-cbcl/HLA-bind | 20ed937daaf1d41c9b4083a6a87279de42917718 | [
"MIT"
] | 25 | 2017-01-10T20:31:47.000Z | 2021-12-29T17:16:47.000Z | src/__init__.py | uci-cbcl/HLA-bind | 20ed937daaf1d41c9b4083a6a87279de42917718 | [
"MIT"
] | 2 | 2017-04-24T07:20:29.000Z | 2017-08-02T20:17:35.000Z | src/__init__.py | uci-cbcl/HLA-bind | 20ed937daaf1d41c9b4083a6a87279de42917718 | [
"MIT"
] | 12 | 2017-03-16T06:43:37.000Z | 2020-04-15T08:01:30.000Z | """
Boeing Proprietary, Confidential and/or Trade Secret
Copyright (c) 2017 Boeing. Unpublished Work. All Rights Reserved.
@author: Yeeleng.S.Vang@boeing.com
"""
| 24.571429 | 67 | 0.72093 |
337fce82cafe859cf8c9c5ae7a39683acc5cb253 | 7,481 | py | Python | setup.py | ivanov/attending | cdc493380bb657259a5fca854347fa7119fafe1d | [
"BSD-3-Clause"
] | 2 | 2019-07-13T20:08:13.000Z | 2019-07-14T22:10:00.000Z | setup.py | ivanov/attending | cdc493380bb657259a5fca854347fa7119fafe1d | [
"BSD-3-Clause"
] | 31 | 2019-05-09T18:52:48.000Z | 2019-09-10T22:26:07.000Z | setup.py | ivanov/attending | cdc493380bb657259a5fca854347fa7119fafe1d | [
"BSD-3-Clause"
] | 3 | 2019-05-07T15:21:31.000Z | 2019-09-14T04:00:44.000Z | """attending: the docs in!
A python package which brings offline docs with an impeccable bedside manner.
See:
https://github.com/ivanov/attending
"""
# Always prefer setuptools over distutils
from setuptools import setup
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description fro... | 41.331492 | 108 | 0.68948 |
337fd7d02ec562743218d6c305019150196ad817 | 12,500 | py | Python | pytorch_toolkit/formula_recognition/im2latex/models/text_recognition_heads/attention_based.py | LeonidBeynenson/openvino_training_extensions | c7e6d58c9e715c0f38c864c7d47910362d322aac | [
"Apache-2.0"
] | 3 | 2020-12-29T02:47:32.000Z | 2021-11-12T08:12:51.000Z | pytorch_toolkit/formula_recognition/im2latex/models/text_recognition_heads/attention_based.py | maxpark/openvino_training_extensions | 98450ed8aeab8a003e1d19b49b6fb0da60388605 | [
"Apache-2.0"
] | null | null | null | pytorch_toolkit/formula_recognition/im2latex/models/text_recognition_heads/attention_based.py | maxpark/openvino_training_extensions | 98450ed8aeab8a003e1d19b49b6fb0da60388605 | [
"Apache-2.0"
] | null | null | null | """
MIT License
Copyright (c) 2019 luopeixiang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... | 41.666667 | 111 | 0.62744 |
337fea3a8212cf44ec06a8f70bd512291e816d32 | 567 | py | Python | blousebrothers/confs/migrations/0058_auto_20180717_1352.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | blousebrothers/confs/migrations/0058_auto_20180717_1352.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | blousebrothers/confs/migrations/0058_auto_20180717_1352.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-07-17 13:52
from __future__ import unicode_literals
from decimal import Decimal
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('confs', '0057_auto_20180716_1504'),
]
operations = [
... | 25.772727 | 136 | 0.64903 |
33804b58b9df5b0cbdcfd0084be926c8aa99e475 | 6,832 | py | Python | taskflow/examples/fake_billing.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 299 | 2015-01-11T01:36:28.000Z | 2022-03-11T08:56:27.000Z | taskflow/examples/fake_billing.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 4 | 2015-02-06T11:12:58.000Z | 2018-10-19T18:55:58.000Z | taskflow/examples/fake_billing.py | jimbobhickville/taskflow | 6ea991ce94f5be46b7e4726b4c4f014e10407786 | [
"Apache-2.0"
] | 67 | 2015-01-11T14:34:24.000Z | 2022-01-14T02:57:03.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2013 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | 36.534759 | 79 | 0.696282 |
33807224109a48e78040ed14f6091ffabe4596c2 | 1,502 | py | Python | exercise_5/exercise_5.py | best4281/programming-practice-2021 | 39e826661430f00c1a2aaebd36ceff5e50f98f89 | [
"MIT"
] | null | null | null | exercise_5/exercise_5.py | best4281/programming-practice-2021 | 39e826661430f00c1a2aaebd36ceff5e50f98f89 | [
"MIT"
] | null | null | null | exercise_5/exercise_5.py | best4281/programming-practice-2021 | 39e826661430f00c1a2aaebd36ceff5e50f98f89 | [
"MIT"
] | null | null | null | import node2 as n
host = "localhost"
def exercise_5(inputs): # DO NOT CHANGE THIS LINE
for port in range (8001, 8021):
try:
node = n.Node("localhost", port)
node.start()
break
except:
continue
try:
node.connect_to("localhost", port-1... | 30.04 | 69 | 0.611185 |
33808b707144039e47c93ccfdbca1aedd89311cd | 88,516 | py | Python | pymatgen/io/vasp/inputs.py | chunweizhu/pymatgen | acfe5899ee50add1e2a0dd6385ee4fba78122e0f | [
"MIT"
] | 1 | 2021-02-12T11:21:56.000Z | 2021-02-12T11:21:56.000Z | pymatgen/io/vasp/inputs.py | chunweizhu/pymatgen | acfe5899ee50add1e2a0dd6385ee4fba78122e0f | [
"MIT"
] | null | null | null | pymatgen/io/vasp/inputs.py | chunweizhu/pymatgen | acfe5899ee50add1e2a0dd6385ee4fba78122e0f | [
"MIT"
] | null | null | null | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Classes for reading/manipulating/writing VASP input files. All major VASP input
files.
"""
import glob
import itertools
import json
import logging
import math
import os
import re
import subprocess
import s... | 36.728631 | 118 | 0.546263 |
338090fa60fc0bdbbb42b0ecdfeeca90cc1494ee | 2,297 | py | Python | sdks/python/appcenter_sdk/models/VSTSAccounts.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/VSTSAccounts.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/VSTSAccounts.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class VSTSAccounts(o... | 27.674699 | 80 | 0.554201 |
3380c801df7eb67c44cf9df3d62b3a77914530a1 | 6,522 | py | Python | trax/rl/base_trainer.py | yakovkeselman/trax | 615432bbc58ffb5bdf83a771e8f8b470995456db | [
"Apache-2.0"
] | 1 | 2020-03-15T00:50:06.000Z | 2020-03-15T00:50:06.000Z | trax/rl/base_trainer.py | ZachT1711/trax | a0a3dd8d49e53fc48bb24cc08c10a8a53517e7bc | [
"Apache-2.0"
] | null | null | null | trax/rl/base_trainer.py | ZachT1711/trax | a0a3dd8d49e53fc48bb24cc08c10a8a53517e7bc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Trax 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 a... | 32.287129 | 80 | 0.707605 |
3380c8191160bf7d8398e48cbae970d47f6e8fb7 | 4,903 | py | Python | chapter3/fannsdb/fannsdb/ops/fetch.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | 1 | 2015-12-22T00:53:18.000Z | 2015-12-22T00:53:18.000Z | chapter3/fannsdb/fannsdb/ops/fetch.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | chapter3/fannsdb/fannsdb/ops/fetch.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import os
import logging
from datetime import datetime as dt
from bgcore import tsv
from fannsdb.mutations.mutation import Mutation
from fannsdb.mutations.parser import DnaAndProtMutationParser, PrematureEnd, UnexpectedToken
from fannsdb.columns import COORD_COLUMNS
from fannsdb.utils import Rat... | 32.256579 | 122 | 0.682235 |
33810a5a4ea6d3439b3dee7113f5c0df3e1051bf | 3,002 | py | Python | textbox/module/Discriminator/MaliGANDiscriminator.py | StevenTang1998/TextBox | acd8298c7e6618384d585146f799d02cc475520c | [
"MIT"
] | 347 | 2021-01-09T07:55:55.000Z | 2022-03-27T00:46:36.000Z | textbox/module/Discriminator/MaliGANDiscriminator.py | StevenTang1998/TextBox | acd8298c7e6618384d585146f799d02cc475520c | [
"MIT"
] | 18 | 2021-01-12T07:37:06.000Z | 2022-01-11T02:26:49.000Z | textbox/module/Discriminator/MaliGANDiscriminator.py | StevenTang1998/TextBox | acd8298c7e6618384d585146f799d02cc475520c | [
"MIT"
] | 67 | 2021-01-09T07:23:52.000Z | 2022-03-27T12:02:12.000Z | # @Time : 2020/11/17
# @Author : Xiaoxuan Hu
# @Email : huxiaoxuan@ruc.edu.cn
r"""
MaliGAN Discriminator
#####################
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
from textbox.model.abstract_generator import UnconditionalGenerator
class MaliGANDiscriminator(Uncon... | 39.5 | 117 | 0.642239 |
338139101d1de482844cabdaaf04ba17a3dd9531 | 2,117 | py | Python | course/algorithms/bubblesort.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | course/algorithms/bubblesort.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | course/algorithms/bubblesort.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | ''' Docstring: Where you put your notes
Lorem ipsum...
Lorem ipsum...
'''
def bubble_sort(unsorted_list):
''' This is a short description of the function
You can have more info below, this turns into output for the
help() builtin function
'''
# if we were doing from the right to the left
#... | 30.242857 | 93 | 0.605574 |
33814432a3f31519f28f8b36a03701cadd67234a | 2,019 | py | Python | server/framework/__init__.py | tetelevm/OrdeRPG | 5bea9fbaf3fdd84ab14f7e3033e18eead2cf30ab | [
"MIT"
] | null | null | null | server/framework/__init__.py | tetelevm/OrdeRPG | 5bea9fbaf3fdd84ab14f7e3033e18eead2cf30ab | [
"MIT"
] | null | null | null | server/framework/__init__.py | tetelevm/OrdeRPG | 5bea9fbaf3fdd84ab14f7e3033e18eead2cf30ab | [
"MIT"
] | null | null | null | """
A module that is responsible for programming processes, not business
processes.
It is a kind of separate mini-framework, which is an add-on to the more
basic libraries and facilitates the construction of the main application.
Only the standard library and pip-installed modules can be imported into
this module. Th... | 34.220339 | 90 | 0.641902 |
338147549445a018b3092c260b9de63fa8e267d8 | 985 | py | Python | tools/spin-poster/loader.py | DaAwesomeP/ARENA-py | 876a6b0c6800d7c2b1a592fd5f25529b9c140efc | [
"BSD-3-Clause"
] | 4 | 2021-01-22T23:49:52.000Z | 2022-03-04T06:01:18.000Z | tools/spin-poster/loader.py | DaAwesomeP/ARENA-py | 876a6b0c6800d7c2b1a592fd5f25529b9c140efc | [
"BSD-3-Clause"
] | 50 | 2020-08-14T22:24:36.000Z | 2022-03-18T20:41:12.000Z | tools/spin-poster/loader.py | DaAwesomeP/ARENA-py | 876a6b0c6800d7c2b1a592fd5f25529b9c140efc | [
"BSD-3-Clause"
] | 10 | 2019-10-28T20:15:18.000Z | 2021-06-29T18:02:06.000Z | from arena import *
scene = Scene(host="arenaxr.org",scene="spin-poster")
rot=0
start_rot=0
sign_x=0
sign_y=0
sign_z=-10
@scene.run_once
def make_sign():
# Load a model with specific object_id that you will use for addressing later
# The url specifies the GLTF model
sign = GLTF(
object_id="my_si... | 24.02439 | 81 | 0.643655 |
3381626a7190384318c1c90e9b3753559319ef73 | 115 | py | Python | setup.py | tommygod3/gym-mtg | 5dd41e6639cf819e4b59a494eb71b30a7c4b3041 | [
"MIT"
] | null | null | null | setup.py | tommygod3/gym-mtg | 5dd41e6639cf819e4b59a494eb71b30a7c4b3041 | [
"MIT"
] | null | null | null | setup.py | tommygod3/gym-mtg | 5dd41e6639cf819e4b59a494eb71b30a7c4b3041 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='gym_mtg',
version='0.0.1',
install_requires=['gym>=0.2.3']
)
| 16.428571 | 37 | 0.634783 |
33819079b3d60e7111f5f29d9142820f58c9d4ba | 961 | py | Python | dart-env-test.py | googleinterns/gail-dyn | 31c93b12d068dede0dbe69547f0b2e500374f260 | [
"Apache-2.0"
] | null | null | null | dart-env-test.py | googleinterns/gail-dyn | 31c93b12d068dede0dbe69547f0b2e500374f260 | [
"Apache-2.0"
] | null | null | null | dart-env-test.py | googleinterns/gail-dyn | 31c93b12d068dede0dbe69547f0b2e500374f260 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 26.694444 | 75 | 0.701353 |
3381986634c4d72fa8178e9df56878717b3eece3 | 20,825 | py | Python | utils/phase_convert.py | zijinping/relocation | 7de003ee1ef8587e8fcbeba1edd967cdf4c00637 | [
"MIT"
] | null | null | null | utils/phase_convert.py | zijinping/relocation | 7de003ee1ef8587e8fcbeba1edd967cdf4c00637 | [
"MIT"
] | null | null | null | utils/phase_convert.py | zijinping/relocation | 7de003ee1ef8587e8fcbeba1edd967cdf4c00637 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# author: Hardy ZI
# history:
# ...
# 2021-03-15 Add CN2fsdn function
#
import re
from obspy import UTCDateTime
import os
import sys
import time
from utils.basic_utils import str2time
from utils.reloc_related import load_hypoDD
import time
def dd2fdsn(in_file,subset=None)... | 37.05516 | 145 | 0.488932 |
3381c1def255ae2e043e1f96fb57f4894606b083 | 6,458 | py | Python | python_legacy/others_src/pgu/pgu/tilevid.py | garred/only_fighters | 55c3cc06884f3226d75a800e1ee79afd2c23aa8b | [
"CC-BY-3.0",
"CC0-1.0"
] | null | null | null | python_legacy/others_src/pgu/pgu/tilevid.py | garred/only_fighters | 55c3cc06884f3226d75a800e1ee79afd2c23aa8b | [
"CC-BY-3.0",
"CC0-1.0"
] | null | null | null | python_legacy/others_src/pgu/pgu/tilevid.py | garred/only_fighters | 55c3cc06884f3226d75a800e1ee79afd2c23aa8b | [
"CC-BY-3.0",
"CC0-1.0"
] | null | null | null | """Square tile based engine."""
from pgu.vid import *
import pygame
# Quick fix for python3
try:
xrange
except:
xrange = range
class Tilevid(Vid):
"""Based on [[vid]] -- see for reference."""
def paint(self,s):
sw,sh = s.get_width(),s.get_height()
self.view.w,self.view.h = sw,sh
... | 31.970297 | 80 | 0.407247 |
3381d622f3a0093b51a69e0f0a3c3cf5bf5c6b7c | 8,289 | py | Python | dalec/views.py | webu/dalec | ddc4f3c4627c84c5a70e9052d28f77d6ff8755a7 | [
"BSD-3-Clause"
] | null | null | null | dalec/views.py | webu/dalec | ddc4f3c4627c84c5a70e9052d28f77d6ff8755a7 | [
"BSD-3-Clause"
] | null | null | null | dalec/views.py | webu/dalec | ddc4f3c4627c84c5a70e9052d28f77d6ff8755a7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
from copy import copy
import json
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Union, List, Type
from dalec.models import ContentBase
from django.http import HttpRequest
from django.db.models.query import QuerySet
import hashlib
import urllib... | 39.099057 | 99 | 0.618531 |
3381f198ba086c0a1b52b7ef82a48fc44b4643ba | 20,676 | py | Python | gui/kivy/uix/screens.py | schancel/electrum | ee125e0723a9345757b741aed93be906af80d327 | [
"MIT"
] | 1 | 2020-05-24T08:50:13.000Z | 2020-05-24T08:50:13.000Z | gui/kivy/uix/screens.py | Santobak/electrum | ee125e0723a9345757b741aed93be906af80d327 | [
"MIT"
] | null | null | null | gui/kivy/uix/screens.py | Santobak/electrum | ee125e0723a9345757b741aed93be906af80d327 | [
"MIT"
] | 1 | 2017-12-22T03:57:04.000Z | 2017-12-22T03:57:04.000Z | from weakref import ref
from decimal import Decimal
import re
import datetime
import traceback, sys
from kivy.app import App
from kivy.cache import Cache
from kivy.clock import Clock
from kivy.compat import string_types
from kivy.properties import (ObjectProperty, DictProperty, NumericProperty,
... | 33.674267 | 145 | 0.602051 |
3381f971024729491bab00c511cbfc3be4a4c336 | 1,076 | py | Python | MachineLearning/Sarsa/sarsa.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | MachineLearning/Sarsa/sarsa.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | MachineLearning/Sarsa/sarsa.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # coding:UTF-8
# 2018-12-20
from __future__ import print_function
import numpy as np
import time
from env import Env
EPSILON = 0.1
ALPHA = 0.1
GAMMA = 0.9
MAX_STEP = 50
np.random.seed(1)
def epsilon_greedy(Q, state):
if (np.random.uniform() > 1 - EPSILON) or ((Q[state, :] == 0).all()):
action = np.random... | 26.243902 | 80 | 0.605019 |
33822341fc08b55f492187b1fccb57fc720f38bd | 6,452 | py | Python | obsolete/reports/pipeline_capseq/trackers/macs_replicated_interval_tss_distance.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 11 | 2018-09-07T11:33:23.000Z | 2022-01-07T12:16:11.000Z | obsolete/reports/pipeline_capseq/trackers/macs_replicated_interval_tss_distance.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 102 | 2018-03-22T15:35:26.000Z | 2022-03-23T17:46:16.000Z | obsolete/reports/pipeline_capseq/trackers/macs_replicated_interval_tss_distance.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | 7 | 2018-06-11T15:01:41.000Z | 2020-03-31T09:29:33.000Z | import os
import sys
import re
import types
import itertools
import matplotlib.pyplot as plt
import numpy
import numpy.ma
import Stats
import Histogram
import cpgReport
from cgatReport.Tracker import *
from cgatReport.odict import OrderedDict as odict
##################################################################... | 33.780105 | 118 | 0.514259 |
33822aa0443d32be37caa1633bd0969bcd72db60 | 989 | py | Python | pyplan_engine/classes/evaluators/PlotlyEvaluator.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 17 | 2019-12-04T19:22:19.000Z | 2021-07-28T11:17:05.000Z | pyplan_engine/classes/evaluators/PlotlyEvaluator.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 9 | 2019-12-13T15:34:43.000Z | 2022-02-10T11:43:00.000Z | pyplan_engine/classes/evaluators/PlotlyEvaluator.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 5 | 2019-12-04T15:57:06.000Z | 2021-08-20T19:59:26.000Z | import json
from pyplan_engine.classes.evaluators.BaseEvaluator import BaseEvaluator
import plotly.io as pio
from plotly.graph_objs._figure import Figure
class PlotlyEvaluator(BaseEvaluator):
def evaluateNode(self, result, nodeDic, nodeId, dims=None, rows=None, columns=None, summaryBy="sum", bottomTotal=False, r... | 44.954545 | 162 | 0.660263 |
338232a5fe8736b998e5e276a0b6a3b463157aca | 51,505 | py | Python | lbrynet/core/Wallet.py | D474designs/lbry | 149fa625e0ad91da9c227963cb65ca673cdc8af8 | [
"MIT"
] | null | null | null | lbrynet/core/Wallet.py | D474designs/lbry | 149fa625e0ad91da9c227963cb65ca673cdc8af8 | [
"MIT"
] | null | null | null | lbrynet/core/Wallet.py | D474designs/lbry | 149fa625e0ad91da9c227963cb65ca673cdc8af8 | [
"MIT"
] | 1 | 2019-10-12T06:27:28.000Z | 2019-10-12T06:27:28.000Z | from collections import defaultdict, deque
import datetime
import logging
from decimal import Decimal
from zope.interface import implements
from twisted.internet import threads, reactor, defer, task
from twisted.python.failure import Failure
from twisted.internet.error import ConnectionAborted
from lbryum import wall... | 38.842383 | 113 | 0.63854 |
33825cd30fa0963e678361eae23dd0c2f53e70f6 | 3,488 | py | Python | sqlalchemy_collectd/client/tests/test_plugin.py | kulaginds/sqlalchemy-collectd | d9600e19073c852d4445e5977c985be5687b66d1 | [
"MIT"
] | null | null | null | sqlalchemy_collectd/client/tests/test_plugin.py | kulaginds/sqlalchemy-collectd | d9600e19073c852d4445e5977c985be5687b66d1 | [
"MIT"
] | null | null | null | sqlalchemy_collectd/client/tests/test_plugin.py | kulaginds/sqlalchemy-collectd | d9600e19073c852d4445e5977c985be5687b66d1 | [
"MIT"
] | null | null | null | import unittest
import mock
from sqlalchemy.engine import url as sqla_url
from .. import plugin
class PluginTest(unittest.TestCase):
def test_start_no_args(self):
with mock.patch.object(plugin, "start_plugin") as start_plugin:
url = sqla_url.URL("mysql+pymysql://scott:tiger@localhost/")
... | 37.505376 | 79 | 0.581135 |
338260cd44e1d414f4f6503c65e092dd3ee5f0b2 | 381 | py | Python | ivona_speak/__init__.py | Pythonity/ivona-speak | 2ea64f80c547bab3fd6eea9a120b982f9c69e746 | [
"MIT"
] | 21 | 2016-06-07T13:36:40.000Z | 2020-10-30T20:48:43.000Z | ivona_speak/__init__.py | Pythonity/ivona-speak | 2ea64f80c547bab3fd6eea9a120b982f9c69e746 | [
"MIT"
] | 1 | 2017-02-21T16:35:47.000Z | 2017-02-25T12:03:15.000Z | ivona_speak/__init__.py | Pythonity/ivona-speak | 2ea64f80c547bab3fd6eea9a120b982f9c69e746 | [
"MIT"
] | 7 | 2016-08-16T21:04:02.000Z | 2021-12-11T16:12:04.000Z | # -*- coding: utf-8 -*-
"""
ivona_speak - Python script that lets you easily convert passed text to
synthesized audio files, with the help of Amazon's IVONA.
"""
from __future__ import absolute_import, unicode_literals
__title__ = 'ivona_speak'
__version__ = '0.3.0'
__author__ = 'Pythonity'
__license__ ... | 27.214286 | 71 | 0.716535 |
33829ca90a603dab329d840be9038717f901276a | 2,474 | py | Python | examples/Tutorial/HTML/app.py | DrewLazzeriKitware/trame | fdc73f07f17d2601e1b1d3934d2d6326a3c0281e | [
"BSD-3-Clause"
] | null | null | null | examples/Tutorial/HTML/app.py | DrewLazzeriKitware/trame | fdc73f07f17d2601e1b1d3934d2d6326a3c0281e | [
"BSD-3-Clause"
] | null | null | null | examples/Tutorial/HTML/app.py | DrewLazzeriKitware/trame | fdc73f07f17d2601e1b1d3934d2d6326a3c0281e | [
"BSD-3-Clause"
] | null | null | null | from trame.layouts import SinglePage
from trame.html import vtk, vuetify
from vtkmodules.vtkFiltersSources import vtkConeSource
from vtkmodules.vtkRenderingCore import (
vtkActor,
vtkPolyDataMapper,
vtkRenderer,
vtkRenderWindow,
vtkRenderWindowInteractor,
)
# Required for interacter factory initia... | 27.488889 | 79 | 0.556993 |
3382e592cf1a352e55a500c7b50ec1f13e632385 | 1,479 | py | Python | expected_results/page_content/contact_page_content.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 4 | 2019-08-12T19:36:58.000Z | 2021-09-14T18:48:27.000Z | expected_results/page_content/contact_page_content.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 1 | 2021-06-02T00:01:00.000Z | 2021-06-02T00:01:00.000Z | expected_results/page_content/contact_page_content.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 2 | 2019-08-12T10:06:00.000Z | 2020-12-25T05:52:40.000Z | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
from expected_results.page_content.base_page_content import BasePageContent
class ContactPageContent(BasePageContent):
"""
Holds expected results/values for Contact web page
"""
URL = BasePageC... | 28.442308 | 78 | 0.532116 |
3382ec01320e576ebbc4851da533407c1825d36c | 5,151 | py | Python | examples/loss_and_gradient_se3.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | examples/loss_and_gradient_se3.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | examples/loss_and_gradient_se3.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | """
Predict on SE3: losses.
"""
import os
import tensorflow as tf
import geomstats.backend as gs
import geomstats.geometry.lie_group as lie_group
from geomstats.geometry.special_euclidean_group import SpecialEuclideanGroup
from geomstats.geometry.special_orthogonal_group import SpecialOrthogonalGroup
SE3 = Special... | 34.57047 | 78 | 0.625898 |
3383050b21a1f7c88c1ae45c9b3bd50208442268 | 1,890 | py | Python | hs_core/tests/api/native/test_hstore_extra_metadata.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_core/tests/api/native/test_hstore_extra_metadata.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_core/tests/api/native/test_hstore_extra_metadata.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | from django.contrib.auth.models import Group
from django.test import TestCase
from hs_core.hydroshare import resource
from hs_core.hydroshare import users
from hs_core.testing import MockIRODSTestCaseMixin
class TestHStore(MockIRODSTestCaseMixin, TestCase):
def setUp(self):
super(TestHStore, self).setUp... | 34.363636 | 83 | 0.636508 |
33831a21bed466c2fd9124fe6687ba2cd526eb06 | 56 | py | Python | {{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/__init__.py | sondrelg/cookiecutter-flake8-plugin | c631a9828ff1d7e7510a66e063a30b5efc21ad5e | [
"MIT"
] | null | null | null | {{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/__init__.py | sondrelg/cookiecutter-flake8-plugin | c631a9828ff1d7e7510a66e063a30b5efc21ad5e | [
"MIT"
] | null | null | null | {{ cookiecutter.project_slug }}/{{ cookiecutter.project_slug }}/__init__.py | sondrelg/cookiecutter-flake8-plugin | c631a9828ff1d7e7510a66e063a30b5efc21ad5e | [
"MIT"
] | null | null | null | from .plugin import Plugin
__all__ = [
'Plugin',
]
| 9.333333 | 26 | 0.625 |
3383268e5de8dd5a61f3187834427838244c08b7 | 509 | py | Python | components/scream/scripts/query_cime.py | ambrad/scream | 52da60f65e870b8a3994bdbf4a6022fdcac7cab5 | [
"BSD-3-Clause"
] | null | null | null | components/scream/scripts/query_cime.py | ambrad/scream | 52da60f65e870b8a3994bdbf4a6022fdcac7cab5 | [
"BSD-3-Clause"
] | null | null | null | components/scream/scripts/query_cime.py | ambrad/scream | 52da60f65e870b8a3994bdbf4a6022fdcac7cab5 | [
"BSD-3-Clause"
] | null | null | null |
import sys, os
# Add CIME libs to sys path
_CIMEROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..","..","..","cime")
_LIB_DIR = os.path.join(_CIMEROOT)
sys.path.append(_LIB_DIR)
from CIME.XML.machines import Machines
###############################################################################
d... | 31.8125 | 91 | 0.495088 |
33834144fe11238504b7d21fb288cb0fe54dd236 | 24,194 | py | Python | sdk/cosmos/azure-cosmos/test/test_location_cache.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/cosmos/azure-cosmos/test/test_location_cache.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/cosmos/azure-cosmos/test/test_location_cache.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | import unittest
import threading
import pytest
from time import sleep
from azure.cosmos.http_constants import ResourceType
import azure.cosmos._cosmos_client_connection as cosmos_client_connection
import azure.cosmos.documents as documents
from azure.cosmos._request_object import RequestObject
from azure.cosmos._locat... | 61.719388 | 197 | 0.743986 |
3383458dbb87a2b88472dfb24a4d5c3d2535adf6 | 11,183 | py | Python | tests/metric/test_precision_recall.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 117 | 2019-03-14T15:06:42.000Z | 2022-02-28T07:06:34.000Z | tests/metric/test_precision_recall.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 149 | 2019-03-12T09:43:21.000Z | 2020-08-24T02:56:34.000Z | tests/metric/test_precision_recall.py | ishine/cotk | 2242c16523830254b0ac509f7739b4cbcb03dea4 | [
"Apache-2.0"
] | 51 | 2019-03-14T15:12:48.000Z | 2021-08-09T03:37:48.000Z | import copy
import random
import numpy as np
import pytest
from cotk.metric import BleuPrecisionRecallMetric, EmbSimilarityPrecisionRecallMetric
from metric_base import *
def setup_module():
random.seed(0)
np.random.seed(0)
#pytestmark = pytest.mark.skip("all tests still WIP")
bleu_precision_recal... | 39.101399 | 107 | 0.704373 |
338347ccd873aed3f9725786c25ada56811676af | 366 | py | Python | terrascript/provider/rke.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/rke.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/rke.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/rke.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:25:51 UTC)
#
# For imports without namespace, e.g.
#
# >>> import terrascript.provider.rke
#
# instead of
#
# >>> import terrascript.provider.rancher.rke
#
# This is only available for 'official' and 'partner' providers.
f... | 24.4 | 73 | 0.734973 |
33835e6fc22c4f58be95203c0cf907f178211870 | 28,856 | py | Python | docker/alpine/kolibri/dist/morango/sync/syncsession.py | sanmoy/kolibri-azure | 9becf1c167225e6cf20f25b379f3d7f27486e56d | [
"MIT"
] | 1 | 2020-10-22T05:54:52.000Z | 2020-10-22T05:54:52.000Z | docker/alpine/kolibri/dist/morango/sync/syncsession.py | sanmoy/kolibri-azure | 9becf1c167225e6cf20f25b379f3d7f27486e56d | [
"MIT"
] | null | null | null | docker/alpine/kolibri/dist/morango/sync/syncsession.py | sanmoy/kolibri-azure | 9becf1c167225e6cf20f25b379f3d7f27486e56d | [
"MIT"
] | null | null | null | import json
import logging
import socket
import uuid
from io import BytesIO
from django.conf import settings
from django.core.paginator import Paginator
from django.utils import timezone
from django.utils.six import iteritems
from requests.adapters import HTTPAdapter
from requests.exceptions import Timeout
from reques... | 37.329884 | 107 | 0.655808 |
33836659bd9323936ffa901e4cdb3cce82aa34e3 | 2,618 | py | Python | tests/test_adapter.py | diefans/buvar | 5c47cef0a1a9792d6b2aee0d32f724f83834715c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2020-02-28T22:59:19.000Z | 2020-02-28T22:59:19.000Z | tests/test_adapter.py | diefans/buvar | 5c47cef0a1a9792d6b2aee0d32f724f83834715c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | tests/test_adapter.py | diefans/buvar | 5c47cef0a1a9792d6b2aee0d32f724f83834715c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | import pytest
@pytest.fixture
def adapters():
from buvar import di
return di.Adapters()
@pytest.fixture
def Foo():
import dataclasses as dc
@dc.dataclass
class Foo:
bim: str
bam: int = 123
baz: bool = False
@classmethod
def adapt_children(cls) -> "Foo":... | 22.376068 | 66 | 0.630634 |
3383750516d36043534462244ba64e2998a2960f | 7,535 | py | Python | shawk/Gateways.py | hawkins/Shawk | c5be1165d8f6c0471544d06f7da07156df1dcc10 | [
"MIT"
] | 13 | 2016-05-05T11:16:31.000Z | 2021-02-25T11:23:14.000Z | shawk/Gateways.py | hawkins/Shawk | c5be1165d8f6c0471544d06f7da07156df1dcc10 | [
"MIT"
] | 18 | 2016-05-05T20:23:51.000Z | 2020-12-25T16:34:05.000Z | shawk/Gateways.py | hawkins/Shawk | c5be1165d8f6c0471544d06f7da07156df1dcc10 | [
"MIT"
] | 5 | 2017-07-25T23:50:43.000Z | 2021-12-04T11:05:13.000Z | """
shawk.Gateways
--------------
Define the Gateways supported in Shawk and a regex to match supported address patterns.
"""
import re
def sms_to_mail(number, carrier):
"""Return the email address of some number and some carrier mapped to a gateway."""
return '{}@{}'.format(number, Gateways[carrier])
SMS_... | 27.300725 | 87 | 0.654678 |
33838579a99d25c476f24fa4292c8b5e0d73b26e | 4,523 | py | Python | configs/recognition/movinet/movinetA4_charades.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | null | null | null | configs/recognition/movinet/movinetA4_charades.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | null | null | null | configs/recognition/movinet/movinetA4_charades.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | null | null | null | _base_ = '../../_base_/models/movinet/movinetA4.py'
model = dict(
cls_head=dict(
type='MoViNetHead',
in_channels=856,
hidden_dim=1024,
num_classes=157,
spatial_type='avg',
tf_like=True,
causal=False,
conv_type='3d',
dropout_ratio=0.,
#... | 28.808917 | 117 | 0.64979 |
3383857bd17d3a27dbdc24f319b459e644c0fb63 | 5,179 | py | Python | cep_price_console/cntr_upload/Declarative.py | zanebclark/cep_price_console | 2f0e0a487a02a1eeceab9bc326d4cef153bd6781 | [
"MIT"
] | null | null | null | cep_price_console/cntr_upload/Declarative.py | zanebclark/cep_price_console | 2f0e0a487a02a1eeceab9bc326d4cef153bd6781 | [
"MIT"
] | 5 | 2021-03-31T19:27:48.000Z | 2022-01-13T01:57:46.000Z | cep_price_console/cntr_upload/Declarative.py | zanebclark/cep_price_console | 2f0e0a487a02a1eeceab9bc326d4cef153bd6781 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer, VARCHAR, DATE, DECIMAL, INT, Table
from cep_price_console.utils.log_utils import CustomAdapter
from cep_price_console.db_management.server_utils import mysql_base
import logging
logger = CustomAdapter(logging.getLogger(str(__name__)), None)
class UploadMulti(mysql_base):
_... | 53.947917 | 111 | 0.519985 |
33838d007975bb0f7b8559e97776fc92ba7989fc | 21,158 | py | Python | storm_kit/geom/sdf/world.py | rgap/storm | 5f477d6fa58c6c1ec8d8e2b57c3b21844cae17ac | [
"MIT"
] | null | null | null | storm_kit/geom/sdf/world.py | rgap/storm | 5f477d6fa58c6c1ec8d8e2b57c3b21844cae17ac | [
"MIT"
] | null | null | null | storm_kit/geom/sdf/world.py | rgap/storm | 5f477d6fa58c6c1ec8d8e2b57c3b21844cae17ac | [
"MIT"
] | null | null | null | #
# MIT License
#
# Copyright (c) 2020-2021 NVIDIA CORPORATION.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, ... | 38.32971 | 149 | 0.618631 |
3383d78349ff62870c9578d84a4125e49a60b4a1 | 9,203 | py | Python | api_app/api/routes/shared_services.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/api/routes/shared_services.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/api/routes/shared_services.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | import logging
from fastapi import APIRouter, Depends, HTTPException, Header, status, Response
from jsonschema.exceptions import ValidationError
from db.repositories.operations import OperationRepository
from db.errors import DuplicateEntity
from api.dependencies.database import get_repository
from api.dependencies.s... | 69.195489 | 447 | 0.828969 |
3383e54f93b26a941befb88c38fff8bef7bc7219 | 4,058 | py | Python | alipay/aop/api/request/AnttechBlockchainDefinInsuranceReportCreateRequest.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/request/AnttechBlockchainDefinInsuranceReportCreateRequest.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/request/AnttechBlockchainDefinInsuranceReportCreateRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AnttechBlockchainDefinInsuranceReportCreateModel import AnttechBlockchainDefinInsuranceReportCreateModel
class AnttechBlockchainDefi... | 27.986207 | 148 | 0.652045 |
338411292529e79cdab4b99a698e8b75563441f5 | 45,139 | py | Python | alignment/heatmapReg/symbol/sym_heatmap.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | alignment/heatmapReg/symbol/sym_heatmap.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | alignment/heatmapReg/symbol/sym_heatmap.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import mxnet as mx
import numpy as np
from config import config
ACT_BIT = 1
bn_mom = 0.9
workspace = 256
memonger = False
def Conv(**kwargs):
body = mx.sym.Convolution(**kwargs)
return body
def Act(... | 41.564457 | 134 | 0.40331 |
33841e676f61bb5d5ea9877105f359811b7b4756 | 1,554 | py | Python | kg/diff/real_abs_rel_1e_14.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 6 | 2019-11-30T17:03:13.000Z | 2021-09-30T05:08:31.000Z | kg/diff/real_abs_rel_1e_14.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 1 | 2020-01-20T12:13:03.000Z | 2020-01-20T12:13:03.000Z | kg/diff/real_abs_rel_1e_14.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | null | null | null | # Checks for an absolute/relative error
# with an error of at most 1e-14
# Don't edit this file. Edit real_abs_rel_template.py instead, and then run _real_check_gen.py
from itertools import zip_longest
from decimal import Decimal, InvalidOperation
from kg.checkers import * ### @import
EPS = Decimal('1e-14')
EPS ... | 42 | 94 | 0.607465 |
3384281d88bc440c66b3fe347b3cb3683f4276d5 | 2,938 | py | Python | binary_search.py/34_search_range.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | binary_search.py/34_search_range.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | binary_search.py/34_search_range.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | from typing import *
class Solution:
"""
给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。
你的算法时间复杂度必须是 O(log n) 级别。
如果数组中不存在目标值,返回 [-1, -1]。
示例 1:
输入: nums = [5,7,7,8,8,10], target = 8
输出: [3,4]
示例 2:
输入: nums = [5,7,7,8,8,10], target = 6
输出: [-1,-1]
"""
def s... | 25.547826 | 86 | 0.487066 |
33848d35a8ab212fd6c544ddf76d61a6b1bf4658 | 8,538 | py | Python | maskrcnn_benchmark/modeling/roi_heads/cost_volum_v11_head/depth_cost_feature_extractors.py | pwllr/IDA-3D | f5c8acbcf90a7c351499249a24754ad311da375e | [
"MIT"
] | 78 | 2020-03-02T12:00:57.000Z | 2022-02-21T09:48:08.000Z | maskrcnn_benchmark/modeling/roi_heads/cost_volum_v11_head/depth_cost_feature_extractors.py | pwllr/IDA-3D | f5c8acbcf90a7c351499249a24754ad311da375e | [
"MIT"
] | 19 | 2020-03-02T12:07:18.000Z | 2022-03-30T08:04:06.000Z | maskrcnn_benchmark/modeling/roi_heads/cost_volum_v11_head/depth_cost_feature_extractors.py | pwllr/IDA-3D | f5c8acbcf90a7c351499249a24754ad311da375e | [
"MIT"
] | 14 | 2020-06-14T03:29:47.000Z | 2021-07-21T06:30:08.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
from torch import nn
from torch.nn import functional as F
from maskrcnn_benchmark.modeling.poolers import Pooler
from maskrcnn_benchmark.structures.bounding_box import BoxList
from maskrcnn_benchmark.layers import FrozenBatchNorm2d
f... | 42.69 | 149 | 0.624619 |
3384a67fcd36fb68bb313a3031d1cf956ed4bafd | 331 | py | Python | tests/python_backend/test_python_debug.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | tests/python_backend/test_python_debug.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | tests/python_backend/test_python_debug.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | import io
from myia import myia
def test_debug():
output = io.StringIO()
@myia(backend="python", backend_options={"debug": output})
def f(a, b):
c = 2 * a
d = a + b
return 2 * a * b + (c - d) * (a - b)
f(1, 2)
code = output.getvalue()
assert "def main(" in code
p... | 17.421053 | 62 | 0.519637 |
3384ab50964ff8263a7276c912697be520fbfc72 | 3,124 | py | Python | pretrained_models/1_Pendulum/5_0/src_code/run_mujoco.py | DDTR/learning_task2 | 3a235edb6515d1c83dee996d90df7da11661fb61 | [
"CNRI-Python"
] | null | null | null | pretrained_models/1_Pendulum/5_0/src_code/run_mujoco.py | DDTR/learning_task2 | 3a235edb6515d1c83dee996d90df7da11661fb61 | [
"CNRI-Python"
] | null | null | null | pretrained_models/1_Pendulum/5_0/src_code/run_mujoco.py | DDTR/learning_task2 | 3a235edb6515d1c83dee996d90df7da11661fb61 | [
"CNRI-Python"
] | null | null | null | # !/usr/bin/env python
from baselines.common import set_global_seeds, tf_util as U
from baselines import bench
import os.path as osp
import gym, logging
import pdb
from baselines import logger
import sys
sys.path.append('../../../')
sys.path.append('/home/nfunk/Code_MA/ppoc_off_tryout/')
def train(env_id, num_timeste... | 37.190476 | 158 | 0.659411 |
33850fcc7c7a0086b0ebd1fbdc13706d5af4b9f5 | 301 | py | Python | nikkei2019-qual/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | nikkei2019-qual/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | nikkei2019-qual/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
def main():
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N, A, B = na()
print(min(A, B), max(0, A + B - N))
if __name__ == "__main__":
main()
| 17.705882 | 57 | 0.568106 |
33851d6f7067605f053c62710308fca61cb9c5b2 | 9,978 | py | Python | tests/unit/plugins/common/scenarios/dummy/test_dummy.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 1 | 2018-01-01T00:43:41.000Z | 2018-01-01T00:43:41.000Z | tests/unit/plugins/common/scenarios/dummy/test_dummy.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | tests/unit/plugins/common/scenarios/dummy/test_dummy.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 1 | 2015-02-07T09:44:47.000Z | 2015-02-07T09:44:47.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 46.409302 | 78 | 0.517739 |
3385208e3f84ca60a1097ecf873c49e25b3232eb | 9,977 | py | Python | toontown/cogdominium/CogdoFlyingGameGlobals.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/cogdominium/CogdoFlyingGameGlobals.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/cogdominium/CogdoFlyingGameGlobals.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from toontown.toonbase import ToonPythonUtil as PythonUtil
from pandac.PandaModules import VBase4, Vec3, Point3
from toontown.cogdominium.CogdoUtil import VariableContainer, DevVariableContainer
AI = VariableContainer()
AI.GameActions = PythonUtil.Enum(('LandOnWinPlatform', 'WinStateFinished',
'GotoWinState', 'Hi... | 37.649057 | 111 | 0.76937 |
338551ae357e29a58d114f2a12b39cf7b41df3ad | 5,280 | py | Python | sphinx_source_files/conf.py | caoliheng/open-dynamic-robot-initiative.github.io | a37e74a02b7e606962b9d9496c22796d2e1f38d8 | [
"BSD-3-Clause"
] | 149 | 2019-08-21T09:53:06.000Z | 2022-03-15T08:48:00.000Z | sphinx_source_files/conf.py | caoliheng/open-dynamic-robot-initiative.github.io | a37e74a02b7e606962b9d9496c22796d2e1f38d8 | [
"BSD-3-Clause"
] | 4 | 2020-05-26T12:18:10.000Z | 2021-07-16T14:31:30.000Z | sphinx_source_files/conf.py | caoliheng/open-dynamic-robot-initiative.github.io | a37e74a02b7e606962b9d9496c22796d2e1f38d8 | [
"BSD-3-Clause"
] | 29 | 2019-11-04T13:42:38.000Z | 2022-03-15T08:48:02.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 ------------------------------------------------------------... | 30.344828 | 98 | 0.632386 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.