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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c8a4b87d4a95a5a876092b722cfff82348a60549 | 1,268 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/fancyled_neopixel_rotate_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/fancyled_neopixel_rotate_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 12 | 2019-03-04T21:48:07.000Z | 2022-01-17T18:55:37.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/fancyled_neopixel_rotate_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 16 | 2018-01-29T04:07:11.000Z | 2021-09-19T02:17:57.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
""" Simple FancyLED example for NeoPixel strip
"""
import board
import neopixel
import adafruit_fancyled.adafruit_fancyled as fancy
num_leds = 20
# Declare a 6-element RGB rainbow palette
palette = [
fancy.CRGB(1.0, 0.... | 32.512821 | 80 | 0.681388 |
c8a4c3ca80b2525b19fdbf80c2a7154db8260c1e | 3,965 | py | Python | experiments/ashvin/rss/pusher1/original/rig_v2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rss/pusher1/original/rig_v2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/rss/pusher1/original/rig_v2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.grill.launcher import grill_her_td3_full_experiment
from multiworld.envs.mujo... | 30.976563 | 87 | 0.530391 |
c8a4c4d7c980626d28b0664e9c234d72c0cd3369 | 1,361 | py | Python | toontown/effects/FlashEffect.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/effects/FlashEffect.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/effects/FlashEffect.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 pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from toontown.effects.EffectController import EffectController
class FlashEffect(NodePath, EffectController):
def __init__(self):
NodePath.__init__(self, 'FlashEffect')
EffectController.__init__(self)
self.fadeT... | 45.366667 | 149 | 0.720059 |
c8a4c77eac52e486f2ae49ec54d7165afc69273a | 22,873 | py | Python | src/sardana/util/test/test_parser.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/util/test/test_parser.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/util/test/test_parser.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 27.425659 | 78 | 0.430857 |
c8a4c8da51c350461c2a9a07d9da758eec4cb2f9 | 321 | py | Python | application/auth.py | DonBlaine/OpenDoorData | 74740c6ff6dca893f0389963f2ef12de42a36829 | [
"MIT"
] | null | null | null | application/auth.py | DonBlaine/OpenDoorData | 74740c6ff6dca893f0389963f2ef12de42a36829 | [
"MIT"
] | null | null | null | application/auth.py | DonBlaine/OpenDoorData | 74740c6ff6dca893f0389963f2ef12de42a36829 | [
"MIT"
] | null | null | null | # file that contains the authentication system used to provide security to the admin interface
from flask_peewee.auth import Auth # Login/logout views, etc.
from app import app
from models import User, db
# instantiate an Auth object for use with flask app and database wrapper
auth = Auth(app, db, user_model = User)... | 35.666667 | 94 | 0.785047 |
c8a4e572d2d3ee19648b6f7057ab30fe19e00677 | 5,079 | py | Python | covid/data/data.py | kimuraz/covid-19 | db7995c1075e6fc3930585691d6c1c5be8eac465 | [
"MIT"
] | null | null | null | covid/data/data.py | kimuraz/covid-19 | db7995c1075e6fc3930585691d6c1c5be8eac465 | [
"MIT"
] | null | null | null | covid/data/data.py | kimuraz/covid-19 | db7995c1075e6fc3930585691d6c1c5be8eac465 | [
"MIT"
] | null | null | null | from pathlib import Path
import numpy as np
import pandas as pd
DATA = Path(__file__).parent.parent / 'datasets'
COARSE_INDEX = (
'0-9', '10-19', '20-29', '30-39', '40-49', '50-59', '60-69',
'70-79', '80+',
)
# Contact matrix information
CONTACT_MATRIX_COUNTRIES = [
'Belgium', 'Finland', 'Germany', 'Grea... | 46.172727 | 90 | 0.626895 |
c8a4e7e6adfec40f8c1b27dcf8d8022340fa5e89 | 1,422 | py | Python | trident_chemwidgets/tests/conftest.py | tridentbio/trident-chemwidgets | da71c8c5cf5fe49f1ea050d4d658fb28d9a24d86 | [
"BSD-3-Clause"
] | 7 | 2022-03-09T17:48:14.000Z | 2022-03-18T20:41:56.000Z | trident_chemwidgets/tests/conftest.py | tridentbio/trident-chemwidgets | da71c8c5cf5fe49f1ea050d4d658fb28d9a24d86 | [
"BSD-3-Clause"
] | null | null | null | trident_chemwidgets/tests/conftest.py | tridentbio/trident-chemwidgets | da71c8c5cf5fe49f1ea050d4d658fb28d9a24d86 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Trident Bioscience, Inc..
# Distributed under the terms of the Modified BSD License.
import pytest
from ipykernel.comm import Comm
from ipywidgets import Widget
class MockComm(Comm):
"""A mock Comm object.
Can be used to inspect calls to Comm's open/sen... | 25.854545 | 80 | 0.654008 |
c8a52b50f44a4cf4b2c07888a899046038f201e7 | 992 | py | Python | src/svg_icons/readers/icomoon.py | mikedingjan/django-svg-icons | f09a4bc6f87eee95c480dfafd95c75d2367ee2fd | [
"Apache-2.0"
] | 5 | 2016-08-11T07:48:43.000Z | 2018-08-01T18:56:21.000Z | src/svg_icons/readers/icomoon.py | mikedingjan/django-svg-icons | f09a4bc6f87eee95c480dfafd95c75d2367ee2fd | [
"Apache-2.0"
] | 3 | 2016-08-09T13:43:44.000Z | 2017-11-02T09:03:22.000Z | src/svg_icons/readers/icomoon.py | mikedingjan/django-svg-icons | f09a4bc6f87eee95c480dfafd95c75d2367ee2fd | [
"Apache-2.0"
] | 2 | 2017-03-29T07:37:33.000Z | 2018-10-25T17:19:51.000Z | import json
import logging
from svg_icons.readers.base import BaseReader
logger = logging.getLogger(__name__)
class IcomoonReader(BaseReader):
def read_source_file(self):
"""Read Icomoon format into memory.
..:json example (stripped)::
{
"icons": [
{
... | 24.8 | 77 | 0.474798 |
c8a5346eb7432a1c7564d684b28b8b2e471a8230 | 934 | py | Python | learning_logs/models.py | juniorpedroso/learning_log | ed95ac71c01f917f7984357700bd98d3117641c9 | [
"MIT"
] | null | null | null | learning_logs/models.py | juniorpedroso/learning_log | ed95ac71c01f917f7984357700bd98d3117641c9 | [
"MIT"
] | null | null | null | learning_logs/models.py | juniorpedroso/learning_log | ed95ac71c01f917f7984357700bd98d3117641c9 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
class Topic(models.Model):
""" Um assunto sobre o qual o usuário está aprendendo """
text = models.CharField(max_length=200)
date_added = models.DateTimeField(auto_now_add=True)
owner = models.ForeignKey(User, on_delete=models.CA... | 30.129032 | 62 | 0.665953 |
c8a5558b321ddd5525b9312b48ce471ea48390a2 | 3,957 | py | Python | color.py | pete456/Color-Scheme-Generator | 8c3bca15f002b84c97912e1203551a1834f47868 | [
"MIT"
] | null | null | null | color.py | pete456/Color-Scheme-Generator | 8c3bca15f002b84c97912e1203551a1834f47868 | [
"MIT"
] | null | null | null | color.py | pete456/Color-Scheme-Generator | 8c3bca15f002b84c97912e1203551a1834f47868 | [
"MIT"
] | null | null | null | class NotRGBHexError(Exception):
pass
class Color:
def __init__(self,rgb):
"""Takes in a rgb hex value or a hsv list
"""
if type(rgb) == str:
self.rgb=rgbtolist(rgb)
self.rgbfraction=fractionizergb(self)
elif type(rgb) == list:
self.rgb=hsvtor... | 28.06383 | 92 | 0.553197 |
c8a5616d3f5aa393fb1eed2e495cf85b2dfb889a | 935 | py | Python | maro/simulator/scenarios/citi_bike/stations_info.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/simulator/scenarios/citi_bike/stations_info.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/simulator/scenarios/citi_bike/stations_info.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.s
import os
from csv import DictReader
from collections import namedtuple
StationInfo = namedtuple("StationInfo", ["index", "bikes", "capacity", "id"])
def get_station_info(station_state_file: str):
"""get stations information from specifi... | 31.166667 | 122 | 0.636364 |
c8a57abba82bd5746abb1d59cbfa8520e78356a5 | 789 | py | Python | main.py | atrn0/rpi-gpio-subscriber | 80cb6eb99408891ccaca39da092b337586c382f5 | [
"MIT"
] | null | null | null | main.py | atrn0/rpi-gpio-subscriber | 80cb6eb99408891ccaca39da092b337586c382f5 | [
"MIT"
] | null | null | null | main.py | atrn0/rpi-gpio-subscriber | 80cb6eb99408891ccaca39da092b337586c382f5 | [
"MIT"
] | null | null | null | import datetime
import random
import ssl
import time
from iotcore.client import Client
def main():
# constants
project_id = "aratasato"
device_id = "rpiz-garage"
registry_id = "rpi-garage"
region = "asia-east1"
algorithm = "RS256"
private_key_file = "/Users/ataran/workspace/rpi-gpio-subsc... | 26.3 | 102 | 0.68948 |
c8a59080304794abe4b7a5451fd69be502c0aee2 | 1,392 | py | Python | restapi/v1/serializers.py | asntech/jaspar | ae86731e8f197d6830e6d778835f218d4eb1b9e8 | [
"BSD-3-Clause"
] | 3 | 2017-11-20T23:03:20.000Z | 2020-02-15T19:32:23.000Z | restapi/v1/serializers.py | asntech/jaspar | ae86731e8f197d6830e6d778835f218d4eb1b9e8 | [
"BSD-3-Clause"
] | 3 | 2019-12-12T09:26:55.000Z | 2021-06-10T19:24:19.000Z | restapi/v1/serializers.py | asntech/jaspar | ae86731e8f197d6830e6d778835f218d4eb1b9e8 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
## Author: Aziz Khan
## License: GPL v3
## Copyright © 2017 Aziz Khan <azez.khan__AT__gmail.com>
from rest_framework import serializers
from portal.models import Matrix, MatrixAnnotation
from django.http import HttpRequest
class MatrixAnnotationSerializer(serializers.HyperlinkedModelSerializ... | 29 | 90 | 0.733477 |
c8a5ae66787ebab3cd1d7db181cf793853a01eb1 | 12,896 | py | Python | py_search/optimization.py | ctonic/py_search | 4635616e174dadba049c6a68799df7ea92d78c4c | [
"MIT"
] | 4 | 2019-02-04T14:20:40.000Z | 2021-02-08T21:25:03.000Z | py_search/optimization.py | ctonic/py_search | 4635616e174dadba049c6a68799df7ea92d78c4c | [
"MIT"
] | 6 | 2016-07-10T20:01:20.000Z | 2018-02-25T15:06:14.000Z | py_search/optimization.py | ctonic/py_search | 4635616e174dadba049c6a68799df7ea92d78c4c | [
"MIT"
] | 3 | 2018-06-23T13:31:42.000Z | 2021-06-17T11:23:02.000Z | """
This module contains the local search / optimization techniques. Instead of
trying to find a goal state, these algorithms try to find the lowest cost
state.
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from ... | 35.722992 | 79 | 0.626318 |
c8a5b94e8d5efa38b481bcfb4d8fff0b8cfe24bb | 3,790 | py | Python | ufora/FORA/test/ValidatePerf.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/FORA/test/ValidatePerf.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/FORA/test/ValidatePerf.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 28.712121 | 93 | 0.613193 |
c8a5cdd6dfdfc10b354f7a921fd73379ae5897eb | 2,560 | py | Python | sjtwo-c/toolchains/mac/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/lib/thumb/v7+fp/hard/libstdc++.a-gdb.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 2 | 2020-04-04T21:09:56.000Z | 2020-04-08T17:00:58.000Z | sjtwo-c/toolchains/mac/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/lib/thumb/v7+fp/hard/libstdc++.a-gdb.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 13 | 2020-04-11T21:50:57.000Z | 2020-04-19T03:19:48.000Z | sjtwo-c/toolchains/mac/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/lib/thumb/v7+fp/hard/libstdc++.a-gdb.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | null | null | null | # -*- python -*-
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later versio... | 41.290323 | 126 | 0.730469 |
c8a5fc9f2ad2c761cbeced904431d6a4e528b60f | 30,636 | py | Python | tests/test_multi_param_modeler.py | extra-p/extrap | 34f9d8b078aa240defd6ac50203efd44d6f60f79 | [
"BSD-3-Clause"
] | 13 | 2020-11-12T21:50:09.000Z | 2022-03-03T11:01:27.000Z | tests/test_multi_param_modeler.py | extra-p/extrap | 34f9d8b078aa240defd6ac50203efd44d6f60f79 | [
"BSD-3-Clause"
] | 3 | 2020-12-04T12:49:37.000Z | 2021-05-06T11:41:31.000Z | tests/test_multi_param_modeler.py | extra-p/extrap | 34f9d8b078aa240defd6ac50203efd44d6f60f79 | [
"BSD-3-Clause"
] | 6 | 2021-01-14T16:06:47.000Z | 2021-09-01T09:54:37.000Z | # This file is part of the Extra-P software (http://www.scalasca.org/software/extra-p)
#
# Copyright (c) 2020-2021, Technical University of Darmstadt, Germany
#
# This software may be modified and distributed under the terms of a BSD-style license.
# See the LICENSE file in the base directory for details.
import itert... | 42.609179 | 118 | 0.550039 |
c8a5fe1b63d66d78a6e09c037b2b8fe903a1ef39 | 440 | py | Python | src/utils/label_helpers.py | niall-twomey/har_datasets | 68f142ba613ce26f67cdd6b871117f4c24ea603f | [
"MIT"
] | 24 | 2018-12-12T08:54:52.000Z | 2021-12-07T08:45:13.000Z | src/utils/label_helpers.py | niall-twomey/har_datasets | 68f142ba613ce26f67cdd6b871117f4c24ea603f | [
"MIT"
] | 3 | 2019-07-18T20:14:41.000Z | 2022-03-12T01:03:28.000Z | src/utils/label_helpers.py | niall-twomey/har_datasets | 68f142ba613ce26f67cdd6b871117f4c24ea603f | [
"MIT"
] | 9 | 2018-12-12T16:18:39.000Z | 2022-03-30T16:25:47.000Z | __all__ = ["normalise_labels"]
def normalise_labels(ll):
"""
Args:
ll:
Returns:
"""
if "walk" in ll:
return "walk"
elif "elevator" in ll:
return "stand"
elif ll in {"lie", "sleep"}:
return "lie"
elif ll in {"vacuum", "iron", "laundry", "clean"}:
... | 18.333333 | 63 | 0.511364 |
c8a66efb61c0987799425f4985607772fa029385 | 10,641 | py | Python | src/podping_hivewriter/cli/podping.py | Podcastindex-org/podping-hivewriter | 61840d8e0ed54e3b3016e56230fb20b03ec6f2de | [
"MIT"
] | 11 | 2021-05-28T15:58:31.000Z | 2022-03-21T07:08:58.000Z | src/podping_hivewriter/cli/podping.py | seakintruth/podping-hivewriter | 4b471258ff750ba42ca8fefec487d804a5b1cc91 | [
"MIT"
] | 33 | 2021-06-12T09:23:47.000Z | 2022-02-27T06:34:05.000Z | src/podping_hivewriter/cli/podping.py | seakintruth/podping-hivewriter | 4b471258ff750ba42ca8fefec487d804a5b1cc91 | [
"MIT"
] | 3 | 2021-07-30T19:40:04.000Z | 2022-01-19T04:14:14.000Z | import asyncio
import logging
from typing import Optional, List
import rfc3987
import typer
from podping_hivewriter import __version__
from podping_hivewriter.constants import LIVETEST_OPERATION_ID, PODPING_OPERATION_ID
from podping_hivewriter.podping_hivewriter import PodpingHivewriter
from podping_hivewriter.podpin... | 36.56701 | 205 | 0.66272 |
c8a6ea9a79c87127cf7fef6234bd8f1d4f25a7af | 10,663 | py | Python | docs/conf.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 118 | 2016-01-04T07:46:23.000Z | 2022-03-29T14:12:59.000Z | docs/conf.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 4 | 2017-06-27T08:01:02.000Z | 2020-10-06T14:18:46.000Z | docs/conf.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 22 | 2016-04-20T06:17:35.000Z | 2022-03-07T01:40:25.000Z | # -*- coding: utf-8 -*-
#
# Heat Transfer documentation build configuration file, created by
# sphinx-quickstart on Sat Jan 2 17:15:23 2016.
#
# 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.... | 32.214502 | 159 | 0.704961 |
c8a6f92ef20b8b05984a001b9f549d596c24ffdb | 571 | py | Python | workmanager/migrations/0004_auto_20200110_1329.py | AlexisDeReyes/PyWorkManagerApi | c04b59ab8884f5ccbe87c0f3ac3dc241c04c9e8d | [
"Apache-2.0"
] | null | null | null | workmanager/migrations/0004_auto_20200110_1329.py | AlexisDeReyes/PyWorkManagerApi | c04b59ab8884f5ccbe87c0f3ac3dc241c04c9e8d | [
"Apache-2.0"
] | null | null | null | workmanager/migrations/0004_auto_20200110_1329.py | AlexisDeReyes/PyWorkManagerApi | c04b59ab8884f5ccbe87c0f3ac3dc241c04c9e8d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.0.2 on 2020-01-10 18:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('workmanager', '0003_auto_20200110_1258'),
]
operations = [
migrations.AlterField(
model_name='task',
name='id',
... | 23.791667 | 70 | 0.58669 |
c8a7165c2200b4d9046a5ec2527b4fc2d7ce1a25 | 11,445 | py | Python | Python_files/INRIX_data_preprocessing_16_prepare_link_flows_for_OD_demand_estimation_Apr_journal.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/INRIX_data_preprocessing_16_prepare_link_flows_for_OD_demand_estimation_Apr_journal.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/INRIX_data_preprocessing_16_prepare_link_flows_for_OD_demand_estimation_Apr_journal.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Jing Zhang"
__email__ = "jingzbu@gmail.com"
__status__ = "Development"
from util import *
road_seg_inr_capac = zload('../temp_files/road_seg_inr_capac_journal.pkz')
# load tmc-day-ave_speed data for AM peak of Apruary
tmc_day_speed_dict_Apr_AM = zload('../temp_files/Apr_AM/tmc_... | 59.300518 | 125 | 0.61232 |
c8a785701ebfbab2e65c73463b0e655561edab41 | 4,228 | py | Python | test/test_stop.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | test/test_stop.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | test/test_stop.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
MBTA
MBTA service API. https://www.mbta.com Source code: https://github.com/mbta/api # noqa: E501
The version of the OpenAPI document: 3.0
Contact: developer@mbta.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
im... | 44.041667 | 155 | 0.562914 |
c8a78a0fb55c840660c8897cf3fd3f25b699f29b | 14,696 | py | Python | tweet_trade.py | stephen-eades/tos-trade-bot | ac5dbe722c0a907d31bead7c38ec9b6a5bbded7e | [
"MIT"
] | 7 | 2021-03-04T17:46:02.000Z | 2022-02-20T03:55:14.000Z | tweet_trade.py | stephen-eades/tos-trade-bot | ac5dbe722c0a907d31bead7c38ec9b6a5bbded7e | [
"MIT"
] | null | null | null | tweet_trade.py | stephen-eades/tos-trade-bot | ac5dbe722c0a907d31bead7c38ec9b6a5bbded7e | [
"MIT"
] | 1 | 2021-11-14T18:54:29.000Z | 2021-11-14T18:54:29.000Z | """TOS-Trade-Bot docstrings
This module provides functions and classes that can be called on a
reoccurring basis to send a Tweet for each stock trade that occurs.
Additionally will Tweet current positions at the beginning of each day.
This is built for TD Ameritrade's API, but could be easily repurposed.
A Twitter de... | 39.826558 | 133 | 0.626701 |
c8a79a9f63c2136bf216f96cb96c85362a58bd1a | 4,247 | py | Python | jme/jupy_tools/experimental/fix_refseq_taxonomy.py | jmeppley/jupy_tools | 822d44fbd336cdd391688e7438ec3ec53debe919 | [
"MIT"
] | null | null | null | jme/jupy_tools/experimental/fix_refseq_taxonomy.py | jmeppley/jupy_tools | 822d44fbd336cdd391688e7438ec3ec53debe919 | [
"MIT"
] | 1 | 2020-12-15T21:35:02.000Z | 2020-12-15T21:35:02.000Z | jme/jupy_tools/experimental/fix_refseq_taxonomy.py | jmeppley/jupy_tools | 822d44fbd336cdd391688e7438ec3ec53debe919 | [
"MIT"
] | null | null | null | from edl import taxon as edltaxon, util
import os, re, time
from Bio import Entrez
from IPython.core.interactiveshell import getoutput
from requests import HTTPError
import logging
class TaxonomicDatabase:
""" Object representing a sequence db with taxonomic info. EG RefSeq """
def __init__(self, db_path):
... | 35.991525 | 87 | 0.615493 |
c8a7b8801fd2ac3debaf45d7fb1f6862d2d8bfdc | 362 | py | Python | drivers/plot_galex.py | lgbouma/rudolf | 0f130f45fdbcce109a6750aa179dd26a12179619 | [
"MIT"
] | null | null | null | drivers/plot_galex.py | lgbouma/rudolf | 0f130f45fdbcce109a6750aa179dd26a12179619 | [
"MIT"
] | null | null | null | drivers/plot_galex.py | lgbouma/rudolf | 0f130f45fdbcce109a6750aa179dd26a12179619 | [
"MIT"
] | null | null | null | import os
import rudolf.plotting as rp
from rudolf.paths import RESULTSDIR
PLOTDIR = os.path.join(RESULTSDIR, 'galex')
if not os.path.exists(PLOTDIR):
os.mkdir(PLOTDIR)
for xval in ['bpmrp0', 'jmk']:
rp.plot_galex(
PLOTDIR, overplotkep1627=1,
clusters=['Pleiades', 'δ Lyr cluster'],
ext... | 24.133333 | 47 | 0.676796 |
c8a7de1b9210c32cd417014ec8402d2d89463b5a | 8,517 | py | Python | atom/nucleus/python/nucleus_api/models/page_node.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/page_node.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/page_node.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from nucleus_api.configuration i... | 25.653614 | 194 | 0.564283 |
c8a7f9d3c8b613160c8375bd02347552a13084e3 | 2,792 | py | Python | utils/lie_algebra.py | joeaortiz/gbp | 5670a498950bfa948da502b2381899ab46f61021 | [
"MIT"
] | 50 | 2020-03-10T08:49:45.000Z | 2022-03-24T01:50:24.000Z | utils/lie_algebra.py | joeaortiz/gbp | 5670a498950bfa948da502b2381899ab46f61021 | [
"MIT"
] | 1 | 2022-03-21T02:36:36.000Z | 2022-03-21T03:03:38.000Z | utils/lie_algebra.py | joeaortiz/gbp | 5670a498950bfa948da502b2381899ab46f61021 | [
"MIT"
] | 11 | 2020-04-24T16:29:48.000Z | 2022-03-09T07:39:30.000Z | import numpy as np
import scipy.linalg
"""
Lie algebra functions to move between group and tangent space.
"""
_EPS = np.finfo(float).eps
def S03_hat_operator(x):
"""
Hat operator for SO(3) Lie Group
"""
return np.array([[0., -x[2], x[1]],
[x[2], 0., -x[0]],
... | 25.614679 | 124 | 0.466691 |
c8a84c6ddf7bf9b92c184d0feab62974f21ab2a0 | 5,689 | py | Python | validation-scripts/ice_validator/tests/test_allowed_address_pair_format.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_allowed_address_pair_format.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_allowed_address_pair_format.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf8 -*-
# ============LICENSE_START=======================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ========================================... | 43.427481 | 82 | 0.532958 |
c8a8c76a28b91654158fa0005e009872ec9c0fb0 | 5,138 | py | Python | operators/gemm.py | ngiambla/nnflex | 7c8bf46218ea70c6dad1efedf9e2069e41c4c3fa | [
"MIT"
] | null | null | null | operators/gemm.py | ngiambla/nnflex | 7c8bf46218ea70c6dad1efedf9e2069e41c4c3fa | [
"MIT"
] | null | null | null | operators/gemm.py | ngiambla/nnflex | 7c8bf46218ea70c6dad1efedf9e2069e41c4c3fa | [
"MIT"
] | null | null | null | ''' gemm.py:
Implement's the GeMM ONNX node as a flexnode (for use with any accelerator)
'''
import uuid
import numpy as np
from operators.flexnode import FlexNode
from core.defines import Operator
from core.messaging import Message
class GeMM(FlexNode):
def __init__(self, onnx_node, inputs, outputs):
... | 32.726115 | 114 | 0.588945 |
c8a8f95351c9a5fc3e3e3e82f4668105a1836d23 | 2,945 | py | Python | misc/utils.py | DSAdv/SpamClassificator | b9dfc2f42e66d0b97ef3fe072ecbe68b883d64d7 | [
"Apache-2.0"
] | null | null | null | misc/utils.py | DSAdv/SpamClassificator | b9dfc2f42e66d0b97ef3fe072ecbe68b883d64d7 | [
"Apache-2.0"
] | null | null | null | misc/utils.py | DSAdv/SpamClassificator | b9dfc2f42e66d0b97ef3fe072ecbe68b883d64d7 | [
"Apache-2.0"
] | null | null | null | import pathlib
import random
import time
class Timer:
"""
Timer context manager for control execution time.
"""
def __init__(self, name: str):
self.name = name
self.start = None
self.end = None
def __enter__(self):
self.start = time.time()
return self
... | 27.523364 | 96 | 0.535484 |
c8a9216c1b379243608a056e0a60c830e6a4ca27 | 783 | py | Python | client/test/test_pipeline/test_dsl/test_options/test_cache_options.py | qiaoshuangshuang/PaddleFlow | 15155a553587f18b09d4edfc604cb64a1fbe01a7 | [
"Apache-2.0"
] | 23 | 2021-12-31T02:36:13.000Z | 2022-03-29T07:38:43.000Z | client/test/test_pipeline/test_dsl/test_options/test_cache_options.py | qiaoshuangshuang/PaddleFlow | 15155a553587f18b09d4edfc604cb64a1fbe01a7 | [
"Apache-2.0"
] | 10 | 2022-01-05T08:47:37.000Z | 2022-03-29T11:59:43.000Z | client/test/test_pipeline/test_dsl/test_options/test_cache_options.py | qiaoshuangshuang/PaddleFlow | 15155a553587f18b09d4edfc604cb64a1fbe01a7 | [
"Apache-2.0"
] | 19 | 2021-12-30T14:37:24.000Z | 2022-03-23T03:30:32.000Z | #!/usr/bin/env python3
"""
unit test for paddleflow.pipeline.dsl.options.cache_options
"""
import pytest
from paddleflow.pipeline import CacheOptions
class TestCacheOptions(object):
""" unit test for CacheOptions
"""
@pytest.mark.compile
def test_compile(self):
""" test compile
"""
... | 23.029412 | 79 | 0.560664 |
c8a93fd66836efd19b3155fd061ea43022086d84 | 114 | py | Python | tests/demo-extension/proxytest/backends/unavailable.py | yoleg/proxytest | 63c85b9b14c35de72fce4542ae44080ee6082efb | [
"MIT"
] | 2 | 2020-01-09T14:42:50.000Z | 2020-08-18T10:26:55.000Z | tests/demo-extension/proxytest/backends/unavailable.py | yoleg/proxytest | 63c85b9b14c35de72fce4542ae44080ee6082efb | [
"MIT"
] | null | null | null | tests/demo-extension/proxytest/backends/unavailable.py | yoleg/proxytest | 63c85b9b14c35de72fce4542ae44080ee6082efb | [
"MIT"
] | null | null | null | """
Example unavailable. Used by unit tests.
"""
from proxytest import backend
raise backend.NotSupportedError()
| 16.285714 | 40 | 0.77193 |
c8a94854e643a1fc3217e71136e78982278600c9 | 3,061 | py | Python | kale/prepdata/image_transform.py | RSE-Sheffield/pykale | 6594edc20b995366977bbf6db886b19a36ce6256 | [
"MIT"
] | null | null | null | kale/prepdata/image_transform.py | RSE-Sheffield/pykale | 6594edc20b995366977bbf6db886b19a36ce6256 | [
"MIT"
] | null | null | null | kale/prepdata/image_transform.py | RSE-Sheffield/pykale | 6594edc20b995366977bbf6db886b19a36ce6256 | [
"MIT"
] | null | null | null | """
Preprocessing of image datasets, i.e., transforms, from
https://github.com/criteo-research/pytorch-ada/blob/master/adalib/ada/datasets/preprocessing.py
"""
import torchvision.transforms as transforms
def get_transform(kind, augment=False):
"""
Define transforms (for commonly used datasets)
Args:
... | 36.440476 | 146 | 0.553741 |
c8a96a38a99ac077c01442fb4ea28f4495db8865 | 54,917 | py | Python | modules/unit_tests/core/aaa/permissions.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/unit_tests/core/aaa/permissions.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/unit_tests/core/aaa/permissions.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | # Eden Unit Tests
#
# To run this script use:
# python web2py.py -S eden -M -R applications/eden/modules/unit_tests/core/aaa/permission.py
#
import unittest
import re
from gluon import *
from gluon.storage import Storage
from core import S3Permission, s3_meta_fields
from unit_tests import run_suite
# RE to handle IN... | 37.795595 | 92 | 0.539323 |
c8a9785201c97bdfb9a7aefba5409b82c1ba7d23 | 2,263 | py | Python | setup.py | LUMC/kPAL | 80549ebb42864e718478d3b019e852d9e6a68ae1 | [
"MIT"
] | 26 | 2015-01-04T17:29:20.000Z | 2021-08-17T13:26:05.000Z | setup.py | LUMC/kPAL | 80549ebb42864e718478d3b019e852d9e6a68ae1 | [
"MIT"
] | 8 | 2015-01-19T13:37:07.000Z | 2021-03-11T11:49:25.000Z | setup.py | LUMC/kPAL | 80549ebb42864e718478d3b019e852d9e6a68ae1 | [
"MIT"
] | 5 | 2015-01-17T22:20:59.000Z | 2018-02-27T21:24:35.000Z | import os
from setuptools import setup
import sys
if sys.version_info < (2, 6):
raise Exception('kPAL requires Python 2.6 or higher.')
dependencies = ['numpy', 'h5py>=2.1', 'biopython', 'semantic-version',
'future']
if sys.version_info[:2] == (2, 6):
dependencies.extend(['argparse', 'importlib... | 33.776119 | 75 | 0.624392 |
c8a9b73fa01ff39c0f5e7d4a56857d6936f54d6d | 30,416 | py | Python | pgmpy/factors/CPD.py | jaidevd/pgmpy | 0a7f371f4b39ded45e48d637fa1a44b4518162da | [
"MIT"
] | null | null | null | pgmpy/factors/CPD.py | jaidevd/pgmpy | 0a7f371f4b39ded45e48d637fa1a44b4518162da | [
"MIT"
] | null | null | null | pgmpy/factors/CPD.py | jaidevd/pgmpy | 0a7f371f4b39ded45e48d637fa1a44b4518162da | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Contains the different formats of CPDs used in PGM"""
import numpy as np
import networkx as nx
from pgmpy.factors import Factor
from pgmpy import exceptions
from itertools import repeat, product
from pgmpy.extern import tabulate
class TabularCPD(Factor):
"""
Defines the conditional ... | 38.895141 | 119 | 0.476789 |
c8a9c5ba667774d979b8ac0df5eced37104b5300 | 5,209 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_virtual_machine_sizes_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/aio/operations/_virtual_machine_sizes_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.144068 | 135 | 0.66961 |
c8a9cca74b6e46b1da91d2a30744cef03492469e | 213,936 | py | Python | nova/virt/libvirt/driver.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/driver.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | nova/virt/libvirt/driver.py | osrg/nova | 14b6bc655145c832bd9c822e48f877818e0e53ff | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright (c) 2011 Piston Cloud Computing, Inc
# Copyright (c) 2012 Univer... | 42.397146 | 79 | 0.563627 |
c8a9f2c41135288dd437b5ffea3277866e522276 | 4,295 | py | Python | tensorflow/examples/learn/text_classification_character_cnn.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 1 | 2021-05-16T20:11:49.000Z | 2021-05-16T20:11:49.000Z | tensorflow/examples/learn/text_classification_character_cnn.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | null | null | null | tensorflow/examples/learn/text_classification_character_cnn.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 1 | 2022-01-22T05:39:49.000Z | 2022-01-22T05:39:49.000Z | # 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 appl... | 34.087302 | 137 | 0.726659 |
c8a9f57f16046a7e57c728f59268e00e54524438 | 7,119 | py | Python | hotsos/core/plugins/kernel.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 6 | 2021-10-01T19:46:14.000Z | 2022-03-31T17:05:08.000Z | hotsos/core/plugins/kernel.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 111 | 2021-10-01T18:18:17.000Z | 2022-03-29T12:23:20.000Z | hotsos/core/plugins/kernel.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 10 | 2021-09-29T14:47:54.000Z | 2022-03-18T14:52:16.000Z | import os
import re
from hotsos.core.ycheck.events import YEventCheckerBase
from hotsos.core import (
host_helpers,
plugintools,
)
from hotsos.core.config import HotSOSConfig
from hotsos.core.plugins.system import SystemBase
class SYSFSBase(object):
def get(self, relpath):
"""
Read a sys... | 26.864151 | 78 | 0.565107 |
c8aa0f7e78553660a0651f0c98e296508ec3f525 | 11,541 | py | Python | tools/napari_tools.py | sebi06/czi_demos | b3f7801f46de0138a8a1ac245e9c80787e0a3f17 | [
"MIT"
] | 3 | 2020-12-31T10:06:42.000Z | 2021-11-09T13:44:16.000Z | tools/napari_tools.py | sebi06/czi_demos | b3f7801f46de0138a8a1ac245e9c80787e0a3f17 | [
"MIT"
] | null | null | null | tools/napari_tools.py | sebi06/czi_demos | b3f7801f46de0138a8a1ac245e9c80787e0a3f17 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#################################################################
# File : napari_tools.py
# Version : 0.0.4
# Author : czsrh
# Date : 10.06.2021
# Institution : Carl Zeiss Microscopy GmbH
#
# Disclaimer: This tool is purely experimental. Feel free to
# use it at your own... | 32.23743 | 108 | 0.613032 |
c8aa112b05390f8f45c30a88c9e89d1699a43e58 | 4,144 | py | Python | Basics/E03_Text/E14_TextLinesAlignment.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | Basics/E03_Text/E14_TextLinesAlignment.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | Basics/E03_Text/E14_TextLinesAlignment.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# www.pagebot.io
# Licensed under MIT conditions
#
# -----------------------------------------------------------------------------
#
# E14_T... | 41.858586 | 102 | 0.637548 |
c8aa37b055a040584eaa11b1df21ef7cac1990ae | 551 | py | Python | seed.py | rgoshen/warbler | 833b639b023c8c4fe6f1f0e7c2efc270dd732120 | [
"MIT"
] | 2 | 2021-05-22T18:46:20.000Z | 2021-05-22T18:47:55.000Z | seed.py | rgoshen/warbler | 833b639b023c8c4fe6f1f0e7c2efc270dd732120 | [
"MIT"
] | 2 | 2021-05-22T17:52:13.000Z | 2021-05-25T02:02:07.000Z | seed.py | rgoshen/warbler | 833b639b023c8c4fe6f1f0e7c2efc270dd732120 | [
"MIT"
] | null | null | null | """Seed database with sample data from CSV Files."""
from csv import DictReader
from app import db
from models import User, Message, Follows
db.drop_all()
db.create_all()
with open('generator/users.csv') as users:
db.session.bulk_insert_mappings(User, DictReader(users))
with open('generator/messag... | 26.238095 | 67 | 0.740472 |
c8aaa38c898f054a62e4e536f0d6ebeceb6a995d | 9,786 | py | Python | panda_gym/envs/panda_tasks/panda_handover_sanity.py | jc-bao/panda-gym | 1860bf7459d50fc1a3677d937c984034fd936a7e | [
"MIT"
] | 1 | 2021-12-24T01:43:14.000Z | 2021-12-24T01:43:14.000Z | panda_gym/envs/panda_tasks/panda_handover_sanity.py | jc-bao/panda-gym | 1860bf7459d50fc1a3677d937c984034fd936a7e | [
"MIT"
] | null | null | null | panda_gym/envs/panda_tasks/panda_handover_sanity.py | jc-bao/panda-gym | 1860bf7459d50fc1a3677d937c984034fd936a7e | [
"MIT"
] | null | null | null | import gym
import numpy as np
from panda_gym.pybullet import PyBullet
from panda_gym.envs.robots.panda_2 import Panda
class PandaBimanualHandoverEnv(gym.GoalEnv):
def __init__(self, render: bool = False, num_blocks: int = 1, block_size=(0.2, 0.04, 0.04),
os_rate=0.5, obj_in_hand_rate=0.0, reward_... | 47.970588 | 136 | 0.581852 |
c8aaaecf0c162f0820808c1a57ab4f6508640bb2 | 2,539 | py | Python | easy_efficientdet/tools/prepare_voc.py | waldemarmeier/easy-efficientdet | 1329f497fdfd0542ee0db074020c4db351b1aa57 | [
"Apache-2.0"
] | null | null | null | easy_efficientdet/tools/prepare_voc.py | waldemarmeier/easy-efficientdet | 1329f497fdfd0542ee0db074020c4db351b1aa57 | [
"Apache-2.0"
] | null | null | null | easy_efficientdet/tools/prepare_voc.py | waldemarmeier/easy-efficientdet | 1329f497fdfd0542ee0db074020c4db351b1aa57 | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
import os
import shutil
import sys
logger = logging.getLogger("create-object-detection-dataset")
logger.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
handler.setFormatter(formatter)... | 28.211111 | 86 | 0.657739 |
c8aabb3e13c04084832196fe2fe3465636d97643 | 482 | py | Python | doc/python_study_code/collect.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | doc/python_study_code/collect.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | doc/python_study_code/collect.py | beiliwenxiao/vimrc | eb38fc769f3f5f78000060dac674b5c49d63c24c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
def print_params(*params):
print params
print_params(1,2,3)
print_params('Testing')
def print_params_2(title, *params):
print title
print params
print_params_2('CEO','Tom','Nico','Deb')
print_params_2('CEO')
#print_params_2(test='CEO', 'Tom')
print '--'*40
def print... | 17.214286 | 40 | 0.645228 |
c8aadc9890f03e160b5655f85ad4922f337373b0 | 13,364 | py | Python | python_modules/dagster/dagster_tests/core_tests/runtime_types_tests/config_schema_tests/test_builtin_schemas.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/runtime_types_tests/config_schema_tests/test_builtin_schemas.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/runtime_types_tests/config_schema_tests/test_builtin_schemas.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import pytest
from dagster import (
Any,
Bool,
DagsterInvalidConfigError,
Float,
InputDefinition,
Int,
List,
Optional,
OutputDefinition,
PipelineDefinition,
String,
execute_pipeline,
lambda_solid,
)
from dagster.utils.test import get_temp_file_name
def _execute_pip... | 32.997531 | 103 | 0.685124 |
c8aafeaa644d6a44175aa8aedde43432dbb9a97d | 1,030 | py | Python | sdks/python/test/test_GitHubInstallationRepository.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_GitHubInstallationRepository.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_GitHubInstallationRepository.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 25.75 | 115 | 0.747573 |
c8ab1a458606b490aa7b730ba1bb64fd0a0b46c2 | 13,578 | py | Python | python/paddle/fluid/dygraph/dygraph_to_static/static_analysis.py | chuckwoody/Paddle | d8a94ee87cea8509e64d0dc46e302c824e2c819e | [
"Apache-2.0"
] | 1 | 2020-02-26T13:44:57.000Z | 2020-02-26T13:44:57.000Z | python/paddle/fluid/dygraph/dygraph_to_static/static_analysis.py | chuckwoody/Paddle | d8a94ee87cea8509e64d0dc46e302c824e2c819e | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/dygraph/dygraph_to_static/static_analysis.py | chuckwoody/Paddle | d8a94ee87cea8509e64d0dc46e302c824e2c819e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 35.267532 | 119 | 0.639343 |
c8ab2afd8104dad9ca3af892220050fc5a79c209 | 237 | py | Python | ML/paper/setup.py | Ythosa/hokiyomi | 42412b5302bbdcdaddda44cb06e5108beefa96ab | [
"MIT"
] | 9 | 2020-06-06T18:36:42.000Z | 2020-06-10T09:54:26.000Z | ML/paper/setup.py | Ythosa/hokiyomi | 42412b5302bbdcdaddda44cb06e5108beefa96ab | [
"MIT"
] | null | null | null | ML/paper/setup.py | Ythosa/hokiyomi | 42412b5302bbdcdaddda44cb06e5108beefa96ab | [
"MIT"
] | 1 | 2020-06-09T18:55:03.000Z | 2020-06-09T18:55:03.000Z | from setuptools import setup
setup(
name="paper",
version='0.1',
py_modules=[],
install_requires=[
'Click',
'pillow'
],
entry_points='''
[console_scripts]
paper=main:cli
''',
) | 15.8 | 28 | 0.523207 |
c8ab4034acb1f5dec56de6aa5d8c45008f3d12b3 | 1,454 | py | Python | src/Solution1269.py | ArkiWang/LeetcodePy | 6b4af8da843910823f7f53989bbda4ec8e6dad15 | [
"MIT"
] | null | null | null | src/Solution1269.py | ArkiWang/LeetcodePy | 6b4af8da843910823f7f53989bbda4ec8e6dad15 | [
"MIT"
] | null | null | null | src/Solution1269.py | ArkiWang/LeetcodePy | 6b4af8da843910823f7f53989bbda4ec8e6dad15 | [
"MIT"
] | null | null | null | import numpy as np
class Solution:
def numWays(self, steps: int, arrLen: int) -> int:
arrLen = min(arrLen, steps + 1)
dp = np.zeros((steps, arrLen),int)#dp[i][j] how many ways ith step reaches j
dp[0][0], dp[0][1] = 1, 1
for i in range(1, steps):
for j in range(arrLen):
... | 33.045455 | 108 | 0.457359 |
c8ab43309bd94f8d60ac120511df7daa0f0c0f77 | 172 | py | Python | playground/step2/test3.py | jhson989/jhML | eb8b76d3b47df858e82cd971bb32794e12de4747 | [
"Apache-2.0"
] | null | null | null | playground/step2/test3.py | jhson989/jhML | eb8b76d3b47df858e82cd971bb32794e12de4747 | [
"Apache-2.0"
] | null | null | null | playground/step2/test3.py | jhson989/jhML | eb8b76d3b47df858e82cd971bb32794e12de4747 | [
"Apache-2.0"
] | null | null | null | from core import Variable
from operation import *
if __name__ == "__main__":
a = Variable(1.0)
b = add(a,a)
b.backward()
print(b.data)
print(a.grad)
| 14.333333 | 26 | 0.610465 |
c8ab493093a61bcaddca0a3d8760402813d1e44e | 1,632 | py | Python | fastapi-transformer-baseline/app/routers/twitter_sentiment_analysis_router.py | DeDeckerThomas/NLPiP | 37b4d146f5d9760f779f724c4a0698930f59d6d1 | [
"Apache-2.0"
] | 3 | 2022-03-10T13:33:24.000Z | 2022-03-31T13:31:30.000Z | fastapi-transformer-baseline/app/routers/twitter_sentiment_analysis_router.py | DeDeckerThomas/NLPiP | 37b4d146f5d9760f779f724c4a0698930f59d6d1 | [
"Apache-2.0"
] | null | null | null | fastapi-transformer-baseline/app/routers/twitter_sentiment_analysis_router.py | DeDeckerThomas/NLPiP | 37b4d146f5d9760f779f724c4a0698930f59d6d1 | [
"Apache-2.0"
] | null | null | null | from functools import lru_cache
from typing import List
from fastapi import APIRouter, HTTPException
from transformers import Pipeline, pipeline, AutoModelForSequenceClassification, AutoTokenizer
from core.config import settings
from models.TweetPredictionResult import TweetPredictionResult
from fastapi.logger import l... | 35.478261 | 101 | 0.723039 |
c8ab76b7a70517482c5b0d2d0a8c8a5275d1ba77 | 14,267 | py | Python | visualization/eolearn/visualization/eopatch_visualization.py | atedstone/eo-learn | a05d132757ac9dcfd9e9504c74f1e565b8e0f20c | [
"MIT"
] | null | null | null | visualization/eolearn/visualization/eopatch_visualization.py | atedstone/eo-learn | a05d132757ac9dcfd9e9504c74f1e565b8e0f20c | [
"MIT"
] | null | null | null | visualization/eolearn/visualization/eopatch_visualization.py | atedstone/eo-learn | a05d132757ac9dcfd9e9504c74f1e565b8e0f20c | [
"MIT"
] | null | null | null | """
This module implements visualizations for EOPatch
Credits:
Copyright (c) 2017-2019 Matej Aleksandrov, Matej Batič, Andrej Burja, Eva Erzin (Sinergise)
Copyright (c) 2017-2019 Grega Milčinski, Matic Lubej, Devis Peresutti, Jernej Puc, Tomislav Slijepčević (Sinergise)
Copyright (c) 2017-2019 Blaž Sovdat, Nejc Vesel,... | 40.762857 | 116 | 0.635312 |
c8ab7f1ee12f81d6b4a093f4b391a0f4ebd1a0f5 | 620 | py | Python | widgets/import_data/import_shp.py | arxitaqu/Importer2OSMbasemap | a373d1dbab3bd7de28461e73f334d93f39a9beb8 | [
"MIT"
] | null | null | null | widgets/import_data/import_shp.py | arxitaqu/Importer2OSMbasemap | a373d1dbab3bd7de28461e73f334d93f39a9beb8 | [
"MIT"
] | null | null | null | widgets/import_data/import_shp.py | arxitaqu/Importer2OSMbasemap | a373d1dbab3bd7de28461e73f334d93f39a9beb8 | [
"MIT"
] | null | null | null | '''
Created on 05 nov. 2022
@author: arxit
'''
from __future__ import absolute_import
from builtins import object
from .import_shp_dialog import ImportShpDialog
class ImportSHP(object):
'''
Main class for the import data widget
'''
def __init__(self, filename):
'''
Constructor
... | 19.375 | 49 | 0.601613 |
c8ab817b6c57a1caaa954cfaff89cd23665a84ff | 8,168 | py | Python | MachineLearning/TensorFlow/image-clssifier/tool/pic_data_augmentation.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | MachineLearning/TensorFlow/image-clssifier/tool/pic_data_augmentation.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | MachineLearning/TensorFlow/image-clssifier/tool/pic_data_augmentation.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # coding:UTF-8
# 2019-1-5
# data augmentation
# 还需要添加色度变换
import os
import numpy as np
import random
import datetime
import shutil
import time
from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img
__suffix__ = ["png"]
def getFiles(dirpath):
"""
获取文件
"""
file... | 28.165517 | 120 | 0.558399 |
c8ab8e51dcde4a67ca808f50de8c2c54e06b55a8 | 1,510 | py | Python | scrap/pick_file.py | nomelm50s/lightcst | 93c137472782d8f726283294a017a7f578c66a93 | [
"MIT"
] | null | null | null | scrap/pick_file.py | nomelm50s/lightcst | 93c137472782d8f726283294a017a7f578c66a93 | [
"MIT"
] | null | null | null | scrap/pick_file.py | nomelm50s/lightcst | 93c137472782d8f726283294a017a7f578c66a93 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
""" Creates a numbered list of files found in the target directory
and prompts for a selection.
File list creator
Modified to a Python 3 file on Jan 23, 2021
By: Mike Lemon
"""
from fileinput import filename
import os
import sys
# path to target directory
items = os.... | 23.968254 | 68 | 0.570199 |
c8abdfc5499feed2822249d9ea087a26d247796c | 1,278 | py | Python | 2016/day06_signals_and_noise/python/src/test_solutions.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | 2016/day06_signals_and_noise/python/src/test_solutions.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | 2016/day06_signals_and_noise/python/src/test_solutions.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | """Tests."""
from part1 import ErrorCorrector as ErrorCorrector1
from part2 import ErrorCorrector as ErrorCorrector2
class TestPart1UnitTests:
"""."""
def test_correct(self):
"""."""
test_input = [
"eedadn",
"drvtee",
"eandsr",
"raavrd",
... | 20.95082 | 51 | 0.407668 |
c8abece76843d77c58bbe6c9d135892e862da223 | 2,169 | py | Python | test/apps/_aiohttp/handlers.py | charliehohenstein30/schemathesis | d4c6d48ca31666417c9259544ecc837e8694c3df | [
"MIT"
] | null | null | null | test/apps/_aiohttp/handlers.py | charliehohenstein30/schemathesis | d4c6d48ca31666417c9259544ecc837e8694c3df | [
"MIT"
] | null | null | null | test/apps/_aiohttp/handlers.py | charliehohenstein30/schemathesis | d4c6d48ca31666417c9259544ecc837e8694c3df | [
"MIT"
] | null | null | null | import asyncio
from aiohttp import web
async def success(request: web.Request) -> web.Response:
return web.json_response({"success": True})
async def invalid_response(request: web.Request) -> web.Response:
return web.json_response({"random": "key"})
async def custom_format(request: web.Request) -> web.Re... | 29.310811 | 99 | 0.714615 |
c8abfe595e79a2b15e90daeee67b70e677582159 | 7,230 | py | Python | training/helpers.py | DanBerrebbi/shiba | 3f2793f3e1797be79dd6d491b7ecd2d7de765555 | [
"Apache-2.0"
] | null | null | null | training/helpers.py | DanBerrebbi/shiba | 3f2793f3e1797be79dd6d491b7ecd2d7de765555 | [
"Apache-2.0"
] | null | null | null | training/helpers.py | DanBerrebbi/shiba | 3f2793f3e1797be79dd6d491b7ecd2d7de765555 | [
"Apache-2.0"
] | null | null | null | import inspect
from dataclasses import dataclass, field
from typing import Optional, Dict, Tuple, List
import torch.nn
from torch.nn.utils.rnn import pad_sequence
from datasets import Dataset, load_dataset
from transformers import TrainingArguments
from shiba import Shiba, CodepointTokenizer
MAX_JP_CODEPOINT = 0x9fa... | 37.268041 | 111 | 0.695436 |
c8ac6310f3798423d6c5f0e37ea576ba362255d4 | 15,232 | py | Python | src/sardana/pool/poolbasechannel.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/pool/poolbasechannel.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/pool/poolbasechannel.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 35.755869 | 84 | 0.589877 |
c8aca748e45c0270972a69b78c5d230a63446897 | 2,871 | py | Python | src/refactory/namespacing/ast_ns.py | lmmx/refactory | 39e97528733f4cb2607a89184e3b0049f9784547 | [
"MIT"
] | null | null | null | src/refactory/namespacing/ast_ns.py | lmmx/refactory | 39e97528733f4cb2607a89184e3b0049f9784547 | [
"MIT"
] | 1 | 2022-02-07T22:18:30.000Z | 2022-02-07T22:18:30.000Z | src/refactory/namespacing/ast_ns.py | lmmx/refactory | 39e97528733f4cb2607a89184e3b0049f9784547 | [
"MIT"
] | null | null | null | from __future__ import annotations
import ast
from ..log_utils import Console
from .validation import ValidatorBase
__all__ = ["AstNamespace", "AstStatement", "KwargName"]
logger = Console(name=__name__)
class AstNamespace:
_ns_name: str = "ast"
_namespace_prefix: str = f"{_ns_name}."
@classmethod
... | 31.9 | 86 | 0.656566 |
c8acd737509ddd732bc8864621298cf1cfaedf33 | 5,046 | py | Python | concurrency/cpp_compiler_win.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | 1 | 2020-07-21T23:24:25.000Z | 2020-07-21T23:24:25.000Z | concurrency/cpp_compiler_win.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | 4 | 2021-06-29T00:38:57.000Z | 2022-01-15T00:22:15.000Z | concurrency/cpp_compiler_win.py | MarkMoretto/python-examples-main | 37b8c41d2f175029f4536ca970f037ff19b4e951 | [
"MIT"
] | null | null | null | """
Purpose: Watch and compile C++
Date created: 2020-07-09
Contributor(s):
Mark M.
"""
import os
import re
import sys
import platform
import shlex
import msvcrt # Windows-specific functions.
import subprocess
from time import sleep
import concurrent.futures as ccf
from subprocess import PIPE, STDOUT, Popen,T... | 27.275676 | 99 | 0.633373 |
c8acda3e512f9d0a902db1bfcaa44325415c73bc | 2,678 | py | Python | imperative/python/megengine/utils/max_recursion_limit.py | chenbo123222/MegEngine | 8230ea2d0b16422136ad27b4073d523b524aa4e6 | [
"Apache-2.0"
] | 3 | 2020-10-23T06:33:57.000Z | 2020-10-23T06:34:06.000Z | imperative/python/megengine/utils/max_recursion_limit.py | chenbo123222/MegEngine | 8230ea2d0b16422136ad27b4073d523b524aa4e6 | [
"Apache-2.0"
] | null | null | null | imperative/python/megengine/utils/max_recursion_limit.py | chenbo123222/MegEngine | 8230ea2d0b16422136ad27b4073d523b524aa4e6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... | 33.898734 | 88 | 0.583645 |
c8acef6363b7f8ff8d9686ddf99826d9d456c15c | 365 | py | Python | tests/test_home.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 19 | 2017-09-13T07:51:58.000Z | 2022-03-28T11:04:03.000Z | tests/test_home.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 147 | 2017-09-14T13:45:30.000Z | 2022-03-14T15:54:09.000Z | tests/test_home.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 5 | 2019-08-31T13:13:30.000Z | 2021-03-26T15:46:38.000Z | import pytest
from tests.conftest import RequestSetting, TestCase
@pytest.mark.usefixtures('set_user_client')
class TestHome(TestCase, RequestSetting):
def test_board_perm(self):
r = self.http_request(self.user, 'get', 'home')
assert r.status_code == 200
r = self.http_request(None, 'get',... | 28.076923 | 55 | 0.690411 |
c8ad072e34ad6e49f5fdb8b035e75432e32d04b9 | 168 | py | Python | tests/gnp/test_util.py | wesselb/neuralprocesses | d5461e210e1e8176a3027dc485714b6903070654 | [
"MIT"
] | 10 | 2021-01-20T17:56:56.000Z | 2022-03-04T10:54:08.000Z | tests/gnp/test_util.py | wesselb/neuralprocesses | d5461e210e1e8176a3027dc485714b6903070654 | [
"MIT"
] | 1 | 2022-03-29T17:24:45.000Z | 2022-03-31T16:23:30.000Z | tests/gnp/test_util.py | wesselb/neuralprocesses | d5461e210e1e8176a3027dc485714b6903070654 | [
"MIT"
] | 1 | 2022-03-29T15:57:09.000Z | 2022-03-29T15:57:09.000Z | import neuralprocesses.gnp as gnp
def test_num_params():
model = gnp.GNP()
assert isinstance(gnp.num_params(model), int)
assert gnp.num_params(model) > 0
| 21 | 49 | 0.714286 |
c8ad1761a86269d3ed170ba1cd823f96cf40827a | 1,002 | py | Python | yggdrasil/drivers/OutputDriver.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | 22 | 2019-02-05T15:20:07.000Z | 2022-02-25T09:00:40.000Z | yggdrasil/drivers/OutputDriver.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | 48 | 2019-02-15T20:41:24.000Z | 2022-03-16T20:52:02.000Z | yggdrasil/drivers/OutputDriver.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | 16 | 2019-04-27T03:36:40.000Z | 2021-12-02T09:47:06.000Z | from yggdrasil.drivers.ConnectionDriver import ConnectionDriver
class OutputDriver(ConnectionDriver):
r"""Driver for sending output to another model's comm via a local comm.
Args:
name (str): The name of the local message comm that the driver should
connect to.
args (str): The nam... | 37.111111 | 88 | 0.629741 |
c8ad24a0e14c2bfd62e1661c4ca28f4f06c5ef00 | 3,304 | py | Python | leetcode_python/Depth-First-Search/path-sum.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Depth-First-Search/path-sum.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | null | null | null | leetcode_python/Depth-First-Search/path-sum.py | yennanliu/CS_basics | 3c50c819897a572ff38179bfb0083a19b2325fde | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# V1
# https://blog.csdn.net/coder_orz/article/details/51595815
# IDEA : DFS (recursion)
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def hasPathSum(self, roo... | 30.036364 | 104 | 0.560533 |
c8ad31e4f14a76578e087782ca98359459df695f | 26,299 | py | Python | topo/command/pylabplot.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | topo/command/pylabplot.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | topo/command/pylabplot.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | """
Line-based and matrix-based plotting commands using MatPlotLib.
Before importing this file, you will probably want to do something
like:
from matplotlib import rcParams
rcParams['backend']='TkAgg'
to select a backend, or else select an appropriate one in your
matplotlib.rc file (if any). There are many back... | 36.224518 | 106 | 0.63067 |
c8ad4c5f3fe32f8674973773996bfa5fdf941e38 | 6,710 | py | Python | Tracked/visualization_msgs/msg/_interactive_marker_init.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | Tracked/visualization_msgs/msg/_interactive_marker_init.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | Tracked/visualization_msgs/msg/_interactive_marker_init.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | # generated from rosidl_generator_py/resource/_idl.py.em
# with input from visualization_msgs:msg\InteractiveMarkerInit.idl
# generated code does not contain a copyright notice
# Import statements for member types
from rosidl_parser.rosidl_parser import definition as rosidl_parser_definition # noqa: E402, I100
cl... | 37.696629 | 158 | 0.614754 |
c8ad523f56ba14678b02525571b9ce8a88cc2334 | 17,218 | py | Python | Common/Readers/Engine/YahooFinanceEngine.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | Common/Readers/Engine/YahooFinanceEngine.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | Common/Readers/Engine/YahooFinanceEngine.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | import pandas as pd
import numpy as np
import yfinance as yf
from pandas import Series
from prettytable import PrettyTable
from Common.Readers.Engine.AbstractEngine import AbstractEngine
from Common.StockType.AbstractStock import AbstractStock
from Common.StockType.Equities.AbstractStockEquity import AbstractStockEquit... | 36.478814 | 120 | 0.679173 |
c8ad6b0fc0d11152dbe1a4f6cc2e6c9bb72ce455 | 2,033 | py | Python | userbot/modules/webupload.py | PratyakshM/DirtyBlack_EXTENDED | d842013d969c9ca57c640a944fc3e8b23f1eb68a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-03-22T11:40:54.000Z | 2021-03-22T11:40:54.000Z | userbot/modules/webupload.py | PratyakshM/DirtyBlack_EXTENDED | d842013d969c9ca57c640a944fc3e8b23f1eb68a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/webupload.py | PratyakshM/DirtyBlack_EXTENDED | d842013d969c9ca57c640a944fc3e8b23f1eb68a | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | from telethon import events
import subprocess
import os
from telethon.errors import MessageEmptyError, MessageTooLongError, MessageNotModifiedError
import io
import asyncio
import time
from userbot import CMD_HELP
from userbot.events import register
@register(pattern="^.webupload ?(.+?|) (?:--)(anonfiles|transfer|file... | 52.128205 | 569 | 0.691097 |
c8ad8358a36ce36ab99355edf0eccca588c04907 | 2,770 | py | Python | dataset/level2.py | minusworld/deep-landmark | 8950ee4555f8e4f786d2a52f2794ef9d7887cb8c | [
"BSD-3-Clause"
] | 327 | 2015-07-31T06:47:33.000Z | 2021-11-16T13:55:49.000Z | dataset/level2.py | JHuang-96/deep-landmark | c77370631d1394a83e50bde3fe13c1b18ab5691e | [
"BSD-3-Clause"
] | 36 | 2016-01-07T01:44:19.000Z | 2019-10-15T13:11:50.000Z | dataset/level2.py | JHuang-96/deep-landmark | c77370631d1394a83e50bde3fe13c1b18ab5691e | [
"BSD-3-Clause"
] | 176 | 2015-08-02T10:55:27.000Z | 2021-09-14T08:37:10.000Z | #!/usr/bin/env python2.7
# coding: utf-8
"""
This file convert dataset from http://mmlab.ie.cuhk.edu.hk/archive/CNN_FacePoint.htm
We convert data for LEVEL-2 training data.
all data are formated as (patch, delta landmark), and delta landmark is ((x1, y1), (x2, y2)...)
"""
import os
from os.path import join... | 33.373494 | 99 | 0.60361 |
c8ad8674c3ba6250b2256fead5d586ccf3ce4259 | 914 | py | Python | dqn/exercise/model.py | soon-yau/deep-reinforcement-learning | 169c07671b7948da50446894410c7683d2d0778b | [
"MIT"
] | 1 | 2021-04-05T16:00:21.000Z | 2021-04-05T16:00:21.000Z | dqn/exercise/model.py | soon-yau/deep-reinforcement-learning | 169c07671b7948da50446894410c7683d2d0778b | [
"MIT"
] | null | null | null | dqn/exercise/model.py | soon-yau/deep-reinforcement-learning | 169c07671b7948da50446894410c7683d2d0778b | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class QNetwork(nn.Module):
"""Actor (Policy) Model."""
def __init__(self, state_size, action_size, seed, fc1_units=64, fc2_units=64):
"""Initialize parameters and build model.
Params
======
state_size (int):... | 31.517241 | 82 | 0.598468 |
c8ad91ff235b7b0ec4c2e8eec4a416c5b40f4bf8 | 29,865 | py | Python | salt/cloud/clouds/openstack.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/openstack.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/openstack.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
OpenStack Cloud Module
======================
OpenStack is an open source project that is in use by a number a cloud
providers, each of which have their own ways of using it.
:depends: libcloud >= 0.13.2
OpenStack provides a number of ways to authenticate. This module uses password-
based... | 33.109756 | 113 | 0.60077 |
c8adaf34def5338ff2585c9b9cd8779809e0701e | 5,110 | py | Python | tests/test_login.py | PradheepShrinivasan/UrlShortener | 16e57ebf426090adc850efa392caccb2897f726d | [
"BSD-3-Clause"
] | 2 | 2015-12-25T21:37:37.000Z | 2021-12-08T13:49:20.000Z | tests/test_login.py | PradheepShrinivasan/UrlShortener | 16e57ebf426090adc850efa392caccb2897f726d | [
"BSD-3-Clause"
] | 4 | 2015-12-31T07:08:20.000Z | 2021-04-06T18:26:43.000Z | tests/test_login.py | PradheepShrinivasan/UrlShortener | 16e57ebf426090adc850efa392caccb2897f726d | [
"BSD-3-Clause"
] | 3 | 2016-01-19T02:46:58.000Z | 2017-01-30T22:52:12.000Z | import unittest
import sys
sys.path.append('..')
from bs4 import BeautifulSoup
from app import app
from app.user import User
class TestLoginAndLogout(unittest.TestCase):
""" Class to test login and logout of users """
def setUp(self):
app.config['TESTING'] = True
app.debug = False
... | 32.547771 | 88 | 0.6 |
c8adc083b1075c394f3112a2bcfd62a02c8a4d57 | 1,979 | py | Python | tools.py | Jay-Roberts/FW-Perturbations | 0960f6116125307cc986f9f19b3c5ab4c15ed535 | [
"MIT"
] | null | null | null | tools.py | Jay-Roberts/FW-Perturbations | 0960f6116125307cc986f9f19b3c5ab4c15ed535 | [
"MIT"
] | null | null | null | tools.py | Jay-Roberts/FW-Perturbations | 0960f6116125307cc986f9f19b3c5ab4c15ed535 | [
"MIT"
] | null | null | null |
from typing import Tuple
import matplotlib.pyplot as plt
from imagenet_labels import IMAGENET_LABELS as LMap
def inet_name(l, tag=""):
'''Fixing some ImageNetnames for the example'''
name = LMap[l]
name = name.split(',')[0]
# "great" was added to white shark in order to scare people
# ... | 26.039474 | 74 | 0.538151 |
c8adf1e80c815eb957e9d1a2246402cf22be48e2 | 2,579 | py | Python | sysinv/sysinv/sysinv/sysinv/helm/garbd.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/helm/garbd.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/helm/garbd.py | starlingx-staging/stx-config | ccbf0392d1941e7cad6673f6351bd905a5a5d419 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018-2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sysinv.common import constants
from sysinv.common import exception
from sysinv.common import utils
from sysinv.openstack.common import log as logging
from sysinv.helm import common
from sysinv.helm import base
LOG = lo... | 36.842857 | 80 | 0.654517 |
c8ae0a9718b42d564e4ea289f87ff02fdd64a171 | 2,029 | py | Python | native/examples/timestamp-op-ret.py | pcsubirachs/ptpybtc | eb1571547c449fb5d7454a684140f67b871b7c04 | [
"MIT"
] | null | null | null | native/examples/timestamp-op-ret.py | pcsubirachs/ptpybtc | eb1571547c449fb5d7454a684140f67b871b7c04 | [
"MIT"
] | null | null | null | native/examples/timestamp-op-ret.py | pcsubirachs/ptpybtc | eb1571547c449fb5d7454a684140f67b871b7c04 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (C) 2014 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# ... | 27.794521 | 97 | 0.653524 |
c8ae1649d03bb749404398d6353215534cdd44ea | 43 | py | Python | ac2020/days/antlr/__init__.py | IstvanOri/adventofcode-2020 | 28c1203fd8f7e1863c8322e60161a32848d9a55b | [
"Apache-2.0"
] | null | null | null | ac2020/days/antlr/__init__.py | IstvanOri/adventofcode-2020 | 28c1203fd8f7e1863c8322e60161a32848d9a55b | [
"Apache-2.0"
] | null | null | null | ac2020/days/antlr/__init__.py | IstvanOri/adventofcode-2020 | 28c1203fd8f7e1863c8322e60161a32848d9a55b | [
"Apache-2.0"
] | null | null | null | """ANTLR generated resources and classes""" | 43 | 43 | 0.767442 |
c8aeb783245ed0007b6c828c01c5e70d6efc1a97 | 11,316 | py | Python | daemon.py | serbant/simple_netem | e16e556497b91368a2c69afefdf403275c317f9b | [
"Apache-2.0"
] | 1 | 2018-09-12T03:36:40.000Z | 2018-09-12T03:36:40.000Z | daemon.py | serbant/simple_netem | e16e556497b91368a2c69afefdf403275c317f9b | [
"Apache-2.0"
] | 1 | 2017-03-12T12:10:30.000Z | 2017-03-12T12:53:58.000Z | daemon.py | serbant/simple_netem | e16e556497b91368a2c69afefdf403275c317f9b | [
"Apache-2.0"
] | null | null | null | '''
.. _simple_netem_daemon:
serve_pyro4r module for the simple_netem package
:module: daemon
:copyright:
Copyright 2017 Serban Teodorescu
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 th... | 34.187311 | 122 | 0.659067 |
c8aeb8e11854662c94ae3b7121e1f47af56349f8 | 25,192 | py | Python | luma/led_matrix/device.py | chrisys/luma.led_matrix | 92d86240f4b6155097a38b80f6714d8bf619adaf | [
"MIT"
] | null | null | null | luma/led_matrix/device.py | chrisys/luma.led_matrix | 92d86240f4b6155097a38b80f6714d8bf619adaf | [
"MIT"
] | null | null | null | luma/led_matrix/device.py | chrisys/luma.led_matrix | 92d86240f4b6155097a38b80f6714d8bf619adaf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017-2020 Richard Hull and contributors
# See LICENSE.rst for details.
"""
Collection of serial interfaces to LED matrix devices.
"""
# Example usage:
#
# from luma.core.interface.serial import spi, noop
# from luma.core.render import canvas
# from luma.led_matrix.device ... | 34.699725 | 116 | 0.60944 |
c8aec69f331bb1c55836d5adca0a401ab29842ef | 3,654 | py | Python | smart_heating_local/server_models.py | spiegelm/smart-heating-local | 55e99be9702cd96c8778a02d04f35d2d867eb8cb | [
"Apache-2.0"
] | null | null | null | smart_heating_local/server_models.py | spiegelm/smart-heating-local | 55e99be9702cd96c8778a02d04f35d2d867eb8cb | [
"Apache-2.0"
] | 1 | 2016-03-22T14:47:32.000Z | 2016-03-22T14:47:32.000Z | smart_heating_local/server_models.py | spiegelm/smart-heating-local | 55e99be9702cd96c8778a02d04f35d2d867eb8cb | [
"Apache-2.0"
] | null | null | null | """
Copyright 2016 Michael Spiegel, Wilhelm Kleiminger
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... | 29.95082 | 127 | 0.639573 |
c8aecce28cac01a5ee0edf419982e1b0641a827b | 20,772 | py | Python | restorer.py | RealistikDash/gdps-restorer-archive | 7b46810c4b19317bdc69f94c9dc4b20afc7f184b | [
"MIT"
] | null | null | null | restorer.py | RealistikDash/gdps-restorer-archive | 7b46810c4b19317bdc69f94c9dc4b20afc7f184b | [
"MIT"
] | null | null | null | restorer.py | RealistikDash/gdps-restorer-archive | 7b46810c4b19317bdc69f94c9dc4b20afc7f184b | [
"MIT"
] | null | null | null | # Made by RealistikDash from VPS Dev Team
from colorama import init, Fore, Back; init()
from pyfiglet import figlet_format
import json
import mysql.connector
from datetime import datetime
import random
from os import path
import os
import time
import progressbar
__VERSION__ = "0.1.0"
# Aliases
ColRes... | 36.960854 | 235 | 0.581504 |
c8aed26cc9917e14b0d02c8141b38a75c73c06dd | 262 | py | Python | 101/misc/fast_input_tutorials.py | hariharanragothaman/pymaster | b3d033b4d5c75c69f587c94d9d12cd4a349a6a69 | [
"Apache-2.0"
] | 10 | 2020-09-21T22:23:09.000Z | 2022-01-25T16:58:44.000Z | 101/misc/fast_input_tutorials.py | hariharanragothaman/pymaster | b3d033b4d5c75c69f587c94d9d12cd4a349a6a69 | [
"Apache-2.0"
] | null | null | null | 101/misc/fast_input_tutorials.py | hariharanragothaman/pymaster | b3d033b4d5c75c69f587c94d9d12cd4a349a6a69 | [
"Apache-2.0"
] | null | null | null | # Reference - https://codeforces.com/blog/entry/63102
import os
import sys
from atexit import register
from io import BytesIO
sys.stdout = BytesIO()
register(lambda: os.write(1, sys.stdout.getvalue()))
input = BytesIO(os.read(0, os.fstat(0).st_size)).readline
| 23.818182 | 57 | 0.755725 |
c8aed7e6f210f2e950a1b57beebf3e53a376a1f9 | 1,097 | py | Python | ray/adaptdl_ray/aws/_example_worker.py | odp/adaptdl | 8a0ad47da91ab4b8f5e13c819cb4701a2ebe8ca8 | [
"Apache-2.0"
] | null | null | null | ray/adaptdl_ray/aws/_example_worker.py | odp/adaptdl | 8a0ad47da91ab4b8f5e13c819cb4701a2ebe8ca8 | [
"Apache-2.0"
] | null | null | null | ray/adaptdl_ray/aws/_example_worker.py | odp/adaptdl | 8a0ad47da91ab4b8f5e13c819cb4701a2ebe8ca8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Petuum, 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... | 28.868421 | 79 | 0.66454 |
c8af0900fa69ec09621bc883393cfcbd386c22e6 | 249 | py | Python | streams/urls.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 4 | 2017-12-13T10:59:42.000Z | 2019-11-03T17:26:19.000Z | streams/urls.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 21 | 2017-04-05T08:03:54.000Z | 2022-03-11T23:16:03.000Z | streams/urls.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
import streams.views as streams_views
urlpatterns = [
url(r'^data/(?P<stream_id>[0-9]+)/(?P<widget_id>[0-9]+)/$', streams_views.stream_widget_visualization, name='stream widget visualization'),
]
| 35.571429 | 144 | 0.718876 |
c8af1a7ef1b1acc029955b54149dc9f1aca70323 | 716 | py | Python | docs/conf.py | dave-shawley/klempner | f73e1c26310233b3f04a54c166a4962965e1feee | [
"BSD-3-Clause"
] | 2 | 2019-04-29T15:40:29.000Z | 2019-04-30T12:20:06.000Z | docs/conf.py | dave-shawley/klempner | f73e1c26310233b3f04a54c166a4962965e1feee | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | dave-shawley/klempner | f73e1c26310233b3f04a54c166a4962965e1feee | [
"BSD-3-Clause"
] | null | null | null | import klempner
project = 'Klempner'
copyright = '2019, Dave Shawley'
author = 'Dave Shawley'
release = klempner.version
extensions = ['sphinx.ext.autodoc']
html_sidebars = {
'**': [
'about.html', 'navigation.html', 'relations.html', 'searchbox.html',
'sourcelink.html'
],
}
html_static_path =... | 23.096774 | 76 | 0.653631 |
c8af5690c57425490cf36afd604dc09c6a64ef83 | 787 | py | Python | examples/py/stencil_tests.py | shervinazadi/topoGenesis | 5c73a5adf4afbda781540c6c08d24e2da62810b8 | [
"MIT"
] | 11 | 2020-09-07T09:29:01.000Z | 2022-01-09T10:16:39.000Z | examples/py/stencil_tests.py | shervinazadi/topoGenesis | 5c73a5adf4afbda781540c6c08d24e2da62810b8 | [
"MIT"
] | 2 | 2020-11-23T16:59:21.000Z | 2020-12-17T18:06:01.000Z | examples/py/stencil_tests.py | shervinazadi/topoGenesis | 5c73a5adf4afbda781540c6c08d24e2da62810b8 | [
"MIT"
] | 1 | 2020-11-19T15:09:53.000Z | 2020-11-19T15:09:53.000Z | import topogenesis as tg
print("runner")
# create a stencil based on well-known neighbourhood definitions
mc_stencil = tg.create_stencil("boolean_marching_cube", 1)
print(mc_stencil)
print(mc_stencil.ntype)
print(mc_stencil.origin)
print(mc_stencil.minbound)
print(mc_stencil.maxbound)
print(mc_stencil.expand())
print... | 28.107143 | 64 | 0.777637 |
c8af61799bfea52a39ec80eb1d37f773a5b69501 | 4,088 | py | Python | alipay/aop/api/request/AlipayIserviceCognitiveClassificationObjectQueryRequest.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/request/AlipayIserviceCognitiveClassificationObjectQueryRequest.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/request/AlipayIserviceCognitiveClassificationObjectQueryRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayIserviceCognitiveClassificationObjectQueryModel import AlipayIserviceCognitiveClassificationObjectQueryModel
class AlipayIserv... | 28.193103 | 148 | 0.654599 |
c8afaadb83489421b6ab854baa905ce32a98b8e0 | 4,477 | py | Python | bin/s111_converter.py | GlenRice-NOAA/s100py | e890ea2a74b4867f19b39cd31d688f368fc7cf1d | [
"CC0-1.0"
] | null | null | null | bin/s111_converter.py | GlenRice-NOAA/s100py | e890ea2a74b4867f19b39cd31d688f368fc7cf1d | [
"CC0-1.0"
] | null | null | null | bin/s111_converter.py | GlenRice-NOAA/s100py | e890ea2a74b4867f19b39cd31d688f368fc7cf1d | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
"""Utility script for converting S-111 compliant HDF5 File(s) to other formats.
S-111 is an IHO standard outlining formats for storing and sending surface
water current data and metadata.
"""
import argparse
from glob import glob
import os
import warnings
from osgeo import gdal, osr
with warnin... | 41.453704 | 143 | 0.601966 |
c8afb38a034bec4452d243004f240e84c1a4c433 | 2,271 | py | Python | pantsuitUp/interviewMe/views.py | PantsuitUp/Whack2017 | 9463b90b0a38a5ccc57062190cc692db7155b3a0 | [
"Apache-2.0"
] | null | null | null | pantsuitUp/interviewMe/views.py | PantsuitUp/Whack2017 | 9463b90b0a38a5ccc57062190cc692db7155b3a0 | [
"Apache-2.0"
] | 4 | 2020-06-05T17:52:33.000Z | 2022-03-11T23:17:53.000Z | pantsuitUp/interviewMe/views.py | PantsuitUp/Whack2017 | 9463b90b0a38a5ccc57062190cc692db7155b3a0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
from .models import SpeechRec, Feedback, Interview
def do_interview(request):
interview = Interview()
interview.generate_interview()
sr = Spe... | 31.985915 | 90 | 0.752092 |
c8afbc6a825001aebb85180c4fd3275af4fd0ef8 | 1,284 | py | Python | client_code/utils/__init__.py | jshaffstall/anvil-extras | 521eec32a98cc038fea27379ff6c0ab024f31c7f | [
"MIT"
] | null | null | null | client_code/utils/__init__.py | jshaffstall/anvil-extras | 521eec32a98cc038fea27379ff6c0ab024f31c7f | [
"MIT"
] | null | null | null | client_code/utils/__init__.py | jshaffstall/anvil-extras | 521eec32a98cc038fea27379ff6c0ab024f31c7f | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
#
# Copyright (c) 2021 The Anvil Extras project team members listed at
# https://github.com/anvilistas/anvil-extras/graphs/contributors
#
# This software is published at https://github.com/anvilistas/anvil-extras
from functools import lru_cache
__version__ = "2.0.1"
def __dir__():
... | 26.204082 | 76 | 0.694704 |
c8afc886a7f06cbcf89f0837924cfb44d9090b99 | 326 | py | Python | src/homework/hw10/main(hw10).py | acc-cosc-1336/cosc-1336-spring-2018-BarndonSelesino | c2ee6a9914383716347765f148d2d15b9e3211b7 | [
"MIT"
] | null | null | null | src/homework/hw10/main(hw10).py | acc-cosc-1336/cosc-1336-spring-2018-BarndonSelesino | c2ee6a9914383716347765f148d2d15b9e3211b7 | [
"MIT"
] | 1 | 2018-02-03T03:41:28.000Z | 2018-02-03T03:41:28.000Z | src/homework/hw10/main(hw10).py | acc-cosc-1336/cosc-1336-spring-2018-BarndonSelesino | c2ee6a9914383716347765f148d2d15b9e3211b7 | [
"MIT"
] | 1 | 2018-04-13T01:17:50.000Z | 2018-04-13T01:17:50.000Z | from src.homework.hw10.playerhw10 import Player
#write import statement for GameLog class
from src.homework.hw10.game_log import GameLog
#Create a game log instance
gl = GameLog()
#SEnd the game_log instance to Player class as an argument
Player(gl).roll_doubles()
#call the game log display method below
gl.display_l... | 20.375 | 58 | 0.797546 |
c8afd405533ef537fb995017f0719008351b6d35 | 4,736 | py | Python | tests/utils/generic/test_add_missing_row.py | vdestraitt/toucan-data-sdk | 09327592daef6bc94d0d6f79a041b581226c2b7b | [
"BSD-3-Clause"
] | null | null | null | tests/utils/generic/test_add_missing_row.py | vdestraitt/toucan-data-sdk | 09327592daef6bc94d0d6f79a041b581226c2b7b | [
"BSD-3-Clause"
] | null | null | null | tests/utils/generic/test_add_missing_row.py | vdestraitt/toucan-data-sdk | 09327592daef6bc94d0d6f79a041b581226c2b7b | [
"BSD-3-Clause"
] | null | null | null | import math
import os
import pandas as pd
import pytest
from toucan_data_sdk.utils.generic import add_missing_row
from toucan_data_sdk.utils.helpers import ParamsValueError
fixtures_base_dir = 'tests/fixtures'
def test_add_missing_row():
"""
It should add missing row compare to a reference column
"""
... | 28.023669 | 84 | 0.624155 |
c8afd49542e5f60c8c04249358954e8210b3e0b4 | 17,480 | py | Python | lib/postgap/FinemapIntegration.py | Ensembl/postgap | 8435db87b30f54f881d36689e13fd2b66ad5f8cf | [
"Apache-2.0"
] | 34 | 2016-11-08T23:43:48.000Z | 2021-09-14T14:04:13.000Z | lib/postgap/FinemapIntegration.py | Ensembl/postgap | 8435db87b30f54f881d36689e13fd2b66ad5f8cf | [
"Apache-2.0"
] | 153 | 2016-11-13T08:19:19.000Z | 2021-11-23T22:41:29.000Z | lib/postgap/FinemapIntegration.py | Ensembl/postgap | 8435db87b30f54f881d36689e13fd2b66ad5f8cf | [
"Apache-2.0"
] | 27 | 2017-01-17T15:40:35.000Z | 2022-03-18T01:52:36.000Z | #! /usr/bin/env python
"""
Copyright [1999-2016] EMBL-European Bioinformatics Institute
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 requir... | 39.105145 | 186 | 0.76167 |
c8afd741e129f1311a73ed193cd5d7c2d3d11b9e | 710 | py | Python | test.py | QwerTech/foe-automation | 9978cd365097a2c9ebec9039642c4e5f6c361018 | [
"MIT"
] | null | null | null | test.py | QwerTech/foe-automation | 9978cd365097a2c9ebec9039642c4e5f6c361018 | [
"MIT"
] | 3 | 2021-09-08T02:13:20.000Z | 2022-03-12T00:36:40.000Z | test.py | QwerTech/foe-automation | 9978cd365097a2c9ebec9039642c4e5f6c361018 | [
"MIT"
] | null | null | null | import unittest
from time import sleep
from foe_pics import *
from foe_utils import lock
root = 'testresources/'
def f(x):
return x * x
def findPic(o):
return pyautogui.locate(o.picture, o.screenshot, confidence=0.8, grayscale=True)
class Task():
def __init__(self, picture, screenshot):
sel... | 19.189189 | 84 | 0.633803 |
c8afde3aadc8a33eee68a9f7beecd0ee500af912 | 622 | py | Python | example/error_404.py | axlan/dash-multipage | 7aa2aa71de3366054b64c7bd0fd0d5a191e5beae | [
"MIT"
] | 6 | 2019-04-02T08:52:41.000Z | 2021-06-11T09:30:05.000Z | example/error_404.py | axlan/dash-multipage | 7aa2aa71de3366054b64c7bd0fd0d5a191e5beae | [
"MIT"
] | null | null | null | example/error_404.py | axlan/dash-multipage | 7aa2aa71de3366054b64c7bd0fd0d5a191e5beae | [
"MIT"
] | 2 | 2019-12-17T12:12:05.000Z | 2020-09-24T17:58:17.000Z | """Content not found (404) error pages
"""
import dash_html_components as html
CATS = 'http://thecatapi.com/api/images/get?format=src&type=gif'
def render_404():
"""
Returns
----------
dash_html_components.Div of a 404 page
"""
return html.Div(
children=[
html.Img(
... | 23.037037 | 64 | 0.487138 |
c8afde45651d24b0ab390dd640c41a350c2aa900 | 8,825 | py | Python | src/baselines/ocsvm.py | abelrguezr/Deep-SAD-PyTorch | 268ca21570a4a8dadc331a9dbf26ccade36ae5d9 | [
"MIT"
] | null | null | null | src/baselines/ocsvm.py | abelrguezr/Deep-SAD-PyTorch | 268ca21570a4a8dadc331a9dbf26ccade36ae5d9 | [
"MIT"
] | null | null | null | src/baselines/ocsvm.py | abelrguezr/Deep-SAD-PyTorch | 268ca21570a4a8dadc331a9dbf26ccade36ae5d9 | [
"MIT"
] | null | null | null | import json
import logging
import time
import torch
import numpy as np
from torch.utils.data import DataLoader
from sklearn.svm import OneClassSVM
from sklearn.metrics import roc_auc_score
from base.base_dataset import BaseADDataset
from networks.main import build_autoencoder
class OCSVM(object):
"""A class for ... | 39.752252 | 118 | 0.592181 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.