hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7951684d640b59b7ee5ea4acae1115ef617b7d4d | 5,757 | py | Python | Src/solver.py | yashchandak/UnO | caa709679236ec70d37c249e0cebace27fb30c51 | [
"Apache-2.0"
] | null | null | null | Src/solver.py | yashchandak/UnO | caa709679236ec70d37c249e0cebace27fb30c51 | [
"Apache-2.0"
] | null | null | null | Src/solver.py | yashchandak/UnO | caa709679236ec70d37c249e0cebace27fb30c51 | [
"Apache-2.0"
] | null | null | null | #!~miniconda3/envs/pytorch/bin python
# from __future__ import print_function
# from memory_profiler import profile
import argparse
from datetime import datetime
import numpy as np
import Src.Utils.utils as utils
from Src.config import Config
from time import time
import matplotlib.pyplot as plt
class Solver:
... | 34.890909 | 146 | 0.543339 |
79516858f2e3fc6578279f7f9d0a930a0b6e929c | 20,279 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_web_application_firewall_policies_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_web_application_firewall_policies_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/operations/_web_application_firewall_policies_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.398568 | 215 | 0.664382 |
7951697711dded50f5652cdc4e4a5e23c94ef2b6 | 2,886 | py | Python | test/functional/interface_bitcoin_cli.py | PlutusCapital/core | 9a02ab820245afdb2b3ab4bea621a78bfef37590 | [
"MIT"
] | null | null | null | test/functional/interface_bitcoin_cli.py | PlutusCapital/core | 9a02ab820245afdb2b3ab4bea621a78bfef37590 | [
"MIT"
] | null | null | null | test/functional/interface_bitcoin_cli.py | PlutusCapital/core | 9a02ab820245afdb2b3ab4bea621a78bfef37590 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test plutus-cli"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util i... | 48.915254 | 106 | 0.71483 |
7951698ad67e30ef9f20a7222fb37ac08aa74f1f | 7,763 | py | Python | docs/conf.py | agconti/njode | 404b1af5319467d1fef59d2875f24b1a5d4ab13f | [
"BSD-3-Clause"
] | 1 | 2015-12-31T10:24:25.000Z | 2015-12-31T10:24:25.000Z | docs/conf.py | agconti/njode | 404b1af5319467d1fef59d2875f24b1a5d4ab13f | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | agconti/njode | 404b1af5319467d1fef59d2875f24b1a5d4ab13f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# njode documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a d... | 31.685714 | 80 | 0.705011 |
79516bd02d97028a0d032b4da9b43c3aac2b20eb | 3,930 | py | Python | ajax_backend/ajax_comments.py | PatchyVideo/PatchyVideo | cafbdfa34591d7292090d5e67bb633b974447b64 | [
"MIT"
] | 13 | 2020-06-04T00:25:24.000Z | 2022-03-31T13:12:17.000Z | ajax_backend/ajax_comments.py | PatchyVideo/PatchyVideo | cafbdfa34591d7292090d5e67bb633b974447b64 | [
"MIT"
] | 1 | 2021-01-03T04:17:45.000Z | 2021-02-07T14:19:04.000Z | ajax_backend/ajax_comments.py | PatchyVideo/PatchyVideo | cafbdfa34591d7292090d5e67bb633b974447b64 | [
"MIT"
] | null | null | null |
from flask import render_template, request, current_app, jsonify, redirect, session
from init import app
from utils.interceptors import jsonRequest, loginRequiredJSON, loginOptional
from utils.jsontools import *
from utils.exceptions import UserError
from utils import getDefaultJSON
from services.comment import addT... | 37.075472 | 149 | 0.764631 |
79516c466a350013c33f7119e1f13e568964c606 | 2,528 | py | Python | blueprints/headers/__init__.py | mariussteffens/security-crawl-maze | 7bfa4e58344633016e2b5f2f30bd2dacea0a819b | [
"Apache-2.0"
] | 103 | 2019-05-25T00:44:52.000Z | 2022-03-30T17:21:28.000Z | blueprints/headers/__init__.py | mariussteffens/security-crawl-maze | 7bfa4e58344633016e2b5f2f30bd2dacea0a819b | [
"Apache-2.0"
] | 3 | 2020-08-10T09:36:30.000Z | 2022-03-11T11:59:20.000Z | blueprints/headers/__init__.py | mariussteffens/security-crawl-maze | 7bfa4e58344633016e2b5f2f30bd2dacea0a819b | [
"Apache-2.0"
] | 22 | 2019-06-27T11:25:16.000Z | 2022-03-18T16:24:11.000Z | # Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 34.162162 | 80 | 0.718354 |
79516d2bec2f8011c05f6a9a733eca1351d7bf45 | 1,276 | py | Python | examples/transceiver.py | jookies/smpp.twisted | 6b826ad34e547c96736e65a7695c904d117d78f4 | [
"Apache-2.0"
] | 3 | 2021-02-08T02:51:50.000Z | 2022-02-20T07:56:59.000Z | examples/transceiver.py | jookies/smpp.twisted | 6b826ad34e547c96736e65a7695c904d117d78f4 | [
"Apache-2.0"
] | null | null | null | examples/transceiver.py | jookies/smpp.twisted | 6b826ad34e547c96736e65a7695c904d117d78f4 | [
"Apache-2.0"
] | 1 | 2021-11-07T21:54:47.000Z | 2021-11-07T21:54:47.000Z | import logging
from twisted.internet import reactor, defer
from smpp.twisted.client import SMPPClientTransceiver, SMPPClientService
from smpp.twisted.config import SMPPClientConfig
class SMPP:
def __init__(self, config=None):
if config is None:
config = SMPPClientConfig(host='localhost', p... | 33.578947 | 182 | 0.632445 |
79516ddbd538ddd8b66abdbfe6be36a8f75a81b0 | 249,247 | py | Python | third_party/python/cpplint/cpplint.py | ajorgensen/heron | 6430c51a4a6030e93018e0ed40e5936a64317636 | [
"Apache-2.0"
] | 1 | 2021-06-29T07:00:10.000Z | 2021-06-29T07:00:10.000Z | third_party/python/cpplint/cpplint.py | ajorgensen/heron | 6430c51a4a6030e93018e0ed40e5936a64317636 | [
"Apache-2.0"
] | null | null | null | third_party/python/cpplint/cpplint.py | ajorgensen/heron | 6430c51a4a6030e93018e0ed40e5936a64317636 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2009 Google Inc. 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... | 38.511588 | 97 | 0.653316 |
79516ddc8cf4068672a8914c2961c1ea4e19bf9d | 4,293 | py | Python | binaries/build_wheels.py | meryacine/shaka-streamer | 7b7e90143f531c52d96c162cc7393862db0830b7 | [
"Apache-2.0"
] | 154 | 2019-08-29T16:53:24.000Z | 2022-02-25T00:29:56.000Z | binaries/build_wheels.py | meryacine/shaka-streamer | 7b7e90143f531c52d96c162cc7393862db0830b7 | [
"Apache-2.0"
] | 101 | 2019-08-30T17:34:51.000Z | 2022-03-02T18:46:22.000Z | binaries/build_wheels.py | meryacine/shaka-streamer | 7b7e90143f531c52d96c162cc7393862db0830b7 | [
"Apache-2.0"
] | 56 | 2019-09-08T17:47:22.000Z | 2022-02-23T17:35:11.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.620968 | 110 | 0.726532 |
79516e778e457b0c3496e743c755e12a385851e4 | 107,643 | py | Python | futu/quote/quote_query.py | zhuzhenping/py-futu-api | 540cf951738e387fd001064a76ceef6284c75d41 | [
"Apache-2.0"
] | 1 | 2021-01-10T00:54:39.000Z | 2021-01-10T00:54:39.000Z | futu/quote/quote_query.py | GOGOYAO/py-futu-api | 540cf951738e387fd001064a76ceef6284c75d41 | [
"Apache-2.0"
] | null | null | null | futu/quote/quote_query.py | GOGOYAO/py-futu-api | 540cf951738e387fd001064a76ceef6284c75d41 | [
"Apache-2.0"
] | 1 | 2021-02-17T17:46:36.000Z | 2021-02-17T17:46:36.000Z | # -*- coding: utf-8 -*-
"""
Quote query
"""
from futu.common.utils import *
from futu.common.pb import Common_pb2
from futu.quote.quote_stockfilter_info import *
# 无数据时的值
NoneDataType = 'N/A'
def get_optional_from_pb(pb, field_name, conv=None):
if pb.HasField(field_name):
val = getattr(pb, field_nam... | 37.506272 | 173 | 0.599342 |
79516fd272fa3cd6e2c9752e718118c14e6e66d9 | 1,466 | py | Python | contrib/devtools/fix-copyright-headers.py | ocminer/kreds-core | 94d550c68c0829a190c6ad676e08075bfcfa8ac0 | [
"MIT"
] | null | null | null | contrib/devtools/fix-copyright-headers.py | ocminer/kreds-core | 94d550c68c0829a190c6ad676e08075bfcfa8ac0 | [
"MIT"
] | null | null | null | contrib/devtools/fix-copyright-headers.py | ocminer/kreds-core | 94d550c68c0829a190c6ad676e08075bfcfa8ac0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Run this script inside of src/ and it will look for all the files
that were changed this year that still have the last year in the
copyright headers, and it will fix the headers on that file using
a perl regex one liner.
For example: if it finds something like this and we're in 2014
// Copyr... | 27.148148 | 81 | 0.691678 |
7951702049d771ceac98ebdd58ac3a3f56f4cfc8 | 18,899 | py | Python | tools/odrive/tests/encoder_test.py | takijo0116/ODrive | 4c01d0bff2a1c4a67e0f9979c9797b846f5de5d2 | [
"MIT"
] | 1 | 2021-02-19T09:44:02.000Z | 2021-02-19T09:44:02.000Z | tools/odrive/tests/encoder_test.py | takijo0116/ODrive | 4c01d0bff2a1c4a67e0f9979c9797b846f5de5d2 | [
"MIT"
] | null | null | null | tools/odrive/tests/encoder_test.py | takijo0116/ODrive | 4c01d0bff2a1c4a67e0f9979c9797b846f5de5d2 | [
"MIT"
] | null | null | null |
import test_runner
import time
from math import pi
import os
from fibre.utils import Logger
from odrive.enums import *
from test_runner import *
class TestEncoderBase():
"""
Base class for encoder tests.
TODO: incremental encoder doesn't use this yet.
All encoder tests expect the encoder to run at ... | 36.344231 | 296 | 0.65776 |
79517070b58c3bc3e51b78c9c47951963503bd7c | 2,649 | py | Python | matcher/Model/Phrase_Matcher_Predictor.py | INK-USC/expl-refinement | 815a7892a8d4c42fb429856746212a44f67d2547 | [
"MIT"
] | 7 | 2021-09-29T08:14:30.000Z | 2022-03-27T13:12:37.000Z | matcher/Model/Phrase_Matcher_Predictor.py | INK-USC/expl-refinement | 815a7892a8d4c42fb429856746212a44f67d2547 | [
"MIT"
] | null | null | null | matcher/Model/Phrase_Matcher_Predictor.py | INK-USC/expl-refinement | 815a7892a8d4c42fb429856746212a44f67d2547 | [
"MIT"
] | null | null | null | from Model.Phrase_Matcher import *
import torch, time, numpy as np
class Phrase_Matcher_Predictor:
def __init__(self, batch_size):
self.batch_size = batch_size
def predict(self, model_, data, train_mode):
all_scores = []
model_.eval()
for i in range(int(np.ceil(len(data)/se... | 48.163636 | 132 | 0.629294 |
79517169bfcfbf587a4aa12dcce68d91a78e0c0f | 2,440 | py | Python | nemo/collections/common/tokenizers/youtokentome_tokenizer.py | vadam5/NeMo | 3c5db09539293c3c19a6bb7437011f91261119af | [
"Apache-2.0"
] | 2 | 2021-09-21T07:36:20.000Z | 2022-02-05T15:29:04.000Z | nemo/collections/common/tokenizers/youtokentome_tokenizer.py | vadam5/NeMo | 3c5db09539293c3c19a6bb7437011f91261119af | [
"Apache-2.0"
] | null | null | null | nemo/collections/common/tokenizers/youtokentome_tokenizer.py | vadam5/NeMo | 3c5db09539293c3c19a6bb7437011f91261119af | [
"Apache-2.0"
] | 12 | 2021-06-20T08:56:10.000Z | 2022-03-16T19:07:10.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.366197 | 110 | 0.697951 |
795171fb287ac14974ae3430e056b7e8fb0e6c86 | 1,838 | py | Python | days/37-39-csv-data-analsys/unisex_names/research.py | Oniwa/100daysofcode-with-python-course | 12a53b2fc4e7047d664216a86def62ebfc29e03b | [
"MIT"
] | null | null | null | days/37-39-csv-data-analsys/unisex_names/research.py | Oniwa/100daysofcode-with-python-course | 12a53b2fc4e7047d664216a86def62ebfc29e03b | [
"MIT"
] | null | null | null | days/37-39-csv-data-analsys/unisex_names/research.py | Oniwa/100daysofcode-with-python-course | 12a53b2fc4e7047d664216a86def62ebfc29e03b | [
"MIT"
] | 1 | 2019-10-07T09:30:10.000Z | 2019-10-07T09:30:10.000Z | import os
import csv
import collections
from typing import List
data = []
Record = collections.namedtuple('Record', 'uid,name,total,'
'male_share,female_share,gap')
def init():
base_folder = os.path.dirname(__file__)
filename = os.path.join(base_folder, 'data', 'uni... | 28.276923 | 74 | 0.60555 |
7951747709b54a988f7438dd783c2eabdb37d89d | 11,753 | py | Python | bin/physiboss.py | marcorusc/project_repo_ecm_simul | 167cce668631be12f88e9f4936b4c39e71963e39 | [
"BSD-3-Clause"
] | 1 | 2020-05-08T14:09:15.000Z | 2020-05-08T14:09:15.000Z | bin/physiboss.py | marcorusc/project_repo_ecm_simul | 167cce668631be12f88e9f4936b4c39e71963e39 | [
"BSD-3-Clause"
] | 1 | 2020-09-08T10:58:54.000Z | 2020-09-08T10:58:54.000Z | bin/physiboss.py | marcorusc/project_repo_ecm_simul | 167cce668631be12f88e9f4936b4c39e71963e39 | [
"BSD-3-Clause"
] | 1 | 2020-07-23T08:26:18.000Z | 2020-07-23T08:26:18.000Z | # PhysiBoSS Tab
import os
from ipywidgets import Layout, Label, Text, Checkbox, Button, HBox, VBox, Box, \
FloatText, BoundedIntText, BoundedFloatText, HTMLMath, Dropdown, interactive, Output
from collections import deque, Counter
import xml.etree.ElementTree as ET
import matplotlib.pyplot as plt
from matplotlib.co... | 37.07571 | 177 | 0.547605 |
79517539e83152f9244e4ab5502fe2f3261da193 | 8,010 | py | Python | openspeech/datasets/aishell/lit_data_module.py | techthiyanes/openspeech | 71d28bae1232420da1d6f357f52ff1a607dc983f | [
"Apache-2.0",
"MIT"
] | 207 | 2021-07-22T02:04:47.000Z | 2022-03-31T07:24:12.000Z | openspeech/datasets/aishell/lit_data_module.py | tqslj2/openspeech | 10307587f08615224df5a868fb5249c68c70b12d | [
"Apache-2.0",
"MIT"
] | 81 | 2021-07-21T16:52:22.000Z | 2022-03-31T14:56:54.000Z | openspeech/datasets/aishell/lit_data_module.py | tqslj2/openspeech | 10307587f08615224df5a868fb5249c68c70b12d | [
"Apache-2.0",
"MIT"
] | 43 | 2021-07-21T16:33:27.000Z | 2022-03-23T09:43:49.000Z | # MIT License
#
# Copyright (c) 2021 Soohwan Kim and Sangchun Ha and Soyoung Cho
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights... | 43.297297 | 113 | 0.688514 |
795175bcb76caf23f932532a6af34c1a1f41900f | 988 | py | Python | kubernetes/test/test_v1_local_volume_source.py | sgwilliams-ebsco/python | 35e6406536c96d4769ff7e2a02bf0fdcb902a509 | [
"Apache-2.0"
] | 1 | 2021-06-10T23:44:11.000Z | 2021-06-10T23:44:11.000Z | kubernetes/test/test_v1_local_volume_source.py | sgwilliams-ebsco/python | 35e6406536c96d4769ff7e2a02bf0fdcb902a509 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_local_volume_source.py | sgwilliams-ebsco/python | 35e6406536c96d4769ff7e2a02bf0fdcb902a509 | [
"Apache-2.0"
] | 1 | 2018-11-06T16:33:43.000Z | 2018-11-06T16:33:43.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 21.955556 | 105 | 0.716599 |
795175cd50a9f44b9a70794a8565088798251296 | 1,111 | py | Python | tests/unit/crt/auth/test_crt_sigv4.py | karim7262/botocore | 070204a0afb94c23dcfe040f4933c74ab1d8e089 | [
"Apache-2.0"
] | 1,063 | 2015-01-13T13:35:09.000Z | 2022-03-31T09:29:32.000Z | tests/unit/crt/auth/test_crt_sigv4.py | karim7262/botocore | 070204a0afb94c23dcfe040f4933c74ab1d8e089 | [
"Apache-2.0"
] | 2,064 | 2015-01-03T15:53:33.000Z | 2022-03-31T23:12:08.000Z | tests/unit/crt/auth/test_crt_sigv4.py | karim7262/botocore | 070204a0afb94c23dcfe040f4933c74ab1d8e089 | [
"Apache-2.0"
] | 1,065 | 2015-01-16T15:58:42.000Z | 2022-03-31T22:18:56.000Z | import pytest
from tests import requires_crt, FreezeTime
from tests.unit.auth.test_sigv4 import (
DATE,
SERVICE,
REGION,
SignatureTestCase,
assert_equal,
create_request_from_raw_request,
generate_test_cases,
)
import botocore
def _test_crt_signature_version_4(test_case):
test_case = ... | 27.775 | 81 | 0.753375 |
795176046bae2ca7457990e3a7eb41c09cf08f67 | 695 | py | Python | src/sw/allotmentclub/alembic/versions/re_28_save_message_tag_instead_of__3b50f99a2e2f.py | sweh/sw.allotmentclub.backend | 77344045e29c2b173d635e9e20a0ca556161888e | [
"ZPL-2.1"
] | 1 | 2019-11-12T08:13:18.000Z | 2019-11-12T08:13:18.000Z | src/sw/allotmentclub/alembic/versions/re_28_save_message_tag_instead_of__3b50f99a2e2f.py | sweh/sw.allotmentclub.backend | 77344045e29c2b173d635e9e20a0ca556161888e | [
"ZPL-2.1"
] | 26 | 2020-05-16T12:08:25.000Z | 2022-03-12T00:53:57.000Z | src/sw/allotmentclub/alembic/versions/re_28_save_message_tag_instead_of__3b50f99a2e2f.py | sweh/sw.allotmentclub.backend | 77344045e29c2b173d635e9e20a0ca556161888e | [
"ZPL-2.1"
] | null | null | null | """re #28: Save message tag instead of Message-ID.
Revision ID: 3b50f99a2e2f
Revises: ff1bb01af7fa
Create Date: 2016-11-23 09:24:49.794794
"""
# revision identifiers, used by Alembic.
from alembic import op
import sqlalchemy as sa
revision = '3b50f99a2e2f'
down_revision = 'ff1bb01af7fa'
def upgrade():
op.add_c... | 25.740741 | 73 | 0.670504 |
7951774ff6b664ddc033bfdbdceea20f513cb14b | 1,374 | py | Python | kolibri/core/content/test/test_paths.py | MBKayro/kolibri | 0a38a5fb665503cf8f848b2f65938e73bfaa5989 | [
"MIT"
] | 545 | 2016-01-19T19:26:55.000Z | 2022-03-20T00:13:04.000Z | kolibri/core/content/test/test_paths.py | MBKayro/kolibri | 0a38a5fb665503cf8f848b2f65938e73bfaa5989 | [
"MIT"
] | 8,329 | 2016-01-19T19:32:02.000Z | 2022-03-31T21:23:12.000Z | kolibri/core/content/test/test_paths.py | MBKayro/kolibri | 0a38a5fb665503cf8f848b2f65938e73bfaa5989 | [
"MIT"
] | 493 | 2016-01-19T19:26:48.000Z | 2022-03-28T14:35:05.000Z | import hashlib
from django.test import TestCase
from kolibri.core.content.models import LocalFile
from kolibri.core.content.utils.paths import get_zip_content_config
from kolibri.utils.tests.helpers import override_option
class LocalFilePathsTest(TestCase):
def test_file_url_reversal(self):
from kolibri... | 33.512195 | 87 | 0.697962 |
795177bf4a31eb1817f9268e97fee12c4ad8541a | 1,324 | py | Python | attachdb/exceptions.py | LinuxJedi/pyattachsql | f47a0ee11a5f0c018bfe9dfac09d4781994c6da4 | [
"Apache-2.0"
] | null | null | null | attachdb/exceptions.py | LinuxJedi/pyattachsql | f47a0ee11a5f0c018bfe9dfac09d4781994c6da4 | [
"Apache-2.0"
] | null | null | null | attachdb/exceptions.py | LinuxJedi/pyattachsql | f47a0ee11a5f0c018bfe9dfac09d4781994c6da4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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 applicabl... | 24.518519 | 75 | 0.753021 |
7951791ac259a4dbfd2f56436216bb73887cae87 | 15,228 | py | Python | wagtail/admin/tests/tests.py | brownaa/wagtail | c97bc56c6822eb1b6589d5c33e07f71acfc48845 | [
"BSD-3-Clause"
] | 1 | 2021-02-17T11:39:51.000Z | 2021-02-17T11:39:51.000Z | wagtail/admin/tests/tests.py | brownaa/wagtail | c97bc56c6822eb1b6589d5c33e07f71acfc48845 | [
"BSD-3-Clause"
] | 13 | 2015-05-08T12:27:10.000Z | 2020-01-23T14:45:57.000Z | wagtail/admin/tests/tests.py | brownaa/wagtail | c97bc56c6822eb1b6589d5c33e07f71acfc48845 | [
"BSD-3-Clause"
] | 2 | 2020-09-03T20:12:32.000Z | 2021-03-29T08:29:23.000Z | # -*- coding: utf-8 -*-
import json
import unittest
from django import VERSION as DJANGO_VERSION
from django.conf import settings
from django.contrib.auth.models import Group, Permission
from django.core import mail
from django.core.management import call_command
from django.test import TestCase, override_settings
fr... | 43.13881 | 133 | 0.68177 |
79517a201cdd37dd5567b9e24d323c63d54f8492 | 1,107 | py | Python | 2020/hackceler8/match-3-package/other-challenge-src/inv/main.py | BearerPipelineTest/google-ctf | a0cab9cb6663ab908b9186d5428aa9674253c5c3 | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2020/hackceler8/match-3-package/other-challenge-src/inv/main.py | BearerPipelineTest/google-ctf | a0cab9cb6663ab908b9186d5428aa9674253c5c3 | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2020/hackceler8/match-3-package/other-challenge-src/inv/main.py | BearerPipelineTest/google-ctf | a0cab9cb6663ab908b9186d5428aa9674253c5c3 | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 41 | 104 | 0.68112 |
79517a3821a651b88d3fdc0db30a99f75d522932 | 4,673 | py | Python | tests/cli/__init__.py | M3t0r/tpl | 32ee0bb1fc629446a6451f20053c64ce8a860a61 | [
"MIT"
] | 11 | 2018-07-17T12:30:57.000Z | 2021-07-31T00:46:06.000Z | tests/cli/__init__.py | M3t0r/tpl | 32ee0bb1fc629446a6451f20053c64ce8a860a61 | [
"MIT"
] | 16 | 2018-10-08T21:50:16.000Z | 2021-07-29T12:20:57.000Z | tests/cli/__init__.py | M3t0r/tpl | 32ee0bb1fc629446a6451f20053c64ce8a860a61 | [
"MIT"
] | 4 | 2018-10-09T15:20:35.000Z | 2020-04-16T13:50:48.000Z | import os
from pathlib import Path
from subprocess import run, PIPE, CompletedProcess
from collections import defaultdict
import json
import pytest
import yaml
EXECUTION_TIMEOUT = 2 # seconds
class CLI:
"""Helper class to ease testing of CLI commands"""
def __init__(self, executable_list, tmpdir, print_d... | 32.678322 | 86 | 0.594907 |
79517b2bde9d2fbaa81036bf1e2405d4fbdd0918 | 1,897 | py | Python | tests/unit/boundary/plugin_get_test.py | jdgwartney/boundary-api-cli | f17bc252e3958656514042360c9f96fd50ab496c | [
"Apache-2.0"
] | null | null | null | tests/unit/boundary/plugin_get_test.py | jdgwartney/boundary-api-cli | f17bc252e3958656514042360c9f96fd50ab496c | [
"Apache-2.0"
] | null | null | null | tests/unit/boundary/plugin_get_test.py | jdgwartney/boundary-api-cli | f17bc252e3958656514042360c9f96fd50ab496c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2015 BMC Software, 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 applicab... | 31.616667 | 74 | 0.69689 |
79517c494edd1e5493b9f7dad9211145151d28e4 | 2,018 | py | Python | Python3/1226.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/1226.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/1226.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 48 ms submission
from threading import Lock
class DiningPhilosophers:
forks = [Lock() for _ in range(5)]
even = Lock()
# call the functions directly to execute, for example, eat()
def wan... | 32.548387 | 98 | 0.573835 |
79517d3d62c6bcc246afabd6176d71f9ae6aabba | 6,898 | py | Python | Src/Tests/test_property.py | Enerccio/ironpython26-fixed | e302db14f05396a378adb438565a829e66acbf94 | [
"MS-PL"
] | 1 | 2020-02-11T06:02:40.000Z | 2020-02-11T06:02:40.000Z | Src/Languages/IronPython/Tests/test_property.py | rudimk/dlr-dotnet | 71d11769f99d6ff1516ddbaed091a359eb46c670 | [
"MS-PL"
] | null | null | null | Src/Languages/IronPython/Tests/test_property.py | rudimk/dlr-dotnet | 71d11769f99d6ff1516ddbaed091a359eb46c670 | [
"MS-PL"
] | 1 | 2018-11-21T04:10:23.000Z | 2018-11-21T04:10:23.000Z | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Microsoft Public License. A
# copy of the license can be found in the License.html file at the root of this ... | 28.270492 | 112 | 0.610322 |
79517e6b988c8afd19a4717ea4353b138163ab68 | 10,074 | py | Python | FakeNewsAnalysis/FakeNewsAnalysis/validate.py | Feupos/DataScience | d246ab70554095456afb14ddef990accb3f9d2ac | [
"MIT"
] | null | null | null | FakeNewsAnalysis/FakeNewsAnalysis/validate.py | Feupos/DataScience | d246ab70554095456afb14ddef990accb3f9d2ac | [
"MIT"
] | null | null | null | FakeNewsAnalysis/FakeNewsAnalysis/validate.py | Feupos/DataScience | d246ab70554095456afb14ddef990accb3f9d2ac | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from matplotlib import colors
from matplotlib.ticker import PercentFormatter
import matplotlib.dates as md
import sklearn
from sklearn import svm
from sklearn.naive_bayes import GaussianNB, ComplementNB, MultinomialNB
from sklearn.feature_extraction.text import CountVectorizer, TfidfTra... | 47.744076 | 238 | 0.678876 |
79517e8190f46311328fd11e72b79f34afc5f79d | 873 | py | Python | virtual/lib/python3.6/site-packages/django/contrib/gis/db/backends/spatialite/features.py | Ruterana/clone_instagram | a068587ef1d1a93ec8d1c08086bf11c0fb274b83 | [
"MIT"
] | 33 | 2018-10-07T21:50:44.000Z | 2022-02-16T18:16:56.000Z | virtual/lib/python3.6/site-packages/django/contrib/gis/db/backends/spatialite/features.py | Ruterana/clone_instagram | a068587ef1d1a93ec8d1c08086bf11c0fb274b83 | [
"MIT"
] | 27 | 2017-04-01T15:06:36.000Z | 2021-02-08T20:19:58.000Z | virtual/lib/python3.6/site-packages/django/contrib/gis/db/backends/spatialite/features.py | ngishjonathan/gallery | dd67f28887316d6277927c667f6641d26317b0b8 | [
"MIT"
] | 11 | 2019-02-26T14:30:28.000Z | 2021-12-31T05:04:08.000Z | from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.db.backends.sqlite3.features import \
DatabaseFeatures as SQLiteDatabaseFeatures
from django.utils.functional import cached_property
class DatabaseFeatures(BaseSpatialFeatures, SQLiteDatabaseFeatures):
supports_3d_storage... | 39.681818 | 78 | 0.775487 |
79517f286dc5819c1142c7a98bb5b6d33ed3f946 | 669 | py | Python | ex106.py | raphael-abrantes/exercises-python | 71f1e7cba2f56173c256d43e4fe33a43722b4484 | [
"MIT"
] | null | null | null | ex106.py | raphael-abrantes/exercises-python | 71f1e7cba2f56173c256d43e4fe33a43722b4484 | [
"MIT"
] | null | null | null | ex106.py | raphael-abrantes/exercises-python | 71f1e7cba2f56173c256d43e4fe33a43722b4484 | [
"MIT"
] | null | null | null | import sys, os
caminho = os.path.dirname(__file__)
sys.path.append(caminho[:caminho.find('exs')])
from time import sleep
def printlin(txt):
print(f'~'*int(len(txt) + 4),flush=False)
print(f' {txt} ',flush=False)
print(f'~'*int(len(txt) + 4), flush=False)
def pyhelp():
while True:
... | 26.76 | 73 | 0.575486 |
79517f3fd889d0933c355c5467801ee2ad5a840d | 4,987 | py | Python | netboxers/models/dns_zonefile.py | okoeroo/netbox-tools | fab502ad038fc0395e5d54435a2ba90189d8a6cf | [
"MIT"
] | 5 | 2020-08-31T22:56:07.000Z | 2021-08-09T18:41:39.000Z | netboxers/models/dns_zonefile.py | okoeroo/netbox-tools | fab502ad038fc0395e5d54435a2ba90189d8a6cf | [
"MIT"
] | null | null | null | netboxers/models/dns_zonefile.py | okoeroo/netbox-tools | fab502ad038fc0395e5d54435a2ba90189d8a6cf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
class DNS_Resource_Record:
def __init__(self, **kwargs):
self.rr_name = None
self.rr_type = None
self.rr_class = 'IN'
self.rr_ttl = 86400
self.rr_data = None
for key, value in kwargs.items():
# Generic
if key == 'rr_na... | 34.157534 | 85 | 0.497895 |
79517f4493b23d37ee1eb7a8698a99bc3587e5d6 | 16,229 | py | Python | nutils/util.py | soraros/nutils | 91119b12bdebf12a85eecb6a2247be2415f60e6f | [
"MIT"
] | 1 | 2019-11-17T23:16:13.000Z | 2019-11-17T23:16:13.000Z | nutils/util.py | GabrielJie/nutils | cb47070fc8aaf1caeb38c1d90d19ef3c107f114a | [
"MIT"
] | 1 | 2020-12-23T22:38:16.000Z | 2020-12-23T22:38:16.000Z | nutils/util.py | GabrielJie/nutils | cb47070fc8aaf1caeb38c1d90d19ef3c107f114a | [
"MIT"
] | null | null | null | # Copyright (c) 2014 Evalf
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, s... | 31.45155 | 115 | 0.670466 |
79517f77cf4ff40f3a04a2f6e3cbdc38ac7594c9 | 9,481 | py | Python | tests/scrapers/test_reel.py | code1dot/instascrape | aa0a7e556341ab12be9ab4587c6c57ddf432675f | [
"MIT"
] | 445 | 2020-10-05T19:33:31.000Z | 2022-03-28T20:06:15.000Z | tests/scrapers/test_reel.py | code1dot/instascrape | aa0a7e556341ab12be9ab4587c6c57ddf432675f | [
"MIT"
] | 92 | 2020-10-05T15:15:08.000Z | 2022-03-31T03:18:58.000Z | tests/scrapers/test_reel.py | code1dot/instascrape | aa0a7e556341ab12be9ab4587c6c57ddf432675f | [
"MIT"
] | 116 | 2020-10-05T17:06:20.000Z | 2022-03-20T15:39:46.000Z | import csv
import datetime
import json
import re
import os
import pytest
from bs4 import BeautifulSoup
import requests
from instascrape import Reel
class TestReel:
@pytest.fixture
def url(self):
return "https://www.instagram.com/reel/CIrJSrFFHM_/"
@pytest.fixture
def get_... | 120.012658 | 6,999 | 0.703618 |
7951802bea7927d1a926b21c11f1c9a679a6c1da | 735 | py | Python | test/statements/import7.py | abjugard/MagicPython | 2802ded681e0ab1a1057821c1da287147d639505 | [
"MIT"
] | 1,482 | 2015-10-16T21:59:32.000Z | 2022-03-30T11:44:40.000Z | test/statements/import7.py | abjugard/MagicPython | 2802ded681e0ab1a1057821c1da287147d639505 | [
"MIT"
] | 226 | 2015-10-15T15:53:44.000Z | 2022-03-25T03:08:27.000Z | test/statements/import7.py | abjugard/MagicPython | 2802ded681e0ab1a1057821c1da287147d639505 | [
"MIT"
] | 129 | 2015-10-20T02:41:49.000Z | 2022-03-22T01:44:36.000Z | from .importing import *
from importing import *
from : keyword.control.import.python, source.python
: source.python
. : punctuation.separator.period.python, source.python
importing : source.python
: source.python
import : keyword.control.import.python, sou... | 35 | 66 | 0.617687 |
795181d419550e9da97e49798e8ae7fdf6b03834 | 12,556 | py | Python | flanker/mime/message/scanner.py | meta-x/flanker | 1e37baa1db2ecee238ac3de1e36a2948e0a6d3ad | [
"Apache-2.0"
] | null | null | null | flanker/mime/message/scanner.py | meta-x/flanker | 1e37baa1db2ecee238ac3de1e36a2948e0a6d3ad | [
"Apache-2.0"
] | null | null | null | flanker/mime/message/scanner.py | meta-x/flanker | 1e37baa1db2ecee238ac3de1e36a2948e0a6d3ad | [
"Apache-2.0"
] | 1 | 2020-12-18T08:33:56.000Z | 2020-12-18T08:33:56.000Z | import regex as re
from collections import deque
from cStringIO import StringIO
from flanker.mime.message.headers import parsing, is_empty, ContentType
from flanker.mime.message.part import MimePart, Stream
from flanker.mime.message.errors import DecodingError
from logging import getLogger
log = getLogger(__name__)
... | 28.343115 | 83 | 0.591908 |
795181d6f4f89b0559e4e0362fb5bd539ca49836 | 238 | py | Python | relayer/utils/__init__.py | wizeline/relayer | 72b579b65d351ee2a006b06b6e72ef3fb3e69758 | [
"MIT"
] | 3 | 2016-11-13T03:16:26.000Z | 2018-12-11T23:46:16.000Z | relayer/utils/__init__.py | wizeline/relayer | 72b579b65d351ee2a006b06b6e72ef3fb3e69758 | [
"MIT"
] | 27 | 2016-06-21T18:05:25.000Z | 2021-12-13T19:55:25.000Z | relayer/utils/__init__.py | wizeline/relayer | 72b579b65d351ee2a006b06b6e72ef3fb3e69758 | [
"MIT"
] | 1 | 2016-06-28T16:09:09.000Z | 2016-06-28T16:09:09.000Z | from datetime import datetime
def get_elapsed_time_in_milliseconds(start_time: datetime, end_time: datetime) -> float:
elapsed_time = end_time - start_time
return elapsed_time.microseconds / 1000.0 + elapsed_time.seconds * 1000
| 34 | 88 | 0.789916 |
7951828c6641d38543a87a95b532cc9d97665d83 | 308 | py | Python | run.py | Katze2/Flask-template | 99925f6bfbaf92ace9b0fd7c792b989ed90a7e00 | [
"MIT"
] | null | null | null | run.py | Katze2/Flask-template | 99925f6bfbaf92ace9b0fd7c792b989ed90a7e00 | [
"MIT"
] | null | null | null | run.py | Katze2/Flask-template | 99925f6bfbaf92ace9b0fd7c792b989ed90a7e00 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Python Aplication Template
Licence: GPLv3
"""
import os
from app import app
#----------------------------------------
# launch
#----------------------------------------
if __name__ == "__main__":
port = int(os.environ.get("PORT", 5000))
app.run(host='0.0.0.0', port=port)
| 17.111111 | 41 | 0.470779 |
795182c2b6a869d7e8209dbe0877adafa25987cd | 3,828 | py | Python | OBlog/blueprint/comments/main.py | OhYee/OBlog | a9d7e4fda5651cf9c5afd4c128c4df4442794e97 | [
"BSD-3-Clause"
] | 23 | 2018-02-23T12:56:43.000Z | 2021-12-20T13:21:47.000Z | OBlog/blueprint/comments/main.py | OhYee/OBlog | a9d7e4fda5651cf9c5afd4c128c4df4442794e97 | [
"BSD-3-Clause"
] | 17 | 2018-02-23T12:52:39.000Z | 2018-12-04T05:50:58.000Z | OBlog/blueprint/comments/main.py | OhYee/OBlog | a9d7e4fda5651cf9c5afd4c128c4df4442794e97 | [
"BSD-3-Clause"
] | 2 | 2018-06-16T20:52:23.000Z | 2021-04-08T15:29:44.000Z | from OBlog import database as db
from .sendEmail import Email
from ..posts.main import getPostForShow
from OBlog.markdown import render_markdown
import re
import time
from ..admin.main import getSiteConfigDict
def getCommentsOfUrlForShow(url):
res = db.query_db(
'select id,html,username,time,... | 30.624 | 109 | 0.540752 |
7951834c2b6d4ca26cd8612c8eb878d770f5a895 | 1,623 | py | Python | src/google/appengine/datastore/datastore_pb.py | myelin/appengine-python-standard | 2a99acd114f7cdd66fbad9bfd185384eef847c84 | [
"Apache-2.0"
] | null | null | null | src/google/appengine/datastore/datastore_pb.py | myelin/appengine-python-standard | 2a99acd114f7cdd66fbad9bfd185384eef847c84 | [
"Apache-2.0"
] | null | null | null | src/google/appengine/datastore/datastore_pb.py | myelin/appengine-python-standard | 2a99acd114f7cdd66fbad9bfd185384eef847c84 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 33.122449 | 81 | 0.825015 |
7951842acc6741c52b2669400f7082171c68d377 | 31,921 | py | Python | sdk/python/arvados/commands/arv_copy.py | chlige/arvados | e4a68851e521c0e3152f9790683d8cdb1b3923df | [
"ECL-2.0",
"Apache-2.0"
] | 222 | 2015-01-02T17:24:54.000Z | 2019-11-27T06:31:51.000Z | sdk/python/arvados/commands/arv_copy.py | chlige/arvados | e4a68851e521c0e3152f9790683d8cdb1b3923df | [
"ECL-2.0",
"Apache-2.0"
] | 62 | 2015-03-12T20:22:06.000Z | 2019-12-04T18:35:35.000Z | sdk/python/arvados/commands/arv_copy.py | chlige/arvados | e4a68851e521c0e3152f9790683d8cdb1b3923df | [
"ECL-2.0",
"Apache-2.0"
] | 75 | 2015-01-22T21:20:50.000Z | 2019-12-03T08:52:23.000Z | # Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
# arv-copy [--recursive] [--no-recursive] object-uuid
#
# Copies an object from Arvados instance src to instance dst.
#
# By default, arv-copy recursively copies any dependent objects
# necessary to make the object functi... | 39.90125 | 254 | 0.645469 |
7951865d0cf816b04130813a230bcec383e16f3b | 1,184 | py | Python | myprojectenv/lib/python3.5/site-packages/ansible/vars/unsafe_proxy.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/vars/unsafe_proxy.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | myprojectenv/lib/python3.5/site-packages/ansible/vars/unsafe_proxy.py | lancerenteria/doFlask | 2d4e242469b108c6c8316ee18a540307497bfb53 | [
"MIT"
] | null | null | null | # (c) 2017, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | 37 | 118 | 0.767736 |
795187263cbf9133359f8e12be58fbdd9b907af4 | 2,399 | py | Python | Scripts/pilconvert.py | Zendom88/web-api | 4340ccc3a4c433676aec33f3e0b6254979504a70 | [
"MIT"
] | null | null | null | Scripts/pilconvert.py | Zendom88/web-api | 4340ccc3a4c433676aec33f3e0b6254979504a70 | [
"MIT"
] | null | null | null | Scripts/pilconvert.py | Zendom88/web-api | 4340ccc3a4c433676aec33f3e0b6254979504a70 | [
"MIT"
] | null | null | null | #!c:\gfapps\d'sdoc~1\duong\code\web-api\scripts\python.exe
#
# The Python Imaging Library.
# $Id$
#
# convert image files
#
# History:
# 0.1 96-04-20 fl Created
# 0.2 96-10-04 fl Use draft mode when converting images
# 0.3 96-12-30 fl Optimize output (PNG, JPEG)
# 0.4 97-01-18 fl Made optimize ... | 23.99 | 77 | 0.554398 |
795187ad88d4041c428424fc7095c76671940c55 | 3,714 | py | Python | src/ghostricon/vpn.py | ziirish/ghostricon | db1ca0deb191d72da3ac953385020f5bc77e8b6e | [
"MIT"
] | null | null | null | src/ghostricon/vpn.py | ziirish/ghostricon | db1ca0deb191d72da3ac953385020f5bc77e8b6e | [
"MIT"
] | 1 | 2021-10-20T19:57:34.000Z | 2021-10-21T20:55:24.000Z | src/ghostricon/vpn.py | ziirish/ghostricon | db1ca0deb191d72da3ac953385020f5bc77e8b6e | [
"MIT"
] | null | null | null | import os
import re
import typing
import logging
import subprocess
from shlex import quote
from ghostricon.commands import server_types
from ghostricon.config import reload_config
class Vpn:
logger = logging.getLogger("VPNTOOL")
reg = re.compile(r"^\|\s*\d+\s*\|\s*(.*?)\s*\|\s*(.*?)\s*\|$")
def __init__... | 32.295652 | 81 | 0.556004 |
795189018e06e3b47116d7eefa4b2690b467f0d1 | 3,148 | py | Python | jj/mock/_history/_history_request.py | nikitanovosibirsk/jj | ea75c932e476c0dc3f282141877a7199ee4a81a9 | [
"Apache-2.0"
] | 4 | 2020-09-08T08:14:21.000Z | 2022-01-27T19:22:53.000Z | jj/mock/_history/_history_request.py | nikitanovosibirsk/jj | ea75c932e476c0dc3f282141877a7199ee4a81a9 | [
"Apache-2.0"
] | 19 | 2018-02-13T05:51:25.000Z | 2022-03-27T22:48:11.000Z | jj/mock/_history/_history_request.py | nikitanovosibirsk/jj | ea75c932e476c0dc3f282141877a7199ee4a81a9 | [
"Apache-2.0"
] | 3 | 2017-11-17T13:25:23.000Z | 2022-02-03T12:57:00.000Z | from typing import Any, Dict, List, Tuple
from aiohttp.web_exceptions import HTTPRequestEntityTooLarge
from multidict import CIMultiDict, CIMultiDictProxy, MultiDict, MultiDictProxy
from packed import packable
from ...requests import Request
__all__ = ("HistoryRequest",)
@packable("jj.mock.HistoryRequest")
class H... | 28.880734 | 78 | 0.537484 |
7951897a65aae559cea6ec19cc9b2b2cb5516ba8 | 954 | py | Python | test/test_lastname.py | 200312/python_training | 623cfd967d999849aac5d3130823fba8638bc289 | [
"Apache-2.0"
] | null | null | null | test/test_lastname.py | 200312/python_training | 623cfd967d999849aac5d3130823fba8638bc289 | [
"Apache-2.0"
] | null | null | null | test/test_lastname.py | 200312/python_training | 623cfd967d999849aac5d3130823fba8638bc289 | [
"Apache-2.0"
] | null | null | null | import re
from model.contact import Contact
def test_lastname_on_home_page(app, check_ui):
contact_from_home_page = app.contact.get_contact_list()[0]
contact_from_edit_page = app.contact.get_contact_info_from_edit_page(0)
assert contact_from_home_page.lastname == merge_lastname_like_on_home_page(contact_f... | 43.363636 | 168 | 0.800839 |
7951897dd6c9c5ac7f0c52e19439b1b89eed3b0e | 282 | py | Python | dtamg_py/build_datapackages.py | transparencia-mg/dtamg-py | 6007d33a1f33f01f504f82a52ed298cc9f466f61 | [
"MIT"
] | null | null | null | dtamg_py/build_datapackages.py | transparencia-mg/dtamg-py | 6007d33a1f33f01f504f82a52ed298cc9f466f61 | [
"MIT"
] | 15 | 2021-12-20T15:25:23.000Z | 2022-03-07T21:55:57.000Z | dtamg_py/build_datapackages.py | transparencia-mg/dtamg-py | 6007d33a1f33f01f504f82a52ed298cc9f466f61 | [
"MIT"
] | null | null | null | import click
from dtamg_py.utils import build_datapackages
@click.command(name='build-datapackages')
def build_datapackages_cli():
"""
Função responsável pela construção dos conjuntos derivados de todo conjunto AGE7. Constroi pasta build_datasets.
"""
build_datapackages()
| 28.2 | 114 | 0.797872 |
79518a6bdf57bc397abb8af7a181eb64d76c5cc2 | 3,292 | py | Python | metrics/eval.py | AndresPMD/semantic_adaptive_margin | 1e8bf2f1836498c48df030cb0a967b72b52e8460 | [
"Apache-2.0"
] | 12 | 2021-12-09T14:59:48.000Z | 2021-12-20T08:34:26.000Z | metrics/eval.py | AndresPMD/semantic_adaptive_margin | 1e8bf2f1836498c48df030cb0a967b72b52e8460 | [
"Apache-2.0"
] | null | null | null | metrics/eval.py | AndresPMD/semantic_adaptive_margin | 1e8bf2f1836498c48df030cb0a967b72b52e8460 | [
"Apache-2.0"
] | null | null | null | import argparse
import json
import os
import numpy as np
import pandas as pd
from metric import Metric
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--dataset_path', type=str, default='/data2fast/users/amafla/Precomp_features/data/', help='ground truth data path')
par... | 49.134328 | 140 | 0.6452 |
79518a6e3958d051c586fdc1109c5fe813fd5f11 | 154 | py | Python | SquareRoot.py | kpp46/Task-3 | 12ba7c8558c8a60717e9053194f2419d5b3e04af | [
"MIT"
] | null | null | null | SquareRoot.py | kpp46/Task-3 | 12ba7c8558c8a60717e9053194f2419d5b3e04af | [
"MIT"
] | null | null | null | SquareRoot.py | kpp46/Task-3 | 12ba7c8558c8a60717e9053194f2419d5b3e04af | [
"MIT"
] | null | null | null | import math
class SquareRoot:
a = 0
result = 0
def __init__(self, a):
self.a = a
self.result = math.sqrt(self.a)
| 14 | 40 | 0.512987 |
79518a990ea03bb7ff644f55dd6db3661e4888b4 | 3,820 | py | Python | tests/components/zha/test_device_action.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | tests/components/zha/test_device_action.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | tests/components/zha/test_device_action.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """The test for zha device automation actions."""
from unittest.mock import patch
import pytest
import zigpy.profiles.zha
import zigpy.zcl.clusters.general as general
import zigpy.zcl.clusters.security as security
import zigpy.zcl.foundation as zcl_f
import openpeerpower.components.automation as automation
from openp... | 32.931034 | 85 | 0.627749 |
79518ac2498493132e29d8bbe14a9001e90e8981 | 42,594 | py | Python | python/tvm/testing.py | wjj19950828/tvm | 9c63f4fc318652f6fff68342da2d11b26592a3e0 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 1 | 2021-08-05T17:25:14.000Z | 2021-08-05T17:25:14.000Z | python/tvm/testing.py | wjj19950828/tvm | 9c63f4fc318652f6fff68342da2d11b26592a3e0 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 1 | 2019-08-16T20:37:41.000Z | 2019-08-16T20:38:15.000Z | python/tvm/testing.py | wjj19950828/tvm | 9c63f4fc318652f6fff68342da2d11b26592a3e0 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) 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 u... | 32.993029 | 100 | 0.63462 |
79518b20c38cdf26e5a5219aedf012419c1fff47 | 671 | py | Python | NVIDIA/benchmarks/transformer/implementations/pytorch/data_preparation/fairseq/data/__init__.py | chuanli11/training_results_v0.6 | eade2d815e125e1d9af8439fc5d0bd8721777fa3 | [
"Apache-2.0"
] | null | null | null | NVIDIA/benchmarks/transformer/implementations/pytorch/data_preparation/fairseq/data/__init__.py | chuanli11/training_results_v0.6 | eade2d815e125e1d9af8439fc5d0bd8721777fa3 | [
"Apache-2.0"
] | null | null | null | NVIDIA/benchmarks/transformer/implementations/pytorch/data_preparation/fairseq/data/__init__.py | chuanli11/training_results_v0.6 | eade2d815e125e1d9af8439fc5d0bd8721777fa3 | [
"Apache-2.0"
] | 1 | 2020-02-11T23:24:05.000Z | 2020-02-11T23:24:05.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
from .dictionary import Dictionary
... | 44.733333 | 104 | 0.831595 |
79518cf794d0b3f4046bd49d330ed5cbced1aec1 | 2,449 | py | Python | workflows/cp-leaveout/py/tests/test_run_chained.py | andrew-weisman/Supervisor | 9110f85c85dcc2593de68db96dbd0f433a476507 | [
"MIT"
] | 10 | 2017-03-14T14:36:19.000Z | 2021-01-21T00:39:36.000Z | workflows/cp-leaveout/py/tests/test_run_chained.py | andrew-weisman/Supervisor | 9110f85c85dcc2593de68db96dbd0f433a476507 | [
"MIT"
] | 58 | 2017-03-03T21:07:53.000Z | 2021-07-19T18:51:03.000Z | workflows/cp-leaveout/py/tests/test_run_chained.py | andrew-weisman/Supervisor | 9110f85c85dcc2593de68db96dbd0f433a476507 | [
"MIT"
] | 21 | 2017-03-08T16:07:47.000Z | 2020-11-24T04:23:00.000Z | # Run with python -m unittest tests.test_run_chained from parent directory
import unittest
import os
import run_chained
class RunChainedTests(unittest.TestCase):
def test_root_nodes(self):
root_node = '1'
first_stage = 1
n_nodes = 4
root_nodes = run_chained.compute_parent_nodes(... | 37.106061 | 88 | 0.599837 |
79518d9033de721a481eecda4a3cb563fc64f378 | 14,603 | py | Python | FileTools.py | hiroog/FileListLib | 1e543adc810c61a7a18749cb7117d6ca1ea22597 | [
"MIT"
] | null | null | null | FileTools.py | hiroog/FileListLib | 1e543adc810c61a7a18749cb7117d6ca1ea22597 | [
"MIT"
] | null | null | null | FileTools.py | hiroog/FileListLib | 1e543adc810c61a7a18749cb7117d6ca1ea22597 | [
"MIT"
] | null | null | null | # 2018/01/14 Hiroyuki Ogasawara
# vim:ts=4 sw=4 et:
import os, stat
import sys
import re
import time
import shutil
sys.path.append( os.path.dirname( sys.argv[0] ) )
import FileListLib
class LogOutput:
def __init__( self ):
self.Verbose= False
self.LogFile= None
def open_log( self, file_... | 33.340183 | 84 | 0.4786 |
79518db987d1bb7d782c89ffc52794f1860ea986 | 29,680 | py | Python | kinova_station/hardware_station.py | kwesiRutledge/kinova_drake | 889594fcec4457737bc191a4006c2bba69b944c6 | [
"MIT"
] | null | null | null | kinova_station/hardware_station.py | kwesiRutledge/kinova_drake | 889594fcec4457737bc191a4006c2bba69b944c6 | [
"MIT"
] | null | null | null | kinova_station/hardware_station.py | kwesiRutledge/kinova_drake | 889594fcec4457737bc191a4006c2bba69b944c6 | [
"MIT"
] | null | null | null | from pydrake.all import *
import time
import sys
import threading
from kinova_station.common import (EndEffectorTarget,
GripperTarget,
EndEffectorWrenchCalculator)
from kortex_api.TCPTransport import TCPTransport
from kortex_api.RouterClient imp... | 40.546448 | 156 | 0.60374 |
79518e6dc5a2222308241998a17ac7285249b9d6 | 24 | py | Python | sklearn_extra/_version.py | ineveLoppiliF/scikit-learn-extra | 0cee1e6da0f14290c7652ba967669f946773bc78 | [
"BSD-3-Clause"
] | null | null | null | sklearn_extra/_version.py | ineveLoppiliF/scikit-learn-extra | 0cee1e6da0f14290c7652ba967669f946773bc78 | [
"BSD-3-Clause"
] | null | null | null | sklearn_extra/_version.py | ineveLoppiliF/scikit-learn-extra | 0cee1e6da0f14290c7652ba967669f946773bc78 | [
"BSD-3-Clause"
] | null | null | null | __version__ = "0.1.0b2"
| 12 | 23 | 0.666667 |
79518f1609f6098dd1f2e2111b4633405f5f70e1 | 23,187 | py | Python | test/test_handler.py | Jazun713/sensu-plugin-py-pagerduty | 88f2d53aa07c88c05d9a50b5c99cda5225ac1fec | [
"MIT"
] | null | null | null | test/test_handler.py | Jazun713/sensu-plugin-py-pagerduty | 88f2d53aa07c88c05d9a50b5c99cda5225ac1fec | [
"MIT"
] | 1 | 2018-08-07T20:46:41.000Z | 2019-01-10T23:25:14.000Z | test/test_handler.py | Jazun713/sensu-plugin-py-pagerduty | 88f2d53aa07c88c05d9a50b5c99cda5225ac1fec | [
"MIT"
] | null | null | null | import mock
import unittest
import json, logging
import mock
from pagerduty.handler import PagerdutyHandler
def event_no_teams():
event = {'client': {
"name": "test_client",
"address": "127.0.0.1",
"keepalive": {
"handler": "sensu_deregister",
"thresholds": {
"critical": 604800,
"warning": 300
... | 38.073892 | 112 | 0.684133 |
79519052792e9726ce416153ee43ebef4e74e4e0 | 6,801 | py | Python | elasticsearch/komand_elasticsearch/util/helpers.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | elasticsearch/komand_elasticsearch/util/helpers.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | elasticsearch/komand_elasticsearch/util/helpers.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import requests
from urllib.parse import quote
from requests.auth import HTTPBasicAuth
def test_auth(log, host, username=None, password=None):
if not host.endswith('/'):
host += '/'
headers = {'Accept': 'application/json'}
try:
if not username:
resp = requests.get(host, headers... | 40.005882 | 109 | 0.631084 |
7951906008449ff707e25155b96b8a059086f7df | 6,940 | py | Python | src/tf_train_mt_combined.py | gycggd/leaf-classification | b37dd4a6a262562c454038218c1472329e54128b | [
"MIT"
] | null | null | null | src/tf_train_mt_combined.py | gycggd/leaf-classification | b37dd4a6a262562c454038218c1472329e54128b | [
"MIT"
] | null | null | null | src/tf_train_mt_combined.py | gycggd/leaf-classification | b37dd4a6a262562c454038218c1472329e54128b | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument('--data_dir', type=str, default='',
help='input data path')
parser.add_argument('--model_dir', type=str, default='',
help='output model path')
FLAGS, _ = p... | 43.924051 | 117 | 0.619741 |
7951909d3410875b34c440e6c03aa0ee4cfdf6f3 | 10,919 | py | Python | O365/utils/token.py | urshala/python-o365 | 8d6969d39ca56c0c81de66119f5bdb1a4bbf2da3 | [
"Apache-2.0"
] | null | null | null | O365/utils/token.py | urshala/python-o365 | 8d6969d39ca56c0c81de66119f5bdb1a4bbf2da3 | [
"Apache-2.0"
] | null | null | null | O365/utils/token.py | urshala/python-o365 | 8d6969d39ca56c0c81de66119f5bdb1a4bbf2da3 | [
"Apache-2.0"
] | null | null | null | import logging
import json
import datetime as dt
from pathlib import Path
from abc import ABC, abstractmethod
log = logging.getLogger(__name__)
EXPIRES_ON_THRESHOLD = 1 * 60 # 1 minute
class Token(dict):
""" A dict subclass with extra methods to resemble a token """
@property
def is_long_lived(self):... | 34.884984 | 99 | 0.614434 |
7951911e862334f2e3d4d61beb828dcdbb48113c | 13,107 | py | Python | repo2docker/buildpacks/base.py | ryanlovett/repo2docker | e871f350765f10ac6adf8ddc548bb3244ea011ed | [
"BSD-3-Clause"
] | null | null | null | repo2docker/buildpacks/base.py | ryanlovett/repo2docker | e871f350765f10ac6adf8ddc548bb3244ea011ed | [
"BSD-3-Clause"
] | null | null | null | repo2docker/buildpacks/base.py | ryanlovett/repo2docker | e871f350765f10ac6adf8ddc548bb3244ea011ed | [
"BSD-3-Clause"
] | null | null | null | import textwrap
import jinja2
import tarfile
import io
import os
import re
import logging
import docker
TEMPLATE = r"""
FROM buildpack-deps:bionic
# avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive
# Set up locales properly
RUN apt-get update && \
apt-get install --yes --no-install-recommends locales &&... | 30.410673 | 90 | 0.596246 |
795194f38e566cda3e3b91ed0ee504ef8cde2dca | 3,168 | py | Python | pymks/tests/test_structure_analysis.py | wd15/pymks-clean | 97a4145c56626f6a1dea5c3a67dbaf83d3372446 | [
"MIT"
] | null | null | null | pymks/tests/test_structure_analysis.py | wd15/pymks-clean | 97a4145c56626f6a1dea5c3a67dbaf83d3372446 | [
"MIT"
] | null | null | null | pymks/tests/test_structure_analysis.py | wd15/pymks-clean | 97a4145c56626f6a1dea5c3a67dbaf83d3372446 | [
"MIT"
] | null | null | null | import numpy as np
def test_n_componets_from_reducer():
from pymks import MKSStructureAnalysis
from pymks import DiscreteIndicatorBasis
from sklearn.manifold import LocallyLinearEmbedding
reducer = LocallyLinearEmbedding(n_components=7)
dbasis = DiscreteIndicatorBasis(n_states=3, domain=[0, 2])
... | 34.813187 | 77 | 0.726641 |
7951951eb0c2b19e4dee5a738ed7c192afc813cf | 1,876 | py | Python | tests/test_noise_dropout.py | marco-willi/HiDDeN-tensorflow | f657b41ee145452f6b187b99f8c26fa4af2fba79 | [
"MIT"
] | null | null | null | tests/test_noise_dropout.py | marco-willi/HiDDeN-tensorflow | f657b41ee145452f6b187b99f8c26fa4af2fba79 | [
"MIT"
] | null | null | null | tests/test_noise_dropout.py | marco-willi/HiDDeN-tensorflow | f657b41ee145452f6b187b99f8c26fa4af2fba79 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
from noise import dropout
class DropOutTest(tf.test.TestCase):
def setUp(self):
self.layer = dropout.Dropout()
def testEqualityAcrossChannels(self):
""" Test that samples across channels are identical """
# Test simple binary case
... | 33.5 | 76 | 0.61194 |
795195e52893a6d95f30cc5b9a8722293f88ad6e | 906 | py | Python | ros/src/twist_controller/pid.py | TeamDoernbach/SDCNanodegreeCapstone | 10bdc59dc1b8f56136bf3f6f4ab64c97082420bb | [
"MIT"
] | 4 | 2019-01-04T07:32:33.000Z | 2019-08-08T17:25:11.000Z | ros/src/twist_controller/pid.py | TeamDoernbach/SDCNanodegreeCapstone | 10bdc59dc1b8f56136bf3f6f4ab64c97082420bb | [
"MIT"
] | 19 | 2019-01-04T13:42:56.000Z | 2019-01-21T20:10:41.000Z | ros/src/twist_controller/pid.py | TeamDoernbach/SDCNanodegreeCapstone | 10bdc59dc1b8f56136bf3f6f4ab64c97082420bb | [
"MIT"
] | 4 | 2019-01-08T21:54:54.000Z | 2019-12-14T04:47:55.000Z | import rospy
MIN_NUM = float('-inf')
MAX_NUM = float('inf')
class PID(object):
def __init__(self, kp, ki, kd, mn=MIN_NUM, mx=MAX_NUM):
self.kp = kp
self.ki = ki
self.kd = kd
self.min = mn
self.max = mx
self.int_val = self.last_error = 0.
def reset(self):
... | 23.230769 | 74 | 0.548565 |
79519655d0a6ae3137e97e0a4164ff503642be9f | 4,226 | py | Python | pyod/test/test_so_gaal.py | g0lemXIV/pyod | eb3a920d4b72e69f0529d4fde83c9b76ce5e163b | [
"BSD-2-Clause"
] | 5,126 | 2018-11-09T06:05:38.000Z | 2022-03-31T14:25:14.000Z | pyod/test/test_so_gaal.py | durgeshsamariya/pyod | dfafc57f74dc3d49d0166f21ab2ddb97e3d1d898 | [
"BSD-2-Clause"
] | 325 | 2018-11-14T20:02:39.000Z | 2022-03-30T22:49:38.000Z | pyod/test/test_so_gaal.py | durgeshsamariya/pyod | dfafc57f74dc3d49d0166f21ab2ddb97e3d1d898 | [
"BSD-2-Clause"
] | 1,049 | 2018-11-09T06:12:12.000Z | 2022-03-31T06:21:28.000Z | # -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
import os
import sys
import unittest
# noinspection PyProtectedMember
from numpy.testing import assert_allclose
from numpy.testing import assert_array_less
from numpy.testing import assert_equal
from numpy.testing import ass... | 35.216667 | 79 | 0.666588 |
79519721e261f6c0ab7fd1c0814c29e61c8fb891 | 2,014 | py | Python | forms/role_form.py | qwc-services/sogis-agdi | f278612c42f648da07448905f2b8021b279e66bc | [
"MIT"
] | null | null | null | forms/role_form.py | qwc-services/sogis-agdi | f278612c42f648da07448905f2b8021b279e66bc | [
"MIT"
] | null | null | null | forms/role_form.py | qwc-services/sogis-agdi | f278612c42f648da07448905f2b8021b279e66bc | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import FieldList, FormField, HiddenField, SelectField, \
StringField, SubmitField, TextAreaField, ValidationError
from wtforms.validators import DataRequired, Optional
class GroupForm(FlaskForm):
"""Subform for groups"""
group_id = HiddenField('Gruppen-ID', val... | 33.016393 | 76 | 0.658888 |
795197bbd9ff3061195bb50ee5c4315a41d868ea | 2,346 | py | Python | tests/test_Vitodens222W.py | sskrlj/PyViCare | 3a54b8e73e5b72cf04a28b2827ccb01e12fa8810 | [
"Apache-2.0"
] | null | null | null | tests/test_Vitodens222W.py | sskrlj/PyViCare | 3a54b8e73e5b72cf04a28b2827ccb01e12fa8810 | [
"Apache-2.0"
] | null | null | null | tests/test_Vitodens222W.py | sskrlj/PyViCare | 3a54b8e73e5b72cf04a28b2827ccb01e12fa8810 | [
"Apache-2.0"
] | null | null | null | import unittest
from PyViCare.PyViCareGazBoiler import GazBoiler
from PyViCare.PyViCareUtils import PyViCareNotSupportedFeatureError
from tests.ViCareServiceMock import ViCareServiceMock
class Vitodens222W(unittest.TestCase):
def setUp(self):
self.service = ViCareServiceMock('response/Vitodens222W.json')... | 36.65625 | 83 | 0.693947 |
795197c577e8827839bf583bc48326a708b90443 | 915 | py | Python | users/migrations/0001_initial.py | tanmayag8958/upes-fipi-jigyasa | e05e41e7624175ae64216a54cc546bbb74b2df61 | [
"MIT"
] | 8 | 2019-03-08T10:28:38.000Z | 2019-10-17T00:04:44.000Z | users/migrations/0001_initial.py | tanmayag8958/upes-fipi-jigyasa | e05e41e7624175ae64216a54cc546bbb74b2df61 | [
"MIT"
] | 124 | 2020-02-11T23:51:09.000Z | 2022-01-13T01:06:09.000Z | users/migrations/0001_initial.py | tanmayag8958/upes-fipi-jigyasa | e05e41e7624175ae64216a54cc546bbb74b2df61 | [
"MIT"
] | 3 | 2019-03-07T18:44:55.000Z | 2019-03-08T10:36:50.000Z | # Generated by Django 2.1.7 on 2019-03-04 21:22
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | 31.551724 | 121 | 0.64153 |
795197dfa3f5f6dcc66385ec31391f6581b14dc2 | 728 | py | Python | firmware/eppenwolf/host/test/test_.py | 0xDBFB7/covidinator | e9c103e5e62bc128169400998df5f5cd13bd8949 | [
"MIT"
] | null | null | null | firmware/eppenwolf/host/test/test_.py | 0xDBFB7/covidinator | e9c103e5e62bc128169400998df5f5cd13bd8949 | [
"MIT"
] | null | null | null | firmware/eppenwolf/host/test/test_.py | 0xDBFB7/covidinator | e9c103e5e62bc128169400998df5f5cd13bd8949 | [
"MIT"
] | null | null | null | import sys
sys.path.append('/home/arthurdent/covidinator/firmware/eppendoofus/host/')
import device_comms
from device_comms import *
import pytest
from functions import *
link = device_comms.connect()
def test_loopback():
send_size = 0
float_ = 563.5
send_size = add_float(link, send_size, float_)
lin... | 19.675676 | 74 | 0.703297 |
795198b6c0286b3d0b39a0ad5cf25ad2dfb8ae9b | 1,218 | py | Python | demo_stock/A_1day/D04_download_pb_lf.py | jiangtiantu/kquant_data | 9bd47ba23c23110757186897e37ea36234bdce2c | [
"BSD-2-Clause"
] | 23 | 2017-08-05T04:35:47.000Z | 2020-12-16T09:40:08.000Z | demo_stock/A_1day/D04_download_pb_lf.py | jiangtiantu/kquant_data | 9bd47ba23c23110757186897e37ea36234bdce2c | [
"BSD-2-Clause"
] | 2 | 2017-08-05T04:57:10.000Z | 2018-04-14T14:52:39.000Z | demo_stock/A_1day/D04_download_pb_lf.py | wukan1986/kquant_data | 9bd47ba23c23110757186897e37ea36234bdce2c | [
"BSD-2-Clause"
] | 21 | 2017-08-01T09:56:30.000Z | 2021-07-10T01:19:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
下载财报一类的信息
"""
import os
import pandas as pd
from WindPy import w
from kquant_data.xio.csv import write_data_dataframe, read_data_dataframe
from kquant_data.api import all_instruments
from kquant_data.wind_resume.wsd import download_daily_at
from kquant_data.config impo... | 29.707317 | 82 | 0.698686 |
795198d3c78443fdf26464ac308d9cb9b169b7ba | 1,836 | py | Python | djmodels/db/backends/mysql/client.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | 5 | 2019-02-15T16:47:50.000Z | 2021-12-26T18:52:23.000Z | djmodels/db/backends/mysql/client.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | null | null | null | djmodels/db/backends/mysql/client.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | 2 | 2021-08-09T02:29:09.000Z | 2021-08-20T03:30:11.000Z | import subprocess
from djmodels.db.backends.base.client import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'mysql'
@classmethod
def settings_to_cmd_args(cls, settings_dict):
args = [cls.executable_name]
db = settings_dict['OPTIONS'].get('db', settings_d... | 37.469388 | 82 | 0.566993 |
79519b5a9eda35b7f070eda0fdb8119cce8e9fad | 3,591 | py | Python | tests/unit/publisher/test_neo4j_preprocessor.py | Gusto/amundsendatabuilder-1 | d24cba9d51795f908c8325d847e020b3c949f34a | [
"Apache-2.0"
] | 1 | 2020-08-20T16:22:07.000Z | 2020-08-20T16:22:07.000Z | tests/unit/publisher/test_neo4j_preprocessor.py | Gusto/amundsendatabuilder-1 | d24cba9d51795f908c8325d847e020b3c949f34a | [
"Apache-2.0"
] | 2 | 2020-07-20T16:03:49.000Z | 2020-08-14T16:14:10.000Z | tests/unit/publisher/test_neo4j_preprocessor.py | Gusto/amundsendatabuilder-1 | d24cba9d51795f908c8325d847e020b3c949f34a | [
"Apache-2.0"
] | null | null | null | # Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
import textwrap
import unittest
import uuid
from databuilder.publisher.neo4j_preprocessor import NoopRelationPreprocessor, DeleteRelationPreprocessor
class TestNeo4jPreprocessor(unittest.TestCase):
def testNoopRelationPrepr... | 43.792683 | 105 | 0.470899 |
79519b88f8ca7bcdf899b5787ef61c573ba6cadd | 2,719 | py | Python | chainer_chemistry/links/update/schnet_update.py | k-ishiguro/chainer-chemistry | aec33496def16e76bdfbefa508ba01ab9f79a592 | [
"MIT"
] | 1 | 2019-06-19T00:05:59.000Z | 2019-06-19T00:05:59.000Z | chainer_chemistry/links/update/schnet_update.py | k-ishiguro/chainer-chemistry | aec33496def16e76bdfbefa508ba01ab9f79a592 | [
"MIT"
] | null | null | null | chainer_chemistry/links/update/schnet_update.py | k-ishiguro/chainer-chemistry | aec33496def16e76bdfbefa508ba01ab9f79a592 | [
"MIT"
] | 1 | 2020-10-12T07:23:44.000Z | 2020-10-12T07:23:44.000Z | """
Chainer implementation of CFConv.
SchNet: A continuous-filter convolutional neural network for modeling
quantum interactions
Kristof et al.
See: https://arxiv.org/abs/1706.08566
"""
import chainer
from chainer import functions
from chainer import links
from chainer_chemistry.links.connection.graph_linear imp... | 35.776316 | 76 | 0.612357 |
79519b905b9daad63c8348993c0ebddefd88df38 | 3,840 | py | Python | script popolamento DB/env/lib/python3.7/site-packages/setuptools/command/install_lib.py | 2dadsgn/Smart-vase-webapp-flask- | 0714d960ec21c77be069dd07b1bc8407f33e0b72 | [
"Apache-2.0"
] | null | null | null | script popolamento DB/env/lib/python3.7/site-packages/setuptools/command/install_lib.py | 2dadsgn/Smart-vase-webapp-flask- | 0714d960ec21c77be069dd07b1bc8407f33e0b72 | [
"Apache-2.0"
] | null | null | null | script popolamento DB/env/lib/python3.7/site-packages/setuptools/command/install_lib.py | 2dadsgn/Smart-vase-webapp-flask- | 0714d960ec21c77be069dd07b1bc8407f33e0b72 | [
"Apache-2.0"
] | null | null | null | import distutils.command.install_lib as orig
import imp
import os
from itertools import product, starmap
class install_lib(orig.install_lib):
"""Don't add compiled flags to filenames of non-Python files"""
def run(self):
self.build()
outfiles = self.install()
if outfiles is not None:
... | 31.47541 | 78 | 0.611719 |
79519c66e27cf9955710d533d1ac316a00aa83ad | 5,587 | py | Python | grr/server/grr_response_server/gui/api_e2e_tests/vfs_test.py | billstackpole/grr | 203a0a99990a2d4004aed84a5cd822cbda2b418c | [
"Apache-2.0"
] | 1 | 2019-03-28T07:09:41.000Z | 2019-03-28T07:09:41.000Z | grr/server/grr_response_server/gui/api_e2e_tests/vfs_test.py | gingogo/grr | 203a0a99990a2d4004aed84a5cd822cbda2b418c | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/gui/api_e2e_tests/vfs_test.py | gingogo/grr | 203a0a99990a2d4004aed84a5cd822cbda2b418c | [
"Apache-2.0"
] | 1 | 2018-08-30T14:50:24.000Z | 2018-08-30T14:50:24.000Z | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Tests for API client and VFS-related API calls."""
import io
import threading
import time
import zipfile
from grr_response_core.lib import flags
from grr_response_core.lib import rdfvalue
from grr_response_proto.api import vfs_pb2
from grr_response_ser... | 34.701863 | 80 | 0.706819 |
79519dde580e0176bb0528f8be03a339b8c543a1 | 193,564 | py | Python | tests/unit/test_jlink.py | RisinT96/pylink | a2bdb648bde08dceebbffcf3233d876b307eedf6 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_jlink.py | RisinT96/pylink | a2bdb648bde08dceebbffcf3233d876b307eedf6 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_jlink.py | RisinT96/pylink | a2bdb648bde08dceebbffcf3233d876b307eedf6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Square, 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 writing,... | 31.341321 | 118 | 0.627622 |
79519e4b3e9ea379eabeb30c1b611cf1c2936f4e | 800 | py | Python | dbf_to_csv.py | tothebeat/fatal-car-crashes | 7112103b9ee49eabacba3f5e6d0496ea3c78132a | [
"MIT"
] | 8 | 2015-12-17T22:45:29.000Z | 2017-06-04T19:40:30.000Z | dbf_to_csv.py | lovingawareness/fatal-car-crashes | 7112103b9ee49eabacba3f5e6d0496ea3c78132a | [
"MIT"
] | 1 | 2015-10-17T02:08:38.000Z | 2015-10-17T02:08:38.000Z | dbf_to_csv.py | lovingawareness/fatal-car-crashes | 7112103b9ee49eabacba3f5e6d0496ea3c78132a | [
"MIT"
] | 2 | 2015-12-24T04:33:07.000Z | 2016-05-20T02:19:08.000Z | import csv
import sys
from dbfpy import dbf
def dbf_to_csv(dbf_path, csv_path):
with open(dbf_path, 'rb') as dbf_file:
database = dbf.Dbf(dbf_file, readOnly=True)
with open(csv_path, 'wb') as csv_file:
dict_writer = csv.DictWriter(csv_file, fieldnames=sorted(database[0].asDict().keys())... | 34.782609 | 98 | 0.64 |
79519e53b040b134ae0f1f78df17181381dc8db2 | 2,036 | py | Python | cup_test/cup_service_heartbeat_test.py | lotapp/CUP | c3b3d4cdc2627a0fecbfecc6adaaa6670ac73a1c | [
"Apache-2.0"
] | 900 | 2017-02-15T05:14:03.000Z | 2022-03-22T08:07:39.000Z | cup_test/cup_service_heartbeat_test.py | horsedongmin/CUP | 94398c7d94b2574db565c3e8d6dcfe2f3722f007 | [
"Apache-2.0"
] | 30 | 2017-02-24T05:16:15.000Z | 2021-08-04T02:03:12.000Z | cup_test/cup_service_heartbeat_test.py | horsedongmin/CUP | 94398c7d94b2574db565c3e8d6dcfe2f3722f007 | [
"Apache-2.0"
] | 185 | 2017-02-15T02:23:09.000Z | 2022-02-24T08:47:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*
# Copyright: [CUP] - See LICENSE for details.
# Authors: Guannan Ma (@mythmgn),
"""
:description:
unittest for cup.services.heartbeat
"""
import os
import sys
import time
_NOW_PATH = os.path.dirname(os.path.abspath(__file__)) + '/'
sys.path.insert(0, _NOW_PATH + '../')... | 25.135802 | 66 | 0.604126 |
79519f6349c538376a9cc6a5685cd9b6655046a2 | 348 | py | Python | haystack/nodes/retriever/__init__.py | ArzelaAscoIi/haystack | be8f50c9e3de4e264b3f345f5f4b9c9ec518ed08 | [
"Apache-2.0"
] | 1 | 2022-03-06T02:13:15.000Z | 2022-03-06T02:13:15.000Z | haystack/nodes/retriever/__init__.py | ArzelaAscoIi/haystack | be8f50c9e3de4e264b3f345f5f4b9c9ec518ed08 | [
"Apache-2.0"
] | null | null | null | haystack/nodes/retriever/__init__.py | ArzelaAscoIi/haystack | be8f50c9e3de4e264b3f345f5f4b9c9ec518ed08 | [
"Apache-2.0"
] | 1 | 2022-03-23T18:17:02.000Z | 2022-03-23T18:17:02.000Z | from haystack.nodes.retriever.base import BaseRetriever
from haystack.nodes.retriever.dense import DensePassageRetriever, EmbeddingRetriever, TableTextRetriever
from haystack.nodes.retriever.sparse import ElasticsearchRetriever, ElasticsearchFilterOnlyRetriever, TfidfRetriever
from haystack.nodes.retriever.text2sparql ... | 69.6 | 116 | 0.896552 |
79519f6cf8aebd49b44f19c0ca4ee4fbaa3c95c8 | 66,873 | py | Python | src/transformers/models/mobilebert/modeling_mobilebert.py | Knarik1/transformers | c2a7d7280250addae38a49c31a57ddd897be2065 | [
"Apache-2.0"
] | 2 | 2021-09-16T01:24:38.000Z | 2021-09-29T18:45:34.000Z | src/transformers/models/mobilebert/modeling_mobilebert.py | Knarik1/transformers | c2a7d7280250addae38a49c31a57ddd897be2065 | [
"Apache-2.0"
] | 5 | 2021-10-05T21:43:16.000Z | 2021-12-15T15:20:32.000Z | src/transformers/models/mobilebert/modeling_mobilebert.py | Knarik1/transformers | c2a7d7280250addae38a49c31a57ddd897be2065 | [
"Apache-2.0"
] | 2 | 2021-08-15T14:42:10.000Z | 2021-09-25T15:40:49.000Z | # MIT License
#
# Copyright (c) 2020 The Google AI Language Team Authors, The HuggingFace Inc. team and github/lonePatient
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restricti... | 41.717405 | 168 | 0.669403 |
7951a051f0b33966f23ab3701a9570ab0c5e4b15 | 29,833 | py | Python | vvs_app/master_window.py | Sheriff99yt/Vision_Visual_Scripting | a930c805ff91379baf5cbb08d08b7f383eab2f95 | [
"MIT"
] | 5 | 2021-12-17T06:52:11.000Z | 2021-12-20T19:52:57.000Z | vvs_app/master_window.py | Sheriff99yt/Vision_Visual_Scripting | a930c805ff91379baf5cbb08d08b7f383eab2f95 | [
"MIT"
] | null | null | null | vvs_app/master_window.py | Sheriff99yt/Vision_Visual_Scripting | a930c805ff91379baf5cbb08d08b7f383eab2f95 | [
"MIT"
] | null | null | null | import os
import subprocess
import sys
from qtpy.QtGui import *
from qtpy.QtWidgets import *
from qtpy.QtCore import *
from nodeeditor.node_editor_widget import NodeEditorWidget
from nodeeditor.utils import loadStylesheets
from nodeeditor.node_editor_window import NodeEditorWindow
from vvs_app.editor_settings_wnd imp... | 38.693904 | 201 | 0.676968 |
7951a12f7373608912f8d4afccdf0d7bde911d74 | 359 | py | Python | flaskbb/__init__.py | rehee/try_discuz | 063c2c89c25054c88b3ac785a3ed135c7abc9be5 | [
"BSD-3-Clause"
] | 8 | 2015-08-08T00:19:34.000Z | 2019-08-28T16:20:19.000Z | flaskbb/__init__.py | rehee/try_discuz | 063c2c89c25054c88b3ac785a3ed135c7abc9be5 | [
"BSD-3-Clause"
] | 45 | 2021-03-22T07:15:27.000Z | 2021-12-23T21:07:10.000Z | flaskbb/__init__.py | rehee/try_discuz | 063c2c89c25054c88b3ac785a3ed135c7abc9be5 | [
"BSD-3-Clause"
] | 6 | 2021-03-26T18:30:56.000Z | 2022-03-27T10:58:53.000Z | # -*- coding: utf-8 -*-
"""
flaskbb
~~~~~~~
FlaskBB is a forum software written in python using the
microframework Flask.
:copyright: (c) 2014 by the FlaskBB Team.
:license: BSD, see LICENSE for more details.
"""
__version__ = "2.0.2"
import logging
logger = logging.getLogger(__name__)
from... | 18.894737 | 59 | 0.660167 |
7951a1b8aeea89ad1d6c9b0b5398f5975b099b0b | 1,721 | py | Python | data/migrations/0002_create_schools.py | mdavoodi/konkourse-python | 50f2904e7bbb31f00c4dd66fb55cd644ea3c4eee | [
"MIT"
] | 4 | 2015-06-23T22:17:50.000Z | 2019-01-17T21:32:02.000Z | data/migrations/0002_create_schools.py | mdavoodi/konkourse-python | 50f2904e7bbb31f00c4dd66fb55cd644ea3c4eee | [
"MIT"
] | null | null | null | data/migrations/0002_create_schools.py | mdavoodi/konkourse-python | 50f2904e7bbb31f00c4dd66fb55cd644ea3c4eee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from django.conf import settings
from django.core.files import File
import os
#
class Migration(DataMigration):
def forwards(self, orm):
Page = orm['page.Page']
virginia... | 35.854167 | 95 | 0.620569 |
7951a2ca63e1a3c9253c8e7ab1a16087db1e792f | 578 | py | Python | tests/test_paint.py | yngtodd/paint | ee39d58ad430e473b4d8f88107a6d7658f9e34f8 | [
"MIT"
] | null | null | null | tests/test_paint.py | yngtodd/paint | ee39d58ad430e473b4d8f88107a6d7658f9e34f8 | [
"MIT"
] | null | null | null | tests/test_paint.py | yngtodd/paint | ee39d58ad430e473b4d8f88107a6d7658f9e34f8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Tests for `paint` package."""
# pylint: disable=redefined-outer-name
import pytest
@pytest.fixture
def response():
"""Sample pytest fixture.
See more at: http://doc.pytest.org/en/latest/fixture.html
"""
# import requests
# return requests.get('https://github.com/audrey... | 23.12 | 78 | 0.704152 |
7951a2fd617903a24f35c213ccb78d7ca750e441 | 1,465 | py | Python | migrations/versions/63c5fe144a13_adding_user_controls.py | ukblumf/randomise-it | 0610721eba649dfa205b0d3c4b3e24d67aa1d781 | [
"MIT"
] | null | null | null | migrations/versions/63c5fe144a13_adding_user_controls.py | ukblumf/randomise-it | 0610721eba649dfa205b0d3c4b3e24d67aa1d781 | [
"MIT"
] | null | null | null | migrations/versions/63c5fe144a13_adding_user_controls.py | ukblumf/randomise-it | 0610721eba649dfa205b0d3c4b3e24d67aa1d781 | [
"MIT"
] | null | null | null | """Adding User Controls
Revision ID: 63c5fe144a13
Revises: 840486fe2851
Create Date: 2020-09-08 16:49:49.286078
"""
# revision identifiers, used by Alembic.
revision = '63c5fe144a13'
down_revision = '840486fe2851'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by A... | 35.731707 | 101 | 0.70785 |
7951a3726c0518bd81550799563609dff773cac5 | 16,566 | py | Python | training/training_code/bert/create_pretraining_data.py | yil532/MAX-Text-Sentiment-Classifier | 6f40c4f5def7d0a0ddd96cfc3e382d4c936b7ac6 | [
"Apache-2.0"
] | null | null | null | training/training_code/bert/create_pretraining_data.py | yil532/MAX-Text-Sentiment-Classifier | 6f40c4f5def7d0a0ddd96cfc3e382d4c936b7ac6 | [
"Apache-2.0"
] | null | null | null | training/training_code/bert/create_pretraining_data.py | yil532/MAX-Text-Sentiment-Classifier | 6f40c4f5def7d0a0ddd96cfc3e382d4c936b7ac6 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 37.735763 | 86 | 0.62091 |
7951a3a63ef8b1e1c3cab3782b242a9784ccd584 | 5,632 | py | Python | src/modelSuite/atanProfile.py | mirofedurco/PyAstronomy | b0e5806a18bde647654e6c9de323327803722864 | [
"MIT"
] | 98 | 2015-01-01T12:46:05.000Z | 2022-02-13T14:17:36.000Z | src/modelSuite/atanProfile.py | mirofedurco/PyAstronomy | b0e5806a18bde647654e6c9de323327803722864 | [
"MIT"
] | 46 | 2015-02-10T19:53:38.000Z | 2022-01-11T17:26:05.000Z | src/modelSuite/atanProfile.py | mirofedurco/PyAstronomy | b0e5806a18bde647654e6c9de323327803722864 | [
"MIT"
] | 38 | 2015-01-08T17:00:34.000Z | 2022-03-04T05:15:22.000Z | from __future__ import print_function, division
from PyAstronomy import funcFit as fuf
import numpy as np
class AtanProfile(fuf.OneDFit):
"""
A profile based on the arc tangent function.
This class implements the following profile:
.. math::
f(x) = \\frac{A}{2\\arctan(\\sigma)} \\times \\... | 33.927711 | 112 | 0.558416 |
7951a478888d514f45639c78e64ccc8c6d0df8e7 | 1,033 | py | Python | shortener/schema.py | Shivansh2407/octr.ix | c5d46de1c26344f32aa0c6514471a85c795a70dd | [
"MIT"
] | null | null | null | shortener/schema.py | Shivansh2407/octr.ix | c5d46de1c26344f32aa0c6514471a85c795a70dd | [
"MIT"
] | 5 | 2020-11-28T13:38:22.000Z | 2022-02-10T02:34:12.000Z | shortener/schema.py | Shivansh2407/octr.ix | c5d46de1c26344f32aa0c6514471a85c795a70dd | [
"MIT"
] | null | null | null | import graphene
from graphene_django import DjangoObjectType
from django.db.models import Q
from .models import URL
class URLType(DjangoObjectType):
class Meta:
model = URL
class Query(graphene.ObjectType):
urls = graphene.List(URLType, url=graphene.String(), first=graphene.Int(), skip=graphene.Int... | 21.978723 | 99 | 0.64666 |
7951a4d138b7f909d0b12efdf23a67ce826f1e7d | 11,963 | py | Python | bosch_arm/bosch_arm_control/nodes/plotter4.py | atp42/jks-ros-pkg | 367fc00f2a9699f33d05c7957d319a80337f1ed4 | [
"FTL"
] | 3 | 2017-02-02T13:27:45.000Z | 2018-06-17T11:52:13.000Z | bosch_arm/bosch_arm_control/nodes/plotter4.py | salisbury-robotics/jks-ros-pkg | 367fc00f2a9699f33d05c7957d319a80337f1ed4 | [
"FTL"
] | null | null | null | bosch_arm/bosch_arm_control/nodes/plotter4.py | salisbury-robotics/jks-ros-pkg | 367fc00f2a9699f33d05c7957d319a80337f1ed4 | [
"FTL"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import roslib; roslib.load_manifest('bosch_arm_control')
import rospy
from sensor_msgs.msg import JointState
from bma180.msg import bma180meas
from bosch_arm_control.msg import Diagnostic
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.Qwt5 import *
#... | 30.133501 | 68 | 0.645323 |
7951a5f2fd88f726385cff5ef5d8c57fff04757d | 895 | py | Python | servers/web/django/server/urls.py | ericharmeling/photoblocks | b5c61e4d5b459336145647c877daa5d27a8440e6 | [
"MIT"
] | 2 | 2018-06-21T13:57:09.000Z | 2018-07-11T01:38:07.000Z | servers/web/django/server/urls.py | ericharmeling/photoblocks | b5c61e4d5b459336145647c877daa5d27a8440e6 | [
"MIT"
] | null | null | null | servers/web/django/server/urls.py | ericharmeling/photoblocks | b5c61e4d5b459336145647c877daa5d27a8440e6 | [
"MIT"
] | 1 | 2018-11-21T21:13:03.000Z | 2018-11-21T21:13:03.000Z | """rest URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vi... | 31.964286 | 77 | 0.696089 |
7951a6488542efa0bd4c0afe383448663e93ffe9 | 4,382 | py | Python | tests/test_scripts/output/genpython/inheritedid_ncvs.py | smartniz/linkml | 5edc319c7f63378b024d89f5dd8f34b68b41cf11 | [
"CC0-1.0"
] | null | null | null | tests/test_scripts/output/genpython/inheritedid_ncvs.py | smartniz/linkml | 5edc319c7f63378b024d89f5dd8f34b68b41cf11 | [
"CC0-1.0"
] | null | null | null | tests/test_scripts/output/genpython/inheritedid_ncvs.py | smartniz/linkml | 5edc319c7f63378b024d89f5dd8f34b68b41cf11 | [
"CC0-1.0"
] | null | null | null | # Auto generated from inheritedid.yaml by pythongen.py version: 0.9.0
# Generation date: 2022-02-01T06:40:25
# Schema: test_inherited_id
#
# id: https://example.org/inheritedid
# description: Test
# license: https://creativecommons.org/publicdomain/zero/1.0/
import dataclasses
import sys
import re
from jsonasobj2 impo... | 27.734177 | 109 | 0.711775 |
7951a67a81a74d155619ca9f83823ee4165c34b0 | 2,835 | py | Python | test/HDFSHandlerTest.py | cedricg92/event-manager | d07fafe88dca06a4d1a07e2a368122b0fb18ccfd | [
"Apache-2.0"
] | null | null | null | test/HDFSHandlerTest.py | cedricg92/event-manager | d07fafe88dca06a4d1a07e2a368122b0fb18ccfd | [
"Apache-2.0"
] | null | null | null | test/HDFSHandlerTest.py | cedricg92/event-manager | d07fafe88dca06a4d1a07e2a368122b0fb18ccfd | [
"Apache-2.0"
] | null | null | null | import os
import shutil
from ptest.assertion import assert_true
from ptest.decorator import TestClass, BeforeMethod, Test, AfterMethod
from watchdog.events import FileCreatedEvent
from shirp.event import EventConf
from shirp.handler import HDFSHandler
HDFS_GROUP = "grp-hdfs"
@TestClass(run_mode="singleline")
class... | 46.47541 | 111 | 0.649383 |
7951a69dbdb6179b869fd219bad4bf214a94f1a6 | 21,724 | py | Python | mmdet/models/backbones/pvt.py | hyperlist/mmdetection | ba4918de7fb21a96edc373584fa21a17d098a843 | [
"Apache-2.0"
] | null | null | null | mmdet/models/backbones/pvt.py | hyperlist/mmdetection | ba4918de7fb21a96edc373584fa21a17d098a843 | [
"Apache-2.0"
] | null | null | null | mmdet/models/backbones/pvt.py | hyperlist/mmdetection | ba4918de7fb21a96edc373584fa21a17d098a843 | [
"Apache-2.0"
] | null | null | null | import math
import warnings
import numpy as np
import paddle
import paddle.nn as nn
from mmcv.cnn import (Conv2d, build_activation_layer, build_norm_layer,
constant_init, normal_init, trunc_normal_init)
from mmcv.cnn.bricks.drop import build_dropout
from mmcv.cnn.bricks.transformer import Multih... | 39.142342 | 79 | 0.571718 |
7951a76b626800c4ae979f851e61de955fb2401c | 24,491 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/public_ip_prefixes_operations.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/public_ip_prefixes_operations.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2018_12_01/operations/public_ip_prefixes_operations.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 46.827916 | 175 | 0.671757 |
7951a7941dd6bc9bef1b322015def6a9a9e06453 | 328 | py | Python | app/pit/forms.py | edynox/iis | 594200506b641cbac249dc6e95d229bea1edeb28 | [
"MIT"
] | null | null | null | app/pit/forms.py | edynox/iis | 594200506b641cbac249dc6e95d229bea1edeb28 | [
"MIT"
] | null | null | null | app/pit/forms.py | edynox/iis | 594200506b641cbac249dc6e95d229bea1edeb28 | [
"MIT"
] | null | null | null | from django.forms import ModelForm
from ..models import Pit
class PitForm(ModelForm):
class Meta:
model = Pit
fields = ['location']
def __init__(self, *args, **kwargs):
super(ModelForm, self).__init__(*args, **kwargs)
self.fields['location'].widget.attrs['class'] = 'form-co... | 25.230769 | 70 | 0.631098 |
7951a7a45fd9bb5bd8c29191cc256e8623d60442 | 237 | py | Python | modules/dbnd/src/dbnd/_core/utils/platform/windows_compatible/pwd.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | modules/dbnd/src/dbnd/_core/utils/platform/windows_compatible/pwd.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 16 | 2020-03-11T09:37:58.000Z | 2022-01-26T10:22:08.000Z | modules/dbnd/src/dbnd/_core/utils/platform/windows_compatible/pwd.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | # patch windows module so python-daemon will work on windows
# this is required for python-daemon<2.2 imported by airflow 1.10.1.
# This issue is resolved in newer versions of python-daemon
def getpwuid(*args, **kwargs):
return -1
| 29.625 | 68 | 0.746835 |
7951a9a9c01a2ec528f5b03589b01025729721cb | 17,899 | py | Python | tensorflow/contrib/distributions/python/kernel_tests/quantized_distribution_test.py | jdehotin/TensorFlow | a6c5f8e4e013e54fed8dfcf49fb6de365f018022 | [
"Apache-2.0"
] | 1 | 2021-06-10T23:59:44.000Z | 2021-06-10T23:59:44.000Z | tensorflow/contrib/distributions/python/kernel_tests/quantized_distribution_test.py | jdehotin/TensorFlow | a6c5f8e4e013e54fed8dfcf49fb6de365f018022 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/distributions/python/kernel_tests/quantized_distribution_test.py | jdehotin/TensorFlow | a6c5f8e4e013e54fed8dfcf49fb6de365f018022 | [
"Apache-2.0"
] | 1 | 2021-12-16T05:34:55.000Z | 2021-12-16T05:34:55.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.91087 | 80 | 0.605118 |
7951ab2d7a199c1f14743cedb1847f1b64fe00ca | 1,056 | py | Python | services/web/utils/errors.py | winnyboy5/Python_API_Boiler | 0f153a77be6ffb56c3343c5405b2a4f52b681082 | [
"MIT"
] | 1 | 2020-12-21T15:20:05.000Z | 2020-12-21T15:20:05.000Z | services/web/utils/errors.py | winnyboy5/Python_API_Boiler | 0f153a77be6ffb56c3343c5405b2a4f52b681082 | [
"MIT"
] | null | null | null | services/web/utils/errors.py | winnyboy5/Python_API_Boiler | 0f153a77be6ffb56c3343c5405b2a4f52b681082 | [
"MIT"
] | null | null | null | from flask import current_app, jsonify
errors = {
"InternalServerError": {
"message": "Something went wrong",
"status": 500
},
"SchemaValidationError": {
"message": "Request is missing required fields",
"status": 400
},
"EmailAlreadyExistsError": {
"message":... | 24.55814 | 69 | 0.573864 |
7951ab94f571d08b0be1fdc8953dfee553c65537 | 940 | py | Python | acrylamid/views/index.py | farleykr/acrylamid | c6c0f60b594d2920f6387ba82b552093d7c5fe1b | [
"BSD-2-Clause-FreeBSD"
] | 61 | 2015-01-15T23:23:11.000Z | 2022-03-24T16:39:31.000Z | acrylamid/views/index.py | farleykr/acrylamid | c6c0f60b594d2920f6387ba82b552093d7c5fe1b | [
"BSD-2-Clause-FreeBSD"
] | 28 | 2015-01-26T22:32:24.000Z | 2022-01-13T01:11:56.000Z | acrylamid/views/index.py | farleykr/acrylamid | c6c0f60b594d2920f6387ba82b552093d7c5fe1b | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2015-01-22T19:26:29.000Z | 2021-06-30T21:53:06.000Z | # -*- encoding: utf-8 -*-
#
# Copyright 2012 Martin Zimmermann <info@posativ.org>. All rights reserved.
# License: BSD Style, 2 clauses -- see LICENSE.
from acrylamid.views import View, Paginator
class Index(View, Paginator):
"""Creates nicely paged listing of your posts. First page renders to ``route``
(def... | 30.322581 | 82 | 0.594681 |
7951abf8d29d16879cc0f408148f1092242511f7 | 10,661 | py | Python | changastuff.py | trquinn/custom_python_packages | 1d623a278832b58da28ff76ddea0ccd9a3c3ef15 | [
"MIT"
] | null | null | null | changastuff.py | trquinn/custom_python_packages | 1d623a278832b58da28ff76ddea0ccd9a3c3ef15 | [
"MIT"
] | null | null | null | changastuff.py | trquinn/custom_python_packages | 1d623a278832b58da28ff76ddea0ccd9a3c3ef15 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Contains various functions for submitting ChaNGa jobs to hyak. These are quite
platform specific.
Created on Wed Oct 29 13:30:56 2014
@author: ibackus
"""
import os
import glob
import re
from subprocess import Popen, PIPE
import pynbody
import isaac
import ICglobal_settings
global_settin... | 30.115819 | 180 | 0.611669 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.