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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c40a6d905d2ababfcd8cc2279b320a8d6dff51ea | 251 | py | Python | Ago-Dic-2020/lopez-flores-jorge-luis/Especial/Ejercicio2/Autobus.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ago-Dic-2020/lopez-flores-jorge-luis/Especial/Ejercicio2/Autobus.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ago-Dic-2020/lopez-flores-jorge-luis/Especial/Ejercicio2/Autobus.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | from Especial.Ejercicio1.Vehiculo import *
class Autobus(vehicle):
def __str__(self):
return "Corro a: {} km/h \n Tengo {}km recorridos\n y llevo hasta: {} pasajeros\n".format(self.velocidad_maxima, self.kilometraje, self.capacidad).strip()
| 27.888889 | 158 | 0.729084 |
47d5f61559722138a95fda4d68233132bb80b14f | 2,370 | py | Python | src/commands/pipe/display.py | VFRAMEio/vframe | 0dbc991697a6de47ccf3b65ced5b1201a45156b6 | [
"MIT"
] | null | null | null | src/commands/pipe/display.py | VFRAMEio/vframe | 0dbc991697a6de47ccf3b65ced5b1201a45156b6 | [
"MIT"
] | null | null | null | src/commands/pipe/display.py | VFRAMEio/vframe | 0dbc991697a6de47ccf3b65ced5b1201a45156b6 | [
"MIT"
] | null | null | null | #############################################################################
#
# VFRAME
# MIT License
# Copyright (c) 2020 Adam Harvey and VFRAME
# https://vframe.io
#
#############################################################################
import click
from vframe.models.types import MediaType
from vframe.u... | 30 | 116 | 0.604219 |
0f71cbd2bc0b2bc3fdbecfda7958a2b4ec2ad0f0 | 361 | py | Python | trdb2py/indicator_test.py | zhs007/trdb2py | d07b874bd37085ed64b5c6c6c2c21a380024d082 | [
"Apache-2.0"
] | null | null | null | trdb2py/indicator_test.py | zhs007/trdb2py | d07b874bd37085ed64b5c6c6c2c21a380024d082 | [
"Apache-2.0"
] | 43 | 2020-12-11T09:07:51.000Z | 2021-05-29T07:31:10.000Z | trdb2py/indicator_test.py | zhs007/trdb2py | d07b874bd37085ed64b5c6c6c2c21a380024d082 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
import pytest
from trdb2py.indicator import isPriceIndicator
def test_isPriceIndicator():
assert isPriceIndicator('ema.5') == True
assert isPriceIndicator('rsi.5') == False
assert isPriceIndicator("ta-ema.29>day/1d/5m/53700") == True
assert isPriceIndicator("ta-ema") == True
... | 30.083333 | 64 | 0.706371 |
9956d02cb6d0e1899bcd3066ffcc56bba1d1fd73 | 970 | py | Python | tools/miktex-pkg-md5.py | MiKTeX/miktex-packagin | 5c4f131c04eaff9006cccdfb2e09c1e9efb61642 | [
"MIT"
] | 20 | 2018-04-29T01:07:28.000Z | 2022-01-15T14:40:21.000Z | tools/miktex-pkg-md5.py | MiKTeX/miktex-packagin | 5c4f131c04eaff9006cccdfb2e09c1e9efb61642 | [
"MIT"
] | 273 | 2017-09-03T17:24:13.000Z | 2022-03-26T21:26:44.000Z | tools/miktex-pkg-md5.py | MiKTeX/miktex-packagin | 5c4f131c04eaff9006cccdfb2e09c1e9efb61642 | [
"MIT"
] | 2 | 2020-05-18T14:11:30.000Z | 2021-02-28T08:14:41.000Z | #!/usr/bin/env python3
#
# Licensed to you under the MIT license. See the LICENSE file in the
# project root for more information.
import sys
from miktex.packaging.info import inifile
from miktex.packaging.info import md5
if len(sys.argv) != 2 and len(sys.argv) != 3:
sys.exit("Usage: {} [-update] <pa... | 27.714286 | 90 | 0.657732 |
c4999cccfedc88e4e187281a191983b9edf90cc7 | 867 | py | Python | openvas/komand_openvas/actions/scan_status/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | openvas/komand_openvas/actions/scan_status/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | openvas/komand_openvas/actions/scan_status/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import ScanStatusInput, ScanStatusOutput
# Custom imports below
import sys
class ScanStatus(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='scan_status',
description='Get status of scan',
input=Scan... | 30.964286 | 92 | 0.581315 |
3a4e19d7374dbbc1e76b915db440317af8a20fce | 3,418 | py | Python | mcc/storage.py | lanl/materialsCloudCompute | 6aa5019638b830a79f35a0cf3ef879ff0ab4f2bb | [
"BSD-3-Clause"
] | null | null | null | mcc/storage.py | lanl/materialsCloudCompute | 6aa5019638b830a79f35a0cf3ef879ff0ab4f2bb | [
"BSD-3-Clause"
] | null | null | null | mcc/storage.py | lanl/materialsCloudCompute | 6aa5019638b830a79f35a0cf3ef879ff0ab4f2bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Storage Management"""
import random
import boto3
def connection():
"""Creates an s3 client connection"""
return boto3.client("s3")
def build_storage(name="", s3=connection()):
"""Builds a storage bucket for the calculation
Parameters
----------
name : string, opt... | 21.229814 | 81 | 0.59567 |
8d812df5a692e796ff222fea6f8e9695ae5cccfc | 9,593 | py | Python | raft/server.py | guilload/aio-raft | 3c6ca593996a26addf54e29ce1abdfb5013f2361 | [
"MIT"
] | 2 | 2015-07-23T15:11:12.000Z | 2022-02-16T06:06:21.000Z | raft/server.py | guilload/aio-raft | 3c6ca593996a26addf54e29ce1abdfb5013f2361 | [
"MIT"
] | null | null | null | raft/server.py | guilload/aio-raft | 3c6ca593996a26addf54e29ce1abdfb5013f2361 | [
"MIT"
] | null | null | null | import asyncio
import json
import logging
import sys
from enum import Enum
from random import randint
from uuid import uuid4
from log import Log
from machine import Machine
from pool import Pool
from protocols import ClientProtocol, ServerProtocol
class State(Enum):
LEADER = 'Leader'
FOLLOWER = 'Follower'
... | 29.69969 | 87 | 0.569686 |
9a898fb1e871fbc0a5eb1651d326dd0f73487717 | 7,221 | py | Python | snakeeyes/blueprints/billing/views/billing.py | Pythonian/bsawf | 3e422a81cfb1b157119473c20b94a9a01f8b9672 | [
"MIT"
] | null | null | null | snakeeyes/blueprints/billing/views/billing.py | Pythonian/bsawf | 3e422a81cfb1b157119473c20b94a9a01f8b9672 | [
"MIT"
] | null | null | null | snakeeyes/blueprints/billing/views/billing.py | Pythonian/bsawf | 3e422a81cfb1b157119473c20b94a9a01f8b9672 | [
"MIT"
] | null | null | null | from flask import (Blueprint, current_app, flash, redirect, render_template,
request, url_for)
from flask_login import current_user, login_required
from config import settings
from snakeeyes.blueprints.billing.decorators import (handle_stripe_exceptions,
... | 37.221649 | 79 | 0.62429 |
4bcabca8ad0ec3768c301f665d2e898cc3432f07 | 393 | py | Python | src/MpesaAPI/wsgi.py | EdwinMurimi/django-daraja | 367ea6000c5097ec5941c28907300a8fecc505f8 | [
"MIT"
] | null | null | null | src/MpesaAPI/wsgi.py | EdwinMurimi/django-daraja | 367ea6000c5097ec5941c28907300a8fecc505f8 | [
"MIT"
] | null | null | null | src/MpesaAPI/wsgi.py | EdwinMurimi/django-daraja | 367ea6000c5097ec5941c28907300a8fecc505f8 | [
"MIT"
] | null | null | null | """
WSGI config for MpesaAPI project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
48bca5ae9a59423fb329fce2c3a0ad15ddf8c427 | 3,953 | py | Python | bigquery/tests/unit/test_dbapi__helpers.py | rodrigodias27/google-cloud-python | 7d1161f70744c0dbbe67a3f472ea95667eaafe50 | [
"Apache-2.0"
] | 1 | 2021-01-04T11:40:17.000Z | 2021-01-04T11:40:17.000Z | bigquery/tests/unit/test_dbapi__helpers.py | rodrigodias27/google-cloud-python | 7d1161f70744c0dbbe67a3f472ea95667eaafe50 | [
"Apache-2.0"
] | null | null | null | bigquery/tests/unit/test_dbapi__helpers.py | rodrigodias27/google-cloud-python | 7d1161f70744c0dbbe67a3f472ea95667eaafe50 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 40.336735 | 76 | 0.630407 |
ee4d6d8a0b7f26e246800ff0f570032d9a2752f7 | 25,399 | py | Python | nltk/text.py | yigitsever/nltk | 952a9636db4b1178dceb1789c98d56161deda3ab | [
"Apache-2.0"
] | 4 | 2020-02-05T11:26:47.000Z | 2021-05-26T07:48:46.000Z | nltk/text.py | yigitsever/nltk | 952a9636db4b1178dceb1789c98d56161deda3ab | [
"Apache-2.0"
] | 1 | 2021-04-30T17:27:07.000Z | 2021-04-30T17:27:07.000Z | nltk/text.py | yigitsever/nltk | 952a9636db4b1178dceb1789c98d56161deda3ab | [
"Apache-2.0"
] | 1 | 2021-05-12T07:12:02.000Z | 2021-05-12T07:12:02.000Z | # Natural Language Toolkit: Texts
#
# Copyright (C) 2001-2019 NLTK Project
# Author: Steven Bird <stevenbird1@gmail.com>
# Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
This module brings together a variety of NLTK functionality for
text analysis, and... | 35.473464 | 99 | 0.589196 |
3055847e43da805015f37bcfb04096c0ff642d02 | 2,173 | py | Python | test/pybind_test/multi_node_dcn_4node_2gpu.py | quinnrong94/HugeCTR | 1068dc48b05a1219b393144dd3b61a1749f232df | [
"Apache-2.0"
] | 1 | 2021-06-04T04:03:54.000Z | 2021-06-04T04:03:54.000Z | test/pybind_test/multi_node_dcn_4node_2gpu.py | quinnrong94/HugeCTR | 1068dc48b05a1219b393144dd3b61a1749f232df | [
"Apache-2.0"
] | null | null | null | test/pybind_test/multi_node_dcn_4node_2gpu.py | quinnrong94/HugeCTR | 1068dc48b05a1219b393144dd3b61a1749f232df | [
"Apache-2.0"
] | null | null | null | from hugectr import Session, solver_parser_helper, get_learning_rate_scheduler
from mpi4py import MPI
import threading
import sys
def session_impl_test(json_file):
solver_config = solver_parser_helper(seed = 0,
batchsize = 16384,
batchsize_eva... | 39.509091 | 105 | 0.541647 |
bc252ddc9c2a12d3d363641f212d576994ac1ad3 | 1,653 | py | Python | h2o-py/tests/testdir_algos/glm/pyunit_solvers_glm.py | ghk829/h2o-study | bb2c2ff6bf3ca9430b1f0b428b007aedfd56264d | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_algos/glm/pyunit_solvers_glm.py | ghk829/h2o-study | bb2c2ff6bf3ca9430b1f0b428b007aedfd56264d | [
"Apache-2.0"
] | 1 | 2021-11-15T17:47:41.000Z | 2021-11-15T17:47:41.000Z | h2o-py/tests/testdir_algos/glm/pyunit_solvers_glm.py | purushothamgowthu/h2oai-h2o-3 | af79095b600684978a9c397a086f1dedb9540760 | [
"Apache-2.0"
] | 1 | 2019-12-09T03:07:04.000Z | 2019-12-09T03:07:04.000Z | from __future__ import print_function
import sys
from h2o.exceptions import H2OResponseError
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
def glm_solvers():
predictors = ["displacement","power","weight","acceleration","year"]... | 41.325 | 102 | 0.695705 |
8d6848194d9e725436f9026b67c0ae41d2a1227c | 518 | py | Python | tests/test_micro.py | basic-ph/feat | 0660a34e5eeeab920d1ce8e139ab486e63bd419b | [
"MIT"
] | 2 | 2020-07-13T11:59:19.000Z | 2020-07-13T12:02:05.000Z | tests/test_micro.py | basic-ph/feat | 0660a34e5eeeab920d1ce8e139ab486e63bd419b | [
"MIT"
] | null | null | null | tests/test_micro.py | basic-ph/feat | 0660a34e5eeeab920d1ce8e139ab486e63bd419b | [
"MIT"
] | null | null | null | from feat import micro
def test_reuss_model():
Ef = 224.4
Em = 3.1
Vf = 0.66
output = micro.reuss_model(Ef, Em, Vf)
assert round(output,2) == 8.88
def test_halpin_tsai_model():
# DOI: 10.1080/15376494.2014.938792 (page 11)
Ef = 74
Em = 3.35
Vf = 0.3
output_1 = micro.halpin_t... | 20.72 | 56 | 0.621622 |
5996e4378f366978af04818cbda24d9cc19ced74 | 721 | py | Python | Python Script Sample/osinfo.py | areriff/pythonlearncanvas | b797887311cafe38030e82cdac2068618ce4d33a | [
"MIT"
] | null | null | null | Python Script Sample/osinfo.py | areriff/pythonlearncanvas | b797887311cafe38030e82cdac2068618ce4d33a | [
"MIT"
] | null | null | null | Python Script Sample/osinfo.py | areriff/pythonlearncanvas | b797887311cafe38030e82cdac2068618ce4d33a | [
"MIT"
] | null | null | null | # Script Name : osinfo.py
# Author : Craig Richards
# Created : 5th April 2012
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Displays some information about the OS you are running this script on
import platform
profile = [
platform.architecture(),
platform.dist(),
p... | 20.6 | 87 | 0.632455 |
61c1a7ed7c55c3b8d9aae422e2ee9735786d7c9f | 639 | py | Python | magnum_ui/api/rest/__init__.py | NeCTAR-RC/magnum-ui | f2f3e9ec71fecd60f166faf5bd228c0f26be80d0 | [
"Apache-2.0"
] | 29 | 2015-06-23T08:06:10.000Z | 2021-08-09T18:20:54.000Z | magnum_ui/api/rest/__init__.py | NeCTAR-RC/magnum-ui | f2f3e9ec71fecd60f166faf5bd228c0f26be80d0 | [
"Apache-2.0"
] | null | null | null | magnum_ui/api/rest/__init__.py | NeCTAR-RC/magnum-ui | f2f3e9ec71fecd60f166faf5bd228c0f26be80d0 | [
"Apache-2.0"
] | 14 | 2016-01-08T06:30:41.000Z | 2022-01-03T19:48:01.000Z | # Copyright 2016 Cisco Systems
#
# 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,... | 37.588235 | 74 | 0.760563 |
3215dd2819e32d08cc6e02171cdc89f330cdda8f | 638 | py | Python | tests/test_946.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | tests/test_946.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | tests/test_946.py | sungho-joo/leetcode2github | ce7730ef40f6051df23681dd3c0e1e657abba620 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pytest
"""
Test 946. Validate Stack Sequences
"""
@pytest.fixture(scope="session")
def init_variables_946():
from src.leetcode_946_validate_stack_sequences import Solution
solution = Solution()
def _init_variables_946():
return solution
yield _init_variables_9... | 22.785714 | 96 | 0.702194 |
72e38e57cf0afc8da446f2c210f3ac456261a5e1 | 7,000 | py | Python | extra_apps/social_core/backends/odnoklassniki.py | kaocher82/Vue-Django-Shop-Website | 6273990a5510b72c3a3115d73e149d242049b5bc | [
"MIT"
] | 84 | 2019-02-22T08:19:52.000Z | 2022-02-08T03:36:32.000Z | Backend/extra_apps/social_core/backends/odnoklassniki.py | GinCho-Max/Dailyfresh-B2C | 7c94e9a4428e5116c91bf27cf696e6eee430748a | [
"Apache-2.0"
] | 16 | 2019-09-06T10:25:40.000Z | 2022-02-12T06:37:41.000Z | Backend/extra_apps/social_core/backends/odnoklassniki.py | GinCho-Max/Dailyfresh-B2C | 7c94e9a4428e5116c91bf27cf696e6eee430748a | [
"Apache-2.0"
] | 61 | 2019-03-20T02:29:23.000Z | 2021-07-09T08:14:25.000Z | """
Odnoklassniki OAuth2 and Iframe Application backends, docs at:
https://python-social-auth.readthedocs.io/en/latest/backends/odnoklassnikiru.html
"""
from hashlib import md5
from six.moves.urllib_parse import unquote
from .base import BaseAuth
from .oauth import BaseOAuth2
from ..exceptions import AuthFailed
... | 40.462428 | 85 | 0.591714 |
6ba4ec129b2bd7da6db22e968694016a8d368f9c | 10,912 | py | Python | django/db/migrations/graph.py | indevgr/django | 0247c9b08f8da4a2d93b9cede6c615011552b55a | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/migrations/graph.py | indevgr/django | 0247c9b08f8da4a2d93b9cede6c615011552b55a | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/migrations/graph.py | indevgr/django | 0247c9b08f8da4a2d93b9cede6c615011552b55a | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2016-04-21T11:47:46.000Z | 2016-04-21T11:47:46.000Z | from __future__ import unicode_literals
import warnings
from collections import deque
from functools import total_ordering
from django.db.migrations.state import ProjectState
from django.utils.datastructures import OrderedSet
from django.utils.encoding import python_2_unicode_compatible
from .exceptions import Circu... | 38.558304 | 114 | 0.627383 |
3b53171a053e7c3ca15c8e46bff4ccefb3d43cdc | 3,270 | py | Python | src/deepfield_jobs/deepfield_jobs/metadata.py | flixr/bagbunker | 661814a2a481faf8363c63489cf19ad3b6af9fc9 | [
"MIT"
] | null | null | null | src/deepfield_jobs/deepfield_jobs/metadata.py | flixr/bagbunker | 661814a2a481faf8363c63489cf19ad3b6af9fc9 | [
"MIT"
] | null | null | null | src/deepfield_jobs/deepfield_jobs/metadata.py | flixr/bagbunker | 661814a2a481faf8363c63489cf19ad3b6af9fc9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2015 Ternaris, Munich, Germany
#
# 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, c... | 33.367347 | 80 | 0.700917 |
e4ced51a1b52f9b63f923e4135a7e8d06d25d2e0 | 8,627 | py | Python | willie/modules/clock.py | RuneMagic/HelpingHand | c3b53518758cd7c8461da365aebbc3ecc0c8a23f | [
"EFL-2.0"
] | null | null | null | willie/modules/clock.py | RuneMagic/HelpingHand | c3b53518758cd7c8461da365aebbc3ecc0c8a23f | [
"EFL-2.0"
] | null | null | null | willie/modules/clock.py | RuneMagic/HelpingHand | c3b53518758cd7c8461da365aebbc3ecc0c8a23f | [
"EFL-2.0"
] | null | null | null | # coding=utf8
"""
clock.py - Willie Clock Module
Copyright 2008-9, Sean B. Palmer, inamidst.com
Copyright 2012, Edward Powell, embolalia.net
Licensed under the Eiffel Forum License 2.
http://willie.dfbta.net
"""
from __future__ import unicode_literals
try:
import pytz
except ImportError:
pytz = None
from wil... | 31.485401 | 85 | 0.60983 |
c5584a4e2452c8af9c201f73eb663450e684a80f | 7,985 | py | Python | code-postprocessing/cocopp/config.py | asmaatamna/coco | 4b1497a0e6d4de4a0dd75e03779d6c5349fa21ae | [
"BSD-3-Clause"
] | 2 | 2021-02-15T17:09:24.000Z | 2021-12-28T09:23:01.000Z | code-postprocessing/cocopp/config.py | patsp/coco | 4b1497a0e6d4de4a0dd75e03779d6c5349fa21ae | [
"BSD-3-Clause"
] | null | null | null | code-postprocessing/cocopp/config.py | patsp/coco | 4b1497a0e6d4de4a0dd75e03779d6c5349fa21ae | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module is an attempt for a global configuration file for various parameters.
The import of this module, :py:mod:`config`, changes default settings (attributes)
of other modules. This works, because each module has only one instance.
Before this module is importe... | 49.290123 | 120 | 0.580589 |
9aecc584c0116b87fc40774fde96c0900b5edabc | 717 | py | Python | db/generate.py | WhatCheer/Number-Laundry | c8cb7a6190a115ce84998a0bef8ab3490788d071 | [
"MIT"
] | 1 | 2019-04-10T05:02:14.000Z | 2019-04-10T05:02:14.000Z | db/generate.py | WhatCheer/Number-Laundry | c8cb7a6190a115ce84998a0bef8ab3490788d071 | [
"MIT"
] | null | null | null | db/generate.py | WhatCheer/Number-Laundry | c8cb7a6190a115ce84998a0bef8ab3490788d071 | [
"MIT"
] | null | null | null | import json
# This program takes Twilio's rate data (in JSON form) and writes out queries for inserting.
# The output (at this time) is almost direct insert, there are just a few manual tweaks
# you will run into when you try the insert.
print 'INSERT INTO prefixes ( id, prefix, country, country_code, twilio_rate ) V... | 37.736842 | 92 | 0.612273 |
1cc40154953e1de06017bb3cf4758a1711cea40c | 11,587 | py | Python | fanficfare/adapters/__init__.py | bennr01/FanFicFare | 3c77a68e61c39b0aa166f0bdf8df2f76f55d6de1 | [
"Apache-2.0"
] | 1 | 2020-06-18T05:22:56.000Z | 2020-06-18T05:22:56.000Z | venv/pyenv.cfg/Lib/site-packages/fanficfare/adapters/__init__.py | DylanB5402/SummerProject2 | d2e20d16f310826b9c87a010f8eefcd0abe290b0 | [
"Apache-2.0"
] | null | null | null | venv/pyenv.cfg/Lib/site-packages/fanficfare/adapters/__init__.py | DylanB5402/SummerProject2 | d2e20d16f310826b9c87a010f8eefcd0abe290b0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2011 Fanficdownloader team, 2020 FanFicFare team
#
# 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
#
# Un... | 35.006042 | 107 | 0.754811 |
07045b1ad3592a1bfa53c3004a47ea7aa88c935a | 91 | py | Python | k8s/images/codalab/apps/authenz/admin.py | abdulari/codalab-competitions | fdfbb77ac62d56c6b4b9439935037f97ffcd1423 | [
"Apache-2.0"
] | 333 | 2015-12-29T22:49:40.000Z | 2022-03-27T12:01:57.000Z | k8s/images/codalab/apps/authenz/admin.py | abdulari/codalab-competitions | fdfbb77ac62d56c6b4b9439935037f97ffcd1423 | [
"Apache-2.0"
] | 1,572 | 2015-12-28T21:54:00.000Z | 2022-03-31T13:00:32.000Z | k8s/images/codalab/apps/authenz/admin.py | abdulari/codalab-competitions | fdfbb77ac62d56c6b4b9439935037f97ffcd1423 | [
"Apache-2.0"
] | 107 | 2016-01-08T03:46:07.000Z | 2022-03-16T08:43:57.000Z | from django.contrib import admin
from .models import ClUser
admin.site.register(ClUser)
| 13 | 32 | 0.802198 |
c73f5fd7ac98902fa516ac91084b383f12bc4e38 | 39 | py | Python | .history/app/__init___20210927034948.py | GraceOswal/pitch-perfect | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | [
"MIT"
] | 2 | 2021-09-04T03:01:37.000Z | 2021-09-04T03:06:38.000Z | .history/app/__init___20210927034948.py | GraceOswal/pitch-perfect | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | [
"MIT"
] | 1 | 2021-09-04T03:06:32.000Z | 2021-09-04T03:08:26.000Z | .history/app/__init___20210927034948.py | GraceOswal/pitch-perfect | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | [
"MIT"
] | 1 | 2021-09-04T03:02:01.000Z | 2021-09-04T03:02:01.000Z | from flask_sqlalchemy import SQLAlchemy | 39 | 39 | 0.923077 |
463dba0f6e77400648951b355cf4bc041bd43e13 | 1,629 | py | Python | quant/demo/ma20.py | yunfeiz/py_learnt | d4134d8e9f1caed2db2848f19474c15c1b36557e | [
"Apache-2.0"
] | null | null | null | quant/demo/ma20.py | yunfeiz/py_learnt | d4134d8e9f1caed2db2848f19474c15c1b36557e | [
"Apache-2.0"
] | null | null | null | quant/demo/ma20.py | yunfeiz/py_learnt | d4134d8e9f1caed2db2848f19474c15c1b36557e | [
"Apache-2.0"
] | null | null | null | '''
Created on 2017-5-30
@author: 3xtrees
'''
# coding: UTF-8
import tushare as ts
'''
ma20 strategy
'''
def parse(stock, start_date):
'''''process stock'''
is_buy = 0
buy_val = []
buy_date = []
sell_val = []
sell_date = []
df = ts.get_hist_data(stock, start=start_date)
ma20... | 29.089286 | 81 | 0.493554 |
3d57db52b8a469e07e28b76539eca38b35de9525 | 555 | py | Python | plasTeX/Imagers/gsdvipng.py | perfectbark/LaTex2Docx | e32f9dcc59cce7bea4e7b114687b2300c623d8c0 | [
"MIT"
] | 23 | 2019-06-16T06:00:39.000Z | 2022-03-29T14:44:32.000Z | plasTeX/Imagers/gsdvipng.py | hao-han/LaTex2Docx | e32f9dcc59cce7bea4e7b114687b2300c623d8c0 | [
"MIT"
] | null | null | null | plasTeX/Imagers/gsdvipng.py | hao-han/LaTex2Docx | e32f9dcc59cce7bea4e7b114687b2300c623d8c0 | [
"MIT"
] | 12 | 2019-05-27T06:32:06.000Z | 2022-03-15T10:22:07.000Z | #!/usr/bin/env python
import gspdfpng, os, sys
gs = 'gs'
if sys.platform.startswith('win'):
gs = 'gswin32c'
class GSDVIPNG(gspdfpng.GSPDFPNG):
""" Imager that uses gs to convert dvi to png """
compiler = 'latex'
verification = '(%s --help && dvips --help)' % gs
def executeConverter(self, output):... | 26.428571 | 74 | 0.634234 |
b165d81d264409e4f163bbec119f15d6cb16c5fe | 3,217 | py | Python | vendas/views/cliente_view.py | SolutionUp/SolutionUP-System | 4f341df1a51a43b350e626d47abd207a55edb94d | [
"MIT"
] | 4 | 2021-08-30T01:45:46.000Z | 2022-01-08T18:05:10.000Z | vendas/views/cliente_view.py | DiskFar/DiskFar-System | dfd687e55cbca03118656d14761eb5de6c5a58a9 | [
"MIT"
] | 6 | 2021-08-29T03:26:48.000Z | 2021-09-24T00:13:11.000Z | vendas/views/cliente_view.py | DiskFar/DiskFar-System | dfd687e55cbca03118656d14761eb5de6c5a58a9 | [
"MIT"
] | 1 | 2021-08-16T21:21:34.000Z | 2021-08-16T21:21:34.000Z | from django.shortcuts import render, redirect, get_object_or_404
from django.views.generic import ListView, DetailView
from django.contrib import messages
from django.db.models import Q
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from vendas.forms ... | 44.068493 | 126 | 0.6705 |
8cdd85dc12846fea47281681d10d0adeadd0c309 | 539 | py | Python | tools/stopwords/freqlist2stoplist.py | TeMU-BSC/jusText-plusplus | 14ad3eda6ecc5a98833f1ab333583539dfb64da5 | [
"BSD-2-Clause"
] | null | null | null | tools/stopwords/freqlist2stoplist.py | TeMU-BSC/jusText-plusplus | 14ad3eda6ecc5a98833f1ab333583539dfb64da5 | [
"BSD-2-Clause"
] | null | null | null | tools/stopwords/freqlist2stoplist.py | TeMU-BSC/jusText-plusplus | 14ad3eda6ecc5a98833f1ab333583539dfb64da5 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
import re
CORPUS_COVERAGE = 0.5
#non_alphabetical = re.compile('(?!\s)(?:\W|\d|_)', re.U)
alphabetical = re.compile('(?![0-9_])\w', re.U)
sum_rel_freq = 0
for line in sys.stdin:
uline = unicode(line, 'utf-8', errors='ignore')
word, dummy_freq, rel_freq, dummy_sum_rel_freq = u... | 26.95 | 74 | 0.638219 |
3590bf0b226bc316b4277b59a724675d9c71fed8 | 1,367 | py | Python | web_dynamic/3-hbnb.py | DanielBaquero28/AirBnB_clone_v4 | 2bb1cae776f599674d07daed29f7cdc9893c7ca2 | [
"MIT"
] | 1 | 2017-09-29T16:36:55.000Z | 2017-09-29T16:36:55.000Z | web_dynamic/3-hbnb.py | DanielBaquero28/AirBnB_clone_v4 | 2bb1cae776f599674d07daed29f7cdc9893c7ca2 | [
"MIT"
] | null | null | null | web_dynamic/3-hbnb.py | DanielBaquero28/AirBnB_clone_v4 | 2bb1cae776f599674d07daed29f7cdc9893c7ca2 | [
"MIT"
] | 2 | 2017-10-25T01:13:11.000Z | 2022-02-15T02:10:44.000Z | #!/usr/bin/python3
"""
Flask App that integrates with AirBnB static HTML Template
"""
from flask import Flask, render_template, url_for
from models import storage
import uuid
import os
# flask setup
app = Flask(__name__)
app.url_map.strict_slashes = False
host = os.getenv("HBNB_API_HOST", "0.0.0.0")
port = os.getenv(... | 28.479167 | 75 | 0.631309 |
bf7170b7e7d7f3a7d15d0053cfda0f3c53c1e0b1 | 9,838 | py | Python | deepracing_py/generate_image_poses.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 11 | 2020-06-29T15:21:37.000Z | 2021-04-12T00:42:26.000Z | deepracing_py/generate_image_poses.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | null | null | null | deepracing_py/generate_image_poses.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 4 | 2019-01-23T23:36:57.000Z | 2021-07-02T00:18:37.000Z | import numpy as np
import numpy.linalg as la
import scipy
import skimage
import PIL
from PIL import Image as PILImage
import TimestampedPacketMotionData_pb2
import PoseSequenceLabel_pb2
import TimestampedImage_pb2
import Vector3dStamped_pb2
import argparse
import os
import google.protobuf.json_format
import Pose3d_pb2
... | 43.530973 | 176 | 0.78085 |
ecaa7438c7365a3f5f22e50068ea6bd8ea03e08d | 2,164 | py | Python | do_data/getter.py | justinhchae/pandas_project | 233532d84b8af0c0064ca170a01320ce0d83e4eb | [
"MIT"
] | null | null | null | do_data/getter.py | justinhchae/pandas_project | 233532d84b8af0c0064ca170a01320ce0d83e4eb | [
"MIT"
] | null | null | null | do_data/getter.py | justinhchae/pandas_project | 233532d84b8af0c0064ca170a01320ce0d83e4eb | [
"MIT"
] | null | null | null | import pandas as pd
import os
from do_mods.modify_columns import ModifyColumns
class Reader():
def __init__(self, folder='data', display_all_cols=True):
self.folder = folder
self.path = os.environ['PWD'] + os.sep + self.folder + os.sep
self.modify_columns = ModifyColumns()
if disp... | 27.05 | 69 | 0.424214 |
6043ff82b2c7796f1a77b5003c747e1882857673 | 8,106 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20200701/get_network_security_group.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20200701/get_network_security_group.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20200701/get_network_security_group.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 38.235849 | 236 | 0.660252 |
08f0e57920d720737ee644528ffad5ff2ae6cd9f | 7,866 | py | Python | juriscraper/lib/html_utils.py | Alex-Devoid/juriscraper | 6ac2d5182dbf3aea14d918e645d582e9b42c9dd6 | [
"BSD-2-Clause"
] | null | null | null | juriscraper/lib/html_utils.py | Alex-Devoid/juriscraper | 6ac2d5182dbf3aea14d918e645d582e9b42c9dd6 | [
"BSD-2-Clause"
] | null | null | null | juriscraper/lib/html_utils.py | Alex-Devoid/juriscraper | 6ac2d5182dbf3aea14d918e645d582e9b42c9dd6 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import re
import sys
from lxml import etree, html
from lxml.etree import XMLSyntaxError
from lxml.html import fromstring, html5parser, tostring
from lxml.html.clean import Cleaner
from six import text_type
from six.moves.html_parser import HTMLParser
from six.moves.urllib.parse ... | 36.082569 | 85 | 0.65192 |
0c7930500ca408365b15fae9fdb3d446d471abf8 | 18,572 | py | Python | asposewordscloud/models/xaml_flow_save_options_data.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | asposewordscloud/models/xaml_flow_save_options_data.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | asposewordscloud/models/xaml_flow_save_options_data.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="xaml_flow_save_options_data.py">
# Copyright (c) 2020 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a ... | 40.907489 | 346 | 0.669879 |
7ad12d58bc0a030dbaee99cb2cc5c37b70671b2a | 23,619 | py | Python | model.py | biancaAlexandru/painting | de442174687f477c743355009f74dd3b05a0e82e | [
"Apache-2.0"
] | null | null | null | model.py | biancaAlexandru/painting | de442174687f477c743355009f74dd3b05a0e82e | [
"Apache-2.0"
] | null | null | null | model.py | biancaAlexandru/painting | de442174687f477c743355009f74dd3b05a0e82e | [
"Apache-2.0"
] | null | null | null | import numba
import torch
import torchvision
from scipy import stats
import numpy as np
from torch import nn
import utils
@numba.jit(nopython=True)
def make_input_tensor(input_tensor, new_aug_lidar_cam_coords, bin_idxs, pillar_idxs):
"""
:return input_tensor: (10, P, N) np.array passed into conv layer.
""... | 50.793548 | 134 | 0.629366 |
b7926f13417870d2f7e2f0c90b1f6ccdda236759 | 187 | py | Python | setup.py | CyanideCN/vanadis | ebd2373fb55d5913eb1384ab434e083fe714ecab | [
"MIT"
] | 1 | 2019-12-01T11:31:23.000Z | 2019-12-01T11:31:23.000Z | setup.py | CyanideCN/vanadis | ebd2373fb55d5913eb1384ab434e083fe714ecab | [
"MIT"
] | null | null | null | setup.py | CyanideCN/vanadis | ebd2373fb55d5913eb1384ab434e083fe714ecab | [
"MIT"
] | 2 | 2019-09-24T00:46:24.000Z | 2019-12-01T11:31:24.000Z | from setuptools import setup, find_packages
setup(name='vanadis',
version='0.0.2',
packages=find_packages(),
install_requires='matplotlib',
license='MIT Licence') | 26.714286 | 43 | 0.684492 |
d49f06067d55f02bad7253dc0ac2b007faad00cd | 679 | py | Python | Implementation/5622_다이얼/5622_다이얼.py | 7dudtj/BOJ_myCode | 37d105590a7963e2232102b3098fea3c3504b96f | [
"MIT"
] | 1 | 2022-03-30T15:50:47.000Z | 2022-03-30T15:50:47.000Z | Implementation/5622_다이얼/5622_다이얼.py | 7dudtj/BOJ_myCode | 37d105590a7963e2232102b3098fea3c3504b96f | [
"MIT"
] | null | null | null | Implementation/5622_다이얼/5622_다이얼.py | 7dudtj/BOJ_myCode | 37d105590a7963e2232102b3098fea3c3504b96f | [
"MIT"
] | 1 | 2021-07-20T07:11:06.000Z | 2021-07-20T07:11:06.000Z | N = input()
Sum = 0
for i in range(len(N)):
if N[i] == 'A' or N[i] == 'B' or N[i] == 'C':
Sum = Sum + 3
elif N[i] == 'D' or N[i] == 'E' or N[i] == 'F':
Sum = Sum + 4
elif N[i] == 'G' or N[i] == 'H' or N[i] == 'I':
Sum = Sum + 5
elif N[i] == 'J' or N[i] == 'K' or N[i] == 'L':
... | 28.291667 | 66 | 0.344624 |
3ab3acd0ff9024a041d43712aeedd9c086c7ab6b | 44,511 | py | Python | tensorflow/python/keras/layers/convolutional_test.py | grasskin/tensorflow | 3fbfc9351ae6a2bb719d24458ee2c95214682302 | [
"Apache-2.0"
] | 4 | 2020-06-28T08:25:36.000Z | 2021-08-12T12:41:34.000Z | tensorflow/python/keras/layers/convolutional_test.py | grasskin/tensorflow | 3fbfc9351ae6a2bb719d24458ee2c95214682302 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:12:24.000Z | 2022-02-10T02:04:13.000Z | tensorflow/python/keras/layers/convolutional_test.py | grasskin/tensorflow | 3fbfc9351ae6a2bb719d24458ee2c95214682302 | [
"Apache-2.0"
] | 4 | 2019-11-28T12:18:07.000Z | 2021-08-01T16:12:17.000Z | # Copyright 2016 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... | 37.946292 | 80 | 0.609018 |
5e7e80d29558c16b0d219a10c363299af3f64964 | 1,080 | py | Python | funciones.py | manu9812/MongoDB | d8cdb217e00f598747d0eee3780c7edff63f25c8 | [
"Apache-2.0"
] | null | null | null | funciones.py | manu9812/MongoDB | d8cdb217e00f598747d0eee3780c7edff63f25c8 | [
"Apache-2.0"
] | null | null | null | funciones.py | manu9812/MongoDB | d8cdb217e00f598747d0eee3780c7edff63f25c8 | [
"Apache-2.0"
] | null | null | null | import pymongo
from flask import Flask, jsonify, request
defget_db_connection(uri):
client = pymongo.MongoClient(uri)
return client.cryptongo
app = Flask(__name__)
db_connection = get_db_connection('mongodb://localhost:27017')
defget_documents():
params = {}
name = int(request.args.get('name', ''))
limit... | 24.545455 | 62 | 0.650926 |
e31af4fb600a4b0a70fe12777c4cbf26628e52e5 | 3,972 | py | Python | local/tf/eval_dnn.py | Alicegaz/x-vector-kaldi-tf | 5249e7d5c499291efbca6c8e49ba197392ae0a28 | [
"Apache-2.0"
] | 117 | 2018-11-27T11:55:51.000Z | 2020-10-22T13:23:50.000Z | local/tf/eval_dnn.py | LCF2764/x-vector-kaldi-tf | 5249e7d5c499291efbca6c8e49ba197392ae0a28 | [
"Apache-2.0"
] | 3 | 2019-01-08T10:23:03.000Z | 2020-03-23T14:34:53.000Z | local/tf/eval_dnn.py | LCF2764/x-vector-kaldi-tf | 5249e7d5c499291efbca6c8e49ba197392ae0a28 | [
"Apache-2.0"
] | 37 | 2018-11-27T15:38:47.000Z | 2020-09-16T11:30:56.000Z | #!/usr/bin/env python
from __future__ import print_function
import argparse
import logging
import os
import sys
import traceback
import mkl
import numexpr
import ze_utils as utils
from models import Model
from train_dnn_one_iteration import TarFileDataLoader
mkl.set_num_threads(1)
numexpr.set_num_threads(1)
MKL_N... | 33.378151 | 116 | 0.65282 |
22cd45d3cfe3ddc3707c354bf92acb5e93717533 | 2,137 | py | Python | venv/lib/python3.8/site-packages/statsmodels/iolib/openfile.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 6,931 | 2015-01-01T11:41:55.000Z | 2022-03-31T17:03:24.000Z | venv/lib/python3.8/site-packages/statsmodels/iolib/openfile.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 6,137 | 2015-01-01T00:33:45.000Z | 2022-03-31T22:53:17.000Z | venv/lib/python3.8/site-packages/statsmodels/iolib/openfile.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 2,608 | 2015-01-02T21:32:31.000Z | 2022-03-31T07:38:30.000Z | """
Handle file opening for read/write
"""
from pathlib import Path
from numpy.lib._iotools import _is_string_like
class EmptyContextManager(object):
"""
This class is needed to allow file-like object to be used as
context manager, but without getting closed.
"""
def __init__(self, obj):
... | 26.7125 | 79 | 0.623772 |
eaca363f69d14df4c50823d770dcc335e44f7631 | 3,702 | py | Python | _unittests/ut_faq/test_graph_with_labels.py | mohamedelkansouli/Ensae_py | 8bc867bd2081c259c793fadfa8be5dcc7bd1400b | [
"MIT"
] | null | null | null | _unittests/ut_faq/test_graph_with_labels.py | mohamedelkansouli/Ensae_py | 8bc867bd2081c259c793fadfa8be5dcc7bd1400b | [
"MIT"
] | null | null | null | _unittests/ut_faq/test_graph_with_labels.py | mohamedelkansouli/Ensae_py | 8bc867bd2081c259c793fadfa8be5dcc7bd1400b | [
"MIT"
] | null | null | null | """
@brief test log(time=3s)
"""
import sys
import os
import unittest
import warnings
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import fix_tkinter_issues_virtualenv
try:
import src
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
... | 19.691489 | 80 | 0.318747 |
a26d7e4bb966a864358215671fbb2cf2ebe33cd5 | 4,564 | py | Python | server.py | niyunhuo98/simple-chat-app | b2e725083dce3200364233da54b930d2e6044513 | [
"MIT"
] | null | null | null | server.py | niyunhuo98/simple-chat-app | b2e725083dce3200364233da54b930d2e6044513 | [
"MIT"
] | null | null | null | server.py | niyunhuo98/simple-chat-app | b2e725083dce3200364233da54b930d2e6044513 | [
"MIT"
] | null | null | null | import socket, string, random, threading, time
from datetime import datetime
def get_time():
"""get current time"""
return str(datetime.now().hour) + ':' + str(datetime.now().minute)
def id_generator():
"""Generate an ID"""
number = str(random.randint(0, 9))
l = [random.choice(string.ascii_lower... | 44.31068 | 125 | 0.602542 |
e4ac3d9b3eb031827b2de555d9beaff7f8ce7e7e | 1,523 | py | Python | evaluation/utils/pytorch_memlab/courtesy.py | NotMorven/cavaface.pytorch | 822651f0e6d4d08df5441922acead39dc5375103 | [
"MIT"
] | 716 | 2019-05-29T10:28:38.000Z | 2022-03-31T03:48:42.000Z | evaluation/utils/pytorch_memlab/courtesy.py | careytian0405/cavaface.pytorch | 38956bb505558784081320bf40c88afd286b1fcd | [
"MIT"
] | 76 | 2020-05-22T05:21:33.000Z | 2021-07-30T03:39:06.000Z | evaluation/utils/pytorch_memlab/courtesy.py | careytian0405/cavaface.pytorch | 38956bb505558784081320bf40c88afd286b1fcd | [
"MIT"
] | 65 | 2020-05-07T08:57:16.000Z | 2021-07-21T20:10:44.000Z | import gc
import torch
class Courtesy():
"""A class to yield CUDA memory at any time in the training
The whole save/load is a bit tricky because all data transfer should
be inplace operation and gradient agnostic
"""
def __init__(self):
self.loc_map = {}
def yield_memory(self):
... | 30.46 | 84 | 0.54826 |
94ab233e6d8f10bcd01637bb0a9b44fed34e676d | 1,034 | py | Python | food.py | RevanthMBontha/Snake-Game | f0f16202fecec4b80d3ed3cbbaa30b7b5d9b4d9a | [
"MIT"
] | 1 | 2022-03-01T04:01:30.000Z | 2022-03-01T04:01:30.000Z | food.py | RevanthMBontha/Snake-Game | f0f16202fecec4b80d3ed3cbbaa30b7b5d9b4d9a | [
"MIT"
] | null | null | null | food.py | RevanthMBontha/Snake-Game | f0f16202fecec4b80d3ed3cbbaa30b7b5d9b4d9a | [
"MIT"
] | null | null | null | from turtle import Turtle
from winsound import PlaySound, SND_ASYNC
from global_helpers import get_random_color, get_random_location
from global_helpers import FOOD_COLORS
class Food(Turtle):
def __init__(self):
super().__init__()
self.shape("circle")
self.penup()
self.shapesize(... | 30.411765 | 79 | 0.67118 |
119a712fa53d18c824230251eaf260b6dd246e2c | 6,006 | py | Python | tests/symbolicator/test_minidump_full.py | pombredanne/django-sentry | 4ad09417fb3cfa3aa4a0d4175ae49fe02837c567 | [
"BSD-3-Clause"
] | null | null | null | tests/symbolicator/test_minidump_full.py | pombredanne/django-sentry | 4ad09417fb3cfa3aa4a0d4175ae49fe02837c567 | [
"BSD-3-Clause"
] | null | null | null | tests/symbolicator/test_minidump_full.py | pombredanne/django-sentry | 4ad09417fb3cfa3aa4a0d4175ae49fe02837c567 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import pytest
import zipfile
from mock import patch
from six import BytesIO
from django.core.urlresolvers import reverse
from django.core.files.uploadedfile import SimpleUploadedFile
from sentry import eventstore
from sentry.testutils import TransactionTestCase
from sentry.mod... | 39 | 89 | 0.634033 |
b36c07e7da91090130cedd9a0fc4b23708584151 | 2,197 | py | Python | tests/stats/test_ap_checker.py | kralka/scaaml | f47e028dad6bc74eb480cbfae83724c1057caf39 | [
"Apache-2.0"
] | null | null | null | tests/stats/test_ap_checker.py | kralka/scaaml | f47e028dad6bc74eb480cbfae83724c1057caf39 | [
"Apache-2.0"
] | null | null | null | tests/stats/test_ap_checker.py | kralka/scaaml | f47e028dad6bc74eb480cbfae83724c1057caf39 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.09589 | 78 | 0.769231 |
3829d1597a4f02a55452c0dd261c354528323c24 | 1,176 | py | Python | pyvo/vomas/tests/test.11.stc_position.py | lmichel/pyvo | 8296bee2e799843909805fb6ae528a9b23776e8d | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | pyvo/vomas/tests/test.11.stc_position.py | lmichel/pyvo | 8296bee2e799843909805fb6ae528a9b23776e8d | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | pyvo/vomas/tests/test.11.stc_position.py | lmichel/pyvo | 8296bee2e799843909805fb6ae528a9b23776e8d | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | """
Created on jan 2022
@author: laurentmichel
"""
import unittest
import os
from pyvo.vomas.stc_classes.measure import Velocity
from pyvo.vomas.utils.xml_utils import XmlUtils
class TestSTCPosition(unittest.TestCase):
def test_PKTable(self):
self.maxDiff = None
vpath = os.path.join(self.... | 34.588235 | 186 | 0.628401 |
37931b1a9c5782866d7459cd570bba32fb5060da | 750 | py | Python | Carrito/compras/compras/0002_auto_20210609_0826.py | EnriqueViajero/carrito-Jaguarete-SAA | ada20d1a15ab9d8caa977b925a62d9b9ad72c670 | [
"MIT"
] | null | null | null | Carrito/compras/compras/0002_auto_20210609_0826.py | EnriqueViajero/carrito-Jaguarete-SAA | ada20d1a15ab9d8caa977b925a62d9b9ad72c670 | [
"MIT"
] | null | null | null | Carrito/compras/compras/0002_auto_20210609_0826.py | EnriqueViajero/carrito-Jaguarete-SAA | ada20d1a15ab9d8caa977b925a62d9b9ad72c670 | [
"MIT"
] | null | null | null | from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('muebles', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='productos',
fields=[
('id_no... | 30 | 125 | 0.548 |
0be70cb3d5d448ccfb83c89fe4b4a300cfcd2c55 | 12,994 | py | Python | networks/comatchnet/comatchnet.py | huanglf714/COMatchNet | 79023f5be65d354eb9bdac026d7e0d73110bc4aa | [
"Apache-2.0"
] | 1 | 2022-03-30T01:26:47.000Z | 2022-03-30T01:26:47.000Z | networks/comatchnet/comatchnet.py | huanglf714/COMatchNet | 79023f5be65d354eb9bdac026d7e0d73110bc4aa | [
"Apache-2.0"
] | null | null | null | networks/comatchnet/comatchnet.py | huanglf714/COMatchNet | 79023f5be65d354eb9bdac026d7e0d73110bc4aa | [
"Apache-2.0"
] | 1 | 2022-03-30T01:27:23.000Z | 2022-03-30T01:27:23.000Z | from PIL.Image import NONE
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from networks.layers.loss import Concat_CrossEntropyLoss
from networks.layers.loss import Lovasz_Loss
from networks.layers.matching import global_matching, global_matching_for_eval, local_matching, foregroun... | 50.560311 | 190 | 0.654841 |
ea24357f6ac2ffda745ce9c2ba650108757515dd | 523 | py | Python | libact/query_strategies/__init__.py | jonzarecki/libact | 32bbc4af8e31cd947aeb07c3972d4bdcd759a77f | [
"BSD-2-Clause"
] | null | null | null | libact/query_strategies/__init__.py | jonzarecki/libact | 32bbc4af8e31cd947aeb07c3972d4bdcd759a77f | [
"BSD-2-Clause"
] | null | null | null | libact/query_strategies/__init__.py | jonzarecki/libact | 32bbc4af8e31cd947aeb07c3972d4bdcd759a77f | [
"BSD-2-Clause"
] | null | null | null | """
Concrete query strategy classes.
"""
from __future__ import absolute_import
import os
ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
import logging
LOGGER = logging.getLogger(__name__)
from .active_learning_by_learning import ActiveLearningByLearning
from .hintsvm import HintSVM
from .uncertainty_sampling... | 27.526316 | 65 | 0.839388 |
b7d210c67af331f793973212388e08de12333bee | 1,804 | py | Python | utils/hello.py | chuckfairy/TYOS | 177c33432abee6ef827bd9c4bdbd7ed92237e278 | [
"MIT"
] | null | null | null | utils/hello.py | chuckfairy/TYOS | 177c33432abee6ef827bd9c4bdbd7ed92237e278 | [
"MIT"
] | null | null | null | utils/hello.py | chuckfairy/TYOS | 177c33432abee6ef827bd9c4bdbd7ed92237e278 | [
"MIT"
] | null | null | null | import pygame, sys
from pygame.locals import *
# set up pygame
pygame.init()
# set up the window
windowSurface = pygame.display.set_mode((500, 400), 0, 32)
pygame.display.set_caption('Hello world!')
# set up the colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)... | 27.333333 | 120 | 0.701774 |
7bb96d77f95a39aef0cbe5c93baf032ad9baea3d | 1,550 | py | Python | test/test_hmrf_em.py | microfluidix/HMRF | d6f64ca99537e638d978e474034cabc64c6f047f | [
"MIT"
] | 1 | 2021-11-16T10:40:25.000Z | 2021-11-16T10:40:25.000Z | test/test_hmrf_em.py | gronteix/HMRF | 0c7b4b1ea9cd2934b2c9218e9d48b7c63b819a34 | [
"MIT"
] | null | null | null | test/test_hmrf_em.py | gronteix/HMRF | 0c7b4b1ea9cd2934b2c9218e9d48b7c63b819a34 | [
"MIT"
] | 1 | 2021-11-16T10:40:59.000Z | 2021-11-16T10:40:59.000Z | import networkx as nx
import numpy as np
import pytest
from biograph import hmrf_em
@pytest.fixture
def create_graph():
"""Create a graph with five nodes and ten edges. Each node is
connected to two other nodes. Each node has one attribute 'cell_type',
there are two different 'cell_type' attributes in tot... | 28.181818 | 74 | 0.67871 |
e909f7660406d75e793063721b8a307017866b5d | 1,448 | py | Python | jiraan/models.py | saudahabib/jiraan- | be88f94d0229e97adc41438bc27bcf1dbce85458 | [
"MIT"
] | null | null | null | jiraan/models.py | saudahabib/jiraan- | be88f94d0229e97adc41438bc27bcf1dbce85458 | [
"MIT"
] | null | null | null | jiraan/models.py | saudahabib/jiraan- | be88f94d0229e97adc41438bc27bcf1dbce85458 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Neighborhood(models.Model):
hood_name=models.CharField(max_length=50)
hood_location = models.CharField(max_length=50)
hood_count=models.CharField(max_length=50)
#save function
def save_hood(self):
self.save()
#delete functi... | 24.542373 | 77 | 0.698895 |
95b518dc1a2cea3ae5636dda55b638daa8d88fe5 | 11,041 | py | Python | cyberserver/servers/attacks_generator.py | csd3345/cybermap-server | f9cad5e59547d30c1e6e13c8b4b39e6ea46746cb | [
"Unlicense",
"MIT"
] | null | null | null | cyberserver/servers/attacks_generator.py | csd3345/cybermap-server | f9cad5e59547d30c1e6e13c8b4b39e6ea46746cb | [
"Unlicense",
"MIT"
] | null | null | null | cyberserver/servers/attacks_generator.py | csd3345/cybermap-server | f9cad5e59547d30c1e6e13c8b4b39e6ea46746cb | [
"Unlicense",
"MIT"
] | null | null | null | import sys
import json
import time
from random import choice, randint, randrange
import pathlib
import logging
import timeit
import click
from click_help_colors import HelpColorsCommand, HelpColorsGroup
from typing import Union, Optional
from math import inf as INFINITE
from cyberserver.servers import utilities
_scr... | 31.27762 | 116 | 0.56743 |
db6d526bfcf066b9dbd9e4d6828426ebe1ffb39c | 390 | py | Python | instagram/forms.py | Ianadika44/insta-clown | 268e0cb1a66f20ff22073b308c80a2ab8d664c55 | [
"Unlicense"
] | null | null | null | instagram/forms.py | Ianadika44/insta-clown | 268e0cb1a66f20ff22073b308c80a2ab8d664c55 | [
"Unlicense"
] | 1 | 2021-06-08T21:42:18.000Z | 2021-06-08T21:42:18.000Z | instagram/forms.py | Ianadika44/insta-clown | 268e0cb1a66f20ff22073b308c80a2ab8d664c55 | [
"Unlicense"
] | null | null | null | from django import forms
from .models import Post
class NewsLetterForm(forms.Form):
your_name = forms.CharField(label='First Name',max_length=30)
email = forms.EmailField(label='Email')
class NewPostForm(forms.ModelForm):
class Meta:
model = Post
exclude = ['profile']
widgets ... | 26 | 65 | 0.648718 |
cce47068331277a5145a5ed8fefc8a7b8327929f | 3,380 | py | Python | designate-8.0.0/designate/tests/test_api/test_v2/test_service_status.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 145 | 2015-01-02T09:35:53.000Z | 2021-12-14T17:03:53.000Z | designate/tests/test_api/test_v2/test_service_status.py | sapcc/designate | c3f084751006a2fe7562f137930542c4759d6fd9 | [
"Apache-2.0"
] | 6 | 2015-03-15T00:22:27.000Z | 2019-12-16T09:37:38.000Z | designate/tests/test_api/test_v2/test_service_status.py | sapcc/designate | c3f084751006a2fe7562f137930542c4759d6fd9 | [
"Apache-2.0"
] | 109 | 2015-01-13T16:47:34.000Z | 2021-03-15T13:18:48.000Z | # Copyright 2016 Hewlett Packard Enterprise Development Company LP
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 39.764706 | 78 | 0.681361 |
16c08bf5560a181cb9066dae531a05db0771268d | 5,182 | py | Python | tests/mutations/test_person.py | trompamusic/ce-queries-template | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | 1 | 2020-06-18T15:43:18.000Z | 2020-06-18T15:43:18.000Z | tests/mutations/test_person.py | trompamusic/ce-queries-template | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | 60 | 2019-12-17T11:08:28.000Z | 2021-03-02T16:19:41.000Z | tests/mutations/test_person.py | trompamusic/trompace-client | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | null | null | null | # Tests for mutations pertaining to person objects.
import os
import pytest
from trompace.exceptions import UnsupportedLanguageException, NotAMimeTypeException
from trompace.mutations import person
from tests import CeTestCase
class TestPerson(CeTestCase):
def setUp(self) -> None:
super()
self... | 48.429907 | 105 | 0.603821 |
d2bffad9f4004b95f56c3810b96353c389d33c07 | 11,787 | py | Python | com/precisely/apis/model/tax_locations.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | com/precisely/apis/model/tax_locations.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | com/precisely/apis/model/tax_locations.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | """
Precisely APIs
Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs. # noqa: E501
The version of the OpenAPI document: 11.9.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F4... | 42.706522 | 145 | 0.571053 |
d47aecd08baaeabe664ceabac9dbb67643156591 | 547 | py | Python | cradmin_legacy/viewhelpers/mixins.py | appressoas/cradmin_legacy | b9d024299333dd04c87c1031bd5be5778aa7f1f1 | [
"BSD-3-Clause"
] | null | null | null | cradmin_legacy/viewhelpers/mixins.py | appressoas/cradmin_legacy | b9d024299333dd04c87c1031bd5be5778aa7f1f1 | [
"BSD-3-Clause"
] | 17 | 2018-03-07T15:52:42.000Z | 2022-03-12T01:07:06.000Z | cradmin_legacy/viewhelpers/mixins.py | appressoas/cradmin_legacy | b9d024299333dd04c87c1031bd5be5778aa7f1f1 | [
"BSD-3-Clause"
] | 1 | 2018-07-23T22:13:45.000Z | 2018-07-23T22:13:45.000Z | from __future__ import unicode_literals
from builtins import object
class QuerysetForRoleMixin(object):
def get_queryset_for_role(self, role):
"""
Get a queryset with all objects of ``self.model`` that
the current role can access.
"""
raise NotImplementedError()
def g... | 27.35 | 72 | 0.652651 |
55ae49096829e62436750f72fbc3f1bee8928e2a | 12,398 | py | Python | docs/exts/docs_build/docs_builder.py | khilawar4/airflow | 5f3f65b82517f615f31f0c8a7f8ac0facb325235 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2020-09-11T07:21:58.000Z | 2021-04-29T17:14:11.000Z | docs/exts/docs_build/docs_builder.py | khilawar4/airflow | 5f3f65b82517f615f31f0c8a7f8ac0facb325235 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-02-27T17:34:47.000Z | 2021-03-24T21:03:30.000Z | docs/exts/docs_build/docs_builder.py | khilawar4/airflow | 5f3f65b82517f615f31f0c8a7f8ac0facb325235 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-02-03T09:55:26.000Z | 2020-02-03T09:55:26.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... | 39.35873 | 108 | 0.610744 |
22049692047a19482d78243d99741b73fdd0aadb | 41 | py | Python | u-net_convolutional_networks_for_biomedical_image_segmentation/models/__init__.py | younnggsuk/CV-Paper-Implementation | fecd67d3f216872976f9b38445ce1c1f9ef1ac02 | [
"MIT"
] | 4 | 2021-06-03T13:56:51.000Z | 2021-11-05T06:22:25.000Z | u-net_convolutional_networks_for_biomedical_image_segmentation/models/__init__.py | younnggsuk/CV-Paper-Implementation | fecd67d3f216872976f9b38445ce1c1f9ef1ac02 | [
"MIT"
] | null | null | null | u-net_convolutional_networks_for_biomedical_image_segmentation/models/__init__.py | younnggsuk/CV-Paper-Implementation | fecd67d3f216872976f9b38445ce1c1f9ef1ac02 | [
"MIT"
] | 1 | 2022-03-28T09:34:03.000Z | 2022-03-28T09:34:03.000Z | from .unet import *
from .metric import * | 20.5 | 21 | 0.731707 |
bbe8726b010c3b5e7361e3868ec2e799f31a25c3 | 3,286 | py | Python | setup.py | lopessec/killerbee | c236d626e297815bdc401695cd6c8a6c9e353c38 | [
"BSD-3-Clause"
] | 653 | 2015-04-01T18:29:08.000Z | 2022-03-18T09:05:22.000Z | setup.py | lopessec/killerbee | c236d626e297815bdc401695cd6c8a6c9e353c38 | [
"BSD-3-Clause"
] | 189 | 2015-04-23T03:37:34.000Z | 2022-03-15T07:23:17.000Z | setup.py | lopessec/killerbee | c236d626e297815bdc401695cd6c8a6c9e353c38 | [
"BSD-3-Clause"
] | 223 | 2015-04-07T10:12:18.000Z | 2022-03-25T17:39:26.000Z | # NOTE: See the README file for a list of dependencies to install.
from __future__ import print_function
import sys
try:
from setuptools import setup, Extension
except ImportError:
print("No setuptools found, attempting to use distutils instead.")
from distutils.core import setup, Extension
err = []
warn... | 38.209302 | 131 | 0.644248 |
e9bd0ec8d57c5b694badb5df4843632c4ef67425 | 2,703 | py | Python | Finish/lms.py | soumallyadev07/Auto-Attendee | 845c636b76884f71457de1560494ffaeaa7630fd | [
"MIT"
] | 5 | 2020-12-18T15:42:57.000Z | 2021-08-06T08:47:17.000Z | Finish/lms.py | shourygupta28/Auto-Attendee | cf01ad7ae62f53c15363c04a053c3cdd77640c87 | [
"MIT"
] | null | null | null | Finish/lms.py | shourygupta28/Auto-Attendee | cf01ad7ae62f53c15363c04a053c3cdd77640c87 | [
"MIT"
] | 39 | 2020-11-19T06:56:41.000Z | 2021-08-06T08:47:20.000Z | from selenium import webdriver
from getpass import getpass
import time
from datetime import datetime
import calendar
import random
import csv
my_date = datetime.today()
#https://chromedriver.chromium.org/downloads
username = input("Enter in your username: ")
password = getpass("Enter your password: ")
lms = webdriver... | 36.04 | 164 | 0.550869 |
b947f003fe5d12293d3261e7f48e02003603d9c1 | 2,655 | py | Python | app.py | nevermorethesjake/weather | 18e1967fd50a87cde67a6c50c64e033deda2a7e2 | [
"Apache-2.0"
] | null | null | null | app.py | nevermorethesjake/weather | 18e1967fd50a87cde67a6c50c64e033deda2a7e2 | [
"Apache-2.0"
] | null | null | null | app.py | nevermorethesjake/weather | 18e1967fd50a87cde67a6c50c64e033deda2a7e2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
import urllib.request, urllib.parse, urllib.error
import json
import os
from flask import Flask
from flask import request
from flask import make_response
# Flask app should start in glob... | 25.285714 | 128 | 0.629379 |
ab58cb69bcfce6c695319b2fffe8755e28d2b909 | 13,366 | py | Python | ambari-server/src/main/resources/common-services/SPARK/2.2.0/scripts/params.py | dawnwish/ambari | accbb0048435de2d08e3d1b8771d966a94b98707 | [
"Apache-2.0"
] | 16 | 2018-05-24T10:28:24.000Z | 2021-08-05T03:13:26.000Z | ambari-server/src/main/resources/common-services/SPARK/2.2.0/scripts/params.py | chinaworld/ambari-zh | f3b9afcbf0ed708fa5b5995a3acfb9f4131dc019 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/common-services/SPARK/2.2.0/scripts/params.py | chinaworld/ambari-zh | f3b9afcbf0ed708fa5b5995a3acfb9f4131dc019 | [
"Apache-2.0"
] | 17 | 2018-07-06T08:57:00.000Z | 2021-11-04T11:00:36.000Z | #!/usr/bin/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"); you... | 50.059925 | 163 | 0.794703 |
74ffbeee3d92ce8f6482db2f38c4cc0d2af628c4 | 12,836 | py | Python | core/solver.py | Limacon101/EA_PODI_Library | 6dee7210cd05a6112c919928fccadbd8857d7f10 | [
"Apache-2.0"
] | null | null | null | core/solver.py | Limacon101/EA_PODI_Library | 6dee7210cd05a6112c919928fccadbd8857d7f10 | [
"Apache-2.0"
] | null | null | null | core/solver.py | Limacon101/EA_PODI_Library | 6dee7210cd05a6112c919928fccadbd8857d7f10 | [
"Apache-2.0"
] | null | null | null | import random
from core import ops
from algorithms import algo_rs, algo_ea, algo_hc
from generators import gen_onemax, gen_gp, gen_sphere
class Solver(object):
def __init__(self, generator, algorithm, alg_params=None):
"""
Instantiate a Solver before starting an optimisation
:param gene... | 34.880435 | 120 | 0.579854 |
886e834294a2cab7e844bb55ba9ebdbd50df5937 | 14,690 | py | Python | courses/machine_learning/deepdive/09_sequence/txtclsmodel/trainer/model_native.py | studiocardo/GCP-Tutorials | ea81f0c1cb59f75b01e4912e40e338c2bd153b75 | [
"Apache-2.0"
] | 1 | 2018-11-21T04:52:12.000Z | 2018-11-21T04:52:12.000Z | courses/machine_learning/deepdive/09_sequence/txtclsmodel/trainer/model_native.py | studiocardo/GCP-Tutorials | ea81f0c1cb59f75b01e4912e40e338c2bd153b75 | [
"Apache-2.0"
] | null | null | null | courses/machine_learning/deepdive/09_sequence/txtclsmodel/trainer/model_native.py | studiocardo/GCP-Tutorials | ea81f0c1cb59f75b01e4912e40e338c2bd153b75 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import pandas as pd
import numpy as np
import re
import os
from tensorflow.python.keras.preprocessing import text
from tensorflow.python.keras import models
from tensorflow.python.keras... | 40.58011 | 108 | 0.671205 |
777b4bc7538c5f0f4cf9978cc2b6a8f4659adefa | 2,186 | py | Python | intake/gui/__init__.py | j-r77/intake | 5c920e99b8301cc2567a7be2ee070879768ed516 | [
"BSD-2-Clause"
] | null | null | null | intake/gui/__init__.py | j-r77/intake | 5c920e99b8301cc2567a7be2ee070879768ed516 | [
"BSD-2-Clause"
] | null | null | null | intake/gui/__init__.py | j-r77/intake | 5c920e99b8301cc2567a7be2ee070879768ed516 | [
"BSD-2-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors
# All rights reserved.
#
# The full license is in the LICENSE file, distributed with this software.
#------------------------------------------------------------------------... | 30.361111 | 92 | 0.516468 |
ce9c8056876288e1b0eb63604dfe98972eba4ac2 | 3,667 | py | Python | src/utils/Vocabulary.py | ryderling/MalGraph | 4d5f0f80ab2cf7d55abe35a9ef46686b5fdb9610 | [
"MIT"
] | 4 | 2022-01-17T13:37:55.000Z | 2022-03-24T07:21:43.000Z | src/utils/Vocabulary.py | ryderling/MalGraph | 4d5f0f80ab2cf7d55abe35a9ef46686b5fdb9610 | [
"MIT"
] | null | null | null | src/utils/Vocabulary.py | ryderling/MalGraph | 4d5f0f80ab2cf7d55abe35a9ef46686b5fdb9610 | [
"MIT"
] | 3 | 2022-01-17T13:37:56.000Z | 2022-03-29T10:51:48.000Z | import json
import os
from collections import Counter
from tqdm import tqdm
class Vocab:
def __init__(self, freq_file: str, max_vocab_size: int, min_freq: int = 1, unk_token: str = '<unk>', pad_token: str = '<pad>', special_tokens: list = None):
self.max_vocab_size = max_vocab_size
self.m... | 40.296703 | 160 | 0.619853 |
eaa5e390f675aba469aa94642b2e874dd2f4c336 | 1,583 | py | Python | dask_ctl/tests/test_discovery.py | keewis/dask-ctl | 3d12a3fba5e0e1322936276c7b2955384614cc2f | [
"BSD-3-Clause"
] | 17 | 2021-01-21T17:39:30.000Z | 2022-03-04T10:11:37.000Z | dask_ctl/tests/test_discovery.py | keewis/dask-ctl | 3d12a3fba5e0e1322936276c7b2955384614cc2f | [
"BSD-3-Clause"
] | 25 | 2021-01-21T19:27:39.000Z | 2022-03-29T08:27:56.000Z | dask_ctl/tests/test_discovery.py | keewis/dask-ctl | 3d12a3fba5e0e1322936276c7b2955384614cc2f | [
"BSD-3-Clause"
] | 10 | 2021-01-21T19:37:43.000Z | 2022-03-03T17:20:03.000Z | import pytest
from typing import AsyncIterator
from distributed import LocalCluster
from dask_ctl.discovery import (
discover_cluster_names,
discover_clusters,
list_discovery_methods,
)
from dask_ctl.proxy import ProxyCluster
def test_discovery_methods():
assert "proxycluster" in list_discovery_meth... | 28.267857 | 82 | 0.713203 |
fa7e54172a3aa415cd149de1e670f35501477d93 | 153,455 | py | Python | src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py | AndrewLane/azure-cli | 524491c580fc3c133f2d9859cef1c8251f4192e4 | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py | AndrewLane/azure-cli | 524491c580fc3c133f2d9859cef1c8251f4192e4 | [
"MIT"
] | 3 | 2021-03-26T00:25:36.000Z | 2022-03-29T22:03:55.000Z | src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py | david-driscoll/azure-cli | 0dbf5e4ac2f35057bc9b8234b0a59612593552c5 | [
"MIT"
] | 1 | 2020-07-13T22:28:09.000Z | 2020-07-13T22:28:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 51.598857 | 316 | 0.566283 |
08cb8cf06f6c9990f32354dde49cad203252d2cf | 9,926 | py | Python | src/sage/tests/arxiv_0812_2725.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 3 | 2019-07-15T13:48:24.000Z | 2019-11-08T12:31:43.000Z | src/sage/tests/arxiv_0812_2725.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 2 | 2018-10-30T13:40:20.000Z | 2020-07-23T12:13:30.000Z | src/sage/tests/arxiv_0812_2725.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 3 | 2020-03-29T17:13:36.000Z | 2021-05-03T18:11:28.000Z | r"""
Sage code for computing k-distant crossing numbers.
This code accompanies the article :arxiv:`0812.2725`. It is being
submitted because of a suggestion from
http://groups.google.com/group/sage-support/msg/3ea7ed2eeab0824a.
Right now, this code only computes k-dcrossings. If you are only
interested in the distrib... | 27.803922 | 95 | 0.597925 |
cb95708b21e8a539d8d229f7db0e554aa99bbe3d | 277 | py | Python | giico/quality_control_and_material_testing/doctype/water_absorption_test_for_concrete_cube/water_absorption_test_for_concrete_cube.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | giico/quality_control_and_material_testing/doctype/water_absorption_test_for_concrete_cube/water_absorption_test_for_concrete_cube.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | giico/quality_control_and_material_testing/doctype/water_absorption_test_for_concrete_cube/water_absorption_test_for_concrete_cube.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, VHRS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class Waterabsorptiontestforconcretecube(Document):
pass
| 25.181818 | 51 | 0.790614 |
23d09c166eab13c4ebf076f881703686dc6bfa5f | 525 | py | Python | algs/0028_Implement_strStr.py | torpedoallen/leetcodes | 1c5042aa82c4d959383562bd77fd8829c002375d | [
"MIT"
] | null | null | null | algs/0028_Implement_strStr.py | torpedoallen/leetcodes | 1c5042aa82c4d959383562bd77fd8829c002375d | [
"MIT"
] | null | null | null | algs/0028_Implement_strStr.py | torpedoallen/leetcodes | 1c5042aa82c4d959383562bd77fd8829c002375d | [
"MIT"
] | null | null | null | class Solution(object):
def strStr(self, haystack, needle):
"""
:type haystack: str
:type needle: str
:rtype: int
"""
m = len(haystack)
n = len(needle)
i, j = 0, 0
if n == 0:
return 0
while i < m:
if haystack[i]... | 21.875 | 40 | 0.337143 |
2b6b383d6ee0db4e68cb33b81d02c2fa3766087f | 568 | py | Python | app/regTest/regTestMaster.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/regTest/regTestMaster.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/regTest/regTestMaster.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | 2 | 2021-04-04T02:45:59.000Z | 2022-03-19T09:41:39.000Z | from hydroDL import pathSMAP, master
import os
optData = master.updateOpt(
master.default.optDataCsv,
path=pathSMAP['DB_L3_NA'],
subset='CONUSv4f1',
dateRange=[20150401, 20160401])
optModel = master.default.optLstm
optLoss = master.default.optLoss
optTrain = master.default.optTrainSMAP
out = os.path.jo... | 31.555556 | 73 | 0.753521 |
dbefcddbdd01a5456f57137ee460cc0520ac1ab7 | 719 | py | Python | readthedocs/core/management/commands/set_metadata.py | kennethlarsen/readthedocs.org | 735d630d83f79ae24772d10e66fd35b8f5675a30 | [
"MIT"
] | 2 | 2018-01-14T14:04:00.000Z | 2021-02-07T19:25:45.000Z | readthedocs/core/management/commands/set_metadata.py | Alig1493/readthedocs.org | c37b00995c1bbc5ee51d3552ef176546373bb912 | [
"MIT"
] | 4 | 2021-03-31T20:17:21.000Z | 2021-12-13T20:49:19.000Z | readthedocs/core/management/commands/set_metadata.py | Alig1493/readthedocs.org | c37b00995c1bbc5ee51d3552ef176546373bb912 | [
"MIT"
] | 6 | 2019-02-13T16:08:41.000Z | 2020-03-12T14:17:14.000Z | """Generate metadata for all projects"""
from __future__ import absolute_import
import logging
from django.core.management.base import BaseCommand
from readthedocs.projects import tasks
from readthedocs.projects.models import Project
from readthedocs.core.utils import broadcast
log = logging.getLogger(__name__)
c... | 26.62963 | 85 | 0.684284 |
bd247e2379b92bff04067e6132c256328e63c183 | 9,085 | py | Python | infoblox_netmri/client.py | rexyim/infoblox-netmri | 193eabce5db11113f5e991b6cdee1ddc005827ed | [
"Apache-2.0"
] | null | null | null | infoblox_netmri/client.py | rexyim/infoblox-netmri | 193eabce5db11113f5e991b6cdee1ddc005827ed | [
"Apache-2.0"
] | null | null | null | infoblox_netmri/client.py | rexyim/infoblox-netmri | 193eabce5db11113f5e991b6cdee1ddc005827ed | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Infoblox 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... | 34.942308 | 92 | 0.581948 |
7a4329648f63e6390349705354abc6f220b89103 | 5,260 | py | Python | quark/plugin_modules/ip_addresses.py | sumanthns/quark | 4f0d00608827271439ee0c2dfc22729dbbb17763 | [
"Apache-2.0"
] | null | null | null | quark/plugin_modules/ip_addresses.py | sumanthns/quark | 4f0d00608827271439ee0c2dfc22729dbbb17763 | [
"Apache-2.0"
] | null | null | null | quark/plugin_modules/ip_addresses.py | sumanthns/quark | 4f0d00608827271439ee0c2dfc22729dbbb17763 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Openstack Foundation
# 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 requ... | 35.782313 | 78 | 0.629278 |
546cdb12f3d0c9420cf10d3d2377f9daac941819 | 259 | py | Python | college/college/doctype/achievements/achievements.py | ashithamudraje/college | fcfb5fa47c8815d659821390ea9c85d598d34c19 | [
"MIT"
] | 1 | 2019-09-08T19:27:27.000Z | 2019-09-08T19:27:27.000Z | college/college/doctype/achievements/achievements.py | ashithamudraje/college | fcfb5fa47c8815d659821390ea9c85d598d34c19 | [
"MIT"
] | null | null | null | college/college/doctype/achievements/achievements.py | ashithamudraje/college | fcfb5fa47c8815d659821390ea9c85d598d34c19 | [
"MIT"
] | 4 | 2019-09-23T16:42:12.000Z | 2020-05-01T06:56:57.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, mvit ise and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class Achievements(Document):
pass
| 23.545455 | 49 | 0.772201 |
16e1c91e5ea464a94a33aed016e7e63e90194e53 | 1,632 | py | Python | fleet-server/init-fleet.py | cekay79/otel-with-java | 2de11eac1192d6f44badd93e227ecd7641331db8 | [
"Apache-2.0"
] | null | null | null | fleet-server/init-fleet.py | cekay79/otel-with-java | 2de11eac1192d6f44badd93e227ecd7641331db8 | [
"Apache-2.0"
] | null | null | null | fleet-server/init-fleet.py | cekay79/otel-with-java | 2de11eac1192d6f44badd93e227ecd7641331db8 | [
"Apache-2.0"
] | null | null | null | import os
import requests
from requests.auth import HTTPBasicAuth
es_url = os.getenv("ELASTICSEARCH_HOST")
kb_url = os.getenv("KIBANA_HOST")
es_user = os.getenv("ELASTICSEARCH_USERNAME")
es_pass = os.getenv("ELASTICSEARCH_PASSWORD")
basic_auth = HTTPBasicAuth(es_user, es_pass)
default_headers = {
"Content-Type": ... | 29.672727 | 94 | 0.710784 |
b2842cd5d8466b5c8ac9d5a60b454d7f89044c12 | 3,659 | py | Python | smoothauth/smoothauth/settings/base.py | kellerjustin/smoothauth | 0ba343e999851e43416f203c0489e7b72e3dc30a | [
"MIT"
] | null | null | null | smoothauth/smoothauth/settings/base.py | kellerjustin/smoothauth | 0ba343e999851e43416f203c0489e7b72e3dc30a | [
"MIT"
] | null | null | null | smoothauth/smoothauth/settings/base.py | kellerjustin/smoothauth | 0ba343e999851e43416f203c0489e7b72e3dc30a | [
"MIT"
] | null | null | null | """
Django settings for smoothauth project.
Generated by 'django-admin startproject' using Django 2.0.5.
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... | 25.061644 | 79 | 0.68762 |
3fa7a31c4d6a485804c49317e7c90ba2097a41f4 | 3,738 | py | Python | rl_visualization/app.py | LucasAlegre/rl-visualization | b20506c3417190576156e77a9dac5d872b99ffa3 | [
"MIT"
] | null | null | null | rl_visualization/app.py | LucasAlegre/rl-visualization | b20506c3417190576156e77a9dac5d872b99ffa3 | [
"MIT"
] | null | null | null | rl_visualization/app.py | LucasAlegre/rl-visualization | b20506c3417190576156e77a9dac5d872b99ffa3 | [
"MIT"
] | null | null | null | from flask import Flask, send_file, make_response, render_template, request
import os
from datetime import datetime
from threading import Lock
mutex = Lock()
class Plot:
def __init__(self, title, url):
self.title = title
self.url = url
def start_app(env):
app = Flask(__name__)
BASE_URL ... | 31.948718 | 140 | 0.635902 |
0d89c3b50ec89219d4182093f496e5b181bb25e5 | 3,502 | py | Python | bot/modules/message_filter.py | monkeydg/POG-bot | 97ced2c4b8f8709887b3d0828484e1dd1128dc1f | [
"MIT"
] | 2 | 2020-09-24T14:56:50.000Z | 2021-04-15T16:12:36.000Z | bot/modules/message_filter.py | monkeydg/POG-bot | 97ced2c4b8f8709887b3d0828484e1dd1128dc1f | [
"MIT"
] | 12 | 2021-04-28T15:33:34.000Z | 2022-03-29T10:10:05.000Z | bot/modules/message_filter.py | monkeydg/POG-bot | 97ced2c4b8f8709887b3d0828484e1dd1128dc1f | [
"MIT"
] | 6 | 2020-08-01T13:38:40.000Z | 2020-08-14T20:35:17.000Z | """Tiny module used as a slight spam protector
"""
from display import AllStrings as disp, ContextWrapper
from discord import DMChannel, NotFound
import modules.config as cfg
from modules.loader import is_all_locked
from modules.roles import is_admin
from asyncio import sleep
import modules.spam_checker as spam_checke... | 29.677966 | 95 | 0.573101 |
b6e978b75b76a8aaefe3d4a7b3caaf2ccdb70186 | 389 | py | Python | apps/reporting/migrations/0007_alter_pentestreport_options.py | blockomat2100/vulnman | 835ff3aae1168d8e2fa5556279bc86efd2e46472 | [
"MIT"
] | 3 | 2021-12-22T07:02:24.000Z | 2022-01-27T20:19:11.000Z | apps/reporting/migrations/0007_alter_pentestreport_options.py | vulnman/vulnman | d48ee022bc0e4368060a990a527b1c7a5e437504 | [
"MIT"
] | 44 | 2021-12-14T07:24:29.000Z | 2022-03-23T07:01:16.000Z | apps/reporting/migrations/0007_alter_pentestreport_options.py | blockomat2100/vulnman | 835ff3aae1168d8e2fa5556279bc86efd2e46472 | [
"MIT"
] | 1 | 2022-01-21T16:29:56.000Z | 2022-01-21T16:29:56.000Z | # Generated by Django 4.0.3 on 2022-04-11 04:30
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('reporting', '0006_alter_reportsection_unique_together_and_more'),
]
operations = [
migrations.AlterModelOptions(
name='pentestreport',
... | 21.611111 | 75 | 0.632391 |
cb98f04c0131b0dfd861a3e1cce5b5e31bf5b8da | 243 | py | Python | example.py | JLyons1985/SmartMirrorServer | 417540280dee57b7e39004e6891f13835aa15ced | [
"MIT"
] | null | null | null | example.py | JLyons1985/SmartMirrorServer | 417540280dee57b7e39004e6891f13835aa15ced | [
"MIT"
] | null | null | null | example.py | JLyons1985/SmartMirrorServer | 417540280dee57b7e39004e6891f13835aa15ced | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
# Just importing Forsimatic class
from forismatic import Forismatic
# Initializing manager
f = Forismatic()
# Getting Quote object & printing quote and author
q = f.get_quote()
print(u'%s\t%s' % (q.quote, q.author)) | 22.090909 | 50 | 0.703704 |
75dd9ca179c269e38b861c3eece4cc7f9a2e059f | 2,208 | py | Python | mkdocs_combine/page.py | kellpossible/mkdocs-combine | b9db94978ac960aa160abdc268906a65f8625f5e | [
"Apache-2.0"
] | null | null | null | mkdocs_combine/page.py | kellpossible/mkdocs-combine | b9db94978ac960aa160abdc268906a65f8625f5e | [
"Apache-2.0"
] | 3 | 2018-04-19T23:41:12.000Z | 2018-04-25T05:32:57.000Z | mkdocs_combine/page.py | kellpossible/mkdocs-combine | b9db94978ac960aa160abdc268906a65f8625f5e | [
"Apache-2.0"
] | null | null | null | from mkdocs_combine.slugify import slugify
class Page(object):
def __init__(self, title, parent=None, file_path=None, is_section=False):
self.title = title
self.parent = parent
self.file_path = file_path
self.is_section = is_section
self.heading_index = {}
self.headi... | 27.259259 | 94 | 0.595562 |
e5008cefdfa2ac8cd4c08e26f69df0de4f813ec5 | 5,577 | py | Python | scripts/pipeline/predict.py | seanliu96/WRMCQA | 8bb6cc79262cd82a490c8d3bad6bb7252e9d4f09 | [
"BSD-3-Clause"
] | null | null | null | scripts/pipeline/predict.py | seanliu96/WRMCQA | 8bb6cc79262cd82a490c8d3bad6bb7252e9d4f09 | [
"BSD-3-Clause"
] | null | null | null | scripts/pipeline/predict.py | seanliu96/WRMCQA | 8bb6cc79262cd82a490c8d3bad6bb7252e9d4f09 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2018-present, HKUST-KnowComp.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""Run predictions using the full WRMCQA retriever-reader pipeline."""
import torch
import os
import time
try... | 39.274648 | 80 | 0.622736 |
02666c424e9566ff49d457724093a3bf5eb4b6a6 | 3,125 | py | Python | deps/lib/python3.5/site-packages/Crypto/PublicKey/__init__.py | jfarmer08/hassio | 792a6071a97bb33857c14c9937946233c620035c | [
"MIT"
] | 2 | 2020-05-16T08:38:34.000Z | 2020-10-01T01:32:57.000Z | venv/Lib/site-packages/Crypto/PublicKey/__init__.py | Team20s/blockchain_python | 438eb4540198693f4f592541d671a2056adb8a42 | [
"Apache-2.0"
] | 51 | 2019-10-08T01:53:02.000Z | 2021-06-04T22:02:21.000Z | venv/Lib/site-packages/Crypto/PublicKey/__init__.py | Team20s/blockchain_python | 438eb4540198693f4f592541d671a2056adb8a42 | [
"Apache-2.0"
] | 2 | 2019-10-10T17:06:33.000Z | 2020-06-16T05:34:13.000Z | # -*- coding: utf-8 -*-
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, royalty-free,
# non-exclusive license to e... | 32.552083 | 74 | 0.61696 |
ce3d4289981f151f29cf3046f5a84389c87159cf | 3,121 | py | Python | implementations/tests/tests_df/test_reviews_accepted_github.py | alexmwebber01/wg-evolution | 1815e2c1f5fead082c676111952cb7b1d646e403 | [
"MIT"
] | null | null | null | implementations/tests/tests_df/test_reviews_accepted_github.py | alexmwebber01/wg-evolution | 1815e2c1f5fead082c676111952cb7b1d646e403 | [
"MIT"
] | null | null | null | implementations/tests/tests_df/test_reviews_accepted_github.py | alexmwebber01/wg-evolution | 1815e2c1f5fead082c676111952cb7b1d646e403 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 CHAOSS
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program... | 28.898148 | 81 | 0.666773 |
8867edde9e0284d99c1c203428f77759455c7f6f | 6,066 | py | Python | dvc/system.py | chlin501/dvc | 8798d8531ef1e57744954ac789e60ee9be313aba | [
"Apache-2.0"
] | null | null | null | dvc/system.py | chlin501/dvc | 8798d8531ef1e57744954ac789e60ee9be313aba | [
"Apache-2.0"
] | null | null | null | dvc/system.py | chlin501/dvc | 8798d8531ef1e57744954ac789e60ee9be313aba | [
"Apache-2.0"
] | null | null | null | import errno
import logging
import os
import platform
import shutil
import sys
from dvc.compat import fspath
from dvc.exceptions import DvcException
logger = logging.getLogger(__name__)
if platform.system() == "Windows" and sys.version_info < (3, 8):
try:
import speedcopy
speedcopy.patch_copyfil... | 28.478873 | 79 | 0.559677 |
2d7022267b7063be3474c3cf926a3ba78afe4094 | 11,914 | py | Python | flowd/flow_app.py | rexengineering/metaflow | fcba7cd6aaccd3806ce7d6a4a8aaeef350bbeaf8 | [
"Apache-2.0"
] | null | null | null | flowd/flow_app.py | rexengineering/metaflow | fcba7cd6aaccd3806ce7d6a4a8aaeef350bbeaf8 | [
"Apache-2.0"
] | null | null | null | flowd/flow_app.py | rexengineering/metaflow | fcba7cd6aaccd3806ce7d6a4a8aaeef350bbeaf8 | [
"Apache-2.0"
] | null | null | null | import asyncio
from collections import defaultdict
import base64
import logging
import json
from async_timeout import timeout
from quart import request, jsonify
from flowlib.etcd_utils import get_etcd, transition_state
from flowlib.quart_app import QuartApp
from flowlib.workflow import Workflow, get_workflows
from f... | 44.289963 | 114 | 0.622461 |
d309124d54f64ca84afb15ca65b8dc2409c3cae1 | 90,045 | py | Python | trimesh/base.py | gustavla/trimesh | d7ea008595f78b411bef3b770cedc94914ff954f | [
"MIT"
] | null | null | null | trimesh/base.py | gustavla/trimesh | d7ea008595f78b411bef3b770cedc94914ff954f | [
"MIT"
] | null | null | null | trimesh/base.py | gustavla/trimesh | d7ea008595f78b411bef3b770cedc94914ff954f | [
"MIT"
] | null | null | null | # flake8: noqa
"""
github.com/mikedh/trimesh
----------------------------
Library for importing, exporting and doing simple operations on triangular meshes.
"""
import numpy as np
import copy
from . import ray
from . import util
from . import units
from . import poses
from . import graph
from . import sample
from .... | 31.829268 | 86 | 0.568382 |
50044b50485811b6c39fb2f2ca8a7410bffafd5a | 164 | py | Python | demo2/handlers/nav/NavHandler.py | philipgold/replace-nested-conditional-with-polymorphism-demo | c0a530e7c69a8946338a46fde8c67ea8fe85a77e | [
"MIT"
] | null | null | null | demo2/handlers/nav/NavHandler.py | philipgold/replace-nested-conditional-with-polymorphism-demo | c0a530e7c69a8946338a46fde8c67ea8fe85a77e | [
"MIT"
] | null | null | null | demo2/handlers/nav/NavHandler.py | philipgold/replace-nested-conditional-with-polymorphism-demo | c0a530e7c69a8946338a46fde8c67ea8fe85a77e | [
"MIT"
] | null | null | null | from demo2.handlers.EventHandler import EventHandler
class NavHandler(EventHandler):
def __init__(self, handler_type='nav'):
self.type = handler_type
| 23.428571 | 52 | 0.756098 |
80fc8323a06b4c7405fe6eb79660d815d13aae93 | 3,872 | py | Python | tortoise/tests/fields/test_m2m.py | Quinn-Fang/tortoise-orm | 2874c1adec8306925ee2c966241fa34710a84ef3 | [
"Apache-2.0"
] | null | null | null | tortoise/tests/fields/test_m2m.py | Quinn-Fang/tortoise-orm | 2874c1adec8306925ee2c966241fa34710a84ef3 | [
"Apache-2.0"
] | 5 | 2020-03-24T17:23:14.000Z | 2021-12-13T20:12:49.000Z | tortoise/tests/fields/test_m2m.py | Quinn-Fang/tortoise-orm | 2874c1adec8306925ee2c966241fa34710a84ef3 | [
"Apache-2.0"
] | null | null | null | from tortoise.contrib import test
from tortoise.exceptions import OperationalError
from tortoise.tests import testmodels
class TestManyToManyField(test.TestCase):
async def test_empty(self):
await testmodels.M2MOne.create()
async def test__add(self):
one = await testmodels.M2MOne.create(name=... | 39.510204 | 92 | 0.641529 |
9264958936764a57e060a5f74f1f3b42d87c9011 | 9,955 | py | Python | engine/app.py | FeatureCloud/fc-survival-svm | 0a05d148509418091bddb33ad412a43a9e204a69 | [
"Apache-2.0"
] | null | null | null | engine/app.py | FeatureCloud/fc-survival-svm | 0a05d148509418091bddb33ad412a43a9e204a69 | [
"Apache-2.0"
] | null | null | null | engine/app.py | FeatureCloud/fc-survival-svm | 0a05d148509418091bddb33ad412a43a9e204a69 | [
"Apache-2.0"
] | null | null | null | import datetime
import logging
import threading
import time
import traceback
from time import sleep
import textwrap
from typing import Dict, List, Tuple
PARTICIPANT = (True, False)
COORDINATOR = (False, True)
BOTH = (True, True)
STATE_RUNNING = 'running'
STATE_ERROR = 'error'
STATE_ACTION = 'action_required'
def... | 36.734317 | 133 | 0.630236 |
4b2bc3ab15b47083c90deac84f7031d3ba7a0aea | 14,652 | py | Python | helper-scripts/hdf5_to_counts_table.py | GordonLab/riesling-pipeline | 384f41dc964db0f59b3992f775e87c651e846f2b | [
"MIT"
] | 9 | 2017-10-25T18:27:23.000Z | 2020-10-15T08:06:42.000Z | helper-scripts/hdf5_to_counts_table.py | GordonLab/riesling-pipeline | 384f41dc964db0f59b3992f775e87c651e846f2b | [
"MIT"
] | null | null | null | helper-scripts/hdf5_to_counts_table.py | GordonLab/riesling-pipeline | 384f41dc964db0f59b3992f775e87c651e846f2b | [
"MIT"
] | 4 | 2016-11-05T23:21:48.000Z | 2020-02-25T12:35:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This script exists to convert .hdf5 files into counts tables readable by R.
#
# It is useful for performing differential accessibility analyses (e.g. with
# DESeq2) on hdf5 counts data from RIESLING, ROSE, or bamliquidator.
#
#
# Unfortunately, we can't use the rhdf5 pa... | 44.944785 | 152 | 0.615616 |
b07a4c63f95ed515799ea6d5ab0e381da738a3cf | 1,964 | py | Python | cogs/utils/DataBase/rep.py | rax-v/Central-Spreader-Bot | 560e3207d42cbeef7e4904ef9679d1faf005d595 | [
"Apache-2.0"
] | null | null | null | cogs/utils/DataBase/rep.py | rax-v/Central-Spreader-Bot | 560e3207d42cbeef7e4904ef9679d1faf005d595 | [
"Apache-2.0"
] | null | null | null | cogs/utils/DataBase/rep.py | rax-v/Central-Spreader-Bot | 560e3207d42cbeef7e4904ef9679d1faf005d595 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
from json import dumps
class Rep(object):
def __init__(self, bot, rep_id: int, user_id: int, author_id: int,
repped_at: datetime = datetime.utcnow(), extra_info: dict = None):
self.bot = bot
self.rep_id = rep_id # In most cases this is the... | 43.644444 | 93 | 0.570774 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.