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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
91e3a81a7dfb60dfcc5d29147f220b35ab36feff | 2,164 | py | Python | dga/tools/rovnix.py | alistairwgillespie/deep_dga_detection | 0dfda4a26113dad179266b4afafda29ca00f6ae3 | [
"MIT"
] | 2 | 2020-10-18T19:29:46.000Z | 2020-11-30T09:36:58.000Z | dga/tools/rovnix.py | alistairwgillespie/deep_dga_detection | 0dfda4a26113dad179266b4afafda29ca00f6ae3 | [
"MIT"
] | 1 | 2021-03-20T01:50:12.000Z | 2021-03-20T01:50:12.000Z | dga/tools/rovnix.py | alistairwgillespie/deep_dga_detection | 0dfda4a26113dad179266b4afafda29ca00f6ae3 | [
"MIT"
] | 2 | 2020-07-07T07:46:20.000Z | 2021-02-03T16:01:27.000Z | # -*- coding: utf-8 -*-
"""ROVNIX DGA
"""
# Author: Andrey Abakumov <andrewaeva@ya.ru>
__author__ = 'andrewa'
import random
import datetime
# usdeclar = open("../help/usdeclar.txt", 'r').read().strip().split()
# for i in xrange(0, len(usdeclar)):
# usdeclar[i] = ''.join(e for e in usdeclar[i] if e.... | 24.873563 | 112 | 0.451941 |
91e3b83fab893c1b19effc60c76181cf73627023 | 43,058 | py | Python | admin/yum-validator/oo-admin-check-sources.py | sdodson/openshift-extras | 884b6db9b33e12d0d798a1767d4dc40cc78b6e8f | [
"Apache-2.0"
] | null | null | null | admin/yum-validator/oo-admin-check-sources.py | sdodson/openshift-extras | 884b6db9b33e12d0d798a1767d4dc40cc78b6e8f | [
"Apache-2.0"
] | null | null | null | admin/yum-validator/oo-admin-check-sources.py | sdodson/openshift-extras | 884b6db9b33e12d0d798a1767d4dc40cc78b6e8f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python -tt
"""This implements the OpenShift-specific logic for validating Yum
repositories
"""
import sys
from yumvalidator import repo_db
from yumvalidator.check_sources import CheckSources
from itertools import chain
from yum import Errors
import logging
OSE_PRIORITY = 10
RHEL_PRIORITY = 20
JBOSS_PRIOR... | 47.109409 | 83 | 0.530912 |
91e3d56877e8d75c74b6ed6cd54640331fb81eca | 535 | py | Python | Homework5/2.feature_points/harries.py | JackHCC/Computer-Vision-And-Augmented-Reality-Homework | 98989b9626189b0ab31cbebcc0cb65c2c02711e0 | [
"MIT"
] | null | null | null | Homework5/2.feature_points/harries.py | JackHCC/Computer-Vision-And-Augmented-Reality-Homework | 98989b9626189b0ab31cbebcc0cb65c2c02711e0 | [
"MIT"
] | null | null | null | Homework5/2.feature_points/harries.py | JackHCC/Computer-Vision-And-Augmented-Reality-Homework | 98989b9626189b0ab31cbebcc0cb65c2c02711e0 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
filename = 'cboard.jpg'
img = cv2.imread(filename)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imshow("crossbar", gray)
gray = np.float32(gray)
dst = cv2.cornerHarris(gray, 2, 3, 0.04)
# result is dilated for marking the corners, not important
dst = cv2.dilate(dst, None)
# Threshol... | 22.291667 | 69 | 0.685981 |
91e3e32bac87e0de56897b359f5d36d2800b1bcd | 316 | py | Python | AsteroidsEquipe2/projectile.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | 2 | 2021-01-24T01:04:34.000Z | 2021-05-06T16:25:53.000Z | projectile.py | n4tm/PyAsteroids | 88b6f277ea13f442960121e4d45bb4138ee49974 | [
"MIT"
] | null | null | null | projectile.py | n4tm/PyAsteroids | 88b6f277ea13f442960121e4d45bb4138ee49974 | [
"MIT"
] | 3 | 2021-01-26T21:35:43.000Z | 2021-05-06T16:06:47.000Z | import gameobject
import pygame
class Projectile(gameobject.GameObject):
def __init__(self, position, velocity):
self.time_alive = 80
self.sprite_path = "./assets/projectile.png"
self.sprite = pygame.image.load(self.sprite_path)
super().__init__(position, self.sprite, velocity)
| 31.6 | 57 | 0.705696 |
91e3f32ad456ff3f294d9dbe508338a06a3beb49 | 589 | py | Python | violas_client/lbrtypes/account_config/events/mint.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/account_config/events/mint.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/account_config/events/mint.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | from violas_client.canoser import Struct, Uint64
from violas_client.move_core_types.identifier import Identifier
from violas_client.move_core_types.move_resource import MoveResource
from violas_client.lbrtypes.account_config.constants.libra import LIBRA_MODULE_NAME
class CancelBurnEvent(Struct, MoveResource):
MODU... | 31 | 83 | 0.758913 |
91e3fa8aa4ed98f645e2a4a675ac21cc8a185ce0 | 1,198 | py | Python | tests/test_cli.py | hwwhww/eth2.0-deposit-cli | 37fb6de2256c14120014de51c3a31ad9ec9ce4ae | [
"CC0-1.0"
] | 1 | 2020-07-22T14:51:11.000Z | 2020-07-22T14:51:11.000Z | tests/test_cli.py | hwwhww/eth2.0-deposit-cli | 37fb6de2256c14120014de51c3a31ad9ec9ce4ae | [
"CC0-1.0"
] | null | null | null | tests/test_cli.py | hwwhww/eth2.0-deposit-cli | 37fb6de2256c14120014de51c3a31ad9ec9ce4ae | [
"CC0-1.0"
] | null | null | null | import os
from click.testing import CliRunner
from cli.deposit import main
from cli import deposit
from eth2deposit.utils.constants import DEFAULT_VALIDATOR_KEYS_FOLDER_NAME
def test_deposit(monkeypatch):
# monkeypatch get_mnemonic
def get_mnemonic(language, words_path, entropy=None):
return "fakeph... | 30.717949 | 97 | 0.728715 |
91e3fba083e23e6ec6ff41f2fe09268034c7ec69 | 11,666 | py | Python | api_app/tests_ma/conftest.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/tests_ma/conftest.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/tests_ma/conftest.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | import uuid
import pytest
from models.domain.user_resource import UserResource
from models.domain.shared_service import SharedService
from tests_ma.test_api.test_routes.test_resource_helpers import FAKE_CREATE_TIMESTAMP
from models.domain.authentication import User
from models.domain.operation import Operation, Operati... | 36.570533 | 121 | 0.62455 |
91e414d08a75c36fe3f84e1512c5a963ce98b3e4 | 4,723 | py | Python | image2D/choose_dcm_points3.py | benjaminirving/Mesh-Silhouette-Projection | efdc3ac9adb20da3d15f14f0b63bcd359c1ecc14 | [
"BSD-3-Clause"
] | 7 | 2018-05-10T14:58:50.000Z | 2021-11-14T18:16:24.000Z | image2D/choose_dcm_points3.py | benjaminirving/Mesh-Silhouette-Projection | efdc3ac9adb20da3d15f14f0b63bcd359c1ecc14 | [
"BSD-3-Clause"
] | null | null | null | image2D/choose_dcm_points3.py | benjaminirving/Mesh-Silhouette-Projection | efdc3ac9adb20da3d15f14f0b63bcd359c1ecc14 | [
"BSD-3-Clause"
] | 4 | 2016-01-03T05:50:27.000Z | 2018-06-27T14:33:11.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 19 17:42:54 2012
This version saves image as a temporary .jpg file. This bypasses the use
of qimage2ndarry that seems to have issue
run the file from the command line:
python choose_dcm_points3.py dir <directory>
python choose_dcm_points3.py <type> ... | 26.683616 | 105 | 0.598349 |
91e41a24f77d8f1b351164b152664cc121aeb79f | 2,869 | py | Python | deeppavlov/dataset_readers/conll2003_reader.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:34:33.000Z | 2019-05-22T08:34:33.000Z | deeppavlov/dataset_readers/conll2003_reader.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | null | null | null | deeppavlov/dataset_readers/conll2003_reader.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-03-17T13:47:44.000Z | 2019-03-17T13:47:44.000Z | from deeppavlov.core.data.utils import download_decompress
from deeppavlov.core.data.dataset_reader import DatasetReader
from pathlib import Path
from deeppavlov.core.common.registry import register
@register('conll2003_reader')
class Conll2003DatasetReader(DatasetReader):
"""Class to read training datasets in C... | 40.408451 | 87 | 0.505054 |
91e41d420aea741583e3c23a071ec77d89f9059d | 12,391 | py | Python | wagtail/wagtailembeds/tests.py | thenewguy/wagtail | ecd8d22c04c46486b3c09b8eaeef1d0c96b0b288 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailembeds/tests.py | thenewguy/wagtail | ecd8d22c04c46486b3c09b8eaeef1d0c96b0b288 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailembeds/tests.py | thenewguy/wagtail | ecd8d22c04c46486b3c09b8eaeef1d0c96b0b288 | [
"BSD-3-Clause"
] | null | null | null | import six.moves.urllib.request
from six.moves.urllib.error import URLError
from mock import patch
import warnings
try:
import embedly
no_embedly = False
except ImportError:
no_embedly = True
from django import template
from django.test import TestCase
from wagtail.tests.utils import WagtailTestUtils, u... | 40.759868 | 108 | 0.557501 |
91e44ae978feaeda72bee03985617b8d7ebb5e01 | 313 | py | Python | examples/markers/cec/create_year_2010.py | gugarosa/opytimark | cad25623f23ce4b509d59381cf7bd79e41a966b6 | [
"Apache-2.0"
] | 3 | 2020-06-11T22:58:26.000Z | 2021-03-15T20:12:29.000Z | examples/markers/cec/create_year_2010.py | gugarosa/opytimark | cad25623f23ce4b509d59381cf7bd79e41a966b6 | [
"Apache-2.0"
] | 1 | 2020-08-13T12:10:35.000Z | 2020-08-17T14:30:45.000Z | examples/markers/cec/create_year_2010.py | gugarosa/opytimark | cad25623f23ce4b509d59381cf7bd79e41a966b6 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from opytimark.markers.cec.year_2010 import F1
# Declaring a function from the `cec/year_2010` package
f = F1()
# Declaring an input variable for feeding the function
x = np.array([-39.311900, 58.899900, -46.322400, -74.651500, -16.799700])
# Printing out the function's output
print(f(x))
| 24.076923 | 73 | 0.738019 |
91e460f2422dfd976de78abd749c5ff979fce0c0 | 4,739 | py | Python | tests/sentry/incidents/endpoints/test_project_alert_rule_details.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/incidents/endpoints/test_project_alert_rule_details.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/incidents/endpoints/test_project_alert_rule_details.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from exam import fixture
from sentry.api.serializers import serialize
from sentry.incidents.logic import create_alert_rule
from sentry.incidents.models import AlertRule
from sentry.snuba.models import QueryAggregations
from sentry.testutils import APITestCase
class AlertRuleDe... | 34.845588 | 99 | 0.663853 |
91e46a3313470a9bd4eb5db3b9e6314743524735 | 4,339 | py | Python | src/buildstream/testing/_sourcetests/source_determinism.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/testing/_sourcetests/source_determinism.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/testing/_sourcetests/source_determinism.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2018 Codethink Limited
# Copyright (C) 2019 Bloomberg Finance LP
#
# 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
#
#... | 38.061404 | 118 | 0.684259 |
91e4b9db9844afca398120ef0024f491347ffdb5 | 3,231 | py | Python | qcdb/util/misc.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | qcdb/util/misc.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | qcdb/util/misc.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | import re
import sys
import math
import numpy as np
import qcelemental as qcel
def update_with_error(a, b, path=None):
"""Merges `b` into `a` like dict.update; however, raises KeyError if values of a
key shared by `a` and `b` conflict.
Adapted from: https://stackoverflow.com/a/7205107
"""
if pa... | 34.010526 | 138 | 0.58372 |
91e4f1684025f52653ffb042b7b6b06d70590754 | 9,008 | py | Python | maskrcnn_benchmark/config/paths_catalog.py | mouyuanyap/rotated_maskrcnn | 0e83ea78ac0e09e81a668113d57355f3506b8086 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/config/paths_catalog.py | mouyuanyap/rotated_maskrcnn | 0e83ea78ac0e09e81a668113d57355f3506b8086 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/config/paths_catalog.py | mouyuanyap/rotated_maskrcnn | 0e83ea78ac0e09e81a668113d57355f3506b8086 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
"""Centralized catalog of paths."""
import os
class DatasetCatalog(object):
DATA_DIR = "datasets"
DATASETS = {
# CUSTOM STUFF START
"HRSC2016_test": {
"img_dir": "/content/drive/MyDrive/HRSC2016/test_cut/image... | 40.394619 | 121 | 0.600133 |
91e501da28f2528afa702f843e8be01b6befff47 | 1,528 | py | Python | homeassistant/components/powerwall/const.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2021-03-05T17:29:45.000Z | 2021-03-05T17:29:45.000Z | homeassistant/components/powerwall/const.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | homeassistant/components/powerwall/const.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2020-06-01T12:43:03.000Z | 2020-06-01T12:43:03.000Z | """Constants for the Tesla Powerwall integration."""
DOMAIN = "powerwall"
POWERWALL_OBJECT = "powerwall"
POWERWALL_COORDINATOR = "coordinator"
UPDATE_INTERVAL = 30
ATTR_REGION = "region"
ATTR_GRID_CODE = "grid_code"
ATTR_FREQUENCY = "frequency"
ATTR_ENERGY_EXPORTED = "energy_exported"
ATTR_ENERGY_IMPORTED = "energy... | 27.285714 | 65 | 0.82199 |
91e53e821ca17a5d15f7caf5015e0b50430f7c6a | 6,969 | py | Python | luminos/utils/standarddir.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | luminos/utils/standarddir.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | 2 | 2021-10-03T08:44:45.000Z | 2021-10-03T08:49:49.000Z | luminos/utils/standarddir.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | import os
import sys # noqa
import enum
from PyQt5.QtCore import QStandardPaths # noqa
from luminos.utils import log, utils, qtutils
# The cached locations
_locations = {}
APPNAME = "luminos"
class EmptyValueError(Exception):
"""Error raised when QStandardPaths returns an empty value."""
class _Location(... | 28.561475 | 104 | 0.658344 |
91e54085126291dcaa6c57b11de51f0f9b6fe966 | 1,272 | py | Python | bullet.py | GerhardKling/SimplePyGame | acbfaf827384cee6b9658dfd2d66a04593ae3965 | [
"MIT"
] | 1 | 2020-09-06T21:39:53.000Z | 2020-09-06T21:39:53.000Z | bullet.py | GerhardKling/SimplePyGame | acbfaf827384cee6b9658dfd2d66a04593ae3965 | [
"MIT"
] | null | null | null | bullet.py | GerhardKling/SimplePyGame | acbfaf827384cee6b9658dfd2d66a04593ae3965 | [
"MIT"
] | null | null | null | """Creates Bullet class"""
import pygame as py
class Bullet():
def __init__(self, x, y, facing_x, facing_y):
# self.x = x
# self.y = y
self.facing_x = facing_x
self.facing_y = facing_y
self.vel = 10
# Make our top-left corner the passed-in location; for wa... | 38.545455 | 95 | 0.551101 |
91e541f25350acd0e9b4a9d1019bd6480c130eb4 | 2,753 | py | Python | ExpressVpn_pyqt.py | MaherGebrail/ExpressVpn_Monitor_Status | 5e560cf40fb6e84492c0f4951ce14bc72720804a | [
"MIT"
] | null | null | null | ExpressVpn_pyqt.py | MaherGebrail/ExpressVpn_Monitor_Status | 5e560cf40fb6e84492c0f4951ce14bc72720804a | [
"MIT"
] | null | null | null | ExpressVpn_pyqt.py | MaherGebrail/ExpressVpn_Monitor_Status | 5e560cf40fb6e84492c0f4951ce14bc72720804a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from ExpressVpn_Monitor import *
from PySide6.QtWidgets import QApplication, QSystemTrayIcon, QMenu
from PySide6.QtGui import QIcon, QAction
from plyer import notification
icon_image = os.path.join(used_path, 'icon.ico')
class ExpressStatusQT(ExpressStatus):
def __init__(self):
#... | 27.53 | 83 | 0.61206 |
91e55715c17393a080c72e71587468c7257f3d71 | 3,854 | py | Python | app/create_app.py | chivalry/structured-flask | c6930d87a7364b86a3ab3db03c93c04235f1e93b | [
"MIT"
] | 3 | 2019-04-15T00:54:43.000Z | 2019-05-18T01:05:00.000Z | app/create_app.py | chivalry/structured-flask | c6930d87a7364b86a3ab3db03c93c04235f1e93b | [
"MIT"
] | 6 | 2019-04-15T01:37:29.000Z | 2019-04-24T18:47:24.000Z | app/create_app.py | chivalry/structured-flask | c6930d87a7364b86a3ab3db03c93c04235f1e93b | [
"MIT"
] | 1 | 2019-04-23T04:04:18.000Z | 2019-04-23T04:04:18.000Z | import os
from flask import Flask, render_template, request, current_app
from flask_bootstrap import Bootstrap
from flask_sqlalchemy import SQLAlchemy
from flask_bcrypt import Bcrypt
from flask_migrate import Migrate
from flask_login import LoginManager
from flask_mail import Mail
from flask_babel import Babel
import ... | 29.646154 | 94 | 0.672289 |
91e55ee89a930148db30b3068eacbe8595e8149e | 7,207 | py | Python | azure-devops/azext_devops/vstsCompressed/file_container/v4_1/models/models.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | azure-devops/azext_devops/vstsCompressed/file_container/v4_1/models/models.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | 37 | 2020-04-27T07:45:19.000Z | 2021-04-05T07:27:15.000Z | azure-devops/azext_devops/vstsCompressed/file_container/v4_1/models/models.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 43.678788 | 346 | 0.626891 |
91e5637edaca7edb2667555edd593b48fd520c29 | 993 | py | Python | usefiledelegate.py | BlueQuartzSoftware/EasyBake | 3f218013938d8b979d1371871a70a4901987abd6 | [
"BSD-3-Clause"
] | null | null | null | usefiledelegate.py | BlueQuartzSoftware/EasyBake | 3f218013938d8b979d1371871a70a4901987abd6 | [
"BSD-3-Clause"
] | 27 | 2021-04-06T18:17:18.000Z | 2021-06-23T14:03:56.000Z | usefiledelegate.py | joeykleingers/EasyBake | 3f218013938d8b979d1371871a70a4901987abd6 | [
"BSD-3-Clause"
] | 1 | 2021-06-22T18:10:44.000Z | 2021-06-22T18:10:44.000Z | # This Python file uses the following encoding: utf-8
from PySide2 import QtWidgets
from PySide2.QtWidgets import QStyledItemDelegate
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from resources_rc import *
class UseFileDelegate(QItemDelegate):
def __init__(self, parent=... | 33.1 | 116 | 0.629406 |
91e57a3a321d87898b506c559acba3d24426fe72 | 13,126 | py | Python | locationcode.py | takkaneko/netengtools | 888face2fb73e75679032f93dff8c87cc5c90eac | [
"MIT"
] | null | null | null | locationcode.py | takkaneko/netengtools | 888face2fb73e75679032f93dff8c87cc5c90eac | [
"MIT"
] | null | null | null | locationcode.py | takkaneko/netengtools | 888face2fb73e75679032f93dff8c87cc5c90eac | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# locationcode.py
import re
import getpass
class Loccode(str):
"""
A Loccode is a string object such as 'iad.c4.11.3a.11' that can be broken down into
the following specific subcodes: site, room, row, rack, slot. Create a Loccode object
in the following manner:
... | 41.802548 | 120 | 0.412464 |
91e5af6ece26db7f9e30534b9defcadb612f4350 | 1,277 | py | Python | bigml/tests/compute_lda_prediction_steps.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:38.000Z | 2021-08-30T20:18:38.000Z | bigml/tests/compute_lda_prediction_steps.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | null | null | null | bigml/tests/compute_lda_prediction_steps.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:40.000Z | 2021-08-30T20:18:40.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2016-2019 BigML
#
# 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 requi... | 35.472222 | 75 | 0.694597 |
91e5f572094b5b3d7ddcfcde5357f98faa19557d | 695 | py | Python | sxs/utilities/dicts.py | dongzesun/sxs | 74ac9576032ddc232ff48510ba20f0a9e7116861 | [
"MIT"
] | 8 | 2019-12-08T20:56:59.000Z | 2021-11-01T09:01:39.000Z | sxs/utilities/dicts.py | duetosymmetry/sxs | 1617bf9d1eb06b1aa063db2b310d4e7c3d02e5e5 | [
"MIT"
] | 33 | 2019-12-06T17:40:00.000Z | 2022-03-28T16:53:02.000Z | sxs/utilities/dicts.py | duetosymmetry/sxs | 1617bf9d1eb06b1aa063db2b310d4e7c3d02e5e5 | [
"MIT"
] | 10 | 2019-12-04T17:37:55.000Z | 2022-03-14T07:22:43.000Z | """Utilities that inherit from dict"""
class KeyPassingDict(dict):
"""Subclass of dict that enables extended keys
When indexing this object, the key is split into two pieces: the part preceding
the first "/" and everything after it. The second part is passed to the
__getitem__ method of whatever is r... | 34.75 | 83 | 0.656115 |
91e60429602999ffc1ba69f5a054468158fe7c70 | 583 | py | Python | partypost/facebook/page.py | JoeyDP/Party-Post | eda1415548f3455367665fd05e0758add020d3ed | [
"MIT"
] | null | null | null | partypost/facebook/page.py | JoeyDP/Party-Post | eda1415548f3455367665fd05e0758add020d3ed | [
"MIT"
] | 6 | 2018-07-18T11:50:28.000Z | 2018-07-19T12:48:16.000Z | partypost/facebook/page.py | JoeyDP/Party-Post | eda1415548f3455367665fd05e0758add020d3ed | [
"MIT"
] | null | null | null |
import requests
from urllib.parse import urljoin
from util import log, debug
BASE_URL = "https://graph.facebook.com"
def postImage(imageUrl, page):
url = urljoin(BASE_URL, 'me/photos')
params = {
'access_token': page.post_access_token,
'url': imageUrl
}
log(url)
r = requests.p... | 19.433333 | 64 | 0.593482 |
91e66bc84e064d3137ec70e1082b19d7ad40cd01 | 2,999 | py | Python | src/dcos_migrate/plugins/marathon/network_helpers.py | Ganasagar/migration-tools-repo | 73d78f1734ccd04f1475d70b48fa02c6d892524b | [
"Apache-2.0"
] | null | null | null | src/dcos_migrate/plugins/marathon/network_helpers.py | Ganasagar/migration-tools-repo | 73d78f1734ccd04f1475d70b48fa02c6d892524b | [
"Apache-2.0"
] | null | null | null | src/dcos_migrate/plugins/marathon/network_helpers.py | Ganasagar/migration-tools-repo | 73d78f1734ccd04f1475d70b48fa02c6d892524b | [
"Apache-2.0"
] | null | null | null | from typing import NamedTuple, Optional, Sequence, Any, Dict
import logging
PORT_AUTOASSIGN_START = 10000
class Vip(NamedTuple):
name: str
port: int
class AppPort(NamedTuple):
name: Optional[str]
protocols: Sequence[str]
port: int
containerPort: int
vip: Optional[Vip]
idx: int
def... | 32.597826 | 116 | 0.675892 |
91e693532e91a1bca73bf0c52f77203865fcc8fc | 16,198 | py | Python | bin/cmrudl.py | TeamDragons/Dragons-Userbot | e40584f4dc898b785523adea4519ffb412dc92c4 | [
"MIT"
] | 3 | 2021-08-11T08:33:39.000Z | 2022-01-17T00:09:11.000Z | bin/cmrudl.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | null | null | null | bin/cmrudl.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | 6 | 2021-08-14T08:20:41.000Z | 2022-03-20T02:31:45.000Z | #!/usr/bin/env python
import argparse
import collections
import errno
import json
import math
import os
import re
import sys
import time
try:
from urllib.request import HTTPError, Request, urlopen
except ImportError:
from urllib2 import HTTPError, Request, urlopen
try:
from html.parser import HTMLParser
... | 32.266932 | 88 | 0.560131 |
91e6df387043e44d2f4a0b07ea71745216e5d85e | 2,608 | py | Python | test/test_sample_cdf.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | test/test_sample_cdf.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | test/test_sample_cdf.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | import pycuda.driver as cuda
from pycuda.compiler import SourceModule
from pycuda import gpuarray
import numpy as np
import ROOT
import os
from unittest_find import unittest
import chroma
class TestSampling(unittest.TestCase):
def setUp(self):
self.context = chroma.gpu.create_cuda_context()
current... | 34.315789 | 109 | 0.597776 |
91e702788cf1a100454e04af196574c7832dc244 | 26,985 | py | Python | subt/artf_model.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | subt/artf_model.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | subt/artf_model.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | import cv2
import numpy as np
import random
import torch
ARTIFACT_CATEGORIES = dict((name, artf_id) for artf_id, name in enumerate([
'nothing', 'backpack', 'phone', 'survivor', 'vent', 'robot', 'helmet',
'rope', 'breadcrumb', 'drill', 'fire_extinguisher', 'cube'
#'toolbox', 'electrical_box', 'radio', 'valv... | 41.772446 | 98 | 0.534519 |
91e724518784af738d1875e7eb35c675c877ea33 | 735 | py | Python | tests/finance/test_get_symbol.py | fireddd/pyjanitor | e76db2c619527e9f0b63d9aefcde11e3225937b8 | [
"MIT"
] | null | null | null | tests/finance/test_get_symbol.py | fireddd/pyjanitor | e76db2c619527e9f0b63d9aefcde11e3225937b8 | [
"MIT"
] | null | null | null | tests/finance/test_get_symbol.py | fireddd/pyjanitor | e76db2c619527e9f0b63d9aefcde11e3225937b8 | [
"MIT"
] | null | null | null | from janitor.finance import get_symbol
import pytest
"""
tests the convert_symbol helper function.
Test 1: GME is Gamestop Corp. Test should run fine.
Test 2: GME is not Globius Medical Inc.
Test 3: A little redundant, but it's another
'happy path' to show get_symbol works for more
abbreviations than just the... | 29.4 | 64 | 0.72381 |
91e72a7c1565ea5130585fcf23a9d201c007cb40 | 3,018 | py | Python | orders/tests/test_view.py | inoks138/django-shop | 8a7454c7c12ccb8bc55033010adc66999094e4be | [
"BSD-3-Clause"
] | null | null | null | orders/tests/test_view.py | inoks138/django-shop | 8a7454c7c12ccb8bc55033010adc66999094e4be | [
"BSD-3-Clause"
] | null | null | null | orders/tests/test_view.py | inoks138/django-shop | 8a7454c7c12ccb8bc55033010adc66999094e4be | [
"BSD-3-Clause"
] | null | null | null | import tempfile
from django.conf import settings
from django.core.exceptions import PermissionDenied
from django.test import TestCase
from django.urls import reverse
from slugify import slugify
from account.models import Account
from orders.models import Order, OrderItem
from shop.models import Brand, Category, Produ... | 36.361446 | 113 | 0.599735 |
91e72c86fd14b83116a027f6a1c4f289d0b43eb3 | 37 | py | Python | detection/__init__.py | naivete5656/WSISPDR | 1dc4d1bf24a6ebf7efd3c75d3f1a9edbe849d38b | [
"MIT"
] | 37 | 2019-10-09T09:42:24.000Z | 2022-03-29T09:57:29.000Z | detection/__init__.py | naivete5656/WSISPDR | 1dc4d1bf24a6ebf7efd3c75d3f1a9edbe849d38b | [
"MIT"
] | 4 | 2020-02-26T06:49:02.000Z | 2021-10-17T16:29:24.000Z | detection/__init__.py | naivete5656/WSISPDR | 1dc4d1bf24a6ebf7efd3c75d3f1a9edbe849d38b | [
"MIT"
] | 4 | 2019-10-18T07:34:30.000Z | 2020-04-10T03:35:34.000Z | from .detection_eval import eval_net
| 18.5 | 36 | 0.864865 |
91e73926f0567eb0b1242c4f1603df3796f7b391 | 1,344 | py | Python | tests/test_app.py | INN/maine-legislature | 830f23e1832518e0b03e4064d3d960dd029ad961 | [
"MIT"
] | null | null | null | tests/test_app.py | INN/maine-legislature | 830f23e1832518e0b03e4064d3d960dd029ad961 | [
"MIT"
] | 8 | 2017-08-31T21:24:27.000Z | 2017-11-10T16:09:57.000Z | tests/test_app.py | INN/maine-legislature | 830f23e1832518e0b03e4064d3d960dd029ad961 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# _*_ coding:utf-8 _*_
import json
import unittest
import app
import app_config
class IndexTestCase(unittest.TestCase):
"""
Test the index page.
"""
def setUp(self):
app.app.config['TESTING'] = True
self.client = app.app.test_client()
def test_index_exists(s... | 23.578947 | 69 | 0.637649 |
91e7550f8197a865cfee15fb46348dca235ad71e | 1,140 | py | Python | Code_V1/EvaData.py | Easonyesheng/StereoCameraToolk | 660e43019d0687e96e6da3aca48c1c423ae5abff | [
"MIT"
] | 27 | 2020-10-16T07:21:35.000Z | 2022-03-11T02:56:13.000Z | Code_V1/EvaData.py | Easonyesheng/StereoCamera | 9319b7f4e5ce36833de722a15e1074e82b8b4f84 | [
"MIT"
] | null | null | null | Code_V1/EvaData.py | Easonyesheng/StereoCamera | 9319b7f4e5ce36833de722a15e1074e82b8b4f84 | [
"MIT"
] | 6 | 2021-02-01T09:54:40.000Z | 2022-03-11T03:16:39.000Z | """
Evaluate this dataset TUM
1. Use GT to perform Visualization
2. Use LMedS to get F_est to perform Visualization
3. To Compare
"""
from SelfCalibration import SelfCalibration
import os
import numpy
import cv2
Index = 10
# ImgPath = r'D:\F_Estimation_private\deepF_noCorrs\data\TUM\2020_05_27\long_office... | 27.142857 | 112 | 0.796491 |
91e78025e95b656ff340b74b5cbebbc8cf0ba063 | 16,774 | py | Python | modules/templates/DRK/helpers.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/templates/DRK/helpers.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/templates/DRK/helpers.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | """
Helper functions and classes for RLPPTM
License: MIT
"""
from gluon import current
from core import FS, S3DateTime, s3_str
# =============================================================================
def drk_default_shelter():
"""
Lazy getter for the default shelter_id
"""
s3 = c... | 35.765458 | 97 | 0.447597 |
91e7a2628ecad8ad2b3f3c5debfe989395b019c8 | 1,438 | py | Python | InvestmentFundamentalsAndDataAnalytics/Examples/Section-17_109-MC-EulerDiscretization-PartI-Lecture_Yahoo_Py3.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | InvestmentFundamentalsAndDataAnalytics/Examples/Section-17_109-MC-EulerDiscretization-PartI-Lecture_Yahoo_Py3.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | InvestmentFundamentalsAndDataAnalytics/Examples/Section-17_109-MC-EulerDiscretization-PartI-Lecture_Yahoo_Py3.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
from pandas_datareader import data as web
from scipy.stats import norm
import matplotlib.pyplot as plt
get_ipython().run_line_magic('matplotlib', 'inline')
# In[2]:
ticker = 'PG'
data = pd.DataFrame()
data[ticker] = web.Dat... | 25.678571 | 165 | 0.600139 |
91e7ad1c3326c16519b914e430fcd67353570fe5 | 1,738 | py | Python | alipay/aop/api/domain/SubAccountInfoDTO.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/domain/SubAccountInfoDTO.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/domain/SubAccountInfoDTO.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.constant.ParamConstants import *
from alipay.aop.api.domain.SubAccountAndBindDTO import SubAccountAndBindDTO
class SubAccountInfoDTO(object):
def __init__(self):
self._apply_status = None
self._sub_account_info = None
... | 28.966667 | 83 | 0.639241 |
91e7db763e1fb840b20f84a066376068145e3eb9 | 6,316 | py | Python | app/run.py | jadefreese/DisasterResponse | 032d5e4c9a9b3360e4175bb204d4065a0a5c836c | [
"FTL",
"CNRI-Python",
"blessing"
] | null | null | null | app/run.py | jadefreese/DisasterResponse | 032d5e4c9a9b3360e4175bb204d4065a0a5c836c | [
"FTL",
"CNRI-Python",
"blessing"
] | null | null | null | app/run.py | jadefreese/DisasterResponse | 032d5e4c9a9b3360e4175bb204d4065a0a5c836c | [
"FTL",
"CNRI-Python",
"blessing"
] | null | null | null | import json
import plotly
import pandas as pd
import numpy as np
from nltk.stem import WordNetLemmatizer
from nltk.tokenize import word_tokenize
from flask import Flask
from flask import render_template, request, jsonify
import plotly.graph_objs as grph
#from sklearn.externals import joblib
import joblib
from sqlalch... | 28.709091 | 91 | 0.537682 |
91e7df752c29d400a6da83c33523a536117c0575 | 24,847 | py | Python | osm_nbi/validation.py | DataPlaneBroker/NBI | 569a309f4dc7c2ab780fe1156644cdf9a5ee56d3 | [
"Apache-2.0"
] | null | null | null | osm_nbi/validation.py | DataPlaneBroker/NBI | 569a309f4dc7c2ab780fe1156644cdf9a5ee56d3 | [
"Apache-2.0"
] | null | null | null | osm_nbi/validation.py | DataPlaneBroker/NBI | 569a309f4dc7c2ab780fe1156644cdf9a5ee56d3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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, softwar... | 34.036986 | 118 | 0.550489 |
91e7f128d17d2aebf2a35b247d986b3eab97988e | 4,825 | py | Python | code/pyanamo.py | BrenKenna/pyanamo | 0129c504ac5edc0d4c5d241bbfa5aeb7cdef924c | [
"MIT"
] | null | null | null | code/pyanamo.py | BrenKenna/pyanamo | 0129c504ac5edc0d4c5d241bbfa5aeb7cdef924c | [
"MIT"
] | null | null | null | code/pyanamo.py | BrenKenna/pyanamo | 0129c504ac5edc0d4c5d241bbfa5aeb7cdef924c | [
"MIT"
] | null | null | null | #!/usr/bin/python
####################################################
####################################################
#
# SETUP
#
####################################################
####################################################
# Import modules
import argparse, boto3, string, time, sys, os, string
imp... | 34.71223 | 263 | 0.630674 |
91e80ecde808f188fb9d5bd78ff7a926b06b6df9 | 13,541 | py | Python | vplexapi-7.0.0/vplexapi/api/storage_group_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | 3 | 2020-12-01T11:22:13.000Z | 2021-02-16T17:38:42.000Z | vplexapi-7.0.0/vplexapi/api/storage_group_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | null | null | null | vplexapi-7.0.0/vplexapi/api/storage_group_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | 3 | 2021-01-01T21:07:55.000Z | 2021-02-20T07:07:40.000Z | # coding: utf-8
"""
VPlex REST API
A definition for the next-gen VPlex API # noqa: E501
OpenAPI spec version: 0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library... | 49.24 | 162 | 0.648697 |
91e820601cb86c710c5912479ec91e2a43849ab7 | 4,331 | py | Python | compare_gan/main.py | Octavian-ai/compare_gan | c1edbc353028cddf6de74743524ef09c21ee1136 | [
"Apache-2.0"
] | 3 | 2019-06-06T04:37:46.000Z | 2021-02-03T20:41:10.000Z | compare_gan/main.py | Octavian-ai/compare_gan | c1edbc353028cddf6de74743524ef09c21ee1136 | [
"Apache-2.0"
] | null | null | null | compare_gan/main.py | Octavian-ai/compare_gan | c1edbc353028cddf6de74743524ef09c21ee1136 | [
"Apache-2.0"
] | 3 | 2019-06-24T22:15:00.000Z | 2021-02-03T20:41:15.000Z | # coding=utf-8
# Copyright 2018 Google LLC & Hwalsuk Lee.
#
# 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 ... | 32.320896 | 84 | 0.738398 |
91e842428712607131765c35addee7ad2c361965 | 7,672 | py | Python | katdal/test/test_sensordata.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | katdal/test/test_sensordata.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | katdal/test/test_sensordata.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8
################################################################################
# Copyright (c) 2018-2019, National Research Foundation (Square Kilometre Array)
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use
# this file except in compliance with the License. You may o... | 41.026738 | 96 | 0.616528 |
91e846adb35ef15e15b5df0da0e1a1cfdb7947dc | 2,331 | py | Python | pydemic/utils/dataframe.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 3 | 2020-05-10T23:52:41.000Z | 2021-08-31T14:38:24.000Z | pydemic/utils/dataframe.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 1 | 2020-09-27T03:26:51.000Z | 2022-03-30T12:18:08.000Z | pydemic/utils/dataframe.py | PyDemic/pydemic | 7e748e4bbe5c1f7fb209271af0ff8afb8fbd4fd5 | [
"MIT"
] | 1 | 2020-10-01T04:07:39.000Z | 2020-10-01T04:07:39.000Z | from typing import Union, Sequence, TypeVar
import numpy as np
import pandas as pd
Data = Union[Sequence, pd.Series, np.ndarray]
T = TypeVar("T", pd.Series, pd.DataFrame, np.ndarray, Sequence)
def trim_zeros(data: T, direction="both") -> T:
"""
Remove null values from the start and end of series or array.
... | 27.104651 | 81 | 0.550837 |
91e8667e842d0245f199accad5dbeaaefd4557f4 | 4,955 | py | Python | st2auth/st2auth/controllers/auth.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2auth/st2auth/controllers/auth.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2auth/st2auth/controllers/auth.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 39.015748 | 96 | 0.671039 |
91e86930fbf7e769f2a04645926cf9e9931a972d | 340 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/lis331_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/lis331_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/lis331_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import board
import busio
import adafruit_lis331
i2c = busio.I2C(board.SCL, board.SDA)
lis = adafruit_lis331.LIS331HH(i2c)
while True:
print("Acceleration : X: %.2f, Y:%.2f, Z:%.2f ms^2" % lis.acceleration)
... | 22.666667 | 75 | 0.735294 |
91e875eedaf08e0c46360ea6a1d233b4d6eef9a8 | 235 | py | Python | oldstuff/python/learning/ex2/tme.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 3 | 2016-11-13T09:06:41.000Z | 2021-09-11T23:36:19.000Z | oldstuff/python/learning/ex2/tme.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | null | null | null | oldstuff/python/learning/ex2/tme.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 2 | 2017-04-04T10:03:18.000Z | 2021-09-11T23:36:26.000Z | import sys
def checkline():
global l
global wordcount
w = l.split()
wordcount += len(w)
wordcount = 0
f = open(sys.argv[1])
flines = f.readlines()
linecount = len(flines)
for l in flines:
checkline()
print linecount, wordcount
| 14.6875 | 26 | 0.697872 |
91e878b2c8e677f59117b102b949b0c37c2b1585 | 103 | py | Python | thgsp/alg/__init__.py | bwdeng20/thgsp | 785b3ff291d72ee51e51e4cdbfd4bab63f8de9ac | [
"BSD-3-Clause"
] | 22 | 2021-01-13T05:15:38.000Z | 2022-01-17T01:37:29.000Z | thgsp/alg/__init__.py | XuChanghhu/thgsp | f2e8c8d04432d0204a999aad3e555171ffd0d432 | [
"BSD-3-Clause"
] | 2 | 2021-03-26T04:36:39.000Z | 2022-01-11T16:17:56.000Z | thgsp/alg/__init__.py | XuChanghhu/thgsp | f2e8c8d04432d0204a999aad3e555171ffd0d432 | [
"BSD-3-Clause"
] | 2 | 2021-01-13T05:15:43.000Z | 2022-01-01T12:51:32.000Z | from .coloring import dsatur
from .traverse import bfs_lil
__all__ = ['dsatur',
'bfs_lil']
| 17.166667 | 29 | 0.669903 |
91e87f147f6df350a7e233973fdc7fbe30bf4e43 | 508 | py | Python | StringBinarySearch.py | mushahidmehdi/MITx-6.00.1x | 44a1b9bb87b5feb8d5a5ac7a8dec59e689dab5be | [
"MIT"
] | null | null | null | StringBinarySearch.py | mushahidmehdi/MITx-6.00.1x | 44a1b9bb87b5feb8d5a5ac7a8dec59e689dab5be | [
"MIT"
] | null | null | null | StringBinarySearch.py | mushahidmehdi/MITx-6.00.1x | 44a1b9bb87b5feb8d5a5ac7a8dec59e689dab5be | [
"MIT"
] | null | null | null | def isIn(char, aStr):
if aStr=='':
return False
if len(aStr)==1:
return aStr == char
midIndex = len(aStr)//2
print(midIndex)
midChar = aStr[midIndex]
print(midChar)
if char == midChar:
return True
elif char < midChar:
return isIn(char, aStr[:midIndex])
else:
return isIn(char, aStr[midIndex+1:]... | 19.538462 | 39 | 0.647638 |
91e89e13736eb10b58161b04f69d11e8fdbc7f91 | 1,287 | py | Python | visualization/training_viz.py | YifanQie/Deep_Learning_for_Manufacturing | 9ba19e41f69c561b04b8573ab9c52c0969f45bfd | [
"MIT"
] | 27 | 2019-10-31T15:16:13.000Z | 2022-03-29T03:56:57.000Z | visualization/training_viz.py | YifanQie/Deep_Learning_for_Manufacturing | 9ba19e41f69c561b04b8573ab9c52c0969f45bfd | [
"MIT"
] | 4 | 2020-03-25T14:18:04.000Z | 2022-02-10T00:34:58.000Z | visualization/training_viz.py | YifanQie/Deep_Learning_for_Manufacturing | 9ba19e41f69c561b04b8573ab9c52c0969f45bfd | [
"MIT"
] | 7 | 2020-02-23T22:12:37.000Z | 2021-12-08T20:14:41.000Z | """
Generate Plot for model loss while training
tensorbaord is added as call back to model training
start tensorboard from terminal/cmd window using tensorboard --logdir ./logs
"""
class TrainViz:
"""contains method to generate loss convergence plot
"""
def training_plot(self, history,plots_path,run_id=0):
"""plot... | 30.642857 | 76 | 0.698524 |
91e8b009f3d08177c693879dfcd10757daaac702 | 15,836 | py | Python | gidgethub/sansio.py | Vovcharaa/gidgethub | b95ee522c6de768994206dd1effe7e39327c805a | [
"Apache-2.0"
] | 295 | 2017-02-15T04:12:50.000Z | 2022-03-21T02:57:32.000Z | gidgethub/sansio.py | Vovcharaa/gidgethub | b95ee522c6de768994206dd1effe7e39327c805a | [
"Apache-2.0"
] | 151 | 2017-01-23T02:24:54.000Z | 2022-03-24T22:45:07.000Z | gidgethub/sansio.py | Vovcharaa/gidgethub | b95ee522c6de768994206dd1effe7e39327c805a | [
"Apache-2.0"
] | 55 | 2017-02-04T01:25:51.000Z | 2022-02-12T07:56:22.000Z | """Code to help with HTTP requests, responses, and events from GitHub's developer API.
This code has been constructed to perform no I/O of its own. This allows you to
use any HTTP library you prefer while not having to implement common details
when working with GitHub's API (e.g. validating webhook events or specifyin... | 40.091139 | 164 | 0.656479 |
91e8d07b85aa4356a91515f9d9f4a7bdb34761e6 | 2,852 | py | Python | structs/trie/trie.py | tmck-code/structs-py | 779eca9a8c749196986a7b5b330a6c6fb568f8ae | [
"BSD-3-Clause"
] | null | null | null | structs/trie/trie.py | tmck-code/structs-py | 779eca9a8c749196986a7b5b330a6c6fb568f8ae | [
"BSD-3-Clause"
] | null | null | null | structs/trie/trie.py | tmck-code/structs-py | 779eca9a8c749196986a7b5b330a6c6fb568f8ae | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
r'''
A python implementation of the Trie data structure.
https://en.wikipedia.org/wiki/Trie
The Trie is a memory-optimised data store for strings. It stores strings using a
k-ary tree structure (a tree in which each node has up to `k` children)
e.g. to store the words `car`, `cat`, 'bar' ... | 29.708333 | 94 | 0.568373 |
91e8d46bce884a570bc36cb5c0e98183b0e91349 | 435 | py | Python | Seeder/harvests/migrations/0011_auto_20190607_1708.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 8 | 2017-08-16T19:18:57.000Z | 2022-01-24T10:08:19.000Z | Seeder/harvests/migrations/0011_auto_20190607_1708.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 242 | 2017-02-03T19:15:52.000Z | 2022-03-25T08:02:52.000Z | Seeder/harvests/migrations/0011_auto_20190607_1708.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 2 | 2019-03-06T12:36:29.000Z | 2019-07-08T12:52:20.000Z | # Generated by Django 2.2 on 2019-06-07 17:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('harvests', '0010_auto_20190607_1705'),
]
operations = [
migrations.AlterModelOptions(
name='topiccollection',
options={'orderi... | 24.166667 | 125 | 0.632184 |
91e91b4177681f962cd911b68ae145a7dc37fe79 | 1,342 | py | Python | tests/test_court_summary.py | PhiladelphiaController/phl-courts-scraper | 0c3c915a7fa355538c43a138fa7b104b8bf6ef1e | [
"MIT"
] | null | null | null | tests/test_court_summary.py | PhiladelphiaController/phl-courts-scraper | 0c3c915a7fa355538c43a138fa7b104b8bf6ef1e | [
"MIT"
] | 4 | 2020-12-09T18:25:53.000Z | 2021-03-19T22:30:18.000Z | tests/test_court_summary.py | PhiladelphiaController/phl-courts-scraper | 0c3c915a7fa355538c43a138fa7b104b8bf6ef1e | [
"MIT"
] | null | null | null | from pathlib import Path
from phl_courts_scraper.court_summary import CourtSummary, CourtSummaryParser
current_dir = Path(__file__).parent.absolute()
def _test_report(report):
# Verify details
assert len(report) == len(report.dockets)
if len(report):
assert report[0] == report.dockets[0]
#... | 25.807692 | 77 | 0.649776 |
91e93aedcc65e8be82b9a8f3042aa595df5bdec6 | 1,446 | py | Python | tests/test_split_channel.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | 1 | 2021-08-02T07:18:50.000Z | 2021-08-02T07:18:50.000Z | tests/test_split_channel.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | tests/test_split_channel.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in wri... | 37.076923 | 88 | 0.715076 |
91e9408d725c566603bdd82197133878b5defb66 | 8,310 | py | Python | sdca4crf/monitor.py | remilepriol/sdca4crf | 13e7fbd741f6f4530de1983ca10e1760aa702207 | [
"MIT"
] | 3 | 2018-06-25T23:16:18.000Z | 2020-11-11T00:45:49.000Z | sdca4crf/monitor.py | remilepriol/sdca4crf | 13e7fbd741f6f4530de1983ca10e1760aa702207 | [
"MIT"
] | null | null | null | sdca4crf/monitor.py | remilepriol/sdca4crf | 13e7fbd741f6f4530de1983ca10e1760aa702207 | [
"MIT"
] | null | null | null | import pickle
import time
import numpy as np
import tensorboard_logger as tl
def are_consistent(monitor_dual, monitor_all):
return np.isclose(monitor_dual.get_value(), monitor_all.dual_objective)
class MonitorAllObjectives:
def __init__(self, regularization, weights, marginals, ground_truth_centroid, trai... | 34.625 | 96 | 0.634777 |
91e9469bfd2ec1218442d537e9442e1f50804301 | 16,441 | py | Python | gtfs_kit/feed.py | mrcagney/gtfs_k | 746ef0d983e3f52cbc4b792728395513e7181ed5 | [
"MIT"
] | 47 | 2019-09-11T19:03:22.000Z | 2022-03-23T13:54:11.000Z | gtfs_kit/feed.py | mrcagney/gtfs_k | 746ef0d983e3f52cbc4b792728395513e7181ed5 | [
"MIT"
] | 8 | 2019-11-01T09:13:50.000Z | 2022-03-22T22:19:47.000Z | gtfs_kit/feed.py | mrcagney/gtfs_k | 746ef0d983e3f52cbc4b792728395513e7181ed5 | [
"MIT"
] | 17 | 2020-01-13T03:34:36.000Z | 2022-02-09T03:51:04.000Z | """
This module defines a Feed class to represent GTFS feeds.
There is an instance attribute for every GTFS table (routes, stops, etc.),
which stores the table as a Pandas DataFrame,
or as ``None`` in case that table is missing.
The Feed class also has heaps of methods: a method to compute route stats,
a method to com... | 31.435946 | 86 | 0.603795 |
91e94915c6d080df2444e4fb8e8ba6115d5fd2a3 | 865 | py | Python | run_preporcessing.py | ChiLlx/Modified-3D-UNet-Pytorch | 0b3bb64bbfa7c5422b2fc85d0c4eb37c0773afec | [
"MIT"
] | 193 | 2018-04-17T07:28:16.000Z | 2022-03-23T00:34:43.000Z | run_preporcessing.py | ChiLlx/Modified-3D-UNet-Pytorch | 0b3bb64bbfa7c5422b2fc85d0c4eb37c0773afec | [
"MIT"
] | 7 | 2018-07-16T01:54:23.000Z | 2020-12-04T06:55:02.000Z | run_preporcessing.py | ChiLlx/Modified-3D-UNet-Pytorch | 0b3bb64bbfa7c5422b2fc85d0c4eb37c0773afec | [
"MIT"
] | 50 | 2018-08-13T23:06:19.000Z | 2021-12-09T09:42:13.000Z | import argparse
from dataset import run_preprocessing_BraTS2018_training #, run_preprocessing_BraTS2018_validationOrTesting
import paths
print 'start'
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--mode", help="train for training set, val for validation set, and test for testing set", type=str)
args = ... | 50.882353 | 126 | 0.809249 |
91e95ae0218fc350eb767cf655431bfdc50bb5f3 | 2,035 | py | Python | db_multitenant/mapper.py | appsembler/django-db-multitenant | dee2541110c2fafae982b405db5ddd77753aeeac | [
"Apache-2.0"
] | null | null | null | db_multitenant/mapper.py | appsembler/django-db-multitenant | dee2541110c2fafae982b405db5ddd77753aeeac | [
"Apache-2.0"
] | null | null | null | db_multitenant/mapper.py | appsembler/django-db-multitenant | dee2541110c2fafae982b405db5ddd77753aeeac | [
"Apache-2.0"
] | 1 | 2019-02-03T03:31:55.000Z | 2019-02-03T03:31:55.000Z | # Copyright (c) 2013, mike wakerly <opensource@hoho.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of c... | 47.325581 | 80 | 0.759705 |
91e960dccfe01fdbd17509b7b87a24aca2779cb3 | 1,007 | py | Python | musicxml_toolbox/scripts/annotate_chords.py | Kanma/musicxml_toolbox | 0a3e70d70c4731cfd6eb8456b5d68497ebfd2922 | [
"MIT"
] | 2 | 2018-05-03T19:06:26.000Z | 2021-04-13T11:21:57.000Z | musicxml_toolbox/scripts/annotate_chords.py | Kanma/musicxml_toolbox | 0a3e70d70c4731cfd6eb8456b5d68497ebfd2922 | [
"MIT"
] | null | null | null | musicxml_toolbox/scripts/annotate_chords.py | Kanma/musicxml_toolbox | 0a3e70d70c4731cfd6eb8456b5d68497ebfd2922 | [
"MIT"
] | null | null | null | import argparse
from ..musicxml import Score
def main(args=None):
# Command-line parsing
parser = argparse.ArgumentParser(
description='Annotate the chords found in a MusicXML file'
)
parser.add_argument('--staff', type=str,
help='''The staff to annotate, in the form:... | 22.886364 | 86 | 0.621648 |
91e965171dc7586958a9c81010df9c7311b483f2 | 6,242 | py | Python | src/globe/hexasphere.py | alexdawn/terraformer-prototype | a2238a8ec9e7f8b31f84262cf17d5f4c69f3236b | [
"MIT"
] | null | null | null | src/globe/hexasphere.py | alexdawn/terraformer-prototype | a2238a8ec9e7f8b31f84262cf17d5f4c69f3236b | [
"MIT"
] | null | null | null | src/globe/hexasphere.py | alexdawn/terraformer-prototype | a2238a8ec9e7f8b31f84262cf17d5f4c69f3236b | [
"MIT"
] | null | null | null | from __future__ import annotations
import json
from typing import Dict, List
from src.globe.tile import Tile
from src.globe.face import Face
from src.globe.point import Point
class Isohedron:
def get_corners(self):
tao = 1.61803399
size = 1000
return [
Point(size, tao * size, ... | 38.770186 | 97 | 0.519225 |
91e98c6798b5756c94a9ba9bd537502dbcb742ef | 8,672 | py | Python | zhiqiang/trainers/paral_trainer.py | Li-Ming-Fan/zhiqiang | f3454c0132e407848039b83ebb66a25e39f10ec7 | [
"Apache-2.0"
] | 3 | 2020-04-16T06:32:57.000Z | 2022-03-08T09:46:03.000Z | zhiqiang/trainers/paral_trainer.py | Li-Ming-Fan/zhiqiang | f3454c0132e407848039b83ebb66a25e39f10ec7 | [
"Apache-2.0"
] | null | null | null | zhiqiang/trainers/paral_trainer.py | Li-Ming-Fan/zhiqiang | f3454c0132e407848039b83ebb66a25e39f10ec7 | [
"Apache-2.0"
] | null | null | null |
from . import AbstractTrainer
from ..utils.data_parallelism import DataParallelism
import os
import torch
torch.multiprocessing.set_sharing_strategy("file_system")
import torch.multiprocessing as mp
import logging
#
def process_eval(list_data, idx, result_dict, settings_paral):
"""
"""
max_step = setti... | 31.42029 | 86 | 0.591213 |
91e9907a78d510ac95421ad321263bac69b6709d | 32,877 | py | Python | edb/pgsql/compiler/relctx.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | edb/pgsql/compiler/relctx.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | edb/pgsql/compiler/relctx.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | 31.703954 | 79 | 0.627034 |
91e9da37c3ebd7b06be36125cf4ce0f9fe083e1e | 5,259 | py | Python | server_common/test_modules/test_channel_access.py | GustavLero/EPICS-inst_servers | 4bcdd6a80f1d9e074de3f0f7c66968d506981988 | [
"BSD-3-Clause"
] | null | null | null | server_common/test_modules/test_channel_access.py | GustavLero/EPICS-inst_servers | 4bcdd6a80f1d9e074de3f0f7c66968d506981988 | [
"BSD-3-Clause"
] | null | null | null | server_common/test_modules/test_channel_access.py | GustavLero/EPICS-inst_servers | 4bcdd6a80f1d9e074de3f0f7c66968d506981988 | [
"BSD-3-Clause"
] | null | null | null | import threading
import time
import unittest
from six.moves.queue import Queue, Empty
from concurrent.futures import wait
from mock import Mock, patch
from hamcrest import *
import server_common
from server_common.channel_access import ChannelAccess, NUMBER_OF_CAPUT_THREADS, maximum_severity, AlarmSeverity, \
Al... | 38.669118 | 119 | 0.698992 |
91e9ff2e20efbb993b7b0fd37de97862b259d110 | 5,661 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_10_01/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 38.510204 | 133 | 0.649355 |
91ea04b8ffd7fbb02e53cad67a40454a632d8f07 | 21,740 | py | Python | mediagoblin/user_pages/views.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | 1 | 2018-12-19T00:05:55.000Z | 2018-12-19T00:05:55.000Z | mediagoblin/user_pages/views.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | null | null | null | mediagoblin/user_pages/views.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... | 34.021909 | 97 | 0.631923 |
91ea0783bfd1fcce1dbbcf6d2c6bd1ce2d3cdbe1 | 1,921 | py | Python | doc/examples/usersguide/darcy.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | doc/examples/usersguide/darcy.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | doc/examples/usersguide/darcy.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | from __future__ import division
##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/... | 32.559322 | 85 | 0.62988 |
91ea2254372a8458f9835df1b2332620e6c3ca4b | 12,101 | py | Python | tests/common/test_op/ascend/quantized_max_pool.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_op/ascend/quantized_max_pool.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_op/ascend/quantized_max_pool.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 42.163763 | 89 | 0.614247 |
91ea38d956b91dc6fc8bcc9c0fc14cbc146841df | 7,359 | py | Python | experiments/preprocessing/cnnTracker.py | rubende/mupeg | e10a3a890d7ce78593ed2775a482e9d023af350e | [
"MIT"
] | 2 | 2020-03-20T11:46:51.000Z | 2021-06-21T16:00:24.000Z | experiments/preprocessing/cnnTracker.py | rubende/mupeg | e10a3a890d7ce78593ed2775a482e9d023af350e | [
"MIT"
] | 3 | 2020-11-13T17:45:36.000Z | 2022-02-09T23:36:40.000Z | experiments/preprocessing/cnnTracker.py | rubende/mupeg | e10a3a890d7ce78593ed2775a482e9d023af350e | [
"MIT"
] | 2 | 2021-02-04T11:43:57.000Z | 2021-11-29T18:10:25.000Z | import glob
from keras.applications.resnet50 import ResNet50
import os
import ntpath
import pickle
import cv2
import scipy.io
import numpy as np
from keras.models import Model
from scipy.spatial.distance import pdist
PATH_TO_TEST_IMAGES_ORIGINAL_DIR = '/videos_two_persons/' # Path to generated data... | 39.143617 | 125 | 0.516103 |
91ea4f646d0f2df4f55b711bb70fdfeae2b6fbd1 | 2,834 | py | Python | freetile/helper/helper_ewmh.py | rbn42/freetile | 16a5c95650d1887b372f373c2126f96d991f3366 | [
"MIT"
] | 10 | 2017-09-09T23:24:13.000Z | 2020-04-08T17:07:59.000Z | freetile/helper/helper_ewmh.py | rbn42/kd_tree_tile | 16a5c95650d1887b372f373c2126f96d991f3366 | [
"MIT"
] | 1 | 2017-08-26T08:09:03.000Z | 2017-08-26T08:09:34.000Z | freetile/helper/helper_ewmh.py | rbn42/freetile | 16a5c95650d1887b372f373c2126f96d991f3366 | [
"MIT"
] | null | null | null | from ewmh import EWMH
from Xlib import X
ewmh = EWMH()
_NET_WM_STATE_MAXIMIZED_VERT = ewmh.display.get_atom('_NET_WM_STATE_MAXIMIZED_VERT')
_NET_WM_STATE_MAXIMIZED_HORZ = ewmh.display.get_atom('_NET_WM_STATE_MAXIMIZED_HORZ')
_NET_WM_STATE_FULLSCREEN = ewmh.display.get_atom('_NET_WM_STATE_FULLSCREEN')
def raise_wind... | 29.216495 | 122 | 0.631263 |
91ea8723035c0cad771b7feac3b55ddaf67d7691 | 58,402 | py | Python | mindmeld/components/dialogue.py | Zozman/mindmeld | d86cc823c9b36dbafc8fc8f8ea04085ca1ffdeb5 | [
"Apache-2.0"
] | 580 | 2019-03-24T20:59:09.000Z | 2022-03-23T17:06:43.000Z | mindmeld/components/dialogue.py | Zozman/mindmeld | d86cc823c9b36dbafc8fc8f8ea04085ca1ffdeb5 | [
"Apache-2.0"
] | 199 | 2019-04-30T18:15:46.000Z | 2022-03-22T17:11:33.000Z | mindmeld/components/dialogue.py | Zozman/mindmeld | d86cc823c9b36dbafc8fc8f8ea04085ca1ffdeb5 | [
"Apache-2.0"
] | 164 | 2019-04-25T08:27:28.000Z | 2022-03-23T12:44:33.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Cisco Systems, Inc. and others. 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... | 36.638645 | 100 | 0.602702 |
91ea8e3194c2125b9a8bd380e6e9ae35028293dc | 106 | py | Python | os_ref/exists.py | SeanSyue/PythonReferences | 103b2d6934a33e56a5d8fbb14d95282f572b3af7 | [
"MIT"
] | null | null | null | os_ref/exists.py | SeanSyue/PythonReferences | 103b2d6934a33e56a5d8fbb14d95282f572b3af7 | [
"MIT"
] | null | null | null | os_ref/exists.py | SeanSyue/PythonReferences | 103b2d6934a33e56a5d8fbb14d95282f572b3af7 | [
"MIT"
] | null | null | null | import os
print(os.path.exists('/Users'))
print(os.path.isdir('/Users'))
print(os.path.isfile('/Users'))
| 17.666667 | 31 | 0.688679 |
91ea96d82ee5f9065f8412687d321759fed7398a | 2,981 | py | Python | test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/v2/_configuration.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 ... | 45.861538 | 125 | 0.686011 |
91eaa7fc1297c520b6d9786b81e234b9cc093043 | 5,876 | py | Python | scripts/python/backend_server/wsgi/get_latest_alaska_files.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2020-06-03T15:59:50.000Z | 2020-12-21T11:11:57.000Z | scripts/python/backend_server/wsgi/get_latest_alaska_files.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | null | null | null | scripts/python/backend_server/wsgi/get_latest_alaska_files.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2019-10-02T06:47:23.000Z | 2020-02-02T18:32:23.000Z | #!/usr/bin/env python
"""Get latest alaska image files for a particular site"""
# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
# ** Copyright UCAR (c) 1992 - 2015
# ** University Corporation for Atmospheric Research(UCAR)
# ** National Center for Atmospheric Research(NCAR)
# ** Resear... | 44.180451 | 107 | 0.643125 |
91eaad15e03e5b5ebc9ae870aa078601f369f0c3 | 1,901 | py | Python | ielex/source_scripts/handle_duplicate_sources.py | lingdb/CoBL-public | e50b441c4281b9299fb1cd0b46f906887cb86dd1 | [
"BSD-2-Clause"
] | 3 | 2017-05-30T04:40:43.000Z | 2019-04-25T14:54:54.000Z | ielex/source_scripts/handle_duplicate_sources.py | lingdb/CoBL-public | e50b441c4281b9299fb1cd0b46f906887cb86dd1 | [
"BSD-2-Clause"
] | null | null | null | ielex/source_scripts/handle_duplicate_sources.py | lingdb/CoBL-public | e50b441c4281b9299fb1cd0b46f906887cb86dd1 | [
"BSD-2-Clause"
] | 3 | 2018-07-02T13:42:12.000Z | 2019-05-17T13:11:13.000Z | import django
from ielex.lexicon.models import Source
from django.core.exceptions import ObjectDoesNotExist
django.setup()
def handle_sources(dic):
merge_and_delete_sources(dic['merge'])
deprecate_sources(dic['deprecate'])
delete_sources(dic['delete'])
def delete_sources(lst):
for pk in lst:
... | 29.703125 | 71 | 0.608101 |
91eadd808aedda159c29a89b56c60adb5432b774 | 10,097 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_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 ... | 46.529954 | 203 | 0.6495 |
91eae6ac78fc1e218dd7753f62d500a5d10b1923 | 5,285 | py | Python | oscar/lib/python2.7/site-packages/IPython/utils/tests/test_process.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/utils/tests/test_process.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/utils/tests/test_process.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
"""
Tests for platutils.py
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this... | 35.952381 | 81 | 0.529044 |
91eaef181cf9ed622a4ce0c256269e7c7f45df5d | 9,170 | py | Python | myia/utils/intern.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | myia/utils/intern.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | myia/utils/intern.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | """Tools to intern the instances of certain classes."""
import weakref
from collections import defaultdict, deque
from .misc import Named
class CanonStore:
"""Store of canonical objects."""
def __init__(self, hashfn, eqfn):
"""Initialize a CanonStore."""
self.hashes = defaultdict(weakref.We... | 24.650538 | 80 | 0.587786 |
91eaeff0c8c5a9c56aab13f295c2b04ebee58b23 | 1,398 | py | Python | app/auth/forms.py | Kevson102/Pitches | a1c41b83edf687135edf35dc068696ea6b7bf824 | [
"MIT"
] | null | null | null | app/auth/forms.py | Kevson102/Pitches | a1c41b83edf687135edf35dc068696ea6b7bf824 | [
"MIT"
] | null | null | null | app/auth/forms.py | Kevson102/Pitches | a1c41b83edf687135edf35dc068696ea6b7bf824 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import Required, Email, EqualTo, ValidationError
from ..models import User
class RegistrationForm(FlaskForm):
email = StringField('user123@gmail.com', validators=[Required(), Email()])
... | 51.777778 | 148 | 0.761803 |
91eb4c59d4315fb01872effb50c14e75b496396a | 4,719 | py | Python | tempest/api/compute/images/test_image_metadata.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/images/test_image_metadata.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/images/test_image_metadata.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# 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 requ... | 40.333333 | 79 | 0.642297 |
91eb6105721b41cdf8ca121a05b10ff7ba210528 | 2,273 | py | Python | src/highlighter.py | BoseSean/db-explain-viz | bb2b0fa52558b1ffdb0940cce3a977ccebcae8c3 | [
"Apache-2.0"
] | 1 | 2018-12-06T08:41:31.000Z | 2018-12-06T08:41:31.000Z | src/highlighter.py | BoseSean/db-explain-viz | bb2b0fa52558b1ffdb0940cce3a977ccebcae8c3 | [
"Apache-2.0"
] | null | null | null | src/highlighter.py | BoseSean/db-explain-viz | bb2b0fa52558b1ffdb0940cce3a977ccebcae8c3 | [
"Apache-2.0"
] | null | null | null | from constants import Fields as F
from constants import NodeTypes as NT
def find_correspond(node):
'''
Find correlated component in SQL query for the given node based on certain attributes of the node.
:param node: the node to find correlated components for
:return: a list of strings which are the corr... | 33.426471 | 102 | 0.673559 |
91eb6b991378ebef5547ade1f901d98217e81ff7 | 4,727 | py | Python | utils/dataloader.py | Will-jing/pspnet-pytorch | 0bc2249e03809511dca1ad19c6a4156d636fdbd6 | [
"MIT"
] | 1 | 2020-12-30T09:28:11.000Z | 2020-12-30T09:28:11.000Z | utils/dataloader.py | Will-jing/pspnet-pytorch | 0bc2249e03809511dca1ad19c6a4156d636fdbd6 | [
"MIT"
] | null | null | null | utils/dataloader.py | Will-jing/pspnet-pytorch | 0bc2249e03809511dca1ad19c6a4156d636fdbd6 | [
"MIT"
] | null | null | null | from random import shuffle
import numpy as np
import torch
import torch.nn as nn
import math
import torch.nn.functional as F
from PIL import Image
from torch.autograd import Variable
from torch.utils.data import DataLoader
from torch.utils.data.dataset import Dataset
from matplotlib.colors import rgb_to_hsv, ... | 33.288732 | 110 | 0.568014 |
91eb782ab27ab2aae9a927e0be2aec0dab909588 | 8,036 | py | Python | describe/describe/core/system.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | 2 | 2018-10-10T09:32:34.000Z | 2019-03-28T08:42:31.000Z | describe/describe/core/system.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | describe/describe/core/system.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | from ase import Atoms
import numpy as np
class System(Atoms):
def __init__(
self,
symbols=None,
positions=None,
numbers=None,
tags=None,
momenta=None,
masses=None,
magmoms=None,
charges=None,
s... | 34.050847 | 79 | 0.585241 |
91ebc9dcaf90325c1c2a0da3b6a191d09df8c937 | 1,040 | py | Python | setup.py | brentp/poverlap | c54c420327d3cc051f27765e018d480eb149b441 | [
"MIT"
] | 15 | 2015-01-21T14:15:23.000Z | 2021-09-07T00:13:22.000Z | setup.py | brentp/poverlap | c54c420327d3cc051f27765e018d480eb149b441 | [
"MIT"
] | 2 | 2015-05-03T18:54:01.000Z | 2020-07-12T09:59:28.000Z | setup.py | brentp/poverlap | c54c420327d3cc051f27765e018d480eb149b441 | [
"MIT"
] | 9 | 2015-07-28T20:37:39.000Z | 2021-09-07T00:11:31.000Z | from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.md')).read()
version = '0.1'
install_requires = [
'nose',
]
setup(name='poverlap',
version=version,
description="Significance testing for genomic interval over... | 26.666667 | 79 | 0.668269 |
91ebcf16a43335a54f853343148c44f630ae1a10 | 4,376 | py | Python | test/test_v1_extra_alipay_extend_params.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | test/test_v1_extra_alipay_extend_params.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | test/test_v1_extra_alipay_extend_params.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Justap API
欢迎阅读 Justap Api 文档 Justap 是为移动端应用和PC端应用打造的下一代聚合支付SAAS服务平台,通过一个 SDK 即可快速的支持各种形式的应用,并且一次接口完成多个不同支付渠道的接入。平台除了支持服务商子商户模式,同时还对商家自有商户(即自己前往微信、支付宝等机构开户)提供了完整的支持。 感谢您的支持,我们将不断探索,为您提供更优质的服务!如需技术支持可前往商户中心提交工单,支持工程师会尽快与您取得联系! # 文档说明 采用 REST 风格设计。所有接口请求地址都是可预期的以及面向资源的。使用规范的 HTTP 响应代码来表示请... | 106.731707 | 3,404 | 0.771938 |
91ebe227c5b4d77f5deac9fd522fe1a7192c9a1f | 3,234 | py | Python | benchmarks/text_to_speech/tensorflow/wavenet/inference/fp32/model_init.py | arita37/models | 659895bff24589829b317f5180d60329906dc13c | [
"Apache-2.0"
] | 1 | 2019-05-23T01:07:23.000Z | 2019-05-23T01:07:23.000Z | benchmarks/text_to_speech/tensorflow/wavenet/inference/fp32/model_init.py | arita37/models | 659895bff24589829b317f5180d60329906dc13c | [
"Apache-2.0"
] | null | null | null | benchmarks/text_to_speech/tensorflow/wavenet/inference/fp32/model_init.py | arita37/models | 659895bff24589829b317f5180d60329906dc13c | [
"Apache-2.0"
] | null | null | null | #
# -*- coding: utf-8 -*-
#
# Copyright (c) 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.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 38.963855 | 87 | 0.635436 |
91ebfd710f7f16d4aa4296ec0255b885092bd776 | 10,963 | py | Python | train.py | Will-jing/pspnet-pytorch | 0bc2249e03809511dca1ad19c6a4156d636fdbd6 | [
"MIT"
] | 1 | 2020-12-30T09:28:11.000Z | 2020-12-30T09:28:11.000Z | train.py | Will-jing/pspnet-pytorch | 0bc2249e03809511dca1ad19c6a4156d636fdbd6 | [
"MIT"
] | null | null | null | train.py | Will-jing/pspnet-pytorch | 0bc2249e03809511dca1ad19c6a4156d636fdbd6 | [
"MIT"
] | null | null | null | import time
import torch
import torch.optim as optim
import torch.backends.cudnn as cudnn
import torchvision.models as models
import numpy as np
from tqdm import tqdm
from torchvision import models
from torch.autograd import Variable
from PIL import Image
from torch import nn
from nets.pspnet import PSPNet
... | 40.754647 | 154 | 0.520752 |
91ec013625403a06078abcdcb715d82b1fc5f678 | 10,545 | py | Python | neon/optimizers/gradient_descent.py | zhenglab/neon | ba5b008a03001c2a2e38a1e688b4f265c6461539 | [
"Apache-2.0"
] | 3 | 2017-02-02T05:20:48.000Z | 2021-07-07T16:50:41.000Z | neon/optimizers/gradient_descent.py | tambetm/neon | 1597082ad0bab59102f1ceb20feb08c5a0bf9d04 | [
"Apache-2.0"
] | null | null | null | neon/optimizers/gradient_descent.py | tambetm/neon | 1597082ad0bab59102f1ceb20feb08c5a0bf9d04 | [
"Apache-2.0"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright 2014 Nervana Systems 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.o... | 42.011952 | 79 | 0.593931 |
91ec03929f46f2a86c4f5b6d1c732feec30481a7 | 2,892 | py | Python | alipay/aop/api/response/AlipayEcoMycarParkingAgreementQueryResponse.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/AlipayEcoMycarParkingAgreementQueryResponse.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/AlipayEcoMycarParkingAgreementQueryResponse.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
from alipay.aop.api.domain.UserAdvanceInfo import UserAdvanceInfo
class AlipayEcoMycarParkingAgreementQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayEcoMycarParking... | 32.133333 | 116 | 0.687759 |
91ec2b1a836cb70df9043aa177cae5a7508e1f9c | 114 | py | Python | database_files/tests/models.py | uofajillian/django-database-files | f70a2a30c5917e747f56f81346baae3926e98e0d | [
"BSD-3-Clause"
] | 10 | 2015-03-18T06:21:56.000Z | 2020-04-08T22:24:10.000Z | database_files/tests/models.py | uofajillian/django-database-files | f70a2a30c5917e747f56f81346baae3926e98e0d | [
"BSD-3-Clause"
] | 2 | 2016-03-01T23:19:57.000Z | 2017-02-13T17:24:05.000Z | database_files/tests/models.py | uofajillian/django-database-files | f70a2a30c5917e747f56f81346baae3926e98e0d | [
"BSD-3-Clause"
] | 7 | 2015-08-18T17:30:27.000Z | 2021-12-25T15:40:05.000Z | from django.db import models
class Thing(models.Model):
upload = models.FileField(upload_to='not required')
| 19 | 55 | 0.754386 |
91ec377591f81c7a6c0557ce4e91544c5317e304 | 5,483 | py | Python | BSMan/ensemble.py | zoegroes/Amazon | f8addfefcee80f0ca15e416954af3926f3007d16 | [
"MIT"
] | 144 | 2015-01-20T16:26:23.000Z | 2021-03-15T12:20:00.000Z | BSMan/ensemble.py | zoegroes/Amazon | f8addfefcee80f0ca15e416954af3926f3007d16 | [
"MIT"
] | 1 | 2017-02-20T01:57:41.000Z | 2019-02-12T09:31:08.000Z | BSMan/ensemble.py | zoegroes/Amazon | f8addfefcee80f0ca15e416954af3926f3007d16 | [
"MIT"
] | 119 | 2015-01-05T11:22:35.000Z | 2021-04-23T13:14:33.000Z | """ Amazon Access Challenge Starter Code
This was built using the code of Paul Duan <email@paulduan.com> as a starting
point (thanks to Paul).
It builds ensemble models using the original dataset and a handful of
extracted features.
Author: Benjamin Solecki <bensolecki@gmail.com>
"""
from __future__ import divisio... | 36.072368 | 158 | 0.718767 |
91ec3d214459ccfe9d163db830275442ab33bcd7 | 3,852 | py | Python | ngsutils/support/bgzip.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 57 | 2015-03-09T01:26:45.000Z | 2022-02-22T07:26:01.000Z | ngsutils/support/bgzip.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-02-03T23:24:46.000Z | 2022-03-16T20:08:10.000Z | ngsutils/support/bgzip.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-01-18T16:47:47.000Z | 2022-02-22T07:28:09.000Z | #!/usr/bin/env python
'''
Extract the blocks from a BGZip file.
BAM files are stored as blocks in a bgzip archive. This class
will load the bgzip archive and output the block information.
'''
import sys
import os
import struct
class BGZip(object):
def __init__(self, fname):
self.fname = fname
se... | 27.913043 | 84 | 0.49325 |
91ec58b1164a6add930e2bfec2f46d3c21185577 | 3,020 | py | Python | scraper/process_resources.py | ecohealthalliance/grits-api | e8a3b12785bf362c8c12afbc4cc55ca8de8485ce | [
"Apache-2.0"
] | 3 | 2017-07-27T15:57:51.000Z | 2018-06-02T09:05:00.000Z | scraper/process_resources.py | ecohealthalliance/grits-api | e8a3b12785bf362c8c12afbc4cc55ca8de8485ce | [
"Apache-2.0"
] | 19 | 2016-05-06T13:01:33.000Z | 2022-03-11T23:13:25.000Z | scraper/process_resources.py | ecohealthalliance/grits-api | e8a3b12785bf362c8c12afbc4cc55ca8de8485ce | [
"Apache-2.0"
] | 2 | 2017-07-12T04:25:06.000Z | 2020-01-06T19:42:02.000Z | import goose
from bs4 import BeautifulSoup
import random
import ctypes
import concurrent.futures
import os, sys, json
import readability
import lxml
import re
__version__ = '0.0.0'
def extract_clean_content(content):
global __version__
# I found out about goose and readability here:
# http://stackoverflow.c... | 41.944444 | 130 | 0.664238 |
91ec5a2a1ab2541cd1283588e39001cc2c6b5e4d | 5,866 | py | Python | src/data_analysis/signal_calculators.py | otimgren/centrex-data-analysis | 114252cb61e0ec73a423467cee59b29677decfc5 | [
"MIT"
] | null | null | null | src/data_analysis/signal_calculators.py | otimgren/centrex-data-analysis | 114252cb61e0ec73a423467cee59b29677decfc5 | [
"MIT"
] | null | null | null | src/data_analysis/signal_calculators.py | otimgren/centrex-data-analysis | 114252cb61e0ec73a423467cee59b29677decfc5 | [
"MIT"
] | null | null | null | """
Objects for calculating signal sizes based on e.g. fluorescence images or PMT traces
"""
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Tuple
import lmfit
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .plotters import Image, Plotter
@datacl... | 31.537634 | 90 | 0.614899 |
91ec862e71569ae7fb1a6f995c0330c03eddd546 | 8,779 | py | Python | bokeh/protocol/message.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | 1 | 2020-02-06T05:27:53.000Z | 2020-02-06T05:27:53.000Z | bokeh/protocol/message.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | null | null | null | bokeh/protocol/message.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | null | null | null | ''' Provide a base class for all Bokeh Server Protocol message types.
Boker messages are comprised of a sequence of JSON fragments. Specified as
Python JSON-like data, messages have the general form:
.. code-block:: python
[
# these are required
b'{header}', # serialized header dict
... | 27.694006 | 105 | 0.602916 |
91ec91db756461e1d8c38eae6916354e84d06483 | 188 | py | Python | terrascript/idm/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/idm/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/idm/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/idm/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
| 20.888889 | 79 | 0.760638 |
91ecbf2e7e3a41ee6803cc9aa0b8856791865fd7 | 44,931 | py | Python | django/db/models/fields/__init__.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/db/models/fields/__init__.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/db/models/fields/__init__.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | import copy
import datetime
import decimal
import re
import time
import math
from itertools import tee
from django.db import connection
from django.db.models.query_utils import QueryWrapper
from django.conf import settings
from django import forms
from django.core import exceptions, validators
from django.utils.datast... | 37.884486 | 166 | 0.627918 |
91ecf1e34a2c1b8487f37e9a32ca44419486c271 | 235 | py | Python | refinery/bnpy/bnpy-dev/bnpy/allocmodel/mix/__init__.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 103 | 2015-01-13T00:48:14.000Z | 2021-11-08T10:53:22.000Z | refinery/bnpy/bnpy-dev/bnpy/allocmodel/mix/__init__.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 7 | 2015-02-21T04:03:40.000Z | 2021-08-23T20:24:54.000Z | refinery/bnpy/bnpy-dev/bnpy/allocmodel/mix/__init__.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 27 | 2015-01-23T00:54:31.000Z | 2020-12-30T14:30:50.000Z | """
The :mod:`mix` module gathers point-estimate and variational approximations
for Bayesian mixture modeling, including
finite parametric mixture models
nonparametric Dirichlet Process and Pitman-Yor mixture models
"""
| 33.571429 | 75 | 0.770213 |
91ed05f2c7c83898fd43c5c69fbefe109ece53f9 | 20,082 | py | Python | justap_server_sdk_python/models/v1_create_charge_request.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | justap_server_sdk_python/models/v1_create_charge_request.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | justap_server_sdk_python/models/v1_create_charge_request.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Justap API
欢迎阅读 Justap Api 文档 Justap 是为移动端应用和PC端应用打造的下一代聚合支付SAAS服务平台,通过一个 SDK 即可快速的支持各种形式的应用,并且一次接口完成多个不同支付渠道的接入。平台除了支持服务商子商户模式,同时还对商家自有商户(即自己前往微信、支付宝等机构开户)提供了完整的支持。 感谢您的支持,我们将不断探索,为您提供更优质的服务!如需技术支持可前往商户中心提交工单,支持工程师会尽快与您取得联系! # 文档说明 采用 REST 风格设计。所有接口请求地址都是可预期的以及面向资源的。使用规范的 HTTP 响应代码来表示请... | 37.819209 | 3,404 | 0.642416 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.