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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7952735eef5b3e9978889fffc916a27bb6afa110 | 2,602 | py | Python | example_project/openpyxl-test-01.py | museroom/reportbot | 01edc30482c0027c767fcc9acbf1cd166fb5512f | [
"BSD-3-Clause"
] | null | null | null | example_project/openpyxl-test-01.py | museroom/reportbot | 01edc30482c0027c767fcc9acbf1cd166fb5512f | [
"BSD-3-Clause"
] | null | null | null | example_project/openpyxl-test-01.py | museroom/reportbot | 01edc30482c0027c767fcc9acbf1cd166fb5512f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os,sys
import django
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'example_project.settings')
django.setup()
from django.conf import settings
from openpyxl import Workbook
from openpyxl import load_workbook
from openpyxl.drawing.image import Image
import os
import re
from ... | 29.235955 | 80 | 0.676403 |
79527382ac59bf2d6f64e86687f393e1ff97bc0e | 66,204 | py | Python | storage/tests/test_storage.py | andressamagblr/vault | f37d61b93a96d91278b5d4163f336ada7209240f | [
"Apache-2.0"
] | null | null | null | storage/tests/test_storage.py | andressamagblr/vault | f37d61b93a96d91278b5d4163f336ada7209240f | [
"Apache-2.0"
] | null | null | null | storage/tests/test_storage.py | andressamagblr/vault | f37d61b93a96d91278b5d4163f336ada7209240f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from unittest.mock import patch, Mock
from unittest import TestCase
import requests
from swiftclient import client
from django.urls import reverse
from django.utils.translation import gettext as _
from django.test.utils import override_settings
from django.contrib.auth.models import Group, Us... | 41.044017 | 152 | 0.64552 |
795274505ce997e5df48259543ac10dd84916391 | 970 | py | Python | src/economy/migrations/0012_auto_20200811_0233.py | lgandersen/bornhack-website | fbda2b4b53dc2cb266d1d7c13ba0aad59d9079df | [
"BSD-3-Clause"
] | 7 | 2017-04-14T15:28:29.000Z | 2021-09-10T09:45:38.000Z | src/economy/migrations/0012_auto_20200811_0233.py | lgandersen/bornhack-website | fbda2b4b53dc2cb266d1d7c13ba0aad59d9079df | [
"BSD-3-Clause"
] | 799 | 2016-04-28T09:31:50.000Z | 2022-03-29T09:05:02.000Z | src/economy/migrations/0012_auto_20200811_0233.py | lgandersen/bornhack-website | fbda2b4b53dc2cb266d1d7c13ba0aad59d9079df | [
"BSD-3-Clause"
] | 35 | 2016-04-28T09:23:53.000Z | 2021-05-02T12:36:01.000Z | # Generated by Django 3.1 on 2020-08-11 00:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("economy", "0011_pos_posreport"),
]
operations = [
migrations.AlterField(
model_name="expense",
name="approved",
... | 30.3125 | 155 | 0.565979 |
79527584e7406ad4cdd51a45acf9f943279c5990 | 1,746 | py | Python | examples/event_listener_modern.py | Solotov/panoramisk | 04e90b5972788e47c678bbd86f2de16048fa8de6 | [
"MIT"
] | null | null | null | examples/event_listener_modern.py | Solotov/panoramisk | 04e90b5972788e47c678bbd86f2de16048fa8de6 | [
"MIT"
] | null | null | null | examples/event_listener_modern.py | Solotov/panoramisk | 04e90b5972788e47c678bbd86f2de16048fa8de6 | [
"MIT"
] | null | null | null | import asyncio
import logging
import os
from panoramisk import Manager, Message
manager = Manager(
host=os.getenv('AMI_HOST', '127.0.0.1'),
port=os.getenv('AMI_PORT', 5038),
username=os.getenv('AMI_USERNAME', 'user'),
secret=os.getenv('AMI_SECRET', 'password'),
ping_delay=10, # Delay after start... | 26.861538 | 87 | 0.667812 |
7952766da6086698fbd6c44b7d836aab65ab99c2 | 1,767 | py | Python | Coloring/learning/ppo/utils/arguments.py | zarahz/MARL-and-Markets | 3591a160e098e7251b9e7c7b59c6d0ab08ba0779 | [
"MIT"
] | 1 | 2022-03-12T09:17:32.000Z | 2022-03-12T09:17:32.000Z | Coloring/learning/ppo/utils/arguments.py | zarahz/MARL-and-Markets | 3591a160e098e7251b9e7c7b59c6d0ab08ba0779 | [
"MIT"
] | null | null | null | Coloring/learning/ppo/utils/arguments.py | zarahz/MARL-and-Markets | 3591a160e098e7251b9e7c7b59c6d0ab08ba0779 | [
"MIT"
] | null | null | null | import argparse
def get_train_args(parser):
'''
Add PPO relevant training arguments to the parser.
'''
# epochs range(3,30), wie oft anhand der experience gelernt wird
parser.add_argument("--epochs", type=int, default=4,
help="[PPO] Number of epochs for PPO optimization. (... | 49.083333 | 150 | 0.625354 |
795276e0a7aa3ca3eded03e1fa003c1803fbef19 | 39,715 | py | Python | Lib/test/test_imaplib.py | fongchinghinunsw/cpython | 19926d058dc33856631c6c6b3fcb45b04fcab666 | [
"CNRI-Python-GPL-Compatible"
] | 3 | 2020-01-18T05:06:26.000Z | 2020-06-16T07:33:52.000Z | Lib/test/test_imaplib.py | fongchinghinunsw/cpython | 19926d058dc33856631c6c6b3fcb45b04fcab666 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2020-01-01T13:39:13.000Z | 2020-01-01T13:39:13.000Z | Lib/test/test_imaplib.py | fongchinghinunsw/cpython | 19926d058dc33856631c6c6b3fcb45b04fcab666 | [
"CNRI-Python-GPL-Compatible"
] | 1 | 2020-01-01T13:46:42.000Z | 2020-01-01T13:46:42.000Z | from test import support
from contextlib import contextmanager
import imaplib
import os.path
import socketserver
import time
import calendar
import threading
import socket
from test.support import (reap_threads, verbose, transient_internet,
run_with_tz, run_with_locale, cpython_only,
... | 39.01277 | 82 | 0.599673 |
7952780fb1c8fa0e91e8f7f062bc73f4d2c43130 | 6,932 | gyp | Python | ion/external/freeglut.gyp | RobLoach/ion | 9e659416fb04bb3d3a67df1e018d7c2ccab9d468 | [
"Apache-2.0"
] | null | null | null | ion/external/freeglut.gyp | RobLoach/ion | 9e659416fb04bb3d3a67df1e018d7c2ccab9d468 | [
"Apache-2.0"
] | null | null | null | ion/external/freeglut.gyp | RobLoach/ion | 9e659416fb04bb3d3a67df1e018d7c2ccab9d468 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 32.24186 | 82 | 0.525822 |
79527a747d0bdc574a6ee0bf2d481636d25d00cb | 11,233 | py | Python | topi/python/topi/x86/conv2d_int8.py | zhanghaohit/incubator-tvm | ee0af843f3c5a3429e888079afb5f30789bd9bee | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 2 | 2019-01-07T06:00:27.000Z | 2019-02-28T15:07:16.000Z | topi/python/topi/x86/conv2d_int8.py | zhanghaohit/incubator-tvm | ee0af843f3c5a3429e888079afb5f30789bd9bee | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 4 | 2021-03-30T11:59:59.000Z | 2022-03-12T00:40:23.000Z | topi/python/topi/x86/conv2d_int8.py | zhanghaohit/incubator-tvm | ee0af843f3c5a3429e888079afb5f30789bd9bee | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 3 | 2021-07-20T07:40:15.000Z | 2021-08-03T08:39:17.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 41.603704 | 99 | 0.62165 |
79527bfc6710346163d034728c64bb7abd8fef2b | 1,056 | py | Python | 06.py | rubenhortas/python_challenge | b20041049421c1a28357065c91c84fd101c8ec78 | [
"MIT"
] | null | null | null | 06.py | rubenhortas/python_challenge | b20041049421c1a28357065c91c84fd101c8ec78 | [
"MIT"
] | null | null | null | 06.py | rubenhortas/python_challenge | b20041049421c1a28357065c91c84fd101c8ec78 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# http://www.pythonchallenge.com/pc/def/channel.html
import signal
from zipfile import ZipFile
from handlers.python import exit_signal_handler
# noinspection PyShadowingNames
def get_next_file(i, zf, file_name, result):
is_last = True
try:
file_words = zf.read(file_name).split()
... | 24.55814 | 82 | 0.619318 |
79527cad6b50203de24bb9d863b8b7772c6881d9 | 588 | py | Python | tiny_app/migrations/0015_auto_20160125_1130.py | DJMedhaug/tiny_spot | ddae45bb6bbb62c4e5f9f0baf9c3c82b0bd3cb99 | [
"MIT"
] | null | null | null | tiny_app/migrations/0015_auto_20160125_1130.py | DJMedhaug/tiny_spot | ddae45bb6bbb62c4e5f9f0baf9c3c82b0bd3cb99 | [
"MIT"
] | null | null | null | tiny_app/migrations/0015_auto_20160125_1130.py | DJMedhaug/tiny_spot | ddae45bb6bbb62c4e5f9f0baf9c3c82b0bd3cb99 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('tiny_app', '0014_auto_20160125_1115'),
]
operations = [
migrations.RemoveField(
model_name='images',
... | 20.275862 | 48 | 0.534014 |
79527d4d34dca82441d22ab61590c529661f0521 | 2,137 | py | Python | tests/functional/tasks/test_task310.py | SergeyNazarovSam/SergeyPythonfirst | fd2bddf1f5ba28c6802be921177917f369f7ef2e | [
"MIT"
] | 2 | 2020-12-17T20:19:21.000Z | 2020-12-22T12:46:43.000Z | tests/functional/tasks/test_task310.py | alexander-sidorov/tms-z43 | 61ecd204f5de4e97ff0300f6ef91c36c2bcda31c | [
"MIT"
] | 4 | 2021-04-20T08:40:30.000Z | 2022-02-10T07:50:30.000Z | tests/functional/tasks/test_task310.py | SergeyNazarovSam/SergeyPythonfirst | fd2bddf1f5ba28c6802be921177917f369f7ef2e | [
"MIT"
] | 1 | 2021-02-10T06:42:19.000Z | 2021-02-10T06:42:19.000Z | import pytest
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait
from tests.functional.pages import Task310Page
from tests.functional.utils import screenshot_on_failure
@pytest.fixtur... | 27.050633 | 75 | 0.65372 |
79527d9d557be492f7c58aa482433913fb074586 | 3,600 | py | Python | homeassistant/components/withings/const.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 3 | 2020-01-21T18:09:09.000Z | 2022-01-17T08:06:03.000Z | homeassistant/components/withings/const.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | homeassistant/components/withings/const.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 4 | 2019-10-15T21:03:53.000Z | 2020-05-27T19:53:20.000Z | """Constants used by the Withings component."""
import homeassistant.const as const
DATA_MANAGER = "data_manager"
BASE_URL = "base_url"
CLIENT_ID = "client_id"
CLIENT_SECRET = "client_secret"
CODE = "code"
CONFIG = "config"
CREDENTIALS = "credentials"
DOMAIN = "withings"
LOG_NAMESPACE = "homeassistant.components.with... | 34.615385 | 72 | 0.848056 |
79527dd1fda6a95036b82bd332fd9c2d37965b59 | 2,440 | py | Python | azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/express_route_service_provider.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure/mgmt/network/v2017_10_01/models/express_route_service_provider.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 2 | 2016-09-30T21:40:24.000Z | 2017-11-10T18:16:18.000Z | azure/mgmt/network/v2017_10_01/models/express_route_service_provider.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.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.
# Changes ... | 40 | 132 | 0.636885 |
79527e1f83321c6621bf1f3bc8cda56c294dbb64 | 2,571 | py | Python | pysofe/spaces/functions.py | pysofe/pysofe | 088d4061fcf194a85ff3332e7bdd3bde095e4f69 | [
"BSD-3-Clause"
] | null | null | null | pysofe/spaces/functions.py | pysofe/pysofe | 088d4061fcf194a85ff3332e7bdd3bde095e4f69 | [
"BSD-3-Clause"
] | null | null | null | pysofe/spaces/functions.py | pysofe/pysofe | 088d4061fcf194a85ff3332e7bdd3bde095e4f69 | [
"BSD-3-Clause"
] | null | null | null | """
Provides convinience classes for functions in the fem framework.
"""
# IMPORTS
import numpy as np
# DEBUGGING
from IPython import embed as IPS
class FEFunction(object):
'''
A finite element function defined via degrees of freedoms.
Parameters
----------
fe_space : pysofe.spaces.space.FESpac... | 28.88764 | 94 | 0.572929 |
79527ef3b672bf80a0fe21b3c993d803710a4eda | 4,478 | py | Python | helper.py | jeffhsu3/BERMUDA | 1e1e031b7dc59bca98a494729f151905bf05e13b | [
"MIT"
] | 31 | 2019-05-19T04:11:29.000Z | 2021-07-04T13:27:34.000Z | helper.py | jeffhsu3/BERMUDA | 1e1e031b7dc59bca98a494729f151905bf05e13b | [
"MIT"
] | 10 | 2019-05-23T12:18:04.000Z | 2021-08-02T07:19:56.000Z | helper.py | jeffhsu3/BERMUDA | 1e1e031b7dc59bca98a494729f151905bf05e13b | [
"MIT"
] | 8 | 2019-08-14T06:38:58.000Z | 2021-05-13T01:11:52.000Z | # !/usr/bin/env python
import numpy as np
from sklearn.decomposition import PCA
import umap
import matplotlib.pyplot as plt
# 9-class Set1, for plotting data with qualitative labels
color_dict = {0:'#e41a1c', 1:'#377eb8', 2:'#4daf4a', 3: '#984ea3', 4:'#ff7f00',
5:'#ffff33', 6:'#a65628', 7:'#f781bf', 8:'#... | 36.112903 | 126 | 0.649397 |
79527f7a130817184181220d09ca4a2dbc6f99e2 | 4,498 | py | Python | python/paddle/fluid/tests/unittests/ipu/test_scaled_optimizer_state_ipu.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 11 | 2016-08-29T07:43:26.000Z | 2016-08-29T07:51:24.000Z | python/paddle/fluid/tests/unittests/ipu/test_scaled_optimizer_state_ipu.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/ipu/test_scaled_optimizer_state_ipu.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-09-24T11:23:36.000Z | 2021-09-24T11:23:36.000Z | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 32.128571 | 74 | 0.585371 |
79527f9a77c3dee4d48d99abfb67fd634c5d2bc5 | 1,226 | py | Python | class3/exercise4/exercise4.py | papri-entropy/nornir-course | 122c5ecce19cca6c17a1eec0066be7c6b58e6eb5 | [
"MIT"
] | 1 | 2020-06-23T06:36:43.000Z | 2020-06-23T06:36:43.000Z | class3/exercise4/exercise4.py | papri-entropy/nornir-course | 122c5ecce19cca6c17a1eec0066be7c6b58e6eb5 | [
"MIT"
] | null | null | null | class3/exercise4/exercise4.py | papri-entropy/nornir-course | 122c5ecce19cca6c17a1eec0066be7c6b58e6eb5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# import general use modules
import os
from pprint import pprint as pp
# import nornir specifics
from nornir import InitNornir
from nornir.plugins.functions.text import print_result
from nornir.plugins.tasks.networking import netmiko_send_command
from nornir.core.filter import F
def main():
... | 27.863636 | 115 | 0.639478 |
7952801d0cbae4b3b05bd9f69fbda5acd7d86462 | 475 | py | Python | modulo 02/multiprocess/multi_simple.py | p-g-krish/CursoSecurityToolsPython | 7b2205a33d23166a37a6b8105b9ca5863855aa85 | [
"Apache-2.0"
] | 10 | 2020-02-13T03:14:29.000Z | 2021-09-16T04:32:40.000Z | modulo 02/multiprocess/multi_simple.py | p-g-krish/CursoSecurityToolsPython | 7b2205a33d23166a37a6b8105b9ca5863855aa85 | [
"Apache-2.0"
] | null | null | null | modulo 02/multiprocess/multi_simple.py | p-g-krish/CursoSecurityToolsPython | 7b2205a33d23166a37a6b8105b9ca5863855aa85 | [
"Apache-2.0"
] | 4 | 2020-02-18T23:42:23.000Z | 2021-09-10T05:52:09.000Z | from multiprocessing import Process
import os
def info(title):
print(title)
print('module name:', __name__)
if hasattr(os, 'getppid'): # only available on Unix
print('parent process:', os.getppid())
print('process id:', os.getpid())
def f(name):
info('function f')
print('h... | 23.75 | 57 | 0.585263 |
7952809d505ad324fe3145d8a6a6cf19f1eb26da | 8,050 | py | Python | tests/test_models.py | deluge/django-pushify | 5c00f606f112cbf4c3647e6d9064d2b1860a7d49 | [
"BSD-3-Clause"
] | 3 | 2018-04-30T10:30:33.000Z | 2018-12-14T22:54:18.000Z | tests/test_models.py | deluge/django-pushify | 5c00f606f112cbf4c3647e6d9064d2b1860a7d49 | [
"BSD-3-Clause"
] | 5 | 2020-02-11T23:36:55.000Z | 2020-10-15T07:29:40.000Z | tests/test_models.py | deluge/django-pushify | 5c00f606f112cbf4c3647e6d9064d2b1860a7d49 | [
"BSD-3-Clause"
] | 1 | 2016-02-10T07:03:39.000Z | 2016-02-10T07:03:39.000Z | from unittest import mock
import pytest
from django.core.exceptions import ImproperlyConfigured
from howl.models import Alert, do_operator_setup
from tests.factories.observers import AlertFactory, ObserverFactory
from tests.resources.models import OperatorTestModel
@pytest.mark.django_db
class TestOperatorSetup:
... | 35.9375 | 84 | 0.66559 |
795280a3ad5ceea47cf09736fbb4e7f25a05798a | 4,607 | py | Python | task_16/task.py | prashnts/advent-of-code--2021 | 315fcf470c8c1260057aeafa6d2c42f4c0f74f3f | [
"MIT"
] | null | null | null | task_16/task.py | prashnts/advent-of-code--2021 | 315fcf470c8c1260057aeafa6d2c42f4c0f74f3f | [
"MIT"
] | null | null | null | task_16/task.py | prashnts/advent-of-code--2021 | 315fcf470c8c1260057aeafa6d2c42f4c0f74f3f | [
"MIT"
] | null | null | null | import os
from collections import namedtuple
__here__ = os.path.dirname(__file__)
TEST_DATA_0 = 'D2FE28'
TEST_DATA_1 = '8A004A801A8002F478'
TEST_DATA_2 = '620080001611562C8802118E34'
TEST_DATA_3 = 'C0015000016115A2E0802F182340'
TEST_DATA_4 = 'A0016C880162017C3686B18A3D4780'
Packet = namedtuple('Packet', ['version... | 29.343949 | 73 | 0.626004 |
7952835fd372bed630441c5724f6c0ad5034c18f | 1,788 | py | Python | experiments/graph_coloring/datasets/mutils.py | achinta/CategoricalNF | d8717a037e8f13641e9d9a89abf66fba38e23f91 | [
"MIT"
] | 47 | 2020-06-20T10:00:39.000Z | 2022-03-08T13:41:45.000Z | experiments/graph_coloring/datasets/mutils.py | achinta/CategoricalNF | d8717a037e8f13641e9d9a89abf66fba38e23f91 | [
"MIT"
] | 1 | 2020-07-05T20:58:19.000Z | 2020-09-08T12:45:29.000Z | experiments/graph_coloring/datasets/mutils.py | achinta/CategoricalNF | d8717a037e8f13641e9d9a89abf66fba38e23f91 | [
"MIT"
] | 10 | 2020-07-05T17:18:40.000Z | 2022-01-07T03:17:40.000Z | import torch
import torch.utils.data as data
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from statistics import mean, median, stdev
class BucketSampler(data.Sampler):
def __init__(self, dataset, batch_size, len_step=1):
super().__init__(dataset)
self.dataset = dataset
self.batch_siz... | 29.311475 | 85 | 0.723154 |
795283b71cc63898412fd2fcff6c640bf430a0ff | 14,997 | py | Python | imageAAE/PPAPGAN/cifar10_PPAPGAN.py | tgisaturday/DP_AAE | 3d6afa549731410156c60ff01cba9b8498bc2436 | [
"MIT"
] | 1 | 2020-02-26T07:24:52.000Z | 2020-02-26T07:24:52.000Z | imageAAE/PPAPGAN/cifar10_PPAPGAN.py | tgisaturday/DP_AAE | 3d6afa549731410156c60ff01cba9b8498bc2436 | [
"MIT"
] | null | null | null | imageAAE/PPAPGAN/cifar10_PPAPGAN.py | tgisaturday/DP_AAE | 3d6afa549731410156c60ff01cba9b8498bc2436 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.python.keras._impl.keras.datasets.cifar10 import load_data
import numpy as np
import matplotlib.pyplot as plt
plt.switch_backend('agg')
import matplotlib.gridspec as gridspec
import os
import math
import cv2
import time
from scipy.misc import toimage
from utils import add_noise_t... | 41.428177 | 139 | 0.647263 |
79528431be28965ec70bce50b9271cdd080eb83c | 47,394 | py | Python | fiftyone/core/aggregations.py | Site-Command/fiftyone | 5bfea96d2aba037e77b189d0ba3713e1b87ef654 | [
"Apache-2.0"
] | 1 | 2021-06-10T11:46:56.000Z | 2021-06-10T11:46:56.000Z | fiftyone/core/aggregations.py | Site-Command/fiftyone | 5bfea96d2aba037e77b189d0ba3713e1b87ef654 | [
"Apache-2.0"
] | null | null | null | fiftyone/core/aggregations.py | Site-Command/fiftyone | 5bfea96d2aba037e77b189d0ba3713e1b87ef654 | [
"Apache-2.0"
] | null | null | null | """
Aggregations.
| Copyright 2017-2021, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
|
"""
from copy import deepcopy
import numpy as np
import eta.core.utils as etau
import fiftyone.core.expressions as foe
from fiftyone.core.expressions import ViewField as F
import fiftyone.core.media as fom
class Aggre... | 30.072335 | 125 | 0.553741 |
795284854d94d6e4b131fd616c742fa85e44442d | 901 | py | Python | club/migrations/0021_auto_20191226_1715.py | DSC-RPI/dsc-portal | bf2d0c067d10dd199317ccc00863d85db0d07094 | [
"MIT"
] | 2 | 2020-01-29T20:14:35.000Z | 2020-02-15T23:01:42.000Z | club/migrations/0021_auto_20191226_1715.py | DSC-RPI/dsc-portal | bf2d0c067d10dd199317ccc00863d85db0d07094 | [
"MIT"
] | 62 | 2019-11-26T17:47:58.000Z | 2022-01-13T02:05:51.000Z | club/migrations/0021_auto_20191226_1715.py | DSC-RPI/dsc-portal | bf2d0c067d10dd199317ccc00863d85db0d07094 | [
"MIT"
] | 1 | 2020-01-23T17:12:38.000Z | 2020-01-23T17:12:38.000Z | # Generated by Django 3.0.1 on 2019-12-26 22:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('club', '0020_eventrsvp'),
]
operations = [
migrations.RemoveField(
model_name='event',
name='presentation_link',
... | 32.178571 | 214 | 0.619312 |
795284c8fef20df4e9d6d58a822dba32e7026ac8 | 3,376 | py | Python | openerp/addons/account/wizard/account_use_model.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 3 | 2016-01-29T14:39:49.000Z | 2018-12-29T22:42:00.000Z | openerp/addons/account/wizard/account_use_model.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 2 | 2016-03-23T14:29:41.000Z | 2017-02-20T17:11:30.000Z | openerp/addons/account/wizard/account_use_model.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | 43.844156 | 157 | 0.585012 |
795285583964dc2ca50270134393dc7f82e0f21c | 4,176 | py | Python | API/src/main/resources/Lib/robot/running/__init__.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/running/__init__.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/running/__init__.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
#
# 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... | 40.153846 | 96 | 0.755268 |
795285cdf03b581ac379000a611963bf2f0aeb15 | 1,959 | py | Python | tests/cli/conftest.py | mmchougule/kedro | 6a04ab1f7b6b943008e298d41624a79c04a8ff8c | [
"Apache-2.0"
] | null | null | null | tests/cli/conftest.py | mmchougule/kedro | 6a04ab1f7b6b943008e298d41624a79c04a8ff8c | [
"Apache-2.0"
] | null | null | null | tests/cli/conftest.py | mmchougule/kedro | 6a04ab1f7b6b943008e298d41624a79c04a8ff8c | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2019 QuantumBlack Visual Analytics Limited
#
# 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
#
# THE SOFTWARE IS PROVIDED "AS IS"... | 39.18 | 77 | 0.771312 |
795285d260c0372d12a9a7e26a2e218533b59cfb | 950 | py | Python | tests/numpy/assignment_test.py | xiacijie/dace | 2d942440b1d7b139ba112434bfa78f754e10bfe5 | [
"BSD-3-Clause"
] | 1 | 2021-07-26T07:58:06.000Z | 2021-07-26T07:58:06.000Z | tests/numpy/assignment_test.py | xiacijie/dace | 2d942440b1d7b139ba112434bfa78f754e10bfe5 | [
"BSD-3-Clause"
] | null | null | null | tests/numpy/assignment_test.py | xiacijie/dace | 2d942440b1d7b139ba112434bfa78f754e10bfe5 | [
"BSD-3-Clause"
] | 1 | 2021-03-04T13:01:48.000Z | 2021-03-04T13:01:48.000Z | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import dace
import numpy as np
def test_multiassign():
@dace.program
def multiassign(A: dace.float64[20], B: dace.float64[1],
C: dace.float64[2]):
tmp = C[0] = A[5]
B[0] = tmp
A = np.random.ran... | 22.619048 | 75 | 0.562105 |
7952867b7a1e0dee470825aee2549ae7d361a615 | 6,733 | py | Python | python/test/test_game_state.py | omardelarosa/godot-python-demo-game | c9c91b2a8e838c315dae6d6d597ce75a20318747 | [
"CC-BY-3.0"
] | null | null | null | python/test/test_game_state.py | omardelarosa/godot-python-demo-game | c9c91b2a8e838c315dae6d6d597ce75a20318747 | [
"CC-BY-3.0"
] | null | null | null | python/test/test_game_state.py | omardelarosa/godot-python-demo-game | c9c91b2a8e838c315dae6d6d597ce75a20318747 | [
"CC-BY-3.0"
] | null | null | null | from python.lib.events import Events
from python.lib.board_state import BoardState
from python.lib.game_state import GameState
from unittest.mock import MagicMock
from collections import Counter
from .constants import (
DEFAULT_EXPECTED_OUTPUT_GRID_MAP,
DEFAULT_ELEVATION_MAP,
DEFAULT_ELEVATION_MAP_SHAPE,
)... | 27.822314 | 84 | 0.592455 |
795286e6c4d68a7895a662a1b66cd74796d95c8a | 119 | py | Python | problems/Codeforces/A. Ehab Fails to Be Thanos.py | jspw/Basic_Python | aa159f576a471c6deebdf1e5f462dfc9ffb4930b | [
"Unlicense"
] | 6 | 2020-06-25T14:52:09.000Z | 2021-08-05T20:54:15.000Z | problems/Codeforces/A. Ehab Fails to Be Thanos.py | jspw/Basic_Python | aa159f576a471c6deebdf1e5f462dfc9ffb4930b | [
"Unlicense"
] | null | null | null | problems/Codeforces/A. Ehab Fails to Be Thanos.py | jspw/Basic_Python | aa159f576a471c6deebdf1e5f462dfc9ffb4930b | [
"Unlicense"
] | null | null | null | n=int(input())
l=sorted(list(map(int,input().split())))
if l[0]==l[-1]:
print(-1)
else :
l.sort()
print(*l) | 17 | 40 | 0.529412 |
7952876c1c0dd5c3b60b0b613ba4ac4f86bc93d9 | 5,137 | py | Python | lib/focaltouch.py | szczys/st7789_mpy | bc854ec453d7644ce1773f7ed4d41504f37d376b | [
"MIT"
] | 153 | 2020-02-02T11:03:14.000Z | 2022-03-30T05:47:07.000Z | lib/focaltouch.py | skylin008/st7789_mpy | f304991fc5558be653df5f0de928494b85cbc60d | [
"MIT"
] | 58 | 2020-04-11T23:23:02.000Z | 2022-03-26T20:45:23.000Z | lib/focaltouch.py | skylin008/st7789_mpy | f304991fc5558be653df5f0de928494b85cbc60d | [
"MIT"
] | 50 | 2020-02-02T11:05:23.000Z | 2022-03-22T15:24:42.000Z | # The MIT License (MIT)
#
# Copyright (c) 2017 ladyada for adafruit industries
#
# 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
#... | 32.929487 | 79 | 0.648628 |
7952877367eb3250754b22940bea511418ee9af9 | 620 | py | Python | app/members/admin.py | FinalProject-Team4/Server_DaangnMarket | 258eb8c79fcbed69d516f521e6194cac7b315a58 | [
"MIT"
] | 1 | 2020-06-20T12:52:07.000Z | 2020-06-20T12:52:07.000Z | app/members/admin.py | FinalProject-Team4/Server_DaangnMarket | 258eb8c79fcbed69d516f521e6194cac7b315a58 | [
"MIT"
] | 34 | 2020-03-16T12:09:14.000Z | 2021-04-08T20:23:42.000Z | app/members/admin.py | FinalProject-Team4/Server_DaangnMarket | 258eb8c79fcbed69d516f521e6194cac7b315a58 | [
"MIT"
] | 2 | 2020-03-22T06:45:39.000Z | 2020-03-22T06:55:11.000Z | from django.contrib import admin
from .models import User, SelectedLocation
@admin.register(User)
class MembersAdmin(admin.ModelAdmin):
list_display = ['username', 'phone', 'avatar']
list_filter = ['username', 'created', 'updated']
search_fields = ['username', 'phone']
fields = ('uid', 'username', 'ph... | 31 | 78 | 0.685484 |
795287be0cc014c0e5cdf118dff4abd34eff118c | 15,661 | py | Python | lib/datasets/comic.py | PhoneSix/Domain-Contrast | 5c674b581bce9beacf5bc0dd13113f33c4050495 | [
"MIT"
] | 4 | 2021-07-31T01:04:15.000Z | 2022-03-09T07:23:10.000Z | lib/datasets/comic.py | PhoneSix/Domain-Contrast | 5c674b581bce9beacf5bc0dd13113f33c4050495 | [
"MIT"
] | null | null | null | lib/datasets/comic.py | PhoneSix/Domain-Contrast | 5c674b581bce9beacf5bc0dd13113f33c4050495 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# ----------------------------------------------------... | 39.748731 | 88 | 0.544921 |
795288a84376f9da54f13f0e7e81cd55de4b4b58 | 2,791 | py | Python | superset/dashboards/commands/delete.py | AmritaTech/superset | c685c9ea8fa70ba6646617d0a272c11e1130081c | [
"Apache-2.0"
] | 44 | 2021-04-14T10:53:36.000Z | 2021-09-11T00:29:50.000Z | superset/dashboards/commands/delete.py | AmritaTech/superset | c685c9ea8fa70ba6646617d0a272c11e1130081c | [
"Apache-2.0"
] | 77 | 2020-02-02T07:54:13.000Z | 2022-03-23T18:22:04.000Z | superset/dashboards/commands/delete.py | AmritaTech/superset | c685c9ea8fa70ba6646617d0a272c11e1130081c | [
"Apache-2.0"
] | 15 | 2019-04-29T05:38:31.000Z | 2022-02-12T10:47:54.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 38.232877 | 88 | 0.73522 |
795288afea901a1773f78721bd3b16d2bd93da9e | 960 | py | Python | 11_data_science/pdf/test_pdf.py | edgardeng/python-advance-interview | 59fd7bee8e871acdc7fdfecf2a110db840c47ebb | [
"Apache-2.0"
] | 1 | 2022-03-06T13:03:56.000Z | 2022-03-06T13:03:56.000Z | 11_data_science/pdf/test_pdf.py | edgardeng/python-advance-interview | 59fd7bee8e871acdc7fdfecf2a110db840c47ebb | [
"Apache-2.0"
] | null | null | null | 11_data_science/pdf/test_pdf.py | edgardeng/python-advance-interview | 59fd7bee8e871acdc7fdfecf2a110db840c47ebb | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @author: edgardeng
# @date: 2021-05-25
# @file: demo fo PyPDF4
import PyPDF4
def read_pdf(path_file):
with open(path_file, 'rb') as file:
reader = PyPDF4.PdfFileReader(file)
information = reader.getDocumentInfo()
number_of_pages = reader.numPages
txt... | 24.615385 | 68 | 0.586458 |
795288b10818070e31cc0b3233e82812d971a819 | 1,414 | py | Python | venv/lib/python3.8/site-packages/vsts/test/v4_0/models/points_filter.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/test/v4_0/models/points_filter.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/test/v4_0/models/points_filter.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | 41.588235 | 95 | 0.534653 |
79528ac5eb9627b93487a7ff93f3cd0524d909a0 | 10,814 | py | Python | src/oci/apm_synthetics/models/update_script_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/apm_synthetics/models/update_script_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/apm_synthetics/models/update_script_details.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... | 37.161512 | 245 | 0.65369 |
79528b13a7d3e35e791aa2ed720aca24f869f998 | 7,291 | py | Python | env/lib/python3.6/site-packages/dipy/tracking/tests/test_life.py | Raniac/NEURO-LEARN | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | env/lib/python3.6/site-packages/dipy/tracking/tests/test_life.py | Raniac/neurolearn_dev | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | env/lib/python3.6/site-packages/dipy/tracking/tests/test_life.py | Raniac/NEURO-LEARN | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | [
"Apache-2.0"
] | 1 | 2020-07-17T12:49:49.000Z | 2020-07-17T12:49:49.000Z | import os
import os.path as op
import numpy as np
import numpy.testing as npt
import numpy.testing.decorators as dec
import scipy.sparse as sps
import scipy.linalg as la
import nibabel as nib
import dipy.tracking.life as life
import dipy.tracking.eudx as edx
import dipy.core.sphere as dps
import dipy.core.gradients ... | 38.989305 | 78 | 0.583185 |
79528baf61119fd053ccc4e147226145b0cca41d | 381 | py | Python | ramda/difference.py | zydmayday/pamda | 6740d0294f3bedbeeef3bbc3042a43dceb3239b2 | [
"MIT"
] | 1 | 2022-03-14T07:35:13.000Z | 2022-03-14T07:35:13.000Z | ramda/difference.py | zydmayday/pamda | 6740d0294f3bedbeeef3bbc3042a43dceb3239b2 | [
"MIT"
] | 3 | 2022-03-24T02:30:18.000Z | 2022-03-31T07:46:04.000Z | ramda/difference.py | zydmayday/pamda | 6740d0294f3bedbeeef3bbc3042a43dceb3239b2 | [
"MIT"
] | null | null | null | from .private._curry2 import _curry2
from .private._Set import _Set
def inner_difference(first, second):
out = []
idx = 0
toFilterOut = _Set()
for item in second:
toFilterOut.add(item)
firstLen = len(first)
while idx < firstLen:
if toFilterOut.add(first[idx]):
out.append(first[idx])
idx... | 17.318182 | 38 | 0.682415 |
79528ca1a2e970007f6cfbff361329f70b7e427a | 1,196 | py | Python | project-euler/python/p0008.py | sanchopanca/coding-for-pleasure | fed1910e8a5a4241bd55aed333afd79b4405a71d | [
"MIT"
] | null | null | null | project-euler/python/p0008.py | sanchopanca/coding-for-pleasure | fed1910e8a5a4241bd55aed333afd79b4405a71d | [
"MIT"
] | null | null | null | project-euler/python/p0008.py | sanchopanca/coding-for-pleasure | fed1910e8a5a4241bd55aed333afd79b4405a71d | [
"MIT"
] | null | null | null | from math import prod
number = """
73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614... | 38.580645 | 50 | 0.91806 |
79528d7d344dc49cbed42df1664f6a692dec44fe | 2,776 | py | Python | custom_components/rika_firenet/switch.py | antibill51/rika-firenet-custom-component | ad81d12a466d953148ebbb1440f5fd8d81edd1d2 | [
"MIT"
] | 2 | 2022-02-05T11:53:23.000Z | 2022-02-19T23:55:56.000Z | custom_components/rika_firenet/switch.py | antibill51/rika-firenet-custom-component | ad81d12a466d953148ebbb1440f5fd8d81edd1d2 | [
"MIT"
] | null | null | null | custom_components/rika_firenet/switch.py | antibill51/rika-firenet-custom-component | ad81d12a466d953148ebbb1440f5fd8d81edd1d2 | [
"MIT"
] | null | null | null | import logging
from homeassistant.components.switch import SwitchEntity
from .entity import RikaFirenetEntity
from .const import (
DOMAIN
)
from .core import RikaFirenetCoordinator
from .core import RikaFirenetStove
_LOGGER = logging.getLogger(__name__)
DEVICE_SWITCH = [
"on off",
"convection fan1",
... | 31.191011 | 107 | 0.651297 |
79528ee2ad62316b8efee0a688f407487e60375c | 8,649 | py | Python | docs/conf.py | davidbrochart/pythran | 24b6c8650fe99791a4091cbdc2c24686e86aa67c | [
"BSD-3-Clause"
] | 1 | 2020-07-21T10:01:20.000Z | 2020-07-21T10:01:20.000Z | docs/conf.py | davidbrochart/pythran | 24b6c8650fe99791a4091cbdc2c24686e86aa67c | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | davidbrochart/pythran | 24b6c8650fe99791a4091cbdc2c24686e86aa67c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Pythran documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 19 20:57:04 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... | 30.561837 | 80 | 0.695109 |
79528f67fe1003dab91a44d69ce6d8fcbfed3355 | 5,219 | py | Python | sdk/python/pulumi_azure_native/web/v20200601/get_web_app_swift_virtual_network_connection_slot.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20200601/get_web_app_swift_virtual_network_connection_slot.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20200601/get_web_app_swift_virtual_network_connection_slot.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"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.947761 | 189 | 0.659513 |
79529003da7a418a0558b57b04454fe0386abc9b | 481 | py | Python | config/main.py | elmsantospy/tests_kivy | 290441ec090975e3bf8c1379b251e5912317cc82 | [
"MIT"
] | null | null | null | config/main.py | elmsantospy/tests_kivy | 290441ec090975e3bf8c1379b251e5912317cc82 | [
"MIT"
] | null | null | null | config/main.py | elmsantospy/tests_kivy | 290441ec090975e3bf8c1379b251e5912317cc82 | [
"MIT"
] | null | null | null | from kivymd.app import MDApp
from mixinmain import MixinMain
import config
import rootwidget
from kivy.properties import BooleanProperty
class MainApp(MDApp, MixinMain):
def __init__(self, **kwargs):
super().__init__(**kwargs)
# self.borderless_status = BooleanProperty(config.borderless_status)
... | 20.913043 | 76 | 0.711019 |
795290363b2b7b6e47748e725a390a7f16332905 | 5,445 | py | Python | MRPO/examples/plot_heatmaps.py | hai-h-nguyen/pomdp-baselines | 629180d56641810d99653a116cca41ede65172eb | [
"MIT"
] | 40 | 2021-10-15T14:53:00.000Z | 2022-03-31T02:27:20.000Z | MRPO/examples/plot_heatmaps.py | hai-h-nguyen/pomdp-baselines | 629180d56641810d99653a116cca41ede65172eb | [
"MIT"
] | 1 | 2022-03-13T04:02:30.000Z | 2022-03-13T04:02:30.000Z | MRPO/examples/plot_heatmaps.py | hai-h-nguyen/pomdp-baselines | 629180d56641810d99653a116cca41ede65172eb | [
"MIT"
] | 5 | 2021-11-28T04:08:13.000Z | 2022-03-17T02:33:51.000Z | """Plot heatmaps of evaluation results."""
import argparse
import itertools
import json
import os
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from scipy.interpolate import griddata
import scipy.spatial
CELL_AGGREGATIONS = {
"mean": np.mean,
"min": np.min,
"max": np.max,
}
if __na... | 36.3 | 110 | 0.514233 |
795290daed599d6dc369ab32873b3ae472bc12a0 | 5,259 | py | Python | hyde/tests/test_model.py | dcode/hyde | 7ce58157a9e74cc767cd602097441b8424a2052f | [
"MIT"
] | 1 | 2019-01-03T00:52:22.000Z | 2019-01-03T00:52:22.000Z | hyde/tests/test_model.py | eliethesaiyan/hyde | 7ce58157a9e74cc767cd602097441b8424a2052f | [
"MIT"
] | null | null | null | hyde/tests/test_model.py | eliethesaiyan/hyde | 7ce58157a9e74cc767cd602097441b8424a2052f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Use nose
`$ pip install nose`
`$ nosetests`
"""
from hyde.model import Config, Expando
from hyde.fs import *
def test_expando_one_level():
d = {"a": 123, "b": "abc"}
x = Expando(d)
assert x.a == d['a']
assert x.b == d['b']
def test_expando_two_levels():
d = {"a": 123, "... | 33.075472 | 85 | 0.590607 |
795291de9d99efbff12609e571f8bb8bb3ba49d2 | 822 | py | Python | env/lib/python3.8/site-packages/JavaScriptCore/__init__.py | evilcomputer12/macOSAutoJoinAndRecordZoomSession | 2157de803c1d67fe493ff330f1558892507e8e49 | [
"MIT"
] | 2 | 2021-08-11T15:50:12.000Z | 2021-09-03T17:53:47.000Z | env/lib/python3.8/site-packages/JavaScriptCore/__init__.py | evilcomputer12/macOSAutoJoinAndRecordZoomSession | 2157de803c1d67fe493ff330f1558892507e8e49 | [
"MIT"
] | null | null | null | env/lib/python3.8/site-packages/JavaScriptCore/__init__.py | evilcomputer12/macOSAutoJoinAndRecordZoomSession | 2157de803c1d67fe493ff330f1558892507e8e49 | [
"MIT"
] | null | null | null | """
Python mapping for the JavaScriptCore framework.
This module does not contain docstrings for the wrapped code, check Apple's
documentation for details on how to use these functions and classes.
"""
import sys
import CoreFoundation
import JavaScriptCore._util
import objc
from JavaScriptCore import _metadata
sys.m... | 24.176471 | 81 | 0.725061 |
7952927ceeb8d190d79adc9909af5fd5827b0fe0 | 1,700 | py | Python | nebula/dao/base_dao.py | threathunterX/nebula_web | 2e32e6e7b225e0bd87ee8c847c22862f12c51bb1 | [
"Apache-2.0"
] | 2 | 2019-05-01T09:42:32.000Z | 2019-05-31T01:08:37.000Z | nebula/dao/base_dao.py | threathunterX/nebula_web | 2e32e6e7b225e0bd87ee8c847c22862f12c51bb1 | [
"Apache-2.0"
] | 1 | 2021-06-01T23:30:04.000Z | 2021-06-01T23:30:04.000Z | nebula/dao/base_dao.py | threathunterX/nebula_web | 2e32e6e7b225e0bd87ee8c847c22862f12c51bb1 | [
"Apache-2.0"
] | 5 | 2019-05-14T09:30:12.000Z | 2020-09-29T04:57:26.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from ..models.engine import DB_Session, Default_DB_Session, Data_DB_Session
Global_Session = None
Global_Default_Session = None
Global_Data_Session = None
class BaseDao(object):
def __init__(self, session=None):
if session:
self... | 26.153846 | 75 | 0.599412 |
7952936b89556b1bddb7a35d2a99e154978c8814 | 3,873 | py | Python | validation/ProteinSequenceAssembly_NW_Validation.py | griffincalme/AminoAcidSequenceAssembly | a49f1b6a40098c56f098d8d9ebd90247f4c9645b | [
"Apache-2.0"
] | null | null | null | validation/ProteinSequenceAssembly_NW_Validation.py | griffincalme/AminoAcidSequenceAssembly | a49f1b6a40098c56f098d8d9ebd90247f4c9645b | [
"Apache-2.0"
] | null | null | null | validation/ProteinSequenceAssembly_NW_Validation.py | griffincalme/AminoAcidSequenceAssembly | a49f1b6a40098c56f098d8d9ebd90247f4c9645b | [
"Apache-2.0"
] | null | null | null | #Must install more_itertools and scikit-bio(need to run "python setup.py install" from source for skbio)
from skbio import Protein
from skbio.alignment import global_pairwise_align_protein
from more_itertools import unique_everseen
import random
def contig_merger(first_seq, second_seq):
merged_contig = [] # Lis... | 33.102564 | 126 | 0.688613 |
79529515f70dca8cbaf975bf0ed5dd4d1b3d46a2 | 763 | py | Python | src/sentry/models/deletedentry.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 4 | 2019-05-27T13:55:07.000Z | 2021-03-30T07:05:09.000Z | src/sentry/models/deletedentry.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/models/deletedentry.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 1 | 2020-08-10T07:55:40.000Z | 2020-08-10T07:55:40.000Z | from __future__ import absolute_import
from django.db import models
from django.utils import timezone
from sentry.db.models import (
Model, BoundedBigIntegerField
)
class DeletedEntry(Model):
__core__ = False
actor_label = models.CharField(max_length=64, null=True)
# if the entry was created via a u... | 27.25 | 74 | 0.74443 |
79529559862c2c54eafb279d516f074a13ab1768 | 13,810 | py | Python | src/skmultiflow/meta/online_under_over_bagging.py | denisesato/scikit-multiflow | 3eb4c7262bb60d7e3f65c0d3395e4572d9a8cb95 | [
"BSD-3-Clause"
] | 663 | 2017-11-16T15:48:45.000Z | 2022-03-28T07:38:17.000Z | src/skmultiflow/meta/online_under_over_bagging.py | denisesato/scikit-multiflow | 3eb4c7262bb60d7e3f65c0d3395e4572d9a8cb95 | [
"BSD-3-Clause"
] | 293 | 2017-12-16T12:33:49.000Z | 2022-02-22T03:34:25.000Z | src/skmultiflow/meta/online_under_over_bagging.py | denisesato/scikit-multiflow | 3eb4c7262bb60d7e3f65c0d3395e4572d9a8cb95 | [
"BSD-3-Clause"
] | 201 | 2017-11-30T15:52:30.000Z | 2022-03-25T21:46:55.000Z | import copy as cp
import warnings
import numpy as np
from skmultiflow.core import BaseSKMObject, ClassifierMixin, MetaEstimatorMixin
from skmultiflow.drift_detection import ADWIN
from skmultiflow.lazy import KNNADWINClassifier
from skmultiflow.utils import check_random_state
from skmultiflow.utils.utils import get_di... | 40.028986 | 99 | 0.594859 |
79529625059eac765012ea440b1e26da5e26caf7 | 15,122 | py | Python | sdk/python/pulumi_azure_native/documentdb/v20190801preview/private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20190801preview/private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20190801preview/private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"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, overload
from ... import _utilities
fro... | 51.261017 | 1,154 | 0.698386 |
7952968675e874881553678987e3b67361b78e7d | 5,857 | py | Python | bot/cogs/thank.py | Nirlep5252/Tech-Struck | 87e00e4565f7bf7b9d667271ea3d625e40085895 | [
"MIT"
] | 2 | 2021-06-12T19:37:42.000Z | 2021-12-12T03:17:20.000Z | bot/cogs/thank.py | zeffo/Tech-Struck | 89dffa0e650d0102139bb932d046b08b371d3c61 | [
"MIT"
] | null | null | null | bot/cogs/thank.py | zeffo/Tech-Struck | 89dffa0e650d0102139bb932d046b08b371d3c61 | [
"MIT"
] | null | null | null | import asyncio
from typing import Optional
from discord import Color, Embed, Member, Reaction
from discord.ext import commands
from tortoise.functions import Count, Q
from models import ThankModel, UserModel
delete_thank_message = """**Thanked**: <@!{0.thanked_id}>
**Thanker**: <@!{0.thanker_id}>
**Description**: {0... | 35.932515 | 98 | 0.571282 |
7952969e6d0b68c2f855a88488afaf384b30fc3f | 2,377 | py | Python | days/day_04/main.py | gkpotter/advent-of-code-2020 | 76ed77719a8f6396511dabce99d46995946edb01 | [
"MIT"
] | null | null | null | days/day_04/main.py | gkpotter/advent-of-code-2020 | 76ed77719a8f6396511dabce99d46995946edb01 | [
"MIT"
] | null | null | null | days/day_04/main.py | gkpotter/advent-of-code-2020 | 76ed77719a8f6396511dabce99d46995946edb01 | [
"MIT"
] | null | null | null | import time
import os
def all_fields_present(passport):
fields = ['byr','iyr','eyr','hgt','hcl','ecl','pid']
for field in fields:
if field not in passport:
return False
return True
def is_valid(passport):
if not all_fields_present(passport):
return False
byr = passport['byr']
if not (is_year(byr) and i... | 20.491379 | 76 | 0.641565 |
7952972e448d8c9865fc3333c4eed1ec992fd69c | 6,228 | py | Python | wagtailmenus/views.py | gidsey/wagtailmenus | f1975e501c22258ec9e4aa78a53511946eeeac64 | [
"MIT"
] | null | null | null | wagtailmenus/views.py | gidsey/wagtailmenus | f1975e501c22258ec9e4aa78a53511946eeeac64 | [
"MIT"
] | null | null | null | wagtailmenus/views.py | gidsey/wagtailmenus | f1975e501c22258ec9e4aa78a53511946eeeac64 | [
"MIT"
] | null | null | null | from copy import copy
from django import forms
from django.contrib.admin.utils import quote, unquote
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404, redirect
from django.utils.text import capfirst
from django.utils.translation import gettext_lazy as _
from wagtail.ad... | 33.12766 | 78 | 0.640013 |
79529769af4c820393d0e8523f2c7c8c07737628 | 22,512 | py | Python | contrib/devtools/copyright_header.py | Crypto-Robin-Hood/Qbitcash | 65ee26b84c8046ef68b668b87f4ef376bdf18462 | [
"MIT"
] | 6 | 2020-06-10T09:46:27.000Z | 2021-09-04T21:22:39.000Z | contrib/devtools/copyright_header.py | Crypto-Robin-Hood/Qbitcash | 65ee26b84c8046ef68b668b87f4ef376bdf18462 | [
"MIT"
] | 1 | 2020-07-25T17:28:27.000Z | 2020-08-10T05:02:11.000Z | contrib/devtools/copyright_header.py | Crypto-Robin-Hood/Qbitcash | 65ee26b84c8046ef68b668b87f4ef376bdf18462 | [
"MIT"
] | 3 | 2020-08-28T05:51:21.000Z | 2021-06-08T22:05:13.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-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.
import re
import fnmatch
import sys
import subprocess
import datetime
import os
########################... | 36.724307 | 92 | 0.602479 |
7952979daeb72c60bca63694ebd7757fb12e78a8 | 567 | py | Python | setup.py | wtbarnes/hydrad_tools | 7cd67c12fb8bc55a1b610eb0f4696fe1acffc16a | [
"MIT"
] | 1 | 2018-07-23T20:54:09.000Z | 2018-07-23T20:54:09.000Z | setup.py | wtbarnes/hydrad_tools | 7cd67c12fb8bc55a1b610eb0f4696fe1acffc16a | [
"MIT"
] | 57 | 2018-03-22T16:18:06.000Z | 2020-01-31T09:54:23.000Z | setup.py | wtbarnes/hydrad_tools | 7cd67c12fb8bc55a1b610eb0f4696fe1acffc16a | [
"MIT"
] | 1 | 2018-03-19T03:19:41.000Z | 2018-03-19T03:19:41.000Z | from distutils.core import setup
setup(
name='pydrad',
license='MIT',
version='0.1',
author='Will Barnes',
url='https://github.com/rice-solar-physics/pydrad',
package_data={'pydrad': ['configure/templates/*',
'configure/data/defaults.asdf']},
packages=[
... | 27 | 70 | 0.599647 |
795297d18c848fc4e6148d953b247d15d65c5104 | 1,895 | py | Python | src/coinflip/cli/parsing.py | Honno/coinflip | 15c1e0419e13c91c3f988558f3f050b516413c2b | [
"BSD-3-Clause"
] | 10 | 2020-08-02T16:58:36.000Z | 2021-02-11T06:02:45.000Z | src/coinflip/cli/parsing.py | honno/coinflip | 15c1e0419e13c91c3f988558f3f050b516413c2b | [
"BSD-3-Clause"
] | 31 | 2020-07-24T10:55:25.000Z | 2021-02-26T11:13:50.000Z | src/coinflip/cli/parsing.py | honno/coinflip | 15c1e0419e13c91c3f988558f3f050b516413c2b | [
"BSD-3-Clause"
] | null | null | null | from dataclasses import dataclass
import pandas as pd
from coinflip._randtests.common.exceptions import NonBinarySequenceError
__all__ = ["DataParsingError", "parse_text", "parse_binary"]
class DataParsingError(ValueError):
"""Base class for parsing-related errors"""
@dataclass
class MultipleColumnsError(Dat... | 23.395062 | 88 | 0.650132 |
795298877dd02ef6148f327b0696c5f7eaecd9e4 | 8,630 | py | Python | tests/unit/utils/test_verify.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | null | null | null | tests/unit/utils/test_verify.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | null | null | null | tests/unit/utils/test_verify.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Test the verification routines
'''
# Import Python libs
from __future__ import absolute_import
import getpass
import os
import sys
import stat
import shutil
import resource
import tempfile
import socket
# Import Salt Testing libs
from tests.support.unit import skipIf, TestCase
from tests.s... | 34.658635 | 90 | 0.533372 |
795299413720ddf717f425b6398106745fdc89c1 | 1,056 | py | Python | examples/mnist/simple_model_training.py | mehrdad-shokri/ludwig | f167981683c067b50be6a3656cbf553efbf192e9 | [
"Apache-2.0"
] | null | null | null | examples/mnist/simple_model_training.py | mehrdad-shokri/ludwig | f167981683c067b50be6a3656cbf553efbf192e9 | [
"Apache-2.0"
] | null | null | null | examples/mnist/simple_model_training.py | mehrdad-shokri/ludwig | f167981683c067b50be6a3656cbf553efbf192e9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Simple Model Training Example
#
# This example is the API example for this Ludwig command line example
# (https://ludwig-ai.github.io/ludwig-docs/examples/#image-classification-mnist).
# Import required libraries
import logging
import shutil
import yaml
from ludwig.api imp... | 22.956522 | 81 | 0.701705 |
79529995294c51def7485085ba6798856e87a693 | 13,899 | bzl | Python | dotnet/toolchain/toolchains.bzl | marleypowell/rules_dotnet | b2a6c7583f7c2cf37ea62d0f1a703c7af4d333ef | [
"Apache-2.0"
] | null | null | null | dotnet/toolchain/toolchains.bzl | marleypowell/rules_dotnet | b2a6c7583f7c2cf37ea62d0f1a703c7af4d333ef | [
"Apache-2.0"
] | null | null | null | dotnet/toolchain/toolchains.bzl | marleypowell/rules_dotnet | b2a6c7583f7c2cf37ea62d0f1a703c7af4d333ef | [
"Apache-2.0"
] | null | null | null | load(
"@io_bazel_rules_dotnet//dotnet/private:dotnet_toolchain.bzl",
"dotnet_toolchain",
)
load(
"@io_bazel_rules_dotnet//dotnet/private:core_toolchain.bzl",
"core_toolchain",
)
load(
"@io_bazel_rules_dotnet//dotnet/private:net_toolchain.bzl",
"net_toolchain",
)
load(
"@io_bazel_rules_dotnet... | 45.871287 | 186 | 0.671703 |
795299febd0881f339bf75a4c01b525d81a4103e | 1,089 | py | Python | fa_management_server/models/role.py | Msms-NJ/fa_management_server | 6787e35a5ac27c27c61fcaa0f508a78f4dc6e8f9 | [
"MIT"
] | null | null | null | fa_management_server/models/role.py | Msms-NJ/fa_management_server | 6787e35a5ac27c27c61fcaa0f508a78f4dc6e8f9 | [
"MIT"
] | null | null | null | fa_management_server/models/role.py | Msms-NJ/fa_management_server | 6787e35a5ac27c27c61fcaa0f508a78f4dc6e8f9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Role models."""
from dataclasses import dataclass
from array import array
from .database import Column, Model, SurrogatePK, db, reference_col, relationship
from sqlalchemy.dialects.postgresql import ARRAY
@dataclass
class Role(SurrogatePK, Model):
"""用户角色信息表"""
__tablename__ = "role... | 26.560976 | 81 | 0.673095 |
79529b4a04fbf744447ba27c0767fcb246de732c | 350 | py | Python | ZenVis/Blender/convert_mrm_to_obj.py | ThielHater/ZenVis | e40d4cf1e7cd4b12bab72f6bebae6e3a78f1a958 | [
"MIT"
] | 3 | 2021-04-13T07:12:30.000Z | 2021-06-18T17:26:10.000Z | ZenVis/Blender/convert_mrm_to_obj.py | ThielHater/ZenVis | e40d4cf1e7cd4b12bab72f6bebae6e3a78f1a958 | [
"MIT"
] | null | null | null | ZenVis/Blender/convert_mrm_to_obj.py | ThielHater/ZenVis | e40d4cf1e7cd4b12bab72f6bebae6e3a78f1a958 | [
"MIT"
] | 2 | 2021-03-23T19:45:39.000Z | 2021-04-17T17:21:48.000Z | import bpy
import sys
argv = sys.argv
argv = argv[argv.index("--") + 1:]
bpy.ops.import_scene.krxmrmimp(filepath=argv[1])
for obj in bpy.data.objects:
obj.select = (obj.type == 'MESH')
bpy.context.scene.objects.active = obj
bpy.ops.object.join()
bpy.ops.export_scene.obj(filepath=argv[2], check_exis... | 29.166667 | 83 | 0.694286 |
79529d6859c31cf9e51236ddcf635ecb84f88dec | 9,738 | py | Python | Streamlit/funct_fourth_page.py | amorea04/MushPy | 63c87bd01ac41bd1002f065de18bb48061cc1b5e | [
"MIT"
] | null | null | null | Streamlit/funct_fourth_page.py | amorea04/MushPy | 63c87bd01ac41bd1002f065de18bb48061cc1b5e | [
"MIT"
] | null | null | null | Streamlit/funct_fourth_page.py | amorea04/MushPy | 63c87bd01ac41bd1002f065de18bb48061cc1b5e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 20 23:05:42 2021
@author: Adrien
"""
#%% Imports
import streamlit as st
#import numpy as np
import pandas as pd
import ast
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
from st_funct import *
#%% fuction for the fourth pa... | 44.465753 | 178 | 0.67365 |
79529e86c383ce68b05015010be01df3355df691 | 8,883 | py | Python | tensorflow/python/layers/utils.py | DennissimOS/platform_external_tensorflow | e5a536fbd36ed64a7a63516299a3061944864080 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/layers/utils.py | DennissimOS/platform_external_tensorflow | e5a536fbd36ed64a7a63516299a3061944864080 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/layers/utils.py | DennissimOS/platform_external_tensorflow | e5a536fbd36ed64a7a63516299a3061944864080 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 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... | 30.631034 | 80 | 0.656873 |
79529f3ac5b46e54e166c22b30265b0bc77849f9 | 495 | py | Python | server/dataset/admin.py | johnugeorge/medperf | 5bc3f643064df14e9476bd4d4c1a4c0cce5337d5 | [
"Apache-2.0"
] | 1 | 2021-09-24T18:09:53.000Z | 2021-09-24T18:09:53.000Z | server/dataset/admin.py | johnugeorge/medperf | 5bc3f643064df14e9476bd4d4c1a4c0cce5337d5 | [
"Apache-2.0"
] | 2 | 2021-09-27T16:14:04.000Z | 2021-11-03T14:24:54.000Z | server/dataset/admin.py | johnugeorge/medperf | 5bc3f643064df14e9476bd4d4c1a4c0cce5337d5 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Dataset
class DatasetAdmin(admin.ModelAdmin):
list_display = (
"name",
"description",
"location",
"owner",
"input_data_hash",
"generated_uid",
"split_seed",
"data_preparation_mlcube",
"stat... | 19.8 | 42 | 0.575758 |
79529f3fb9cf32e1c14a6f57696bce1ad65c9010 | 528 | bzl | Python | third_party/hexagon/workspace.bzl | carchrae/tensorflow | 6a69a6b2e286b14ac9ae813998bb0d78b6fee440 | [
"Apache-2.0"
] | 1 | 2020-02-15T14:00:01.000Z | 2020-02-15T14:00:01.000Z | third_party/hexagon/workspace.bzl | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 2 | 2021-08-25T15:58:27.000Z | 2022-02-10T02:04:40.000Z | third_party/hexagon/workspace.bzl | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 2 | 2021-04-28T20:57:17.000Z | 2022-01-11T13:05:41.000Z | """Loads the Hexagon NN Header files library, used by TF Lite."""
load("//third_party:repo.bzl", "third_party_http_archive")
def repo():
third_party_http_archive(
name = "hexagon_nn",
sha256 = "4cbf3c18834e24b1f64cc507f9c2f22b4fe576c6ff938d55faced5d8f1bddf62",
urls = [
"https:/... | 37.714286 | 158 | 0.693182 |
7952a03a8a520fab01007c85af5c564f954b244d | 1,209 | py | Python | www/config.py | ericchuhong/WellSoonWeb | 4656c442dbd5413a28dcf2d25bae058a7b5bad85 | [
"MIT"
] | 1 | 2016-05-05T02:25:48.000Z | 2016-05-05T02:25:48.000Z | www/config.py | ericchuhong/WellSoonWeb | 4656c442dbd5413a28dcf2d25bae058a7b5bad85 | [
"MIT"
] | null | null | null | www/config.py | ericchuhong/WellSoonWeb | 4656c442dbd5413a28dcf2d25bae058a7b5bad85 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Configuration
'''
__author__ = 'Chuhong Ma'
import config_default
class Dict(dict):
'''
Simple dict but support accesss as x.y style.
'''
def __init__(self, names=(), values=(), **kw):
super(Dict, self).__init__(**kw)
for k, v in zip... | 20.844828 | 78 | 0.558313 |
7952a077fbe07cc2c8d08144887c55becfa7d697 | 57,415 | py | Python | ambari-server/src/main/python/ambari_server/setupSecurity.py | bartjanssens92/ambari | c50dc8d8ad7c559bf7baf93e49616135685b9c85 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/python/ambari_server/setupSecurity.py | bartjanssens92/ambari | c50dc8d8ad7c559bf7baf93e49616135685b9c85 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/python/ambari_server/setupSecurity.py | bartjanssens92/ambari | c50dc8d8ad7c559bf7baf93e49616135685b9c85 | [
"Apache-2.0"
] | 1 | 2021-09-06T03:23:25.000Z | 2021-09-06T03:23:25.000Z | #!/usr/bin/env python
'''
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")... | 48.36984 | 291 | 0.729983 |
7952a093cea3a2ea19c8dfe9a1c518679c90e413 | 1,545 | py | Python | app/modules/ocr_utils/ocr.py | jasalt/kuittiskanneri | db04215b9e8b9b8624b8e28193382e4a37944f6c | [
"MIT"
] | 131 | 2015-01-19T13:56:20.000Z | 2022-03-10T22:46:17.000Z | app/modules/ocr_utils/ocr.py | jasalt/kuittiskanneri | db04215b9e8b9b8624b8e28193382e4a37944f6c | [
"MIT"
] | 2 | 2016-09-10T17:05:49.000Z | 2019-06-07T14:13:24.000Z | app/modules/ocr_utils/ocr.py | jasalt/kuittiskanneri | db04215b9e8b9b8624b8e28193382e4a37944f6c | [
"MIT"
] | 64 | 2015-01-27T12:05:37.000Z | 2021-03-26T19:56:04.000Z | import os
import subprocess
import autocorrect
import receiptparser
# TODO HACK DEPLOY This breaks easily
from app import app
UPLOAD_FOLDER = app.root_path + '/' + app.config['UPLOAD_FOLDER']
OCR_SCRIPT = app.root_path + '/modules/ocr_utils/ocr.sh'
def optical_character_recognition(imagepath):
""" Does OCR on a... | 29.711538 | 77 | 0.660841 |
7952a0af14fc4fefc6607939e0d149500dcc9653 | 310 | py | Python | old_ac_controller.py | tmkasun/jetson-gpio-device-controller | 9a05b8bf9ba493b18fb7a410a0c5f646dbece24e | [
"MIT"
] | null | null | null | old_ac_controller.py | tmkasun/jetson-gpio-device-controller | 9a05b8bf9ba493b18fb7a410a0c5f646dbece24e | [
"MIT"
] | null | null | null | old_ac_controller.py | tmkasun/jetson-gpio-device-controller | 9a05b8bf9ba493b18fb7a410a0c5f646dbece24e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import Jetson.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7, GPIO.OUT, initial=GPIO.LOW)
while True:
print("Turning on")
GPIO.output(7, GPIO.LOW)
time.sleep(2*60)
print("turning off")
GPIO.output(7, GPIO.LOW)
time.sleep(2*60)
GPIO.cleanup()
| 16.315789 | 41 | 0.670968 |
7952a0be15361642de6a8c0358b1a7ef28d8c9f6 | 32,051 | py | Python | resqpy/rq_import/_grid_from_cp.py | poc11/resqpy | 5dfbfb924f8ee9b2712fb8e38bff96ee8ee9d8e2 | [
"MIT"
] | 35 | 2021-05-24T17:43:55.000Z | 2022-03-15T15:47:59.000Z | resqpy/rq_import/_grid_from_cp.py | poc11/resqpy | 5dfbfb924f8ee9b2712fb8e38bff96ee8ee9d8e2 | [
"MIT"
] | 355 | 2021-05-24T16:28:16.000Z | 2022-03-14T14:43:40.000Z | resqpy/rq_import/_grid_from_cp.py | poc11/resqpy | 5dfbfb924f8ee9b2712fb8e38bff96ee8ee9d8e2 | [
"MIT"
] | 12 | 2021-06-02T09:50:46.000Z | 2022-03-02T20:29:56.000Z | """_grid_from_cp.py: Module to generate a RESQML grid object from an input corner point array."""
version = '15th November 2021'
import logging
log = logging.getLogger(__name__)
import numpy as np
import numpy.ma as ma
import resqpy.crs as rqc
import resqpy.grid as grr
import resqpy.olio.vector_utilities as vec
... | 53.957912 | 196 | 0.604193 |
7952a0f349e17172d5635991318945a4a31be5c4 | 30,711 | py | Python | toontown/building/DistributedDoor.py | philicheese2003/ToontownProjectAltisServer | cfa225d1bdddacdbd29b621382347fce17e1dc66 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/building/DistributedDoor.py | philicheese2003/ToontownProjectAltisServer | cfa225d1bdddacdbd29b621382347fce17e1dc66 | [
"Apache-2.0"
] | null | null | null | toontown/building/DistributedDoor.py | philicheese2003/ToontownProjectAltisServer | cfa225d1bdddacdbd29b621382347fce17e1dc66 | [
"Apache-2.0"
] | 1 | 2020-03-11T17:38:45.000Z | 2020-03-11T17:38:45.000Z | from toontown.building import DoorTypes
from toontown.building import FADoorCodes
from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject
from direct.distributed.ClockDelta import *
from direct.fsm import ClassicFSM, State
from direct.interval.IntervalGlobal import *
from dir... | 41.840599 | 435 | 0.608316 |
7952a1c2de03e077991e374aaf9cbadbb3cf847c | 25,262 | py | Python | python_old/atmos_models.py | velatkilic/LISA | ef2a3489bd194f7bf790c057edaf9c89b65c572b | [
"MIT"
] | 6 | 2021-09-29T21:20:23.000Z | 2022-03-29T05:50:02.000Z | python_old/atmos_models.py | velatkilic/LISA | ef2a3489bd194f7bf790c057edaf9c89b65c572b | [
"MIT"
] | null | null | null | python_old/atmos_models.py | velatkilic/LISA | ef2a3489bd194f7bf790c057edaf9c89b65c572b | [
"MIT"
] | 4 | 2021-09-01T17:12:55.000Z | 2022-02-17T07:28:33.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Lidar Scatterer Augmentation (LISA)
- Given lidar point cloud and a rain rate generates corresponding noisy signal
- Reflection data must be normalized to range [0 1] and
range must be in units of meters
"""
import numpy as np
from scipy.special import ga... | 39.657771 | 163 | 0.526126 |
7952a2617eaee508684366d74a2b6fc3bc14823b | 2,155 | py | Python | bmbc3/processData.py | zingson/hddpy | 2ed511dabe9eb63fd6798123475f8113ecf0ceb3 | [
"Apache-2.0"
] | null | null | null | bmbc3/processData.py | zingson/hddpy | 2ed511dabe9eb63fd6798123475f8113ecf0ceb3 | [
"Apache-2.0"
] | null | null | null | bmbc3/processData.py | zingson/hddpy | 2ed511dabe9eb63fd6798123475f8113ecf0ceb3 | [
"Apache-2.0"
] | null | null | null | import sys,gmssl
from gmssl import sm2
from gmssl.sm3 import sm3_hash
from base64 import b64encode, b64decode
from gmssl.func import bytes_to_list,list_to_bytes,random_hex
import os, sys
import rsa
#文件要求,UTF-8编码,第一行是标题,每行一条记录
#每行记录中,第一列是手机号,需要sm3加密。
#对文件先base64编码,然后使用sm3生成摘要,然后对摘要进行sm2加密。接收方需要对文件与摘要的正确性进行校验。
#原... | 22.447917 | 96 | 0.699768 |
7952a35e8642bae9c7116167a411880bd488e1a3 | 572 | py | Python | blmath/util/decorators.py | metabolize/blmath | 8ea8d7be60349a60ffeb08a3e34fca20ef9eb0da | [
"BSD-2-Clause"
] | 6 | 2019-09-28T16:48:34.000Z | 2022-03-25T17:05:46.000Z | blmath/util/decorators.py | metabolize/blmath | 8ea8d7be60349a60ffeb08a3e34fca20ef9eb0da | [
"BSD-2-Clause"
] | 6 | 2019-09-09T16:42:02.000Z | 2021-06-25T15:25:50.000Z | blmath/util/decorators.py | metabolize/blmath | 8ea8d7be60349a60ffeb08a3e34fca20ef9eb0da | [
"BSD-2-Clause"
] | 4 | 2017-05-09T16:15:07.000Z | 2019-02-15T14:15:30.000Z | class setter_property(object):
'''
Note: setter_property incorrectly triggers method-hidden in pylint.
'''
def __init__(self, fn, doc=None):
self.fn = fn
self.__name__ = fn.__name__
self.__doc__ = doc if doc is not None else fn.__doc__
def __get__(self, obj, cls):
if... | 30.105263 | 71 | 0.611888 |
7952a37a9b0f7a0f77f38b999a7e0727e06db1b4 | 1,996 | py | Python | gomiget_aichi_ichinomiya.py | suconbu/gomiget | 3ea5ef9b37e27428ff844f715b2c2be92e32f7c6 | [
"CC0-1.0"
] | null | null | null | gomiget_aichi_ichinomiya.py | suconbu/gomiget | 3ea5ef9b37e27428ff844f715b2c2be92e32f7c6 | [
"CC0-1.0"
] | null | null | null | gomiget_aichi_ichinomiya.py | suconbu/gomiget | 3ea5ef9b37e27428ff844f715b2c2be92e32f7c6 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
import sys
from gomireader import GomiReader, PatternValuePair
def main(argv):
reader = GomiReader()
reader.municipality_id = "232033"
reader.municipality_name = "愛知県一宮市"
reader.datasource_url = "https://www.city.ichinomiya.aichi.jp/kurashi/gomi/1000388/1000167/index.html"
r... | 42.468085 | 188 | 0.627756 |
7952a39f1d59b63888c5639030f6dd3d1d075f38 | 26 | py | Python | junior_web/__init__.py | h4c-project-return/junior-web-azure | 121235ec81af8e60c482d714f8dd2449867ed388 | [
"FTL"
] | 1 | 2016-11-16T16:15:54.000Z | 2016-11-16T16:15:54.000Z | junior_web/__init__.py | h4c-project-return/junior-web-azure | 121235ec81af8e60c482d714f8dd2449867ed388 | [
"FTL"
] | 1 | 2021-02-08T20:17:40.000Z | 2021-02-08T20:17:40.000Z | junior_web/__init__.py | h4c-project-return/junior-web-azure | 121235ec81af8e60c482d714f8dd2449867ed388 | [
"FTL"
] | null | null | null | from jr_services import *
| 13 | 25 | 0.807692 |
7952a44a7bff306d8a160b60c73a249c622c65e7 | 789 | py | Python | setup.py | swaroopch/spherecluster | 3b33e6c6242cf2c83d7b502c662f57455e4f175f | [
"MIT"
] | null | null | null | setup.py | swaroopch/spherecluster | 3b33e6c6242cf2c83d7b502c662f57455e4f175f | [
"MIT"
] | null | null | null | setup.py | swaroopch/spherecluster | 3b33e6c6242cf2c83d7b502c662f57455e4f175f | [
"MIT"
] | null | null | null | from __future__ import print_function
import sys
from setuptools import setup, find_packages
with open('requirements.txt') as f:
INSTALL_REQUIRES = [l.strip() for l in f.readlines() if l]
# try:
# import numpy # NOQA
# except ImportError:
# print('numpy is required during installation')
# sys.exit(1... | 24.65625 | 70 | 0.690748 |
7952a5ac7d0a0adb62c5421941263d08351edca5 | 11,400 | py | Python | tests/test_utils.py | NitefullWind/httprunner | 00421a5cbc965105ec49092da948b8fdaabf545f | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | NitefullWind/httprunner | 00421a5cbc965105ec49092da948b8fdaabf545f | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | NitefullWind/httprunner | 00421a5cbc965105ec49092da948b8fdaabf545f | [
"Apache-2.0"
] | null | null | null | import io
import os
import shutil
from httprunner import exceptions, loader, utils
from tests.base import ApiServerUnittest
class TestUtils(ApiServerUnittest):
def test_set_os_environ(self):
self.assertNotIn("abc", os.environ)
variables_mapping = {
"abc": "123"
}
util... | 36.538462 | 94 | 0.569912 |
7952a715f9fe7a1c145ed7ab1ffe37367990a540 | 713 | py | Python | self_test.py | nmondal/exit_poll_classification | 1db66c4c922332a3f79154aa4d8454c50f1dfebd | [
"MIT"
] | 1 | 2020-12-12T11:08:33.000Z | 2020-12-12T11:08:33.000Z | self_test.py | nmondal/exit_poll_classification | 1db66c4c922332a3f79154aa4d8454c50f1dfebd | [
"MIT"
] | null | null | null | self_test.py | nmondal/exit_poll_classification | 1db66c4c922332a3f79154aa4d8454c50f1dfebd | [
"MIT"
] | null | null | null | from exit_poll import verify_classification, weighted_score
INDEX_DIR = "./index_1"
LABEL_CONFIG = {
"label_column": "senti",
"label_densities": {"positive": 0.16, "negative": 0.63, "neutral": 0.21}
}
QUESTION_BANK_CSV = "./data_dir/Tweets.csv"
QUESTION_CSV_CONFIG = {"id_column": "tweet_id", "label_column": "a... | 33.952381 | 111 | 0.681627 |
7952a7ab40c58613076577fe9ff418a435a68de0 | 113 | py | Python | djangokeys/deprecated/__init__.py | alanverresen/django-keys | bd99a9f059af8b84b141ab8bf9a5bc5730a6ba38 | [
"MIT"
] | null | null | null | djangokeys/deprecated/__init__.py | alanverresen/django-keys | bd99a9f059af8b84b141ab8bf9a5bc5730a6ba38 | [
"MIT"
] | null | null | null | djangokeys/deprecated/__init__.py | alanverresen/django-keys | bd99a9f059af8b84b141ab8bf9a5bc5730a6ba38 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This module contains deprecated functionality of this package.
| 22.6 | 64 | 0.707965 |
7952a7e737a163807aa0156bbd17421806d19651 | 98 | py | Python | mmdet2trt/models/detectors/__init__.py | jackweiwang/mmdetection-to-tensorrt | f988ba8e923764fb1173385a1c7160b8f8b5bd99 | [
"Apache-2.0"
] | 1 | 2021-08-23T10:09:37.000Z | 2021-08-23T10:09:37.000Z | mmdet2trt/models/detectors/__init__.py | gcong18/mmdetection-to-tensorrt | c31c32ee4720ff56010bcda77bacf3a110d0526c | [
"Apache-2.0"
] | null | null | null | mmdet2trt/models/detectors/__init__.py | gcong18/mmdetection-to-tensorrt | c31c32ee4720ff56010bcda77bacf3a110d0526c | [
"Apache-2.0"
] | null | null | null | from .two_stage import TwoStageDetectorWraper
from .single_stage import SingleStageDetectorWraper
| 32.666667 | 51 | 0.897959 |
7952a8aac7811fa8fb62b68fe1486745e9d787eb | 4,932 | py | Python | docs/conf.py | aubricus/clack | 6f8b4efb329251f02005c9859091be7345beb717 | [
"MIT"
] | 1 | 2018-03-22T19:28:20.000Z | 2018-03-22T19:28:20.000Z | docs/conf.py | aubricus/clack | 6f8b4efb329251f02005c9859091be7345beb717 | [
"MIT"
] | 133 | 2018-03-30T19:31:00.000Z | 2020-01-11T04:33:46.000Z | docs/conf.py | aubricus/klak | 6f8b4efb329251f02005c9859091be7345beb717 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Klak documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# 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
# autoge... | 30.63354 | 79 | 0.681468 |
7952a8b7f5cd412bae048fbe58910f8a6075530c | 858 | py | Python | tests/tests_test_workflow/test_test_args_path_validator.py | naveenpajjuri/opensearch-build | 855f0296b36ba32b18cf4fc40b096659b5b3f1f0 | [
"Apache-2.0"
] | 62 | 2021-05-14T04:06:09.000Z | 2022-03-23T03:30:13.000Z | tests/tests_test_workflow/test_test_args_path_validator.py | naveenpajjuri/opensearch-build | 855f0296b36ba32b18cf4fc40b096659b5b3f1f0 | [
"Apache-2.0"
] | 1,590 | 2021-05-07T20:21:19.000Z | 2022-03-31T23:57:53.000Z | tests/tests_test_workflow/test_test_args_path_validator.py | mch2/opensearch-build | 39464ae1ded2b628d5b6cacb22064b715906520d | [
"Apache-2.0"
] | 134 | 2021-05-07T19:27:56.000Z | 2022-03-24T23:06:17.000Z | # SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
import os
import unittest
from test_workflow.test_args_path_validator import TestArgsPathValidator
class TestTestArgsPathVa... | 28.6 | 113 | 0.67366 |
7952aa0c06e2e46d4bc4e14064c747d6f3699444 | 4,113 | py | Python | layers.py | HighCWu/import_daz | d8fe108e4a0c5df3d8077b10f25b2deee0bd0f1f | [
"BSD-2-Clause"
] | null | null | null | layers.py | HighCWu/import_daz | d8fe108e4a0c5df3d8077b10f25b2deee0bd0f1f | [
"BSD-2-Clause"
] | null | null | null | layers.py | HighCWu/import_daz | d8fe108e4a0c5df3d8077b10f25b2deee0bd0f1f | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2016-2021, Thomas Larsson
# All rights reserved.
#
# 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 con... | 36.078947 | 82 | 0.605154 |
7952ab1f57259cd05a720231874730e4e5b15abf | 23,286 | py | Python | pinakes/main/catalog/views.py | hsong-rh/pinakes | 2f08cb757ca64c866af3244686b92a3074fc7571 | [
"Apache-2.0"
] | null | null | null | pinakes/main/catalog/views.py | hsong-rh/pinakes | 2f08cb757ca64c866af3244686b92a3074fc7571 | [
"Apache-2.0"
] | null | null | null | pinakes/main/catalog/views.py | hsong-rh/pinakes | 2f08cb757ca64c866af3244686b92a3074fc7571 | [
"Apache-2.0"
] | null | null | null | """ Default views for Catalog."""
import logging
import django_rq
from django.utils.translation import gettext_lazy as _
from django.shortcuts import get_object_or_404
from rest_framework import viewsets
from rest_framework.decorators import action
from rest_framework_extensions.mixins import NestedViewSetMixin
from... | 31.172691 | 159 | 0.633299 |
7952ab7ffc8fad94f7ea101254063bfbcb96f541 | 2,659 | py | Python | _scripts_/DiabloUI/create_local_declarations.py | aleaksah/notes | 53f97c53d9d394ca2f315d261c2296147ae4433f | [
"Unlicense"
] | null | null | null | _scripts_/DiabloUI/create_local_declarations.py | aleaksah/notes | 53f97c53d9d394ca2f315d261c2296147ae4433f | [
"Unlicense"
] | null | null | null | _scripts_/DiabloUI/create_local_declarations.py | aleaksah/notes | 53f97c53d9d394ca2f315d261c2296147ae4433f | [
"Unlicense"
] | null | null | null | SetType(LocByName("UiDestroy"), "void __cdecl UiDestroy()")
SetType(LocByName("UiTitleDialog"), "void __stdcall UiTitleDialog(int a1)")
SetType(LocByName("UiInitialize"), "void __cdecl UiInitialize()")
SetType(LocByName("UiCopyProtError"), "void __stdcall UiCopyProtError(int a1)")
SetType(LocByName("UiAppActivate"), "v... | 98.481481 | 201 | 0.793531 |
7952ac37bd8bbd543ffde0465a189a66c811c9ff | 187 | py | Python | amdnet/tests/test_train_AMDNet.py | sparks-baird/AMDNet | 7934432302feb332e9c258cd6adcb464eb51b0fe | [
"BSD-3-Clause"
] | 1 | 2022-03-29T19:56:37.000Z | 2022-03-29T19:56:37.000Z | amdnet/tests/test_train_AMDNet.py | sparks-baird/AMDNet | 7934432302feb332e9c258cd6adcb464eb51b0fe | [
"BSD-3-Clause"
] | null | null | null | amdnet/tests/test_train_AMDNet.py | sparks-baird/AMDNet | 7934432302feb332e9c258cd6adcb464eb51b0fe | [
"BSD-3-Clause"
] | null | null | null | import os
def test_train_AMDNet():
os.system(
"train_AMDnet --material_file data/material_data.pkl --motif_file data/motif_graph.pkl --save_name save/new_model.hdf5"
)
| 20.777778 | 127 | 0.721925 |
7952ac6c9bf0ade19ca22aa852cf2e93c74311c5 | 2,706 | py | Python | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeNatGatewaysRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1 | 2021-03-08T02:59:17.000Z | 2021-03-08T02:59:17.000Z | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeNatGatewaysRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | 1 | 2020-05-31T14:51:47.000Z | 2020-05-31T14:51:47.000Z | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeNatGatewaysRequest.py | jia-jerry/aliyun-openapi-python-sdk | e90f3683a250cfec5b681b5f1d73a68f0dc9970d | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.825 | 78 | 0.767923 |
7952ac7c7b69b278528d21eb7299dd20ae3463af | 5,088 | py | Python | upb_lib/links.py | mag1024/upb-lib | 07fe4cc7b6ae884901e81b56463da53cf043d2a6 | [
"MIT"
] | null | null | null | upb_lib/links.py | mag1024/upb-lib | 07fe4cc7b6ae884901e81b56463da53cf043d2a6 | [
"MIT"
] | null | null | null | upb_lib/links.py | mag1024/upb-lib | 07fe4cc7b6ae884901e81b56463da53cf043d2a6 | [
"MIT"
] | null | null | null | """Definition of an link (scene)"""
import logging
from collections import namedtuple
from time import time
from .const import MINIMUM_BLINK_RATE, UpbCommand
from .elements import Addr, Element, Elements
from .util import check_dim_params, rate_to_seconds
LOG = logging.getLogger(__name__)
UPB_COMMAND_TO_ACTION_MAPPIN... | 34.147651 | 89 | 0.636596 |
7952ad98c14aaeab885f206bfac42b8c9340fe62 | 8,072 | py | Python | main.py | pgrv/CarND-Semantic-Segmentation | 42d0b8dcfd8d1b49dee8c1279758c1f33e8f428e | [
"MIT"
] | null | null | null | main.py | pgrv/CarND-Semantic-Segmentation | 42d0b8dcfd8d1b49dee8c1279758c1f33e8f428e | [
"MIT"
] | null | null | null | main.py | pgrv/CarND-Semantic-Segmentation | 42d0b8dcfd8d1b49dee8c1279758c1f33e8f428e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os.path
import tensorflow as tf
import helper
import warnings
from distutils.version import LooseVersion
import project_tests as tests
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer. You are using {}'.fo... | 43.165775 | 214 | 0.732161 |
7952adbdf6b6737b6dd629ec67db5a58469276f0 | 408 | py | Python | setup.py | ChiangYintso/py-comm | 5b80c56606e9db8ede0b41e9747418c4631a5326 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ChiangYintso/py-comm | 5b80c56606e9db8ede0b41e9747418c4631a5326 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ChiangYintso/py-comm | 5b80c56606e9db8ede0b41e9747418c4631a5326 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from py_comm import __version__
name = "py_comm"
setup(
name=name,
version=__version__,
keywords=["pip", "commons", "common", "utils", "util"],
description="Common utils for python",
packages=find_packages(include=[name, f"{name}... | 24 | 84 | 0.661765 |
7952ae5540eb9e3df8e101209db40716e1254b18 | 724 | py | Python | tests/conftest.py | adobe-type-tools/opentype-svg | 57353dfd094b6ed2225f18482331ff895e003d48 | [
"MIT"
] | 166 | 2016-09-14T07:42:58.000Z | 2022-03-27T14:37:27.000Z | tests/conftest.py | adobe-type-tools/opentype-svg | 57353dfd094b6ed2225f18482331ff895e003d48 | [
"MIT"
] | 13 | 2017-08-03T18:02:32.000Z | 2021-06-01T07:08:41.000Z | tests/conftest.py | adobe-type-tools/opentype-svg | 57353dfd094b6ed2225f18482331ff895e003d48 | [
"MIT"
] | 17 | 2018-01-20T03:21:40.000Z | 2022-02-26T12:33:17.000Z | # Copyright 2021 Adobe. All rights reserved.
import os
import pytest
@pytest.fixture
def fonts_dir():
root_dir = os.path.dirname(os.path.dirname(__file__))
yield os.path.join(root_dir, 'fonts')
@pytest.fixture
def base_font_path(fonts_dir):
yield os.path.join(fonts_dir, 'Zebrawood.otf')
@pytest.fixtu... | 20.111111 | 61 | 0.743094 |
7952af473f65c54e15f7d68b9f4289af2f555e86 | 6,912 | py | Python | misc/config_tools/static_allocators/bdf.py | tw4452852/acrn-hypervisor | 3af6c47292463564a8dec3dcca439c189fd82f8a | [
"BSD-3-Clause"
] | null | null | null | misc/config_tools/static_allocators/bdf.py | tw4452852/acrn-hypervisor | 3af6c47292463564a8dec3dcca439c189fd82f8a | [
"BSD-3-Clause"
] | null | null | null | misc/config_tools/static_allocators/bdf.py | tw4452852/acrn-hypervisor | 3af6c47292463564a8dec3dcca439c189fd82f8a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (C) 2021 Intel Corporation.
#
# SPDX-License-Identifier: BSD-3-Clause
#
import sys, os, re
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'library'))
import common, lib.error, lib.lib
# Constants for device name prefix
IVSHMEM = "IVSHMEM"
VUART = "V... | 43.746835 | 135 | 0.670284 |
7952b1412faa1a7b070f44384df7f65d68a2b231 | 158 | py | Python | src/pkg_trainmote/actions/actionInterface.py | FelixNievelstein/Trainmote-Server | 120b8b5a2db4c08789e57788233c38d659628330 | [
"MIT"
] | null | null | null | src/pkg_trainmote/actions/actionInterface.py | FelixNievelstein/Trainmote-Server | 120b8b5a2db4c08789e57788233c38d659628330 | [
"MIT"
] | null | null | null | src/pkg_trainmote/actions/actionInterface.py | FelixNievelstein/Trainmote-Server | 120b8b5a2db4c08789e57788233c38d659628330 | [
"MIT"
] | null | null | null |
class ActionInterface:
def prepareAction(self):
pass
def runAction(self, _callback):
pass
def cancelAction(self):
pass
| 14.363636 | 35 | 0.607595 |
7952b3dd631601e646420c976df1f58ee4a282fa | 3,331 | py | Python | myawwards/migrations/0001_initial.py | FestusMutie/festo-awwards | d8900915ee9d1eedda892712f99d867b904eb63f | [
"MIT"
] | null | null | null | myawwards/migrations/0001_initial.py | FestusMutie/festo-awwards | d8900915ee9d1eedda892712f99d867b904eb63f | [
"MIT"
] | null | null | null | myawwards/migrations/0001_initial.py | FestusMutie/festo-awwards | d8900915ee9d1eedda892712f99d867b904eb63f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2021-07-22 18:24
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import pyuploadcare.dj.models
class Migration(migrations.Migration):
initial = True
de... | 54.606557 | 183 | 0.576103 |
7952b63f3c1450cc932964505bfd7841c187d54d | 11,719 | py | Python | src/ssh/azext_ssh/tests/latest/test_custom.py | ravithanneeru/azure-cli-extensions | e0de87f3563ae39525370e9912589aac33e7bded | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/ssh/azext_ssh/tests/latest/test_custom.py | ravithanneeru/azure-cli-extensions | e0de87f3563ae39525370e9912589aac33e7bded | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/ssh/azext_ssh/tests/latest/test_custom.py | ravithanneeru/azure-cli-extensions | e0de87f3563ae39525370e9912589aac33e7bded | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 46.876 | 171 | 0.68086 |
7952b6eea83f89cf311b5c290e6d33cb85a42b38 | 11,982 | py | Python | fkie_iop_node_manager/src/fkie_iop_node_manager/transport/udp_mc.py | fkie/iop_node_manager | c2e12989a6baf7098c93c33ca6e95acf7584e462 | [
"Apache-2.0"
] | 1 | 2021-05-05T14:57:06.000Z | 2021-05-05T14:57:06.000Z | fkie_iop_node_manager/src/fkie_iop_node_manager/transport/udp_mc.py | fkie/iop_node_manager | c2e12989a6baf7098c93c33ca6e95acf7584e462 | [
"Apache-2.0"
] | null | null | null | fkie_iop_node_manager/src/fkie_iop_node_manager/transport/udp_mc.py | fkie/iop_node_manager | c2e12989a6baf7098c93c33ca6e95acf7584e462 | [
"Apache-2.0"
] | null | null | null | # ****************************************************************************
#
# fkie_iop_node_manager
# Copyright 2019 Fraunhofer FKIE
# Author: Alexander Tiderko
#
# 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 ... | 47.928 | 157 | 0.600985 |
7952b74338373fd591a57f007650f79550df6f64 | 1,407 | py | Python | backend/api/v1/form_types.py | B3zaleel/Cartedepoezii | 217050d5ea1203a11a5ba9a74b3d497b5120cb9a | [
"MIT"
] | 4 | 2022-03-19T09:25:14.000Z | 2022-03-31T21:51:30.000Z | backend/api/v1/form_types.py | B3zaleel/Cartedepoezii | 217050d5ea1203a11a5ba9a74b3d497b5120cb9a | [
"MIT"
] | 2 | 2022-03-24T01:02:13.000Z | 2022-03-26T09:50:09.000Z | backend/api/v1/form_types.py | B3zaleel/Cartedepoezii | 217050d5ea1203a11a5ba9a74b3d497b5120cb9a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
'''A module containing JSON body data representations.
'''
from pydantic import BaseModel
from typing import Optional, List
class SignInForm(BaseModel):
email: str
password: str
class SignUpForm(BaseModel):
name: str
email: str
password: str
class PasswordResetRequestForm(Ba... | 15.633333 | 54 | 0.683724 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.