hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28a57f6405a2f99e8295c8ed4bb94dd67f42e271 | 253 | py | Python | metrology/reporter/__init__.py | miracle2k/metrology | f7341372055da0713a6db634c336b452cb4dc491 | [
"MIT"
] | 52 | 2015-02-02T22:04:41.000Z | 2021-09-07T12:27:51.000Z | metrology/reporter/__init__.py | miracle2k/metrology | f7341372055da0713a6db634c336b452cb4dc491 | [
"MIT"
] | 17 | 2016-06-06T07:10:03.000Z | 2020-07-05T00:06:51.000Z | metrology/reporter/__init__.py | miracle2k/metrology | f7341372055da0713a6db634c336b452cb4dc491 | [
"MIT"
] | 13 | 2015-04-05T10:40:41.000Z | 2021-07-01T12:55:53.000Z | # -*- flake8: noqa -*-
from metrology.reporter.graphite import GraphiteReporter
from metrology.reporter.librato import LibratoReporter
from metrology.reporter.logger import LoggerReporter
__all__ = (GraphiteReporter, LibratoReporter, LoggerReporter)
| 28.111111 | 61 | 0.826087 |
42a15a643bdfb19f56a6bb97ed9ac942a2c4da5e | 3,158 | py | Python | homeassistant/components/x10/light.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/x10/light.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/x10/light.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Support for X10 lights."""
from __future__ import annotations
import logging
from subprocess import STDOUT, CalledProcessError, check_output
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
PLATFORM_SCHEMA,
ColorMode,
LightEntity,
)
from homeassistant.const im... | 27.701754 | 85 | 0.649145 |
3b467c5327889f3a2ea4aaf5bd49cb0b5434ab40 | 3,299 | py | Python | ros2_control_demo_description/diffbot_description/launch/view_robot.launch.py | ZhanfengZhou/ros2_control_demos | 1db6634a0ad193b130cc07d66f5baee894658bf0 | [
"Apache-2.0"
] | 91 | 2020-04-22T21:21:00.000Z | 2022-03-23T08:39:19.000Z | ros2_control_demo_description/diffbot_description/launch/view_robot.launch.py | ZhanfengZhou/ros2_control_demos | 1db6634a0ad193b130cc07d66f5baee894658bf0 | [
"Apache-2.0"
] | 144 | 2020-04-22T21:19:22.000Z | 2022-03-25T10:23:34.000Z | ros2_control_demo_description/diffbot_description/launch/view_robot.launch.py | ZhanfengZhou/ros2_control_demos | 1db6634a0ad193b130cc07d66f5baee894658bf0 | [
"Apache-2.0"
] | 68 | 2020-04-26T16:59:26.000Z | 2022-03-21T11:22:48.000Z | # Copyright 2021 Stogl Robotics Consulting UG (haftungsbeschränkt)
#
# 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 ap... | 32.99 | 99 | 0.673537 |
70ce2ae80aa1126d87d26d46d9685357b92d4203 | 5,735 | py | Python | silx/opencl/test/test_backprojection.py | pierrepaleo/silx | 392930f522e291d096ca29facb652a5c8dcfdbcd | [
"CC0-1.0",
"MIT"
] | 1 | 2016-10-26T11:05:46.000Z | 2016-10-26T11:05:46.000Z | silx/opencl/test/test_backprojection.py | vallsv/silx | 834bfe9272af99096faa360e1ad96291bf46a2ac | [
"CC0-1.0",
"MIT"
] | 7 | 2016-10-19T09:27:26.000Z | 2020-01-24T13:26:56.000Z | silx/opencl/test/test_backprojection.py | payno/silx | 13301e61627f98fa837008250ac74a0627a7a560 | [
"CC0-1.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2016 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... | 34.548193 | 127 | 0.627201 |
4ad440e684bf685526fb5448c43381572c37f79b | 1,182 | py | Python | star_tides/api/decorators/login_required.py | STAR-TIDES/kb | 6f895b03db0eefa86a1667d3024f4fe5b92ea99e | [
"MIT"
] | 2 | 2021-06-10T20:58:27.000Z | 2021-12-29T14:40:44.000Z | star_tides/api/decorators/login_required.py | STAR-TIDES/kb | 6f895b03db0eefa86a1667d3024f4fe5b92ea99e | [
"MIT"
] | 38 | 2021-05-13T06:23:49.000Z | 2021-10-12T23:32:36.000Z | star_tides/api/decorators/login_required.py | STAR-TIDES/kb | 6f895b03db0eefa86a1667d3024f4fe5b92ea99e | [
"MIT"
] | null | null | null | ''' star_tides.api.decorators.login_required
'''
# TODO Implement a decorator to enforce login
from functools import wraps
from star_tides.exceptions import AuthenticationError
from star_tides.config.settings import UNSAFE_IGNORE_LOGIN_REQUIRED
from star_tides.api.controllers.base_controller import Controller
def lo... | 32.833333 | 79 | 0.650592 |
5149dedb30ea65c1edca6900e21d28d5bcf46ef2 | 490 | py | Python | tests/conftest.py | guillaumekln/storages | 35aaf3a0c80e7aa514da2560a70f2f05c305401e | [
"MIT"
] | null | null | null | tests/conftest.py | guillaumekln/storages | 35aaf3a0c80e7aa514da2560a70f2f05c305401e | [
"MIT"
] | 1 | 2019-12-11T15:44:34.000Z | 2019-12-11T15:44:34.000Z | tests/conftest.py | nguyenhn-systran/storages | d0f2a3b2b217313cca0980a43865811135e3f6a3 | [
"MIT"
] | null | null | null | import pytest
import six
import json
def pytest_generate_tests(metafunc):
print(">>>", pytest.config.rootdir)
with open(str(pytest.config.rootdir / "conftest.json")) as f:
config = json.load(f)
if 'storages' in config:
if 'storage_id' in metafunc.fixturenames:
metafunc.par... | 28.823529 | 77 | 0.65102 |
6ff89feeabd8c92785c8ee076df02e20b10983be | 4,889 | py | Python | asianbookie/parsers/user.py | kbgro/asianbookie | 8b3999e29828440dc01b04e70663f4e9e36e6a98 | [
"BSD-3-Clause"
] | 1 | 2021-12-01T08:30:39.000Z | 2021-12-01T08:30:39.000Z | asianbookie/parsers/user.py | kbgro/asianbookie | 8b3999e29828440dc01b04e70663f4e9e36e6a98 | [
"BSD-3-Clause"
] | null | null | null | asianbookie/parsers/user.py | kbgro/asianbookie | 8b3999e29828440dc01b04e70663f4e9e36e6a98 | [
"BSD-3-Clause"
] | null | null | null | from collections import defaultdict
from typing import Dict, List, Optional
from parsel import Selector
from .. import util
from ..domain import AsianBookieUser
class TipsterProfileParser:
"""Parse Tipster Profile"""
@staticmethod
def parse(html_text: str) -> AsianBookieUser:
selector = Selecto... | 42.146552 | 118 | 0.626508 |
9f18d1283a094ab2d560e0a345f510705b023b86 | 551 | py | Python | test/nn/pool/test_pool.py | jinjh0123/pytorch_geometric | 0a4aaa0fd02f0a7b39ac6aa88e3c392e9672a673 | [
"MIT"
] | 1 | 2022-03-14T10:24:56.000Z | 2022-03-14T10:24:56.000Z | test/nn/pool/test_pool.py | jinjh0123/pytorch_geometric | 0a4aaa0fd02f0a7b39ac6aa88e3c392e9672a673 | [
"MIT"
] | null | null | null | test/nn/pool/test_pool.py | jinjh0123/pytorch_geometric | 0a4aaa0fd02f0a7b39ac6aa88e3c392e9672a673 | [
"MIT"
] | null | null | null | from typing import Optional
import torch
from torch import Tensor
from torch_geometric.nn import radius_graph
def test_radius_graph_jit():
class Net(torch.nn.Module):
def forward(self, x: Tensor, batch: Optional[Tensor] = None) -> Tensor:
return radius_graph(x, r=2.5, batch=batch, loop=False... | 27.55 | 79 | 0.635209 |
99d3360d7fcffb264f7e025caddf2318f4fb4a7b | 5,742 | py | Python | sdk/python/pulumi_azure_native/documentdb/v20150401/get_database_account_cassandra_table.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20150401/get_database_account_cassandra_table.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20150401/get_database_account_cassandra_table.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 38.02649 | 505 | 0.645594 |
a4438491e0b556126afe815ef415b4e2afa80edd | 8,836 | py | Python | openGaussBase/testcase/SECURITY/ENCRYPTED/Opengauss_Function_Security_SM3_Case0061.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SECURITY/ENCRYPTED/Opengauss_Function_Security_SM3_Case0061.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SECURITY/ENCRYPTED/Opengauss_Function_Security_SM3_Case0061.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 43.527094 | 84 | 0.600045 |
ac5f58661a279b8fd94db4fe602858a95579582d | 3,087 | py | Python | python/TOANDFRO.py | feliposz/spoj-solutions | 8e51566d311dd953fac4a9058051c4c663b3bdca | [
"MIT"
] | null | null | null | python/TOANDFRO.py | feliposz/spoj-solutions | 8e51566d311dd953fac4a9058051c4c663b3bdca | [
"MIT"
] | null | null | null | python/TOANDFRO.py | feliposz/spoj-solutions | 8e51566d311dd953fac4a9058051c4c663b3bdca | [
"MIT"
] | null | null | null | """SPOJ Problem Set (classical)
http://www.spoj.com/problems/TOANDFRO/
400. To and Fro
Problem code: TOANDFRO
Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only) down the columns, padding with extra random letters so as to m... | 31.5 | 367 | 0.650794 |
ae93290ac5934b39d4797111eb312799bac9ea98 | 2,444 | py | Python | src/visualization/graphs_test.py | pkiage/credit-risk-modelling-tool | 74f6cdb27c8333c9cae5b08b91b5521af8e444e0 | [
"MIT"
] | 1 | 2022-03-03T10:27:23.000Z | 2022-03-03T10:27:23.000Z | src/visualization/graphs_test.py | pkiage/credit-risk-modelling-tool | 74f6cdb27c8333c9cae5b08b91b5521af8e444e0 | [
"MIT"
] | null | null | null | src/visualization/graphs_test.py | pkiage/credit-risk-modelling-tool | 74f6cdb27c8333c9cae5b08b91b5521af8e444e0 | [
"MIT"
] | 1 | 2022-03-29T14:40:20.000Z | 2022-03-29T14:40:20.000Z | from matplotlib import pyplot as plt
from sklearn.metrics import roc_curve
from typing import OrderedDict
from models.util_model_class import ModelClass
from sklearn.calibration import calibration_curve
def cross_validation_graph(cv, eval_metric, trees):
# Plot the test AUC scores for each iteration
fig... | 30.936709 | 78 | 0.655483 |
e73b14b9d87d013fceefd0694062291751482e4e | 1,579 | py | Python | banana_themes.py | 8Banana/banana-themes | 089ccf2843869e5aeb25e80845fa688dc83fad54 | [
"MIT"
] | null | null | null | banana_themes.py | 8Banana/banana-themes | 089ccf2843869e5aeb25e80845fa688dc83fad54 | [
"MIT"
] | null | null | null | banana_themes.py | 8Banana/banana-themes | 089ccf2843869e5aeb25e80845fa688dc83fad54 | [
"MIT"
] | null | null | null | from pygments.style import Style
from pygments.token import (Comment, Keyword, Operator, String,
Number, Punctuation, Name, Error)
__all__ = ["HitGub", "Zaab"]
class HitGub(Style):
background_color = '#ffffff'
default_style = '#000000'
# All the superfluous styles (i.e. the o... | 23.924242 | 75 | 0.583914 |
c20635c5b9f723b74f04610e62804037d2f8b6bf | 2,173 | py | Python | app/alembic/env.py | sankalploomba/StockManagementBackend | 3d99d3335ad0633dc28fc082dc549bd3ca195d25 | [
"MIT"
] | null | null | null | app/alembic/env.py | sankalploomba/StockManagementBackend | 3d99d3335ad0633dc28fc082dc549bd3ca195d25 | [
"MIT"
] | null | null | null | app/alembic/env.py | sankalploomba/StockManagementBackend | 3d99d3335ad0633dc28fc082dc549bd3ca195d25 | [
"MIT"
] | 1 | 2021-09-30T18:01:08.000Z | 2021-09-30T18:01:08.000Z | from logging.config import fileConfig
from sqlalchemy import engine_from_config
from sqlalchemy import pool
from alembic import context
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)
# this is the Alembic Config object, which provides
# access to t... | 26.82716 | 70 | 0.720663 |
113f2f2475dbd4b8745ed0d6e23fc9abb9e63ee3 | 7,000 | py | Python | addons/l10n_ar/models/account_journal.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/l10n_ar/models/account_journal.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/l10n_ar/models/account_journal.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api, _
from odoo.exceptions import ValidationError, RedirectWarning
class AccountJournal(models.Model):
_inherit = "account.journal"
l10n_ar_afip_pos_system = fields.Selection(
selection='_ge... | 50 | 127 | 0.599286 |
690a0aeefe3043ab58335e385d318619250e7c33 | 2,349 | py | Python | src/core/monitor/analyzer/zscore.py | iporollo/monosi | 73d90841667866c1659230c63f137428e24c7967 | [
"Apache-2.0"
] | null | null | null | src/core/monitor/analyzer/zscore.py | iporollo/monosi | 73d90841667866c1659230c63f137428e24c7967 | [
"Apache-2.0"
] | null | null | null | src/core/monitor/analyzer/zscore.py | iporollo/monosi | 73d90841667866c1659230c63f137428e24c7967 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass, field
from math import sqrt
from typing import List
from core.monitor.models.metrics import MetricBase
from .data import Data, DataPoint, Test, TestResult
class ZScoreAlgorithm:
@classmethod
def _mean(cls, values: List[float]):
return round(sum(values) / len(values)... | 27.635294 | 72 | 0.617284 |
aa4f470dc2671b2bd749452f16dd471698c37e28 | 2,306 | py | Python | src/tree_node/__init__.py | Jiezhi/myleetcode | b346e94c46da2a3033ebc8ff50e621aa179c4f62 | [
"MIT"
] | 1 | 2022-03-03T15:11:48.000Z | 2022-03-03T15:11:48.000Z | src/tree_node/__init__.py | Jiezhi/myleetcode | b346e94c46da2a3033ebc8ff50e621aa179c4f62 | [
"MIT"
] | null | null | null | src/tree_node/__init__.py | Jiezhi/myleetcode | b346e94c46da2a3033ebc8ff50e621aa179c4f62 | [
"MIT"
] | 2 | 2022-01-20T22:49:58.000Z | 2022-01-20T22:53:13.000Z | #!/usr/bin/env python
"""
Github: https://github.com/Jiezhi/myleetcode
Created on 2019-03-18
Leetcode: https://leetcode.com/explore/learn/card/data-structure-tree/134/traverse-a-tree/928/
"""
# Definition for a binary tree node.
from typing import List
class TreeNode:
def __init__(self, val, left=None, right=N... | 26.813953 | 103 | 0.602342 |
01eb035a2a8d6cf9bef5c1993b507a198b7891fc | 557 | py | Python | radicale/import_vcf_iphone.py | balrok/pythonstuff | 01861244da8c7075414eaafa4745b34fa37d8048 | [
"MIT"
] | 2 | 2017-09-28T12:31:36.000Z | 2017-11-24T14:40:16.000Z | radicale/import_vcf_iphone.py | balrok/pythonstuff | 01861244da8c7075414eaafa4745b34fa37d8048 | [
"MIT"
] | null | null | null | radicale/import_vcf_iphone.py | balrok/pythonstuff | 01861244da8c7075414eaafa4745b34fa37d8048 | [
"MIT"
] | null | null | null | import sys
import os
c=0
with open(sys.argv[1], encoding="utf8") as f:
contact = []
for line in f:
line = line.replace("\r","")
contact += [line]
if line.startswith("N:"):
s = line[2:-1].split(";")
contact += ["FN:"+" ".join([s[1].strip(),s[0].strip()]+s[2:]).s... | 27.85 | 97 | 0.475763 |
d177ba0aaa5e7b3a4e3c3cc0521c65fd990613cd | 3,853 | py | Python | configs/ttfnetv2/ttfnetv2_r18_enh_dyndila_arch2e2_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/ttfnetv2/ttfnetv2_r18_enh_dyndila_arch2e2_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/ttfnetv2/ttfnetv2_r18_enh_dyndila_arch2e2_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='TTFNet',
pretrained='modelzoo://resnet18',
backbone=dict(
type='ResNet',
depth=18,
num_stages=4,
local_conv_cfg=dict(type='DynDilaConv', param_multiply=100., alpha_scale=1e-4, split=8,
tau_end_epoch=2, tau=(10.,... | 30.824 | 95 | 0.621074 |
e462b76ec68d83783c48931dd54cc401ed9b929d | 251 | py | Python | hcap/admin.py | fabiommendes/capacidade_hospitalar | 4f675b574573eb3f51e6be8a927ea230bf2712c7 | [
"MIT"
] | null | null | null | hcap/admin.py | fabiommendes/capacidade_hospitalar | 4f675b574573eb3f51e6be8a927ea230bf2712c7 | [
"MIT"
] | 31 | 2020-04-11T13:38:17.000Z | 2021-09-22T18:51:11.000Z | hcap/admin.py | fabiommendes/capacidade_hospitalar | 4f675b574573eb3f51e6be8a927ea230bf2712c7 | [
"MIT"
] | 1 | 2020-04-12T17:51:20.000Z | 2020-04-12T17:51:20.000Z | from django.contrib.admin import AdminSite
from django.utils.translation import ugettext_lazy as _
AdminSite.index_title = _("Administrative Panel")
AdminSite.site_header = _("Hospital Capacity Administration")
AdminSite.site_title = _("HCap Admin")
| 35.857143 | 61 | 0.816733 |
eb40b9deb30c0707efce95b6859c941e0c586638 | 15,485 | py | Python | old_game/narrator/specencounters.py | jwvhewitt/dmeternal | bb09f2d497daf9b40dd8cfee10c55be55fb7c3cb | [
"Apache-2.0"
] | 53 | 2015-07-03T21:25:36.000Z | 2022-02-18T23:08:38.000Z | old_game/narrator/specencounters.py | jwvhewitt/dmeternal | bb09f2d497daf9b40dd8cfee10c55be55fb7c3cb | [
"Apache-2.0"
] | 5 | 2015-07-03T21:27:12.000Z | 2016-12-08T14:40:38.000Z | old_game/narrator/specencounters.py | jwvhewitt/dmeternal | bb09f2d497daf9b40dd8cfee10c55be55fb7c3cb | [
"Apache-2.0"
] | 14 | 2016-02-02T06:49:51.000Z | 2022-02-24T13:24:35.000Z | from .plots import Plot,PlotError,PlotState
from .. import context
from .. import items
from .. import maps
from .. import waypoints
from .. import monsters
from .. import dialogue
from .. import services
from .. import teams
from .. import characters
import random
from .. import randmaps
from .. import effects
from ..... | 45.678466 | 172 | 0.639393 |
8861467193dc7524f377069b38bafa8dcc8d4a8a | 233 | py | Python | python/athena/onnx/onnx_opset/__init__.py | sj1104/Het | 81b7e9f0f593108db969fc46a1af3df74b825230 | [
"Apache-2.0"
] | 2 | 2021-12-05T07:11:04.000Z | 2021-12-15T07:53:48.000Z | python/athena/onnx/onnx_opset/__init__.py | sj1104/Het | 81b7e9f0f593108db969fc46a1af3df74b825230 | [
"Apache-2.0"
] | null | null | null | python/athena/onnx/onnx_opset/__init__.py | sj1104/Het | 81b7e9f0f593108db969fc46a1af3df74b825230 | [
"Apache-2.0"
] | 3 | 2021-04-01T22:39:13.000Z | 2021-04-21T11:51:57.000Z | from . import (
MatrixMult,
MultiplyConst,
Variable,
AddElewise,
Relu,
Identity,
Conv2d,
Pool,
Reshape,
AddConst,
Concat,
Sqrt,
Tanh,
BatchNorm,
Pad,
Division,
OneHot,
Opposite,
Softmax,
general,
Reduces,
Dropout,
Transpose,
Where,
) | 8.961538 | 15 | 0.763948 |
0e717ae83b3e83d6c9e8cc19d5774342a5bf0e1a | 707 | py | Python | tests/middlewares/test_middleware_message.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 4 | 2018-03-01T10:22:30.000Z | 2020-04-04T16:31:11.000Z | tests/middlewares/test_middleware_message.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 60 | 2018-05-20T04:42:32.000Z | 2022-02-10T17:03:37.000Z | tests/middlewares/test_middleware_message.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 1 | 2018-08-04T05:06:45.000Z | 2018-08-04T05:06:45.000Z | from unittest.mock import Mock
from django.http import HttpResponse
from bitcaster.middleware.message import MessageMiddleware
def test_messagemiddleware_happy_path(rf):
request = rf.get('/')
request.session = Mock()
m = MessageMiddleware(lambda r: HttpResponse('Ok'))
m.process_request(request)
... | 26.185185 | 62 | 0.731259 |
9818a90cee3f5b95954fe39a56a11ad581c5a292 | 530 | py | Python | app/apps/product/migrations/0002_auto_20210105_2139.py | tonyguesswho/jumga | fdcfc437578d48489fea2d3ab2f7c8711b6b231c | [
"MIT"
] | null | null | null | app/apps/product/migrations/0002_auto_20210105_2139.py | tonyguesswho/jumga | fdcfc437578d48489fea2d3ab2f7c8711b6b231c | [
"MIT"
] | null | null | null | app/apps/product/migrations/0002_auto_20210105_2139.py | tonyguesswho/jumga | fdcfc437578d48489fea2d3ab2f7c8711b6b231c | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-01-05 21:39
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('seller', '0003_auto_20210105_2035'),
('product', '0001_initial'),
]
operations = [
migrations.Alter... | 25.238095 | 124 | 0.633962 |
e8db62cf26c235fd682e97781d8625335e0f2bc2 | 548 | py | Python | data/img_crop.py | Nephiloso/MouseSegmentation | 4e9d0f7331d7f99663a0dcdd4af1e2af599f88cf | [
"MIT"
] | null | null | null | data/img_crop.py | Nephiloso/MouseSegmentation | 4e9d0f7331d7f99663a0dcdd4af1e2af599f88cf | [
"MIT"
] | null | null | null | data/img_crop.py | Nephiloso/MouseSegmentation | 4e9d0f7331d7f99663a0dcdd4af1e2af599f88cf | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import re
'''
The following is to crop the image to specific size.
originalsize:424*512
goal: 424*480
'''
path = r'./data/label/'
#load the list of all names
name_list = open(path+r'xaa','r').read().splitlines()
for i in range(len(name_list)):
img = cv2.imread(path+name_list[i])
... | 24.909091 | 63 | 0.675182 |
2566a6d90a7c51023a019a91dedaa33e47fc5658 | 9,928 | py | Python | main/LSTNet_v1/Test_v1.py | samueltof/covid19_forecast_ml | 2f83a03a29e852bd711b3193ca7c23fa5a08d485 | [
"Apache-2.0"
] | null | null | null | main/LSTNet_v1/Test_v1.py | samueltof/covid19_forecast_ml | 2f83a03a29e852bd711b3193ca7c23fa5a08d485 | [
"Apache-2.0"
] | null | null | null | main/LSTNet_v1/Test_v1.py | samueltof/covid19_forecast_ml | 2f83a03a29e852bd711b3193ca7c23fa5a08d485 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import joblib
# sys.path.append('../')
main_path = os.path.split(os.getcwd())[0] + '/covid19_forecast_ml'
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from datetime import datetime, timedelta
from tqdm import tqdm
from Dataloader_v1 import BaseCOVDa... | 47.961353 | 126 | 0.632857 |
4bc40b2f3f98e037877eb45aea872fab2ad02bbc | 220 | py | Python | tests/functional/conftest.py | Andrew-Wichmann/pytest-localstack | 83ac2a5e39eb23cad402a3fcdaefd76db903168d | [
"MIT"
] | 63 | 2018-03-14T18:47:06.000Z | 2022-02-01T20:42:27.000Z | tests/functional/conftest.py | Andrew-Wichmann/pytest-localstack | 83ac2a5e39eb23cad402a3fcdaefd76db903168d | [
"MIT"
] | 43 | 2018-03-06T22:37:32.000Z | 2022-02-25T21:42:21.000Z | tests/functional/conftest.py | Andrew-Wichmann/pytest-localstack | 83ac2a5e39eb23cad402a3fcdaefd76db903168d | [
"MIT"
] | 23 | 2018-05-29T14:03:30.000Z | 2021-12-14T20:21:40.000Z | """Configure pytest for the functional tests module."""
import docker
import pytest
@pytest.fixture(scope="module")
def docker_client():
"""Fixture to create a local Docker client."""
return docker.from_env()
| 20 | 55 | 0.722727 |
404df7e8dd64d1c036672aae74c6fe03f7f58257 | 1,488 | py | Python | DigitalAssistant/pyda.py | Fodorlevente/python | ac3be6650b8f24f6a2d4384dabd588dcde69849d | [
"MIT"
] | null | null | null | DigitalAssistant/pyda.py | Fodorlevente/python | ac3be6650b8f24f6a2d4384dabd588dcde69849d | [
"MIT"
] | null | null | null | DigitalAssistant/pyda.py | Fodorlevente/python | ac3be6650b8f24f6a2d4384dabd588dcde69849d | [
"MIT"
] | null | null | null | import wx
import wolframalpha
import wikipedia
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None,
pos=wx.DefaultPosition, size=wx.Size(450, 100),
style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION |
wx.CLOSE_BOX | wx.CLIP_CHILDREN,
t... | 33.818182 | 86 | 0.564516 |
e0c88fb96b2d66dc6f896727d63a06164a20764f | 3,311 | py | Python | pymonad/Reader.py | fnl/pymonad | 1a7610e3201b3f6e7d5f58189d39a275e4828df5 | [
"BSD-3-Clause"
] | 38 | 2015-08-03T19:48:17.000Z | 2021-01-29T07:57:18.000Z | pymonad/Reader.py | fnl/pymonad | 1a7610e3201b3f6e7d5f58189d39a275e4828df5 | [
"BSD-3-Clause"
] | 2 | 2018-06-26T17:34:31.000Z | 2018-11-07T17:37:03.000Z | pymonad/Reader.py | fnl/pymonad | 1a7610e3201b3f6e7d5f58189d39a275e4828df5 | [
"BSD-3-Clause"
] | 7 | 2015-12-04T13:12:55.000Z | 2021-01-29T07:57:19.000Z | # --------------------------------------------------------
# (c) Copyright 2014 by Jason DeLaat.
# Licensed under BSD 3-clause licence.
# --------------------------------------------------------
from pymonad.Monad import *
class Reader(Monad):
""" Represents a Functor for functions allowing authors to map functions ... | 30.1 | 99 | 0.696164 |
7c5517c58b2e84e356a4bbfcd41b5828a6e9cb07 | 2,216 | py | Python | tests/unit/provision/rebar_utils.py | cablelabs/snaps-boot | 641af0b318b3ad4cfe281165ad38aa37333da220 | [
"Apache-2.0"
] | 13 | 2017-12-24T04:27:08.000Z | 2021-11-16T13:36:10.000Z | tests/unit/provision/rebar_utils.py | cablelabs/snaps-boot | 641af0b318b3ad4cfe281165ad38aa37333da220 | [
"Apache-2.0"
] | 220 | 2017-12-14T17:25:28.000Z | 2019-10-08T15:58:48.000Z | tests/unit/provision/rebar_utils.py | cablelabs/snaps-boot | 641af0b318b3ad4cfe281165ad38aa37333da220 | [
"Apache-2.0"
] | 8 | 2017-12-18T09:13:07.000Z | 2019-09-07T16:40:33.000Z | # Copyright 2018 ARICENT HOLDINGS LUXEMBOURG SARL and Cable Television
# Laboratories, 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
#
#... | 40.290909 | 79 | 0.727888 |
ce27aba65f8c0703173474898e909ef658c4acc3 | 1,676 | py | Python | tests/resources/vocabularies/test_subjects_vocabulary.py | inveniosoftware/invenio-datacite | d25e3670b74f132390fc42e5647765ae5c605ef3 | [
"MIT"
] | null | null | null | tests/resources/vocabularies/test_subjects_vocabulary.py | inveniosoftware/invenio-datacite | d25e3670b74f132390fc42e5647765ae5c605ef3 | [
"MIT"
] | null | null | null | tests/resources/vocabularies/test_subjects_vocabulary.py | inveniosoftware/invenio-datacite | d25e3670b74f132390fc42e5647765ae5c605ef3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2021 CERN.
#
# Invenio-RDM-Records is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Subject resource tests."""
import pytest
from invenio_records_resources.proxies import current_service_reg... | 28.896552 | 97 | 0.684368 |
4cffaae2d22ba4e9f58dce23bcd01f4aa66e3753 | 1,332 | py | Python | config/urls.py | xblzbjs/Jobya | b936ce37da86bfe8326a532dab3887fae6c65e45 | [
"MIT"
] | null | null | null | config/urls.py | xblzbjs/Jobya | b936ce37da86bfe8326a532dab3887fae6c65e45 | [
"MIT"
] | 2 | 2022-02-08T01:15:52.000Z | 2022-03-31T04:24:15.000Z | config/urls.py | xblzbjs/Jobya | b936ce37da86bfe8326a532dab3887fae6c65e45 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path, re_path
from django.utils.translation import gettext_lazy as _
from filebrowser.sites import site
from rest_framework.authtoken.views import obtain_auth_token
admin.site.s... | 35.052632 | 85 | 0.737988 |
822c495df67ede749e86c5399b5250756bfdc35e | 1,525 | py | Python | cycle/game/casting/cycle.py | snsb08/cse210-08 | 7c1da6bc547cb28f03f4c58bcc8e8ca4668bd802 | [
"RSA-MD"
] | 1 | 2022-03-10T17:12:27.000Z | 2022-03-10T17:12:27.000Z | cycle/game/casting/cycle.py | snsb08/cse210-08 | 7c1da6bc547cb28f03f4c58bcc8e8ca4668bd802 | [
"RSA-MD"
] | null | null | null | cycle/game/casting/cycle.py | snsb08/cse210-08 | 7c1da6bc547cb28f03f4c58bcc8e8ca4668bd802 | [
"RSA-MD"
] | null | null | null | from game.casting.actor import Actor
import game.shared.gamecontants as gameconstants
from game.services.keyboard_service_flex import KeyboardServiceFlex
class Cycle(Actor):
"""
Constructs main player unit.
Responsible for direction, position, death status etc
"""
def __init__(self, pos, num = 0... | 23.461538 | 67 | 0.597377 |
a3dafabc8b320d1d27f3d3fdfe546ece53eae5c9 | 959 | py | Python | meeting_backend/app_user/urls.py | Coldarra/SimpleSignInManagementSystem | 66fe2bf973b1bd57f10992bd57dcf75f7256e0eb | [
"Apache-2.0"
] | null | null | null | meeting_backend/app_user/urls.py | Coldarra/SimpleSignInManagementSystem | 66fe2bf973b1bd57f10992bd57dcf75f7256e0eb | [
"Apache-2.0"
] | null | null | null | meeting_backend/app_user/urls.py | Coldarra/SimpleSignInManagementSystem | 66fe2bf973b1bd57f10992bd57dcf75f7256e0eb | [
"Apache-2.0"
] | null | null | null | from django.urls import path, include
from . import views
urlpatterns = [path("", views.test),
path("all", views.allusers),
path("token", views.decodeToken),
path("login", views.log_in),
path("logout", views.log_out),
path("register", views.re... | 39.958333 | 63 | 0.479666 |
8aa3cdfdf0af922424973df4edae9f270fe118dd | 8,734 | py | Python | cogdl/tasks/graph_classification.py | YuHuang42/cogdl | 36eafd4a2ced8a513643b99a3e63e9919c38717c | [
"MIT"
] | 1 | 2021-05-13T14:30:26.000Z | 2021-05-13T14:30:26.000Z | cogdl/tasks/graph_classification.py | YuHuang42/cogdl | 36eafd4a2ced8a513643b99a3e63e9919c38717c | [
"MIT"
] | null | null | null | cogdl/tasks/graph_classification.py | YuHuang42/cogdl | 36eafd4a2ced8a513643b99a3e63e9919c38717c | [
"MIT"
] | null | null | null | import argparse
import copy
import random
import numpy as np
import torch
import torch.nn.functional as F
from sklearn.model_selection import StratifiedKFold
from tqdm import tqdm
from cogdl.data import Data, DataLoader
from cogdl.datasets import build_dataset
from cogdl.models import build_model
from cogdl.utils imp... | 36.697479 | 136 | 0.581978 |
4cd7f3080e9559d33a7e52edff3456168ca5ecfa | 1,228 | py | Python | xgbimputer/grid_param.py | antoinepay/xgbimputer | 982e18a3b3d2e61f6e58603766f289ae36844124 | [
"MIT"
] | 3 | 2019-01-07T13:41:48.000Z | 2020-12-05T00:54:49.000Z | xgbimputer/grid_param.py | antoinepay/xgbimputer | 982e18a3b3d2e61f6e58603766f289ae36844124 | [
"MIT"
] | null | null | null | xgbimputer/grid_param.py | antoinepay/xgbimputer | 982e18a3b3d2e61f6e58603766f289ae36844124 | [
"MIT"
] | null | null | null | class GridParam:
"""
Formal parameter for GridSearch
Parameters
----------
value : scalar
Centered value for range
step_size : scalar
Step between each value
max_value : scalar
End of range
min_value : scalar, default 0
Start of range
length : int
... | 25.583333 | 75 | 0.512215 |
fae0b6353c83b1a3ef6418844199584fd85ef499 | 1,616 | py | Python | reminder/emails.py | robertatakenaka/gtgs | cc033dee9b4b6c7e1d5a2a61eac9fb8996cef367 | [
"MIT"
] | null | null | null | reminder/emails.py | robertatakenaka/gtgs | cc033dee9b4b6c7e1d5a2a61eac9fb8996cef367 | [
"MIT"
] | 7 | 2017-11-23T10:39:53.000Z | 2017-11-29T17:14:27.000Z | reminder/emails.py | robertatakenaka/gtgs | cc033dee9b4b6c7e1d5a2a61eac9fb8996cef367 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.core.mail import EmailMessage
from django.core.mail import EmailMultiAlternatives
from django.template import Context
from django.template.loader import render_to_string
from email.mime.image import MIMEImage
def normalize_email_to(email_to):
email_to = email_to.replac... | 29.381818 | 76 | 0.678837 |
675c09a6bc487eb54485e37b167fe95900406690 | 9,282 | py | Python | tools/test.py | RSB4760/apq8016_external_vixl | dc661669ef2e2fd18c4e21333d6a12112b520436 | [
"BSD-3-Clause"
] | null | null | null | tools/test.py | RSB4760/apq8016_external_vixl | dc661669ef2e2fd18c4e21333d6a12112b520436 | [
"BSD-3-Clause"
] | null | null | null | tools/test.py | RSB4760/apq8016_external_vixl | dc661669ef2e2fd18c4e21333d6a12112b520436 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright 2014, ARM Limited
# 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 li... | 37.578947 | 80 | 0.669037 |
03c783cf84ecc859c1872aa2aed5d1b6787e9520 | 6,567 | py | Python | pythainlp/tokenize/newmm.py | aumzps09/pythainlp | 26d21f9162d698ccbfa2fbacc660c0cb829f275d | [
"Apache-2.0"
] | 1 | 2021-03-25T08:14:03.000Z | 2021-03-25T08:14:03.000Z | pythainlp/tokenize/newmm.py | sr4p/pythainlp | a399e8d92d24bf1f9967ec31bd36f50905afa274 | [
"Apache-2.0"
] | null | null | null | pythainlp/tokenize/newmm.py | sr4p/pythainlp | a399e8d92d24bf1f9967ec31bd36f50905afa274 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Dictionary-based maximal matching word segmentation, constrained with
Thai Character Cluster (TCC) boundaries.
The code is based on the notebooks created by Korakot Chaovavanich,
with heuristic graph size limit added to avoid exponential wait time.
:See Also:
* \
https://colab.... | 32.671642 | 103 | 0.594031 |
9242771db6dd3b073d4128b8b0c24aa3aa946699 | 1,475 | py | Python | data_transforms/clean_data.py | Dominiquo/hospital_admissions | 88b26285b2410e21d7b325e548afc5af4b8094a3 | [
"MIT"
] | null | null | null | data_transforms/clean_data.py | Dominiquo/hospital_admissions | 88b26285b2410e21d7b325e548afc5af4b8094a3 | [
"MIT"
] | null | null | null | data_transforms/clean_data.py | Dominiquo/hospital_admissions | 88b26285b2410e21d7b325e548afc5af4b8094a3 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from utils import constants
def filter_for_years(all_df, year_col=constants.YEAR, min_year=constants.MIN_YEAR, max_year=constants.MAX_YEAR):
'''
remove any years that are not in our data range (2001 - 2006)
'''
print('Removing all rows from data with year not in range [%d,... | 34.302326 | 112 | 0.753898 |
27d109228352138c0469b6ae26f8ce56a9b99caa | 1,999 | py | Python | src/compas_rhino/artists/primitiveartist.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_rhino/artists/primitiveartist.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_rhino/artists/primitiveartist.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import compas_rhino
from compas_rhino.artists.base import BaseArtist
__all__ = ["PrimitiveArtist"]
class PrimitiveArtist(BaseArtist):
"""Base class for artists for geometry primitives.
Parameters
... | 28.557143 | 80 | 0.589795 |
cf023186beedf68502ab62799e737986acb3a3c8 | 2,742 | py | Python | tests/core/test_dc_db.py | tclh123/aio-openapi | 7c63eb628b7735501508aea6c83e458715fb070b | [
"BSD-3-Clause"
] | 19 | 2019-03-04T22:50:38.000Z | 2022-03-02T09:28:17.000Z | tests/core/test_dc_db.py | tclh123/aio-openapi | 7c63eb628b7735501508aea6c83e458715fb070b | [
"BSD-3-Clause"
] | 4 | 2019-03-04T23:03:08.000Z | 2022-01-16T11:32:54.000Z | tests/core/test_dc_db.py | tclh123/aio-openapi | 7c63eb628b7735501508aea6c83e458715fb070b | [
"BSD-3-Clause"
] | 3 | 2020-05-20T17:43:08.000Z | 2021-10-06T10:47:41.000Z | import typing
from datetime import date, datetime
from openapi.data.db import dataclass_from_table
from openapi.data.dump import dump
from openapi.data.fields import REQUIRED, VALIDATOR, UUIDValidator, field_dict
from openapi.data.validate import validate
def test_convert_task(db):
Tasks = dataclass_from_table("... | 34.275 | 78 | 0.681984 |
c49284dc2f4a3edd0ed416d3b99f04b50367252e | 3,633 | py | Python | django_unicorn/management/commands/startunicorn.py | Erteno/django-unicorn | 40a0a5f2319e92e24e70ab06637620acd5863109 | [
"MIT"
] | null | null | null | django_unicorn/management/commands/startunicorn.py | Erteno/django-unicorn | 40a0a5f2319e92e24e70ab06637620acd5863109 | [
"MIT"
] | null | null | null | django_unicorn/management/commands/startunicorn.py | Erteno/django-unicorn | 40a0a5f2319e92e24e70ab06637620acd5863109 | [
"MIT"
] | null | null | null | from pathlib import Path
from webbrowser import open
from django.core.management.base import BaseCommand, CommandError
from django_unicorn.components.unicorn_view import (
convert_to_pascal_case,
convert_to_snake_case,
)
COMPONENT_FILE = """from django_unicorn.components import UnicornView
class {pascal_c... | 32.4375 | 119 | 0.514176 |
c9166a281dd194638b7c4b72a4acdda19fced420 | 834 | py | Python | auto_ml/GRU/gru_tuner.py | AlongZG/XFinAI | 943a1fce709be1da54df8a6ba71c9b8e8505d254 | [
"Apache-2.0"
] | 1 | 2022-03-12T07:11:42.000Z | 2022-03-12T07:11:42.000Z | auto_ml/GRU/gru_tuner.py | AlongZG/XFinAI | 943a1fce709be1da54df8a6ba71c9b8e8505d254 | [
"Apache-2.0"
] | null | null | null | auto_ml/GRU/gru_tuner.py | AlongZG/XFinAI | 943a1fce709be1da54df8a6ba71c9b8e8505d254 | [
"Apache-2.0"
] | null | null | null | import sys
import nni
from sklearn.metrics import r2_score
sys.path.append('../..')
from model_layer.model_hub import GRU
from model_layer.model_tuner import RecurrentModelTuner
from utils import base_io
def main(model_class, future_index, params):
target_metric_func = r2_score
metric_name = 'R... | 30.888889 | 101 | 0.683453 |
169382680461b44a3aa9612876f8118e06b64b54 | 662 | py | Python | baedin/manage.py | braedinmgregoire/DndWebsite | 19b55117cba39b524ed2cd74b22f33587733fb58 | [
"MIT"
] | null | null | null | baedin/manage.py | braedinmgregoire/DndWebsite | 19b55117cba39b524ed2cd74b22f33587733fb58 | [
"MIT"
] | null | null | null | baedin/manage.py | braedinmgregoire/DndWebsite | 19b55117cba39b524ed2cd74b22f33587733fb58 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'baedin.settings')
try:
from django.core.management import execute_from_command_line
except Impor... | 28.782609 | 73 | 0.678248 |
6d0f12f60b2f64bb9cee039a8e3e593ad5b131cd | 827 | py | Python | mmdet/datasets/__init__.py | WangY0906/mmdetection-for-study | 36b6577e3458c0e068f4523d60ce8c6e7c19febf | [
"Apache-2.0"
] | 2 | 2020-05-19T06:05:20.000Z | 2021-02-01T09:32:49.000Z | mmdet/datasets/__init__.py | xyldmc/siamese-mask-rcnn_mmdetection | 999e5bfcbd3c493bf69b8556c40eb26c9feeb459 | [
"Apache-2.0"
] | null | null | null | mmdet/datasets/__init__.py | xyldmc/siamese-mask-rcnn_mmdetection | 999e5bfcbd3c493bf69b8556c40eb26c9feeb459 | [
"Apache-2.0"
] | null | null | null | from .custom import CustomDataset
from .xml_style import XMLDataset
from .coco import CocoDataset
from .cityscapes import CityscapesDataset
from .voc import VOCDataset
from .wider_face import WIDERFaceDataset
from .loader import GroupSampler, DistributedGroupSampler, build_dataloader
from .utils import to_tensor, rando... | 39.380952 | 78 | 0.800484 |
f6827ac31e945ce9bc73bec46a9140353b7cdbc0 | 494 | py | Python | tests/xoto3/dynamodb/write_versioned/modify_test.py | xoeye/xoto3 | ef91cde3cce81e1ded311389358271d5c8eba02b | [
"MIT"
] | 16 | 2020-05-23T15:23:38.000Z | 2022-03-18T19:28:37.000Z | tests/xoto3/dynamodb/write_versioned/modify_test.py | xoeye/xoto3 | ef91cde3cce81e1ded311389358271d5c8eba02b | [
"MIT"
] | 9 | 2020-08-19T23:08:36.000Z | 2021-10-06T17:16:35.000Z | tests/xoto3/dynamodb/write_versioned/modify_test.py | xoeye/xoto3 | ef91cde3cce81e1ded311389358271d5c8eba02b | [
"MIT"
] | 2 | 2020-12-12T08:23:53.000Z | 2021-09-03T20:25:54.000Z | import pytest
from xoto3.dynamodb.write_versioned import VersionedTransaction
from xoto3.dynamodb.write_versioned.modify import TableSchemaUnknownError, delete
def test_cant_delete_non_prefetched_item_without_specifying_key():
tx = delete(VersionedTransaction(dict()), "table1", dict(id="whatever"))
tx = de... | 32.933333 | 81 | 0.765182 |
538e123c71299800c827d311275c8c2eeb9909ad | 1,952 | py | Python | fanzhang/sphereShearFlow.py | pcmagic/stokes_flow | 464d512d3739eee77b33d1ebf2f27dae6cfa0423 | [
"MIT"
] | 1 | 2018-11-11T05:00:53.000Z | 2018-11-11T05:00:53.000Z | fanzhang/sphereShearFlow.py | pcmagic/stokes_flow | 464d512d3739eee77b33d1ebf2f27dae6cfa0423 | [
"MIT"
] | null | null | null | fanzhang/sphereShearFlow.py | pcmagic/stokes_flow | 464d512d3739eee77b33d1ebf2f27dae6cfa0423 | [
"MIT"
] | null | null | null | # coding=utf-8
# main codes, call functions at stokes_flow.py
# Zhang Ji, 20170518
import sys
import petsc4py
petsc4py.init(sys.argv)
# from scipy.io import savemat, loadmat
# from src.ref_solution import *
# import warnings
# from memory_profiler import profile
# from time import time
import pickle
import numpy as ... | 27.885714 | 85 | 0.714139 |
fab6d701cc474da78f4fdb745c27dfab723fe86c | 1,320 | py | Python | saas/backend/api/authorization/models.py | Chace-wang/bk-iam-saas | b06b3c8dae4a86546f58228db70809be4166fac4 | [
"MIT"
] | null | null | null | saas/backend/api/authorization/models.py | Chace-wang/bk-iam-saas | b06b3c8dae4a86546f58228db70809be4166fac4 | [
"MIT"
] | null | null | null | saas/backend/api/authorization/models.py | Chace-wang/bk-iam-saas | b06b3c8dae4a86546f58228db70809be4166fac4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with th... | 41.25 | 115 | 0.746212 |
2333dcc27592e24b824591e6833704bffa9633d9 | 11,430 | py | Python | job.py | robertmetcalf/plotman | ba366da99f778e6eb667af3a1858715b802f6c58 | [
"Apache-2.0"
] | 1 | 2021-05-19T04:31:38.000Z | 2021-05-19T04:31:38.000Z | job.py | robertmetcalf/plotman | ba366da99f778e6eb667af3a1858715b802f6c58 | [
"Apache-2.0"
] | null | null | null | job.py | robertmetcalf/plotman | ba366da99f778e6eb667af3a1858715b802f6c58 | [
"Apache-2.0"
] | 2 | 2021-04-14T04:18:26.000Z | 2021-05-07T01:36:54.000Z | #!/usr/bin/python3
# TODO do we use all these?
from datetime import datetime
from enum import Enum, auto
from subprocess import call
import argparse
import contextlib
import logging
import os
import re
import threading
import time
import psutil # apt-get install python-psutil
import random
import sys
def job_ph... | 36.517572 | 124 | 0.53657 |
d863e3fc23d7f1afbc7e718c8254b04f3d2452c7 | 3,622 | py | Python | test/local_test.py | Open-MBEE/python-mdk | c6e4f53c57b25bafdf579690356ad66a3fad7830 | [
"Apache-2.0"
] | 1 | 2018-08-30T06:47:13.000Z | 2018-08-30T06:47:13.000Z | test/local_test.py | Open-MBEE/python-mdk | c6e4f53c57b25bafdf579690356ad66a3fad7830 | [
"Apache-2.0"
] | null | null | null | test/local_test.py | Open-MBEE/python-mdk | c6e4f53c57b25bafdf579690356ad66a3fad7830 | [
"Apache-2.0"
] | null | null | null | import mdk
import requests
class MockRequest(object):
def __init__(self):
self.data = None
self.get = self.repeater
self.post = self.repeater
self.put = self.repeater
self.delete = self.repeater
self.status = 200
def repeater(self, url, params=None, headers=No... | 36.959184 | 120 | 0.672557 |
cb0b055f1d72f682705963f49eb6b98945d02cd3 | 1,983 | py | Python | pelion_test_lib/cloud/libraries/device_directory.py | OPpuolitaival/pelion-e2e-python-test-library | 2b906934f65f98b627c1fa6fa067230e2910a6f5 | [
"Apache-2.0"
] | null | null | null | pelion_test_lib/cloud/libraries/device_directory.py | OPpuolitaival/pelion-e2e-python-test-library | 2b906934f65f98b627c1fa6fa067230e2910a6f5 | [
"Apache-2.0"
] | null | null | null | pelion_test_lib/cloud/libraries/device_directory.py | OPpuolitaival/pelion-e2e-python-test-library | 2b906934f65f98b627c1fa6fa067230e2910a6f5 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2017 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distr... | 37.415094 | 102 | 0.690368 |
c015b59e8d585123c6535d052a623370b5a368c9 | 14,345 | py | Python | ops.py | fcakyon/segan | 4e1d222d8c57a78756f9de20bb1d5bd6484ed8b5 | [
"MIT"
] | 4 | 2021-05-31T07:42:13.000Z | 2022-01-29T06:34:34.000Z | ops.py | fcakyon/segan | 4e1d222d8c57a78756f9de20bb1d5bd6484ed8b5 | [
"MIT"
] | null | null | null | ops.py | fcakyon/segan | 4e1d222d8c57a78756f9de20bb1d5bd6484ed8b5 | [
"MIT"
] | 2 | 2021-01-17T13:03:41.000Z | 2021-01-22T14:34:16.000Z | from __future__ import print_function
import tensorflow as tf
from tensorflow.contrib.layers import batch_norm, fully_connected, flatten
from tensorflow.contrib.layers import xavier_initializer
from contextlib import contextmanager
import numpy as np
def gaussian_noise_layer(input_layer, std):
noise = tf.random_n... | 40.868946 | 87 | 0.596096 |
e96d1d2d0af03a8bf213b99d10bfb0509a686ba1 | 732 | py | Python | tutorials/prompt/password_toggle.py | chouette254/quo | 8979afd118e77d3d0f93f9fbe8711efada7158c5 | [
"MIT"
] | 5 | 2021-06-17T21:06:39.000Z | 2022-03-11T06:45:51.000Z | tutorials/prompt/password_toggle.py | chouette254/quo | 8979afd118e77d3d0f93f9fbe8711efada7158c5 | [
"MIT"
] | 39 | 2021-07-19T19:36:18.000Z | 2022-02-23T14:55:08.000Z | tutorials/prompt/password_toggle.py | secretuminc/quo | c4f77d52f015c612d32ed0fc2fc79545af598f10 | [
"MIT"
] | 1 | 2021-05-31T17:19:15.000Z | 2021-05-31T17:19:15.000Z | #!/usr/bin/env python
"""
get_password function that displays asterisks instead of the actual characters.
With the addition of a ControlT shortcut to hide/show the input.
"""
from quo import Elicit, echo
from quo.filters import Condition
from quo.keys import KeyBinder
def main():
hidden = [True] # Nonlocal
k... | 23.612903 | 80 | 0.670765 |
bdb9886233220bb4379a0300645eb387ffb532fc | 2,659 | py | Python | protencoder/GOencoder.py | anegm98/protEncoder | d6a50a035420e96c423d37b985d35cae5da9f4a3 | [
"MIT"
] | null | null | null | protencoder/GOencoder.py | anegm98/protEncoder | d6a50a035420e96c423d37b985d35cae5da9f4a3 | [
"MIT"
] | null | null | null | protencoder/GOencoder.py | anegm98/protEncoder | d6a50a035420e96c423d37b985d35cae5da9f4a3 | [
"MIT"
] | null | null | null | from protencoder.protencoder import encoder
import glob
import numpy as np
class GOencoder(encoder):
def __init__(self):
self.handler = encoder()
self.GOclasses = {'F': set(), 'P': set(), 'C': set()}
def encode(self):
if self.handler.GOfilter['F'] != []:
self.GOclasses = se... | 40.287879 | 85 | 0.565626 |
548515f93401d6315a9344797e92162b1dca4b13 | 6,052 | py | Python | finalists/ICT_VIPL/multi-task-nc/utils/common.py | lrzpellegrini/cvpr_clvision_challenge | cc783a9a4f80ab72062ef40368e4eed6b10c7bc9 | [
"CC-BY-4.0"
] | 53 | 2020-02-13T09:29:07.000Z | 2020-12-07T12:02:03.000Z | finalists/ICT_VIPL/multi-task-nc/utils/common.py | lrzpellegrini/cvpr_clvision_challenge | cc783a9a4f80ab72062ef40368e4eed6b10c7bc9 | [
"CC-BY-4.0"
] | 1 | 2021-04-06T17:15:44.000Z | 2021-04-06T17:15:44.000Z | finalists/ICT_VIPL/multi-task-nc/utils/common.py | lrzpellegrini/cvpr_clvision_challenge | cc783a9a4f80ab72062ef40368e4eed6b10c7bc9 | [
"CC-BY-4.0"
] | 24 | 2020-02-14T16:35:44.000Z | 2021-04-06T14:40:17.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
# Copyright (c) 2019. Vincenzo Lomonaco, Massimo Caccia, Pau Rodriguez, #
# Lorenzo Pellegrini. All rights reserved. #
# Copyrights licensed under th... | 32.191489 | 80 | 0.566259 |
4e678ad118830079df18d9e112e3dab051efd2f4 | 1,040 | py | Python | survey/services/login_service.py | jaydeep11/toddlesurveyapp | a95db5759b0ab30653bd077afdadc4c438610976 | [
"MIT"
] | null | null | null | survey/services/login_service.py | jaydeep11/toddlesurveyapp | a95db5759b0ab30653bd077afdadc4c438610976 | [
"MIT"
] | null | null | null | survey/services/login_service.py | jaydeep11/toddlesurveyapp | a95db5759b0ab30653bd077afdadc4c438610976 | [
"MIT"
] | null | null | null | """User Session Service."""
from ..models import Token
from django.utils.crypto import get_random_string
import jwt
class UserSessionService(object):
"""User Session Service."""
def __init__(self, session_input):
#process session input for validating whether username and password are valid or not
... | 28.888889 | 92 | 0.652885 |
fb8d8cf5b4dc0632412d5fa0c05cb58f80cf04af | 2,423 | py | Python | clipper_admin/frontend_local_test.py | SimonZsx/clipper | 457088be2ebe68c68b94d90389d1308e35b4c844 | [
"Apache-2.0"
] | 2 | 2019-04-24T13:46:28.000Z | 2019-05-28T06:59:26.000Z | clipper_admin/frontend_local_test.py | SimonZsx/clipper | 457088be2ebe68c68b94d90389d1308e35b4c844 | [
"Apache-2.0"
] | null | null | null | clipper_admin/frontend_local_test.py | SimonZsx/clipper | 457088be2ebe68c68b94d90389d1308e35b4c844 | [
"Apache-2.0"
] | 4 | 2019-04-03T11:03:57.000Z | 2019-06-26T08:22:38.000Z | import base64
import os
import time
from concurrent import futures
import threading
from google.protobuf.timestamp_pb2 import Timestamp
import grpc
#from clipper_admin.grpcclient import grpc_client
from clipper_admin.rpc import (management_pb2, management_pb2_grpc, model_pb2,
model_pb2... | 30.670886 | 202 | 0.661989 |
70ab72907818ff101809f2b9bf92cb2b193290be | 1,124 | py | Python | model_zoo/official/cv/unet3d/src/config.py | kungfu-team/mindspore-bert | 71501cf52ae01db9d6a73fb64bcfe68a6509dc32 | [
"Apache-2.0"
] | 2 | 2021-07-08T13:10:42.000Z | 2021-11-08T02:48:57.000Z | model_zoo/official/cv/unet3d/src/config.py | peixinhou/mindspore | fcb2ec2779b753e95c762cf292b23bd81d1f561b | [
"Apache-2.0"
] | null | null | null | model_zoo/official/cv/unet3d/src/config.py | peixinhou/mindspore | fcb2ec2779b753e95c762cf292b23bd81d1f561b | [
"Apache-2.0"
] | null | null | null | # Copyright 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
#
# less required by applicable law or agr... | 32.114286 | 79 | 0.6121 |
066d5aa56c4d89964045d7dfc6346f41d3cac703 | 822 | py | Python | setup.py | apmoore1/tdsa_augmentation | 71c9ffa79ea48e817408d0dc496cc146ce75a942 | [
"Apache-2.0"
] | null | null | null | setup.py | apmoore1/tdsa_augmentation | 71c9ffa79ea48e817408d0dc496cc146ce75a942 | [
"Apache-2.0"
] | null | null | null | setup.py | apmoore1/tdsa_augmentation | 71c9ffa79ea48e817408d0dc496cc146ce75a942 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name='tdsa_augmentation',
version='0.0.1',
description='TDSA Augmentation',
long_description=long_description,
long_description_content_type="text/markdown",
url='https... | 31.615385 | 103 | 0.647202 |
c0a6c2dc4c2aa1b8d7fd4b50636d6c9af54803b3 | 7,752 | py | Python | neural_testbed/leaderboard/sweep.py | SamuelGabriel/neural_testbed | cc2e3de49c29f29852c8cd5885ab54fb6e664e2e | [
"Apache-2.0"
] | null | null | null | neural_testbed/leaderboard/sweep.py | SamuelGabriel/neural_testbed | cc2e3de49c29f29852c8cd5885ab54fb6e664e2e | [
"Apache-2.0"
] | null | null | null | neural_testbed/leaderboard/sweep.py | SamuelGabriel/neural_testbed | cc2e3de49c29f29852c8cd5885ab54fb6e664e2e | [
"Apache-2.0"
] | null | null | null | # python3
# pylint: disable=g-bad-file-header
# Copyright 2021 DeepMind Technologies Limited. 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... | 37.269231 | 89 | 0.681115 |
d0ed78ebf17516017a63729aac6e9e87bd807035 | 3,159 | py | Python | .~c9_invoke_9RESll.py | uvuvwewe/celp | 1da84d005fd0f0705704c6e555b821ce0cfa8ae1 | [
"MIT"
] | null | null | null | .~c9_invoke_9RESll.py | uvuvwewe/celp | 1da84d005fd0f0705704c6e555b821ce0cfa8ae1 | [
"MIT"
] | null | null | null | .~c9_invoke_9RESll.py | uvuvwewe/celp | 1da84d005fd0f0705704c6e555b821ce0cfa8ae1 | [
"MIT"
] | null | null | null | from data import CITIES, BUSINESSES, USERS, REVIEWS, TIPS, CHECKINS
import random
import json
import pandas as pd
import numpy as np
from pathlib import Path
# HELPERS
def create_similarity_matrix_categories(matrix):
"""Create a """
npu = matrix.values
m1 = npu @ npu.T
diag = np.diag(m1)
m2 = m1... | 26.771186 | 127 | 0.634695 |
1c8290d559f4ef30bf5effab2cfbf6fec769da4d | 4,482 | py | Python | test.py | covid19-specialist/ssd.pytorch | acafba6e42896f1814d3d7f6807d0ce478715fbb | [
"MIT"
] | null | null | null | test.py | covid19-specialist/ssd.pytorch | acafba6e42896f1814d3d7f6807d0ce478715fbb | [
"MIT"
] | null | null | null | test.py | covid19-specialist/ssd.pytorch | acafba6e42896f1814d3d7f6807d0ce478715fbb | [
"MIT"
] | null | null | null | from __future__ import print_function
import sys
import os
import argparse
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torchvision.transforms as transforms
# from torch.autograd import Variable
from data import WHEAT_ROOT, WHEAT_CLASSES
from PIL import Image
from data import WHEATAnno... | 37.041322 | 114 | 0.602633 |
ac816e0588fddcc9aff79d221dea7dd51f93bf70 | 5,064 | py | Python | snowplow_tracker/test/unit/test_payload.py | DeyanDeyanov/snowplow-python-tracker | 8fc7f1e5ed9c0e1b1faf8b477be8412b4e2630c2 | [
"Apache-2.0"
] | null | null | null | snowplow_tracker/test/unit/test_payload.py | DeyanDeyanov/snowplow-python-tracker | 8fc7f1e5ed9c0e1b1faf8b477be8412b4e2630c2 | [
"Apache-2.0"
] | 2 | 2021-11-16T09:26:31.000Z | 2021-11-16T12:58:56.000Z | snowplow_tracker/test/unit/test_payload.py | DeyanDeyanov/snowplow-python-tracker | 8fc7f1e5ed9c0e1b1faf8b477be8412b4e2630c2 | [
"Apache-2.0"
] | null | null | null | """
test_payload.py
Copyright (c) 2013-2021 Snowplow Analytics Ltd. All rights reserved.
This program is licensed to you under the Apache License Version 2.0,
and you may not use this file except in compliance with the Apache License
Version 2.0. You may obtain a copy of the Apache License Version... | 33.315789 | 89 | 0.627567 |
fac1201ee2821ad1764d3855bef5ba2edb60dbcb | 4,166 | py | Python | encoder4editing/models/psp.py | AsianZeus/Diverse-Facial-Edit | 3d4b1b41546a08a1fa3cb164ade33e319806b12b | [
"Apache-2.0"
] | null | null | null | encoder4editing/models/psp.py | AsianZeus/Diverse-Facial-Edit | 3d4b1b41546a08a1fa3cb164ade33e319806b12b | [
"Apache-2.0"
] | null | null | null | encoder4editing/models/psp.py | AsianZeus/Diverse-Facial-Edit | 3d4b1b41546a08a1fa3cb164ade33e319806b12b | [
"Apache-2.0"
] | null | null | null | import matplotlib
matplotlib.use('Agg')
import torch
from torch import nn
from encoder4editing.models.encoders import psp_encoders
from encoder4editing.models.stylegan2.model import Generator
from encoder4editing.configs.paths_config import model_paths
def get_keys(d, name):
if 'state_dict' in d:
d = d['... | 41.247525 | 109 | 0.597216 |
a8568e93ee135054f018ed8d801c7771e9bfa127 | 2,936 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/_storage_management_client.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/_storage_management_client.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2017_06_01/_storage_management_client.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 43.820896 | 98 | 0.718665 |
8c13033906b2dc5a6dddd93927f83d40984feb99 | 299 | py | Python | hpt/inventory/utils.py | hollowpoint/hollowpoint | 6f9d6c6f7147a3cec20d6e772567a29cebe2a365 | [
"Apache-2.0"
] | 1 | 2016-03-31T19:52:03.000Z | 2016-03-31T19:52:03.000Z | hpt/inventory/utils.py | hollowpoint/hollowpoint | 6f9d6c6f7147a3cec20d6e772567a29cebe2a365 | [
"Apache-2.0"
] | null | null | null | hpt/inventory/utils.py | hollowpoint/hollowpoint | 6f9d6c6f7147a3cec20d6e772567a29cebe2a365 | [
"Apache-2.0"
] | null | null | null | import json
def _prototype_netdevices(netdevices_file):
"""
Load NetDevices data from prototype file to use it as columns.gq$
:param netdevices_file:
A NetDevices.json file
"""
with open(netdevices_file, 'r') as f:
data = json.load(f)
return data[0].keys()
| 23 | 69 | 0.655518 |
7f02d1a1f4980c63bbcf9233e1d57f948499a329 | 5,860 | py | Python | constants.py | tamentis/pyjdwp | 47b2061926953a670abb87b50537eb7d990f7f8e | [
"ISC"
] | 2 | 2019-03-16T02:37:54.000Z | 2020-04-06T09:10:50.000Z | constants.py | sqlcyi2008/pyjdwp | 47b2061926953a670abb87b50537eb7d990f7f8e | [
"ISC"
] | null | null | null | constants.py | sqlcyi2008/pyjdwp | 47b2061926953a670abb87b50537eb7d990f7f8e | [
"ISC"
] | 2 | 2018-05-20T14:47:39.000Z | 2020-01-15T14:27:22.000Z | """PyJDWP Constants."""
cmd_map = {
"VM::Version": (1, 1),
"VM::ClassesBySignature": (1, 2),
"VM::AllClasses": (1, 3),
"VM::AllThreads": (1, 4),
"VM::TopLevelThreadGroups": (1, 5),
"VM::Dispose": (1, 6),
"VM::IDSizes": (1, ... | 39.594595 | 176 | 0.675939 |
d4d4beb1c679cd90047c9697e7eb832d347c9f9a | 2,015 | py | Python | data_helpers.py | lasobrinho/Sentiment-Analysis-CNN-PTBR | 66893abbed3c8e12cdf0112c3021f0add33af133 | [
"MIT"
] | 13 | 2018-09-06T16:00:56.000Z | 2022-02-22T03:25:25.000Z | data_helpers.py | lasobrinho/Sentiment-Analysis-CNN-PTBR | 66893abbed3c8e12cdf0112c3021f0add33af133 | [
"MIT"
] | null | null | null | data_helpers.py | lasobrinho/Sentiment-Analysis-CNN-PTBR | 66893abbed3c8e12cdf0112c3021f0add33af133 | [
"MIT"
] | 3 | 2018-08-22T05:53:14.000Z | 2021-04-30T15:54:05.000Z | import numpy as np
import re
import itertools
from collections import Counter
def clean_str(string):
"""
Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py
"""
string = re.sub(r"[^A-Za-z()ãõáéíóúàçüâêîôû,\-\'\`]", " ", string)
string = re.sub(r",", " , ", strin... | 36.636364 | 91 | 0.648635 |
cde26f8ffb9c6664ee903c78fe616cdcce9ea0c5 | 1,295 | py | Python | env/lib/python3.8/site-packages/allauth/account/urls.py | avdhari/enigma | b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c | [
"MIT"
] | 12 | 2019-08-02T07:58:16.000Z | 2022-01-31T23:45:08.000Z | env/lib/python3.8/site-packages/allauth/account/urls.py | avdhari/enigma | b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c | [
"MIT"
] | 23 | 2019-01-19T08:54:48.000Z | 2022-03-11T23:39:37.000Z | env/lib/python3.8/site-packages/allauth/account/urls.py | avdhari/enigma | b7e965a91ca5f0e929c4c719d695f15ccb8b5a2c | [
"MIT"
] | 11 | 2019-07-31T16:23:36.000Z | 2022-01-29T08:30:07.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(r"^signup/$", views.signup, name="account_signup"),
url(r"^login/$", views.login, name="account_login"),
url(r"^logout/$", views.logout, name="account_logout"),
url(r"^password/change/$", views.password_change,
name="ac... | 37 | 77 | 0.674131 |
ec1babca7f4113b8d5fd45d5253c6f3c8d8d5cee | 432 | py | Python | projetos em python/exercicio22.py | gustavo621/projetos-em-python | 4797ae7226a2c4a628dd0cd746e7bc3050b72f04 | [
"MIT"
] | null | null | null | projetos em python/exercicio22.py | gustavo621/projetos-em-python | 4797ae7226a2c4a628dd0cd746e7bc3050b72f04 | [
"MIT"
] | null | null | null | projetos em python/exercicio22.py | gustavo621/projetos-em-python | 4797ae7226a2c4a628dd0cd746e7bc3050b72f04 | [
"MIT"
] | null | null | null | nome = input("digite seu nome aqui: ")
print("analizando seu nome...")
print("seu nome em maiúsculas é {}".format(nome.upper()))
print("seu nome em minúsculas é {}".format(nome.lower()))
print("seu nome tem ao todo {} letras".format(len(nome)- nome.count(" ")))
#print("seu primeiro nome é {} e ele tem {} letras".format... | 48 | 85 | 0.668981 |
4e9f22b20fab8c4deaf43870299b8e580be21259 | 5,592 | py | Python | config.py | saurabh1043/tweeSenAn | e605699f5dd9a979b7f4cfe1912aeaac4f1574e7 | [
"MIT"
] | null | null | null | config.py | saurabh1043/tweeSenAn | e605699f5dd9a979b7f4cfe1912aeaac4f1574e7 | [
"MIT"
] | null | null | null | config.py | saurabh1043/tweeSenAn | e605699f5dd9a979b7f4cfe1912aeaac4f1574e7 | [
"MIT"
] | null | null | null |
stop_words = ['i', 'me', 'my', 'myself', 'we', 'our', 'ours', 'ourselves',
'you', 'your', 'yours', 'yourself', 'yourselves', 'he', 'him',
'his', 'himself', 'she', 'her', 'hers', 'herself', 'it', 'its',
'itself', 'they', 'them', 'their', 'theirs', 'themselves',
'w... | 79.885714 | 96 | 0.453684 |
ad4dd7f0078f342298232a3f0b82e8433fce871f | 1,770 | py | Python | tests/util/test_stringutils.py | lukaslihotzki/synapse | 1dfdc87b9bb07cc3c958dde7f41f2af4322477e5 | [
"Apache-2.0"
] | 9,945 | 2015-01-02T07:41:06.000Z | 2022-03-31T23:22:42.000Z | tests/util/test_stringutils.py | lukaslihotzki/synapse | 1dfdc87b9bb07cc3c958dde7f41f2af4322477e5 | [
"Apache-2.0"
] | 9,320 | 2015-01-08T14:09:03.000Z | 2022-03-31T21:11:24.000Z | tests/util/test_stringutils.py | lukaslihotzki/synapse | 1dfdc87b9bb07cc3c958dde7f41f2af4322477e5 | [
"Apache-2.0"
] | 2,299 | 2015-01-31T22:16:29.000Z | 2022-03-31T06:08:26.000Z | # Copyright 2020 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 32.777778 | 78 | 0.631638 |
20e5fb6a282d47f10372144498f036ece5d19969 | 9,918 | py | Python | vunit/test/report.py | jondhoor/vunit | 3fc1a134ba61c8d8f673c93b47eaf8886814e09e | [
"Artistic-2.0",
"Apache-2.0"
] | null | null | null | vunit/test/report.py | jondhoor/vunit | 3fc1a134ba61c8d8f673c93b47eaf8886814e09e | [
"Artistic-2.0",
"Apache-2.0"
] | null | null | null | vunit/test/report.py | jondhoor/vunit | 3fc1a134ba61c8d8f673c93b47eaf8886814e09e | [
"Artistic-2.0",
"Apache-2.0"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2014-2021, Lars Asplund lars.anders.asplund@gmail.com
"""
Provide test reporting functionality
"""
f... | 30.611111 | 101 | 0.581771 |
f4f60b671c0d6649e04529cefde255f87d2b9b50 | 981 | py | Python | ISTp/2013/IVANOV_S_E/task_7_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2013/IVANOV_S_E/task_7_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2013/IVANOV_S_E/task_7_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 7. Вариант 6.
# Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток.
# Ivanov S. E.
# 21.09.2016
import random
CITY_LIST = ("Москва", "Санкт-Петербург", "Нижний Новгород",
"Новосибирск", "Самара"... | 33.827586 | 152 | 0.698267 |
d4d405c48fa8b1bc052ca541789e8cad2d85a696 | 540 | py | Python | helium/__about__.py | helium/helium-python | db73480b143da4fc48e95c4414bd69c576a3a390 | [
"BSD-3-Clause"
] | 19 | 2016-08-08T21:31:49.000Z | 2022-02-18T22:17:47.000Z | helium/__about__.py | helium/helium-python | db73480b143da4fc48e95c4414bd69c576a3a390 | [
"BSD-3-Clause"
] | 22 | 2016-08-13T22:33:30.000Z | 2017-02-27T15:13:27.000Z | helium/__about__.py | helium/helium-python | db73480b143da4fc48e95c4414bd69c576a3a390 | [
"BSD-3-Clause"
] | 4 | 2017-01-17T20:18:19.000Z | 2021-04-03T10:42:25.000Z | """The module that holds metadata about this library."""
from __future__ import unicode_literals
from ._version import __version__, __revision__
__package_name__ = 'helium-python'
__title__ = 'helium'
__author__ = 'Helium'
__author_email__ = 'hello@helium.com'
__license__ = 'BSD'
__copyright__ = 'Copyright 2016 Heliu... | 28.421053 | 70 | 0.746296 |
cacf3384e5f379adecb4a87ac1aae057dc5d20bd | 1,353 | py | Python | stage/configuration/test_expression_evaluator_processor.py | streamsets/datacollector-tests | 6c3e908768e1d4a586e9183e2141096921ecd5be | [
"Apache-2.0"
] | 14 | 2019-03-04T10:12:39.000Z | 2021-11-24T16:17:09.000Z | stage/configuration/test_expression_evaluator_processor.py | Pragatibs/datacollector-tests | aac53b2f0e056009ef0e437c8430651e3cf4d502 | [
"Apache-2.0"
] | 48 | 2019-03-08T14:59:06.000Z | 2021-08-13T14:49:56.000Z | stage/configuration/test_expression_evaluator_processor.py | Pragatibs/datacollector-tests | aac53b2f0e056009ef0e437c8430651e3cf4d502 | [
"Apache-2.0"
] | 23 | 2018-09-24T20:49:17.000Z | 2021-11-24T16:17:11.000Z | # Copyright 2021 StreamSets Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 26.529412 | 83 | 0.72136 |
7a8408cae501815031ed375817dc6d302839ba2d | 3,149 | py | Python | praw API/base/settings.py | codePerfectPlus/Portfolio-Project | 6385ca0582aa19261c883e53005854ebeb057143 | [
"MIT"
] | 45 | 2020-05-24T14:45:48.000Z | 2020-09-08T20:35:30.000Z | praw API/base/settings.py | codePerfectPlus/machine-learning-web-applications | 6385ca0582aa19261c883e53005854ebeb057143 | [
"MIT"
] | 9 | 2021-03-30T13:52:00.000Z | 2021-09-22T19:22:46.000Z | praw API/base/settings.py | codePerfectPlus/Portfolio-Project | 6385ca0582aa19261c883e53005854ebeb057143 | [
"MIT"
] | 12 | 2020-05-24T13:21:23.000Z | 2020-08-08T20:11:51.000Z | """
Django settings for base project.
Generated by 'django-admin startproject' using Django 3.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# Bu... | 25.811475 | 91 | 0.696094 |
21e98cac52dce3fd7e32a2fa27a3a47ace0a4157 | 2,828 | py | Python | release_scripts/localization_scripts/csvutil.py | ljmf00/autopsy | 34a980b7fc7ea47287e7101f5bba6cb1b518bc7b | [
"Apache-2.0"
] | 1,473 | 2015-01-02T06:13:10.000Z | 2022-03-30T09:45:34.000Z | release_scripts/localization_scripts/csvutil.py | ljmf00/autopsy | 34a980b7fc7ea47287e7101f5bba6cb1b518bc7b | [
"Apache-2.0"
] | 1,068 | 2015-02-04T14:33:38.000Z | 2022-03-31T03:49:28.000Z | release_scripts/localization_scripts/csvutil.py | ljmf00/autopsy | 34a980b7fc7ea47287e7101f5bba6cb1b518bc7b | [
"Apache-2.0"
] | 510 | 2015-01-09T19:46:08.000Z | 2022-03-23T13:25:34.000Z | """Provides tools for parsing and writing to a csv file.
"""
from typing import List, Iterable, Tuple
import csv
import os
from fileutil import get_filename_addition
from outputresult import OutputResult
def records_to_csv(output_path: str, rows: Iterable[List[str]]):
"""Writes rows to a csv file at the specifie... | 33.666667 | 120 | 0.655941 |
5a31aa143141458bd2ec8d575de075862f32da70 | 1,052 | py | Python | utils/geometric.py | samconsidine/thesis_scratch | a1a89188522293c4029073ce3c77b26ccc201c91 | [
"MIT"
] | 2 | 2022-03-29T09:52:41.000Z | 2022-03-29T10:02:49.000Z | utils/geometric.py | samconsidine/thesis_scratch | a1a89188522293c4029073ce3c77b26ccc201c91 | [
"MIT"
] | null | null | null | utils/geometric.py | samconsidine/thesis_scratch | a1a89188522293c4029073ce3c77b26ccc201c91 | [
"MIT"
] | null | null | null |
import torch
from torch import Tensor
def lineseg_dists(p: Tensor, a: Tensor, b: Tensor) -> Tensor:
"""Cartesian distance from point to line segment in torch.
Limited to 2 dimensions.
Adapted from:
https://stackoverflow.com/a/54442561/11208892
Args:
- p: np.array of single point, shape (... | 29.222222 | 75 | 0.590304 |
5043fb83bd8bca1fe0894ca98867bbef877fad3a | 9,961 | py | Python | 30_BlazeFace/01_float32/01_blazeface_tflite_to_pb.py | khanfarhan10/PINTO_model_zoo | 4cad2e506d8c0fb604aa7b5f84115a840ab59ba1 | [
"MIT"
] | null | null | null | 30_BlazeFace/01_float32/01_blazeface_tflite_to_pb.py | khanfarhan10/PINTO_model_zoo | 4cad2e506d8c0fb604aa7b5f84115a840ab59ba1 | [
"MIT"
] | null | null | null | 30_BlazeFace/01_float32/01_blazeface_tflite_to_pb.py | khanfarhan10/PINTO_model_zoo | 4cad2e506d8c0fb604aa7b5f84115a840ab59ba1 | [
"MIT"
] | null | null | null | ### tensorflow-gpu==1.15.2
#!/usr/bin/env python
# coding: utf-8
import os
import numpy as np
import json
import tensorflow as tf
import shutil
from pathlib import Path
home = str(Path.home())
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
schema = "schema.fbs"
binary = home + "/work/tensorflow/bazel-out/host/bin/external... | 42.207627 | 125 | 0.61279 |
7afb0b3499c6f77db110e6ed71b0847bd02a9d94 | 238 | py | Python | count inversion.py | MUDIT-SINGH001/ARRAYS | 277817cb43ee6682b625a9a2f4535839f5e64f67 | [
"Apache-2.0"
] | 1 | 2021-05-02T06:36:03.000Z | 2021-05-02T06:36:03.000Z | count inversion.py | MUDIT-SINGH001/ARRAYS | 277817cb43ee6682b625a9a2f4535839f5e64f67 | [
"Apache-2.0"
] | null | null | null | count inversion.py | MUDIT-SINGH001/ARRAYS | 277817cb43ee6682b625a9a2f4535839f5e64f67 | [
"Apache-2.0"
] | null | null | null | l=list(map(int,input().split()))
c=0
for i in range(0,6):
j=i+1
while(j!=7):
if(l[i]>l[j]):
c=c+1
j=j+1
else:
j=j+1
print(c)
| 18.307692 | 33 | 0.298319 |
c040272dd0f8ee50418717d1137dc2f89bd85bcb | 16,197 | py | Python | mmdet/datasets/pipelines/loading.py | diego-s/mmdetection | e1b562993e200b6f8f079f9ef469a74f26cf3359 | [
"Apache-2.0"
] | null | null | null | mmdet/datasets/pipelines/loading.py | diego-s/mmdetection | e1b562993e200b6f8f079f9ef469a74f26cf3359 | [
"Apache-2.0"
] | null | null | null | mmdet/datasets/pipelines/loading.py | diego-s/mmdetection | e1b562993e200b6f8f079f9ef469a74f26cf3359 | [
"Apache-2.0"
] | null | null | null | import os.path as osp
import mmcv
import numpy as np
import pycocotools.mask as maskUtils
from mmdet.core import BitmapMasks, PolygonMasks
from ..builder import PIPELINES
@PIPELINES.register_module()
class LoadImageFromFile:
"""Load an image from file.
Required keys are "img_prefix" and "img_info" (a dict ... | 34.608974 | 79 | 0.595666 |
cf49ec0cbf9cfc22f7cc1f75f9490d2317dc3078 | 769 | py | Python | LinkedList/LinkedListNodes.py | ShaswatPrabhat/LinkedList | 902f282e82ddb4c97ffa780ce28bbec1939b2815 | [
"Apache-2.0"
] | null | null | null | LinkedList/LinkedListNodes.py | ShaswatPrabhat/LinkedList | 902f282e82ddb4c97ffa780ce28bbec1939b2815 | [
"Apache-2.0"
] | null | null | null | LinkedList/LinkedListNodes.py | ShaswatPrabhat/LinkedList | 902f282e82ddb4c97ffa780ce28bbec1939b2815 | [
"Apache-2.0"
] | null | null | null | class SinglyLinkedNode:
def __init__(self, val):
self.val = val
self.next: SinglyLinkedNode or None = None
def setNext(self, node: 'SinglyLinkedNode'):
self.next = node
def getNext(self) -> 'SinglyLinkedNode' or None:
return self.next
class DoublyLinkedNode:
def __ini... | 25.633333 | 52 | 0.63459 |
9d528c153013dcd129977c2d4f8fe3bb17071152 | 133,111 | py | Python | pysnmp-with-texts/CISCO-MGX82XX-SONET-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CISCO-MGX82XX-SONET-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CISCO-MGX82XX-SONET-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-MGX82XX-SONET-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-MGX82XX-SONET-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:07:31 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 ... | 162.727384 | 13,599 | 0.796846 |
54561b88da21ed9ada147bb047fb11aed501671d | 1,666 | py | Python | src/data/loadDataToDB.py | Metystes/air-vue | 17e37814a882abede2a61662b198f1b0f184d480 | [
"RSA-MD"
] | null | null | null | src/data/loadDataToDB.py | Metystes/air-vue | 17e37814a882abede2a61662b198f1b0f184d480 | [
"RSA-MD"
] | 4 | 2019-12-23T07:37:14.000Z | 2020-01-03T23:20:15.000Z | src/data/loadDataToDB.py | Metystes/air-vue | 17e37814a882abede2a61662b198f1b0f184d480 | [
"RSA-MD"
] | null | null | null | # Global moduls
import pandas as pd
from os import path, remove
# from sqlalchemy.types import INTEGER, DateTime, Float
# Interior imports
from .createDB import Database, db_backend, db_name, AIRLY_DATA, AIRLY_LOCATIONS
dbms = Database(db_backend, db_name)
class airly():
def __init__(self):
self._data_p... | 32.666667 | 91 | 0.661465 |
fad9eda4a92b170273867f818be6c8ed68e73f74 | 1,734 | py | Python | empty_trash/prometheus.py | joernahlers/nb_empty_trash | d1b739e289505c9ab932cf0a06b2c3bbebba680d | [
"BSD-2-Clause"
] | null | null | null | empty_trash/prometheus.py | joernahlers/nb_empty_trash | d1b739e289505c9ab932cf0a06b2c3bbebba680d | [
"BSD-2-Clause"
] | 2 | 2020-07-31T05:33:45.000Z | 2021-06-22T10:26:57.000Z | empty_trash/prometheus.py | joernahlers/nb_empty_trash | d1b739e289505c9ab932cf0a06b2c3bbebba680d | [
"BSD-2-Clause"
] | 2 | 2020-10-28T13:29:02.000Z | 2021-09-15T13:13:31.000Z | from typing import Optional
from notebook.notebookapp import NotebookApp
from prometheus_client import Gauge
from empty_trash.metrics import TrashMetricsLoader
try:
# Traitlets >= 4.3.3
from traitlets import Callable
except ImportError:
from .utils import Callable
class PrometheusHandler(Callable):
... | 34 | 80 | 0.652249 |
d34467770991be4298f4be1d6d06737c389ffcb7 | 794 | py | Python | scargo/paths.py | ProteinQure/scargo | 62c0bad9938399192ed8f2900e34da8d2906f0f4 | [
"MIT"
] | 2 | 2021-06-27T04:30:02.000Z | 2021-06-27T13:56:51.000Z | scargo/paths.py | ProteinQure/scargo | 62c0bad9938399192ed8f2900e34da8d2906f0f4 | [
"MIT"
] | null | null | null | scargo/paths.py | ProteinQure/scargo | 62c0bad9938399192ed8f2900e34da8d2906f0f4 | [
"MIT"
] | null | null | null | """
Definitions of paths that are often used to e.g. import data.
"""
import os
from pathlib import Path
PKG_ROOT_DIR = Path(__file__).resolve().parents[1]
EXAMPLES_DIR = PKG_ROOT_DIR / "examples"
EXAMPLES_DATA = EXAMPLES_DIR / "data" / "testing" / "scargo-examples"
def env_local_mountpoint() -> Path:
"""
G... | 29.407407 | 88 | 0.730479 |
1d7c65877fc5ec229b1da6475d9e244989abf034 | 735 | py | Python | register/migrations/0010_auto_20180403_2210.py | DN3196237/project-management-system | c935a477b2bee02f1c1cf962c588ef1beb55b60a | [
"MIT"
] | 55 | 2019-12-13T09:30:23.000Z | 2021-07-19T10:34:15.000Z | register/migrations/0010_auto_20180403_2210.py | DN3196237/project-management-system | c935a477b2bee02f1c1cf962c588ef1beb55b60a | [
"MIT"
] | 7 | 2020-02-11T21:59:48.000Z | 2021-07-12T17:49:14.000Z | register/migrations/0010_auto_20180403_2210.py | DN3196237/project-management-system | c935a477b2bee02f1c1cf962c588ef1beb55b60a | [
"MIT"
] | 40 | 2019-12-13T09:30:30.000Z | 2021-07-15T11:19:43.000Z | # Generated by Django 2.0.3 on 2018-04-04 01:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('register', '0009_auto_20180403_2209'),
]
operations = [
migrations.AlterFi... | 28.269231 | 113 | 0.64898 |
e3f7bca127e4129a5f114e21793ab0fcc473eca2 | 6,203 | py | Python | mt_dnn/loss.py | mahartmann/mt-dnn | c9aa3379dc255fd8fc40f24b6cd508f6a645b32f | [
"MIT"
] | null | null | null | mt_dnn/loss.py | mahartmann/mt-dnn | c9aa3379dc255fd8fc40f24b6cd508f6a645b32f | [
"MIT"
] | null | null | null | mt_dnn/loss.py | mahartmann/mt-dnn | c9aa3379dc255fd8fc40f24b6cd508f6a645b32f | [
"MIT"
] | 1 | 2020-04-21T13:25:47.000Z | 2020-04-21T13:25:47.000Z | # coding=utf-8
# Copyright (c) Microsoft. All rights reserved.
import torch
from torch.nn.modules.loss import _Loss
import torch.nn.functional as F
from enum import IntEnum
class Criterion(_Loss):
def __init__(self, alpha=1.0, name='criterion'):
super().__init__()
"""Alpha is used to weight each l... | 34.848315 | 120 | 0.623247 |
7764f94910292b4f78d02a1175c6c400d62951c4 | 558 | py | Python | my_classes/Tuples/.history/name_tuples_20210721204407.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/Tuples/.history/name_tuples_20210721204407.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/Tuples/.history/name_tuples_20210721204407.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """ Tuple as Data Structure
We have see how we interpreted tuples as data structures
The position of the object contained in the tuple gives it meaning
For example, we can represent a 2D coordinate as: (10, 20)
x y
If pt is a position tuple, we can re... | 34.875 | 84 | 0.560932 |
77f253519eaa82714ca0479ccb4ae8cb0f610b34 | 12,148 | py | Python | yt_dlp/extractor/nebula.py | trassshhub/yt-dlp | ab0970b233333632a26f9b2675045ef628f62ce8 | [
"Unlicense"
] | 1 | 2022-03-26T15:43:50.000Z | 2022-03-26T15:43:50.000Z | yt_dlp/extractor/nebula.py | trassshhub/yt-dlp | ab0970b233333632a26f9b2675045ef628f62ce8 | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/nebula.py | trassshhub/yt-dlp | ab0970b233333632a26f9b2675045ef628f62ce8 | [
"Unlicense"
] | 1 | 2022-03-28T19:28:45.000Z | 2022-03-28T19:28:45.000Z | # coding: utf-8
from __future__ import unicode_literals
import itertools
import json
import time
import urllib
from ..utils import (
ExtractorError,
parse_iso8601,
try_get,
)
from .common import InfoExtractor
class NebulaBaseIE(InfoExtractor):
_NETRC_MACHINE = 'watchnebula'
_nebula_api_token = ... | 42.034602 | 224 | 0.565937 |
c77df330382aceff6adffc562b94ba35cd030419 | 19,093 | bzl | Python | repositories.bzl | lijobs/grpc-java | 9aa3981adad7d37d9ad631b9e4620c00c676fc94 | [
"Apache-2.0"
] | 1 | 2019-07-18T08:19:51.000Z | 2019-07-18T08:19:51.000Z | repositories.bzl | lijobs/grpc-java | 9aa3981adad7d37d9ad631b9e4620c00c676fc94 | [
"Apache-2.0"
] | null | null | null | repositories.bzl | lijobs/grpc-java | 9aa3981adad7d37d9ad631b9e4620c00c676fc94 | [
"Apache-2.0"
] | null | null | null | """External dependencies for grpc-java."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
def grpc_java_repositories(
omit_bazel_skylib = False,
omit_com_google_android_annotations = False,
o... | 41.32684 | 122 | 0.705337 |
e85ceef16d41172a9ec069a5914fffa25356c4dc | 13,316 | py | Python | Library/Utilities/fftw++-2.05/tests/directerror.py | stevend12/SolutioCpp | 6fa8a12207cd1e7e806a8ef5de93dc137c33856e | [
"Apache-2.0"
] | 9 | 2017-06-27T14:04:46.000Z | 2022-02-17T17:38:03.000Z | Library/Utilities/fftw++-2.05/tests/directerror.py | stevend12/SolutioCpp | 6fa8a12207cd1e7e806a8ef5de93dc137c33856e | [
"Apache-2.0"
] | null | null | null | Library/Utilities/fftw++-2.05/tests/directerror.py | stevend12/SolutioCpp | 6fa8a12207cd1e7e806a8ef5de93dc137c33856e | [
"Apache-2.0"
] | 3 | 2017-06-23T20:10:44.000Z | 2021-01-13T10:09:46.000Z | #!/usr/bin/python
# Error comparison for a variety of implicit and explicit convolutions
# as compared to a direct convolution.
import sys # so that we can return a value at the end.
from subprocess import * # so that we can run commands
import re # regexp package
import random # for randum number generators
import o... | 33.124378 | 81 | 0.454491 |
065ca78bb9136899dcf46c752dd6e7ebaeeb09d4 | 1,094 | py | Python | xlsxwriter/test/comparison/test_table04.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2017-01-11T10:08:02.000Z | 2017-01-11T10:08:02.000Z | xlsxwriter/test/comparison/test_table04.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_table04.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 24.311111 | 79 | 0.613346 |
d916787dc64380391dd377de62872a6f63b4dc50 | 3,769 | py | Python | ophyd/tests/test_utils.py | danielballan/ophyd | 224285eacc1d4c7eb913142ff4b39ebdeb092861 | [
"BSD-3-Clause"
] | null | null | null | ophyd/tests/test_utils.py | danielballan/ophyd | 224285eacc1d4c7eb913142ff4b39ebdeb092861 | [
"BSD-3-Clause"
] | 1 | 2017-08-15T22:45:23.000Z | 2017-08-23T17:52:55.000Z | ophyd/tests/test_utils.py | danielballan/ophyd | 224285eacc1d4c7eb913142ff4b39ebdeb092861 | [
"BSD-3-Clause"
] | null | null | null | import pytest
import os
import logging
import numpy as np
import tempfile
from ophyd.utils import epics_pvs as epics_utils
from ophyd.utils import (make_dir_tree, makedirs)
from .conftest import AssertTools
logger = logging.getLogger(__name__)
class TestEpicsUtil(AssertTools):
def test_split(self):
uti... | 34.577982 | 84 | 0.647652 |
cc3828e5fa2756ab588c87cfc8713583e38ecd59 | 978 | py | Python | stores/apps/my_shopping/urls.py | diassor/CollectorCity-Market-Place | 892ad220b8cf1c0fc7433f625213fe61729522b2 | [
"Apache-2.0"
] | 135 | 2015-03-19T13:28:18.000Z | 2022-03-27T06:41:42.000Z | stores/apps/my_shopping/urls.py | dfcoding/CollectorCity-Market-Place | e59acec3d600c049323397b17cae14fdcaaaec07 | [
"Apache-2.0"
] | null | null | null | stores/apps/my_shopping/urls.py | dfcoding/CollectorCity-Market-Place | e59acec3d600c049323397b17cae14fdcaaaec07 | [
"Apache-2.0"
] | 83 | 2015-01-30T01:00:15.000Z | 2022-03-08T17:25:10.000Z | from django.conf.urls.defaults import *
urlpatterns = patterns('',
url(r'^$', 'my_shopping.views.my_shopping', name='my_shopping'),
url(r'^my_orders$', 'my_shopping.views.my_orders', name='my_orders'),
#url(r'^pay/$', 'my_shopping.views.pay_now', name='pay_now'),
url(r'^checkout/shipping/$', 'my_shoppi... | 61.125 | 127 | 0.714724 |
d6622b6c5d277d25def4f642e17f8c5e2b1e4529 | 299 | py | Python | server/geolocation/fixtures/__init__.py | coll-gate/collgate | 8c2ff1c59adda2bf318040f588c05263317a2812 | [
"MIT"
] | 2 | 2017-07-04T16:19:09.000Z | 2019-08-16T04:54:47.000Z | server/geolocation/fixtures/__init__.py | coll-gate/collgate | 8c2ff1c59adda2bf318040f588c05263317a2812 | [
"MIT"
] | null | null | null | server/geolocation/fixtures/__init__.py | coll-gate/collgate | 8c2ff1c59adda2bf318040f588c05263317a2812 | [
"MIT"
] | 1 | 2018-04-13T08:28:09.000Z | 2018-04-13T08:28:09.000Z | # -*- coding: utf-8; -*-
#
# @file __init__.py
# @brief
# @author Medhi BOULNEMOUR (INRA UMR1095)
# @date 2017-01-03
# @copyright Copyright (c) 2017 INRA/CIRAD
# @license MIT (see LICENSE file)
# @details
"""
coll-gate geolocation fixtures initialisation
"""
ORDER = [
'descriptorstypes'
]
| 15.736842 | 45 | 0.662207 |
a8ff7f8e5cd05b54bb73048dab874a90191f7200 | 383 | py | Python | src/control/navigation.py | AuraUAS/aura-core | 4711521074db72ba9089213e14455d89dc5306c0 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 8 | 2016-08-03T19:35:03.000Z | 2019-12-15T06:25:05.000Z | src/control/navigation.py | AuraUAS/aura-core | 4711521074db72ba9089213e14455d89dc5306c0 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 4 | 2018-09-27T15:48:56.000Z | 2018-11-05T12:38:10.000Z | src/control/navigation.py | AuraUAS/aura-core | 4711521074db72ba9089213e14455d89dc5306c0 | [
"MIT",
"BSD-2-Clause-FreeBSD"
] | 5 | 2017-06-28T19:15:36.000Z | 2020-02-19T19:31:24.000Z | # high level navigation modes
from PropertyTree import PropertyNode
import control.circle as circle
import control.route as route
nav_node = PropertyNode("/navigation")
def init():
circle.init()
route.init()
def update(dt):
if nav_node.getString("mode") == 'circle':
circle.update(dt)
elif n... | 20.157895 | 47 | 0.686684 |
79f68658499361f6f695ea729ac262d672f338e5 | 1,812 | py | Python | batch.py | edart76/tree | 743d14a819c057c50bd4f84ed0712768cb4ba582 | [
"Apache-2.0"
] | null | null | null | batch.py | edart76/tree | 743d14a819c057c50bd4f84ed0712768cb4ba582 | [
"Apache-2.0"
] | null | null | null | batch.py | edart76/tree | 743d14a819c057c50bd4f84ed0712768cb4ba582 | [
"Apache-2.0"
] | null | null | null |
"""open new maya instance and do stuff with it"""
import sys, os, subprocess
from pathlib import Path
def createMayaProcess(exePath):
""" command args for maya """
flags = subprocess.CREATE_NEW_CONSOLE
DETACHED_PROCESS = 0x00000008
CREATE_NEW_PROCESS_GROUP = 0x00000200
flags = DETACHED_PROCESS | CREATE_NEW_PRO... | 22.37037 | 79 | 0.660596 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.