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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79ea5afb56b5c22c2fd4a09ebe6676db2e302fea | 1,471 | py | Python | auth-api/migrations/versions/4c6ca48245be_user_remove_roles.py | argush3/sbc-auth | 96a4de3a4358b3158540aea8c4d99e06909793f2 | [
"Apache-2.0"
] | null | null | null | auth-api/migrations/versions/4c6ca48245be_user_remove_roles.py | argush3/sbc-auth | 96a4de3a4358b3158540aea8c4d99e06909793f2 | [
"Apache-2.0"
] | null | null | null | auth-api/migrations/versions/4c6ca48245be_user_remove_roles.py | argush3/sbc-auth | 96a4de3a4358b3158540aea8c4d99e06909793f2 | [
"Apache-2.0"
] | 1 | 2019-07-25T18:20:41.000Z | 2019-07-25T18:20:41.000Z | """user_remove_roles
Revision ID: 4c6ca48245be
Revises: d5b5eb2e8dd0
Create Date: 2021-03-08 11:37:13.600415
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = '4c6ca48245be'
down_revision = 'd5b5eb2e8dd0'
branch_labels = None
depends_on = None
def upgrade():
... | 34.209302 | 115 | 0.659415 |
6ae9514fdb0917623450ced925d27a61ab8d4221 | 823 | py | Python | qutipy/entropies/relative_entropy.py | sumeetkhatri/QuTIPy | ca2a3344c1caa818504425496ea37278d80b1c44 | [
"Apache-2.0"
] | 19 | 2020-11-11T13:00:22.000Z | 2022-03-14T11:18:04.000Z | qutipy/entropies/relative_entropy.py | sumeetkhatri/QuTIPy | ca2a3344c1caa818504425496ea37278d80b1c44 | [
"Apache-2.0"
] | null | null | null | qutipy/entropies/relative_entropy.py | sumeetkhatri/QuTIPy | ca2a3344c1caa818504425496ea37278d80b1c44 | [
"Apache-2.0"
] | 1 | 2022-03-03T15:20:15.000Z | 2022-03-03T15:20:15.000Z | '''
This code is part of QuTIpy.
(c) Copyright Sumeet Khatri, 2021
This code is licensed under the Apache License, Version 2.0. You may
obtain a copy of this license in the LICENSE.txt file in the root directory
of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
Any modifications or derivative wor... | 27.433333 | 75 | 0.749696 |
fef91ad015359ab6b0d16fb4e47c31b79bb4d2de | 6,255 | py | Python | BigProject/driver.py | lhd777/spark-fully-by-python | de9bcae778d4e173630237699b6113db854e08fb | [
"BSD-3-Clause"
] | 1 | 2020-08-07T04:13:28.000Z | 2020-08-07T04:13:28.000Z | BigProject/driver.py | lhd777/spark-fully-by-python | de9bcae778d4e173630237699b6113db854e08fb | [
"BSD-3-Clause"
] | null | null | null | BigProject/driver.py | lhd777/spark-fully-by-python | de9bcae778d4e173630237699b6113db854e08fb | [
"BSD-3-Clause"
] | null | null | null | import os
from rpyc import Service
from rpyc.utils.server import ThreadedServer
import socket
import json
from common import *
import rpyc
import pandas as pd
from io import StringIO
import math
import random
import time
from config import *
class JobTracker(Service):
def __init__(self):
... | 38.140244 | 113 | 0.57538 |
719f65cdcf80e11cdc80b5174758914f69ff63e2 | 854 | py | Python | scripts/shell.py | hperala/kontuwikibot | f409e6fb45adf4e553dc326d9fb3c0d29eda6373 | [
"MIT"
] | null | null | null | scripts/shell.py | hperala/kontuwikibot | f409e6fb45adf4e553dc326d9fb3c0d29eda6373 | [
"MIT"
] | null | null | null | scripts/shell.py | hperala/kontuwikibot | f409e6fb45adf4e553dc326d9fb3c0d29eda6373 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Spawns an interactive Python shell.
Usage:
python pwb.py shell [args]
If no arguments are given, the pywikibot library will not be loaded.
The following parameters are supported:
¶ms;
"""
# (C) Pywikibot team, 2014
#
# Distributed under the terms of the MIT lic... | 18.977778 | 79 | 0.651054 |
b93050f5ae2644b8c9faaaa4a8ecb3d8d2b5ceec | 1,020 | py | Python | run_pid.py | nutorbit/PID | 2c6fdc87408519f481e7b87c36b0a2cee605c01e | [
"MIT"
] | 1 | 2020-06-20T17:33:51.000Z | 2020-06-20T17:33:51.000Z | run_pid.py | nutorbit/PID | 2c6fdc87408519f481e7b87c36b0a2cee605c01e | [
"MIT"
] | null | null | null | run_pid.py | nutorbit/PID | 2c6fdc87408519f481e7b87c36b0a2cee605c01e | [
"MIT"
] | null | null | null | import click
import numpy as np
import matplotlib.pyplot as plt
from agent import Robot
@click.command()
@click.option('--n', default=100)
@click.option('--speed', default=1)
@click.argument('tau_p')
@click.argument('tau_i')
@click.argument('tau_d')
def main(n, speed, tau_p, tau_i, tau_d):
robot = Robot()
ro... | 25.5 | 84 | 0.621569 |
cb057c85272aeed2ed6b33ed6d290fb2a8f64331 | 1,641 | py | Python | badbaby/set_viz_params.py | pettetmw/badbaby | ed4710cc13bbbf9da3409f6ed74319ac9d4faa61 | [
"MIT"
] | null | null | null | badbaby/set_viz_params.py | pettetmw/badbaby | ed4710cc13bbbf9da3409f6ed74319ac9d4faa61 | [
"MIT"
] | null | null | null | badbaby/set_viz_params.py | pettetmw/badbaby | ed4710cc13bbbf9da3409f6ed74319ac9d4faa61 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" """
# Authors: Kambiz Tavabi <ktavabi@gmail.com>
# License: MIT
import matplotlib.pyplot as plt
def setup_pyplot(style='ggplot', font_size=12, title_size=14):
"""helper to format pyplot configuration parameters"""
plt.style.use(style) # ggplot or seaborn-notebook
plt.rcPara... | 34.914894 | 75 | 0.642901 |
8051679c7079c357e5274baf1f7edeb30a9e628f | 2,525 | py | Python | app/core/models.py | Energetic6/recipe-app-api | 83942222dbb34f85fdbf5dbc418e3c961f28d65d | [
"MIT"
] | null | null | null | app/core/models.py | Energetic6/recipe-app-api | 83942222dbb34f85fdbf5dbc418e3c961f28d65d | [
"MIT"
] | null | null | null | app/core/models.py | Energetic6/recipe-app-api | 83942222dbb34f85fdbf5dbc418e3c961f28d65d | [
"MIT"
] | null | null | null | import uuid
import os
from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
from django.conf import settings
def recipe_image_file_path(instance, filename):
"""Generate file path for new recipe image"""
... | 28.370787 | 76 | 0.675248 |
ebb906ebe1e6328a8a460ea8ceb4de572dbf2133 | 734 | py | Python | logic_demo/urls.py | wkshi/logic-demo | 831dc31d4d14050e03824559697cc15fcfeb319c | [
"Apache-2.0"
] | null | null | null | logic_demo/urls.py | wkshi/logic-demo | 831dc31d4d14050e03824559697cc15fcfeb319c | [
"Apache-2.0"
] | null | null | null | logic_demo/urls.py | wkshi/logic-demo | 831dc31d4d14050e03824559697cc15fcfeb319c | [
"Apache-2.0"
] | null | null | null | """logic_demo URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/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-ba... | 33.363636 | 77 | 0.700272 |
076bce2533dd54f129ffa3a8bf1038a3f6d9c6b3 | 17,038 | py | Python | color2osc_pq.py | 3mrrrx/slim2voice | 095c7cd327c365af779bc22f9f760fbc154f7e42 | [
"MIT"
] | null | null | null | color2osc_pq.py | 3mrrrx/slim2voice | 095c7cd327c365af779bc22f9f760fbc154f7e42 | [
"MIT"
] | null | null | null | color2osc_pq.py | 3mrrrx/slim2voice | 095c7cd327c365af779bc22f9f760fbc154f7e42 | [
"MIT"
] | null | null | null | #python script to read 64 bytes of data from tiva C and plot them
#using pyQtGraph on a loop. As soon as 64 bytes arrive plot is updated
#import pyqtgraph ## Add path to library (just for examples; you do not need this)
from pyqtgraph import initExample
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
im... | 34.700611 | 145 | 0.511621 |
313f037c45d9bfc4b822df718d926030c8c8f359 | 6,796 | py | Python | src/distributed_train/mujoco_parallel_batch.py | Yunaik/drl_env | d284e79847c59daa6ccb222f30fc7e2a86375546 | [
"MIT"
] | null | null | null | src/distributed_train/mujoco_parallel_batch.py | Yunaik/drl_env | d284e79847c59daa6ccb222f30fc7e2a86375546 | [
"MIT"
] | null | null | null | src/distributed_train/mujoco_parallel_batch.py | Yunaik/drl_env | d284e79847c59daa6ccb222f30fc7e2a86375546 | [
"MIT"
] | null | null | null | import os,inspect,argparse, datetime, copy, itertools, time
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0, parentdir)
os.sys.path.insert(0, os.path.dirname(currentdir))
import json
from b3px_gym.b3px_e... | 41.187879 | 171 | 0.642142 |
1dff2f4f76fa5caad8e4cf008118b2818fe46733 | 22,873 | py | Python | opps/containers/migrations/0011_auto__add_field_containerbox_title_url.py | jeanmask/opps | 031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87 | [
"MIT"
] | 159 | 2015-01-03T16:36:35.000Z | 2022-03-29T20:50:13.000Z | opps/containers/migrations/0011_auto__add_field_containerbox_title_url.py | jeanmask/opps | 031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87 | [
"MIT"
] | 81 | 2015-01-02T21:26:16.000Z | 2021-05-29T12:24:52.000Z | opps/containers/migrations/0011_auto__add_field_containerbox_title_url.py | jeanmask/opps | 031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87 | [
"MIT"
] | 75 | 2015-01-23T13:41:03.000Z | 2021-09-24T03:45:23.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from django.contrib.auth import get_user_model
User = get_user_model()
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding M2M table for field mirror_site on... | 96.510549 | 280 | 0.582783 |
f0c0a11628e826edda1c8e57b20f5cc5df4d0e88 | 954 | py | Python | tests/v1/test_query_value_widget_definition_type.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | tests/v1/test_query_value_widget_definition_type.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | tests/v1/test_query_value_widget_definition_type.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import absolute_import
import sys
import unittest
im... | 28.058824 | 108 | 0.756813 |
f2a6079444413c0e1ae2173cb8ecc6e024d5d86f | 1,080 | py | Python | installation/Template/Qlik-Sagemaker/Lambda/breastcancer/breastcancerpredictor.py | cleveranjos/Rapid-ML-Gateway | 10a14abfce3351791331642c47eddfbf622e76d2 | [
"MIT"
] | 3 | 2020-07-15T19:45:31.000Z | 2020-09-30T16:15:48.000Z | installation/Template/Qlik-Sagemaker/Lambda/breastcancer/breastcancerpredictor.py | cleveranjos/Rapid-ML-Gateway | 10a14abfce3351791331642c47eddfbf622e76d2 | [
"MIT"
] | 12 | 2020-07-15T17:00:24.000Z | 2021-01-19T21:02:00.000Z | installation/Template/Qlik-Sagemaker/Lambda/breastcancer/breastcancerpredictor.py | cleveranjos/Rapid-ML-Gateway | 10a14abfce3351791331642c47eddfbf622e76d2 | [
"MIT"
] | 2 | 2020-07-15T18:59:02.000Z | 2020-10-07T17:22:52.000Z | import os
import io
import boto3
import json
import csv
import logging
logger = logging.getLogger(__name__)
logging.getLogger().setLevel(logging.INFO)
# grab environment variables
ENDPOINT_NAME = os.environ['ENDPOINT_NAME']
runtime= boto3.client('runtime.sagemaker')
def lambda_handler(event, context):
logger.info... | 36 | 66 | 0.666667 |
077444f1d01931e5a1cd6a304920d7529cb37bb3 | 8,554 | py | Python | sphinx/util/osutil.py | PeerHerholz/smobsc | db34d2bb96b80579bd4a3f4c198a6b524c5a134a | [
"BSD-2-Clause"
] | 3 | 2019-06-11T09:42:08.000Z | 2020-03-10T15:57:09.000Z | sphinx/util/osutil.py | PeerHerholz/smobsc | db34d2bb96b80579bd4a3f4c198a6b524c5a134a | [
"BSD-2-Clause"
] | 12 | 2019-01-09T15:43:57.000Z | 2020-01-21T10:46:30.000Z | sphinx/util/osutil.py | PeerHerholz/smobsc | db34d2bb96b80579bd4a3f4c198a6b524c5a134a | [
"BSD-2-Clause"
] | 10 | 2019-02-04T11:49:35.000Z | 2020-03-21T13:32:20.000Z | """
sphinx.util.osutil
~~~~~~~~~~~~~~~~~~
Operating system-related utility functions for Sphinx.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import contextlib
import errno
import filecmp
import os
import re
import shutil
import sys
... | 29.496552 | 87 | 0.611059 |
204fbe5c22321fe789c69ccb729c805029574531 | 1,833 | pyw | Python | source/nvda_eoaProxy.pyw | asaranprasad/nvda | e9609694acbfb06398eb6552067a0dcd532d67af | [
"bzip2-1.0.6"
] | 2 | 2019-04-27T11:28:51.000Z | 2019-04-27T11:31:36.000Z | source/nvda_eoaProxy.pyw | asaranprasad/nvda | e9609694acbfb06398eb6552067a0dcd532d67af | [
"bzip2-1.0.6"
] | 3 | 2017-09-29T17:14:18.000Z | 2019-05-20T16:13:39.000Z | source/nvda_eoaProxy.pyw | asaranprasad/nvda | e9609694acbfb06398eb6552067a0dcd532d67af | [
"bzip2-1.0.6"
] | 1 | 2017-09-29T08:53:52.000Z | 2017-09-29T08:53:52.000Z | #nvda_eoaProxy.pyw
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2014 NV Access Limited
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
"""NVDA proxy process for Ease of Access in Windows Vista/7.
This version of Ease of Access terminates ATs on every... | 30.04918 | 114 | 0.737043 |
f205c5715da9de429904bca0b85438303c17518a | 6,173 | py | Python | setup.py | Pencilcaseman/LibPyMath | c04260a6b824e092cc242ee05cbcaedcbd896b2f | [
"MIT"
] | 2 | 2020-10-20T10:31:15.000Z | 2020-10-20T10:31:16.000Z | setup.py | Pencilcaseman/LibPyMath | c04260a6b824e092cc242ee05cbcaedcbd896b2f | [
"MIT"
] | 2 | 2020-08-26T19:07:54.000Z | 2021-12-03T09:12:28.000Z | setup.py | Pencilcaseman/LibPyMath | c04260a6b824e092cc242ee05cbcaedcbd896b2f | [
"MIT"
] | 2 | 2021-12-09T04:59:51.000Z | 2021-12-09T09:06:12.000Z | """
Copyright 2020 Toby Davis
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, sublice... | 26.15678 | 122 | 0.627734 |
f1298f26c1d99e265de6b05700fd2b5dc271bfcd | 5,638 | py | Python | tests/test_gerenciador.py | kylefelipe/gerenciador-tarefas | 7e318b1332fe77dc861c65a9efa43772c8881516 | [
"MIT"
] | null | null | null | tests/test_gerenciador.py | kylefelipe/gerenciador-tarefas | 7e318b1332fe77dc861c65a9efa43772c8881516 | [
"MIT"
] | 1 | 2022-03-09T01:39:26.000Z | 2022-03-09T01:39:26.000Z | tests/test_gerenciador.py | kylefelipe/gerenciador-tarefas | 7e318b1332fe77dc861c65a9efa43772c8881516 | [
"MIT"
] | null | null | null | from starlette.testclient import TestClient
from gerenciador_tarefas.gerenciador import app, TAREFAS
# Testando o GET
def test_quando_listar_tarefas_devo_ter_como_retorno_de_status200():
cliente = TestClient(app)
resposta = cliente.get("/tarefas")
assert resposta.status_code == 200
def test_quando_list... | 32.97076 | 89 | 0.702377 |
a81cfcc6e868a1c3df22a1f2cb0f2f0ba3818736 | 4,075 | py | Python | tests/test_project/polls/migrations/0001_initial_squashed_0006_auto_20171015_1907.py | anx-mfischer/django-userforeignkey | c6ddeeb2fd62420d958833dfab9d9047ef2e2aac | [
"BSD-3-Clause"
] | 18 | 2016-04-29T19:46:41.000Z | 2021-06-21T03:43:24.000Z | tests/test_project/polls/migrations/0001_initial_squashed_0006_auto_20171015_1907.py | anx-mfischer/django-userforeignkey | c6ddeeb2fd62420d958833dfab9d9047ef2e2aac | [
"BSD-3-Clause"
] | 3 | 2019-06-03T12:35:16.000Z | 2021-10-15T07:31:56.000Z | tests/test_project/polls/migrations/0001_initial_squashed_0006_auto_20171015_1907.py | anx-mfischer/django-userforeignkey | c6ddeeb2fd62420d958833dfab9d9047ef2e2aac | [
"BSD-3-Clause"
] | 11 | 2018-08-12T17:32:15.000Z | 2021-10-08T07:52:24.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-15 19:07
from __future__ import unicode_literals
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
import django_userforeignkey.models.fields
... | 50.9375 | 251 | 0.645644 |
63c08346d9b5dad9c34628c782d290744fee834e | 5,090 | py | Python | image/cleanup.py | joseangel-sc/conducto | 6b873defc9327d6f8b51a826dd7a7ef6c3e41396 | [
"Apache-2.0"
] | null | null | null | image/cleanup.py | joseangel-sc/conducto | 6b873defc9327d6f8b51a826dd7a7ef6c3e41396 | [
"Apache-2.0"
] | null | null | null | image/cleanup.py | joseangel-sc/conducto | 6b873defc9327d6f8b51a826dd7a7ef6c3e41396 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta, timezone
import dateutil.parser
import json
import re
import typing
import conducto as co
from conducto.shared import async_utils
_nanosecond_size = 1
_microsecond_size = 1000 * _nanosecond_size
_millisecond_size = 1000 * _microsecond_size
_second_size = 1000 * _millisecond_s... | 29.421965 | 87 | 0.60668 |
b01b1574c135c6a39d3d11fe3a5cd28f5a5e10cc | 23,966 | py | Python | python/kserve/kserve/storage.py | yuzisun/kserve | cac60806996256fed59133f9f8decfa1eab401d8 | [
"Apache-2.0"
] | null | null | null | python/kserve/kserve/storage.py | yuzisun/kserve | cac60806996256fed59133f9f8decfa1eab401d8 | [
"Apache-2.0"
] | 2 | 2022-02-07T07:47:33.000Z | 2022-03-23T02:40:33.000Z | python/kserve/kserve/storage.py | yuzisun/kserve | cac60806996256fed59133f9f8decfa1eab401d8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The KServe Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 42.417699 | 117 | 0.595552 |
2b6da66761c12c5ea111bd0510a3a3266f3e2b6b | 19,372 | py | Python | python/ccxt/async_support/coinone.py | ZacharyATanenbaum/ccxt | 539a9e83dd2ca6a547103fd5910e0e776af5a48a | [
"MIT"
] | 2 | 2020-02-25T22:50:00.000Z | 2020-09-11T00:24:45.000Z | python/ccxt/async_support/coinone.py | ZacharyATanenbaum/ccxt | 539a9e83dd2ca6a547103fd5910e0e776af5a48a | [
"MIT"
] | 8 | 2018-09-04T05:28:15.000Z | 2018-12-21T08:10:35.000Z | python/ccxt/async_support/coinone.py | ZacharyATanenbaum/ccxt | 539a9e83dd2ca6a547103fd5910e0e776af5a48a | [
"MIT"
] | 1 | 2022-01-08T07:30:48.000Z | 2022-01-08T07:30:48.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.async_support.base.exchange import Exchange
import base64
import hashlib
import json
from ccxt.base.errors import ExchangeError
f... | 42.389497 | 369 | 0.486888 |
e93d752ab220da597cf6043df9542f8391127f83 | 1,387 | py | Python | myproject/boards/tests/test_templatetags.py | xiaohui100/AlfonsBlog | 1c9854331129ec695df1530d8d8289e8a0d2d5fa | [
"MIT"
] | null | null | null | myproject/boards/tests/test_templatetags.py | xiaohui100/AlfonsBlog | 1c9854331129ec695df1530d8d8289e8a0d2d5fa | [
"MIT"
] | 3 | 2020-06-05T18:11:15.000Z | 2021-06-10T20:18:28.000Z | myproject/boards/tests/test_templatetags.py | Alfonsxh/AlfonsBlog | 1c9854331129ec695df1530d8d8289e8a0d2d5fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
@author: Alfons
@contact: alfons_xh@163.com
@file: test_templatetags.py
@time: 18-3-25 上午11:38
@version: v1.0
"""
from django import forms
from django.test import TestCase
from ..templatetags.form_tags import field_type, input_class
class ExampleForm(forms.Form):
name ... | 32.255814 | 92 | 0.68349 |
58ec4f199714a0da744a8f0f0688353e3e9ccbb3 | 9,450 | py | Python | neural_models/cnn_feature.py | wtsyang/UserIntentPrediction | d694b44ab1d120d0c394e62699942744a210487b | [
"MIT"
] | 1 | 2021-03-13T18:18:56.000Z | 2021-03-13T18:18:56.000Z | neural_models/cnn_feature.py | wtsyang/UserIntentPrediction | d694b44ab1d120d0c394e62699942744a210487b | [
"MIT"
] | 2 | 2020-04-17T21:40:24.000Z | 2020-04-17T21:42:00.000Z | neural_models/cnn_feature.py | wtsyang/UserIntentPrediction | d694b44ab1d120d0c394e62699942744a210487b | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
from __future__ import print_function
import os
# os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
# os.environ["CUDA_VISIBLE_DEVICES"] = "2"
# In[2]:
import os
import sys
import numpy as np
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_seque... | 28.293413 | 138 | 0.647196 |
524b6fe964eac4da754b3d2a53f92a5b24ddebdb | 13,395 | py | Python | flopy/mf6/modflow/mfgwfoc.py | andrewcalderwood/flopy | 0432ce96a0a5eec4d20adb4d384505632a2db3dc | [
"CC0-1.0",
"BSD-3-Clause"
] | 2 | 2019-12-17T16:00:44.000Z | 2021-10-08T00:56:18.000Z | flopy/mf6/modflow/mfgwfoc.py | andrewcalderwood/flopy | 0432ce96a0a5eec4d20adb4d384505632a2db3dc | [
"CC0-1.0",
"BSD-3-Clause"
] | 1 | 2018-09-28T17:08:51.000Z | 2018-10-02T22:15:28.000Z | flopy/mf6/modflow/mfgwfoc.py | andrewcalderwood/flopy | 0432ce96a0a5eec4d20adb4d384505632a2db3dc | [
"CC0-1.0",
"BSD-3-Clause"
] | 1 | 2022-02-06T20:05:17.000Z | 2022-02-06T20:05:17.000Z | # DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY
# mf6/utils/createpackages.py
# FILE created on October 29, 2021 21:09:57 UTC
from .. import mfpackage
from ..data.mfdatautil import ListTemplateGenerator
class ModflowGwfoc(mfpackage.MFPackage):
"""
ModflowGwfoc defines a oc package within a g... | 31.151163 | 79 | 0.493169 |
02a56c69d1523439ede8712cb2fa7f2ea3f213e7 | 3,060 | py | Python | cas/middleware.py | PrincetonUSG/ReCal | a65782602b1a6d8932ff4cca1526cb9a3addacf6 | [
"MIT"
] | 13 | 2017-01-27T18:07:04.000Z | 2022-02-11T19:32:29.000Z | cas/middleware.py | kl29/recal | 1464d5922f3a1fcc0d756565a3a0e8689e9e154d | [
"MIT"
] | 14 | 2017-01-08T22:28:49.000Z | 2020-02-05T03:08:08.000Z | cas/middleware.py | kl29/recal | 1464d5922f3a1fcc0d756565a3a0e8689e9e154d | [
"MIT"
] | 5 | 2017-12-07T17:41:35.000Z | 2020-04-27T18:24:52.000Z | """CAS authentication middleware"""
from urllib import urlencode
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth import logout as do_logout
from django.contrib.auth.views import login, logout
from django.core.urlresolvers import reverse
from django.http im... | 40.263158 | 102 | 0.673856 |
df6e2e5faa06f3c322004799e7b1acf7ea60ae4d | 6,198 | py | Python | RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/openflow/applyactions.py | ralfjon/IxNetwork | c0c834fbc465af69c12fd6b7cee4628baba7fff1 | [
"MIT"
] | null | null | null | RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/openflow/applyactions.py | ralfjon/IxNetwork | c0c834fbc465af69c12fd6b7cee4628baba7fff1 | [
"MIT"
] | null | null | null | RestPy/ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/openflow/applyactions.py | ralfjon/IxNetwork | c0c834fbc465af69c12fd6b7cee4628baba7fff1 | [
"MIT"
] | null | null | null |
# Copyright 1997 - 2018 by IXIA Keysight
#
# 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, p... | 25.717842 | 128 | 0.708616 |
4550bef20b3f502a63d22df11305f8e87282fcda | 6,374 | py | Python | train.py | baiwuchang/CLM_DR | 6ca572680e1f829f2cb181f192bc30e4fed69e36 | [
"MIT"
] | 1 | 2022-01-06T23:12:24.000Z | 2022-01-06T23:12:24.000Z | train.py | baiwuchang/CLM_DR | 6ca572680e1f829f2cb181f192bc30e4fed69e36 | [
"MIT"
] | null | null | null | train.py | baiwuchang/CLM_DR | 6ca572680e1f829f2cb181f192bc30e4fed69e36 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Detection Training Script.
This scripts reads a given config file and runs the training or evaluation.
It is an entry point that is made to train standard models in dl_lib.
In order to let one script support training of many models,
this scrip... | 40.598726 | 93 | 0.650612 |
d5cb393f8249a8697c1c2c09ac2cce04075ef044 | 22,159 | py | Python | scripts/wordnet.py | bbou/english-wordnet | da5bfd4d5c6aaa6d4854fd11d69925826c3df576 | [
"RSA-MD"
] | null | null | null | scripts/wordnet.py | bbou/english-wordnet | da5bfd4d5c6aaa6d4854fd11d69925826c3df576 | [
"RSA-MD"
] | null | null | null | scripts/wordnet.py | bbou/english-wordnet | da5bfd4d5c6aaa6d4854fd11d69925826c3df576 | [
"RSA-MD"
] | null | null | null | from enum import Enum
from xml.sax import ContentHandler, parse
import re
import sys
class Lexicon:
"""The Lexicon contains all the synsets and entries"""
def __init__(self, id, label, language, email, license, version, url):
self.id = id
self.label = label
self.language = language
... | 37.494078 | 133 | 0.633287 |
48ee7db124df9556394af4fa657fc1f2da140efc | 3,987 | py | Python | tensorflow/python/debug/lib/profiling_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/debug/lib/profiling_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/debug/lib/profiling_test.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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... | 39.475248 | 81 | 0.721094 |
6ba64f12acb8462d44a3dbc237a03410a16dd8a8 | 2,055 | py | Python | ImageDataset.py | KarlTDebiec/Ramaplot | 3e23039eaaaffe92a23890cdcb83eabc7dbab868 | [
"BSD-3-Clause"
] | 5 | 2015-09-25T16:37:56.000Z | 2020-06-08T11:06:42.000Z | ImageDataset.py | KarlTDebiec/Ramaplot | 3e23039eaaaffe92a23890cdcb83eabc7dbab868 | [
"BSD-3-Clause"
] | 1 | 2016-08-06T18:24:16.000Z | 2016-08-07T18:28:01.000Z | ImageDataset.py | KarlTDebiec/Ramaplot | 3e23039eaaaffe92a23890cdcb83eabc7dbab868 | [
"BSD-3-Clause"
] | 3 | 2015-09-25T16:38:01.000Z | 2022-03-27T18:28:37.000Z | # -*- coding: utf-8 -*-
# ramaplot.ImageDataset.py
#
# Copyright (C) 2015 Karl T Debiec
# All rights reserved.
#
# This software may be modified and distributed under the terms of the
# BSD license. See the LICENSE file for details.
"""
Manages Ramachandran plot image datasets.
"""
###########################... | 38.773585 | 79 | 0.540633 |
8a3dd0014631acfce95316f958804d79a6643d9c | 8,231 | py | Python | pylbm_ui/widgets/save_widget.py | pylbm/pylbm_ui | 0a7202ee6ee5424486ce6ade1d3b18d8139d4ffb | [
"BSD-3-Clause"
] | 3 | 2021-05-17T20:38:32.000Z | 2021-11-16T17:54:26.000Z | pylbm_ui/widgets/save_widget.py | pylbm/pylbm_ui | 0a7202ee6ee5424486ce6ade1d3b18d8139d4ffb | [
"BSD-3-Clause"
] | 32 | 2021-04-29T13:27:13.000Z | 2021-07-01T07:22:58.000Z | pylbm_ui/widgets/save_widget.py | pylbm/pylbm_ui | 0a7202ee6ee5424486ce6ade1d3b18d8139d4ffb | [
"BSD-3-Clause"
] | 1 | 2021-04-30T06:40:21.000Z | 2021-04-30T06:40:21.000Z | # Authors:
# Loic Gouarin <loic.gouarin@polytechnique.edu>
# Benjamin Graille <benjamin.graille@universite-paris-saclay.fr>
# Thibaut Van Hoof <thibaut.vanhoof@cenaero.be>
#
# License: BSD 3 clause
import ipyvuetify as v
from .pylbmwidget import out, debug_widget
import re
import enum
from traitlets impo... | 35.175214 | 91 | 0.559227 |
1e40f6eb4627afa2e4b5eeec35e09333f8704c3d | 764 | py | Python | networkx/algorithms/node_classification/__init__.py | FrancescoBonacina/networkx | a73a610e0bbd6e13b183b15ca47b221df5f8e26a | [
"BSD-3-Clause"
] | 10 | 2020-04-29T10:38:03.000Z | 2022-03-16T03:30:28.000Z | networkx/algorithms/node_classification/__init__.py | FrancescoBonacina/networkx | a73a610e0bbd6e13b183b15ca47b221df5f8e26a | [
"BSD-3-Clause"
] | 2 | 2019-11-13T03:48:53.000Z | 2021-02-15T16:52:09.000Z | networkx/algorithms/node_classification/__init__.py | FrancescoBonacina/networkx | a73a610e0bbd6e13b183b15ca47b221df5f8e26a | [
"BSD-3-Clause"
] | 2 | 2020-02-13T10:33:34.000Z | 2020-08-09T07:59:26.000Z | """ This module provides the functions for node classification problem.
The functions in this module are not imported
into the top level `networkx` namespace.
You can access these functions by importing
the `networkx.algorithms.node_classification` modules,
then accessing the functions as attributes of `node_classific... | 31.833333 | 71 | 0.71466 |
f5c9708c56c87192445f51f50ae4c6e2403845be | 4,051 | py | Python | parser/team15/TytusDB_G15/report_errores.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/team15/TytusDB_G15/report_errores.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/team15/TytusDB_G15/report_errores.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | listaErrores = []
class Error:
def __init__(self, descripcion: str, linea: int, columna: int, tipo: str):
self.descripcion = descripcion
self.linea = linea
self.columna = columna
self.tipo = tipo
class ErrorHTML:
def __init__(self):
''' GENERAR HTML PARA LOS ERRORES LEX... | 46.034091 | 150 | 0.454209 |
9fb548a672d0d2401fc9f0f3e86f59ffb932d53a | 5,022 | py | Python | tests/python/proton_tests/sasl.py | AppPlatPerf/qpid-proton | 6202a323bb28c285b642c485a4c55fd11e54d399 | [
"Apache-2.0"
] | 1 | 2017-04-13T20:28:59.000Z | 2017-04-13T20:28:59.000Z | tests/python/proton_tests/sasl.py | AppPlatPerf/qpid-proton | 6202a323bb28c285b642c485a4c55fd11e54d399 | [
"Apache-2.0"
] | null | null | null | tests/python/proton_tests/sasl.py | AppPlatPerf/qpid-proton | 6202a323bb28c285b642c485a4c55fd11e54d399 | [
"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... | 27.145946 | 131 | 0.666268 |
52fe7933c090b603761efb66bbfbf6a6b79ec7d0 | 2,774 | py | Python | coroutine-queue/producer-consumer.py | psuresh39/async-design-patterns | f514edaf2b11ecf34b5b8dc2f237b869aa4ff1b9 | [
"Apache-2.0"
] | 3 | 2021-02-25T22:20:07.000Z | 2021-07-02T09:43:07.000Z | coroutine-queue/producer-consumer.py | psuresh39/async-design-patterns | f514edaf2b11ecf34b5b8dc2f237b869aa4ff1b9 | [
"Apache-2.0"
] | null | null | null | coroutine-queue/producer-consumer.py | psuresh39/async-design-patterns | f514edaf2b11ecf34b5b8dc2f237b869aa4ff1b9 | [
"Apache-2.0"
] | 2 | 2021-01-27T08:44:31.000Z | 2021-05-31T16:36:34.000Z | __author__ = 'psuresh'
import asyncio
@asyncio.coroutine
def consumer(n, q):
print('consumer {}: starting'.format(n))
while True:
print('consumer {}: waiting for item'.format(n))
item = yield from q.get()
print('consumer {}: has item {}'.format(n, item))
if item is None:
... | 28.306122 | 70 | 0.65465 |
fa664288070c63d67581b25a99ae9b95479e6435 | 1,355 | py | Python | Python/Searching/2/find_str_array_with_empty_str.py | Tikam02/Data_Structure_Algorithms | 7c17f744975a72fa42f0f3f892c0b7e041cdef0c | [
"MIT"
] | 5 | 2017-08-03T06:33:49.000Z | 2021-08-06T13:20:57.000Z | Python/Searching/2/find_str_array_with_empty_str.py | Tikam02/Data_Structure_Algorithms | 7c17f744975a72fa42f0f3f892c0b7e041cdef0c | [
"MIT"
] | null | null | null | Python/Searching/2/find_str_array_with_empty_str.py | Tikam02/Data_Structure_Algorithms | 7c17f744975a72fa42f0f3f892c0b7e041cdef0c | [
"MIT"
] | 6 | 2017-04-27T13:30:49.000Z | 2020-11-01T20:28:55.000Z | #!/usr/bin/env python
__author__ = "bt3"
''' Given a sorted an array with empty strings,
we use binary search to find some string (since the list is sorted):
--> we deal with the empty strings with strip and then run to left
and right, or move mid to the closed non-empty str (remember that
the index ... | 24.636364 | 72 | 0.509225 |
68e54988b3947339eee47fb47a16dc13a3ed9fb9 | 6,161 | py | Python | pontoon/teams/tests/test_views.py | sccofield/pontoon | f7b61488fa946dea706ba9f90a735e8a2a885c73 | [
"BSD-3-Clause"
] | null | null | null | pontoon/teams/tests/test_views.py | sccofield/pontoon | f7b61488fa946dea706ba9f90a735e8a2a885c73 | [
"BSD-3-Clause"
] | null | null | null | pontoon/teams/tests/test_views.py | sccofield/pontoon | f7b61488fa946dea706ba9f90a735e8a2a885c73 | [
"BSD-3-Clause"
] | 1 | 2019-10-07T17:46:36.000Z | 2019-10-07T17:46:36.000Z | from __future__ import absolute_import
import pytest
from mock import patch
from django.http import HttpResponse
from django.shortcuts import render
from pontoon.test.factories import UserFactory
def _get_sorted_users():
return sorted(
UserFactory.create_batch(size=3),
key=lambda u: u.email
... | 28.523148 | 82 | 0.691446 |
31c791665887554e0ed5a79a4e12bf85176261dd | 2,457 | py | Python | src_py/hat/qt.py | hat-open/hat-qt | 789f1fc1ebd25b9b9bf2e59ef193d619223049c3 | [
"Apache-2.0"
] | null | null | null | src_py/hat/qt.py | hat-open/hat-qt | 789f1fc1ebd25b9b9bf2e59ef193d619223049c3 | [
"Apache-2.0"
] | null | null | null | src_py/hat/qt.py | hat-open/hat-qt | 789f1fc1ebd25b9b9bf2e59ef193d619223049c3 | [
"Apache-2.0"
] | null | null | null | """Parallel execution of Qt and asyncio threads"""
import concurrent.futures
import queue
import sys
import threading
import asyncio
import functools
import typing
import PySide6.QtCore
import PySide6.QtWebEngineWidgets
import PySide6.QtWidgets
from hat import aio
from hat import util
QtExecutor = typing.Callable[... | 29.25 | 73 | 0.661376 |
919386d4460ec6782954f97cc1f2304ba05c47cd | 50 | py | Python | variable.py | RatulSaqibKhan/learn_python | 20dd13fd1b4e677625cb81e3f84b5eb0a0008c10 | [
"MIT"
] | null | null | null | variable.py | RatulSaqibKhan/learn_python | 20dd13fd1b4e677625cb81e3f84b5eb0a0008c10 | [
"MIT"
] | null | null | null | variable.py | RatulSaqibKhan/learn_python | 20dd13fd1b4e677625cb81e3f84b5eb0a0008c10 | [
"MIT"
] | null | null | null | text_to_print = "Hello Print"
print(text_to_print) | 25 | 29 | 0.82 |
9707a5e8fc88547b73ff38898e8f16a7f7aa2576 | 16,527 | py | Python | src/restfx/routes/decorator.py | hyjiacan/restfx | 8ba70bc099e6ace0c9b3afe8909ea61a5ff82dec | [
"MIT",
"BSD-3-Clause"
] | 5 | 2021-01-25T11:09:41.000Z | 2021-04-28T07:17:21.000Z | src/restfx/routes/decorator.py | hyjiacan/restfx | 8ba70bc099e6ace0c9b3afe8909ea61a5ff82dec | [
"MIT",
"BSD-3-Clause"
] | null | null | null | src/restfx/routes/decorator.py | hyjiacan/restfx | 8ba70bc099e6ace0c9b3afe8909ea61a5ff82dec | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-01-28T00:53:37.000Z | 2021-01-28T00:53:37.000Z | import json
from collections import OrderedDict
from enum import Enum
from functools import partial, wraps
from types import FunctionType
from typing import Tuple, Union
from werkzeug.datastructures import MultiDict
from .parameter_interface import IParam
from .validator import Validator
from ..config impo... | 30.548983 | 116 | 0.604828 |
19b31a2b22e0e375d9ebd9f0688cfeab191495e1 | 10,202 | py | Python | vendor/iphone-dataprotection/python_scripts/keystore/keybag.py | trailofbits/ios-integrity-validator | 2090e6321cd313493c6f3746866411d865cde6ab | [
"BSD-2-Clause"
] | 19 | 2019-04-27T15:09:22.000Z | 2022-03-27T14:06:15.000Z | vendor/iphone-dataprotection/python_scripts/keystore/keybag.py | trailofbits/iverify-oss | 2090e6321cd313493c6f3746866411d865cde6ab | [
"BSD-2-Clause"
] | null | null | null | vendor/iphone-dataprotection/python_scripts/keystore/keybag.py | trailofbits/iverify-oss | 2090e6321cd313493c6f3746866411d865cde6ab | [
"BSD-2-Clause"
] | 4 | 2015-03-30T06:15:30.000Z | 2016-10-22T19:04:53.000Z | from crypto.PBKDF2 import PBKDF2
from crypto.aes import AESdecryptCBC
from crypto.aeswrap import AESUnwrap
from crypto.aeswrap import AESwrap
from crypto.curve25519 import curve25519
from hashlib import sha256, sha1
from util.bplist import BPlistReader
from util.tlv import loopTLVBlocks, tlvToDict
import hmac
... | 39.542636 | 112 | 0.572045 |
cfb0e4ca120c7cb0b808be1ba65e54d2a822bf07 | 4,805 | py | Python | astropy/io/misc/asdf/tags/transform/basic.py | jonathansick/astropy | ceed879bdcf37ed2b40431c07074179d6aa5f7b3 | [
"BSD-3-Clause"
] | null | null | null | astropy/io/misc/asdf/tags/transform/basic.py | jonathansick/astropy | ceed879bdcf37ed2b40431c07074179d6aa5f7b3 | [
"BSD-3-Clause"
] | 2 | 2016-11-30T20:31:42.000Z | 2016-12-02T23:50:10.000Z | astropy/io/misc/asdf/tags/transform/basic.py | jonathansick/astropy | ceed879bdcf37ed2b40431c07074179d6aa5f7b3 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
from asdf import tagged, yamlutil
from astropy.modeling import mappings
from astropy.utils import minversion
from astropy.modeling import functional_models
from astropy.io.misc.asdf.types import AstropyAsdfType
__all__ = ['Trans... | 29.660494 | 95 | 0.62102 |
fda2ffa0c72a36add514fc3a02d7318099a323bd | 452 | py | Python | blog/migrations/0011_auto_20170522_2116.py | nathanhnew/NLNF | cf00b72c81f23ff2724553466910e8b3e25e5ec3 | [
"MIT"
] | null | null | null | blog/migrations/0011_auto_20170522_2116.py | nathanhnew/NLNF | cf00b72c81f23ff2724553466910e8b3e25e5ec3 | [
"MIT"
] | null | null | null | blog/migrations/0011_auto_20170522_2116.py | nathanhnew/NLNF | cf00b72c81f23ff2724553466910e8b3e25e5ec3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-23 02:16
from __future__ import unicode_literals
from django.db import migrations
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
('blog', '0010_remove_post_media'),
]
operations = [
migrations... | 20.545455 | 48 | 0.615044 |
9682b762829571f178f3f621f7a69c171b4878d7 | 4,822 | py | Python | tests/test_assembly.py | carlosal1015/scikit-fem | 1e73a417e9b43fe0a36e29807792c41fa289b77d | [
"BSD-3-Clause"
] | null | null | null | tests/test_assembly.py | carlosal1015/scikit-fem | 1e73a417e9b43fe0a36e29807792c41fa289b77d | [
"BSD-3-Clause"
] | null | null | null | tests/test_assembly.py | carlosal1015/scikit-fem | 1e73a417e9b43fe0a36e29807792c41fa289b77d | [
"BSD-3-Clause"
] | null | null | null | """Unit tests for assembly operations."""
import unittest
import numpy as np
from skfem import *
class IntegrateOneOverBoundaryQ1(unittest.TestCase):
def createBasis(self):
m = MeshQuad()
m.refine(6)
self.fbasis = FacetBasis(m, ElementQuad1())
self.boundary_area = 4.0000
def r... | 25.648936 | 79 | 0.568851 |
8c339d2e15d77cb195ce5d0ee56715ca444d67c9 | 1,127 | py | Python | car_acc_plotly.py | EricMbuthia/car_acc | 11c1d32400279f462861793ad393f00861445b64 | [
"MIT"
] | null | null | null | car_acc_plotly.py | EricMbuthia/car_acc | 11c1d32400279f462861793ad393f00861445b64 | [
"MIT"
] | null | null | null | car_acc_plotly.py | EricMbuthia/car_acc | 11c1d32400279f462861793ad393f00861445b64 | [
"MIT"
] | null | null | null | import dash
# import dash_core_components as dcc
# import dash_html_components as html
from dash.dependencies import Input, Output
from dash import dcc
from dash import html
app = dash.Dash()
# app.layout = html.Div(children=[
# html.H1('Div tutorialsssss'),
# dcc.Graph(id='example', figure={
# 'd... | 25.613636 | 79 | 0.574091 |
67cb8b2f0b4b929477c6c9fe50147595242a37bc | 793 | py | Python | python/wallpaper_plugin/pid.py | AJellyBean/CloudPan | 66f138ed22518d116cc3db03a31792b33e23284d | [
"Apache-2.0"
] | 15 | 2016-11-26T15:54:51.000Z | 2020-09-10T05:56:56.000Z | python/wallpaper_plugin/pid.py | AJellyBean/CloudPan | 66f138ed22518d116cc3db03a31792b33e23284d | [
"Apache-2.0"
] | null | null | null | python/wallpaper_plugin/pid.py | AJellyBean/CloudPan | 66f138ed22518d116cc3db03a31792b33e23284d | [
"Apache-2.0"
] | 22 | 2017-08-09T02:16:44.000Z | 2020-11-07T12:02:58.000Z | #!/usr/bin/python
#coding:utf8
import os
import sys
import time
import fcntl #导入模块
class FLOCK(object):
def __init__(self,name):
"""
:param name: 文件名
"""
self.fobj = open(name,'w')
self.fd = self.fobj.fileno()
def lock(self):
try:
fcntl.lockf(s... | 20.333333 | 84 | 0.528373 |
37d851dd97ff2a867963b51e70aa17bacb523593 | 2,952 | py | Python | nest_elephant_tvb/Tvb/modify_tvb/test_interface_co_parallel/modify_wongwang_3.py | mfahdaz/TVB-NEST | c16e18f41ff07b33482a55f4a033b8c698051c9a | [
"Apache-2.0"
] | 2 | 2020-10-21T11:45:19.000Z | 2020-12-01T09:32:53.000Z | nest_elephant_tvb/Tvb/modify_tvb/test_interface_co_parallel/modify_wongwang_3.py | mfahdaz/TVB-NEST | c16e18f41ff07b33482a55f4a033b8c698051c9a | [
"Apache-2.0"
] | 10 | 2020-11-17T09:33:19.000Z | 2022-01-11T17:00:40.000Z | nest_elephant_tvb/Tvb/modify_tvb/test_interface_co_parallel/modify_wongwang_3.py | mfahdaz/TVB-NEST | c16e18f41ff07b33482a55f4a033b8c698051c9a | [
"Apache-2.0"
] | 9 | 2020-11-17T08:52:51.000Z | 2021-12-10T12:25:04.000Z | # Copyright 2020 Forschungszentrum Jülich GmbH and Aix-Marseille Université
# "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0. "
import tvb.simulator.lab as lab
from nest_elephant_tvb.Tvb.modify_tvb import Interface_c... | 50.896552 | 153 | 0.642276 |
47bdda6469797f1d26c001ceabddea47bec1208c | 763 | py | Python | setup.py | AlexLabohm/CPlusPlus_Python_FIR_Filter | 51c9c33b9a7a210aa396a41c7d924223e1b5121c | [
"MIT"
] | null | null | null | setup.py | AlexLabohm/CPlusPlus_Python_FIR_Filter | 51c9c33b9a7a210aa396a41c7d924223e1b5121c | [
"MIT"
] | null | null | null | setup.py | AlexLabohm/CPlusPlus_Python_FIR_Filter | 51c9c33b9a7a210aa396a41c7d924223e1b5121c | [
"MIT"
] | null | null | null | from distutils.core import setup, Extension
import numpy
# Remove the "-Wstrict-prototypes" compiler option, which isn't valid for C++.
import distutils.sysconfig
cfg_vars = distutils.sysconfig.get_config_vars()
for key, value in cfg_vars.items():
if type(value) == str:
cfg_vars[key] = value.replace("-Wstr... | 29.346154 | 78 | 0.609436 |
63d545b7bfe82245484eec0014f542e734809513 | 2,097 | py | Python | metaswitch_tinder/pages/report.py | MartinHowarth/melinda | 651591a16797bc5dc95e784e8c35eb57fc8de41f | [
"MIT"
] | 1 | 2018-05-12T19:56:27.000Z | 2018-05-12T19:56:27.000Z | metaswitch_tinder/pages/report.py | MartinHowarth/melinda | 651591a16797bc5dc95e784e8c35eb57fc8de41f | [
"MIT"
] | 24 | 2018-05-12T19:07:40.000Z | 2018-06-12T21:46:50.000Z | metaswitch_tinder/pages/report.py | MartinHowarth/melinda | 651591a16797bc5dc95e784e8c35eb57fc8de41f | [
"MIT"
] | null | null | null | import logging
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Event, Output, State
from metaswitch_tinder import tinder_email
from metaswitch_tinder.app import app
from metaswitch_tinder.app_structure import href
log = logging.getLogger(__name__)
NAME = __name__... | 27.96 | 81 | 0.534096 |
35cd24885c000dae115c5c7aff7ba403870bc5d7 | 14,502 | py | Python | cplusplus/contrib/HandWrite/presenterserver/hand_write/src/web.py | Dedederek/samples | 31d99de20af2f7046556e0f48c4b789b99e422f8 | [
"Apache-2.0"
] | 25 | 2020-11-20T09:01:35.000Z | 2022-03-29T10:35:38.000Z | cplusplus/contrib/HandWrite/presenterserver/hand_write/src/web.py | Dedederek/samples | 31d99de20af2f7046556e0f48c4b789b99e422f8 | [
"Apache-2.0"
] | 5 | 2021-02-28T20:49:37.000Z | 2022-03-04T21:50:27.000Z | cplusplus/contrib/HandWrite/presenterserver/hand_write/src/web.py | Dedederek/samples | 31d99de20af2f7046556e0f48c4b789b99e422f8 | [
"Apache-2.0"
] | 16 | 2020-12-06T07:26:13.000Z | 2022-03-01T07:51:55.000Z | # -*- coding: UTF-8 -*-
#
# =======================================================================
#
# Copyright (C) 2018, Hisilicon Technologies Co., Ltd. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ... | 30.594937 | 115 | 0.583644 |
37a56b871a091f575a7c0a1d0ac0010b9d9c8c30 | 5,618 | py | Python | openhtf/util/__init__.py | adavidzh/openhtf | 0f34f6c0b53d8d0c42e2da1ddde2f07534d8286c | [
"Apache-2.0"
] | 1 | 2020-07-25T19:05:49.000Z | 2020-07-25T19:05:49.000Z | openhtf/util/__init__.py | adavidzh/openhtf | 0f34f6c0b53d8d0c42e2da1ddde2f07534d8286c | [
"Apache-2.0"
] | 1 | 2017-12-04T20:20:54.000Z | 2017-12-04T20:20:54.000Z | openhtf/util/__init__.py | adavidzh/openhtf | 0f34f6c0b53d8d0c42e2da1ddde2f07534d8286c | [
"Apache-2.0"
] | 2 | 2018-12-20T07:01:20.000Z | 2020-05-18T21:13:17.000Z | # Copyright 2014 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 agre... | 31.561798 | 93 | 0.702029 |
5947c3fc68672b536facd143f7ada169578e23b6 | 1,235 | py | Python | touchgdoc/touchgdoc.py | jpstroop/mkdoc | 22589f9ce3d473c7dd7ba1a89c6ebe8ea834e7c2 | [
"BSD-3-Clause-Clear"
] | null | null | null | touchgdoc/touchgdoc.py | jpstroop/mkdoc | 22589f9ce3d473c7dd7ba1a89c6ebe8ea834e7c2 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-06-02T00:41:33.000Z | 2021-06-02T00:41:33.000Z | touchgdoc/touchgdoc.py | jpstroop/touchgdoc | 22589f9ce3d473c7dd7ba1a89c6ebe8ea834e7c2 | [
"BSD-3-Clause-Clear"
] | null | null | null | from cached_property import cached_property
from configparser import ConfigParser
from os.path import abspath
from os.path import dirname
from os.path import exists
from os.path import join
PERMISSIONS_CHOICES = ('rw', 'co', 'ro')
class TouchGoogleDoc(object):
CONFIG_FILENAME = "setup.cfg"
CONFIG_SECTION_NAM... | 33.378378 | 74 | 0.672065 |
11d69beedd767ab972e8045bd32a3c0c612ce72a | 1,905 | py | Python | d_parser/d_spider_0and.py | Holovin/D_GrabDemo | 6adb03fb42ae03e7896eb2eacb342cf9660feb92 | [
"MIT"
] | null | null | null | d_parser/d_spider_0and.py | Holovin/D_GrabDemo | 6adb03fb42ae03e7896eb2eacb342cf9660feb92 | [
"MIT"
] | 2 | 2018-03-28T19:47:46.000Z | 2021-12-13T20:56:31.000Z | d_parser/d_spider_0and.py | Holovin/D_GrabDemo | 6adb03fb42ae03e7896eb2eacb342cf9660feb92 | [
"MIT"
] | null | null | null | import operator
from d_parser.d_spider_common import DSpiderCommon
from helpers.url_generator import UrlGenerator
VERSION = 29
# Warn: Don't remove task argument even if not use it (it's break grab and spider crashed)
# Warn: noinspection PyUnusedLocal
class DSpider(DSpiderCommon):
def __init__(self, thread_nu... | 30.238095 | 135 | 0.606299 |
a2ea036b1858363b15769bd283dbb512d3861c32 | 206 | py | Python | app/api_v1/__init__.py | Another-Andrey/email_checker | 55b12b035580ca94949094aa86b972d6ae1e5956 | [
"MIT"
] | null | null | null | app/api_v1/__init__.py | Another-Andrey/email_checker | 55b12b035580ca94949094aa86b972d6ae1e5956 | [
"MIT"
] | null | null | null | app/api_v1/__init__.py | Another-Andrey/email_checker | 55b12b035580ca94949094aa86b972d6ae1e5956 | [
"MIT"
] | null | null | null | from fastapi import APIRouter
from . import check_user, games, users
router = APIRouter()
router.include_router(users.router)
router.include_router(games.router)
router.include_router(check_user.router)
| 20.6 | 40 | 0.820388 |
7a0f8ed94bcef5213a2adcc542c8762a5afb7f56 | 2,382 | py | Python | smdebug/pytorch/utils.py | mchoi8739/sagemaker-debugger | fcc02366d06308642cf96b17aae417db9c1192d5 | [
"Apache-2.0"
] | 2 | 2020-07-28T22:04:02.000Z | 2020-07-31T06:27:35.000Z | smdebug/pytorch/utils.py | mchoi8739/sagemaker-debugger | fcc02366d06308642cf96b17aae417db9c1192d5 | [
"Apache-2.0"
] | null | null | null | smdebug/pytorch/utils.py | mchoi8739/sagemaker-debugger | fcc02366d06308642cf96b17aae417db9c1192d5 | [
"Apache-2.0"
] | null | null | null | # Third Party
# Standard Library
from functools import lru_cache
import numpy as np
import torch
from packaging import version
# First Party
from smdebug.core.reduction_config import ALLOWED_NORMS, ALLOWED_REDUCTIONS
from smdebug.core.reductions import get_numpy_reduction
# Cached Pytorch Version
PT_VERSION = versio... | 28.357143 | 93 | 0.671285 |
c7b95f815451c8acf3f4218efef1af337ca308a1 | 3,286 | py | Python | blog/settings.py | abhijeetstomar/blog | 1cc64f09fb66acf4876693a5bff9e6efb8c755f7 | [
"MIT"
] | null | null | null | blog/settings.py | abhijeetstomar/blog | 1cc64f09fb66acf4876693a5bff9e6efb8c755f7 | [
"MIT"
] | null | null | null | blog/settings.py | abhijeetstomar/blog | 1cc64f09fb66acf4876693a5bff9e6efb8c755f7 | [
"MIT"
] | null | null | null | """
Django settings for blog project.
Generated by 'django-admin startproject' using Django 2.0.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
# Bu... | 25.472868 | 91 | 0.69933 |
c0471fcd99358ac0847fe4a06498009b85ef7a4c | 419 | py | Python | database_replication/python/split_file.py | ryland-e-atkins/complexa | fa5ce6227f45227cdd6b27b5d63edd000c760e84 | [
"MIT"
] | null | null | null | database_replication/python/split_file.py | ryland-e-atkins/complexa | fa5ce6227f45227cdd6b27b5d63edd000c760e84 | [
"MIT"
] | null | null | null | database_replication/python/split_file.py | ryland-e-atkins/complexa | fa5ce6227f45227cdd6b27b5d63edd000c760e84 | [
"MIT"
] | null | null | null |
def main():
# Set variables
linesPerFile = 20000
# Read in file
inFileName = 'sql_insert_scripts/CD02_INQUIRY_REQUESTOR.sql'
inFile = open(inFileName, 'r')
outFilePrefix = 'sql_insert_scripts/CD02_INQUIRY_REQUESTOR($$).sql'
# Split & write files
lineCount = 0... | 17.458333 | 72 | 0.608592 |
59dcf15eb26162c7f507bab54d444f4e1fa45b46 | 3,331 | py | Python | happy/HappyProcessStop.py | mingchik/happy | 5d998f4aa01d375770fa57a23f819dcf9f434625 | [
"Apache-2.0"
] | null | null | null | happy/HappyProcessStop.py | mingchik/happy | 5d998f4aa01d375770fa57a23f819dcf9f434625 | [
"Apache-2.0"
] | null | null | null | happy/HappyProcessStop.py | mingchik/happy | 5d998f4aa01d375770fa57a23f819dcf9f434625 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2015-2017 Nest Labs, 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/licen... | 29.219298 | 92 | 0.64245 |
aa9870ff02fd6e6b695f3430e355d5eb8a71913e | 4,880 | py | Python | benchmark/benchmark_helper.py | xutianming/TurboTransformers | f4b734a307a3ee2dbfed92180dda84f56476b5c0 | [
"BSD-3-Clause"
] | null | null | null | benchmark/benchmark_helper.py | xutianming/TurboTransformers | f4b734a307a3ee2dbfed92180dda84f56476b5c0 | [
"BSD-3-Clause"
] | null | null | null | benchmark/benchmark_helper.py | xutianming/TurboTransformers | f4b734a307a3ee2dbfed92180dda84f56476b5c0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2020 THL A29 Limited, a Tencent company.
# All rights reserved.
# Licensed under the BSD 3-Clause License (the "License"); you may
# not use this file except in compliance with the License. You may
# obtain a copy of the License at
# https://opensource.org/licenses/BSD-3-Clause
# Unless required by appl... | 32.972973 | 79 | 0.567828 |
7a978a7472eca2491f58a002efb080c998ddb7d3 | 723 | py | Python | application/models/user/guest.py | mutalisk999/bibi | 2e0043d207c83ef7fc55d20b9c0a1b7e493a551c | [
"Apache-2.0"
] | 1,037 | 2017-03-24T11:18:55.000Z | 2022-03-19T14:02:27.000Z | application/models/user/guest.py | spacecode-live/An-e-commerce-fullstack-solution-for-Flask- | 28130a18a73afbb99bf850e857dd1f14c08fbca1 | [
"Apache-2.0"
] | 8 | 2017-03-26T02:53:24.000Z | 2018-09-14T03:18:26.000Z | application/models/user/guest.py | spacecode-live/An-e-commerce-fullstack-solution-for-Flask- | 28130a18a73afbb99bf850e857dd1f14c08fbca1 | [
"Apache-2.0"
] | 365 | 2017-03-24T11:29:02.000Z | 2021-11-24T03:14:19.000Z | # -*- coding: utf-8 -*-
from application.extensions import db
from .user import FavorAction
__all__ = ['GuestRecord']
class GuestRecord(db.Document, FavorAction):
'''
Visit records for guests user
'''
meta = {
'indexes': ['session_key']
}
session_key = db.StringField(required=True)
... | 26.777778 | 69 | 0.629322 |
4f51539b05af408e69f01274be531ab49fad09f0 | 1,134 | py | Python | mobycity/carpooling/migrations/0002_auto_20150812_1535.py | LucienD/Mobct | 1c8422b30c205bdb2dc21c988f74280194980ec4 | [
"MIT"
] | null | null | null | mobycity/carpooling/migrations/0002_auto_20150812_1535.py | LucienD/Mobct | 1c8422b30c205bdb2dc21c988f74280194980ec4 | [
"MIT"
] | null | null | null | mobycity/carpooling/migrations/0002_auto_20150812_1535.py | LucienD/Mobct | 1c8422b30c205bdb2dc21c988f74280194980ec4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('carpooling', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='c... | 28.35 | 70 | 0.594356 |
64f1bfde37555cc34947d9a93fad1f1f94cc2c16 | 6,964 | py | Python | pyannote/audio/embedding/approaches/arcface_loss.py | avramandrei/pyannote-audio | ad7e48bac22e347c5688cb1bdc996e573024c4cf | [
"MIT"
] | 1,543 | 2016-10-05T08:13:06.000Z | 2022-03-31T21:43:19.000Z | pyannote/audio/embedding/approaches/arcface_loss.py | avramandrei/pyannote-audio | ad7e48bac22e347c5688cb1bdc996e573024c4cf | [
"MIT"
] | 739 | 2016-09-23T09:13:51.000Z | 2022-03-30T08:24:19.000Z | pyannote/audio/embedding/approaches/arcface_loss.py | avramandrei/pyannote-audio | ad7e48bac22e347c5688cb1bdc996e573024c4cf | [
"MIT"
] | 348 | 2016-09-22T15:33:49.000Z | 2022-03-28T07:28:48.000Z | #!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2019-2020 CNRS
# 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 limita... | 35.350254 | 144 | 0.650345 |
6b828d00a5e674811b2216613bb5271012b9f210 | 10,621 | bzl | Python | closure/private/defs.bzl | lauraharker/rules_closure | d69cb55fa6e4d2f627c017e9ad3088d70214e938 | [
"Apache-2.0"
] | 2 | 2021-08-05T15:07:13.000Z | 2021-11-17T10:59:40.000Z | closure/private/defs.bzl | lauraharker/rules_closure | d69cb55fa6e4d2f627c017e9ad3088d70214e938 | [
"Apache-2.0"
] | 1 | 2021-02-23T22:28:39.000Z | 2021-02-23T22:28:39.000Z | closure/private/defs.bzl | lauraharker/rules_closure | d69cb55fa6e4d2f627c017e9ad3088d70214e938 | [
"Apache-2.0"
] | 1 | 2021-05-11T00:57:35.000Z | 2021-05-11T00:57:35.000Z | # Copyright 2016 The Closure Rules 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... | 34.822951 | 89 | 0.631673 |
ee60f4537ade3aaf48217b53073d0f2eef9ba2fb | 4,945 | py | Python | pandas/tests/indexes/multi/test_drop.py | cecethea/pandas | 3ece0979b7fb356936500672cbc12d4c1047d06d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-04-01T11:19:53.000Z | 2021-04-01T11:19:53.000Z | pandas/tests/indexes/multi/test_drop.py | cecethea/pandas | 3ece0979b7fb356936500672cbc12d4c1047d06d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/indexes/multi/test_drop.py | cecethea/pandas | 3ece0979b7fb356936500672cbc12d4c1047d06d | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
from pandas.errors import PerformanceWarning
import pandas as pd
from pandas import Index, MultiIndex
import pandas.util.testing as tm
def test_drop(idx):
dropped = idx.drop([("foo", "two"), ("qux", "one")])
index = MultiIndex.from_tuples([("foo", "two"), ("qux", "one")])
... | 31.297468 | 83 | 0.598382 |
5062a544972e30f6cc837b6091c7d92ab99cf615 | 540 | py | Python | manage.py | petersoleeh/RainMeter | eed7a1b062748d28af427ba8863af2b80effa06a | [
"MIT"
] | null | null | null | manage.py | petersoleeh/RainMeter | eed7a1b062748d28af427ba8863af2b80effa06a | [
"MIT"
] | 3 | 2020-06-05T18:09:41.000Z | 2021-06-10T20:16:31.000Z | manage.py | petersoleeh/RainMeter | eed7a1b062748d28af427ba8863af2b80effa06a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rainfall.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are... | 33.75 | 73 | 0.687037 |
e37ae8520efd690bfe70a9117769e16eac5d064a | 967 | py | Python | test.py | adroiters/Brain-Segmentation | eb57710141de978cfa0db725c9c31923b7d87599 | [
"MIT"
] | 39 | 2019-03-05T20:00:45.000Z | 2022-02-17T21:22:25.000Z | test.py | adroiters/Brain-Segmentation | eb57710141de978cfa0db725c9c31923b7d87599 | [
"MIT"
] | 7 | 2019-10-08T12:03:30.000Z | 2021-11-29T14:51:55.000Z | test.py | adroiters/Brain-Segmentation | eb57710141de978cfa0db725c9c31923b7d87599 | [
"MIT"
] | 15 | 2019-04-03T16:06:39.000Z | 2021-12-17T10:05:42.000Z | from utils.losses import *
from utils.preprocess import *
from keras.models import load_model
def predict(T1_path,FLAIR_path,IR_path,label):
model = load_model("weights/label"+str(label)+"/best.h5",custom_objects={'dice_coefficient': dice_coefficient, 'dice_loss': dice_loss})
if label in [1,3,5]:
T1 =... | 42.043478 | 140 | 0.625646 |
e5713d87e3132b3681fc2e713f89eff10517a149 | 61,334 | py | Python | src/metpy/calc/tools.py | LProx2020/MetPy | dbd60ef8ef60abe22a04eb825957aa624fcc45ef | [
"BSD-3-Clause"
] | null | null | null | src/metpy/calc/tools.py | LProx2020/MetPy | dbd60ef8ef60abe22a04eb825957aa624fcc45ef | [
"BSD-3-Clause"
] | 126 | 2020-07-28T14:55:34.000Z | 2022-03-30T22:03:19.000Z | src/metpy/calc/tools.py | LProx2020/MetPy | dbd60ef8ef60abe22a04eb825957aa624fcc45ef | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016,2017,2018,2019 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Contains a collection of generally useful calculation tools."""
import functools
from inspect import signature
from operator import itemgetter
import warnings
impo... | 38.001239 | 95 | 0.642955 |
e6cde9f864ad0e61e01c01db1ea1d4f4c0d51e9e | 765 | py | Python | medcv/utils/arg_support.py | szuboy/medcv | e8810718b860dd0241d4fbe323bfe5c6906a4f71 | [
"Apache-2.0"
] | 8 | 2021-04-26T12:18:18.000Z | 2021-09-25T13:53:40.000Z | medcv/utils/arg_support.py | helloGuangdong/medcv | e8810718b860dd0241d4fbe323bfe5c6906a4f71 | [
"Apache-2.0"
] | 1 | 2021-05-02T07:12:31.000Z | 2021-05-02T07:12:31.000Z | medcv/utils/arg_support.py | helloGuangdong/medcv | e8810718b860dd0241d4fbe323bfe5c6906a4f71 | [
"Apache-2.0"
] | 1 | 2021-04-26T12:18:26.000Z | 2021-04-26T12:18:26.000Z | # !/usr/bin/env python
# -*- coding:utf-8 -*-
import functools
from inspect import signature
def expected_type(*type_args, **type_kwargs):
def decorator(fn):
@functools.wraps(fn)
def checker(*args, **kwargs):
fn_signature = signature(fn)
input_value = fn_signature.bind(*ar... | 33.26087 | 106 | 0.623529 |
c188d782e49119a50b7be6ea920cabfc744c710c | 25,332 | py | Python | electrum_xazab/gui/qt/utxo_list.py | nunumichael/electrum-xazab | f128c765f451b418a418f9cd8b8e24fd8f66df74 | [
"MIT"
] | null | null | null | electrum_xazab/gui/qt/utxo_list.py | nunumichael/electrum-xazab | f128c765f451b418a418f9cd8b8e24fd8f66df74 | [
"MIT"
] | null | null | null | electrum_xazab/gui/qt/utxo_list.py | nunumichael/electrum-xazab | f128c765f451b418a418f9cd8b8e24fd8f66df74 | [
"MIT"
] | 2 | 2021-05-23T23:38:56.000Z | 2021-05-24T19:01:07.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | 39.955836 | 101 | 0.595058 |
01e177f93872df447efa79b8cc483e949dbbe234 | 29,958 | py | Python | vnpy/trader/app/ctaStrategy/ctaPolicy.py | riverdarda/vnpy.-msincense | 4f39ef3269082581171f3d0d6f046224266a8d21 | [
"MIT"
] | 3 | 2020-08-14T00:06:32.000Z | 2021-11-22T00:50:02.000Z | vnpy/trader/app/ctaStrategy/ctaPolicy.py | riverdarda/vnpy.-msincense | 4f39ef3269082581171f3d0d6f046224266a8d21 | [
"MIT"
] | null | null | null | vnpy/trader/app/ctaStrategy/ctaPolicy.py | riverdarda/vnpy.-msincense | 4f39ef3269082581171f3d0d6f046224266a8d21 | [
"MIT"
] | 3 | 2020-03-07T12:45:00.000Z | 2021-02-14T03:10:38.000Z | # encoding: UTF-8
import os
import sys
import json
from datetime import datetime
from collections import OrderedDict
from vnpy.trader.app.ctaStrategy.ctaBase import *
from vnpy.trader.vtConstant import *
class CtaPolicy(object):
"""
策略的持久化Policy
"""
def __init__(self, strategy=None):
"""
... | 37.214907 | 144 | 0.57594 |
dad3639170bdfb2b9d7729f2994ed6813723b6bb | 1,169 | py | Python | tests/test_inline.py | rswarbrick/pycoreir | 855d18eab067d27aad4d4bc11f486fbf43c04f08 | [
"BSD-3-Clause"
] | 13 | 2017-09-28T07:05:18.000Z | 2021-05-21T04:52:05.000Z | tests/test_inline.py | rswarbrick/pycoreir | 855d18eab067d27aad4d4bc11f486fbf43c04f08 | [
"BSD-3-Clause"
] | 74 | 2017-09-17T17:35:13.000Z | 2021-09-07T18:42:59.000Z | tests/test_inline.py | rswarbrick/pycoreir | 855d18eab067d27aad4d4bc11f486fbf43c04f08 | [
"BSD-3-Clause"
] | 7 | 2018-03-05T23:51:28.000Z | 2020-05-31T20:55:04.000Z | import coreir
def test_inline():
c = coreir.Context()
g = c.global_namespace
_not = c.get_namespace("coreir").generators["not"](width=16)
#Create a double not module
double_knot = g.new_module("dnot",_not.type)
dn_def = double_knot.new_definition()
io = dn_def.interface
first = dn_... | 31.594595 | 64 | 0.649273 |
ee9b544f47fb296da96a10def37ffc97428bd9f0 | 4,008 | py | Python | tests/providers/amazon/aws/sensors/test_sqs.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 2 | 2020-10-23T18:55:03.000Z | 2021-07-13T04:45:49.000Z | tests/providers/amazon/aws/sensors/test_sqs.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 20 | 2021-01-23T12:33:08.000Z | 2021-12-07T22:30:37.000Z | tests/providers/amazon/aws/sensors/test_sqs.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 2 | 2020-10-23T18:55:05.000Z | 2022-02-16T21:53:10.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... | 36.436364 | 110 | 0.651447 |
b8261853bea6289adbe92759ec9705a0ceeacdd7 | 25 | py | Python | src/python/pearray/__init__.py | PearCoding/PearRay | 8654a7dcd55cc67859c7c057c7af64901bf97c35 | [
"MIT"
] | 19 | 2016-11-07T00:01:19.000Z | 2021-12-29T05:35:14.000Z | src/python/pearray/__init__.py | PearCoding/PearRay | 8654a7dcd55cc67859c7c057c7af64901bf97c35 | [
"MIT"
] | 33 | 2016-07-06T21:58:05.000Z | 2020-08-01T18:18:24.000Z | src/python/pearray/__init__.py | PearCoding/PearRay | 8654a7dcd55cc67859c7c057c7af64901bf97c35 | [
"MIT"
] | null | null | null | from .pypearray import *
| 12.5 | 24 | 0.76 |
f26a4986e66fac8a213e3a3008de2a05bc6c6902 | 4,275 | py | Python | S3ModelTools/RM/3_1_0/scripts/data_semantics_extractor.py | twcook/S3ModelTools | e3dc7e4df401d2e1d7531ee38c75211cfb7a3573 | [
"Apache-2.0"
] | null | null | null | S3ModelTools/RM/3_1_0/scripts/data_semantics_extractor.py | twcook/S3ModelTools | e3dc7e4df401d2e1d7531ee38c75211cfb7a3573 | [
"Apache-2.0"
] | null | null | null | S3ModelTools/RM/3_1_0/scripts/data_semantics_extractor.py | twcook/S3ModelTools | e3dc7e4df401d2e1d7531ee38c75211cfb7a3573 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
data_semantics_extractor.py
Extracts S3Model 3.1.0 (and later) data and creates RDF triples in RDF/XML
This script must be executed after the dm_semantics_extractor.py script.
Copyright (C) 2016 - 2018 Data Insights, Inc., All Rights Reserved.
"""
import os
import sys... | 38.513514 | 124 | 0.575906 |
23571c342d2bd3a93a4e6f0c0dd2e0978a55d8f2 | 19,872 | py | Python | sceneKit/sceneKitCamera.py | cclauss/sceneKit-wrapper-for-Pythonista | 8d882ab12dbac6008b5d68ba7f22cfa5b834d268 | [
"MIT"
] | 1 | 2020-12-09T13:23:47.000Z | 2020-12-09T13:23:47.000Z | sceneKit/sceneKitCamera.py | cclauss/sceneKit-wrapper-for-Pythonista | 8d882ab12dbac6008b5d68ba7f22cfa5b834d268 | [
"MIT"
] | null | null | null | sceneKit/sceneKitCamera.py | cclauss/sceneKit-wrapper-for-Pythonista | 8d882ab12dbac6008b5d68ba7f22cfa5b834d268 | [
"MIT"
] | null | null | null | '''camera modul, to be included in sceneKit'''
import sceneKit
from .sceneKitEnv import *
from .sceneKitNode import *
from .sceneKitAnimation import *
class CameraProjectionDirection(Enum):
Vertical = 0
Horizontal = 1
CameraProjectionDirectionVertical = 0
CameraProjectionDirectionHorizontal = 1
class Interac... | 39.664671 | 149 | 0.782005 |
fa0e53812e1ea1a7dc52b7dbc4c5652d5aec5469 | 26,561 | py | Python | core/gif/pythonlzw.py | rChen10/pywright | a71527b62c072d89c84054b0674b3a65e1227c48 | [
"BSD-3-Clause"
] | 3 | 2016-03-16T01:10:09.000Z | 2022-02-20T00:33:04.000Z | core/gif/pythonlzw.py | rChen10/pywright | a71527b62c072d89c84054b0674b3a65e1227c48 | [
"BSD-3-Clause"
] | 1 | 2016-03-16T01:29:57.000Z | 2016-03-16T01:29:57.000Z | core/gif/pythonlzw.py | rChen10/pywright | a71527b62c072d89c84054b0674b3a65e1227c48 | [
"BSD-3-Clause"
] | 5 | 2016-03-21T02:48:13.000Z | 2021-08-18T08:58:09.000Z | """
A stream friendly, simple compression library, built around
iterators. See L{compress} and L{decompress} for the easiest way to
get started.
After the TIFF implementation of LZW, as described at
U{http://www.fileformat.info/format/tiff/corion-lzw.htm}
In an even-nuttier-shell, lzw compresses input bytes... | 31.962696 | 337 | 0.581454 |
4a45c670cdd7031c0235202f0ce0190f4dee7332 | 6,812 | py | Python | trieste/space.py | st--/trieste | 8c21681806b96912bd31929ab04d99ef0c6b48c9 | [
"Apache-2.0"
] | null | null | null | trieste/space.py | st--/trieste | 8c21681806b96912bd31929ab04d99ef0c6b48c9 | [
"Apache-2.0"
] | null | null | null | trieste/space.py | st--/trieste | 8c21681806b96912bd31929ab04d99ef0c6b48c9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Trieste Contributors
#
# 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... | 39.149425 | 100 | 0.629037 |
b62a6d066ac806493570b0f23181ca55d18da618 | 4,104 | py | Python | sdk/python/kfp/components/_naming.py | nostro-im/pipelines | 39f5b6b74040abbf4b764cbd5b422d7548723d9e | [
"Apache-2.0"
] | 1 | 2021-09-05T17:31:13.000Z | 2021-09-05T17:31:13.000Z | sdk/python/kfp/components/_naming.py | nostro-im/pipelines | 39f5b6b74040abbf4b764cbd5b422d7548723d9e | [
"Apache-2.0"
] | 2 | 2021-06-01T10:02:51.000Z | 2021-06-07T07:19:14.000Z | sdk/python/kfp/components/_naming.py | nostro-im/pipelines | 39f5b6b74040abbf4b764cbd5b422d7548723d9e | [
"Apache-2.0"
] | 3 | 2022-01-10T13:40:24.000Z | 2022-03-21T08:46:14.000Z | # Copyright 2018 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 36.642857 | 158 | 0.706384 |
eea2c2a0c1683f18e7bf1a18f17d9e8ffbfad32e | 3,445 | py | Python | app.py | trollkarlen/docker-events-pushbullet | e1220d81523bbe50270bd0073aca9f133f1a825b | [
"Apache-2.0"
] | null | null | null | app.py | trollkarlen/docker-events-pushbullet | e1220d81523bbe50270bd0073aca9f133f1a825b | [
"Apache-2.0"
] | null | null | null | app.py | trollkarlen/docker-events-pushbullet | e1220d81523bbe50270bd0073aca9f133f1a825b | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Socialmetrix
#
# 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,... | 31.605505 | 99 | 0.645283 |
b9516e4eddcc2a8fb7cf0c6d147d864f665df221 | 289 | py | Python | recorrer.py | royquillca/PythonBasico | fb76d7d173ae6cc90955b3d7af2a7dfb3f7e731b | [
"MIT"
] | 1 | 2022-01-28T16:14:14.000Z | 2022-01-28T16:14:14.000Z | recorrer.py | royquillca/PythonBasico | fb76d7d173ae6cc90955b3d7af2a7dfb3f7e731b | [
"MIT"
] | null | null | null | recorrer.py | royquillca/PythonBasico | fb76d7d173ae6cc90955b3d7af2a7dfb3f7e731b | [
"MIT"
] | null | null | null | def run():
#
#
# nombre = input('Escribe tu nombre: ')
# for letra in nombre:
# print(letra)
frase = input('Esxcribe una frase: ')
for caracter in frase:
# print(caracter.upper())
print(caracter.capitalize())
#
#
if __name__ == '__main__':
run() | 20.642857 | 43 | 0.567474 |
1bd729003e10563f6c1ca9ef436ed534a5d5daca | 573 | py | Python | Design_Patterns/Creational/Singleton/Singleton_1.py | 1King-coder/Developing-Some-Python-Skills | 17ee81de0bebee693dd274ca2adbeb0ef249b46a | [
"MIT"
] | 3 | 2021-08-17T10:30:02.000Z | 2021-11-17T10:46:26.000Z | Design_Patterns/Creational/Singleton/Singleton_1.py | 1King-coder/Learning-Python | 17ee81de0bebee693dd274ca2adbeb0ef249b46a | [
"MIT"
] | null | null | null | Design_Patterns/Creational/Singleton/Singleton_1.py | 1King-coder/Learning-Python | 17ee81de0bebee693dd274ca2adbeb0ef249b46a | [
"MIT"
] | null | null | null | class Singleton(type):
_instances: dict = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super().__call__(*args, **kwargs)
return cls._instances[cls]
class AppSettings(metaclass=Singleton):
def __init__(self):
self.tema = 'Te... | 21.222222 | 67 | 0.609075 |
60854f779ce0e1c8684a3a79b62e3a4d230c3e6e | 302 | py | Python | setup.py | lagrassa/rl_plot | 2f9ba5514fbffab5dac08d23fb093530b738f1c0 | [
"MIT"
] | null | null | null | setup.py | lagrassa/rl_plot | 2f9ba5514fbffab5dac08d23fb093530b738f1c0 | [
"MIT"
] | null | null | null | setup.py | lagrassa/rl_plot | 2f9ba5514fbffab5dac08d23fb093530b738f1c0 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='rl_plot',
version='1.0',
description='RL plotting utilities',
author='Alex LaGrassa',
author_email='lagrassa@mit.edu',
packages=['rl_plot'], #same as name
install_requires=['matplotlib', 'numpy'], #external packages as dependencies
)
| 25.166667 | 79 | 0.695364 |
d0b35051a286ad0ebda952479576560eedb89918 | 3,563 | py | Python | workspace/module/python-2.7/LxGui/qt/guiQtWidgets/_guiQtWgtTabitem.py | no7hings/Lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | 2 | 2018-03-06T03:33:55.000Z | 2019-03-26T03:25:11.000Z | workspace/module/python-2.7/LxGui/qt/guiQtWidgets/_guiQtWgtTabitem.py | no7hings/lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | null | null | null | workspace/module/python-2.7/LxGui/qt/guiQtWidgets/_guiQtWgtTabitem.py | no7hings/lynxi | 43c745198a714c2e5aca86c6d7a014adeeb9abf7 | [
"MIT"
] | null | null | null | # coding:utf-8
from .. import qtCore, guiQtWgtAbs
from ..guiQtModels import _guiQtMdlTabitem
from ..guiQtWidgets import _guiQtWgtBasic, _guiQtWgtItem
class QtTabbutton(guiQtWgtAbs.Abs_GuiQtTabitemWgt):
CLS_gui_qt__tabitem_wgt__model = _guiQtMdlTabitem._QtButtontabModel
CLS_gui_qt__tabitem_wgt__iconbutton =... | 37.505263 | 108 | 0.65675 |
10dd86ab5ad74a9d7bc3c33f54f6d2528d38b431 | 977 | py | Python | source/client/pages/recordstable/VisitRecord.py | RobinSatterthwaite/BirdTable | ef35c0135ee54910e535281e7f690643c3b4f6c4 | [
"MIT"
] | null | null | null | source/client/pages/recordstable/VisitRecord.py | RobinSatterthwaite/BirdTable | ef35c0135ee54910e535281e7f690643c3b4f6c4 | [
"MIT"
] | null | null | null | source/client/pages/recordstable/VisitRecord.py | RobinSatterthwaite/BirdTable | ef35c0135ee54910e535281e7f690643c3b4f6c4 | [
"MIT"
] | null | null | null |
from datetime import datetime
from pystache import TemplateSpec
class VisitRecord(TemplateSpec):
template_name = "VisitRecord"
def __init__(self, visit, species, species_set):
self.visit = visit
self.sightingsList = []
for particular_species in species:
species_id = particular_species['pk']
sightin... | 21.23913 | 64 | 0.684749 |
9390b2e7a3f3e10d52b31c96edf09906f4e156f1 | 2,690 | py | Python | tests/test_container.py | erikseulean/attrs-strict | e43c44921fa68cc525ef29a35e7705c7f0e85a1f | [
"Apache-2.0"
] | null | null | null | tests/test_container.py | erikseulean/attrs-strict | e43c44921fa68cc525ef29a35e7705c7f0e85a1f | [
"Apache-2.0"
] | null | null | null | tests/test_container.py | erikseulean/attrs-strict | e43c44921fa68cc525ef29a35e7705c7f0e85a1f | [
"Apache-2.0"
] | null | null | null | import typing
import attr
import pytest
from attrs_strict import type_validator
try:
from unittest.mock import MagicMock
except ImportError:
from mock import Mock as MagicMock
@pytest.mark.parametrize(
"items, types, message",
[
(
[1, 2, 3],
typing.Set,
"... | 25.377358 | 79 | 0.581784 |
0d4c68181df187231c7452e046bd203646f84ebf | 733 | py | Python | Problem 07/advent7b.py | mankybansal/advent-of-code-2020 | 62b389c52d488ea88443b564b6b6b89fd7b5290b | [
"Apache-2.0"
] | null | null | null | Problem 07/advent7b.py | mankybansal/advent-of-code-2020 | 62b389c52d488ea88443b564b6b6b89fd7b5290b | [
"Apache-2.0"
] | null | null | null | Problem 07/advent7b.py | mankybansal/advent-of-code-2020 | 62b389c52d488ea88443b564b6b6b89fd7b5290b | [
"Apache-2.0"
] | null | null | null | ad_list = {}
for line in open('input.txt', 'r').readlines():
rules = line.strip().replace('.', '').replace('contain', '').replace(',', ' ').split(' ')
master_key = None
for i in range(len(rules)):
if i == 0:
split_rule = rules[i].split(' ')
key = split_rule[0] + split_rule[1]
if key not in ad_list:
... | 25.275862 | 91 | 0.622101 |
d2170fef0e77138f1514acd2c72a7d0f59d139cc | 3,015 | py | Python | create_lyric_matrix.py | timwedde/music_repetition_matrix | c3c6dce4b3f1de81cc96ab85823cbfe54eab4202 | [
"MIT"
] | null | null | null | create_lyric_matrix.py | timwedde/music_repetition_matrix | c3c6dce4b3f1de81cc96ab85823cbfe54eab4202 | [
"MIT"
] | null | null | null | create_lyric_matrix.py | timwedde/music_repetition_matrix | c3c6dce4b3f1de81cc96ab85823cbfe54eab4202 | [
"MIT"
] | null | null | null | import os
import sys
import argparse
from signal import signal, SIGINT, SIG_IGN
def main(args):
with tqdm(total=4) as bar:
tqdm.write("Downloading Lyrics")
lyrics = lyricwikia.get_lyrics(args.artist, args.track, timeout=10)
words = lyrics.split()
tqdm.write(" Got {} words".format... | 32.074468 | 100 | 0.59005 |
bcade9ab4da4c841e571c09fd58c6bb13a2f9204 | 1,923 | py | Python | kf_d3m_primitives/clustering/utils/dataframe_utils.py | cdbethune/d3m-primitives | 5530da1b8efba7de8cec6890401c5d4091acd45a | [
"MIT"
] | null | null | null | kf_d3m_primitives/clustering/utils/dataframe_utils.py | cdbethune/d3m-primitives | 5530da1b8efba7de8cec6890401c5d4091acd45a | [
"MIT"
] | null | null | null | kf_d3m_primitives/clustering/utils/dataframe_utils.py | cdbethune/d3m-primitives | 5530da1b8efba7de8cec6890401c5d4091acd45a | [
"MIT"
] | null | null | null | ## Copied from common-primitives to prevent redundancy
import typing
from d3m import exceptions, utils
from d3m.container import pandas as container_pandas
def select_rows(resource: container_pandas.DataFrame, row_indices_to_keep: typing.Sequence[int]) -> container_pandas.DataFrame:
if not isinstance(resource, c... | 40.0625 | 143 | 0.702028 |
58e9352c53143d49cf80425d465ec8584935ecfe | 1,325 | py | Python | test/autests/gold_tests/arguments/port_argument/no_port_argument.test.py | SolidWallOfCode/proxy-verifier | cd027aa9e5e38baa085fc6d225866e616d5d0e97 | [
"Apache-2.0"
] | null | null | null | test/autests/gold_tests/arguments/port_argument/no_port_argument.test.py | SolidWallOfCode/proxy-verifier | cd027aa9e5e38baa085fc6d225866e616d5d0e97 | [
"Apache-2.0"
] | null | null | null | test/autests/gold_tests/arguments/port_argument/no_port_argument.test.py | SolidWallOfCode/proxy-verifier | cd027aa9e5e38baa085fc6d225866e616d5d0e97 | [
"Apache-2.0"
] | null | null | null | '''
Verify there is an error if the user provides no port arguments.
'''
# @file
#
# Copyright 2021, Verizon Media
# SPDX-License-Identifier: Apache-2.0
#
Test.Summary = '''
Verify --format argument parsing.
'''
#
# Test 1: Verify the client complains if no ports are provided.
#
r = Test.AddTestRun('Verify the clien... | 34.868421 | 84 | 0.700377 |
9da2eb81932f8818b7a2f0e0cb1f4c5f24dfd5b2 | 1,470 | py | Python | common/utils/save_images.py | Aixile/chainer-gan-experiments | 4371e8369d2805e8ace6d7aacc397aa6e62680a6 | [
"MIT"
] | 70 | 2017-06-24T10:55:57.000Z | 2021-11-23T22:52:37.000Z | common/utils/save_images.py | Aixile/chainer-gan-experiments | 4371e8369d2805e8ace6d7aacc397aa6e62680a6 | [
"MIT"
] | 1 | 2017-08-21T06:19:31.000Z | 2017-08-21T07:54:28.000Z | common/utils/save_images.py | Aixile/chainer-gan-experiments | 4371e8369d2805e8ace6d7aacc397aa6e62680a6 | [
"MIT"
] | 16 | 2017-08-22T07:00:16.000Z | 2018-11-18T16:15:21.000Z | import cv2
import numpy as np
from chainer import cuda
import chainer
try:
import cupy
except:
pass
import os
def copy_to_cpu(imgs):
if type(imgs) == chainer.variable.Variable :
imgs = imgs.data
try:
if type(imgs) == cupy.core.core.ndarray:
imgs = cuda.to_cpu(imgs)
excep... | 28.823529 | 114 | 0.632653 |
778d761c659e990d5c107954ecc4a334638665ff | 1,070 | py | Python | python/tvm/arith.py | vakhidbetrakhmadov/tvm | 86c9564ab6583a51653a85a6965ac06c868a10bc | [
"Apache-2.0"
] | null | null | null | python/tvm/arith.py | vakhidbetrakhmadov/tvm | 86c9564ab6583a51653a85a6965ac06c868a10bc | [
"Apache-2.0"
] | null | null | null | python/tvm/arith.py | vakhidbetrakhmadov/tvm | 86c9564ab6583a51653a85a6965ac06c868a10bc | [
"Apache-2.0"
] | null | null | null | """Arithmetic data structure and utility"""
from __future__ import absolute_import as _abs
from ._ffi.node import NodeBase, register_node
from ._ffi.function import _init_api
from . import _api_internal
class IntSet(NodeBase):
"""Represent a set of integer in one dimension."""
def is_nothing(self):
""... | 25.47619 | 59 | 0.702804 |
d8b672da612f3d92049d3149277c419c674b1edd | 1,304 | py | Python | gpa.py | SirKCat/Statement-Coverage-Python-Tester | 17aa0da232040808ae36ccc3a2ea2735fba7c25c | [
"BSD-3-Clause"
] | null | null | null | gpa.py | SirKCat/Statement-Coverage-Python-Tester | 17aa0da232040808ae36ccc3a2ea2735fba7c25c | [
"BSD-3-Clause"
] | null | null | null | gpa.py | SirKCat/Statement-Coverage-Python-Tester | 17aa0da232040808ae36ccc3a2ea2735fba7c25c | [
"BSD-3-Clause"
] | null | null | null |
while True:
highSchoolGrade=float(input("Please enter your highschool grade : "))
QudaratGrade= float(input("Please enter your Qudarat grade : "))
TahsiliGrade= float(input("Please enter your Tahsili grade : "))
if (highSchoolGrade > 100 or QudaratGrade > 100 or TahsiliGrade > 100):
... | 35.243243 | 125 | 0.660276 |
5c8f968489f8c9cc812ec445626f9a2c1556652b | 1,795 | py | Python | spacy/lang/el/lex_attrs.py | snosrap/spaCy | 3f68bbcfec44ef55d101e6db742d353b72652129 | [
"MIT"
] | 22,040 | 2016-10-03T11:58:15.000Z | 2022-03-31T21:08:19.000Z | spacy/lang/el/lex_attrs.py | snosrap/spaCy | 3f68bbcfec44ef55d101e6db742d353b72652129 | [
"MIT"
] | 6,927 | 2016-10-03T13:11:11.000Z | 2022-03-31T17:01:25.000Z | spacy/lang/el/lex_attrs.py | snosrap/spaCy | 3f68bbcfec44ef55d101e6db742d353b72652129 | [
"MIT"
] | 4,403 | 2016-10-04T03:36:33.000Z | 2022-03-31T14:12:34.000Z | from ...attrs import LIKE_NUM
_num_words = [
"μηδέν",
"ένας",
"δυο",
"δυό",
"τρεις",
"τέσσερις",
"πέντε",
"έξι",
"εφτά",
"επτά",
"οκτώ",
"οχτώ",
"εννιά",
"εννέα",
"δέκα",
"έντεκα",
"ένδεκα",
"δώδεκα",
"δεκατρείς",
"δεκατέσσερις",
"δεκα... | 17.95 | 78 | 0.501393 |
d0e1143be7499ded014481688653f79e619ee195 | 864 | py | Python | scripts/result_utils.py | cfiutak1/HPyC-KD-Tree | 1db588464d6ffd9e30f13f4e2214b1da67485b6b | [
"MIT"
] | 7 | 2021-02-07T14:07:58.000Z | 2021-02-15T20:33:36.000Z | scripts/result_utils.py | cfiutak1/HPyC-KD-Tree | 1db588464d6ffd9e30f13f4e2214b1da67485b6b | [
"MIT"
] | null | null | null | scripts/result_utils.py | cfiutak1/HPyC-KD-Tree | 1db588464d6ffd9e30f13f4e2214b1da67485b6b | [
"MIT"
] | 1 | 2021-02-07T14:57:22.000Z | 2021-02-07T14:57:22.000Z | import struct
import numpy as np
def generate_results_file(result_points: np.ndarray, results_file_name: str) -> None:
num_queries = result_points.shape[0]
num_neighbors = len(result_points[0])
num_dimensions = len(result_points[0][0])
results_file = open(results_file_name, "wb")
results_file.wr... | 34.56 | 85 | 0.684028 |
013b3de24d4ca247057f5cd10f82eaf3e6a4cbeb | 21,792 | py | Python | audfprint/audfprint.py | arthurtofani/icmc2021-fingerprinting-evaluation | aa8a093fda2fa6fa24bf34e7c57817de8ca844e2 | [
"CC0-1.0"
] | 2 | 2021-09-13T01:54:01.000Z | 2021-09-13T03:06:36.000Z | audfprint/audfprint.py | arthurtofani/icmc2021-fingerprinting-evaluation | aa8a093fda2fa6fa24bf34e7c57817de8ca844e2 | [
"CC0-1.0"
] | null | null | null | audfprint/audfprint.py | arthurtofani/icmc2021-fingerprinting-evaluation | aa8a093fda2fa6fa24bf34e7c57817de8ca844e2 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# coding=utf-8
"""
audfprint.py
Implementation of acoustic-landmark-based robust fingerprinting.
Port of the Matlab implementation.
2014-05-25 Dan Ellis dpwe@ee.columbia.edu
"""
from __future__ import division, print_function
# For reporting progress time
import time
# For command line interfa... | 41.194707 | 125 | 0.602469 |
23a79fd47e8c53baa473c492110b0628de3141e8 | 7,566 | py | Python | fritzconnection/fritzmonitor.py | deisi/fritzconnection | b5c14515e1c8e2652b06b6316a7f3913df942841 | [
"MIT"
] | 2 | 2016-11-14T18:58:56.000Z | 2021-03-12T10:15:03.000Z | fritzconnection/fritzmonitor.py | deisi/fritzconnection | b5c14515e1c8e2652b06b6316a7f3913df942841 | [
"MIT"
] | 2 | 2015-12-09T20:12:08.000Z | 2016-11-02T15:03:19.000Z | fritzconnection/fritzmonitor.py | deisi/fritzconnection | b5c14515e1c8e2652b06b6316a7f3913df942841 | [
"MIT"
] | 7 | 2016-10-02T18:37:20.000Z | 2021-09-14T21:29:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fritzmonitor.py
Implement a tkinter-based grafic interface to view basic status- and
traffic-informations.
"""
__version__ = '0.1.0'
import argparse
try:
# python 2
import Tkinter as tk
import tkFont as tkfont
except ImportError:
# python 3
impo... | 37.641791 | 79 | 0.563442 |
90cca76c9a3628632371140d0615e541da4ac0b6 | 3,641 | py | Python | models.py | AbeerAlsharu/Facial-Keypoint-Detection | 0ce6572a7081cff9a2f557abe7e3a0e5d5ce0627 | [
"MIT"
] | 5 | 2019-03-27T15:16:08.000Z | 2019-11-12T08:15:11.000Z | models.py | AbeerAlsharu/Facial-Keypoint-Detection | 0ce6572a7081cff9a2f557abe7e3a0e5d5ce0627 | [
"MIT"
] | null | null | null | models.py | AbeerAlsharu/Facial-Keypoint-Detection | 0ce6572a7081cff9a2f557abe7e3a0e5d5ce0627 | [
"MIT"
] | null | null | null | ## Define the convolutional neural network architecture
import torch
import torch.nn as nn
import torch.nn.functional as F
# can use the below import should you choose to initialize the weights of your Net
import torch.nn.init as I
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
... | 38.734043 | 107 | 0.564955 |
c36e43df64a8eb133c62da8fca903f4687ca32fa | 333 | py | Python | Character Map.py | MrAnonymous5635/CSCircles | 010ac82942c88da357e214ea5462ec378f3667b8 | [
"MIT"
] | 17 | 2018-09-19T09:44:33.000Z | 2022-01-17T15:17:11.000Z | Character Map.py | MrAnonymous5635/CSCircles | 010ac82942c88da357e214ea5462ec378f3667b8 | [
"MIT"
] | 2 | 2020-02-24T15:28:33.000Z | 2021-11-16T00:04:52.000Z | Character Map.py | MrAnonymous5635/CSCircles | 010ac82942c88da357e214ea5462ec378f3667b8 | [
"MIT"
] | 8 | 2020-02-20T00:02:06.000Z | 2022-01-06T17:25:51.000Z | x = ord(' ')
for i in range(0,6):
print('chr:'+' ', end=' ')
for j in range(x,x+16):
print(chr(j)+' ', end=' ')
print()
print('asc:', end=' ')
for u in range(x,x+16):
if u >= 100:
print(str(u), end=' ')
else:
print(str(u)+' ', end=' ')
print()... | 20.8125 | 38 | 0.384384 |
b23f31fb252e94713e9f72bd69ebc21829d70793 | 3,769 | py | Python | scripts/bsseeker2_peak_caller.py | Multiscale-Genomics/mg-process-benchmark | e3fdf47b0564171825f21c084e2a1f18314d221f | [
"Apache-2.0"
] | null | null | null | scripts/bsseeker2_peak_caller.py | Multiscale-Genomics/mg-process-benchmark | e3fdf47b0564171825f21c084e2a1f18314d221f | [
"Apache-2.0"
] | null | null | null | scripts/bsseeker2_peak_caller.py | Multiscale-Genomics/mg-process-benchmark | e3fdf47b0564171825f21c084e2a1f18314d221f | [
"Apache-2.0"
] | null | null | null | """
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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.... | 30.893443 | 92 | 0.639692 |
89336c2026486373e631d3cf99c0ee1544835f68 | 4,282 | py | Python | nipype/pipeline/plugins/tests/test_multiproc_nondaemon.py | demianw/nipype | 52d64c30d96ecd94f1833156e28dce32c4f05ebe | [
"BSD-3-Clause"
] | null | null | null | nipype/pipeline/plugins/tests/test_multiproc_nondaemon.py | demianw/nipype | 52d64c30d96ecd94f1833156e28dce32c4f05ebe | [
"BSD-3-Clause"
] | null | null | null | nipype/pipeline/plugins/tests/test_multiproc_nondaemon.py | demianw/nipype | 52d64c30d96ecd94f1833156e28dce32c4f05ebe | [
"BSD-3-Clause"
] | 1 | 2016-10-11T19:18:53.000Z | 2016-10-11T19:18:53.000Z | from builtins import range
import os
from tempfile import mkdtemp
from shutil import rmtree
from nipype.testing import assert_equal, assert_true
import nipype.pipeline.engine as pe
from nipype.interfaces.utility import Function
def mytestFunction(insum=0):
'''
Run a multiprocessing job and spawn child proces... | 29.129252 | 95 | 0.613031 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.