hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6f3527e7b892d2cc9b8882062f8cfe8f4115c0ed | 6,141 | py | Python | cupy/cuda/__init__.py | mattvend/cupy | 522eda0e147f8560c7883233ea737e2491e6105d | [
"MIT"
] | null | null | null | cupy/cuda/__init__.py | mattvend/cupy | 522eda0e147f8560c7883233ea737e2491e6105d | [
"MIT"
] | null | null | null | cupy/cuda/__init__.py | mattvend/cupy | 522eda0e147f8560c7883233ea737e2491e6105d | [
"MIT"
] | null | null | null | import contextlib
import warnings
from cupy._environment import get_cuda_path, get_nvcc_path # NOQA
from cupy.cuda import compiler # NOQA
from cupy.cuda import device # NOQA
from cupy.cuda import function # NOQA
from cupy.cuda import memory # NOQA
from cupy.cuda import memory_hook # NOQA
from cupy.cuda import me... | 34.694915 | 100 | 0.716333 |
08e21fc30ad1004cd6e5e7a078f258dcd3b43b1f | 3,971 | py | Python | pandas/tests/extension/test_period.py | YuechengWu/pandas | 7f753892eb6b29aaa62176cb9f00ad84c092c09a | [
"BSD-3-Clause"
] | 1 | 2019-01-01T02:51:58.000Z | 2019-01-01T02:51:58.000Z | pandas/tests/extension/test_period.py | YuechengWu/pandas | 7f753892eb6b29aaa62176cb9f00ad84c092c09a | [
"BSD-3-Clause"
] | 1 | 2016-08-15T12:35:16.000Z | 2016-08-15T12:35:16.000Z | pandas/tests/extension/test_period.py | YuechengWu/pandas | 7f753892eb6b29aaa62176cb9f00ad84c092c09a | [
"BSD-3-Clause"
] | 2 | 2017-05-27T03:25:12.000Z | 2021-09-21T21:51:12.000Z | import numpy as np
import pytest
from pandas._libs.tslib import iNaT
from pandas.core.dtypes.dtypes import PeriodDtype
import pandas as pd
from pandas.core.arrays import PeriodArray
from pandas.tests.extension import base
@pytest.fixture
def dtype():
return PeriodDtype(freq='D')
@pytest.fixture
def data(dtyp... | 24.974843 | 76 | 0.684211 |
43a3316ded97e86f4fda0bbac8016183dd35742a | 415 | py | Python | pochtogramm/pochtogramm/wsgi.py | grand-roman/chat_site | 01a2e1954beadf9f5945e69e5ba96e9dc6129812 | [
"BSD-2-Clause"
] | null | null | null | pochtogramm/pochtogramm/wsgi.py | grand-roman/chat_site | 01a2e1954beadf9f5945e69e5ba96e9dc6129812 | [
"BSD-2-Clause"
] | null | null | null | pochtogramm/pochtogramm/wsgi.py | grand-roman/chat_site | 01a2e1954beadf9f5945e69e5ba96e9dc6129812 | [
"BSD-2-Clause"
] | null | null | null | """
WSGI config for pochtogramm project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefa... | 24.411765 | 79 | 0.759036 |
b9553ca742928353422d87555cd9d2ebb053a107 | 1,425 | py | Python | Samples/petstore/Python/swaggerpetstore/models/order.py | ratchapol-an/autorest | c419134517972d9c97177180d2a2faaaff4cc36a | [
"MIT"
] | 12 | 2017-03-15T11:05:19.000Z | 2019-08-22T07:47:31.000Z | Samples/petstore/Python/swaggerpetstore/models/order.py | ratchapol-an/autorest | c419134517972d9c97177180d2a2faaaff4cc36a | [
"MIT"
] | 14 | 2018-01-24T05:36:23.000Z | 2019-06-28T10:59:42.000Z | Samples/petstore/Python/swaggerpetstore/models/order.py | ratchapol-an/autorest | c419134517972d9c97177180d2a2faaaff4cc36a | [
"MIT"
] | 15 | 2017-03-23T05:38:05.000Z | 2019-07-23T05:33:37.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
from msrest.serialization import Model
class Order(Model):
"""Order.
Variables are only populated by the server, and will be ignored when
... | 29.081633 | 95 | 0.517193 |
851f9443c2433eaafce50386d727f5506441d366 | 476 | py | Python | plotly/validators/scatter3d/_selectedpoints.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatter3d/_selectedpoints.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatter3d/_selectedpoints.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name='selectedpoints', parent_name='scatter3d', **kwargs
):
super(SelectedpointsValidator, self).__init__(
plotly_name=plotly_name,
... | 29.75 | 77 | 0.647059 |
453be0b21e7dd38329a2ab0b19423a5b648e3c70 | 13,937 | py | Python | paddlenlp/metrics/glue.py | gongel/PaddleNLP | 844f24ce67f8f72995e73e78a5718b8b66680caa | [
"Apache-2.0"
] | null | null | null | paddlenlp/metrics/glue.py | gongel/PaddleNLP | 844f24ce67f8f72995e73e78a5718b8b66680caa | [
"Apache-2.0"
] | null | null | null | paddlenlp/metrics/glue.py | gongel/PaddleNLP | 844f24ce67f8f72995e73e78a5718b8b66680caa | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 31.747153 | 128 | 0.553634 |
2622cf45088ec33d4aced3f232c34cb74de56d12 | 3,286 | py | Python | pkdoutu/pkdoutu/settings.py | egdw/pkdoutu_scrapy | d32849d258eefcfe1967509ec3d4029f232f0e55 | [
"MIT"
] | null | null | null | pkdoutu/pkdoutu/settings.py | egdw/pkdoutu_scrapy | d32849d258eefcfe1967509ec3d4029f232f0e55 | [
"MIT"
] | null | null | null | pkdoutu/pkdoutu/settings.py | egdw/pkdoutu_scrapy | d32849d258eefcfe1967509ec3d4029f232f0e55 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for pkdoutu project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/topic... | 35.717391 | 134 | 0.775107 |
f11173a53e75fc0fc003af4d37dab0c490d65ff4 | 6,069 | py | Python | grid_world_from_scratch.py | kaichaza/reinforcement_learning_from_scratch | c596a14aeb9bb8c8f6eba403bb5d49d0ac2417e6 | [
"Apache-2.0"
] | null | null | null | grid_world_from_scratch.py | kaichaza/reinforcement_learning_from_scratch | c596a14aeb9bb8c8f6eba403bb5d49d0ac2417e6 | [
"Apache-2.0"
] | null | null | null | grid_world_from_scratch.py | kaichaza/reinforcement_learning_from_scratch | c596a14aeb9bb8c8f6eba403bb5d49d0ac2417e6 | [
"Apache-2.0"
] | 1 | 2020-12-01T23:13:36.000Z | 2020-12-01T23:13:36.000Z | # Based on the example of the Bellman Equation implementation of Grid World from
# https://towardsdatascience.com/reinforcement-learning-implement-grid-world-from-scratch-c5963765ebff
# Reinforcement Learning — Implement Grid World
# Introduction of Value Iteration, May 4, 2019
# Jeremy Zhang
# Each action is de... | 35.080925 | 103 | 0.47998 |
9c6a19a3f6909af2e952fd889c7323a57f5d96af | 696 | py | Python | jp_ephys_viz/setup.py | flatironinstitute/ephys-viz-obsolete | 8825cc6cd9c21d5383f78462c707c42c2b674173 | [
"Apache-2.0"
] | 1 | 2021-09-23T01:04:19.000Z | 2021-09-23T01:04:19.000Z | jp_ephys_viz/setup.py | flatironinstitute/ephys-viz-obsolete | 8825cc6cd9c21d5383f78462c707c42c2b674173 | [
"Apache-2.0"
] | null | null | null | jp_ephys_viz/setup.py | flatironinstitute/ephys-viz-obsolete | 8825cc6cd9c21d5383f78462c707c42c2b674173 | [
"Apache-2.0"
] | 1 | 2021-09-23T01:04:21.000Z | 2021-09-23T01:04:21.000Z | import setuptools
setuptools.setup(
name="jp_ephys_viz",
version="0.6.16",
author="Jeremy Magland",
author_email="jmagland@flatironinstitute.org",
description="Use ephys-viz in jupyterlab and ipython notebook",
url="https://github.com/flatironinstitute/ephys-viz",
packages=setuptools.find_p... | 26.769231 | 67 | 0.614943 |
9bcce73162d698fce642012e29a7ec9130e0878f | 27,411 | py | Python | lib/api.py | Ziftr/counterpartyd | 1c6e523a3428098953ab3f1fcaf14a689050eec7 | [
"MIT"
] | null | null | null | lib/api.py | Ziftr/counterpartyd | 1c6e523a3428098953ab3f1fcaf14a689050eec7 | [
"MIT"
] | null | null | null | lib/api.py | Ziftr/counterpartyd | 1c6e523a3428098953ab3f1fcaf14a689050eec7 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
import sys
import os
import threading
import decimal
import time
import json
import re
import requests
import collections
import logging
from logging import handlers as logging_handlers
D = decimal.Decimal
import apsw
import flask
from flask.ext.httpauth import HTTPBasicAuth
from tornado.wsgi impo... | 43.303318 | 171 | 0.584145 |
c12f86f41900c303714cc69d9188d650d038f8f8 | 5,662 | py | Python | light_dist_gnn/coo_graph/datasets.py | chenzhao/dist-gnn | 4ca9ae14110c928a3251c36d9544a200657cfc9e | [
"MIT"
] | null | null | null | light_dist_gnn/coo_graph/datasets.py | chenzhao/dist-gnn | 4ca9ae14110c928a3251c36d9544a200657cfc9e | [
"MIT"
] | null | null | null | light_dist_gnn/coo_graph/datasets.py | chenzhao/dist-gnn | 4ca9ae14110c928a3251c36d9544a200657cfc9e | [
"MIT"
] | 1 | 2021-08-05T14:17:34.000Z | 2021-08-05T14:17:34.000Z | # Copyright 2021, Zhao CHEN
# All rights reserved.
import os
import torch
data_root = os.path.join(os.path.dirname(__file__), '..', 'data')
dgl_root = os.path.join(data_root, 'dgl_datasets')
pyg_root = os.path.join(data_root, 'pyg_datasets')
for path in [data_root, dgl_root, pyg_root]:
os.makedirs(path, exist_ok... | 39.594406 | 121 | 0.666549 |
02d57b31552c5f0dd2ebeb83b7526de940bbc879 | 11,259 | py | Python | tests/test_restore_models.py | felixlaumon/pytorch-lightning | deb1581e26b7547baf876b7a94361e60bb200d32 | [
"Apache-2.0"
] | null | null | null | tests/test_restore_models.py | felixlaumon/pytorch-lightning | deb1581e26b7547baf876b7a94361e60bb200d32 | [
"Apache-2.0"
] | null | null | null | tests/test_restore_models.py | felixlaumon/pytorch-lightning | deb1581e26b7547baf876b7a94361e60bb200d32 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import torch
import tests.utils as tutils
from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import ModelCheckpoint
from pytorch_lightning.testing import LightningTestModel
def test_running_test_pretrained_model_ddp(tmpdir):
"""Verify `test()` on pretrained model."""... | 29.944149 | 98 | 0.683187 |
b7f94d6cc8d01de5c4a6b26a6bb94d7eff653c99 | 389 | py | Python | satellite/tests/routes/test_manager.py | theslyone/vgs-satellite | fce0f90e18e941c52b2e80213f36748a4e877f82 | [
"Apache-2.0"
] | 15 | 2020-06-03T07:31:22.000Z | 2021-11-03T19:30:47.000Z | satellite/tests/routes/test_manager.py | theslyone/vgs-satellite | fce0f90e18e941c52b2e80213f36748a4e877f82 | [
"Apache-2.0"
] | 55 | 2020-07-14T23:51:02.000Z | 2022-03-25T19:12:02.000Z | satellite/tests/routes/test_manager.py | theslyone/vgs-satellite | fce0f90e18e941c52b2e80213f36748a4e877f82 | [
"Apache-2.0"
] | 17 | 2020-03-23T23:12:43.000Z | 2022-02-19T15:46:21.000Z | from satellite.routes import manager as route_manager
from ..factories import RouteFactory
def test_replace():
old_route = RouteFactory()
assert route_manager.get(old_route.id) is not None
new_route = RouteFactory.stub()
route_manager.replace([new_route.__dict__])
assert route_manager.get(old_rout... | 32.416667 | 54 | 0.768638 |
224df0c41fa0701fc0d526749d18cd3d22903775 | 2,087 | py | Python | server/pdf2img.py | SarthakRout/gradeLess | bff63dd60d1d2833733e6a64289a00b3585c4e8b | [
"MIT"
] | null | null | null | server/pdf2img.py | SarthakRout/gradeLess | bff63dd60d1d2833733e6a64289a00b3585c4e8b | [
"MIT"
] | null | null | null | server/pdf2img.py | SarthakRout/gradeLess | bff63dd60d1d2833733e6a64289a00b3585c4e8b | [
"MIT"
] | null | null | null | #PDF TO IMAGE CONVERSION
#IMPORT LIBRARIES
import pdf2image
from PIL import Image
import time
import sys
#DECLARE CONSTANTS
PDF_PATH = sys.argv[1]
INDEX = sys.argv[2]
DPI = 200
OUTPUT_FOLDER = "images"
FIRST_PAGE = None
LAST_PAGE = None
FORMAT = 'jpg'
THREAD_COUNT = 1
USERPWD = None
USE_CROPBOX = False
STRICT = False... | 38.648148 | 249 | 0.732631 |
82879ff49aa931cbc39b35c3a2bfdb65fe343d47 | 2,949 | py | Python | api/api.py | WikimapsAtlas/wikimapsatlas-server | 9c24372e6ffbb5cbbc3c54fe4f255595d7ccd258 | [
"Unlicense"
] | 1 | 2017-04-10T03:26:08.000Z | 2017-04-10T03:26:08.000Z | api/api.py | WikimapsAtlas/wikimapsatlas-server | 9c24372e6ffbb5cbbc3c54fe4f255595d7ccd258 | [
"Unlicense"
] | null | null | null | api/api.py | WikimapsAtlas/wikimapsatlas-server | 9c24372e6ffbb5cbbc3c54fe4f255595d7ccd258 | [
"Unlicense"
] | null | null | null | # REFERENCE
# http://flask.pocoo.org/docs/0.10/quickstart/#a-minimal-application
# https://pythonhosted.org/Flask-SQLAlchemy/
# http://zetcode.com/db/postgresqlpythontutorial/
# http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
# http://blog.luisrei.com/articles/flaskrest.html
# DEPENDE... | 28.085714 | 142 | 0.700576 |
adfb59f2720e46b91cceea04c04a60b1c6c68bc1 | 2,159 | py | Python | docsrc/conf.py | jangroth/keydra | 9bab1b21e025ceb6ae074ea936d693e36efae5a4 | [
"MIT"
] | 12 | 2021-05-04T10:47:02.000Z | 2022-03-10T13:25:04.000Z | docsrc/conf.py | jangroth/keydra | 9bab1b21e025ceb6ae074ea936d693e36efae5a4 | [
"MIT"
] | 17 | 2021-05-04T00:53:49.000Z | 2022-01-18T10:01:49.000Z | docsrc/conf.py | jangroth/keydra | 9bab1b21e025ceb6ae074ea936d693e36efae5a4 | [
"MIT"
] | 9 | 2021-05-04T00:46:38.000Z | 2022-02-16T02:55:50.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.215385 | 79 | 0.671144 |
f7402a374775523fcf6b679ffe30baedc1452878 | 6,346 | py | Python | model-optimizer/mo/middle/passes/fusing/fuse_grouped_conv.py | calvinfeng/openvino | 11f591c16852637506b1b40d083b450e56d0c8ac | [
"Apache-2.0"
] | null | null | null | model-optimizer/mo/middle/passes/fusing/fuse_grouped_conv.py | calvinfeng/openvino | 11f591c16852637506b1b40d083b450e56d0c8ac | [
"Apache-2.0"
] | 19 | 2021-03-26T08:11:00.000Z | 2022-02-21T13:06:26.000Z | model-optimizer/mo/middle/passes/fusing/fuse_grouped_conv.py | calvinfeng/openvino | 11f591c16852637506b1b40d083b450e56d0c8ac | [
"Apache-2.0"
] | 1 | 2021-07-28T17:30:46.000Z | 2021-07-28T17:30:46.000Z | """
Copyright (C) 2018-2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | 38.695122 | 131 | 0.624961 |
766fc88219c8c6fc6a404c4ca571a9c060340fa9 | 7,194 | py | Python | backend_codes/envio_email_vagasds_publico.py | mvpalheta/vagas_ds | 34f1873ad4094f07495cc587bde2372491aaf09d | [
"MIT"
] | 3 | 2021-12-07T22:35:01.000Z | 2022-01-17T06:12:13.000Z | backend_codes/envio_email_vagasds_publico.py | mvpalheta/vagas_ds | 34f1873ad4094f07495cc587bde2372491aaf09d | [
"MIT"
] | null | null | null | backend_codes/envio_email_vagasds_publico.py | mvpalheta/vagas_ds | 34f1873ad4094f07495cc587bde2372491aaf09d | [
"MIT"
] | 1 | 2021-12-08T00:55:04.000Z | 2021-12-08T00:55:04.000Z | ###########################################################################################################
## Este programa checa a lista de envio de e-mails e envia conforme as preferências de vagas cadastradas ##
########################################################################################################... | 53.288889 | 227 | 0.684876 |
accb502f1ee04974e90f331f46d8ce358e2de784 | 3,348 | py | Python | .history/Missions_to_Mars/scrape_mars_20200809104453.py | ermiasgelaye/web-scraping-challenge | f99c3436dfb0169595c46dae7733d90e21385cc6 | [
"ADSL"
] | null | null | null | .history/Missions_to_Mars/scrape_mars_20200809104453.py | ermiasgelaye/web-scraping-challenge | f99c3436dfb0169595c46dae7733d90e21385cc6 | [
"ADSL"
] | null | null | null | .history/Missions_to_Mars/scrape_mars_20200809104453.py | ermiasgelaye/web-scraping-challenge | f99c3436dfb0169595c46dae7733d90e21385cc6 | [
"ADSL"
] | 2 | 2020-11-02T08:12:16.000Z | 2021-05-17T21:45:42.000Z | from splinter import Browser
from bs4 import BeautifulSoup as bs
import pandas as pd
import time
import re
# This is for debugging
def savetofile(contents):
file = open('_temporary.txt',"w",encoding="utf-8")
file.write(contents)
file.close()
def scrape():
executable_path = {"executable_path": "chrom... | 27.442623 | 101 | 0.633513 |
0f2346f935e675480e8aa3c051d12d4b2cc43433 | 7,594 | py | Python | proxy/proxy.py | zanachka/proxy.py | ab5c155213115d1664ce429ec155184d16ca9be6 | [
"BSD-3-Clause"
] | null | null | null | proxy/proxy.py | zanachka/proxy.py | ab5c155213115d1664ce429ec155184d16ca9be6 | [
"BSD-3-Clause"
] | null | null | null | proxy/proxy.py | zanachka/proxy.py | ab5c155213115d1664ce429ec155184d16ca9be6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | 32.592275 | 92 | 0.663418 |
0819502441c2cdd9f77df0cebc5591ca477d3dc0 | 17,916 | py | Python | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/12-sender_receiver_7.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/12-sender_receiver_7.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/12-sender_receiver_7.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet
from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msa... | 38.863341 | 89 | 0.574459 |
9610f9120aa6b495e74b8cde5c6cbd9ceb83894c | 7,002 | py | Python | models/modelBuilder/build_resnet_selu.py | Amanda-Barbara/nvcaffe | 5155a708b235a818ce300aa3f9fc235ece9a35fb | [
"BSD-2-Clause"
] | 758 | 2015-03-08T20:54:38.000Z | 2022-01-11T03:14:51.000Z | models/modelBuilder/build_resnet_selu.py | Matsuko9/caffe | 17e347e42e664b87d80f63bfbbb89bec5e559242 | [
"BSD-2-Clause"
] | 493 | 2015-04-28T00:08:53.000Z | 2021-08-04T07:26:54.000Z | models/modelBuilder/build_resnet_selu.py | Matsuko9/caffe | 17e347e42e664b87d80f63bfbbb89bec5e559242 | [
"BSD-2-Clause"
] | 389 | 2015-03-05T12:11:44.000Z | 2022-03-13T21:49:42.000Z | #!/usr/bin/env python
# ref: Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun"Deep Residual Learning for Image Recognition"
# https://arxiv.org/pdf/1512.03385v1.pdf
import numpy
from layers import *
#------------------------------------------------------------------------------
def addResSelu_small(model, na... | 39.337079 | 119 | 0.544987 |
5510a0dccd32c88a346b5024388406568d76ca94 | 14,200 | py | Python | Lib/test/test_cgi.py | certik/python-3.3 | 7caa9aa12103810526ed7d99794f491d8e0cbd91 | [
"PSF-2.0"
] | 1 | 2020-11-26T18:53:46.000Z | 2020-11-26T18:53:46.000Z | Lib/test/test_cgi.py | certik/python-3.3 | 7caa9aa12103810526ed7d99794f491d8e0cbd91 | [
"PSF-2.0"
] | null | null | null | Lib/test/test_cgi.py | certik/python-3.3 | 7caa9aa12103810526ed7d99794f491d8e0cbd91 | [
"PSF-2.0"
] | 3 | 2015-05-20T14:18:45.000Z | 2021-06-28T15:52:33.000Z | from test.support import run_unittest, check_warnings
import cgi
import os
import sys
import tempfile
import unittest
import warnings
from io import StringIO, BytesIO
class HackedSysModule:
# The regression test will have real values in sys.argv, which
# will completely confuse the test of the cgi module
a... | 35.858586 | 183 | 0.555282 |
df36e68dce0bc28b8e11a3bb884131bc2944472f | 4,627 | py | Python | Ported-Exploits/CVE-2019-1003000_CVE-2018-1999002_exploit_chain.py | wetw0rk/Exploit-Development | e40e3d995d89b0e293f4da6864156425ec1a00af | [
"MIT"
] | 50 | 2018-02-06T21:56:35.000Z | 2022-02-17T17:25:36.000Z | Ported-Exploits/CVE-2019-1003000_CVE-2018-1999002_exploit_chain.py | wetw0rk/Misc-Exploits | e40e3d995d89b0e293f4da6864156425ec1a00af | [
"MIT"
] | 1 | 2018-01-01T11:58:35.000Z | 2018-01-01T12:21:31.000Z | Ported-Exploits/CVE-2019-1003000_CVE-2018-1999002_exploit_chain.py | wetw0rk/Misc-Exploits | e40e3d995d89b0e293f4da6864156425ec1a00af | [
"MIT"
] | 32 | 2018-02-08T00:59:39.000Z | 2021-06-25T21:35:26.000Z | #!/usr/bin/env python
#
# Exploit Title : jenkins-preauth-rce-exploit.py
# Date : 02/23/2019
# Authors : wetw0rk & 0xtavian
# Vendor Homepage : https://jenkins.oi
# Software Link : https://jenkins.io/download/
# Tested on : jenkins=v2.73 Plugins: Script Security=v1.49, Pipeline:... | 30.045455 | 121 | 0.624811 |
704b681f37404401ac82d69dc5501d763ed5e8fd | 4,354 | py | Python | app/user/tests/test_user_api.py | dmitry-malinovsky/slothcooker-api | 10cf38606b2542f0f67ed1714ff568c7ee367a8f | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | dmitry-malinovsky/slothcooker-api | 10cf38606b2542f0f67ed1714ff568c7ee367a8f | [
"MIT"
] | null | null | null | app/user/tests/test_user_api.py | dmitry-malinovsky/slothcooker-api | 10cf38606b2542f0f67ed1714ff568c7ee367a8f | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse('user:create')
TOKEN_URL = reverse("user:token")
ME_URL = reverse("user:me")
def create_user(**params)... | 29.026667 | 77 | 0.61989 |
857934435d4d7764d58c127a76118fb12ffcb455 | 1,582 | py | Python | pcdet/models/backbones_2d/map_to_bev/pointpillar_scatter.py | twn29004/OpenPCDet | 3457cc30b21d882a1376ef272fbaa49755c72a2e | [
"Apache-2.0"
] | null | null | null | pcdet/models/backbones_2d/map_to_bev/pointpillar_scatter.py | twn29004/OpenPCDet | 3457cc30b21d882a1376ef272fbaa49755c72a2e | [
"Apache-2.0"
] | null | null | null | pcdet/models/backbones_2d/map_to_bev/pointpillar_scatter.py | twn29004/OpenPCDet | 3457cc30b21d882a1376ef272fbaa49755c72a2e | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
class PointPillarScatter(nn.Module):
def __init__(self, model_cfg, grid_size, **kwargs):
super().__init__()
self.model_cfg = model_cfg
self.num_bev_features = self.model_cfg.NUM_BEV_FEATURES
self.nx, self.ny, self.nz = grid_size
... | 41.631579 | 124 | 0.617573 |
44eadb01d6dc69c56397dbe52456c0dbec8e10d5 | 2,464 | py | Python | frontend/backend/app.py | UwemEkong/LetsMeet | 078d08e15ff369a162ff4141b6cc14a650f6084a | [
"MIT"
] | null | null | null | frontend/backend/app.py | UwemEkong/LetsMeet | 078d08e15ff369a162ff4141b6cc14a650f6084a | [
"MIT"
] | null | null | null | frontend/backend/app.py | UwemEkong/LetsMeet | 078d08e15ff369a162ff4141b6cc14a650f6084a | [
"MIT"
] | null | null | null | import json
import aiohttp
from quart import Quart, request, render_template
from .meetup import Category, Group, Event
app = Quart(__name__)
@app.before_serving
async def setup_session():
app.session = aiohttp.ClientSession()
@app.errorhandler(404)
async def not_found(err):
return await render_template(... | 32 | 117 | 0.613231 |
c949793eb27b61430176b084b46d6694c22b1c2e | 88,485 | py | Python | manim/mobject/mobject.py | Ulthran/manim | 3b55ea5e9e0e218f4c5c9e2333cfa2b4bfd9ce38 | [
"MIT"
] | 1 | 2021-09-17T20:02:54.000Z | 2021-09-17T20:02:54.000Z | manim/mobject/mobject.py | tpyte001/manim-1 | 3b55ea5e9e0e218f4c5c9e2333cfa2b4bfd9ce38 | [
"MIT"
] | null | null | null | manim/mobject/mobject.py | tpyte001/manim-1 | 3b55ea5e9e0e218f4c5c9e2333cfa2b4bfd9ce38 | [
"MIT"
] | null | null | null | """Base classes for objects that can be displayed."""
__all__ = ["Mobject", "Group", "override_animate"]
import copy
import itertools as it
import operator as op
import random
import sys
import types
import warnings
from functools import reduce
from math import ceil
from pathlib import Path
from typing import (
... | 31.556705 | 130 | 0.560807 |
c76c92394864a805b4b74115c8ec9c7a38e436af | 8,102 | py | Python | oregano_gui/qt/address_dialog.py | MrNaif2018/Oregano | cc08f813f9cbdb80d1ac607892f8439ec064ee04 | [
"MIT"
] | null | null | null | oregano_gui/qt/address_dialog.py | MrNaif2018/Oregano | cc08f813f9cbdb80d1ac607892f8439ec064ee04 | [
"MIT"
] | null | null | null | oregano_gui/qt/address_dialog.py | MrNaif2018/Oregano | cc08f813f9cbdb80d1ac607892f8439ec064ee04 | [
"MIT"
] | 1 | 2021-07-04T10:52:42.000Z | 2021-07-04T10:52:42.000Z | #!/usr/bin/env python3
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# 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 with... | 41.762887 | 139 | 0.674155 |
9eb0a93bfcc92d50ba3b299ec9f7bd34650391d9 | 1,664 | py | Python | integrations/raveos/RAVINOS/stats.py | dragonflip/stratum-miner | f8c545a1de6476a3b4ab3717409c854cecd6bf15 | [
"MIT"
] | 80 | 2021-12-15T14:22:43.000Z | 2022-03-30T21:57:43.000Z | integrations/raveos/RAVINOS/stats.py | dragonflip/stratum-miner | f8c545a1de6476a3b4ab3717409c854cecd6bf15 | [
"MIT"
] | 14 | 2021-12-23T14:43:30.000Z | 2022-02-13T05:52:52.000Z | integrations/raveos/RAVINOS/stats.py | dragonflip/stratum-miner | f8c545a1de6476a3b4ab3717409c854cecd6bf15 | [
"MIT"
] | 27 | 2021-12-20T15:19:13.000Z | 2022-03-25T14:07:51.000Z | import json
import os
import ravinos
cfg = ravinos.get_config()
stats_ravin = ravinos.get_stats()
stats_json_path = os.path.join(cfg['miner_dir'], 'data', 'stats.json')
if not os.path.isfile(stats_json_path):
stats_ravin['shares'] = {
'accepted': 0,
'invalid': 0,
'rejected': 0
}
else:... | 28.20339 | 70 | 0.519832 |
94b0872923c8399962f7354d19cba7f88e01415d | 9,096 | py | Python | train.py | zaratropia/mitral-valve-segmentation-unet | 916d20b8925240c49679e56ff95764a1262defc6 | [
"MIT"
] | 1 | 2020-10-13T09:01:00.000Z | 2020-10-13T09:01:00.000Z | train.py | zaratropia/mitral-valve-segmentation-unet | 916d20b8925240c49679e56ff95764a1262defc6 | [
"MIT"
] | 3 | 2018-03-04T15:51:43.000Z | 2019-07-31T16:51:00.000Z | train.py | zaratropia/mitral-valve-segmentation-unet | 916d20b8925240c49679e56ff95764a1262defc6 | [
"MIT"
] | null | null | null | from __future__ import print_function
import Image
import png
import os
from skimage.transform import resize
from skimage.io import imsave
import numpy as np
import nrrd
from keras.models import Model
from keras.layers import Input, concatenate, Conv2D, MaxPooling2D, Conv2DTranspose
from keras.optimizers import Adam
f... | 42.504673 | 205 | 0.650836 |
18306b43574565e6cda370b220358972ed79b70e | 2,184 | py | Python | src/python/self-site/guessit/transfo/guess_weak_episodes_rexps.py | LabsRS-Dev/SubtitlesEyes | 8512d10a536f1b1e80b46d1be4034559cd048cc5 | [
"Apache-2.0"
] | null | null | null | src/python/self-site/guessit/transfo/guess_weak_episodes_rexps.py | LabsRS-Dev/SubtitlesEyes | 8512d10a536f1b1e80b46d1be4034559cd048cc5 | [
"Apache-2.0"
] | null | null | null | src/python/self-site/guessit/transfo/guess_weak_episodes_rexps.py | LabsRS-Dev/SubtitlesEyes | 8512d10a536f1b1e80b46d1be4034559cd048cc5 | [
"Apache-2.0"
] | 1 | 2021-08-29T18:32:43.000Z | 2021-08-29T18:32:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2012 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | 34.666667 | 89 | 0.65522 |
9e3ee44fcd854f72634e454462978c1307366be2 | 34,852 | py | Python | trac/tests/attachment.py | davigo/tracsoftpi | 2a325bdee77903bd5ee2c13df28732bceaf37470 | [
"BSD-3-Clause"
] | null | null | null | trac/tests/attachment.py | davigo/tracsoftpi | 2a325bdee77903bd5ee2c13df28732bceaf37470 | [
"BSD-3-Clause"
] | null | null | null | trac/tests/attachment.py | davigo/tracsoftpi | 2a325bdee77903bd5ee2c13df28732bceaf37470 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2020 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This software cons... | 44.397452 | 84 | 0.626822 |
8c60c4a2a6107c8862250e8b1aabc0f6c4c79ff7 | 11,110 | py | Python | airflow/gcp/hooks/kubernetes_engine.py | mgasner/airflow | 3bc3521756b8b8be027df05c476e727d86b63b7b | [
"Apache-2.0"
] | 1 | 2019-09-06T09:55:18.000Z | 2019-09-06T09:55:18.000Z | airflow/gcp/hooks/kubernetes_engine.py | mgasner/airflow | 3bc3521756b8b8be027df05c476e727d86b63b7b | [
"Apache-2.0"
] | null | null | null | airflow/gcp/hooks/kubernetes_engine.py | mgasner/airflow | 3bc3521756b8b8be027df05c476e727d86b63b7b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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
#... | 41.148148 | 100 | 0.616382 |
5b6eda14763c7a1a074b462b03642c05fc9ed5ec | 12,727 | py | Python | vizier/api/client/cli/packages.py | sanchitcop19/web-api-async | a3fff70c3b62678f3c8ef8cc07f7c9b4fe155c69 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | vizier/api/client/cli/packages.py | sanchitcop19/web-api-async | a3fff70c3b62678f3c8ef8cc07f7c9b4fe155c69 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | vizier/api/client/cli/packages.py | sanchitcop19/web-api-async | a3fff70c3b62678f3c8ef8cc07f7c9b4fe155c69 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017-2019 New York University,
# University at Buffalo,
# Illinois Institute of Technology.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of th... | 43.886207 | 109 | 0.564705 |
cd96a2c8e822b633c8b5d5ffda35259ad0a8765b | 13,747 | py | Python | basicsr/utils/matlab_functions.py | My-Zhu/BasicSR | c26dd943191a3c2528e1b924c366acb221ead86f | [
"Apache-2.0"
] | 1,421 | 2019-04-10T14:38:55.000Z | 2022-03-28T02:32:17.000Z | basicsr/utils/matlab_functions.py | My-Zhu/BasicSR | c26dd943191a3c2528e1b924c366acb221ead86f | [
"Apache-2.0"
] | 198 | 2019-05-20T06:34:21.000Z | 2022-01-28T13:06:47.000Z | basicsr/utils/matlab_functions.py | My-Zhu/BasicSR | c26dd943191a3c2528e1b924c366acb221ead86f | [
"Apache-2.0"
] | 353 | 2019-05-11T16:07:34.000Z | 2022-03-29T12:01:34.000Z | import math
import numpy as np
import torch
def cubic(x):
"""cubic function used for calculate_weights_indices."""
absx = torch.abs(x)
absx2 = absx**2
absx3 = absx**3
return (1.5 * absx3 - 2.5 * absx2 + 1) * (
(absx <= 1).type_as(absx)) + (-0.5 * absx3 + 2.5 * absx2 - 4 * absx +
... | 37.975138 | 79 | 0.626318 |
4d45034bb9388dfb05291f33129e294b2a0ed4d5 | 5,072 | py | Python | tests/test_part.py | mark-bromell/myver | e484fb44b4aa4f6aec20063bd756e72f1d2eb1bc | [
"MIT"
] | null | null | null | tests/test_part.py | mark-bromell/myver | e484fb44b4aa4f6aec20063bd756e72f1d2eb1bc | [
"MIT"
] | 1 | 2021-12-05T17:47:24.000Z | 2021-12-05T17:47:24.000Z | tests/test_part.py | mark-bromell/myver | e484fb44b4aa4f6aec20063bd756e72f1d2eb1bc | [
"MIT"
] | null | null | null | import pytest
from myver.error import ConfigError
from myver.part import NumberPart, IdentifierPart
def test_part_eq():
part1 = NumberPart(
key='one',
value=5)
part2 = NumberPart(
key='one',
value=5)
assert part1 == part2
def test_part_is_set():
part = NumberPart(
... | 21.045643 | 49 | 0.552248 |
e22117e29bfc4617c3023a3c07483a4ae43f47b5 | 8,102 | py | Python | taco/wallet/puzzles/test_cc.py | MinerGreggy/taco-blockchain | 4f8e9c9d7df2181c81b247e35bdb5ad4ff99b19d | [
"Apache-2.0"
] | 18 | 2021-07-14T09:56:37.000Z | 2022-02-09T04:32:58.000Z | taco/wallet/puzzles/test_cc.py | MinerGreggy/taco-blockchain | 4f8e9c9d7df2181c81b247e35bdb5ad4ff99b19d | [
"Apache-2.0"
] | 9 | 2021-07-14T15:48:28.000Z | 2021-10-10T02:32:59.000Z | taco/wallet/puzzles/test_cc.py | MinerGreggy/taco-blockchain | 4f8e9c9d7df2181c81b247e35bdb5ad4ff99b19d | [
"Apache-2.0"
] | 10 | 2021-07-18T03:22:43.000Z | 2022-03-15T08:40:06.000Z | # this is used to iterate on `cc.clvm` to ensure that it's producing the sort
# of output that we expect
from typing import Dict, List, Optional, Tuple
from blspy import G2Element
from taco.types.blockchain_format.coin import Coin
from taco.types.blockchain_format.program import Program
from taco.types.blockchain_fo... | 33.341564 | 120 | 0.748457 |
7a0d471398b0ff8e4f0ddf12155726ba9b9e80ba | 5,424 | py | Python | tests/kafkatest/tests/client/client_compatibility_features_test.py | 1810824959/kafka | bb1ef567b44208e63459ca6f9db0654d867d7e7e | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/tests/client/client_compatibility_features_test.py | 1810824959/kafka | bb1ef567b44208e63459ca6f9db0654d867d7e7e | [
"Apache-2.0"
] | null | null | null | tests/kafkatest/tests/client/client_compatibility_features_test.py | 1810824959/kafka | bb1ef567b44208e63459ca6f9db0654d867d7e7e | [
"Apache-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 use ... | 43.392 | 234 | 0.678466 |
c73ef738a297bc14a20ea1e41a7f45b63918b5aa | 35,084 | py | Python | xarray/core/groupby.py | santisoler/xarray | 49aa235fc63706dc145128dd13fdf139b9d5bc6e | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | xarray/core/groupby.py | santisoler/xarray | 49aa235fc63706dc145128dd13fdf139b9d5bc6e | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | 8 | 2021-04-14T21:47:20.000Z | 2022-02-14T03:05:53.000Z | xarray/core/groupby.py | weiji14/xarray | 2bb5d20fb2b4158390ab05aa6bf598b78f2caa9d | [
"CC-BY-4.0",
"PSF-2.0",
"BSD-2-Clause",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import datetime
import warnings
import numpy as np
import pandas as pd
from . import dtypes, duck_array_ops, nputils, ops
from .arithmetic import DataArrayGroupbyArithmetic, DatasetGroupbyArithmetic
from .concat import concat
from .formatting import format_array_flat
from .indexes import propagate_indexes
from .optio... | 35.189569 | 101 | 0.587533 |
72c270c782e9647ebdc93f226e2aace971cfb862 | 1,582 | py | Python | assets/migrations/0001_initial.py | dhathris/asset_store_full | 508701912326153c25bf1b60b8c7a14c611c7087 | [
"MIT"
] | null | null | null | assets/migrations/0001_initial.py | dhathris/asset_store_full | 508701912326153c25bf1b60b8c7a14c611c7087 | [
"MIT"
] | null | null | null | assets/migrations/0001_initial.py | dhathris/asset_store_full | 508701912326153c25bf1b60b8c7a14c611c7087 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.4 on 2019-01-22 15:16
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Asset',
fields=[
... | 36.790698 | 114 | 0.581542 |
6352fa37c78c1368cdf0c491137b7fe77addf7e5 | 10,262 | py | Python | moto/xray/models.py | orenmazor/moto | 4778377e8ecaf729d26602a2c5202b72c1438503 | [
"Apache-2.0"
] | 1 | 2021-12-12T04:23:06.000Z | 2021-12-12T04:23:06.000Z | moto/xray/models.py | orenmazor/moto | 4778377e8ecaf729d26602a2c5202b72c1438503 | [
"Apache-2.0"
] | 4 | 2017-09-30T07:52:52.000Z | 2021-12-13T06:56:55.000Z | moto/xray/models.py | orenmazor/moto | 4778377e8ecaf729d26602a2c5202b72c1438503 | [
"Apache-2.0"
] | 2 | 2021-11-24T08:05:43.000Z | 2021-11-25T16:18:48.000Z | from __future__ import unicode_literals
import bisect
from boto3 import Session
import datetime
from collections import defaultdict
import json
from moto.core import BaseBackend, BaseModel
from moto.core.exceptions import AWSError
from .exceptions import BadSegmentException
class TelemetryRecords(BaseModel):
def... | 34.552189 | 128 | 0.590723 |
d1c5ccfbf846497450896cb174887997cb494ea3 | 323 | py | Python | persons/forms.py | nhieckqo/lei | f461d8dcbc8f9e037c661abb18b226aa6fa7acae | [
"MIT"
] | null | null | null | persons/forms.py | nhieckqo/lei | f461d8dcbc8f9e037c661abb18b226aa6fa7acae | [
"MIT"
] | null | null | null | persons/forms.py | nhieckqo/lei | f461d8dcbc8f9e037c661abb18b226aa6fa7acae | [
"MIT"
] | null | null | null | from django import forms
from . import models
class PersonsForm(forms.ModelForm):
class Meta:
model = models.Persons
# fields = '__all__'
exclude = ['p_id', 'sex_types_id', 'profile_share_types_id', 'civil_status_id',
'timestamp_created', 'fullname', 'fulladdress... | 24.846154 | 87 | 0.628483 |
ba2af8cad9ec42dcca2c12b60b547ff3c9ad768b | 15,265 | py | Python | tests/minikube/test_kubernetes_pod_operator.py | dyna-dot/airflow | 02ef974e4b7c2a91b3074ddd8abcf4cd31d09e6f | [
"Apache-2.0"
] | 2 | 2020-09-30T01:06:15.000Z | 2021-08-07T09:16:21.000Z | tests/minikube/test_kubernetes_pod_operator.py | dyna-dot/airflow | 02ef974e4b7c2a91b3074ddd8abcf4cd31d09e6f | [
"Apache-2.0"
] | 1 | 2020-07-01T18:16:43.000Z | 2020-07-01T18:16:43.000Z | tests/minikube/test_kubernetes_pod_operator.py | dyna-dot/airflow | 02ef974e4b7c2a91b3074ddd8abcf4cd31d09e6f | [
"Apache-2.0"
] | 2 | 2019-07-04T02:46:30.000Z | 2019-07-15T00:56:09.000Z | # 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... | 33.257081 | 97 | 0.536521 |
bcb8432a71eab0ec8f6e0d64f29ca005eab8afe0 | 496 | py | Python | Beakjoon_Online_Judge/color_paper.py | pkch93/Algorithm | 5645698c8e9f36e08010fe33cba2bc03ed42c7b9 | [
"MIT"
] | 2 | 2019-04-05T07:11:57.000Z | 2020-01-21T02:45:26.000Z | Beakjoon_Online_Judge/color_paper.py | pkch93/Algorithm | 5645698c8e9f36e08010fe33cba2bc03ed42c7b9 | [
"MIT"
] | null | null | null | Beakjoon_Online_Judge/color_paper.py | pkch93/Algorithm | 5645698c8e9f36e08010fe33cba2bc03ed42c7b9 | [
"MIT"
] | 3 | 2019-05-26T15:19:18.000Z | 2019-10-27T13:34:32.000Z |
def solution(arr):
answer = 0
big_paper = [[0 for _ in range(100)] for _ in range(100)]
for x, y in arr:
for i in range(y, y+10):
for j in range(x, x+10):
big_paper[i][j] = 1
for i in range(100):
answer += big_paper[i].count(1)
return answer
def main():... | 20.666667 | 61 | 0.520161 |
445df741b004cbfcd5c87c4ed7bb6b34626e9c86 | 5,084 | py | Python | vis_tv/vis_tv_z2500_L1.py | danforthcenter/plantcv-dev-scripts | 57ebc9a031b7141b8965c927c3b7b01ba6504dc1 | [
"MIT"
] | null | null | null | vis_tv/vis_tv_z2500_L1.py | danforthcenter/plantcv-dev-scripts | 57ebc9a031b7141b8965c927c3b7b01ba6504dc1 | [
"MIT"
] | null | null | null | vis_tv/vis_tv_z2500_L1.py | danforthcenter/plantcv-dev-scripts | 57ebc9a031b7141b8965c927c3b7b01ba6504dc1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, traceback
import cv2
import numpy as np
import argparse
import string
import plantcv as pcv
### Parse command-line arguments
def options():
parser = argparse.ArgumentParser(description="Imaging processing with opencv")
parser.add_argument("-i", "--image", help="Input image file.",... | 42.722689 | 167 | 0.72502 |
eab64c2659da495f73da5bed8b33f302e58c9f19 | 789 | py | Python | Chapter 7/lasso_path_plot.py | tanS30/Building-Machine-Learning-Systems-With-Python-Second-Edition | d7a25b4a0186958745579a1d58f654e0577e50fc | [
"MIT"
] | 1,490 | 2015-01-03T12:21:33.000Z | 2022-03-30T15:45:34.000Z | Chapter 7/lasso_path_plot.py | tanS30/Building-Machine-Learning-Systems-With-Python-Second-Edition | d7a25b4a0186958745579a1d58f654e0577e50fc | [
"MIT"
] | 17 | 2015-01-27T21:08:00.000Z | 2020-09-30T19:44:24.000Z | Chapter 7/lasso_path_plot.py | tanS30/Building-Machine-Learning-Systems-With-Python-Second-Edition | d7a25b4a0186958745579a1d58f654e0577e50fc | [
"MIT"
] | 1,462 | 2015-01-01T08:17:00.000Z | 2022-02-27T03:50:06.000Z | # This code is supporting material for the book
# Building Machine Learning Systems with Python
# by Willi Richert and Luis Pedro Coelho
# published by PACKT Publishing
#
# It is made available under the MIT License
from sklearn.linear_model import Lasso
from sklearn.datasets import load_boston
from matplotlib import ... | 26.3 | 62 | 0.764259 |
810752c9bfe324e347e548bfdd17b9819ee668f7 | 55 | py | Python | test/login.py | liangyoule/First-Github | d0128a88960d89408c30b32bc73008fb69bbc2aa | [
"MIT"
] | null | null | null | test/login.py | liangyoule/First-Github | d0128a88960d89408c30b32bc73008fb69bbc2aa | [
"MIT"
] | null | null | null | test/login.py | liangyoule/First-Github | d0128a88960d89408c30b32bc73008fb69bbc2aa | [
"MIT"
] | null | null | null | num1 = 1
num2 = 2
num3 = 3
num4 = 4
num5 = 5
num6 = 6
| 7.857143 | 9 | 0.545455 |
dcb13866692b5df308a81b67d18692e67c45e897 | 6,811 | py | Python | Kai/crab/NANOv7_NoveCampaign_addition_v2/2018/crab_script_2018_WJets_SL-HT800.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2022-01-17T17:29:38.000Z | 2022-01-17T17:29:38.000Z | Kai/crab/NANOv7_NoveCampaign_addition_v2/2018/crab_script_2018_WJets_SL-HT800.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | null | null | null | Kai/crab/NANOv7_NoveCampaign_addition_v2/2018/crab_script_2018_WJets_SL-HT800.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2021-12-15T10:56:50.000Z | 2021-12-15T10:56:50.000Z | #!/usr/bin/env python
import os, time, collections, copy, json, multiprocessing
from PhysicsTools.NanoAODTools.postprocessing.framework.postprocessor import *
from PhysicsTools.NanoAODTools.postprocessing.framework.crabhelper import inputFiles,runsAndLumis
from PhysicsTools.NanoAODTools.postprocessing.modules.common.p... | 51.210526 | 535 | 0.551167 |
370b45d6908eb8981d77b66b2ec4413963544100 | 3,943 | py | Python | tests/unit/modules/test_twilio_notify.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2021-08-14T13:48:38.000Z | 2021-08-14T13:48:38.000Z | tests/unit/modules/test_twilio_notify.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 3 | 2015-03-31T14:44:05.000Z | 2015-06-18T19:02:24.000Z | tests/unit/modules/test_twilio_notify.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:24.000Z | 2020-01-02T09:03:24.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python Libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (... | 28.781022 | 80 | 0.492772 |
7f26ff51cf282cfef6a323c79ed5499fa13ab7ed | 2,280 | py | Python | Gesture-Controlling-Games-master/utils.py | Mohit-Sharma1/Gesture_gaming_project | a04d9ecc8dc81ee4984c3e627134540aa7c94bdb | [
"MIT"
] | null | null | null | Gesture-Controlling-Games-master/utils.py | Mohit-Sharma1/Gesture_gaming_project | a04d9ecc8dc81ee4984c3e627134540aa7c94bdb | [
"MIT"
] | null | null | null | Gesture-Controlling-Games-master/utils.py | Mohit-Sharma1/Gesture_gaming_project | a04d9ecc8dc81ee4984c3e627134540aa7c94bdb | [
"MIT"
] | null | null | null | import numpy as np
import gym
import tensorflow as tf
from time import sleep
IS_FULLSCREEN = False
WIDTH = 520
HEIGHT = 600
HAND_GESTURES = ["Open", "Closed"]
BLUE = (255, 0, 0)
GREEN = (0, 255, 0)
RED = (0, 0, 255)
ORANGE = (0,128,255)
YELLOW = (0,255,255)
MAGENTA = (255,0,255)
CYAN = (255,255,0)
PURPLE = (128,0,128)... | 32.571429 | 103 | 0.596053 |
093368e6a1c32568ee2c988afbd5b4156562a475 | 2,115 | py | Python | tests/func/test_state.py | vyloy/dvc | 60c89adeb5dcc293d8661d6aabeb1da6d05466f5 | [
"Apache-2.0"
] | 1 | 2019-04-16T19:51:03.000Z | 2019-04-16T19:51:03.000Z | tests/func/test_state.py | vyloy/dvc | 60c89adeb5dcc293d8661d6aabeb1da6d05466f5 | [
"Apache-2.0"
] | null | null | null | tests/func/test_state.py | vyloy/dvc | 60c89adeb5dcc293d8661d6aabeb1da6d05466f5 | [
"Apache-2.0"
] | null | null | null | import os
import mock
from dvc.utils.compat import str
from dvc.state import State
from dvc.utils import file_md5
from dvc.main import main
from dvc.utils.fs import get_inode
from tests.basic_env import TestDvc
class TestState(TestDvc):
def test_update(self):
path = os.path.join(self.dvc.root_dir, self... | 28.2 | 69 | 0.613712 |
2f04796d315491a31d3aa6fbe6807a0f80389100 | 3,535 | py | Python | tensorflow/python/kernel_tests/diag_op_test.py | deepakmuralidharan/tensorflow | f40e41f9c71ef2865f96f3db3cea2909797fe2a3 | [
"Apache-2.0"
] | 23 | 2016-02-04T21:08:43.000Z | 2022-01-14T13:22:33.000Z | tensorflow/python/kernel_tests/diag_op_test.py | deepakmuralidharan/tensorflow | f40e41f9c71ef2865f96f3db3cea2909797fe2a3 | [
"Apache-2.0"
] | 2 | 2016-05-31T16:38:55.000Z | 2018-12-30T20:17:05.000Z | tensorflow/python/kernel_tests/diag_op_test.py | deepakmuralidharan/tensorflow | f40e41f9c71ef2865f96f3db3cea2909797fe2a3 | [
"Apache-2.0"
] | 20 | 2016-02-15T17:31:02.000Z | 2020-01-12T08:18:48.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 35.35 | 80 | 0.545686 |
fc0034adfcefed00f023ddcd67456107823b95fa | 2,732 | py | Python | json_tools/scan_json.py | sidprobstein/json_tools | 4275d0c5dc6bc69ab584a0b473dc2896e6513ac4 | [
"MIT"
] | null | null | null | json_tools/scan_json.py | sidprobstein/json_tools | 4275d0c5dc6bc69ab584a0b473dc2896e6513ac4 | [
"MIT"
] | null | null | null | json_tools/scan_json.py | sidprobstein/json_tools | 4275d0c5dc6bc69ab584a0b473dc2896e6513ac4 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python2.7
# encoding: utf-8
'''
@author: Sid Probstein
@contact: sidprobstein@gmail.com
'''
#############################################
import sys
import argparse
import json
from utils.file import make_file_list, load_json_list
#############################################
def ma... | 29.376344 | 110 | 0.41325 |
4fa9abcf1e6fe389a7f0f0078268c19e2b400494 | 1,557 | py | Python | uocontroller/cli/plugins/example.py | Mohitsharma44/UONetMon | 5b036874c6eeff835e0f434822be59653fae1c06 | [
"MIT"
] | null | null | null | uocontroller/cli/plugins/example.py | Mohitsharma44/UONetMon | 5b036874c6eeff835e0f434822be59653fae1c06 | [
"MIT"
] | null | null | null | uocontroller/cli/plugins/example.py | Mohitsharma44/UONetMon | 5b036874c6eeff835e0f434822be59653fae1c06 | [
"MIT"
] | null | null | null | """Example Plugin for UOController."""
from cement.ext.ext_argparse import ArgparseController, expose
def example_plugin_hook(app):
# do something with the ``app`` object here.
pass
class ExamplePluginController(ArgparseController):
class Meta:
# name that the controller is displayed at command l... | 31.14 | 76 | 0.629416 |
07a9158f2ff3d17b4f6e2fe305105134bf8f1e03 | 7,966 | py | Python | label_studio_withoutsignin/tests/utils.py | DimaVinnitsa/label-studio | b33ef9edc5efef5f5a073e3a457832278afbf2cf | [
"Apache-2.0"
] | null | null | null | label_studio_withoutsignin/tests/utils.py | DimaVinnitsa/label-studio | b33ef9edc5efef5f5a073e3a457832278afbf2cf | [
"Apache-2.0"
] | null | null | null | label_studio_withoutsignin/tests/utils.py | DimaVinnitsa/label-studio | b33ef9edc5efef5f5a073e3a457832278afbf2cf | [
"Apache-2.0"
] | null | null | null | """This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.
"""
import ujson as json
import json
import pytest
import requests_mock
import requests
from contextlib import contextmanager
from unittest import mo... | 29.723881 | 168 | 0.678383 |
6fd525e8c8b0d2412235ca2f06d596cd9b6ce023 | 1,372 | py | Python | ILSpy.ConvertedToPython/TreeNodes/Analyzer/AnalyzedEventAccessorTreeNode.py | exyi/ILSpy | 17ddfa01ff4915c4ca8461c56fb7d04d25fc591e | [
"MIT"
] | 1 | 2021-04-26T19:46:09.000Z | 2021-04-26T19:46:09.000Z | ILSpy.ConvertedToPython/TreeNodes/Analyzer/AnalyzedEventAccessorTreeNode.py | exyi/ILSpy | 17ddfa01ff4915c4ca8461c56fb7d04d25fc591e | [
"MIT"
] | null | null | null | ILSpy.ConvertedToPython/TreeNodes/Analyzer/AnalyzedEventAccessorTreeNode.py | exyi/ILSpy | 17ddfa01ff4915c4ca8461c56fb7d04d25fc591e | [
"MIT"
] | null | null | null | # Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
#
# 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, m... | 49 | 92 | 0.780612 |
99977d3042187253c0d1aba3389537a94e4bcbf3 | 6,558 | py | Python | device/bluetooth/mk3239/dual_mode/ucube.py | ghsecuritylab/AliOS-Things_rel_1.3.1 | 9d511c3d3b4b278a1aed91958bef87501c445c0e | [
"Apache-2.0"
] | 12 | 2020-12-04T15:06:22.000Z | 2022-01-19T09:57:47.000Z | device/bluetooth/mk3239/dual_mode/ucube.py | jason-sophia/AliOS-Things | c3ae527f1265b8dbb1f39c1f789fd5bdee0b3812 | [
"Apache-2.0"
] | 1 | 2022-03-18T07:14:27.000Z | 2022-03-18T07:14:27.000Z | device/bluetooth/mk3239/dual_mode/ucube.py | jason-sophia/AliOS-Things | c3ae527f1265b8dbb1f39c1f789fd5bdee0b3812 | [
"Apache-2.0"
] | 5 | 2020-12-10T09:09:24.000Z | 2021-04-15T11:50:32.000Z | #temporarily disable .a
#in dual_mode_src.mk
src =Split('''
../BTE/mico_bt_api/mico_bt_main.c
../BTE/Components/gki/common/gki_buffer.c
../BTE/Components/gki/common/gki_debug.c
../BTE/Components/gki/common/gki_time.c
../BTE/Components/gki/mico/gki_mico.c
../BTE/Components/hcis/hcill_p... | 34.698413 | 65 | 0.675206 |
8aa3f642a8cee89d852860acac88c427cfaa65f5 | 2,091 | py | Python | setup.py | LuminosoInsight/wordfreq | 11a3138cea5f46d2229a110c1774ac64a2fcd92b | [
"MIT"
] | 451 | 2015-07-10T18:36:13.000Z | 2021-08-21T11:05:37.000Z | setup.py | LuminosoInsight/wordfreq | 11a3138cea5f46d2229a110c1774ac64a2fcd92b | [
"MIT"
] | 42 | 2015-02-17T20:20:28.000Z | 2021-06-13T22:55:21.000Z | setup.py | LuminosoInsight/wordfreq | 11a3138cea5f46d2229a110c1774ac64a2fcd92b | [
"MIT"
] | 38 | 2015-09-01T17:09:13.000Z | 2021-08-18T15:13:47.000Z | #!/usr/bin/env python
from setuptools import setup
import sys
import os
if sys.version_info[0] < 3:
print("Sorry, but wordfreq no longer supports Python 2.")
sys.exit(1)
classifiers = [
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT Lic... | 31.681818 | 89 | 0.646102 |
ceb729264e83754e5da96fe396cb94e9f0d35039 | 9,080 | py | Python | fairseq/fairseq/models/roberta/hub_interface.py | VictorBeraldo/wave2vec-recognize-docker | aec0c7d718c0c670c37fdef3d5ea40396e610881 | [
"MIT"
] | null | null | null | fairseq/fairseq/models/roberta/hub_interface.py | VictorBeraldo/wave2vec-recognize-docker | aec0c7d718c0c670c37fdef3d5ea40396e610881 | [
"MIT"
] | null | null | null | fairseq/fairseq/models/roberta/hub_interface.py | VictorBeraldo/wave2vec-recognize-docker | aec0c7d718c0c670c37fdef3d5ea40396e610881 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from fairseq import utils
from fairseq.data im... | 38.474576 | 115 | 0.565308 |
36620fadb3e4965a4fdf86e80d44c862149d04eb | 1,458 | py | Python | services/web/apps/inv/reportunknownsummary/views.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | services/web/apps/inv/reportunknownsummary/views.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | services/web/apps/inv/reportunknownsummary/views.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ---------------------------------------------------------------------
# inv.reportunknownsummary
# ---------------------------------------------------------------------
# Copyright (C) 2007-2013 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# NOC mo... | 36.45 | 96 | 0.465021 |
f518e2aee008f8350ac87e5bb4b5e7a7fdd43390 | 550 | py | Python | seniorProjectApp/urls.py | mpreyes/SeniorProject | cbcfb132dc24c63c0bb4c43cc2817309c9ea0d2b | [
"MIT"
] | 1 | 2019-02-08T21:15:15.000Z | 2019-02-08T21:15:15.000Z | seniorProjectApp/urls.py | mpreyes/SeniorProject | cbcfb132dc24c63c0bb4c43cc2817309c9ea0d2b | [
"MIT"
] | null | null | null | seniorProjectApp/urls.py | mpreyes/SeniorProject | cbcfb132dc24c63c0bb4c43cc2817309c9ea0d2b | [
"MIT"
] | null | null | null | from django.urls import path, include # new
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('signup/', views.SignUp.as_view(), name='signup'),
path('redirectme/', views.redirectme, name='redirectme'),
path('<int:userID_id>/<int:degreeID>/', views.dashboard, name='dashboar... | 39.285714 | 123 | 0.661818 |
eaa1cd517e2065fcaba4ac080635fcfca93a8a44 | 7,367 | py | Python | Jetson/Emotion detection/notebook.py | arjunvk1027/dbse | 18cda425b361bee700b8940f62672a06cac30e38 | [
"MIT"
] | null | null | null | Jetson/Emotion detection/notebook.py | arjunvk1027/dbse | 18cda425b361bee700b8940f62672a06cac30e38 | [
"MIT"
] | null | null | null | Jetson/Emotion detection/notebook.py | arjunvk1027/dbse | 18cda425b361bee700b8940f62672a06cac30e38 | [
"MIT"
] | null | null | null | import os.path as osp
import sys
import cv2
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import torch.hub
import os
import model
from PIL import Image
from torchvision import transforms
from visualize.grad_cam import BackPropagation, GradCAM,GuidedBackPropagation
import threading
... | 33.334842 | 167 | 0.592914 |
eacfa68efbc46b9e01351a2d35dacacd581a2c5a | 463 | py | Python | setup.py | thebillington/pyPhys3D | 36bd86a3eb0b53fa40322e1f3a3dc584eb829a0c | [
"MIT"
] | null | null | null | setup.py | thebillington/pyPhys3D | 36bd86a3eb0b53fa40322e1f3a3dc584eb829a0c | [
"MIT"
] | null | null | null | setup.py | thebillington/pyPhys3D | 36bd86a3eb0b53fa40322e1f3a3dc584eb829a0c | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='pyPhys3D',
version='0.1',
description='A 3D python physics engine for use with pygame and pyOpenGL',
url='http://github.com/thebillington/pyPhys3D',
author='thebillington',
author_email='billy.rebecchi@googlemail.com',
license='MIT',
pa... | 28.9375 | 80 | 0.652268 |
19db47667e05cf4422afc5754dad21ecbf6883f1 | 1,428 | py | Python | index/models.py | henryyang42/NTHUOJ_web | b197ef8555aaf90cba176eba61da5c919dab7af6 | [
"MIT"
] | null | null | null | index/models.py | henryyang42/NTHUOJ_web | b197ef8555aaf90cba176eba61da5c919dab7af6 | [
"MIT"
] | null | null | null | index/models.py | henryyang42/NTHUOJ_web | b197ef8555aaf90cba176eba61da5c919dab7af6 | [
"MIT"
] | null | null | null | '''
The MIT License (MIT)
Copyright (c) 2014 NTHUOJ team
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, ... | 38.594595 | 78 | 0.785714 |
d2e7973dce90d24a4d9473bf1fb6a98f6e8ba76c | 3,010 | py | Python | tests/core/test_profiles.py | gitter-badger/squeaknode | 2b88792fb71037050869fa7aa07187713f1c0130 | [
"MIT"
] | 14 | 2021-01-13T19:52:32.000Z | 2021-12-01T14:30:20.000Z | tests/core/test_profiles.py | gitter-badger/squeaknode | 2b88792fb71037050869fa7aa07187713f1c0130 | [
"MIT"
] | 603 | 2020-10-30T03:35:54.000Z | 2021-12-12T08:04:06.000Z | tests/core/test_profiles.py | gitter-badger/squeaknode | 2b88792fb71037050869fa7aa07187713f1c0130 | [
"MIT"
] | 5 | 2020-11-02T21:33:35.000Z | 2021-11-02T00:54:13.000Z | # MIT License
#
# Copyright (c) 2020 Jonathan Zernik
#
# 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, mer... | 34.597701 | 83 | 0.790365 |
f652438fbfbdced4ccd0dd29bf2ecc9d4dd85049 | 2,773 | py | Python | manim/__init__.py | xiaoyu2006/manim | 19e8752f522fb5f1fd1edb5b0d6d443de0055b56 | [
"MIT"
] | 1 | 2021-01-25T21:55:08.000Z | 2021-01-25T21:55:08.000Z | manim/__init__.py | xiaoyu2006/manim | 19e8752f522fb5f1fd1edb5b0d6d443de0055b56 | [
"MIT"
] | null | null | null | manim/__init__.py | xiaoyu2006/manim | 19e8752f522fb5f1fd1edb5b0d6d443de0055b56 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Importing the config module should be the first thing we do, since other
# modules depend on the global config dict for initialization.
from ._config import *
from .constants import *
from .container import *
from .animation.animation import *
from .animation.composition import *
from .anima... | 29.817204 | 74 | 0.787234 |
ba9791e5754cab4506153a941bd3a830f99c11de | 4,065 | py | Python | 0330.py | mauriceHsiao/untitled2 | 2034aa0776210e251c4234549c7c8f3ca5a83e65 | [
"MIT"
] | null | null | null | 0330.py | mauriceHsiao/untitled2 | 2034aa0776210e251c4234549c7c8f3ca5a83e65 | [
"MIT"
] | null | null | null | 0330.py | mauriceHsiao/untitled2 | 2034aa0776210e251c4234549c7c8f3ca5a83e65 | [
"MIT"
] | null | null | null | #coding: utf-8
from __future__ import division
import math
import matplotlib.pyplot as plt
A = [[1, 2, 3], [4, 5, 6]]
B = [[1, 2], [3, 4], [5, 6]]
print "---矩陣---"
def shape(A):
num_rows = len(A)
num_cols = len(A[0]) if A else 0
return num_rows, num_cols
def get_row(A, i):
return A[i]
def get_column(A,... | 25.566038 | 78 | 0.547109 |
dc12811d9ff4a1e475ad8d59192a982c723e21a8 | 3,257 | py | Python | torecsys/layers/ctr/bias_encoding.py | p768lwy3/torecsys | 2251366268b4fbe6f8c3ab1628fa72a0db043dcd | [
"MIT"
] | 92 | 2019-08-15T11:03:50.000Z | 2022-03-12T01:21:05.000Z | torecsys/layers/ctr/bias_encoding.py | p768lwy3/torecsys | 2251366268b4fbe6f8c3ab1628fa72a0db043dcd | [
"MIT"
] | 3 | 2020-03-11T08:57:50.000Z | 2021-01-06T01:39:47.000Z | torecsys/layers/ctr/bias_encoding.py | p768lwy3/torecsys | 2251366268b4fbe6f8c3ab1628fa72a0db043dcd | [
"MIT"
] | 16 | 2019-10-12T11:28:53.000Z | 2022-03-28T14:04:12.000Z | from typing import Tuple, Dict
import torch
import torch.nn as nn
from torecsys.layers import BaseLayer
class BiasEncodingLayer(BaseLayer):
"""
Layer class of Bias Encoding
Bias Encoding was used in Deep Session Interest Network :title:`Yufei Feng et al, 2019`[1],
which is to add three types of ses... | 36.188889 | 111 | 0.611606 |
7572b56faf026d172e76f03169fb8e505b014cb4 | 3,911 | py | Python | tests/field_mappings/test_mappings_with_type_pytest.py | szabosteve/eland | 64daa07a65cd45f23dc32ea8ab67ea1f1cc98c1d | [
"Apache-2.0"
] | 335 | 2020-01-10T10:47:21.000Z | 2022-03-31T12:33:03.000Z | tests/field_mappings/test_mappings_with_type_pytest.py | szabosteve/eland | 64daa07a65cd45f23dc32ea8ab67ea1f1cc98c1d | [
"Apache-2.0"
] | 255 | 2020-01-10T11:09:32.000Z | 2022-03-31T21:34:54.000Z | tests/field_mappings/test_mappings_with_type_pytest.py | szabosteve/eland | 64daa07a65cd45f23dc32ea8ab67ea1f1cc98c1d | [
"Apache-2.0"
] | 51 | 2020-01-10T10:53:54.000Z | 2022-03-15T15:48:18.000Z | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | 34.919643 | 75 | 0.507287 |
ece3dcf2c044e0049bbdb2d2a03080efc39c9130 | 8,223 | py | Python | sdk/lusid/models/paged_resource_list_of_cut_label_definition.py | finbourne/lusid-sdk-python | d238c5c661908639dab57d026966630448bfb0d6 | [
"MIT"
] | 6 | 2018-06-19T15:50:17.000Z | 2022-03-26T22:53:16.000Z | sdk/lusid/models/paged_resource_list_of_cut_label_definition.py | finbourne/lusid-sdk-python-preview | 6b1ae2c634f4b9a816e070470e9c8e6e06eae0ee | [
"MIT"
] | 98 | 2020-04-15T06:05:43.000Z | 2022-03-01T10:25:25.000Z | sdk/lusid/models/paged_resource_list_of_cut_label_definition.py | finbourne/lusid-sdk-python-preview | 6b1ae2c634f4b9a816e070470e9c8e6e06eae0ee | [
"MIT"
] | 9 | 2019-09-30T11:19:25.000Z | 2021-11-17T19:49:59.000Z | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.3648
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getf... | 30.797753 | 140 | 0.610969 |
e8676b51504197984f03e80d31ab17f498e9fc0f | 391 | py | Python | onefake/onefake/asgi.py | j3ygh/universetech-lotterydraw | f3f85b1239bd290f243712ca6a2bf2b60d138661 | [
"MIT"
] | null | null | null | onefake/onefake/asgi.py | j3ygh/universetech-lotterydraw | f3f85b1239bd290f243712ca6a2bf2b60d138661 | [
"MIT"
] | null | null | null | onefake/onefake/asgi.py | j3ygh/universetech-lotterydraw | f3f85b1239bd290f243712ca6a2bf2b60d138661 | [
"MIT"
] | null | null | null | """
ASGI config for onefake project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
5dc68e28f9302b2a13fb217d694ac33eeb6a0adc | 1,753 | py | Python | setup.py | NeuralEnsemble/libNeuroML | 75d1630a0c6354a3997c4068dc8cdc447491b6f8 | [
"BSD-3-Clause"
] | 20 | 2015-03-11T11:21:32.000Z | 2021-10-11T16:03:27.000Z | setup.py | NeuralEnsemble/libNeuroML | 75d1630a0c6354a3997c4068dc8cdc447491b6f8 | [
"BSD-3-Clause"
] | 48 | 2015-01-15T18:41:01.000Z | 2022-01-05T13:53:58.000Z | setup.py | NeuralEnsemble/libNeuroML | 75d1630a0c6354a3997c4068dc8cdc447491b6f8 | [
"BSD-3-Clause"
] | 16 | 2015-01-14T21:53:46.000Z | 2019-09-04T23:05:27.000Z | # -*- coding: utf-8 -*-
from setuptools import setup
long_description = open("README.md").read()
for line in open("neuroml/__init__.py"):
if line.startswith("__version__"):
version = line.split("=")[1].strip()[1:-1]
setup(
name="libNeuroML",
version=version,
packages=["neuroml", "neuroml.tes... | 34.372549 | 92 | 0.597832 |
45618fdb8eb2747703a17ec794598e7bc60d0ff5 | 13,173 | py | Python | examples/ppo/ppo_lib.py | saeta/flax | 89e1126cc43588c6946bc85506987dc812909575 | [
"Apache-2.0"
] | null | null | null | examples/ppo/ppo_lib.py | saeta/flax | 89e1126cc43588c6946bc85506987dc812909575 | [
"Apache-2.0"
] | 10 | 2022-01-19T11:32:54.000Z | 2022-02-09T23:47:20.000Z | examples/ppo/ppo_lib.py | slowy07/flax | fb4f2a455d4cae383f11d77707bf0d0f18a45e70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Flax 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 applicable law or agreed to in wri... | 38.293605 | 102 | 0.701207 |
8b01cd5af6833fc78e7c8039a5b7e77734a270b5 | 1,515 | py | Python | gym_cooking/misc/game/gameimage.py | Nat-D/gym-cooking | 834830b980b10277f0f55083f1946637b71614e7 | [
"MIT"
] | null | null | null | gym_cooking/misc/game/gameimage.py | Nat-D/gym-cooking | 834830b980b10277f0f55083f1946637b71614e7 | [
"MIT"
] | null | null | null | gym_cooking/misc/game/gameimage.py | Nat-D/gym-cooking | 834830b980b10277f0f55083f1946637b71614e7 | [
"MIT"
] | null | null | null | import pygame
import os
import numpy as np
from PIL import Image
from gym_cooking.misc.game.game import Game
import cv2
class GameImage(Game):
def __init__(self, filename, world, sim_agents, record=False):
Game.__init__(self, world, sim_agents)
self.game_record_dir = 'misc/game/record/{}/'.format(f... | 32.234043 | 89 | 0.605941 |
70f4974c5a77e8f901a744de9ae1a11a3d86f80d | 910 | py | Python | src/cli.py | VizMan0616/pykaging | 04bbd92de01a753bfa2bfa33f43dd82fc77b6681 | [
"MIT"
] | 1 | 2022-03-21T16:35:02.000Z | 2022-03-21T16:35:02.000Z | src/cli.py | VizMan0616/pykage | 04bbd92de01a753bfa2bfa33f43dd82fc77b6681 | [
"MIT"
] | null | null | null | src/cli.py | VizMan0616/pykage | 04bbd92de01a753bfa2bfa33f43dd82fc77b6681 | [
"MIT"
] | null | null | null | from email.policy import default
from os import getcwd
from .packaging import CreatePackage
try:
import click
import colorama as color
from colorama import Fore
except ImportError as import_error:
raise ImportError("There was an error during import process.")
color.init(autoreset=True)
@click.comma... | 31.37931 | 82 | 0.682418 |
f2f6e755c42c6f317b8e4dc9181b99a0aa0dd5aa | 2,936 | py | Python | appengine/standard/ndb/overview/main.py | baditaflorin/python-docs-samples | f122cbc13f20336d15409b5bd9820377dcb65464 | [
"Apache-2.0"
] | 2 | 2017-09-23T04:23:46.000Z | 2021-06-11T01:23:06.000Z | appengine/standard/ndb/overview/main.py | baditaflorin/python-docs-samples | f122cbc13f20336d15409b5bd9820377dcb65464 | [
"Apache-2.0"
] | 2 | 2021-06-10T23:54:32.000Z | 2021-06-10T23:54:33.000Z | appengine/standard/ndb/overview/main.py | baditaflorin/python-docs-samples | f122cbc13f20336d15409b5bd9820377dcb65464 | [
"Apache-2.0"
] | 2 | 2019-11-27T00:13:37.000Z | 2021-03-24T00:05:36.000Z | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 32.622222 | 78 | 0.644414 |
1fd474a8cde68a3b133b68fb6fdf88b1385e5e5c | 4,193 | py | Python | tests/functional/api/conftest.py | alexander-sidorov/tms-z43 | 61ecd204f5de4e97ff0300f6ef91c36c2bcda31c | [
"MIT"
] | 2 | 2020-12-17T20:19:21.000Z | 2020-12-22T12:46:43.000Z | tests/functional/api/conftest.py | alexander-sidorov/tms-z43 | 61ecd204f5de4e97ff0300f6ef91c36c2bcda31c | [
"MIT"
] | 4 | 2021-04-20T08:40:30.000Z | 2022-02-10T07:50:30.000Z | tests/functional/api/conftest.py | alexander-sidorov/tms-z43 | 61ecd204f5de4e97ff0300f6ef91c36c2bcda31c | [
"MIT"
] | 1 | 2021-02-10T06:42:19.000Z | 2021-02-10T06:42:19.000Z | import os
import pytest
from pydantic import BaseModel
@pytest.yield_fixture(scope="session")
def post_model():
from applications.blog.models import Post
yield Post
@pytest.yield_fixture(scope="session")
def user_model():
from django.contrib.auth import get_user_model
user = get_user_model()
... | 22.912568 | 63 | 0.617219 |
36b7d7e3b9dc0c30118eff3f8eec560da762ac37 | 55,403 | py | Python | thonny/running.py | lurch/thonny | c4ecbdab19f20f2ad0da4e2ce401e9116d9d3257 | [
"MIT"
] | null | null | null | thonny/running.py | lurch/thonny | c4ecbdab19f20f2ad0da4e2ce401e9116d9d3257 | [
"MIT"
] | null | null | null | thonny/running.py | lurch/thonny | c4ecbdab19f20f2ad0da4e2ce401e9116d9d3257 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Code for maintaining the background process and for running
user programs
Commands get executed via shell, this way the command line in the
shell becomes kind of title for the execution.
"""
import collections
import logging
import os.path
import shlex
import signal
import subprocess
im... | 34.178285 | 101 | 0.608595 |
39cf62ede2ac30a70f3043558ad8d922cc824704 | 3,440 | py | Python | icevision/models/torchvision/faster_rcnn/prediction.py | jerbly/icevision | f97edd52c152f438d02bcce8a2e40b90dc304d01 | [
"Apache-2.0"
] | null | null | null | icevision/models/torchvision/faster_rcnn/prediction.py | jerbly/icevision | f97edd52c152f438d02bcce8a2e40b90dc304d01 | [
"Apache-2.0"
] | null | null | null | icevision/models/torchvision/faster_rcnn/prediction.py | jerbly/icevision | f97edd52c152f438d02bcce8a2e40b90dc304d01 | [
"Apache-2.0"
] | null | null | null | __all__ = [
"predict",
"predict_dl",
"convert_raw_prediction",
"convert_raw_predictions",
]
from icevision.imports import *
from icevision.utils import *
from icevision.core import *
from icevision.models.utils import _predict_dl
from icevision.data import *
from icevision.models.torchvision.faster_rcn... | 25.294118 | 76 | 0.65843 |
50473bc122f2125c957d0fed2e70f47b374a401f | 3,957 | py | Python | JDjango/dialogs/MessageDialog/RichMessageDialog.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | 3 | 2020-12-28T05:09:02.000Z | 2021-06-23T10:02:03.000Z | JDjango/dialogs/MessageDialog/RichMessageDialog.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | JDjango/dialogs/MessageDialog/RichMessageDialog.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | from .common import *
class RichMsgDialog:
def __init__(self) -> None:
pass
@classmethod
def showScrolledMsgDialog(cls, parent, msg: str, title: str):
"""纯文本滚动面板提示消息"""
dlg = wx.lib.dialogs.ScrolledMessageDialog(parent, msg, title)
dlg.ShowModal()
@classmethod
def... | 34.710526 | 153 | 0.585545 |
6e00c1463fe5fa1a0419e7594b0e48e384aba99f | 3,229 | py | Python | encryption.py | Kamaropoulos/EncryptEverywordBot | 97be05acfdeb5ca8db69cc7c944a949d4f91db62 | [
"MIT"
] | null | null | null | encryption.py | Kamaropoulos/EncryptEverywordBot | 97be05acfdeb5ca8db69cc7c944a949d4f91db62 | [
"MIT"
] | null | null | null | encryption.py | Kamaropoulos/EncryptEverywordBot | 97be05acfdeb5ca8db69cc7c944a949d4f91db62 | [
"MIT"
] | null | null | null | import string
import random
import base64
import binascii
from random import randint
from Crypto.Hash import *
from Crypto.Cipher import *
from Crypto import Random
def random_string(length, characters=string.ascii_uppercase + string.ascii_lowercase + string.digits):
return ''.join(random.choice(characters) for _ in ... | 26.467213 | 250 | 0.717869 |
d8b0e8200247568a9a3e212d49911f8e53eeb44b | 9,866 | py | Python | dash2/composition_plotting.py | GBruening/succes_predictor | ae60bdf4e7c21228d35411f7e1527b78f34dd7ad | [
"MIT"
] | null | null | null | dash2/composition_plotting.py | GBruening/succes_predictor | ae60bdf4e7c21228d35411f7e1527b78f34dd7ad | [
"MIT"
] | null | null | null | dash2/composition_plotting.py | GBruening/succes_predictor | ae60bdf4e7c21228d35411f7e1527b78f34dd7ad | [
"MIT"
] | null | null | null |
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import json
import os
import time
import datetime
import regex as re
from sqlalchemy import create_engine
import psycopg2
def add_boss_nums(d... | 33.218855 | 126 | 0.59031 |
54e233290363ece29e999bca1fe89126a7c3c3a6 | 3,139 | py | Python | Image_Assets/optimise_images.py | NicholasG04/cyberdiscovery.github.io | 83b3c679473a885f4b12061059aa3c875ad6fafd | [
"MIT"
] | null | null | null | Image_Assets/optimise_images.py | NicholasG04/cyberdiscovery.github.io | 83b3c679473a885f4b12061059aa3c875ad6fafd | [
"MIT"
] | null | null | null | Image_Assets/optimise_images.py | NicholasG04/cyberdiscovery.github.io | 83b3c679473a885f4b12061059aa3c875ad6fafd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# optimise_images.py - Call convert on PNGs and JPEGs using Google's settings
# Requires: Python >= 3.6
from subprocess import CalledProcessError, check_output # noqa: S404
from sys import argv, exit
ARG = "--replace"
_LEN = len(argv)
FILENAME = "optimise_images.py"... | 37.819277 | 113 | 0.625358 |
4ce3257198aeeacd8f17f92841da003608f9175e | 1,640 | py | Python | core_test/core/test.py | WallaceLiu/distributed-realtime-capfaiss | 3346f540b6c9d17a6be446fefa8c9b79164929d9 | [
"Apache-2.0"
] | null | null | null | core_test/core/test.py | WallaceLiu/distributed-realtime-capfaiss | 3346f540b6c9d17a6be446fefa8c9b79164929d9 | [
"Apache-2.0"
] | null | null | null | core_test/core/test.py | WallaceLiu/distributed-realtime-capfaiss | 3346f540b6c9d17a6be446fefa8c9b79164929d9 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import faiss
# def create_faiss_model(matrix, item_list, faiss_path, params="IVF100,Flat", size=100, mode="train"):
# matrix = np.array(matrix, dtype=np.float32)
# ids = np.array(item_list).astype("int")
# # if mode == "train":
# index = faiss.index_factory(size, params, faiss.METRI... | 22.777778 | 102 | 0.634756 |
a8b5232c3da4a68cef7f70663b2442fe68aa685a | 2,930 | py | Python | guiUtil/gUBase.py | cjsantucci/h5Widget | f0768e7ffbc817741bfc980b69566efe002dd668 | [
"MIT"
] | null | null | null | guiUtil/gUBase.py | cjsantucci/h5Widget | f0768e7ffbc817741bfc980b69566efe002dd668 | [
"MIT"
] | null | null | null | guiUtil/gUBase.py | cjsantucci/h5Widget | f0768e7ffbc817741bfc980b69566efe002dd668 | [
"MIT"
] | null | null | null | '''
Created on Jul 23, 2017
@author: chris
'''
import os
from PyQt5.Qt import *
from guiUtil.guidata import guiData
from threading import Thread
class myThread( Thread ):
"""
stoppable thread...don't even know if I need this
"""
def __init__( self, *args, **kwargs ):
Thread.__init__( self, *a... | 28.72549 | 110 | 0.544027 |
ad586482de146b48afe5ee60331e8198c7e15aa8 | 5,768 | py | Python | Global/test.py | JaideepCherukuri/Enhance-retro | c4f36edf3589efb6330f9f450b1752c2d5c2c425 | [
"MIT"
] | null | null | null | Global/test.py | JaideepCherukuri/Enhance-retro | c4f36edf3589efb6330f9f450b1752c2d5c2c425 | [
"MIT"
] | null | null | null | Global/test.py | JaideepCherukuri/Enhance-retro | c4f36edf3589efb6330f9f450b1752c2d5c2c425 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import os
from collections import OrderedDict
from torch.autograd import Variable
from options.test_options import TestOptions
from models.models import create_model
from models.mapping_model import Pix2PixHDModel_Mapping
import util.uti... | 31.347826 | 88 | 0.587379 |
55b61a635353087b1f9d371e440ab0c65e45df6b | 20,340 | py | Python | electrum/plugins/trezor/trezor.py | mraksoll4/electrum-ltfn | 4e01a3f5cde98d3ad8549b1bd8c3f844ae0903eb | [
"MIT"
] | null | null | null | electrum/plugins/trezor/trezor.py | mraksoll4/electrum-ltfn | 4e01a3f5cde98d3ad8549b1bd8c3f844ae0903eb | [
"MIT"
] | null | null | null | electrum/plugins/trezor/trezor.py | mraksoll4/electrum-ltfn | 4e01a3f5cde98d3ad8549b1bd8c3f844ae0903eb | [
"MIT"
] | 1 | 2021-07-30T08:31:29.000Z | 2021-07-30T08:31:29.000Z | import traceback
import sys
from typing import NamedTuple, Any, Optional, Dict, Union, List, Tuple, TYPE_CHECKING
from electrum.util import bfh, bh2u, versiontuple, UserCancelled, UserFacingException
from electrum.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32 as parse_path
from electrum import constants... | 40.843373 | 122 | 0.635152 |
7779ae798399fe0a7f797c81bad12494ff4131e6 | 4,656 | py | Python | dfirtrack_api/tests/dfirtrack_main/reason/test_reason_api_views.py | cclauss/dfirtrack | 2a307c5fe82e927b3c229a20a02bc0c7a5d66d9a | [
"Apache-2.0"
] | null | null | null | dfirtrack_api/tests/dfirtrack_main/reason/test_reason_api_views.py | cclauss/dfirtrack | 2a307c5fe82e927b3c229a20a02bc0c7a5d66d9a | [
"Apache-2.0"
] | null | null | null | dfirtrack_api/tests/dfirtrack_main/reason/test_reason_api_views.py | cclauss/dfirtrack | 2a307c5fe82e927b3c229a20a02bc0c7a5d66d9a | [
"Apache-2.0"
] | null | null | null | import urllib.parse
from django.contrib.auth.models import User
from django.test import TestCase
from dfirtrack_main.models import Reason
class ReasonAPIViewTestCase(TestCase):
""" reason API view tests """
@classmethod
def setUpTestData(cls):
# create object
Reason.objects.create(reas... | 37.248 | 102 | 0.659364 |
d734909741ab6799d2f526028187576c345e7329 | 8,649 | py | Python | python/mxnet/kvstore/byteps.py | mozga-intel/incubator-mxnet | 7dcfedca704f39b4b9b7497dabf3fea47ad40df4 | [
"BSL-1.0",
"Apache-2.0"
] | 211 | 2016-06-06T08:32:36.000Z | 2021-07-03T16:50:16.000Z | python/mxnet/kvstore/byteps.py | mozga-intel/incubator-mxnet | 7dcfedca704f39b4b9b7497dabf3fea47ad40df4 | [
"BSL-1.0",
"Apache-2.0"
] | 42 | 2017-01-05T02:45:13.000Z | 2020-08-11T23:45:27.000Z | python/mxnet/kvstore/byteps.py | mozga-intel/incubator-mxnet | 7dcfedca704f39b4b9b7497dabf3fea47ad40df4 | [
"BSL-1.0",
"Apache-2.0"
] | 58 | 2016-10-27T07:37:08.000Z | 2021-07-03T16:50:17.000Z | # 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... | 33.137931 | 115 | 0.588623 |
4052a8287c15b09cda523b35761ae7f49244d3a1 | 540 | py | Python | zgrab2_schemas/zgrab2/__init__.py | pgowda-riskiq/zgrab2 | 6916e00fce0c965396d6b9ec7b194b075fc073b3 | [
"Apache-2.0"
] | null | null | null | zgrab2_schemas/zgrab2/__init__.py | pgowda-riskiq/zgrab2 | 6916e00fce0c965396d6b9ec7b194b075fc073b3 | [
"Apache-2.0"
] | null | null | null | zgrab2_schemas/zgrab2/__init__.py | pgowda-riskiq/zgrab2 | 6916e00fce0c965396d6b9ec7b194b075fc073b3 | [
"Apache-2.0"
] | null | null | null | # Ensure that all of the modules get executed so that they are registered
from . import bacnet
from . import dnp3
from . import fox
from . import ftp
from . import http
from . import modbus
from . import mongodb
from . import mssql
from . import mysql
from . import mysql_errors
from . import ntp
from . import oracle
fr... | 21.6 | 73 | 0.759259 |
6d50a66d7ba2752a9d10644c10a53c712fd195b4 | 64,093 | py | Python | Lib/test/test_weakref.py | Hadron/python | 73137f499ed658169f49273eee46845e3b53e800 | [
"PSF-2.0"
] | null | null | null | Lib/test/test_weakref.py | Hadron/python | 73137f499ed658169f49273eee46845e3b53e800 | [
"PSF-2.0"
] | null | null | null | Lib/test/test_weakref.py | Hadron/python | 73137f499ed658169f49273eee46845e3b53e800 | [
"PSF-2.0"
] | 1 | 2021-09-04T13:33:46.000Z | 2021-09-04T13:33:46.000Z | import gc
import sys
import unittest
import collections
import weakref
import operator
import contextlib
import copy
from test import support
from test.support import script_helper
# Used in ReferencesTestCase.test_ref_created_during_del() .
ref_from_del = None
# Used by FinalizeTestCase as a global that may be repl... | 33.929592 | 81 | 0.577988 |
d931ed7d134a4f2f83afad8fa114d0cb057722dc | 22,836 | py | Python | Validation/RecoTau/python/runTauDisplay.py | bkilian15/cmssw | ad9b85e79d89f4f6c393c8cc648261366d82adca | [
"Apache-2.0"
] | 1 | 2020-08-12T08:37:04.000Z | 2020-08-12T08:37:04.000Z | Validation/RecoTau/python/runTauDisplay.py | bkilian15/cmssw | ad9b85e79d89f4f6c393c8cc648261366d82adca | [
"Apache-2.0"
] | null | null | null | Validation/RecoTau/python/runTauDisplay.py | bkilian15/cmssw | ad9b85e79d89f4f6c393c8cc648261366d82adca | [
"Apache-2.0"
] | 1 | 2019-03-19T13:44:54.000Z | 2019-03-19T13:44:54.000Z | from __future__ import print_function
import ROOT, os, math, sys
import numpy as num
from DataFormats.FWLite import Events, Handle
from DeltaR import *
from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle
from PhysicsTools.Heppy.physicsobjects.Muon import Muon
from PhysicsTools.Heppy.physicsobjects.Elec... | 49.643478 | 186 | 0.76883 |
3be3e74c811b40c04da8b5e325e3f74e3d93cd4a | 12,379 | py | Python | sdks/python/apache_beam/io/gcp/experimental/spannerio_read_it_test.py | hengfengli/beam | 83a8855e5997e0311e6274c03bcb38f94efbf8ef | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 9 | 2016-09-28T18:25:24.000Z | 2019-05-09T12:28:29.000Z | sdks/python/apache_beam/io/gcp/experimental/spannerio_read_it_test.py | hengfengli/beam | 83a8855e5997e0311e6274c03bcb38f94efbf8ef | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 28 | 2020-03-04T22:01:48.000Z | 2022-03-12T00:59:47.000Z | sdks/python/apache_beam/io/gcp/experimental/spannerio_read_it_test.py | damondouglas/beam | 4774ac713f427fefb38114f661516faef26d8207 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 17 | 2021-12-15T19:31:54.000Z | 2022-01-31T18:54:23.000Z | #
# 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 us... | 34.386111 | 80 | 0.694967 |
f70102464c8e5466183c3e69b120499038456a17 | 6,962 | py | Python | podship/test/engine/functional/api/v1/user.py | candango/socialspider | 81b4406a7e30308d904157c76eff949562c8ce28 | [
"Apache-2.0"
] | 5 | 2015-05-27T15:22:39.000Z | 2015-07-10T21:09:16.000Z | podship/test/engine/functional/api/v1/user.py | candango/socialspider | 81b4406a7e30308d904157c76eff949562c8ce28 | [
"Apache-2.0"
] | 25 | 2015-10-12T00:36:30.000Z | 2016-05-27T17:23:34.000Z | podship/test/engine/functional/api/v1/user.py | candango/podship | 81b4406a7e30308d904157c76eff949562c8ce28 | [
"Apache-2.0"
] | 5 | 2016-07-06T04:26:59.000Z | 2017-12-06T13:05:35.000Z | #!/usr/bin/env python
#
# Copyright 2015-2016 Flavio Garcia
#
# 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... | 38.043716 | 74 | 0.594082 |
ca5a1b7aba048bd79fb1e74aa5b21567403acbaa | 2,678 | py | Python | src/secml/array/array_utils.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 63 | 2020-04-20T16:31:16.000Z | 2022-03-29T01:05:35.000Z | src/secml/array/array_utils.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 5 | 2020-04-21T11:31:39.000Z | 2022-03-24T13:42:56.000Z | src/secml/array/array_utils.py | zangobot/secml | 95a293e1201c24256eb7fe2f1d2125cd5f318c8c | [
"Apache-2.0"
] | 8 | 2020-04-21T09:16:42.000Z | 2022-02-23T16:28:43.000Z | """
.. module:: ArrayUtils
:synopsis: Collection of utility functions for CArray and subclasses
.. moduleauthor:: Marco Melis <marco.melis@unica.it>
"""
import numpy as np
from scipy.sparse import issparse
from secml.core.type_utils import is_int, is_bool, is_tuple, is_slice
__all__ = ['is_vector_index', 'tuple_... | 27.326531 | 120 | 0.579164 |
97031dd702df7b79a322508e48921bd3ba8c1c10 | 2,571 | py | Python | tests/test_managers_service.py | agg-pranav/specter-desktop | e61d65b99af52db75dbd10c93a8baa53810103c6 | [
"MIT"
] | null | null | null | tests/test_managers_service.py | agg-pranav/specter-desktop | e61d65b99af52db75dbd10c93a8baa53810103c6 | [
"MIT"
] | null | null | null | tests/test_managers_service.py | agg-pranav/specter-desktop | e61d65b99af52db75dbd10c93a8baa53810103c6 | [
"MIT"
] | null | null | null | import logging
import os
from unittest.mock import MagicMock
from flask import Flask
from cryptoadvance.specter.managers.service_manager import ServiceManager
def test_ServiceManager(caplog):
caplog.set_level(logging.DEBUG)
specter_mock = MagicMock()
specter_mock.config = {"services": {}}
flaskapp_moc... | 39.553846 | 91 | 0.701284 |
12aedf26df7dfaae4fffb1f214899216266beaa7 | 166 | py | Python | app/assets/api/__init__.py | vanwt/cmdb | c1539140ab0a20d8e2be98e5d878b46848122316 | [
"MIT"
] | 1 | 2019-12-15T05:20:42.000Z | 2019-12-15T05:20:42.000Z | app/assets/api/__init__.py | vanwt/cmdb | c1539140ab0a20d8e2be98e5d878b46848122316 | [
"MIT"
] | 12 | 2020-02-12T03:10:46.000Z | 2022-02-26T21:21:46.000Z | app/assets/api/__init__.py | vanwt/cmdb | c1539140ab0a20d8e2be98e5d878b46848122316 | [
"MIT"
] | null | null | null | from .assets import AssetsInfoViewSet,AssetsViewSet,ServerCount,VmCount
from .tag import TagViewSet
from .idc import IDCViewSet
from .other import TestConnectApiView
| 33.2 | 71 | 0.861446 |
7221e5fd4e1c9dac4181f8cc622ccc9569a3a13a | 1,980 | py | Python | lakefs_provider/operators/merge_operator.py | treeverse/airflow-provider-lakeFS | c5ec8f000b56d274761a55dbc7e70538f6f86ee3 | [
"Apache-2.0"
] | 24 | 2021-05-23T10:45:05.000Z | 2022-03-21T11:54:40.000Z | lakefs_provider/operators/merge_operator.py | treeverse/airflow-provider-lakeFS | c5ec8f000b56d274761a55dbc7e70538f6f86ee3 | [
"Apache-2.0"
] | 5 | 2021-05-23T10:45:15.000Z | 2021-06-06T08:46:40.000Z | lakefs_provider/operators/merge_operator.py | treeverse/airflow-provider-lakeFS | c5ec8f000b56d274761a55dbc7e70538f6f86ee3 | [
"Apache-2.0"
] | 1 | 2021-06-04T01:21:07.000Z | 2021-06-04T01:21:07.000Z | from typing import Any, Dict
from airflow.models import BaseOperator
from airflow.utils.decorators import apply_defaults
from lakefs_provider.hooks.lakefs_hook import LakeFSHook
class LakeFSMergeOperator(BaseOperator):
"""
Merge source branch to destination branch
:param lakefs_conn_id: connection to r... | 33.559322 | 163 | 0.675758 |
c4a51fe06b04ec547d99a1fe24c0811e1b2a638a | 4,000 | py | Python | Lib/site-packages/willow/image.py | nateonmission/nateonmission.com | c7c5078ca2160fa97cb6cdc0497438547f82ae41 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/willow/image.py | nateonmission/nateonmission.com | c7c5078ca2160fa97cb6cdc0497438547f82ae41 | [
"bzip2-1.0.6"
] | 4 | 2021-03-19T00:33:36.000Z | 2022-03-11T23:47:17.000Z | Lib/site-packages/willow/image.py | nateonmission/nateonmission.com | c7c5078ca2160fa97cb6cdc0497438547f82ae41 | [
"bzip2-1.0.6"
] | null | null | null | import imghdr
import warnings
from .registry import registry
from .utils.deprecation import RemovedInWillow05Warning
class UnrecognisedImageFormatError(IOError):
pass
class Image(object):
@classmethod
def check(cls):
pass
@staticmethod
def operation(func):
func._willow_operatio... | 22.59887 | 90 | 0.618 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.