hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38a2fc14fa01cd43dadf068aa649c5fb1ca505f1 | 13,709 | py | Python | ops/query/boolean_queries.py | nouhadziri/Information-Retreival | 664f26307ede1810d253fbf0e00c499dd32998ab | [
"MIT"
] | 1 | 2022-03-24T12:09:14.000Z | 2022-03-24T12:09:14.000Z | ops/query/boolean_queries.py | nouhadziri/Information-Retreival | 664f26307ede1810d253fbf0e00c499dd32998ab | [
"MIT"
] | null | null | null | ops/query/boolean_queries.py | nouhadziri/Information-Retreival | 664f26307ede1810d253fbf0e00c499dd32998ab | [
"MIT"
] | null | null | null | #
# CMPUT397 started code for programming assignment 1
#
# this module provides starter code with stubs of the
# functions to answer boolean queries
#
from nltk.tokenize import word_tokenize
import database.sqlite_handler as sqlite_handler
import util.analyzer as analyzer
from parser import Parser, ParseException
in... | 31.587558 | 225 | 0.631702 |
38a306c77ff89605aaec03d5706f0d864741697e | 6,823 | py | Python | Q+A/Baseline/scripts/predict.py | vincentami/MSMARCO | d575d33264c1afd37acb941f0a193b8af533d778 | [
"MIT"
] | 79 | 2019-02-17T04:28:33.000Z | 2019-08-15T10:30:51.000Z | Q+A/Baseline/scripts/predict.py | vincentami/MSMARCO | d575d33264c1afd37acb941f0a193b8af533d778 | [
"MIT"
] | 21 | 2018-05-05T05:49:48.000Z | 2019-02-14T00:57:54.000Z | Q+A/Baseline/scripts/predict.py | vincentami/MSMARCO | d575d33264c1afd37acb941f0a193b8af533d778 | [
"MIT"
] | 22 | 2018-05-22T09:07:17.000Z | 2019-01-17T01:08:54.000Z | #!python3
"""
Training script: load a config file, create a new model using it,
then train that model.
"""
import json
import random
import yaml
import argparse
import os.path
import re
import numpy as np
import torch
import h5py
regex_drop_char = re.compile('[^a-z0-9\s]+')
regex_multi_space ... | 34.115 | 177 | 0.610875 |
38a30a80d7c1d907fee5926343dfe50edccd30e4 | 11,765 | py | Python | mediapipe/examples/desktop/autoflip/calculators/content_zooming_calculator_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 5 | 2021-01-01T11:02:41.000Z | 2022-03-11T19:44:29.000Z | mediapipe/examples/desktop/autoflip/calculators/content_zooming_calculator_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | null | null | null | mediapipe/examples/desktop/autoflip/calculators/content_zooming_calculator_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 1 | 2021-04-12T05:59:46.000Z | 2021-04-12T05:59:46.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/examples/desktop/autoflip/calculators/content_zooming_calculator.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _... | 59.419192 | 1,281 | 0.81122 |
38a32bd9b962bda616addc6b39c1a595938efe60 | 3,985 | py | Python | alipay/aop/api/request/AlipayDataBillAccountdailyQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayDataBillAccountdailyQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayDataBillAccountdailyQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayDataBillAccountdailyQueryModel import AlipayDataBillAccountdailyQueryModel
class AlipayDataBillAccountdailyQueryRequest(object... | 27.482759 | 148 | 0.645922 |
38a3661a94621c4bc00d87317f8b15ce6d940dd9 | 1,519 | py | Python | master/python_games_sweigart/python_games_sweigart/cipher.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/python_games_sweigart/python_games_sweigart/cipher.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/python_games_sweigart/python_games_sweigart/cipher.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | # Шифр Цезаря
SYMBOLS = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя'
MAX_KEY_SIZE = len(SYMBOLS)
def getMode():
while True:
print('Вы хотите зашифровать или расшифровать текст?')
mode = input().lower()
if mode in ['зашифровать', 'з', 'расшифровать', 'р']:
... | 28.660377 | 109 | 0.601712 |
38a36a91b1ef5f26a701ea4669f904a650f1593b | 469 | py | Python | incomepropertyevaluator/shared_index/urls.py | MikaSoftware/django-incomepropertyevaluator | d30dc9ba38dc2c2cb8ad858e9e7cfec17a45e73b | [
"BSD-2-Clause"
] | 2 | 2019-02-22T23:34:59.000Z | 2022-03-22T06:10:21.000Z | incomepropertyevaluator/shared_index/urls.py | MikaSoftware/django-incomepropertyevaluator | d30dc9ba38dc2c2cb8ad858e9e7cfec17a45e73b | [
"BSD-2-Clause"
] | 6 | 2020-02-11T23:57:35.000Z | 2022-03-11T23:17:44.000Z | incomepropertyevaluator/shared_index/urls.py | MikaSoftware/django-incomepropertyevaluator | d30dc9ba38dc2c2cb8ad858e9e7cfec17a45e73b | [
"BSD-2-Clause"
] | null | null | null | from django.conf.urls import include, url
from django.views.generic.base import RedirectView
from shared_index import views
urlpatterns = (
url(r'^$', views.index_page, name='at_index_master'),
url(r'^en$', views.index_page),
url(r'^en/$', views.index_page),
# url(r'^sample/push_notification$', views.... | 36.076923 | 105 | 0.731343 |
38a3807983212fbe5e9e8c3b73979e20a51f70ce | 2,187 | py | Python | setup.py | lugq1990/scikit-plot | c581bc590ad35e6bfe268a5073f60ec1e598c943 | [
"MIT"
] | null | null | null | setup.py | lugq1990/scikit-plot | c581bc590ad35e6bfe268a5073f60ec1e598c943 | [
"MIT"
] | null | null | null | setup.py | lugq1990/scikit-plot | c581bc590ad35e6bfe268a5073f60ec1e598c943 | [
"MIT"
] | null | null | null | from __future__ import print_function
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import io
import codecs
import os
import sys
here = os.path.abspath(os.path.dirname(__file__))
def read(*filenames, **kwargs):
encoding = kwargs.get('encoding', 'utf-8')
s... | 29.16 | 94 | 0.63283 |
38a38481c51be9f404a1f5facd2c143e9de4f18a | 283 | py | Python | tests/conftest.py | paultjensen/sec_filings_api | 6d30bc514b21ec911981604900441377bca15723 | [
"MIT"
] | null | null | null | tests/conftest.py | paultjensen/sec_filings_api | 6d30bc514b21ec911981604900441377bca15723 | [
"MIT"
] | null | null | null | tests/conftest.py | paultjensen/sec_filings_api | 6d30bc514b21ec911981604900441377bca15723 | [
"MIT"
] | null | null | null | """
Dummy conftest.py for sec_filings_api.
If you don't know what this is for, just leave it empty.
Read more about conftest.py under:
- https://docs.pytest.org/en/stable/fixture.html
- https://docs.pytest.org/en/stable/writing_plugins.html
"""
# import pytest
| 25.727273 | 60 | 0.696113 |
38a3b52387c13fdd6a52a0782433bc7f4a86d2ab | 1,318 | py | Python | nicos_inl/nrs/setups/sampletable.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_inl/nrs/setups/sampletable.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_inl/nrs/setups/sampletable.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'Sample manipulation stage'
group = 'lowlevel'
tango_base = 'tango://localhost:10000/st/'
devices = dict(
sample_x_m = device('nicos.devices.entangle.Motor',
description = 'Sample X translation motor',
tangodevice = tango_base + 'sample_x/motor',
unit = 'mm',
fmtstr ... | 29.288889 | 57 | 0.564492 |
38a3dbda1294feace5014fc75038aad73fd7048f | 67,899 | py | Python | tensorflow/contrib/distributions/python/kernel_tests/bijector_test.py | smarthi/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 2 | 2019-10-09T08:06:48.000Z | 2021-01-07T03:16:09.000Z | tensorflow/contrib/distributions/python/kernel_tests/bijector_test.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:12:22.000Z | 2017-02-06T08:12:22.000Z | tensorflow/contrib/distributions/python/kernel_tests/bijector_test.py | gjmulder/tensorflow | 55b01593515817992821423fec19733bca91c918 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 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... | 38.535187 | 85 | 0.619759 |
38a3f072e6ad7b2902261df96ddc88916c2744e8 | 2,126 | py | Python | swagger_spec_validator/common.py | brycedrennan/swagger_spec_validator | dc03f20cd4b2140dba967226821afc56defdf915 | [
"Apache-2.0"
] | 100 | 2015-01-22T17:37:32.000Z | 2021-11-08T10:29:56.000Z | swagger_spec_validator/common.py | brycedrennan/swagger_spec_validator | dc03f20cd4b2140dba967226821afc56defdf915 | [
"Apache-2.0"
] | 144 | 2015-01-21T21:03:14.000Z | 2022-01-05T11:51:28.000Z | swagger_spec_validator/common.py | brycedrennan/swagger_spec_validator | dc03f20cd4b2140dba967226821afc56defdf915 | [
"Apache-2.0"
] | 81 | 2015-01-15T21:47:35.000Z | 2021-09-30T08:55:08.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import contextlib
import functools
import os
import sys
import six
import yaml
from pkg_resources import resource_filename
from six.moves.urllib.... | 26.575 | 88 | 0.724835 |
38a3f789669267e34440a3ee7ec4a486b344f2b9 | 5,430 | py | Python | capnpy/printer.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 45 | 2016-10-28T10:16:07.000Z | 2022-03-06T20:16:57.000Z | capnpy/printer.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 42 | 2016-12-20T18:10:53.000Z | 2021-09-08T12:29:04.000Z | capnpy/printer.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 21 | 2017-02-28T06:39:15.000Z | 2021-09-07T05:30:46.000Z | from __future__ import print_function
import sys
import struct
import six
from pypytools.jitview import Color
from capnpy import ptr
COLORS = [Color.darkred, Color.darkgreen, Color.brown,
Color.darkblue, Color.purple, Color.teal]
def print_buffer(buf, **kwds):
p = BufferPrinter(buf)
p.printbuf(end... | 32.130178 | 84 | 0.493554 |
38a45dc652ec4b20e4feab5865bfca8b681fb041 | 738 | py | Python | tests/test_models.py | sxn/notary | 72f00196c276165ac67eb73aae152684da626711 | [
"MIT"
] | 7 | 2017-03-04T20:34:06.000Z | 2019-04-17T19:37:08.000Z | tests/test_models.py | sxn/notary | 72f00196c276165ac67eb73aae152684da626711 | [
"MIT"
] | 24 | 2017-03-04T20:06:12.000Z | 2017-12-26T20:50:37.000Z | tests/test_models.py | sxn/notary | 72f00196c276165ac67eb73aae152684da626711 | [
"MIT"
] | 1 | 2019-08-01T08:41:10.000Z | 2019-08-01T08:41:10.000Z | import pytest
from notary.models import License, MIT, Apache
def test_license_is_abstract():
with pytest.raises(TypeError, message="Expected :class:`License` to be abstract.") as excinfo:
License()
excinfo.match("abstract methods name, path")
@pytest.mark.parametrize(
"cls, author, year, expect... | 32.086957 | 98 | 0.668022 |
38a471b1131b9f95223e7d8b74960dcfd2bded12 | 2,836 | py | Python | conan/tools/env/virtualbuildenv.py | gmeeker/conan | 2e4863180612b7df4f0be536d81aff735222ce2a | [
"MIT"
] | 6,205 | 2015-12-01T13:40:05.000Z | 2022-03-31T07:30:25.000Z | conan/tools/env/virtualbuildenv.py | gmeeker/conan | 2e4863180612b7df4f0be536d81aff735222ce2a | [
"MIT"
] | 8,747 | 2015-12-01T16:28:48.000Z | 2022-03-31T23:34:53.000Z | conan/tools/env/virtualbuildenv.py | gmeeker/conan | 2e4863180612b7df4f0be536d81aff735222ce2a | [
"MIT"
] | 961 | 2015-12-01T16:56:43.000Z | 2022-03-31T13:50:52.000Z | from conan.tools.env import Environment
from conan.tools.env.virtualrunenv import runenv_from_cpp_info
class VirtualBuildEnv:
""" captures the conanfile environment that is defined from its
dependencies, and also from profiles
"""
def __init__(self, conanfile):
self._conanfile = conanfile
... | 39.943662 | 96 | 0.657264 |
38a47f9aad226043f209863654b859ac1d10a3cc | 177 | py | Python | setup.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | setup.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | setup.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | """A setuptools based setup module.
"""
from setuptools import setup
setup(
setup_requires=["setuptools_scm"],
use_scm_version={"local_scheme": "no-local-version",},
)
| 19.666667 | 58 | 0.711864 |
38a4be886753a26abf2a85abc8c01057f12cac60 | 6,492 | py | Python | mapproxy/cache/riak.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/cache/riak.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/cache/riak.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # This file is part of the MapProxy project.
# Copyright (C) 2013 Omniscale <http://omniscale.de>
#
# 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... | 32.954315 | 102 | 0.602896 |
38a4d53314891f0d96e04efd835724f78b87e128 | 6,802 | py | Python | oracle/irc.py | Toofifty/Oracle2 | aea7db04d1f470cf04cf6b9b291b1fd47e4b6b4d | [
"MIT"
] | 1 | 2015-07-15T15:24:54.000Z | 2015-07-15T15:24:54.000Z | oracle/irc.py | Toofifty/Oracle2 | aea7db04d1f470cf04cf6b9b291b1fd47e4b6b4d | [
"MIT"
] | null | null | null | oracle/irc.py | Toofifty/Oracle2 | aea7db04d1f470cf04cf6b9b291b1fd47e4b6b4d | [
"MIT"
] | null | null | null | # -- coding: utf-8 --
"""
Oracle 2.0 IRC Bot
irc.py
http://toofifty.me/oracle
"""
import socket, sys, re
class IRC(socket.socket):
"""Main Socket Class
Allows interaction with the IRC
server through various means
"""
def __init__(self, config):
"""Initialized the IRC socket as a
... | 27.538462 | 71 | 0.543517 |
38a4ee04edcfac59a4d2592e4c9ff30095268553 | 11,869 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/apps_v1beta1_deployment_spec.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/apps_v1beta1_deployment_spec.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/apps_v1beta1_deployment_spec.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class AppsV... | 35.75 | 388 | 0.658859 |
38a52c91e09a9113d5f759d9486b183214cfc1cf | 34 | py | Python | orderbook_veinte/utils/permissions/__init__.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | orderbook_veinte/utils/permissions/__init__.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | orderbook_veinte/utils/permissions/__init__.py | morwen1/hyperion | f0d77a6cce6a366555e9f0ca0080f3da134862bf | [
"MIT"
] | null | null | null | from .lazy_autenticated import * | 34 | 34 | 0.794118 |
38a52ec3c31dcaa992741727421a18a75060d1a4 | 1,267 | py | Python | prereise/gather/tests/test_helpers.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | prereise/gather/tests/test_helpers.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | prereise/gather/tests/test_helpers.py | terrywqf/PreREISE | f8052dd37091eaa15024725d5c92a3ef0ee311ee | [
"MIT"
] | null | null | null | import pandas as pd
import pytest
from prereise.gather.helpers import get_monthly_net_generation
from prereise.gather.tests.mock_generation import create_mock_generation_data_frame
def test_get_monthly_net_generation_argument_type():
arg = (
(1, create_mock_generation_data_frame(), "hydro"),
("CA... | 26.395833 | 87 | 0.627466 |
38a54643eca0da94afd8a20346545ddf41aaea3b | 344 | py | Python | toontown/coghq/DistributedButtonAI.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/coghq/DistributedButtonAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/coghq/DistributedButtonAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.directnotify import DirectNotifyGlobal
from direct.task import Task
from toontown.coghq import DistributedSwitchBase
from toontown.coghq import DistributedSwitchAI
class DistributedButtonAI(DistributedSwitchAI.DistributedSwitchAI):
setColor = DistributedSwitchBase.stubFunction
setModel = Distribute... | 43 | 67 | 0.872093 |
38a54fe995760b688aa1ab9842f22f9e37b76313 | 1,688 | py | Python | PythonNetCode/chapter4/4_10_https_server.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter4/4_10_https_server.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter4/4_10_https_server.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Python Network Programming Cookbook -- Chapter - 4
# This program is optimized for Python 2.7.
# It may run on any other version with/without modifications.
# Requires pyOpenSSL and SSL packages installed
import socket, os
from SocketServer import BaseServer
from BaseHTTPServer import HTTPServe... | 36.695652 | 91 | 0.711493 |
38a5537e3a673eaab03c8c36a122f28212dbf77e | 1,087 | py | Python | ingestion/__init__.py | deokfilho/aistreamer | d60303a8d2f0ea53b56b0eedda64b1a8cff88b0b | [
"MIT",
"Unlicense"
] | 129 | 2018-12-07T08:39:41.000Z | 2022-02-02T00:26:26.000Z | ingestion/__init__.py | deokfilho/aistreamer | d60303a8d2f0ea53b56b0eedda64b1a8cff88b0b | [
"MIT",
"Unlicense"
] | 8 | 2019-04-26T01:49:15.000Z | 2021-12-07T05:07:55.000Z | ingestion/__init__.py | deokfilho/aistreamer | d60303a8d2f0ea53b56b0eedda64b1a8cff88b0b | [
"MIT",
"Unlicense"
] | 53 | 2019-01-11T23:58:39.000Z | 2022-03-24T13:25:34.000Z | # Copyright (c) 2019 Google LLC
#
# 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, distribu... | 57.210526 | 82 | 0.781049 |
38a570bace5fac8462cba4d8b3b3412814db4071 | 5,499 | py | Python | rally/plugins/openstack/context/sahara/sahara_job_binaries.py | LorenzoBianconi/rally | 2bbd7ee590cca048fb4ad6a8eefc484989979ff8 | [
"Apache-2.0"
] | 1 | 2021-09-29T02:16:09.000Z | 2021-09-29T02:16:09.000Z | rally/plugins/openstack/context/sahara/sahara_job_binaries.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-14T11:29:31.000Z | 2020-07-14T11:29:31.000Z | rally/plugins/openstack/context/sahara/sahara_job_binaries.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-02T01:33:48.000Z | 2020-07-02T01:33:48.000Z | # Copyright 2014: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 36.177632 | 79 | 0.533188 |
38a58ea5668370e78e5faa09b964983762b293e7 | 1,547 | py | Python | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/riou_calculator.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 13 | 2021-10-15T15:14:45.000Z | 2022-03-09T00:22:55.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/riou_calculator.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 4 | 2021-10-17T09:04:20.000Z | 2022-03-25T06:43:00.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/riou_calculator.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 2 | 2021-11-17T11:31:35.000Z | 2021-11-29T06:50:35.000Z | import torch
from .builder import IOU_CALCULATORS
from maskrcnn_benchmark.structures.rboxlist_ops import box_iou
from mmdet.core.bbox.bbox_dis import get_roi2align
@IOU_CALCULATORS.register_module()
class RboxOverlaps2D(object):
"""2D IoU Calculator."""
def __call__(self, bboxes1, bboxes2, mode='iou', is_alig... | 39.666667 | 79 | 0.594053 |
38a5a1e5d4c0535acb12e0f6e8e29253af555495 | 1,132 | py | Python | convexified-gnn/learner/gnn_baseline.py | saarcohen30/convexified-gnn | 29c9cced043fc494fe7eb4296d264ef6d0e6b570 | [
"MIT"
] | 2 | 2021-08-29T10:06:01.000Z | 2022-03-21T02:59:00.000Z | convexified-gnn/learner/gnn_baseline.py | saarcohen30/convexified-gnn | 29c9cced043fc494fe7eb4296d264ef6d0e6b570 | [
"MIT"
] | null | null | null | convexified-gnn/learner/gnn_baseline.py | saarcohen30/convexified-gnn | 29c9cced043fc494fe7eb4296d264ef6d0e6b570 | [
"MIT"
] | null | null | null | """
Soruce:
[Tolstaya et al., 2020]
Ekaterina Tolstaya, Fernando Gama,James Paulos, George Pappas, Vijay Kumar, and Alejan-dro Ribeiro.
Learning decentralized controllers for robotswarms with graph neural networks.
In Conference on Robot Learning, pages 671–682, 2020.
"""
import numpy as np
def train_bas... | 27.609756 | 104 | 0.640459 |
38a5e602ddcf321d6fa84f88bf0ebc8ec7d2c4d3 | 3,664 | py | Python | chapter2/intogen-mutations/develop/workflows/consequences/gene_impact.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | 1 | 2015-12-22T00:53:18.000Z | 2015-12-22T00:53:18.000Z | chapter2/intogen-mutations/develop/workflows/consequences/gene_impact.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | chapter2/intogen-mutations/develop/workflows/consequences/gene_impact.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | import re
import os.path
from wok.task import task
from bgcore import tsv
from bgcore.re import ReContext
from intogensm.transfic import TransFIC
from intogensm.config import GlobalConfig, PathsConfig
from intogensm import so
SIMPLE_AA_CHANGE_RE = re.compile(r"^([\*A-Z])(?:/([\*A-Z]))?$", re.IGNORECASE)
COMPLEX_AA_... | 36.277228 | 123 | 0.707151 |
38a5e6b5da43e3ef8809d7e5793868319c2b783a | 1,724 | py | Python | test/unit/gen_libs/compress.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/compress.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/compress.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: compress.py
Description: Unit testing of compress in gen_libs.py.
Usage:
test/unit/gen_libs/compress.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
import unittest2 as u... | 14.862069 | 74 | 0.61891 |
38a5e779f8568bc7ac311c2a10d614b34a580107 | 44,650 | py | Python | src/utils_get_hla_paratopes.py | yaosichao0915/DeepImmuno | a2a7832f6cded9296735475c2e8fa5c9b62b3f8d | [
"MIT"
] | 20 | 2020-12-28T03:34:34.000Z | 2022-03-14T01:36:52.000Z | src/utils_get_hla_paratopes.py | zhangjiahuan17/DeepImmuno | 5ab182429bc3276fd43be2ec8d86b72e773992ef | [
"MIT"
] | 3 | 2021-04-23T19:21:11.000Z | 2021-08-22T00:39:01.000Z | src/utils_get_hla_paratopes.py | zhangjiahuan17/DeepImmuno | 5ab182429bc3276fd43be2ec8d86b72e773992ef | [
"MIT"
] | 11 | 2021-04-23T16:46:29.000Z | 2022-03-18T15:53:55.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 12 17:25:58 2020
@author: ligk2e
"""
from Bio.Alphabet import generic_dna
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio.Align import MultipleSeqAlignment
from Bio import AlignIO
from Bio.SubsMat import MatrixInfo
import json
i... | 33.621988 | 258 | 0.548712 |
38a5f12e2f83b8f2c356e96622cfcb80a791fd85 | 7,776 | py | Python | src/connectedvmware/azext_connectedvmware/vendored_sdks/_azure_arc_vmware_management_service_api.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/connectedvmware/azext_connectedvmware/vendored_sdks/_azure_arc_vmware_management_service_api.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/connectedvmware/azext_connectedvmware/vendored_sdks/_azure_arc_vmware_management_service_api.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.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 ... | 55.542857 | 339 | 0.747428 |
38a62b8d463b232aa009bac226610bab66d64743 | 4,352 | py | Python | toontown/cogdominium/CogdoGameMessageDisplay.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/cogdominium/CogdoGameMessageDisplay.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/cogdominium/CogdoGameMessageDisplay.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.interval.FunctionInterval import Func
from direct.interval.LerpInterval import LerpFunc
from direct.interval.MetaInterval import Sequence
from pandac.PandaModules import TextNode
from toontown.toonbase import ToontownGlobals
from toontown.cogdominium import CogdoGameConsts
class CogdoGameMessageDisplay:
... | 56.519481 | 177 | 0.696921 |
38a62c4abaa0187877c87e2e41a13337878ad048 | 3,221 | py | Python | py/open_directory.py | j-kun/Irre-Katze-Level-Editor | b73e0a9e568b7a576ba6846b0af0a3c7fbd2c06e | [
"WTFPL"
] | null | null | null | py/open_directory.py | j-kun/Irre-Katze-Level-Editor | b73e0a9e568b7a576ba6846b0af0a3c7fbd2c06e | [
"WTFPL"
] | null | null | null | py/open_directory.py | j-kun/Irre-Katze-Level-Editor | b73e0a9e568b7a576ba6846b0af0a3c7fbd2c06e | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python
# standard libraries
import os
import subprocess
import logging
log = logging.getLogger(__name__)
# other libraries
import system
# ---------- settings ----------
WC_FILEPATH = '{filepath}'
CMD_OPEN_FILE_WINDOWS = ("cmd", "/C", "start", "", WC_FILEPATH)
CMD_OPEN_FILE_LINUX = ("xdg-open", WC_... | 28.504425 | 101 | 0.598572 |
38a631e7567c1ba1ddca4a45fa0007cc925af390 | 10,455 | py | Python | src/connectedvmware/azext_connectedvmware/tests/latest/test_connectedvmware_scenario.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/connectedvmware/azext_connectedvmware/tests/latest/test_connectedvmware_scenario.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/connectedvmware/azext_connectedvmware/tests/latest/test_connectedvmware_scenario.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 38.156934 | 177 | 0.560497 |
38a63364571cbe8247335b35ffebc18820c865ef | 4,089 | py | Python | data/level/level10068.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level10068.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level10068.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {'level_index': 10068, 'move_count': '23',
'board_info': {(-4, 12): {'next': (0, -1), 'prev': (1, 0)}, (-4, 11): {'next': (0, -1), 'prev': (0, 1)},
(-4, 10): {'next': (0, -1), 'prev': (0, 1)}, (-4, 9): {'next': (0, -1), 'prev': (0, 1)},
(-4, 8): {'next': (0, ... | 102.225 | 118 | 0.274395 |
38a637889f9f3afbd368af9936fca347327c7ee6 | 1,230 | py | Python | src/examples/float_precision_errors/pyfuzz_float_precision_errors.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | src/examples/float_precision_errors/pyfuzz_float_precision_errors.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | src/examples/float_precision_errors/pyfuzz_float_precision_errors.py | fabriceyhc/pyfuzz | 67f8bd844f63139ca8f795b2bc6e30a419fa037e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 01/30/22 4:44 PM
# @Author : Fabrice Harel-Canada
# @File : pyfuzz_float_precision_errors.py
import sys
import os
sys.path.insert(1, os.path.abspath("../.."))
from pyfuzz.fuzzers import *
from pyfuzz.byte_mutations import *
from pyfuzz.fuzz_data_interpre... | 25.625 | 73 | 0.707317 |
38a65634ecff5d4b18121209124fbe177454c571 | 2,151 | py | Python | SOLO/preprocess/finger_flag.py | youngster-all/Unified-Gesture | 8d20e051f2b692244c38a4d016629f13fe81c200 | [
"MIT"
] | 1 | 2019-12-24T17:00:11.000Z | 2019-12-24T17:00:11.000Z | SOLO/preprocess/finger_flag.py | youngster-all/Unified-Gesture | 8d20e051f2b692244c38a4d016629f13fe81c200 | [
"MIT"
] | null | null | null | SOLO/preprocess/finger_flag.py | youngster-all/Unified-Gesture | 8d20e051f2b692244c38a4d016629f13fe81c200 | [
"MIT"
] | 1 | 2019-12-24T17:39:46.000Z | 2019-12-24T17:39:46.000Z | """ Considering the presence of the finger in a dataset as True else False """
class Finger:
def __int__(self):
pass
def SingleOne(self):
thumb = False
index = True
middle = False
ring = False
pinky = False
return thumb, index, middle, ring, pinky
... | 22.642105 | 78 | 0.529521 |
38a65b4a4538c5260932aff807c32499d36dda6a | 9,337 | py | Python | tests/matrixstore/test_service.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2021-11-15T09:26:33.000Z | 2022-02-24T09:53:54.000Z | tests/matrixstore/test_service.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | tests/matrixstore/test_service.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | import datetime
import io
from unittest.mock import Mock, ANY
from zipfile import ZipFile, ZIP_DEFLATED
import pytest
from fastapi import UploadFile
from antarest.core.jwt import JWTUser, JWTGroup
from antarest.core.requests import (
RequestParameters,
UserHasNotPermissionError,
)
from antarest.core.roles imp... | 26.83046 | 79 | 0.573418 |
38a661d7b73ebf688276f14a1cd336af392f1ae5 | 1,632 | py | Python | tests/storage/repository/filesystem/test_bucket_node.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2021-11-15T09:26:33.000Z | 2022-02-24T09:53:54.000Z | tests/storage/repository/filesystem/test_bucket_node.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | tests/storage/repository/filesystem/test_bucket_node.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | from pathlib import Path
from unittest.mock import Mock
from antarest.study.storage.rawstudy.model.filesystem.bucket_node import (
BucketNode,
)
from antarest.study.storage.rawstudy.model.filesystem.config.model import (
FileStudyTreeConfig,
)
from antarest.study.storage.rawstudy.model.filesystem.context impor... | 25.5 | 75 | 0.643995 |
38a6c83e279df429f9ddb51f0c398f548290bf5f | 18,127 | py | Python | esperclient/api/subscription_api.py | pallavigopi/esper-client-py | f7e71d3f25a5d91f35628b414e8abe9e6849d316 | [
"Apache-2.0"
] | null | null | null | esperclient/api/subscription_api.py | pallavigopi/esper-client-py | f7e71d3f25a5d91f35628b414e8abe9e6849d316 | [
"Apache-2.0"
] | null | null | null | esperclient/api/subscription_api.py | pallavigopi/esper-client-py | f7e71d3f25a5d91f35628b414e8abe9e6849d316 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
ESPER API REFERENCE
OpenAPI spec version: 1.0.0
Contact: developer@esper.io
---------------------------------------------------------
Copyright 2019 Shoonya Enterprises Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the Li... | 39.492375 | 115 | 0.635626 |
38a6f1438f688c5750e8242fd423bf78c437e219 | 17,276 | pyw | Python | EarnIt.pyw | GarrettPeake/EarnIt | 09cdad3132eace430c150968792e143d5352c67a | [
"MIT"
] | null | null | null | EarnIt.pyw | GarrettPeake/EarnIt | 09cdad3132eace430c150968792e143d5352c67a | [
"MIT"
] | null | null | null | EarnIt.pyw | GarrettPeake/EarnIt | 09cdad3132eace430c150968792e143d5352c67a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import pickle
import time
import os
from os import path
import sys
import select
import random
import tkinter as tk
from mpyg321.mpyg321 import MPyg321Player
class Task():
""" Represents a task a user wants to complete
tracks multiple steps, reward decay, and progress """
def __ini... | 47.461538 | 160 | 0.60639 |
38a6fe650930bc110ce19e0279f50efe1842d718 | 5,726 | py | Python | .leetcode/756.pyramid-transition-matrix.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/756.pyramid-transition-matrix.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/756.pyramid-transition-matrix.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=756 lang=python3
#
# [756] Pyramid Transition Matrix
#
# https://leetcode.com/problems/pyramid-transition-matrix/description/
#
# algorithms
# Medium (55.92%)
# Likes: 422
# Dislikes: 410
# Total Accepted: 25.9K
# Total Submissions: 46.7K
# Testcase Example: '"BCD"\n["BCC","CDE","CEA","FFF"... | 29.214286 | 79 | 0.550122 |
38a70396ea9d7232e818b452340bf0ebaffb871c | 179 | py | Python | orbital/urls.py | giamtoro/Orbital-AR-Technology-Orbital-Sky | 0d7132d22f154b975af8096cf66e8493c272493c | [
"MIT"
] | null | null | null | orbital/urls.py | giamtoro/Orbital-AR-Technology-Orbital-Sky | 0d7132d22f154b975af8096cf66e8493c272493c | [
"MIT"
] | null | null | null | orbital/urls.py | giamtoro/Orbital-AR-Technology-Orbital-Sky | 0d7132d22f154b975af8096cf66e8493c272493c | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns=[
path('',views.home, name='home'),
path('vr',views.vr, name='vr'),
path('geo',views.geo, name='geo'),
] | 19.888889 | 38 | 0.625698 |
38a70ab0f92921ec3b5f8a2c33798cb56fc8f94a | 1,046 | py | Python | tests/sdk/queries/fileevents/filters/test_activity_filter.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | 21 | 2020-04-21T20:33:08.000Z | 2022-02-24T19:09:52.000Z | tests/sdk/queries/fileevents/filters/test_activity_filter.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | 255 | 2020-03-31T18:56:17.000Z | 2022-03-29T17:16:54.000Z | tests/sdk/queries/fileevents/filters/test_activity_filter.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | 14 | 2020-03-31T19:11:26.000Z | 2022-03-14T20:42:51.000Z | from tests.sdk.queries.conftest import IS
from py42.sdk.queries.fileevents.filters.activity_filter import RemoteActivity
from py42.sdk.queries.fileevents.filters.activity_filter import TrustedActivity
def test_risk_indicator_mime_type_is_true_str_gives_correct_json_representation():
_filter = RemoteActivity.is_t... | 36.068966 | 86 | 0.795411 |
38a7316bd643cfbdcc36085f874f663fed02658e | 2,307 | py | Python | test/redis/_compat.py | bianhaoyi/neproxy | 9c2c9e32ab84e9a91696c8754ffd2904888347d1 | [
"Apache-2.0"
] | 7 | 2016-01-14T15:53:59.000Z | 2021-08-25T03:47:10.000Z | test/redis/_compat.py | bianhaoyi/neproxy | 9c2c9e32ab84e9a91696c8754ffd2904888347d1 | [
"Apache-2.0"
] | 1 | 2019-03-11T12:14:08.000Z | 2019-03-11T12:14:32.000Z | test/redis/_compat.py | bianhaoyi/neproxy | 9c2c9e32ab84e9a91696c8754ffd2904888347d1 | [
"Apache-2.0"
] | 9 | 2015-04-14T10:18:46.000Z | 2018-12-20T08:18:21.000Z | """Internal module for Python 2 backwards compatibility."""
import sys
if sys.version_info[0] < 3:
from urlparse import urlparse
from itertools import imap, izip
from string import letters as ascii_letters
from Queue import Queue
try:
from cStringIO import StringIO as BytesIO
except Im... | 28.8375 | 76 | 0.616385 |
38a736c449260489dfffea51219075adac511c2a | 1,686 | py | Python | lymph/discovery/static.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 89 | 2015-03-01T11:39:55.000Z | 2022-01-31T22:00:15.000Z | lymph/discovery/static.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 214 | 2015-01-02T23:48:49.000Z | 2020-01-14T10:47:37.000Z | lymph/discovery/static.py | MislavStipetic/lymph | aa36a688380e5665fdea31fda76b4a0cf35b6fc0 | [
"Apache-2.0"
] | 36 | 2015-01-13T13:44:15.000Z | 2021-09-15T17:55:41.000Z | from .base import BaseServiceRegistry, SERVICE_NAMESPACE
from lymph.exceptions import LookupFailure
class StaticServiceRegistryHub(object):
def __init__(self):
self.registry = {}
def create_registry(self):
return StaticServiceRegistry(self)
def lookup(self, service, **kwargs):
se... | 32.423077 | 79 | 0.671412 |
38a763ba3696fb76e004746a216879a48057a061 | 2,145 | py | Python | ucb_cs61A/projects/maps/tests/02.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | null | null | null | ucb_cs61A/projects/maps/tests/02.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2017-07-31T08:15:26.000Z | 2017-07-31T08:15:26.000Z | ucb_cs61A/projects/maps/tests/02.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2019-10-06T16:52:31.000Z | 2019-10-06T16:52:31.000Z | test = {
'name': 'Problem 2',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
>>> woz_reviews = [make_review('Wozniak Lounge', 4),
... make_review('Wozniak Lounge', 3),
... make_review('Wozniak Lounge', 5)]
>>> ... | 32.5 | 130 | 0.475991 |
38a7c0b2a27f3ad7b1307d61fb4ab2749d4f6ee8 | 2,377 | py | Python | dl_data_validation_toolset/framework/configuration.py | kwierman/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | 1 | 2017-08-24T00:46:47.000Z | 2017-08-24T00:46:47.000Z | dl_data_validation_toolset/framework/configuration.py | kwierman/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | 177 | 2017-04-10T23:03:27.000Z | 2022-03-28T22:07:54.000Z | dl_data_validation_toolset/framework/configuration.py | HEP-DL/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | null | null | null | import logging
import json
import os
class Group:
"""
Defines a named group of files.
example instantiation:
.. code_block: python
g= Group("myfile.h5",'/points/to/your/dir/','my_group')
"""
def __init__(self, file, base_dir, name):
self.group = name
self.files = [file, ]
self.... | 28.987805 | 71 | 0.599074 |
38a7d05e7f46b584356559fabed84a5272072c46 | 10,185 | py | Python | envs/mujoco/ant.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | 1 | 2019-11-17T11:05:26.000Z | 2019-11-17T11:05:26.000Z | envs/mujoco/ant.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | null | null | null | envs/mujoco/ant.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | null | null | null | import numpy as np
from gym.envs.mujoco import AntEnv as AntEnv_
class AntEnv(AntEnv_):
@property
def action_scaling(self):
if (not hasattr(self, 'action_space')) or (self.action_space is None):
return 1.0
if self._action_scaling is None:
lb, ub = self.action_sp... | 43.340426 | 124 | 0.626215 |
38a800ccf420473142bcea69d7033dfc242d6ed9 | 152 | py | Python | lang/python/issue/lambda.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 8 | 2015-06-07T13:25:48.000Z | 2022-03-22T23:14:50.000Z | lang/python/issue/lambda.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 30 | 2016-01-29T01:36:41.000Z | 2018-09-19T07:01:22.000Z | lang/python/issue/lambda.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | null | null | null | # whether lambda function could raise Exception
# Yes, for this test case
f0 = lambda : return False
f1 = lambda: return FFalse
print f0()
print f1()
| 16.888889 | 47 | 0.730263 |
38a8181ed5c0474062640cb8571e1aa5db1c0d30 | 7,383 | py | Python | server/generateconfig.py | ehackify/hnp | ba0e10e9ca390616dfa3888ceafc94672f41d26d | [
"MIT"
] | 2 | 2020-04-29T09:58:21.000Z | 2020-05-08T20:23:33.000Z | server/generateconfig.py | ehackify/hnp | ba0e10e9ca390616dfa3888ceafc94672f41d26d | [
"MIT"
] | 1 | 2020-05-01T11:00:58.000Z | 2020-05-01T11:00:58.000Z | server/generateconfig.py | ehackify/hnp | ba0e10e9ca390616dfa3888ceafc94672f41d26d | [
"MIT"
] | null | null | null | """
This is a helper script meant to generate a
working config.py file from the config template.
"""
from getpass import getpass
import json
import os.path
from random import choice
import string
import sys
from urllib2 import urlopen
import argparse
el = string.ascii_letters + string.digits
rand_str = lambda n: ''... | 39.908108 | 111 | 0.629554 |
38a894ce00a2936d94e97a65669ecb1bf84d7714 | 151 | py | Python | listmethods/listmeth01.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | listmethods/listmeth01.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | listmethods/listmeth01.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
proto = ["ssh", "http", "https"]
print(proto)
print(proto[1])
proto.extend("dns") # this line will add d, n, and s
print(proto)
| 21.571429 | 52 | 0.655629 |
38a8aa64e9f059d9c44fa8c3d58f2cbb615ab310 | 1,505 | py | Python | aqua_test/api/slack.py | behara/AquaRepo | cfd4316272c09d0c95621b538c27be608be9a940 | [
"MIT"
] | 25 | 2017-10-23T09:22:06.000Z | 2021-09-15T11:04:51.000Z | aqua_test/api/slack.py | behara/AquaRepo | cfd4316272c09d0c95621b538c27be608be9a940 | [
"MIT"
] | 37 | 2017-10-18T15:40:18.000Z | 2021-12-19T12:59:29.000Z | aqua_test/api/slack.py | behara/AquaRepo | cfd4316272c09d0c95621b538c27be608be9a940 | [
"MIT"
] | 17 | 2017-10-19T08:39:09.000Z | 2021-11-01T09:35:05.000Z | '''
Module for slack API.
'''
import requests
from boss.config import get as get_config
from boss.core import notification
from boss.core.util.func import as_is
def send(notif_type, **params):
''' Send slack notifications. '''
url = slack_url(config()['base_url'], config()['endpoint'])
(text, color) = n... | 20.902778 | 75 | 0.581395 |
38a8c562729f8bfe3c377f64ccd9641fac0d031f | 56,383 | py | Python | synapse/tests/utils.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | 1 | 2021-02-15T22:07:05.000Z | 2021-02-15T22:07:05.000Z | synapse/tests/utils.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | null | null | null | synapse/tests/utils.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | null | null | null | '''
This contains the core test helper code used in Synapse.
This gives the opportunity for third-party users of Synapse to test their
code using some of the same helpers used to test Synapse.
The core class, synapse.tests.utils.SynTest is a subclass of unittest.TestCase,
with several wrapper functions to allow for e... | 31.082139 | 120 | 0.549137 |
38a8d3566f35ad00ac55a9edaedb8d682c0b2198 | 3,055 | py | Python | Assignment1/traceroute.py | zuhaib786/COL334_Assignments | 802a0228413223a3a0a1dcc0754791fb0a8a99fe | [
"MIT"
] | null | null | null | Assignment1/traceroute.py | zuhaib786/COL334_Assignments | 802a0228413223a3a0a1dcc0754791fb0a8a99fe | [
"MIT"
] | null | null | null | Assignment1/traceroute.py | zuhaib786/COL334_Assignments | 802a0228413223a3a0a1dcc0754791fb0a8a99fe | [
"MIT"
] | null | null | null | import subprocess
import re
import time
import matplotlib
import matplotlib.pyplot as plt
class Traceroute:
def __init__(self, destination, count):
self.destination = destination
self.version = "-4"
self.data =[]
self.RTT = []
self.count = count
def run(self):
for... | 41.849315 | 92 | 0.448118 |
38a8e1c7b83026f0289561eb0ad2e5fba8403843 | 13,274 | py | Python | asposewordscloud/models/drawing_object_update.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/drawing_object_update.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/drawing_object_update.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="drawing_object_update.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
#... | 38.812865 | 176 | 0.620009 |
38a90df66da6948a15bbff40ede7b1e649459627 | 449 | py | Python | onadata/libs/utils/quick_converter.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 87 | 2015-02-10T23:36:28.000Z | 2022-01-31T00:51:10.000Z | onadata/libs/utils/quick_converter.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 443 | 2015-04-28T18:50:25.000Z | 2022-03-31T03:29:43.000Z | onadata/libs/utils/quick_converter.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 122 | 2015-01-13T16:27:44.000Z | 2022-01-24T09:35:56.000Z | # coding: utf-8
from django import forms
from django.utils.translation import ugettext_lazy
from onadata.apps.viewer.models.data_dictionary import DataDictionary
class QuickConverter(forms.Form):
xls_file = forms.FileField(label=ugettext_lazy("XLS File"))
def publish(self, user):
if self.is_valid():... | 28.0625 | 69 | 0.697105 |
38a919e9cc9b8d41170e5e64f3969ebcf5e3292d | 8,982 | py | Python | Python/lock_arg_parse.py | Suraj-Rajesh/code | 3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9 | [
"MIT"
] | null | null | null | Python/lock_arg_parse.py | Suraj-Rajesh/code | 3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9 | [
"MIT"
] | null | null | null | Python/lock_arg_parse.py | Suraj-Rajesh/code | 3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9 | [
"MIT"
] | null | null | null | #!/bin/python
import os
import pwd
import grp
import sys
import time
import errno
import fcntl
import string
import shutil
import random
import logging
import tarfile
import argparse
import contextlib
from subprocess import Popen, PIPE
#
# When this is called as a process(subprocess.Popen()) in other components
# PYTH... | 31.079585 | 89 | 0.596526 |
38a9473965e8cd64c470d7d785139a813ce5d107 | 7,151 | py | Python | satella/coding/concurrent/futures/futures.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 12 | 2019-12-13T10:17:38.000Z | 2022-01-05T09:01:36.000Z | satella/coding/concurrent/futures/futures.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 26 | 2016-04-01T11:55:26.000Z | 2021-12-30T17:03:59.000Z | satella/coding/concurrent/futures/futures.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 1 | 2021-05-31T08:45:22.000Z | 2021-05-31T08:45:22.000Z | import concurrent.futures._base
import logging
import typing as tp
from concurrent.futures import Future as PythonFuture
from concurrent.futures._base import CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED
from satella.coding.typing import T
try:
from concurrent.futures import InvalidStateError
except ImportError:
... | 31.502203 | 94 | 0.61418 |
38a9546cd99e2e12ca8cbc7e50ae83029b7a5086 | 3,250 | py | Python | tests/fpga/hbm_deeply_nested_fpga_test.py | thobauma/dace | 668e4c49e476437e1ea3b272e9dbefca2b92d2e7 | [
"BSD-3-Clause"
] | null | null | null | tests/fpga/hbm_deeply_nested_fpga_test.py | thobauma/dace | 668e4c49e476437e1ea3b272e9dbefca2b92d2e7 | [
"BSD-3-Clause"
] | null | null | null | tests/fpga/hbm_deeply_nested_fpga_test.py | thobauma/dace | 668e4c49e476437e1ea3b272e9dbefca2b92d2e7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import dace
from dace.fpga_testing import xilinx_test
from dace import subsets as sbs, dtypes, memlet as mem
from dace import subsets
import numpy as np
# A test checking HBM in the context of nested maps and nested sdfgs
def create_deeply_n... | 37.790698 | 78 | 0.553231 |
38a96374272c14baa145f34b848f5006d045dbba | 2,344 | py | Python | iconmanager.py | EdvardasDlugauskas/Auto-Rain | 40c992a0253cc7affead821a3a31982b77c5027e | [
"MIT"
] | 1 | 2019-01-07T17:10:25.000Z | 2019-01-07T17:10:25.000Z | iconmanager.py | EdvardasDlugauskas/Auto-Rain | 40c992a0253cc7affead821a3a31982b77c5027e | [
"MIT"
] | null | null | null | iconmanager.py | EdvardasDlugauskas/Auto-Rain | 40c992a0253cc7affead821a3a31982b77c5027e | [
"MIT"
] | null | null | null | from os import path, listdir
from kivy.core.image import Image as CoreImage
from icon_get import get_urls, url_to_bytes, crop_icon_back, core_img_from_url
class UrlBytes:
def __init__(self, url, bytes):
self.url = url
self.bytes = bytes
class IconManager:
"""
Manages the icons for an app.
"""
# TODO: use... | 23.44 | 107 | 0.729522 |
38a966803a4c265c933182395a7245dbb7985573 | 4,373 | py | Python | yardstick/benchmark/scenarios/availability/attacker/attacker_general.py | kkltcjk/kklt | 5388eb439616a442dde496ef77ba6b71169369e0 | [
"Apache-2.0"
] | null | null | null | yardstick/benchmark/scenarios/availability/attacker/attacker_general.py | kkltcjk/kklt | 5388eb439616a442dde496ef77ba6b71169369e0 | [
"Apache-2.0"
] | null | null | null | yardstick/benchmark/scenarios/availability/attacker/attacker_general.py | kkltcjk/kklt | 5388eb439616a442dde496ef77ba6b71169369e0 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2016 Juan Qiu and others
# juan_ qiu@tongji.edu.cn
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distributi... | 43.29703 | 79 | 0.596387 |
38a96c5605f1352a69f699e92d32210b911fedf2 | 6,802 | py | Python | src/Bert_optimization.py | trib-plan/TriB-QA | 996c763ac0bc5f69ce04a60376d5b3a3d5face3b | [
"MIT"
] | 48 | 2019-03-11T12:57:41.000Z | 2022-01-25T09:17:32.000Z | src/Bert_optimization.py | BarryZM/TriB-QA | 996c763ac0bc5f69ce04a60376d5b3a3d5face3b | [
"MIT"
] | 3 | 2019-04-10T09:47:13.000Z | 2019-07-18T12:53:10.000Z | src/Bert_optimization.py | BarryZM/TriB-QA | 996c763ac0bc5f69ce04a60376d5b3a3d5face3b | [
"MIT"
] | 8 | 2019-03-19T08:44:58.000Z | 2020-04-08T10:08:21.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team.
#
# 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/LICENS... | 41.987654 | 116 | 0.577771 |
38a96def40c9e5dbd43ed5093262b87b79e90b74 | 4,690 | py | Python | src/toil/batchSystems/mesos/test/__init__.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 516 | 2015-07-30T19:08:55.000Z | 2018-07-03T20:53:42.000Z | src/toil/batchSystems/mesos/test/__init__.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 1,949 | 2015-07-29T23:38:49.000Z | 2018-07-05T12:42:04.000Z | src/toil/batchSystems/mesos/test/__init__.py | gmloose/toil | a82834073b28f66747c5c3ac99d1a678b82d2290 | [
"Apache-2.0"
] | 193 | 2015-07-31T18:52:57.000Z | 2018-07-05T08:54:11.000Z | import logging
import shutil
import subprocess
import threading
import time
from abc import ABCMeta, abstractmethod
from contextlib import closing
from shutil import which
from urllib.request import urlopen
from toil.lib.retry import retry
from toil.lib.threading import ExceptionalThread, cpu_count
log = logging.getL... | 36.929134 | 100 | 0.573774 |
38a9891c1ed5cf5b3c0c9127391a91763d0ff3d8 | 673 | py | Python | p3d/__init__.py | Derfies/p3d | 93ff52819d778643afe1dc1ccf296e99fc52c59d | [
"MIT"
] | null | null | null | p3d/__init__.py | Derfies/p3d | 93ff52819d778643afe1dc1ccf296e99fc52c59d | [
"MIT"
] | null | null | null | p3d/__init__.py | Derfies/p3d | 93ff52819d778643afe1dc1ccf296e99fc52c59d | [
"MIT"
] | null | null | null | from pandac.PandaModules import Vec3
P3D_VERSION = '0.1'
__version__ = P3D_VERSION
from constants import *
from functions import *
import commonUtils
from object import Object
from singleTask import SingleTask
from nodePathObject import NodePathObject
from pandaObject import *
from pandaBehaviour import PandaBeh... | 21.03125 | 41 | 0.827637 |
38a997ab28ed3a2694d36c9136f7df9927e575ee | 2,187 | py | Python | examples/dqn_series_current_control.py | zizai/gym-electric-motor | 48a0232edf3474e441453126df0f52dc391aed11 | [
"MIT"
] | null | null | null | examples/dqn_series_current_control.py | zizai/gym-electric-motor | 48a0232edf3474e441453126df0f52dc391aed11 | [
"MIT"
] | null | null | null | examples/dqn_series_current_control.py | zizai/gym-electric-motor | 48a0232edf3474e441453126df0f52dc391aed11 | [
"MIT"
] | null | null | null | from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten, LeakyReLU
from keras.optimizers import Adamax, Adam
from rl.agents.dqn import DQNAgent
from rl.policy import MaxBoltzmannQPolicy, LinearAnnealedPolicy, EpsGreedyQPolicy
from rl.memory import SequentialMemory
from gym.wrappers... | 43.74 | 111 | 0.704161 |
38aa1a85ef59028cfab190e5617ef3014693a458 | 2,153 | py | Python | .leetcode/459.repeated-substring-pattern.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/459.repeated-substring-pattern.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/459.repeated-substring-pattern.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=459 lang=python3
#
# [459] Repeated Substring Pattern
#
# https://leetcode.com/problems/repeated-substring-pattern/description/
#
# algorithms
# Easy (43.44%)
# Likes: 2746
# Dislikes: 262
# Total Accepted: 208.5K
# Total Submissions: 480.1K
# Testcase Example: '"abab"'
#
# Given a string s... | 17.941667 | 78 | 0.598235 |
38aa1fc8d43f6af574492d28e637e48f60f179bf | 3,426 | py | Python | applications/gestor/controllers/default.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/gestor/controllers/default.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/gestor/controllers/default.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
# -------------------------------------------------------------------------
# This is a sample controller
# - index is the default action of any application
# - user is required for authentication and authorization
... | 36.446809 | 102 | 0.615879 |
38aa423d90cff547562334fb174d3a6efbcdf2d8 | 1,842 | py | Python | instascrape/scrapers/profile.py | fo0nikens/instascrape | 699dd2169a96438d1d71bce5b1401fd5c5f0e531 | [
"MIT"
] | 1 | 2021-03-10T03:36:43.000Z | 2021-03-10T03:36:43.000Z | instascrape/scrapers/profile.py | fo0nikens/instascrape | 699dd2169a96438d1d71bce5b1401fd5c5f0e531 | [
"MIT"
] | null | null | null | instascrape/scrapers/profile.py | fo0nikens/instascrape | 699dd2169a96438d1d71bce5b1401fd5c5f0e531 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import List
import warnings
from instascrape.core._mappings import _PostMapping, _ProfileMapping
from instascrape.core._static_scraper import _StaticHtmlScraper
from instascrape.scrapers.post import Post
warnings.simplefilter('always', DeprecationWarning)
class Profile... | 30.7 | 163 | 0.639522 |
38aa766aef0882853209f8e7871dba13c2eee261 | 1,070 | py | Python | tests/test_views.py | briefmnews/django-podle | 124628449b839b8ae3b3e3e5d5c11397fddc960b | [
"MIT"
] | null | null | null | tests/test_views.py | briefmnews/django-podle | 124628449b839b8ae3b3e3e5d5c11397fddc960b | [
"MIT"
] | 1 | 2021-08-06T04:03:15.000Z | 2021-12-19T19:14:05.000Z | tests/test_views.py | briefmnews/django-podle | 124628449b839b8ae3b3e3e5d5c11397fddc960b | [
"MIT"
] | null | null | null | import json
import pytest
from podle.views import NewsletterWebhook
pytestmark = pytest.mark.django_db()
class TestNewsletterWebhook:
def test_post_works(self, newsletter, request_builder):
# GIVEN
assert not newsletter.audio_url
filename = "tests/fixtures/webhook.json"
with open... | 26.75 | 73 | 0.661682 |
38aa88b0ee7f6d56cc519558af8b298a6bbc177a | 6,905 | py | Python | src/modules/wifi/dos.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 46 | 2020-04-18T16:42:59.000Z | 2022-01-31T22:08:52.000Z | src/modules/wifi/dos.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | null | null | null | src/modules/wifi/dos.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 11 | 2020-04-23T12:46:18.000Z | 2022-02-04T12:53:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*- ########################################################
# ____ _ __ #
# ___ __ __/ / /__ ___ ______ ______(_) /___ __ #
# / _ \/ // / / (_-</ -_) __/ // / __/ / __/ // / ... | 29.382979 | 80 | 0.490369 |
38aa9a2ccd6f3e7774787c538e27973bce519ea2 | 3,883 | py | Python | cli/iotexetl/exporters/iotex_item_exporter.py | blockchain-etl/iotex-etl | bd350c3190acac35d17532eff383e05d08011e24 | [
"MIT"
] | 3 | 2020-07-04T13:53:38.000Z | 2020-07-30T15:07:35.000Z | cli/iotexetl/exporters/iotex_item_exporter.py | blockchain-etl/iotex-etl | bd350c3190acac35d17532eff383e05d08011e24 | [
"MIT"
] | 13 | 2020-07-16T06:07:33.000Z | 2020-08-20T10:35:10.000Z | cli/iotexetl/exporters/iotex_item_exporter.py | blockchain-etl/iotex-etl | bd350c3190acac35d17532eff383e05d08011e24 | [
"MIT"
] | 1 | 2021-01-20T10:06:20.000Z | 2021-01-20T10:06:20.000Z | # MIT License
#
# Copyright (c) 2020 Evgeny Medvedev, evge.medvedev@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | 41.752688 | 100 | 0.70667 |
38aacb60d9c3503d145aba56d775c8335403ca62 | 2,832 | py | Python | wizard/views/json/step/example/step_3.py | olivierpons/evalr | 7c76474ad41769804965a11550501321d7b1889b | [
"MIT"
] | null | null | null | wizard/views/json/step/example/step_3.py | olivierpons/evalr | 7c76474ad41769804965a11550501321d7b1889b | [
"MIT"
] | null | null | null | wizard/views/json/step/example/step_3.py | olivierpons/evalr | 7c76474ad41769804965a11550501321d7b1889b | [
"MIT"
] | null | null | null | from django.utils.translation import ugettext_lazy as _
from wizard.views.json.base import WizardBase
class WizardStepExampleStep3(WizardBase):
description = _("Step 3")
breadcrumb = _("Step 3")
def get_content(self, request, wz_user_step, data, **kwargs):
"""
Args:
request: ... | 36.307692 | 79 | 0.561441 |
38aaeca6b575f05ccd2e226bd2185572b4f27e1b | 17,450 | py | Python | cogs/stat_commands.py | CalmingAgent/Pew-Pew-Test | fed527ca7b83dafd1960c2daf4a0e616e56354ca | [
"MIT"
] | null | null | null | cogs/stat_commands.py | CalmingAgent/Pew-Pew-Test | fed527ca7b83dafd1960c2daf4a0e616e56354ca | [
"MIT"
] | null | null | null | cogs/stat_commands.py | CalmingAgent/Pew-Pew-Test | fed527ca7b83dafd1960c2daf4a0e616e56354ca | [
"MIT"
] | null | null | null | import nextcord
from nextcord import utils
from nextcord.ext import commands
import sys
import random
#parent directory import
sys.path.append('DatabaseRelated')
sys.path.append('cogs')
import mongodb
from player import Player
import operator
class Statistic(commands.Cog):
"""Statistic Commands"""
def __ini... | 44.402036 | 157 | 0.458166 |
38aaf127dfd850ff94f9873c00890b77ea69e553 | 4,510 | py | Python | IMLearn/learners/classifiers/decision_stump.py | elad-schwartz/IML.HUJI | 1e304bdb94fbb4c0e8e3b3574e16578fcb66d1b9 | [
"MIT"
] | null | null | null | IMLearn/learners/classifiers/decision_stump.py | elad-schwartz/IML.HUJI | 1e304bdb94fbb4c0e8e3b3574e16578fcb66d1b9 | [
"MIT"
] | null | null | null | IMLearn/learners/classifiers/decision_stump.py | elad-schwartz/IML.HUJI | 1e304bdb94fbb4c0e8e3b3574e16578fcb66d1b9 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Tuple, NoReturn
from ...base import BaseEstimator
import numpy as np
from itertools import product
class DecisionStump(BaseEstimator):
"""
A decision stump classifier for {-1,1} labels according to the CART algorithm
Attributes
----------
self... | 33.656716 | 115 | 0.620177 |
38ab05f3fe73716dbbba4c5ae0ff75933dfcc6d9 | 6,532 | py | Python | SCRAPE/Lib/site-packages/twisted/internet/test/test_newtls.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/internet/test/test_newtls.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/internet/test/test_newtls.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.internet._newtls}.
"""
from twisted.internet import interfaces
from twisted.internet.test.connectionmixins import (
ConnectableProtocol,
runProtocolsWithReactor,
)
from twisted.internet.test.reactormixins import R... | 32.17734 | 88 | 0.659829 |
38ab1c393bb97968a488f5f477a42303c3b73493 | 3,523 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.260274 | 130 | 0.701107 |
38ab339b3d27652fa48ea32298dc098716ec39cb | 41,717 | py | Python | zproject/settings.py | PanSem/zulip | 20a6b4e288d9867aa17ffe04eaaca226995211c9 | [
"Apache-2.0"
] | 1 | 2020-02-28T11:26:19.000Z | 2020-02-28T11:26:19.000Z | zproject/settings.py | rishier827/zulip | d79a7a8c35bdfbe8dd776f8c0acb6069422d2d7c | [
"Apache-2.0"
] | null | null | null | zproject/settings.py | rishier827/zulip | d79a7a8c35bdfbe8dd776f8c0acb6069422d2d7c | [
"Apache-2.0"
] | null | null | null | # Django settings for zulip project.
########################################################################
# Here's how settings for the Zulip project work:
#
# * settings.py contains non-site-specific and settings configuration
# for the Zulip Django app.
# * settings.py imports prod_settings.py, and any site-speci... | 38.734448 | 126 | 0.640171 |
38ab41410fb1ac9e26e48e73d09c1d03f056910c | 1,364 | py | Python | slidemenu/GetEvent.py | tqian86/WTM | 192eb59df044adf1ccd602587eb14c9030a58368 | [
"MIT"
] | null | null | null | slidemenu/GetEvent.py | tqian86/WTM | 192eb59df044adf1ccd602587eb14c9030a58368 | [
"MIT"
] | null | null | null | slidemenu/GetEvent.py | tqian86/WTM | 192eb59df044adf1ccd602587eb14c9030a58368 | [
"MIT"
] | null | null | null | from pygame import time,event,mouse,MOUSEBUTTONDOWN,MOUSEBUTTONUP,NOEVENT
_Clic = [0,0,0,0,0,0]
_Ticks = [time.Clock(),time.Clock(),time.Clock(),time.Clock(),time.Clock(),time.Clock()]
LAPS = 200
_NoEvent_Clock = time.Clock()
_Inactiv = 0
ButtonDelay = 500
ButtonRepeat = 100
_ButtonTick = ButtonDelay
def wait():
... | 28.416667 | 112 | 0.622434 |
38ab56367b17e2b24ca598afb7038d4500949eef | 1,802 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/token_password_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/token_password_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/models/token_password_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.333333 | 88 | 0.610433 |
38ab5f50322465535df50b91ec65d945f9831a44 | 13,496 | py | Python | padertorch/contrib/je/modules/conv_utils.py | sibange/padertorch | 494692d877f04c66847c2943795b23aea488217d | [
"MIT"
] | 62 | 2019-12-22T08:30:29.000Z | 2022-03-22T11:02:59.000Z | padertorch/contrib/je/modules/conv_utils.py | sibange/padertorch | 494692d877f04c66847c2943795b23aea488217d | [
"MIT"
] | 47 | 2020-01-06T09:23:47.000Z | 2022-01-24T16:55:06.000Z | padertorch/contrib/je/modules/conv_utils.py | sibange/padertorch | 494692d877f04c66847c2943795b23aea488217d | [
"MIT"
] | 13 | 2019-12-16T08:12:46.000Z | 2021-11-08T14:37:06.000Z | import math
import numpy as np
import torch.nn.functional as F
from padertorch.base import Module
from padertorch.ops.mappings import ACTIVATION_FN_MAP
from padertorch.utils import to_list
from torch import nn
class Pad(Module):
"""
Adds padding of a certain size either to front, end or both.
"""
def... | 36.377358 | 123 | 0.595954 |
38ab650248be349d5a89ba7b901500679ed9ac1f | 3,789 | py | Python | astwro/tools/slconvert.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 6 | 2017-06-15T20:34:51.000Z | 2020-04-15T14:21:43.000Z | astwro/tools/slconvert.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 18 | 2017-08-15T20:53:55.000Z | 2020-10-05T23:40:34.000Z | astwro/tools/slconvert.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 2 | 2017-11-06T15:33:53.000Z | 2020-10-02T21:06:05.000Z | #! /usr/bin/env python
# coding=utf-8
"""Copy this skeleton to start new tool
"""
from __future__ import print_function, division
# GLOBAL IMPORTS HERE
import __commons as commons
import astwro.starlist as sl
from sys import stdin, stdout, stderr
def __do(arg):
# TODO: __do arguments - in/out files/streams
i ... | 36.786408 | 101 | 0.623911 |
38ab9425b38eb874fa69b916a40d9c18e2011655 | 9,983 | py | Python | leo/external/npyscreen/wgboxwidget.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/external/npyscreen/wgboxwidget.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/external/npyscreen/wgboxwidget.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | #@+leo-ver=5-thin
#@+node:ekr.20170428084207.503: * @file ../external/npyscreen/wgboxwidget.py
import curses
import weakref
from .wgwidget import Widget
from .wgmultiline import MultiLine
import leo.core.leoGlobals as g
assert g
# pylint: disable=no-member
#@+others
#@+node:ekr.20170428084207.505: ** class BoxBasic
cla... | 39.615079 | 121 | 0.620555 |
38aba6f68a28aec20dbdaf6544f34e405e058f6b | 10,607 | py | Python | nova_rover_demos/SLAM/fastSLAM.py | matthomas15/novaRoverDemos | 1c5386edb7c4061f663a2eaa802becb8936af237 | [
"MIT"
] | 11 | 2019-09-19T07:39:47.000Z | 2021-09-14T05:48:22.000Z | nova_rover_demos/SLAM/fastSLAM.py | matthomas15/novaRoverDemos | 1c5386edb7c4061f663a2eaa802becb8936af237 | [
"MIT"
] | 8 | 2019-09-19T11:43:09.000Z | 2020-12-11T07:41:50.000Z | nova_rover_demos/SLAM/fastSLAM.py | JmcRobbie/novaRoverDemos | b6a39b3607ba3f3e81fd3afd2600778fcaa85e5a | [
"MIT"
] | 9 | 2019-08-19T06:32:02.000Z | 2020-07-31T05:09:14.000Z | '''
Implementation of the fast slam algorithm
For a step by step implementation please check the Jupyter Notebook
NOTE:
We do not own the entire code
The majority of the code is taken from the Python Robotics Repo
https://github.com/AtsushiSakai/PythonRobotics
'''
import math
import matplotlib.pyplot as plt
impo... | 28.901907 | 86 | 0.584708 |
38abb586fb8050457688ccd16ad3e1cd716b73a0 | 484 | py | Python | flask_resources/deserializers/deserializers.py | fenekku/flask-resources | 47a6672a771b7c209199a2613ae6da9d96a70a5b | [
"MIT"
] | null | null | null | flask_resources/deserializers/deserializers.py | fenekku/flask-resources | 47a6672a771b7c209199a2613ae6da9d96a70a5b | [
"MIT"
] | null | null | null | flask_resources/deserializers/deserializers.py | fenekku/flask-resources | 47a6672a771b7c209199a2613ae6da9d96a70a5b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
# Copyright (C) 2020 Northwestern University.
#
# Flask-Resources is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Deserializers required interfaces."""
class DeserializerMixin:
... | 26.888889 | 76 | 0.694215 |
38abcccecd6336f10bb0c4d7250db35e43b1e007 | 3,174 | py | Python | improver_tests/utilities/cube_manipulation/test_collapsed.py | VictoriaLouiseS/improver | 86470bff973e21fbd5f24e26047871ad3bc2f3db | [
"BSD-3-Clause"
] | null | null | null | improver_tests/utilities/cube_manipulation/test_collapsed.py | VictoriaLouiseS/improver | 86470bff973e21fbd5f24e26047871ad3bc2f3db | [
"BSD-3-Clause"
] | 3 | 2020-04-25T12:55:42.000Z | 2020-07-23T11:50:46.000Z | improver_tests/utilities/cube_manipulation/test_collapsed.py | Kat-90/improver | a5c31be3430df429ae38e7c16e267fcbc2af1858 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2020 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 38.707317 | 85 | 0.687146 |
38abdd87ccac4a68456b6367902468d0d6ac6311 | 425 | py | Python | backend/migrations/0008_alter_post_description.py | cmput404-project-2021fall/CMPUT404-project-socialdistribution | bbf002e827cda52b443f610139c7c2c5d6003292 | [
"Apache-2.0"
] | null | null | null | backend/migrations/0008_alter_post_description.py | cmput404-project-2021fall/CMPUT404-project-socialdistribution | bbf002e827cda52b443f610139c7c2c5d6003292 | [
"Apache-2.0"
] | 2 | 2021-10-10T17:51:01.000Z | 2021-10-16T16:58:54.000Z | backend/migrations/0008_alter_post_description.py | cmput404-project-2021fall/CMPUT404-project-socialdistribution | bbf002e827cda52b443f610139c7c2c5d6003292 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.8 on 2021-12-05 04:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0007_alter_post_content'),
]
operations = [
migrations.AlterField(
model_name='post',
name='description',... | 22.368421 | 86 | 0.609412 |
38abddcaea188dde02e036dee74516a15526f072 | 678 | py | Python | project/user/models/user.py | fv316/flask-template-project | 026459b299c7aa4d82c2b59b98e3c929b4786a78 | [
"MIT"
] | 9 | 2017-02-08T21:42:15.000Z | 2021-12-15T05:18:18.000Z | project/user/models/user.py | fv316/flask-template-project | 026459b299c7aa4d82c2b59b98e3c929b4786a78 | [
"MIT"
] | 10 | 2016-07-25T11:00:08.000Z | 2019-09-25T14:56:40.000Z | project/user/models/user.py | fv316/flask-template-project | 026459b299c7aa4d82c2b59b98e3c929b4786a78 | [
"MIT"
] | 7 | 2016-11-01T20:11:03.000Z | 2020-02-04T14:25:49.000Z | # !/usr/bin/python
# -*- coding: utf-8 -*-
from project.database import Base
from sqlalchemy.orm import relationship
from sqlalchemy import Column, Integer, String
from flask_login import UserMixin
from project.user.models.rbac_user_mixin import UserMixin as RBACUserMixin
class User(RBACUserMixin, UserMixin, Base):
... | 29.478261 | 74 | 0.721239 |
38abec6a5df99249c8b9d3e6ea033f7304dcbd66 | 2,145 | py | Python | torchdata/datapipes/iter/util/rows2columnar.py | Nayef211/data | 66b7ac07f75c45f1cc6aed71423fdb5d29a9648f | [
"BSD-3-Clause"
] | null | null | null | torchdata/datapipes/iter/util/rows2columnar.py | Nayef211/data | 66b7ac07f75c45f1cc6aed71423fdb5d29a9648f | [
"BSD-3-Clause"
] | null | null | null | torchdata/datapipes/iter/util/rows2columnar.py | Nayef211/data | 66b7ac07f75c45f1cc6aed71423fdb5d29a9648f | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
from collections import defaultdict
from typing import List
from torch.utils.data import IterDataPipe, functional_datapipe
@functional_datapipe("rows2columnar")
class Rows2ColumnarIterDataPipe(IterDataPipe):
r"""
Iterable DataPipe that accepts an input DataP... | 43.77551 | 115 | 0.620979 |
38abf3a1976b58c15788d4ac889400bc05d0eaf1 | 2,107 | py | Python | utils/utils.py | haizaar/iris | 1efe07181cb0ec2307b1385d65160b534b40f9a7 | [
"MIT"
] | 50 | 2018-05-29T13:49:41.000Z | 2022-03-31T03:19:14.000Z | utils/utils.py | haizaar/iris | 1efe07181cb0ec2307b1385d65160b534b40f9a7 | [
"MIT"
] | 22 | 2018-06-25T13:39:53.000Z | 2021-02-02T08:30:55.000Z | utils/utils.py | haizaar/iris | 1efe07181cb0ec2307b1385d65160b534b40f9a7 | [
"MIT"
] | 7 | 2018-08-12T06:02:59.000Z | 2021-02-05T05:01:29.000Z | """Misc utils."""
import json
import logging
import os
import uuid
from google.appengine.api import app_identity
def detect_gae():
"""Determine whether or not we're running on GAE.
This is based on:
https://developers.google.com/appengine/docs/python/#The_Environment
Returns:
True iff we're... | 22.655914 | 77 | 0.616516 |
38ac0b872b7f9c1b9c01c31a3bed5a932b1e9ef0 | 9,898 | py | Python | plotly/tests/test_core/test_graph_reference/test_graph_reference.py | awesome-archive/plotly.py | 0af4ef6abd0fe9907268d266304de630f94cda60 | [
"MIT"
] | null | null | null | plotly/tests/test_core/test_graph_reference/test_graph_reference.py | awesome-archive/plotly.py | 0af4ef6abd0fe9907268d266304de630f94cda60 | [
"MIT"
] | null | null | null | plotly/tests/test_core/test_graph_reference/test_graph_reference.py | awesome-archive/plotly.py | 0af4ef6abd0fe9907268d266304de630f94cda60 | [
"MIT"
] | null | null | null | """
A module to test functionality related to *using* the graph reference.
"""
from __future__ import absolute_import
import json
import os
from pkg_resources import resource_string
from unittest import TestCase
import requests
import six
from nose.plugins.attrib import attr
from plotly import files, graph_referenc... | 36.523985 | 79 | 0.631845 |
38ac3874bb1972df555fc418a1e821002b4a727c | 18,266 | py | Python | crosperf/experiment_runner_unittest.py | khadas/android_external_toolchain-utils | 3690e025de8daaed03c4acb02d2b054e5c4c0dd5 | [
"BSD-3-Clause"
] | null | null | null | crosperf/experiment_runner_unittest.py | khadas/android_external_toolchain-utils | 3690e025de8daaed03c4acb02d2b054e5c4c0dd5 | [
"BSD-3-Clause"
] | null | null | null | crosperf/experiment_runner_unittest.py | khadas/android_external_toolchain-utils | 3690e025de8daaed03c4acb02d2b054e5c4c0dd5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
#
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tests for the experiment runner module."""
from __future__ import print_function
import StringIO
import getpass
import os... | 40.501109 | 94 | 0.641629 |
38ac4efbef40628cbd40c4bd0d8547c538c95f7a | 3,175 | py | Python | python/v2.4/dfareporting_utils.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | null | null | null | python/v2.4/dfareporting_utils.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | null | null | null | python/v2.4/dfareporting_utils.py | byagihas/googleads-dfa-reporting-samples | b525662330e0e2ca863458a4e530eccf868ac7eb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 33.776596 | 78 | 0.746142 |
38ac5b463e0d623ac8f003485934a332ed7d6ab7 | 5,958 | py | Python | mtp_bank_admin/apps/bank_admin/adi_config.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-bank-admin | b210cfd947ecdc7f50fd77f5023076ad400446b6 | [
"MIT"
] | 3 | 2016-01-05T12:21:44.000Z | 2016-12-22T15:57:49.000Z | mtp_bank_admin/apps/bank_admin/adi_config.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-bank-admin | b210cfd947ecdc7f50fd77f5023076ad400446b6 | [
"MIT"
] | 60 | 2015-08-13T12:44:38.000Z | 2022-02-01T17:36:05.000Z | mtp_bank_admin/apps/bank_admin/adi_config.py | uk-gov-mirror/ministryofjustice.money-to-prisoners-bank-admin | b210cfd947ecdc7f50fd77f5023076ad400446b6 | [
"MIT"
] | 2 | 2018-12-17T03:17:41.000Z | 2021-04-11T06:23:54.000Z | from django.conf import settings
from openpyxl import styles
ADI_JOURNAL_SHEET = 'WebADI'
ADI_DATE_CELL = 'E12'
ADI_DATE_FORMAT = '%d/%m/%y'
ADI_BATCH_NAME_CELL = 'E14'
ADI_BATCH_DATE_FORMAT = '%d%m%y'
ADI_BATCH_NAME_FORMAT = '578/MTP/%(date)s/%(initials)s'
DEFAULT_INITIALS = 'KB'
# journal table
ADI_JOURNAL_START_... | 27.711628 | 102 | 0.435045 |
38ac5ec83959fd4f1b71513010962d7a7aa9bc16 | 6,121 | py | Python | deep_rl/agent/FDR_A2C_ctrl_agent.py | mscott99/DeepRL_FDR | 284a84809992ce339ad84c175bb77e8df21ae972 | [
"MIT"
] | 1 | 2020-12-09T19:07:33.000Z | 2020-12-09T19:07:33.000Z | deep_rl/agent/FDR_A2C_ctrl_agent.py | mscott99/DeepRL_FDR | 284a84809992ce339ad84c175bb77e8df21ae972 | [
"MIT"
] | null | null | null | deep_rl/agent/FDR_A2C_ctrl_agent.py | mscott99/DeepRL_FDR | 284a84809992ce339ad84c175bb77e8df21ae972 | [
"MIT"
] | null | null | null | #######################################################################
# Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
################################... | 44.678832 | 109 | 0.637314 |
38ac8481695b68a89bdf239a9847d4b86420033a | 4,329 | py | Python | vl6180x.py | Badidzetai/VL6180X | 025e038ff69e49280716fe57455f45e5eb768e00 | [
"MIT"
] | 4 | 2018-11-07T12:44:05.000Z | 2022-03-30T18:41:05.000Z | vl6180x.py | Badidzetai/VL6180X | 025e038ff69e49280716fe57455f45e5eb768e00 | [
"MIT"
] | null | null | null | vl6180x.py | Badidzetai/VL6180X | 025e038ff69e49280716fe57455f45e5eb768e00 | [
"MIT"
] | 3 | 2018-08-02T03:49:41.000Z | 2021-11-02T12:45:04.000Z | import ustruct
import struct
import time
from machine import I2C
# i2c = I2C(0, I2C.MASTER, baudrate=100000, pins=('P8', 'P9'))
class Sensor:
def __init__(self, i2c, address=0x29):
self.i2c = i2c
self._address = address
self.default_settings()
self.init()
def myWrite16(self, r... | 36.686441 | 103 | 0.621853 |
38accaf9af66dcae4cda7149946990fac2ca6b8a | 243 | py | Python | math_and_algorithm/031.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | math_and_algorithm/031.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | math_and_algorithm/031.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | N = int(input())
A = list(map(int, input().split()))
dp1 = [0] * (N + 1)
dp2 = [0] * (N + 1)
for i in range(0, N):
dp1[i + 1] = dp2[i] + A[i]
dp2[i + 1] = max(dp1[i], dp2[i])
ans = max(dp1[N], dp2[N])
print(ans)
print(dp1)
print(dp2) | 18.692308 | 36 | 0.493827 |
38ace8211da04c2de7279f8b4e661ec20c246962 | 7,498 | py | Python | revelation/registers.py | futurecore/revelation | 859de37f5c3ecf5366cc7ba65900754862843366 | [
"BSD-3-Clause"
] | 4 | 2015-09-21T13:52:33.000Z | 2016-12-29T23:24:51.000Z | revelation/registers.py | futurecore/revelation | 859de37f5c3ecf5366cc7ba65900754862843366 | [
"BSD-3-Clause"
] | 59 | 2015-07-17T01:09:12.000Z | 2016-09-19T13:32:19.000Z | revelation/registers.py | futurecore/epiphany-simulator | 859de37f5c3ecf5366cc7ba65900754862843366 | [
"BSD-3-Clause"
] | 1 | 2015-08-01T00:42:03.000Z | 2015-08-01T00:42:03.000Z | from collections import OrderedDict
LOCAL_PC_ADDRESS = 0xf0408
def get_address_of_register_by_name(register_name):
for reg_index in reg_memory_map: # reg_memory_map at end of file.
if reg_memory_map[reg_index][2] == register_name:
return reg_memory_map[reg_index][0]
def get_register_size_b... | 48.374194 | 78 | 0.578288 |
38ad5c21d6b126550bb7da73ed75c250d3857119 | 15,521 | py | Python | cassiopeia-sqlstore/cassiopeia_sqlstore/match.py | meraki-analytics/cassiopeia-datastores | 38e84f56e17ff5ff17dd6439a131d12d258fb407 | [
"MIT"
] | 3 | 2017-11-22T20:38:18.000Z | 2018-09-04T07:48:55.000Z | cassiopeia-sqlstore/cassiopeia_sqlstore/match.py | meraki-analytics/cassiopeia-datastores | 38e84f56e17ff5ff17dd6439a131d12d258fb407 | [
"MIT"
] | 12 | 2018-06-05T16:08:36.000Z | 2020-11-26T19:16:59.000Z | cassiopeia-sqlstore/cassiopeia_sqlstore/match.py | meraki-analytics/cassiopeia-datastores | 38e84f56e17ff5ff17dd6439a131d12d258fb407 | [
"MIT"
] | 10 | 2017-11-14T18:59:10.000Z | 2020-09-17T15:18:29.000Z | from sqlalchemy import Table, Column, Integer, String, BigInteger, Boolean, ForeignKeyConstraint, Numeric
from decimal import Decimal
from cassiopeia.dto.match import MatchDto
from cassiopeia.dto.common import DtoObject
from .common import metadata, SQLBaseObject, map_object, foreignkey_options
class MatchParticip... | 42.291553 | 113 | 0.543586 |
38ada1465357c653dba12d94586a4645d4161cc4 | 7,888 | py | Python | Game.py | MPTG94/AI-HW2 | 1ef8ae1dfade4a6c79e4de1775825c292216bc0b | [
"MIT"
] | null | null | null | Game.py | MPTG94/AI-HW2 | 1ef8ae1dfade4a6c79e4de1775825c292216bc0b | [
"MIT"
] | null | null | null | Game.py | MPTG94/AI-HW2 | 1ef8ae1dfade4a6c79e4de1775825c292216bc0b | [
"MIT"
] | null | null | null | import numpy as np
import os
import random
import time
import utils
class Game:
def __init__(self, board, players_positions):
"""Initialize the game properties with parameters.
input:
- board: np.array. The initial board.
board size is 24 (0-23). 0- free space. 1= player1,... | 38.478049 | 147 | 0.59356 |
38adcf1ffa4f94cd56dc2a68a2602cd4a5b1e1f9 | 59,754 | py | Python | rest_server/cube_solver/solver.py | yangtianjian/easy_cube | b787a2b8c2478f3612b73b3253967dfb8fb53de6 | [
"MIT"
] | null | null | null | rest_server/cube_solver/solver.py | yangtianjian/easy_cube | b787a2b8c2478f3612b73b3253967dfb8fb53de6 | [
"MIT"
] | null | null | null | rest_server/cube_solver/solver.py | yangtianjian/easy_cube | b787a2b8c2478f3612b73b3253967dfb8fb53de6 | [
"MIT"
] | null | null | null | import numpy as np
from abc import ABCMeta, abstractmethod
from collections import deque
import kociemba
import pycuber as pc
from tqdm import tqdm, trange
import json
def get_face_map():
return {'D': 0, 'R': 1, 'B': 2, 'U': 3, 'L': 4, 'F': 5}
def get_inv_face_map():
fm = get_face_map()
return dict([(v, ... | 40.049598 | 141 | 0.526408 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.