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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4579aedeefceab20d23ddb0099e5be3c71a7ba34 | 948 | py | Python | clover/views.py | taoyanli0808/clover | 54dc4000263ab9e8873f0d429a7fe48b11fb727a | [
"Apache-2.0"
] | 18 | 2019-07-01T04:49:33.000Z | 2022-03-11T03:15:09.000Z | clover/views.py | taoyanli0808/clover | 54dc4000263ab9e8873f0d429a7fe48b11fb727a | [
"Apache-2.0"
] | 64 | 2019-11-20T09:33:21.000Z | 2021-11-16T06:34:32.000Z | clover/views.py | taoyanli0808/clover | 54dc4000263ab9e8873f0d429a7fe48b11fb727a | [
"Apache-2.0"
] | 9 | 2019-10-18T08:28:26.000Z | 2020-05-25T15:38:12.000Z | """
# description : base view for clover.
# author : taoyanli0808
# history :
# 2019/12/16 created
"""
from flask import request
from flask import jsonify
from flask.views import View
class CloverView(View):
"""
# base view for clover.
"""
def dispatch_request(self):
""... | 23.7 | 53 | 0.541139 |
0fa35a9c11caa55128a6a66e1d948a8abfea2899 | 374 | py | Python | examples/v3/triage.py | gruberrro/python-api | ecdc75868e6a847bb0193a50d74f887c3f15369b | [
"Apache-2.0"
] | 60 | 2015-05-06T15:47:25.000Z | 2022-03-19T13:00:05.000Z | examples/v3/triage.py | gruberrro/python-api | ecdc75868e6a847bb0193a50d74f887c3f15369b | [
"Apache-2.0"
] | 8 | 2017-03-28T11:44:04.000Z | 2021-02-09T00:47:54.000Z | examples/v3/triage.py | gruberrro/python-api | ecdc75868e6a847bb0193a50d74f887c3f15369b | [
"Apache-2.0"
] | 33 | 2015-12-19T18:47:56.000Z | 2022-01-12T07:41:23.000Z | from .. import config
config.setup_examples()
import infermedica_api
if __name__ == "__main__":
api: infermedica_api.APIv3Connector = infermedica_api.get_api()
# Prepare the diagnosis request object
request = config.get_example_request_data()
# call triage method
request = api.triage(**request)
... | 22 | 67 | 0.713904 |
30b5439d9e1249d71fe87151f0eb27e751d7a213 | 1,812 | py | Python | python_modules/dagster/dagster/cli/asset.py | joeyfreund/dagster | e551ff4bbb2c42b497a3e1c28cfb51fd5f2b1c21 | [
"Apache-2.0"
] | 1 | 2020-08-10T23:03:37.000Z | 2020-08-10T23:03:37.000Z | python_modules/dagster/dagster/cli/asset.py | joeyfreund/dagster | e551ff4bbb2c42b497a3e1c28cfb51fd5f2b1c21 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/cli/asset.py | joeyfreund/dagster | e551ff4bbb2c42b497a3e1c28cfb51fd5f2b1c21 | [
"Apache-2.0"
] | 1 | 2020-08-20T14:20:31.000Z | 2020-08-20T14:20:31.000Z | import click
from dagster.core.definitions.events import AssetKey
from dagster.core.instance import DagsterInstance
def create_asset_cli_group():
group = click.Group(name='asset')
group.add_command(asset_wipe_command)
return group
@click.command(
name='wipe', help='Eliminate asset key indexes from ... | 32.945455 | 100 | 0.662804 |
dab6d619ec4d73232ed646fec35afe48b606c255 | 687 | py | Python | tests/test_output/typevars_demo.py | arisp99/sphinx-toolbox | 2987080e2d65c0dd2d392dcf7f1f5a904a9231f5 | [
"MIT"
] | 30 | 2021-03-01T00:15:55.000Z | 2022-03-01T13:23:59.000Z | tests/test_output/typevars_demo.py | arisp99/sphinx-toolbox | 2987080e2d65c0dd2d392dcf7f1f5a904a9231f5 | [
"MIT"
] | 56 | 2020-12-17T12:39:04.000Z | 2022-03-21T19:00:55.000Z | tests/test_output/typevars_demo.py | arisp99/sphinx-toolbox | 2987080e2d65c0dd2d392dcf7f1f5a904a9231f5 | [
"MIT"
] | 4 | 2021-07-04T16:57:52.000Z | 2022-03-21T19:35:31.000Z | # stdlib
from typing import TypeVar
# 3rd party
import attr
__all__ = [
"Demo",
"SlotsDemo",
'T',
"T_co",
"T_contra",
'S',
"DS",
"FR",
]
FR = TypeVar("FR", bound="SlotsDemo")
@attr.s(slots=False)
class Demo:
"""
An attrs class
"""
#: An argument
arg1: str = attr.ib()
#: Another argument
... | 13.211538 | 50 | 0.618632 |
7b9ea17e33a514784fa179ea65e1d72f191dd7e2 | 15,635 | py | Python | Sampler_factory.py | afu1/AutoDot | d5263da76209629b98822dd412fa09d67fe8c38e | [
"MIT"
] | null | null | null | Sampler_factory.py | afu1/AutoDot | d5263da76209629b98822dd412fa09d67fe8c38e | [
"MIT"
] | null | null | null | Sampler_factory.py | afu1/AutoDot | d5263da76209629b98822dd412fa09d67fe8c38e | [
"MIT"
] | null | null | null | import time
import multiprocessing
from pathlib import Path
from main_utils.dict_util import Tuning_dict
from main_utils.utils import Timer
import numpy as np
from Sampling.gp import util
from Sampling.test_common import Tester
from Sampling.BO_common import random_hypersphere
from Sampling.gp.GP_models import GPC_hei... | 38.321078 | 222 | 0.64394 |
19de75f590e792a3692345021b010e030e5cae5c | 2,155 | py | Python | plot.py | Jrebort/MAESTRO | fff510505b40ba10bcc389a971c119aaefff51f1 | [
"MIT"
] | 2 | 2020-11-09T12:13:07.000Z | 2020-11-09T12:13:09.000Z | plot.py | Jrebort/MAESTRO | fff510505b40ba10bcc389a971c119aaefff51f1 | [
"MIT"
] | null | null | null | plot.py | Jrebort/MAESTRO | fff510505b40ba10bcc389a971c119aaefff51f1 | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
# -*- coding: UTF-8 -*-
import matplotlib.pyplot as plt
import math
import os
import numpy as np
def pre_result_data():
i = 0
lists=["a","b","c","d","e"] #abcde corresponds to The number of temporal iterations,
result = list() #The number of spatial foldings,The number of tota... | 22.216495 | 121 | 0.634339 |
c8c92b4eff0a5081c0ce0d93e44ef4644e4ffd78 | 6,736 | py | Python | release/stubs.min/Autodesk/Revit/DB/__init___parts/WorksharingDisplaySettings.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/__init___parts/WorksharingDisplaySettings.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/__init___parts/WorksharingDisplaySettings.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class WorksharingDisplaySettings(Element, IDisposable):
"""
WorksharingDisplaySettings controls how elements will appear when they are
displayed in any of the worksharing display modes.
"""
def CanUserHaveOverrides(self, username):
"""
CanUserHaveOverrides(self: WorksharingDisplaySett... | 27.16129 | 221 | 0.700564 |
dd044c76cbe038871456d9c886f7b1914d3e4dd8 | 3,746 | py | Python | src/main/python/systemds/operator/algorithm/builtin/gridSearch.py | Baunsgaard/systemml | cc8eb951358320a984ea6798d3d252b4eed5c80c | [
"Apache-2.0"
] | 2 | 2020-04-16T22:41:45.000Z | 2020-04-16T22:42:46.000Z | src/main/python/systemds/operator/algorithm/builtin/gridSearch.py | Baunsgaard/systemml | cc8eb951358320a984ea6798d3d252b4eed5c80c | [
"Apache-2.0"
] | null | null | null | src/main/python/systemds/operator/algorithm/builtin/gridSearch.py | Baunsgaard/systemml | cc8eb951358320a984ea6798d3d252b4eed5c80c | [
"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 unde... | 45.682927 | 116 | 0.692739 |
a92beaaf5344a98346f27bd94e51dd9ce6a6b0ac | 8,923 | py | Python | qezposelibrary.py | bhsingleton/ezposelibrary | 3b3e9ca8071df052e1f53760aea2354325efd0be | [
"MIT"
] | null | null | null | qezposelibrary.py | bhsingleton/ezposelibrary | 3b3e9ca8071df052e1f53760aea2354325efd0be | [
"MIT"
] | null | null | null | qezposelibrary.py | bhsingleton/ezposelibrary | 3b3e9ca8071df052e1f53760aea2354325efd0be | [
"MIT"
] | null | null | null | import os
import time
import subprocess
import webbrowser
from PySide2 import QtCore, QtWidgets, QtGui
from win32 import win32security
from dcc import fnscene
from dcc.ui import quicwindow, qrollout
from dcc.ui.models import qfileitemmodel, qfileitemfiltermodel
import logging
logging.basicConfig()
log = logging.getLo... | 26.244118 | 144 | 0.632299 |
e0b1b3b04b6cd135aee0c063d4b21768ec57c1cb | 1,325 | py | Python | setup.py | luke-saunders/neat-python | 847cdcc8cf82969c389a94a890b5eadc5f876b7e | [
"BSD-3-Clause"
] | null | null | null | setup.py | luke-saunders/neat-python | 847cdcc8cf82969c389a94a890b5eadc5f876b7e | [
"BSD-3-Clause"
] | 4 | 2021-08-29T01:19:34.000Z | 2021-08-29T02:21:55.000Z | setup.py | luke-saunders/neat-python | 847cdcc8cf82969c389a94a890b5eadc5f876b7e | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
setup(
name='neat-python',
version='0.92.2',
author='cesar.gomes, mirrorballu2',
author_email='nobody@nowhere.com',
maintainer='CodeReclaimers, LLC',
maintainer_email='alan@codereclaimers.com',
url='https://github.com/CodeReclaimers/neat-python',
license="BS... | 41.40625 | 107 | 0.639245 |
63f27ec41b5dbafc52ed869fd8aa9f48583efaa6 | 843 | py | Python | mooringlicensing/migrations/0086_auto_20210416_1025.py | GraemeMuller/mooringlicensing | 2b2594189fb88f4add3fbc979a60a05397aaa491 | [
"Apache-2.0"
] | null | null | null | mooringlicensing/migrations/0086_auto_20210416_1025.py | GraemeMuller/mooringlicensing | 2b2594189fb88f4add3fbc979a60a05397aaa491 | [
"Apache-2.0"
] | 2 | 2021-03-05T06:48:11.000Z | 2021-03-26T08:14:17.000Z | mooringlicensing/migrations/0086_auto_20210416_1025.py | GraemeMuller/mooringlicensing | 2b2594189fb88f4add3fbc979a60a05397aaa491 | [
"Apache-2.0"
] | 15 | 2021-03-02T01:40:12.000Z | 2022-02-15T08:26:09.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-04-16 02:25
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mooringlicensing', '0085_auto_20210415_1632'),
]
... | 31.222222 | 143 | 0.661922 |
1dd1322ece7f06dc0abbdce85e5c21fb7ce7c60c | 10,784 | py | Python | dtLib/unquant/msd3.py | Digital-Twin-Operational-Platform/Cristallo | 20e21f6ae0f0f99002a229c8c966fd72020698c3 | [
"BSD-3-Clause"
] | 6 | 2021-07-14T08:43:20.000Z | 2022-02-02T19:40:26.000Z | dtLib/unquant/msd3.py | Digital-Twin-Operational-Platform/Cristallo | 20e21f6ae0f0f99002a229c8c966fd72020698c3 | [
"BSD-3-Clause"
] | null | null | null | dtLib/unquant/msd3.py | Digital-Twin-Operational-Platform/Cristallo | 20e21f6ae0f0f99002a229c8c966fd72020698c3 | [
"BSD-3-Clause"
] | 2 | 2021-07-05T08:08:43.000Z | 2022-03-28T09:46:02.000Z | '''
`dtLib/msd3.py`
:Author:
Marco De Angelis
:Organisation:
University of Liverpool
:Copyright:
BSD Licence
This single python file ``msd3.py`` is the scientific code for the uncertainty page.
This module is intended to be self-contained, thus it is orthogonal to any other module in this softwar... | 33.805643 | 144 | 0.621476 |
09553fd4267fa40f85aa75b0c1a5758a191549df | 627 | py | Python | manage.py | esiebomaj/skillNG | f0133615a7b397205d988b3fc4352d099cc5f166 | [
"MIT"
] | null | null | null | manage.py | esiebomaj/skillNG | f0133615a7b397205d988b3fc4352d099cc5f166 | [
"MIT"
] | 19 | 2020-07-29T21:36:11.000Z | 2022-03-12T00:46:40.000Z | manage.py | esiebomaj/skillNG | f0133615a7b397205d988b3fc4352d099cc5f166 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'skillng.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Import... | 28.5 | 73 | 0.682616 |
d01bf662f92c859c5c1cdf923cd828a60a26afde | 7,418 | py | Python | code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/feature_tests/copy_selected_query_results_feature_test.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | null | null | null | code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/feature_tests/copy_selected_query_results_feature_test.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | 10 | 2020-06-05T19:42:26.000Z | 2022-03-11T23:38:35.000Z | code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/feature_tests/copy_selected_query_results_feature_test.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | null | null | null | ##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
import pyperclip
... | 42.147727 | 116 | 0.615395 |
cea178158dd9a6204c703c45c4cd145b59b246f8 | 101 | py | Python | pybamm/models/submodels/interface/lithium_plating/__init__.py | manjunathnilugal/PyBaMM | 65d5cba534b4f163670e753714964aaa75d6a2d2 | [
"BSD-3-Clause"
] | 330 | 2019-04-17T11:36:57.000Z | 2022-03-28T16:49:55.000Z | pybamm/models/submodels/interface/lithium_plating/__init__.py | manjunathnilugal/PyBaMM | 65d5cba534b4f163670e753714964aaa75d6a2d2 | [
"BSD-3-Clause"
] | 1,530 | 2019-03-26T18:13:03.000Z | 2022-03-31T16:12:53.000Z | pybamm/models/submodels/interface/lithium_plating/__init__.py | manjunathnilugal/PyBaMM | 65d5cba534b4f163670e753714964aaa75d6a2d2 | [
"BSD-3-Clause"
] | 178 | 2019-03-27T13:48:04.000Z | 2022-03-31T09:30:11.000Z | from .base_plating import BasePlating
from .no_plating import NoPlating
from .plating import Plating
| 25.25 | 37 | 0.851485 |
071a9b2edd05b54b99b24ba3a2ca088af937319b | 825 | py | Python | assignments/Lesson_3/unique_words.py | HawksSpawn/introduction-to-python-programming | 5b318b0970d7d2ed30fe4e69360d25574cc83561 | [
"MIT"
] | null | null | null | assignments/Lesson_3/unique_words.py | HawksSpawn/introduction-to-python-programming | 5b318b0970d7d2ed30fe4e69360d25574cc83561 | [
"MIT"
] | null | null | null | assignments/Lesson_3/unique_words.py | HawksSpawn/introduction-to-python-programming | 5b318b0970d7d2ed30fe4e69360d25574cc83561 | [
"MIT"
] | null | null | null | verse = ("if you can keep your head when all about you are losing theirs and blaming it on you\n"
"if you can trust yourself when all men doubt you\n"
"but make allowance for their doubting too\n"
"if you can wait and not be tired by waiting\n"
"or being lied about\n... | 33 | 100 | 0.619394 |
39df93730d06dce1e4afd9fa72f05f8353108b77 | 8,812 | py | Python | venv/lib/python3.7/site-packages/torch/quantization/quantize_jit.py | GOOGLE-M/SGC | 78ad8d02b80808302e38559e2d0f430f66a809bd | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/torch/quantization/quantize_jit.py | GOOGLE-M/SGC | 78ad8d02b80808302e38559e2d0f430f66a809bd | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/torch/quantization/quantize_jit.py | GOOGLE-M/SGC | 78ad8d02b80808302e38559e2d0f430f66a809bd | [
"MIT"
] | null | null | null |
import torch
from .qconfig import QConfig
from .quant_type import QuantType
from torch.jit._recursive import wrap_cpp_module
def _check_is_script_module(model):
if not isinstance(model, torch.jit.ScriptModule):
raise ValueError('input must be a script module, got: ' + str(type(model)))
def _check_forward... | 41.961905 | 124 | 0.707444 |
2ddcf5338c9ccb6b855c0ff7bf1974064c071360 | 1,220 | py | Python | ui/mm_account_type_widget.py | gnyiri/money-monkey-py | 9cb31f605d5368de584d7a7660fa0cd9f64ef497 | [
"BSD-2-Clause"
] | null | null | null | ui/mm_account_type_widget.py | gnyiri/money-monkey-py | 9cb31f605d5368de584d7a7660fa0cd9f64ef497 | [
"BSD-2-Clause"
] | null | null | null | ui/mm_account_type_widget.py | gnyiri/money-monkey-py | 9cb31f605d5368de584d7a7660fa0cd9f64ef497 | [
"BSD-2-Clause"
] | null | null | null | from PyQt5.Qt import QWidget, QTableView, QVBoxLayout, QHBoxLayout, QPushButton, QAbstractItemView
from model.mm_account_type_model import MMAccountTableModel
from .mm_dialogs import MMAddNewAccountTypeDialog
from util.mm_base import MMBase
class MMAccountTypeWidget(QWidget, MMBase):
def __init__(self, parent):
... | 36.969697 | 98 | 0.717213 |
374802a5f7c4247d4ddbcd025a04dc5ef4ee4738 | 1,113 | py | Python | libs/openweathermap/errors.py | crazygmr101/Almanac | 2309325f21ef06f96c700740162875b2f085678a | [
"MIT"
] | null | null | null | libs/openweathermap/errors.py | crazygmr101/Almanac | 2309325f21ef06f96c700740162875b2f085678a | [
"MIT"
] | null | null | null | libs/openweathermap/errors.py | crazygmr101/Almanac | 2309325f21ef06f96c700740162875b2f085678a | [
"MIT"
] | null | null | null | """
Copyright 2021 crazygmr101
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, subl... | 53 | 119 | 0.795148 |
3cc97e9649c7e4d6b363302aea2bd65eedcc1ffe | 2,957 | py | Python | tensor2tensor/data_generators/translate_enru.py | ekuznetsov139/tensor2tensor | 066f5bc4f58470e8f2c9475b5cddc6156f98b778 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/data_generators/translate_enru.py | ekuznetsov139/tensor2tensor | 066f5bc4f58470e8f2c9475b5cddc6156f98b778 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/data_generators/translate_enru.py | ekuznetsov139/tensor2tensor | 066f5bc4f58470e8f2c9475b5cddc6156f98b778 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The Tensor2Tensor 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... | 29.868687 | 74 | 0.782212 |
ff00ad54de5adb7db2bd73f1fc68624b7d0d62f2 | 13,375 | py | Python | PySONIC/neurons/cortical.py | scbao/pysonic | b4ccaf49772d55f632a0995c411d1cc042d71903 | [
"MIT"
] | null | null | null | PySONIC/neurons/cortical.py | scbao/pysonic | b4ccaf49772d55f632a0995c411d1cc042d71903 | [
"MIT"
] | null | null | null | PySONIC/neurons/cortical.py | scbao/pysonic | b4ccaf49772d55f632a0995c411d1cc042d71903 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: Theo Lemaire
# @Email: theo.lemaire@epfl.ch
# @Date: 2017-07-31 15:19:51
# @Last Modified by: Theo Lemaire
# @Last Modified time: 2020-07-21 16:16:57
import numpy as np
from ..core import PointNeuron, addSonicFeatures
class Cortical(PointNeuron):
''' Generic cortical neuron... | 33.271144 | 95 | 0.506467 |
1926c5d6861cc44de15ef0150b808cf941d3e33f | 5,642 | py | Python | tech_project/lib/python2.7/site-packages/djangocms_file/models.py | priyamshah112/Project-Descripton-Blog | 8e01016c6be79776c4f5ca75563fa3daa839e39e | [
"MIT"
] | null | null | null | tech_project/lib/python2.7/site-packages/djangocms_file/models.py | priyamshah112/Project-Descripton-Blog | 8e01016c6be79776c4f5ca75563fa3daa839e39e | [
"MIT"
] | null | null | null | tech_project/lib/python2.7/site-packages/djangocms_file/models.py | priyamshah112/Project-Descripton-Blog | 8e01016c6be79776c4f5ca75563fa3daa839e39e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Enables the user to add a "File" plugin that displays a file wrapped by
an <anchor> tag.
"""
from cms.models import CMSPlugin
from django.conf import settings
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugett... | 28.069652 | 77 | 0.633995 |
78fe99710bdd3f7b63e9541a3d1dac61e0908107 | 11,898 | py | Python | corehq/apps/sofabed/models.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | 1 | 2017-02-10T03:14:51.000Z | 2017-02-10T03:14:51.000Z | corehq/apps/sofabed/models.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/sofabed/models.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from corehq.apps.sofabed.exceptions import (
InvalidFormUpdateException,
InvalidMetaBlockException,
InvalidCaseUpdateException
)
CASE_NAME_LEN = 512
MISSING_APP_ID = '_MISSING_APP_ID'
class BaseDataIndex(models.Model):
@classmethod
def get_instance_id(cls, item):
... | 36.722222 | 105 | 0.638679 |
fb5092004cd5c7c9bb041f8f2304a278f48a7421 | 13,008 | py | Python | intersight/model/cloud_instance_type.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/cloud_instance_type.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/cloud_instance_type.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 48.537313 | 1,678 | 0.623693 |
45c6f4a8b11e3f4044627e3b646b48f9c0e323dd | 1,353 | py | Python | caffeinecode/urls.py | Developer-R-7/CaffeineCode | 1a489ef0da669dd6f7e5b1d80a3c6046e2e7b2fe | [
"MIT"
] | 1 | 2022-02-03T18:42:52.000Z | 2022-02-03T18:42:52.000Z | caffeinecode/urls.py | Developer-R-7/CaffeineCode | 1a489ef0da669dd6f7e5b1d80a3c6046e2e7b2fe | [
"MIT"
] | null | null | null | caffeinecode/urls.py | Developer-R-7/CaffeineCode | 1a489ef0da669dd6f7e5b1d80a3c6046e2e7b2fe | [
"MIT"
] | null | null | null | """website URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 36.567568 | 85 | 0.708056 |
5313e336e81dddb928d012a86c4583f38f366b5f | 5,730 | py | Python | compiler/luci-value-test/luci_eval_verifier_ref.py | glistening/ONE-1 | cadf3a4da4f4340081862abbd3900af7c4b0e22d | [
"Apache-2.0"
] | null | null | null | compiler/luci-value-test/luci_eval_verifier_ref.py | glistening/ONE-1 | cadf3a4da4f4340081862abbd3900af7c4b0e22d | [
"Apache-2.0"
] | null | null | null | compiler/luci-value-test/luci_eval_verifier_ref.py | glistening/ONE-1 | cadf3a4da4f4340081862abbd3900af7c4b0e22d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import numpy as np
import subprocess
import argparse
import traceback
import os
#
# This script compares the execution result of luci-interpreter with that from ref_model path
#
# Basic usage:
# luci_eval_verifier_ref.py --driver build/compiler/luci-eval-driver/luci_eval_driver
# --r... | 37.697368 | 93 | 0.645375 |
a2ae64312e6b108670b4ce13d45c38253ca660e3 | 3,452 | py | Python | freighter/doltools.py | kai13xd/Freighter | 1a12b5a6a845099b4c6ea911f7250b8104b5ebc5 | [
"MIT"
] | 1 | 2021-10-17T05:23:52.000Z | 2021-10-17T05:23:52.000Z | freighter/doltools.py | kai13xd/Freighter | 1a12b5a6a845099b4c6ea911f7250b8104b5ebc5 | [
"MIT"
] | null | null | null | freighter/doltools.py | kai13xd/Freighter | 1a12b5a6a845099b4c6ea911f7250b8104b5ebc5 | [
"MIT"
] | null | null | null | import struct
def mask_field(val, bits, signed):
if signed == True:
# Lowest negative value
if val < -1 * 2**(bits-1):
raise RuntimeError("{0} too large for {1}-bit signed field".format(val, bits))
# Highest positive value
if val > 2**(bits-1) - 1:
raise Runt... | 30.017391 | 92 | 0.621669 |
be949693c16a67d91f50529898d7be71fd6df94f | 3,378 | py | Python | Scientific Computing Projects (Code Parts)/2/main.py | 4ntongC/Scientific-Computing-MATH-GA-2043 | a0042d5f0a967376777a6e3c34113711f2fd6a30 | [
"MIT"
] | null | null | null | Scientific Computing Projects (Code Parts)/2/main.py | 4ntongC/Scientific-Computing-MATH-GA-2043 | a0042d5f0a967376777a6e3c34113711f2fd6a30 | [
"MIT"
] | null | null | null | Scientific Computing Projects (Code Parts)/2/main.py | 4ntongC/Scientific-Computing-MATH-GA-2043 | a0042d5f0a967376777a6e3c34113711f2fd6a30 | [
"MIT"
] | null | null | null | import numpy as np
from Numeric_Integration import m
from Numeric_Integration import RR1f
from Numeric_Integration import MR2f
from Numeric_Integration import RR1a
from Numeric_Integration import SR4a
import matplotlib.pyplot as plt
def linear(x):
return x
def RR1f_MR2f_Test():
accu = 1
sin... | 24.302158 | 78 | 0.544701 |
164acd247ec4b822df1a8a4c4bb5ed4985f990a1 | 1,301 | py | Python | cli/gevjon_cli.py | louielong/gevjon | 0a02e87f5607919d49ebe2ebfbff9507de1f7cfb | [
"Apache-2.0"
] | null | null | null | cli/gevjon_cli.py | louielong/gevjon | 0a02e87f5607919d49ebe2ebfbff9507de1f7cfb | [
"Apache-2.0"
] | 1 | 2021-03-31T19:27:38.000Z | 2021-03-31T19:27:38.000Z | cli/gevjon_cli.py | louielong/gevjon | 0a02e87f5607919d49ebe2ebfbff9507de1f7cfb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
##############################################################################
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.... | 28.911111 | 78 | 0.604151 |
e02faadd4add4b9a2c147b6f786b3b05ed0a41da | 856 | py | Python | quaker/cmd/server.py | pabelanger/quaker | a66596b9d5fb9af3c63361f8a4aea3dc7a4fb4b2 | [
"Apache-2.0"
] | null | null | null | quaker/cmd/server.py | pabelanger/quaker | a66596b9d5fb9af3c63361f8a4aea3dc7a4fb4b2 | [
"Apache-2.0"
] | null | null | null | quaker/cmd/server.py | pabelanger/quaker | a66596b9d5fb9af3c63361f8a4aea3dc7a4fb4b2 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 30.571429 | 75 | 0.757009 |
5183269142214d79eaf2e87bc6e2ac28ac9eb2fe | 1,937 | py | Python | src/volume.py | XXXBrainTireFire/-Intraday-Patterns-in-Trading-Volume-algorithm | 10f86020d7a0007c5f47f3a3d26b41961592c6e8 | [
"bzip2-1.0.6"
] | 6 | 2020-03-09T14:06:03.000Z | 2022-02-24T03:44:56.000Z | src/volume.py | XXXBrainTireFire/-Intraday-Patterns-in-Trading-Volume-algorithm | 10f86020d7a0007c5f47f3a3d26b41961592c6e8 | [
"bzip2-1.0.6"
] | 4 | 2020-03-24T18:16:19.000Z | 2021-08-23T20:38:42.000Z | src/volume.py | XXXBrainTireFire/-Intraday-Patterns-in-Trading-Volume-algorithm | 10f86020d7a0007c5f47f3a3d26b41961592c6e8 | [
"bzip2-1.0.6"
] | 1 | 2020-07-04T07:06:56.000Z | 2020-07-04T07:06:56.000Z | import pandas as pd
import settings
headers = ["company", "zero1", "date", "hour", "value1", "value2", "value3", "value4", "volume", "zero"]
data = pd.read_csv('assets/PKOBP/PKOBP.prn', sep=",", names=headers)
data.pop("company")
data.pop("zero1")
data.pop("value1")
data.pop("value2")
data.pop("value3")
data... | 25.486842 | 105 | 0.576149 |
96add825ff21be936c2d0b6791475a8c241c7a8f | 2,926 | py | Python | rst2pdf/opt_imports.py | EvanDotPro/rst2pdf | 6e2e2e91897083d11aebacdc908be8b89971fec7 | [
"MIT"
] | null | null | null | rst2pdf/opt_imports.py | EvanDotPro/rst2pdf | 6e2e2e91897083d11aebacdc908be8b89971fec7 | [
"MIT"
] | null | null | null | rst2pdf/opt_imports.py | EvanDotPro/rst2pdf | 6e2e2e91897083d11aebacdc908be8b89971fec7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#$URL$
#$Date$
#$Revision$
# See LICENSE.txt for licensing terms
'''
opt_imports.py contains logic for handling optional imports.
'''
import os
import sys
from .log import log
PyHyphenHyphenator = None
DCWHyphenator = None
try:
import wordaxe
from wordaxe import version as wordaxe... | 23.03937 | 72 | 0.655844 |
05b72534dd0bd3a9991b13842f8f8655b4a2f31d | 3,387 | py | Python | python/fate_flow/utils/log_sharing_utils.py | MiKKiYang/FATE-Flow | 0b846c943a57f3d089885db22b2e08ef78fb73ed | [
"Apache-2.0"
] | null | null | null | python/fate_flow/utils/log_sharing_utils.py | MiKKiYang/FATE-Flow | 0b846c943a57f3d089885db22b2e08ef78fb73ed | [
"Apache-2.0"
] | null | null | null | python/fate_flow/utils/log_sharing_utils.py | MiKKiYang/FATE-Flow | 0b846c943a57f3d089885db22b2e08ef78fb73ed | [
"Apache-2.0"
] | null | null | null | import os
import re
from fate_flow.utils.base_utils import get_fate_flow_directory
JOB = ["jobSchedule", "jobScheduleError"]
PARTY = ["partyError", "partyWarning", "partyInfo", "partyDebug"]
COMPONENT = ["componentInfo"]
LOGMapping = {
"jobSchedule": "fate_flow_schedule.log",
"jobScheduleError": "fate_flow_sc... | 38.05618 | 113 | 0.602893 |
1ed9e530363fb0df6faa9f833a2f9a4bf75fd1a4 | 543 | py | Python | manage.py | mrajeswarasai/CollegeMart | 34b4087e84fd753a4796ee1cdbd53d22f637f011 | [
"Apache-2.0"
] | null | null | null | manage.py | mrajeswarasai/CollegeMart | 34b4087e84fd753a4796ee1cdbd53d22f637f011 | [
"Apache-2.0"
] | 3 | 2021-06-08T22:29:18.000Z | 2022-03-12T00:48:30.000Z | manage.py | mrajeswarasai/CollegeMart | 34b4087e84fd753a4796ee1cdbd53d22f637f011 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'collegemart.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. ... | 33.9375 | 75 | 0.688766 |
8ec3fd37798a8c45cf0e8af7b9b515a72332ff34 | 636 | py | Python | manage.py | rileyarnie/instagramm | 8c05e822aef42fdf2345e5206938dbc6542e278d | [
"MIT"
] | null | null | null | manage.py | rileyarnie/instagramm | 8c05e822aef42fdf2345e5206938dbc6542e278d | [
"MIT"
] | 8 | 2021-03-19T02:22:46.000Z | 2022-03-12T00:01:42.000Z | manage.py | rileyarnie/instagramm | 8c05e822aef42fdf2345e5206938dbc6542e278d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_instagram.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
rai... | 28.909091 | 80 | 0.687107 |
8da1aba5bc1606c02978dbdb3034194316c82bad | 2,498 | py | Python | ifwechat/handlers/wechat.py | zhu327/ifwechat | d10e97360cbe428fca8851597813e6f793f90cf3 | [
"MIT"
] | 102 | 2015-10-28T07:50:11.000Z | 2021-06-24T03:15:02.000Z | ifwechat/handlers/wechat.py | zhu327/ifwechat | d10e97360cbe428fca8851597813e6f793f90cf3 | [
"MIT"
] | 1 | 2016-12-07T02:45:26.000Z | 2016-12-07T02:57:03.000Z | ifwechat/handlers/wechat.py | zhu327/ifwechat | d10e97360cbe428fca8851597813e6f793f90cf3 | [
"MIT"
] | 13 | 2015-09-30T14:09:14.000Z | 2020-03-06T08:17:30.000Z | # coding: utf-8
import re, logging, socket
import werobot
from werobot.utils import to_binary
from ..utils import IfMaker, check_bind, add_event_task
robot = werobot.WeRoBot(enable_session=False)
@robot.subscribe
def subscribe(message):
logging.info('user %s subscribe.' % (message.source,))
return (u'欢迎使用I... | 27.450549 | 89 | 0.664932 |
19773710ed94487722aa9d8e80a49cc3f9a94b67 | 2,266 | py | Python | tests/analysis/rofl_test.py | jifengting1/fastpliFork | 1ef7e2d268e03e21ded9390fc005b9fff2e0a3c1 | [
"MIT"
] | null | null | null | tests/analysis/rofl_test.py | jifengting1/fastpliFork | 1ef7e2d268e03e21ded9390fc005b9fff2e0a3c1 | [
"MIT"
] | null | null | null | tests/analysis/rofl_test.py | jifengting1/fastpliFork | 1ef7e2d268e03e21ded9390fc005b9fff2e0a3c1 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
import fastpli.simulation
import fastpli.analysis
import fastpli.tools
import fastpli.objects
from fastpli.analysis._ROFL_with_jacobi import _calc_Int_single_fiber_fitted
# TODO: test rofl, not simpli.apply_rofl
class MainTest(unittest.TestCase):
def test_simple_rofl(self):... | 33.820896 | 77 | 0.591792 |
544fd8c8dbd9de8bd9c5569fdfdbdfb948cd6795 | 814 | py | Python | RFEM/TypesForNodes/nodalMeshRefinement.py | DavidNaizheZhou/RFEM_Python_Client | a5f7790b67de3423907ce10c0aa513c0a1aca47b | [
"MIT"
] | 16 | 2021-10-13T21:00:11.000Z | 2022-03-21T11:12:09.000Z | RFEM/TypesForNodes/nodalMeshRefinement.py | DavidNaizheZhou/RFEM_Python_Client | a5f7790b67de3423907ce10c0aa513c0a1aca47b | [
"MIT"
] | 49 | 2021-10-19T13:18:51.000Z | 2022-03-30T08:20:17.000Z | RFEM/TypesForNodes/nodalMeshRefinement.py | DavidNaizheZhou/RFEM_Python_Client | a5f7790b67de3423907ce10c0aa513c0a1aca47b | [
"MIT"
] | 7 | 2021-10-13T06:06:24.000Z | 2022-03-29T17:48:39.000Z | from RFEM.initModel import Model, clearAtributes
class NodalMeshRefinement():
def __init__(self,
no: int = 1,
comment: str = '',
params: dict = {}):
# Client model | Nodal Mesh Refinement
clientObject = Model.clientModel.factory.create('ns0:nodal_... | 30.148148 | 84 | 0.627764 |
380a5b09ce2a94b5281bd26b84675631ea72a4a2 | 16,718 | py | Python | storm_control/sc_hardware/utility/af_lock_c.py | BoettigerLab/nanoscope-control | 1cfb6d4464e887b0f8c8f3e5e0cadff00581d73b | [
"MIT"
] | 47 | 2015-02-11T16:05:54.000Z | 2022-03-26T14:13:12.000Z | storm_control/sc_hardware/utility/af_lock_c.py | BoettigerLab/nanoscope-control | 1cfb6d4464e887b0f8c8f3e5e0cadff00581d73b | [
"MIT"
] | 110 | 2015-01-30T03:53:41.000Z | 2021-11-03T15:58:44.000Z | storm_control/sc_hardware/utility/af_lock_c.py | BoettigerLab/nanoscope-control | 1cfb6d4464e887b0f8c8f3e5e0cadff00581d73b | [
"MIT"
] | 61 | 2015-01-09T18:31:27.000Z | 2021-12-21T13:07:51.000Z | #!/usr/bin/env python
"""
Fitting for offset using the autofocus lock.
Hazen 09/19
"""
import ctypes
import numpy
from numpy.ctypeslib import ndpointer
import scipy
import scipy.misc
import scipy.optimize
import storm_control.c_libraries.loadclib as loadclib
# Load C library.
af = loadclib.loadCLibrary("af_lock")
... | 34.541322 | 108 | 0.568609 |
f4c67df4c9973ececd8c98d9e8834373fbd289f8 | 2,754 | py | Python | changeTclArgument.py | george530184/WeriwaveAutoTest | 21eb9537dc639dac3be335e7196ecdfaf4f04407 | [
"TCL"
] | null | null | null | changeTclArgument.py | george530184/WeriwaveAutoTest | 21eb9537dc639dac3be335e7196ecdfaf4f04407 | [
"TCL"
] | null | null | null | changeTclArgument.py | george530184/WeriwaveAutoTest | 21eb9537dc639dac3be335e7196ecdfaf4f04407 | [
"TCL"
] | null | null | null | '''
init system ,write channel,version,ssid,password,bssid ,apmode to tcl file
'''
import re
FILE = 'C:\Program Files (x86)\IxVeriWave\WaveAutomate\\automation_6.9.1-113_2016.10.13.05-admin_windows\\automation\conf\wf802\\'
def changeTclArgument(dirction, file, channel, version, apmode, ssid, pwd, dirs):
File = FIL... | 34.425 | 131 | 0.693174 |
87aba3b0b7530cb04b868ba04c35b4359884f030 | 20,069 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/operations/_routes_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/operations/_routes_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/operations/_routes_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.221176 | 210 | 0.654592 |
d043e32aba462162a60aa49884b596779a717f23 | 18,383 | py | Python | qa/rpc-tests/bip68-sequence.py | alphapayofficial/alphapay | 471c411ad03b20b49db4f80874a3eac21e1ca91a | [
"MIT"
] | null | null | null | qa/rpc-tests/bip68-sequence.py | alphapayofficial/alphapay | 471c411ad03b20b49db4f80874a3eac21e1ca91a | [
"MIT"
] | null | null | null | qa/rpc-tests/bip68-sequence.py | alphapayofficial/alphapay | 471c411ad03b20b49db4f80874a3eac21e1ca91a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Alphapay Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test BIP68 implementation
#
from test_framework.test_framework import BitcoinTestFramework
from tes... | 42.850816 | 119 | 0.625143 |
0f6dd8cef103250657ceb46d51247969545c806c | 6,486 | py | Python | viper/exts/discord.py | Zomatree/viper-lang | 93ec106571a580d1bcf65af2c10f76e5c661cc9a | [
"MIT"
] | null | null | null | viper/exts/discord.py | Zomatree/viper-lang | 93ec106571a580d1bcf65af2c10f76e5c661cc9a | [
"MIT"
] | null | null | null | viper/exts/discord.py | Zomatree/viper-lang | 93ec106571a580d1bcf65af2c10f76e5c661cc9a | [
"MIT"
] | null | null | null | """
A helper file to aid with discord.py scripting. Using this requires you to have discord.py installed.
These Classes will not allow users to preform any major actions on your guilds, the most major being banning members.
Use these instead of passing raw discord.py models to your users, as these could be used to obta... | 37.062857 | 120 | 0.658341 |
ca3ea756d7fe10f4846c083b46884057594ab7c4 | 1,259 | py | Python | modules/tf_example_module/plugins/example_export.py | frimik/tf_module_plugin_example | a5ea9501f469686829c9bcb35be44cc431034122 | [
"MIT"
] | null | null | null | modules/tf_example_module/plugins/example_export.py | frimik/tf_module_plugin_example | a5ea9501f469686829c9bcb35be44cc431034122 | [
"MIT"
] | null | null | null | modules/tf_example_module/plugins/example_export.py | frimik/tf_module_plugin_example | a5ea9501f469686829c9bcb35be44cc431034122 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
from yapsy.IPlugin import IPlugin
import socket
import json
import os
import logging
logger = logging.getLogger("IExampleExporterPlugin")
varsFile = os.path.abspath(
os.path.join(
os.path.dirname(
__file__),
"..",
"variables.tf.json"
)
)
class IExa... | 24.211538 | 76 | 0.574265 |
0e247be7ca468f5a30bc5561ee204f0726a6790f | 3,761 | py | Python | Some-Examples-of-Simple-Python-Script-master/Encryption/un_translate.py | Aarif1430/Python-Awesome-notes-and-exercises-list | c8ad7f90ebd973025f37d4e79c2f1229a8a2915c | [
"MIT"
] | 2 | 2021-01-13T21:20:57.000Z | 2021-08-18T17:53:53.000Z | Some-Examples-of-Simple-Python-Script-master/Encryption/un_translate.py | Aarif1430/Python-Awesome-notes-and-exercises-list | c8ad7f90ebd973025f37d4e79c2f1229a8a2915c | [
"MIT"
] | null | null | null | Some-Examples-of-Simple-Python-Script-master/Encryption/un_translate.py | Aarif1430/Python-Awesome-notes-and-exercises-list | c8ad7f90ebd973025f37d4e79c2f1229a8a2915c | [
"MIT"
] | 1 | 2020-11-05T09:56:55.000Z | 2020-11-05T09:56:55.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import string, sys
"""
Docs: https://python.web.id/blog/untranslate-tools-for-cryptography/
[1] Stack Problem:
>>> import string
>>> make_trans = string.maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
'CDEFGHIJKLMNOPQRSTUVWX... | 37.237624 | 109 | 0.552513 |
da2bb5dc9c9ef5b8a7b189085f487600202146aa | 91,869 | py | Python | python/pyspark/pandas/indexes/base.py | wangyeweikuer/spark | 731aa2cdf8a78835621fbf3de2d3492b27711d1a | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-11-18T05:24:48.000Z | 2021-11-18T05:24:48.000Z | python/pyspark/pandas/indexes/base.py | wangyeweikuer/spark | 731aa2cdf8a78835621fbf3de2d3492b27711d1a | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2018-06-14T11:15:27.000Z | 2019-01-27T12:11:23.000Z | python/pyspark/pandas/indexes/base.py | wangyeweikuer/spark | 731aa2cdf8a78835621fbf3de2d3492b27711d1a | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-09-19T22:04:32.000Z | 2021-09-19T22:04:32.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... | 33.273814 | 100 | 0.52958 |
9afe476371e9eb0eb928ca421cd54a8ea32d23fa | 11,211 | py | Python | sphinx/builders/qthelp.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 1 | 2021-06-17T13:38:42.000Z | 2021-06-17T13:38:42.000Z | sphinx/builders/qthelp.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | null | null | null | sphinx/builders/qthelp.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sphinx.builders.qthelp
~~~~~~~~~~~~~~~~~~~~~~
Build input files for the Qt collection generator.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import codecs
import os
import posixpath
import re
from os impo... | 38.262799 | 106 | 0.583088 |
8bc7b9712af2c58e29ee0a87c25cbfe34ba3056e | 53,440 | py | Python | databricks/koalas/window.py | varunsh-coder/koalas | 1cfc9ec76a1b023d89870688bf802cf58df537f1 | [
"Apache-2.0"
] | 3,211 | 2019-04-22T04:40:50.000Z | 2022-03-31T10:42:31.000Z | databricks/koalas/window.py | varunsh-coder/koalas | 1cfc9ec76a1b023d89870688bf802cf58df537f1 | [
"Apache-2.0"
] | 2,017 | 2019-04-21T23:37:12.000Z | 2022-03-24T03:48:51.000Z | databricks/koalas/window.py | varunsh-coder/koalas | 1cfc9ec76a1b023d89870688bf802cf58df537f1 | [
"Apache-2.0"
] | 375 | 2019-04-21T23:58:57.000Z | 2022-03-30T00:42:19.000Z | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 30.730305 | 100 | 0.525318 |
b20b311965187f24ce7d8c0ff300992e4ddb8fd1 | 3,781 | py | Python | tests/test_delete_order.py | tokarzmaciej/testing-simple-app-online-shop | 446d063585f50b96a57bf6e7c23d2042df9eecc0 | [
"MIT"
] | null | null | null | tests/test_delete_order.py | tokarzmaciej/testing-simple-app-online-shop | 446d063585f50b96a57bf6e7c23d2042df9eecc0 | [
"MIT"
] | null | null | null | tests/test_delete_order.py | tokarzmaciej/testing-simple-app-online-shop | 446d063585f50b96a57bf6e7c23d2042df9eecc0 | [
"MIT"
] | null | null | null | from unittest.mock import *
from unittest import TestCase, main
from assertpy import assert_that
from src.serviceOrders import Order
from src.dataOrders import OrdersData
from src.dataProductsOrders import OrdersProductsData
class testDeleteOrder(TestCase):
def setUp(self):
self.temp = Order()
sel... | 36.708738 | 92 | 0.708543 |
78df94b9ea8cb4c6e57bfbcc2702a2ee7e614f5e | 651 | py | Python | scratch/drmaa-test.py | lesteve/dask-drmaa | cb84ab3e496dac0fb9dc5cb0f850336c524714ed | [
"BSD-3-Clause"
] | 46 | 2016-10-17T16:06:42.000Z | 2019-10-16T21:01:30.000Z | scratch/drmaa-test.py | lesteve/dask-drmaa | cb84ab3e496dac0fb9dc5cb0f850336c524714ed | [
"BSD-3-Clause"
] | 84 | 2016-10-13T16:47:05.000Z | 2021-02-10T01:11:53.000Z | scratch/drmaa-test.py | lesteve/dask-drmaa | cb84ab3e496dac0fb9dc5cb0f850336c524714ed | [
"BSD-3-Clause"
] | 28 | 2016-10-14T16:23:24.000Z | 2021-02-08T21:31:52.000Z | import drmaa
import os
def main():
"""
Submit a job.
Note, need file called sleeper.sh in current directory.
"""
with drmaa.Session() as s:
print('Creating job template')
jt = s.createJobTemplate()
jt.remoteCommand = os.path.join('/dask-drmaa', 'scratch', 'sleeper.sh')
jt.arg... | 25.038462 | 78 | 0.602151 |
942e35188d00b12313b929a49185e72a860ee8ef | 12,208 | py | Python | scripts/plot_multiple_reacher.py | domingoesteban/robolearn | 0d20125425c352b80ef2eeed1c0b11ab6497b11a | [
"BSD-3-Clause"
] | 1 | 2020-01-13T09:44:22.000Z | 2020-01-13T09:44:22.000Z | scripts/plot_multiple_reacher.py | domingoesteban/robolearn | 0d20125425c352b80ef2eeed1c0b11ab6497b11a | [
"BSD-3-Clause"
] | null | null | null | scripts/plot_multiple_reacher.py | domingoesteban/robolearn | 0d20125425c352b80ef2eeed1c0b11ab6497b11a | [
"BSD-3-Clause"
] | 1 | 2021-12-22T00:41:20.000Z | 2021-12-22T00:41:20.000Z | import os
import argparse
import numpy as np
import matplotlib.pyplot as plt
from robolearn.utils.plots import plot_multiple_process_iu_returns
from robolearn.utils.plots import plot_process_iu_policies
from robolearn.utils.plots import plot_process_iu_values_errors
from robolearn.utils.plots import plot_process_genera... | 30.292804 | 102 | 0.598952 |
a2108f54e846107fa451ea0b610f51edd2e06d00 | 9,595 | py | Python | src/protobuf/python/google/protobuf/internal/descriptor_pool_test.py | SAN-CHAIN/sand | 1c51a7d1b215a7a2e1e06bd3b87a7e1da7239664 | [
"BSL-1.0"
] | 3 | 2016-08-18T03:47:37.000Z | 2021-03-29T02:46:22.000Z | background/push_util/google/protobuf/internal/descriptor_pool_test.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | 3 | 2015-10-04T06:51:19.000Z | 2016-03-17T16:36:44.000Z | background/push_util/google/protobuf/internal/descriptor_pool_test.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | 3 | 2017-06-29T02:41:16.000Z | 2021-08-28T07:42:24.000Z | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met... | 43.41629 | 81 | 0.745805 |
52602c00093f3c7c9b5e91d0a211d8cc4ea1219e | 4,027 | py | Python | powerdnsadmin/models/api_key.py | warf/PowerDNS-Admin | 3bf6e6e9f119d2af7f2faff46c41a2152b84d3ab | [
"MIT"
] | 1 | 2019-12-31T04:51:02.000Z | 2019-12-31T04:51:02.000Z | powerdnsadmin/models/api_key.py | warf/PowerDNS-Admin | 3bf6e6e9f119d2af7f2faff46c41a2152b84d3ab | [
"MIT"
] | 1 | 2021-03-11T06:55:41.000Z | 2021-03-11T06:55:41.000Z | powerdnsadmin/models/api_key.py | warf/PowerDNS-Admin | 3bf6e6e9f119d2af7f2faff46c41a2152b84d3ab | [
"MIT"
] | null | null | null | import random
import string
import bcrypt
from flask import current_app
from .base import db, domain_apikey
from ..models.role import Role
from ..models.domain import Domain
class ApiKey(db.Model):
__tablename__ = "apikey"
id = db.Column(db.Integer, primary_key=True)
key = db.Column(db.String(255), uniqu... | 35.017391 | 90 | 0.561708 |
142e0e41181a0dea440f09a69e47bb0a1c61aada | 9,800 | py | Python | tests/select_related/tests.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | 5 | 2019-02-15T16:47:50.000Z | 2021-12-26T18:52:23.000Z | tests/select_related/tests.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | null | null | null | tests/select_related/tests.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | 2 | 2021-08-09T02:29:09.000Z | 2021-08-20T03:30:11.000Z | from djmodels.core.exceptions import FieldError
from djmodels.test import SimpleTestCase, TestCase
from .models import (
Bookmark, Domain, Family, Genus, HybridSpecies, Kingdom, Klass, Order,
Phylum, Pizza, Species, TaggedItem,
)
class SelectRelatedTests(TestCase):
@classmethod
def create_tree(cls, ... | 43.555556 | 114 | 0.649796 |
16244a670ce8ce5211ae2040040296d3f1dafe79 | 5,470 | py | Python | tests/experiment/test_experiment.py | Neklaustares-tPtwP/torchflare | 7af6b01ef7c26f0277a041619081f6df4eb1e42c | [
"Apache-2.0"
] | 1 | 2021-09-14T08:38:05.000Z | 2021-09-14T08:38:05.000Z | tests/experiment/test_experiment.py | Neklaustares-tPtwP/torchflare | 7af6b01ef7c26f0277a041619081f6df4eb1e42c | [
"Apache-2.0"
] | null | null | null | tests/experiment/test_experiment.py | Neklaustares-tPtwP/torchflare | 7af6b01ef7c26f0277a041619081f6df4eb1e42c | [
"Apache-2.0"
] | 1 | 2021-08-06T19:24:43.000Z | 2021-08-06T19:24:43.000Z | # flake8: noqa
import torch
import torchflare.callbacks as cbs
import torchflare.metrics as metrics
from torchflare.experiments.experiment import Experiment
from torchflare.utils.seeder import seed_all
from torchflare.experiments.config import ModelConfig
from torchflare.experiments.core import State
import os
import p... | 32.366864 | 108 | 0.619013 |
03843a1cd711e7ac1c55a1b10f6fb7304d8cdbc9 | 2,956 | py | Python | SRSummer/scripts/update_installer_version.py | johannesmenzel/SRPlugins2 | 646eccdac808a39b22ad063b9a8fb92f8e6a9d55 | [
"MIT"
] | null | null | null | SRSummer/scripts/update_installer_version.py | johannesmenzel/SRPlugins2 | 646eccdac808a39b22ad063b9a8fb92f8e6a9d55 | [
"MIT"
] | null | null | null | SRSummer/scripts/update_installer_version.py | johannesmenzel/SRPlugins2 | 646eccdac808a39b22ad063b9a8fb92f8e6a9d55 | [
"MIT"
] | 1 | 2022-01-20T18:32:49.000Z | 2022-01-20T18:32:49.000Z | #!/usr/bin/python
# this script will update the versions in packages and innosetup installer files to match that in config.h
import plistlib, os, datetime, fileinput, glob, sys, string
scriptpath = os.path.dirname(os.path.realpath(__file__))
projectpath = os.path.abspath(os.path.join(scriptpath, os.pardir))
sys.path... | 33.213483 | 120 | 0.665765 |
cf654fa98e9be12bcacab9ebb19c0d974d67628a | 6,453 | py | Python | pyzmp/service.py | pyros-dev/pyzmp | fac0b719b25996ce94a80ca2118f3eba5779d53d | [
"BSD-3-Clause"
] | 2 | 2016-06-23T09:21:07.000Z | 2016-10-21T07:28:13.000Z | pyzmp/service.py | pyros-dev/pyzmp | fac0b719b25996ce94a80ca2118f3eba5779d53d | [
"BSD-3-Clause"
] | 56 | 2018-04-17T07:38:08.000Z | 2019-05-20T19:06:21.000Z | pyzmp/service.py | pyros-dev/pyzmp | fac0b719b25996ce94a80ca2118f3eba5779d53d | [
"BSD-3-Clause"
] | 1 | 2016-10-21T08:03:42.000Z | 2016-10-21T08:03:42.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import contextlib
import six
import time
from collections import namedtuple
import zmq
import pickle
#import dill as pickle
import inspect
try:
from six import reraise
except ImportError: # if six is not present we will not reraise the remote excepti... | 41.365385 | 142 | 0.653804 |
1bde4b49156f78e647030e3219c60f287b3266c8 | 12,981 | py | Python | lib/services/vpc/ncloud_vpc/rest.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 12 | 2018-11-20T04:30:49.000Z | 2021-11-09T12:34:26.000Z | lib/services/vpc/ncloud_vpc/rest.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 1 | 2019-01-24T15:56:15.000Z | 2019-05-31T07:56:55.000Z | lib/services/vpc/ncloud_vpc/rest.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 6 | 2018-06-29T03:45:50.000Z | 2022-03-18T01:51:45.000Z | # coding: utf-8
"""
vpc
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import io
import json
import logging
import re
import ssl
import certifi
# python 2 and python 3 compatibility library
import six
from six.moves.urllib.parse import urle... | 40.565625 | 134 | 0.539327 |
793ae12e63829c6f726eccc14461545cfe7e75ab | 2,290 | py | Python | lib/galaxy/model/migrate/versions/0009_request_table.py | thata/galaxy-dist | 6c3ffa064faf0c500f5594ed7b58ed839b00f337 | [
"CC-BY-3.0"
] | 2 | 2016-02-23T00:09:14.000Z | 2019-02-11T07:48:44.000Z | lib/galaxy/model/migrate/versions/0009_request_table.py | thata/galaxy-dist | 6c3ffa064faf0c500f5594ed7b58ed839b00f337 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/model/migrate/versions/0009_request_table.py | thata/galaxy-dist | 6c3ffa064faf0c500f5594ed7b58ed839b00f337 | [
"CC-BY-3.0"
] | 6 | 2015-05-27T13:09:50.000Z | 2019-02-11T07:48:46.000Z | """
This migration script adds a new column to 2 tables:
1) a new boolean type column named 'submitted' to the 'request' table
2) a new string type column named 'bar_code' to the 'sample' table
"""
from sqlalchemy import *
from sqlalchemy.orm import *
from migrate import *
from migrate.changeset import *
import sys, lo... | 35.78125 | 95 | 0.644541 |
b70a4fa74be232cabe48fe483ebc44d2914e3efc | 7,154 | py | Python | gdsfactory/grid.py | thomasdorch/gdsfactory | 26dccc90d1df9c4b8f2f3c7ceccb385aaf237aff | [
"MIT"
] | null | null | null | gdsfactory/grid.py | thomasdorch/gdsfactory | 26dccc90d1df9c4b8f2f3c7ceccb385aaf237aff | [
"MIT"
] | null | null | null | gdsfactory/grid.py | thomasdorch/gdsfactory | 26dccc90d1df9c4b8f2f3c7ceccb385aaf237aff | [
"MIT"
] | null | null | null | """pack a list of components into a grid """
from typing import Optional, Tuple
import numpy as np
from phidl.device_layout import Group
from gdsfactory.cell import cell
from gdsfactory.component import Component
from gdsfactory.components.text_rectangular import text_rectangular
from gdsfactory.difftest import difft... | 35.77 | 87 | 0.597428 |
c9128ab475eda2715d6192148adaee1c8751eec1 | 860 | py | Python | 8bit subleq CPU/emulate.py | MajFontana/computer-architecture | 5ac274168ebc9c77095e520492ff8ea54ba0f68a | [
"MIT"
] | null | null | null | 8bit subleq CPU/emulate.py | MajFontana/computer-architecture | 5ac274168ebc9c77095e520492ff8ea54ba0f68a | [
"MIT"
] | null | null | null | 8bit subleq CPU/emulate.py | MajFontana/computer-architecture | 5ac274168ebc9c77095e520492ff8ea54ba0f68a | [
"MIT"
] | null | null | null | import random
ASSEMBLED = "assembled.bin"
RAM_INIT = {0: 13, 1: 29, 12: 0, 13: 255, 14: 1, 15: 0}
with open(ASSEMBLED, "rb") as f:
raw = f.read()
ram = [RAM_INIT[i] if i in RAM_INIT else random.randint(0, 255) for i in range(16)]
rom = raw.ljust(256, b"\x00")
num = list(rom)
sequence = [(num[i] >> 4 , num[i] & 0... | 26.875 | 86 | 0.577907 |
bb56e684c44940ce38c80c93d3bf887e0a1de18d | 4,049 | py | Python | python/ray/experimental/workflow/tests/test_workflow_manager.py | RaphaelCS/ray | 5f4d9085d2452186bff563fb2856e643c4c82095 | [
"Apache-2.0"
] | null | null | null | python/ray/experimental/workflow/tests/test_workflow_manager.py | RaphaelCS/ray | 5f4d9085d2452186bff563fb2856e643c4c82095 | [
"Apache-2.0"
] | null | null | null | python/ray/experimental/workflow/tests/test_workflow_manager.py | RaphaelCS/ray | 5f4d9085d2452186bff563fb2856e643c4c82095 | [
"Apache-2.0"
] | null | null | null | import pytest
import ray
from ray.experimental import workflow
from filelock import FileLock
def test_workflow_manager(workflow_start_regular, tmp_path):
# For sync between jobs
tmp_file = str(tmp_path / "lock")
lock = FileLock(tmp_file)
lock.acquire()
# For sync between jobs
flag_file = tmp_... | 29.772059 | 78 | 0.653989 |
14912ac9ef4b2f0bc8d29a5c9f94dbfac453e669 | 30,968 | py | Python | release/stubs.min/System/Windows/Forms/__init___parts/ToolStripComboBox.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | release/stubs.min/System/Windows/Forms/__init___parts/ToolStripComboBox.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | release/stubs.min/System/Windows/Forms/__init___parts/ToolStripComboBox.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | class ToolStripComboBox(ToolStripControlHost,IComponent,IDisposable,IDropTarget,ISupportOleDropSource,IArrangedElement):
"""
Represents a System.Windows.Forms.ToolStripComboBox that is properly rendered in a System.Windows.Forms.ToolStrip.
ToolStripComboBox()
ToolStripComboBox(name: str)
ToolStripCombo... | 36.051222 | 402 | 0.725297 |
c7f9ec63eb62b5a7212620e64633e35db88ca3d1 | 1,429 | py | Python | stdplugins/gban.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 2 | 2021-02-06T14:32:50.000Z | 2022-02-23T07:16:52.000Z | stdplugins/gban.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 2 | 2020-05-22T14:59:05.000Z | 2020-05-28T12:04:02.000Z | stdplugins/gban.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 12 | 2019-10-25T18:48:16.000Z | 2020-04-26T11:31:21.000Z | """Globally Ban users from all the
Group Administrations bots where you are SUDO
Available Commands:
.gban REASON
.ungban REASON"""
from telethon import events
import asyncio
from uniborg.util import admin_cmd
@borg.on(admin_cmd(pattern="gban ?(.*)"))
async def _(event):
if Config.G_BAN_LOGGER_GROUP is None:
... | 29.770833 | 74 | 0.636109 |
3286ec33ea5edb67a9cb7a8a99307ec2b627667b | 17,569 | py | Python | tests/test_execute.py | angloyna/conda-concourse-ci | 17ea9ea654dfc5c98d37ef4d2736957961db3116 | [
"BSD-3-Clause"
] | null | null | null | tests/test_execute.py | angloyna/conda-concourse-ci | 17ea9ea654dfc5c98d37ef4d2736957961db3116 | [
"BSD-3-Clause"
] | null | null | null | tests/test_execute.py | angloyna/conda-concourse-ci | 17ea9ea654dfc5c98d37ef4d2736957961db3116 | [
"BSD-3-Clause"
] | null | null | null | import os
import subprocess
from conda_concourse_ci import execute
import conda_concourse_ci
from conda_concourse_ci.utils import HashableDict
import pytest
import yaml
from .utils import test_data_dir, graph_data_dir, test_config_dir
def test_collect_tasks(mocker, testing_conda_resolve, testing_graph):
mocker... | 50.924638 | 123 | 0.673687 |
5f2737f00416c36f7e3789fd434c35573a2a5df0 | 1,984 | py | Python | tests/tracing_tool/dynamic/test_multidir/test_multidir.py | ganeshutah/FPChecker | 53a471429762ace13f69733cb2f8b7227fc15b9f | [
"Apache-2.0"
] | 19 | 2019-09-28T16:15:45.000Z | 2022-02-15T15:11:28.000Z | tests/tracing_tool/dynamic/test_multidir/test_multidir.py | tanmaytirpankar/FPChecker | d3fe4bd9489c5705df58a67dbbc388ac1ebf56bf | [
"Apache-2.0"
] | 16 | 2020-02-01T18:43:00.000Z | 2021-12-22T14:47:39.000Z | tests/tracing_tool/dynamic/test_multidir/test_multidir.py | tanmaytirpankar/FPChecker | d3fe4bd9489c5705df58a67dbbc388ac1ebf56bf | [
"Apache-2.0"
] | 5 | 2020-07-27T18:15:36.000Z | 2021-11-01T18:43:34.000Z | #!/usr/bin/env python
import subprocess
import os
import sys
sys.path.append("..")
from .. import conftest
TRACING_TOLL_PATH = conftest.FPCHECKER_PATH
def setup_module(module):
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
os.chdir(THIS_DIR)
def teardown_module(module):
cmd = ["make clean"]
... | 30.523077 | 86 | 0.481855 |
2b7c7312f71cada708c8b32e7032efe3aca344cb | 5,461 | py | Python | homeassistant/components/input_text/__init__.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 2 | 2019-10-19T15:07:32.000Z | 2022-01-29T10:33:20.000Z | homeassistant/components/input_text/__init__.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/input_text/__init__.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 2 | 2019-01-21T05:49:23.000Z | 2019-02-19T16:30:48.000Z | """Support to enter a value into a text box."""
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.config_validation import ENTITY_SERVICE_SCHEMA
from homeassistant.const import (
ATTR_UNIT_OF_MEASUREMENT,
CONF_ICON,
CONF_NAME,
CONF_... | 28.295337 | 88 | 0.605933 |
e5886cf17b30c0ade27e7fc9bf258546ca5b6518 | 3,430 | py | Python | spine_json_lib/spine_graph_container.py | jesdi/spine-json-lib | 15767302d829738ddd21e0249ceba21874a6a052 | [
"MIT"
] | 6 | 2019-12-02T15:25:57.000Z | 2021-11-02T04:14:19.000Z | spine_json_lib/spine_graph_container.py | jesdi/spine-json-lib | 15767302d829738ddd21e0249ceba21874a6a052 | [
"MIT"
] | 3 | 2020-03-20T11:09:22.000Z | 2022-02-18T10:07:26.000Z | spine_json_lib/spine_graph_container.py | jesdi/spine-json-lib | 15767302d829738ddd21e0249ceba21874a6a052 | [
"MIT"
] | 2 | 2019-12-02T14:56:50.000Z | 2020-02-24T07:53:20.000Z | from typing import List, Dict, Any, Tuple
from spine_json_lib.deserializer.spine_nodes import (
SpineGraphParser,
SpineNodeFactory,
NodeType,
)
from spine_json_lib.graph.spamnode import SpamNode
class SpineGraphContainer(object):
def __init__(self, spine_json_data: Dict[str, Any]) -> None:
s... | 33.300971 | 82 | 0.61516 |
c19b6da83c58ebe212c3c9e3b877da584ab9327d | 4,115 | py | Python | bolt_client/message_handler/message_handler.py | h4xr/bolt-client | 3dc6303cc7e2a23dcb343654327b4d3f7880fd89 | [
"MIT"
] | null | null | null | bolt_client/message_handler/message_handler.py | h4xr/bolt-client | 3dc6303cc7e2a23dcb343654327b4d3f7880fd89 | [
"MIT"
] | null | null | null | bolt_client/message_handler/message_handler.py | h4xr/bolt-client | 3dc6303cc7e2a23dcb343654327b4d3f7880fd89 | [
"MIT"
] | null | null | null | '''
File: message_handler.py
Description: Handle the incoming message request by calling in the required
plugin method calls.
Author: Saurabh Badhwar <sbadhwar@redhat.com>
Date: 17/10/2017
'''
from bolt_client.metric_collector import MetricCollector
import json
class MessageHandler(object):
"""Handle ... | 31.653846 | 81 | 0.661725 |
cec608a7241d8b913506a019298ca22aaa323c22 | 6,348 | py | Python | exercises/city_temperature_prediction.py | mayavolo/IML.HUJI | 1280aa1b0d7492dadde90b86bbf8ee4312ad8471 | [
"MIT"
] | null | null | null | exercises/city_temperature_prediction.py | mayavolo/IML.HUJI | 1280aa1b0d7492dadde90b86bbf8ee4312ad8471 | [
"MIT"
] | null | null | null | exercises/city_temperature_prediction.py | mayavolo/IML.HUJI | 1280aa1b0d7492dadde90b86bbf8ee4312ad8471 | [
"MIT"
] | null | null | null | import os
from IMLearn.learners.regressors import PolynomialFitting
from IMLearn.utils import split_train_test
import numpy as np
import pandas as pd
import plotly.io as pio
import matplotlib.pyplot as plt
pio.templates.default = "simple_white"
def load_data(filename: str) -> pd.DataFrame:
"""
Load city dail... | 44.083333 | 120 | 0.663359 |
aceb7eabdbc27b0850c3337b44855c01d60618ec | 2,399 | py | Python | usr/lib/gcc/i686-pc-msys/7.3.0/libstdc++.dll.a-gdb.py | qinjidong/esp8266-v3.0-msys32 | 12f8d5f697276061b37a8fd322f0a30dec1597d3 | [
"Apache-2.0"
] | 1 | 2019-02-22T05:19:40.000Z | 2019-02-22T05:19:40.000Z | usr/lib/gcc/i686-pc-msys/7.3.0/libstdc++.dll.a-gdb.py | qinjidong/esp8266-v3.0-msys32 | 12f8d5f697276061b37a8fd322f0a30dec1597d3 | [
"Apache-2.0"
] | null | null | null | usr/lib/gcc/i686-pc-msys/7.3.0/libstdc++.dll.a-gdb.py | qinjidong/esp8266-v3.0-msys32 | 12f8d5f697276061b37a8fd322f0a30dec1597d3 | [
"Apache-2.0"
] | 1 | 2020-11-04T07:54:34.000Z | 2020-11-04T07:54:34.000Z | # -*- python -*-
# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# 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 3 of the License, or
# (at your option) any later versio... | 38.693548 | 79 | 0.719466 |
fe68ff934d787b41c25b564a877d38c7328caf25 | 498 | py | Python | Python Fundamentals/Data Types and Variables/snow_balls.py | bvoytash/Software-University | f2c6940cde093cea7b1c38bd88305206564c9947 | [
"MIT"
] | null | null | null | Python Fundamentals/Data Types and Variables/snow_balls.py | bvoytash/Software-University | f2c6940cde093cea7b1c38bd88305206564c9947 | [
"MIT"
] | null | null | null | Python Fundamentals/Data Types and Variables/snow_balls.py | bvoytash/Software-University | f2c6940cde093cea7b1c38bd88305206564c9947 | [
"MIT"
] | null | null | null | num_snowballs = int(input())
max_value = 0
a = 0
b = 0
c = 0
for ball in range(1, num_snowballs + 1 ):
snowball_snow = int(input())
snowball_time = int(input())
snowball_quality = int(input())
snowball_value = (snowball_snow / snowball_time) ** snowball_quality
if snowball_value > ... | 23.714286 | 73 | 0.606426 |
017f3d505adc2d3c9d84617055c3b9e4d0a6bca6 | 592 | py | Python | atlas_utils/lib/__init__.py | Ascend-Huawei/ece491-group30 | acf94d3005003a48b895594cc489db7b0a049d09 | [
"Apache-2.0"
] | null | null | null | atlas_utils/lib/__init__.py | Ascend-Huawei/ece491-group30 | acf94d3005003a48b895594cc489db7b0a049d09 | [
"Apache-2.0"
] | null | null | null | atlas_utils/lib/__init__.py | Ascend-Huawei/ece491-group30 | acf94d3005003a48b895594cc489db7b0a049d09 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:23:08.000Z | 2021-05-05T18:23:08.000Z | # Copyright 2021 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 45.538462 | 74 | 0.763514 |
eabffebd1e5cef815b745b7a4e18179175dd3f74 | 2,455 | py | Python | src/tubize/utils.py | olivervinn/tubizescripts | 8756f322d3e31f76f8b77cb8e084ded5941e29fa | [
"MIT"
] | null | null | null | src/tubize/utils.py | olivervinn/tubizescripts | 8756f322d3e31f76f8b77cb8e084ded5941e29fa | [
"MIT"
] | null | null | null | src/tubize/utils.py | olivervinn/tubizescripts | 8756f322d3e31f76f8b77cb8e084ded5941e29fa | [
"MIT"
] | null | null | null | import os
import sys
from pathlib import Path
import time
import shlex
import subprocess
import logging
log = logging.getLogger(__name__)
def ffmpeg(args: str) -> (str, int):
"""Invoke ffmpeg system command."""
stout, _, delta = call(
f'ffmpeg -hwaccel auto -hide_banner -loglevel error -y {args}')
... | 30.6875 | 74 | 0.590631 |
726793ae351f31062e2bb257f3a70bbd781f33a4 | 237 | py | Python | Pow(x, n).py | ngdeva99/Fulcrum | 3a5c69005bbaf2a5aebe13d1907f13790210fb32 | [
"MIT"
] | null | null | null | Pow(x, n).py | ngdeva99/Fulcrum | 3a5c69005bbaf2a5aebe13d1907f13790210fb32 | [
"MIT"
] | null | null | null | Pow(x, n).py | ngdeva99/Fulcrum | 3a5c69005bbaf2a5aebe13d1907f13790210fb32 | [
"MIT"
] | null | null | null | class Solution:
def myPow(self, x, n):
if not n:
return 1
if n < 0:
return 1 / self.myPow(x, -n)
if n % 2:
return x * self.myPow(x, n-1)
return self.myPow(x*x, n/2)
| 23.7 | 41 | 0.438819 |
24f8cd71fb472d3389a515617a1c11806a026824 | 837 | py | Python | example/example/urls.py | yothinix/dj-starboard | ebfc4ea3ea1daf130f175a9e17000cfcfef72112 | [
"MIT"
] | null | null | null | example/example/urls.py | yothinix/dj-starboard | ebfc4ea3ea1daf130f175a9e17000cfcfef72112 | [
"MIT"
] | null | null | null | example/example/urls.py | yothinix/dj-starboard | ebfc4ea3ea1daf130f175a9e17000cfcfef72112 | [
"MIT"
] | null | null | null | """example URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | 34.875 | 79 | 0.700119 |
e0105279aba10fbe356bb814254f2fb971507c52 | 11,491 | py | Python | config/settings.py | marcphilippebeaujean-abertay/recur-notion | d09e03b35a2ea75c446025a6fe76781100bfd3bf | [
"MIT"
] | 2 | 2022-03-29T06:20:34.000Z | 2022-03-29T19:42:00.000Z | config/settings.py | marcphilippebeaujean-abertay/recur-notion | d09e03b35a2ea75c446025a6fe76781100bfd3bf | [
"MIT"
] | null | null | null | config/settings.py | marcphilippebeaujean-abertay/recur-notion | d09e03b35a2ea75c446025a6fe76781100bfd3bf | [
"MIT"
] | null | null | null | import os
from pathlib import Path
# GENERAL
# ------------------------------------------------------------------------------
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY
S... | 33.997041 | 97 | 0.612044 |
5f7860c8662817370ae8491638d544effc463812 | 4,168 | py | Python | gwaff.py | LillithLilligant/gwaff | 9ebdb689235afc23bcfd558ea3f182b1ddc535c3 | [
"MIT"
] | 3 | 2020-07-03T06:11:17.000Z | 2020-12-17T21:08:31.000Z | gwaff.py | LillithLilligant/gwaff | 9ebdb689235afc23bcfd558ea3f182b1ddc535c3 | [
"MIT"
] | 14 | 2020-07-20T11:01:49.000Z | 2021-04-01T05:52:43.000Z | gwaff.py | LillithLilligant/gwaff | 9ebdb689235afc23bcfd558ea3f182b1ddc535c3 | [
"MIT"
] | 5 | 2020-07-04T17:08:54.000Z | 2021-03-22T01:04:05.000Z | from scripts import plot, data
import datetime
import json
import argparse
import requests
import os
parser = argparse.ArgumentParser(description="mee6 xp graphing")
parser.add_argument("--plot", help="Use this if you want to plot", action="store_true")
parser.add_argument(
"--store", help="Use this if you want t... | 31.104478 | 87 | 0.399232 |
164fbf24c0d54a0af3c58d7dd7b41f8ece52493c | 22,875 | py | Python | python/ccxt/zb.py | xeddmc/ccxt | 9ddd88e6bbc4b2162cf45d331995bb86235d2a59 | [
"MIT"
] | 1 | 2021-03-01T17:45:33.000Z | 2021-03-01T17:45:33.000Z | python/ccxt/zb.py | xeddmc/ccxt | 9ddd88e6bbc4b2162cf45d331995bb86235d2a59 | [
"MIT"
] | 4 | 2020-09-07T00:20:58.000Z | 2021-05-10T09:04:56.000Z | python/ccxt/zb.py | xeddmc/ccxt | 9ddd88e6bbc4b2162cf45d331995bb86235d2a59 | [
"MIT"
] | 1 | 2019-11-08T12:36:13.000Z | 2019-11-08T12:36:13.000Z | # -*- 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.base.exchange import Exchange
import hashlib
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ... | 38.316583 | 126 | 0.479825 |
72dd74d7b8772982efbd5941e3ae77a98e9531c7 | 2,609 | py | Python | pong_gym_run.py | wsredniawa/neuronpp_gym | 1a495cdd1a723973a70ef8fa33f3fdb86db95da7 | [
"MIT"
] | null | null | null | pong_gym_run.py | wsredniawa/neuronpp_gym | 1a495cdd1a723973a70ef8fa33f3fdb86db95da7 | [
"MIT"
] | null | null | null | pong_gym_run.py | wsredniawa/neuronpp_gym | 1a495cdd1a723973a70ef8fa33f3fdb86db95da7 | [
"MIT"
] | null | null | null | import time
from agents.sigma3_olfactory_agent import Sigma3OlfactoryAgent
from utils import get_env, prepare_pong_observation, reset
SCREEN_RATIO = 0.3 # 5 ms with: screen_ratio=0.2, step_size=3; 10sec env -> 0.3 sec network
ENV_STEPSIZE = 10
AGENT_STEPSIZE = 3
RESET_AFTER = 24
ENV_STEPSIZE = ENV_STEPSIZE / 1000
... | 34.328947 | 133 | 0.604063 |
7a03688674137c9d677a17aea7c87fbf07e3a345 | 2,087 | py | Python | app/app/entities/charge_station.py | wolfhardfehre/olli-simulation | 5fff357678af665d285aa3c4ed2a3f788544914f | [
"MIT"
] | null | null | null | app/app/entities/charge_station.py | wolfhardfehre/olli-simulation | 5fff357678af665d285aa3c4ed2a3f788544914f | [
"MIT"
] | 23 | 2018-04-15T13:36:27.000Z | 2021-06-01T22:08:08.000Z | app/app/entities/charge_station.py | wolfhardfehre/olli-simulation | 5fff357678af665d285aa3c4ed2a3f788544914f | [
"MIT"
] | null | null | null | import pandas as pd
from shapely.geometry import Point
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../..")))
from app.app.entities.story import Story
from app.app.entities.map_point import MapPoint
from app.app.entities.models.battery_model import BatteryModel
c... | 27.826667 | 88 | 0.58505 |
df9e62296d369f9c00eb47d32365ddbde436f392 | 1,023 | py | Python | python/10.01/main.py | diggingforfire/AdventOfCode2019 | 1f58e159f11b35ca132e6dee65661f4ea6389400 | [
"MIT"
] | null | null | null | python/10.01/main.py | diggingforfire/AdventOfCode2019 | 1f58e159f11b35ca132e6dee65661f4ea6389400 | [
"MIT"
] | null | null | null | python/10.01/main.py | diggingforfire/AdventOfCode2019 | 1f58e159f11b35ca132e6dee65661f4ea6389400 | [
"MIT"
] | null | null | null | from math import atan2
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def get_manhattan_distance(point, other_point):
return abs(point.x - other_point.x) + abs(point.y - other_point.y)
def has_line_of_sight(point, other_point, points):
angle = atan2(point.y - other_point.... | 26.230769 | 85 | 0.625611 |
bfd341190b081c93a6d97744f35ea7203949f338 | 7,937 | py | Python | corehq/apps/formplayer_api/management/commands/prime_formplayer_restores.py | challabeehyv/commcare-hq | b83d3d4d47b0c4660fc9ce730cde40fd612c2f11 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/formplayer_api/management/commands/prime_formplayer_restores.py | challabeehyv/commcare-hq | b83d3d4d47b0c4660fc9ce730cde40fd612c2f11 | [
"BSD-3-Clause"
] | 2 | 2020-04-16T13:25:44.000Z | 2021-02-08T22:08:28.000Z | corehq/apps/formplayer_api/management/commands/prime_formplayer_restores.py | challabeehyv/commcare-hq | b83d3d4d47b0c4660fc9ce730cde40fd612c2f11 | [
"BSD-3-Clause"
] | null | null | null | import csv
import inspect
from argparse import RawTextHelpFormatter
from concurrent import futures
from datetime import datetime
import sys
from dateutil.relativedelta import relativedelta
from django.core.management.base import BaseCommand
from corehq.apps.formplayer_api.exceptions import FormplayerResponseException... | 41.124352 | 115 | 0.622779 |
4966b94ba7443ad21513e40151a72d70cc413664 | 396 | py | Python | Chapter08/final/media_project/media_example/views.py | PacktPublishing/Web-Development-Projects-with-Django | 531bc4d58d614888cc81b7fd6f8ec859f5a65217 | [
"MIT"
] | 97 | 2021-03-01T12:54:30.000Z | 2022-03-28T02:57:26.000Z | Chapter08/final/media_project/media_example/views.py | PacktPublishing/Web-Development-Projects-with-Django | 531bc4d58d614888cc81b7fd6f8ec859f5a65217 | [
"MIT"
] | 81 | 2020-08-27T04:56:04.000Z | 2022-03-12T00:53:40.000Z | Chapter08/final/media_project/media_example/views.py | PacktPublishing/Web-Development-Projects-with-Django | 531bc4d58d614888cc81b7fd6f8ec859f5a65217 | [
"MIT"
] | 163 | 2020-12-25T14:38:38.000Z | 2022-03-30T10:31:40.000Z | from django.shortcuts import render
from .forms import UploadForm
def media_example(request):
instance = None
if request.method == 'POST':
form = UploadForm(request.POST, request.FILES)
if form.is_valid():
instance = form.save()
else:
form = UploadForm()
return ... | 22 | 86 | 0.641414 |
a940e26209748321531a9adebf785a40b70d5567 | 476 | py | Python | utils.py | eclecticexistential/place2live | 7d10c827192531495867a124c28311285cd1c28b | [
"MIT"
] | null | null | null | utils.py | eclecticexistential/place2live | 7d10c827192531495867a124c28311285cd1c28b | [
"MIT"
] | null | null | null | utils.py | eclecticexistential/place2live | 7d10c827192531495867a124c28311285cd1c28b | [
"MIT"
] | null | null | null | import colorful as cf
from enum import Enum
class text_type(Enum):
"""Enum for text type."""
WARNING = "warning"
QUESTION = "question"
ANSWER = "answer"
def text_color(text, txtType=None):
"""Return colored text based on text type."""
if txtType == text_type.WARNING:
return cf.red(te... | 22.666667 | 49 | 0.644958 |
42a3b7b2e7da66211df766b33dbf4f1442019618 | 751 | py | Python | data-detective-etl/common/utils.py | dmitriy-e/metadata-governance | 018a879951dee3f3c2c05ac8e05b8360dd7f4ab3 | [
"Apache-2.0"
] | 5 | 2021-12-01T09:55:23.000Z | 2021-12-21T16:23:33.000Z | data-detective-etl/common/utils.py | dmitriy-e/metadata-governance | 018a879951dee3f3c2c05ac8e05b8360dd7f4ab3 | [
"Apache-2.0"
] | 1 | 2021-11-16T15:55:34.000Z | 2021-11-16T15:55:34.000Z | data-detective-etl/common/utils.py | dmitriy-e/metadata-governance | 018a879951dee3f3c2c05ac8e05b8360dd7f4ab3 | [
"Apache-2.0"
] | 2 | 2021-11-03T09:43:09.000Z | 2021-11-17T10:16:29.000Z | from collections.abc import Iterable
from typing import Any, Optional
from pandas import isnull, notnull
def get_readable_size_bytes(size: float, decimal_places=2) -> Optional[str]:
if isnull(size):
return None
for unit in ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']:
if size < 1024 ... | 30.04 | 92 | 0.631158 |
fbd06a5a78eab5a8c30df80f7130461b68f9643c | 9,036 | py | Python | tensorflow/python/data/experimental/benchmarks/map_and_batch_benchmark.py | aeverall/tensorflow | 7992bf97711919f56f80bff9e5510cead4ab2095 | [
"Apache-2.0"
] | 2 | 2018-12-12T23:33:05.000Z | 2019-02-26T07:20:22.000Z | tensorflow/python/data/experimental/benchmarks/map_and_batch_benchmark.py | aeverall/tensorflow | 7992bf97711919f56f80bff9e5510cead4ab2095 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/data/experimental/benchmarks/map_and_batch_benchmark.py | aeverall/tensorflow | 7992bf97711919f56f80bff9e5510cead4ab2095 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.339286 | 107 | 0.645418 |
18df89c5d9e204e7a7dd66e9129f19fcac5bef02 | 1,712 | py | Python | reversing_tools/abbott/freestyle_hid_console.py | Flameeyes/glucometerutils | 70610614453bd3becc4ad126fca760500a664bfe | [
"MIT",
"Apache-2.0",
"Unlicense"
] | 135 | 2015-12-19T22:42:59.000Z | 2022-02-11T17:14:14.000Z | reversing_tools/abbott/freestyle_hid_console.py | Flameeyes/glucometerutils | 70610614453bd3becc4ad126fca760500a664bfe | [
"MIT",
"Apache-2.0",
"Unlicense"
] | 52 | 2016-02-09T13:33:59.000Z | 2020-03-13T15:12:21.000Z | reversing_tools/abbott/freestyle_hid_console.py | Flameeyes/glucometerutils | 70610614453bd3becc4ad126fca760500a664bfe | [
"MIT",
"Apache-2.0",
"Unlicense"
] | 50 | 2015-03-11T10:55:32.000Z | 2021-10-04T20:48:13.000Z | #!/usr/bin/env python3
# SPDX-FileCopyrightText: © 2019 The glucometerutils Authors
# SPDX-License-Identifier: MIT
"""CLI tool to send messages through FreeStyle HID protocol."""
import argparse
import logging
import sys
from glucometerutils import exceptions
from glucometerutils.support import freestyle
def main()... | 24.457143 | 75 | 0.607477 |
690676982d0aa6d96e0f68094b26611fc168b6e4 | 2,827 | py | Python | filter_sorter/views/multiform/multiform_mixin.py | fundor333/django-filter-sort | 1ff924371f7b78c5a46b66348a1cefc3c2c0a844 | [
"MIT"
] | null | null | null | filter_sorter/views/multiform/multiform_mixin.py | fundor333/django-filter-sort | 1ff924371f7b78c5a46b66348a1cefc3c2c0a844 | [
"MIT"
] | null | null | null | filter_sorter/views/multiform/multiform_mixin.py | fundor333/django-filter-sort | 1ff924371f7b78c5a46b66348a1cefc3c2c0a844 | [
"MIT"
] | null | null | null | from django.http import HttpResponseRedirect
from django.views.generic.base import ContextMixin
class MultiFormMixin(ContextMixin):
form_classes = {}
prefixes = {}
success_urls = {}
grouped_forms = {}
initial = {}
prefix = None
success_url = None
def get_form_classes(self):
r... | 32.494253 | 83 | 0.61231 |
7c14f25309883c89f1af869c417d9de8fde8021b | 3,320 | py | Python | setup.py | rfire01/abcvoting | e0bb05a8f0478c071e0bab7d0914c936a3fff155 | [
"MIT"
] | null | null | null | setup.py | rfire01/abcvoting | e0bb05a8f0478c071e0bab7d0914c936a3fff155 | [
"MIT"
] | null | null | null | setup.py | rfire01/abcvoting | e0bb05a8f0478c071e0bab7d0914c936a3fff155 | [
"MIT"
] | null | null | null | import os
import setuptools
import subprocess
def read_readme():
with open("README.md", "r", encoding="utf-8") as fh:
readme = fh.read()
return readme
def read_version():
"""This is not guaranteed to be a valid version string, but should work well enough.
Tested with version strings as tag ... | 31.028037 | 99 | 0.621386 |
8ddd4d71e9d9c288e8c218840e2ed00f52ac1aa3 | 798 | py | Python | email_sender/urls.py | mateusvictor/Email-Sender | 66034f315a1b0f0ee7bb07fda12d58810c465aa6 | [
"MIT"
] | null | null | null | email_sender/urls.py | mateusvictor/Email-Sender | 66034f315a1b0f0ee7bb07fda12d58810c465aa6 | [
"MIT"
] | null | null | null | email_sender/urls.py | mateusvictor/Email-Sender | 66034f315a1b0f0ee7bb07fda12d58810c465aa6 | [
"MIT"
] | null | null | null | """email_sender URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-... | 34.695652 | 77 | 0.703008 |
e77c563d0dd7a49ca9c915494e34b85c13d8c60e | 1,398 | py | Python | test/hlt/pytest/python/com/huawei/iotplatform/client/dto/QueryDeviceShadowOutDTO.py | yuanyi-thu/AIOT- | 27f67d98324593c4c6c66bbd5e2a4aa7b9a4ac1e | [
"BSD-3-Clause"
] | 128 | 2018-10-29T04:11:47.000Z | 2022-03-07T02:19:14.000Z | test/hlt/pytest/python/com/huawei/iotplatform/client/dto/QueryDeviceShadowOutDTO.py | yuanyi-thu/AIOT- | 27f67d98324593c4c6c66bbd5e2a4aa7b9a4ac1e | [
"BSD-3-Clause"
] | 40 | 2018-11-02T00:40:48.000Z | 2021-12-07T09:33:56.000Z | test/hlt/pytest/python/com/huawei/iotplatform/client/dto/QueryDeviceShadowOutDTO.py | yuanyi-thu/AIOT- | 27f67d98324593c4c6c66bbd5e2a4aa7b9a4ac1e | [
"BSD-3-Clause"
] | 118 | 2018-10-29T08:43:57.000Z | 2022-01-07T06:49:25.000Z | from com.huawei.iotplatform.client.dto.DeviceInfo import DeviceInfo
from com.huawei.iotplatform.client.dto.DeviceServiceB import DeviceServiceB
class QueryDeviceShadowOutDTO(object):
deviceInfo = DeviceInfo
services = DeviceServiceB
def __init__(self):
self.deviceId = None
self.gatewayId ... | 24.526316 | 75 | 0.686695 |
ab970209433d589e33be145c7be9888a2b4dc894 | 2,202 | py | Python | src/oci/log_analytics/models/auto_association_collection.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/log_analytics/models/auto_association_collection.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/log_analytics/models/auto_association_collection.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 31.014085 | 245 | 0.6703 |
71c8989918644b87bf0a1d7c004b5e81eeb24d86 | 5,535 | py | Python | package/spack-py-pillow/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | 1 | 2018-07-17T07:45:09.000Z | 2018-07-17T07:45:09.000Z | package/spack-py-pillow/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | package/spack-py-pillow/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 43.582677 | 85 | 0.590967 |
869b4ac42582323ad836628c3234d8b2daf75296 | 5,767 | py | Python | textpipe/pipeline.py | KGBicheno/textpipe | 78daaf662505ff845313ed80f18ede2716573c46 | [
"MIT"
] | 316 | 2018-06-22T11:57:02.000Z | 2022-03-19T23:05:00.000Z | textpipe/pipeline.py | KGBicheno/textpipe | 78daaf662505ff845313ed80f18ede2716573c46 | [
"MIT"
] | 200 | 2018-06-22T13:33:28.000Z | 2021-06-08T20:32:51.000Z | textpipe/pipeline.py | KGBicheno/textpipe | 78daaf662505ff845313ed80f18ede2716573c46 | [
"MIT"
] | 24 | 2018-06-28T10:14:47.000Z | 2022-01-12T20:13:21.000Z | """
Obtain elements from a textpipe doc, by specifying a pipeline, in a dictionary.
"""
import json
import spacy
from textpipe.doc import Doc
import textpipe.operation
class Pipeline: # pylint: disable=too-many-instance-attributes,too-many-arguments,too-many-locals
"""
Create a pipeline instance based on t... | 38.966216 | 149 | 0.597538 |
dbdd5f6eeba4a2a8db666643e4b227e4069bfaba | 724 | py | Python | src/moveAccount.py | JimmyDqv/AWS-Account-Vending-Machine | 713c353773d11eca412c420ebdbd317fdcf016d9 | [
"MIT"
] | 13 | 2020-04-10T00:52:06.000Z | 2022-02-24T23:42:23.000Z | src/moveAccount.py | JimmyDqv/AWS-Account-Vending-Machine | 713c353773d11eca412c420ebdbd317fdcf016d9 | [
"MIT"
] | null | null | null | src/moveAccount.py | JimmyDqv/AWS-Account-Vending-Machine | 713c353773d11eca412c420ebdbd317fdcf016d9 | [
"MIT"
] | 2 | 2020-04-13T23:01:21.000Z | 2020-10-23T12:12:34.000Z | import os
import sys
import boto3
import json
import time
from debug import debug_print
from debug import error_print
from botoHelper import get_boto_client
def handler(event, context):
debug_print(json.dumps(event, indent=2))
return main(event)
def main(event):
root_ou_id = event.get("rootOuId")
ou... | 21.294118 | 48 | 0.722376 |
b78913a4fb030291348055be90ba095007951334 | 546 | py | Python | shapeshifter/mixins.py | martinogden/django-shapeshifter | dbcba74c0a6914af181c1e8f0ba23369d4c3c94b | [
"Apache-2.0"
] | 164 | 2018-08-27T16:48:15.000Z | 2022-03-01T06:43:35.000Z | shapeshifter/mixins.py | FlipperPA/django-shapeshifter | 0ce9cc2796164a529749a6b2208642d819f706bd | [
"Apache-2.0"
] | 2 | 2018-09-04T14:26:34.000Z | 2021-07-23T21:02:29.000Z | shapeshifter/mixins.py | FlipperPA/django-shapeshifter | 0ce9cc2796164a529749a6b2208642d819f706bd | [
"Apache-2.0"
] | 12 | 2018-08-27T20:55:12.000Z | 2022-02-07T23:41:33.000Z | from django.contrib import messages
class MultiSuccessMessageMixin(object):
"""
Add a success message on successful multiple forms submission.
"""
success_message = None
def get_success_message(self):
return self.success_message
def forms_valid(self):
response = ... | 26 | 71 | 0.675824 |
413a4df908f69be1a7952a4e62f05a8eda607906 | 2,925 | py | Python | Python/pyramid-transition-matrix.py | ruikunl/LeetCode | dae98754eb02d68139028f72f894411a3ed12305 | [
"MIT"
] | 4 | 2019-08-06T01:55:23.000Z | 2021-12-12T21:04:01.000Z | Python/pyramid-transition-matrix.py | ruikunl/LeetCode | dae98754eb02d68139028f72f894411a3ed12305 | [
"MIT"
] | null | null | null | Python/pyramid-transition-matrix.py | ruikunl/LeetCode | dae98754eb02d68139028f72f894411a3ed12305 | [
"MIT"
] | 8 | 2020-02-20T08:21:12.000Z | 2022-02-17T05:53:21.000Z | # Time: O((a^(b+1)-a)/(a-1)) = O(a^b) , a is the size of allowed,
# b is the length of bottom
# Space: O((a^(b+1)-a)/(a-1)) = O(a^b)
# We are stacking blocks to form a pyramid. Each block has a color which is a one letter string, like `'Z'`.
#
# For every block of color `C` we... | 39.527027 | 108 | 0.555556 |
0e605b2bc3b7d812182dfa5ad8f8c80bce2d6cef | 3,869 | py | Python | alipay/aop/api/domain/AlipaySecurityRiskAmlAnalyzeSubmitModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipaySecurityRiskAmlAnalyzeSubmitModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipaySecurityRiskAmlAnalyzeSubmitModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipaySecurityRiskAmlAnalyzeSubmitModel(object):
def __init__(self):
self._biz_code = None
self._extend_data = None
self._gmt_occur = None
self._request_id = None
... | 29.534351 | 73 | 0.583872 |
973331933a32f0f4ff00e982b93a841655d7c79a | 18,911 | py | Python | tests/abstract.py | a6patch/agnostic | 9f9cdc8c54e92e9e3f52e340aaddafb6eb33d787 | [
"MIT"
] | 53 | 2015-05-27T17:41:01.000Z | 2021-12-26T04:30:20.000Z | tests/abstract.py | a6patch/agnostic | 9f9cdc8c54e92e9e3f52e340aaddafb6eb33d787 | [
"MIT"
] | 21 | 2015-11-24T17:31:04.000Z | 2021-11-15T19:00:20.000Z | tests/abstract.py | a6patch/agnostic | 9f9cdc8c54e92e9e3f52e340aaddafb6eb33d787 | [
"MIT"
] | 17 | 2015-10-29T10:22:16.000Z | 2021-02-11T00:29:36.000Z | from abc import ABCMeta, abstractmethod
from contextlib import contextmanager
from datetime import datetime, timedelta
import logging
import os
import shutil
import tempfile
import unittest
import warnings
from click.testing import CliRunner
import agnostic
import agnostic.cli
logging.basicConfig()
class Abstract... | 35.4803 | 80 | 0.601978 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.