hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2123a82bab1905a969a9be5bf50c16e29dd84850 | 2,475 | py | Python | docs/conf.py | thedjinn/blueair-py | 6b10a3f7c2a13560af682ceef8c631b249bb41ed | [
"MIT"
] | 1 | 2021-12-19T02:07:17.000Z | 2021-12-19T02:07:17.000Z | docs/conf.py | aijayadams/blueair-py | 8887748d26c5ea1add1afaa287d8cbf04d692c6c | [
"MIT"
] | 1 | 2021-12-18T14:35:04.000Z | 2021-12-18T14:35:04.000Z | docs/conf.py | aijayadams/blueair-py | 8887748d26c5ea1add1afaa287d8cbf04d692c6c | [
"MIT"
] | 2 | 2021-02-20T02:11:00.000Z | 2021-06-14T05:55:07.000Z | """Configuration file for the Sphinx documentation builder."""
import os
import sys
# Add the parent directory to the module path
sys.path.insert(0, os.path.abspath(os.pardir))
# -- Project information -----------------------------------------------------
project = 'Blueair'
copyright = '2020, Emil Loer'
author = '... | 28.125 | 78 | 0.653333 |
2123bb59a92d3c295e02e86ab2d69c439f6fd091 | 739 | py | Python | binder/pages/views.py | ananthb/binder | ab8a342c556e8b2d9678b32a257e989a32e5bd1f | [
"MIT"
] | null | null | null | binder/pages/views.py | ananthb/binder | ab8a342c556e8b2d9678b32a257e989a32e5bd1f | [
"MIT"
] | null | null | null | binder/pages/views.py | ananthb/binder | ab8a342c556e8b2d9678b32a257e989a32e5bd1f | [
"MIT"
] | null | null | null | """
binder.pages.views
~~~~~~~~~~~~~~~
Static pages are rendered here
:copyright: (c) 2015 by Ananth Bhaskararaman
:license: MIT, See LICENSE for more details
"""
from flask import Blueprint, render_template, redirect, url_for
from flask_menu import register_menu
from flask.ext.login import curre... | 22.393939 | 63 | 0.688769 |
2123c4a62c470815f2270655edc6884351f12da3 | 1,896 | py | Python | mi/dataset/driver/spkir_abj/dcl/spkir_abj_dcl_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/spkir_abj/dcl/spkir_abj_dcl_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/spkir_abj/dcl/spkir_abj_dcl_recovered_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | # #
# OOIPLACEHOLDER
#
# Copyright 2014 Raytheon Co.
##
__author__ = "mworden"
import os
from mi.core.log import get_logger
from mi.logging import config
from mi.dataset.parser.spkir_abj_dcl import SpkirAbjDclRecoveredParser
from mi.dataset.dataset_driver import DataSetDriver
from mi.dataset.dataset_parser import D... | 32.689655 | 97 | 0.648207 |
2123d4b6fcb710dd355e53cee275d84918d3106d | 541 | py | Python | controller/part_id_to_name_converter.py | EmilRyberg/P6BinPicking | c33b650db3ae16c56d46d12bfbc59d26c0d9e6aa | [
"MIT"
] | 1 | 2021-08-04T16:18:22.000Z | 2021-08-04T16:18:22.000Z | controller/part_id_to_name_converter.py | EmilRyberg/P6BinPicking | c33b650db3ae16c56d46d12bfbc59d26c0d9e6aa | [
"MIT"
] | null | null | null | controller/part_id_to_name_converter.py | EmilRyberg/P6BinPicking | c33b650db3ae16c56d46d12bfbc59d26c0d9e6aa | [
"MIT"
] | 1 | 2021-08-03T03:41:41.000Z | 2021-08-03T03:41:41.000Z | import numpy as np
import math
from controller.enums import PartEnum
def part_id_to_name(part_id):
if part_id == PartEnum.BACKCOVER.value:
return "Back cover"
elif part_id == PartEnum.PCB.value:
return "PCB"
elif part_id == PartEnum.FUSE.value:
return "Fuse"
elif part_id == Par... | 28.473684 | 46 | 0.676525 |
2123da5aab404273cc5c1f1bbc38b5afe006c55a | 2,623 | py | Python | armi/materials/tests/test_lithium.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/materials/tests/test_lithium.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/materials/tests/test_lithium.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 31.987805 | 75 | 0.69005 |
21241050e39dc5fd33ad3bb0509c37850d8ab5e7 | 2,994 | py | Python | pandas/sparse/tests/test_list.py | ssalonen/pandas | 1929563fdb5358a41420d103a388aa2bd494d543 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 26 | 2018-02-14T23:52:58.000Z | 2021-08-16T13:50:03.000Z | pandas/sparse/tests/test_list.py | pierre-haessig/pandas | f9e0b7df8ca8a92133d3cea0a26181140f991e2d | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/sparse/tests/test_list.py | pierre-haessig/pandas | f9e0b7df8ca8a92133d3cea0a26181140f991e2d | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 10 | 2018-08-13T19:38:39.000Z | 2020-04-19T03:02:00.000Z | from pandas.compat import range
import unittest
from numpy import nan
import numpy as np
from pandas.sparse.api import SparseList, SparseArray
from pandas.util.testing import assert_almost_equal
from .test_sparse import assert_sp_array_equal
def assert_sp_list_equal(left, right):
assert_sp_array_equal(left.to_... | 27.722222 | 75 | 0.613894 |
21241fabd3b3c54b76a85f8a3f91094b6c74b3fc | 1,383 | py | Python | app/inbound_number/rest.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | 51 | 2016-04-03T23:36:17.000Z | 2022-03-21T20:04:52.000Z | app/inbound_number/rest.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | 1,335 | 2015-12-15T14:28:50.000Z | 2022-03-30T16:24:27.000Z | app/inbound_number/rest.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | 30 | 2016-01-08T19:05:32.000Z | 2021-12-20T16:37:23.000Z | from flask import Blueprint, jsonify
from app.dao.inbound_numbers_dao import (
dao_get_available_inbound_numbers,
dao_get_inbound_number_for_service,
dao_get_inbound_numbers,
dao_set_inbound_number_active_flag,
)
from app.errors import register_errors
inbound_number_blueprint = Blueprint('inbound_numb... | 34.575 | 94 | 0.796819 |
21242025433b756355a9b2a6c3f6b2d93fd9da2a | 703 | py | Python | exos/20191202/suffixes.py | afafe78/python-im | c831eb92c163084bb3c9098e40d28e7ba8600319 | [
"MIT"
] | 7 | 2016-09-29T07:20:25.000Z | 2021-03-15T15:00:06.000Z | exos/20191202/suffixes.py | afafe78/python-im | c831eb92c163084bb3c9098e40d28e7ba8600319 | [
"MIT"
] | null | null | null | exos/20191202/suffixes.py | afafe78/python-im | c831eb92c163084bb3c9098e40d28e7ba8600319 | [
"MIT"
] | 11 | 2017-01-12T18:50:49.000Z | 2021-02-28T22:44:29.000Z | # -*- coding: utf-8 -*-
"""
Trouver les noms avec les suffixes 'ure', 'ment', 'a|ible', 'ette', 'ion', 'age' dans lexique.org
"""
import csv
import re
from collections import defaultdict
lexique = 'Lexique383.tsv'
suffixes = ['ure', 'ment', '(a|i)ble', 'ette', 'ion', 'age']
res = defaultdict(set)
with open(lexiq... | 27.038462 | 97 | 0.559033 |
212420a94898ef3c42b4d2fc44d97b8b4c8d0905 | 4,438 | py | Python | src/rprblender/engine/preview_engine.py | ralic/RadeonProRenderBlenderAddon | 310c650d4230289ac5d5407cc24a13b4c7ce0a90 | [
"Apache-2.0"
] | 1 | 2021-03-29T05:55:49.000Z | 2021-03-29T05:55:49.000Z | src/rprblender/engine/preview_engine.py | ralic/RadeonProRenderBlenderAddon | 310c650d4230289ac5d5407cc24a13b4c7ce0a90 | [
"Apache-2.0"
] | 1 | 2021-04-03T09:39:28.000Z | 2021-04-03T09:39:28.000Z | src/rprblender/engine/preview_engine.py | isabella232/RadeonProRenderBlenderAddon | ff4ede164c1e1e909f182be709422bc8c8878b1c | [
"Apache-2.0"
] | null | null | null | #**********************************************************************
# Copyright 2020 Advanced Micro Devices, Inc
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | 36.377049 | 94 | 0.65863 |
21245efee835d1b5e03d9ad97d43bab108a56a81 | 3,288 | py | Python | tests/test_aio_aws_s3.py | dazza-codes/pytest-aiomoto | f922ae99e00fc89f0d51a677dab5bc9ec7255de4 | [
"Apache-2.0"
] | 1 | 2021-12-07T02:41:56.000Z | 2021-12-07T02:41:56.000Z | tests/test_aio_aws_s3.py | dazza-codes/pytest-aiomoto | f922ae99e00fc89f0d51a677dab5bc9ec7255de4 | [
"Apache-2.0"
] | 5 | 2021-12-28T04:20:40.000Z | 2022-03-24T08:18:30.000Z | tests/test_aio_aws_s3.py | dazza-codes/pytest-aiomoto | f922ae99e00fc89f0d51a677dab5bc9ec7255de4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2021 Darren Weber
#
# 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 writ... | 34.610526 | 93 | 0.757299 |
2124664b40ce7d574b78398c90858a729b4dc260 | 14,214 | py | Python | sandbox/grist/objtypes.py | petarnikolovski/grist-core | aa3fe975e799ebe81873c71ff9c40ff679f4b860 | [
"Apache-2.0"
] | 1 | 2022-02-19T08:37:33.000Z | 2022-02-19T08:37:33.000Z | sandbox/grist/objtypes.py | davgit/grist-core | 6d941fb5a3eab008c424bdce70dbb906d6925324 | [
"Apache-2.0"
] | 14 | 2021-10-01T17:59:40.000Z | 2021-12-27T23:23:59.000Z | sandbox/grist/objtypes.py | davgit/grist-core | 6d941fb5a3eab008c424bdce70dbb906d6925324 | [
"Apache-2.0"
] | null | null | null | """
This module implements handling of non-primitive objects as values in Grist data cells. It is
currently only used to handle errors thrown from formulas.
Non-primitive values are represented in actions as [type_name, args...].
objtypes.register_converter() - registers a new supported object type.
objtypes.encod... | 35.358209 | 98 | 0.699311 |
21247fa741bcd8a08c28ba4dd37618651a5e831d | 4,406 | py | Python | qa_classifier.py | frkl/SOBERT-XVQA-demo | c99d2f36d9ed275dfd3ba25c200019bbde197d4f | [
"Apache-2.0"
] | 2 | 2021-07-25T12:44:29.000Z | 2021-07-27T08:55:48.000Z | qa_classifier.py | frkl/SOBERT-XVQA-demo | c99d2f36d9ed275dfd3ba25c200019bbde197d4f | [
"Apache-2.0"
] | null | null | null | qa_classifier.py | frkl/SOBERT-XVQA-demo | c99d2f36d9ed275dfd3ba25c200019bbde197d4f | [
"Apache-2.0"
] | 1 | 2021-07-25T12:44:30.000Z | 2021-07-25T12:44:30.000Z | from collections import defaultdict
import json
import numpy as np
import csv
def text2int(textnum, numwords={}):
#w2v = self.w2v
'''
Code adapted from :
https://stackoverflow.com/questions/493174/is-there-a-way-to-convert-number-words-to-integers answer by recursive username.
... | 34.692913 | 309 | 0.527463 |
212491489677aa28330ddd0395a01d26b432e245 | 4,032 | py | Python | contrast/environment/scheduling.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | contrast/environment/scheduling.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | 2 | 2018-09-19T06:49:03.000Z | 2019-06-28T10:47:37.000Z | contrast/environment/scheduling.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | """
Module which provides Scheduler classes, which help the acquisition
system determine whether the instrument is ready to acquire, and if
there are any deadlines coming up that have to be avoided.
"""
import time
from threading import Thread
try:
import tango
except:
pass # makes building docs easier
clas... | 30.778626 | 78 | 0.59127 |
2124f02f9e58dfb26eed52140ca94ae1d4dbfa6f | 2,626 | py | Python | mne/tests/test_cov.py | mluessi/mne-python | aef0cd79b0543c6d121de236098bd7865feff39e | [
"BSD-3-Clause"
] | 1 | 2022-03-23T22:26:50.000Z | 2022-03-23T22:26:50.000Z | mne/tests/test_cov.py | neurodebian/mne-python | 44a5ef5241a748b2f77c62fdcda6334220c6af45 | [
"BSD-3-Clause"
] | null | null | null | mne/tests/test_cov.py | neurodebian/mne-python | 44a5ef5241a748b2f77c62fdcda6334220c6af45 | [
"BSD-3-Clause"
] | null | null | null | import os.path as op
from nose.tools import assert_true
from numpy.testing import assert_array_almost_equal
from scipy import linalg
from .. import Covariance, read_cov, Epochs, merge_events, \
find_events, write_cov_file, compute_raw_data_covariance, \
compute_covariance
from ..fiff imp... | 34.552632 | 75 | 0.636329 |
2124f19f927be127528086ec8026b45a3160632b | 3,064 | py | Python | runtime/test/specs/AIDL_V2/batch_matmul.mod.py | riscv-android-src/platform-packages-modules-NeuralNetworks | 32a7fbe0cec3a17f9cdd8c6f11d94ae77e30add5 | [
"Apache-2.0"
] | null | null | null | runtime/test/specs/AIDL_V2/batch_matmul.mod.py | riscv-android-src/platform-packages-modules-NeuralNetworks | 32a7fbe0cec3a17f9cdd8c6f11d94ae77e30add5 | [
"Apache-2.0"
] | null | null | null | runtime/test/specs/AIDL_V2/batch_matmul.mod.py | riscv-android-src/platform-packages-modules-NeuralNetworks | 32a7fbe0cec3a17f9cdd8c6f11d94ae77e30add5 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2021 The Android Open Source Project
#
# 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 la... | 37.365854 | 76 | 0.601828 |
212507cab97d0da1352804ae1e3d8a4cc4f1fa47 | 1,266 | py | Python | models/BayesianModels/regression/Bayesian3Liner.py | Neronjust2017/BayesianCNN | 33fc227b3ec2ff9cde816403db6aa4ae68d586e2 | [
"MIT"
] | 2 | 2020-07-07T12:29:07.000Z | 2021-04-12T12:49:40.000Z | models/BayesianModels/regression/Bayesian3Liner.py | Neronjust2017/BayesianCNN | 33fc227b3ec2ff9cde816403db6aa4ae68d586e2 | [
"MIT"
] | 1 | 2021-05-18T13:12:18.000Z | 2021-05-18T13:12:18.000Z | models/BayesianModels/regression/Bayesian3Liner.py | Neronjust2017/BayesianCNN | 33fc227b3ec2ff9cde816403db6aa4ae68d586e2 | [
"MIT"
] | 3 | 2020-05-29T08:05:51.000Z | 2021-05-26T13:19:36.000Z | import math
import torch
import torch.nn as nn
from layers.BBBConv1d import BBBConv1d
from layers.BBBLinear import BBBLinear
from layers.misc import FlattenLayer, ModuleWrapper
from tensorboardX import SummaryWriter
from torch.autograd import Variable
from torchviz import make_dot
class BBB3Liner(ModuleWrapper):
"... | 32.461538 | 85 | 0.678515 |
21254e421eff5221492f20d0637769a3dc5efac3 | 2,449 | py | Python | inria-aerial-image-labeling/prepare_data.py | tanguy-magne/ritm_interactive_segmentation | 53e55253a1ff879f370525bdbddf026402a19ff9 | [
"MIT"
] | null | null | null | inria-aerial-image-labeling/prepare_data.py | tanguy-magne/ritm_interactive_segmentation | 53e55253a1ff879f370525bdbddf026402a19ff9 | [
"MIT"
] | null | null | null | inria-aerial-image-labeling/prepare_data.py | tanguy-magne/ritm_interactive_segmentation | 53e55253a1ff879f370525bdbddf026402a19ff9 | [
"MIT"
] | null | null | null | """
This script is used to create image and ground truth patches from original data files.
Before executing this script be sure to:
1) Fill in the form and download data from https://project.inria.fr/aerialimagelabeling/download/
2) Extract downloaded files and place them into "data" folder using the following folder s... | 31 | 99 | 0.619028 |
2125693659e8f79f6fd5a25c001678be2327d1f9 | 11,986 | py | Python | rock4/softtest/pad/uiautomator/driver.py | RockFeng0/rock4automation | a29270ab9fa4cdc79f6453971b7c7a21f01442b0 | [
"MIT"
] | 5 | 2018-09-25T05:49:49.000Z | 2021-12-30T11:06:09.000Z | rock4/softtest/pad/uiautomator/driver.py | RockFeng0/rock4automation | a29270ab9fa4cdc79f6453971b7c7a21f01442b0 | [
"MIT"
] | 3 | 2018-04-01T04:27:21.000Z | 2019-01-03T11:02:33.000Z | rock4/softtest/pad/uiautomator/driver.py | RockFeng0/rock4automation | a29270ab9fa4cdc79f6453971b7c7a21f01442b0 | [
"MIT"
] | 7 | 2018-09-25T05:49:51.000Z | 2021-12-30T11:06:11.000Z | # -*- encoding: utf-8 -*-
'''
Current module: pyrunner.drivers.uiautomator.driver
Rough version history:
v1.0 Original version to use
********************************************************************
@AUTHOR: Administrator-Bruce Luo(罗科峰)
MAIL: lkf20031988@163.com
RCS: rock4.softte... | 28.8125 | 147 | 0.539963 |
212574b7d4112f99b3e2012083e0c63b1b931a19 | 6,520 | py | Python | PALM/others/transformers/tokenization_roberta.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | 1 | 2021-08-05T05:41:50.000Z | 2021-08-05T05:41:50.000Z | PALM/others/transformers/tokenization_roberta.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | null | null | null | PALM/others/transformers/tokenization_roberta.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | 1 | 2021-07-10T09:50:47.000Z | 2021-07-10T09:50:47.000Z | # coding=utf-8
# Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 46.241135 | 122 | 0.664571 |
2125819039ada15b27699bbfda21be51cf7fd7ad | 3,968 | py | Python | alipay/aop/api/request/ZhimaCreditPeZmgoBizoptCloseRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/ZhimaCreditPeZmgoBizoptCloseRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/ZhimaCreditPeZmgoBizoptCloseRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ZhimaCreditPeZmgoBizoptCloseModel import ZhimaCreditPeZmgoBizoptCloseModel
class ZhimaCreditPeZmgoBizoptCloseRequest(object):
d... | 27.365517 | 148 | 0.644153 |
212584c32f734b89417ac516b4cdfa3f2fb6d987 | 456 | py | Python | src/ext/restapi/__init__.py | kackey0-1/project_ai | 8b309eb1e0cbc46e4a9b134adcd0b44e5657f709 | [
"MIT"
] | 1 | 2022-02-24T16:24:56.000Z | 2022-02-24T16:24:56.000Z | src/ext/restapi/__init__.py | kackey0-1/project_ai | 8b309eb1e0cbc46e4a9b134adcd0b44e5657f709 | [
"MIT"
] | 2 | 2021-12-27T15:12:09.000Z | 2022-02-06T14:14:36.000Z | src/ext/restapi/__init__.py | kackey0-1/project_ai | 8b309eb1e0cbc46e4a9b134adcd0b44e5657f709 | [
"MIT"
] | null | null | null | from flask import Blueprint
from flask_restful import Api
from .resources import ImageAiResource
from .sentences import SentenceResource, SentenceItemResource
bp = Blueprint("restapi", __name__, url_prefix="/api/v1")
api = Api(bp)
def init_app(app):
api.add_resource(ImageAiResource, "/upload/")
api.add_reso... | 28.5 | 67 | 0.769737 |
212586c6bd8583921d1d9046675c003e80ec33a6 | 2,477 | py | Python | hypereditor/hyper_blocks.py | lhmisho/django-hyper-editor | 82c0a64294baf20fbea3e00789c4387624365409 | [
"MIT"
] | null | null | null | hypereditor/hyper_blocks.py | lhmisho/django-hyper-editor | 82c0a64294baf20fbea3e00789c4387624365409 | [
"MIT"
] | null | null | null | hypereditor/hyper_blocks.py | lhmisho/django-hyper-editor | 82c0a64294baf20fbea3e00789c4387624365409 | [
"MIT"
] | null | null | null | from hypereditor.blocks.base import Block
from hypereditor.blocks import get_block_class_for, register
@register('column')
class ColumnBlock(Block):
external = True
def _build_col_class(self, colSettings):
col_class = []
if colSettings:
for sz in ['XS', 'SM', 'MD', 'LG']:
... | 29.141176 | 96 | 0.479209 |
2125c0f4eade8e32a26c733466ef32a8853ec1c8 | 924 | py | Python | elastic_feeder/scripts/commands.py | AliyevH/elasticfeed | 15613ef5f545982c1e018e82fa9f47d1cf0f2684 | [
"MIT"
] | 3 | 2020-09-10T13:56:17.000Z | 2020-11-23T22:32:02.000Z | elastic_feeder/scripts/commands.py | AliyevH/elk_feeder | 15613ef5f545982c1e018e82fa9f47d1cf0f2684 | [
"MIT"
] | null | null | null | elastic_feeder/scripts/commands.py | AliyevH/elk_feeder | 15613ef5f545982c1e018e82fa9f47d1cf0f2684 | [
"MIT"
] | 1 | 2020-09-17T12:04:39.000Z | 2020-09-17T12:04:39.000Z | import click
from elastic_feeder.controller import FeedElastic
@click.group()
def cli():
""" Group cli"""
@cli.command(help="Example: elasticfeed --host 127.0.0.1 --port 9200 <full filepath>")
@click.option("--host", default="localhost", help="Host name or Ip address", show_default=True)
@click.option("--port",... | 26.4 | 95 | 0.660173 |
2125de487f3d1a3f6e1847ec84f984bdc17f52a8 | 11,487 | py | Python | scripts/benchmark_custom.py | LaudateCorpus1/edgeai-benchmark | bc7f3c52862133f5fe8409248c21887b3f930a68 | [
"BSD-3-Clause"
] | 7 | 2021-07-31T16:41:57.000Z | 2022-03-30T23:29:12.000Z | scripts/benchmark_custom.py | LaudateCorpus1/edgeai-benchmark | bc7f3c52862133f5fe8409248c21887b3f930a68 | [
"BSD-3-Clause"
] | 3 | 2022-02-09T17:39:02.000Z | 2022-03-30T07:07:06.000Z | scripts/benchmark_custom.py | LaudateCorpus1/edgeai-benchmark | bc7f3c52862133f5fe8409248c21887b3f930a68 | [
"BSD-3-Clause"
] | 3 | 2021-11-15T01:44:32.000Z | 2022-01-20T05:19:27.000Z | # Copyright (c) 2018-2021, Texas Instruments
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of condition... | 50.827434 | 152 | 0.73457 |
2125ecfdbf6672148346c2443b2eb58bc9ed6817 | 691 | py | Python | toontown/dna/DNASuitEdge.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/dna/DNASuitEdge.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/dna/DNASuitEdge.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z |
class DNASuitEdge(object):
__slots__ = (
'startpt', 'endpt', 'zoneId')
def __init__(self, startpt, endpt, zoneId):
self.startpt = startpt
self.endpt = endpt
self.zoneId = zoneId
def __del__(self):
del self.startpt
del self.endpt
del self.zoneId
... | 21.59375 | 47 | 0.586107 |
2126101adbd4d0e135a28a24d2dc5c5a9a11bb66 | 108 | py | Python | ibms_project/ibms/apps.py | mohdbakhrayba/ibms | 029e1f3bf108586289c65bb1d547f86851f9494f | [
"Apache-2.0"
] | null | null | null | ibms_project/ibms/apps.py | mohdbakhrayba/ibms | 029e1f3bf108586289c65bb1d547f86851f9494f | [
"Apache-2.0"
] | null | null | null | ibms_project/ibms/apps.py | mohdbakhrayba/ibms | 029e1f3bf108586289c65bb1d547f86851f9494f | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class IBMSConfig(AppConfig):
name = 'ibms'
verbose_name = 'IBMS'
| 18 | 33 | 0.712963 |
2126216d78a52ca2aaf3cfa6556d147ef51d9d52 | 455 | py | Python | windscribe/__init__.py | BergLucas/Python-Windscribe | 001e82ad1bbc7a5ba9222ef026563903183429d7 | [
"MIT"
] | null | null | null | windscribe/__init__.py | BergLucas/Python-Windscribe | 001e82ad1bbc7a5ba9222ef026563903183429d7 | [
"MIT"
] | null | null | null | windscribe/__init__.py | BergLucas/Python-Windscribe | 001e82ad1bbc7a5ba9222ef026563903183429d7 | [
"MIT"
] | 1 | 2021-05-13T03:36:43.000Z | 2021-05-13T03:36:43.000Z | __all__ = [
"version",
"locations",
"random_connect",
"connect",
"disconnect",
"login",
"logout",
"status",
"account",
"WindscribeLocation",
"WindscribeStatus",
"WindscribeAccount",
]
from .windscribe import (
version,
locations,
random_connect,
connect,
... | 15.166667 | 25 | 0.595604 |
21262eddd030b093c98854ab52b588e2bb2d27aa | 2,642 | py | Python | hoverset/data/actions.py | tjmoran/Formation | ff1e0a307fffaa65251736a48fefb23fe9ee75dd | [
"MIT"
] | 71 | 2020-06-19T11:17:35.000Z | 2022-03-24T02:51:54.000Z | hoverset/data/actions.py | tjmoran/Formation | ff1e0a307fffaa65251736a48fefb23fe9ee75dd | [
"MIT"
] | 11 | 2020-06-20T19:04:02.000Z | 2022-03-01T04:42:36.000Z | hoverset/data/actions.py | tjmoran/Formation | ff1e0a307fffaa65251736a48fefb23fe9ee75dd | [
"MIT"
] | 6 | 2020-11-15T01:38:53.000Z | 2021-12-25T07:14:23.000Z | # ======================================================================= #
# Copyright (C) 2020 Hoverset Group. #
# ======================================================================= #
"""
A store and manager for all application functions and routines
"""
class Routine:
... | 25.901961 | 82 | 0.597653 |
2126575f1616e8fe17e42b8f4a7fa4dac9778b0e | 25,693 | py | Python | sim.py | Agross09/WormEvolution | 9d539c628837da002c940bec417719d6582619d6 | [
"MIT"
] | null | null | null | sim.py | Agross09/WormEvolution | 9d539c628837da002c940bec417719d6582619d6 | [
"MIT"
] | null | null | null | sim.py | Agross09/WormEvolution | 9d539c628837da002c940bec417719d6582619d6 | [
"MIT"
] | 1 | 2019-05-05T00:27:08.000Z | 2019-05-05T00:27:08.000Z | # Copyright 2018 Alexis Pietak and Joel Grodstein
# See "LICENSE" for further details.
from scipy import integrate
'''
Big picture: what does the network look like?
The network is just a bunch of cells and GJs. However, there is no "class
cell" or "class GJ".
Instead, our data structure is most just a bunch... | 47.143119 | 107 | 0.648387 |
21267b43c437ac1bade2947284a6e041c07b2789 | 3,544 | py | Python | alphatwirl_interface/tree.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | null | null | null | alphatwirl_interface/tree.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | 4 | 2018-03-05T13:48:26.000Z | 2018-03-19T12:28:56.000Z | alphatwirl_interface/tree.py | benkrikler/alphatwirl-interface | ce9b3775b099fbcc55402be2df0e4f2e477d8e6d | [
"BSD-3-Clause"
] | 1 | 2018-02-15T17:10:23.000Z | 2018-02-15T17:10:23.000Z | import alphatwirl as at
class EventBuilder(object):
def __init__(self, tree, max_events=-1):
self.tree = tree
self.max_events = max_events
def __repr__(self):
name_value_pairs = (
('tree', self.tree),
('max_events', self.max_events),
)
return '... | 31.642857 | 79 | 0.617664 |
21267d0f62873f615d50e5395aa548d39288cf6a | 232 | py | Python | gunicorn/datadog_checks/gunicorn/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | gunicorn/datadog_checks/gunicorn/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | gunicorn/datadog_checks/gunicorn/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2021-06-21T19:21:51.000Z | 2021-06-21T19:21:51.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .gunicorn import GUnicornCheck
__all__ = [
'__version__',
'GUnicornCheck'
]
| 21.090909 | 59 | 0.732759 |
212692ab6d1cddd48d2214f1a00518038dbff341 | 27,629 | py | Python | SCRAPE/Lib/site-packages/IPython/terminal/interactiveshell.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 2 | 2022-02-26T11:19:40.000Z | 2022-03-28T08:23:25.000Z | SCRAPE/Lib/site-packages/IPython/terminal/interactiveshell.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | null | null | null | SCRAPE/Lib/site-packages/IPython/terminal/interactiveshell.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1 | 2022-03-28T09:19:34.000Z | 2022-03-28T09:19:34.000Z | """IPython terminal interface using prompt_toolkit"""
import asyncio
import os
import sys
import warnings
from warnings import warn
from IPython.core.async_helpers import get_asyncio_loop
from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC
from IPython.utils import io
from IPython.utils.py... | 37.185734 | 133 | 0.625176 |
2126c7cb5af5d755da5a171b3ca58fe767f53a3f | 2,742 | py | Python | dis_snek/ext/debug_scale/__init__.py | ShardlessBun/Dis-Snek | fd15b06c531e82a9682a7b139deec0df7b2aa2d0 | [
"MIT"
] | null | null | null | dis_snek/ext/debug_scale/__init__.py | ShardlessBun/Dis-Snek | fd15b06c531e82a9682a7b139deec0df7b2aa2d0 | [
"MIT"
] | null | null | null | dis_snek/ext/debug_scale/__init__.py | ShardlessBun/Dis-Snek | fd15b06c531e82a9682a7b139deec0df7b2aa2d0 | [
"MIT"
] | null | null | null | import datetime
import logging
import platform
import tracemalloc
from dis_snek import Scale, listen, slash_command, InteractionContext, Timestamp, Intents
from dis_snek.client.const import logger_name, __version__, __py_version__
from dis_snek.models.snek import checks
from .debug_application_cmd import DebugAppCMD
f... | 33.439024 | 104 | 0.678702 |
2126dcb6f45d367e914534584a3e2de2efac1ac3 | 5,036 | py | Python | oscar/lib/python2.7/site-packages/whoosh/filedb/gae.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/whoosh/filedb/gae.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/whoosh/filedb/gae.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """
This module contains EXPERIMENTAL support for storing a Whoosh index's files in
the Google App Engine blobstore. This will use a lot of RAM since all files are
loaded into RAM, but it potentially useful as a workaround for the lack of file
storage in Google App Engine.
Use at your own risk, but please report... | 30.521212 | 80 | 0.630461 |
2126dff2953920622fa0b29677b454fc8cf76c92 | 2,278 | py | Python | sktime/utils/tests/test_utils_forecasting.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2020-09-02T19:39:59.000Z | 2020-09-02T19:39:59.000Z | sktime/utils/tests/test_utils_forecasting.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:26:42.000Z | 2020-04-22T17:09:14.000Z | sktime/utils/tests/test_utils_forecasting.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2022-02-14T18:19:01.000Z | 2022-02-14T18:19:01.000Z | import numpy as np
import pandas as pd
import pytest
from sktime.utils.data_container import tabularize
from sktime.utils._testing import generate_df_from_array
from sktime.utils._testing.forecasting import generate_polynomial_series
from sktime.utils.time_series import add_trend
from sktime.utils.time_series import fi... | 36.15873 | 78 | 0.683494 |
2126fadd7bbd746318a4e6ffabe0b9e38628978c | 1,564 | py | Python | images-preprocessor/src/images_preprocessor/lib/resources/resource_manager.py | HaouziJ/images-preprocessor | c39fafdc772666ef958a77fb09594cb3a6446039 | [
"MIT"
] | null | null | null | images-preprocessor/src/images_preprocessor/lib/resources/resource_manager.py | HaouziJ/images-preprocessor | c39fafdc772666ef958a77fb09594cb3a6446039 | [
"MIT"
] | null | null | null | images-preprocessor/src/images_preprocessor/lib/resources/resource_manager.py | HaouziJ/images-preprocessor | c39fafdc772666ef958a77fb09594cb3a6446039 | [
"MIT"
] | null | null | null | import configparser
import os
class ResourceManager:
def __init__(self, env: str = "dev", resources_folder: str = os.path.dirname(__file__)):
"""
This class is used to generate object to access on properties file
according on environment variable giving as parameter
:param env: P... | 29.509434 | 108 | 0.669437 |
21270c7c6c4c1fce422a82e73d99f1f6da30b5d2 | 5,845 | py | Python | src/website.py | nathanrosspowell/keyset_compatability_checker | 3d18f0c39bfe3af32715b073dd585db725b696ba | [
"MIT"
] | null | null | null | src/website.py | nathanrosspowell/keyset_compatability_checker | 3d18f0c39bfe3af32715b073dd585db725b696ba | [
"MIT"
] | null | null | null | src/website.py | nathanrosspowell/keyset_compatability_checker | 3d18f0c39bfe3af32715b073dd585db725b696ba | [
"MIT"
] | null | null | null | import os
import kcc
from jinja2 import Environment, FileSystemLoader
import random
from operator import itemgetter, attrgetter
from collections import defaultdict
def basename(path):
name = os.path.basename(os.path.normpath(path))
return os.path.splitext(name)[0]
def displayname(path):
return basename(... | 37.229299 | 134 | 0.6142 |
21272de707e45e3b2ba5066adaa8927244c0829d | 2,595 | py | Python | nicos_mlz/spheres/setups/selector.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/spheres/setups/selector.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/spheres/setups/selector.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'setup for the velocity selector'
group = 'lowlevel'
tangohost = 'phys.spheres.frm2'
selector = 'tango://%s:10000/spheres/selector' % tangohost
devices = dict(
selector_speed = device('nicos.devices.entangle.WindowTimeoutAO',
description = 'Selector speed control',
tangodevice = sel... | 32.4375 | 75 | 0.570328 |
212740c3907ce4dc687b585c2a1f4d46152fc72d | 1,665 | py | Python | rally/common/db/migrations/versions/2016_12_37fdbb373e8d_fix_test_results_for_verifications.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 263 | 2015-04-26T16:05:34.000Z | 2022-02-28T11:17:07.000Z | rally/common/db/migrations/versions/2016_12_37fdbb373e8d_fix_test_results_for_verifications.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 19 | 2015-04-23T11:53:10.000Z | 2019-02-20T11:23:09.000Z | rally/common/db/migrations/versions/2016_12_37fdbb373e8d_fix_test_results_for_verifications.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 287 | 2015-04-23T11:28:03.000Z | 2021-09-16T13:05:53.000Z | # 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 agreed to in... | 28.220339 | 78 | 0.705706 |
21277b1e865d61e120379420ebf1d09d81feda7d | 2,133 | py | Python | lib/flask_mailplus.py | cprey/boundtofail | ebe538fc1505ba915b70196ef97ce49a4de9bc73 | [
"MIT"
] | 881 | 2015-05-20T20:09:50.000Z | 2022-03-24T21:07:36.000Z | lib/flask_mailplus.py | cprey/boundtofail | ebe538fc1505ba915b70196ef97ce49a4de9bc73 | [
"MIT"
] | 65 | 2015-05-21T15:58:22.000Z | 2022-02-12T21:57:48.000Z | lib/flask_mailplus.py | cprey/boundtofail | ebe538fc1505ba915b70196ef97ce49a4de9bc73 | [
"MIT"
] | 212 | 2015-05-20T22:23:10.000Z | 2022-03-25T16:28:12.000Z | from flask import render_template
from snakeeyes.extensions import mail
def send_template_message(template=None, ctx=None, *args, **kwargs):
"""
Send a templated e-mail using a similar signature as Flask-Mail:
http://pythonhosted.org/Flask-Mail/
Except, it also supports template rendering. If you wa... | 30.471429 | 78 | 0.655884 |
21277bd82dd002860663170f80a2dc5d285e40d9 | 17,383 | py | Python | musicntd/scripts/overall_scripts.py | ax-le/MusicNTD | 682d67a7b25378200356db5ba9a831e4b05401cb | [
"BSD-3-Clause"
] | null | null | null | musicntd/scripts/overall_scripts.py | ax-le/MusicNTD | 682d67a7b25378200356db5ba9a831e4b05401cb | [
"BSD-3-Clause"
] | null | null | null | musicntd/scripts/overall_scripts.py | ax-le/MusicNTD | 682d67a7b25378200356db5ba9a831e4b05401cb | [
"BSD-3-Clause"
] | 1 | 2021-04-07T17:01:54.000Z | 2021-04-07T17:01:54.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 4 17:34:39 2020
@author: amarmore
"""
# A module containing some high-level scripts for decomposition and/or segmentation.
import soundfile as sf
import librosa.core
import librosa.feature
import tensorly as tl
import os
import numpy as np
import pathlib
import random
... | 43.675879 | 208 | 0.653742 |
212794b5a8d9be618ad0e4ddfb11d6ec49effaa9 | 3,150 | py | Python | comment.py | norbertbin/subredditAnalysis | 1951267f8e1cd993a9a3aa294a9b7e8caee71545 | [
"MIT"
] | null | null | null | comment.py | norbertbin/subredditAnalysis | 1951267f8e1cd993a9a3aa294a9b7e8caee71545 | [
"MIT"
] | null | null | null | comment.py | norbertbin/subredditAnalysis | 1951267f8e1cd993a9a3aa294a9b7e8caee71545 | [
"MIT"
] | null | null | null | import sqlite3 as lite
class Comment:
"""A class for scrapped reddit comments"""
def __init__(self, comment_id, author, created_utc, score, num_replies,
submission_id, parent_id, text):
self.comment_id = comment_id
self.author = author
self.created_utc = created_utc
... | 35 | 79 | 0.55873 |
2127ad4ca70f47d83fbc336e319fa58079f74bf9 | 4,428 | py | Python | src/data/dataset.py | SO0529/sea-image-converter | c23a14a6574d0e18471622ba72099b48e9bfdd6b | [
"MIT"
] | null | null | null | src/data/dataset.py | SO0529/sea-image-converter | c23a14a6574d0e18471622ba72099b48e9bfdd6b | [
"MIT"
] | null | null | null | src/data/dataset.py | SO0529/sea-image-converter | c23a14a6574d0e18471622ba72099b48e9bfdd6b | [
"MIT"
] | null | null | null | import random
import pytorch_lightning as pl
import torch
from utils import utils
class DataModule(pl.LightningDataModule):
def __init__(self, cfg):
super().__init__()
self.cfg = cfg
def set_hparams(self):
# for LightningDataModule
self.hparams["batch_size"] = self.cfg.batch_... | 36 | 113 | 0.619241 |
2127ce24a198d396f86ee709877894a431617fe6 | 938 | py | Python | notebooks/amin_test.py | mohamad-amin/falkon | 581c761b4a4cb7bf6a299613700db8414c419a52 | [
"MIT"
] | null | null | null | notebooks/amin_test.py | mohamad-amin/falkon | 581c761b4a4cb7bf6a299613700db8414c419a52 | [
"MIT"
] | null | null | null | notebooks/amin_test.py | mohamad-amin/falkon | 581c761b4a4cb7bf6a299613700db8414c419a52 | [
"MIT"
] | null | null | null | from sklearn import datasets
import numpy as np
import torch
import matplotlib.pyplot as plt
plt.style.use('ggplot')
import falkon
X, Y = datasets.load_boston(return_X_y=True)
num_train = int(X.shape[0] * 0.8)
num_test = X.shape[0] - num_train
shuffle_idx = np.arange(X.shape[0])
np.random.shuffle(shuffle_idx)
train_i... | 26.055556 | 49 | 0.767591 |
2127fb0d4814853c0750564d775137c605a7ff0d | 14,143 | py | Python | smartva/data/answer_ranges.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-23T12:57:47.000Z | 2020-04-18T17:13:08.000Z | smartva/data/answer_ranges.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-09T22:10:07.000Z | 2022-02-16T04:57:06.000Z | smartva/data/answer_ranges.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 11 | 2018-12-11T22:01:13.000Z | 2022-01-07T11:38:02.000Z | from datetime import date
MAX_YEAR = date.today().year + 1
# these are the acceptable ranges for answers from the master codebook
RANGE_LIST = {
'g1_01d': range(1, 31 + 1) + [99],
'g1_01m': range(1, 12 + 1) + [99],
'g1_01y': range(1900, MAX_YEAR) + [9999],
'g1_05': [1, 2, 8, 9],
'g1_06d': range(1,... | 31.428889 | 70 | 0.383087 |
2128687f86fa5f75b917c742388298d2bec3df70 | 2,949 | py | Python | scripts/detect-ip.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 4 | 2015-05-21T20:21:26.000Z | 2020-12-18T06:50:06.000Z | scripts/detect-ip.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | null | null | null | scripts/detect-ip.py | opennode/opennode-tui | 1f92da5690a42ad71b1030c72db4b5a1158ab052 | [
"Apache-1.1"
] | 1 | 2016-02-08T00:43:44.000Z | 2016-02-08T00:43:44.000Z | import guestfs
import re
import sys
import tempfile
import hivex
import os
def mount_roots(g, root):
mps = g.inspect_get_mountpoints (root)
def compare (a, b):
if len(a[0]) > len(b[0]):
return 1
elif len(a[0]) == len(b[0]):
return 0
else:
return -1
... | 25.643478 | 80 | 0.584605 |
212880e6ee07546ed2c2fdd17d4f4ffd2bd35737 | 13,890 | py | Python | src/utils/decomposer.py | google/autocjk | dbb7ec36f36c8e835a36561c520f0cbfc4e04458 | [
"Apache-2.0"
] | 10 | 2021-03-09T01:14:51.000Z | 2022-03-31T15:02:14.000Z | src/utils/decomposer.py | ambuc/autocjk | 3c4c3d4ee0a275e077ee5df5966279c2b139f83d | [
"Apache-2.0"
] | 10 | 2021-03-09T01:10:44.000Z | 2021-04-12T23:28:04.000Z | src/utils/decomposer.py | ambuc/autocjk | 3c4c3d4ee0a275e077ee5df5966279c2b139f83d | [
"Apache-2.0"
] | 1 | 2021-03-09T13:36:31.000Z | 2021-03-09T13:36:31.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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.159341 | 87 | 0.61879 |
21289b3301d255636c180925d8311fcd9b11f651 | 2,223 | py | Python | oscar/apps/order/models.py | kapt/django-oscar | f5e70080375ddfd11489a616c12a03e56fbd4454 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/order/models.py | kapt/django-oscar | f5e70080375ddfd11489a616c12a03e56fbd4454 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/order/models.py | kapt/django-oscar | f5e70080375ddfd11489a616c12a03e56fbd4454 | [
"BSD-3-Clause"
] | null | null | null | from oscar.core.loading import is_model_registered
from oscar.apps.order.abstract_models import * # noqa
from oscar.apps.address.abstract_models import (AbstractShippingAddress,
AbstractBillingAddress)
__all__ = []
if not is_model_registered('order', 'Order'):
cla... | 22.683673 | 72 | 0.710751 |
2128a3e3cb347a4ca8dd843752d5d78298640d5b | 839 | py | Python | backend/config/api.py | FroggyTaipei/froggy-service | 6f17b38ba1ada9bb93f85923f1e55a2f480008f6 | [
"MIT"
] | 174 | 2019-02-19T11:35:45.000Z | 2021-12-20T03:20:28.000Z | backend/config/api.py | FroggyTaipei/froggy-service | 6f17b38ba1ada9bb93f85923f1e55a2f480008f6 | [
"MIT"
] | 56 | 2019-01-02T06:49:13.000Z | 2021-03-23T09:31:18.000Z | backend/config/api.py | FroggyTaipei/froggy-service | 6f17b38ba1ada9bb93f85923f1e55a2f480008f6 | [
"MIT"
] | 36 | 2018-12-28T02:10:06.000Z | 2021-09-02T03:06:35.000Z | from rest_framework import routers
from apps.users.views import UserViewSet
from apps.mails.views import MailViewSet
from apps.files.views import TempFileViewSet
from apps.cases.views import (
TypeViewSet,
RegionViewSet,
CaseViewSet,
CaseInsightViewSet,
)
from apps.marquees.views import MarqueeMessageVi... | 23.971429 | 79 | 0.780691 |
2128b010bc26ba8e7b1200ee2a4575c701e40f0e | 2,502 | py | Python | my_work/ch2_lists_and_pointer_structures/circular_lists.py | gabrielavirna/PythonDataStructuresAndAlgorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | 1 | 2019-01-22T04:59:02.000Z | 2019-01-22T04:59:02.000Z | my_work/ch2_lists_and_pointer_structures/circular_lists.py | gabrielavirna/python_data_structures_and_algorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | null | null | null | my_work/ch2_lists_and_pointer_structures/circular_lists.py | gabrielavirna/python_data_structures_and_algorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | null | null | null | """
Circular lists
---------------
- a special case of a linked list
- It is a list where the endpoints are connected: the last node in the list points back to the first node
- Circular lists can be based on both singly and doubly linked lists
- In the case of a doubly linked circular list, the first node also needs to... | 26.617021 | 105 | 0.581934 |
2128b9a0e2bb9672dc71d227e44e70b229f7b211 | 14,873 | py | Python | posthog/api/insight.py | PostHog/posthog-foss | ea18305bba5c49d3823ee2f304b0476a2f1addef | [
"MIT"
] | 58 | 2020-08-26T16:26:18.000Z | 2022-03-30T05:32:23.000Z | posthog/api/insight.py | PostHog/posthog-foss | ea18305bba5c49d3823ee2f304b0476a2f1addef | [
"MIT"
] | 2 | 2021-01-12T14:25:06.000Z | 2021-08-28T04:45:33.000Z | posthog/api/insight.py | PostHog/posthog-foss | ea18305bba5c49d3823ee2f304b0476a2f1addef | [
"MIT"
] | 13 | 2020-09-08T13:27:07.000Z | 2022-03-19T17:27:10.000Z | from typing import Any, Dict, Type
from django.core.cache import cache
from django.db.models import QuerySet
from django.db.models.query_utils import Q
from django.utils.timezone import now
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import request, serializers, viewsets
from rest... | 40.85989 | 122 | 0.629866 |
2128dd7015b2d3ff4b95d01dda72927accc5659b | 2,926 | py | Python | s3contents/tests/test_s3manager.py | aleia-team/s3contents | b41a8f77daf918afa43d50b6e0edddc4b8b2736d | [
"Apache-2.0"
] | 197 | 2016-12-20T23:24:25.000Z | 2022-03-28T11:17:57.000Z | s3contents/tests/test_s3manager.py | aleia-team/s3contents | b41a8f77daf918afa43d50b6e0edddc4b8b2736d | [
"Apache-2.0"
] | 128 | 2016-10-22T18:41:42.000Z | 2022-03-29T18:57:23.000Z | s3contents/tests/test_s3manager.py | aleia-team/s3contents | b41a8f77daf918afa43d50b6e0edddc4b8b2736d | [
"Apache-2.0"
] | 93 | 2017-01-22T14:59:33.000Z | 2022-03-20T14:51:43.000Z | import os
import time
import pytest
from notebook.services.contents.tests.test_manager import TestContentsManager
from s3contents import S3ContentsManager
from s3contents.s3manager import _validate_bucket
from s3contents.tests.hooks import make_html_post_save, scrub_output_pre_save
@pytest.mark.minio
class S3Conten... | 28.686275 | 80 | 0.652427 |
212905a368f2f911a120656442e3fa1d672f5ef1 | 11,361 | py | Python | core/domain/draft_upgrade_services_test.py | OsamaAdam98/oppia | 9c9c3d0fc6710f58394c5e28d414043340ed2a62 | [
"Apache-2.0"
] | 1 | 2020-12-14T11:59:19.000Z | 2020-12-14T11:59:19.000Z | core/domain/draft_upgrade_services_test.py | OsamaAdam98/oppia | 9c9c3d0fc6710f58394c5e28d414043340ed2a62 | [
"Apache-2.0"
] | 3 | 2020-03-16T06:40:30.000Z | 2020-03-30T12:10:20.000Z | core/domain/draft_upgrade_services_test.py | OsamaAdam98/oppia | 9c9c3d0fc6710f58394c5e28d414043340ed2a62 | [
"Apache-2.0"
] | 1 | 2020-03-15T14:29:55.000Z | 2020-03-15T14:29:55.000Z | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | 43.528736 | 139 | 0.566675 |
2129894bab3d3a193f0cc4de3f4350260799e90f | 24,172 | py | Python | src/cocoapi/PythonAPI/pycocotools/cocoeval.py | ash567/guess_what | 092653695cb2a14cbb12df619b894d983c065a67 | [
"Apache-2.0"
] | null | null | null | src/cocoapi/PythonAPI/pycocotools/cocoeval.py | ash567/guess_what | 092653695cb2a14cbb12df619b894d983c065a67 | [
"Apache-2.0"
] | null | null | null | src/cocoapi/PythonAPI/pycocotools/cocoeval.py | ash567/guess_what | 092653695cb2a14cbb12df619b894d983c065a67 | [
"Apache-2.0"
] | null | null | null | __author__ = 'tsungyi'
import numpy as np
import datetime
import time
from collections import defaultdict
from cocoapi.PythonAPI.pycocotools import mask as maskUtils
import copy
class COCOeval:
# Interface for evaluating detection on the Microsoft COCO dataset.
#
# The usage for CocoEval is as follows:
... | 45.181308 | 118 | 0.513776 |
2129b292e4faa4f56ac69230b25b2de06e5e6711 | 1,057 | py | Python | tuskar_ui/infrastructure/flavors/panel.py | rdo-management/tuskar-ui | 513f0da17bc4714d8c93209dd71c1f52c2713a8b | [
"Apache-2.0"
] | 1 | 2015-02-19T12:23:23.000Z | 2015-02-19T12:23:23.000Z | tuskar_ui/infrastructure/flavors/panel.py | rdo-management/tuskar-ui | 513f0da17bc4714d8c93209dd71c1f52c2713a8b | [
"Apache-2.0"
] | null | null | null | tuskar_ui/infrastructure/flavors/panel.py | rdo-management/tuskar-ui | 513f0da17bc4714d8c93209dd71c1f52c2713a8b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
#
# 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... | 31.088235 | 78 | 0.725639 |
2129b320b041828b3a52b92fdb16e9b7f6ab28c0 | 110,523 | py | Python | src/main/python/processwiki.py | utcompling/textgrounder | 45d664b3a8ec1bdef54acadbde6eb4ce83c75e33 | [
"Apache-2.0"
] | 40 | 2015-01-06T07:38:15.000Z | 2021-02-16T19:14:39.000Z | src/main/python/processwiki.py | utcompling/textgrounder | 45d664b3a8ec1bdef54acadbde6eb4ce83c75e33 | [
"Apache-2.0"
] | null | null | null | src/main/python/processwiki.py | utcompling/textgrounder | 45d664b3a8ec1bdef54acadbde6eb4ce83c75e33 | [
"Apache-2.0"
] | 10 | 2015-01-06T01:19:10.000Z | 2021-11-11T14:33:22.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#######
####### processwiki.py
#######
####### Copyright (c) 2010 Ben Wing.
#######
### FIXME:
###
### Cases to fix involving coordinates:
# 1. Nested coordinates:
#{{Infobox Australian Place
#| name = Lauderdale
#| image = Lauderdale Canal.JPG
#| caption =
#| l... | 42.023954 | 243 | 0.654542 |
212a2180a0956eb1763c9be2c6b3c6972a0a98e9 | 1,356 | py | Python | backend/sempryv/semantic/__init__.py | pryv/sempryv | c96231458ba5efe0035afd246bb22b1a6b16edd7 | [
"BSD-3-Clause"
] | null | null | null | backend/sempryv/semantic/__init__.py | pryv/sempryv | c96231458ba5efe0035afd246bb22b1a6b16edd7 | [
"BSD-3-Clause"
] | null | null | null | backend/sempryv/semantic/__init__.py | pryv/sempryv | c96231458ba5efe0035afd246bb22b1a6b16edd7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Semantic API endpoints."""
import json
from flask import Blueprint, jsonify, request
from sempryv.semantic import providers, suggestion
from sempryv.semantic.domain_models.data_provider import SempryvDataProvider
# Flask blueprint
BP: Blueprint = Blueprint("api", __name__)
@BP.route("sea... | 28.851064 | 76 | 0.690265 |
212a2779d32acc9177fa7bdfd99d4a7b2bb03577 | 3,203 | py | Python | portal/roster.py | Thommond/tsct-portal | 726cfcf86a15985093fd9002a2636478a2495e9e | [
"MIT"
] | 2 | 2020-04-16T00:44:44.000Z | 2020-04-21T19:14:30.000Z | portal/roster.py | Thommond/tsct-portal | 726cfcf86a15985093fd9002a2636478a2495e9e | [
"MIT"
] | 16 | 2020-04-14T17:41:11.000Z | 2020-10-30T18:42:33.000Z | portal/roster.py | Thommond/tsct-portal | 726cfcf86a15985093fd9002a2636478a2495e9e | [
"MIT"
] | 1 | 2020-04-07T18:08:54.000Z | 2020-04-07T18:08:54.000Z | from flask import (
render_template, Blueprint, session, g, flash, request, redirect, url_for, abort
)
from . import db
from . import auth
bp = Blueprint("roster", __name__)
@bp.route('/courses/<int:course_id>/sessions/<int:session_id>/roster', methods=('GET', 'POST'))
@auth.login_required
@auth.teacher_required
... | 29.657407 | 95 | 0.556666 |
212a388bdab73be27b9d551f4fcaf7a2a9f3ddd4 | 493 | py | Python | sdk/core/azure-core/azure/core/_version.py | ostojicb/azure-sdk-for-python | 6b2a76125be795527af88b34e117e7cf34f46d48 | [
"MIT"
] | null | null | null | sdk/core/azure-core/azure/core/_version.py | ostojicb/azure-sdk-for-python | 6b2a76125be795527af88b34e117e7cf34f46d48 | [
"MIT"
] | null | null | null | sdk/core/azure-core/azure/core/_version.py | ostojicb/azure-sdk-for-python | 6b2a76125be795527af88b34e117e7cf34f46d48 | [
"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 ... | 37.923077 | 76 | 0.521298 |
212a62aa6b508d618efd4976f638466b53011dd7 | 12,040 | py | Python | Scripts/GloVeHandler/GloVeEmbedding.py | ReleasedBrainiac/GraphToSequenceNN | 70861637088bc38054beeab44a5c478254b5da25 | [
"MIT"
] | 3 | 2019-04-26T06:40:38.000Z | 2021-02-18T08:44:40.000Z | Scripts/GloVeHandler/GloVeEmbedding.py | ReleasedBrainiac/GraphToSequenceNN | 70861637088bc38054beeab44a5c478254b5da25 | [
"MIT"
] | 4 | 2018-08-28T13:26:14.000Z | 2019-12-16T18:29:11.000Z | Scripts/GloVeHandler/GloVeEmbedding.py | ReleasedBrainiac/GraphToSequenceNN | 70861637088bc38054beeab44a5c478254b5da25 | [
"MIT"
] | null | null | null | import numpy as np
from numpy import asarray, zeros
from keras.layers import Embedding
from keras.initializers import Constant
from keras.preprocessing.text import Tokenizer
from DatasetHandler.ContentSupport import isNotNegativeNum
class GloVeEmbedding:
"""
This class provides the GloVeEmbedding Layer and the... | 51.016949 | 197 | 0.636711 |
212a749e9f8b67d9bc499eb7ff779f201ae79e23 | 3,758 | py | Python | mapproxy/seed/cachelock.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/seed/cachelock.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/seed/cachelock.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # This file is part of the MapProxy project.
# Copyright (C) 2012 Omniscale <http://omniscale.de>
#
# 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... | 30.803279 | 126 | 0.607238 |
212a943f434e34920810951548607ffa1dbdcd3f | 9,011 | py | Python | utils/iperflexer/iperfexpressions.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 10 | 2016-12-16T00:05:58.000Z | 2018-10-30T17:48:25.000Z | utils/iperflexer/iperfexpressions.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 40 | 2017-01-04T23:07:05.000Z | 2018-04-16T19:52:02.000Z | utils/iperflexer/iperfexpressions.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 23 | 2016-12-30T05:03:53.000Z | 2020-04-01T08:40:24.000Z | """
Copyright (c) 2014 Russell Nakamura
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, distribut... | 36.481781 | 102 | 0.557763 |
212aa81f93bccc697aaf82091e945737c339142c | 583 | py | Python | main.py | MiniMarvin/blur-validation | a399b2429dbb88cd59dc8d9fe77679ad051718ab | [
"MIT"
] | 2 | 2021-09-27T19:24:38.000Z | 2022-03-16T14:52:35.000Z | main.py | MiniMarvin/blur-validation | a399b2429dbb88cd59dc8d9fe77679ad051718ab | [
"MIT"
] | null | null | null | main.py | MiniMarvin/blur-validation | a399b2429dbb88cd59dc8d9fe77679ad051718ab | [
"MIT"
] | null | null | null | import src.image_processing as ip
import src.manage_file as mf
def score_images(base_path, filter_type="square", ranking_type="mean"):
files = mf.list_files(base_path)
scores = [
(
ip.detect_blur_fft(ip.gray_image(base_path+file), 60, filter_type, ranking_type, file.split(".")[0] + "_" + filter_type),
file
... | 25.347826 | 125 | 0.679245 |
212af21fe8c97c9d8bb4e90220d7b68378753f3b | 511 | py | Python | 07_aws_external_api/sign.py | bgins/cs430-src | cee2417872cb14d17807e14ea9c2180b6e9c09eb | [
"MIT"
] | 2 | 2020-02-25T21:30:34.000Z | 2020-10-26T18:07:03.000Z | 07_aws_external_api/sign.py | bgins/cs430-src | cee2417872cb14d17807e14ea9c2180b6e9c09eb | [
"MIT"
] | null | null | null | 07_aws_external_api/sign.py | bgins/cs430-src | cee2417872cb14d17807e14ea9c2180b6e9c09eb | [
"MIT"
] | 4 | 2020-03-14T18:53:10.000Z | 2020-10-22T01:47:56.000Z | from flask import redirect, request, url_for, render_template
from flask.views import MethodView
import gbmodel
class Sign(MethodView):
def get(self):
return render_template('sign.html')
def post(self):
"""
Accepts POST requests, and processes the form;
Redirect to index when c... | 30.058824 | 90 | 0.659491 |
212b5461d5bf58fddced52831ae7aaab57255996 | 5,562 | bzl | Python | third_party/rules_pkg-0.7.0/pkg/private/zip/zip.bzl | Vertexwahn/FlatlandRT | 37d09fde38b25eff5f802200b43628efbd1e3198 | [
"Apache-2.0"
] | 62 | 2021-09-21T18:58:02.000Z | 2022-03-07T02:17:43.000Z | third_party/rules_pkg-0.7.0/pkg/private/zip/zip.bzl | Vertexwahn/FlatlandRT | 37d09fde38b25eff5f802200b43628efbd1e3198 | [
"Apache-2.0"
] | null | null | null | third_party/rules_pkg-0.7.0/pkg/private/zip/zip.bzl | Vertexwahn/FlatlandRT | 37d09fde38b25eff5f802200b43628efbd1e3198 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Bazel 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 applicable la... | 33.305389 | 112 | 0.609133 |
212ba23d33b61630117a9e0f307ce63a8ab6cb2a | 1,002 | py | Python | intro/input.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | intro/input.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | 2 | 2020-07-19T15:36:35.000Z | 2022-02-02T20:30:16.000Z | intro/input.py | RobertoRosa7/python | 449f3908a38814ec7ec3b3ce1051b8abe70069d2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Input - entrada de dados pelo usuário
"""
# name = input('digite seu nome: ')
# print('Seja Bem Vindo(a) ' + name)
"""
Concatenação e filtro de string
"""
a = 'roberto'
b = 'rosa'
nome = a +" "+ b + '\n'
# print(nome) nome completo
# filtro 0: posição inicial, 2: quantidade
# pri... | 20.04 | 73 | 0.638723 |
212ba5749ed55685b0d357d9c6835229bc3842ed | 2,323 | py | Python | tests/test_api.py | 13-Graphics/drawbot-skia | 9fbcb16231502ac7251d4989140baff6418889e2 | [
"Apache-2.0"
] | null | null | null | tests/test_api.py | 13-Graphics/drawbot-skia | 9fbcb16231502ac7251d4989140baff6418889e2 | [
"Apache-2.0"
] | null | null | null | tests/test_api.py | 13-Graphics/drawbot-skia | 9fbcb16231502ac7251d4989140baff6418889e2 | [
"Apache-2.0"
] | null | null | null | from drawbot_skia.runner import makeDrawbotNamespace, runScript, runScriptSource
from drawbot_skia.drawing import Drawing
import pathlib
import pytest
from PIL import Image
import numpy as np
testDir = pathlib.Path(__file__).resolve().parent
apiTestsDir = testDir / "apitests"
apiTestsOutputDir = testDir / "apitests_o... | 29.0375 | 80 | 0.686612 |
212bab9133dcfd74817e31cccb3fb481b581fb96 | 354 | py | Python | setup.py | 3-manifolds/py_hfk | 3912593b95e171cc198197031e5a88581d52263b | [
"Python-2.0",
"OLDAP-2.3"
] | 1 | 2020-06-17T20:14:05.000Z | 2020-06-17T20:14:05.000Z | setup.py | 3-manifolds/py_hfk | 3912593b95e171cc198197031e5a88581d52263b | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | setup.py | 3-manifolds/py_hfk | 3912593b95e171cc198197031e5a88581d52263b | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | from distutils.core import setup, Extension
_hfkmodule = Extension('hfk._hfk',
sources = ['_hfkmodule.cpp'],
include_dirs = ['.'])
setup (name = '_hfk',
version = '1.0',
description = 'Computes Heegaard Floer homology for links',
packages = ['hfk'],
... | 29.5 | 66 | 0.556497 |
212bb76840628756c9851940da236d86d347338d | 4,085 | py | Python | otp/chat/ChatInputNormal.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | otp/chat/ChatInputNormal.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | otp/chat/ChatInputNormal.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | import sys
from direct.gui.DirectGui import *
from direct.showbase import DirectObject
from pandac.PandaModules import *
from otp.otpbase import OTPGlobals
from otp.otpbase import OTPLocalizer
from toontown.chat.ChatGlobals import *
class ChatInputNormal(DirectObject.DirectObject):
def __init__(self, chatMgr):
... | 34.618644 | 101 | 0.616891 |
212bbc119e743f87257154d05f8b6e27ae2e1bde | 31,816 | py | Python | rally/task/processing/charts.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | rally/task/processing/charts.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | rally/task/processing/charts.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 1 | 2015-02-07T09:44:47.000Z | 2015-02-07T09:44:47.000Z | # 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 agreed to in... | 39.23058 | 79 | 0.551201 |
212bbe4279d12c3f4ce860e33dfce8193ba88efa | 2,267 | py | Python | src_gui/iteration.py | grissutpl/OPS-Design | 866fbff2d6106e35017aed750c67be79157d9c72 | [
"MIT"
] | null | null | null | src_gui/iteration.py | grissutpl/OPS-Design | 866fbff2d6106e35017aed750c67be79157d9c72 | [
"MIT"
] | null | null | null | src_gui/iteration.py | grissutpl/OPS-Design | 866fbff2d6106e35017aed750c67be79157d9c72 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 01 20:00:29 2020
@author: Ing. Daniel Villarreal
"""
import sys
import time
from threading import Thread # Procesos en paralelo
from PyQt5.QtCore import QObject, pyqtSignal, Qt
from PyQt5.QtWidgets import QMainWindow, QApplication
#from PyQt5.uic import lo... | 31.486111 | 114 | 0.571681 |
212be0790fbb60f9baea0ac9c6bb5be5b2d5436c | 5,907 | py | Python | tf2onnx/handler.py | szha/tensorflow-onnx | 25f8b0c78074784fcc33c1d068911f8363581e6c | [
"MIT"
] | null | null | null | tf2onnx/handler.py | szha/tensorflow-onnx | 25f8b0c78074784fcc33c1d068911f8363581e6c | [
"MIT"
] | null | null | null | tf2onnx/handler.py | szha/tensorflow-onnx | 25f8b0c78074784fcc33c1d068911f8363581e6c | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
"""Opset registry."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import collections
import inspect
from tf2onnx impo... | 38.607843 | 119 | 0.64686 |
212bf63921ff9954e46325a7433b3f43f2262ec9 | 2,803 | py | Python | foox/species/utils.py | butayama/foox | 7c73c54f125a95250624ba53767b758232033427 | [
"MIT"
] | 94 | 2015-01-27T18:42:09.000Z | 2022-02-11T13:42:38.000Z | foox/species/utils.py | butayama/foox | 7c73c54f125a95250624ba53767b758232033427 | [
"MIT"
] | 1 | 2016-04-12T18:10:29.000Z | 2016-04-13T17:10:21.000Z | foox/species/utils.py | butayama/foox | 7c73c54f125a95250624ba53767b758232033427 | [
"MIT"
] | 37 | 2015-01-23T21:31:21.000Z | 2021-07-18T22:45:35.000Z | """
Contains common utility functions required by all species of counterpoint.
"""
from foox import ga
def is_parallel(last, current):
"""
Returns True if the motion between last and current notes is parallel.
"""
parallel = False
if last[0] - current[0] < 0 and last[1] - current[1] < 0:
p... | 32.593023 | 79 | 0.672494 |
212c1db66b995d238e4c15063b01f3c4151db3f1 | 26,898 | py | Python | montydb/engine/queries.py | gitter-badger/MontyDB | 849d03dc2cfed35739481e9acb1ff0bd8095c91b | [
"BSD-3-Clause"
] | null | null | null | montydb/engine/queries.py | gitter-badger/MontyDB | 849d03dc2cfed35739481e9acb1ff0bd8095c91b | [
"BSD-3-Clause"
] | null | null | null | montydb/engine/queries.py | gitter-badger/MontyDB | 849d03dc2cfed35739481e9acb1ff0bd8095c91b | [
"BSD-3-Clause"
] | null | null | null |
import re
from copy import deepcopy
from datetime import datetime
from collections import Mapping
from bson import SON
from bson.py3compat import integer_types, string_type
from bson.regex import Regex, str_flags_to_int
from bson.min_key import MinKey
from bson.max_key import MaxKey
from bson.decimal128 import Decima... | 28.891515 | 79 | 0.572942 |
212c217297d58aeaaa783221d8237e01a6513b1e | 3,425 | py | Python | tests/unit/io/PickleTest.py | Eravalord/OpenPNM | 505bc37318a3ba40d8343f89cd347d0073dd9d14 | [
"MIT"
] | 1 | 2021-07-20T13:56:57.000Z | 2021-07-20T13:56:57.000Z | tests/unit/io/PickleTest.py | jgostick/openpnm | 8298608a38f6aae4a96b0f3b9dd9b9e4460e8692 | [
"MIT"
] | null | null | null | tests/unit/io/PickleTest.py | jgostick/openpnm | 8298608a38f6aae4a96b0f3b9dd9b9e4460e8692 | [
"MIT"
] | null | null | null | import openpnm as op
import pytest
import py
import os
import pickle
class PickleTest:
def setup_class(self):
pass
def test_create_save_and_load_workspace(self, tmpdir=None):
ws = op.Workspace()
ws.clear()
pn = op.network.Cubic(shape=[3, 3, 3])
assert len(ws) == 1
... | 34.25 | 74 | 0.58073 |
212c5a64ec28f16db6036c8589cbf7e3c5338f81 | 13,748 | py | Python | vgg19/applications/vgg19_slice_model.py | fanshiqing/DAPPLE | b2d2ceda90f6033b316f672ec05f45123234f130 | [
"BSD-3-Clause"
] | 50 | 2020-02-02T09:24:44.000Z | 2022-03-01T03:22:19.000Z | vgg19/applications/vgg19_slice_model.py | fanshiqing/DAPPLE | b2d2ceda90f6033b316f672ec05f45123234f130 | [
"BSD-3-Clause"
] | 1 | 2020-02-04T03:50:02.000Z | 2020-02-04T04:41:37.000Z | vgg19/applications/vgg19_slice_model.py | AlibabaPAI/DAPPLE | fd75dcfbc6c73a7624b9fd9d8c3334e5d04bcd20 | [
"BSD-3-Clause"
] | 9 | 2020-02-02T09:23:31.000Z | 2021-09-22T07:24:34.000Z | """VGG19 model for Keras.
# Reference
- [Very Deep Convolutional Networks for Large-Scale Image Recognition](
https://arxiv.org/abs/1409.1556) (ICLR 2015)
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import numpy as np
import tensorf... | 38.402235 | 131 | 0.578411 |
212ca5dbe23aa69d7f94d420d7f03ffcee2615a2 | 784 | py | Python | (1)Text/re_test_patterns.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (1)Text/re_test_patterns.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (1)Text/re_test_patterns.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | import re
def test_patterns(text, patterns):
"""
Given source text and a list of patterns , look for matches for each pattern within the text and print them to stdout.
"""
#Look for each pattern in the text and print the results.
for pattern, desc in patterns:
print("'{}' ({})\n".format(pa... | 32.666667 | 122 | 0.5625 |
212cd6374687bc9e11cc9dde4cc809e5a1f305b8 | 5,176 | py | Python | mirrorselect/output.py | BaileyGingerTechnology/mirrorselect | 8be89a06571398060cbef00e5b3817f7dcc8c893 | [
"MIT"
] | null | null | null | mirrorselect/output.py | BaileyGingerTechnology/mirrorselect | 8be89a06571398060cbef00e5b3817f7dcc8c893 | [
"MIT"
] | null | null | null | mirrorselect/output.py | BaileyGingerTechnology/mirrorselect | 8be89a06571398060cbef00e5b3817f7dcc8c893 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
#-*- coding:utf-8 -*-
"""Mirrorselect 2.x
Tool for selecting Gentoo source and rsync mirrors.
Copyright 2005-2012 Gentoo Foundation
Copyright (C) 2005 Colin Kingsley <tercel@gentoo.org>
Copyright (C) 2008 Zac Medico <zmedico@gentoo.org>
Copyright (C) 2009 Sebastian Pipping <sebastian@pipping.o... | 29.242938 | 75 | 0.676198 |
212cf5a03ea629a71cd11505144525d0ca4c977a | 2,552 | py | Python | clif/testing/python/const_pointer_return_test.py | wangxf123456/clif | 9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1 | [
"Apache-2.0"
] | 966 | 2017-04-18T04:14:04.000Z | 2022-03-03T21:22:44.000Z | clif/testing/python/const_pointer_return_test.py | wangxf123456/clif | 9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1 | [
"Apache-2.0"
] | 48 | 2017-05-02T23:51:29.000Z | 2021-12-06T19:10:11.000Z | clif/testing/python/const_pointer_return_test.py | wangxf123456/clif | 9bff8a28f5d266d6ea4f4bb0dc1d9c9a0c9ee5b1 | [
"Apache-2.0"
] | 135 | 2017-04-26T06:15:30.000Z | 2022-01-07T02:17:20.000Z | # Copyright 2017 Google 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,... | 42.533333 | 80 | 0.736285 |
212cfed4f66e06cb5601de93262e97f0e5bcc5c2 | 3,021 | py | Python | examples/external_stores.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 7 | 2020-02-28T09:03:09.000Z | 2022-03-28T15:52:23.000Z | examples/external_stores.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 47 | 2020-01-16T20:32:19.000Z | 2020-08-27T04:43:00.000Z | examples/external_stores.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 16 | 2020-01-10T14:15:17.000Z | 2021-04-06T13:31:01.000Z | ###
# (C) Copyright [2019-2020] Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 33.566667 | 99 | 0.747435 |
212d23fe0fc09d5de4f073c3d05630eff8ea240e | 1,089 | py | Python | src/epc_exporter/collector/utils.py | cisco-cx/epc_exporter | 8c433631dcb8118e213f67020760a2d30b4876e0 | [
"X11"
] | null | null | null | src/epc_exporter/collector/utils.py | cisco-cx/epc_exporter | 8c433631dcb8118e213f67020760a2d30b4876e0 | [
"X11"
] | null | null | null | src/epc_exporter/collector/utils.py | cisco-cx/epc_exporter | 8c433631dcb8118e213f67020760a2d30b4876e0 | [
"X11"
] | null | null | null | """
Utility methods to be used in parsing and Prometheus metrics conversion
"""
from prometheus_client.utils import floatToGoString
_UNITS = {"B": 1, "K": 1024, "M": 1024**2, "G": 1024**3, "T": 1024**4}
def parse_size(size):
"""Parses memory size"""
if size == '--':
return 0
number = size[:-1]
... | 31.114286 | 79 | 0.644628 |
212d29bb90b31cf087bb29cbe5ec5fef9c48d9c0 | 282 | py | Python | frappe_editorjs/frappe_editorjs/doctype/editorjs_template_data/editorjs_template_data.py | leam-tech/frappe_editorjs | dbcfb56318833d3a1e8048b0fb7978ca81c32f44 | [
"MIT"
] | 3 | 2020-10-05T15:54:35.000Z | 2021-03-14T06:39:15.000Z | frappe_editorjs/frappe_editorjs/doctype/editorjs_template_data/editorjs_template_data.py | leam-tech/frappe_editorjs | dbcfb56318833d3a1e8048b0fb7978ca81c32f44 | [
"MIT"
] | null | null | null | frappe_editorjs/frappe_editorjs/doctype/editorjs_template_data/editorjs_template_data.py | leam-tech/frappe_editorjs | dbcfb56318833d3a1e8048b0fb7978ca81c32f44 | [
"MIT"
] | 1 | 2021-03-14T06:14:31.000Z | 2021-03-14T06:14:31.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Leam Technology Systems and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class EditorjsTemplateData(Document):
pass
| 25.636364 | 62 | 0.787234 |
212d36c8c4ff7dba1b3c7176cdb3a00b2fea55ca | 1,183 | py | Python | test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/version-tolerant/Expected/AcceptanceTests/HeadExceptionsVersionTolerant/setup.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"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 ... | 31.131579 | 94 | 0.6306 |
212d3f0b9014495bd7b2863c8adfc9de9100d97f | 8,078 | py | Python | wb_cells/post-crop-seg/post_seg2.py | shenghh2015/cell_detection | 872ea94bf00714b36e617b214e8b13596b2fe61a | [
"Apache-2.0"
] | 1 | 2021-02-20T05:44:27.000Z | 2021-02-20T05:44:27.000Z | wb_cells/post-crop-seg/post_seg2.py | shenghh2015/cell_detection | 872ea94bf00714b36e617b214e8b13596b2fe61a | [
"Apache-2.0"
] | null | null | null | wb_cells/post-crop-seg/post_seg2.py | shenghh2015/cell_detection | 872ea94bf00714b36e617b214e8b13596b2fe61a | [
"Apache-2.0"
] | null | null | null | import os
import cv2
from skimage import io
from tifffile import imread, imsave
import tensorflow as tf
import numpy as np
import random
import matplotlib.pyplot as plt
import argparse
import sys
sys.path.append('../')
import segmentation_models as sm
from segmentation_models_v1 import Unet
from keras_applications.imag... | 38.650718 | 242 | 0.680119 |
212d5bb85b9d20f6249f36f5a6494b169320a551 | 2,545 | py | Python | demo/iterative/cgauto/CG1.py | VictorEijkhout/ignition | 95cd8ada9281db31bb7c5a64f5561b43c472cb41 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-10-05T23:14:27.000Z | 2019-10-05T23:14:27.000Z | demo/iterative/cgauto/CG1.py | VictorEijkhout/ignition | 95cd8ada9281db31bb7c5a64f5561b43c472cb41 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | demo/iterative/cgauto/CG1.py | VictorEijkhout/ignition | 95cd8ada9281db31bb7c5a64f5561b43c472cb41 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-11-14T01:27:23.000Z | 2019-11-14T01:27:23.000Z |
"""Implements the complete conjugant gradient examples."""
from numpy import matrix
from ignition.flame import *
from ignition.utils import flatten_list
# Define the operation
def CG_Op ( A,R,P,D,I,J,JI,U,W,Z, ):
return [A * P * D - R * (I - J),
P * (I - U) - R,
T(R) * R - W, T(P) * A * ... | 35.347222 | 84 | 0.578782 |
212d673a6158e0f8b52e4f63d798a7b8c2e279cc | 1,737 | py | Python | protocols/telnetAPI.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | protocols/telnetAPI.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | protocols/telnetAPI.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | """Telnet protocol handler for URLs of the form telnet://host[:port]
For Unix only; requires xterm in your $PATH.
"""
import os, urllib
from nullAPI import null_access
class telnet_access(null_access):
def __init__(self, url, method, params):
null_access.__init__(self, url, method, params)
host... | 32.773585 | 70 | 0.564767 |
212da21d2ddd768622baa1eb14496b30c8a4482b | 1,029 | py | Python | diameter/node/NodeState.py | netch80/i1dk-PythonDiameter | ddc6cf76269379105f260c2ecab2c6930d7f32cf | [
"Zlib"
] | null | null | null | diameter/node/NodeState.py | netch80/i1dk-PythonDiameter | ddc6cf76269379105f260c2ecab2c6930d7f32cf | [
"Zlib"
] | null | null | null | diameter/node/NodeState.py | netch80/i1dk-PythonDiameter | ddc6cf76269379105f260c2ecab2c6930d7f32cf | [
"Zlib"
] | null | null | null | import time
import thread
import random
class NodeState:
def __init__(self):
now = long(time.time())
self.state_id = now
self.end_to_end_identifier = int((now<<20) | random.randint(0,0x000FFFFF))&0xFFFFFFFF
self.session_id_high = now
self.session_id_low = 0
self.loc... | 26.384615 | 93 | 0.621963 |
212dbc7f00dc899cb14d8417e592e44dedb048fd | 1,043 | py | Python | acq4/drivers/PatchStar/test.py | tropp/ACQ4 | 792e05e99cedfc175593d200aeabecd6fa6304ce | [
"MIT"
] | null | null | null | acq4/drivers/PatchStar/test.py | tropp/ACQ4 | 792e05e99cedfc175593d200aeabecd6fa6304ce | [
"MIT"
] | null | null | null | acq4/drivers/PatchStar/test.py | tropp/ACQ4 | 792e05e99cedfc175593d200aeabecd6fa6304ce | [
"MIT"
] | null | null | null | import sys, os, time
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..'))
from acq4.drivers.PatchStar import PatchStar
if len(sys.argv) < 2:
print("Usage: test.py com4")
sys.exit(-1)
ps = PatchStar(sys.argv[1])
ps.reset()
print("Firmware version: %s" % ps.getFirmwareVersion())
print("Max spe... | 21.285714 | 74 | 0.594439 |
212dbe3209b606ccd485840e8a41b1c1bc66fbb3 | 7,123 | py | Python | ibmsecurity/isam/web/kerberos_configuration/realms_property.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | 1 | 2018-04-24T19:57:09.000Z | 2018-04-24T19:57:09.000Z | ibmsecurity/isam/web/kerberos_configuration/realms_property.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | null | null | null | ibmsecurity/isam/web/kerberos_configuration/realms_property.py | ibm-enio/ibmsecurity | 81f989678642c3b6a49b2a3fbb5d9ca98804ef17 | [
"Apache-2.0"
] | 1 | 2020-04-03T09:30:01.000Z | 2020-04-03T09:30:01.000Z | import logging
from ibmsecurity.utilities import tools
logger = logging.getLogger(__name__)
# URI for this module
uri = "/wga/kerberos/config/realms"
requires_modules = ['wga']
requires_version = None
import ibmsecurity.isam.web.kerberos_configuration.realms as realms
import ibmsecurity.isam.web.kerberos_configuratio... | 40.242938 | 116 | 0.608451 |
212dd22146c81f4b2158f25e20b792acce3e24a4 | 3,066 | py | Python | BigBiGAN-TensorFlow2.0/extract_features.py | a7b23/CS236G-project | 8bde7d54ca3d22e13703fe72dfb998b38d9cd8b4 | [
"MIT"
] | 2 | 2021-02-23T07:07:32.000Z | 2021-03-11T21:13:26.000Z | BigBiGAN-TensorFlow2.0/extract_features.py | a7b23/CS236G-project | 8bde7d54ca3d22e13703fe72dfb998b38d9cd8b4 | [
"MIT"
] | null | null | null | BigBiGAN-TensorFlow2.0/extract_features.py | a7b23/CS236G-project | 8bde7d54ca3d22e13703fe72dfb998b38d9cd8b4 | [
"MIT"
] | 3 | 2021-02-23T09:02:48.000Z | 2021-02-27T06:14:42.000Z | import logging
import tensorflow as tf
from data import get_dataset, get_train_pipeline
from training import train
from model_small import BIGBIGAN_G, BIGBIGAN_D_F, BIGBIGAN_D_H, BIGBIGAN_D_J, BIGBIGAN_E
import matplotlib.pyplot as plt
from misc import get_fixed_random, generate_images, _data2plot
import numpy as np
de... | 41.432432 | 115 | 0.695695 |
212dd93d26d3545c480930edb731a93a6753c80b | 1,291 | py | Python | Libraries/unionfind.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | Libraries/unionfind.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | Libraries/unionfind.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | from collections import defaultdict
class UnionFind():
def __init__(self, n):
self.n = n
self.parents = [-1] * n
def find(self, x):
if self.parents[x] < 0:
return x
else:
self.parents[x] = self.find(self.parents[x])
return self.parents[x]
... | 25.313725 | 82 | 0.541441 |
212e051613db854a8ced94f2957a43e1de67f430 | 823 | py | Python | setup.py | metabolize/env-flag | 72067035b28c54162cf07b0103033ff90819ab72 | [
"BSD-2-Clause"
] | 2 | 2020-02-27T13:40:10.000Z | 2021-05-15T22:06:35.000Z | setup.py | bodylabs/env-flag | 72067035b28c54162cf07b0103033ff90819ab72 | [
"BSD-2-Clause"
] | 23 | 2019-08-19T11:44:40.000Z | 2021-08-01T05:27:33.000Z | setup.py | bodylabs/env-flag | 72067035b28c54162cf07b0103033ff90819ab72 | [
"BSD-2-Clause"
] | 2 | 2017-10-24T23:25:22.000Z | 2019-02-16T11:27:41.000Z | from setuptools import setup
readme = open("README.md", "rb").read().decode("utf-8")
setup(
name="env-flag",
version=__import__("env_flag").__version__,
author="Body Labs & Metabolize",
author_email="github@paulmelnikow.com",
description="Get boolean values from environment variables",
long_de... | 32.92 | 64 | 0.656136 |
212e0c39265c80a4e083d8bed1ab36ef0baa5438 | 4,569 | py | Python | Barbican/Server/barbican-stable-mitaka/barbican/barbican/api/__init__.py | cloud-security-research/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 36 | 2017-11-08T23:36:35.000Z | 2022-03-20T16:01:55.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/api/__init__.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 2 | 2017-11-17T03:19:17.000Z | 2018-07-04T03:37:36.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/api/__init__.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 12 | 2017-11-13T03:20:40.000Z | 2021-07-16T03:26:41.000Z | # Copyright (c) 2013-2015 Rackspace, 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 ... | 30.871622 | 78 | 0.678485 |
212e507d33ebd7e4445b6c4b9b44757b31c9e6a7 | 68,731 | py | Python | NBA Project/venv/Lib/site-packages/plotly/graph_objs/indicator/gauge/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/indicator/gauge/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/indicator/gauge/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Threshold(_BaseTraceHierarchyType):
# line
# ----
@property
def line(self):
"""
The 'line' property is an instance of Line
that may be specified as:
- An ins... | 35.872129 | 97 | 0.569554 |
212e60d1eccc096b6f347c7a52a21a529328cd82 | 783 | py | Python | code/imu_model.py | mikoff/imu-calib | 12dff577725dbc7bd7161431e4142b6249395fec | [
"MIT"
] | 6 | 2020-05-25T12:53:19.000Z | 2021-12-15T11:28:50.000Z | code/imu_model.py | mikoff/imu-calib | 12dff577725dbc7bd7161431e4142b6249395fec | [
"MIT"
] | 1 | 2020-05-25T13:37:21.000Z | 2020-05-30T10:57:40.000Z | code/imu_model.py | mikoff/imu-calib | 12dff577725dbc7bd7161431e4142b6249395fec | [
"MIT"
] | 3 | 2020-11-10T09:07:41.000Z | 2021-01-28T05:45:52.000Z | import numpy as np
def skew(v):
'''Returns skew-symmetric matrix, which satisfies A^T = -A'''
return np.array([[0, -v[2], v[1]],
[v[2], 0, -v[0]],
[-v[1], v[0], 0]])
def sensor_error_model(errors):
'''
Build sensor error model matrix and bias according to
... | 29 | 65 | 0.514687 |
212e73e095aaef2973a929f757f8bad95ab51c8a | 1,784 | py | Python | scripts/leetcode/amzn/wallsNgates.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/leetcode/amzn/wallsNgates.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/leetcode/amzn/wallsNgates.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
You are given an m x n grid rooms initialized with these three possible values.
-1 A wall or an obstacle.
0 A gate.
INF Infinity means an empty room. We use the value 231 - 1 = 2147483647 to represent
INF as you may assume that the distance to a gate is less than 2147483647.
Fill each empty room with the distanc... | 24.777778 | 97 | 0.554933 |
212ebc5ef879db4b22d6fbd05791fcaaa85d464d | 1,158 | py | Python | Leetcode-Solutions/Arrays/83. Merge-two-sorted-arrays.py | sakshi13-m/StudentCodeSnippets | 25e4f0322b51cad540b6481737976a2f6c4c0382 | [
"MIT"
] | 1 | 2020-09-30T21:46:28.000Z | 2020-09-30T21:46:28.000Z | Leetcode-Solutions/Arrays/83. Merge-two-sorted-arrays.py | sakshi13-m/StudentCodeSnippets | 25e4f0322b51cad540b6481737976a2f6c4c0382 | [
"MIT"
] | 2 | 2020-10-04T08:01:15.000Z | 2020-10-15T12:21:39.000Z | Leetcode-Solutions/Arrays/83. Merge-two-sorted-arrays.py | sakshi13-m/StudentCodeSnippets | 25e4f0322b51cad540b6481737976a2f6c4c0382 | [
"MIT"
] | 6 | 2020-09-30T20:53:24.000Z | 2020-10-09T11:54:35.000Z | # Easy
# https://leetcode.com/problems/merge-sorted-array/
# Time Complexity : O(n + m) where n = number of elements in nums1 and m = no.of elements in nums2
# Space Complexity: O(1)
class Solution:
def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None:
"""
Do not return anyt... | 37.354839 | 98 | 0.556131 |
212ee81ae6bb5d4d0cd548e6ab62cab8ca390b88 | 1,721 | py | Python | tests/unit/executors/test_dump_executor_with_drivers.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | tests/unit/executors/test_dump_executor_with_drivers.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | 2 | 2021-02-15T01:40:38.000Z | 2021-02-15T02:00:21.000Z | tests/unit/executors/test_dump_executor_with_drivers.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | import os
import pickle
import pytest
from jina.drivers.control import RouteDriver
from jina.executors import BaseExecutor
cur_dir = os.path.dirname(os.path.abspath(__file__))
def test_dump_driver(tmpdir):
rd = RouteDriver(raise_no_dealer=True)
rd.idle_dealer_ids = ('hello', 'there')
with open(str(tmpd... | 30.732143 | 81 | 0.728646 |
212f1c84d3fa056022ab437df433cc9460112af6 | 309 | py | Python | pylinkedcmd/__init__.py | skybristol/pylinkedcmd | bc3a416b6d5abead7b62706f1c47762daf22bb78 | [
"Unlicense"
] | 5 | 2020-08-05T20:48:21.000Z | 2021-07-21T23:10:59.000Z | pylinkedcmd/__init__.py | skybristol/pylinkedcmd | bc3a416b6d5abead7b62706f1c47762daf22bb78 | [
"Unlicense"
] | 1 | 2020-08-20T13:40:17.000Z | 2021-08-11T18:04:40.000Z | pylinkedcmd/__init__.py | skybristol/pylinkedcmd | bc3a416b6d5abead7b62706f1c47762daf22bb78 | [
"Unlicense"
] | 2 | 2020-09-03T03:48:42.000Z | 2021-03-03T21:13:24.000Z | """Top-level package for Python for Linked Corporate Master Data."""
__author__ = """R. Sky Bristol"""
__email__ = 'sbristol@usgs.gov'
__version__ = '0.2.3'
from . import utilities
from . import orcid
from . import doi
from . import sciencebase
from . import usgsweb
from . import pw
from . import isaid
| 18.176471 | 68 | 0.721683 |
212f4f0229fb052d42a51cfdf6e3a63d105be6dd | 447 | py | Python | examples/PIL_Examples/TkinterImage/tkinterImage.py | kertox662/PythonPackageInstaller | 97c8e0a1aa10336f25017bd694c23587329f9444 | [
"MIT"
] | 2 | 2020-01-21T23:12:09.000Z | 2020-01-23T13:53:18.000Z | examples/PIL_Examples/TkinterImage/tkinterImage.py | kertox662/PythonPackageInstaller | 97c8e0a1aa10336f25017bd694c23587329f9444 | [
"MIT"
] | 2 | 2020-04-30T20:39:56.000Z | 2020-06-21T03:30:45.000Z | examples/PIL_Examples/TkinterImage/tkinterImage.py | kertox662/PythonPackageInstaller | 97c8e0a1aa10336f25017bd694c23587329f9444 | [
"MIT"
] | 1 | 2020-04-28T00:08:18.000Z | 2020-04-28T00:08:18.000Z | from tkinter import Tk, Canvas
from PIL import Image, ImageTk
root = Tk()
canv = Canvas(root, width=800, height=600, background="gray")
canv.pack()
img = Image.open("testImage.png")
imgTk = ImageTk.PhotoImage(
img
) # Converts the image into something that can be displayed in tkinter
# The image is displayed b... | 23.526316 | 71 | 0.727069 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.