hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7948d4440e39b9de576f7b9e6b3376364d06708f | 2,586 | py | Python | Datasets/Terrain/srtm.py | OIEIEIO/earthengine-py-notebooks | 5d6c5cdec0c73bf02020ee17d42c9e30d633349f | [
"MIT"
] | 1,008 | 2020-01-27T02:03:18.000Z | 2022-03-24T10:42:14.000Z | Datasets/Terrain/srtm.py | rafatieppo/earthengine-py-notebooks | 99fbc4abd1fb6ba41e3d8a55f8911217353a3237 | [
"MIT"
] | 8 | 2020-02-01T20:18:18.000Z | 2021-11-23T01:48:02.000Z | Datasets/Terrain/srtm.py | rafatieppo/earthengine-py-notebooks | 99fbc4abd1fb6ba41e3d8a55f8911217353a3237 | [
"MIT"
] | 325 | 2020-01-27T02:03:36.000Z | 2022-03-25T20:33:33.000Z | # %%
"""
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Datasets/Terrain/srtm.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_blank... | 40.40625 | 457 | 0.70959 |
7948d4e45797e1eceb1cdc1ecc9b8a535b5214bb | 25,282 | py | Python | src/sentry/web/api.py | theatlantic/django-sentry | 0b963478ebed473826591ef88b1ddd4fb5a524e8 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/api.py | theatlantic/django-sentry | 0b963478ebed473826591ef88b1ddd4fb5a524e8 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/api.py | theatlantic/django-sentry | 0b963478ebed473826591ef88b1ddd4fb5a524e8 | [
"BSD-3-Clause"
] | null | null | null | """
sentry.web.views
~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import datetime
import logging
from functools import wraps
from django.contrib import messages
from django.contrib.auth.models import AnonymousUser
from dj... | 30.644848 | 133 | 0.655644 |
7948d4fefebf6f5962c932a7f2962e8b9bec4242 | 6,861 | py | Python | test/programytest/storage/test_engine.py | cen-ai/program-y | a753667638147544c54dbebd9f1c8f9ae7f2159e | [
"MIT"
] | 5 | 2018-08-21T00:13:45.000Z | 2018-09-01T20:00:55.000Z | test/programytest/storage/test_engine.py | cen-ai/program-y | a753667638147544c54dbebd9f1c8f9ae7f2159e | [
"MIT"
] | 1 | 2018-09-12T18:30:17.000Z | 2018-09-12T18:30:17.000Z | test/programytest/storage/test_engine.py | cen-ai/program-y | a753667638147544c54dbebd9f1c8f9ae7f2159e | [
"MIT"
] | 5 | 2018-08-21T00:08:36.000Z | 2018-09-23T06:11:04.000Z | import unittest
import unittest.mock
from programy.storage.engine import StorageEngine
class StorageEngineTests(unittest.TestCase):
def test_test_initialise_with_config_not_implemented(self):
config = unittest.mock.Mock()
engine = StorageEngine(config)
self.assertIsNotNone(engine)
... | 36.110526 | 63 | 0.676724 |
7948d50740e40d0279674d0c811d4f275d6705cb | 864 | py | Python | python/luhn/luhn.py | rob93c/Exercism | 51e38b6559a5650a56d81e733be22b7ee349cedd | [
"MIT"
] | null | null | null | python/luhn/luhn.py | rob93c/Exercism | 51e38b6559a5650a56d81e733be22b7ee349cedd | [
"MIT"
] | null | null | null | python/luhn/luhn.py | rob93c/Exercism | 51e38b6559a5650a56d81e733be22b7ee349cedd | [
"MIT"
] | 1 | 2019-03-19T12:18:39.000Z | 2019-03-19T12:18:39.000Z | class Luhn(object):
def __init__(self, card_num):
self.card_num = self.unspace(card_num)
def is_valid(self) -> bool:
if len(self.card_num) <= 1 or not self.card_num.isdecimal():
return False
else:
return self.total(self.double(self.card_num)) % 10 == 0
@sta... | 30.857143 | 70 | 0.528935 |
7948d59e6e82bb34fa87bac9152091d685c2e3c3 | 3,110 | py | Python | non_semantic_speech_benchmark/eval_embedding/finetune/train_keras_test.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | non_semantic_speech_benchmark/eval_embedding/finetune/train_keras_test.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | non_semantic_speech_benchmark/eval_embedding/finetune/train_keras_test.py | deepneuralmachine/google-research | d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231 | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 34.555556 | 79 | 0.73955 |
7948d5ed6c33fdc184fb4bcb78cce77776ae6273 | 3,989 | py | Python | pages/views.py | JSotres/Academic-Group-Django-Website | 38af959cb6a596642fc11c522b28224cc733e89a | [
"MIT"
] | 5 | 2020-10-26T20:21:50.000Z | 2021-12-14T11:12:39.000Z | pages/views.py | JSotres/Academic-Group-Django-Website | 38af959cb6a596642fc11c522b28224cc733e89a | [
"MIT"
] | 12 | 2020-01-13T00:57:14.000Z | 2022-03-12T00:11:34.000Z | pages/views.py | JSotres/Academic-Group-Django-Website | 38af959cb6a596642fc11c522b28224cc733e89a | [
"MIT"
] | 1 | 2021-05-13T18:27:11.000Z | 2021-05-13T18:27:11.000Z | from django.shortcuts import render
from django.views.generic import TemplateView, CreateView, ListView, DetailView
from .models import ContactRequest, Publications, Member, GroupInformation, ResearchField
class HomePageView(TemplateView):
template_name = 'home.html'
def group_information_list(self):
... | 31.164063 | 110 | 0.723239 |
7948d7660fbc3063fa8a7881ffd68c6a610f27e6 | 7,395 | py | Python | parl/remote/grpc_heartbeat/tests/heartbeat_server_arguments_test.py | lp2333/PARL | e4bde1f5b7e69c5f8d3ee3a90a647dfe12204bd3 | [
"ECL-2.0",
"Apache-2.0"
] | 3,172 | 2018-05-22T02:02:29.000Z | 2022-03-31T09:14:56.000Z | parl/remote/grpc_heartbeat/tests/heartbeat_server_arguments_test.py | BKBK00/PARL | f508bc6085420431b504441c7ff129e64826603e | [
"Apache-2.0"
] | 422 | 2018-05-17T16:58:45.000Z | 2022-03-31T02:03:25.000Z | parl/remote/grpc_heartbeat/tests/heartbeat_server_arguments_test.py | BKBK00/PARL | f508bc6085420431b504441c7ff129e64826603e | [
"Apache-2.0"
] | 794 | 2018-05-21T18:33:19.000Z | 2022-03-30T13:38:09.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 35.552885 | 87 | 0.684922 |
7948d7a25e3f02b0c6140d8932e424fccf94811e | 3,247 | py | Python | src/python/pants/base/run_info.py | hythloday/pants | 107e9b0957f6949ac4bd535fbef8d2d8cba05c5c | [
"Apache-2.0"
] | 11 | 2015-01-20T01:39:41.000Z | 2019-08-08T07:27:44.000Z | src/python/pants/base/run_info.py | hythloday/pants | 107e9b0957f6949ac4bd535fbef8d2d8cba05c5c | [
"Apache-2.0"
] | 1 | 2019-08-21T07:29:26.000Z | 2019-08-21T07:29:26.000Z | src/python/pants/base/run_info.py | fakeNetflix/square-repo-pants | 28a018c7f47900aec4f576c81a52e0e4b41d9fec | [
"Apache-2.0"
] | 5 | 2015-03-30T02:46:53.000Z | 2018-03-08T20:10:43.000Z | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
import getpass
impor... | 34.542553 | 98 | 0.655066 |
7948d7caab6e3c864e4d710c9262e62a6495d857 | 2,760 | py | Python | model_zoo/official/nlp/cpm/src/lr_schedule.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | 1 | 2021-07-03T06:52:20.000Z | 2021-07-03T06:52:20.000Z | model_zoo/official/nlp/cpm/src/lr_schedule.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | model_zoo/official/nlp/cpm/src/lr_schedule.py | Vincent34/mindspore | a39a60878a46e7e9cb02db788c0bca478f2fa6e5 | [
"Apache-2.0"
] | null | null | null | # Copyright 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 a... | 37.297297 | 120 | 0.671377 |
7948d7d91f08a9c1e683cd6e316f4757bf85c0a1 | 4,644 | py | Python | apps/dash-web-trader/env/Lib/site-packages/dash_html_components/Acronym.py | alzo425/dash-sample-apps | d3e9f521a3bc2b8d39ed2922838ad35b9b17beb0 | [
"MIT"
] | 1 | 2020-03-01T04:38:24.000Z | 2020-03-01T04:38:24.000Z | apps/dash-web-trader/env/Lib/site-packages/dash_html_components/Acronym.py | alzo425/dash-sample-apps | d3e9f521a3bc2b8d39ed2922838ad35b9b17beb0 | [
"MIT"
] | null | null | null | apps/dash-web-trader/env/Lib/site-packages/dash_html_components/Acronym.py | alzo425/dash-sample-apps | d3e9f521a3bc2b8d39ed2922838ad35b9b17beb0 | [
"MIT"
] | 17 | 2019-11-21T14:11:29.000Z | 2019-11-21T15:26:23.000Z | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class Acronym(Component):
"""A Acronym component.
Keyword arguments:
- children (a list of or a singular dash component, string or number; optional): The children of this component
- id (string; optiona... | 74.903226 | 586 | 0.736865 |
7948d7ea9f3437c3c96c5d8819e6cee5a698c96a | 441 | py | Python | albumentations/albumentations/augmentations/__init__.py | hfzx01/Substation | 760e2f1a5d21102a6a05973cc31bc8252659757c | [
"Apache-2.0"
] | 6,316 | 2019-11-18T14:19:17.000Z | 2022-03-31T22:25:23.000Z | albumentations/albumentations/augmentations/__init__.py | hfzx01/Substation | 760e2f1a5d21102a6a05973cc31bc8252659757c | [
"Apache-2.0"
] | 558 | 2019-11-19T00:36:01.000Z | 2022-03-30T22:04:15.000Z | albumentations/albumentations/augmentations/__init__.py | hfzx01/Substation | 760e2f1a5d21102a6a05973cc31bc8252659757c | [
"Apache-2.0"
] | 889 | 2019-11-18T16:49:44.000Z | 2022-03-28T11:00:14.000Z | # Common classes
from .bbox_utils import *
from .crops.functional import *
from .crops.transforms import *
# New transformations goes to individual files listed below
from .domain_adaptation import *
from .functional import *
from .geometric.functional import *
from .geometric.resize import *
from .geometric.rotate im... | 27.5625 | 59 | 0.789116 |
7948d8ab43a9a0e647a799783fa8a1e32bcb362e | 1,051 | py | Python | mlflow/entities/metric.py | xgk/mlflow | f43c3ccb05e8dfcd3c8030d53e2ef98148c0f6b4 | [
"Apache-2.0"
] | 3 | 2019-08-16T15:17:20.000Z | 2022-02-22T10:01:47.000Z | mlflow/entities/metric.py | mateiz/mlflow | 9e7ec0093a72f4cbe3d55629c7e2cc5043068e12 | [
"Apache-2.0"
] | null | null | null | mlflow/entities/metric.py | mateiz/mlflow | 9e7ec0093a72f4cbe3d55629c7e2cc5043068e12 | [
"Apache-2.0"
] | 1 | 2018-06-06T06:06:49.000Z | 2018-06-06T06:06:49.000Z | from mlflow.entities._mlflow_object import _MLflowObject
from mlflow.protos.service_pb2 import Metric as ProtoMetric
class Metric(_MLflowObject):
"""
Metric object for python client. Backend stores will hydrate this object in APIs.
"""
def __init__(self, key, value, timestamp):
self._key = ke... | 25.02381 | 88 | 0.644148 |
7948d921f6d5f1cec79ab9f3209c8dd878b1aae1 | 1,024 | py | Python | beecrowd-1050.py | jessicabessaoliveira/Python | c4732f5e9528a40721b7c16364e6310e7ed8d490 | [
"MIT"
] | null | null | null | beecrowd-1050.py | jessicabessaoliveira/Python | c4732f5e9528a40721b7c16364e6310e7ed8d490 | [
"MIT"
] | null | null | null | beecrowd-1050.py | jessicabessaoliveira/Python | c4732f5e9528a40721b7c16364e6310e7ed8d490 | [
"MIT"
] | null | null | null | # https://www.beecrowd.com.br/judge/pt/problems/view/1050
'''
Leia um número inteiro que representa um código de DDD para discagem interurbana. Em seguida, informe à qual cidade o DDD pertence, considerando a tabela abaixo:
imagem:
https://resources.beecrowd.com.br/gallery/images/problems/UOJ_1050.png
Se a entrada f... | 26.947368 | 161 | 0.720703 |
7948db7459180490d1a7091ea12e1afee89fbcc5 | 67 | py | Python | test/regression/features/integers/ints.py | bjpop/blip | 3d9105a44d1afb7bd007da3742fb19dc69372e10 | [
"BSD-3-Clause"
] | 137 | 2015-02-13T21:03:23.000Z | 2021-11-24T03:53:55.000Z | test/regression/features/integers/ints.py | bjpop/blip | 3d9105a44d1afb7bd007da3742fb19dc69372e10 | [
"BSD-3-Clause"
] | 2 | 2015-03-07T14:08:33.000Z | 2015-10-13T02:00:40.000Z | test/regression/features/integers/ints.py | bjpop/blip | 3d9105a44d1afb7bd007da3742fb19dc69372e10 | [
"BSD-3-Clause"
] | 4 | 2015-05-03T22:07:27.000Z | 2018-09-10T08:55:03.000Z | print(0)
print(-0)
print(1)
print(-1)
print(type(1))
print(int(1))
| 9.571429 | 14 | 0.641791 |
7948dc595d481f654fb7bb84bb9c244727068135 | 2,202 | py | Python | cmssw/clean_buildfiles.py | guitargeek/PKGBUILDs | a71e887c838827bb876f3ad4badb66c2eda5f61c | [
"MIT"
] | null | null | null | cmssw/clean_buildfiles.py | guitargeek/PKGBUILDs | a71e887c838827bb876f3ad4badb66c2eda5f61c | [
"MIT"
] | null | null | null | cmssw/clean_buildfiles.py | guitargeek/PKGBUILDs | a71e887c838827bb876f3ad4badb66c2eda5f61c | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
import os
def root_node_from_build_file(build_file):
with open(build_file) as f:
xml = f.read()
xml_strip = xml.strip()
root_node = ET.fromstring("<root>" + xml + "</root>")
return root_node
def package_included(package, path):
if not os.path.isdir(... | 27.525 | 95 | 0.582652 |
7948dc6dcc08d66de7e5e6522a31cb8291233ffd | 28,084 | py | Python | qcelemental/molparse/from_arrays.py | mattwthompson/QCElemental | 7fb730e66a794a41d403f8686adef8f2ef109fb1 | [
"BSD-3-Clause"
] | null | null | null | qcelemental/molparse/from_arrays.py | mattwthompson/QCElemental | 7fb730e66a794a41d403f8686adef8f2ef109fb1 | [
"BSD-3-Clause"
] | 1 | 2021-03-05T19:06:09.000Z | 2021-03-05T19:06:09.000Z | qcelemental/molparse/from_arrays.py | Andrew-AbiMansour/QCElemental | 2e84cd686d5fff0fc79accb28ffa985de4684704 | [
"BSD-3-Clause"
] | null | null | null | import pprint
import re
from copy import deepcopy
import numpy as np
from ..exceptions import ValidationError
from ..physical_constants import constants
from ..util import provenance_stamp, unnp, update_with_error
from .chgmult import validate_and_fill_chgmult
from .nucleus import reconcile_nucleus
from .regex import... | 35.017456 | 144 | 0.602478 |
7948dd93cdc57f74a778c980bed0f4bd127b4571 | 1,278 | py | Python | src/blog/urls.py | Dingo5733/djangoblog19 | 1f218e45414f9666b93fac90b261060942e2a5e4 | [
"MIT"
] | null | null | null | src/blog/urls.py | Dingo5733/djangoblog19 | 1f218e45414f9666b93fac90b261060942e2a5e4 | [
"MIT"
] | null | null | null | src/blog/urls.py | Dingo5733/djangoblog19 | 1f218e45414f9666b93fac90b261060942e2a5e4 | [
"MIT"
] | null | null | null | """blog URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based ... | 39.9375 | 82 | 0.715962 |
7948de649fadfb439bd342bcf50734cc4851f9d1 | 2,873 | py | Python | main.py | SeanMelody/CryptoPrice-withPython | 4c90c92a006783b34d6012822c4bd3662596949f | [
"MIT"
] | null | null | null | main.py | SeanMelody/CryptoPrice-withPython | 4c90c92a006783b34d6012822c4bd3662596949f | [
"MIT"
] | null | null | null | main.py | SeanMelody/CryptoPrice-withPython | 4c90c92a006783b34d6012822c4bd3662596949f | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import inquirer
import requests
import time
# Import all the requirements
# Function to get the user selected coin price
def get_crypto_price(user_selected):
# Inquirer returns a dictionary, so must get the value to search it
coin = user_selected['crypto']
# Set up the prin... | 35.9125 | 116 | 0.642534 |
7948df5d7218f7ce1e33a0eee92fc6811a8c7ab8 | 3,796 | py | Python | python/simulation/TS8_sim_traveler_generator.py | lsst-camera-dh/IandT-jobs | f62f9f796208d23a4f775752c084f8ef3dd6cf35 | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-05-22T20:53:12.000Z | 2017-05-22T20:53:12.000Z | python/simulation/TS8_sim_traveler_generator.py | lsst-camera-dh/IandT-jobs | f62f9f796208d23a4f775752c084f8ef3dd6cf35 | [
"BSD-3-Clause-LBNL"
] | 21 | 2016-10-12T22:42:16.000Z | 2020-09-29T05:37:54.000Z | python/simulation/TS8_sim_traveler_generator.py | lsst-camera-dh/IandT-jobs | f62f9f796208d23a4f775752c084f8ef3dd6cf35 | [
"BSD-3-Clause-LBNL"
] | null | null | null | from eTravelerComponents import Traveler
traveler = Traveler('TS8_sim', 'ScienceRaft', 'Test Stand 8 EO simulation')
#
# Data acquisition jobs
#
fe55_raft_acq = traveler.stepFactory('fe55_raft_acq',
description='Fe55 acquisition')
dark_raft_acq = traveler.stepFactory('dark_raft_ac... | 41.714286 | 81 | 0.705216 |
7948e0338b6a23e75d2e9f0156750d09bb147440 | 1,861 | py | Python | python/GafferOSLUI/__init__.py | davidsminor/gaffer | 64f75654ce778105dd93fbaad0e4486a5577cd09 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T19:04:46.000Z | 2015-02-10T19:04:46.000Z | python/GafferOSLUI/__init__.py | danbethell/gaffer | 455fe7420fb4c01adac59cbecb25a6b1d8a3db53 | [
"BSD-3-Clause"
] | null | null | null | python/GafferOSLUI/__init__.py | danbethell/gaffer | 455fe7420fb4c01adac59cbecb25a6b1d8a3db53 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2013, John Haddon. 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... | 46.525 | 77 | 0.681354 |
7948e0dfe7178b673734f0b0da0d04cce7c32ed7 | 13,499 | py | Python | src/models.py | personads/smu | e954b17a55c2ccbeaa7030b67d7ff5e3e6cda1fe | [
"MIT"
] | 1 | 2020-02-22T20:41:25.000Z | 2020-02-22T20:41:25.000Z | src/models.py | personads/smu | e954b17a55c2ccbeaa7030b67d7ff5e3e6cda1fe | [
"MIT"
] | null | null | null | src/models.py | personads/smu | e954b17a55c2ccbeaa7030b67d7ff5e3e6cda1fe | [
"MIT"
] | 1 | 2020-03-08T13:13:35.000Z | 2020-03-08T13:13:35.000Z | '''
SMT Tools
'''
from utils import *
from math import log, exp
from collections import defaultdict
from sys import stdout
#
# functions
#
def train_model1(corpus, iterations, verbose=False) :
'''
EM training function according to IBM Model 1
returns the translation probabilit... | 46.071672 | 217 | 0.549522 |
7948e3562a9b52101d935cb6e57e7f16ca339246 | 23,458 | py | Python | gluon/gluoncv2/models/fishnet.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 2,649 | 2018-08-03T14:18:00.000Z | 2022-03-31T08:08:17.000Z | gluon/gluoncv2/models/fishnet.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 95 | 2018-08-13T01:46:03.000Z | 2022-03-13T08:38:14.000Z | gluon/gluoncv2/models/fishnet.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 549 | 2018-08-06T08:09:22.000Z | 2022-03-31T08:08:21.000Z | """
FishNet for ImageNet-1K, implemented in Gluon.
Original paper: 'FishNet: A Versatile Backbone for Image, Region, and Pixel Level Prediction,'
http://papers.nips.cc/paper/7356-fishnet-a-versatile-backbone-for-image-region-and-pixel-level-prediction.pdf.
"""
__all__ = ['FishNet', 'fishnet99', 'fishnet150... | 34.09593 | 115 | 0.579205 |
7948e406c9aa342568222e53eb9bf3f443c6fa7d | 1,735 | py | Python | to_language_set.py | Jupaoqq/Jupaoqq_LaRL | ae64adda5627987d71f2948f499daa11e9f309ad | [
"Apache-2.0"
] | null | null | null | to_language_set.py | Jupaoqq/Jupaoqq_LaRL | ae64adda5627987d71f2948f499daa11e9f309ad | [
"Apache-2.0"
] | null | null | null | to_language_set.py | Jupaoqq/Jupaoqq_LaRL | ae64adda5627987d71f2948f499daa11e9f309ad | [
"Apache-2.0"
] | null | null | null | import numpy as np
from tqdm import tqdm
import pickle as pkl
import json
from nltk import word_tokenize
import re
from torch.utils.data.dataset import Dataset
import numpy as np
from copy import deepcopy
def process(input, output1, output2, dummy = True):
f = open(input, encoding='utf-8')
text_usr = []
t... | 36.145833 | 127 | 0.604035 |
7948e475d76d462755849dccfd823b68b2dfd372 | 9,050 | py | Python | src/skmultiflow/trees/nodes/ada_split_node_for_regression.py | lambertsbennett/scikit-multiflow | bc714fd5ee4f0a486adc00ec6ae39eafa64f81cc | [
"BSD-3-Clause"
] | 1 | 2020-04-16T10:17:03.000Z | 2020-04-16T10:17:03.000Z | src/skmultiflow/trees/nodes/ada_split_node_for_regression.py | lambertsbennett/scikit-multiflow | bc714fd5ee4f0a486adc00ec6ae39eafa64f81cc | [
"BSD-3-Clause"
] | null | null | null | src/skmultiflow/trees/nodes/ada_split_node_for_regression.py | lambertsbennett/scikit-multiflow | bc714fd5ee4f0a486adc00ec6ae39eafa64f81cc | [
"BSD-3-Clause"
] | null | null | null | import math
from skmultiflow.trees.attribute_test import NominalAttributeMultiwayTest
from skmultiflow.trees.nodes import FoundNode
from skmultiflow.trees.nodes import SplitNode
from skmultiflow.trees.nodes import ActiveLearningNode
from skmultiflow.trees.nodes import InactiveLearningNode
from skmultiflow.trees.nodes... | 43.509615 | 99 | 0.632376 |
7948e50ca6dc47aa4992248e782c4b1bf69247cd | 11,318 | py | Python | decode.py | sunflower036/se-pg | 2eaa32517abd324d0e495d632041f66beb514757 | [
"Apache-2.0"
] | 2 | 2019-09-25T12:20:35.000Z | 2020-01-12T08:26:03.000Z | decode.py | sunflower036/se-pg | 2eaa32517abd324d0e495d632041f66beb514757 | [
"Apache-2.0"
] | 1 | 2019-08-05T13:09:34.000Z | 2019-08-07T07:46:20.000Z | decode.py | sunflower036/se-pg | 2eaa32517abd324d0e495d632041f66beb514757 | [
"Apache-2.0"
] | 1 | 2020-01-12T08:26:04.000Z | 2020-01-12T08:26:04.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
# Modifications Copyright 2017 Abigail See
#
# 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... | 44.559055 | 222 | 0.696943 |
7948e7f255e1003f8d73f2ed1e766a3532505b26 | 26,455 | py | Python | judge/views.py | vbsinha/pdp-judge | adb93228cc0e5881713fd35807430fd4be8e3f9c | [
"MIT"
] | 8 | 2019-06-13T13:17:13.000Z | 2022-01-10T17:51:41.000Z | judge/views.py | vbsinha/autojudge | adb93228cc0e5881713fd35807430fd4be8e3f9c | [
"MIT"
] | 25 | 2019-05-27T15:12:45.000Z | 2021-06-10T20:35:13.000Z | judge/views.py | vbsinha/pdp-judge | adb93228cc0e5881713fd35807430fd4be8e3f9c | [
"MIT"
] | 3 | 2021-01-29T07:25:29.000Z | 2021-12-29T10:16:07.000Z | import os
from django.urls import reverse
from django.core.files import File
from django.utils import timezone
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.shortcuts import render, redirect, get_object_or_404
from . import handler
from .models import Contest, Problem, T... | 36.489655 | 99 | 0.651106 |
7948e89744b3aa14125735acced5bb01bc4416b0 | 4,485 | py | Python | testarch/unet/unet_trainer.py | weihao94/deepdyn | e8a1d6620f48094b76ea3d272c57d40c9ae6d949 | [
"MIT"
] | 42 | 2019-11-07T03:18:53.000Z | 2021-12-08T09:42:00.000Z | testarch/unet/unet_trainer.py | LucasLee-ff/deepdyn | 48018b62a245dd791e45d60b28068489a8c32742 | [
"MIT"
] | 17 | 2020-01-25T12:58:18.000Z | 2022-03-11T23:32:44.000Z | testarch/unet/unet_trainer.py | aksish/ature | 48018b62a245dd791e45d60b28068489a8c32742 | [
"MIT"
] | 21 | 2019-11-21T08:34:54.000Z | 2022-02-27T16:24:00.000Z | """
### author: Aashis Khanal
### sraashis@gmail.com
### date: 9/10/2018
"""
import os
import numpy as np
import torch
from PIL import Image as IMG
import torch.nn.functional as F
import viz.nviz as plt
from torchtrainer.torchtrainer import NNTrainer
from utils.measurements import ScoreAccumulator
sep = os.sep
cl... | 44.85 | 111 | 0.580379 |
7948e910f73ed83230193396c9b0e0c0fda347c6 | 513 | py | Python | core/migrations/0032_unit_reveal_at_level.py | ankanb240/otis-web | 45eda65b419705c65c02b15872a137969d53d8e9 | [
"MIT"
] | 15 | 2021-08-28T18:18:37.000Z | 2022-03-13T07:48:15.000Z | core/migrations/0032_unit_reveal_at_level.py | ankanb240/otis-web | 45eda65b419705c65c02b15872a137969d53d8e9 | [
"MIT"
] | 65 | 2021-08-20T02:37:27.000Z | 2022-02-07T17:19:23.000Z | core/migrations/0032_unit_reveal_at_level.py | ankanb240/otis-web | 45eda65b419705c65c02b15872a137969d53d8e9 | [
"MIT"
] | 31 | 2020-01-09T02:35:29.000Z | 2022-03-13T07:48:18.000Z | # Generated by Django 3.2.7 on 2021-09-13 21:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0031_remove_semester_classroom_url'),
]
operations = [
migrations.AddField(
model_name='unit',
name='reveal_... | 27 | 164 | 0.654971 |
7948e91200eeb3248052eac89f880a11edcdbef9 | 3,754 | py | Python | docs-src/conf.py | erykoff/generic-catalog-reader | bc6267ac41b9f68106ed6065184469ac13fdc0b6 | [
"MIT"
] | null | null | null | docs-src/conf.py | erykoff/generic-catalog-reader | bc6267ac41b9f68106ed6065184469ac13fdc0b6 | [
"MIT"
] | null | null | null | docs-src/conf.py | erykoff/generic-catalog-reader | bc6267ac41b9f68106ed6065184469ac13fdc0b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Generic Catalog Reader (GCR) documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 15 15:10:50 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are... | 32.08547 | 81 | 0.713372 |
7948e9a427ab0042c780d733d881812f9c977bdb | 6,008 | py | Python | problem/zipcode_stats/place.py | jhanley634/testing-tools | 3f3f8a34df53015347e1e1cc37d20c8d03652cad | [
"MIT"
] | null | null | null | problem/zipcode_stats/place.py | jhanley634/testing-tools | 3f3f8a34df53015347e1e1cc37d20c8d03652cad | [
"MIT"
] | 3 | 2020-09-07T17:24:36.000Z | 2020-09-08T17:37:33.000Z | problem/zipcode_stats/place.py | jhanley634/testing-tools | 3f3f8a34df53015347e1e1cc37d20c8d03652cad | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# Copyright 2018 John Hanley.
#
# 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, m... | 36.412121 | 79 | 0.65263 |
7948ece9148217a11285f48d4b1ed5434aaae8d6 | 189 | py | Python | app/quiz/__init__.py | gibran-abdillah/quiz-app | 6a346c87c5cc258aa42f8805f226b1119fbf60e6 | [
"Apache-2.0"
] | 10 | 2021-12-24T09:02:00.000Z | 2022-02-08T06:54:45.000Z | app/quiz/__init__.py | gibran-abdillah/quiz-app | 6a346c87c5cc258aa42f8805f226b1119fbf60e6 | [
"Apache-2.0"
] | null | null | null | app/quiz/__init__.py | gibran-abdillah/quiz-app | 6a346c87c5cc258aa42f8805f226b1119fbf60e6 | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint
quiz_blueprint = Blueprint('quiz',
__name__,
url_prefix='/quiz'
)
from .views import * | 23.625 | 45 | 0.465608 |
7948ee2bfa94828f03e885961494e1c29b05c1d9 | 3,612 | py | Python | orthgan/updater.py | HMJiangGatech/chainer-gan-lib | ee6764b2b2a9d7309267fd1b95835b883464aee1 | [
"MIT"
] | 4 | 2019-07-31T02:20:43.000Z | 2020-02-18T05:33:05.000Z | orthgan/updater.py | HMJiangGatech/chainer-gan-lib | ee6764b2b2a9d7309267fd1b95835b883464aee1 | [
"MIT"
] | null | null | null | orthgan/updater.py | HMJiangGatech/chainer-gan-lib | ee6764b2b2a9d7309267fd1b95835b883464aee1 | [
"MIT"
] | 1 | 2021-11-13T22:53:05.000Z | 2021-11-13T22:53:05.000Z | import numpy as np
import chainer
import chainer.functions as F
from chainer import Variable
class Updater(chainer.training.StandardUpdater):
def __init__(self, *args, **kwargs):
self.gen, self.dis = kwargs.pop('models')
self.n_dis = kwargs.pop('n_dis')
super(Updater, self).__init__(*args... | 34.730769 | 82 | 0.556202 |
7948ee5342ed0911f470cd6818da240190903b9e | 2,475 | py | Python | Erik-solutions/day8/day.py | NTI-Gymnasieingenjor/AdventOfCode2020 | ea74c06a2b220e227618ed841c4eb853f08d5c84 | [
"MIT"
] | 1 | 2020-12-08T12:33:36.000Z | 2020-12-08T12:33:36.000Z | Erik-solutions/day8/day.py | NTI-Gymnasieingenjor/AdventOfCode2020 | ea74c06a2b220e227618ed841c4eb853f08d5c84 | [
"MIT"
] | null | null | null | Erik-solutions/day8/day.py | NTI-Gymnasieingenjor/AdventOfCode2020 | ea74c06a2b220e227618ed841c4eb853f08d5c84 | [
"MIT"
] | 1 | 2021-01-20T15:08:12.000Z | 2021-01-20T15:08:12.000Z | inputDoc = open("input.txt")
docLines = inputDoc.read().split("\n")
inputDoc.close()
# PART 1
print("\nPART 1")
"""
acc increases or decreases a single global value called the accumulator by the value given in the argument.
jmp jumps to a new instruction relative to itself.
nop stands for No OP... | 24.264706 | 111 | 0.589899 |
7948efac7c03c502ca8ff26b02e6d814f4471144 | 808 | py | Python | tests/test_api_v1_services_ntpd_restart.py | pincher95/pfsense-api | 001a4b8a1ec39138668d6d92b3c9d0c89a7f1b45 | [
"Apache-2.0"
] | null | null | null | tests/test_api_v1_services_ntpd_restart.py | pincher95/pfsense-api | 001a4b8a1ec39138668d6d92b3c9d0c89a7f1b45 | [
"Apache-2.0"
] | null | null | null | tests/test_api_v1_services_ntpd_restart.py | pincher95/pfsense-api | 001a4b8a1ec39138668d6d92b3c9d0c89a7f1b45 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Jared Hendrickson
#
# 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... | 36.727273 | 74 | 0.769802 |
7948efb54e6cb4cd7e1274135d7e6a81f868dfeb | 1,493 | py | Python | bib_models/serializers.py | stefanomunarini/bibxml-service | 4c3f6922f8a5c84cf63755e687f61862da0f4ad4 | [
"BSD-3-Clause"
] | null | null | null | bib_models/serializers.py | stefanomunarini/bibxml-service | 4c3f6922f8a5c84cf63755e687f61862da0f4ad4 | [
"BSD-3-Clause"
] | null | null | null | bib_models/serializers.py | stefanomunarini/bibxml-service | 4c3f6922f8a5c84cf63755e687f61862da0f4ad4 | [
"BSD-3-Clause"
] | null | null | null | """Pluggable serializer registry
for :class:`~.models.bibdata.BibliographicItem` instances.
Currently, only serialization
into various utf-8 strings is supported.
"""
from typing import Callable, Dict
from dataclasses import dataclass
def register(id: str, content_type: str):
"""Parametrized decorator that, giv... | 24.883333 | 79 | 0.689216 |
7948eff884bcc75c5ed90e816e10d7910414a584 | 2,954 | py | Python | coex/scaling.py | karnesh/coexistence | a6862dd8554ca0ab430fca6efe4de0f355f8145a | [
"BSD-2-Clause"
] | null | null | null | coex/scaling.py | karnesh/coexistence | a6862dd8554ca0ab430fca6efe4de0f355f8145a | [
"BSD-2-Clause"
] | null | null | null | coex/scaling.py | karnesh/coexistence | a6862dd8554ca0ab430fca6efe4de0f355f8145a | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
from scipy.optimize import fmin
def coexistence(lnpi, N):
"""Locate the coexistence acticity near the critical point by
maximizing compressibility.
Args:
lnpi: The original log of probability distribution.
N: particle number distribution.
... | 33.954023 | 77 | 0.538592 |
7948f01dca953a1143e03a4db02d63f2f9fc2080 | 303 | py | Python | data/multilingual/Latn.SRP/Sans_12/pdf_to_json_test_Latn.SRP_Sans_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Latn.SRP/Sans_12/pdf_to_json_test_Latn.SRP_Sans_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Latn.SRP/Sans_12/pdf_to_json_test_Latn.SRP_Sans_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Latn.SRP/Sans_12/udhr_Latn.SRP_Sans_12.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 30.3 | 73 | 0.811881 |
7948f1b91259ab96b1adb8d22e4efb3805f30083 | 758 | py | Python | sql_anti/urls.py | gmaclinuxer/sql-anti | 70bf414cec16cc2285604e26d9c6711578257be7 | [
"MIT"
] | null | null | null | sql_anti/urls.py | gmaclinuxer/sql-anti | 70bf414cec16cc2285604e26d9c6711578257be7 | [
"MIT"
] | null | null | null | sql_anti/urls.py | gmaclinuxer/sql-anti | 70bf414cec16cc2285604e26d9c6711578257be7 | [
"MIT"
] | null | null | null | """sql_anti URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | 34.454545 | 77 | 0.699208 |
7948f2133b15608276eead69ee6dbb6edcd46d7a | 9,731 | py | Python | word2vec.py | AppleFairy/CS20SI-Tensorflow-for-Deep-Learning-Research | c647b4c779787c7aa3fd7842ff6d808d3f85822e | [
"MIT"
] | 2 | 2017-08-24T14:09:45.000Z | 2017-08-28T16:58:31.000Z | word2vec.py | AppleFairy/CS20SI-Tensorflow-for-Deep-Learning-Research | c647b4c779787c7aa3fd7842ff6d808d3f85822e | [
"MIT"
] | null | null | null | word2vec.py | AppleFairy/CS20SI-Tensorflow-for-Deep-Learning-Research | c647b4c779787c7aa3fd7842ff6d808d3f85822e | [
"MIT"
] | null | null | null | from __future__ import division
import os
import zipfile
import collections
import random
import numpy as np
import tensorflow as tf
from tensorflow.contrib.tensorboard.plugins import projector
# global variables
data_name = "data/text/text8.zip"
WORK_DIR = os.path.abspath(os.curdir)
VOCAB_SIZE = 50000
BATCH_SIZE = 1... | 40.545833 | 130 | 0.598089 |
7948f376154cf0ff1d49d2da896e175fc4e5cf73 | 421 | py | Python | timing.py | russss/pydms | 14cca0faec16767fcb8c2519428c407c664dc081 | [
"BSD-2-Clause"
] | 2 | 2015-03-30T00:22:13.000Z | 2019-01-18T19:46:06.000Z | timing.py | russss/pydms | 14cca0faec16767fcb8c2519428c407c664dc081 | [
"BSD-2-Clause"
] | null | null | null | timing.py | russss/pydms | 14cca0faec16767fcb8c2519428c407c664dc081 | [
"BSD-2-Clause"
] | null | null | null | # coding=utf-8
from __future__ import division, absolute_import, print_function, unicode_literals
import time
class Timer(object):
def __enter__(self):
self.interval = None
self.start = time.time()
return self
def __exit__(self, *args):
self.end = time.time()
self.inte... | 23.388889 | 82 | 0.643705 |
7948f4cc8f6814db774b566ba2fa7c09d2f6aa8a | 5,262 | py | Python | retro/plot/plot_1d_scan.py | ellohfin/retro | 58ec8f5b698e6140acd215717f051d99e407c4e5 | [
"Apache-2.0"
] | 1 | 2018-03-02T01:05:52.000Z | 2018-03-02T01:05:52.000Z | retro/plot/plot_1d_scan.py | ellohfin/retro | 58ec8f5b698e6140acd215717f051d99e407c4e5 | [
"Apache-2.0"
] | 30 | 2018-01-30T21:03:28.000Z | 2019-11-07T16:42:07.000Z | retro/plot/plot_1d_scan.py | ellohfin/retro | 58ec8f5b698e6140acd215717f051d99e407c4e5 | [
"Apache-2.0"
] | 6 | 2017-07-27T19:49:13.000Z | 2019-11-19T13:38:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=wrong-import-position
"""
Plot likelihood scan results
"""
from __future__ import absolute_import, division, print_function
__all__ = [
'FNAME_TEMPLATE',
'plot_1d_scan',
'parse_args'
]
__author__ = 'P. Eller, J.L. Lanfranchi'
__license__ = ... | 30.952941 | 77 | 0.597301 |
7948f51a3264e31b1efee37f0869f29f617d069a | 23,578 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/aio/operations/_express_route_circuit_connections_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/aio/operations/_express_route_circuit_connections_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/aio/operations/_express_route_circuit_connections_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 ... | 51.70614 | 249 | 0.678514 |
7948f5adb9cc55726492ac4abc872d4c4da6380b | 636 | py | Python | tests/fixtures/parser.py | peterg79/regenmaschine | 3b76fb42c34d6d655d8e793bca4cfcf21c858123 | [
"MIT"
] | null | null | null | tests/fixtures/parser.py | peterg79/regenmaschine | 3b76fb42c34d6d655d8e793bca4cfcf21c858123 | [
"MIT"
] | null | null | null | tests/fixtures/parser.py | peterg79/regenmaschine | 3b76fb42c34d6d655d8e793bca4cfcf21c858123 | [
"MIT"
] | null | null | null | """Define fixtures related to the "parser" endpoint."""
import pytest
@pytest.fixture(scope="module")
def parser_json():
"""Return a /parser response."""
return {
"parsers": [
{
"lastRun": "2018-04-30 11:52:33",
"lastKnownError": "",
"hasFore... | 26.5 | 64 | 0.448113 |
7948f81a237ba1e0d7000719c808145de7b5d719 | 889 | py | Python | sims/s436/mkmov.py | ammarhakim/ammar-simjournal | 85b64ddc9556f01a4fab37977864a7d878eac637 | [
"MIT",
"Unlicense"
] | 1 | 2019-12-19T16:21:13.000Z | 2019-12-19T16:21:13.000Z | sims/s436/mkmov.py | ammarhakim/ammar-simjournal | 85b64ddc9556f01a4fab37977864a7d878eac637 | [
"MIT",
"Unlicense"
] | null | null | null | sims/s436/mkmov.py | ammarhakim/ammar-simjournal | 85b64ddc9556f01a4fab37977864a7d878eac637 | [
"MIT",
"Unlicense"
] | 2 | 2020-01-08T06:23:33.000Z | 2020-01-08T07:06:50.000Z | from pylab import *
import tables
def getMeshGrid(grid):
xl, yl = grid._v_attrs.vsLowerBounds
xu, yu = grid._v_attrs.vsUpperBounds
nx, ny = grid._v_attrs.vsNumCells
dx = (xu-xl)/nx
dy = (yu-yl)/ny
X = linspace(xl+0.5*dx, xu-0.5*dx, nx)
Y = linspace(yl+0.5*dy, yu-0.5*dy, ny)
return mesh... | 24.027027 | 60 | 0.575928 |
7948f8965777fc780685dc58d03c466ba3fc03ae | 556 | py | Python | recipe/migrations/0002_auto_20200525_0845.py | UtkarshAgrawalDTU/My-Fridge-API | 8b73b40ef5c4920b47db66574305c26095f9b1e7 | [
"MIT"
] | null | null | null | recipe/migrations/0002_auto_20200525_0845.py | UtkarshAgrawalDTU/My-Fridge-API | 8b73b40ef5c4920b47db66574305c26095f9b1e7 | [
"MIT"
] | 3 | 2021-06-04T23:22:04.000Z | 2021-09-22T19:10:42.000Z | recipe/migrations/0002_auto_20200525_0845.py | UtkarshAgrawalDTU/My-Fridge-API | 8b73b40ef5c4920b47db66574305c26095f9b1e7 | [
"MIT"
] | 1 | 2021-08-20T10:50:24.000Z | 2021-08-20T10:50:24.000Z | # Generated by Django 3.0.6 on 2020-05-25 08:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recipe', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='recipe',
name='ingredients',
... | 21.384615 | 47 | 0.55036 |
7948fa460bbfb54646d7a62dd6f615d60e7a7b4f | 2,858 | py | Python | examples/sim/main.py | gabs48/tigrillo | 663f7407808bb8101edebec02fb0cd81c59ad2f1 | [
"MIT"
] | 5 | 2018-10-22T21:28:44.000Z | 2020-09-03T07:01:36.000Z | examples/sim/main.py | gabs48/tigrillo | 663f7407808bb8101edebec02fb0cd81c59ad2f1 | [
"MIT"
] | null | null | null | examples/sim/main.py | gabs48/tigrillo | 663f7407808bb8101edebec02fb0cd81c59ad2f1 | [
"MIT"
] | 1 | 2020-02-01T15:12:38.000Z | 2020-02-01T15:12:38.000Z | #!/usr/bin/python3
"""
This file is the main example to run. It parses the command line and
load the configuration file for the simulation.
"""
import argparse
from experiment import *
from tigrillo.core.utils import *
__author__ = "Gabriel Urbain"
__copyright__ = "Copyright 2017, Human Brain Projet, SP10"
__lic... | 37.116883 | 111 | 0.641358 |
7948fa5293c0435ccd1d8191c54a48d272d396f4 | 287 | py | Python | tools_box/_selling/doctype/competitor_information/competitor_information.py | maisonarmani/Tools-Box | a2226940afdf0291f031008be1af953d2360acdf | [
"MIT"
] | 4 | 2017-09-25T23:34:08.000Z | 2020-07-17T23:52:26.000Z | tools_box/_selling/doctype/competitor_information/competitor_information.py | maisonarmani/Tools-Box | a2226940afdf0291f031008be1af953d2360acdf | [
"MIT"
] | null | null | null | tools_box/_selling/doctype/competitor_information/competitor_information.py | maisonarmani/Tools-Box | a2226940afdf0291f031008be1af953d2360acdf | [
"MIT"
] | 5 | 2017-06-02T01:58:32.000Z | 2022-02-22T16:59:01.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class CompetitorInformation(Document):
pass
| 26.090909 | 68 | 0.787456 |
7948fbc18a03676d67661884065876fb7b0dd9b8 | 2,372 | py | Python | kitsune/announcements/tests/test_models.py | theresnotime/kitsune | 0757b267b0d332264167d31ce84e342263e1c635 | [
"BSD-3-Clause"
] | null | null | null | kitsune/announcements/tests/test_models.py | theresnotime/kitsune | 0757b267b0d332264167d31ce84e342263e1c635 | [
"BSD-3-Clause"
] | null | null | null | kitsune/announcements/tests/test_models.py | theresnotime/kitsune | 0757b267b0d332264167d31ce84e342263e1c635 | [
"BSD-3-Clause"
] | null | null | null | from datetime import datetime, timedelta
from kitsune.announcements.models import Announcement
from kitsune.announcements.tests import AnnouncementFactory
from kitsune.sumo.tests import TestCase
from kitsune.users.tests import GroupFactory, UserFactory
from kitsune.wiki.tests import LocaleFactory
class AnnouncementM... | 37.0625 | 83 | 0.680017 |
7948fceb8073023b3429b7055eac4127fb80647e | 2,214 | py | Python | tensorpack/dataflow/imgaug/noise.py | awesome-archive/tensorpack | 55f640f70e19d538e5082a4712241ee966fcb201 | [
"Apache-2.0"
] | 121 | 2019-06-04T08:30:53.000Z | 2021-12-17T13:27:54.000Z | tensorpack/dataflow/imgaug/noise.py | lkn123/tensorpack | d7a13cb74c9066bc791d7aafc3b744b60ee79a9f | [
"Apache-2.0"
] | 7 | 2019-12-16T21:58:30.000Z | 2022-02-10T00:17:01.000Z | tensorpack/dataflow/imgaug/noise.py | lkn123/tensorpack | d7a13cb74c9066bc791d7aafc3b744b60ee79a9f | [
"Apache-2.0"
] | 22 | 2019-10-10T15:35:47.000Z | 2021-09-13T12:46:09.000Z | # -*- coding: utf-8 -*-
# File: noise.py
import numpy as np
import cv2
from .base import ImageAugmentor
__all__ = ['JpegNoise', 'GaussianNoise', 'SaltPepperNoise']
class JpegNoise(ImageAugmentor):
""" Random JPEG noise. """
def __init__(self, quality_range=(40, 100)):
"""
Args:
... | 28.753247 | 97 | 0.610208 |
7948fd36bc148b9fad231f1849169dbf3f96e70c | 1,531 | py | Python | source/triangulation/computeMSMS.py | hui2000ji/masif | 70a76c5f4639f70c546d5603612c7cc9f47a35b8 | [
"Apache-2.0"
] | null | null | null | source/triangulation/computeMSMS.py | hui2000ji/masif | 70a76c5f4639f70c546d5603612c7cc9f47a35b8 | [
"Apache-2.0"
] | null | null | null | source/triangulation/computeMSMS.py | hui2000ji/masif | 70a76c5f4639f70c546d5603612c7cc9f47a35b8 | [
"Apache-2.0"
] | null | null | null | import os
from subprocess import Popen, PIPE
from input_output.read_msms import read_msms
from triangulation.xyzrn import output_pdb_as_xyzrn
from default_config.global_vars import msms_bin
from default_config.masif_opts import masif_opts
import random
# Pablo Gainza LPDI EPFL 2017-2019
# Calls MSMS and returns the ... | 31.895833 | 77 | 0.667538 |
7948fdad8414d753426b34eb4a9bfbc2c0c14db9 | 6,719 | py | Python | AirzoneCloud/Installation.py | max13fr/airzonecloud | ff3b6e76d4d008b364ed7dcfa7bffe542e5c6664 | [
"MIT"
] | null | null | null | AirzoneCloud/Installation.py | max13fr/airzonecloud | ff3b6e76d4d008b364ed7dcfa7bffe542e5c6664 | [
"MIT"
] | null | null | null | AirzoneCloud/Installation.py | max13fr/airzonecloud | ff3b6e76d4d008b364ed7dcfa7bffe542e5c6664 | [
"MIT"
] | null | null | null | import logging
import time
from . import AirzoneCloud
from .Group import Group
from .Device import Device
_LOGGER = logging.getLogger(__name__)
class Installation:
"""Manage a AirzoneCloud installation"""
_api: AirzoneCloud = None
_data: dict = {}
_groups: "list[Group]" = []
def __init__(self,... | 28.713675 | 101 | 0.56809 |
7948ff0b71db2e9053def2639290ff5f49f7a084 | 20,156 | py | Python | probatus/interpret/inspector.py | anilkumarpanda/probatus | a6123b4da664dfc4f182dad1baa00e77decf4789 | [
"MIT"
] | null | null | null | probatus/interpret/inspector.py | anilkumarpanda/probatus | a6123b4da664dfc4f182dad1baa00e77decf4789 | [
"MIT"
] | null | null | null | probatus/interpret/inspector.py | anilkumarpanda/probatus | a6123b4da664dfc4f182dad1baa00e77decf4789 | [
"MIT"
] | null | null | null | # Copyright (c) 2020 ING Bank N.V.
#
# 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, distr... | 40.555332 | 126 | 0.638619 |
7948ff4f87873d92edf73625f1469a7aa96f0901 | 2,131 | py | Python | TestTimeAugmentation/mainTTA.py | onepanelio/ensembleObjectDetection | ddc742b553ba7e18d5dcdcf30f61f5858f369d3a | [
"MIT"
] | null | null | null | TestTimeAugmentation/mainTTA.py | onepanelio/ensembleObjectDetection | ddc742b553ba7e18d5dcdcf30f61f5858f369d3a | [
"MIT"
] | null | null | null | TestTimeAugmentation/mainTTA.py | onepanelio/ensembleObjectDetection | ddc742b553ba7e18d5dcdcf30f61f5858f369d3a | [
"MIT"
] | null | null | null | import testTimeAugmentation
import function
import os
import shutil
import sys
import argparse
import ensembleOptions
from imutils import paths
def tta(model,myTechniques,pathImg,option, conf=0.7):
fichs = os.listdir(pathImg)
# 1. Create tmp folder
os.mkdir(pathImg+'/tmp')
# move imgs to tmp
for fi... | 30.884058 | 135 | 0.588925 |
7948ff6bb3cc71103bc4fee7e03a9bbadcf39751 | 152 | py | Python | embed_video/tests/__init__.py | albertcabre/django-embed-video | 5f3ff1ef0da59be2224139826091506a29b30c09 | [
"MIT"
] | 1 | 2018-08-12T22:01:34.000Z | 2018-08-12T22:01:34.000Z | embed_video/tests/__init__.py | albertcabre/django-embed-video | 5f3ff1ef0da59be2224139826091506a29b30c09 | [
"MIT"
] | 2 | 2016-07-13T21:03:58.000Z | 2016-07-14T16:41:50.000Z | embed_video/tests/__init__.py | albertcabre/django-embed-video | 5f3ff1ef0da59be2224139826091506a29b30c09 | [
"MIT"
] | 1 | 2018-01-11T09:28:08.000Z | 2018-01-11T09:28:08.000Z | import os
import django
os.environ['DJANGO_SETTINGS_MODULE'] = 'embed_video.tests.django_settings'
if django.VERSION[:2] >= (1, 7):
django.setup() | 21.714286 | 74 | 0.730263 |
7948fff1c70a1393b0f16b0b2d9e589976d1e93e | 13,154 | py | Python | aiokubernetes/models/v1_csi_persistent_volume_source.py | tantioch/aiokubernetes | 2f332498598ece14d22f8e59ecb02665db6db68d | [
"Apache-2.0"
] | 24 | 2018-07-07T15:12:19.000Z | 2021-09-01T07:33:11.000Z | aiokubernetes/models/v1_csi_persistent_volume_source.py | revoteon/aiokubernetes | 730eae03e4779563740f07ad3ecef180b511ac18 | [
"Apache-2.0"
] | 5 | 2018-07-11T00:09:17.000Z | 2018-10-22T16:41:54.000Z | aiokubernetes/models/v1_csi_persistent_volume_source.py | revoteon/aiokubernetes | 730eae03e4779563740f07ad3ecef180b511ac18 | [
"Apache-2.0"
] | 3 | 2018-07-10T10:16:57.000Z | 2018-10-20T19:32:05.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.10.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
from aio... | 41.89172 | 368 | 0.683822 |
7948fff758c6ab9cf808d1a61a862eac478914c6 | 134 | py | Python | Python/Programming Fundamentals/Text Processing/09. Repeat Strings.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Fundamentals/Text Processing/09. Repeat Strings.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Fundamentals/Text Processing/09. Repeat Strings.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | strings = input().split(' ')
repeated_string = ''
for s in strings:
repeated_string += s * len(s)
print(repeated_string) | 16.75 | 34 | 0.634328 |
794900848ed0676637ce0a6a12971cd62af31bde | 256 | py | Python | var_args.py | shreya-n-kumari/python | 2462cf01891770b078815f9925f37842aaec7b91 | [
"MIT"
] | null | null | null | var_args.py | shreya-n-kumari/python | 2462cf01891770b078815f9925f37842aaec7b91 | [
"MIT"
] | null | null | null | var_args.py | shreya-n-kumari/python | 2462cf01891770b078815f9925f37842aaec7b91 | [
"MIT"
] | null | null | null | def Hair_cut(**name):
print(name["U_shape"])
print(name["three_step"])
print(name["full_layer"])
print(name["curly"])
print(name["straight"])
Hair_cut(U_shape = 'abc',three_step = 'def',full_layer = 'uvw',curly = 'shreya',straight = 'sblog')
| 28.444444 | 100 | 0.65625 |
794900d5839348fa8e258c7c20cc3348f60e1579 | 96 | py | Python | my_services/apps.py | Williano/CV | b2954ac1753d7f31461c59cd7fe24ea13405cddf | [
"MIT"
] | null | null | null | my_services/apps.py | Williano/CV | b2954ac1753d7f31461c59cd7fe24ea13405cddf | [
"MIT"
] | 3 | 2020-02-11T21:48:34.000Z | 2021-06-10T18:38:09.000Z | my_services/apps.py | Williano/CV | b2954ac1753d7f31461c59cd7fe24ea13405cddf | [
"MIT"
] | 1 | 2018-08-06T06:57:16.000Z | 2018-08-06T06:57:16.000Z | from django.apps import AppConfig
class MyServicesConfig(AppConfig):
name = 'my_services'
| 16 | 34 | 0.770833 |
794901638853029121ef3a2a36eb44337496a840 | 1,336 | py | Python | chapter13/test/code/4-yuce.py | hitaitengteng/python | 4e07fe6755ef1e0e0c1193249446e5246c89236e | [
"MIT"
] | null | null | null | chapter13/test/code/4-yuce.py | hitaitengteng/python | 4e07fe6755ef1e0e0c1193249446e5246c89236e | [
"MIT"
] | null | null | null | chapter13/test/code/4-yuce.py | hitaitengteng/python | 4e07fe6755ef1e0e0c1193249446e5246c89236e | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
import pandas as pd
inputfile = '../tmp/data4_GM11.xls' # 灰色预测后保存的路径
outputfile = '../data/enterprise_income.xls' # 神经网络预测后保存的结果
modelfile = '../tmp/4-net.model' # 模型保存路径
data = pd.read_excel(inputfile) # 读取数据
feature = ['x1', 'x2', 'x3', 'x4', 'x6', 'x7', 'x9', 'x10'] # 特征所在列
data_train = ... | 37.111111 | 74 | 0.695359 |
794902ea53780f3ecf0f008401d046f1aae2eb87 | 4,097 | py | Python | mito_sims_py3/fixed_points.py | DEPICTIVE/mito_sims | 07daf8f5dcb82ba95c1b9f4cc8981d451b032986 | [
"Apache-2.0"
] | 1 | 2020-07-14T03:07:10.000Z | 2020-07-14T03:07:10.000Z | mito_sims_py3/fixed_points.py | DEPICTIVE/mito_sims | 07daf8f5dcb82ba95c1b9f4cc8981d451b032986 | [
"Apache-2.0"
] | null | null | null | mito_sims_py3/fixed_points.py | DEPICTIVE/mito_sims | 07daf8f5dcb82ba95c1b9f4cc8981d451b032986 | [
"Apache-2.0"
] | null | null | null |
import numpy as np
from scipy.optimize import bisect
# =============================================
# =============================================
# =============================================
# =============================================
class find:
def __init__(self, f, xlims, args, nsamples=100, max_iter... | 40.97 | 197 | 0.494752 |
7949036b2e61e56805c1a7d1a3530e2583ebad15 | 15,113 | py | Python | var/spack/repos/builtin/packages/legion/package.py | ilagunap/spack | 510f869c3ae8ac2721debd29e98076212ee75852 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-11-16T02:42:57.000Z | 2019-06-06T19:18:50.000Z | var/spack/repos/builtin/packages/legion/package.py | ilagunap/spack | 510f869c3ae8ac2721debd29e98076212ee75852 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 5 | 2021-07-26T12:12:00.000Z | 2022-03-01T12:16:03.000Z | var/spack/repos/builtin/packages/legion/package.py | ilagunap/spack | 510f869c3ae8ac2721debd29e98076212ee75852 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # 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)
import os
from spack import *
class Legion(CMakePackage):
"""Legion is a data-centric parallel programming system f... | 40.194149 | 94 | 0.610931 |
794904bbee96f5a5c201f2c068849441f7701ef5 | 1,960 | py | Python | config/_base_/datasets/voc_ssdd.py | automlresearch/autodetector | e959baf589fb329509cd25edcab11c7d22ea5e7e | [
"Apache-2.0"
] | null | null | null | config/_base_/datasets/voc_ssdd.py | automlresearch/autodetector | e959baf589fb329509cd25edcab11c7d22ea5e7e | [
"Apache-2.0"
] | null | null | null | config/_base_/datasets/voc_ssdd.py | automlresearch/autodetector | e959baf589fb329509cd25edcab11c7d22ea5e7e | [
"Apache-2.0"
] | 1 | 2021-12-08T08:28:16.000Z | 2021-12-08T08:28:16.000Z | # dataset settings
dataset_type = 'VOCDataset_1class'
# Dataroot on Razer Laptop
# data_root = '/home/p/Documents/data/SSDD数据以及标签/ssdd/'
# Dataroot on Desktop
data_root = "/home/p/HD2/Datasets/SSDD/"
img_norm_cfg = dict(mean=[0.2, 0.2, 0.2], std=[0.2, 0.2, 0.2], to_rgb=True)
# img_norm_cfg = dict(mean=[123.675, 116.28,... | 33.793103 | 81 | 0.602551 |
7949051046035e903164fe7914207a7bea97ff3c | 4,310 | py | Python | 8term/OR/lab3/DualSimplexMethod.py | nik-sergeson/bsuir-informatics-labs | 14805fb83b8e2324580b6253158565068595e804 | [
"Apache-2.0"
] | null | null | null | 8term/OR/lab3/DualSimplexMethod.py | nik-sergeson/bsuir-informatics-labs | 14805fb83b8e2324580b6253158565068595e804 | [
"Apache-2.0"
] | null | null | null | 8term/OR/lab3/DualSimplexMethod.py | nik-sergeson/bsuir-informatics-labs | 14805fb83b8e2324580b6253158565068595e804 | [
"Apache-2.0"
] | null | null | null | from __future__ import division
from lab1.BasisMatricesHelper import get_basis_matrix, get_cannonical_form, get_basis_c_vector
from lab1.DualSimplexMethod import find_initial_basis_set
from sympy import zeros, Matrix
import bisect
class DualSimplexMethod(object):
"""
:type matrix_c:Matrix
:type matrix_A:... | 45.851064 | 115 | 0.592111 |
79490513ccc519e8e9230e6019c6d197e7479575 | 1,676 | py | Python | src/data/get_raw_data.py | bhavanakv/titanic-disaster | 0a689ded73fdb84bc4a4c9cead2cb492e1f66464 | [
"MIT"
] | null | null | null | src/data/get_raw_data.py | bhavanakv/titanic-disaster | 0a689ded73fdb84bc4a4c9cead2cb492e1f66464 | [
"MIT"
] | null | null | null | src/data/get_raw_data.py | bhavanakv/titanic-disaster | 0a689ded73fdb84bc4a4c9cead2cb492e1f66464 | [
"MIT"
] | null | null | null | # the content below is written into a file using writefile magic function
import os
from dotenv import load_dotenv,find_dotenv
from requests import session
import logging
payload = {
'action' : 'login',
'username' : os.environ.get("KAGGLE_USERNAME"),
'password' : os.environ.get("KA... | 35.659574 | 131 | 0.668258 |
7949058280196016d2af75dd845533229a8391a4 | 3,234 | py | Python | profiles_project/settings.py | kazamazza/profiles-rest-api | 4f7274ef517f67d06a643759bc4a5ecb2e52cf72 | [
"MIT"
] | null | null | null | profiles_project/settings.py | kazamazza/profiles-rest-api | 4f7274ef517f67d06a643759bc4a5ecb2e52cf72 | [
"MIT"
] | null | null | null | profiles_project/settings.py | kazamazza/profiles-rest-api | 4f7274ef517f67d06a643759bc4a5ecb2e52cf72 | [
"MIT"
] | null | null | null | """
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impor... | 25.872 | 91 | 0.700371 |
79490678627e217c90e0ac7b7806b504dbfea6fb | 3,041 | py | Python | nilabels/agents/math.py | nipy/nilabels | b065febc611eef638785651b4642d53bb61f1321 | [
"MIT"
] | 15 | 2019-04-09T21:47:47.000Z | 2022-02-01T14:11:51.000Z | nilabels/agents/math.py | SebastianoF/LabelsManager | b065febc611eef638785651b4642d53bb61f1321 | [
"MIT"
] | 4 | 2018-08-21T16:53:04.000Z | 2018-08-24T09:13:09.000Z | nilabels/agents/math.py | nipy/nilabels | b065febc611eef638785651b4642d53bb61f1321 | [
"MIT"
] | 1 | 2019-04-06T20:49:48.000Z | 2019-04-06T20:49:48.000Z | import nibabel as nib
from nilabels.tools.aux_methods.utils_path import get_pfi_in_pfi_out, connect_path_tail_head
from nilabels.tools.aux_methods.utils_nib import set_new_data
class Math(object):
"""
Facade of no external methods. Simple class for quick algebraic manipulations of images with the same grid
... | 41.094595 | 110 | 0.698783 |
7949068b81848b1ec1d756a7b7803534047ab920 | 792 | py | Python | satchless/product/handler.py | cajun-code/satchless | 068b26046c3af63268f8eecd6e33da2bbb78b8d1 | [
"BSD-4-Clause"
] | 1 | 2015-11-05T05:09:27.000Z | 2015-11-05T05:09:27.000Z | satchless/product/handler.py | cajun-code/satchless | 068b26046c3af63268f8eecd6e33da2bbb78b8d1 | [
"BSD-4-Clause"
] | null | null | null | satchless/product/handler.py | cajun-code/satchless | 068b26046c3af63268f8eecd6e33da2bbb78b8d1 | [
"BSD-4-Clause"
] | null | null | null | from django.conf import settings
from django.utils.importlib import import_module
from django.http import HttpResponse
_handlers_queue = None
def product_view(instances, request):
context = {}
for handler in _handlers_queue:
context = handler(instances, request=request, extra_context=context)
... | 30.461538 | 76 | 0.698232 |
794906b2f34442e1c7f759d29020e91b6e6d95bd | 909 | py | Python | buffered_encryption/tests/test_gcm.py | eblocha/buffered-encryption | 5ee84645f90ab74d2a7f6f7cc826bbe146f3c9cc | [
"MIT"
] | 3 | 2021-04-26T15:23:25.000Z | 2022-03-11T21:16:46.000Z | buffered_encryption/tests/test_gcm.py | eblocha/buffered-encryption | 5ee84645f90ab74d2a7f6f7cc826bbe146f3c9cc | [
"MIT"
] | null | null | null | buffered_encryption/tests/test_gcm.py | eblocha/buffered-encryption | 5ee84645f90ab74d2a7f6f7cc826bbe146f3c9cc | [
"MIT"
] | null | null | null | import os
import io
from buffered_encryption.aesgcm import EncryptionIterator, DecryptionIterator
import unittest
class TestSymmetry(unittest.TestCase):
def setUp(self):
# Prime number of random bytes greater than the chunk size
self.plaintext = os.urandom(130399)
self.key = os.urandom(32)... | 28.40625 | 80 | 0.646865 |
79490711c3504719c84fdb6f6f1ef3aeafe05586 | 1,210 | py | Python | onmt/tests/test_translator.py | l-k-11235/OpenNMT-py | 4815f07fcd482af9a1fe1d3b620d144197178bc5 | [
"MIT"
] | 5,864 | 2017-02-24T19:17:07.000Z | 2022-03-31T20:49:22.000Z | onmt/tests/test_translator.py | l-k-11235/OpenNMT-py | 4815f07fcd482af9a1fe1d3b620d144197178bc5 | [
"MIT"
] | 1,727 | 2017-02-27T09:09:56.000Z | 2022-03-29T17:08:29.000Z | onmt/tests/test_translator.py | l-k-11235/OpenNMT-py | 4815f07fcd482af9a1fe1d3b620d144197178bc5 | [
"MIT"
] | 2,570 | 2017-02-24T19:20:36.000Z | 2022-03-31T06:24:22.000Z | import unittest
from onmt.translate import GeneratorLM
import torch
class TestGeneratorLM(unittest.TestCase):
def test_split_src_to_prevent_padding_target_prefix_is_none_when_equal_size( # noqa: E501
self,
):
src = torch.randint(0, 10, (5, 6))
src_lengths = 5 * torch.ones(5)
(... | 32.702703 | 96 | 0.63719 |
79490731cbe1a6782fc30516a0eba4218dbfb31f | 760 | py | Python | project_code/topology_getter/component_errors.py | statnett/relevant_assets | 3b29c64677b63c485c09fbef14d933fe49fd7fc0 | [
"Apache-2.0"
] | 1 | 2020-04-29T13:29:22.000Z | 2020-04-29T13:29:22.000Z | project_code/topology_getter/component_errors.py | statnett/relevant_assets | 3b29c64677b63c485c09fbef14d933fe49fd7fc0 | [
"Apache-2.0"
] | null | null | null | project_code/topology_getter/component_errors.py | statnett/relevant_assets | 3b29c64677b63c485c09fbef14d933fe49fd7fc0 | [
"Apache-2.0"
] | null | null | null | class BusInitError(Exception):
""" Error class for Bus inititlaization
"""
pass
class BranchInitError(Exception):
""" Error class for Branch inititlaization
"""
pass
class LineInitError(Exception):
""" Error class for Line inititlaization
"""
pass
class TwoWindingTransformer... | 15.833333 | 63 | 0.689474 |
79490760e4f77ec4c4049262881c1b9492d586e3 | 4,595 | py | Python | usaspending_api/broker/tests/integration/test_broker_integration.py | samspoonemore0/usaspending-api | 62326fd1426ee5a18bde6d0df22237c8d995d853 | [
"CC0-1.0"
] | 1 | 2022-01-18T05:07:32.000Z | 2022-01-18T05:07:32.000Z | usaspending_api/broker/tests/integration/test_broker_integration.py | Hk92a/usaspending-api | 25daa9dbc30835b8f4b4c797c592ba9ecc78ca00 | [
"CC0-1.0"
] | null | null | null | usaspending_api/broker/tests/integration/test_broker_integration.py | Hk92a/usaspending-api | 25daa9dbc30835b8f4b4c797c592ba9ecc78ca00 | [
"CC0-1.0"
] | null | null | null | import pytest
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
from django.test import TestCase
class BrokerIntegrationTestCase(TestCase):
databases = {"default", "data_broker"}
dummy_table_name = "dummy_broker_table_to_be_rolled_back"
@classmethod
def setUpClass(... | 45.04902 | 118 | 0.669859 |
7949088897681b2ac614f2af8db9a64059080d5a | 4,208 | py | Python | clients/python-experimental/generated/openapi_client/model/free_style_build.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/python-experimental/generated/openapi_client/model/free_style_build.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/python-experimental/generated/openapi_client/model/free_style_build.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification # noqa: E501
The version of the OpenAPI document: 1.1.2-pre.0
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
impor... | 27.148387 | 85 | 0.638546 |
7949098eac192fe0d5585a742e6388a8f9698094 | 642 | py | Python | solutions/python3/369.py | sm2774us/amazon_interview_prep_2021 | f580080e4a6b712b0b295bb429bf676eb15668de | [
"MIT"
] | 42 | 2020-08-02T07:03:49.000Z | 2022-03-26T07:50:15.000Z | solutions/python3/369.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | null | null | null | solutions/python3/369.py | ajayv13/leetcode | de02576a9503be6054816b7444ccadcc0c31c59d | [
"MIT"
] | 40 | 2020-02-08T02:50:24.000Z | 2022-03-26T15:38:10.000Z | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def plusOne(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
def dfs(node):
if not node.next or dfs(nod... | 25.68 | 47 | 0.44081 |
794909eb8a9cf3c184734b084c5a7913a3330d2e | 164 | py | Python | home/admin.py | aayushray/CodingEasy | 8af86a0b83438e568349f162dae5e77f5ea923e4 | [
"MIT"
] | 1 | 2022-03-03T09:30:26.000Z | 2022-03-03T09:30:26.000Z | home/admin.py | aayushray/CodingEasy | 8af86a0b83438e568349f162dae5e77f5ea923e4 | [
"MIT"
] | null | null | null | home/admin.py | aayushray/CodingEasy | 8af86a0b83438e568349f162dae5e77f5ea923e4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Contact,Newsletter
# Register your models here.
admin.site.register(Contact)
admin.site.register(Newsletter) | 20.5 | 38 | 0.817073 |
79490bbcf49729148923b3a244bd8c784d1af946 | 7,486 | py | Python | imacropy/console.py | bogiebro/imacropy | d659527cf5af391c07de09484c7163f92fb92aed | [
"BSD-2-Clause"
] | null | null | null | imacropy/console.py | bogiebro/imacropy | d659527cf5af391c07de09484c7163f92fb92aed | [
"BSD-2-Clause"
] | null | null | null | imacropy/console.py | bogiebro/imacropy | d659527cf5af391c07de09484c7163f92fb92aed | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""IPython extension for a MacroPy-enabled REPL.
To enable::
%load_ext imacropy.console
To autoload it at IPython startup, put this into your ``ipython_config.py``::
c.InteractiveShellApp.extensions = ["imacropy.console"]
To find your config file, ``ipython profile locate``.
Notes:... | 40.464865 | 138 | 0.681539 |
79490ce3a34a8f2977a1935eef019f39e7252022 | 3,809 | py | Python | tensorflow/examples/saved_model/integration_tests/export_simple_text_embedding.py | hanton/tensorflow | 34fd2a5e9bcdb40957ece90fec46a37e6e9248b2 | [
"Apache-2.0"
] | 3 | 2017-11-09T17:40:28.000Z | 2021-11-17T10:24:19.000Z | tensorflow/examples/saved_model/integration_tests/export_simple_text_embedding.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | tensorflow/examples/saved_model/integration_tests/export_simple_text_embedding.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.933962 | 80 | 0.733526 |
79490f332a5b5056a1be27b3003ae3d3d523c98c | 8,748 | py | Python | fontFeatures/feeLib/__init__.py | ctrlcctrlv/fontFeatures | 76d68586da2c1c42bb3cd79f92d583e63f52cf02 | [
"BSD-3-Clause"
] | null | null | null | fontFeatures/feeLib/__init__.py | ctrlcctrlv/fontFeatures | 76d68586da2c1c42bb3cd79f92d583e63f52cf02 | [
"BSD-3-Clause"
] | null | null | null | fontFeatures/feeLib/__init__.py | ctrlcctrlv/fontFeatures | 76d68586da2c1c42bb3cd79f92d583e63f52cf02 | [
"BSD-3-Clause"
] | null | null | null | import re
import parsley
import importlib, inspect
from fontFeatures import FontFeatures
from babelfont.font import Font
from ometa.grammar import OMeta
import warnings
from more_itertools import collapse
def warning_on_one_line(message, category, filename, lineno, file=None, line=None):
return "# %s\n" % (messag... | 35.706122 | 163 | 0.581047 |
79490f5fa3f9c56ebbeb1a75f95bc2909d048341 | 1,999 | py | Python | tests/tests_geomstats/test_prepare_graph_data.py | SaitejaUtpala/geomstats | 5d4e16b3f30a86aab4725142f2263d8f10a30508 | [
"MIT"
] | 2 | 2020-01-23T04:01:02.000Z | 2020-08-18T19:20:27.000Z | tests/tests_geomstats/test_prepare_graph_data.py | SaitejaUtpala/geomstats | 5d4e16b3f30a86aab4725142f2263d8f10a30508 | [
"MIT"
] | null | null | null | tests/tests_geomstats/test_prepare_graph_data.py | SaitejaUtpala/geomstats | 5d4e16b3f30a86aab4725142f2263d8f10a30508 | [
"MIT"
] | 1 | 2021-03-14T06:54:09.000Z | 2021-03-14T06:54:09.000Z | """Unit tests for embedding data class."""
import geomstats.backend as gs
import geomstats.tests
from geomstats.datasets.prepare_graph_data import HyperbolicEmbedding
from geomstats.datasets.utils import load_karate_graph
class TestPrepareGraphData(geomstats.tests.TestCase):
"""Class for testing embedding."""
... | 30.753846 | 69 | 0.627314 |
79490fddf6b0900aef936262636d7d84ce4ea70a | 24,427 | py | Python | S11/LRScheduler.py | jagatabhay/TSAI | 313a27e321881fa974bfa62388e7f43ae3e0390a | [
"MIT"
] | 5 | 2020-08-13T18:16:33.000Z | 2022-03-15T07:51:26.000Z | S11/LRScheduler.py | jagatabhay/TSAI | 313a27e321881fa974bfa62388e7f43ae3e0390a | [
"MIT"
] | null | null | null | S11/LRScheduler.py | jagatabhay/TSAI | 313a27e321881fa974bfa62388e7f43ae3e0390a | [
"MIT"
] | 1 | 2020-07-05T18:03:38.000Z | 2020-07-05T18:03:38.000Z | import copy
import os
import torch
from tqdm.autonotebook import tqdm
from torch.optim.lr_scheduler import _LRScheduler
import matplotlib.pyplot as plt
from torch.utils.data import DataLoader
from packaging import version
PYTORCH_VERSION = version.parse(torch.__version__)
try:
from apex import amp
... | 42.407986 | 117 | 0.599419 |
794911bc14ed482d0f807d30b420e68722011166 | 683 | py | Python | mysite/pages/migrations/0019_auto_20151105_0922.py | raccoongang/socraticqs2 | 06201005136ee139846f857dbb2f518736e441de | [
"Apache-2.0"
] | 3 | 2015-11-20T07:33:28.000Z | 2017-01-15T23:33:50.000Z | mysite/pages/migrations/0019_auto_20151105_0922.py | raccoongang/socraticqs2 | 06201005136ee139846f857dbb2f518736e441de | [
"Apache-2.0"
] | 28 | 2015-07-14T11:33:24.000Z | 2017-11-17T15:21:22.000Z | mysite/pages/migrations/0019_auto_20151105_0922.py | raccoongang/socraticqs2 | 06201005136ee139846f857dbb2f518736e441de | [
"Apache-2.0"
] | 4 | 2015-04-29T09:04:59.000Z | 2017-07-19T14:11:16.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('pages', '0018_interestedform_interestedplugin'),
]
operations = [
migrations.AlterField(
model_name='detailsplug... | 25.296296 | 62 | 0.604685 |
794911dbf3bc5f44b257c89fb9bc6321e7a5af92 | 2,106 | py | Python | iotedgehubdev/edgecert.py | SLdragon/iotedgehubdev | f988cd1f108b16605fb32b7b8c61f3d595361bc6 | [
"MIT"
] | null | null | null | iotedgehubdev/edgecert.py | SLdragon/iotedgehubdev | f988cd1f108b16605fb32b7b8c61f3d595361bc6 | [
"MIT"
] | null | null | null | iotedgehubdev/edgecert.py | SLdragon/iotedgehubdev | f988cd1f108b16605fb32b7b8c61f3d595361bc6 | [
"MIT"
] | 1 | 2018-11-26T20:00:32.000Z | 2018-11-26T20:00:32.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from .certutils import EdgeCertUtil
from .constants import EdgeConstants
class EdgeCert(object):
def __init__(self, certs_dir, hostname):
self.certs_dir = certs_dir
self.hostname = hostname
def gen... | 46.8 | 93 | 0.622507 |
794913d2a4685807d9bf77319176df206517e1b7 | 305 | py | Python | 2015/09/candidate-refugees-20150909/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/09/candidate-refugees-20150909/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/09/candidate-refugees-20150909/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
import base_filters
COPY_GOOGLE_DOC_KEY = '1aDWOdUCmdWBQBDDAWQetZQO36sn55av-6uAlRtZ_Wuw'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
| 21.785714 | 77 | 0.816393 |
7949143db7ef0c7058fd589d8905e53f82559999 | 27,552 | py | Python | sceptre/stack.py | phajduk/sceptre | 4674616caf05978843e560e01b7dd91f0137a9ed | [
"Apache-2.0"
] | null | null | null | sceptre/stack.py | phajduk/sceptre | 4674616caf05978843e560e01b7dd91f0137a9ed | [
"Apache-2.0"
] | null | null | null | sceptre/stack.py | phajduk/sceptre | 4674616caf05978843e560e01b7dd91f0137a9ed | [
"Apache-2.0"
] | 4 | 2019-09-10T13:32:18.000Z | 2021-06-16T19:03:47.000Z | # -*- coding: utf-8 -*-
"""
sceptre.stack
This module implements a Stack class, which stores data and logic associated
with a particular stack.
"""
from datetime import datetime, timedelta
import logging
import os
import time
from dateutil.tz import tzutc
import botocore
from .connection_manager import Connection... | 33.436893 | 79 | 0.586999 |
7949153718530e9d77b8fb4e5d7027ce463544e2 | 874 | py | Python | fault_tolerant_flight_control_drl/tools/__init__.py | kdally/fault-tolerant-flight-control-drl | 800a1c9319b44ab2b1d17f6e19266c2392d6e57b | [
"MIT"
] | 8 | 2021-02-27T09:49:57.000Z | 2022-03-21T16:28:08.000Z | fault_tolerant_flight_control_drl/tools/__init__.py | kdally/fault-tolerant-flight-control-drl | 800a1c9319b44ab2b1d17f6e19266c2392d6e57b | [
"MIT"
] | null | null | null | fault_tolerant_flight_control_drl/tools/__init__.py | kdally/fault-tolerant-flight-control-drl | 800a1c9319b44ab2b1d17f6e19266c2392d6e57b | [
"MIT"
] | 2 | 2021-03-04T07:24:35.000Z | 2021-11-17T04:21:08.000Z | from fault_tolerant_flight_control_drl.tools.get_task import AltitudeTask, AttitudeTask, BodyRateTask, Task
from fault_tolerant_flight_control_drl.tools.get_task import CascadedAltTask, ReliabilityTask
from fault_tolerant_flight_control_drl.tools.get_task import DisturbanceRejectionAlt, DisturbanceRejectionAtt
from fau... | 79.454545 | 109 | 0.915332 |
794915c1bd839773b43cbd71ff06abd15aa40264 | 6,901 | py | Python | utils/sampling.py | hongyouc/FedBE | 7eeb965d29ce6c35c38f31706a004c00745e59b8 | [
"Apache-2.0"
] | 12 | 2021-09-23T19:41:46.000Z | 2022-03-29T12:17:25.000Z | utils/sampling.py | hongyouc/FedBE | 7eeb965d29ce6c35c38f31706a004c00745e59b8 | [
"Apache-2.0"
] | 1 | 2022-03-17T08:20:17.000Z | 2022-03-17T08:20:17.000Z | utils/sampling.py | hongyouc/FedBE | 7eeb965d29ce6c35c38f31706a004c00745e59b8 | [
"Apache-2.0"
] | 1 | 2022-03-01T11:43:31.000Z | 2022-03-01T11:43:31.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python version: 3.6
import numpy as np
import pdb
from torchvision import datasets, transforms
import os
import glob
from torch.utils.data import Dataset
from PIL import Image
def mnist_iid(dataset, num_users):
"""
Sample I.I.D. client data from MNIST dataset
... | 38.553073 | 108 | 0.618026 |
79491614dceb323c022da2f467de3caabf704186 | 1,503 | py | Python | tests/unit/flows/test_duckdb_transform.py | angelika233/viadot | 99a4c5b622ad099a44ab014a47ba932a747c0ae6 | [
"MIT"
] | null | null | null | tests/unit/flows/test_duckdb_transform.py | angelika233/viadot | 99a4c5b622ad099a44ab014a47ba932a747c0ae6 | [
"MIT"
] | null | null | null | tests/unit/flows/test_duckdb_transform.py | angelika233/viadot | 99a4c5b622ad099a44ab014a47ba932a747c0ae6 | [
"MIT"
] | null | null | null | import os
import pytest
from viadot.flows import DuckDBTransform
from viadot.sources import DuckDB
BRONZE_SCHEMA = "bronze_schema"
SILVER_SCHEMA = "silver_schema"
TABLE = "test_table"
DATABASE_PATH = "test_db_1234.duckdb"
CREDENTIALS = dict(database=DATABASE_PATH)
@pytest.fixture(scope="session")
def duckdb():
... | 30.673469 | 95 | 0.725882 |
794916198dccf8a833455f83c6ebf21ab0484833 | 219 | py | Python | manager_workspace/config/desktop.py | muirawachanga/manager_workspace | e7701475652a03263024e17606ed03952726b5c5 | [
"MIT"
] | null | null | null | manager_workspace/config/desktop.py | muirawachanga/manager_workspace | e7701475652a03263024e17606ed03952726b5c5 | [
"MIT"
] | null | null | null | manager_workspace/config/desktop.py | muirawachanga/manager_workspace | e7701475652a03263024e17606ed03952726b5c5 | [
"MIT"
] | 1 | 2022-02-24T20:33:56.000Z | 2022-02-24T20:33:56.000Z | from frappe import _
def get_data():
return [
{
"module_name": "Manager Workspace",
"color": "grey",
"icon": "octicon octicon-file-directory",
"type": "module",
"label": _("Manager Workspace")
}
]
| 16.846154 | 44 | 0.607306 |
794916392d4640d16b7df45104c3c01b87538a3d | 5,315 | py | Python | app/main/views.py | vicky-eve/Personal-Blog | 930f754dec1e7be9e1653cfd3f67a8c440ce85fe | [
"MIT"
] | null | null | null | app/main/views.py | vicky-eve/Personal-Blog | 930f754dec1e7be9e1653cfd3f67a8c440ce85fe | [
"MIT"
] | null | null | null | app/main/views.py | vicky-eve/Personal-Blog | 930f754dec1e7be9e1653cfd3f67a8c440ce85fe | [
"MIT"
] | null | null | null | from flask import render_template,request,redirect,url_for,abort, flash
from . import main
from flask_login import login_required,current_user
from ..models import User, Blog, Quote,Subscribe, Comment
from .forms import UpdateProfile,BlogForm,CommentForm,UpdateBlog,SubscribeForm
from ..requests import get_quote
from ..... | 34.967105 | 114 | 0.680527 |
7949166dc9f7f6235e9db9d15e2d913b9bb55598 | 4,166 | py | Python | docs_zh_CN/conf.py | vineethbabu/mmaction2 | f2e4289807c95bad7dd83757a49c5d9ebd2f881e | [
"Apache-2.0"
] | 1,870 | 2020-07-11T09:33:46.000Z | 2022-03-31T13:21:36.000Z | docs_zh_CN/conf.py | wuyy258/mmaction2 | 3f3ad9cae291c991b822cbc2ecfb88c1188e87c5 | [
"Apache-2.0"
] | 1,285 | 2020-07-11T11:18:57.000Z | 2022-03-31T08:41:17.000Z | docs_zh_CN/conf.py | wuyy258/mmaction2 | 3f3ad9cae291c991b822cbc2ecfb88c1188e87c5 | [
"Apache-2.0"
] | 557 | 2020-07-11T09:51:57.000Z | 2022-03-31T13:21:35.000Z | # Copyright (c) OpenMMLab. All rights reserved.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup -----------------------... | 31.560606 | 79 | 0.601056 |
794916f3707fcfab742abfccbcd7b32a9397fb54 | 10,840 | py | Python | spearmint/cleanup.py | fernandezdaniel/Spearmint | 3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84 | [
"RSA-MD"
] | 6 | 2021-06-29T11:26:49.000Z | 2022-01-20T18:12:47.000Z | spearmint/cleanup.py | fernandezdaniel/Spearmint | 3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84 | [
"RSA-MD"
] | null | null | null | spearmint/cleanup.py | fernandezdaniel/Spearmint | 3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84 | [
"RSA-MD"
] | 9 | 2018-06-28T13:06:35.000Z | 2021-06-20T18:21:58.000Z | # -*- coding: utf-8 -*-
# Spearmint
#
# Academic and Non-Commercial Research Use Software License and Terms
# of Use
#
# Spearmint is a software package to perform Bayesian optimization
# according to specific algorithms (the “Software”). The Software is
# designed to automatically run experiments (thus the code name
... | 47.336245 | 103 | 0.772509 |
7949173877c7498ab96f4e71ea72e38bee78d108 | 29,190 | py | Python | train.py | faroukmokhtar/weaver | f3ba1b78d03b5809611b21bd06663fa2f3b738bf | [
"MIT"
] | null | null | null | train.py | faroukmokhtar/weaver | f3ba1b78d03b5809611b21bd06663fa2f3b738bf | [
"MIT"
] | null | null | null | train.py | faroukmokhtar/weaver | f3ba1b78d03b5809611b21bd06663fa2f3b738bf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#import setGPU
import os
import shutil
import glob
import argparse
import numpy as np
import math
import torch
from torch.utils.data import DataLoader
from importlib import import_module
import ast
from utils.logger import _logger, _configLogger
from utils.dataset import SimpleIterDataset
parse... | 47.156704 | 184 | 0.631792 |
7949185859dee40d96b037de0e0db54b681b0f07 | 4,263 | py | Python | experiments/tuning/300units_1.py | samuilstoychev/research_project | 897bde82471ef92ded396aa31d91ec19826d4ce2 | [
"MIT"
] | null | null | null | experiments/tuning/300units_1.py | samuilstoychev/research_project | 897bde82471ef92ded396aa31d91ec19826d4ce2 | [
"MIT"
] | null | null | null | experiments/tuning/300units_1.py | samuilstoychev/research_project | 897bde82471ef92ded396aa31d91ec19826d4ce2 | [
"MIT"
] | null | null | null | RAM AT BEGINNING: 0.2237396240234375
Latent replay turned on
CUDA is used
RAM BEFORE LOADING DATA: 0.22828292846679688
Preparing the data...
SPLIT RATIO: [50000, 10000]
--> mnist: 'train'-dataset consisting of 60000 samples
--> mnist: 'test'-dataset consisting of 10000 samples
RAM AFTER LOADING DATA: 0.2893791198730... | 34.942623 | 115 | 0.562515 |
7949187d6b1ecb72ec6f8c54919298df96f935e4 | 159 | py | Python | tests/urls.py | xncbf/django-dynamodb-cache | be6d1b4b8e92d581041043bcd694f2a9f00ee386 | [
"MIT"
] | 21 | 2022-02-16T10:18:24.000Z | 2022-03-31T23:40:06.000Z | tests/urls.py | xncbf/django-dynamodb-cache | be6d1b4b8e92d581041043bcd694f2a9f00ee386 | [
"MIT"
] | 9 | 2022-03-01T06:40:59.000Z | 2022-03-26T08:12:31.000Z | tests/urls.py | xncbf/django-dynamodb-cache | be6d1b4b8e92d581041043bcd694f2a9f00ee386 | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.urls import path
def test(request):
return HttpResponse(b"teste")
urlpatterns = [path("test", test)]
| 14.454545 | 36 | 0.735849 |
794918dbd64c1ce58555d4bc0b1262c7a724d058 | 196 | py | Python | October Long Challenge/threeBoxes.py | dibyanshushekhardey/Coding-Practice | 885d87212221083f890c334e0fe0b70510ef9c37 | [
"MIT"
] | null | null | null | October Long Challenge/threeBoxes.py | dibyanshushekhardey/Coding-Practice | 885d87212221083f890c334e0fe0b70510ef9c37 | [
"MIT"
] | null | null | null | October Long Challenge/threeBoxes.py | dibyanshushekhardey/Coding-Practice | 885d87212221083f890c334e0fe0b70510ef9c37 | [
"MIT"
] | null | null | null | t = int(input())
for i in range(t):
a, b, c, d = list(map(int, input().split()))
if a + b + c <= d:
print("1")
elif a + b <= d:
print("2")
else:
print("3") | 19.6 | 48 | 0.408163 |
794919d05dd37bd20b557a1334970d99f3ecbebe | 11,164 | py | Python | python/tests/unit/test_api_tasks_unit.py | mardim91/airship-drydock | bb4e96bb7411f8ffdd39ea07914ee0d9a8f10fdd | [
"Apache-2.0"
] | null | null | null | python/tests/unit/test_api_tasks_unit.py | mardim91/airship-drydock | bb4e96bb7411f8ffdd39ea07914ee0d9a8f10fdd | [
"Apache-2.0"
] | null | null | null | python/tests/unit/test_api_tasks_unit.py | mardim91/airship-drydock | bb4e96bb7411f8ffdd39ea07914ee0d9a8f10fdd | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 AT&T Intellectual Property. All other 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... | 39.17193 | 79 | 0.650842 |
794919f6942e169c4c08945014f8deb55c3a758f | 47,223 | py | Python | sklearn/pipeline.py | MrinalTyagi/scikit-learn | 6192d1fbdb84b1f775c0242a8fea4c6481085cff | [
"BSD-3-Clause"
] | 50,961 | 2015-01-01T06:06:31.000Z | 2022-03-31T23:40:12.000Z | sklearn/pipeline.py | ashutoshpatelofficial/scikit-learn | 2fc9187879424556726d9345a6656884fa9fbc20 | [
"BSD-3-Clause"
] | 17,065 | 2015-01-01T02:01:58.000Z | 2022-03-31T23:48:34.000Z | sklearn/pipeline.py | ashutoshpatelofficial/scikit-learn | 2fc9187879424556726d9345a6656884fa9fbc20 | [
"BSD-3-Clause"
] | 26,886 | 2015-01-01T00:59:27.000Z | 2022-03-31T18:03:23.000Z | """
The :mod:`sklearn.pipeline` module implements utilities to build a composite
estimator, as a chain of transforms and estimators.
"""
# Author: Edouard Duchesnay
# Gael Varoquaux
# Virgile Fritsch
# Alexandre Gramfort
# Lars Buitinck
# License: BSD
from collections import defaultdict... | 36.130834 | 88 | 0.613578 |
79491a0b75c7a6bb7a27cea885d59ded6038819c | 828 | py | Python | src/c3nav/control/migrations/0008_userpermissions_reports.py | johnjohndoe/c3nav | a17f863a3512e305595c16b0300796b6bae81241 | [
"Apache-2.0"
] | 132 | 2016-11-12T01:45:23.000Z | 2022-03-08T15:17:10.000Z | src/c3nav/control/migrations/0008_userpermissions_reports.py | johnjohndoe/c3nav | a17f863a3512e305595c16b0300796b6bae81241 | [
"Apache-2.0"
] | 66 | 2016-09-29T09:46:19.000Z | 2022-03-11T23:26:18.000Z | src/c3nav/control/migrations/0008_userpermissions_reports.py | johnjohndoe/c3nav | a17f863a3512e305595c16b0300796b6bae81241 | [
"Apache-2.0"
] | 42 | 2016-09-29T08:34:57.000Z | 2022-03-08T15:17:15.000Z | # Generated by Django 2.2.8 on 2019-12-24 16:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mapdata', '0078_reports'),
('control', '0007_userpermissions_manage_map_updates'),
]
operations = [
migrations.AddField(
... | 33.12 | 204 | 0.655797 |
79491a79324b2560e8d9b81d637e9442f013573a | 19,523 | py | Python | input_reader/keylevel.py | SethMMorton/input_reader | 837ccc903cd5c8c89693130bc9b7eb48d0f50167 | [
"MIT"
] | 1 | 2019-09-27T23:41:12.000Z | 2019-09-27T23:41:12.000Z | input_reader/keylevel.py | SethMMorton/input_reader | 837ccc903cd5c8c89693130bc9b7eb48d0f50167 | [
"MIT"
] | null | null | null | input_reader/keylevel.py | SethMMorton/input_reader | 837ccc903cd5c8c89693130bc9b7eb48d0f50167 | [
"MIT"
] | 1 | 2022-03-15T07:46:12.000Z | 2022-03-15T07:46:12.000Z | # -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
from .helpers import ReaderError, SUPPRESS
from .py23compat import py23_str, py23_basestring
class _KeyLevel(object):
"""An abstract base class that provides functionality essential
for a key"""
def __init__(self,... | 38.736111 | 82 | 0.505455 |
79491a9ddbc00b804e55f7fd385f18740dae8223 | 9,353 | py | Python | opentamp/policy_hooks/robosuite/arm_hyp.py | Algorithmic-Alignment-Lab/openTAMP | f0642028d551d0436b3a3dbc3bfb2f23a00adc14 | [
"MIT"
] | 4 | 2022-02-13T15:52:18.000Z | 2022-03-26T17:33:13.000Z | opentamp/policy_hooks/robosuite/arm_hyp.py | Algorithmic-Alignment-Lab/openTAMP | f0642028d551d0436b3a3dbc3bfb2f23a00adc14 | [
"MIT"
] | 1 | 2022-02-13T22:48:09.000Z | 2022-02-13T22:48:09.000Z | opentamp/policy_hooks/robosuite/arm_hyp.py | Algorithmic-Alignment-Lab/openTAMP | f0642028d551d0436b3a3dbc3bfb2f23a00adc14 | [
"MIT"
] | null | null | null |
NUM_OBJS = 1
NUM_TARGS = 1
from datetime import datetime
import os
import os.path
import numpy as np
from gps.algorithm.policy.lin_gauss_init import init_lqr, init_pd
from opentamp.policy_hooks.algorithm_impgps import AlgorithmIMPGPS
from opentamp.policy_hooks.multi_head_policy_opt_tf import MultiHeadPolicyOptTf
... | 29.41195 | 83 | 0.592003 |
79491b2ff5476ebf959fc237efa01be12e1e8c3b | 1,989 | py | Python | utils.py | bcarlier75/ft_linear_regression | b966c8432855873ff273ad9b50a638e290edb407 | [
"MIT"
] | 1 | 2021-05-07T05:07:30.000Z | 2021-05-07T05:07:30.000Z | utils.py | bcarlier75/ft_linear_regression | b966c8432855873ff273ad9b50a638e290edb407 | [
"MIT"
] | null | null | null | utils.py | bcarlier75/ft_linear_regression | b966c8432855873ff273ad9b50a638e290edb407 | [
"MIT"
] | null | null | null | from sys import argv
from maths import *
import matplotlib.pyplot as plt
import csv
def print_usage():
print(f'Usage: python train.py [-h] [-p] [-m]')
print(f'\t -h : display this message')
print(f'\t -p : display plot')
print(f'\t -m : display model metrics')
def check_args():
flag_plot = 0
... | 27.246575 | 94 | 0.547009 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.