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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79735966f1f7bc004b45f75d938a1e9471a0a553 | 874 | py | Python | vitrage_dashboard/enabled/_4100_admin_vitrage_panel_group.py | delightwook91/MEC_vitrageui | 8cbe55262851188128933df675e3e23ef0a1c759 | [
"Apache-2.0"
] | 11 | 2018-07-18T01:34:06.000Z | 2018-07-18T06:18:42.000Z | vitrage_dashboard/enabled/_4100_admin_vitrage_panel_group.py | delightwook/Integrated-UI | 32244339603eb0fd5eae9989d81bc96efcd35ad3 | [
"Apache-2.0"
] | null | null | null | vitrage_dashboard/enabled/_4100_admin_vitrage_panel_group.py | delightwook/Integrated-UI | 32244339603eb0fd5eae9989d81bc96efcd35ad3 | [
"Apache-2.0"
] | 1 | 2018-09-07T08:35:43.000Z | 2018-09-07T08:35:43.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 43.7 | 74 | 0.778032 |
797359d4e53e3196fd63fbffbb9d67dbff114df1 | 462 | py | Python | jacquard/service/__init__.py | prophile/loom | a06b781a81139ed578bcbef3fb521b8f712ab77d | [
"MIT"
] | 8 | 2017-01-13T14:00:41.000Z | 2018-09-28T18:16:53.000Z | jacquard/service/__init__.py | prophile/loom | a06b781a81139ed578bcbef3fb521b8f712ab77d | [
"MIT"
] | 79 | 2017-01-13T13:32:54.000Z | 2021-02-03T11:52:48.000Z | jacquard/service/__init__.py | PeterJCLaw/jacquard | a06b781a81139ed578bcbef3fb521b8f712ab77d | [
"MIT"
] | 3 | 2017-06-13T12:18:30.000Z | 2019-01-23T12:43:50.000Z | """
Web service subsystem.
The primary means by which the Jacquard server is accessed in production is
an HTTP API, which is the domain of this subsystem. It presents a WSGI HTTP
application.
The only user-facing API from this subsystem is `get_wsgi_app`, which takes a
system configuration and returns a WSGI callable... | 28.875 | 77 | 0.792208 |
79735a02a6486f2afd22c17d8e285b4b340cc7ee | 208 | py | Python | project_with_override_channel.py | odant/test_versions_conan_packages | b0f91f31cf277f0854c8fd28ed3aa4ce1109ad15 | [
"MIT"
] | null | null | null | project_with_override_channel.py | odant/test_versions_conan_packages | b0f91f31cf277f0854c8fd28ed3aa4ce1109ad15 | [
"MIT"
] | null | null | null | project_with_override_channel.py | odant/test_versions_conan_packages | b0f91f31cf277f0854c8fd28ed3aa4ce1109ad15 | [
"MIT"
] | null | null | null | from conans import ConanFile
class Project(ConanFile):
def requirements(self):
self.requires("fake_openssl/1.1.1b+5@odant/testing")
self.requires("fake_jscript/11.11.0.2@odant/stable")
| 23.111111 | 60 | 0.706731 |
79735b49d0371d5de676e0dbdc642366681f156d | 18,292 | py | Python | mayan/apps/common/migrations/0015_auto_20200501_0631.py | wan1869/dushuhu | 934dd178e67140cffc6b9203e793fdf8bbc73a54 | [
"Apache-2.0"
] | 1 | 2021-02-24T15:03:23.000Z | 2021-02-24T15:03:23.000Z | mayan/apps/common/migrations/0015_auto_20200501_0631.py | wan1869/dushuhu | 934dd178e67140cffc6b9203e793fdf8bbc73a54 | [
"Apache-2.0"
] | null | null | null | mayan/apps/common/migrations/0015_auto_20200501_0631.py | wan1869/dushuhu | 934dd178e67140cffc6b9203e793fdf8bbc73a54 | [
"Apache-2.0"
] | 1 | 2020-08-09T09:06:59.000Z | 2020-08-09T09:06:59.000Z | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('common', '0014_auto_20200210_0836'),
]
operations = [
migrations.AlterField(
model_name='userlocaleprofile',
name='timezone',
field=models.CharField(choi... | 1,076 | 17,993 | 0.700197 |
79735b5fecda892c824326614490bfc48935bc8f | 216 | py | Python | rhasspy_weather/output/console.py | arniebarni/rhasspy_weather | 6a9df72adad3e5dafa7962c2be37c824dc04137b | [
"MIT"
] | 5 | 2020-03-29T01:00:30.000Z | 2022-02-06T20:00:00.000Z | rhasspy_weather/output/console.py | arniebarni/rhasspy_weather | 6a9df72adad3e5dafa7962c2be37c824dc04137b | [
"MIT"
] | 12 | 2020-04-02T15:09:05.000Z | 2021-10-11T00:44:21.000Z | rhasspy_weather/output/console.py | arniebarni/rhasspy_weather | 6a9df72adad3e5dafa7962c2be37c824dc04137b | [
"MIT"
] | 5 | 2020-03-25T08:33:02.000Z | 2021-05-18T08:47:41.000Z | import logging
log = logging.getLogger(__name__)
def output_response(output):
log.debug("Selected output: console")
print(output)
def parse_config(config):
pass
def get_template():
return None
| 12.705882 | 41 | 0.712963 |
79735c1adbfb6a6215405e57c7cabdbe92152223 | 389 | py | Python | forum/migrations/0083_community_trusted.py | iamdinakar/Comradery-API | 0d30df376f5542d01a04b96c5fdf9363d3103679 | [
"MIT"
] | 26 | 2021-02-15T07:35:05.000Z | 2022-03-28T19:02:36.000Z | forum/migrations/0083_community_trusted.py | iamdinakar/Comradery-API | 0d30df376f5542d01a04b96c5fdf9363d3103679 | [
"MIT"
] | null | null | null | forum/migrations/0083_community_trusted.py | iamdinakar/Comradery-API | 0d30df376f5542d01a04b96c5fdf9363d3103679 | [
"MIT"
] | 6 | 2021-02-15T08:08:45.000Z | 2022-01-20T19:27:04.000Z | # Generated by Django 2.2.7 on 2020-04-20 09:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('forum', '0082_auto_20200420_0901'),
]
operations = [
migrations.AddField(
model_name='community',
name='trusted',
... | 20.473684 | 53 | 0.601542 |
79735c5253d520d4ab15b406b16ae82c35859fc9 | 484 | py | Python | dende/platereader/layout/__init__.py | dende/platereader | 36b9660bff6ef37990e5925284cbe37ee5093163 | [
"MIT"
] | 3 | 2021-04-20T11:50:34.000Z | 2022-03-04T08:15:37.000Z | dende/platereader/layout/__init__.py | dende/platereader | 36b9660bff6ef37990e5925284cbe37ee5093163 | [
"MIT"
] | null | null | null | dende/platereader/layout/__init__.py | dende/platereader | 36b9660bff6ef37990e5925284cbe37ee5093163 | [
"MIT"
] | null | null | null | from .layout_frame import LayoutFrame # noqa
from .samples_frame import SamplesFrame # noqa
from .settings import Settings # noqa
from .tabbed_frame import TabbedFrame # noqa
from .treatments_frame import TreatmentsFrame # noqa
from .layout import Layout # noqa
# taken from https://colorbrewer2.org/#type=divergin... | 44 | 109 | 0.710744 |
79735d030a067aed3c0f8625c5dd29eeee3a47cf | 2,859 | py | Python | app/settings.py | ddomingof/predictme | a01ed3b91783c925108fd843979a5450f2a14286 | [
"Apache-2.0"
] | null | null | null | app/settings.py | ddomingof/predictme | a01ed3b91783c925108fd843979a5450f2a14286 | [
"Apache-2.0"
] | 2 | 2020-06-06T01:22:18.000Z | 2021-06-10T22:32:29.000Z | app/settings.py | ddomingof/predictme | a01ed3b91783c925108fd843979a5450f2a14286 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Django settings."""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'h90r6z$p)hsst&be@r9gh#s($^9)blidq@e... | 26.229358 | 91 | 0.683456 |
79735d557685d32f4dbd274a5957b7d61b2fda80 | 629 | py | Python | cobs/plot/state_plotter.py | odtoolkit/COBS | b7a372e339769bdb033faec05341091394b0feec | [
"MIT"
] | 11 | 2020-09-23T15:28:21.000Z | 2022-03-21T21:22:40.000Z | cobs/plot/state_plotter.py | odtoolkit/COBS | b7a372e339769bdb033faec05341091394b0feec | [
"MIT"
] | 1 | 2021-06-29T17:01:14.000Z | 2021-07-13T06:15:16.000Z | cobs/plot/state_plotter.py | odtoolkit/COBS | b7a372e339769bdb033faec05341091394b0feec | [
"MIT"
] | 3 | 2020-09-24T02:13:45.000Z | 2021-11-06T07:01:29.000Z | import matplotlib.pyplot as plt
def plot_state_history(model, variable, zone=None):
temp = model.historical_values[-1]
if isinstance(temp[variable], dict):
if zone is None:
for name in temp[variable]:
data = [timestep[variable][name] for timestep in model.historical_values]... | 34.944444 | 89 | 0.63275 |
79735daf2b48cddc0a47c0b55798b73fd4ebb886 | 13,704 | py | Python | assignment3/cs231n/classifiers/rnn.py | LOTEAT/CS231n | b840b37848b262dc14d8f200b4656e859bb2c81e | [
"MIT"
] | null | null | null | assignment3/cs231n/classifiers/rnn.py | LOTEAT/CS231n | b840b37848b262dc14d8f200b4656e859bb2c81e | [
"MIT"
] | null | null | null | assignment3/cs231n/classifiers/rnn.py | LOTEAT/CS231n | b840b37848b262dc14d8f200b4656e859bb2c81e | [
"MIT"
] | null | null | null | from builtins import range
from builtins import object
import numpy as np
from ..layers import *
from ..rnn_layers import *
class CaptioningRNN(object):
"""
A CaptioningRNN produces captions from image features using a recurrent
neural network.
The RNN receives input vectors of size D, has a vocab s... | 51.325843 | 98 | 0.548161 |
79735dbf340764e2b07b4ebdde15beb8eb9fe3f7 | 2,051 | py | Python | main/python/utils/FileUtils.py | ShangxuanWu/MT_python | b64bea6e773d9f0df3f8f850252a909e6e4afff5 | [
"CNRI-Python"
] | null | null | null | main/python/utils/FileUtils.py | ShangxuanWu/MT_python | b64bea6e773d9f0df3f8f850252a909e6e4afff5 | [
"CNRI-Python"
] | null | null | null | main/python/utils/FileUtils.py | ShangxuanWu/MT_python | b64bea6e773d9f0df3f8f850252a909e6e4afff5 | [
"CNRI-Python"
] | null | null | null | # CopyRight Shangxuan Wu @ Myriad of Things
# Created in Jan 2018
# add path for root ('tf_code/') directory if not in sys.path
import sys, os
root_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
if root_path not in sys.path:
sys.path.append(root_path)
import p... | 30.161765 | 105 | 0.724525 |
79735e88d3b3867d0dea51062d81e1cd0c3dd614 | 284 | py | Python | data_generation/forward_model/devito/devito/ops/operator.py | LukasMosser/SNIST | c7122541db2aa597cff34a45aa0465ec1679e2b3 | [
"MIT"
] | 11 | 2019-07-18T11:15:12.000Z | 2021-09-14T02:20:52.000Z | data_generation/forward_model/devito/devito/ops/operator.py | LukasMosser/SNIST | c7122541db2aa597cff34a45aa0465ec1679e2b3 | [
"MIT"
] | null | null | null | data_generation/forward_model/devito/devito/ops/operator.py | LukasMosser/SNIST | c7122541db2aa597cff34a45aa0465ec1679e2b3 | [
"MIT"
] | 3 | 2020-02-15T14:23:29.000Z | 2021-02-04T01:51:02.000Z | from devito.operator import OperatorRunnable
__all__ = ['Operator']
class Operator(OperatorRunnable):
"""
A special :class:`OperatorCore` to JIT-compile and run operators through OPS.
"""
def _specialize_iet(self, iet, **kwargs):
raise NotImplementedError
| 21.846154 | 81 | 0.707746 |
79735eb5ea8a2af7878028b590f23cf662a6dcca | 2,680 | py | Python | dace/registry.py | xiacijie/dace | 2d942440b1d7b139ba112434bfa78f754e10bfe5 | [
"BSD-3-Clause"
] | 1 | 2021-07-26T07:58:06.000Z | 2021-07-26T07:58:06.000Z | dace/registry.py | xiacijie/dace | 2d942440b1d7b139ba112434bfa78f754e10bfe5 | [
"BSD-3-Clause"
] | null | null | null | dace/registry.py | xiacijie/dace | 2d942440b1d7b139ba112434bfa78f754e10bfe5 | [
"BSD-3-Clause"
] | 1 | 2021-03-04T13:01:48.000Z | 2021-03-04T13:01:48.000Z | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
""" Contains class decorators to ease creating classes and enumerations whose
subclasses and values can be registered externally. """
from aenum import Enum, extend_enum
from copy import deepcopy
from typing import Dict, Type
def make_re... | 35.263158 | 79 | 0.705224 |
79735eebcdf4aaef0a217c9874e0e0f86e0174b9 | 2,406 | py | Python | tests/conftest.py | hpcn-uam/ccore | d3b1cd709d9c72eb0d89d8b3fabf54c8e47603d1 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | hpcn-uam/ccore | d3b1cd709d9c72eb0d89d8b3fabf54c8e47603d1 | [
"Apache-2.0"
] | 1 | 2017-10-02T15:27:02.000Z | 2017-10-02T15:27:34.000Z | tests/conftest.py | hpcn-uam/ccore | d3b1cd709d9c72eb0d89d8b3fabf54c8e47603d1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
import pandas as pd
import py
import random
@pytest.fixture(scope='session')
def sessiondir(request):
"""Temporal session directory"""
d = py.path.local.mkdtemp()
request.addfinalizer(lambda: d.remove(rec=1))
return d
@pytest.fixture(scope = 'session')
def sample_values():
... | 25.595745 | 94 | 0.655029 |
79735f813373204d8141dcb0631a32694265251f | 2,903 | py | Python | .env/lib/python2.7/site-packages/IPython/utils/tests/test_io.py | ViduraPrasangana/faster-rcnn-caffe | af6f5ee89c6e82d295bddd192d9dfcebd60d7c52 | [
"MIT"
] | 2 | 2017-11-24T12:44:30.000Z | 2020-04-11T17:28:43.000Z | .env/lib/python2.7/site-packages/IPython/utils/tests/test_io.py | ViduraPrasangana/faster-rcnn-caffe | af6f5ee89c6e82d295bddd192d9dfcebd60d7c52 | [
"MIT"
] | 6 | 2017-11-10T19:45:18.000Z | 2017-11-12T14:50:42.000Z | .env/lib/python2.7/site-packages/IPython/utils/tests/test_io.py | ViduraPrasangana/faster-rcnn-caffe | af6f5ee89c6e82d295bddd192d9dfcebd60d7c52 | [
"MIT"
] | 5 | 2018-05-19T05:08:51.000Z | 2021-04-29T16:03:45.000Z | # encoding: utf-8
"""Tests for io.py"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
from __future__ import absolute_import
import io as stdlib_io
import os.path
import stat
import sys
from subprocess import Popen, PIPE
im... | 28.460784 | 95 | 0.64485 |
797360c33625bee21ff85c091d17a53e18aec7d7 | 306 | py | Python | dictionaries/exercise/count_chars_in_a_string.py | PetkoAndreev/Python-fundamentals | dcf2ecb65d7a82a6688a7529a14eb8a331a83256 | [
"MIT"
] | null | null | null | dictionaries/exercise/count_chars_in_a_string.py | PetkoAndreev/Python-fundamentals | dcf2ecb65d7a82a6688a7529a14eb8a331a83256 | [
"MIT"
] | null | null | null | dictionaries/exercise/count_chars_in_a_string.py | PetkoAndreev/Python-fundamentals | dcf2ecb65d7a82a6688a7529a14eb8a331a83256 | [
"MIT"
] | null | null | null | input_data = input().split()
dict_res = {}
for el in input_data:
value = 1
for i in range(len(el)):
key = el[i]
if key not in dict_res:
dict_res[key] = value
else:
dict_res[key] += 1
for key, value in dict_res.items():
print(f'{key} -> {value}') | 23.538462 | 35 | 0.53268 |
797360fa1aa6e7a95f74a38a0b1bf7ded0306ce3 | 780 | py | Python | data2csv.py | InnocentK/ECE580-HW2 | 8fb2001551800e8be1e985c2b440305d9df1c26a | [
"MIT"
] | null | null | null | data2csv.py | InnocentK/ECE580-HW2 | 8fb2001551800e8be1e985c2b440305d9df1c26a | [
"MIT"
] | null | null | null | data2csv.py | InnocentK/ECE580-HW2 | 8fb2001551800e8be1e985c2b440305d9df1c26a | [
"MIT"
] | null | null | null | ## File: data2csv.py
## Date Created: 02/04/2019
## Author: Wambugu "Innocent" Kironji
## Class: ECE 580 - Introduction to Machine Learning
## Description:
## Converting a .data file that is comma delimited to a .csv
WINDOWS = "\\"
UNIX = "/"
OS = UNIX
DATASET = "." + OS + "auto_data" + OS + "imports-85.data"
# Load... | 22.941176 | 68 | 0.683333 |
797361062d9aed66a355e32bc7d6470b08b6bc97 | 807 | py | Python | goodgames/manage.py | mooshu1x2/goodgames | 346c996cf6b561fbcb36a8e6b4616fa0c16104db | [
"Apache-2.0"
] | null | null | null | goodgames/manage.py | mooshu1x2/goodgames | 346c996cf6b561fbcb36a8e6b4616fa0c16104db | [
"Apache-2.0"
] | 6 | 2020-02-12T00:20:09.000Z | 2021-06-10T19:59:04.000Z | goodgames/manage.py | michellebeard/goodgames | 346c996cf6b561fbcb36a8e6b4616fa0c16104db | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "goodgames.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that th... | 35.086957 | 77 | 0.643123 |
7973619f8db5a41f18ef42c83c4c5e5e013e7ff7 | 11,521 | py | Python | third_party/stylegan2_official_ops/misc.py | bytedance/Hammer | 388ed20b3d9b34f33f5357d75f8fe5d726782ec8 | [
"MIT"
] | 97 | 2022-02-08T09:00:57.000Z | 2022-03-23T05:33:35.000Z | third_party/stylegan2_official_ops/misc.py | bytedance/Hammer | 388ed20b3d9b34f33f5357d75f8fe5d726782ec8 | [
"MIT"
] | null | null | null | third_party/stylegan2_official_ops/misc.py | bytedance/Hammer | 388ed20b3d9b34f33f5357d75f8fe5d726782ec8 | [
"MIT"
] | 7 | 2022-02-08T15:13:02.000Z | 2022-03-19T19:11:13.000Z | # python3.7
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this sof... | 40.85461 | 133 | 0.61696 |
797363368e2b953af355ea9699c3b15861545056 | 1,342 | py | Python | tabtool/sagemaker.py | tiepvupsu/tabml-tool | b976dee3d646091534662691731d6b7200e5b072 | [
"Apache-2.0"
] | 2 | 2019-12-14T03:43:31.000Z | 2020-05-09T22:03:22.000Z | tabtool/sagemaker.py | tiepvupsu/tabml-tool | b976dee3d646091534662691731d6b7200e5b072 | [
"Apache-2.0"
] | null | null | null | tabtool/sagemaker.py | tiepvupsu/tabml-tool | b976dee3d646091534662691731d6b7200e5b072 | [
"Apache-2.0"
] | null | null | null | """Integration with Sagemaker"""
import nbformat
from tabtool import utils
from tabtool import colab
from tabtool import notebook
class Sagemaker(colab.Colab):
def __init__(self, config):
self._valid = config.sagemaker and config.sagemaker['github_repo']
self.config = config.sagemaker
self.... | 39.470588 | 97 | 0.620715 |
797363759ef48e8b80fc1998aba3702dc330ddaf | 3,930 | py | Python | employment/recruitment_status_report(rsr)/doctype/employee_resignation/employee_resignation.py | ran95a/employment | 7067f00dc3dafe0f4a51db6d45d179e6eac82434 | [
"MIT"
] | null | null | null | employment/recruitment_status_report(rsr)/doctype/employee_resignation/employee_resignation.py | ran95a/employment | 7067f00dc3dafe0f4a51db6d45d179e6eac82434 | [
"MIT"
] | null | null | null | employment/recruitment_status_report(rsr)/doctype/employee_resignation/employee_resignation.py | ran95a/employment | 7067f00dc3dafe0f4a51db6d45d179e6eac82434 | [
"MIT"
] | null | null | null | # -*- 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
from frappe import msgprint, _
#from qanawat_custom.human_resources.doctype.end... | 42.258065 | 155 | 0.634097 |
797364f642bbf28d2d644d8c00a5bc6cccd4867c | 1,128 | py | Python | source/scripts/python/example/source/example.py | lights0123/core | 85b4cf004280f64c144a7111236a03021e39fdf9 | [
"Apache-2.0"
] | 1 | 2021-03-12T11:07:19.000Z | 2021-03-12T11:07:19.000Z | source/scripts/python/example/source/example.py | lights0123/core | 85b4cf004280f64c144a7111236a03021e39fdf9 | [
"Apache-2.0"
] | null | null | null | source/scripts/python/example/source/example.py | lights0123/core | 85b4cf004280f64c144a7111236a03021e39fdf9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
def dont_load_this_function(left, right):
# This function will be loaded anyway because ducktype is supported now
result = left * right;
print(left, ' * ', right, ' = ', result);
return result;
def multiply(left: int, right: int) -> int:
result = left * right;
print(left, ' * ', right, ' ... | 23.020408 | 72 | 0.637411 |
7973661b674f70744ef7c8ef13ef30eb7b597f6c | 1,091 | py | Python | assignment1/assignment1_4/scripts/plot_throughput.py | GPuleri/contiki-ng | 5b82fe293b8241e0c4aea9b6387c7e7e1c1098fc | [
"BSD-3-Clause"
] | null | null | null | assignment1/assignment1_4/scripts/plot_throughput.py | GPuleri/contiki-ng | 5b82fe293b8241e0c4aea9b6387c7e7e1c1098fc | [
"BSD-3-Clause"
] | null | null | null | assignment1/assignment1_4/scripts/plot_throughput.py | GPuleri/contiki-ng | 5b82fe293b8241e0c4aea9b6387c7e7e1c1098fc | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import sys,os
try:
test,inFilename1,inFilename2,inFilename3,outFilename=sys.argv
except:
print("Please specify all the filenames(with extension)!")
exit(1)
#create a new figure
fig=plt.gcf()
#Read files csv
data1=pd.read_csv(inFilenam... | 23.212766 | 65 | 0.706691 |
79736621a40fea1b1aa24390b4a4505c236c4b72 | 17,679 | py | Python | main.py | fthdgn/calibre_plugin_kobo_bookmark_sync | b0c89eff27685a41d95bb40dcc101309b68d9f16 | [
"MIT"
] | null | null | null | main.py | fthdgn/calibre_plugin_kobo_bookmark_sync | b0c89eff27685a41d95bb40dcc101309b68d9f16 | [
"MIT"
] | null | null | null | main.py | fthdgn/calibre_plugin_kobo_bookmark_sync | b0c89eff27685a41d95bb40dcc101309b68d9f16 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import json
from calibre.gui2.actions import InterfaceAction
from calibre.gui2 import info_dialog
from calibre.gui2 import error_dialog
from calibre.gui2 import question_dialog
from contextlib import closing
from PyQt5.QtWidgets import Q... | 39.199557 | 119 | 0.563267 |
797367fe0ce4b5a3c75e18f9357670b80f5fd573 | 1,287 | py | Python | app/request.py | wikky2012/NewsPreview | 5799f684d6ca1fd77e9343010f5ca10b3bf4b5a1 | [
"MIT"
] | null | null | null | app/request.py | wikky2012/NewsPreview | 5799f684d6ca1fd77e9343010f5ca10b3bf4b5a1 | [
"MIT"
] | null | null | null | app/request.py | wikky2012/NewsPreview | 5799f684d6ca1fd77e9343010f5ca10b3bf4b5a1 | [
"MIT"
] | null | null | null | from app import app
import urllib.request,json
from .models import news
News = news.News
# Getting api key
api_key = app.config['NEWS_API_KEY']
# Getting the news base url
base_url = app.config["NEWS_API_BASE_URL"]
def get_news(category):
'''
Function that gets the json response to our url request
'''
... | 26.8125 | 85 | 0.677545 |
79736866e99d01e9e1fead486e3df12719e28da9 | 7,996 | py | Python | nimare/annotate/topic/lda.py | Julio-Yanes/NiMARE | 36bb05034041998519814b55fe402489147fdd63 | [
"MIT"
] | null | null | null | nimare/annotate/topic/lda.py | Julio-Yanes/NiMARE | 36bb05034041998519814b55fe402489147fdd63 | [
"MIT"
] | null | null | null | nimare/annotate/topic/lda.py | Julio-Yanes/NiMARE | 36bb05034041998519814b55fe402489147fdd63 | [
"MIT"
] | null | null | null | """
Topic modeling with latent Dirichlet allocation via MALLET.
"""
import os
import os.path as op
import shutil
import logging
import subprocess
import pandas as pd
from ...base import AnnotationModel
from ...utils import get_resource_path
from ...due import due
from ... import references
LGR = logging.getLogger(__... | 43.221622 | 89 | 0.567284 |
79736937e18904f371c26dcda4db9685bbfad40d | 15,474 | py | Python | backend/lk/views/screenshots.py | Purus/LaunchKitDocker | b8aaf9f1d8943a76ae7e0a81e15e6bebd4b9b08e | [
"Apache-2.0"
] | 2,341 | 2016-07-27T17:23:23.000Z | 2022-03-28T03:55:15.000Z | backend/lk/views/screenshots.py | Purus/LaunchKitDocker | b8aaf9f1d8943a76ae7e0a81e15e6bebd4b9b08e | [
"Apache-2.0"
] | 52 | 2016-07-27T23:12:21.000Z | 2022-03-11T23:17:41.000Z | backend/lk/views/screenshots.py | Purus/LaunchKitDocker | b8aaf9f1d8943a76ae7e0a81e15e6bebd4b9b08e | [
"Apache-2.0"
] | 324 | 2016-07-27T18:34:53.000Z | 2022-03-25T08:56:24.000Z | #
# Copyright 2016 Cluster Labs, 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 to in ... | 31.515275 | 133 | 0.741114 |
797369a22bcae1b63cdc5e2ee07e5d9e573e3553 | 1,106 | py | Python | 2021/day11.py | tobeannouncd/AdventOfCode | b4fe6e9b10a0dc191429a90ab351806df03bca10 | [
"MIT"
] | null | null | null | 2021/day11.py | tobeannouncd/AdventOfCode | b4fe6e9b10a0dc191429a90ab351806df03bca10 | [
"MIT"
] | null | null | null | 2021/day11.py | tobeannouncd/AdventOfCode | b4fe6e9b10a0dc191429a90ab351806df03bca10 | [
"MIT"
] | null | null | null | from itertools import product
import numpy as np
from advent import getData
data = getData(11)
d_array = np.array([[int(a) for a in line.strip()] for line in data])
def step(ar: np.ndarray) -> np.ndarray:
q = []
with np.nditer(ar, flags=['multi_index'], op_flags=['readwrite']) as it:
for val in it:... | 23.041667 | 76 | 0.537071 |
797369c98946813115ab0a980ab9595b43081aa6 | 507 | py | Python | apps/pos/migrations/0001_initial.py | gvizquel/pyerp | c859f7293cabd1003f79112463cee93ac89fccba | [
"MIT"
] | null | null | null | apps/pos/migrations/0001_initial.py | gvizquel/pyerp | c859f7293cabd1003f79112463cee93ac89fccba | [
"MIT"
] | 11 | 2020-06-05T22:50:37.000Z | 2022-02-10T09:05:56.000Z | apps/pos/migrations/0001_initial.py | gvizquel/pyerp | c859f7293cabd1003f79112463cee93ac89fccba | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-08-18 04:11
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='PyPos',
fields=[
('id', models.AutoField(au... | 23.045455 | 114 | 0.581854 |
79736a5d2d437b7d4d2091b58f2fa377e2bccfeb | 2,655 | py | Python | python/pynq/board/switch.py | AEW2015/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 16 | 2017-03-14T20:28:40.000Z | 2021-11-02T12:45:15.000Z | python/pynq/board/switch.py | xupsh/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 2 | 2017-12-04T05:46:35.000Z | 2018-11-30T21:40:45.000Z | python/pynq/board/switch.py | xupsh/PYNQ_PR_Overlay | 2c685d2d76d04e579beecdbdfd8d0919b3dfa71c | [
"BSD-3-Clause"
] | 8 | 2017-03-30T22:00:43.000Z | 2020-09-08T12:49:39.000Z | # Copyright (c) 2016, Xilinx, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of ... | 36.369863 | 79 | 0.668173 |
79736a97c0239a1512ee59ef38fc59d9ee6448a7 | 57 | py | Python | dataloader/commons.py | HKBU-HPML/FADNet-PP | 6e653e8f1fa0f55f10068f5592cbc8b49bb571e4 | [
"MIT"
] | null | null | null | dataloader/commons.py | HKBU-HPML/FADNet-PP | 6e653e8f1fa0f55f10068f5592cbc8b49bb571e4 | [
"MIT"
] | null | null | null | dataloader/commons.py | HKBU-HPML/FADNet-PP | 6e653e8f1fa0f55f10068f5592cbc8b49bb571e4 | [
"MIT"
] | null | null | null | normalize_method = 'imagenet' # 'imagenet' or 'instnorm'
| 28.5 | 56 | 0.736842 |
79736abbbb5aa5d745cb76e6f0b07eb8683498e5 | 4,578 | py | Python | lib/id3c/url.py | UWIT-IAM/uw-redcap-client | 38a1eb426fa80697446df7a466a41e0305382606 | [
"MIT"
] | 21 | 2019-04-19T22:45:22.000Z | 2022-01-28T01:32:09.000Z | lib/id3c/url.py | sonali-mhihim/id3c | 1e3967d6c24e9cadb34cae1c5e1e79415a2250dc | [
"MIT"
] | 219 | 2019-04-19T21:42:24.000Z | 2022-03-29T21:41:04.000Z | lib/id3c/url.py | sonali-mhihim/id3c | 1e3967d6c24e9cadb34cae1c5e1e79415a2250dc | [
"MIT"
] | 9 | 2020-03-11T20:07:26.000Z | 2022-03-05T00:36:11.000Z | """
URL handling.
"""
from copy import copy
from typing import List, Tuple, Union
from urllib.parse import urlsplit, SplitResult, urljoin
class Url(SplitResult):
"""
Parse and manipulate a URL string.
:py:class:`.Url` subclasses :py:class:`urllib.parse.SplitResult` to provide
additional attributes an... | 29.346154 | 83 | 0.542813 |
79736b83d5473cecd7893f666475e3462ef11beb | 3,615 | py | Python | biothings/hub/api/handlers/ws.py | ravila4/biothings.api | 7c03d9abc172fe54697af39d78b96711b2c590a1 | [
"Apache-2.0"
] | 30 | 2017-07-23T14:50:29.000Z | 2022-02-08T08:08:16.000Z | biothings/hub/api/handlers/ws.py | ravila4/biothings.api | 7c03d9abc172fe54697af39d78b96711b2c590a1 | [
"Apache-2.0"
] | 163 | 2017-10-24T18:45:40.000Z | 2022-03-28T03:46:26.000Z | biothings/hub/api/handlers/ws.py | ravila4/biothings.api | 7c03d9abc172fe54697af39d78b96711b2c590a1 | [
"Apache-2.0"
] | 22 | 2017-06-12T18:30:15.000Z | 2022-03-01T18:10:47.000Z | import logging
import asyncio
import json
from biothings.utils.hub_db import ChangeListener
import sockjs.tornado
class WebSocketConnection(sockjs.tornado.SockJSConnection):
"""
Listen to Hub DB through a listener object, and publish
events to any client connected
"""
clients = set()
def _... | 32.567568 | 90 | 0.609682 |
79736b97fcfcdd0f2f0d6a9ff73d9cc62801b853 | 26,320 | py | Python | tensorflow_probability/python/sts/fitting.py | ValentinMouret/probability | 7ea6cc55e5b3fed04372cd188cd0764e92fd3cf4 | [
"Apache-2.0"
] | 1 | 2018-12-13T12:36:09.000Z | 2018-12-13T12:36:09.000Z | tensorflow_probability/python/sts/fitting.py | ValentinMouret/probability | 7ea6cc55e5b3fed04372cd188cd0764e92fd3cf4 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/sts/fitting.py | ValentinMouret/probability | 7ea6cc55e5b3fed04372cd188cd0764e92fd3cf4 | [
"Apache-2.0"
] | 1 | 2020-07-04T21:37:20.000Z | 2020-07-04T21:37:20.000Z | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 45.223368 | 80 | 0.704445 |
79736bbc42d0a6df5ae2173fbae0fd9bf57b7361 | 174 | py | Python | Easy/Strings/python-string-split-and-join-English.py | fotisk07/Hacker-Rank-Python | 0f94302afe4104e48baacbc995d157da7fbc076a | [
"MIT"
] | 3 | 2020-09-23T15:13:18.000Z | 2021-12-21T07:36:22.000Z | Easy/Strings/python-string-split-and-join-English.py | fotisk07/Hacker-Rank-Python | 0f94302afe4104e48baacbc995d157da7fbc076a | [
"MIT"
] | null | null | null | Easy/Strings/python-string-split-and-join-English.py | fotisk07/Hacker-Rank-Python | 0f94302afe4104e48baacbc995d157da7fbc076a | [
"MIT"
] | 3 | 2018-12-04T19:33:42.000Z | 2021-04-05T15:57:29.000Z | def split_and_join(line):
line = line.split()
return "-".join(line)
if __name__ == '__main__':
line = input()
result = split_and_join(line)
print(result
| 19.333333 | 33 | 0.632184 |
79736c8951bb517ec7ae72bf7d7ac515a15a62c1 | 5,344 | py | Python | psana/psana/graphqt/H5VQWTree.py | slac-lcls/pdsdata2 | 6e2ad4f830cadfe29764dbd280fa57f8f9edc451 | [
"BSD-3-Clause-LBNL"
] | null | null | null | psana/psana/graphqt/H5VQWTree.py | slac-lcls/pdsdata2 | 6e2ad4f830cadfe29764dbd280fa57f8f9edc451 | [
"BSD-3-Clause-LBNL"
] | null | null | null | psana/psana/graphqt/H5VQWTree.py | slac-lcls/pdsdata2 | 6e2ad4f830cadfe29764dbd280fa57f8f9edc451 | [
"BSD-3-Clause-LBNL"
] | null | null | null |
"""Class :py:class:`QWTree` is a QTreeView->QWidget for tree model
===================================================================
Usage ::
# Run test: python lcls2/psana/psana/graphqt/QWTree.py
from psana.graphqt.QWTree import QWTree
w = QWTree()
Created on 2019-11-12 by Mikhail Dubrovin
"""
impo... | 30.022472 | 133 | 0.552208 |
79736cb538fce00c7b1a2a45c5163944d71dd9ce | 5,766 | py | Python | cocoeval.py | OSUPCVLab/VideoToTextDNN | a840172edf38e0a71d5e8feb130ab8f6c5eb19b6 | [
"MIT"
] | 24 | 2018-09-20T15:52:32.000Z | 2022-03-04T16:15:48.000Z | cocoeval.py | ShiYaya/VideoToTextDNN | d6dd64d7239c8525ec3d90fd5ead68cce3a45d24 | [
"MIT"
] | 3 | 2018-10-26T01:37:22.000Z | 2019-02-27T06:52:05.000Z | cocoeval.py | OSUPCVLab/VideoToTextDNN | a840172edf38e0a71d5e8feb130ab8f6c5eb19b6 | [
"MIT"
] | 3 | 2019-01-28T13:55:30.000Z | 2020-10-14T12:02:23.000Z | import sys
sys.path.insert(1,'coco-caption')
from pycocoevalcap.bleu.bleu import Bleu
from pycocoevalcap.rouge.rouge import Rouge
from pycocoevalcap.cider.cider import Cider
from pycocoevalcap.meteor.meteor import Meteor
from pycocoevalcap.tokenizer.ptbtokenizer import PTBTokenizer
import os, cPickle
class COCOScorer... | 40.605634 | 120 | 0.543358 |
79736d093e880893229a60e9307a39409319061b | 2,663 | py | Python | src/xr_pages/migrations/0020_sanitize_group_premissions.py | JulianAkkaya95/xr-web | f86bb8f00173c73350f7283fa22dcbdbf9660bd3 | [
"MIT"
] | 4 | 2019-03-28T20:49:59.000Z | 2019-08-11T19:31:35.000Z | src/xr_pages/migrations/0020_sanitize_group_premissions.py | JulianAkkaya95/xr-web | f86bb8f00173c73350f7283fa22dcbdbf9660bd3 | [
"MIT"
] | 4 | 2019-05-08T18:07:45.000Z | 2021-05-08T17:29:46.000Z | src/xr_pages/migrations/0020_sanitize_group_premissions.py | JulianAkkaya95/xr-web | f86bb8f00173c73350f7283fa22dcbdbf9660bd3 | [
"MIT"
] | 5 | 2019-03-28T20:50:15.000Z | 2020-01-17T21:16:57.000Z | # Generated by Django 2.1.7 on 2019-03-22 19:57
from django.db import migrations
def sanitize_group_permissions(apps, schema_editor):
Group = apps.get_model("auth.Group")
Permission = apps.get_model("auth.Permission")
ContentType = apps.get_model("contenttypes.ContentType")
GroupCollectionPermission ... | 37.507042 | 87 | 0.727751 |
79736d80e3d8e96c2b8319934f2f91ba386e2cb4 | 2,375 | py | Python | setup.py | frankhood/django-slug-model-mixin | 91a1a4ccbf14c923aa5854f2a81620a61f23cdf5 | [
"MIT"
] | null | null | null | setup.py | frankhood/django-slug-model-mixin | 91a1a4ccbf14c923aa5854f2a81620a61f23cdf5 | [
"MIT"
] | null | null | null | setup.py | frankhood/django-slug-model-mixin | 91a1a4ccbf14c923aa5854f2a81620a61f23cdf5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def get_version(*file_paths):
"""Retrieves the version from slug_model_mixin/__init__.py"""
filename = os.path.join(os.path.dirname(__fil... | 30.844156 | 91 | 0.630737 |
79736df7bed5ff42b85c3a68cacb711dd5485898 | 433 | py | Python | problems/UVA/10082 - WERTYU.py | jspw/Basic_Python | aa159f576a471c6deebdf1e5f462dfc9ffb4930b | [
"Unlicense"
] | 6 | 2020-06-25T14:52:09.000Z | 2021-08-05T20:54:15.000Z | problems/UVA/10082 - WERTYU.py | jspw/Basic_Python | aa159f576a471c6deebdf1e5f462dfc9ffb4930b | [
"Unlicense"
] | null | null | null | problems/UVA/10082 - WERTYU.py | jspw/Basic_Python | aa159f576a471c6deebdf1e5f462dfc9ffb4930b | [
"Unlicense"
] | null | null | null | l=['`','1','2','3','4','5','6','7','8','9','0','-','=','Q','W','E','R','T','Y','U','I','O','P','[',']','A','S','D','F','G','H','J','K','L',';',"'",'Z','X','C','V','B','N','M',',','.','/']
while(True):
x=[]
try:
s=input()
except EOFError:
break
for i in s:
if(i!=' '):
... | 24.055556 | 187 | 0.288684 |
79736e1ced0c90afc842ee03ad36ae36edeb6de5 | 38 | py | Python | control_block_diagram/components/blocks/custom_block/__init__.py | upb-lea/control-block-diagram | d1d8377d6ff8a60900580b654c975cc06ff2e564 | [
"MIT"
] | 4 | 2022-01-14T07:42:59.000Z | 2022-01-24T15:05:59.000Z | control_block_diagram/components/blocks/custom_block/__init__.py | upb-lea/control-block-diagram | d1d8377d6ff8a60900580b654c975cc06ff2e564 | [
"MIT"
] | null | null | null | control_block_diagram/components/blocks/custom_block/__init__.py | upb-lea/control-block-diagram | d1d8377d6ff8a60900580b654c975cc06ff2e564 | [
"MIT"
] | null | null | null | from .custom_block import CustomBlock
| 19 | 37 | 0.868421 |
79736ef030f2ace6ff8af67231fdee9c3baec10d | 4,863 | py | Python | ref/evaluate.py | 2030NLP/SpatialCognEval2021 | 85cbb9d0cbdd0bed4c581229f86b9c88d0d5abfb | [
"RSA-MD"
] | 35 | 2021-03-29T09:33:24.000Z | 2022-01-05T04:02:51.000Z | ref/evaluate.py | 2030NLP/SpatialCognEval2021 | 85cbb9d0cbdd0bed4c581229f86b9c88d0d5abfb | [
"RSA-MD"
] | null | null | null | ref/evaluate.py | 2030NLP/SpatialCognEval2021 | 85cbb9d0cbdd0bed4c581229f86b9c88d0d5abfb | [
"RSA-MD"
] | 8 | 2021-04-08T10:25:39.000Z | 2022-02-20T07:40:24.000Z | #!/usr/bin/python
# coding=utf-8
import json
def formatter(_data, _meta):
"""
将数据转换成用于提交和评分的格式。
:param _data:
参考数据集中 [x]-[set]-with-answer.json 文件的格式,
用参赛系统给 [x]-[dev/test].json 中读出的对象列表添加 judge1 或/和 judge2 字段,
然后直接将添加了答案字段的三个任务dev集(或test集)中的所有数据全都放在一个 List 里,构成此参数。
:param _meta: 参赛队伍的关键信... | 29.834356 | 125 | 0.535472 |
79736f014ce2c0efc1f5c618817191e710beb14a | 53 | py | Python | gpr4im/__init__.py | LBJ-Wade/gpr4im | c1ea849b4af7807cd3928b86b3692bd272e6f7d3 | [
"MIT"
] | 4 | 2021-05-28T01:35:16.000Z | 2022-03-10T10:16:43.000Z | gpr4im/__init__.py | LBJ-Wade/gpr4im | c1ea849b4af7807cd3928b86b3692bd272e6f7d3 | [
"MIT"
] | null | null | null | gpr4im/__init__.py | LBJ-Wade/gpr4im | c1ea849b4af7807cd3928b86b3692bd272e6f7d3 | [
"MIT"
] | 2 | 2021-05-28T07:22:04.000Z | 2021-07-11T10:08:25.000Z | __version__ = "1.0.1"
__author__ = "Paula S. Soares"
| 17.666667 | 30 | 0.679245 |
79737033c85f07b03a5ba55f9363c385fba8a0e8 | 3,153 | py | Python | src/alert/messenger.py | nlathia/sound-detection | 692d9cd6c9a2f321db7badb2f8401c88bca2695f | [
"MIT"
] | 1 | 2020-04-14T23:58:19.000Z | 2020-04-14T23:58:19.000Z | src/alert/messenger.py | nlathia/sound-detection | 692d9cd6c9a2f321db7badb2f8401c88bca2695f | [
"MIT"
] | null | null | null | src/alert/messenger.py | nlathia/sound-detection | 692d9cd6c9a2f321db7badb2f8401c88bca2695f | [
"MIT"
] | null | null | null | from datetime import datetime
from telegram import Bot
import requests
import tenacity
from tenacity import (
stop_after_attempt,
wait_exponential,
)
import os
from src.util.audio import convert_to_mp3
from src.util.vars import (
TELEGRAM_BOT_TOKEN,
TELEGRAM_ID,
TELEGRAM_INTERVAL_SECONDS,
logge... | 39.4125 | 99 | 0.647003 |
797371c4e5e0de83cd7a6d1274bae721c0daf6a8 | 1,333 | py | Python | steps/package/nsis.py | flipcoder/siege-tools | df8a9fa5a4a6f2bcce4789cebe17b0c4dd3f7e60 | [
"MIT"
] | 6 | 2015-08-14T15:26:38.000Z | 2019-11-14T01:08:31.000Z | steps/package/nsis.py | flipcoder/siege-tools | df8a9fa5a4a6f2bcce4789cebe17b0c4dd3f7e60 | [
"MIT"
] | null | null | null | steps/package/nsis.py | flipcoder/siege-tools | df8a9fa5a4a6f2bcce4789cebe17b0c4dd3f7e60 | [
"MIT"
] | 1 | 2019-05-10T04:52:40.000Z | 2019-05-10T04:52:40.000Z | import os
import platform
import sgmake
import subprocess
from common import Status
from common import Settings
from common import Support
from common import call
def package(project):
wine = False if platform.system() == "Windows" else True
if wine:
try:
call(["makensis", project.nsi_file... | 26.66 | 97 | 0.616654 |
797372267c2666f3eeb9bc033a338b237b429efe | 741 | py | Python | .history/discordbot_20210613232210.py | kazn777/kazn_bot-1 | 8d3c0b33ad222f8bb1cea93b5a6bdef80de4d608 | [
"MIT"
] | null | null | null | .history/discordbot_20210613232210.py | kazn777/kazn_bot-1 | 8d3c0b33ad222f8bb1cea93b5a6bdef80de4d608 | [
"MIT"
] | null | null | null | .history/discordbot_20210613232210.py | kazn777/kazn_bot-1 | 8d3c0b33ad222f8bb1cea93b5a6bdef80de4d608 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from discord.ext.commands import Bot
import os
import traceback
bot = commands.Bot(command_prefix='/')
token = os.environ['DISCORD_BOT_TOKEN']
@bot.event
async def on_command_error(ctx, error):
orig_error = getattr(error, "original", error)
error_msg = ''.join... | 28.5 | 162 | 0.753036 |
79737305acde9cec86a8aa9db6acc58d53d35fd7 | 32,750 | py | Python | python/ray/data/dataset_pipeline.py | kennethlien/ray | 2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45 | [
"Apache-2.0"
] | null | null | null | python/ray/data/dataset_pipeline.py | kennethlien/ray | 2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45 | [
"Apache-2.0"
] | null | null | null | python/ray/data/dataset_pipeline.py | kennethlien/ray | 2916c2c3d29f2f7e4bf53872d5ac8c5d866b0e45 | [
"Apache-2.0"
] | null | null | null | import inspect
import itertools
import logging
import time
from typing import (
Any,
Callable,
List,
Iterator,
Iterable,
Generic,
Union,
Optional,
TYPE_CHECKING,
)
import ray
from ray.data.context import DatasetContext
from ray.data.dataset import Dataset, T, U
from ray.data.impl.pi... | 37.047511 | 88 | 0.57313 |
7973730ef177cd600aaf4baebe1b40a81ed1b085 | 270 | py | Python | x.py | Eric-Arellano/rust | 0f6f2d681b39c5f95459cd09cb936b6ceb27cd82 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 518 | 2015-08-13T08:50:23.000Z | 2020-07-23T19:52:51.000Z | x.py | Eric-Arellano/rust | 0f6f2d681b39c5f95459cd09cb936b6ceb27cd82 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 157 | 2015-08-09T12:52:55.000Z | 2020-07-19T20:02:52.000Z | x.py | Eric-Arellano/rust | 0f6f2d681b39c5f95459cd09cb936b6ceb27cd82 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 29 | 2015-09-06T00:03:53.000Z | 2020-04-05T10:05:38.000Z | #!/usr/bin/env python
# This file is only a "symlink" to bootstrap.py, all logic should go there.
import os
import sys
rust_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(rust_dir, "src", "bootstrap"))
import bootstrap
bootstrap.main()
| 22.5 | 75 | 0.744444 |
79737328fbfef151672535e605680c66bf80e91a | 7,178 | py | Python | engine/SCons/compat/__init__.py | cctbx/scons | 9eb46f7e2a965e1041e5b1a6bc941c1e97bceb00 | [
"MIT"
] | 1 | 2020-05-28T17:50:54.000Z | 2020-05-28T17:50:54.000Z | engine/SCons/compat/__init__.py | cctbx/scons | 9eb46f7e2a965e1041e5b1a6bc941c1e97bceb00 | [
"MIT"
] | 4 | 2018-07-24T05:46:04.000Z | 2018-08-07T06:10:45.000Z | engine/SCons/compat/__init__.py | cctbx/scons | 9eb46f7e2a965e1041e5b1a6bc941c1e97bceb00 | [
"MIT"
] | 1 | 2018-07-23T10:34:27.000Z | 2018-07-23T10:34:27.000Z | #
# Copyright (c) 2001 - 2017 The SCons Foundation
#
# 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... | 33.699531 | 109 | 0.73586 |
79737451952f342a1b92eef45ef69ff4de1d4ab8 | 8,936 | py | Python | src/generate_structure.py | JDonini/Stacking-Audio-Tagging | a827a803dc140138d7a24ffc6fc8eda21672703e | [
"MIT"
] | 1 | 2018-12-14T18:16:24.000Z | 2018-12-14T18:16:24.000Z | src/generate_structure.py | JDonini/Stacking-Audio-Tagging | a827a803dc140138d7a24ffc6fc8eda21672703e | [
"MIT"
] | 4 | 2019-01-21T02:00:09.000Z | 2019-01-21T13:12:31.000Z | src/generate_structure.py | JDonini/Stacking-Audio-Tagging | a827a803dc140138d7a24ffc6fc8eda21672703e | [
"MIT"
] | null | null | null | import os
import sys
sys.path.append('config')
from config_project import FIG_SIZE, FIG_SIZE_AUTOENCODERS
fig_size = '/' + str(FIG_SIZE).replace('.', '').replace(',', '-').replace('(', '').replace(')', '').replace(' ', '')
fig_size_autoencoders = '/' + str(FIG_SIZE_AUTOENCODERS).replace('.', '').replace(',', '-').repl... | 46.300518 | 142 | 0.751119 |
7973749973cc32b88c05e894a9a0dbfa47001e8c | 471 | py | Python | scd/scd_app/migrations/0003_auto_20151025_2136.py | felipetomm/POX-Django | 6060a9e2a999dc56b63826d0ec3498b11b03adce | [
"Apache-2.0"
] | 1 | 2019-10-20T00:05:34.000Z | 2019-10-20T00:05:34.000Z | scd/scd_app/migrations/0003_auto_20151025_2136.py | felipetomm/POX-Django | 6060a9e2a999dc56b63826d0ec3498b11b03adce | [
"Apache-2.0"
] | null | null | null | scd/scd_app/migrations/0003_auto_20151025_2136.py | felipetomm/POX-Django | 6060a9e2a999dc56b63826d0ec3498b11b03adce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('scd_app', '0002_auto_20151025_2057'),
]
operations = [
migrations.DeleteModel(
name='ScdComutador',
),
... | 19.625 | 47 | 0.573248 |
79737539ad84999e9634f2a89c8a8407457b0847 | 1,907 | py | Python | pages/home.py | tekeburak/dam-occupancy-model | f39d436bf27088068177245f0180cafaa56ad123 | [
"MIT"
] | 8 | 2021-01-24T14:56:23.000Z | 2021-03-26T18:10:33.000Z | pages/home.py | tekeburak/dam-occupancy-model | f39d436bf27088068177245f0180cafaa56ad123 | [
"MIT"
] | null | null | null | pages/home.py | tekeburak/dam-occupancy-model | f39d436bf27088068177245f0180cafaa56ad123 | [
"MIT"
] | 6 | 2021-01-24T14:44:49.000Z | 2021-03-21T17:50:30.000Z | import streamlit as st
import numpy as np
import pandas as pd
import pickle
import streamlit.components.v1 as components
from PIL import Image
def app():
st.title('Dam Occupancy Rate Forecasting')
image = Image.open('images/istanbul.jpg')
st.image(image,width=600)
st.subheader('Our Project Purpose')
st.markdown... | 50.184211 | 409 | 0.76193 |
7973753f38004d80029eb225d59a7ee06c64ec77 | 3,664 | py | Python | lib/data_utils.py | students-using-ai-for-good/people-matcher | 5d247f9cf32d59c8d629a5be4bf998fa3a96c9aa | [
"MIT"
] | 1 | 2020-06-20T05:38:50.000Z | 2020-06-20T05:38:50.000Z | lib/data_utils.py | students-using-ai-for-good/people-matcher | 5d247f9cf32d59c8d629a5be4bf998fa3a96c9aa | [
"MIT"
] | null | null | null | lib/data_utils.py | students-using-ai-for-good/people-matcher | 5d247f9cf32d59c8d629a5be4bf998fa3a96c9aa | [
"MIT"
] | 1 | 2020-11-08T04:04:33.000Z | 2020-11-08T04:04:33.000Z | import base64
import io
import numpy as np
import pandas as pd
import re
from lib import tasks
def find_name_column(df):
for c in df.columns:
if re.search(r"name", c, re.I):
return c
def find_firstname_column(df):
for c in df.columns:
if re.search(r"name", c, re.I) and re.search... | 28.403101 | 103 | 0.464793 |
797375520f7d30858a346a68004bf808f3738050 | 3,625 | py | Python | Supermicro/benchmarks/ssd/implementations/mxnet_j2/ssd/pretrain.py | jqueguiner/training_results_v1.0 | 8200377f425ae24b6ed6c2816b9273aab0996d43 | [
"Apache-2.0"
] | 27 | 2021-07-01T00:34:52.000Z | 2022-03-29T08:49:53.000Z | Supermicro/benchmarks/ssd/implementations/mxnet_j2/ssd/pretrain.py | jqueguiner/training_results_v1.0 | 8200377f425ae24b6ed6c2816b9273aab0996d43 | [
"Apache-2.0"
] | 21 | 2021-08-31T08:34:50.000Z | 2022-03-17T11:42:10.000Z | Supermicro/benchmarks/ssd/implementations/mxnet_j2/ssd/pretrain.py | jqueguiner/training_results_v1.0 | 8200377f425ae24b6ed6c2816b9273aab0996d43 | [
"Apache-2.0"
] | 39 | 2021-07-02T00:46:14.000Z | 2022-03-13T16:59:55.000Z | import pickle
import numpy as np
import re
SSD_LAYERS = ['expand_trans_conv', 'expand_conv'] # Layers that are not part of the backbone
BATCHNORM_PARAMS = ['beta', 'gamma', 'running_mean', 'running_var']
BATCHNORM2_PARAMS = ['beta2', 'gamma2', 'running_mean2', 'running_var2']
def pretrain_backbone(param_dict,
... | 52.536232 | 113 | 0.647172 |
7973766113469a985639c454d3a90e002fa89b6d | 1,975 | py | Python | setup.py | zechamkank/ChatterBot | 1eaa0a9e9077c72f12eb9b66b5829736be033084 | [
"BSD-3-Clause"
] | 3 | 2020-12-21T20:00:49.000Z | 2021-09-27T03:52:51.000Z | setup.py | zechamkank/ChatterBot | 1eaa0a9e9077c72f12eb9b66b5829736be033084 | [
"BSD-3-Clause"
] | null | null | null | setup.py | zechamkank/ChatterBot | 1eaa0a9e9077c72f12eb9b66b5829736be033084 | [
"BSD-3-Clause"
] | 2 | 2020-04-26T13:43:57.000Z | 2021-03-15T23:26:33.000Z | #!/usr/bin/env python
from setuptools import setup
# Dynamically retrieve the version information from the chatterbot module
version = __import__('chatterbot').__version__
author = __import__('chatterbot').__author__
author_email = __import__('chatterbot').__email__
req = open('requirements.txt')
requirements = req... | 31.854839 | 73 | 0.642532 |
7973766eb03520b04454733d5485419254b2c888 | 20,976 | py | Python | test/integration/component/test_templates.py | likitha/cloudstack | 896f6b1e5e2b23958886899334b09e71ffe38e6f | [
"Apache-2.0"
] | null | null | null | test/integration/component/test_templates.py | likitha/cloudstack | 896f6b1e5e2b23958886899334b09e71ffe38e6f | [
"Apache-2.0"
] | null | null | null | test/integration/component/test_templates.py | likitha/cloudstack | 896f6b1e5e2b23958886899334b09e71ffe38e6f | [
"Apache-2.0"
] | 2 | 2017-07-07T21:45:38.000Z | 2019-10-12T06:45:11.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.671074 | 103 | 0.557733 |
79737985928fbd2eab2fa4d6a15b1728c40ecbc6 | 2,049 | py | Python | test/drivers/gaussiand/test_driver_gaussian_from_mat.py | divshacker/qiskit-nature | 08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb | [
"Apache-2.0"
] | 132 | 2021-01-28T14:51:11.000Z | 2022-03-25T21:10:47.000Z | test/drivers/gaussiand/test_driver_gaussian_from_mat.py | divshacker/qiskit-nature | 08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb | [
"Apache-2.0"
] | 449 | 2021-01-28T19:57:43.000Z | 2022-03-31T17:01:50.000Z | test/drivers/gaussiand/test_driver_gaussian_from_mat.py | divshacker/qiskit-nature | 08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb | [
"Apache-2.0"
] | 109 | 2021-01-28T13:17:46.000Z | 2022-03-30T23:53:39.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 35.947368 | 88 | 0.726696 |
79737ad32427002c9fa96b7ea50cfede582bc9f5 | 2,340 | py | Python | ffi/python/tests/test_read_data_record.py | Wave-View-Imaging/citi | 82e99760489f02a9ad311b9bf178d0995e7926ea | [
"CNRI-Python"
] | null | null | null | ffi/python/tests/test_read_data_record.py | Wave-View-Imaging/citi | 82e99760489f02a9ad311b9bf178d0995e7926ea | [
"CNRI-Python"
] | 9 | 2021-05-12T15:30:00.000Z | 2022-03-17T19:53:46.000Z | ffi/python/tests/test_read_data_record.py | Wave-View-Imaging/citi | 82e99760489f02a9ad311b9bf178d0995e7926ea | [
"CNRI-Python"
] | null | null | null | import unittest
import os
from pathlib import Path
from citi import Record
import numpy.testing as npt
import numpy as np
class TestReadDataRecord(unittest.TestCase):
@staticmethod
def __get_display_memory_filename() -> str:
relative_path = os.path.join('.', '..', '..', '..')
this_dir = os.pa... | 33.428571 | 69 | 0.594872 |
79737b5baa9f51c98a9ef83cc1c3824a9a142926 | 4,837 | py | Python | corehq/ex-submodules/fluff/tests/test_alembic_diffs.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | corehq/ex-submodules/fluff/tests/test_alembic_diffs.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | corehq/ex-submodules/fluff/tests/test_alembic_diffs.py | rochakchauhan/commcare-hq | aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236 | [
"BSD-3-Clause"
] | null | null | null | import uuid
import sqlalchemy
from alembic.autogenerate import compare_metadata
from django.test.testcases import TestCase, SimpleTestCase
from nose.tools import assert_list_equal
from corehq.sql_db.connections import connection_manager
from fluff.signals import (
get_migration_context, reformat_alembic_diffs,
... | 39.325203 | 109 | 0.667356 |
79737b97c590465c2fa32ee392061c43959af829 | 3,301 | py | Python | fmovies/settings.py | pieromarini/fmovies | 26b9a033db8b6eea7de281b96679b47dc15e303f | [
"MIT"
] | 12 | 2016-11-25T02:06:34.000Z | 2020-12-31T11:17:56.000Z | fmovies/settings.py | pieromarini/fmovies | 26b9a033db8b6eea7de281b96679b47dc15e303f | [
"MIT"
] | 1 | 2016-11-24T16:30:15.000Z | 2017-08-24T17:44:09.000Z | fmovies/settings.py | pieromarini/fmovies | 26b9a033db8b6eea7de281b96679b47dc15e303f | [
"MIT"
] | 4 | 2016-11-25T19:09:32.000Z | 2020-05-08T19:46:59.000Z | """
Django settings for fmovies project.
Generated by 'django-admin startproject' using Django 1.10.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os... | 26.198413 | 91 | 0.700091 |
79737c1d7d966ecb34f0c9cc8dc0c12183832844 | 13,765 | py | Python | pyzoo/zoo/orca/data/ray_xshards.py | beta21s/analytics-zoo | 84bec17f356fac16a0fd74b334cb5ff1016ba6b3 | [
"Apache-2.0"
] | null | null | null | pyzoo/zoo/orca/data/ray_xshards.py | beta21s/analytics-zoo | 84bec17f356fac16a0fd74b334cb5ff1016ba6b3 | [
"Apache-2.0"
] | null | null | null | pyzoo/zoo/orca/data/ray_xshards.py | beta21s/analytics-zoo | 84bec17f356fac16a0fd74b334cb5ff1016ba6b3 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 41.712121 | 100 | 0.642572 |
79737c8abc304ba304ef59d74f5baedcf7de2c71 | 170 | py | Python | res/TensorFlowPythonExamples/examples/ceil/__init__.py | glistening/ONE-1 | cadf3a4da4f4340081862abbd3900af7c4b0e22d | [
"Apache-2.0"
] | null | null | null | res/TensorFlowPythonExamples/examples/ceil/__init__.py | glistening/ONE-1 | cadf3a4da4f4340081862abbd3900af7c4b0e22d | [
"Apache-2.0"
] | null | null | null | res/TensorFlowPythonExamples/examples/ceil/__init__.py | glistening/ONE-1 | cadf3a4da4f4340081862abbd3900af7c4b0e22d | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
tf.compat.v1.disable_eager_execution()
in_ = tf.compat.v1.placeholder(dtype=tf.float32, shape=(1, 1), name="Hole")
op_ = tf.compat.v1.ceil(in_)
| 24.285714 | 75 | 0.741176 |
79737d4441f8cf0b81c07e476de7451f87ebac6e | 8,307 | py | Python | rcsb/utils/multiproc/MultiProcLogging.py | rcsb/py-rcsb_utils_multiproc | 824e2228dd3b258a9cd325093d044fa1a17dcdf2 | [
"Apache-2.0"
] | null | null | null | rcsb/utils/multiproc/MultiProcLogging.py | rcsb/py-rcsb_utils_multiproc | 824e2228dd3b258a9cd325093d044fa1a17dcdf2 | [
"Apache-2.0"
] | null | null | null | rcsb/utils/multiproc/MultiProcLogging.py | rcsb/py-rcsb_utils_multiproc | 824e2228dd3b258a9cd325093d044fa1a17dcdf2 | [
"Apache-2.0"
] | 3 | 2020-12-03T17:36:08.000Z | 2020-12-03T17:36:20.000Z | ##
# File: MultiProcLogging.py
# Author: jdw
# Date: 6-Apr-2018
# Version: 0.001
#
# Updates:
#
##
"""
Multiprocessing logging queue handler and listener.
"""
__docformat__ = "restructuredtext en"
__author__ = "John Westbrook"
__email__ = "jwest@rcsb.rutgers.edu"
__license__ = "Apache 2.0"
# pylint: skip-file... | 30.317518 | 114 | 0.608523 |
79737eb04bd2d9c05d876271937d05b52647a67f | 9,026 | py | Python | paddlers/models/ppseg/models/dnlnet.py | Xiaracto/PaddleRS | 6e9b99a79fe740775daff310bd1ca3e6fbc86f80 | [
"Apache-2.0"
] | 1 | 2022-03-30T10:59:58.000Z | 2022-03-30T10:59:58.000Z | paddlers/models/ppseg/models/dnlnet.py | wondering516/PaddleRS | b6f7033f3c0ca7bc6952456c0a0f53eef6c1c07f | [
"Apache-2.0"
] | null | null | null | paddlers/models/ppseg/models/dnlnet.py | wondering516/PaddleRS | b6f7033f3c0ca7bc6952456c0a0f53eef6c1c07f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 39.762115 | 117 | 0.608132 |
79737f1f0bbc7f549c35c8df52ffa6469005ed0f | 1,001 | py | Python | tutorial/opencv-tutorial/image-arithmetics-logic.py | zixia/python-facenet | d86e0c49a9ce413bef6e58a19a9f723aadcef968 | [
"MIT"
] | 4 | 2018-06-11T03:02:49.000Z | 2018-07-11T07:18:52.000Z | tutorial/opencv-tutorial/image-arithmetics-logic.py | zixia/python-facenet | d86e0c49a9ce413bef6e58a19a9f723aadcef968 | [
"MIT"
] | null | null | null | tutorial/opencv-tutorial/image-arithmetics-logic.py | zixia/python-facenet | d86e0c49a9ce413bef6e58a19a9f723aadcef968 | [
"MIT"
] | 2 | 2017-08-31T05:35:36.000Z | 2018-10-11T16:42:15.000Z | """
https://pythonprogramming.net/image-arithmetics-logic-python-opencv-tutorial/?completed=/image-operations-python-opencv-tutorial/
"""
import cv2
def demo1():
""" 1
"""
# add = cv2.add(img1, img2)
# cv2.imshow('add', add)
weighted = cv2.addWeighted(img1, 0.6, img2, 0.4, 0)
cv2.imshow('we... | 20.854167 | 129 | 0.644356 |
7973800e6026867b644b81fac1a74cbdafa544e9 | 548 | py | Python | setup.py | domingoesteban/robolearn | 0d20125425c352b80ef2eeed1c0b11ab6497b11a | [
"BSD-3-Clause"
] | 1 | 2020-01-13T09:44:22.000Z | 2020-01-13T09:44:22.000Z | setup.py | domingoesteban/robolearn | 0d20125425c352b80ef2eeed1c0b11ab6497b11a | [
"BSD-3-Clause"
] | null | null | null | setup.py | domingoesteban/robolearn | 0d20125425c352b80ef2eeed1c0b11ab6497b11a | [
"BSD-3-Clause"
] | 1 | 2021-12-22T00:41:20.000Z | 2021-12-22T00:41:20.000Z | # setup.py
from setuptools import setup
setup(
name='robolearn',
version='0.2.0',
description='A Robot-Learning package: Robot reinforcement learning.',
maintainer="Domingo Esteban",
maintainer_email="domingo.esteban@iit.it",
packages=['robolearn'],
install_requires=[
'gym',
... | 21.076923 | 74 | 0.558394 |
797380580907c6e28ee261c240cd7dd079375aae | 4,343 | py | Python | gridlod/pglod.py | bayonet222/gridlod | 0a5390cee139a1664a5437b635c8e0ccf576da77 | [
"MIT"
] | null | null | null | gridlod/pglod.py | bayonet222/gridlod | 0a5390cee139a1664a5437b635c8e0ccf576da77 | [
"MIT"
] | null | null | null | gridlod/pglod.py | bayonet222/gridlod | 0a5390cee139a1664a5437b635c8e0ccf576da77 | [
"MIT"
] | 2 | 2019-10-19T16:00:16.000Z | 2019-10-25T10:40:27.000Z | import numpy as np
import scipy.sparse as sparse
from copy import deepcopy
from . import util
from . import fem
def assembleBasisCorrectors(world, patchT, basisCorrectorsListT):
'''Compute the basis correctors given the elementwise basis
correctors for each coarse element.
'''
NWorldCoarse = world.NW... | 30.584507 | 102 | 0.690306 |
797380a64b003028b6f1254ab5064084642710d3 | 1,912 | py | Python | 3-web_server/web_server.py | ccooper21/nap-apr-2019 | fd1ff40937dbdf470057546ff3d5cd0489600e59 | [
"MIT"
] | 1 | 2019-04-28T13:43:47.000Z | 2019-04-28T13:43:47.000Z | 3-web_server/web_server.py | ccooper21/nap-apr-2019 | fd1ff40937dbdf470057546ff3d5cd0489600e59 | [
"MIT"
] | null | null | null | 3-web_server/web_server.py | ccooper21/nap-apr-2019 | fd1ff40937dbdf470057546ff3d5cd0489600e59 | [
"MIT"
] | null | null | null | # Complete project details at https://RandomNerdTutorials.com
import network
from machine import Pin
import usocket as socket
sta_if = network.WLAN(network.STA_IF)
while sta_if.isconnected() == False:
pass
print('Connection successful')
print(sta_if.ifconfig())
led = Pin(14, Pin.OUT)
def web_page():
if led... | 34.142857 | 132 | 0.638598 |
797380b4b9b4534de4aa95ea3a9a6438a4bcdb1c | 4,704 | py | Python | client_bounding_boxes.py | yeshas1994/carla-dataset-runner | c781b9d2b5cd748d062f775b65a86b5d569c8e64 | [
"MIT"
] | 48 | 2019-12-28T11:08:27.000Z | 2022-03-24T09:22:51.000Z | client_bounding_boxes.py | yeshas1994/carla-dataset-runner | c781b9d2b5cd748d062f775b65a86b5d569c8e64 | [
"MIT"
] | 6 | 2020-02-01T21:47:21.000Z | 2021-12-10T13:19:41.000Z | client_bounding_boxes.py | yeshas1994/carla-dataset-runner | c781b9d2b5cd748d062f775b65a86b5d569c8e64 | [
"MIT"
] | 19 | 2020-01-08T08:19:08.000Z | 2022-03-24T08:39:53.000Z | import os
import sys
import settings
sys.path.append(settings.CARLA_EGG_PATH)
import carla
import numpy as np
# ==============================================================================
# -- ClientSideBoundingBoxes ---------------------------------------------------
# =============================================... | 38.876033 | 108 | 0.597364 |
797380cb75c391b1527a841d036236ddc46e4b17 | 5,228 | py | Python | Pyrado/pyrado/algorithms/stopping_criteria/predefined_criteria.py | theogruner/SimuRLacra | 4893514ccdeb10a736c55de9aa7753fd51c5afec | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | 52 | 2020-05-02T13:55:09.000Z | 2022-03-09T14:49:36.000Z | Pyrado/pyrado/algorithms/stopping_criteria/predefined_criteria.py | theogruner/SimuRLacra | 4893514ccdeb10a736c55de9aa7753fd51c5afec | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | 40 | 2020-09-01T15:19:22.000Z | 2021-11-02T14:51:41.000Z | Pyrado/pyrado/algorithms/stopping_criteria/predefined_criteria.py | theogruner/SimuRLacra | 4893514ccdeb10a736c55de9aa7753fd51c5afec | [
"DOC",
"Zlib",
"BSD-3-Clause"
] | 13 | 2020-07-03T11:39:21.000Z | 2022-02-20T01:12:42.000Z | # Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and
# Technical University of Darmstadt.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source ... | 35.324324 | 119 | 0.691469 |
7973810449454e04b7bb9a6986da4174a276d68a | 1,028 | py | Python | python/mesh/generic/command.py | sqf-ice/meshNetwork | 3214f3e0fabe70e3e0e0d82926e0510a392a3352 | [
"NASA-1.3"
] | null | null | null | python/mesh/generic/command.py | sqf-ice/meshNetwork | 3214f3e0fabe70e3e0e0d82926e0510a392a3352 | [
"NASA-1.3"
] | null | null | null | python/mesh/generic/command.py | sqf-ice/meshNetwork | 3214f3e0fabe70e3e0e0d82926e0510a392a3352 | [
"NASA-1.3"
] | 1 | 2021-06-26T06:40:19.000Z | 2021-06-26T06:40:19.000Z | from struct import pack
from mesh.generic.nodeHeader import headers, createHeader, packHeader
from mesh.generic.cmdDict import CmdDict
class Command(object):
def __init__(self, cmdId, cmdData, header=[], txInterval=[], lastTxTime=0.0):
self.cmdId = cmdId
self.cmdData = cmdData
if header: # ... | 36.714286 | 112 | 0.671206 |
7973811b7d4c499861b4bd6ca71b88019b3fe274 | 1,279 | py | Python | RecoMuon/Configuration/python/SETRecoMuon_cff.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | RecoMuon/Configuration/python/SETRecoMuon_cff.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 26 | 2018-10-30T12:47:58.000Z | 2022-03-29T08:39:00.000Z | RecoMuon/Configuration/python/SETRecoMuon_cff.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
from RecoMuon.MuonSeedGenerator.SETMuonSeed_cff import *
from RecoMuon.StandAloneMuonProducer.standAloneMuons_cff import standAloneSETMuons
from RecoMuon.GlobalMuonProducer.GlobalMuonProducer_cff import *
globalSETMuons = globalMuons.clone()
globalSETMuons.MuonCollectionLabel... | 53.291667 | 124 | 0.853792 |
797381d5eb15110fff84b352c939523c2067e480 | 1,088 | py | Python | tests/test_200.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | tests/test_200.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | tests/test_200.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pytest
"""
Test 200. Number of Islands
"""
@pytest.fixture(scope="session")
def init_variables_200():
from src.leetcode_200_number_of_islands import Solution
solution = Solution()
def _init_variables_200():
return solution
yield _init_variables_200
class Tes... | 22.666667 | 59 | 0.394301 |
797381d64a1b6f30effc28380c8592995e9c8b1c | 1,451 | py | Python | python_challenges/tests/test_generate_pandigital.py | bruckhaus/challenges | c53d13fa89bd5ac0436310a6cfe82cfc3b2d122f | [
"MIT"
] | 1 | 2015-09-28T18:05:39.000Z | 2015-09-28T18:05:39.000Z | python_challenges/tests/test_generate_pandigital.py | bruckhaus/challenges | c53d13fa89bd5ac0436310a6cfe82cfc3b2d122f | [
"MIT"
] | null | null | null | python_challenges/tests/test_generate_pandigital.py | bruckhaus/challenges | c53d13fa89bd5ac0436310a6cfe82cfc3b2d122f | [
"MIT"
] | 2 | 2016-09-21T00:42:51.000Z | 2017-11-28T19:56:00.000Z | from unittest import TestCase
from generate_pandigitals import GeneratePandigital
class TestPandigital(TestCase):
def test_get_digit_numbers(self):
self.assertEquals([1], GeneratePandigital.generate_pandigitals(1))
self.assertEquals([12, 21], GeneratePandigital.generate_pandigitals(2))
se... | 60.458333 | 106 | 0.687112 |
797381f020aaadf38651b786800487521aaa86db | 3,234 | py | Python | mnist/data/keras_generators.py | jmaces/rde | d71169d697c322695901653fedd2ccf97413f018 | [
"MIT"
] | 1 | 2021-11-22T18:41:12.000Z | 2021-11-22T18:41:12.000Z | mnist/data/keras_generators.py | jmaces/rde | d71169d697c322695901653fedd2ccf97413f018 | [
"MIT"
] | 1 | 2021-11-19T15:26:13.000Z | 2021-11-22T15:56:59.000Z | mnist/data/keras_generators.py | jmaces/rde | d71169d697c322695901653fedd2ccf97413f018 | [
"MIT"
] | null | null | null | import os
from tensorflow.keras import backend as K
from tensorflow.keras.preprocessing.image import ImageDataGenerator
# default parameters
if K.image_data_format() == "channels_first":
INPUT_SHAPE = (1, 28, 28)
IMAGE_SHAPE = INPUT_SHAPE[1:]
else:
INPUT_SHAPE = (28, 28, 1)
IMAGE_SHAPE = INPUT_SHAPE[... | 27.40678 | 67 | 0.693259 |
7973825578dd501ad3d4f3630cd49377288280d4 | 7,174 | py | Python | bioc/biocxml/encoder.py | datummd/bioc | b73531468ae73c876a700ecf9d678e084a16d07d | [
"BSD-3-Clause"
] | 10 | 2017-03-20T16:13:11.000Z | 2021-02-01T07:56:39.000Z | bioc/biocxml/encoder.py | datummd/bioc | b73531468ae73c876a700ecf9d678e084a16d07d | [
"BSD-3-Clause"
] | 4 | 2018-12-03T20:49:59.000Z | 2020-06-15T19:31:19.000Z | bioc/biocxml/encoder.py | datummd/bioc | b73531468ae73c876a700ecf9d678e084a16d07d | [
"BSD-3-Clause"
] | 5 | 2020-08-03T00:57:01.000Z | 2022-01-16T05:03:38.000Z | """
BioC XML encoder
"""
from typing import TextIO
from lxml import etree
from bioc import BioCCollection, BioCDocument, BioCLocation, BioCNode, BioCRelation
def dump(collection: BioCCollection, fp: TextIO, *, pretty_print: bool = True):
"""
Serialize ``collection`` as a BioC formatted stream to `... | 32.461538 | 99 | 0.621829 |
797382598ea41472446911d5d78cf72544e11c45 | 1,395 | py | Python | Day18/run_tests.py | lukasHD/adventofcode2019 | 409a2008de43ee70258e02de5a9aad27aa18c67a | [
"MIT"
] | null | null | null | Day18/run_tests.py | lukasHD/adventofcode2019 | 409a2008de43ee70258e02de5a9aad27aa18c67a | [
"MIT"
] | null | null | null | Day18/run_tests.py | lukasHD/adventofcode2019 | 409a2008de43ee70258e02de5a9aad27aa18c67a | [
"MIT"
] | null | null | null | import day18
import unittest
AAA = """#########
#b.A.@.a#
#########"""
BBB = """########################
#f.D.E.e.C.b.A.@.a.B.c.#
######################.#
#d.....................#
########################"""
CCC = """########################
#...............b.C.D.f#
#.######################
#.....@.a.B.c.d.A.e.F.g#
##... | 23.644068 | 49 | 0.402151 |
797382884101bfddb963fd641a2fb0c2fb738fb6 | 5,127 | py | Python | gpMgmt/bin/lib/gplogextract.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 9 | 2018-04-20T03:31:01.000Z | 2020-05-13T14:10:53.000Z | gpMgmt/bin/lib/gplogextract.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 36 | 2017-09-21T09:12:27.000Z | 2020-06-17T16:40:48.000Z | gpMgmt/bin/lib/gplogextract.py | rodel-talampas/gpdb | 9c955e350334abbd922102f289f782697eb52069 | [
"PostgreSQL",
"Apache-2.0"
] | 32 | 2017-08-31T12:50:52.000Z | 2022-03-01T07:34:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
gplogextract.py [options] file ...
General Options:
-? | --help show this help message and exit
-v | --version show the program's version number and exit
Options:
-o | --output DIRECTORY output directory
'''
# ====================... | 32.04375 | 78 | 0.420324 |
797382a7be3899a69ca0c31751871fcb17bdec82 | 2,581 | py | Python | nilearn/__init__.py | hanke/nilearn | 96a3f0f72b4f25af771116251324cbec4c0d2055 | [
"BSD-2-Clause"
] | null | null | null | nilearn/__init__.py | hanke/nilearn | 96a3f0f72b4f25af771116251324cbec4c0d2055 | [
"BSD-2-Clause"
] | null | null | null | nilearn/__init__.py | hanke/nilearn | 96a3f0f72b4f25af771116251324cbec4c0d2055 | [
"BSD-2-Clause"
] | null | null | null | """
Machine Learning module for NeuroImaging in python
==================================================
Documentation is available in the docstrings and online at
http://nilearn.github.io.
Contents
--------
Nilearn aims at simplifying the use of the scikit-learn package in the context of
neuroimaging. It provides s... | 42.311475 | 95 | 0.669895 |
797382f791460ade46f9ea0c225da9f4b3a616f4 | 1,330 | py | Python | components/TinyDBEngine.py | mohanrex/bank_tryout | ae5ea7ffda70e8ddea5e76990496fe03372ae8a0 | [
"Apache-2.0"
] | null | null | null | components/TinyDBEngine.py | mohanrex/bank_tryout | ae5ea7ffda70e8ddea5e76990496fe03372ae8a0 | [
"Apache-2.0"
] | null | null | null | components/TinyDBEngine.py | mohanrex/bank_tryout | ae5ea7ffda70e8ddea5e76990496fe03372ae8a0 | [
"Apache-2.0"
] | null | null | null | """ Tiny DB Engine Implementation
Wrapper for tiny db
Its a inmemory db to store the values in key value pair
"""
from tinydb import Query, TinyDB, where
class TinyDBEngine(object):
"Engine for Tiny db"
def __init__(self, tablename="default"):
"""Initialises the engine for tinydb
"""
... | 28.913043 | 89 | 0.608271 |
7973831404f9c462139cbc0cda13432e0bc3ed43 | 10,532 | py | Python | qmcpy/discrete_distribution/lattice/lattice.py | fjhickernell/QMCSoftware | 1e8f080173f4cdc3adfe071b5c53d49592f61956 | [
"Apache-2.0"
] | null | null | null | qmcpy/discrete_distribution/lattice/lattice.py | fjhickernell/QMCSoftware | 1e8f080173f4cdc3adfe071b5c53d49592f61956 | [
"Apache-2.0"
] | null | null | null | qmcpy/discrete_distribution/lattice/lattice.py | fjhickernell/QMCSoftware | 1e8f080173f4cdc3adfe071b5c53d49592f61956 | [
"Apache-2.0"
] | null | null | null | from .._discrete_distribution import DiscreteDistribution
from ...util import ParameterError, ParameterWarning
from numpy import *
from os.path import dirname, abspath, isfile
import warnings
class Lattice(DiscreteDistribution):
"""
Quasi-Random Lattice nets in base 2.
>>> l = Lattice(2,seed=7)
>>> l... | 41.628458 | 109 | 0.578333 |
7973847d30f2c88e3e7db393ffedb41e4761bf14 | 1,566 | py | Python | src/bioregistry/align/cli.py | Victorinolavida/bioregistry | 83e7816729854b8a0dba48a184e6051b2aeea6db | [
"MIT"
] | null | null | null | src/bioregistry/align/cli.py | Victorinolavida/bioregistry | 83e7816729854b8a0dba48a184e6051b2aeea6db | [
"MIT"
] | null | null | null | src/bioregistry/align/cli.py | Victorinolavida/bioregistry | 83e7816729854b8a0dba48a184e6051b2aeea6db | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""CLI for alignment."""
import click
from ..utils import get_hexdigests, secho
__all__ = [
"align",
]
@click.command()
def align():
"""Align all external registries."""
from .biolink import BiolinkAligner
from .bioportal import BioPortalAligner
from .cellosaurus import... | 24.46875 | 65 | 0.662835 |
797385dd47cd7ee34383a9e8ca18b2b3f2cff62b | 156 | py | Python | setup.py | ellagupta/optical-rl-gym | 184d9fd8765060a3165e3dfbda8586f9437bd5d1 | [
"MIT"
] | 11 | 2020-07-20T12:31:47.000Z | 2022-03-03T19:07:14.000Z | setup.py | ellagupta/optical-rl-gym | 184d9fd8765060a3165e3dfbda8586f9437bd5d1 | [
"MIT"
] | null | null | null | setup.py | ellagupta/optical-rl-gym | 184d9fd8765060a3165e3dfbda8586f9437bd5d1 | [
"MIT"
] | 18 | 2020-10-05T09:10:34.000Z | 2021-11-10T23:05:41.000Z | from setuptools import setup
setup(name='optical_rl_gym',
version='0.0.1-alpha',
install_requires=['gym', 'numpy', 'matplotlib', 'networkx']
)
| 22.285714 | 65 | 0.673077 |
797386caa958807dea019f37e0d01bf9c21360b7 | 2,249 | py | Python | Day4.py | BWeesy/advent-of-code-2021 | 7e46de303ac9bcdaafcbc7de30d3bd4e059450c0 | [
"Unlicense"
] | null | null | null | Day4.py | BWeesy/advent-of-code-2021 | 7e46de303ac9bcdaafcbc7de30d3bd4e059450c0 | [
"Unlicense"
] | null | null | null | Day4.py | BWeesy/advent-of-code-2021 | 7e46de303ac9bcdaafcbc7de30d3bd4e059450c0 | [
"Unlicense"
] | null | null | null | import fileHandler as fh
class BoardUnit():
def __init__(self, number):
self.number = number
self.marked = False
def markNumber(self, number):
if self.number == number:
self.marked = True
def __str__(self):
return f"\x1b[32m {self.number}" if self.marked else f"\033[0m {self.number}"
c... | 24.988889 | 85 | 0.635838 |
797386e4e1978be0eedc7a938a9be52afbf4a55b | 5,843 | py | Python | sugar/components/client/protocols.py | sugarsack/sugar | f9e2e84ab4dbdbb36c7a5eb07123505abce9ec2c | [
"Apache-2.0"
] | 13 | 2018-12-04T22:59:57.000Z | 2019-08-14T15:27:42.000Z | sugar/components/client/protocols.py | sugarsack/sugar | f9e2e84ab4dbdbb36c7a5eb07123505abce9ec2c | [
"Apache-2.0"
] | 11 | 2018-12-06T22:53:34.000Z | 2019-06-28T14:15:30.000Z | sugar/components/client/protocols.py | sugarsack/sugar | f9e2e84ab4dbdbb36c7a5eb07123505abce9ec2c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Client protocols
"""
from __future__ import absolute_import, unicode_literals, print_function
from autobahn.twisted.websocket import WebSocketClientProtocol, WebSocketClientFactory
from twisted.internet.protocol import ReconnectingClientFactory
from twisted.internet import threads
from sugar.compon... | 34.169591 | 114 | 0.632552 |
7973871f335b30ee270f45f6337a5c44bf365e92 | 34,155 | py | Python | lib/sqlalchemy/sql/functions.py | graingert/sqlalchemy | b289fb032ead703eb131ad1b0d0e0dcba8617ca3 | [
"MIT"
] | null | null | null | lib/sqlalchemy/sql/functions.py | graingert/sqlalchemy | b289fb032ead703eb131ad1b0d0e0dcba8617ca3 | [
"MIT"
] | null | null | null | lib/sqlalchemy/sql/functions.py | graingert/sqlalchemy | b289fb032ead703eb131ad1b0d0e0dcba8617ca3 | [
"MIT"
] | null | null | null | # sql/functions.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""SQL function API, factories, and built-in functions.
"""
from . import annotati... | 29.934268 | 80 | 0.644181 |
797387241deb174b18d9059eedb11812112e778e | 10,750 | py | Python | plotly/graph_objs/contourcarpet/hoverlabel/_font.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 1 | 2018-07-16T01:51:47.000Z | 2018-07-16T01:51:47.000Z | plotly/graph_objs/contourcarpet/hoverlabel/_font.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/graph_objs/contourcarpet/hoverlabel/_font.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType
import copy
class Font(BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g... | 34.345048 | 79 | 0.565674 |
7973872a5d1e7db4486ad741a2462d0e53fa6b6a | 798 | py | Python | .history/galleria/urls_20201114132548.py | Nyash-Mauro/galleria | 350519827cf86a7af3c334dfedb69c1452e4122a | [
"MIT"
] | null | null | null | .history/galleria/urls_20201114132548.py | Nyash-Mauro/galleria | 350519827cf86a7af3c334dfedb69c1452e4122a | [
"MIT"
] | null | null | null | .history/galleria/urls_20201114132548.py | Nyash-Mauro/galleria | 350519827cf86a7af3c334dfedb69c1452e4122a | [
"MIT"
] | null | null | null | """galleria URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | 36.272727 | 77 | 0.706767 |
797387a7f5df05e993800dc2cb546ff2d8d388aa | 9,465 | py | Python | python/paddle/fluid/tests/unittests/test_distributed_strategy.py | Thunderbrook/Paddle | 4870c9bc99c6bd3b814485d7d4f525fe68ccd9a5 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_distributed_strategy.py | Thunderbrook/Paddle | 4870c9bc99c6bd3b814485d7d4f525fe68ccd9a5 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_distributed_strategy.py | Thunderbrook/Paddle | 4870c9bc99c6bd3b814485d7d4f525fe68ccd9a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 46.170732 | 137 | 0.72953 |
7973882f180f6edeb9ca4378117ba80a8afeb6e1 | 5,099 | py | Python | mars/dataframe/tests/test_initializer.py | haijohn/mars | 672b3a33a70565f01b1a3f508908445491d85acf | [
"Apache-2.0"
] | 1 | 2021-06-10T02:43:01.000Z | 2021-06-10T02:43:01.000Z | mars/dataframe/tests/test_initializer.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/tests/test_initializer.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding 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... | 32.477707 | 86 | 0.663267 |
797388603a867a1c369cda5e81c39812fa37e239 | 3,690 | py | Python | app/views/session.py | ONSdigital/census-survey-runner | 9f8cd3d664db5c5b49d348bdf48c58d1a3492aab | [
"MIT"
] | null | null | null | app/views/session.py | ONSdigital/census-survey-runner | 9f8cd3d664db5c5b49d348bdf48c58d1a3492aab | [
"MIT"
] | 3 | 2018-10-10T08:19:07.000Z | 2018-10-29T11:43:08.000Z | app/views/session.py | ONSdigital/census-survey-runner | 9f8cd3d664db5c5b49d348bdf48c58d1a3492aab | [
"MIT"
] | 1 | 2021-04-11T08:04:22.000Z | 2021-04-11T08:04:22.000Z | from datetime import datetime
from dateutil.tz import tzutc
from flask import Blueprint, redirect, request, g, session as cookie_session
from flask_login import current_user, login_required, logout_user
from sdc.crypto.exceptions import InvalidTokenException
from werkzeug.exceptions import Unauthorized
from structlo... | 29.758065 | 112 | 0.757453 |
797388fb16cc303b2c8dc56115895e9e532bb20c | 5,990 | py | Python | Python/Games/FlappyBird/Tubes.py | ZeroPrime9/Algorithms | 2d781188cf95202d7d71240c1ae89e06f81cd69c | [
"MIT"
] | 37 | 2020-10-01T15:20:12.000Z | 2021-10-04T14:17:06.000Z | Python/Games/FlappyBird/Tubes.py | ZeroPrime9/Algorithms | 2d781188cf95202d7d71240c1ae89e06f81cd69c | [
"MIT"
] | 27 | 2020-10-01T12:32:41.000Z | 2021-10-04T11:05:34.000Z | Python/Games/FlappyBird/Tubes.py | ZeroPrime9/Algorithms | 2d781188cf95202d7d71240c1ae89e06f81cd69c | [
"MIT"
] | 57 | 2020-10-01T11:24:26.000Z | 2022-02-16T05:09:50.000Z | from random import randint
from threading import Thread
from Background import Background
from Bird import Bird
from PIL.Image import open as openImage
from PIL.ImageTk import PhotoImage
class Tubes(Thread):
__distance = 0
__move = 10
__pastTubes = []
def __init__(self, background, bird, score_functi... | 38.645161 | 127 | 0.572621 |
79738b9cb00959a79d2d8685b616d884723cc2b8 | 7,791 | py | Python | rllib/osimwrapper.py | toanngosy/robustprothestics | 5fb0c300705784453d866931143092b4c47cc3cf | [
"MIT"
] | 3 | 2019-04-22T21:05:19.000Z | 2019-09-03T12:25:13.000Z | rllib/osimwrapper.py | toanngosy/robustprothestics | 5fb0c300705784453d866931143092b4c47cc3cf | [
"MIT"
] | null | null | null | rllib/osimwrapper.py | toanngosy/robustprothestics | 5fb0c300705784453d866931143092b4c47cc3cf | [
"MIT"
] | 1 | 2019-04-08T09:53:56.000Z | 2019-04-08T09:53:56.000Z | from gym import logger
import gym
import numpy as np
from osim.env import OsimEnv
# inspire by gym wrapper
warn_once = True
def deprecated_warn_once(text):
global warn_once
if not warn_once: return
warn_once = False
logger.warn(text)
class OsimWrapper(OsimEnv):
env = None
def __init__(self, ... | 50.590909 | 163 | 0.649467 |
79738c087a7942721dc9e6759e7f0e9ab3bcb780 | 24,072 | py | Python | scripts/get_objf_and_derivs_split.py | GoVivaceInc/pocolm | 4cbac2753f9d03578e3e19a24f23dcf446aacc88 | [
"Apache-2.0"
] | null | null | null | scripts/get_objf_and_derivs_split.py | GoVivaceInc/pocolm | 4cbac2753f9d03578e3e19a24f23dcf446aacc88 | [
"Apache-2.0"
] | null | null | null | scripts/get_objf_and_derivs_split.py | GoVivaceInc/pocolm | 4cbac2753f9d03578e3e19a24f23dcf446aacc88 | [
"Apache-2.0"
] | 2 | 2019-02-24T05:52:26.000Z | 2022-01-27T09:31:35.000Z | #!/usr/bin/env python3
# we're using python 3.x style print but want it to work in python 2.x,
from __future__ import print_function
import re
import os
import argparse
import sys
import threading
# make sure scripts/internal is on the pythonpath.
sys.path = [os.path.abspath(os.path.dirname(sys.argv[0])) + "/internal... | 43.372973 | 129 | 0.642281 |
79738e5ee2423f147bfb6ffdd1b714632aaf867b | 4,979 | py | Python | dejavu/database.py | ucekmez/dejavu | 49f4964dec84f57d03ba9b98c81f6bea933668f8 | [
"MIT"
] | null | null | null | dejavu/database.py | ucekmez/dejavu | 49f4964dec84f57d03ba9b98c81f6bea933668f8 | [
"MIT"
] | null | null | null | dejavu/database.py | ucekmez/dejavu | 49f4964dec84f57d03ba9b98c81f6bea933668f8 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import binascii
from tenacity import retry, wait_fixed, stop_after_attempt
from sqlalchemy import create_engine, Column, Integer, String, Boolean, Binary, ForeignKey, UniqueConstraint, Index
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy_utils import data... | 34.337931 | 130 | 0.645109 |
79738f70e572553239b9287c184304725f916710 | 516 | py | Python | packages/checkfile/lektor_checkfile.py | hixio-mh/creativecommons.github.io-source | 89c306671964ad86c860f764e1882d34a09d55e6 | [
"MIT"
] | 70 | 2019-03-06T16:16:07.000Z | 2022-03-15T22:41:12.000Z | packages/checkfile/lektor_checkfile.py | hixio-mh/creativecommons.github.io-source | 89c306671964ad86c860f764e1882d34a09d55e6 | [
"MIT"
] | 326 | 2019-01-31T16:44:44.000Z | 2022-03-09T21:59:07.000Z | packages/checkfile/lektor_checkfile.py | hixio-mh/creativecommons.github.io-source | 89c306671964ad86c860f764e1882d34a09d55e6 | [
"MIT"
] | 158 | 2019-02-08T13:37:32.000Z | 2022-03-15T22:41:18.000Z | # -*- coding: utf-8 -*-
# Standard library
import os
# Third-party
from lektor.pluginsystem import Plugin
class CheckfilePlugin(Plugin):
name = "CheckFile"
description = "Plugin to check if a file is present."
def on_setup_env(self, **extra):
def check_file(filename):
fn = os.path.jo... | 25.8 | 74 | 0.651163 |
79738fc9cee35f3ad9e49de5f178829a0ff89bfd | 10,810 | py | Python | train_frcnn.py | gokseltokur/kerasfrcnn-objectdetection | 6d53a2bab68dedf26e118c9f2f57de8fbea74309 | [
"Apache-2.0"
] | null | null | null | train_frcnn.py | gokseltokur/kerasfrcnn-objectdetection | 6d53a2bab68dedf26e118c9f2f57de8fbea74309 | [
"Apache-2.0"
] | null | null | null | train_frcnn.py | gokseltokur/kerasfrcnn-objectdetection | 6d53a2bab68dedf26e118c9f2f57de8fbea74309 | [
"Apache-2.0"
] | null | null | null | from __future__ import division
import random
import pprint
import sys
import time
import numpy as np
from optparse import OptionParser
import pickle
from keras import backend as K
from keras.optimizers import Adam, SGD, RMSprop
from keras.layers import Input
from keras.models import Model
from keras_frcnn import conf... | 38.333333 | 199 | 0.738483 |
79738fddac49e4f8caeaf4bcd464bcd480a2f0ac | 2,225 | py | Python | zerver/webhooks/hellosign/tests.py | luisogandob/zulip | f6667b8e80b4658b8d2a5ae6b3f0c9d6eac4a2d6 | [
"Apache-2.0"
] | 6 | 2019-05-09T20:43:20.000Z | 2022-03-29T05:53:50.000Z | zerver/webhooks/hellosign/tests.py | luisogandob/zulip | f6667b8e80b4658b8d2a5ae6b3f0c9d6eac4a2d6 | [
"Apache-2.0"
] | 2 | 2016-10-18T04:01:56.000Z | 2016-10-20T18:19:09.000Z | zerver/webhooks/hellosign/tests.py | luisogandob/zulip | f6667b8e80b4658b8d2a5ae6b3f0c9d6eac4a2d6 | [
"Apache-2.0"
] | 7 | 2016-08-10T02:24:32.000Z | 2022-03-28T15:14:18.000Z | from typing import Dict
from zerver.lib.test_classes import WebhookTestCase
class HelloSignHookTests(WebhookTestCase):
STREAM_NAME = 'hellosign'
URL_TEMPLATE = "/api/v1/external/hellosign?stream={stream}&api_key={api_key}"
FIXTURE_DIR_NAME = 'hellosign'
def test_signatures_message(self) -> None:
... | 52.97619 | 111 | 0.646742 |
797390928ba2e01383c7c4b0b2c49db31209f849 | 3,134 | py | Python | rapid_test/settings.py | andreobriennz/rapid_test | 352b55ec63b27a2093134d00cda230e7720bdf87 | [
"MIT"
] | null | null | null | rapid_test/settings.py | andreobriennz/rapid_test | 352b55ec63b27a2093134d00cda230e7720bdf87 | [
"MIT"
] | null | null | null | rapid_test/settings.py | andreobriennz/rapid_test | 352b55ec63b27a2093134d00cda230e7720bdf87 | [
"MIT"
] | null | null | null | """
Django settings for rapid_test project.
Generated by 'django-admin startproject' using Django 3.1.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from path... | 25.274194 | 91 | 0.697192 |
797392383b49cbd799de5b75581b22ba42ddab4f | 11,253 | py | Python | oauthlib/oauth2/rfc6749/tokens.py | shssoichiro/oauthlib | 754b003514eaac50ac30f207bac692c39c6a94c6 | [
"BSD-3-Clause"
] | 11 | 2020-10-13T05:27:59.000Z | 2021-09-23T02:56:32.000Z | oauthlib/oauth2/rfc6749/tokens.py | shssoichiro/oauthlib | 754b003514eaac50ac30f207bac692c39c6a94c6 | [
"BSD-3-Clause"
] | 48 | 2020-10-15T09:53:36.000Z | 2021-07-05T15:33:24.000Z | Lib/site-packages/oauthlib/oauth2/rfc6749/tokens.py | JaiKumarOfficial/Tweetal | e5b89e0d1cbc8840ea98ca66f9986a46a46e8618 | [
"bzip2-1.0.6"
] | 4 | 2020-12-04T08:51:35.000Z | 2022-03-27T09:42:20.000Z | """
oauthlib.oauth2.rfc6749.tokens
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains methods for adding two types of access tokens to requests.
- Bearer https://tools.ietf.org/html/rfc6750
- MAC https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01
"""
from __future__ import absolute_import, unicode_literals
... | 31.085635 | 116 | 0.636453 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.