hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796e03503ff64925ac69628d539402af3052b38a | 8,924 | py | Python | python-3.4.4.amd64/Lib/idlelib/macosxSupport.py | CSnap/photogate | 208272ef39f4e86f40d431da2ca523e21701f789 | [
"CC0-1.0"
] | null | null | null | python-3.4.4.amd64/Lib/idlelib/macosxSupport.py | CSnap/photogate | 208272ef39f4e86f40d431da2ca523e21701f789 | [
"CC0-1.0"
] | null | null | null | python-3.4.4.amd64/Lib/idlelib/macosxSupport.py | CSnap/photogate | 208272ef39f4e86f40d431da2ca523e21701f789 | [
"CC0-1.0"
] | null | null | null | """
A number of functions that enhance IDLE on Mac OSX.
"""
import sys
import tkinter
from os import path
import warnings
def runningAsOSXApp():
warnings.warn("runningAsOSXApp() is deprecated, use isAquaTk()",
DeprecationWarning, stacklevel=2)
return isAquaTk()
def isCarbo... | 37.029046 | 80 | 0.624272 |
796e03a19075aaadc5bcac386dbb72923e747d5e | 1,432 | py | Python | rest_api_htb_2015/settings.py | anthonycarlos92/seedLA_HTB_2015 | a3e5bb03ee00760413d49a1074289f51149222ca | [
"MIT"
] | 1 | 2021-08-04T18:34:48.000Z | 2021-08-04T18:34:48.000Z | rest_api_htb_2015/settings.py | SeedCG/waterlog_rest_api | a3e5bb03ee00760413d49a1074289f51149222ca | [
"MIT"
] | 3 | 2020-06-05T17:18:26.000Z | 2021-06-10T18:34:31.000Z | rest_api_htb_2015/settings.py | SeedCG/waterlog_rest_api | a3e5bb03ee00760413d49a1074289f51149222ca | [
"MIT"
] | null | null | null | """
Django settings for seedLA_HTB_2015 project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Bu... | 20.457143 | 71 | 0.76676 |
796e03c95933365de87847ddc6b8c0cecafd0ec7 | 1,807 | py | Python | sage_maker_magic/sage_maker_kernel/install.py | leonid133/sagemaker-studio-notebook-magic-cell | d4e730bf5e9f3acfa07ab819d262c7178033a27b | [
"MIT-0"
] | 2 | 2021-03-11T16:53:07.000Z | 2021-03-11T17:18:09.000Z | sage_maker_magic/sage_maker_kernel/install.py | leonid133/sagemaker-studio-notebook-magic-cell | d4e730bf5e9f3acfa07ab819d262c7178033a27b | [
"MIT-0"
] | null | null | null | sage_maker_magic/sage_maker_kernel/install.py | leonid133/sagemaker-studio-notebook-magic-cell | d4e730bf5e9f3acfa07ab819d262c7178033a27b | [
"MIT-0"
] | 1 | 2021-03-01T16:50:25.000Z | 2021-03-01T16:50:25.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import argparse
import json
import os
import sys
from jupyter_client.kernelspec import KernelSpecManager
from IPython.utils.tempdir import TemporaryDirectory
kernel_json = {
"argv": [sys.executable, "-m", "sage_m... | 34.75 | 97 | 0.65689 |
796e0406922704d2bdd5d46c3b9f81a89cd19347 | 4,806 | py | Python | Image/relational_operators.py | mllzl/earthengine-py-notebooks | cade6a81dd4dbbfb1b9b37aaf6955de42226cfc5 | [
"MIT"
] | 1 | 2020-03-26T04:21:15.000Z | 2020-03-26T04:21:15.000Z | Image/relational_operators.py | mllzl/earthengine-py-notebooks | cade6a81dd4dbbfb1b9b37aaf6955de42226cfc5 | [
"MIT"
] | null | null | null | Image/relational_operators.py | mllzl/earthengine-py-notebooks | cade6a81dd4dbbfb1b9b37aaf6955de42226cfc5 | [
"MIT"
] | null | null | null | # %%
"""
<table class="ee-notebook-buttons" align="left">
<td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Image/relational_operators.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td>
<td><a target="_... | 50.0625 | 1,021 | 0.730337 |
796e0421454de54d53295f1f0a2af11fa6d5ca03 | 602 | py | Python | pqrun.py | asqum/PYQUM_SEEDS | e708edfcef304866361d16caa00f77ee3a7bbc2d | [
"MIT"
] | null | null | null | pqrun.py | asqum/PYQUM_SEEDS | e708edfcef304866361d16caa00f77ee3a7bbc2d | [
"MIT"
] | null | null | null | pqrun.py | asqum/PYQUM_SEEDS | e708edfcef304866361d16caa00f77ee3a7bbc2d | [
"MIT"
] | null | null | null | from pyqum import create_app
import sys
app = create_app()
Port, DeBuG, RLD = 5300, True, True
# Port, DeBuG, RLD = 5300, False, False
def server(mode):
app.secret_key = "bcsjfhksP_*$3#bcjahfqaOgvGFGhnNg"
if mode == "local":
# for local access
app.run(host='127.0.0.1', port=Port, debug=DeBuG, use_reloader=RLD) ... | 30.1 | 119 | 0.687708 |
796e043869e92e2726c27d3fe4b10377b967bfb4 | 10,500 | py | Python | colossalai/nn/layer/parallel_1d/layers.py | DevinCheung/ColossalAI | 632e622de818697f9949e35117c0432d88f62c87 | [
"Apache-2.0"
] | null | null | null | colossalai/nn/layer/parallel_1d/layers.py | DevinCheung/ColossalAI | 632e622de818697f9949e35117c0432d88f62c87 | [
"Apache-2.0"
] | null | null | null | colossalai/nn/layer/parallel_1d/layers.py | DevinCheung/ColossalAI | 632e622de818697f9949e35117c0432d88f62c87 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import math
import numbers
import torch
import torch.distributed as dist
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
from torch import Tensor
from torch.nn.parameter import Parameter
from typing import Tuple
import importlib
from c... | 36.842105 | 105 | 0.620476 |
796e05e6c3b77025c6ab8205c3a2f30acf4a92b7 | 37 | py | Python | linreg/__init__.py | khizirsiddiqui/auto-grad | 544ec7adc410c9995bc38556ed65d496a4a2ec1b | [
"MIT"
] | 1 | 2020-06-17T19:08:08.000Z | 2020-06-17T19:08:08.000Z | linreg/__init__.py | khizirsiddiqui/auto-grad | 544ec7adc410c9995bc38556ed65d496a4a2ec1b | [
"MIT"
] | null | null | null | linreg/__init__.py | khizirsiddiqui/auto-grad | 544ec7adc410c9995bc38556ed65d496a4a2ec1b | [
"MIT"
] | null | null | null | from .linreg import linear_regression | 37 | 37 | 0.891892 |
796e07410c5d055c14cdf2fdc851f4f9eb73455d | 8,398 | py | Python | nipype/interfaces/niftyseg/stats.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | nipype/interfaces/niftyseg/stats.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | nipype/interfaces/niftyseg/stats.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 2 | 2017-09-23T16:22:00.000Z | 2019-08-01T14:18:52.000Z | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
The stats module provides higher-level interfaces to some of the operations
that can be performed with the niftyseg stats (seg_stats) command-line program.
"""
from __future__ import print_function
impo... | 29.466667 | 88 | 0.625268 |
796e075122aec46ec6cc6bd137a55ac2cfde8447 | 9,420 | py | Python | queue.py | JorySchossau/hpcc_tools | ae8c9c470ff11201c38c78a32038b2b5edd4ee18 | [
"MIT"
] | 1 | 2018-06-18T18:33:26.000Z | 2018-06-18T18:33:26.000Z | queue.py | JorySchossau/hpcc_tools | ae8c9c470ff11201c38c78a32038b2b5edd4ee18 | [
"MIT"
] | null | null | null | queue.py | JorySchossau/hpcc_tools | ae8c9c470ff11201c38c78a32038b2b5edd4ee18 | [
"MIT"
] | null | null | null | #!/bin/python
# path to python
# where is your writable directory? Jobs will be managed in a .queue directory here.
SCRATCH="FULL_PATH_TO_YOUR_SCRATCH_SPACE"
# username
USER="YOUR_USERNAME_HERE"
# how big is one batch of jobs? ex 10 means there must be 10 free slots to run another batch.
JOB_ARRAY_MAX=20
# max tota... | 39.087137 | 288 | 0.705202 |
796e08250f16ae33839b9893a04be3559ac47831 | 552 | py | Python | var/spack/repos/builtin/packages/py-bz2file/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/py-bz2file/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/py-bz2file/package.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyBz2file(PythonPackage):
"""Python library for reading and writing bzip2-compressed files... | 34.5 | 94 | 0.751812 |
796e08bc37415e5133b4ecce215f87cfcaefe4b5 | 4,729 | py | Python | test/functional/wallet_importprunedfunds.py | bitcoinpaythrough-project/bitcoinpaythrough | 2aabe233abf16ec4e41be4c0528204b7a479dbd3 | [
"MIT"
] | null | null | null | test/functional/wallet_importprunedfunds.py | bitcoinpaythrough-project/bitcoinpaythrough | 2aabe233abf16ec4e41be4c0528204b7a479dbd3 | [
"MIT"
] | null | null | null | test/functional/wallet_importprunedfunds.py | bitcoinpaythrough-project/bitcoinpaythrough | 2aabe233abf16ec4e41be4c0528204b7a479dbd3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the importprunedfunds and removeprunedfunds RPCs."""
from decimal import Decimal
from test_framew... | 40.418803 | 117 | 0.679636 |
796e08c65593a20bde8d02d4a0bf254d501bf638 | 2,220 | py | Python | src/battleship.py | acdick/understanding_genetic_algorithms | 2609446dd7790287baf4e949d6c9407bca2391a3 | [
"MIT"
] | 8 | 2020-05-07T19:35:22.000Z | 2021-10-31T17:53:51.000Z | src/battleship.py | acdick/genetic_algorithm_battleship | 2609446dd7790287baf4e949d6c9407bca2391a3 | [
"MIT"
] | null | null | null | src/battleship.py | acdick/genetic_algorithm_battleship | 2609446dd7790287baf4e949d6c9407bca2391a3 | [
"MIT"
] | 4 | 2020-05-07T19:36:00.000Z | 2021-09-01T08:41:32.000Z | import numpy as np
# generate battleship board and solution
def new_board():
# create a clear board
dim = 10
board = np.zeros((dim, dim), dtype=int)
# randomly place ships on the board
ship_lengths = [5, 4, 3, 3, 2]
# for each ship
for ship_length in ship_lengths:
is_ship_pla... | 31.714286 | 73 | 0.545946 |
796e08ff98f0706ad28552c8dcf144b8ac4a1fdf | 8,341 | py | Python | scripts/download_pretrained_models.py | fierval/spade | a6abd604f28ceb40494dc7625e06678b0cafa076 | [
"Apache-2.0"
] | 1 | 2021-11-30T03:43:41.000Z | 2021-11-30T03:43:41.000Z | scripts/download_pretrained_models.py | fierval/spade | a6abd604f28ceb40494dc7625e06678b0cafa076 | [
"Apache-2.0"
] | null | null | null | scripts/download_pretrained_models.py | fierval/spade | a6abd604f28ceb40494dc7625e06678b0cafa076 | [
"Apache-2.0"
] | null | null | null | # SPADE
# Copyright (c) 2021-present NAVER Corp.
# Apache License v2.0
# Exectue the file inside the "scripts" folder
import argparse
import os
import sys
from pathlib import Path
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
import transformers
import spade.utils.general_utils as gu
... | 34.184426 | 88 | 0.48867 |
796e0912003cc024627590f487498c9ad3d58511 | 11,179 | py | Python | tests/test_admin.py | job/peeringdb | 0bdc803e1478dbfae15e9989babef31db31bf0bb | [
"BSD-2-Clause"
] | null | null | null | tests/test_admin.py | job/peeringdb | 0bdc803e1478dbfae15e9989babef31db31bf0bb | [
"BSD-2-Clause"
] | null | null | null | tests/test_admin.py | job/peeringdb | 0bdc803e1478dbfae15e9989babef31db31bf0bb | [
"BSD-2-Clause"
] | null | null | null | import os
import pytest
from django.test import Client, TestCase, RequestFactory
import peeringdb_server.models as models
import peeringdb_server.admin as admin
class AdminTests(TestCase):
"""
Test peeringdb django admin functionality
"""
asn_count = 0
@classmethod
def entity_data(cls, org... | 33.370149 | 88 | 0.545219 |
796e0b80b471b17739031cd7cae4cc12984b6b82 | 9,323 | py | Python | plans/HF1.py | mrakitin/profile_collection-six | 20e41632b9898ac83a8e60fcca9b8aeaaa91f0ad | [
"BSD-3-Clause"
] | null | null | null | plans/HF1.py | mrakitin/profile_collection-six | 20e41632b9898ac83a8e60fcca9b8aeaaa91f0ad | [
"BSD-3-Clause"
] | 30 | 2017-05-18T19:11:24.000Z | 2021-06-23T16:59:26.000Z | plans/HF1.py | mrakitin/profile_collection-six | 20e41632b9898ac83a8e60fcca9b8aeaaa91f0ad | [
"BSD-3-Clause"
] | 3 | 2018-01-10T17:16:47.000Z | 2020-03-12T14:51:36.000Z | def evening_09():
yield from mv(extslt.vg, 50)
yield from pol_V(8.4)
yield from sleep(120)
yield from align.m1pit
yield from m3_check()
yield from scan([qem11, qem12], pgm.en, 1055, 1125, 351)
yield from pol_H(-4.2)
yield from sleep(120)
yield from align.m1pit
yield from m3_che... | 31.710884 | 74 | 0.673603 |
796e0bbbc560440ecebfdff50a7dd421c03fa2a8 | 455 | py | Python | tests/test_main.py | Four-Velocity/swc-canteen | 6f1a5eab5eb0c27b0cde2a161a76cbb96d1491ce | [
"MIT"
] | null | null | null | tests/test_main.py | Four-Velocity/swc-canteen | 6f1a5eab5eb0c27b0cde2a161a76cbb96d1491ce | [
"MIT"
] | null | null | null | tests/test_main.py | Four-Velocity/swc-canteen | 6f1a5eab5eb0c27b0cde2a161a76cbb96d1491ce | [
"MIT"
] | null | null | null | from fastapi.testclient import TestClient
from main import app
client = TestClient(app)
def test_app():
response = client.get("/api/badge/")
assert response.status_code == 200
assert response.json() == {
"schemaVersion": 1,
"label": "",
"message": "live",
"color": "#7673C... | 22.75 | 41 | 0.567033 |
796e0cb92fb1270ca566fb59bfb96a836d792e74 | 82,733 | py | Python | sphinx/writers/latex.py | tronical/sphinx | eda4b1cfc49cddfeb8d9ce3b0c495ebebb01fb6c | [
"BSD-2-Clause"
] | null | null | null | sphinx/writers/latex.py | tronical/sphinx | eda4b1cfc49cddfeb8d9ce3b0c495ebebb01fb6c | [
"BSD-2-Clause"
] | 1 | 2021-11-29T11:55:04.000Z | 2021-11-29T11:55:04.000Z | sphinx/writers/latex.py | tronical/sphinx | eda4b1cfc49cddfeb8d9ce3b0c495ebebb01fb6c | [
"BSD-2-Clause"
] | null | null | null | """
sphinx.writers.latex
~~~~~~~~~~~~~~~~~~~~
Custom docutils writer for LaTeX.
Much of this code is adapted from Dave Kuhlman's "docpy" writer from his
docutils sandbox.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import r... | 39.623084 | 95 | 0.568068 |
796e0cfc20ea3e4626fb874a7dfd327e73e274c4 | 39 | py | Python | test.py | Shahriar567/Spark-Hadoop_ClusterSetup | 961b11d06606eb7754fe9eef1d325d57a813ad0b | [
"MIT"
] | null | null | null | test.py | Shahriar567/Spark-Hadoop_ClusterSetup | 961b11d06606eb7754fe9eef1d325d57a813ad0b | [
"MIT"
] | null | null | null | test.py | Shahriar567/Spark-Hadoop_ClusterSetup | 961b11d06606eb7754fe9eef1d325d57a813ad0b | [
"MIT"
] | null | null | null | import sys
i = sys.argv[1]
print(i)
| 5.571429 | 15 | 0.615385 |
796e0fbb51f8d1492f8d10c562170095302e6e4c | 2,725 | py | Python | individuals/andrija/Language Processing/a_synonyms.py | periode/software-art-text | bc512345bb8e293f165077587b343407fba61d71 | [
"Unlicense"
] | 2 | 2019-01-02T17:58:24.000Z | 2019-09-15T16:26:00.000Z | individuals/andrija/Language Processing/a_synonyms.py | periode/software-art-text | bc512345bb8e293f165077587b343407fba61d71 | [
"Unlicense"
] | null | null | null | individuals/andrija/Language Processing/a_synonyms.py | periode/software-art-text | bc512345bb8e293f165077587b343407fba61d71 | [
"Unlicense"
] | null | null | null | from textblob import TextBlob #first, we need to import TextBlob, the package that will help us analyze text
import random
import json
# "No matter how hard I try, you keep pushing me aside, and I can't break through there's no talking to you, So sad that you're leaving, Takes time to believe it, But after all i... | 53.431373 | 360 | 0.652477 |
796e10006496481fc21c1e6412956f71f6ab4512 | 13,110 | py | Python | dataset.py | qibinc/CogQA | d49c3b9ac93bad54d48c91e0aacb4d6f7f8b3791 | [
"MIT"
] | 3 | 2019-09-16T14:14:07.000Z | 2021-05-11T09:23:10.000Z | dataset.py | qibinc/CogQA | d49c3b9ac93bad54d48c91e0aacb4d6f7f8b3791 | [
"MIT"
] | null | null | null | dataset.py | qibinc/CogQA | d49c3b9ac93bad54d48c91e0aacb4d6f7f8b3791 | [
"MIT"
] | null | null | null | import re
import json
from tqdm import tqdm, trange
import pdb
import random
from collections import namedtuple
import numpy as np
import copy
import traceback
import torch
from torch.optim import Adam
from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler
from pytorch_pretrained_bert.... | 43.993289 | 158 | 0.612815 |
796e10dcc2a045fe8a7c7fdade2ac214d7d4e926 | 1,511 | py | Python | release/scripts/addons_contrib/amaranth/node_editor/node_stats.py | noorbeast/BlenderSource | 65ebecc5108388965678b04b43463b85f6c69c1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2019-09-16T10:29:19.000Z | 2022-02-11T14:43:18.000Z | engine/2.80/scripts/addons_contrib/amaranth/node_editor/node_stats.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | engine/2.80/scripts/addons_contrib/amaranth/node_editor/node_stats.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | 1 | 2019-11-24T18:43:42.000Z | 2019-11-24T18:43:42.000Z | # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,... | 32.847826 | 79 | 0.698875 |
796e11f035820cd2fb4e578cdfe461d2cb5f6d13 | 95,948 | py | Python | python/lcms.py | LuaDist/lcms | f6473758511db915ff1762c4aa0115f5de414b3c | [
"MIT"
] | 7 | 2017-06-03T09:01:24.000Z | 2021-12-03T00:06:41.000Z | python/lcms.py | LuaDist/lcms | f6473758511db915ff1762c4aa0115f5de414b3c | [
"MIT"
] | null | null | null | python/lcms.py | LuaDist/lcms | f6473758511db915ff1762c4aa0115f5de414b3c | [
"MIT"
] | 7 | 2015-06-05T06:04:40.000Z | 2022-01-14T10:33:15.000Z | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.36
#
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _lcms
import new
new_instancemethod = new.instancemethod
try:
_swig_property = property
ex... | 55.142529 | 145 | 0.812336 |
796e135a3267c9f566adbcef94b6eef9b17ea7c0 | 32,276 | py | Python | ckan/tests/test_coding_standards.py | ziveo/ckan | f4cfe5e28789df58b2bf7e73e5989ffda00e5c5c | [
"Apache-2.0"
] | 1 | 2020-01-16T10:46:18.000Z | 2020-01-16T10:46:18.000Z | ckan/tests/test_coding_standards.py | ziveo/ckan | f4cfe5e28789df58b2bf7e73e5989ffda00e5c5c | [
"Apache-2.0"
] | null | null | null | ckan/tests/test_coding_standards.py | ziveo/ckan | f4cfe5e28789df58b2bf7e73e5989ffda00e5c5c | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
u"""A module for coding standards tests.
These are tests that are not functional- or unit-testing any particular piece
of CKAN code, but are checking coding standards. For example: checking that
there are no errors in the Sphinx build, that there are no PEP8 problems,
etc.
"""
import ast
import io... | 45.267882 | 86 | 0.715702 |
796e136a0a2adeceaa885d1b4abc36996fe271d5 | 5,711 | py | Python | gdb_ext/gdb_interface.py | tfpk/memtree | dd25a6555025cf2c2af400b2bcec9b82b171277a | [
"Apache-2.0"
] | 1 | 2020-11-08T07:44:40.000Z | 2020-11-08T07:44:40.000Z | gdb_ext/gdb_interface.py | tfpk/memtree | dd25a6555025cf2c2af400b2bcec9b82b171277a | [
"Apache-2.0"
] | null | null | null | gdb_ext/gdb_interface.py | tfpk/memtree | dd25a6555025cf2c2af400b2bcec9b82b171277a | [
"Apache-2.0"
] | null | null | null | """
Functions that call gdb functions, and return a python datastructure
that represents the result.
"""
import re
import gdb
def gdb_toggle_pagination(state):
toggle = "off"
if state:
toggle = "on"
gdb_execute(f'set pagination {toggle}')
def replace_last(s, repl, w):
return s[::-1].replac... | 26.439815 | 90 | 0.616705 |
796e155bd89e0b9d960c6e2eae6c1c18812e65a8 | 35,243 | py | Python | core/controllers/feedback_test.py | dawsoneliasen/oppia | befd0d1ecffd33c6a058a4286bc1fe63b5efdeaf | [
"Apache-2.0"
] | null | null | null | core/controllers/feedback_test.py | dawsoneliasen/oppia | befd0d1ecffd33c6a058a4286bc1fe63b5efdeaf | [
"Apache-2.0"
] | null | null | null | core/controllers/feedback_test.py | dawsoneliasen/oppia | befd0d1ecffd33c6a058a4286bc1fe63b5efdeaf | [
"Apache-2.0"
] | null | null | null | # 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... | 41.806643 | 111 | 0.629941 |
796e156b57b1346dc5a9fb51b746ec90f8eae2bd | 4,281 | py | Python | allenact_plugins/minigrid_plugin/minigrid_sensors.py | klemenkotar/dcrl | 457be7af1389db37ec12e165dfad646e17359162 | [
"MIT"
] | 187 | 2020-08-28T16:59:41.000Z | 2022-03-27T19:10:11.000Z | allenact_plugins/minigrid_plugin/minigrid_sensors.py | klemenkotar/dcrl | 457be7af1389db37ec12e165dfad646e17359162 | [
"MIT"
] | 120 | 2020-08-28T15:30:36.000Z | 2022-03-13T00:38:44.000Z | allenact_plugins/minigrid_plugin/minigrid_sensors.py | klemenkotar/dcrl | 457be7af1389db37ec12e165dfad646e17359162 | [
"MIT"
] | 45 | 2020-08-28T18:30:04.000Z | 2022-03-29T11:13:28.000Z | from typing import Optional, Any, cast
import gym
import gym_minigrid.minigrid
import numpy as np
import torch
from babyai.utils.format import InstructionsPreprocessor
from gym_minigrid.minigrid import MiniGridEnv
from allenact.base_abstractions.sensor import Sensor, prepare_locals_for_super
from allenact.base_abstra... | 32.18797 | 97 | 0.6057 |
796e156ba4797c23328b7850761f23fe56cd8c0b | 7,485 | py | Python | vis.py | yijiuzai/retrieval-deepvision | 13459b75b016b11d8161f7e052f47694832c1119 | [
"MIT"
] | 254 | 2016-05-07T09:53:00.000Z | 2021-12-23T07:26:25.000Z | vis.py | yijiuzai/retrieval-deepvision | 13459b75b016b11d8161f7e052f47694832c1119 | [
"MIT"
] | 15 | 2016-05-09T20:09:12.000Z | 2021-09-08T11:22:20.000Z | vis.py | yijiuzai/retrieval-deepvision | 13459b75b016b11d8161f7e052f47694832c1119 | [
"MIT"
] | 99 | 2016-05-04T20:40:06.000Z | 2020-12-23T11:02:42.000Z | import os,pickle
import matplotlib.pyplot as plt
import numpy as np
import cv2, random
import Image
from params import get_params
from eval import Evaluator
CLASSES = ('__background__',
'aeroplane', 'bicycle', 'bird', 'boat',
'bottle', 'bus', 'car', 'cat', 'chair',
'cow', 'd... | 35.140845 | 134 | 0.509152 |
796e1685424e15dd1dea53f853dfdd88d6c9ca41 | 14,740 | py | Python | parser/team01/calcularSelectCampos.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/team01/calcularSelectCampos.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/team01/calcularSelectCampos.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | import sys
import ts as TS
import instrucciones as Instruccion
import tempfile
from datetime import datetime
from pprint import pprint
lstResultado = []
contador = 1
x = 0
def inc():
global x
x += 1
return x
def calcularSelectCampos(arbol,ts):
global lstResultado
global conta... | 66.396396 | 181 | 0.604953 |
796e16b3465b75c30746beb085526ab3cb413525 | 33,850 | py | Python | server/src/weblab/core/coordinator/redis/priority_queue_scheduler.py | zstars/weblabdeusto | 09bd9d93d483671bca67ee5c70a9c412eb5d352f | [
"BSD-2-Clause"
] | null | null | null | server/src/weblab/core/coordinator/redis/priority_queue_scheduler.py | zstars/weblabdeusto | 09bd9d93d483671bca67ee5c70a9c412eb5d352f | [
"BSD-2-Clause"
] | null | null | null | server/src/weblab/core/coordinator/redis/priority_queue_scheduler.py | zstars/weblabdeusto | 09bd9d93d483671bca67ee5c70a9c412eb5d352f | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#-*-*- encoding: utf-8 -*-*-
#
# Copyright (C) 2005 onwards University of Deusto
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# This software consists of contributions made by many individual... | 50.825826 | 271 | 0.668951 |
796e16cdd741d1bb24a0c79e5671a7a58c27adce | 8,369 | py | Python | Validation/pyFrame3DD-master/gcc-master/gcc/jit/docs/conf.py | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/jit/docs/conf.py | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/jit/docs/conf.py | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# libgccjit documentation build configuration file, created by
# sphinx-quickstart on Wed Jul 30 13:39:01 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | 32.312741 | 80 | 0.711196 |
796e172d864fdbf1fcc1a66b5b3b51d44c4d9f88 | 264 | py | Python | backup.py | LX1993728/backend | 0f70e6e74f2c2cdbb66f77ead395a62c34ef7b57 | [
"Apache-2.0"
] | null | null | null | backup.py | LX1993728/backend | 0f70e6e74f2c2cdbb66f77ead395a62c34ef7b57 | [
"Apache-2.0"
] | null | null | null | backup.py | LX1993728/backend | 0f70e6e74f2c2cdbb66f77ead395a62c34ef7b57 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import os
import time
username = 'ticketuser'
dbname = 'ticketdb'
backupdir = '/dbbackup'
date = time.strftime('%Y-%m-%d')
os.popen("pg_dump -h localhost -U %s %s | gzip > %s/%s.%s.gz" % (username, dbname, backupdir, dbname, date))
| 22 | 109 | 0.632576 |
796e17691de259a7411e618e5fa4fcadb179b0d6 | 8,403 | py | Python | aiocoap/transports/simple6.py | kb2ma/aiocoap | f35826510e19b9be058724ae9605e1e406da7142 | [
"MIT"
] | null | null | null | aiocoap/transports/simple6.py | kb2ma/aiocoap | f35826510e19b9be058724ae9605e1e406da7142 | [
"MIT"
] | null | null | null | aiocoap/transports/simple6.py | kb2ma/aiocoap | f35826510e19b9be058724ae9605e1e406da7142 | [
"MIT"
] | null | null | null | # This file is part of the Python aiocoap library project.
#
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
# 2013-2014 Christian Amsüss <c.amsuess@energyharvesting.at>
#
# aiocoap is free software, this file is published under the MIT license as
# described in the accompany... | 41.80597 | 132 | 0.713674 |
796e179c043df911f1f151817477994087c7349e | 623 | py | Python | pyvo/utils/http.py | theresadower/pyvo | 6b00f93ae3ae6d27fcb296f81956cf2e3d97f941 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 29 | 2019-05-29T20:32:07.000Z | 2022-02-19T17:47:42.000Z | pyvo/utils/http.py | theresadower/pyvo | 6b00f93ae3ae6d27fcb296f81956cf2e3d97f941 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 187 | 2019-05-21T11:15:52.000Z | 2022-03-25T16:05:14.000Z | pyvo/utils/http.py | theresadower/pyvo | 6b00f93ae3ae6d27fcb296f81956cf2e3d97f941 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 28 | 2019-05-17T16:06:09.000Z | 2022-03-11T13:54:10.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
HTTP utils
"""
import requests
from ..version import version
DEFAULT_USER_AGENT = 'python-pyvo/{}'.format(version)
def use_session(session):
"""
Return the session passed in, or create a default
session to use for this network request.
... | 20.766667 | 63 | 0.670947 |
796e18a18fb4ba755b56b87c28ee52a20b53b6be | 727 | py | Python | var/spack/repos/builtin/packages/py-pep8-naming/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2018-11-27T03:39:44.000Z | 2021-09-06T15:50:35.000Z | var/spack/repos/builtin/packages/py-pep8-naming/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-01-11T20:11:52.000Z | 2019-01-11T20:11:52.000Z | var/spack/repos/builtin/packages/py-pep8-naming/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-10-14T14:20:17.000Z | 2020-10-14T14:20:17.000Z | # Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPep8Naming(PythonPackage):
"""Check PEP-8 naming conventions, plugin for flake8."""
... | 38.263158 | 148 | 0.755158 |
796e18ba30744954652f48c9068e059d288b85b3 | 1,784 | py | Python | src/learning/migrations/0036_score_coin_models_createdate.py | Alirezaja1384/MajazAmooz | 9200e46bed33aeb60d578a5c4c02013a8032cf08 | [
"MIT"
] | 3 | 2021-04-01T19:42:53.000Z | 2022-03-01T09:50:17.000Z | src/learning/migrations/0036_score_coin_models_createdate.py | Alirezaja1384/MajazAmooz | 9200e46bed33aeb60d578a5c4c02013a8032cf08 | [
"MIT"
] | null | null | null | src/learning/migrations/0036_score_coin_models_createdate.py | Alirezaja1384/MajazAmooz | 9200e46bed33aeb60d578a5c4c02013a8032cf08 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-05-22 18:01
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('learning', '0035_category_parentcategory_verbosename_changed'),
]
operations = [
migrations.AddField(
... | 35.68 | 97 | 0.623318 |
796e193260508b767ea64cf971403b9f032d7736 | 574 | py | Python | python/test.py | teunvissers/scriptsForTrackingBugs | 94294a03f0d7883de72d049fa17cb6195fb8a610 | [
"MIT"
] | null | null | null | python/test.py | teunvissers/scriptsForTrackingBugs | 94294a03f0d7883de72d049fa17cb6195fb8a610 | [
"MIT"
] | null | null | null | python/test.py | teunvissers/scriptsForTrackingBugs | 94294a03f0d7883de72d049fa17cb6195fb8a610 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy
from numpy.random import normal, uniform
from scipy.optimize import *
import os.path
from scipy.ndimage.filters import gaussian_filter1d
import matplotlib.gridspec as gridspec
from toolsForBugs import *
# some functions to build further on
def readPositions():
BIGLIST, PR... | 28.7 | 106 | 0.813589 |
796e199e514b20855b98617a5d1734ac8dfb18d5 | 4,097 | py | Python | tools/android/stubify_manifest_test.py | andrefmrocha/bazel | 0d2e409ec8eeadfde90b1860935af65d76c90966 | [
"Apache-2.0"
] | 1 | 2021-12-16T08:19:50.000Z | 2021-12-16T08:19:50.000Z | tools/android/stubify_manifest_test.py | andrefmrocha/bazel | 0d2e409ec8eeadfde90b1860935af65d76c90966 | [
"Apache-2.0"
] | 3 | 2020-12-07T07:03:15.000Z | 2021-02-04T14:06:14.000Z | tools/android/stubify_manifest_test.py | andrefmrocha/bazel | 0d2e409ec8eeadfde90b1860935af65d76c90966 | [
"Apache-2.0"
] | 2 | 2020-05-28T22:56:41.000Z | 2020-12-07T06:43:28.000Z | # Copyright 2015 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... | 32.259843 | 79 | 0.758604 |
796e1a3e0cfb7a7f9f991048ffd2b313702fe019 | 5,232 | py | Python | piazza_squatting_bot.py | GunshipPenguin/piazza-squatting-bot | e2f7cc0f446f7b66abcde423d8c568cc57624e54 | [
"MIT"
] | 4 | 2018-10-26T17:56:11.000Z | 2020-01-21T10:24:04.000Z | piazza_squatting_bot.py | GunshipPenguin/piazza-squatting-bot | e2f7cc0f446f7b66abcde423d8c568cc57624e54 | [
"MIT"
] | 1 | 2018-09-25T00:55:36.000Z | 2018-09-25T00:55:36.000Z | piazza_squatting_bot.py | GunshipPenguin/piazza-squatting-bot | e2f7cc0f446f7b66abcde423d8c568cc57624e54 | [
"MIT"
] | null | null | null | from piazza_api import Piazza
import time
import requests
import json
import sys
import yaml
from pypandoc import convert_text
webhook_url = ''
channel = ''
classes = []
class PiazzaClass:
'''
Represents a class on Piazza.
'''
def __init__(self, name, network, network_id,
subscriber... | 29.393258 | 85 | 0.595183 |
796e1b8c3c462ac3fa0284c257ac9b53368958b8 | 8,764 | py | Python | tests/contrib/utils/gcp_authenticator.py | is2co/airflow | 48f400541d19601d1571d07cf65f55c649884b87 | [
"Apache-2.0"
] | null | null | null | tests/contrib/utils/gcp_authenticator.py | is2co/airflow | 48f400541d19601d1571d07cf65f55c649884b87 | [
"Apache-2.0"
] | null | null | null | tests/contrib/utils/gcp_authenticator.py | is2co/airflow | 48f400541d19601d1571d07cf65f55c649884b87 | [
"Apache-2.0"
] | 1 | 2019-08-05T13:44:05.000Z | 2019-08-05T13:44:05.000Z | # -*- 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
#... | 39.125 | 110 | 0.637837 |
796e1bb9bceba139968ffd36be7f83e937d5ab42 | 1,008 | py | Python | src/ssp/ml/metrics.py | gyan42/spark-streaming-playground | 147ef9cbc31b7aed242663dee36143ebf0e8043f | [
"Apache-2.0"
] | 10 | 2020-03-12T11:51:46.000Z | 2022-03-24T04:56:05.000Z | src/ssp/ml/metrics.py | gyan42/spark-streaming-playground | 147ef9cbc31b7aed242663dee36143ebf0e8043f | [
"Apache-2.0"
] | 12 | 2020-04-23T07:28:14.000Z | 2022-03-12T00:20:24.000Z | src/ssp/ml/metrics.py | gyan42/spark-streaming-playground | 147ef9cbc31b7aed242663dee36143ebf0e8043f | [
"Apache-2.0"
] | 1 | 2020-04-20T14:48:38.000Z | 2020-04-20T14:48:38.000Z | #!/usr/bin/env python
__author__ = "Mageswaran Dhandapani"
__copyright__ = "Copyright 2020, The Spark Structured Playground Project"
__credits__ = []
__license__ = "Apache License"
__version__ = "2.0"
__maintainer__ = "Mageswaran Dhandapani"
__email__ = "mageswaran1989@gmail.com"
__status__ = "Education Purpose"
from... | 42 | 111 | 0.697421 |
796e1c54816670e7ecba4c46b3d12b2ff52f5d78 | 6,610 | py | Python | pyade/lshade.py | HerrKevin/pyade | d9ed64abefde4dbcf24a17fbd98bb1362881e06e | [
"MIT"
] | null | null | null | pyade/lshade.py | HerrKevin/pyade | d9ed64abefde4dbcf24a17fbd98bb1362881e06e | [
"MIT"
] | null | null | null | pyade/lshade.py | HerrKevin/pyade | d9ed64abefde4dbcf24a17fbd98bb1362881e06e | [
"MIT"
] | null | null | null | import pyade.commons
import numpy as np
import scipy.stats
import random
from typing import Callable, Union, Dict, Any
def get_default_params(dim: int):
"""
Returns the default parameters of the L-SHADE Differential Evolution Algorithm.
:param dim: Size of the problem (or individual).
:typ... | 41.055901 | 162 | 0.640242 |
796e1cbfee277469bcdff7ca5678ec752b18bfca | 20,808 | py | Python | tests/nn_test.py | mfuntowicz/flax | 385e9a41f483f6f4997c602ad570b2418e32568f | [
"Apache-2.0"
] | null | null | null | tests/nn_test.py | mfuntowicz/flax | 385e9a41f483f6f4997c602ad570b2418e32568f | [
"Apache-2.0"
] | null | null | null | tests/nn_test.py | mfuntowicz/flax | 385e9a41f483f6f4997c602ad570b2418e32568f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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 wr... | 32.012308 | 76 | 0.627932 |
796e1e2a37ce27b40ec47e76a886c18dd7f2a8b3 | 2,468 | py | Python | Unity Shader/vendor/beautify_unity_shader/app/parser.py | xdegtyarev/SublimeConfig | a41d188e05bbcedb9c1cb1e1a2f854e2b6b77356 | [
"MIT"
] | null | null | null | Unity Shader/vendor/beautify_unity_shader/app/parser.py | xdegtyarev/SublimeConfig | a41d188e05bbcedb9c1cb1e1a2f854e2b6b77356 | [
"MIT"
] | null | null | null | Unity Shader/vendor/beautify_unity_shader/app/parser.py | xdegtyarev/SublimeConfig | a41d188e05bbcedb9c1cb1e1a2f854e2b6b77356 | [
"MIT"
] | null | null | null | import os
import json
import unittest
from . import lexer
from . import preprocessor
from . import known_conflicts
from .lr import dfm
from .lr import inspector
from .lr import lr1
from .syntax_productions import productionList
def construct():
edges, stateList, preStateIndex = lr1.construct(productionList, isDeb... | 28.697674 | 97 | 0.649919 |
796e1e4f16bed7a044ff30194b370fddf20d77bf | 124,484 | py | Python | sdk/python/pulumi_azure_nextgen/cdn/v20190615preview/_inputs.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/cdn/v20190615preview/_inputs.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/cdn/v20190615preview/_inputs.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 38.63563 | 701 | 0.660173 |
796e1e8d7cbf39a2992790c9de104334c2ab5541 | 4,346 | py | Python | utils/service_discovery/etcd_config_store.py | Mattlk13/dd-agent | 167d0c0ed8d7b66a531dd0c21097f0fa2fba8960 | [
"BSD-3-Clause"
] | 1,172 | 2015-01-04T21:56:16.000Z | 2022-03-13T00:01:44.000Z | utils/service_discovery/etcd_config_store.py | Mattlk13/dd-agent | 167d0c0ed8d7b66a531dd0c21097f0fa2fba8960 | [
"BSD-3-Clause"
] | 2,086 | 2015-01-02T16:33:21.000Z | 2022-03-15T10:01:47.000Z | utils/service_discovery/etcd_config_store.py | Mattlk13/dd-agent | 167d0c0ed8d7b66a531dd0c21097f0fa2fba8960 | [
"BSD-3-Clause"
] | 972 | 2015-01-02T05:03:46.000Z | 2022-03-23T04:36:19.000Z | # (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
from urllib3.exceptions import TimeoutError
import logging
from etcd import EtcdKeyNotFound, EtcdConnectionFailed
from etcd import Client as etcd_client
from utils.service_discovery.abstract_config_store import A... | 39.509091 | 107 | 0.5711 |
796e1f7c1a6fc3137f796abf12c4bc6bdea9d1f1 | 6,122 | py | Python | tests/test_functional_misc.py | jcfp/sabnzbd | 5b3d932232cd512166b14bca40b20c221ef3be61 | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | tests/test_functional_misc.py | jcfp/sabnzbd | 5b3d932232cd512166b14bca40b20c221ef3be61 | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | tests/test_functional_misc.py | jcfp/sabnzbd | 5b3d932232cd512166b14bca40b20c221ef3be61 | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | #!/usr/bin/python3 -OO
# Copyright 2007-2020 The SABnzbd-Team <team@sabnzbd.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any late... | 37.790123 | 115 | 0.658282 |
796e1fb9ad8b3f6f096a1e394d31b57f669a5c24 | 28,117 | py | Python | src/mrtool/core/model.py | ramittal/MRTool | d9e1557620ac740d758bb99b6c24e9f283354eef | [
"BSD-2-Clause"
] | 2 | 2020-04-02T10:39:20.000Z | 2020-06-25T21:51:14.000Z | src/mrtool/core/model.py | ramittal/MRTool | d9e1557620ac740d758bb99b6c24e9f283354eef | [
"BSD-2-Clause"
] | 1 | 2021-02-12T22:06:31.000Z | 2021-02-12T22:06:31.000Z | src/mrtool/core/model.py | ramittal/MRTool | d9e1557620ac740d758bb99b6c24e9f283354eef | [
"BSD-2-Clause"
] | 4 | 2020-06-16T18:33:07.000Z | 2020-12-14T23:26:43.000Z | # -*- coding: utf-8 -*-
"""
model
~~~~~
Model module for mrtool package.
"""
from typing import List, Tuple, Union
from copy import deepcopy
import numpy as np
import pandas as pd
from .data import MRData
from .cov_model import CovModel
from . import utils
try:
from limetr import LimeTr
except:
Wa... | 39.379552 | 120 | 0.585873 |
796e205c5c01d81c3e984f59cab4feb794ddc687 | 421 | py | Python | tests/guinea-pigs/unittest/skip_test.py | Tirzono/teamcity-messages | e7f7334e2956a9e707222e4c83de9ffeb15b8ac0 | [
"Apache-2.0"
] | 105 | 2015-06-24T15:40:41.000Z | 2022-02-04T10:30:34.000Z | tests/guinea-pigs/unittest/skip_test.py | Tirzono/teamcity-messages | e7f7334e2956a9e707222e4c83de9ffeb15b8ac0 | [
"Apache-2.0"
] | 145 | 2015-06-24T15:26:28.000Z | 2022-03-22T20:04:19.000Z | tests/guinea-pigs/unittest/skip_test.py | Tirzono/teamcity-messages | e7f7334e2956a9e707222e4c83de9ffeb15b8ac0 | [
"Apache-2.0"
] | 76 | 2015-07-20T08:18:21.000Z | 2022-03-18T20:03:53.000Z | # coding=utf-8
from teamcity.unittestpy import TeamcityTestRunner
import sys
import unittest
if sys.version_info < (2, 7):
from unittest2 import skip, main
else:
from unittest import skip, main
class TestSkip(unittest.TestCase):
@skip(u"testing skipping øпричина")
def test_skip_me(self):
self... | 19.136364 | 50 | 0.719715 |
796e209749fb18a28b84fbef144c0cbf7797a781 | 4,102 | py | Python | train.py | jamesrosstwo/DIF-Net | bbde7030f8280a1f23af84ada07c31f5d7630b7d | [
"MIT"
] | null | null | null | train.py | jamesrosstwo/DIF-Net | bbde7030f8280a1f23af84ada07c31f5d7630b7d | [
"MIT"
] | null | null | null | train.py | jamesrosstwo/DIF-Net | bbde7030f8280a1f23af84ada07c31f5d7630b7d | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""Training script for DIF-Net.
"""
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import yaml
import io
import numpy as np
import dataset, utils, training_loop, loss, modules, meta_modules
i... | 44.107527 | 120 | 0.738908 |
796e20bbee40984f3271cdfd6bd5a17c0dc16d2a | 4,221 | py | Python | utils/hyper_grid.py | Hyunmok-Park/GNN_hyunmok | 86e722ab9754b64819a3016f2530e3629a160565 | [
"MIT"
] | null | null | null | utils/hyper_grid.py | Hyunmok-Park/GNN_hyunmok | 86e722ab9754b64819a3016f2530e3629a160565 | [
"MIT"
] | null | null | null | utils/hyper_grid.py | Hyunmok-Park/GNN_hyunmok | 86e722ab9754b64819a3016f2530e3629a160565 | [
"MIT"
] | null | null | null | import numpy as np
import yaml
class HyperGrid(object):
""" Generate Hyper-parameter Grid """
def __init__(self, key, val, bind_key=None):
"""
key: list, hyper-parameter name, e.g., ["learning_rate", "momentum"]
val: list, hyper-parameter values, e.g., [[0.01, 0.001], [0.9, 0.95]]
bind_key:... | 33.768 | 110 | 0.560057 |
796e21d5f0bcc77ee701fc3c69988452442a415f | 11,175 | py | Python | load_confounds/tests/test_strategies.py | htwangtw/load_confounds | 7f04dbbc7da0074d5de28585775fa5d5a4521d9f | [
"MIT"
] | null | null | null | load_confounds/tests/test_strategies.py | htwangtw/load_confounds | 7f04dbbc7da0074d5de28585775fa5d5a4521d9f | [
"MIT"
] | null | null | null | load_confounds/tests/test_strategies.py | htwangtw/load_confounds | 7f04dbbc7da0074d5de28585775fa5d5a4521d9f | [
"MIT"
] | null | null | null | """Test predefined denoising strategies."""
import os
import re
import load_confounds.strategies as lc
import numpy as np
path_data = os.path.join(os.path.dirname(lc.__file__), "data")
file_confounds = os.path.join(path_data, "test_desc-confounds_regressors.tsv")
def test_Params2():
"""Test the Params2 strategy.... | 26.992754 | 78 | 0.630604 |
796e226e807dc8a1178eebd834c0921b995a21a3 | 31,109 | py | Python | osh/sh_expr_eval.py | nezihsunman/CS350ProjectCreatingALinuxCommand | 7be4139adffc3446d0b518f383cd566e3436dc68 | [
"Apache-2.0"
] | null | null | null | osh/sh_expr_eval.py | nezihsunman/CS350ProjectCreatingALinuxCommand | 7be4139adffc3446d0b518f383cd566e3436dc68 | [
"Apache-2.0"
] | null | null | null | osh/sh_expr_eval.py | nezihsunman/CS350ProjectCreatingALinuxCommand | 7be4139adffc3446d0b518f383cd566e3436dc68 | [
"Apache-2.0"
] | 1 | 2021-03-06T22:08:23.000Z | 2021-03-06T22:08:23.000Z | #!/usr/bin/env python2
# Copyright 2016 Andy Chu. 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
"""
expr_eval.py -- Curre... | 31.55071 | 104 | 0.599312 |
796e2344b86ca0c0149968fa00696872ca863d39 | 15,522 | py | Python | src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_policies_operations.py | LGDoor/azure-cli-extensions | 570a7c181999c1dd160d48f8454aab6cea057a20 | [
"MIT"
] | null | null | null | src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_policies_operations.py | LGDoor/azure-cli-extensions | 570a7c181999c1dd160d48f8454aab6cea057a20 | [
"MIT"
] | null | null | null | src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/operations/_backup_policies_operations.py | LGDoor/azure-cli-extensions | 570a7c181999c1dd160d48f8454aab6cea057a20 | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.... | 48.204969 | 219 | 0.666989 |
796e2369661902e0103030d33b97e0858190d8e9 | 1,509 | py | Python | test/basetest/exceptions.py | sskras/timewarrior | b417fc14bd673a43ba5c50d91fffbf1a539f3ff0 | [
"MIT"
] | 810 | 2018-02-03T21:23:28.000Z | 2022-03-31T07:28:56.000Z | test/basetest/exceptions.py | sskras/timewarrior | b417fc14bd673a43ba5c50d91fffbf1a539f3ff0 | [
"MIT"
] | 431 | 2018-02-04T09:42:15.000Z | 2022-03-31T15:06:30.000Z | test/basetest/exceptions.py | sskras/timewarrior | b417fc14bd673a43ba5c50d91fffbf1a539f3ff0 | [
"MIT"
] | 107 | 2018-02-09T02:40:23.000Z | 2022-03-29T12:21:31.000Z | import signal
sig_names = dict((k, v) for v, k in reversed(sorted(signal.__dict__.items()))
if v.startswith('SIG') and not v.startswith('SIG_'))
class CommandError(Exception):
def __init__(self, cmd, code, out, err=None, msg=None):
DEFAULT = ("Command '{{0}}' was {signal}'ed. "
... | 28.471698 | 77 | 0.526839 |
796e2375ba67d83f9e7093552ae2d9a0df5dc991 | 6,047 | py | Python | backend/blog/handler/admin/ssh.py | o8oo8o/blog | 2a6f44f86469bfbb472dfd1bec4238587d8402bf | [
"MIT"
] | null | null | null | backend/blog/handler/admin/ssh.py | o8oo8o/blog | 2a6f44f86469bfbb472dfd1bec4238587d8402bf | [
"MIT"
] | null | null | null | backend/blog/handler/admin/ssh.py | o8oo8o/blog | 2a6f44f86469bfbb472dfd1bec4238587d8402bf | [
"MIT"
] | null | null | null | #!/usr/bin/evn python3
# coding=utf-8
import selectors
import weakref
import tornado.web
import tornado.ioloop
import tornado.websocket
import tornado.web
from util.exception import AppException
from handler.base import BaseWebSocketHandler
from service.ssh import SSHSrv
class SSHWorker(object):
def __init__(se... | 20.22408 | 96 | 0.585249 |
796e23a78453eef8b4e1d6a314e11bb5d4e7152e | 5,087 | py | Python | toontown/hood/PartyHood.py | MasterLoopyBM/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 1 | 2020-02-07T18:15:12.000Z | 2020-02-07T18:15:12.000Z | toontown/hood/PartyHood.py | AnythingTechPro/Project-Altis | 7ead614abdb5072ca06323982de461f4e775d1b3 | [
"Apache-2.0"
] | null | null | null | toontown/hood/PartyHood.py | AnythingTechPro/Project-Altis | 7ead614abdb5072ca06323982de461f4e775d1b3 | [
"Apache-2.0"
] | 2 | 2021-02-25T06:02:05.000Z | 2021-06-19T03:11:22.000Z | from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.task.Task import Task
from pandac.PandaModules import *
from otp.avatar import DistributedAvatar
from toontown.toonbase.ToonBaseGlobal import *
from toontown.toonbase.ToontownGlobals import *
from toontown.distribute... | 42.041322 | 284 | 0.675447 |
796e2447816d3a182423ef10cde4cfd901b94ff8 | 3,137 | py | Python | docs/conf.py | cflynn3/resqpy | d1d34972ee95526265bb7bde96ca232f98f69c77 | [
"MIT"
] | 35 | 2021-05-24T17:43:55.000Z | 2022-03-15T15:47:59.000Z | docs/conf.py | cflynn3/resqpy | d1d34972ee95526265bb7bde96ca232f98f69c77 | [
"MIT"
] | 355 | 2021-05-24T16:28:16.000Z | 2022-03-14T14:43:40.000Z | docs/conf.py | cflynn3/resqpy | d1d34972ee95526265bb7bde96ca232f98f69c77 | [
"MIT"
] | 12 | 2021-06-02T09:50:46.000Z | 2022-03-02T20:29:56.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
# See also https://wwoods.github.io/2016/06/09/easy-sphinx-documentation-without-the-bo... | 29.59434 | 103 | 0.662416 |
796e251418d2282b7ef5dad2044fcb5a96b0d413 | 3,337 | py | Python | game.py | Alinaeminova/shooter_test | 4bbdcea865297e4d96176c8daee04438ea099633 | [
"CC0-1.0"
] | null | null | null | game.py | Alinaeminova/shooter_test | 4bbdcea865297e4d96176c8daee04438ea099633 | [
"CC0-1.0"
] | null | null | null | game.py | Alinaeminova/shooter_test | 4bbdcea865297e4d96176c8daee04438ea099633 | [
"CC0-1.0"
] | null | null | null | #Создай собственный Шутер!
from pygame import *
mixer.init()
font.init()
from random import randint
#Окно игры
window = display.set_mode((700, 500))
display.set_caption('Shooter')
lost = 0
score = 0
class GameSprite(sprite.Sprite):
def __init__(self, w, h, img, x, y, speed = 0):
super().__init__()
... | 25.473282 | 77 | 0.557087 |
796e25c9431cd88242092b14228315d09a1c3d97 | 698 | py | Python | posts/models.py | firminoneto11/show-me-da-post | e18fa02e58ca2c2e19eee3fefa5273d6f9e25ac1 | [
"MIT"
] | null | null | null | posts/models.py | firminoneto11/show-me-da-post | e18fa02e58ca2c2e19eee3fefa5273d6f9e25ac1 | [
"MIT"
] | null | null | null | posts/models.py | firminoneto11/show-me-da-post | e18fa02e58ca2c2e19eee3fefa5273d6f9e25ac1 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth import get_user_model
class Posts(models.Model):
author = models.ForeignKey(verbose_name='Author', to=get_user_model(), on_delete=models.CASCADE, null=False,
blank=False)
title = models.CharField(verbose_name='Title', max_len... | 36.736842 | 112 | 0.69341 |
796e27a9e20db8a449104679bf2c2bb7dc7e03a5 | 5,381 | py | Python | advanced/train/dpc.py | Stillerman/MusicTransformer-pytorch | 73abb7cab271beba042b7b6fc06a6a9aaee82e8c | [
"MIT"
] | 170 | 2019-08-24T07:25:04.000Z | 2022-03-29T01:42:44.000Z | advanced/train/dpc.py | Stillerman/MusicTransformer-pytorch | 73abb7cab271beba042b7b6fc06a6a9aaee82e8c | [
"MIT"
] | 15 | 2019-10-29T01:36:57.000Z | 2022-03-11T23:56:32.000Z | advanced/train/dpc.py | Stillerman/MusicTransformer-pytorch | 73abb7cab271beba042b7b6fc06a6a9aaee82e8c | [
"MIT"
] | 57 | 2019-10-14T07:26:10.000Z | 2022-03-31T14:39:02.000Z | import sys
import os
sys.path.append(os.path.abspath('.'))
from model import MusicTransformer
import custom
from custom.metrics import *
from custom.criterion import SmoothCrossEntropyLoss, CustomSchedule, TransformerLoss
from custom.config import config
from custom.parallel import DataParallelModel, DataParallelCrite... | 36.358108 | 114 | 0.674224 |
796e28a506e570783c804395b3c184621bfbe4de | 1,137 | py | Python | Intermediate/Day5/1RequestsDemos/get_web_content.py | vishipayyallore/LearningPython_2019 | f72d5af61ad96721442b7ebfc33518c2a879eb64 | [
"MIT"
] | null | null | null | Intermediate/Day5/1RequestsDemos/get_web_content.py | vishipayyallore/LearningPython_2019 | f72d5af61ad96721442b7ebfc33518c2a879eb64 | [
"MIT"
] | null | null | null | Intermediate/Day5/1RequestsDemos/get_web_content.py | vishipayyallore/LearningPython_2019 | f72d5af61ad96721442b7ebfc33518c2a879eb64 | [
"MIT"
] | null | null | null | from urllib.request import urlopen
import csv
import datetime
def get_configuration(csv_file_name):
remote_urls = []
with open(csv_file_name, 'r') as file:
csvfile = csv.reader(file)
for row in csvfile:
remote_urls.append(row)
return remote_urls
def get_web_content(request_u... | 24.191489 | 62 | 0.664908 |
796e29a4f4de9b6d3f6e9747d6881ef0b8b4d5b2 | 6,829 | py | Python | nipyapi/registry/models/component_difference.py | Jimvin/nipyapi | 826beac376d4321bd2d69491f09086474c7e7bfb | [
"Apache-2.0"
] | 199 | 2017-08-24T12:19:41.000Z | 2022-03-20T14:50:17.000Z | nipyapi/registry/models/component_difference.py | Jimvin/nipyapi | 826beac376d4321bd2d69491f09086474c7e7bfb | [
"Apache-2.0"
] | 275 | 2017-08-28T21:21:49.000Z | 2022-03-29T17:57:26.000Z | nipyapi/registry/models/component_difference.py | Jimvin/nipyapi | 826beac376d4321bd2d69491f09086474c7e7bfb | [
"Apache-2.0"
] | 73 | 2017-09-07T10:13:56.000Z | 2022-02-28T10:37:21.000Z | # coding: utf-8
"""
Apache NiFi Registry REST API
The REST API provides an interface to a registry with operations for saving, versioning, reading NiFi flows and components.
OpenAPI spec version: 1.15.0
Contact: dev@nifi.apache.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
... | 28.693277 | 132 | 0.611803 |
796e2a12c078076b80f48c8cdf5bf4aa13db6539 | 319 | py | Python | graph/management/commands/download_PHE_cases.py | StephenGrey/covid_data | 8651460734a9aa21b5106896ab98c47491eadb3c | [
"MIT"
] | null | null | null | graph/management/commands/download_PHE_cases.py | StephenGrey/covid_data | 8651460734a9aa21b5106896ab98c47491eadb3c | [
"MIT"
] | null | null | null | graph/management/commands/download_PHE_cases.py | StephenGrey/covid_data | 8651460734a9aa21b5106896ab98c47491eadb3c | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
from graph import phe_fetch as pf
class Command(BaseCommand):
help = 'Downloads the latest PHE cases data'
def handle(self, *args, **kwargs):
self.stdout.write("Saving new case data from PHE if available")
pf.check_and_download()
| 24.538462 | 71 | 0.69906 |
796e2d57bc64a8e281c2292d35bc9ea91f00edac | 1,344 | py | Python | tests/test_key.py | ksurdacki/cipher21 | 8dfdab32299cb8377435e5f57ec6a9aaf33891eb | [
"MIT"
] | 2 | 2021-05-02T21:15:38.000Z | 2021-05-03T07:45:09.000Z | tests/test_key.py | ksurdacki/cipher21 | 8dfdab32299cb8377435e5f57ec6a9aaf33891eb | [
"MIT"
] | null | null | null | tests/test_key.py | ksurdacki/cipher21 | 8dfdab32299cb8377435e5f57ec6a9aaf33891eb | [
"MIT"
] | null | null | null | from unittest import TestCase
from random import Random
from cipher21.key import Cipher21Key
from cipher21.constants import KEY_LENGTH
class AssessKeyTest(TestCase):
def test_positive_cases(self):
prng = Random() # For test repetitiveness purpose only. Use SystemRandom ordinarily.
prng.seed(0xB... | 37.333333 | 93 | 0.665923 |
796e2df48c888c4faedca820c2580bc5646348aa | 16,236 | py | Python | bin/basenji_test_folds.py | egilbertson-ucsf/basenji | 3d06ec0f5e12f7c5c4be8dfd17efdad3feefd68f | [
"Apache-2.0"
] | 232 | 2017-07-10T23:33:09.000Z | 2022-03-28T21:43:12.000Z | bin/basenji_test_folds.py | egilbertson-ucsf/basenji | 3d06ec0f5e12f7c5c4be8dfd17efdad3feefd68f | [
"Apache-2.0"
] | 88 | 2017-07-12T22:32:17.000Z | 2022-03-29T17:40:03.000Z | bin/basenji_test_folds.py | egilbertson-ucsf/basenji | 3d06ec0f5e12f7c5c4be8dfd17efdad3feefd68f | [
"Apache-2.0"
] | 107 | 2017-07-11T02:11:28.000Z | 2022-03-23T17:05:15.000Z | #!/usr/bin/env python
# Copyright 2019 Calico LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agr... | 36.485393 | 95 | 0.566149 |
796e2ebb1eac924ba1ea605b6f65d2a5659c2f12 | 4,224 | py | Python | pikos/tests/test_csv_file_recorder.py | enthought/pikos | 21255028103a85a0b2761e6b54c74f9d066c2c4a | [
"PSF-2.0",
"BSD-3-Clause"
] | 3 | 2015-01-31T18:08:45.000Z | 2017-05-20T18:19:59.000Z | pikos/tests/test_csv_file_recorder.py | enthought/pikos | 21255028103a85a0b2761e6b54c74f9d066c2c4a | [
"PSF-2.0",
"BSD-3-Clause"
] | 7 | 2015-01-21T11:20:08.000Z | 2015-03-20T14:20:46.000Z | pikos/tests/test_csv_file_recorder.py | enthought/pikos | 21255028103a85a0b2761e6b54c74f9d066c2c4a | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | import contextlib
import os
import shutil
import tempfile
import unittest
from pikos.recorders.csv_file_recorder import CSVFileRecorder
from pikos.recorders.abstract_recorder import RecorderError
from pikos.tests.compat import TestCase
from pikos.tests.dummy_record import DummyRecord
class TestCSVFileRecorder(TestCa... | 32.244275 | 77 | 0.638731 |
796e2f91dd2f3c3cd6b4f590c73f54bac310c06a | 12,441 | py | Python | src/appengine/libs/issue_management/issue_filer.py | HOLMEScdk/clusterfuzz | c8995d657d1be090581f31eb2990a5d65d35e92a | [
"Apache-2.0"
] | null | null | null | src/appengine/libs/issue_management/issue_filer.py | HOLMEScdk/clusterfuzz | c8995d657d1be090581f31eb2990a5d65d35e92a | [
"Apache-2.0"
] | 20 | 2020-07-28T19:01:56.000Z | 2021-03-23T01:04:42.000Z | src/appengine/libs/issue_management/issue_filer.py | HOLMEScdk/clusterfuzz | c8995d657d1be090581f31eb2990a5d65d35e92a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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, ... | 32.825858 | 80 | 0.720762 |
796e301a848c3edaf25f3bda3f8c69294fe0031b | 9,384 | py | Python | src/doddle/facade.py | CatchemAL/Doddle | 0c2ed8b91f998da645d97160d46178c2dab15c9e | [
"MIT"
] | 3 | 2022-02-03T11:50:41.000Z | 2022-02-14T09:25:35.000Z | src/doddle/facade.py | CatchemAl/Doddle | 0c2ed8b91f998da645d97160d46178c2dab15c9e | [
"MIT"
] | 5 | 2022-03-17T07:38:36.000Z | 2022-03-30T02:33:33.000Z | src/doddle/facade.py | CatchemAL/Doddle | 0c2ed8b91f998da645d97160d46178c2dab15c9e | [
"MIT"
] | 2 | 2022-02-06T15:36:29.000Z | 2022-02-06T23:48:57.000Z | from __future__ import annotations
from typing import Sequence, Union
from .benchmarking import Benchmark, Benchmarker, NullBenchmarkReporter, SimulBenchmarker
from .boards import Scoreboard
from .engine import Engine, SimulEngine
from .enums import SolverType
from .factory import create_models
from .solver import En... | 41.339207 | 104 | 0.645993 |
796e308e3ae0b1c52c53c2125b380ddc7ffbb777 | 12,198 | py | Python | src/aiokatcp/connection.py | richarms/aiokatcp | a5dfa76e8a887b4ce78c15e78f75d245427de7c9 | [
"BSD-3-Clause"
] | null | null | null | src/aiokatcp/connection.py | richarms/aiokatcp | a5dfa76e8a887b4ce78c15e78f75d245427de7c9 | [
"BSD-3-Clause"
] | 26 | 2017-11-16T18:45:53.000Z | 2021-07-20T06:55:00.000Z | src/aiokatcp/connection.py | richarms/aiokatcp | a5dfa76e8a887b4ce78c15e78f75d245427de7c9 | [
"BSD-3-Clause"
] | 2 | 2021-01-06T12:07:35.000Z | 2021-01-25T13:51:12.000Z | # Copyright 2017 National Research Foundation (Square Kilometre Array)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditi... | 38.601266 | 95 | 0.64199 |
796e30c5cfc2db3fda59dd24752cad79e3ae1fa4 | 4,219 | py | Python | pyemma/util/log.py | clonker/PyEMMA | a36534ce2ec6a799428dfbdef0465c979e6c68aa | [
"BSD-2-Clause"
] | 1 | 2020-01-21T16:55:38.000Z | 2020-01-21T16:55:38.000Z | pyemma/util/log.py | clonker/PyEMMA | a36534ce2ec6a799428dfbdef0465c979e6c68aa | [
"BSD-2-Clause"
] | 1 | 2022-01-10T18:09:25.000Z | 2022-01-10T18:09:25.000Z | pyemma/util/log.py | clonker/PyEMMA | a36534ce2ec6a799428dfbdef0465c979e6c68aa | [
"BSD-2-Clause"
] | null | null | null |
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University
# Berlin, 14195 Berlin, Germany.
# 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... | 34.024194 | 83 | 0.664375 |
796e30e65a74232dd879a0e86b919b3c9324935c | 11,119 | py | Python | security_monkey/tests/auditors/test_elasticsearch_service.py | cncoder/security_monkey | 7d14c00e6c18a0edf87830ff4191007b6296b945 | [
"Apache-2.0"
] | null | null | null | security_monkey/tests/auditors/test_elasticsearch_service.py | cncoder/security_monkey | 7d14c00e6c18a0edf87830ff4191007b6296b945 | [
"Apache-2.0"
] | null | null | null | security_monkey/tests/auditors/test_elasticsearch_service.py | cncoder/security_monkey | 7d14c00e6c18a0edf87830ff4191007b6296b945 | [
"Apache-2.0"
] | 1 | 2019-06-15T14:03:34.000Z | 2019-06-15T14:03:34.000Z | # Copyright 2014 Netflix, 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... | 30.051351 | 120 | 0.525587 |
796e311b61b630b44d13481ec0ab99c6948dfc18 | 563 | py | Python | data/train/python/796e311b61b630b44d13481ec0ab99c6948dfc18collection.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/796e311b61b630b44d13481ec0ab99c6948dfc18collection.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/796e311b61b630b44d13481ec0ab99c6948dfc18collection.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | from app.controllers.base import RestController
from app.models.collection import Collection, Story, Target
from app.forms.collection import CollectionForm, StoryForm, TargetForm
class CollectionController(RestController):
Model = Collection
def get_form(self, filter_data):
return CollectionForm
cl... | 22.52 | 70 | 0.756661 |
796e3526521287e3a0814c2fd2f4d1caf9eca1d9 | 15,885 | py | Python | l5kit/l5kit/planning/vectorized/closed_loop_model.py | cdicle-motional/l5kit | 4dc4ee5391479bb71f0b373f39c316f9eef5a961 | [
"Apache-2.0"
] | 1 | 2021-12-04T17:48:53.000Z | 2021-12-04T17:48:53.000Z | l5kit/l5kit/planning/vectorized/closed_loop_model.py | cdicle-motional/l5kit | 4dc4ee5391479bb71f0b373f39c316f9eef5a961 | [
"Apache-2.0"
] | null | null | null | l5kit/l5kit/planning/vectorized/closed_loop_model.py | cdicle-motional/l5kit | 4dc4ee5391479bb71f0b373f39c316f9eef5a961 | [
"Apache-2.0"
] | 1 | 2021-11-19T08:13:46.000Z | 2021-11-19T08:13:46.000Z |
from typing import Dict, List, Tuple
import torch
from torch import nn
from .common import pad_avail, pad_points, transform_points
from .open_loop_model import VectorizedModel
class VectorizedUnrollModel(VectorizedModel):
""" Vectorized closed-loop planning model.
"""
def __init__(
self,
... | 46.997041 | 120 | 0.618949 |
796e35348b7c0cb0daa79b375a5aaa3a97932373 | 28,123 | py | Python | scripts/oscal_normalize.py | CyberFlameGO/compliance-trestle | aeae771e0e90c7c69ef914ca02d4857ed6f50222 | [
"Apache-2.0"
] | 70 | 2020-09-10T08:46:26.000Z | 2022-03-29T17:52:56.000Z | scripts/oscal_normalize.py | CyberFlameGO/compliance-trestle | aeae771e0e90c7c69ef914ca02d4857ed6f50222 | [
"Apache-2.0"
] | 892 | 2020-09-09T10:48:58.000Z | 2022-03-31T03:36:28.000Z | scripts/oscal_normalize.py | CyberFlameGO/compliance-trestle | aeae771e0e90c7c69ef914ca02d4857ed6f50222 | [
"Apache-2.0"
] | 33 | 2020-09-11T05:11:08.000Z | 2022-03-29T16:14:35.000Z | # -*- mode:python; coding:utf-8 -*-
# Copyright (c) 2020 IBM Corp. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
... | 34.171324 | 114 | 0.602923 |
796e353bd5f956ba6245df34d111beac2235840d | 5,564 | py | Python | libs/Theano/theano/gpuarray/__init__.py | mzapotoczny/dependency-parser | e37f94e23cb61d6658774f5f9843219df331eb74 | [
"MIT"
] | 3 | 2017-06-07T06:41:18.000Z | 2019-10-26T13:08:23.000Z | libs/Theano/theano/gpuarray/__init__.py | mzapotoczny/dependency-parser | e37f94e23cb61d6658774f5f9843219df331eb74 | [
"MIT"
] | null | null | null | libs/Theano/theano/gpuarray/__init__.py | mzapotoczny/dependency-parser | e37f94e23cb61d6658774f5f9843219df331eb74 | [
"MIT"
] | 1 | 2020-11-26T17:40:18.000Z | 2020-11-26T17:40:18.000Z | from __future__ import absolute_import, print_function, division
import sys
import logging
import sys
import warnings
import theano
from theano import config
from theano.compile import optdb
from theano.tensor.basic import register_transfer
_logger_name = 'theano.gpuarray'
_logger = logging.getLogger(_logger_name)
... | 40.613139 | 153 | 0.622214 |
796e355bf5cf097b4fef53b6919cba38ce7aee90 | 2,452 | py | Python | tests/tests.py | ddworken/WriteOnlyFileSystem | 57c40f553113b535799eb963a97c87700f6bf3fb | [
"MIT"
] | 4 | 2017-03-27T13:52:18.000Z | 2019-11-15T17:06:28.000Z | tests/tests.py | ddworken/WriteOnlyFileSystem | 57c40f553113b535799eb963a97c87700f6bf3fb | [
"MIT"
] | null | null | null | tests/tests.py | ddworken/WriteOnlyFileSystem | 57c40f553113b535799eb963a97c87700f6bf3fb | [
"MIT"
] | null | null | null | import sys
import unittest
sys.path.insert(0, "../bin/")
import config
import client
import decrypt
class wofs_testing(unittest.TestCase):
def test_sha256(self):
self.assertEqual(config.hash("goodPassword"),
"0747f7aecd1572460c3c90c0c75cbdde641b1039190ade8538b0ed0c559070df")
# def test_createSocket(self)... | 38.920635 | 89 | 0.83646 |
796e35cc1148d9b60ee4fbaa2f9cec1b92bed2c9 | 5,638 | py | Python | learnable_proposal_classifier/svonline/algorithms/simple_online_method.py | daip13/LPC_MOT | 2fb7657278b33eb82a537537c2534de68c3d0277 | [
"MIT"
] | 71 | 2021-03-12T07:43:43.000Z | 2022-03-30T03:28:16.000Z | learnable_proposal_classifier/svonline/algorithms/simple_online_method.py | bobo-liang/LPC_MOT | 2fb7657278b33eb82a537537c2534de68c3d0277 | [
"MIT"
] | 8 | 2021-04-06T03:02:58.000Z | 2022-02-16T14:05:47.000Z | learnable_proposal_classifier/svonline/algorithms/simple_online_method.py | bobo-liang/LPC_MOT | 2fb7657278b33eb82a537537c2534de68c3d0277 | [
"MIT"
] | 7 | 2021-04-19T02:55:58.000Z | 2021-11-11T12:39:09.000Z | import os
import sys
import json
import numpy as np
from abc import ABCMeta, abstractmethod
from scipy.optimize import linear_sum_assignment
sys.path.append(os.path.join(os.path.dirname(__file__), "../"))
from core.graph import Graph, BipartiteMatchingGraph
from core.node import nodes_in_time, split_nodes
from core.cre... | 41.762963 | 133 | 0.557822 |
796e37841a2b9327525d2f20afdde82f19ecdb55 | 245 | py | Python | slpostfix.py | xDiaym/SingleLineRPN | ef6adc921f4367037c5f8e7618da70c47f60385e | [
"MIT"
] | 1 | 2020-05-18T16:35:07.000Z | 2020-05-18T16:35:07.000Z | slpostfix.py | xDiaym/SingleLineRPN | ef6adc921f4367037c5f8e7618da70c47f60385e | [
"MIT"
] | null | null | null | slpostfix.py | xDiaym/SingleLineRPN | ef6adc921f4367037c5f8e7618da70c47f60385e | [
"MIT"
] | null | null | null | print((lambda f,i:f.reduce((lambda s,_:(lambda d,t:{'+':lambda a,b:a+b,'-':lambda a,b:a-b,'*':lambda a,b:a*b,'/':lambda a,b:a/b}.get(t)(s,d))(float(i.pop(0)),i.pop(0))),i,float(i.pop(0))))(__import__('functools'),__import__('sys').argv[1:]+[0])) | 245 | 245 | 0.595918 |
796e37c04ceb1e9e3427fa9253dd95b243f418ef | 771 | py | Python | places/migrations/0004_auto_20200607_0830.py | ahkhystrix/learn-devman-django-1-afisha | 783c01542113dcfada8d2aef96fb46847e959ef5 | [
"MIT"
] | null | null | null | places/migrations/0004_auto_20200607_0830.py | ahkhystrix/learn-devman-django-1-afisha | 783c01542113dcfada8d2aef96fb46847e959ef5 | [
"MIT"
] | null | null | null | places/migrations/0004_auto_20200607_0830.py | ahkhystrix/learn-devman-django-1-afisha | 783c01542113dcfada8d2aef96fb46847e959ef5 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-06-07 05:30
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('places', '0003_auto_20200607_0816'),
]
operations = [
migrations.AddField(
model_name='feature'... | 30.84 | 151 | 0.640726 |
796e383fa3045287bcebbd63edc50f3c8e68d871 | 403 | py | Python | pricecollectr/pricecollectr/wsgi.py | ujhuyz0110/PriceChecker | 0006a9d053cf384b9b86db0f3c1d7d207ee1bb34 | [
"BSD-2-Clause"
] | null | null | null | pricecollectr/pricecollectr/wsgi.py | ujhuyz0110/PriceChecker | 0006a9d053cf384b9b86db0f3c1d7d207ee1bb34 | [
"BSD-2-Clause"
] | null | null | null | pricecollectr/pricecollectr/wsgi.py | ujhuyz0110/PriceChecker | 0006a9d053cf384b9b86db0f3c1d7d207ee1bb34 | [
"BSD-2-Clause"
] | null | null | null | """
WSGI config for pricecollectr 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/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO... | 23.705882 | 78 | 0.791563 |
796e39f26dabd7549390ff4317f8e36a52fbedaf | 20,718 | py | Python | tests/unit/task/contexts/keystone/test_users.py | DavidLiu506/rally-openstack-alcor | 8fbaf6517fd9818ee569f9c3061d66b869026159 | [
"Apache-2.0"
] | null | null | null | tests/unit/task/contexts/keystone/test_users.py | DavidLiu506/rally-openstack-alcor | 8fbaf6517fd9818ee569f9c3061d66b869026159 | [
"Apache-2.0"
] | null | null | null | tests/unit/task/contexts/keystone/test_users.py | DavidLiu506/rally-openstack-alcor | 8fbaf6517fd9818ee569f9c3061d66b869026159 | [
"Apache-2.0"
] | 1 | 2021-08-10T03:11:51.000Z | 2021-08-10T03:11:51.000Z | # Copyright 2014: Mirantis 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 b... | 39.538168 | 79 | 0.586302 |
796e3a2182110595c312a54fbba6fde25b53d269 | 173 | py | Python | openstack_dashboard/dashboards/nikolaboard/usagepanel/tests.py | AlexOugh/horizon | bda2a59aad7637f45211db37235ab18323e20b25 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/nikolaboard/usagepanel/tests.py | AlexOugh/horizon | bda2a59aad7637f45211db37235ab18323e20b25 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/nikolaboard/usagepanel/tests.py | AlexOugh/horizon | bda2a59aad7637f45211db37235ab18323e20b25 | [
"Apache-2.0"
] | null | null | null | from horizon.test import helpers as test
class UsagepanelTests(test.TestCase):
# Unit tests for usagepanel.
def test_me(self):
self.assertTrue(1 + 1 == 2)
| 21.625 | 40 | 0.687861 |
796e3a5358cd236a4cafb3b6fe8f46a0e32ddb5c | 2,118 | py | Python | 5_Linked_Lists/4.py | allenalvin333/Hackerrank_Interview | b40981ef55d04fb14d81a6e1c9ade1878f59394d | [
"MIT"
] | 2 | 2021-11-21T07:59:17.000Z | 2021-11-25T13:41:50.000Z | 5_Linked_Lists/4.py | allenalvin333/Hackerrank_Interview | b40981ef55d04fb14d81a6e1c9ade1878f59394d | [
"MIT"
] | null | null | null | 5_Linked_Lists/4.py | allenalvin333/Hackerrank_Interview | b40981ef55d04fb14d81a6e1c9ade1878f59394d | [
"MIT"
] | 1 | 2021-09-20T16:20:07.000Z | 2021-09-20T16:20:07.000Z | # https://www.hackerrank.com/challenges/find-the-merge-point-of-two-joined-linked-lists/problem
#!/bin/python3
import math
import os
import random
import re
import sys
class SinglyLinkedListNode:
def __init__(self, node_data):
self.data = node_data
self.next = None
class SinglyLinkedList:
de... | 21.18 | 95 | 0.581681 |
796e3bbc22f36948d272d58422fa6c56fa31f6f9 | 12,462 | py | Python | hubspot/crm/schemas/rest.py | cclauss/hubspot-api-python | 7c60c0f572b98c73e1f1816bf5981396a42735f6 | [
"Apache-2.0"
] | null | null | null | hubspot/crm/schemas/rest.py | cclauss/hubspot-api-python | 7c60c0f572b98c73e1f1816bf5981396a42735f6 | [
"Apache-2.0"
] | null | null | null | hubspot/crm/schemas/rest.py | cclauss/hubspot-api-python | 7c60c0f572b98c73e1f1816bf5981396a42735f6 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Schemas
The CRM uses schemas to define how custom objects should store and represent information in the HubSpot CRM. Schemas define details about an object's type, properties, and associations. The schema can be uniquely identified by its **object type ID**. # noqa: E501
The version ... | 42.678082 | 268 | 0.547665 |
796e3c9a0fd4c2a0f28bcf942b5ea51811deedb1 | 5,123 | py | Python | aiida_ddec/calculations/__init__.py | ltalirz/aiida-ddec | 07a66929ebfbc117c40e3c50e543c076ce65a038 | [
"MIT"
] | null | null | null | aiida_ddec/calculations/__init__.py | ltalirz/aiida-ddec | 07a66929ebfbc117c40e3c50e543c076ce65a038 | [
"MIT"
] | null | null | null | aiida_ddec/calculations/__init__.py | ltalirz/aiida-ddec | 07a66929ebfbc117c40e3c50e543c076ce65a038 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""AiiDA-DDEC input plugin"""
from __future__ import absolute_import
import os
from collections import OrderedDict
import six
from aiida.engine import CalcJob
from aiida.orm import Dict
from aiida.orm import RemoteData
from aiida.common import CalcInfo, CodeInfo
from aiida.orm.nodes.data.cif imp... | 36.592857 | 108 | 0.574858 |
796e3db639b0b6f278110ff21a436c064190cdfe | 7,240 | py | Python | ietf/doc/management/commands/generate_draft_aliases.py | jimfenton/datatracker | 25c7c4801a0d971f30027d7e1ac21120cefeb242 | [
"BSD-3-Clause"
] | 25 | 2022-03-05T08:26:52.000Z | 2022-03-30T15:45:42.000Z | ietf/doc/management/commands/generate_draft_aliases.py | Evolution-team/datatracker | 902e37d24d45c72ad401e761d4ef44af5cf20d03 | [
"BSD-3-Clause"
] | 219 | 2022-03-04T17:29:12.000Z | 2022-03-31T21:16:14.000Z | ietf/doc/management/commands/generate_draft_aliases.py | Evolution-team/datatracker | 902e37d24d45c72ad401e761d4ef44af5cf20d03 | [
"BSD-3-Clause"
] | 22 | 2022-03-04T15:34:34.000Z | 2022-03-28T13:30:59.000Z | # Copyright The IETF Trust 2012-2021, All Rights Reserved
# -*- coding: utf-8 -*-
# This was written as a script by Markus Stenberg <markus.stenberg@iki.fi>.
# It was turned into a management command by Russ Housley <housley@vigisec.com>.
import datetime
import io
import os
import re
import shutil
import stat
import ... | 40.446927 | 122 | 0.66105 |
796e3e2ce510042aa22c64fdc5d8d2b6624cd3d7 | 2,861 | py | Python | galileo/framework/pytorch/python/hooks/base_log_hook.py | YaoPu2021/galileo | 0ebee2052bf78205f93f8cbbe0e2884095dd7af7 | [
"Apache-2.0"
] | 115 | 2021-09-09T03:01:58.000Z | 2022-03-30T10:46:26.000Z | galileo/framework/pytorch/python/hooks/base_log_hook.py | Hacky-DH/galileo | e4d5021f0287dc879730dfa287b9a056f152f712 | [
"Apache-2.0"
] | 1 | 2021-12-09T07:34:41.000Z | 2021-12-20T06:24:27.000Z | galileo/framework/pytorch/python/hooks/base_log_hook.py | Hacky-DH/galileo | e4d5021f0287dc879730dfa287b9a056f152f712 | [
"Apache-2.0"
] | 28 | 2021-09-10T08:47:20.000Z | 2022-03-17T07:29:26.000Z | # Copyright 2020 JD.com, Inc. Galileo 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 a... | 39.191781 | 80 | 0.650122 |
796e3fa5ac2fbbd3869072676717247985cabdc6 | 8,321 | py | Python | sdk/python/pulumi_aws/ec2/route.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/ec2/route.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/ec2/route.py | johnktims/pulumi-aws | c838bc79043f5376c66fc66275a1e012edd3ab7d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Route(... | 50.126506 | 377 | 0.704483 |
796e40258a3da8d88372a2035c6cce1221600908 | 793 | py | Python | tests/test_request.py | keishinkickback/multivitamin | edc49267fc5a25182da0e7c7c8bba398225437e5 | [
"Apache-2.0"
] | 8 | 2019-05-08T20:27:41.000Z | 2021-04-19T15:17:22.000Z | tests/test_request.py | keishinkickback/multivitamin | edc49267fc5a25182da0e7c7c8bba398225437e5 | [
"Apache-2.0"
] | 9 | 2019-05-17T19:16:50.000Z | 2022-03-11T23:46:55.000Z | tests/test_request.py | keishinkickback/multivitamin | edc49267fc5a25182da0e7c7c8bba398225437e5 | [
"Apache-2.0"
] | 4 | 2019-05-07T18:00:51.000Z | 2019-06-22T02:35:51.000Z | import json
import pytest
import glog as log
from multivitamin.data.request import Request
r1 = """{"url":"https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/A_blank_black_picture.jpg/1536px-A_blank_black_picture.jpg",
"dst_url":"https://dummy.url",
"prev_response":"","bin_encoding":"true","bin_decodin... | 26.433333 | 134 | 0.687264 |
796e4032555f4cf88ab1f37dc158fb2069898eec | 1,129 | py | Python | extra/02_lists/order.py | Maxpayyne/biosystems-analytics-2020 | 98974d856a3be23910c41de5ede3c0a427b6fb0d | [
"MIT"
] | null | null | null | extra/02_lists/order.py | Maxpayyne/biosystems-analytics-2020 | 98974d856a3be23910c41de5ede3c0a427b6fb0d | [
"MIT"
] | null | null | null | extra/02_lists/order.py | Maxpayyne/biosystems-analytics-2020 | 98974d856a3be23910c41de5ede3c0a427b6fb0d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Author : Maxpayyne
Date : 2020-02-12
Purpose: Order a List
"""
print('You have failed me for the last time, Commander.')
import argparse
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
... | 25.659091 | 83 | 0.473871 |
796e41227cbe86a12b68de555ed63c8d7256d45d | 499 | py | Python | sql-execute.py | mizvyt/audio-fingerprint-identifying-python | fa7c199479171299416bacba1cd84cd39455990f | [
"MIT"
] | 10 | 2020-09-29T14:22:18.000Z | 2022-03-29T21:07:57.000Z | sql-execute.py | mizvyt/audio-fingerprint-identifying-python | fa7c199479171299416bacba1cd84cd39455990f | [
"MIT"
] | 15 | 2020-09-29T23:47:28.000Z | 2021-08-21T13:00:22.000Z | sql-execute.py | mizvyt/audio-fingerprint-identifying-python | fa7c199479171299416bacba1cd84cd39455990f | [
"MIT"
] | 2 | 2020-09-29T16:06:26.000Z | 2020-10-10T05:39:42.000Z | #!/usr/bin/python3
import argparse
import sys
from libs.db_sqlite import SqliteDatabase
from termcolor import colored
from argparse import RawTextHelpFormatter
if __name__ == "__main__":
parser = argparse.ArgumentParser(formatter_class=RawTextHelpFormatter)
parser.add_argument("-q", "--query", nargs="?")
... | 21.695652 | 74 | 0.707415 |
796e4205b000a7cdb8c8ba52c71e2c749d5e558d | 2,385 | py | Python | src/compression/entropy_models.py | markveillette/high-fidelity-generative-compression | d88b4d7f1212efa8611e91737ff6bf00bbf36670 | [
"Apache-2.0"
] | null | null | null | src/compression/entropy_models.py | markveillette/high-fidelity-generative-compression | d88b4d7f1212efa8611e91737ff6bf00bbf36670 | [
"Apache-2.0"
] | null | null | null | src/compression/entropy_models.py | markveillette/high-fidelity-generative-compression | d88b4d7f1212efa8611e91737ff6bf00bbf36670 | [
"Apache-2.0"
] | null | null | null | import abc
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
# Custom
from src.helpers import maths
MIN_SCALE = 0.11
MIN_LIKELIHOOD = 1e-9
MAX_LIKELIHOOD = 1e4
TAIL_MASS = 2**(-9)
PRECISION_P = 16 # Precision of rANS coder
# TODO: Unit tests
lower_bound_toward = maths.LowerBou... | 27.732558 | 91 | 0.656184 |
796e42c5c473820d5aa3dd7cd4247a47d7f8d562 | 441 | py | Python | test/unit/entity/test_tasklist_factory.py | uSpike/ansible-discover | 74ed24d01bf305f45d0bb3485846291d8b3ca473 | [
"MIT"
] | 4 | 2018-08-22T19:56:47.000Z | 2021-11-15T16:11:21.000Z | test/unit/entity/test_tasklist_factory.py | uSpike/ansible-discover | 74ed24d01bf305f45d0bb3485846291d8b3ca473 | [
"MIT"
] | 11 | 2018-03-09T08:35:47.000Z | 2018-08-17T20:05:58.000Z | test/unit/entity/test_tasklist_factory.py | uSpike/ansible-discover | 74ed24d01bf305f45d0bb3485846291d8b3ca473 | [
"MIT"
] | 3 | 2018-08-14T15:35:31.000Z | 2021-11-15T16:11:24.000Z | from ansiblediscover.entity.tasklist import TasklistFactory
def test_init():
path = 'path/to/my/tasks.yml'
assert path == TasklistFactory(path).path
def test_name():
tasklist = TasklistFactory('path/to/my/tasks.yml')
assert 'tasks.yml' == tasklist.name
def test_typestring():
assert 'tasklist' ... | 22.05 | 65 | 0.721088 |
796e43c7d99350090ebe67abcb9b7fce7c26eb94 | 670 | py | Python | autharch_sharc/editor/migrations/0037_story_parental.py | kingsdigitallab/autharch_sharc | 92de5fbec8cc72ce48a9e25eb634d40ac2cc83ca | [
"MIT"
] | null | null | null | autharch_sharc/editor/migrations/0037_story_parental.py | kingsdigitallab/autharch_sharc | 92de5fbec8cc72ce48a9e25eb634d40ac2cc83ca | [
"MIT"
] | null | null | null | autharch_sharc/editor/migrations/0037_story_parental.py | kingsdigitallab/autharch_sharc | 92de5fbec8cc72ce48a9e25eb634d40ac2cc83ca | [
"MIT"
] | null | null | null | # Generated by Django 3.0.10 on 2021-06-08 10:53
import django.db.models.deletion
import modelcluster.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("editor", "0036_ead_snippet_theme"),
]
operations = [
migrations.AlterField(
... | 24.814815 | 61 | 0.585075 |
796e43e61c34616d17a88d3a8dc5950fcd99016b | 27,621 | py | Python | python/ccxt/async_support/rightbtc.py | yogch/ccxt | 5f0510a4ec490ef956a756ba4028763bc740aac5 | [
"MIT"
] | 3 | 2021-06-29T16:27:19.000Z | 2021-07-18T08:36:07.000Z | python/ccxt/async_support/rightbtc.py | Bytedex/ccxt | 3863b5e1d6c77d719ac102b0243964c4946e7abb | [
"MIT"
] | null | null | null | python/ccxt/async_support/rightbtc.py | Bytedex/ccxt | 3863b5e1d6c77d719ac102b0243964c4946e7abb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticatio... | 39.123229 | 242 | 0.458564 |
796e453be1558b8781f6999610e20f83083943c2 | 2,622 | py | Python | widgy/templatetags/widgy_tags.py | IndiumTechnology/django-widgy | 3cb5ea0a38b22f7430fe4cfcd12530739d396d70 | [
"Apache-2.0"
] | null | null | null | widgy/templatetags/widgy_tags.py | IndiumTechnology/django-widgy | 3cb5ea0a38b22f7430fe4cfcd12530739d396d70 | [
"Apache-2.0"
] | null | null | null | widgy/templatetags/widgy_tags.py | IndiumTechnology/django-widgy | 3cb5ea0a38b22f7430fe4cfcd12530739d396d70 | [
"Apache-2.0"
] | null | null | null | from django import template
from django.conf import settings
from django.utils.safestring import mark_safe
import markdown
from widgy.utils import fancy_import, update_context
register = template.Library()
@register.simple_tag(takes_context=True)
def render(context, node):
return node.render(context)
@regist... | 25.456311 | 77 | 0.720442 |
796e474fa0db42dd50946a58309137c7bbe425cb | 4,909 | py | Python | test/unit/webapps/test_webapp_base.py | lesperry/Metagenomics | a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6 | [
"CC-BY-3.0"
] | null | null | null | test/unit/webapps/test_webapp_base.py | lesperry/Metagenomics | a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6 | [
"CC-BY-3.0"
] | null | null | null | test/unit/webapps/test_webapp_base.py | lesperry/Metagenomics | a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6 | [
"CC-BY-3.0"
] | null | null | null | """
Unit tests for ``galaxy.web.framework.webapp``
"""
import logging
import re
import unittest
import galaxy.config
from galaxy.webapps.base import webapp as Webapp
from ..unittest_utils import galaxy_mock
log = logging.getLogger(__name__)
class StubGalaxyWebTransaction(Webapp.GalaxyWebTransaction):
def _ensu... | 39.910569 | 98 | 0.695254 |
796e47978fa9a506046700069c4c579d6c975889 | 231 | py | Python | Material/1 - Introdução/1.py | DraculK/ED-Faculgado | c4ed14fca8067765954856f4d9fedcd21fb23ff3 | [
"MIT"
] | null | null | null | Material/1 - Introdução/1.py | DraculK/ED-Faculgado | c4ed14fca8067765954856f4d9fedcd21fb23ff3 | [
"MIT"
] | null | null | null | Material/1 - Introdução/1.py | DraculK/ED-Faculgado | c4ed14fca8067765954856f4d9fedcd21fb23ff3 | [
"MIT"
] | null | null | null | def primo(num):
divisores = 0
if(num==1):
return "Não primo."
for i in range(2,num):
if (num%i==0):
divisores += 1
return "Não primo."
break
elif(divisores==0):
return "Primo."
break
| 17.769231 | 25 | 0.528139 |
796e48958caf8fee9e30853a9f80a3743cc8d8e4 | 2,975 | py | Python | rpc_server/rpc_provider.py | marco-sundsk/near-simple-rpc-service | 840f7bf749bb32ba270ffb18cd081137786f1212 | [
"MIT"
] | null | null | null | rpc_server/rpc_provider.py | marco-sundsk/near-simple-rpc-service | 840f7bf749bb32ba270ffb18cd081137786f1212 | [
"MIT"
] | null | null | null | rpc_server/rpc_provider.py | marco-sundsk/near-simple-rpc-service | 840f7bf749bb32ba270ffb18cd081137786f1212 | [
"MIT"
] | null | null | null | import requests
import base64
import json
class JsonProviderError(Exception):
pass
class JsonProvider(object):
def __init__(self, rpc_addr):
if isinstance(rpc_addr, tuple):
self._rpc_addr = "http://%s:%s" % rpc_addr
else:
self._rpc_addr = rpc_addr
def rpc_addr(s... | 36.728395 | 143 | 0.649748 |
796e498b34e49f89adb07bb9eee9386c0625745c | 401 | py | Python | nelpy/io/__init__.py | elifesciences-publications/nelpy | 68c1ffff5eee5de60fc365c4f5df3c7200f5c319 | [
"MIT"
] | null | null | null | nelpy/io/__init__.py | elifesciences-publications/nelpy | 68c1ffff5eee5de60fc365c4f5df3c7200f5c319 | [
"MIT"
] | null | null | null | nelpy/io/__init__.py | elifesciences-publications/nelpy | 68c1ffff5eee5de60fc365c4f5df3c7200f5c319 | [
"MIT"
] | 1 | 2018-11-26T04:56:40.000Z | 2018-11-26T04:56:40.000Z | """
nelpy.io
========
This is the nelpy IO module.
"""
# TODO: add file IO utils such as mkdir, getwd, load, save, glob, etc.
# also possibly have examples and support for Jagular
# also add hdf5 support, especially for pandas
from . import hc3
from . import matlab
from . import neuralynx
from . import neo
from . im... | 20.05 | 70 | 0.710723 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.