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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d56ff3bf4a326367af828e819afbc976972e6498 | 643 | py | Python | hive_plug_play/server/api_endpoints.py | seakintruth/hive-plug-play | 032caed7a0690a58410b3d4e93a1fdecf2009d58 | [
"MIT"
] | 3 | 2021-05-11T07:12:05.000Z | 2021-10-04T04:01:38.000Z | hive_plug_play/server/api_endpoints.py | seakintruth/hive-plug-play | 032caed7a0690a58410b3d4e93a1fdecf2009d58 | [
"MIT"
] | 9 | 2021-06-02T03:43:01.000Z | 2021-07-23T14:52:03.000Z | hive_plug_play/server/api_endpoints.py | seakintruth/hive-plug-play | 032caed7a0690a58410b3d4e93a1fdecf2009d58 | [
"MIT"
] | 1 | 2021-05-24T15:57:20.000Z | 2021-05-24T15:57:20.000Z | """API endpoints."""
from hive_plug_play.server.system_status import SystemStatus
from hive_plug_play.server.normalize import normalize_types
async def ping(context):
return "pong"
async def get_sync_status(context):
return normalize_types(SystemStatus.get_sync_status())
async def get_ops_by_block(context, ... | 32.15 | 66 | 0.748056 |
d56ffb0730f6eee7c6f3ee835b8aa247fcbdf90d | 20,162 | py | Python | sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 ... | 47.890736 | 282 | 0.666501 |
d57017818dd5fa2fb827043ebb369451954b00ab | 3,685 | py | Python | atlas/auth/shibsso/tests/test_logout.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | null | null | null | atlas/auth/shibsso/tests/test_logout.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 15 | 2015-01-06T13:41:52.000Z | 2022-03-30T10:37:25.000Z | atlas/auth/shibsso/tests/test_logout.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 1 | 2017-07-20T08:01:24.000Z | 2017-07-20T08:01:24.000Z | #
# Copyright 2010 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 agreed to in writing, softw... | 30.966387 | 82 | 0.620081 |
d5706bfedd0c85237f9bbe9702c8e0db3202241b | 34,010 | py | Python | demisto_sdk/commands/find_dependencies/tests/find_dependencies_test.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | demisto_sdk/commands/find_dependencies/tests/find_dependencies_test.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | demisto_sdk/commands/find_dependencies/tests/find_dependencies_test.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | import json
import os
import pytest
from demisto_sdk.commands.common.git_tools import git_path
from demisto_sdk.commands.find_dependencies.find_dependencies import (
PackDependencies, VerboseFile)
from TestSuite.utils import IsEqualFunctions
@pytest.fixture(scope="module")
def id_set():
id_set_path = os.path... | 39.182028 | 158 | 0.470068 |
d57083273d179ca38482781271323e85e67952f3 | 588 | py | Python | Turtle/tartara.py | lalapapauhuh/Python | 1454263b46d66a0b19b7a2fd1b465800fe95a2c8 | [
"MIT"
] | null | null | null | Turtle/tartara.py | lalapapauhuh/Python | 1454263b46d66a0b19b7a2fd1b465800fe95a2c8 | [
"MIT"
] | null | null | null | Turtle/tartara.py | lalapapauhuh/Python | 1454263b46d66a0b19b7a2fd1b465800fe95a2c8 | [
"MIT"
] | null | null | null | import turtle
from time import sleep
wn = turtle.Screen()
wn.bgcolor("#575564") # define a cor de fundo da janela
tess = turtle.Turtle()
tess.color("#74f6ff") # tess fica azul
tess.pensize(3) # define a espessura da caneta
tess.forward(150) # manda o tess se mover 150 un... | 24.5 | 73 | 0.651361 |
d5709e4db1fd02cb8320b73fcaeb4a81233218ba | 4,396 | py | Python | batchSystems/abstractBatchSystem.py | benedictpaten/jobTree | 072be69f6214e06bd8588b5e73a60b758c191663 | [
"MIT"
] | 10 | 2015-02-05T16:02:06.000Z | 2020-07-17T06:12:42.000Z | batchSystems/abstractBatchSystem.py | benedictpaten/jobTree | 072be69f6214e06bd8588b5e73a60b758c191663 | [
"MIT"
] | 16 | 2015-01-06T05:56:58.000Z | 2015-10-07T01:03:37.000Z | batchSystems/abstractBatchSystem.py | benedictpaten/jobTree | 072be69f6214e06bd8588b5e73a60b758c191663 | [
"MIT"
] | 14 | 2015-01-05T23:34:12.000Z | 2019-03-07T17:45:17.000Z | #!/usr/bin/env python
#Copyright (C) 2011 by Benedict Paten (benedictpaten@gmail.com)
#
#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 rig... | 39.25 | 128 | 0.665378 |
d570b94b4d8dd634b9881037501cc12df9402ee7 | 7,163 | py | Python | BDD/sw-bdd/GherkinTools/gherkin2cpp/Specifications/steps/general_Then_steps.py | lanillo/QMSat-Satellite | 376f0ba1f755778df2cb3fadb67212faf834a3b2 | [
"Apache-2.0"
] | null | null | null | BDD/sw-bdd/GherkinTools/gherkin2cpp/Specifications/steps/general_Then_steps.py | lanillo/QMSat-Satellite | 376f0ba1f755778df2cb3fadb67212faf834a3b2 | [
"Apache-2.0"
] | null | null | null | BDD/sw-bdd/GherkinTools/gherkin2cpp/Specifications/steps/general_Then_steps.py | lanillo/QMSat-Satellite | 376f0ba1f755778df2cb3fadb67212faf834a3b2 | [
"Apache-2.0"
] | null | null | null | import os
from glob import iglob
from behave import Then
from CommunPackage.feature_unicity_manager import NumberUnicityManager
from gherkinParser.PythonScripts.feature_parser import get_feature_from_file
@Then("result is")
def step_impl(context):
if hasattr(context, 'result_text'):
print(str(context.re... | 34.272727 | 130 | 0.669552 |
d570d617639d0d40d27adefb403b92c0e05e69d9 | 9,750 | py | Python | MachineLearning_code_examples/src/utils/plot_histograms.py | PawelRosikiewicz/MachineLearning | a119ff3327f77937101a70ea12a66652b9f42f2a | [
"MIT"
] | 1 | 2022-03-25T14:24:57.000Z | 2022-03-25T14:24:57.000Z | MachineLearning_code_examples/src/utils/plot_histograms.py | PawelRosikiewicz/MachineLearning | a119ff3327f77937101a70ea12a66652b9f42f2a | [
"MIT"
] | null | null | null | MachineLearning_code_examples/src/utils/plot_histograms.py | PawelRosikiewicz/MachineLearning | a119ff3327f77937101a70ea12a66652b9f42f2a | [
"MIT"
] | null | null | null | # ********************************************************************************** #
# #
# Project: Data Frame Explorer #
# Author: Pawel Rosikiewicz ... | 37.937743 | 111 | 0.498872 |
d570e26282f9bbc7878b212f6c1d41d796a14f2d | 7,959 | py | Python | scripts/make_agent_demos.py | taungerine/babyai | 2658eaa919721cb9b051477068aef5d7ad9d86ff | [
"BSD-3-Clause"
] | null | null | null | scripts/make_agent_demos.py | taungerine/babyai | 2658eaa919721cb9b051477068aef5d7ad9d86ff | [
"BSD-3-Clause"
] | null | null | null | scripts/make_agent_demos.py | taungerine/babyai | 2658eaa919721cb9b051477068aef5d7ad9d86ff | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
Generate a set of agent demonstrations.
The agent can either be a trained model or the heuristic expert (bot).
Demonstration generation can take a long time, but it can be parallelized
if you have a cluster at your disposal. Provide a script that launches
make_agent_demos.py at your cluste... | 36.177273 | 103 | 0.613017 |
d5711873acdb818379c112b6d1cd5adfbf20f01a | 437 | py | Python | scattertext/termranking/OncePerDocFrequencyRanker.py | tigerneil/scattertext | 23351895ada347fae300bf910c2c77f47ac58a35 | [
"Apache-2.0"
] | 1 | 2020-08-11T03:27:28.000Z | 2020-08-11T03:27:28.000Z | scattertext/termranking/OncePerDocFrequencyRanker.py | tigerneil/scattertext | 23351895ada347fae300bf910c2c77f47ac58a35 | [
"Apache-2.0"
] | null | null | null | scattertext/termranking/OncePerDocFrequencyRanker.py | tigerneil/scattertext | 23351895ada347fae300bf910c2c77f47ac58a35 | [
"Apache-2.0"
] | 1 | 2020-01-08T00:25:31.000Z | 2020-01-08T00:25:31.000Z | import pandas as pd
from scattertext.termranking.TermRanker import TermRanker
class OncePerDocFrequencyRanker(TermRanker):
def get_ranks(self):
mat = self._term_doc_matrix.get_term_count_mat()
return pd.DataFrame(mat,
index=pd.Series(self._term_doc_matrix.get_terms(), name='term'),
... | 33.615385 | 86 | 0.656751 |
d5713c30c9727f45893f97b7fb13bb9b0ca9d508 | 949 | py | Python | sdks/python/test/test_ApplicationResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_ApplicationResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_ApplicationResponse.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
"""
from __future__ import absolute_import
import unittest
import appcente... | 23.725 | 97 | 0.726027 |
d571794e1cc04f3ae744a1f71a21a319745fb2a3 | 460 | py | Python | python/Temp/sandboxFindFileOnDisk.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-01-19T10:36:09.000Z | 2021-01-29T01:14:45.000Z | python/Temp/sandboxFindFileOnDisk.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 2 | 2016-02-20T13:09:38.000Z | 2016-03-08T06:47:47.000Z | python/Temp/sandboxFindFileOnDisk.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-02-19T16:52:57.000Z | 2017-05-16T03:06:43.000Z |
rootPath = "/Users/chavez/Desktop/Projects/Elementsbrowser/prototyping/python/Categories/"
inputFile = 'Cloth/A002C002_140913_FPS120'
import os
head, tail = os.path.split(inputFile)
print tail
fullPathOnDisc = rootPath + inputFile + "/Thumbnails/" + tail + ".0001.jpg"
print fullPathOnDisc
#pathlist = ['Clo... | 21.904762 | 96 | 0.736957 |
d5718871bf39c0bbfe72f74a481792ed1b929f97 | 1,926 | py | Python | modifier/modifier.py | glazec/slither-scripts | b97439e072c79135a8323b5607ab9f8e3ab0aa72 | [
"MIT"
] | 13 | 2019-10-18T22:04:43.000Z | 2022-01-26T01:07:03.000Z | modifier/modifier.py | glazec/slither-scripts | b97439e072c79135a8323b5607ab9f8e3ab0aa72 | [
"MIT"
] | 9 | 2018-12-09T19:39:51.000Z | 2019-01-15T14:08:53.000Z | modifier/modifier.py | glazec/slither-scripts | b97439e072c79135a8323b5607ab9f8e3ab0aa72 | [
"MIT"
] | 7 | 2019-10-19T05:54:38.000Z | 2022-01-11T14:34:51.000Z | from slither import Slither
from slither.utils.colors import blue, green, magenta, yellow
import collections
import sys
def filter_by_modifier(functions, modifier_name):
for f in functions:
if modifier_name in [m.name for m in f.modifiers]:
yield f
def run(filename, mod_name):
"""Execute... | 32.1 | 81 | 0.55244 |
d57195a0d5bc503ad858634103567a92055dbe56 | 9,020 | py | Python | canopycover/terra_canopycover.py | terraref/extractors-stereo-rgb | 3efa2dba583cd31bc106a30f8c211711a1fd4762 | [
"BSD-3-Clause"
] | 1 | 2020-09-16T17:39:02.000Z | 2020-09-16T17:39:02.000Z | canopycover/terra_canopycover.py | terraref/extractors-stereo-rgb | 3efa2dba583cd31bc106a30f8c211711a1fd4762 | [
"BSD-3-Clause"
] | 13 | 2016-09-06T20:32:56.000Z | 2020-03-07T00:45:19.000Z | canopycover/terra_canopycover.py | terraref/extractors-stereo-rgb | 3efa2dba583cd31bc106a30f8c211711a1fd4762 | [
"BSD-3-Clause"
] | 5 | 2017-05-22T22:35:39.000Z | 2019-10-31T00:10:27.000Z | #!/usr/bin/env python
import json
import os
import yaml
from numpy import asarray, rollaxis, count_nonzero, sum
from pyclowder.utils import CheckMessage
from pyclowder.datasets import get_info
from pyclowder.files import submit_extraction, download_metadata, upload_metadata
from terrautils.extractors import TerrarefE... | 43.574879 | 126 | 0.601663 |
d571d4a10a524a3d28490db42da6019b48215444 | 3,822 | py | Python | mitmproxy/addons/modifyheaders.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/addons/modifyheaders.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | mitmproxy/addons/modifyheaders.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | import re
from collections.abc import Sequence
from pathlib import Path
from typing import NamedTuple
from mitmproxy import ctx, exceptions, flowfilter, http
from mitmproxy.http import Headers
from mitmproxy.utils import strutils
from mitmproxy.utils.spec import parse_spec
class ModifySpec(NamedTuple):
matches: ... | 33.526316 | 101 | 0.605965 |
d571ed60fb517ee820616dac3d1cc60c215bf613 | 6,232 | py | Python | detection/RetinaFace/rcnn/tools/test_rcnn.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | detection/RetinaFace/rcnn/tools/test_rcnn.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | detection/RetinaFace/rcnn/tools/test_rcnn.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | import argparse
import pprint
import mxnet as mx
from ..logger import logger
from ..config import config, default, generate_config
from ..symbol import *
from ..dataset import *
from ..core.loader import TestLoader
from ..core.tester import Predictor, pred_eval
from ..utils.load_model import load_param
def test_rcnn... | 38.469136 | 123 | 0.535141 |
d571fb498b8534f3a739b3c8bdc258e4b46c64c4 | 273 | py | Python | HW_1/Ex4.py | NaychukAnastasiya/goiteens-python3-naychuk | a79d0af238a15f58a822bb5d8e4d48227d4a7bc1 | [
"MIT"
] | null | null | null | HW_1/Ex4.py | NaychukAnastasiya/goiteens-python3-naychuk | a79d0af238a15f58a822bb5d8e4d48227d4a7bc1 | [
"MIT"
] | null | null | null | HW_1/Ex4.py | NaychukAnastasiya/goiteens-python3-naychuk | a79d0af238a15f58a822bb5d8e4d48227d4a7bc1 | [
"MIT"
] | null | null | null | age_start_painting = 10 # years
pictures_per_year = 5
age_finish_painting = 15 # years
years_diff = age_finish_painting - age_start_painting
total_pictures_count = 5 * years_diff
print("Katya will paint: ", total_pictures_count, "pictures per ", years_diff, " years.") | 45.5 | 89 | 0.776557 |
d5720627b51ba22aa34d5de12329ccd47a080326 | 13,325 | py | Python | functions/map_figures.py | NavarreCML/National-EAT-Lancet-Diets | d61ffb59829a64d1bfca3f43e593e656d4543f33 | [
"MIT"
] | null | null | null | functions/map_figures.py | NavarreCML/National-EAT-Lancet-Diets | d61ffb59829a64d1bfca3f43e593e656d4543f33 | [
"MIT"
] | null | null | null | functions/map_figures.py | NavarreCML/National-EAT-Lancet-Diets | d61ffb59829a64d1bfca3f43e593e656d4543f33 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 8 11:41:47 2020
@author: nicolasnavarre
"""
import numpy as np
import geopandas as gpd
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import pickle
import math
import cartopy.crs as ccrs
mol = ccrs.Mollwei... | 40.378788 | 107 | 0.583415 |
d572092326f269bf10bbac6df5a502ac4b6ba629 | 14,218 | py | Python | bert_e/reactor.py | scality/bert-e | 0777b800b45053444264667891b32976933f2f58 | [
"Apache-2.0"
] | null | null | null | bert_e/reactor.py | scality/bert-e | 0777b800b45053444264667891b32976933f2f58 | [
"Apache-2.0"
] | 35 | 2020-08-26T09:25:56.000Z | 2022-01-10T20:38:15.000Z | bert_e/reactor.py | scality/bert-e | 0777b800b45053444264667891b32976933f2f58 | [
"Apache-2.0"
] | 2 | 2021-08-17T15:56:50.000Z | 2022-01-05T19:26:48.000Z | # Copyright 2016-2018 Scality
#
# 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,... | 34.342995 | 79 | 0.609861 |
d5726b26b2f488156ad5f04558a1043984dd8ab8 | 52 | py | Python | datasets/grid/__init__.py | Chris10M/Lip2Speech | 81a57364054c7fbbede7c6de15861e49d53419d0 | [
"MIT"
] | 3 | 2022-01-19T22:14:14.000Z | 2022-03-23T04:21:57.000Z | datasets/grid/__init__.py | Chris10M/Lip2Speech | 81a57364054c7fbbede7c6de15861e49d53419d0 | [
"MIT"
] | 1 | 2021-10-05T18:09:59.000Z | 2021-10-05T18:09:59.000Z | datasets/grid/__init__.py | Chris10M/Lip2Speech | 81a57364054c7fbbede7c6de15861e49d53419d0 | [
"MIT"
] | 3 | 2021-10-16T05:40:45.000Z | 2022-03-18T06:05:49.000Z | from .dataset import GRID, av_speech_collate_fn_pad
| 26 | 51 | 0.865385 |
d572893acfa76fb3d559797735992cc492e5e373 | 2,916 | py | Python | tempest/api/volume/admin/test_volumes_backup.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/api/volume/admin/test_volumes_backup.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/api/volume/admin/test_volumes_backup.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 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... | 38.368421 | 78 | 0.662209 |
d572a88dda186fa73f246bee04071fa5f44de412 | 873 | py | Python | LintCode/chapter 12/437. Copy Books/.ipynb_checkpoints/solution-checkpoint.py | vincent507cpu/Comprehensive-Algorithm-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | 4 | 2020-06-26T00:45:53.000Z | 2021-04-19T12:23:32.000Z | LintCode/chapter 12/437. Copy Books/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | LintCode/chapter 12/437. Copy Books/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | class Solution:
"""
@param pages: an array of integers
@param k: An integer
@return: an integer
"""
def copyBooks(self, pages, k):
# write your code here
if not pages:
return 0
start, end = max(pages), sum(pages)
while start + 1 <... | 24.25 | 48 | 0.42268 |
d572ade8253b10ca9a384a721ebf504305aeddff | 6,186 | py | Python | projects/UniDet/demo/demo.py | AlexArtemis/UniDet | 1c6f1817ec9373840ce14e65d3e9977035e5e78d | [
"Apache-2.0"
] | null | null | null | projects/UniDet/demo/demo.py | AlexArtemis/UniDet | 1c6f1817ec9373840ce14e65d3e9977035e5e78d | [
"Apache-2.0"
] | null | null | null | projects/UniDet/demo/demo.py | AlexArtemis/UniDet | 1c6f1817ec9373840ce14e65d3e9977035e5e78d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import argparse
import glob
import multiprocessing as mp
import os
import time
import cv2
import sys
import tqdm
from detectron2.config import get_cfg
from detectron2.data.detection_utils import read_image
from detectron2.utils.logger import setup_... | 36.60355 | 94 | 0.609764 |
d572dec8a1d06929c218d1762ac22abbb54f4b49 | 53,317 | py | Python | code/client/munkilib/installer.py | cooljeanius/munki | 9f330b32f68736396d9d9e6c3feb92204b1b6e8a | [
"Apache-2.0"
] | 1 | 2020-10-13T20:11:51.000Z | 2020-10-13T20:11:51.000Z | code/client/munkilib/installer.py | cooljeanius/munki | 9f330b32f68736396d9d9e6c3feb92204b1b6e8a | [
"Apache-2.0"
] | null | null | null | code/client/munkilib/installer.py | cooljeanius/munki | 9f330b32f68736396d9d9e6c3feb92204b1b6e8a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# encoding: utf-8
#
# Copyright 2009-2011 Greg Neagle.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 43.417752 | 80 | 0.53452 |
d572f0eda0aff14a07a136d060191f393c3b08b6 | 39 | py | Python | custom_components/internode/__init__.py | LeighCurran/InternodeHA | 90e1853e269d864b54aeb978e4f5275f67ec4871 | [
"MIT"
] | 1 | 2021-07-31T05:40:02.000Z | 2021-07-31T05:40:02.000Z | custom_components/internode/__init__.py | LeighCurran/InternodeHA | 90e1853e269d864b54aeb978e4f5275f67ec4871 | [
"MIT"
] | null | null | null | custom_components/internode/__init__.py | LeighCurran/InternodeHA | 90e1853e269d864b54aeb978e4f5275f67ec4871 | [
"MIT"
] | null | null | null | """The Internode sensor integration.""" | 39 | 39 | 0.74359 |
d572fbf05204634e609bf7db14333d8cc99b048e | 8,581 | py | Python | buttonwood/MarketObjects/OrderBooks/BasicOrderBook.py | AgalmicVentures/Buttonwood | f86098cd6d97b4767cbd3428e667b307255ba571 | [
"MIT"
] | 2 | 2020-01-04T05:28:20.000Z | 2021-07-21T21:19:43.000Z | buttonwood/MarketObjects/OrderBooks/BasicOrderBook.py | AgalmicVentures/Buttonwood | f86098cd6d97b4767cbd3428e667b307255ba571 | [
"MIT"
] | 45 | 2019-07-04T15:13:34.000Z | 2020-06-30T19:41:45.000Z | buttonwood/MarketObjects/OrderBooks/BasicOrderBook.py | AgalmicVentures/Buttonwood | f86098cd6d97b4767cbd3428e667b307255ba571 | [
"MIT"
] | 3 | 2020-04-18T16:49:14.000Z | 2021-07-21T21:19:52.000Z | """
This file is part of Buttonwood.
Buttonwood is a python software package created to help quickly create, (re)build, or
analyze markets, market structures, and market participants.
MIT License
Copyright (c) 2016-2020 Peter F. Nabicht
Permission is hereby granted, free of charge, to any person obtaining a copy
... | 34.461847 | 130 | 0.660179 |
d5731b78b81b926c02014cb470b9ebfbf3395ef2 | 8,515 | py | Python | python/oneflow/test/modules/test_optim_rmsprop.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_optim_rmsprop.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_optim_rmsprop.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 32.876448 | 86 | 0.5569 |
d5732b65f0c2bc125e884585aa08f1de7dbcf0af | 10,804 | py | Python | src/models/helpers.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | src/models/helpers.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | src/models/helpers.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | import os
import torch
import pickle
import numpy as np
import pandas as pd
import torch.utils.data
import torch.optim as optim
import torch.nn.functional as F
from sklearn import preprocessing
from torch.autograd import Variable
from bisect import bisect_right, bisect_left
from sklearn.model_selection impor... | 39.575092 | 138 | 0.603203 |
d57354b8c48352347536ea7ee2b49b2ec50b81f2 | 1,800 | py | Python | nipy/modalities/fmri/fmristat/invert.py | matthew-brett/nipy | 5a3f080f2504f8b2c326677ea2e3101344b3f579 | [
"BSD-3-Clause"
] | 1 | 2016-03-08T15:01:06.000Z | 2016-03-08T15:01:06.000Z | nipy/modalities/fmri/fmristat/invert.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | 1 | 2015-09-09T07:49:57.000Z | 2015-09-25T01:50:40.000Z | nipy/modalities/fmri/fmristat/invert.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | null | null | null |
__docformat__ = 'restructuredtext'
import numpy as np
from nipy.algorithms.statistics.models.nlsmodel import NLSModel
def invertR(delta, IRF, niter=20):
"""
If IRF has 2 components (w0, w1) return an estimate of the inverse of
r=w1/w0, as in Liao et al. (2002). Fits a simple arctan model to the
rati... | 25.714286 | 74 | 0.497222 |
d573a510393da8c0824f22cca1b3dc57129bcc2c | 24,122 | py | Python | CenterNet/lib/cocoapi/PythonAPI/pycocotools/cocoeval.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 923 | 2020-01-11T06:36:53.000Z | 2022-03-31T00:26:57.000Z | PythonAPI/pycocotools/cocoeval.py | Youngdong2/cocoapi | 636becdc73d54283b3aac6d4ec363cffbb6f9b20 | [
"BSD-2-Clause-FreeBSD"
] | 80 | 2018-09-26T18:55:56.000Z | 2022-02-10T02:03:26.000Z | PythonAPI/pycocotools/cocoeval.py | Youngdong2/cocoapi | 636becdc73d54283b3aac6d4ec363cffbb6f9b20 | [
"BSD-2-Clause-FreeBSD"
] | 262 | 2020-01-02T02:19:40.000Z | 2022-03-23T04:56:16.000Z | __author__ = 'tsungyi'
import numpy as np
import datetime
import time
from collections import defaultdict
from . import mask as maskUtils
import copy
class COCOeval:
# Interface for evaluating detection on the Microsoft COCO dataset.
#
# The usage for CocoEval is as follows:
# cocoGt=..., cocoDt=... ... | 45.172285 | 131 | 0.513846 |
d573ab7fa443be9f91840b879da34ace124360ae | 1,291 | py | Python | examples/docs_snippets/docs_snippets/concepts/partitions_schedules_sensors/schedules/schedules.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/concepts/partitions_schedules_sensors/schedules/schedules.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/concepts/partitions_schedules_sensors/schedules/schedules.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | from dagster import (
DefaultScheduleStatus,
RunRequest,
ScheduleDefinition,
ScheduleEvaluationContext,
job,
op,
schedule,
)
# start_basic_schedule
@job
def my_job():
...
basic_schedule = ScheduleDefinition(job=my_job, cron_schedule="0 0 * * *")
# end_basic_schedule
# start_run_conf... | 21.516667 | 87 | 0.71495 |
d573ca757dcf0adb5ca69c426ac9a857713cc675 | 17,137 | py | Python | src/models/pytorch_nn_train.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | src/models/pytorch_nn_train.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | src/models/pytorch_nn_train.py | zh272/AIGOGO | 0255cf8c4776358b73ee6b1792325a151a0cfa78 | [
"BSD-3-Clause"
] | null | null | null | import os
import time
import fire
import torch
import random
import numpy as np
import pandas as pd
from sklearn.metrics import mean_absolute_error
import torch.nn.functional as F
## to detach from monitor
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from trainer import Train... | 43.166247 | 148 | 0.642528 |
d573f79ba290d08586dac30264e4d03c6e8dc692 | 5,199 | py | Python | operatingSystemFunctions/operatingSystemDiversifier.py | nav9/iRest | 12e6fdaeb0fa9d253c056fd2de057dd9d1aa8121 | [
"MIT"
] | null | null | null | operatingSystemFunctions/operatingSystemDiversifier.py | nav9/iRest | 12e6fdaeb0fa9d253c056fd2de057dd9d1aa8121 | [
"MIT"
] | null | null | null | operatingSystemFunctions/operatingSystemDiversifier.py | nav9/iRest | 12e6fdaeb0fa9d253c056fd2de057dd9d1aa8121 | [
"MIT"
] | null | null | null | import logging
import subprocess
from sys import platform #to check which OS the program is running on
from abc import ABC, abstractmethod
from operatingSystemFunctions import audioNotifiers
class OperatingSystemFunctionality(ABC):#Abstract parent class
#Note: Abstract methods have to be implemented by child class... | 52.515152 | 317 | 0.668205 |
d573fd5f8431f16d194e86184a21759d9ea266c8 | 33,327 | py | Python | moto/route53resolver/models.py | yardbirdsax/moto | 74666c1271ee73f43a25573c4af07ebe3396d4d6 | [
"Apache-2.0"
] | null | null | null | moto/route53resolver/models.py | yardbirdsax/moto | 74666c1271ee73f43a25573c4af07ebe3396d4d6 | [
"Apache-2.0"
] | 1 | 2021-04-21T04:54:17.000Z | 2021-04-21T04:54:17.000Z | moto/route53resolver/models.py | yardbirdsax/moto | 74666c1271ee73f43a25573c4af07ebe3396d4d6 | [
"Apache-2.0"
] | null | null | null | """Route53ResolverBackend class with methods for supported APIs."""
from collections import defaultdict
from datetime import datetime, timezone
from ipaddress import ip_address, ip_network, IPv4Address
import re
from boto3 import Session
from moto.core import ACCOUNT_ID
from moto.core import BaseBackend, BaseModel
fr... | 38.797439 | 96 | 0.624329 |
d5740ff593d4b062349acfdd5f1028edb0158d92 | 1,244 | py | Python | rng/compile_dict.py | LucasPickering/rng | ce6d325bd33d16d70e5cc8d952451e3bd17fdcea | [
"MIT"
] | null | null | null | rng/compile_dict.py | LucasPickering/rng | ce6d325bd33d16d70e5cc8d952451e3bd17fdcea | [
"MIT"
] | null | null | null | rng/compile_dict.py | LucasPickering/rng | ce6d325bd33d16d70e5cc8d952451e3bd17fdcea | [
"MIT"
] | null | null | null | import json
import time
from collections import defaultdict
from . import metaphone, segmentation
def compile_dmph(segments):
dmph_dict = defaultdict(list)
for seg in segments:
print(seg)
# This will only be two elements. Secondary will usually be None so we
# need to filter that out
... | 25.916667 | 78 | 0.659164 |
d574177d304c6fe0443edfe1de5c383568a0ef80 | 6,833 | py | Python | atom3d/datasets/ppi/neighbors.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/datasets/ppi/neighbors.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/datasets/ppi/neighbors.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | """Methods to extract protein interface labels pair."""
import click
import numpy as np
import pandas as pd
import scipy.spatial as spa
import atom3d.shard.shard as sh
import atom3d.util.log as log
logger = log.get_logger('neighbors')
index_columns = \
['ensemble', 'subunit', 'structure', 'model', 'chain', 'res... | 38.823864 | 79 | 0.634128 |
d57440c4d4886e1b7238e46d943266dcbeea6c1c | 10,740 | py | Python | ironic/tests/unit/api/controllers/v1/test_conductor.py | michaeltchapman/ironic | ecabbbb509ee7aa783b143e2bef6afdc4c33cbaf | [
"Apache-2.0"
] | null | null | null | ironic/tests/unit/api/controllers/v1/test_conductor.py | michaeltchapman/ironic | ecabbbb509ee7aa783b143e2bef6afdc4c33cbaf | [
"Apache-2.0"
] | null | null | null | ironic/tests/unit/api/controllers/v1/test_conductor.py | michaeltchapman/ironic | ecabbbb509ee7aa783b143e2bef6afdc4c33cbaf | [
"Apache-2.0"
] | null | null | null | # 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... | 42.96 | 79 | 0.622626 |
d57449530a88a393791e9ebc8330545266ec380d | 4,098 | py | Python | make_cache.py | profection/arxiv-sanity-preserver | 88f3168b4823053cd26be0a03dd9459ed3cdfe2d | [
"MIT"
] | null | null | null | make_cache.py | profection/arxiv-sanity-preserver | 88f3168b4823053cd26be0a03dd9459ed3cdfe2d | [
"MIT"
] | null | null | null | make_cache.py | profection/arxiv-sanity-preserver | 88f3168b4823053cd26be0a03dd9459ed3cdfe2d | [
"MIT"
] | null | null | null | """
computes various cache things on top of db.py so that the server
(running from serve.py) can start up and serve faster when restarted.
this script should be run whenever db.p is updated, and
creates db2.p, which can be read by the server.
"""
import time
import pickle
from sqlite3 import dbapi2 as sqlite3
from ... | 33.867769 | 114 | 0.655198 |
d5745ed3ec465fb58451e7b5624a42b206135835 | 10,238 | py | Python | torchdp/layers/dp_multihead_attention.py | timgianitsos/pytorch-dp | 2335fdc8472e149fadc89a6aa173a470c76f9844 | [
"Apache-2.0"
] | null | null | null | torchdp/layers/dp_multihead_attention.py | timgianitsos/pytorch-dp | 2335fdc8472e149fadc89a6aa173a470c76f9844 | [
"Apache-2.0"
] | null | null | null | torchdp/layers/dp_multihead_attention.py | timgianitsos/pytorch-dp | 2335fdc8472e149fadc89a6aa173a470c76f9844 | [
"Apache-2.0"
] | 1 | 2020-11-26T17:06:21.000Z | 2020-11-26T17:06:21.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import warnings
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
class SequenceBias(nn.Module):
""" Adds one bias element to the end of the sequence
Args:
... | 34.705085 | 88 | 0.568763 |
d5745fbee1d61eaf34a43c6bd698c25d237e3ea4 | 1,723 | py | Python | script/train.py | stdiff/emo-classifier | 211731a44022408c750b611383216ce0578f2d41 | [
"MIT"
] | null | null | null | script/train.py | stdiff/emo-classifier | 211731a44022408c750b611383216ce0578f2d41 | [
"MIT"
] | null | null | null | script/train.py | stdiff/emo-classifier | 211731a44022408c750b611383216ce0578f2d41 | [
"MIT"
] | null | null | null | import logging
from emo_classifier import setup_logger
from training import LocalPaths
from training.train_tfidf import start_training_tfidf_model
from training.utils_for_sagemaker import InstanceType, generate_tag_list, start_sagemaker_training_job
logging.getLogger().setLevel(logging.INFO)
logger = setup_logger(__n... | 35.163265 | 115 | 0.785839 |
d574621d5fe347a115bf8d5c01e51130180c3d0d | 4,082 | py | Python | tests/test_partial.py | jooh/bindit | 1ef39c463012cb71256c6cd302cc543e900d4c86 | [
"MIT"
] | 1 | 2019-09-16T09:34:33.000Z | 2019-09-16T09:34:33.000Z | tests/test_partial.py | jooh/bindit | 1ef39c463012cb71256c6cd302cc543e900d4c86 | [
"MIT"
] | 5 | 2019-04-30T13:53:04.000Z | 2021-11-15T17:48:32.000Z | tests/test_partial.py | jooh/bindit | 1ef39c463012cb71256c6cd302cc543e900d4c86 | [
"MIT"
] | null | null | null | """bindit_partial CLI tests."""
import pathlib
import bindit.partial
import bindit.docker
import bindit.shell
import test_docker
def partialtester(lines, shebang, vararg_pattern, *arg):
assert lines[0] == shebang
assert lines[1][-len(vararg_pattern) :] == vararg_pattern
for this_arg in arg:
asser... | 33.186992 | 88 | 0.600196 |
d57465f16844089d7c12eac13e5aa056c161608d | 10,619 | py | Python | slavdict/dictionary/filters.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 1 | 2022-01-17T17:26:25.000Z | 2022-01-17T17:26:25.000Z | slavdict/dictionary/filters.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 8 | 2020-02-12T13:26:05.000Z | 2022-02-10T19:28:07.000Z | slavdict/dictionary/filters.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | null | null | null | import re
from django.db.models import Count
from django.db.models import Q
from slavdict.custom_user.models import CustomUser
from slavdict.dictionary import constants
from slavdict.dictionary.forms import GREQSORTBASE_CHOICES
from slavdict.dictionary.forms import SORTBASE_CHOICES
from slavdict.dictionary.forms impo... | 34.477273 | 79 | 0.650909 |
d574720bde73858804fb2bd5f3f3a71223d9c0af | 4,870 | py | Python | scripts/module_build_order.py | r5r3/fpluslib | 50de656159a39702dbeb1158dbefc02e58a3fb68 | [
"BSD-3-Clause"
] | 10 | 2016-08-26T20:41:13.000Z | 2019-02-17T19:34:07.000Z | scripts/module_build_order.py | r5r3/fpluslib | 50de656159a39702dbeb1158dbefc02e58a3fb68 | [
"BSD-3-Clause"
] | null | null | null | scripts/module_build_order.py | r5r3/fpluslib | 50de656159a39702dbeb1158dbefc02e58a3fb68 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
'''
This scripts computes the order in which fortran modules that depend on each other should be build.
The name of the files has to be identical to the module names.
Questions or comments: schuster_at_meteo.uni-koeln.de
'''
import os
import re
import argparse
def getDependencies(filename):
... | 37.461538 | 177 | 0.607187 |
d574d66f92383c92322706fe86ed7300086cfa43 | 4,192 | py | Python | workjets/bunch/__init__.py | geekac/workjets | 0e4bca01e0579aade353aeaeb8e087bb8da2037b | [
"MIT"
] | null | null | null | workjets/bunch/__init__.py | geekac/workjets | 0e4bca01e0579aade353aeaeb8e087bb8da2037b | [
"MIT"
] | null | null | null | workjets/bunch/__init__.py | geekac/workjets | 0e4bca01e0579aade353aeaeb8e087bb8da2037b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import platform
__version__ = '1.0.1'
VERSION = tuple(map(int, __version__.split('.')))
__all__ = ('Bunch', 'bunchify', 'unbunchify',)
_IS_PYTHON_3 = (platform.python_version() >= '3')
identity = lambda x: x
# u('string') replaces the forwards-incompatible u'string'
i... | 23.160221 | 70 | 0.606155 |
d574d76576751413364226d6e0b94bdffd2ccd9b | 1,293 | py | Python | 06_aws_restapi_lambda_cdk/frontend/app.py | bgins/cs430-src | cee2417872cb14d17807e14ea9c2180b6e9c09eb | [
"MIT"
] | 2 | 2020-02-25T21:30:34.000Z | 2020-10-26T18:07:03.000Z | 06_aws_restapi_lambda_cdk/frontend/app.py | bgins/cs430-src | cee2417872cb14d17807e14ea9c2180b6e9c09eb | [
"MIT"
] | null | null | null | 06_aws_restapi_lambda_cdk/frontend/app.py | bgins/cs430-src | cee2417872cb14d17807e14ea9c2180b6e9c09eb | [
"MIT"
] | 4 | 2020-03-14T18:53:10.000Z | 2020-10-22T01:47:56.000Z | from aws_cdk import (
aws_s3 as _s3,
aws_iam as _iam,
aws_s3_deployment as _s3_deploy,
core
)
class Frontend(core.Stack):
def __init__(self, app: core.App, id: str, **kwargs) -> None:
"""Deploy the frontend to an S3 bucket
Sets up:
- An S3 with public acces... | 27.510638 | 83 | 0.574633 |
d5751efc8219aeee27f129dd0876598c18383142 | 187 | py | Python | scan_models/tests/__init__.py | jessielaf/django-scan-models | ec32ee49c42cb5e567cbae8b9bff2eb3cc18261a | [
"MIT"
] | 29 | 2020-03-18T19:37:18.000Z | 2021-12-07T09:36:51.000Z | scan_models/tests/__init__.py | jessielaf/django-scan-models | ec32ee49c42cb5e567cbae8b9bff2eb3cc18261a | [
"MIT"
] | null | null | null | scan_models/tests/__init__.py | jessielaf/django-scan-models | ec32ee49c42cb5e567cbae8b9bff2eb3cc18261a | [
"MIT"
] | null | null | null | from .happy_flow import TestHappyFlow
from .command import TestCommand
from .parser.validator_parser import TestValidatorParser
from .parser.attributes_parser import TestAttributesParser
| 37.4 | 58 | 0.882353 |
d57557ba6223d9896b7d07b23c80eade95a15e3d | 2,694 | py | Python | hackerrank/python/Algorithms/03_Strings/03_TwoCharacters/solution.py | edlabao/cs-practice | 44b94e71f063a663b6c98a5da2f0066764d01a38 | [
"MIT"
] | null | null | null | hackerrank/python/Algorithms/03_Strings/03_TwoCharacters/solution.py | edlabao/cs-practice | 44b94e71f063a663b6c98a5da2f0066764d01a38 | [
"MIT"
] | null | null | null | hackerrank/python/Algorithms/03_Strings/03_TwoCharacters/solution.py | edlabao/cs-practice | 44b94e71f063a663b6c98a5da2f0066764d01a38 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Problem URL: https://www.hackerrank.com/challenges/two-characters/problem
Level: Easy
Max Score: 15
"""
def is_interleaved(c1, c2, chars):
"""
Return True if the character index lists given by characters c1 qnd c2 are
interleaved, False otherwise.
"""
answer = True
... | 29.282609 | 80 | 0.603563 |
d5759ed02868dd8474bb7baac7a5544839347bec | 52,753 | py | Python | AnalysisFastAfmAndCv/program/learner_performance_prediction.py | LearnSphere/WorkflowComponents | aa49c5f6fc6e47f0dd9138f071f22e1c52f5e960 | [
"BSD-4-Clause-UC"
] | 26 | 2016-09-14T18:15:29.000Z | 2021-12-01T20:01:29.000Z | AnalysisFastAfmAndCv/program/learner_performance_prediction.py | LearnSphere/WorkflowComponents | aa49c5f6fc6e47f0dd9138f071f22e1c52f5e960 | [
"BSD-4-Clause-UC"
] | 122 | 2017-09-12T15:22:03.000Z | 2021-09-27T17:25:08.000Z | AnalysisFastAfmAndCv/program/learner_performance_prediction.py | LearnSphere/WorkflowComponents | aa49c5f6fc6e47f0dd9138f071f22e1c52f5e960 | [
"BSD-4-Clause-UC"
] | 17 | 2017-02-16T16:04:41.000Z | 2021-02-06T05:36:44.000Z | #!/usr/bin/env python
# coding: utf-8
# In[25]:
from datetime import datetime
import argparse
import os
import datetime as dt
import warnings
import re
import numpy as np
import pandas as pd
from scipy import sparse
from scipy.sparse import load_npz, csr_matrix
from collections import defaultdict
from sklearn.prepro... | 45.437554 | 406 | 0.63657 |
d575a539dea583ac65c79f87cb9c964d5b36671d | 1,919 | py | Python | applications/tensorflow/cnns/training/Models/resnet.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/Models/resnet.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/training/Models/resnet.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | # Copyright 2019 Graphcore Ltd.
import tensorflow as tf
from .resnet_base import *
class ResNet(ResNetBase):
def __init__(self, opts, is_training=True):
if opts['dataset'] == 'imagenet':
definitions = {**RESNETS_Imagenet, **RESNETS_Bottleneck_Imagenet}
else:
if opts['widen... | 31.459016 | 77 | 0.578426 |
d575e8449b6cee38f73034f08edeb8257e62ca0b | 3,155 | py | Python | pines/styles.py | jpn--/pine | 3980a9f0b09dd36b2fed7e52750847637be5f067 | [
"MIT"
] | 2 | 2017-08-09T02:42:37.000Z | 2020-06-16T14:14:16.000Z | pines/styles.py | jpn--/pine | 3980a9f0b09dd36b2fed7e52750847637be5f067 | [
"MIT"
] | null | null | null | pines/styles.py | jpn--/pine | 3980a9f0b09dd36b2fed7e52750847637be5f067 | [
"MIT"
] | null | null | null |
body_font = 'font-family: "Book-Antiqua", "Palatino", serif;'
signature_font = 'font-size:70%; font-weight:100; font-style:italic; font-family: Roboto, Helvetica, sans-serif;'
signature_name_font = 'font-weight:400; font-style:normal; font-family: "Roboto Slab", Roboto, Helvetica, sans-serif;'
def load_css(filen... | 25.039683 | 132 | 0.712203 |
d57601b0c3841d41b40ddc29160913a20a9d1a4f | 13,239 | py | Python | trainer.py | ethanabrooks/teacher-RL | 41b44fa4de1e8ce7e0c3eac726919c28ede63538 | [
"MIT"
] | null | null | null | trainer.py | ethanabrooks/teacher-RL | 41b44fa4de1e8ce7e0c3eac726919c28ede63538 | [
"MIT"
] | null | null | null | trainer.py | ethanabrooks/teacher-RL | 41b44fa4de1e8ce7e0c3eac726919c28ede63538 | [
"MIT"
] | null | null | null | import inspect
import math
import os
import sys
from collections import namedtuple
from pathlib import Path
from pprint import pprint
from typing import Dict, Optional
import gym
import ray
import torch
from ray import tune
from ray.tune.suggest.hyperopt import HyperOptSearch
from tensorboardX import SummaryWriter
fr... | 36.271233 | 88 | 0.540977 |
d57625d393b0ab99f8c79c87468ad9c4de769ded | 9,358 | py | Python | ice_validator/tests/utils/ports.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2018-08-29T19:33:22.000Z | 2018-08-29T19:33:22.000Z | ice_validator/tests/utils/ports.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | ice_validator/tests/utils/ports.py | rohitagarwal0910/vvp-cnf-validation-scripts | 2825f9517f4f186b4f6cc733dc1f11f1414c438e | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2019-07-23T15:47:43.000Z | 2021-07-02T15:04:19.000Z | # -*- coding: utf8 -*-
# ============LICENSE_START=======================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2019 AT&T Intellectual Property. All rights reserved.
# ========================================... | 38.04065 | 88 | 0.624599 |
d57645fc647024552c2df76f0b0428b312f71374 | 4,596 | py | Python | tensormonk/essentials/cudamodel.py | Tensor46/TensorMONK | 67617d3fdf8fde072ba9cab42de7d67c79b17494 | [
"MIT"
] | 29 | 2018-07-06T23:57:23.000Z | 2022-03-08T20:38:57.000Z | tensormonk/essentials/cudamodel.py | Johnson-yue/TensorMONK | 1785132b82c685c3b3fc05b00dec46b1fccfc948 | [
"MIT"
] | 3 | 2018-12-14T22:21:26.000Z | 2020-06-19T02:13:34.000Z | tensormonk/essentials/cudamodel.py | Johnson-yue/TensorMONK | 1785132b82c685c3b3fc05b00dec46b1fccfc948 | [
"MIT"
] | 8 | 2018-07-06T23:58:03.000Z | 2021-04-12T01:35:54.000Z | """ TensorMONK's :: essentials """
import torch
import torch.nn as nn
class CudaModel(torch.nn.Module):
""" Works on both CPU & GPU """
def __init__(self, is_cuda, gpus, net, net_kwargs):
super(CudaModel, self).__init__()
self.gpus = gpus
self.is_cuda = is_cuda
self.NET46 = n... | 41.781818 | 80 | 0.516101 |
d576486569e6b400dc4ddb305b99bbc60698bc4d | 1,840 | py | Python | src/script/create_all.py | bincrafters/conan-boost_base | 06b161a93da699d70d8fe7df162b30e7078a243c | [
"MIT"
] | 1 | 2020-01-30T21:33:28.000Z | 2020-01-30T21:33:28.000Z | src/script/create_all.py | bincrafters/conan-boost_base | 06b161a93da699d70d8fe7df162b30e7078a243c | [
"MIT"
] | 1 | 2019-01-16T22:31:50.000Z | 2019-01-16T22:31:50.000Z | src/script/create_all.py | bincrafters/conan-boost_base | 06b161a93da699d70d8fe7df162b30e7078a243c | [
"MIT"
] | 5 | 2019-04-24T05:49:13.000Z | 2020-01-30T21:36:55.000Z | #!/usr/bin/env python3
"""
Copyright (C) 2019 Rene Rivera.
Use, modification and distribution are subject to the
Boost Software License, Version 1.0. (See accompanying file
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
"""
import os.path
import sys
from pprint import pprint
from bls.u... | 29.677419 | 76 | 0.570109 |
d57686700212750fda19d529e5eef8e8745c0c0f | 1,739 | py | Python | passrotate/forms.py | simon816/pass-rotate | 2c133e736cb27cebf2d903f863722b685f4f76fc | [
"MIT"
] | null | null | null | passrotate/forms.py | simon816/pass-rotate | 2c133e736cb27cebf2d903f863722b685f4f76fc | [
"MIT"
] | null | null | null | passrotate/forms.py | simon816/pass-rotate | 2c133e736cb27cebf2d903f863722b685f4f76fc | [
"MIT"
] | null | null | null | from typing import Dict, Callable
from bs4 import BeautifulSoup
from bs4.element import ResultSet
FormData = Dict[str, str]
def get_form_data(inputs: ResultSet) -> FormData:
"""Returns data dictionary from list of BeautifulSoup input elements.
Parameters:
inputs: The list of BeautifulSoup input elem... | 32.203704 | 77 | 0.650374 |
d57693b47cd76a25ebebc7f9c6c2a0080a2e923f | 9,108 | py | Python | model/img2seq.py | diamondgloves/im2latex | 8ef3378cb289846a5d85ce60785e11c6c5291700 | [
"Apache-2.0"
] | 1 | 2020-01-03T15:30:32.000Z | 2020-01-03T15:30:32.000Z | model/img2seq.py | diamondgloves/im2latex | 8ef3378cb289846a5d85ce60785e11c6c5291700 | [
"Apache-2.0"
] | null | null | null | model/img2seq.py | diamondgloves/im2latex | 8ef3378cb289846a5d85ce60785e11c6c5291700 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
from .base import BaseModel
from .decoder import Decoder
from .encoder import Encoder
from .evaluation.text import score_files, write_answers, truncate_end
from .utils.general import Config, Progbar, minibatches
from .utils.image import pad_batch_images
from .utils.text impor... | 34.369811 | 98 | 0.583553 |
d57698987b15cb0a48ea675414135e94e005fe14 | 1,574 | py | Python | sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/089_host_fs.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/089_host_fs.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/db/sqlalchemy/migrate_repo/versions/089_host_fs.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sqlalchemy import DateTime, String, Integer
from sqlalchemy import Column, MetaData, Table, ForeignKey
from sysinv.openstack.common import log
ENGINE = 'InnoDB'
CHARSET = 'utf8'
... | 25.387097 | 74 | 0.651842 |
d576a73a749e7d2d9cfa59289f1b058c760f7391 | 5,174 | py | Python | gym_electric_motor/envs/gym_dcm/dc_permex_motor_env.py | zizai/gym-electric-motor | 48a0232edf3474e441453126df0f52dc391aed11 | [
"MIT"
] | null | null | null | gym_electric_motor/envs/gym_dcm/dc_permex_motor_env.py | zizai/gym-electric-motor | 48a0232edf3474e441453126df0f52dc391aed11 | [
"MIT"
] | null | null | null | gym_electric_motor/envs/gym_dcm/dc_permex_motor_env.py | zizai/gym-electric-motor | 48a0232edf3474e441453126df0f52dc391aed11 | [
"MIT"
] | null | null | null | from gym_electric_motor.core import ElectricMotorEnvironment
from gym_electric_motor.physical_systems.physical_systems import DcMotorSystem
from gym_electric_motor.reference_generators.wiener_process_reference_generator import WienerProcessReferenceGenerator
from gym_electric_motor.reward_functions import WeightedSu... | 33.816993 | 119 | 0.615964 |
d576ab8ba8e179d332b03d17b2392202e9070504 | 8,535 | py | Python | bin/pyrdock_run.py | gicsaw/VHTS | dd23cbb0216dd628bb95bf4bb7e93ce49514c89d | [
"MIT"
] | 1 | 2022-01-19T18:37:00.000Z | 2022-01-19T18:37:00.000Z | bin/pyrdock_run.py | AIDrug/VHTS | dd23cbb0216dd628bb95bf4bb7e93ce49514c89d | [
"MIT"
] | null | null | null | bin/pyrdock_run.py | AIDrug/VHTS | dd23cbb0216dd628bb95bf4bb7e93ce49514c89d | [
"MIT"
] | 1 | 2022-01-19T18:36:42.000Z | 2022-01-19T18:36:42.000Z | #!/usr/bin/env python
import sys
import os
import argparse
import vhts.pyrdock as pyrdock
import pandas as pd
class LoadFromConfig(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
with values as f:
parser.parse_args(f.read().split(), namespace)
class Exten... | 37.599119 | 79 | 0.645929 |
d576b003a51f7ecf66143834f96caa86d624b394 | 4,601 | py | Python | producten/models.py | fahrrad/klepro | 3257a30a6a20bdcaf51256f31d80126047fd1c63 | [
"Apache-2.0"
] | null | null | null | producten/models.py | fahrrad/klepro | 3257a30a6a20bdcaf51256f31d80126047fd1c63 | [
"Apache-2.0"
] | null | null | null | producten/models.py | fahrrad/klepro | 3257a30a6a20bdcaf51256f31d80126047fd1c63 | [
"Apache-2.0"
] | null | null | null | from random import choice
from dateutil.relativedelta import relativedelta
import datetime
from decimal import Decimal
from django.db import models
class Eenheid(models.Model):
"""Class staat voor een eenheid waarin een prijs kan uitgedrukt
worden. \ vb: Liter(L), Kubiek (Kb)"""
naam = models.CharField(... | 33.830882 | 102 | 0.665725 |
d576ecd71039caeeb1d65e32b7d86da1db86cb0b | 494 | py | Python | apps/blog/processor.py | Profeel/django_blog | 6c86c0e4c3b3b122317bbb24a43ded4cb32724d9 | [
"Apache-2.0"
] | 1 | 2016-03-07T00:38:52.000Z | 2016-03-07T00:38:52.000Z | apps/blog/processor.py | Profeel/django_blog | 6c86c0e4c3b3b122317bbb24a43ded4cb32724d9 | [
"Apache-2.0"
] | null | null | null | apps/blog/processor.py | Profeel/django_blog | 6c86c0e4c3b3b122317bbb24a43ded4cb32724d9 | [
"Apache-2.0"
] | null | null | null | #! encoding=utf-8
from django.db import connection
def tag_list(request):
'''获取每个标签的文章数量,sqlite不支持right join on'''
cursor = connection.cursor()
sql = "SELECT title, c FROM (\
SELECT tag_id AS tid, COUNT(*) AS c \
FROM blog_blog_tags GROUP BY tag_id) AS ... | 32.933333 | 69 | 0.560729 |
d5770064817de9c56abcadf0cd97eac4379fc625 | 271 | py | Python | terrascript/qingcloud/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/qingcloud/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/qingcloud/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/qingcloud/__init__.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class qingcloud(terrascript.Provider):
pass
| 18.066667 | 79 | 0.774908 |
d577286001768dc46b54e6c386f2dd7887c0825f | 7,778 | py | Python | pytorch_toolkit/formula_recognition/tools/utils/exporter.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/tools/utils/exporter.py | maxpark/openvino_training_extensions | 98450ed8aeab8a003e1d19b49b6fb0da60388605 | [
"Apache-2.0"
] | null | null | null | pytorch_toolkit/formula_recognition/tools/utils/exporter.py | maxpark/openvino_training_extensions | 98450ed8aeab8a003e1d19b49b6fb0da60388605 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 44.701149 | 116 | 0.607354 |
d5772e9b7f3096b501c5c934e876f92e97b78c31 | 519 | py | Python | specs/altair/prefix.py | ultratwo/eth2.0-specs | e4b5be67dd362619eb68e8173cf37183e7fe04e4 | [
"CC0-1.0"
] | null | null | null | specs/altair/prefix.py | ultratwo/eth2.0-specs | e4b5be67dd362619eb68e8173cf37183e7fe04e4 | [
"CC0-1.0"
] | null | null | null | specs/altair/prefix.py | ultratwo/eth2.0-specs | e4b5be67dd362619eb68e8173cf37183e7fe04e4 | [
"CC0-1.0"
] | null | null | null | from typing import NewType, Union
_temp = __import__("eth2spec.phase0", globals(), locals(), [PRESET_NAME])
phase0: Any = getattr(_temp, PRESET_NAME)
from eth2spec.utils.ssz.ssz_typing import Path
SSZVariableName = str
GeneralizedIndex = NewType('GeneralizedIndex', int)
def get_generalized_index(ssz_class: Any, *pa... | 32.4375 | 108 | 0.751445 |
d5773256b03bb908192f1ff4ec651d3bfc369dfc | 1,846 | py | Python | tests/test_case/test_cli.py | reproducible-biomedical-modeling/Biosimulations_COMBINE_archive_test_suite | 3129d5bfd1275577b1f85b1e7efb7a32ecdb8b61 | [
"CC0-1.0",
"MIT"
] | 5 | 2020-10-06T12:00:09.000Z | 2021-09-09T17:07:41.000Z | tests/test_case/test_cli.py | biosimulators/Biosimulators_test_suite | 2614cf05fc2304735d1abe4c93ca337867ea5836 | [
"CC0-1.0",
"MIT"
] | 51 | 2020-12-22T22:31:54.000Z | 2022-02-11T17:14:32.000Z | tests/test_case/test_cli.py | reproducible-biomedical-modeling/OMEX_Archives | 3129d5bfd1275577b1f85b1e7efb7a32ecdb8b61 | [
"CC0-1.0",
"MIT"
] | 2 | 2021-07-09T14:43:06.000Z | 2022-01-05T17:50:51.000Z | from biosimulators_test_suite.test_case import cli
from biosimulators_test_suite.warnings import TestCaseWarning
import shutil
import tempfile
import unittest
class DockerImageTestCaseTest(unittest.TestCase):
IMAGE = 'ghcr.io/biosimulators/biosimulators_copasi/copasi:latest'
def setUp(self):
self.dir... | 39.276596 | 97 | 0.687974 |
d577332eea9890136fa60b69e67acdc4f6885893 | 25,145 | py | Python | stardate/stardate.py | RuthAngus/stardate | ba6ecbdfdc0ab6429d22d026c09593f0a8cca0f6 | [
"MIT"
] | 6 | 2019-02-19T13:46:46.000Z | 2020-03-31T23:46:36.000Z | stardate/stardate.py | RuthAngus/stardate | ba6ecbdfdc0ab6429d22d026c09593f0a8cca0f6 | [
"MIT"
] | 5 | 2019-02-21T21:37:05.000Z | 2019-09-09T10:38:15.000Z | stardate/stardate.py | RuthAngus/stardate | ba6ecbdfdc0ab6429d22d026c09593f0a8cca0f6 | [
"MIT"
] | 10 | 2019-02-11T02:46:32.000Z | 2022-03-03T22:16:53.000Z | import os
import numpy as np
import pandas as pd
import h5py
import tqdm
from .lhf import lnprob, lnlike, nll# , ptform
from isochrones import StarModel, SingleStarModel, get_ichrone
import emcee
import scipy.optimize as spo
# from dynesty import NestedSampler
from isochrones.priors import FlatPrior
from isochrones.mi... | 41.769103 | 91 | 0.575184 |
d57745a6c251ab59fbbe0570b9c1f703cde0246f | 2,270 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/channel_admin_log_event_action_toggle_invites.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/channel_admin_log_event_action_toggle_invites.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/channel_admin_log_event_action_toggle_invites.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 32.898551 | 106 | 0.644934 |
d577478d3ce34be01d05dc6d7bf662f3d2f4dc16 | 7,678 | py | Python | tests/robot_cameraman/test_object_tracking.py | maiermic/robot-cameraman | afe441cf1677322062da77aa782a08f10440fcc7 | [
"MIT"
] | 7 | 2019-11-17T13:18:07.000Z | 2022-03-13T04:14:15.000Z | tests/robot_cameraman/test_object_tracking.py | maiermic/robot-cameraman | afe441cf1677322062da77aa782a08f10440fcc7 | [
"MIT"
] | 14 | 2021-02-03T16:21:21.000Z | 2022-03-11T23:57:48.000Z | tests/robot_cameraman/test_object_tracking.py | maiermic/robot-cameraman | afe441cf1677322062da77aa782a08f10440fcc7 | [
"MIT"
] | 2 | 2021-04-21T21:22:49.000Z | 2021-05-28T17:39:13.000Z | import pytest
from robot_cameraman.box import Box, Point
from robot_cameraman.image_detection import DetectionCandidate
from robot_cameraman.object_tracking import ObjectTracker
@pytest.fixture()
def object_tracker():
return ObjectTracker()
@pytest.fixture()
def first_object_id():
return 0
@pytest.fixtur... | 40.840426 | 80 | 0.76322 |
d577518fa13b860ed0c768e6732fc239413d785b | 45,388 | py | Python | scf/hf.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | scf/hf.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | scf/hf.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Hartree-Fock
'''
import sys
import tempfile
import time
from functools import reduce
import numpy
import scipy.linalg
from pyscf import gto
from pyscf import lib
from pyscf.lib import logger
from pyscf.scf import diis
from pyscf.scf import _vhf... | 33.178363 | 95 | 0.591015 |
d5777995bd36c7e526e51abdbceeef07c6048a4b | 7,053 | py | Python | lib/rucio/core/account_limit.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | lib/rucio/core/account_limit.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | lib/rucio/core/account_limit.py | elichad/rucio | 0705e4124e18c853c4661f85e00238cb0c6bd750 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013-2018 CERN for the benefit of the ATLAS collaboration.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 41.245614 | 217 | 0.661562 |
d5777c5a8b13e06388844a865a508f8fa9a74b84 | 1,661 | py | Python | bot_main.py | Levich125/minsk_apartment_rent_test_bot | d708838d5e663f470bdb8c62c574154ca63efbf3 | [
"MIT"
] | null | null | null | bot_main.py | Levich125/minsk_apartment_rent_test_bot | d708838d5e663f470bdb8c62c574154ca63efbf3 | [
"MIT"
] | null | null | null | bot_main.py | Levich125/minsk_apartment_rent_test_bot | d708838d5e663f470bdb8c62c574154ca63efbf3 | [
"MIT"
] | null | null | null | import json
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, InlineQueryHandler
from scrapers.onliner_scraper import OnlinerScraper
from scrapers.realt_scraper import RealtScraper
from scrapers.kvartirant_scraper_new import KvartirantScraper
OS = OnlinerScraper()
RS = RealtScraper()
KS = Kvar... | 27.683333 | 96 | 0.730885 |
d5779885ff5706b1ae245059f1ff6a77cc16fe66 | 1,447 | py | Python | instaApp/models.py | jakesIII/instagrama | 9580458f77ed40a54f421248290a1d2b2d3cd16b | [
"Unlicense"
] | null | null | null | instaApp/models.py | jakesIII/instagrama | 9580458f77ed40a54f421248290a1d2b2d3cd16b | [
"Unlicense"
] | 3 | 2020-02-12T03:27:52.000Z | 2021-06-10T22:28:22.000Z | instaApp/models.py | jakesIII/instagrama | 9580458f77ed40a54f421248290a1d2b2d3cd16b | [
"Unlicense"
] | 1 | 2020-08-11T17:06:27.000Z | 2020-08-11T17:06:27.000Z | from django.db import models
from pyuploadcare.dj.models import ImageField
from django.contrib.auth.models import User
# Create your models here.
class Profile(models.Model):
user = models.OneToOneField(User,on_delete=models.CASCADE,related_name='profile')
avatar = ImageField(manual_crop='', null=True)
bio ... | 26.309091 | 85 | 0.686938 |
d5779f35b33714befbb8fa5792a608e5197555b8 | 23,497 | py | Python | models/energy_demand/run.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 5 | 2019-12-18T15:27:28.000Z | 2020-10-03T09:10:23.000Z | models/energy_demand/run.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 11 | 2019-12-18T14:53:03.000Z | 2021-12-30T07:26:46.000Z | models/energy_demand/run.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 3 | 2019-12-18T15:27:39.000Z | 2022-02-25T07:04:06.000Z | """The sector model wrapper for smif to run the energy demand model
"""
import os
import logging
from collections import defaultdict
from shapely.geometry import shape, mapping
from smif.model.sector_model import SectorModel
from energy_demand import wrapper_model
from energy_demand.assumptions import strategy_vars_d... | 42.490054 | 212 | 0.609269 |
d577d28032cfe7eb8a3deba738c8bb9a740cd1e8 | 10,897 | py | Python | test/test_test_metadata.py | simleo/ro-crate-py | 99ebd922a072b49f91c26ff63f2d3aa2df6fe8e1 | [
"Apache-2.0"
] | null | null | null | test/test_test_metadata.py | simleo/ro-crate-py | 99ebd922a072b49f91c26ff63f2d3aa2df6fe8e1 | [
"Apache-2.0"
] | null | null | null | test/test_test_metadata.py | simleo/ro-crate-py | 99ebd922a072b49f91c26ff63f2d3aa2df6fe8e1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2021 The University of Manchester, UK
# Copyright 2020-2021 Vlaams Instituut voor Biotechnologie (VIB), BE
# Copyright 2020-2021 Barcelona Supercomputing Center (BSC), ES
# Copyright 2020-2021 Center for Advanced Studies, Research and Development in Sardinia (CRS4), IT
#
# Licensed under the Apache Lic... | 39.915751 | 107 | 0.713407 |
d577e98fcf9585fee9c0766ff4b3dcab46057405 | 3,747 | py | Python | rnn/architect.py | lorylei/DARTS-et | f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 | [
"Apache-2.0"
] | 1 | 2020-12-29T14:44:00.000Z | 2020-12-29T14:44:00.000Z | rnn/architect.py | lorylei/DARTS-et | f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 | [
"Apache-2.0"
] | null | null | null | rnn/architect.py | lorylei/DARTS-et | f22cfd53c14afd6ba602b8ecfbff9cdf77fc2ff8 | [
"Apache-2.0"
] | null | null | null | import torch
import numpy as np
import torch.nn as nn
from torch.autograd import Variable
def _concat(xs):
return torch.cat([x.view(-1) for x in xs])
class Architect(object):
def __init__(self, model, args):
self.network_momentum = args.momentum
self.network_weight_decay = args.weight_decay
self.mo... | 40.290323 | 150 | 0.719509 |
d577fd0897adb93756c20bb222d0e4197b972b07 | 6,941 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_persistent_volume.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_persistent_volume.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_persistent_volume.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Per... | 31.40724 | 295 | 0.613888 |
d578185f6938b9d75750d54c3e28cd1bdc38f9f5 | 1,960 | py | Python | mslib/utils/verify_user_token.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 33 | 2020-12-04T04:29:28.000Z | 2022-03-05T17:11:49.000Z | mslib/utils/verify_user_token.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 614 | 2020-12-06T16:54:44.000Z | 2022-03-31T07:41:02.000Z | mslib/utils/verify_user_token.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 51 | 2020-12-04T15:10:46.000Z | 2022-03-20T02:02:11.000Z | # -*- coding: utf-8 -*-
"""
mslib.utils.verify_user_token
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Collection of unit conversion related routines for the Mission Support System.
This file is part of mss.
:copyright: Copyright 2008-2014 Deutsches Zentrum fuer Luft- und Raumfahrt e.V.
:copyright: Copyrig... | 34.385965 | 83 | 0.692857 |
d57857409776f2138ed7164ade0a6a1199ec2224 | 9,677 | py | Python | Tools/Scripts/webkitpy/thirdparty/mock.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/thirdparty/mock.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/thirdparty/mock.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # mock.py
# Test tools for mocking and patching.
# Copyright (C) 2007-2009 Michael Foord
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# mock 0.6.0
# http://www.voidspace.org.uk/python/mock/
# Released subject to the BSD License
# Please see http://www.voidspace.org.uk/python/license.shtml
# 2009-11-25: Licence dow... | 31.216129 | 115 | 0.628294 |
d57867935b87b14eabe5eb0faa2fea7db2f28293 | 850 | py | Python | instructors/lessons/properties/examples/descriptors.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/lessons/properties/examples/descriptors.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/lessons/properties/examples/descriptors.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | #A descriptor is simply an object that represents the value of an attribute
#it customizes one or more of the special methods
# __get__(), __set__(), and __delete__()
class TypedProperty(object):
def __init__(self, name, type, default=None):
self.name = "_" + name
self.type = type
self.d... | 35.416667 | 75 | 0.663529 |
d578acf3bf2598d8394e1df02d6458dff81e605d | 479 | py | Python | intelligen/signals.py | Bouchet07/intelligen | d876b1241efe7ad70fa759e1f10728728f867992 | [
"MIT"
] | null | null | null | intelligen/signals.py | Bouchet07/intelligen | d876b1241efe7ad70fa759e1f10728728f867992 | [
"MIT"
] | null | null | null | intelligen/signals.py | Bouchet07/intelligen | d876b1241efe7ad70fa759e1f10728728f867992 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from typing import List
Vector = List[float]
def heaviside(t: Vector) -> Vector:
return (np.array(t) >= 0).astype(int)
def rect(t: Vector) -> Vector:
t = np.array(t)
return heaviside(t + 1/2) - heaviside(t - 1/2)
def delta(n: Vector) -> Vector:
retur... | 22.809524 | 57 | 0.622129 |
d578c3c6ca258469804eec573998392b3dac1b8b | 4,042 | py | Python | var/spack/repos/builtin/packages/3dtk/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/3dtk/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/3dtk/package.py | flatironinstitute/spack | 71a7b1b5fadbe16bcdb36fb679aa828cd7d83b02 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class _3dtk(CMakePackage):
"""The 3D Toolkit provides algorithms and methods to process 3D point... | 43.462366 | 109 | 0.666254 |
d578cd3846033971be9215480f53853d73fb23a9 | 3,820 | py | Python | sdmetrics/timeseries/detection.py | ZhuofanXie/SDMetrics | a89fa4177b9ff2aa1ee6dfaef0b908581109fe55 | [
"MIT"
] | 1 | 2021-03-12T06:13:11.000Z | 2021-03-12T06:13:11.000Z | sdmetrics/timeseries/detection.py | ZhuofanXie/SDMetrics | a89fa4177b9ff2aa1ee6dfaef0b908581109fe55 | [
"MIT"
] | null | null | null | sdmetrics/timeseries/detection.py | ZhuofanXie/SDMetrics | a89fa4177b9ff2aa1ee6dfaef0b908581109fe55 | [
"MIT"
] | null | null | null | """Machine Learning Detection based metrics for Time Series."""
import numpy as np
import pandas as pd
import rdt
from sklearn.model_selection import train_test_split
from sdmetrics.goal import Goal
from sdmetrics.timeseries import ml_scorers
from sdmetrics.timeseries.base import TimeSeriesMetric
class TimeSeriesDe... | 36.380952 | 91 | 0.665969 |
d578f578487e336c9b18487abda4f2d0fe4b3517 | 8,492 | py | Python | tests/manage/monitoring/prometheusmetrics/test_monitoring_defaults.py | nbalacha/ocs-ci | 9c5a5474d62777e868b80894d6b0f3567a7b605d | [
"MIT"
] | null | null | null | tests/manage/monitoring/prometheusmetrics/test_monitoring_defaults.py | nbalacha/ocs-ci | 9c5a5474d62777e868b80894d6b0f3567a7b605d | [
"MIT"
] | null | null | null | tests/manage/monitoring/prometheusmetrics/test_monitoring_defaults.py | nbalacha/ocs-ci | 9c5a5474d62777e868b80894d6b0f3567a7b605d | [
"MIT"
] | null | null | null | # -*- coding: utf8 -*-
"""
Test cases here performs Prometheus queries directly without a workload, to
check that OCS Monitoring is configured and available as expected.
"""
import logging
import pytest
from ocs_ci.framework import config
from ocs_ci.framework.pytest_customization.marks import (
metrics_for_exte... | 36.603448 | 85 | 0.686293 |
d578f8fe48ba6faf8bd2e45479fd3e35eb1e5b88 | 810 | py | Python | wedding/migrations/0005_guestnote.py | jsayles/wedding | 242d28d0271d58909b2c5ff5457d909efaecd3c0 | [
"MIT"
] | null | null | null | wedding/migrations/0005_guestnote.py | jsayles/wedding | 242d28d0271d58909b2c5ff5457d909efaecd3c0 | [
"MIT"
] | null | null | null | wedding/migrations/0005_guestnote.py | jsayles/wedding | 242d28d0271d58909b2c5ff5457d909efaecd3c0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('wedding', '0004_invitation_tier'),
]
operations = [
migrations.CreateModel(
name='GuestNote',
fields... | 28.928571 | 114 | 0.559259 |
d578fe848d1cc6e9e82c0658b5a8ac5e66e2d43f | 12,901 | py | Python | tests/test_project.py | qinhubao/git_repo | cf0ba48649bab9fc6c88dcf15c1ae66d3717693d | [
"Apache-2.0"
] | 168 | 2017-07-05T04:26:54.000Z | 2022-03-27T06:34:29.000Z | tests/test_project.py | qinhubao/git_repo | cf0ba48649bab9fc6c88dcf15c1ae66d3717693d | [
"Apache-2.0"
] | 2 | 2020-09-06T17:25:29.000Z | 2021-04-16T09:55:20.000Z | tests/test_project.py | qinhubao/git_repo | cf0ba48649bab9fc6c88dcf15c1ae66d3717693d | [
"Apache-2.0"
] | 107 | 2020-02-02T14:54:37.000Z | 2022-03-22T07:40:47.000Z | # Copyright (C) 2019 The Android Open Source 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
#
# Unless required by applicable law ... | 33.25 | 83 | 0.65336 |
d57929202aad37ec30fecd98f435a4affed81f6d | 155 | py | Python | textvinf/modules/decoders/__init__.py | vikigenius/textvinf | 65f1f5595c17488a01a56a064dc217a94d887399 | [
"MIT"
] | null | null | null | textvinf/modules/decoders/__init__.py | vikigenius/textvinf | 65f1f5595c17488a01a56a064dc217a94d887399 | [
"MIT"
] | null | null | null | textvinf/modules/decoders/__init__.py | vikigenius/textvinf | 65f1f5595c17488a01a56a064dc217a94d887399 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from textvinf.modules.decoders.decoder import Decoder
from textvinf.modules.decoders.variational_decoder import VariationalDecoder
| 38.75 | 76 | 0.819355 |
d57951ce9a554f01f0fc776383bbce53bf5de986 | 868 | py | Python | hashicorp_vault_client/test/test_body13.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | hashicorp_vault_client/test/test_body13.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | 2 | 2019-09-30T20:56:41.000Z | 2019-10-02T00:22:07.000Z | hashicorp_vault_client/test/test_body13.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
HashiCorp Vault API
HTTP API that gives you full access to Vault. All API routes are prefixed with `/v1/`. # noqa: E501
OpenAPI spec version: 1.2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
... | 21.7 | 104 | 0.68318 |
d579a9cf4d522d0d32122869054d06466d070be6 | 2,182 | py | Python | Farmacia/apps/compras/migrations/0002_auto_20151007_1527.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:05:20.000Z | 2020-05-28T23:19:23.000Z | Farmacia/apps/compras/migrations/0002_auto_20151007_1527.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | null | null | null | Farmacia/apps/compras/migrations/0002_auto_20151007_1527.py | cluco91/Django_Farmacia | 10d787533bcebac8ba35cf8a7feb10ffb14ca45f | [
"MIT"
] | 2 | 2018-11-06T04:12:17.000Z | 2019-11-21T18:34:26.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('medicamentos', '0001_initial'),
('laboratorio', '0001_initial'),
('distribuidor', '0001_initial'),
('compras', '0001_... | 31.623188 | 114 | 0.533456 |
d579cf762dff134ee069d218cd82888466b9a8b3 | 861 | py | Python | Chapter 5/05/recipe37.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 5/05/recipe37.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 5/05/recipe37.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | from pyccuracy.actions import ActionBase
from pyccuracy.errors import *
class LoggedInAction(ActionBase):
regex = r'(And )?I am logged in with username [\"](?P<username>.+)[\"] and password [\"](?P<password>.+)[\"]$'
def execute(self, context, username, password):
self.execute_action(u'I go to "http:/... | 39.136364 | 114 | 0.632985 |
d579f3048684f91092a235e73369fe6cdbdbc830 | 432 | py | Python | src/oscar/apps/catalogue/migrations/0011_auto_20170422_1355.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/catalogue/migrations/0011_auto_20170422_1355.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | 5 | 2021-05-28T19:38:28.000Z | 2022-03-12T00:45:39.000Z | tests/_site/apps/catalogue/migrations/0011_auto_20170422_1355.py | Jean1508/ya-madoa | 1ffb1d11e15bf33e4c3a09698675a4357e887eaa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-04-22 12:55
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('catalogue', '0010_auto_20170420_0439'),
]
operations = [
migrations.A... | 21.6 | 50 | 0.599537 |
d57a06d8c5954bebb1f16c154239540be3f9edab | 8,686 | py | Python | ibmsecurity/isam/base/ssl_certificates/personal_certificate.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/isam/base/ssl_certificates/personal_certificate.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/isam/base/ssl_certificates/personal_certificate.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | 1 | 2019-05-20T03:14:57.000Z | 2019-05-20T03:14:57.000Z | import logging
import os.path
logger = logging.getLogger(__name__)
def get_all(isamAppliance, kdb_id, check_mode=False, force=False):
"""
Retrieving personal certificate names and details in a certificate database
"""
return isamAppliance.invoke_get("Retrieving personal certificate names and details ... | 38.264317 | 119 | 0.599125 |
d57a1290a22a672e1620ec83256cbfa226336eed | 6,236 | py | Python | dagger.py | dylanrandle/interpret-RL | be59846ccfc17b16e37b6940dd5d7306815040b3 | [
"MIT"
] | null | null | null | dagger.py | dylanrandle/interpret-RL | be59846ccfc17b16e37b6940dd5d7306815040b3 | [
"MIT"
] | null | null | null | dagger.py | dylanrandle/interpret-RL | be59846ccfc17b16e37b6940dd5d7306815040b3 | [
"MIT"
] | null | null | null | from tqdm import tqdm
import numpy as np
from utils import generate_trajectory, evaluate_policy
def dagger(simulator, expert_policy, imitation_policy_generator, N=5, gamma=0.9, seed=42):
"""
Create a policy that imitate the expert policy
Params:
---------------------------------
expert_policy : (s... | 35.033708 | 111 | 0.64304 |
d57a24680bf718c1a7be4163175dd13337981898 | 4,140 | py | Python | sdks/python/appcenter_sdk/models/OrgNameAvailabilityResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/OrgNameAvailabilityResponse.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/OrgNameAvailabilityResponse.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 OrgNameAvailab... | 29.361702 | 95 | 0.583575 |
d57a334859982f1a16fa04563456c1c87d97f20a | 1,022 | py | Python | listen/events/event_instance_delete.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | listen/events/event_instance_delete.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | listen/events/event_instance_delete.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 53.789474 | 79 | 0.495108 |
d57a3f2b8073beae196e86b32c2f9e0fb4ed93fa | 3,006 | py | Python | E 2015-2016/April 5/Assignment_31March_3.py | bnajafi/Python4ScientificComputing_Fundamentals | 7c943404654d9c44920ea9a7fdee28bc99ad8d05 | [
"MIT"
] | 65 | 2017-01-19T08:03:38.000Z | 2021-04-02T17:41:43.000Z | E 2015-2016/April 5/Assignment_31March_3.py | bnajafi/Python4ScientificComputing_Fundamentals | 7c943404654d9c44920ea9a7fdee28bc99ad8d05 | [
"MIT"
] | null | null | null | E 2015-2016/April 5/Assignment_31March_3.py | bnajafi/Python4ScientificComputing_Fundamentals | 7c943404654d9c44920ea9a7fdee28bc99ad8d05 | [
"MIT"
] | 110 | 2017-01-19T08:04:14.000Z | 2020-07-23T13:44:52.000Z | def materialSensitivity(materialList,serieSet,parallelSet,Ri,Ro,T_inside,T_outside):
from wallCalculation import *
sensitivityResults = {}
for gianluca in materials:
conductivity = gianluca["k"]
name = gianluca["name"]
R4={"name":"R4","type":"cond","length":0.16,"area":0.22,"k":condu... | 33.775281 | 124 | 0.659681 |
d57a6b273f7cd3e6167fc1a4695fe17ca994365f | 5,268 | py | Python | tests/test_sql_instance.py | elastest/elastest-service-manager | e0adbe383eada746a5ac103ee7938791c8656633 | [
"Apache-2.0"
] | 2 | 2017-06-15T21:32:07.000Z | 2020-01-08T09:08:33.000Z | tests/test_sql_instance.py | elastest/elastest-service-manager | e0adbe383eada746a5ac103ee7938791c8656633 | [
"Apache-2.0"
] | 20 | 2017-06-12T10:57:45.000Z | 2020-01-08T08:22:31.000Z | tests/test_sql_instance.py | elastest/elastest-service-manager | e0adbe383eada746a5ac103ee7938791c8656633 | [
"Apache-2.0"
] | 8 | 2017-06-07T10:05:47.000Z | 2017-12-12T15:31:41.000Z | # Copyright © 2017-2019 Zuercher Hochschule fuer Angewandte Wissenschaften.
# 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/l... | 41.15625 | 102 | 0.723804 |
d57a7b41debab62dda3bb3752fb3adb10ad265ed | 5,314 | py | Python | data/process.py | gmftbyGMFTBY/WhenToSpeak | bdd57023117735c06b44150d9a4a6d95238a74b5 | [
"MIT"
] | 7 | 2019-12-20T15:27:41.000Z | 2022-01-09T10:17:36.000Z | data/process.py | Mrwhite132613/WhenToSpeak | bdd57023117735c06b44150d9a4a6d95238a74b5 | [
"MIT"
] | 1 | 2020-04-10T14:12:38.000Z | 2020-04-10T14:12:38.000Z | data/process.py | Mrwhite132613/WhenToSpeak | bdd57023117735c06b44150d9a4a6d95238a74b5 | [
"MIT"
] | 3 | 2020-01-09T12:40:17.000Z | 2020-09-09T01:32:34.000Z | #!/usr/bin/python3
# Author: GMFTBY
# Time: 2019.9.25
'''
Before you run this script, make sure you clean the folder
'''
import csv
import os
import pickle
import copy
import argparse
import random
import ipdb
from tqdm import tqdm
def get_all_dialogues(path, turns_threshold=(5, 15)):
# path: dataset folder fi... | 33.847134 | 99 | 0.59729 |
d57a8998482dc8dc89f117f40b208705a052f2b1 | 23,683 | py | Python | converter/nnef_converters/caffe_converters/caffe_to_nnef/converters.py | asdor/NNEF-Tools | e84c3db29c1bffbd1938d40a10765badc0848606 | [
"Apache-2.0"
] | null | null | null | converter/nnef_converters/caffe_converters/caffe_to_nnef/converters.py | asdor/NNEF-Tools | e84c3db29c1bffbd1938d40a10765badc0848606 | [
"Apache-2.0"
] | null | null | null | converter/nnef_converters/caffe_converters/caffe_to_nnef/converters.py | asdor/NNEF-Tools | e84c3db29c1bffbd1938d40a10765badc0848606 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 The Khronos Group Inc.
#
# 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 ... | 41.842756 | 119 | 0.480725 |
d57ab3cc7e65991ef37f91e6b2417dc8d57e0e08 | 5,390 | py | Python | keyconfig/adb.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | null | null | null | keyconfig/adb.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | null | null | null | keyconfig/adb.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | null | null | null | import time
from lib.constants import *
from lib.adafruit_hid.keycode import Keycode
class AdbKeypad():
#--- OPTIONAL METHODS ---
showTerminalDialog="osascript -e 'display dialog \"Can you see a dialog with 2 buttons?\" buttons {\"Ok\", \"Cancel\"} default button \"Ok\"'"
loadDevice = "pkill s... | 41.461538 | 146 | 0.589054 |
d57adbfb51f93ad3ca9fd97ee0d434ddeda4525d | 32,508 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_09_01/operations/_replications_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_09_01/operations/_replications_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_09_01/operations/_replications_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 ... | 43.989175 | 219 | 0.673957 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.