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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e8a1727f6faaa6591d6404f576d482f69a3e927e | 1,026 | py | Python | kitchensink/data/routing.py | hhuuggoo/kitchensink | 1f81050fec7eace52e0b4e1b47851b649a4e4d33 | [
"BSD-3-Clause"
] | 2 | 2015-03-17T05:02:42.000Z | 2016-04-07T15:02:28.000Z | kitchensink/data/routing.py | hhuuggoo/kitchensink | 1f81050fec7eace52e0b4e1b47851b649a4e4d33 | [
"BSD-3-Clause"
] | null | null | null | kitchensink/data/routing.py | hhuuggoo/kitchensink | 1f81050fec7eace52e0b4e1b47851b649a4e4d33 | [
"BSD-3-Clause"
] | 1 | 2015-10-07T21:50:44.000Z | 2015-10-07T21:50:44.000Z |
def inspect(func_args, func_kwargs):
#fixme : circular import
from . import RemoteData
urls = set()
all_args = list(func_args) + func_kwargs.values()
for arg in all_args:
if isinstance(arg, RemoteData):
urls.add(arg.data_url)
return urls
def route(urls, hosts, infos, thre... | 29.314286 | 66 | 0.597466 |
e8a1ab3dbe5412a6c017b26828a6905e1141e341 | 14,578 | py | Python | src/sqlfluff/core/templaters/base.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | null | null | null | src/sqlfluff/core/templaters/base.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | null | null | null | src/sqlfluff/core/templaters/base.py | swanderz/sqlfluff | 668f23500ce5d06f4de67333a8957811c2df485f | [
"MIT"
] | 1 | 2021-03-07T21:49:52.000Z | 2021-03-07T21:49:52.000Z | """Defines the templaters."""
import logging
from typing import Dict, Iterator, List, Tuple, Optional, NamedTuple
_templater_lookup: Dict[str, "RawTemplater"] = {}
# Instantiate the templater logger
templater_logger = logging.getLogger("sqlfluff.templater")
def templater_selector(s=None, **kwargs):
"""Instanti... | 35.818182 | 96 | 0.602277 |
e8a1af3b5ea4d44b2ef5f1f81950b9b442f1bf57 | 5,582 | py | Python | examples/seismic/acoustic/acoustic_example.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | null | null | null | examples/seismic/acoustic/acoustic_example.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | null | null | null | examples/seismic/acoustic/acoustic_example.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | null | null | null | import numpy as np
from argparse import ArgumentParser
from devito.logger import info
from devito import Constant, Function, smooth, configuration
from examples.seismic.acoustic import AcousticWaveSolver
from examples.seismic import demo_model, AcquisitionGeometry
print('teste')
def acoustic_setup(shape=(50, 50, 50),... | 48.53913 | 85 | 0.634898 |
e8a1b6e978f19459358ce2b364f8ca06ac6dde2b | 7,378 | py | Python | doc/source/conf.py | micha2718l/pywt | 48e600641172e31e9fac734d218e58bec9f253ef | [
"MIT"
] | null | null | null | doc/source/conf.py | micha2718l/pywt | 48e600641172e31e9fac734d218e58bec9f253ef | [
"MIT"
] | null | null | null | doc/source/conf.py | micha2718l/pywt | 48e600641172e31e9fac734d218e58bec9f253ef | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# PyWavelets documentation build configuration file, created by
# sphinx-quickstart on Sun Mar 14 10:46:18 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 33.844037 | 171 | 0.725264 |
e8a1c387602ea3b28439e6f397ab0c176a0c8aaa | 83 | py | Python | 0x01-python-if_else_loops_functions/4-print_hexa.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x01-python-if_else_loops_functions/4-print_hexa.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x01-python-if_else_loops_functions/4-print_hexa.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
for x in range(0, 99):
print("{:d} = {}".format(x, hex(x)))
| 20.75 | 40 | 0.53012 |
e8a2215322ef09ebf49636ce4951e8f3c9bd62e4 | 451 | py | Python | veros/timer.py | AkasDutta/veros | 9f530596a0148a398829050017de3e01a71261a0 | [
"MIT"
] | 115 | 2019-11-23T02:31:30.000Z | 2022-03-29T12:58:30.000Z | veros/timer.py | AkasDutta/veros | 9f530596a0148a398829050017de3e01a71261a0 | [
"MIT"
] | 207 | 2019-11-21T13:21:22.000Z | 2022-03-31T23:36:09.000Z | veros/timer.py | AkasDutta/veros | 9f530596a0148a398829050017de3e01a71261a0 | [
"MIT"
] | 21 | 2020-01-28T13:13:39.000Z | 2022-02-02T13:46:33.000Z | import timeit
import threading
timer_context = threading.local()
timer_context.active = True
class Timer:
def __init__(self):
self.total_time = 0
self.last_time = 0
def __enter__(self):
self.start_time = timeit.default_timer()
def __exit__(self, *args, **kwargs):
self.la... | 21.47619 | 65 | 0.662971 |
e8a270174a4eba53e8ef61cf7e30173de70a65f1 | 155 | py | Python | dataclasses_serialization/serializer_base/errors.py | blfoster/python-dataclasses-serialization | 1a2d1fc15ca1800c2b4953fe5cb2557f37d1475d | [
"MIT"
] | 19 | 2019-04-15T15:57:20.000Z | 2021-07-09T07:01:12.000Z | dataclasses_serialization/serializer_base/errors.py | blfoster/python-dataclasses-serialization | 1a2d1fc15ca1800c2b4953fe5cb2557f37d1475d | [
"MIT"
] | 14 | 2019-08-01T13:03:53.000Z | 2021-04-20T13:26:54.000Z | dataclasses_serialization/serializer_base/errors.py | blfoster/python-dataclasses-serialization | 1a2d1fc15ca1800c2b4953fe5cb2557f37d1475d | [
"MIT"
] | 11 | 2019-06-13T21:38:55.000Z | 2022-02-28T08:53:20.000Z | __all__ = ["SerializationError", "DeserializationError"]
class SerializationError(TypeError):
pass
class DeserializationError(TypeError):
pass
| 15.5 | 56 | 0.767742 |
e8a271469025b620aada99384b5754c755d1668b | 4,525 | py | Python | pay-api/tests/unit/services/test_queue_publisher.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | pay-api/tests/unit/services/test_queue_publisher.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | pay-api/tests/unit/services/test_queue_publisher.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 37.708333 | 88 | 0.69326 |
e8a27e5d7aa275a78f4e680de1d6484a94aa450c | 6,796 | py | Python | tests/dummy_not_blank.py | TangoMan75/pyvalidator | 277743353bc03b660c420228d355d59f10f944b6 | [
"MIT"
] | null | null | null | tests/dummy_not_blank.py | TangoMan75/pyvalidator | 277743353bc03b660c420228d355d59f10f944b6 | [
"MIT"
] | null | null | null | tests/dummy_not_blank.py | TangoMan75/pyvalidator | 277743353bc03b660c420228d355d59f10f944b6 | [
"MIT"
] | null | null | null | #!/bin/python3
# -*- coding: utf-8 -*-
"""
This file is part of the TangoMan PyValidator package.
(c) "Matthias Morin" <mat@tangoman.io>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
"""
from typing import Optional
from pyvalidator.validator import Va... | 31.174312 | 77 | 0.545615 |
e8a27fa0d24336a8c30e92a64af0fa909fdd16c9 | 297 | py | Python | django_imager/imager_images/admin.py | marco-zangari/django-imager | 60bc3f12e567a18eb7bdea815c725a633f801e04 | [
"MIT"
] | null | null | null | django_imager/imager_images/admin.py | marco-zangari/django-imager | 60bc3f12e567a18eb7bdea815c725a633f801e04 | [
"MIT"
] | null | null | null | django_imager/imager_images/admin.py | marco-zangari/django-imager | 60bc3f12e567a18eb7bdea815c725a633f801e04 | [
"MIT"
] | 1 | 2018-01-03T04:20:14.000Z | 2018-01-03T04:20:14.000Z | from django.contrib import admin
from imager_images.models import Photo, Album
admin.site.register(Photo)
class AlbumInline(admin.TabularInline):
model = Album.photos.through
@admin.register(Album)
class AlbumAdmin(admin.ModelAdmin):
inlines = (AlbumInline,)
exclude = ('photos',) | 21.214286 | 45 | 0.757576 |
e8a29f8a72f88596557bfed1f73c830256053ad2 | 1,380 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/data/region_MP.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/region_MP.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/region_MP.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. MP metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_MP = PhoneMetadata(id='MP', country_code=1, international_prefix='011',
general_desc=PhoneNumberDesc(national_number_pattern='[5689]\\d{9}', possible_length=(10,),... | 98.571429 | 252 | 0.717391 |
e8a2a069e44f7e2caa7c5a662eae3502508c53dc | 9,807 | py | Python | regreg/algorithms.py | sroet/regreg | 299ff18b8680872d4d85447953793bf438f78bba | [
"BSD-3-Clause"
] | 9 | 2015-07-14T12:39:10.000Z | 2022-02-03T11:13:03.000Z | regreg/algorithms.py | sroet/regreg | 299ff18b8680872d4d85447953793bf438f78bba | [
"BSD-3-Clause"
] | 2 | 2015-02-24T18:05:58.000Z | 2020-12-29T11:58:58.000Z | regreg/algorithms.py | sroet/regreg | 299ff18b8680872d4d85447953793bf438f78bba | [
"BSD-3-Clause"
] | 8 | 2015-07-13T07:59:16.000Z | 2021-06-23T09:21:43.000Z | import numpy as np
import warnings
from .identity_quadratic import identity_quadratic as sq
class algorithm(object):
def __init__(self, composite):
self.composite = composite
self.debug = False
self.inv_step = None
@property
def output(self):
"""
Return the 'inter... | 39.385542 | 161 | 0.537677 |
e8a2b71937510be01648425d93eef9224464e285 | 479 | py | Python | alipay/aop/api/response/AlipayCommerceEducateTrainCourseModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayCommerceEducateTrainCourseModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayCommerceEducateTrainCourseModifyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayCommerceEducateTrainCourseModifyResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceEducateTrainCourseModifyResponse, self).__init__()
def parse_res... | 29.9375 | 119 | 0.797495 |
e8a2c218e06c9c1a9e41f8ea96ed581779f319ed | 891 | py | Python | advent_of_code/year_2021/day_01/day_01.py | mdu-alt/coding_challenges_python | 171876129b17b5eccd8dd20c7f5b61b3e0e6ef90 | [
"MIT"
] | null | null | null | advent_of_code/year_2021/day_01/day_01.py | mdu-alt/coding_challenges_python | 171876129b17b5eccd8dd20c7f5b61b3e0e6ef90 | [
"MIT"
] | null | null | null | advent_of_code/year_2021/day_01/day_01.py | mdu-alt/coding_challenges_python | 171876129b17b5eccd8dd20c7f5b61b3e0e6ef90 | [
"MIT"
] | null | null | null | from typing import List
"""This module implements the 1st day of 2021 Advent Of Code: 'Sonar Sweep'
See https://adventofcode.com/2021/day/1"""
def main():
puzzle_input = read_file('puzzle_input.txt')
print(part_1(puzzle_input), 'measurements are larger than the previous measurement.')
print(part_2(puzz... | 22.275 | 89 | 0.665544 |
e8a2faf6ceb1b293463f89e53385f6c21cb3f4d0 | 1,217 | py | Python | solutions/implement-trie-prefix-tree.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | solutions/implement-trie-prefix-tree.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | 1 | 2022-02-22T15:42:54.000Z | 2022-02-25T00:10:04.000Z | solutions/implement-trie-prefix-tree.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | # Leetcode 208. Implement Trie (Prefix Tree)
#
# Link: https://leetcode.com/problems/implement-trie-prefix-tree/
# Difficulty: Medium
# Solution using a dictionary
# Complexity:
# O(N) time | where N represent the average length of the keys in the trie
# O(N*M) space | where N and M represent the average length of... | 28.302326 | 80 | 0.593262 |
e8a2fdc70d8248149e29e3b3a1a582780fad4d6d | 68 | py | Python | scripttease/version.py | develmaycare/python-scripttease | acaf466f25ab18ba158fefea4d67f11ccfb9b169 | [
"BSD-3-Clause"
] | null | null | null | scripttease/version.py | develmaycare/python-scripttease | acaf466f25ab18ba158fefea4d67f11ccfb9b169 | [
"BSD-3-Clause"
] | 8 | 2020-10-19T18:06:05.000Z | 2020-12-30T19:29:01.000Z | scripttease/version.py | develmaycare/python-scripttease | acaf466f25ab18ba158fefea4d67f11ccfb9b169 | [
"BSD-3-Clause"
] | null | null | null | DATE = "2021-01-26"
VERSION = "6.8.2"
MAJOR = 6
MINOR = 8
PATCH = 2
| 11.333333 | 19 | 0.588235 |
e8a3253ce76a9f204fec45bf2113e1504e5196c0 | 952 | py | Python | tests/imaging_speed_test.py | AgentElement/mandelbrot-set | 7618f83312ebfcf6284ca0ea8f6bd238b782c4cb | [
"MIT"
] | 10 | 2019-03-16T18:50:10.000Z | 2022-03-24T19:03:54.000Z | tests/imaging_speed_test.py | AgentElement/mandelbrot-set | 7618f83312ebfcf6284ca0ea8f6bd238b782c4cb | [
"MIT"
] | 1 | 2019-05-10T16:36:59.000Z | 2019-05-10T18:37:09.000Z | tests/imaging_speed_test.py | AgentElement/mandelbrot-set | 7618f83312ebfcf6284ca0ea8f6bd238b782c4cb | [
"MIT"
] | null | null | null | from src.generator import JuliaGenerator, MandelbrotGenerator
from src.imager import Imager
import time
import matplotlib.pyplot as plt
def time_gen_res(resolution, show_image=False):
curr_time = time.process_time()
generator = MandelbrotGenerator(focus=-0.761574-0.0847596j, zoom=12, resolution=resolution)
... | 26.444444 | 95 | 0.67542 |
e8a33e6e1b18264def3ddb7e4c6ac6a8ed395141 | 2,580 | py | Python | lib/python3.8/site-packages/django_elasticsearch_dsl_drf/compat.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | null | null | null | lib/python3.8/site-packages/django_elasticsearch_dsl_drf/compat.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 7 | 2020-06-06T01:06:19.000Z | 2022-02-10T11:15:14.000Z | lib/python3.8/site-packages/django_elasticsearch_dsl_drf/compat.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 1 | 2020-11-04T03:21:24.000Z | 2020-11-04T03:21:24.000Z | """
Transitional compatibility module. Contains various field wrappers and
helpers for painless (testing of) Elastic 2.x to Elastic 5.x transition. This
module is not supposed to solve all transition issues for you. Better move to
Elastic 5.x as soon as possible.
"""
from django_elasticsearch_dsl import fields
# For ... | 23.669725 | 78 | 0.643023 |
e8a35c82fb6816bd6d91cd30fdb0cdf1596b3613 | 46 | py | Python | percolation/sparql/sparqlSOURCE.py | ttm/percolate | cfdf5380c8d155424ab97bdab85edde8b6f0ec9f | [
"MIT"
] | 1 | 2020-06-11T01:34:25.000Z | 2020-06-11T01:34:25.000Z | percolation/sparql/sparqlSOURCE.py | ttm/percolate | cfdf5380c8d155424ab97bdab85edde8b6f0ec9f | [
"MIT"
] | null | null | null | percolation/sparql/sparqlSOURCE.py | ttm/percolate | cfdf5380c8d155424ab97bdab85edde8b6f0ec9f | [
"MIT"
] | null | null | null | __doc__="useful sparql queries or routines"
| 11.5 | 43 | 0.782609 |
e8a3a570a1643a146a10127e8f17001614f95f04 | 41,772 | py | Python | cadnano/views/pathview/tools/createtool.py | sherwoodyao/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 69 | 2015-01-13T02:54:40.000Z | 2022-03-27T14:25:51.000Z | cadnano/views/pathview/tools/createtool.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 127 | 2015-01-01T06:26:34.000Z | 2022-03-02T12:48:05.000Z | cadnano/views/pathview/tools/createtool.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 48 | 2015-01-22T19:57:49.000Z | 2022-03-27T14:27:53.000Z | # -*- coding: utf-8 -*-
"""
Attributes:
L3_POLY (QPolygonF): Description
POLY_35 (QPolygonF): Description
POLY_53 (QPolygonF): Description
PP35 (QPainterPath): Description
PP53 (QPainterPath): Description
PPL3 (QPainterPath): Description
PPL5 (QPainterPath): Description
PPR3 (QPainterPat... | 31.034175 | 102 | 0.604304 |
e8a3acd925b3ae4f4957c49acbbe6460237a9b52 | 512 | py | Python | tests/pystrings/test_palindrome_pairs.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/pystrings/test_palindrome_pairs.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/pystrings/test_palindrome_pairs.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | import unittest
from pystrings.palindrome_pairs import palindrome_pairs
class PalindromePairsTests(unittest.TestCase):
def test_one(self):
self.assertEqual(palindrome_pairs(["bat", "tab", "cat"]), [[0, 1], [1, 0]])
def test_two(self):
self.assertEqual(palindrome_pairs(["dog", "cow", "tap", "... | 34.133333 | 115 | 0.599609 |
e8a3b4b0f923fe011284a670a3d7dd96fd336565 | 9,676 | py | Python | tests/unit/pyobjects_test.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 2 | 2017-09-17T21:10:35.000Z | 2019-08-26T03:00:12.000Z | tests/unit/pyobjects_test.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | tests/unit/pyobjects_test.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 3 | 2021-02-23T08:12:48.000Z | 2021-02-23T08:13:13.000Z | # -*- coding: utf-8 -*-
import os
import shutil
import tempfile
import uuid
from salttesting import TestCase
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../')
import salt.state
from salt.config import minion_config
from salt.template import compile_template
from salt.utils.odict import Orde... | 28.292398 | 87 | 0.518603 |
e8a3db85c0a69a27d0ce5ae7995cbf7722aaf7ab | 387 | py | Python | geoq/asgi.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 471 | 2015-01-05T15:16:26.000Z | 2022-03-28T05:06:11.000Z | geoq/asgi.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 109 | 2015-01-06T20:00:58.000Z | 2022-03-11T23:17:53.000Z | geoq/asgi.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 100 | 2015-01-05T15:16:39.000Z | 2021-12-01T12:13:13.000Z | """
ASGI config for geoq3 project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTING... | 22.764706 | 78 | 0.782946 |
e8a3e0579f725cdfc2c07b9f1154b1f326677fa4 | 23,688 | py | Python | networking_ovn/tests/functional/test_maintenance.py | numansiddique/networking-ovn | 9357ddcb6c427486e6a1b3f012f87b9c4fab43a2 | [
"Apache-2.0"
] | null | null | null | networking_ovn/tests/functional/test_maintenance.py | numansiddique/networking-ovn | 9357ddcb6c427486e6a1b3f012f87b9c4fab43a2 | [
"Apache-2.0"
] | null | null | null | networking_ovn/tests/functional/test_maintenance.py | numansiddique/networking-ovn | 9357ddcb6c427486e6a1b3f012f87b9c4fab43a2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Red Hat, 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... | 41.704225 | 79 | 0.654044 |
e8a3f18395002899cb32e0bbf3b20cc61f0d2f4e | 1,861 | py | Python | toontown/parties/WinterPartyCatchActivityToonSD.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/parties/WinterPartyCatchActivityToonSD.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/parties/WinterPartyCatchActivityToonSD.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from toontown.parties import PartyCatchActivityToonSD
from pandac.PandaModules import Vec4
from direct.directnotify import DirectNotifyGlobal
from direct.interval.IntervalGlobal import Sequence, Parallel, Wait, Func
from direct.interval.IntervalGlobal import LerpColorScaleInterval
from direct.interval.IntervalGlobal im... | 47.717949 | 228 | 0.734551 |
e8a3fce96f8a1001ec09d51ebb42401f3970b0c2 | 2,730 | py | Python | molecules/CLP.py | martintb/typyCreator | ba8ad4c30322caa197714fdaac1a4388ad48b91d | [
"MIT"
] | null | null | null | molecules/CLP.py | martintb/typyCreator | ba8ad4c30322caa197714fdaac1a4388ad48b91d | [
"MIT"
] | null | null | null | molecules/CLP.py | martintb/typyCreator | ba8ad4c30322caa197714fdaac1a4388ad48b91d | [
"MIT"
] | null | null | null | from chain import chain
from copy import deepcopy
import numpy as np
def create(*args,**kwargs):
return CLP(*args,**kwargs)
class CLP(chain):
def __init__(self,
rodLength=15,
rodDiameters=[1.0],
rodBondLength=1.0,
rodBondTypes=[1.0],
rod... | 27.857143 | 79 | 0.561172 |
e8a411f3598f9d35ab76bfa9f178ac5dba6891d9 | 2,472 | py | Python | src/python/tests/appengine/libs/request_cache_test.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 3 | 2020-12-30T07:00:55.000Z | 2021-03-16T10:55:05.000Z | src/python/tests/appengine/libs/request_cache_test.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2019-06-07T21:29:28.000Z | 2019-06-07T21:29:28.000Z | src/python/tests/appengine/libs/request_cache_test.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2020-04-25T16:37:10.000Z | 2020-04-25T16:37:10.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 22.678899 | 74 | 0.637136 |
e8a41610a780cf21659c1b68bfa56c28b2158fbc | 6,469 | py | Python | examples/modflow_flopy/example_inv_mf.py | jonghyunharrylee/PCGA | ed1b46f33847eafde685c97ef28d473baf63cf2f | [
"BSD-3-Clause"
] | 16 | 2018-09-09T11:27:20.000Z | 2022-03-09T01:46:37.000Z | examples/modflow_flopy/example_inv_mf.py | jonghyunharrylee/PCGA | ed1b46f33847eafde685c97ef28d473baf63cf2f | [
"BSD-3-Clause"
] | 8 | 2018-03-19T19:36:38.000Z | 2022-01-26T20:09:27.000Z | examples/modflow_flopy/example_inv_mf.py | jonghyunharrylee/PCGA | ed1b46f33847eafde685c97ef28d473baf63cf2f | [
"BSD-3-Clause"
] | 12 | 2018-06-29T13:16:40.000Z | 2022-03-09T01:46:25.000Z | '''
adapted from Section 3.1 in Lee and Kitanidis WRR 2014
Note: this is not a reproduction of the paper!!!
'''
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
from pyPCGA import PCGA
import mf
import math
import datetime as dt
import os
import sys
# model doma... | 32.18408 | 107 | 0.622198 |
e8a425ccee0402f16e8b4fa742e4afdda09234a3 | 3,801 | py | Python | src/hdusd/bl_nodes/__init__.py | kant/BlenderUSDHydraAddon | 6ff6c65b45054582e2c0806f341eeaa9d676ed9b | [
"Apache-2.0"
] | 1 | 2022-03-04T13:23:19.000Z | 2022-03-04T13:23:19.000Z | src/hdusd/bl_nodes/__init__.py | SansiRik/BlenderUSDHydraAddon | 2592849af234523de9e653fc1684bec4d535f81b | [
"Apache-2.0"
] | null | null | null | src/hdusd/bl_nodes/__init__.py | SansiRik/BlenderUSDHydraAddon | 2592849af234523de9e653fc1684bec4d535f81b | [
"Apache-2.0"
] | null | null | null | #**********************************************************************
# Copyright 2020 Advanced Micro Devices, 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.or... | 37.264706 | 103 | 0.714286 |
e8a4292e3d7b072ad2b3c04be7b9aac4a4b8562d | 1,066 | py | Python | invoice2data/output/to_xml.py | uditjuneja1/invoice2data | 689537879d7caea3c93528d311de04422ce3e33c | [
"MIT"
] | null | null | null | invoice2data/output/to_xml.py | uditjuneja1/invoice2data | 689537879d7caea3c93528d311de04422ce3e33c | [
"MIT"
] | null | null | null | invoice2data/output/to_xml.py | uditjuneja1/invoice2data | 689537879d7caea3c93528d311de04422ce3e33c | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
from xml.dom import minidom
def prettify(elem):
"""Return a pretty-printed XML string for the Element.
"""
rough_string = ET.tostring(elem, 'utf-8')
reparsed = minidom.parseString(rough_string)
return reparsed.toprettyxml(indent=" ")
def write_to_file(data, path... | 30.457143 | 58 | 0.621951 |
e8a42d4e8a5446991ad2dcd6489d1a8bbec8e57f | 2,713 | py | Python | health_stats/parsers/log_parser/csv/dexcom_clarity.py | ex-nerd/health-stats | 78860fc3b7e6db91612ecc68fb634615a739c4c9 | [
"MIT"
] | 2 | 2016-04-14T18:47:14.000Z | 2017-03-14T15:23:25.000Z | health_stats/parsers/log_parser/csv/dexcom_clarity.py | ex-nerd/health-stats | 78860fc3b7e6db91612ecc68fb634615a739c4c9 | [
"MIT"
] | null | null | null | health_stats/parsers/log_parser/csv/dexcom_clarity.py | ex-nerd/health-stats | 78860fc3b7e6db91612ecc68fb634615a739c4c9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from health_stats.models.events import *
from datetime import datetime
from . import CSVLogParser
class DexcomClarityLogParser(CSVLogParser):
SOURCE = SOURCE_DEXCOM_CLARITY
# Constants for the column names from dexcom
INDEX = "Index"
TIMESTAMP = "Timestamp (YYYY-MM-DDThh:mm:... | 35.233766 | 85 | 0.575009 |
e8a4308bc7386b943f12ff51bc84a2eee4d3d473 | 1,892 | py | Python | mediagoblin/media_types/video/__init__.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | 1 | 2018-12-19T00:05:55.000Z | 2018-12-19T00:05:55.000Z | mediagoblin/media_types/video/__init__.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | null | null | null | mediagoblin/media_types/video/__init__.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | null | null | null | # GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either versio... | 36.384615 | 77 | 0.754228 |
e8a465ec8beb292f1321c72b25f6e417fc0f2e48 | 149 | py | Python | toontown/safezone/DistributedEFlyingTreasureAI.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/safezone/DistributedEFlyingTreasureAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/safezone/DistributedEFlyingTreasureAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from toontown.safezone import DistributedSZTreasureAI
class DistributedEFlyingTreasureAI(DistributedSZTreasureAI.DistributedSZTreasureAI):
pass
| 29.8 | 84 | 0.885906 |
e8a4a4927bb616c2ca77ec9a5f1c95e6c59ee1a4 | 766 | py | Python | alipay/aop/api/response/AlipayOpenAppAppcontentPoiSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayOpenAppAppcontentPoiSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayOpenAppAppcontentPoiSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayOpenAppAppcontentPoiSyncResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenAppAppcontentPoiSyncResponse, self).__init__()
self._alipay_poi_id = None
... | 29.461538 | 111 | 0.733681 |
e8a4c8875015a5e4aab3bcfb07ce5289946f289c | 477 | py | Python | fsdet/evaluation/__init__.py | JunhoPark0314/few-shot-object-detection | bb7b09eafa6a35a74d641485c0831494fc00e700 | [
"Apache-2.0"
] | null | null | null | fsdet/evaluation/__init__.py | JunhoPark0314/few-shot-object-detection | bb7b09eafa6a35a74d641485c0831494fc00e700 | [
"Apache-2.0"
] | null | null | null | fsdet/evaluation/__init__.py | JunhoPark0314/few-shot-object-detection | bb7b09eafa6a35a74d641485c0831494fc00e700 | [
"Apache-2.0"
] | null | null | null | from .coco_evaluation import COCOEvaluator
from .evaluator import DatasetEvaluator, DatasetEvaluators, inference_context, inference_on_dataset, condition_on_dataset, meta_inference_on_dataset
from .lvis_evaluation import LVISEvaluator
from .pascal_voc_evaluation import PascalVOCDetectionEvaluator
from .testing import p... | 53 | 148 | 0.861635 |
e8a4d593584fbe126f4b67c53174b01a26aeacf2 | 857 | py | Python | produzione_scientifica/gbliometrics/migrations/0002_prova.py | FilippoBordogna/Tesi | 816726fe9f43fa60d3c33ba8843f34c699f6aa2f | [
"MIT"
] | null | null | null | produzione_scientifica/gbliometrics/migrations/0002_prova.py | FilippoBordogna/Tesi | 816726fe9f43fa60d3c33ba8843f34c699f6aa2f | [
"MIT"
] | null | null | null | produzione_scientifica/gbliometrics/migrations/0002_prova.py | FilippoBordogna/Tesi | 816726fe9f43fa60d3c33ba8843f34c699f6aa2f | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-05 03:59
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('gbliometrics', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 31.740741 | 118 | 0.599767 |
e8a4edcce72854f9d94c5b470a0743e2493c499a | 21,856 | py | Python | nova/tests/unit/virt/hyperv/test_migrationops.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-04-28T16:20:38.000Z | 2021-04-25T11:19:03.000Z | nova/tests/unit/virt/hyperv/test_migrationops.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/virt/hyperv/test_migrationops.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2020-04-08T20:24:45.000Z | 2020-10-05T19:02:13.000Z | # Copyright 2014 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 47.720524 | 79 | 0.683702 |
e8a508d3ccc9bf36abcbe5f4bca9143a37017029 | 40,681 | py | Python | Models/Weather/Weather_with_demand/V_hist_API/model.py | schmocker/Pyjamas | 52a72d6e8b915f77a2194d4e7d53c46d0ec28c17 | [
"MIT"
] | 2 | 2018-05-31T15:02:08.000Z | 2018-07-11T11:02:44.000Z | Models/Weather/Weather_with_demand/V_hist_API/model.py | schmocker/Pyjamas | 52a72d6e8b915f77a2194d4e7d53c46d0ec28c17 | [
"MIT"
] | null | null | null | Models/Weather/Weather_with_demand/V_hist_API/model.py | schmocker/Pyjamas | 52a72d6e8b915f77a2194d4e7d53c46d0ec28c17 | [
"MIT"
] | null | null | null | from pyjamas_core import Supermodel
from pyjamas_core.util import Input, Output, Property
from datetime import datetime, timedelta
from Models._utils.time import datetime2utc_time, utc_time2datetime
import numpy as np
from pytz import timezone
import json
from scipy.interpolate import griddata
import pandas as pd
impor... | 48.029516 | 192 | 0.616283 |
e8a514ee80cb857083fe9f092ef79179a262ee88 | 7,110 | py | Python | dissector_temp_folder/dissector.py | rwiddhic96/apotoma | 4636d6bf72673471b0c022aa4354170fc7b03ac4 | [
"MIT"
] | null | null | null | dissector_temp_folder/dissector.py | rwiddhic96/apotoma | 4636d6bf72673471b0c022aa4354170fc7b03ac4 | [
"MIT"
] | null | null | null | dissector_temp_folder/dissector.py | rwiddhic96/apotoma | 4636d6bf72673471b0c022aa4354170fc7b03ac4 | [
"MIT"
] | null | null | null | """Stages:
0. Function to generate ground truths:
Input: model, x_test, test_pred
Output: 1-D binary array, 1 if classified correctly, zero if classified incorrectly
1. Function to create sub-models
Input: model (trained), list of layer numbers, no. of output nodes (num_classes)
Output... | 34.682927 | 120 | 0.609142 |
e8a55127c6a06f599251b6c86a59ee5583808430 | 1,695 | py | Python | examples/agents/mepo/run_mepo.py | RL-Gym/bellman | 210c9ff877b38705d1cf1b3ccd0f9f2644ad8d0d | [
"Apache-2.0"
] | 40 | 2021-03-24T10:41:56.000Z | 2022-03-15T09:50:47.000Z | examples/agents/mepo/run_mepo.py | RL-Gym/bellman | 210c9ff877b38705d1cf1b3ccd0f9f2644ad8d0d | [
"Apache-2.0"
] | 12 | 2021-03-25T18:36:27.000Z | 2021-07-27T11:09:34.000Z | examples/agents/mepo/run_mepo.py | RL-Gym/bellman | 210c9ff877b38705d1cf1b3ccd0f9f2644ad8d0d | [
"Apache-2.0"
] | 3 | 2021-04-25T03:18:44.000Z | 2021-11-14T15:54:34.000Z | # Copyright 2021 The Bellman Contributors
#
# 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... | 31.388889 | 93 | 0.715634 |
e8a5a81b587b2b007440cd1c57524da7b3567640 | 1,162 | py | Python | freecoinage/coins/exchanges/module.py | clifer/freecoinage | 0bc8300f09445ef6d8258b3ca782627e0d81e2f1 | [
"MIT"
] | null | null | null | freecoinage/coins/exchanges/module.py | clifer/freecoinage | 0bc8300f09445ef6d8258b3ca782627e0d81e2f1 | [
"MIT"
] | null | null | null | freecoinage/coins/exchanges/module.py | clifer/freecoinage | 0bc8300f09445ef6d8258b3ca782627e0d81e2f1 | [
"MIT"
] | null | null | null | from django.conf import settings
class Exchange:
def __init__(self, exchange):
from pprint import pprint
import time
import importlib
self.exchange = None
self.name = exchange.name
self.thisexchange = exchange
self.apihostname = e... | 34.176471 | 109 | 0.635112 |
e8a5d660dbf8509b03f909cca536c1de17bbea67 | 3,426 | py | Python | feedback/video/tracking/event.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | feedback/video/tracking/event.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | feedback/video/tracking/event.py | splitter-research/splitter | 94e5e3073b4f383ba50397168ddb8bcd5fc48da4 | [
"MIT"
] | null | null | null | """This file is part of Splitter which is released under MIT License.
event.py defines some of the main detection primitives used in dlcv.
"""
from splitter.struct import VideoStreamOperator, Box
from feedback.dataflow.map import Map
import numpy as np
from timeit import default_timer as timer
"""in dlcv there are M... | 25.377778 | 73 | 0.678926 |
e8a5e528d289ed58049ea4edad9cfa3e447c3d59 | 3,972 | py | Python | experiments/ashvin/icml2020/reference/mujoco/awac2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/reference/mujoco/awac2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/reference/mujoco/awac2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment, process_args
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.sac.policies im... | 31.03125 | 77 | 0.567976 |
e8a5edd5a62e9da800442718a16fff7f2d89c3b1 | 1,474 | py | Python | examples/nD_points_with_properties.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 1 | 2022-03-01T19:38:06.000Z | 2022-03-01T19:38:06.000Z | examples/nD_points_with_properties.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 17 | 2020-06-11T21:02:03.000Z | 2021-02-02T19:10:19.000Z | examples/nD_points_with_properties.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | """
Display one points layer ontop of one 4-D image layer using the
add_points and add_image APIs, where the markes are visible as nD objects
across the dimensions, specified by their size
"""
from math import ceil
import numpy as np
from skimage import data
import napari
with napari.gui_qt():
blobs = data.bina... | 27.811321 | 78 | 0.630258 |
e8a5f92c5e2c18a6351ffb42532c62737941293f | 2,898 | py | Python | python-package/insightface/model_zoo/face_recognition.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 18 | 2018-04-13T02:55:03.000Z | 2020-10-12T01:37:52.000Z | python-package/insightface/model_zoo/face_recognition.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 1 | 2019-05-08T01:58:46.000Z | 2019-05-08T01:58:46.000Z | python-package/insightface/model_zoo/face_recognition.py | dwhite54/insightface | ea172e4921c3960c0684404afff6d0d862447eae | [
"MIT"
] | 7 | 2018-08-29T06:41:19.000Z | 2019-09-11T06:10:39.000Z | from __future__ import division
import mxnet as mx
import numpy as np
import cv2
__all__ = [
'FaceRecognition', 'arcface_r100_v1', 'arcface_outofreach_v1',
'arcface_mfn_v1', 'get_arcface'
]
class FaceRecognition:
def __init__(self, name, download, param_file):
self.name = name
self.downlo... | 33.310345 | 77 | 0.6049 |
e8a6379fa79e45c21cdd735cc39c00e091313271 | 767 | py | Python | bsp_tool/branches/ritual/sin.py | snake-biscuits/bsp_tool | f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773 | [
"MIT"
] | 44 | 2018-07-06T04:44:02.000Z | 2022-03-27T02:18:37.000Z | bsp_tool/branches/ritual/sin.py | snake-biscuits/bsp_tool | f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773 | [
"MIT"
] | 18 | 2018-07-25T23:19:17.000Z | 2022-03-16T23:59:36.000Z | bsp_tool/branches/ritual/sin.py | snake-biscuits/bsp_tool | f2a1ab3ff502d0ca4ade97ff6e44823d2f8f5773 | [
"MIT"
] | 12 | 2019-09-13T21:52:51.000Z | 2022-03-22T18:04:21.000Z | """All three creditted programmers worked on Heavy Metal F.A.K.K. 2
Some also went on to work on MoH:AA expansions & some Valve titles"""
from ..id_software import quake2
FILE_MAGIC = b"RBSP" # Ubertools?
# NOTE: 1 b"IBSP" map exists, will it play?
BSP_VERSION = 1
GAME_PATHS = ["SiN", "SiN Gold"]
GAME_VERSIONS = ... | 23.96875 | 91 | 0.735332 |
e8a64e0006a55132ed6e9de1ec7b4113dee581a0 | 7,909 | py | Python | supervisor/jobs/decorator.py | janiversen/supervisor | 890313701c37eb4a14b870b361729491c1ed20aa | [
"Apache-2.0"
] | 597 | 2017-04-27T15:10:08.000Z | 2019-12-18T16:02:57.000Z | supervisor/jobs/decorator.py | janiversen/supervisor | 890313701c37eb4a14b870b361729491c1ed20aa | [
"Apache-2.0"
] | 799 | 2017-05-02T00:26:07.000Z | 2019-12-18T21:40:18.000Z | supervisor/jobs/decorator.py | janiversen/supervisor | 890313701c37eb4a14b870b361729491c1ed20aa | [
"Apache-2.0"
] | 173 | 2017-04-26T17:03:42.000Z | 2019-12-15T10:41:57.000Z | """Job decorator."""
import asyncio
from datetime import datetime, timedelta
from functools import wraps
import logging
from typing import Any, Optional
import sentry_sdk
from ..const import CoreState
from ..coresys import CoreSysAttributes
from ..exceptions import HassioError, JobConditionException, JobException
fro... | 36.786047 | 149 | 0.605513 |
e8a64e3b098bb51d505ff4eac091a53e6577a03d | 4,149 | py | Python | vfp/convert_xml_to_csv.py | deokfilho/aistreamer | d60303a8d2f0ea53b56b0eedda64b1a8cff88b0b | [
"MIT",
"Unlicense"
] | 129 | 2018-12-07T08:39:41.000Z | 2022-02-02T00:26:26.000Z | vfp/convert_xml_to_csv.py | deokfilho/aistreamer | d60303a8d2f0ea53b56b0eedda64b1a8cff88b0b | [
"MIT",
"Unlicense"
] | 8 | 2019-04-26T01:49:15.000Z | 2021-12-07T05:07:55.000Z | vfp/convert_xml_to_csv.py | deokfilho/aistreamer | d60303a8d2f0ea53b56b0eedda64b1a8cff88b0b | [
"MIT",
"Unlicense"
] | 53 | 2019-01-11T23:58:39.000Z | 2022-03-24T13:25:34.000Z | #!/usr/bin/python
#
# Copyright (c) 2018 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, merg... | 34.289256 | 82 | 0.677754 |
e8a650f1e339de31d8ce416455c46b192cea8794 | 3,494 | py | Python | appengine/predator/analysis/crash_report.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/predator/analysis/crash_report.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/predator/analysis/crash_report.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from collections import defaultdict
from collections import namedtuple
import logging
class _FrozenDict(dict):
"""An immutable ``dict`` (or some approxim... | 47.863014 | 79 | 0.715512 |
e8a6a1e525c09a165c989fe18768deb299824300 | 2,648 | py | Python | experiments/ashvin/vae/fixed3/sawyer_pusher/vae_dense_wider.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed3/sawyer_pusher/vae_dense_wider.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed3/sawyer_pusher/vae_dense_wider.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.envs.mujoco.sawyer_push_and_reach_env import \
SawyerPushAndReachXYEnv, SawyerPushAndReachXYEasyEnv
from rlkit.envs.mujoco.sawyer_push_env import SawyerPushXYEnv
from rlkit.envs.multitask.point2d import MultitaskImagePoint2DEnv
from rlkit.envs.multitask.pusher2d import FullPusher2DEnv
from rlkit.images.c... | 33.948718 | 85 | 0.643505 |
e8a6bdaf34bed82bb0c2e1832cd1db4a9c1e9537 | 849 | py | Python | examples/last_month_report.py | spectriclabs/clicktimepy | 6ec3ab1b20f643bd5d34c5180b6860ec96f41698 | [
"MIT"
] | null | null | null | examples/last_month_report.py | spectriclabs/clicktimepy | 6ec3ab1b20f643bd5d34c5180b6860ec96f41698 | [
"MIT"
] | null | null | null | examples/last_month_report.py | spectriclabs/clicktimepy | 6ec3ab1b20f643bd5d34c5180b6860ec96f41698 | [
"MIT"
] | null | null | null | # /usr/bin/env python
import clicktime
import datetime
import calendar
import logging
logging.basicConfig(level=logging.DEBUG)
# Load the token
with open(".token") as f:
token = f.read().strip()
# Connect to clicktime
ct = clicktime.ClickTime(token=token)
# Figure out the query date range
today ... | 25.727273 | 78 | 0.709069 |
e8a6d250ff05b46a2bdecb441d673f9bbf91627b | 8,554 | py | Python | backup/a04-hello-many-worlds.py | hpssjellis/tfQuantumJs | 5235c682b0d2de2eaab8d52b84e295c9f4abf4e5 | [
"MIT"
] | 1 | 2021-05-11T22:13:28.000Z | 2021-05-11T22:13:28.000Z | backup/a04-hello-many-worlds.py | hpssjellis/tfQuantumJs | 5235c682b0d2de2eaab8d52b84e295c9f4abf4e5 | [
"MIT"
] | null | null | null | backup/a04-hello-many-worlds.py | hpssjellis/tfQuantumJs | 5235c682b0d2de2eaab8d52b84e295c9f4abf4e5 | [
"MIT"
] | 1 | 2021-05-11T22:13:34.000Z | 2021-05-11T22:13:34.000Z | #@title Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | 33.677165 | 86 | 0.681202 |
e8a6f2b737111a226788ae0c3da4310786279b1d | 4,506 | py | Python | homeassistant/components/device_tracker/nmap_tracker.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | 4 | 2017-03-22T21:16:45.000Z | 2021-06-11T05:08:14.000Z | homeassistant/components/device_tracker/nmap_tracker.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/device_tracker/nmap_tracker.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | 4 | 2016-11-27T01:59:49.000Z | 2018-03-11T07:17:25.000Z | """
Support for scanning a network with nmap.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.nmap_scanner/
"""
import logging
import re
import subprocess
from collections import namedtuple
from datetime import timedelta
import voluptuous ... | 31.51049 | 78 | 0.630937 |
e8a7271e2a58439a9c1171f53befcc34a999c7c6 | 7,288 | py | Python | custom_components/readme/__init__.py | avidit/home-assistant-config | c4ea82e7ea75f93ebfb1700b39df5ff9787843b7 | [
"MIT"
] | 18 | 2016-08-10T01:02:27.000Z | 2017-10-26T04:19:49.000Z | custom_components/readme/__init__.py | avidit/homeassistant | c4ea82e7ea75f93ebfb1700b39df5ff9787843b7 | [
"MIT"
] | null | null | null | custom_components/readme/__init__.py | avidit/homeassistant | c4ea82e7ea75f93ebfb1700b39df5ff9787843b7 | [
"MIT"
] | 4 | 2017-04-20T19:41:21.000Z | 2017-05-16T17:10:05.000Z | """
Use Jinja and data from Home Assistant to generate your README.md file
For more details about this component, please refer to
https://github.com/custom-components/readme
"""
from __future__ import annotations
import asyncio
import json
import os
from shutil import copyfile
from typing import Any, Dict, List
impo... | 28.920635 | 91 | 0.662596 |
e8a744d94b38d221bba7c57acd4427ae08b22d2b | 5,219 | py | Python | leetcode_python/Two_Pointers/linked-list-cycle-ii.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Two_Pointers/linked-list-cycle-ii.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Two_Pointers/linked-list-cycle-ii.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | """
142. Linked List Cycle II
Medium
Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null.
There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote t... | 28.05914 | 322 | 0.575589 |
e8a79e755fde43847ed752f4f239c8bb518f7c48 | 1,187 | py | Python | libs/settings.py | PushDotGame/telegram-forward-bot | 40a54aff1a8b10e79fa8a6f611e2371c79869340 | [
"Apache-2.0"
] | 1 | 2020-07-09T02:26:14.000Z | 2020-07-09T02:26:14.000Z | libs/settings.py | PushDotGame/telegram-bots | 40a54aff1a8b10e79fa8a6f611e2371c79869340 | [
"Apache-2.0"
] | null | null | null | libs/settings.py | PushDotGame/telegram-bots | 40a54aff1a8b10e79fa8a6f611e2371c79869340 | [
"Apache-2.0"
] | null | null | null | import os
import dotenv
from configparser import ConfigParser
from . import functions as fn
# dir
BASE_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), os.pardir)
CONF_DIR = os.path.join(BASE_DIR, 'conf')
CONTRACTS_DIR = os.path.join(BASE_DIR, 'contracts')
# config.ini
cfg = ConfigParser()
c... | 39.566667 | 102 | 0.744735 |
e8a7a83b8eba060c68d954737eb9e2e415441225 | 4,898 | py | Python | apps/iiif/canvases/tests/test_manage_cmd.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 18 | 2017-06-12T09:58:02.000Z | 2021-10-01T11:14:34.000Z | apps/iiif/canvases/tests/test_manage_cmd.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 276 | 2019-04-26T20:13:01.000Z | 2022-03-31T10:26:28.000Z | apps/iiif/canvases/tests/test_manage_cmd.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 7 | 2018-03-13T23:44:26.000Z | 2021-09-15T17:54:55.000Z | """
Test class for manage command to rebuild OCR
"""
from io import StringIO
from bs4 import BeautifulSoup
from django.test import TestCase
from django.core.management import call_command
from ...canvases.models import Canvas
from ...canvases.tests.factories import CanvasFactory
from ...manifests.tests.factories import... | 42.964912 | 90 | 0.681094 |
e8a7aa039ff78e4c28b0aebaeeb2ddccac71815b | 84,956 | py | Python | oscar/lib/python2.7/site-packages/werkzeug/wrappers.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/werkzeug/wrappers.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/werkzeug/wrappers.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
werkzeug.wrappers
~~~~~~~~~~~~~~~~~
The wrappers are simple request and response objects which you can
subclass to do whatever you want them to do. The request object contains
the information transmitted by the client (webbrowser) and the response
object con... | 43.102993 | 95 | 0.627595 |
e8a7f305c1f4973efd206397e8a2449b59a4d537 | 3,865 | py | Python | gibson2/test/test_render.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 3 | 2021-02-07T14:00:38.000Z | 2021-07-03T19:40:59.000Z | gibson2/test/test_render.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | gibson2/test/test_render.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 2 | 2021-04-01T12:14:59.000Z | 2021-06-18T13:04:39.000Z | from gibson2.render.mesh_renderer.mesh_renderer_cpu import MeshRenderer
import numpy as np
import os
import gibson2
import GPUtil
import time
from gibson2.utils.assets_utils import download_assets
from gibson2.utils.assets_utils import get_ig_model_path
from PIL import Image
def test_render_loading_cleaning():
ren... | 36.121495 | 114 | 0.65304 |
e8a84ae1a1d563e657099b4f4cfc30fc4129c02b | 445 | py | Python | src/datasets_manipulation_scripts/make_corpus_dictionary_pickle.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 6 | 2020-04-17T17:37:24.000Z | 2021-12-04T03:03:46.000Z | src/datasets_manipulation_scripts/make_corpus_dictionary_pickle.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 62 | 2019-05-21T21:06:42.000Z | 2020-01-26T17:33:45.000Z | src/datasets_manipulation_scripts/make_corpus_dictionary_pickle.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 1 | 2019-07-22T10:19:38.000Z | 2019-07-22T10:19:38.000Z | import os
from src.datasets_manipulation.dictionary import Dictionary
from src.helpers.logger import Logger
from src.helpers.consts import CORPUS_DICTIONARY_FILE_NAME
logger = Logger()
def main():
if not os.path.exists(CORPUS_DICTIONARY_FILE_NAME):
dictionary = Dictionary()
dictionary.generate_f... | 23.421053 | 63 | 0.764045 |
e8a84d9c3c69e38d397e1868f03e83f2ce337d1b | 2,569 | py | Python | leetcode_python/Greedy/best-time-to-buy-and-sell-stock-ii.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Greedy/best-time-to-buy-and-sell-stock-ii.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Greedy/best-time-to-buy-and-sell-stock-ii.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# IDEA : GREEDY
class Solution:
def maxProfit(self, prices):
profit = 0
for i in range(0,len(prices)-1):
if prices[i+1] > prices[i]:
# have to sale last stock, then buy a new one
# and sum up the price difference into profit
profit +=... | 28.230769 | 67 | 0.535617 |
e8a86a4c329c53af8be8797b27cca6d7928edc15 | 17,322 | py | Python | src/compas_singular/datastructures/mesh_quad_coarse/mesh_quad_coarse.py | christiandimitri/compas_singular | 4a80b30664b07e15eb799229171bbc02c27e0efc | [
"MIT"
] | 1 | 2021-04-19T15:09:21.000Z | 2021-04-19T15:09:21.000Z | src/compas_singular/datastructures/mesh_quad_coarse/mesh_quad_coarse.py | christiandimitri/compas_singular | 4a80b30664b07e15eb799229171bbc02c27e0efc | [
"MIT"
] | null | null | null | src/compas_singular/datastructures/mesh_quad_coarse/mesh_quad_coarse.py | christiandimitri/compas_singular | 4a80b30664b07e15eb799229171bbc02c27e0efc | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
from copy import deepcopy
from math import floor
from math import ceil
from compas_singular.datastructures.network.network import Network
from compas_singular.datastructures.mesh.mesh import Mesh
from compas_... | 35.715464 | 942 | 0.664531 |
e8a86b426e65916bf7ae35a25eb5377d16cc521b | 3,582 | py | Python | app/app/settings.py | siddharthmudgal/idres-gait | b9500d4eab34a72e8f877ca4f0593a335e5b3fd7 | [
"MIT"
] | null | null | null | app/app/settings.py | siddharthmudgal/idres-gait | b9500d4eab34a72e8f877ca4f0593a335e5b3fd7 | [
"MIT"
] | null | null | null | app/app/settings.py | siddharthmudgal/idres-gait | b9500d4eab34a72e8f877ca4f0593a335e5b3fd7 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
import os
from path... | 25.769784 | 91 | 0.69263 |
e8a8afb0622a207ad8abbc9d4e776af2938e45ca | 23,881 | py | Python | train_IAN.py | awesome-archive/Neural-Photo-Editor | c0287e0275d1df1a8af15119837f6f2ad065d038 | [
"MIT"
] | 2,202 | 2016-09-22T23:40:18.000Z | 2022-03-26T17:18:44.000Z | train_IAN.py | afcarl/Neural-Photo-Editor | d234cf1f80cf8c8f621f871dc704dc43e212201f | [
"MIT"
] | 18 | 2016-09-23T18:14:55.000Z | 2019-01-22T12:00:43.000Z | train_IAN.py | afcarl/Neural-Photo-Editor | d234cf1f80cf8c8f621f871dc704dc43e212201f | [
"MIT"
] | 230 | 2016-09-23T00:39:39.000Z | 2022-03-01T18:26:03.000Z | ### Introspective Adversarial Network Training Function
# A Brock, 2016
import argparse
import imp
import time
import logging
import itertools
import os
import string
import numpy as np
from path import Path
import theano
import theano.tensor as T
from theano.tensor.opt import register_canonicalize
from theano.sandbo... | 41.032646 | 244 | 0.577865 |
e8a8d9bb708f3f2b5e6437a51f74406e4be65ce3 | 1,372 | py | Python | extractor/CANMessage.py | MITMotorsports/MY17_OneDayDAQ | cbf0c22d17a133042e3a7a4ee7fb2a7b601bf74d | [
"MIT"
] | 2 | 2017-10-17T16:36:48.000Z | 2019-05-13T01:02:06.000Z | extractor/CANMessage.py | MITMotorsports/MY17_OneDayDAQ | cbf0c22d17a133042e3a7a4ee7fb2a7b601bf74d | [
"MIT"
] | null | null | null | extractor/CANMessage.py | MITMotorsports/MY17_OneDayDAQ | cbf0c22d17a133042e3a7a4ee7fb2a7b601bf74d | [
"MIT"
] | null | null | null | import parse
class CANMessage:
attributes = ('can_id', 'data')
def __init__(self, can_id, data):
# Store our attributes in the format we want them (numbers).
self.can_id = parse.number(can_id)
self.data = parse.number(data)
def __getitem__(self, index):
'''
Returns ... | 31.906977 | 73 | 0.607872 |
e8a908fc262178f76011f4eeea17c70071420ff5 | 7,351 | py | Python | leetcode_python/Dynamic_Programming/coin-change.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Dynamic_Programming/coin-change.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Dynamic_Programming/coin-change.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# V1
# http://bookshadow.com/weblog/2015/12/27/leetcode-coin-change/
# IDEA : DP
# DP state equation : dp[x + c] = min(dp[x] + 1, dp[x + c])
import collections
class Solution(object):
def coinChange(self, coins, amount):
"""
:type coins: List[int]
:type amount: int
:rtype: in... | 33.112613 | 111 | 0.4832 |
e8a945f41e0cf05b4e7d07c729456ab165f5b6da | 5,214 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.948276 | 133 | 0.683353 |
e8a94cf06373ec5372a7a319c3eb9ae3d818fd88 | 1,396 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/bounding_rect_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/cognitiveservices/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/bounding_rect_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/bounding_rect_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"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 ... | 34.04878 | 96 | 0.543696 |
e8a96d9fa8478c281891fe23e39e505436b48351 | 7,555 | py | Python | torch/utils/data/datapipes/iter/callable.py | ZIZUN/pytorch | f565167fbdf607f3b0b95f077b11f2f78716c217 | [
"Intel"
] | 183 | 2018-04-06T21:10:36.000Z | 2022-03-30T15:05:24.000Z | torch/utils/data/datapipes/iter/callable.py | ZIZUN/pytorch | f565167fbdf607f3b0b95f077b11f2f78716c217 | [
"Intel"
] | 631 | 2018-06-05T16:59:11.000Z | 2022-03-31T16:26:57.000Z | torch/utils/data/datapipes/iter/callable.py | ZIZUN/pytorch | f565167fbdf607f3b0b95f077b11f2f78716c217 | [
"Intel"
] | 58 | 2018-06-05T16:40:18.000Z | 2022-03-16T15:37:29.000Z | import warnings
from torch.utils.data import IterDataPipe, _utils, functional_datapipe
from typing import Callable, Dict, Iterator, Optional, Sized, Tuple, TypeVar
try:
import dill
# XXX: By default, dill writes the Pickler dispatch table to inject its
# own logic there. This globally affects the behavior... | 37.216749 | 129 | 0.602118 |
e8a9a48c92403ecbda29520481dc76b3619694ef | 864 | py | Python | Examples/EchoServer/Server.py | samvasko/SlipLib | 090b5e77947f96c28f129ba9beb7da1d8f4855cf | [
"MIT"
] | 1 | 2020-03-04T19:48:26.000Z | 2020-03-04T19:48:26.000Z | Examples/EchoServer/Server.py | samvasko/SlipLib | 090b5e77947f96c28f129ba9beb7da1d8f4855cf | [
"MIT"
] | null | null | null | Examples/EchoServer/Server.py | samvasko/SlipLib | 090b5e77947f96c28f129ba9beb7da1d8f4855cf | [
"MIT"
] | null | null | null | """
Created on 24 aug. 2016
@author: Ruud
"""
from sliplib import encode, decode
from socketserver import TCPServer, BaseRequestHandler
class SlipHandler(BaseRequestHandler):
# Dedicated handler to show the encoded bytes.
def handle(self):
while True:
data = self.request.re... | 27 | 61 | 0.599537 |
e8a9b1297c799c90d82088e117bb408cad034f38 | 1,989 | py | Python | RareVariants/io/__init__.py | afif-elghraoui/CorrelatedVariants | 4fc6722c78c9a03ad44a7d2f737ccece64d22c35 | [
"BSD-3-Clause"
] | null | null | null | RareVariants/io/__init__.py | afif-elghraoui/CorrelatedVariants | 4fc6722c78c9a03ad44a7d2f737ccece64d22c35 | [
"BSD-3-Clause"
] | null | null | null | RareVariants/io/__init__.py | afif-elghraoui/CorrelatedVariants | 4fc6722c78c9a03ad44a7d2f737ccece64d22c35 | [
"BSD-3-Clause"
] | null | null | null | #################################################################################
# Copyright (c) 2011-2013, Pacific Biosciences of California, Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are me... | 55.25 | 81 | 0.728004 |
e8a9f0d935bf161f067355a990c1f8801004c596 | 664 | py | Python | cogs/utils/tempcache.py | MagnificPhil/MagnificBot | d9a834ea6047cd16b81fbfe6e9de20effdfaf5b1 | [
"MIT"
] | null | null | null | cogs/utils/tempcache.py | MagnificPhil/MagnificBot | d9a834ea6047cd16b81fbfe6e9de20effdfaf5b1 | [
"MIT"
] | null | null | null | cogs/utils/tempcache.py | MagnificPhil/MagnificBot | d9a834ea6047cd16b81fbfe6e9de20effdfaf5b1 | [
"MIT"
] | null | null | null | import discord
import asyncio
class TempCache:
"""
This is how we avoid events such as ban and unban
from triggering twice in the mod-log.
Kinda hacky but functioning
"""
def __init__(self, bot):
self.bot = bot
self._cache = []
def add(self, user, server, action, seconds=... | 24.592593 | 58 | 0.61747 |
e8aa9676a68ae6d73a257dcc32b0310055784a7d | 908 | py | Python | ci/infra/testrunner/tests/test_upgrade_apply_all_fine.py | butsoleg/skuba | 1a363d4f3ca8fc33bfb0284043da26fe879c31a3 | [
"Apache-2.0"
] | null | null | null | ci/infra/testrunner/tests/test_upgrade_apply_all_fine.py | butsoleg/skuba | 1a363d4f3ca8fc33bfb0284043da26fe879c31a3 | [
"Apache-2.0"
] | null | null | null | ci/infra/testrunner/tests/test_upgrade_apply_all_fine.py | butsoleg/skuba | 1a363d4f3ca8fc33bfb0284043da26fe879c31a3 | [
"Apache-2.0"
] | null | null | null | import pytest
from tests.utils import setup_kubernetes_version
@pytest.mark.disruptive
def test_upgrade_apply_all_fine(setup, platform, skuba, kubectl):
"""
Starting from a up-to-date cluster, check what node upgrade apply reports.
"""
setup_kubernetes_version(platform, skuba, kubectl)
# node u... | 30.266667 | 78 | 0.659692 |
e8aad1a3c049b012d641a168574ff3af47848b79 | 22,185 | py | Python | src/simulator/cli.py | pskopnik/htc-cache-simulator | ee502db3f1c2b99ffe05ee609a18069b583798da | [
"MIT"
] | 1 | 2020-12-15T16:09:31.000Z | 2020-12-15T16:09:31.000Z | src/simulator/cli.py | pskopnik/htc-cache-system-simulator | ee502db3f1c2b99ffe05ee609a18069b583798da | [
"MIT"
] | null | null | null | src/simulator/cli.py | pskopnik/htc-cache-system-simulator | ee502db3f1c2b99ffe05ee609a18069b583798da | [
"MIT"
] | null | null | null | import argparse
import collections
import csv
from dataclasses import dataclass, field
import functools
import itertools
import sys
from typing import Any, Callable, cast, Dict, Iterable, Iterator, Optional, Sequence, TextIO, Tuple
from .workload import Access, BytesRate, Task
from .workload.models.pags import (
buil... | 36.852159 | 257 | 0.773135 |
e8aae75282f96472702a91678778caad6a4ba95d | 3,937 | py | Python | reference_ANN_linear_train.py | GunnarBehrens/CBRAIN-CAM | 1b59b5b4731ada7c077c181b543339412d25e5c3 | [
"MIT"
] | null | null | null | reference_ANN_linear_train.py | GunnarBehrens/CBRAIN-CAM | 1b59b5b4731ada7c077c181b543339412d25e5c3 | [
"MIT"
] | null | null | null | reference_ANN_linear_train.py | GunnarBehrens/CBRAIN-CAM | 1b59b5b4731ada7c077c181b543339412d25e5c3 | [
"MIT"
] | null | null | null | """
This script is for the training of a linear version of the reference ANN of Rasp et al., 2018
"""
from tensorflow.keras.layers import Input, Dense
from cbrain.layers import *
from tensorflow.keras.models import Model
from tensorflow.keras.losses import mse
from tensorflow.keras import backend as K
from tensorflow.... | 30.284615 | 103 | 0.754636 |
e8ab2564e2ef30574636f14cb448ad7407b9fe59 | 911 | py | Python | master/bopytest-code/code/ch4/cache/test_slower_2.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/bopytest-code/code/ch4/cache/test_slower_2.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/bopytest-code/code/ch4/cache/test_slower_2.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | import pytest
import datetime
import random
import time
from collections import namedtuple
Duration = namedtuple('Duration', ['current', 'last'])
@pytest.fixture(scope='session')
def duration_cache(request):
key = 'duration/testdurations'
d = Duration({}, request.config.cache.get(key, {}))
yield d
req... | 26.028571 | 69 | 0.703622 |
e8ab5fa234185afe25bb0534d5cee25176c6f734 | 2,051 | py | Python | dataloader.py | jercoco/QSQF | 6c435f8d4e1baf1937b06a52e63446f9a29f5ad8 | [
"Apache-2.0"
] | null | null | null | dataloader.py | jercoco/QSQF | 6c435f8d4e1baf1937b06a52e63446f9a29f5ad8 | [
"Apache-2.0"
] | null | null | null | dataloader.py | jercoco/QSQF | 6c435f8d4e1baf1937b06a52e63446f9a29f5ad8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 22 16:17:40 2020
@author: 18096
"""
from __future__ import division
import numpy as np
import os
import logging
from torch.utils.data import Dataset
logger = logging.getLogger('DeepAR.Data')
class TrainDataset(Dataset):
def __init__(self, data_path, d... | 34.762712 | 86 | 0.634812 |
e8abc624c431849458b76ec6c2c407691f051332 | 4,659 | py | Python | website/frontend/migrations/0001_initial.py | plympton/newsdiffs | 2a055850bda850b9b6c28c989512d4e4b3e9b64e | [
"MIT"
] | null | null | null | website/frontend/migrations/0001_initial.py | plympton/newsdiffs | 2a055850bda850b9b6c28c989512d4e4b3e9b64e | [
"MIT"
] | null | null | null | website/frontend/migrations/0001_initial.py | plympton/newsdiffs | 2a055850bda850b9b6c28c989512d4e4b3e9b64e | [
"MIT"
] | 1 | 2022-01-23T15:58:59.000Z | 2022-01-23T15:58:59.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Article'
db.create_table('Articles', (
('id', self.gf('django.db.models.fields... | 52.943182 | 125 | 0.58446 |
e8abc6a230c9824f45db671402a65233b9186aef | 53,791 | py | Python | test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/aio/operations/_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/aio/operations/_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/RequiredOptionalVersionTolerant/requiredoptionalversiontolerant/aio/operations/_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.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 ... | 40.383634 | 119 | 0.662732 |
e8abd6a6b55c5076ffb0f3880ba72ecd706d1733 | 17,618 | py | Python | tests/audit_test.py | TimYagan/merou | 3d3cd5e17eab5ffe259f7b41a925af6f47ec8988 | [
"Apache-2.0"
] | null | null | null | tests/audit_test.py | TimYagan/merou | 3d3cd5e17eab5ffe259f7b41a925af6f47ec8988 | [
"Apache-2.0"
] | null | null | null | tests/audit_test.py | TimYagan/merou | 3d3cd5e17eab5ffe259f7b41a925af6f47ec8988 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
from typing import List, NamedTuple
import pytest
from mock import call, Mock, patch
from six.moves.urllib.parse import urlencode
from tornado.httpclient import HTTPError
from grouper.audit import (
assert_can_join,
assert_controllers_are_auditors,
get_auditors_gro... | 36.627859 | 99 | 0.657509 |
e8abe1725dea79a4552c513c9ff03da3d10939cf | 739 | py | Python | src/model_utils/spacy_ner.py | akashphaniteja/Bio-BERT | b714a9bd9d67c8f9be6c0c58dd19709cd78542d5 | [
"CC0-1.0"
] | null | null | null | src/model_utils/spacy_ner.py | akashphaniteja/Bio-BERT | b714a9bd9d67c8f9be6c0c58dd19709cd78542d5 | [
"CC0-1.0"
] | null | null | null | src/model_utils/spacy_ner.py | akashphaniteja/Bio-BERT | b714a9bd9d67c8f9be6c0c58dd19709cd78542d5 | [
"CC0-1.0"
] | null | null | null | from typing import List, Tuple
import pandas as pd
import spacy
Annotations = List[Tuple[int, int, str]]
# creating a blank model, could have started from something pretrained as well (look for models)
def create_blank_nlp(train_data: pd.Series) -> spacy.Language:
"""Create a blank NLP model for training"""
... | 30.791667 | 96 | 0.684709 |
e8ac07696223da01a525fdb867cbb71696aaf37e | 875 | py | Python | docker_compose/slackbot/slackbot.py | mmuratardag/DS_SpA_W06_Dockerized_Data_Pipeline | 17d1fbf1eb18c50961bb068f4e70c87b07b2df9e | [
"MIT"
] | null | null | null | docker_compose/slackbot/slackbot.py | mmuratardag/DS_SpA_W06_Dockerized_Data_Pipeline | 17d1fbf1eb18c50961bb068f4e70c87b07b2df9e | [
"MIT"
] | null | null | null | docker_compose/slackbot/slackbot.py | mmuratardag/DS_SpA_W06_Dockerized_Data_Pipeline | 17d1fbf1eb18c50961bb068f4e70c87b07b2df9e | [
"MIT"
] | null | null | null | import os
import time
import slack
from sqlalchemy import create_engine
import logging
import requests
import pandas as pd
WEBHOOK_URL = os.getenv('WEBHOOK_URL')
time.sleep(15)
pg = create_engine('postgres://postgres:postgres@postgresdb:5432/twitter_stream', echo=True)
query = """SELECT DISTINCT ON (id) id, text,... | 26.515152 | 141 | 0.704 |
e8ac10fe64c15e9b344dc514cab5e8008f8b4179 | 11,711 | py | Python | tbridge/sims.py | HSouch/TBRIDGE | 1f266c64d905eca48749092687376708bcf09d48 | [
"BSD-3-Clause"
] | null | null | null | tbridge/sims.py | HSouch/TBRIDGE | 1f266c64d905eca48749092687376708bcf09d48 | [
"BSD-3-Clause"
] | null | null | null | tbridge/sims.py | HSouch/TBRIDGE | 1f266c64d905eca48749092687376708bcf09d48 | [
"BSD-3-Clause"
] | null | null | null | import tbridge
import tbridge.plotting as plotter
from astropy.table import Table
from astropy.io import fits
import time
import traceback
from pebble import ProcessPool
from concurrent.futures import TimeoutError
from numpy import round, array
from numpy.random import choice, randint, seed
def pipeline(config, ma... | 44.359848 | 119 | 0.647682 |
e8ac44d8548b5a7afcc8fe56b2c6553d452b7749 | 1,793 | py | Python | cms/models/__init__.py | fusionbox/django-cms | 3a09d5c39b3469e64aeecc0205a193f5b70c2061 | [
"BSD-3-Clause"
] | null | null | null | cms/models/__init__.py | fusionbox/django-cms | 3a09d5c39b3469e64aeecc0205a193f5b70c2061 | [
"BSD-3-Clause"
] | null | null | null | cms/models/__init__.py | fusionbox/django-cms | 3a09d5c39b3469e64aeecc0205a193f5b70c2061 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf import settings as d_settings
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import get_resolver, get_script_prefix, \
NoReverseMatch
from django.utils.encoding import iri_to_uri
from .settingmodels import *
from .pagemodel import *
fro... | 45.974359 | 221 | 0.802566 |
e8ac5d82fa764e99b3e09a603731a8581d16ee41 | 7,817 | py | Python | savant_get.py | jared-martin/savant-get | 3cf9f44e97cd237c13eecf98bf862a47f3c0f7bd | [
"MIT"
] | null | null | null | savant_get.py | jared-martin/savant-get | 3cf9f44e97cd237c13eecf98bf862a47f3c0f7bd | [
"MIT"
] | null | null | null | savant_get.py | jared-martin/savant-get | 3cf9f44e97cd237c13eecf98bf862a47f3c0f7bd | [
"MIT"
] | null | null | null | import datetime
import urllib.parse
import urllib.request
import io
import csv
import itertools
import pathlib
import os
import argparse
import logging
def split_date_span(first_date, last_date, days_in_subspan):
"""Generate pairs of dates from `first_date` through `last_date` that are
each at most `days_in_s... | 37.047393 | 79 | 0.636689 |
e8ac6fbb622547dc2825d8922212f4199bde7738 | 5,336 | py | Python | models/densenet.py | txping/AEGD | 50347c6109d21cfc3a5ac3acc9aeb0c97ff54033 | [
"BSD-3-Clause"
] | null | null | null | models/densenet.py | txping/AEGD | 50347c6109d21cfc3a5ac3acc9aeb0c97ff54033 | [
"BSD-3-Clause"
] | null | null | null | models/densenet.py | txping/AEGD | 50347c6109d21cfc3a5ac3acc9aeb0c97ff54033 | [
"BSD-3-Clause"
] | null | null | null | """
DenseNet for cifar with pytorch
Reference:
[1] H. Gao, Z. Liu, L. Maaten and K. Weinberger. Densely connected convolutional networks. In CVPR, 2017
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
from collections import OrderedDict
import math
class _DenseLayer(nn.Sequential):
def __in... | 40.120301 | 107 | 0.648988 |
e8ac7d47b777b740acfd509351c7474f7c68ed50 | 88,255 | py | Python | ngraph/frontends/neon/layer.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | ngraph/frontends/neon/layer.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | ngraph/frontends/neon/layer.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | # ******************************************************************************
# Copyright 2017-2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 44.393863 | 99 | 0.588454 |
e8ac89c328c41304aeab00a318ee762f41ddf53a | 3,844 | py | Python | Trescope4Python/example/src/example_plot_front3d.py | aaabbb2021/Trescope | 629dd526572b4883608fd12cc06738b0e83fe775 | [
"MIT"
] | 105 | 2020-11-09T04:20:26.000Z | 2022-03-23T12:32:24.000Z | Trescope4Python/example/src/example_plot_front3d.py | aaabbb2021/Trescope | 629dd526572b4883608fd12cc06738b0e83fe775 | [
"MIT"
] | 5 | 2021-02-21T04:21:56.000Z | 2022-01-04T08:07:20.000Z | Trescope4Python/example/src/example_plot_front3d.py | aaabbb2021/Trescope | 629dd526572b4883608fd12cc06738b0e83fe775 | [
"MIT"
] | 8 | 2020-11-13T12:55:36.000Z | 2022-01-17T07:28:06.000Z | import json
import os
import numpy as np
from trescope import Trescope, Layout
from trescope.config import (Mesh3DConfig, PerspectiveCamera, FRONT3DConfig)
from trescope.toolbox import simpleDisplayOutputs, color_from_label, simpleFileOutputs
front3d_base = os.path.abspath(os.path.join(
os.path.dirname(__file__)... | 41.782609 | 150 | 0.659209 |
e8ac9616f9cbcdb22eff7c3ecb244c7f5ffbbf8c | 4,513 | py | Python | QESclass.py | StudentsZhouPengfei/Automatically-Differentiable-Quantum-Circuit-for-Many-qubit-State-Preparation | 42d3a77380e78819375c9fb2c5600ddc89a3ae3f | [
"MIT"
] | 3 | 2021-05-10T01:49:59.000Z | 2021-06-13T19:03:40.000Z | QESclass.py | StudentsZhouPengfei/Automatically-Differentiable-Quantum-Circuit-for-Many-qubit-State-Preparation | 42d3a77380e78819375c9fb2c5600ddc89a3ae3f | [
"MIT"
] | null | null | null | QESclass.py | StudentsZhouPengfei/Automatically-Differentiable-Quantum-Circuit-for-Many-qubit-State-Preparation | 42d3a77380e78819375c9fb2c5600ddc89a3ae3f | [
"MIT"
] | null | null | null | import numpy as np
from HamiltonianModule import spin_operators
class QES_1D:
def __init__(self, d, chi, D, l_phys, tau, spin='half', operators=None):
# l_phys: number of sites in the bulk to simulate the bath
self.d = d
self.chi = chi # bath dimension
self.D = D
... | 48.526882 | 111 | 0.526257 |
e8aca52b79901743dcd2c17ae62ac75a041cddaf | 155 | py | Python | scripts/useful_scripts/context.py | jmontp/prosthetic_adaptation | fb5a9f1e6520b432cd14c1f217665f076367d3f2 | [
"MIT"
] | null | null | null | scripts/useful_scripts/context.py | jmontp/prosthetic_adaptation | fb5a9f1e6520b432cd14c1f217665f076367d3f2 | [
"MIT"
] | null | null | null | scripts/useful_scripts/context.py | jmontp/prosthetic_adaptation | fb5a9f1e6520b432cd14c1f217665f076367d3f2 | [
"MIT"
] | 1 | 2021-02-07T16:12:40.000Z | 2021-02-07T16:12:40.000Z | import os, sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../')))
import kmodel
import ekf
import utils
import rtplot | 19.375 | 86 | 0.729032 |
e8acb7de9953d404fca9b6a46014d777cb7d4655 | 710 | py | Python | odoons/commands/addons.py | jiksaa/odoons | 6845b5cd1ad73a1d44f04772b63431c5a54cfca7 | [
"MIT"
] | null | null | null | odoons/commands/addons.py | jiksaa/odoons | 6845b5cd1ad73a1d44f04772b63431c5a54cfca7 | [
"MIT"
] | 3 | 2021-10-05T14:29:51.000Z | 2021-10-17T21:52:41.000Z | odoons/commands/addons.py | jiksaa/odoons | 6845b5cd1ad73a1d44f04772b63431c5a54cfca7 | [
"MIT"
] | null | null | null | import os
from .command import Command
class Addons(Command):
def _addons_path(self, args):
"""
Action method responsible of the ACTION_LS sub command
:return: None
"""
if not self._odoo or not self._addons:
self.load_config(args.file)
odoo_path = os.... | 25.357143 | 62 | 0.571831 |
e8acc6d9955569a79b972827ef83b129b539db8e | 4,223 | py | Python | tests/test_parser_argument.py | mvisat/kopyt | 48e59ed4196cb80c5498cca62ecffbcb27e6599b | [
"MIT"
] | 2 | 2021-07-21T10:24:30.000Z | 2022-01-11T11:25:25.000Z | tests/test_parser_argument.py | mvisat/kopyt | 48e59ed4196cb80c5498cca62ecffbcb27e6599b | [
"MIT"
] | null | null | null | tests/test_parser_argument.py | mvisat/kopyt | 48e59ed4196cb80c5498cca62ecffbcb27e6599b | [
"MIT"
] | 1 | 2021-07-28T05:47:28.000Z | 2021-07-28T05:47:28.000Z | import unittest
from kopyt import node
from . import TestParserBase
class TestParserValueArgument(TestParserBase):
def do_test(self, code: str, test_str: bool = True) -> node.ValueArguments:
result = super().do_test("parse_value_arguments",
code,
... | 31.75188 | 79 | 0.565712 |
e8accc40bc162406dbf7d36fbde2c195a2321d74 | 3,791 | py | Python | src/rubrix/sdk/api/datasets/delete_dataset.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/api/datasets/delete_dataset.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/api/datasets/delete_dataset.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. 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/LICENSE-2.0
#
# Unless required ... | 24.616883 | 76 | 0.662886 |
e8acfa8296709d47df6648a2d9ae516f09bf4272 | 1,129 | py | Python | timeis/main.py | Cologler/timestyle-python | f6beeb6d87c36a7ddacedd07ff09eb1cf9542cf7 | [
"MIT"
] | null | null | null | timeis/main.py | Cologler/timestyle-python | f6beeb6d87c36a7ddacedd07ff09eb1cf9542cf7 | [
"MIT"
] | null | null | null | timeis/main.py | Cologler/timestyle-python | f6beeb6d87c36a7ddacedd07ff09eb1cf9542cf7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 - cologler <skyoflw@gmail.com>
# ----------
#
# ----------
import os
import sys
import traceback
import re
from datetime import datetime
from .core import resolve, Result, infer_style
def parse_datatime(value: str):
m = re.match('^(\\d{4})-(\\... | 20.907407 | 64 | 0.56333 |
e8ad1d5fb7e4d2b50cb7eb5a00c9135aafee9964 | 2,371 | py | Python | tests/test_model_constraint.py | missingcharacter/marathon-python | e1a42642c42716ef074e5b2523408bc1aa6025e2 | [
"MIT"
] | 202 | 2015-01-07T06:55:14.000Z | 2021-11-30T12:05:50.000Z | tests/test_model_constraint.py | missingcharacter/marathon-python | e1a42642c42716ef074e5b2523408bc1aa6025e2 | [
"MIT"
] | 213 | 2015-03-04T12:54:09.000Z | 2022-02-28T11:36:28.000Z | tests/test_model_constraint.py | missingcharacter/marathon-python | e1a42642c42716ef074e5b2523408bc1aa6025e2 | [
"MIT"
] | 169 | 2015-02-06T16:48:05.000Z | 2022-01-18T16:20:56.000Z | from marathon.models.app import MarathonConstraint
import unittest
class MarathonConstraintTests(unittest.TestCase):
def test_repr_with_value(self):
constraint = MarathonConstraint('a_field', 'OPERATOR', 'a_value')
representation = repr(constraint)
self.assertEqual(representation,
... | 43.109091 | 85 | 0.694222 |
e8ad66522528044f0702a6ad13a70250884379e2 | 1,691 | py | Python | days/13-15-text-games/my_code/wizard_game/program.py | Anthlis/100daysofcode-with-python-course | 4573eff9e4a32c4186839a55a3bd9d6df779c011 | [
"MIT"
] | 2 | 2020-11-15T12:44:01.000Z | 2021-11-15T12:26:32.000Z | days/13-15-text-games/my_code/wizard_game/program.py | Anthlis/100daysofcode-with-python-course | 4573eff9e4a32c4186839a55a3bd9d6df779c011 | [
"MIT"
] | 1 | 2021-06-01T23:51:28.000Z | 2021-06-01T23:51:28.000Z | days/13-15-text-games/my_code/wizard_game/program.py | Anthlis/100daysofcode-with-python-course | 4573eff9e4a32c4186839a55a3bd9d6df779c011 | [
"MIT"
] | 1 | 2021-01-06T14:36:27.000Z | 2021-01-06T14:36:27.000Z | # import actors
import random
import time
from actors import Wizard, Creature, SmallAnimal, Dragon
def main():
print_header()
game_loop()
def print_header():
print('-------------------------')
print(' WIZARD GAME')
print('-------------------------')
print()
def game_loop():
creat... | 23.816901 | 81 | 0.52809 |
e8add62187773e178559c2c0938c9b74f587f6b6 | 9,542 | py | Python | tests/test_python_blosc.py | hirnimeshrampuresoftware/python-blosc2 | 9ed3e7fe9a9fcdc7524b76e8fec2a59523ade1f0 | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/test_python_blosc.py | hirnimeshrampuresoftware/python-blosc2 | 9ed3e7fe9a9fcdc7524b76e8fec2a59523ade1f0 | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/test_python_blosc.py | hirnimeshrampuresoftware/python-blosc2 | 9ed3e7fe9a9fcdc7524b76e8fec2a59523ade1f0 | [
"BSD-3-Clause-Clear"
] | null | null | null | ########################################################################
#
# Created: April 30, 2021
# Author: The Blosc development team - blosc@blosc.org
#
########################################################################
# Test the python-blosc API
# -*- coding: utf-8 -*-
from __future__ import... | 37.419608 | 111 | 0.660553 |
e8ae0d63c76f0015b6b6318a978ae20d959d5886 | 2,495 | py | Python | tasks/lstm/model.py | epfml/powergossip | 087eb09f64b0980c4224f3d0d8da1276a77aa721 | [
"MIT"
] | 6 | 2020-08-04T09:24:56.000Z | 2021-10-05T04:25:10.000Z | tasks/lstm/model.py | epfml/powergossip | 087eb09f64b0980c4224f3d0d8da1276a77aa721 | [
"MIT"
] | null | null | null | tasks/lstm/model.py | epfml/powergossip | 087eb09f64b0980c4224f3d0d8da1276a77aa721 | [
"MIT"
] | 1 | 2021-03-03T02:49:10.000Z | 2021-03-03T02:49:10.000Z | """
Copied from https://github.com/epfml/ChocoSGD/blob/master/dl_code/pcode/models/rnn_lm.py
Based on https://github.com/pytorch/examples/blob/master/word_language_model/model.py
"""
import torch
import torch.nn as nn
class RNNLM(nn.Module):
"""Container module with an encoder, a recurrent module, and a decoder.... | 36.15942 | 110 | 0.633267 |
e8ae18d0ce0952a3a9974405ead8fc00eeeeaf8e | 3,386 | py | Python | disvis/pyclfft.py | haddocking/disvis | a922bd079b41ad5ef3ac33f4e68968f8978626d2 | [
"Apache-2.0"
] | 4 | 2017-12-27T13:09:43.000Z | 2021-07-20T09:45:58.000Z | disvis/pyclfft.py | haddocking/disvis | a922bd079b41ad5ef3ac33f4e68968f8978626d2 | [
"Apache-2.0"
] | 17 | 2015-06-08T03:43:00.000Z | 2022-03-09T13:12:16.000Z | disvis/pyclfft.py | haddocking/disvis | a922bd079b41ad5ef3ac33f4e68968f8978626d2 | [
"Apache-2.0"
] | 11 | 2015-07-06T18:25:27.000Z | 2020-10-08T13:14:16.000Z | from gpyfft import GpyFFT
G = GpyFFT()
IMAGINARY = 3
REAL = 5
def builder(context, shape, direction_forward=True):
pass
class RFFTn:
def __init__(self, context, shape):
# The maximum number of elements of the transform is 2^24
# in clFFT (single precision)
elements = 1
for i in... | 29.189655 | 123 | 0.55759 |
e8ae1a5ce4f526fb43c191a9c5e6c763352fbb6a | 931 | py | Python | nlp_annotator_api/annotators/entities/ValueAnnotator.py | dasaku-ai/nlpmodel-v-h | 326bb9467df11d517285610c70f9d22627eb5efc | [
"Apache-2.0"
] | null | null | null | nlp_annotator_api/annotators/entities/ValueAnnotator.py | dasaku-ai/nlpmodel-v-h | 326bb9467df11d517285610c70f9d22627eb5efc | [
"Apache-2.0"
] | 1 | 2022-02-02T09:26:44.000Z | 2022-02-02T09:26:44.000Z | nlp_annotator_api/annotators/entities/ValueAnnotator.py | dasaku-ai/nlpmodel-v-h | 326bb9467df11d517285610c70f9d22627eb5efc | [
"Apache-2.0"
] | null | null | null | from .common.utils import RegValueAnnotator
class ValueAnnotator:
def key(self) -> str:
return "values"
def description(self) -> str:
return "finding values, where 2 options, float_value(500, 0.05), range_bool(and, to, -)."
def __init__(self):
# init CDE
... | 22.707317 | 98 | 0.45435 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.