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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1f25e80dc574675d8f296c6bff9c18dc3464fabf | 1,001 | py | Python | Week 02/P2 - Futval - Nalundasan.py | andrewn488/OMSBA-5061 | 8e57fff45d8965b0423a6fe338bd74cedfe94ea0 | [
"MIT"
] | null | null | null | Week 02/P2 - Futval - Nalundasan.py | andrewn488/OMSBA-5061 | 8e57fff45d8965b0423a6fe338bd74cedfe94ea0 | [
"MIT"
] | null | null | null | Week 02/P2 - Futval - Nalundasan.py | andrewn488/OMSBA-5061 | 8e57fff45d8965b0423a6fe338bd74cedfe94ea0 | [
"MIT"
] | 1 | 2022-02-07T02:42:43.000Z | 2022-02-07T02:42:43.000Z | """
P2 - Futval
Andrew Nalundasan
9/23/2020
Write a Python program that reads in investment amount, annual interest rate,
and number of years, and displays the future investment value using the
following formula (called monthly compounding):
For example, if you enter amount 1000, annual interest rate 3.25%, and ... | 38.5 | 97 | 0.743257 |
86617a51add711015d9db74769bf36de42f99ffe | 2,159 | py | Python | app/forms.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/forms.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | app/forms.py | galyeshua/Index | 96e1630efc51d2c03f2d80889dfa1d117155e2ee | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import FormField, Form, StringField, PasswordField, SubmitField
from app.fields import UnorderedFieldList
from wtforms.validators import DataRequired, ValidationError, URL, length, EqualTo
from flask_wtf.file import FileField, FileRequired
from app.models import User
class... | 35.393443 | 98 | 0.728115 |
65b1a7a42f4a1a92f3dc6a70966c31ab62f9c60d | 1,122 | py | Python | google/ads/googleads/v4/errors/types/asset_link_error.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v4/errors/types/asset_link_error.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v4/errors/types/asset_link_error.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 28.769231 | 74 | 0.719251 |
463f78e79e53dca7ff66ba885196f03849f9f8d4 | 4,110 | py | Python | nidaqmx/system/_collections/device_collection.py | nfrik/nidaqmx-python | 5d4b76d5a39247a92c6255e01b0843c89076b330 | [
"MIT"
] | null | null | null | nidaqmx/system/_collections/device_collection.py | nfrik/nidaqmx-python | 5d4b76d5a39247a92c6255e01b0843c89076b330 | [
"MIT"
] | null | null | null | nidaqmx/system/_collections/device_collection.py | nfrik/nidaqmx-python | 5d4b76d5a39247a92c6255e01b0843c89076b330 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import ctypes
import six
from collections import Sequence
from nidaqmx._lib import lib_importer, ctypes_byte_str
from nidaqmx.errors import (
check_for_error, is_st... | 33.688525 | 75 | 0.614599 |
ee2edffcc21e9c68396d0d4e34db29cf9e4db1c2 | 675 | py | Python | CODES/S27 - Pytest -_ Advanced Testing Framework/7-conftest.py | PacktPublishing/-Selenium-WebDriver-With-Python-3.x---Novice-To-Ninja-v- | 7be863a0a9c8da7e31a413742da92c2fcfd0b38a | [
"MIT"
] | 11 | 2019-05-17T00:54:17.000Z | 2021-11-12T22:12:18.000Z | CODES/S27 - Pytest -_ Advanced Testing Framework/7-conftest.py | PacktPublishing/-Selenium-WebDriver-With-Python-3.x---Novice-To-Ninja-v- | 7be863a0a9c8da7e31a413742da92c2fcfd0b38a | [
"MIT"
] | null | null | null | CODES/S27 - Pytest -_ Advanced Testing Framework/7-conftest.py | PacktPublishing/-Selenium-WebDriver-With-Python-3.x---Novice-To-Ninja-v- | 7be863a0a9c8da7e31a413742da92c2fcfd0b38a | [
"MIT"
] | 12 | 2019-06-17T00:56:01.000Z | 2021-09-29T11:38:53.000Z | import pytest
@pytest.yield_fixture()
def setUp():
print("Running method level setUp")
yield
print("Running method level tearDown")
@pytest.yield_fixture(scope="module")
def oneTimeSetUp(browser, osType):
if browser == 'firefox':
print("Running tests on FF")
else:
print("Running t... | 25 | 65 | 0.699259 |
0955d3c2e1e8e72d9f66344bc11bc10a92cc561e | 86 | py | Python | django-website/hiring/apps.py | evonove/evonove | 5f5a27245a46a98502f182e3c75aa8e77aa62d42 | [
"BSD-3-Clause"
] | 9 | 2016-01-07T14:57:55.000Z | 2019-06-25T11:30:57.000Z | django-website/hiring/apps.py | evonove/evonove | 5f5a27245a46a98502f182e3c75aa8e77aa62d42 | [
"BSD-3-Clause"
] | 64 | 2015-10-20T21:23:56.000Z | 2022-01-12T10:03:28.000Z | django-website/hiring/apps.py | evonove/evonove | 5f5a27245a46a98502f182e3c75aa8e77aa62d42 | [
"BSD-3-Clause"
] | 3 | 2016-08-06T14:29:00.000Z | 2021-01-27T10:16:53.000Z | from django.apps import AppConfig
class PagesConfig(AppConfig):
name = "hiring"
| 14.333333 | 33 | 0.744186 |
6096dc4e9b4acbdb1faaacecdcf36aaf566fe63a | 451 | py | Python | meregistro/apps/titulos/models/EstadoCarrera.py | MERegistro/meregistro | 6cde3cab2bd1a8e3084fa38147de377d229391e3 | [
"BSD-3-Clause"
] | null | null | null | meregistro/apps/titulos/models/EstadoCarrera.py | MERegistro/meregistro | 6cde3cab2bd1a8e3084fa38147de377d229391e3 | [
"BSD-3-Clause"
] | null | null | null | meregistro/apps/titulos/models/EstadoCarrera.py | MERegistro/meregistro | 6cde3cab2bd1a8e3084fa38147de377d229391e3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.db import models
"""
Representa las opciones de estados que tiene cada carrera
"""
class EstadoCarrera(models.Model):
NO_VIGENTE = u'No vigente'
VIGENTE = u'Vigente'
nombre = models.CharField(max_length = 50, unique = True)
class Meta:
app_label = 'titulos... | 21.47619 | 61 | 0.649667 |
8d56bac2b999dc2e4467e812c3e39aa404062aeb | 1,639 | py | Python | fastapi_admin/file_upload.py | myWorkshop123/fastapi-admin | e2f23ae63f45d2b9c74c85a34f5d71d1039a2913 | [
"Apache-2.0"
] | 636 | 2020-06-03T09:59:03.000Z | 2022-03-31T23:02:26.000Z | fastapi_admin/file_upload.py | changzhi777/fastapi-admin | 6f50cede91a3a06faa6601addaaeb3eaa0c753a1 | [
"Apache-2.0"
] | 60 | 2021-05-01T12:52:44.000Z | 2022-02-22T06:58:30.000Z | fastapi_admin/file_upload.py | changzhi777/fastapi-admin | 6f50cede91a3a06faa6601addaaeb3eaa0c753a1 | [
"Apache-2.0"
] | 114 | 2021-04-25T16:21:10.000Z | 2022-03-25T17:30:23.000Z | import os
from typing import Callable, List, Optional
import aiofiles
from starlette.datastructures import UploadFile
from fastapi_admin.exceptions import FileExtNotAllowed, FileMaxSizeLimit
class FileUpload:
def __init__(
self,
uploads_dir: str,
allow_extensions: Optional[List[str]] = N... | 34.87234 | 93 | 0.635143 |
ef0182001fbd9b9c127942c0b98c84445f57cb1f | 1,203 | py | Python | src/python/pants/backend/python/targets/python_requirement_library.py | areitz/pants | 9bfb3feb0272c05f36e190c9147091b97ee1950d | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/targets/python_requirement_library.py | areitz/pants | 9bfb3feb0272c05f36e190c9147091b97ee1950d | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/targets/python_requirement_library.py | areitz/pants | 9bfb3feb0272c05f36e190c9147091b97ee1950d | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.p... | 40.1 | 93 | 0.763924 |
39f6af34e28e9d1ecd8b54dbdcddff50cf729216 | 2,727 | py | Python | action/generate_blender_file.py | akyruu/blender-cartography-addon | 4f34b029d9b6a72619227ab3ceaed9393506934e | [
"Apache-2.0"
] | null | null | null | action/generate_blender_file.py | akyruu/blender-cartography-addon | 4f34b029d9b6a72619227ab3ceaed9393506934e | [
"Apache-2.0"
] | null | null | null | action/generate_blender_file.py | akyruu/blender-cartography-addon | 4f34b029d9b6a72619227ab3ceaed9393506934e | [
"Apache-2.0"
] | null | null | null | import logging
import os
import utils
from drawing import CartographyDrawer, CartographyInterestPointDrawer, CartographyStructuralPointDrawer, \
CartographyPlaneDrawer, CartographyMeshDrawer
from parsing import CartographyParser
from reading import CartographyCsvReader, CartographyTsvReader
from templating import ... | 34.961538 | 106 | 0.682435 |
24479a5e817ff1f60e61a19e195569df13fe7656 | 3,886 | py | Python | SimpleEnc/components/Encryptor.py | momoji123/Tools | 9b1a026e3346f4c26291018587409e86973925c6 | [
"MIT"
] | null | null | null | SimpleEnc/components/Encryptor.py | momoji123/Tools | 9b1a026e3346f4c26291018587409e86973925c6 | [
"MIT"
] | null | null | null | SimpleEnc/components/Encryptor.py | momoji123/Tools | 9b1a026e3346f4c26291018587409e86973925c6 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import Frame, Button, Label, Entry, StringVar
from cryptography.fernet import Fernet
from components import KeyGenerator
import traceback
class Encryptor:
master = None
mainContainer = None
console = None
fileManager = None
passInput = None
confPassInput = Non... | 38.475248 | 126 | 0.642048 |
219079c5c8a45d4e693ac6785e606cc8b719531c | 2,600 | py | Python | dog_cat.py | parth-shastri/neural_nets_tensorflow | aea973fba6042c4317511e230532457a6a84fd73 | [
"Intel"
] | null | null | null | dog_cat.py | parth-shastri/neural_nets_tensorflow | aea973fba6042c4317511e230532457a6a84fd73 | [
"Intel"
] | null | null | null | dog_cat.py | parth-shastri/neural_nets_tensorflow | aea973fba6042c4317511e230532457a6a84fd73 | [
"Intel"
] | null | null | null | import tensorflow as tf
import keras
import numpy as np
import os
import matplotlib.pyplot as plt
URL = r'https://storage.googleapis.com/mledu-datasets/cats_and_dogs_filtered.zip'
path_to_zip = tf.keras.utils.get_file('cats_and_dogs.zip', origin=URL, extract=True)
PATH = os.path.join(os.path.dirname(path_to_zi... | 44.827586 | 186 | 0.736154 |
83a9f7b7e1aa409fa4750ee70b6c4d9b2088edf0 | 5,170 | py | Python | shuffle_keep.py | hzyhhzy/NNforGo | 4212a3dd076f561476e636f97db3577d0cd0d123 | [
"MIT"
] | 2 | 2021-07-16T13:15:06.000Z | 2021-12-01T07:12:15.000Z | shuffle_keep.py | hzyhhzy/NNforGo | 4212a3dd076f561476e636f97db3577d0cd0d123 | [
"MIT"
] | null | null | null | shuffle_keep.py | hzyhhzy/NNforGo | 4212a3dd076f561476e636f97db3577d0cd0d123 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import os
import argparse
import traceback
import math
import time
import logging
import zipfile
import shutil
import json
import multiprocessing
import numpy as np
num_removed_rows=0
keys = [
"bf",
"gf",
"vt",
"pt"
]
def joint_shuffle(arrs):
rand_state = np.random.get_sta... | 24.855769 | 140 | 0.673888 |
bc889516d14cd97927bb046d45db22b7c1dbb17d | 13,750 | py | Python | corehq/apps/sso/tests/test_async_handlers.py | solleks/commcare-hq | c6a5e750a843b3fc1b17ad1c688dc66c104fd703 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/sso/tests/test_async_handlers.py | solleks/commcare-hq | c6a5e750a843b3fc1b17ad1c688dc66c104fd703 | [
"BSD-3-Clause"
] | 34 | 2020-12-11T18:51:17.000Z | 2022-02-21T10:13:26.000Z | corehq/apps/sso/tests/test_async_handlers.py | adil-uddin/commcare-hq | 2526f2025743c8327ebfad21249f901cec77f8b4 | [
"BSD-3-Clause"
] | null | null | null | from django.test import TestCase, RequestFactory
from corehq.apps.domain.models import Domain
from corehq.apps.hqwebapp.async_handler import AsyncHandlerError
from corehq.apps.sso.async_handlers import (
IdentityProviderAdminAsyncHandler,
SSOExemptUsersAdminAsyncHandler,
)
from corehq.apps.sso.models import (
... | 36.569149 | 87 | 0.648145 |
88a00ad7261c373b6af4ccd7b7a574fca8a756d9 | 6,573 | py | Python | cmdb_sdk/api/instance/update_instance_v2_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | cmdb_sdk/api/instance/update_instance_v2_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | cmdb_sdk/api/instance/update_instance_v2_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: update_instance_v2.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.p... | 42.134615 | 575 | 0.768751 |
163548b1928a737e7bb8196fe9097b3432f3dbd8 | 3,308 | py | Python | neuralee/dataset/loom.py | michalk8/NeuralEE | 8946abf919770e2f75ee68c27fc66f96c290f871 | [
"MIT"
] | 6 | 2019-05-29T11:12:53.000Z | 2021-03-31T06:24:54.000Z | neuralee/dataset/loom.py | michalk8/NeuralEE | 8946abf919770e2f75ee68c27fc66f96c290f871 | [
"MIT"
] | null | null | null | neuralee/dataset/loom.py | michalk8/NeuralEE | 8946abf919770e2f75ee68c27fc66f96c290f871 | [
"MIT"
] | null | null | null | import loompy
import numpy as np
import os
from .dataset import GeneExpressionDataset
class LoomDataset(GeneExpressionDataset):
r""" Loads a `.loom` file.
:param filename: Name of the `.loom` file.
:param save_path: Save path of the dataset.
:param url: Url of the remote dataset.
Examples::
... | 34.458333 | 78 | 0.609432 |
18239d1dcef761b25f67fe4022e3a76117688405 | 42,996 | py | Python | src/zope/publisher/tests/test_http.py | Shoobx/zope.publisher | 790e82045d7ae06146bd8c5e27139555b9ec1641 | [
"ZPL-2.1"
] | 3 | 2016-11-18T08:58:09.000Z | 2021-02-01T06:13:45.000Z | src/zope/publisher/tests/test_http.py | Shoobx/zope.publisher | 790e82045d7ae06146bd8c5e27139555b9ec1641 | [
"ZPL-2.1"
] | 42 | 2015-06-02T19:26:10.000Z | 2022-03-15T07:24:03.000Z | src/zope/publisher/tests/test_http.py | Shoobx/zope.publisher | 790e82045d7ae06146bd8c5e27139555b9ec1641 | [
"ZPL-2.1"
] | 7 | 2015-04-03T09:29:31.000Z | 2021-06-07T14:47:45.000Z | # -*- coding: latin-1 -*-
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompa... | 39.737523 | 79 | 0.6215 |
c69031989d9d5dcfbaa3bd651b1add4bc2e4fa13 | 3,106 | py | Python | src/poetry/core/packages/vcs_dependency.py | python-poetry/core | 4f9c35272cf53f56596c8a71175da6e50bb71b13 | [
"MIT"
] | 16 | 2020-03-13T15:54:20.000Z | 2020-06-04T08:10:03.000Z | src/poetry/core/packages/vcs_dependency.py | python-poetry/core | 4f9c35272cf53f56596c8a71175da6e50bb71b13 | [
"MIT"
] | 19 | 2020-03-16T17:18:38.000Z | 2020-06-17T22:14:56.000Z | src/poetry/core/packages/vcs_dependency.py | python-poetry/core | 4f9c35272cf53f56596c8a71175da6e50bb71b13 | [
"MIT"
] | 15 | 2020-03-22T23:00:38.000Z | 2020-06-11T17:01:33.000Z | from __future__ import annotations
from typing import Iterable
from poetry.core.packages.dependency import Dependency
class VCSDependency(Dependency):
"""
Represents a VCS dependency
"""
def __init__(
self,
name: str,
vcs: str,
source: str,
branch: str | None... | 24.077519 | 72 | 0.550225 |
8f2d2d41d439d9076f58d995256a6ecbbff5cc85 | 5,573 | py | Python | rlpyt/ul/runners/behavior_cloning.py | Slienteagle-wyb/rlpyt | fee14b1c28481f6751a7a1a6ce9b8cbac1e001f0 | [
"MIT"
] | null | null | null | rlpyt/ul/runners/behavior_cloning.py | Slienteagle-wyb/rlpyt | fee14b1c28481f6751a7a1a6ce9b8cbac1e001f0 | [
"MIT"
] | null | null | null | rlpyt/ul/runners/behavior_cloning.py | Slienteagle-wyb/rlpyt | fee14b1c28481f6751a7a1a6ce9b8cbac1e001f0 | [
"MIT"
] | null | null | null | import psutil
import time
import torch
import numpy as np
from rlpyt.runners.base import BaseRunner
from rlpyt.utils.logging import logger
from rlpyt.utils.quick_args import save__init__args
from rlpyt.utils.seed import set_seed, make_seed
from rlpyt.utils.prog_bar import ProgBarCounter
import wandb
class BehaviorClo... | 40.678832 | 138 | 0.616006 |
23ff349e6b64b356b5222ad0c67ec1def1c2c738 | 3,225 | py | Python | src/sentry/utils/performance/sqlquerycount.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 4 | 2019-05-27T13:55:07.000Z | 2021-03-30T07:05:09.000Z | src/sentry/utils/performance/sqlquerycount.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/utils/performance/sqlquerycount.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | from __future__ import absolute_import
import logging
import six
import threading
from collections import defaultdict
from sentry.debug.utils.patch_context import PatchContext
DEFAULT_MAX_QUERIES = 25
DEFAULT_MAX_DUPES = 3
class State(threading.local):
def __init__(self):
self.count = 0
self.q... | 24.431818 | 99 | 0.60031 |
7ed4de43f5303dd90d06bf3b688adddf9a2d0c1f | 658 | py | Python | aircotproxy/__init__.py | joshuafuller/aircotproxy | 91a2423bddf8e914da5533e285626ddaab0fa92b | [
"Apache-2.0"
] | 1 | 2021-08-15T19:24:18.000Z | 2021-08-15T19:24:18.000Z | aircotproxy/__init__.py | joshuafuller/aircotproxy | 91a2423bddf8e914da5533e285626ddaab0fa92b | [
"Apache-2.0"
] | null | null | null | aircotproxy/__init__.py | joshuafuller/aircotproxy | 91a2423bddf8e914da5533e285626ddaab0fa92b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# AirCoTProxy - CoT to CoT Proxy Gateway with known craft lookups.
"""
AirCoTProxy - CoT to CoT Proxy Gateway with known craft lookups.
~~~~
:author: Greg Albrecht W2GMD <oss@undef.net>
:copyright: Copyright 2021 Orion Labs, Inc.
:license: Apache License, Version 2.0
:s... | 24.37037 | 66 | 0.729483 |
f4531f686271e4e281c55fa653fa1cf296743bfd | 314 | py | Python | Challenges/Desafio032.py | JeffersonYepes/Python | 406423ba0b570680dab9e1b0d0380b41fbe7fe32 | [
"MIT"
] | null | null | null | Challenges/Desafio032.py | JeffersonYepes/Python | 406423ba0b570680dab9e1b0d0380b41fbe7fe32 | [
"MIT"
] | null | null | null | Challenges/Desafio032.py | JeffersonYepes/Python | 406423ba0b570680dab9e1b0d0380b41fbe7fe32 | [
"MIT"
] | null | null | null | from datetime import date
ano = int(input('Digite o ano em que você deseja consultar (Digite 0 para o ano atual): '))
if ano == 0:
ano = date.today().year
if ano % 4 == 0 and ano % 100 != 0 or ano % 400 == 0:
print('O ano {} é BISSEXTO'.format(ano))
else:
print('O ano {} NÃO é bissexto!'.format(ano))
| 34.888889 | 91 | 0.624204 |
54badbc4ed2625f28f2205a370cf9203de594b88 | 135,997 | py | Python | pysnmp/MP-ATM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/MP-ATM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/MP-ATM-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module MP-ATM-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MP-ATM-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:03:40 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:... | 142.107628 | 13,438 | 0.768554 |
21ebac71cb67dd59ba0c23fd080a548435ac148a | 4,213 | py | Python | messages/_utils.py | sclickk/messages | d12e4ea3e546bc54f57d6d15339707d10b1005f9 | [
"MIT"
] | 32 | 2018-01-27T13:48:41.000Z | 2021-04-18T20:18:23.000Z | messages/_utils.py | sclickk/messages | d12e4ea3e546bc54f57d6d15339707d10b1005f9 | [
"MIT"
] | 27 | 2018-01-26T01:20:30.000Z | 2021-08-28T01:08:05.000Z | messages/_utils.py | sclickk/messages | d12e4ea3e546bc54f57d6d15339707d10b1005f9 | [
"MIT"
] | 13 | 2018-02-25T17:36:17.000Z | 2021-02-21T17:17:44.000Z | """Utility Module - functions useful to other modules."""
import datetime
from collections.abc import MutableSequence
import validus
from ._exceptions import InvalidMessageInputError
"""
Functions below this header are property factories and input validation functions
used by each of the message classes in order t... | 29.879433 | 84 | 0.655827 |
47a4df06aa313d765977738e5a8f776dd96324b5 | 7,083 | py | Python | examples/qaoa.py | BearerPipelineTest/Cirq | e00767a2ef1233e82e9089cf3801a77e4cc3aea3 | [
"Apache-2.0"
] | 1 | 2022-02-05T22:17:39.000Z | 2022-02-05T22:17:39.000Z | examples/qaoa.py | BearerPipelineTest/Cirq | e00767a2ef1233e82e9089cf3801a77e4cc3aea3 | [
"Apache-2.0"
] | 4 | 2022-01-16T14:12:15.000Z | 2022-02-24T03:58:46.000Z | examples/qaoa.py | Nexuscompute/Cirq | 640ef8f82d6a56ec95361388ce7976e096cca906 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=wrong-or-nonexistent-copyright-notice
"""Runs the Quantum Approximate Optimization Algorithm on Max-Cut.
=== EXAMPLE OUTPUT ===
Example QAOA circuit:
0 1 2 3 4 5
│ │ │ │ │ │
H H ... | 41.911243 | 98 | 0.445997 |
d8f59a4ac1203bc6cc775559d63d889d9710e1d6 | 2,217 | py | Python | backend/pyrogram/raw/functions/account/finish_takeout_session.py | appheap/social-media-analyzer | 0f9da098bfb0b4f9eb38e0244aa3a168cf97d51c | [
"Apache-2.0"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/functions/account/finish_takeout_session.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/functions/account/finish_takeout_session.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.225352 | 103 | 0.627424 |
3fb164702a5ff5c2ebe57b21550ad0ffbfaaab48 | 534 | py | Python | community_images/common/latest_tag.py | rapidfort/plenum | 43b26cec982982e61cb5f8a347881599b46c341a | [
"MIT"
] | null | null | null | community_images/common/latest_tag.py | rapidfort/plenum | 43b26cec982982e61cb5f8a347881599b46c341a | [
"MIT"
] | null | null | null | community_images/common/latest_tag.py | rapidfort/plenum | 43b26cec982982e61cb5f8a347881599b46c341a | [
"MIT"
] | null | null | null | import fileinput
import sys
if(len(sys.argv) != 2):
print("Usage latest_tag <prefix>")
exit(1)
def get_latest_tag():
"""
Find latest tags passed to stdin"
"""
tags = []
for tag in sys.stdin:
if "rfstub" not in tag:
tags.append(tag)
tags.sort(key = lambda tag: in... | 15.257143 | 60 | 0.567416 |
d27c962ed08b1c33d29b839a5cb945e9d8a4b864 | 4,364 | py | Python | groups.py | grysvn/python-algebra-groups | 9ba313292fb1eb960ea54d73e6970f0cf7bc3fe5 | [
"MIT"
] | 11 | 2018-09-25T10:46:05.000Z | 2022-03-26T21:18:48.000Z | groups.py | grysvn/python-algebra-groups | 9ba313292fb1eb960ea54d73e6970f0cf7bc3fe5 | [
"MIT"
] | 6 | 2018-04-24T20:03:32.000Z | 2018-05-01T16:14:37.000Z | groups.py | grayma/python-algebra-groups | 9ba313292fb1eb960ea54d73e6970f0cf7bc3fe5 | [
"MIT"
] | 6 | 2019-01-28T23:16:18.000Z | 2022-03-26T21:18:51.000Z | from math import gcd
class Group:
def __init__(self, elements, operation, table_name_map):
"""
elements: elements of the group
operation: operation on group
table_name_map: map for cayley table to prettify any complex objects in groups for printing
"""
sel... | 32.325926 | 114 | 0.53758 |
cb94f44207b3800c32a1acd277b74be708ca8aad | 4,845 | py | Python | plenum/test/replica_removing/test_replica_removing_after_node_started.py | IDunion/indy-plenum | 406afdeca1630be688f803a3cba15115faa20e2b | [
"Apache-2.0"
] | 148 | 2017-07-11T19:05:25.000Z | 2022-03-16T21:31:20.000Z | plenum/test/replica_removing/test_replica_removing_after_node_started.py | IDunion/indy-plenum | 406afdeca1630be688f803a3cba15115faa20e2b | [
"Apache-2.0"
] | 561 | 2017-06-29T17:59:56.000Z | 2022-03-09T15:47:14.000Z | plenum/test/replica_removing/test_replica_removing_after_node_started.py | IDunion/indy-plenum | 406afdeca1630be688f803a3cba15115faa20e2b | [
"Apache-2.0"
] | 378 | 2017-06-29T17:45:27.000Z | 2022-03-26T07:27:59.000Z | import pytest
from plenum.test.helper import waitForViewChange
from plenum.test.node_catchup.helper import waitNodeDataEquality
from plenum.test.node_catchup.test_config_ledger import start_stopped_node
from plenum.test.pool_transactions.helper import disconnect_node_and_ensure_disconnected, sdk_add_new_steward_and_n... | 48.45 | 118 | 0.627038 |
2cc92fe7167d55e0090ef8b000c3af0cb7744dfe | 7,917 | py | Python | marionette/support/sdk/python/tinyos/marionette/apps/Oscope.py | theodoreward/tinyos-2.x-contrib | 89a1419cb84ccf0747f95cdea2423a18e4fb13a7 | [
"BSD-3-Clause"
] | 1 | 2020-02-28T20:35:09.000Z | 2020-02-28T20:35:09.000Z | marionette/support/sdk/python/tinyos/marionette/apps/Oscope.py | theodoreward/tinyos-2.x-contrib | 89a1419cb84ccf0747f95cdea2423a18e4fb13a7 | [
"BSD-3-Clause"
] | null | null | null | marionette/support/sdk/python/tinyos/marionette/apps/Oscope.py | theodoreward/tinyos-2.x-contrib | 89a1419cb84ccf0747f95cdea2423a18e4fb13a7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
#$Id$
# "Copyright (c) 2000-2003 The Regents of the University of California.
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose, without fee, and without written agreement
# is hereby granted, provided that the above cop... | 39.78392 | 90 | 0.630416 |
dbb8b65b8db3a362bab2f10ee950c5d4ae024e38 | 18,852 | py | Python | cassiopeia/core/league.py | artemigkh/cassiopeia | fa78cb8f86ea21857916a707d04de6a05498033e | [
"MIT"
] | null | null | null | cassiopeia/core/league.py | artemigkh/cassiopeia | fa78cb8f86ea21857916a707d04de6a05498033e | [
"MIT"
] | null | null | null | cassiopeia/core/league.py | artemigkh/cassiopeia | fa78cb8f86ea21857916a707d04de6a05498033e | [
"MIT"
] | null | null | null | from typing import List, Union, Optional, Generator
from merakicommons.cache import lazy_property, lazy
from merakicommons.container import searchable, SearchableList
from .. import configuration
from ..data import Region, Platform, Tier, Division, Queue, Role
from .common import CoreData, CoreDataList, CassiopeiaObj... | 32.786087 | 181 | 0.660142 |
3f9a09a15dc98342f0044f58d1456b4138d46830 | 1,911 | py | Python | SDLabs/SDOM/PY/SDPickler.py | hippiejesus/SDOM | 271328e306343dbc2f76269317950993cf5d9b4e | [
"BSD-3-Clause"
] | null | null | null | SDLabs/SDOM/PY/SDPickler.py | hippiejesus/SDOM | 271328e306343dbc2f76269317950993cf5d9b4e | [
"BSD-3-Clause"
] | null | null | null | SDLabs/SDOM/PY/SDPickler.py | hippiejesus/SDOM | 271328e306343dbc2f76269317950993cf5d9b4e | [
"BSD-3-Clause"
] | null | null | null | #Super Dope pickler. [Fully Functional]
#---use: import pickler
#------- save = pickler.pickleSession(saveName,data)
#------- load = pickler.snackTime(saveName)
#------- data = load.data()
import pickle
import zlib
import os
MODE = 'verbose'
SDPstem = '../.zzz/'
class pickleSession:
def __init__(self,name,mater... | 32.389831 | 75 | 0.59079 |
4b1d4f6ad7c1ccfa36f59dff91581fd85d8b6a24 | 1,643 | py | Python | src/main/python/rds_log_cat/parser/postgresql.py | Scout24/rds-log-cat | 00147dc2e3ec6fc894fccd5a9cbf7faa71cf7e78 | [
"MIT"
] | 1 | 2019-11-07T10:44:28.000Z | 2019-11-07T10:44:28.000Z | src/main/python/rds_log_cat/parser/postgresql.py | Scout24/rds-log-cat | 00147dc2e3ec6fc894fccd5a9cbf7faa71cf7e78 | [
"MIT"
] | 2 | 2017-04-25T13:36:44.000Z | 2018-03-12T20:34:21.000Z | src/main/python/rds_log_cat/parser/postgresql.py | ImmobilienScout24/rds-log-cat | 00147dc2e3ec6fc894fccd5a9cbf7faa71cf7e78 | [
"MIT"
] | 1 | 2021-01-27T19:08:09.000Z | 2021-01-27T19:08:09.000Z | from __future__ import unicode_literals, print_function, absolute_import, division
from rds_log_cat.parser.parser import Parser, LineParserException
class Postgresql(Parser):
def __init__(self):
Parser.__init__(self)
def compose_timestamp(self, date, time, timezone):
if len(date) != 10:
... | 33.530612 | 82 | 0.592209 |
496b2bc3a47caf65cb3282dd11c1e864b5898a1f | 398 | py | Python | config/settings/dev/www_slcschools_org.py | iamjdcollins/districtwebsite | 89e2aea47ca3d221665bc23586a4374421be5800 | [
"MIT"
] | null | null | null | config/settings/dev/www_slcschools_org.py | iamjdcollins/districtwebsite | 89e2aea47ca3d221665bc23586a4374421be5800 | [
"MIT"
] | null | null | null | config/settings/dev/www_slcschools_org.py | iamjdcollins/districtwebsite | 89e2aea47ca3d221665bc23586a4374421be5800 | [
"MIT"
] | null | null | null | from config.settings.base import *
DEBUG = True
ALLOWED_HOSTS = ['www-dev.slcschools.org','horizonte-dev.slcschools.org',]
# Required for Django Debug Toolbar
INTERNAL_IPS='127.0.0.1'
INSTALLED_APPS += [
'debug_toolbar',
]
MIDDLEWARE += [
'debug_toolbar.middleware.DebugToolbarMiddleware',
]
EMAIL_BACKEND ... | 19.9 | 74 | 0.746231 |
31ca599e766398196a435b2a57226949e98c1b64 | 2,946 | py | Python | nlg/tests/test_grammar.py | venkatakrishnareddymallu/gramex-nlg | 9915891b7ea69061bb2788fe70ebcba87e935376 | [
"MIT"
] | 19 | 2019-10-13T12:17:58.000Z | 2022-01-24T02:54:44.000Z | nlg/tests/test_grammar.py | venkatakrishnareddymallu/gramex-nlg | 9915891b7ea69061bb2788fe70ebcba87e935376 | [
"MIT"
] | 41 | 2019-10-16T11:43:16.000Z | 2022-03-28T18:16:50.000Z | nlg/tests/test_grammar.py | venkatakrishnareddymallu/gramex-nlg | 9915891b7ea69061bb2788fe70ebcba87e935376 | [
"MIT"
] | 23 | 2019-11-01T06:30:41.000Z | 2022-01-24T05:08:40.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
"""
Tests for the nlg.grammar module.
"""
import os
import unittest
import pandas as pd
import nlg.grammar as G # noqa: N812
from nlg import utils
from nlg.search import search_args, DFSearch
nlp = utils.load_spacy_model()
op = os.path
class TestGra... | 34.658824 | 77 | 0.626952 |
98571ee04c8a7c98ce025218367a902b35e9ce70 | 18,830 | py | Python | analyse_phylome/concat.py | Gabaldonlab/phylome_analysis_giaco | f9e4c3e91fd5cb0a21af81ddf5af0fda69b74d3e | [
"MIT"
] | null | null | null | analyse_phylome/concat.py | Gabaldonlab/phylome_analysis_giaco | f9e4c3e91fd5cb0a21af81ddf5af0fda69b74d3e | [
"MIT"
] | null | null | null | analyse_phylome/concat.py | Gabaldonlab/phylome_analysis_giaco | f9e4c3e91fd5cb0a21af81ddf5af0fda69b74d3e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import glob
import ete3
import sys
import os
from .utils import (
run_command,
run_command_with_return,
load_sequences,
load_species_name,
load_tree,
root_tree,
create_folder,
loadPaths,
print_sequence,
)
def obtain_121_trees(treeFile, trees121File):
"""... | 34.174229 | 146 | 0.555125 |
af4cf5afd21d3b5ae02bf7dd66701b1cf96a061a | 4,636 | py | Python | scanapi/tree/request_node.py | bartvanherck/scanapi | 036871787d5d06be6d79e56f6e67e19a65732d84 | [
"MIT"
] | null | null | null | scanapi/tree/request_node.py | bartvanherck/scanapi | 036871787d5d06be6d79e56f6e67e19a65732d84 | [
"MIT"
] | null | null | null | scanapi/tree/request_node.py | bartvanherck/scanapi | 036871787d5d06be6d79e56f6e67e19a65732d84 | [
"MIT"
] | null | null | null | import logging
import time
from scanapi.errors import HTTPMethodNotAllowedError
from scanapi.evaluators.spec_evaluator import SpecEvaluator # noqa: F401
from scanapi.hide_utils import hide_sensitive_info
from scanapi.test_status import TestStatus
from scanapi.tree.testing_node import TestingNode
from scanapi.tree.tre... | 24.659574 | 79 | 0.595557 |
9bd5dd634cced40fd23d08b18add1a9cbe9ef3c2 | 106,724 | py | Python | lingvo/core/rnn_cell.py | Felanbird/lingvo | e96418c225f77b8ece1d1b5ddacce1fd49cf42ab | [
"Apache-2.0"
] | null | null | null | lingvo/core/rnn_cell.py | Felanbird/lingvo | e96418c225f77b8ece1d1b5ddacce1fd49cf42ab | [
"Apache-2.0"
] | null | null | null | lingvo/core/rnn_cell.py | Felanbird/lingvo | e96418c225f77b8ece1d1b5ddacce1fd49cf42ab | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 37.056944 | 110 | 0.64411 |
62766d8b3d020885f748578895cba14332ae54a3 | 8,974 | py | Python | Source_Codes/Human Pose Estimation/src/stacked_hourglass/model.py | Adnan-Khan7/ComputerVisionFundamentals | 69a369d97e0d32d362888ff3aadde14ee5341c64 | [
"MIT"
] | null | null | null | Source_Codes/Human Pose Estimation/src/stacked_hourglass/model.py | Adnan-Khan7/ComputerVisionFundamentals | 69a369d97e0d32d362888ff3aadde14ee5341c64 | [
"MIT"
] | null | null | null | Source_Codes/Human Pose Estimation/src/stacked_hourglass/model.py | Adnan-Khan7/ComputerVisionFundamentals | 69a369d97e0d32d362888ff3aadde14ee5341c64 | [
"MIT"
] | null | null | null | '''
Hourglass network inserted in the pre-activated Resnet
Use lr=0.01 for current version
(c) YANG, Wei
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.hub import load_state_dict_from_url
import torch.quantization
__all__ = ['HourglassNet', 'hg']
model_urls = {
'hg1': 'https:/... | 36.628571 | 144 | 0.606641 |
5c3c37776289cfc962157969a9f711cfde7392eb | 1,672 | py | Python | starthinker/task/dcm_api/schema/city.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | starthinker/task/dcm_api/schema/city.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | 6 | 2021-03-19T12:00:18.000Z | 2022-02-10T09:43:42.000Z | starthinker/task/dcm_api/schema/city.py | viohman/starthinker | 20bd2d7fd1e541eb8a2c9b7159941f667e22e38e | [
"Apache-2.0"
] | null | null | null | ###########################################################################
#
# Copyright 2019 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
#
# https://www.apache.org/... | 22.293333 | 75 | 0.513158 |
60f76f325e726ee38a029754b4c4ad770d82fe24 | 1,117 | py | Python | apigentools/commands/validate.py | mistio/apigentools | 4bc2c5f1a9a6d74f7a1de3a5139438d09288ece2 | [
"BSD-3-Clause"
] | null | null | null | apigentools/commands/validate.py | mistio/apigentools | 4bc2c5f1a9a6d74f7a1de3a5139438d09288ece2 | [
"BSD-3-Clause"
] | null | null | null | apigentools/commands/validate.py | mistio/apigentools | 4bc2c5f1a9a6d74f7a1de3a5139438d09288ece2 | [
"BSD-3-Clause"
] | null | null | null | # Unless explicitly stated otherwise all files in this repository are licensed
# under the 3-clause BSD style license (see LICENSE).
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019 Datadog, Inc.
import logging
from apigentools.commands.command import Command
from ap... | 34.90625 | 105 | 0.685765 |
3c59cd208c83d2ea57ded8461ec503646558bcaf | 3,894 | py | Python | pypureclient/flashblade/FB_2_0/models/fixed_reference_with_remote.py | bcai-ps/py-pure-client | d23de5cde4f4db17b85b1ba137235ae368a59c8c | [
"BSD-2-Clause"
] | null | null | null | pypureclient/flashblade/FB_2_0/models/fixed_reference_with_remote.py | bcai-ps/py-pure-client | d23de5cde4f4db17b85b1ba137235ae368a59c8c | [
"BSD-2-Clause"
] | null | null | null | pypureclient/flashblade/FB_2_0/models/fixed_reference_with_remote.py | bcai-ps/py-pure-client | d23de5cde4f4db17b85b1ba137235ae368a59c8c | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
"""
FlashBlade REST API Client
A lightweight client for FlashBlade REST API 2.0, developed by Pure Storage, Inc. (http://www.purestorage.com/).
OpenAPI spec version: 2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
imp... | 29.953846 | 116 | 0.552902 |
d0dbe83ed7dab53d7bbcdf2487eb3a6882d25c40 | 2,638 | py | Python | falcon/testing/base.py | kmt/falcon | b71d3a457704aa79543ba7b11b735e1cbd9875cd | [
"Apache-2.0"
] | 1 | 2016-03-04T19:34:26.000Z | 2016-03-04T19:34:26.000Z | falcon/testing/base.py | kmt/falcon | b71d3a457704aa79543ba7b11b735e1cbd9875cd | [
"Apache-2.0"
] | null | null | null | falcon/testing/base.py | kmt/falcon | b71d3a457704aa79543ba7b11b735e1cbd9875cd | [
"Apache-2.0"
] | null | null | null | """Defines the TestSuite class.
Copyright 2013 by Rackspace Hosting, 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 applicab... | 29.977273 | 79 | 0.676649 |
5447888cf55491b67830ab7f14f8b9d48c314e87 | 575 | py | Python | invento18/events/migrations/0024_auto_20200205_2039.py | anaswaratrajan/invento20 | 22fb8dc51fde33a2a1e3fb2a0a893d2ac38c1763 | [
"MIT"
] | 1 | 2019-11-07T06:09:07.000Z | 2019-11-07T06:09:07.000Z | invento18/events/migrations/0024_auto_20200205_2039.py | anaswaratrajan/invento20 | 22fb8dc51fde33a2a1e3fb2a0a893d2ac38c1763 | [
"MIT"
] | 4 | 2020-01-29T17:44:13.000Z | 2020-02-23T16:52:56.000Z | invento18/events/migrations/0024_auto_20200205_2039.py | anaswaratrajan/invento20 | 22fb8dc51fde33a2a1e3fb2a0a893d2ac38c1763 | [
"MIT"
] | 6 | 2019-12-23T08:58:32.000Z | 2020-02-06T15:08:16.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2020-02-05 15:09
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0023_ambassador_register'),
]
operations = [
migrations.AlterFie... | 22.115385 | 49 | 0.572174 |
25bb51382293126c238165becb3ce938f8af78f7 | 125 | py | Python | components/micropython/modules/disobey2019/post_ota.py | badgeteam/Firmware | 6192b2902c70beb7a298a256d9087274d045fbc0 | [
"Apache-2.0"
] | 7 | 2019-02-11T10:02:14.000Z | 2019-08-02T00:08:45.000Z | components/micropython/modules/disobey2019/post_ota.py | badgeteam/Firmware | 6192b2902c70beb7a298a256d9087274d045fbc0 | [
"Apache-2.0"
] | 17 | 2019-01-05T18:02:11.000Z | 2019-03-09T21:46:43.000Z | components/micropython/modules/disobey2019/post_ota.py | badgeteam/Firmware | 6192b2902c70beb7a298a256d9087274d045fbc0 | [
"Apache-2.0"
] | 4 | 2019-02-15T16:03:20.000Z | 2019-06-27T22:23:24.000Z | import badge, easydraw, version
lvl = badge.nvs_get_u8('ota', 'fixlvl', 0)
if lvl<4:
badge.nvs_set_u8('ota', 'fixlvl', 4)
| 17.857143 | 42 | 0.68 |
a4f6b0ef392776236b037503c8353e010af38612 | 531 | py | Python | lib/hydroqc/winter_credit/consts.py | KerberosMorphy/webtio-hydroqc-addon | 7db4fbb4e752ba9c340ab4bb96f30660da64b5f7 | [
"MIT"
] | null | null | null | lib/hydroqc/winter_credit/consts.py | KerberosMorphy/webtio-hydroqc-addon | 7db4fbb4e752ba9c340ab4bb96f30660da64b5f7 | [
"MIT"
] | null | null | null | lib/hydroqc/winter_credit/consts.py | KerberosMorphy/webtio-hydroqc-addon | 7db4fbb4e752ba9c340ab4bb96f30660da64b5f7 | [
"MIT"
] | null | null | null | """Constants module for winter credits."""
import datetime
import pytz
DEFAULT_ANCHOR_START_OFFSET = 5
DEFAULT_ANCHOR_DURATION = 3
DEFAULT_EVENT_REFRESH_SECONDS = 300
DEFAULT_PRE_HEAT_START_OFFSET = 3
DEFAULT_PRE_HEAT_END_OFFSET = 0
DEFAULT_MORNING_PEAK_START = datetime.time(6, 0, 0)
DEFAULT_MORNING_PEAK_END = datet... | 27.947368 | 52 | 0.800377 |
5a4ba9dcd6a2dc0f507ed04d7623d9879af6709d | 927 | py | Python | Brevet_us_4_936_961_water_electrolyser_4/part_ecrou_m5.py | Jay4C/Python-Macros-For_FreeCAD | 12ce5441a26731377fa43e86ccd2be675740d3a0 | [
"MIT"
] | null | null | null | Brevet_us_4_936_961_water_electrolyser_4/part_ecrou_m5.py | Jay4C/Python-Macros-For_FreeCAD | 12ce5441a26731377fa43e86ccd2be675740d3a0 | [
"MIT"
] | null | null | null | Brevet_us_4_936_961_water_electrolyser_4/part_ecrou_m5.py | Jay4C/Python-Macros-For_FreeCAD | 12ce5441a26731377fa43e86ccd2be675740d3a0 | [
"MIT"
] | null | null | null | import FreeCAD, Part, Mesh
DOC = FreeCAD.activeDocument()
DOC_NAME = "part_ecrou_m5"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
FreeC... | 18.54 | 72 | 0.717368 |
1112053424111ffa4264260955966cab038dbc47 | 1,020 | py | Python | core/config.py | andrewmaximoff/flask-test-task | 4f9488869170252ba852dc997ad0de94eebf5400 | [
"MIT"
] | null | null | null | core/config.py | andrewmaximoff/flask-test-task | 4f9488869170252ba852dc997ad0de94eebf5400 | [
"MIT"
] | null | null | null | core/config.py | andrewmaximoff/flask-test-task | 4f9488869170252ba852dc997ad0de94eebf5400 | [
"MIT"
] | null | null | null | import os
# basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or '__CHANGE-ME__'
POSTGRES = {
'user': os.getenv('APPLICATION_POSTGRES_USER', 'postgres'),
'pw': os.getenv('APPLICATION_POSTGRES_PW', ''),
'host': os.geten... | 34 | 82 | 0.630392 |
489d567544545db92bbfbb3d8a4b5d34730a4dfc | 3,560 | py | Python | pose_detection.py | samsniderheld/pose_estimation | e60204b7d096f938275c47d1fa1bfeaeaa1a2392 | [
"MIT"
] | null | null | null | pose_detection.py | samsniderheld/pose_estimation | e60204b7d096f938275c47d1fa1bfeaeaa1a2392 | [
"MIT"
] | null | null | null | pose_detection.py | samsniderheld/pose_estimation | e60204b7d096f938275c47d1fa1bfeaeaa1a2392 | [
"MIT"
] | null | null | null | import argparse
import os
import shutil
from Training.training import train, train_img_2_bone
from Data_Utils.normalize import normalize_data, normalize_image_data
from datetime import datetime
def parse_args():
desc = "An autoencoder for pose similarity detection"
parser = argparse.ArgumentParser(descriptio... | 50.857143 | 118 | 0.71882 |
358045ddf2284274b3ea63baab4fb9579d54d612 | 41,294 | py | Python | rosetta/tests/tests.py | savoirfairelinux/django-rosetta | 0a6dfaeb32bcd5797fbe8a7484772c610c9c64fb | [
"MIT"
] | null | null | null | rosetta/tests/tests.py | savoirfairelinux/django-rosetta | 0a6dfaeb32bcd5797fbe8a7484772c610c9c64fb | [
"MIT"
] | null | null | null | rosetta/tests/tests.py | savoirfairelinux/django-rosetta | 0a6dfaeb32bcd5797fbe8a7484772c610c9c64fb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import filecmp
import hashlib
import os
import shutil
try:
# Python 3
from urllib.parse import urlencode
except ImportError:
# Python 2
from urllib import urlencode
from django.conf import settings
from django.dispatch import receiver
try:
from django.urls import reverse, re... | 41.711111 | 97 | 0.661912 |
ba5a1b87867a8585c0043a32dece2604aec7f2e7 | 4,660 | py | Python | joblib/__init__.py | pierreablin/joblib | 4d23376233036429ba2e63fcaaddfa5ed4c0c554 | [
"BSD-3-Clause"
] | null | null | null | joblib/__init__.py | pierreablin/joblib | 4d23376233036429ba2e63fcaaddfa5ed4c0c554 | [
"BSD-3-Clause"
] | null | null | null | joblib/__init__.py | pierreablin/joblib | 4d23376233036429ba2e63fcaaddfa5ed4c0c554 | [
"BSD-3-Clause"
] | null | null | null | """Joblib is a set of tools to provide **lightweight pipelining in
Python**. In particular:
1. transparent disk-caching of functions and lazy re-evaluation
(memoize pattern)
2. easy simple parallel computing
Joblib is optimized to be **fast** and **robust** in particular on large
data and has specific optimizatio... | 35.846154 | 87 | 0.678112 |
0b8d2328bdc907d234c4940be9709575208276af | 2,123 | py | Python | Scripts/Downloader.py | corpnewt/Web-Driver-Getter | a56e3225c6a90635400f40a425bb079f1d8cdbf1 | [
"MIT"
] | 8 | 2017-10-25T16:27:14.000Z | 2021-06-11T22:34:06.000Z | Scripts/Downloader.py | corpnewt/Web-Driver-Getter | a56e3225c6a90635400f40a425bb079f1d8cdbf1 | [
"MIT"
] | null | null | null | Scripts/Downloader.py | corpnewt/Web-Driver-Getter | a56e3225c6a90635400f40a425bb079f1d8cdbf1 | [
"MIT"
] | 1 | 2020-07-24T20:45:34.000Z | 2020-07-24T20:45:34.000Z | import plistlib
import sys
import os
import time
# Python-aware urllib stuff
if sys.version_info >= (3, 0):
from urllib.request import urlopen
else:
from urllib2 import urlopen
class Downloader:
def __init__(self):
nothing = "something"
def _progress_hook(self, response, bytes_so_far, total_s... | 31.686567 | 111 | 0.572303 |
b99b325b251d8d24ac0832ddeb9984ebe9ba2523 | 4,376 | py | Python | eoxserver/services/mapserver/wms/layerfactories/coverage_mask_layer_factory.py | kalxas/eoxserver | 8073447d926f3833923bde7b7061e8a1658dee06 | [
"OML"
] | 25 | 2015-08-10T19:34:34.000Z | 2021-02-05T08:28:01.000Z | eoxserver/services/mapserver/wms/layerfactories/coverage_mask_layer_factory.py | kalxas/eoxserver | 8073447d926f3833923bde7b7061e8a1658dee06 | [
"OML"
] | 153 | 2015-01-20T08:35:49.000Z | 2022-03-16T11:00:56.000Z | eoxserver/services/mapserver/wms/layerfactories/coverage_mask_layer_factory.py | kalxas/eoxserver | 8073447d926f3833923bde7b7061e8a1658dee06 | [
"OML"
] | 10 | 2015-01-23T15:48:30.000Z | 2021-01-21T15:41:18.000Z | #-------------------------------------------------------------------------------
#
# Project: EOxServer <http://eoxserver.org>
# Authors: Fabian Schindler <fabian.schindler@eox.at>
# Martin Paces <martin.paces@eox.at>
#
#-------------------------------------------------------------------------------
# Copyrigh... | 36.773109 | 80 | 0.625457 |
e62638b4fbeb3261dfd68849727660ca398c1591 | 4,810 | py | Python | src/lib/Bcfg2/Server/Plugins/Snapshots.py | stpierre/bcfg2 | 363ad4fd2b36febbbe6b766dac9e76c572048e08 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/Plugins/Snapshots.py | stpierre/bcfg2 | 363ad4fd2b36febbbe6b766dac9e76c572048e08 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/Plugins/Snapshots.py | stpierre/bcfg2 | 363ad4fd2b36febbbe6b766dac9e76c572048e08 | [
"mpich2"
] | null | null | null | import logging
import difflib
import Bcfg2.Server.Plugin
import Bcfg2.Server.Snapshots
import Bcfg2.Logger
from Bcfg2.Server.Snapshots.model import Snapshot
import sys
import time
import threading
# Compatibility import
from Bcfg2.Bcfg2Py3k import Queue, u_str, b64decode
logger = logging.getLogger('Snapshots')
ftype... | 37.578125 | 86 | 0.544699 |
28c377285fe666c90e9dfd49318af07f0733b2b3 | 1,132 | py | Python | google/ads/googleads/v10/errors/types/region_code_error.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v10/errors/types/region_code_error.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v10/errors/types/region_code_error.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 29.789474 | 74 | 0.719081 |
68ff15d8621516ed26e67eebea21967a38d5eacc | 4,853 | py | Python | snips_nlu/data_augmentation.py | rocket-man/snips-nlu | d548c62d9bfd5940d0e3d469c87fff1d897aab95 | [
"Apache-2.0"
] | 1 | 2021-01-01T15:03:22.000Z | 2021-01-01T15:03:22.000Z | snips_nlu/data_augmentation.py | rocket-man/snips-nlu | d548c62d9bfd5940d0e3d469c87fff1d897aab95 | [
"Apache-2.0"
] | null | null | null | snips_nlu/data_augmentation.py | rocket-man/snips-nlu | d548c62d9bfd5940d0e3d469c87fff1d897aab95 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from builtins import next
from copy import deepcopy
from itertools import cycle
from future.utils import iteritems
from snips_nlu_parsers import get_builtin_entity_examples
from snips_nlu.constants import (
CAPITALIZE, DATA, ENTITIES, ENTITY, INTENTS, TEXT, UTTERANCES)
fr... | 39.778689 | 77 | 0.684731 |
fce542ac42addd3a7a735c76da71be2d71052ee9 | 192 | py | Python | Spelling-Checker/program1.py | Aayush-hub/Amazing-Python-Scripts | 5488454b16fa969d32ad7a56618e62e64291c052 | [
"MIT"
] | 3 | 2021-01-14T13:54:22.000Z | 2021-11-15T11:26:51.000Z | Spelling-Checker/program1.py | Aayush-hub/Amazing-Python-Scripts | 5488454b16fa969d32ad7a56618e62e64291c052 | [
"MIT"
] | 1 | 2021-01-26T02:12:47.000Z | 2021-01-26T02:12:47.000Z | Spelling-Checker/program1.py | Aayush-hub/Amazing-Python-Scripts | 5488454b16fa969d32ad7a56618e62e64291c052 | [
"MIT"
] | 1 | 2021-02-22T18:47:39.000Z | 2021-02-22T18:47:39.000Z | from textblob import TextBlob
a = "cmputr" # incorrect spelling
print("original text: "+str(a))
b = TextBlob(a)
# prints the corrected spelling
print("corrected text: "+str(b.correct()))
| 19.2 | 42 | 0.708333 |
ec4fa1f6852bf6e843398411e42184cebf70773f | 2,918 | py | Python | tests/test_parse.py | KoichiYasuoka/diaparser | ca11e65ef890cee2fbb23f42ae9c711c89767158 | [
"MIT"
] | null | null | null | tests/test_parse.py | KoichiYasuoka/diaparser | ca11e65ef890cee2fbb23f42ae9c711c89767158 | [
"MIT"
] | null | null | null | tests/test_parse.py | KoichiYasuoka/diaparser | ca11e65ef890cee2fbb23f42ae9c711c89767158 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import diaparser
from diaparser.parsers import Parser
model = 'en_ewt-electra-base'
def test_parse():
sentence = ['The', 'dog', 'chases', 'the', 'cat', '.']
#sentence = ['Il', 'cane', 'si', 'morde', 'la', 'coda', '.']
parser = Parser.load(model)
parser.predict([sentence], pro... | 56.115385 | 121 | 0.698424 |
74e47e95c4da1f7296fe35656ee2b29a4a918eb7 | 1,125 | py | Python | TripMapR/urls.py | rahulvgmail/TripMapR | d2dc4770fc87fdefda3fe9effdcd4683a8abebaa | [
"BSD-3-Clause"
] | null | null | null | TripMapR/urls.py | rahulvgmail/TripMapR | d2dc4770fc87fdefda3fe9effdcd4683a8abebaa | [
"BSD-3-Clause"
] | null | null | null | TripMapR/urls.py | rahulvgmail/TripMapR | d2dc4770fc87fdefda3fe9effdcd4683a8abebaa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib import a... | 30.405405 | 77 | 0.690667 |
7ec7f62bfd5271562e319d52c68680314663631a | 1,850 | py | Python | setup.py | thesealion/django-social-auth | 1ce88367fa65fa6c1c8a8dd08b47aa2b10ca77e5 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | setup.py | thesealion/django-social-auth | 1ce88367fa65fa6c1c8a8dd08b47aa2b10ca77e5 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | setup.py | thesealion/django-social-auth | 1ce88367fa65fa6c1c8a8dd08b47aa2b10ca77e5 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Setup file for easy installation"""
from os.path import join, dirname
from setuptools import setup
version = __import__('social_auth').__version__
LONG_DESCRIPTION = """
Django Social Auth is an easy to setup social authentication/registration
mechanism for Django projects.
Crafted using ... | 36.27451 | 75 | 0.618378 |
5cb0aa8c8d648ed317317cebbbc6a8634439ee7d | 4,693 | py | Python | paper_submission/scripts/plot_sex_biased_expression_by_tissue.py | jfear/larval_gonad | 624a71741864b74e0372f89bdcca578e5cca3722 | [
"MIT"
] | 1 | 2019-09-13T13:24:18.000Z | 2019-09-13T13:24:18.000Z | paper_submission/scripts/plot_sex_biased_expression_by_tissue.py | jfear/larval_gonad | 624a71741864b74e0372f89bdcca578e5cca3722 | [
"MIT"
] | 65 | 2019-07-24T16:23:08.000Z | 2020-03-06T22:18:47.000Z | paper_submission/scripts/plot_sex_biased_expression_by_tissue.py | jfear/larval_gonad | 624a71741864b74e0372f89bdcca578e5cca3722 | [
"MIT"
] | 1 | 2021-06-02T19:09:35.000Z | 2021-06-02T19:09:35.000Z | """"""
from typing import Tuple, List
from collections import namedtuple
from itertools import product
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from larval_gonad.plotting.stats import add_pvals
plt.style.use("minimal")
COLORS = ["black", "lightgray", "white"]
CHROM_ORDER = snakema... | 25.096257 | 99 | 0.600256 |
4ecc503d2534ddcc322f72e7ab6ac5395647f490 | 14,042 | py | Python | preprocess/preprocess.py | HKUST-KnowComp/SRBRW | eec5a36775273879ba871d543b91b60ce096393f | [
"MIT"
] | 6 | 2018-05-14T04:44:53.000Z | 2021-02-28T17:38:55.000Z | preprocess/preprocess.py | HKUST-KnowComp/SRBRW | eec5a36775273879ba871d543b91b60ce096393f | [
"MIT"
] | null | null | null | preprocess/preprocess.py | HKUST-KnowComp/SRBRW | eec5a36775273879ba871d543b91b60ce096393f | [
"MIT"
] | 5 | 2018-10-23T13:48:59.000Z | 2020-11-22T10:20:39.000Z | import pandas as pd
import numpy as np
import sys
import os
import argparse
import nltk.data
import random
import re
from gensim.parsing import preprocessing
from multiprocessing import cpu_count, Pool
review_columns = ['user_id', 'stars', 'text']
user_columns = ['user_id', 'friends']
SVM_columns = ['user_id', 'stars'... | 36.952632 | 120 | 0.621991 |
867ce5b428d89a41927d6f4f37085cd13f3e25ae | 4,999 | py | Python | plugins/hive/flytekitplugins/hive/task.py | cosmicBboy/flytek | 84c6b52c7a9673326bc7d1c9e84ebcb0f00c61d1 | [
"Apache-2.0"
] | null | null | null | plugins/hive/flytekitplugins/hive/task.py | cosmicBboy/flytek | 84c6b52c7a9673326bc7d1c9e84ebcb0f00c61d1 | [
"Apache-2.0"
] | 1 | 2021-02-05T02:57:25.000Z | 2021-02-05T02:57:25.000Z | plugins/hive/flytekitplugins/hive/task.py | cosmicBboy/flytekit | 84c6b52c7a9673326bc7d1c9e84ebcb0f00c61d1 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Type
from google.protobuf.json_format import MessageToDict
from flytekit.annotated.base_sql_task import SQLTask
from flytekit.annotated.context_manager import SerializationSettings
from flytekit.models.qubole import HiveQuery, QuboleHiveJ... | 37.02963 | 134 | 0.639728 |
4b40a9dc9ec65cb028dbd57851fdf6f5e8aabe7b | 111 | py | Python | simple_french/tips/admin.py | ericgroom/simplefrench | 4bf486aeaa4e9416215936a7bd84e4b5a8fa323c | [
"MIT"
] | null | null | null | simple_french/tips/admin.py | ericgroom/simplefrench | 4bf486aeaa4e9416215936a7bd84e4b5a8fa323c | [
"MIT"
] | null | null | null | simple_french/tips/admin.py | ericgroom/simplefrench | 4bf486aeaa4e9416215936a7bd84e4b5a8fa323c | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Tip
# Register your models here.
admin.site.register(Tip) | 22.2 | 32 | 0.801802 |
5fe32457e8f765d671887f6a9860c343e81b5d39 | 1,444 | py | Python | question_repo/apps/repo/migrations/0006_userlog.py | XBD1998/Project_public | 95cf4a223b1f907fb0427732cac81cb8cfad0233 | [
"Apache-2.0"
] | null | null | null | question_repo/apps/repo/migrations/0006_userlog.py | XBD1998/Project_public | 95cf4a223b1f907fb0427732cac81cb8cfad0233 | [
"Apache-2.0"
] | 3 | 2020-02-12T03:00:58.000Z | 2021-06-10T21:46:14.000Z | question_repo/apps/repo/migrations/0006_userlog.py | XBD1998/Project_public | 95cf4a223b1f907fb0427732cac81cb8cfad0233 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-08-12 07:46
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depend... | 42.470588 | 156 | 0.626039 |
1592700110da942ed0126f2b2c0acc89c3b3e9eb | 8,288 | py | Python | flappyBird_pygame/main.py | TheNoobProgrammer22/FlappyBird-by-TheNoobProgrammer22 | de4665a8d5c221f84007535fd1f76f7ee673d4c6 | [
"Apache-2.0"
] | 2 | 2020-03-26T19:06:07.000Z | 2020-11-12T10:46:50.000Z | flappyBird_pygame/main.py | TheNoobProgrammer22/FlappyBird-by-TheNoobProgrammer22 | de4665a8d5c221f84007535fd1f76f7ee673d4c6 | [
"Apache-2.0"
] | null | null | null | flappyBird_pygame/main.py | TheNoobProgrammer22/FlappyBird-by-TheNoobProgrammer22 | de4665a8d5c221f84007535fd1f76f7ee673d4c6 | [
"Apache-2.0"
] | null | null | null | import math
import os
import pygame
from pygame.locals import *
from random import randint
from collections import deque
FPS = 60
ANI_SPEED = 0.18 # pixels per millisecond
W_WIDTH = 284 * 2 # BG image size: 284x512 px; tiled twice
W_HEIGHT = 512
class Bird(pygame.sprite.Sprite):
WIDTH = ... | 32.375 | 81 | 0.590492 |
6d12262b3c4b913ce608ba7cfc02a4c2117675a3 | 1,104 | py | Python | ois_api_client/v3_0/deserialization/deserialize_payment_evidence_document_data.py | peterkulik/ois_api_client | 51dabcc9f920f89982c4419bb058f5a88193cee0 | [
"MIT"
] | 7 | 2020-10-22T08:15:29.000Z | 2022-01-27T07:59:39.000Z | ois_api_client/v3_0/deserialization/deserialize_payment_evidence_document_data.py | peterkulik/ois_api_client | 51dabcc9f920f89982c4419bb058f5a88193cee0 | [
"MIT"
] | null | null | null | ois_api_client/v3_0/deserialization/deserialize_payment_evidence_document_data.py | peterkulik/ois_api_client | 51dabcc9f920f89982c4419bb058f5a88193cee0 | [
"MIT"
] | null | null | null | from typing import Optional
import xml.etree.ElementTree as ET
from ...xml.XmlReader import XmlReader as XR
from ..namespaces import BASE
from ..namespaces import COMMON
from ..namespaces import DATA
from ..dto.PaymentEvidenceDocumentData import PaymentEvidenceDocumentData
from .deserialize_address import deserialize_a... | 38.068966 | 109 | 0.763587 |
e58da5d3bff249d3984bf8d50dcfe13b1ec662cc | 10,268 | py | Python | tools/autobuild/shader_preprocessor.py | operon/omim_mapsme | c6d3bce1d5363789ca8ca49d21d983829db94edb | [
"Apache-2.0"
] | null | null | null | tools/autobuild/shader_preprocessor.py | operon/omim_mapsme | c6d3bce1d5363789ca8ca49d21d983829db94edb | [
"Apache-2.0"
] | null | null | null | tools/autobuild/shader_preprocessor.py | operon/omim_mapsme | c6d3bce1d5363789ca8ca49d21d983829db94edb | [
"Apache-2.0"
] | null | null | null | import os
import sys
import hashlib
lowPDefine = "LOW_P"
lowPSearch = "lowp"
mediumPDefine = "MEDIUM_P"
mediumPSearch = "mediump"
highPDefine = "HIGH_P"
highPSearch = "highp"
maxPrecDefine = "MAXPREC_P"
maxPrecSearch = "MAXPREC"
def formatOutFilePath(baseDir, fileName):
return os.path.join(baseDir, "..", fileName... | 39.492308 | 172 | 0.62573 |
9f48fea0652fbea82d4c873b25e1f482d701a0cb | 26,553 | py | Python | iotedgehubdev/certutils.py | TheVinhLuong102/iotedgehubdev | 0673511c26d24c1f749361e683c1e4a3a2f4f0ef | [
"MIT"
] | 80 | 2018-09-11T07:28:42.000Z | 2022-03-01T06:51:42.000Z | iotedgehubdev/certutils.py | TheVinhLuong102/iotedgehubdev | 0673511c26d24c1f749361e683c1e4a3a2f4f0ef | [
"MIT"
] | 176 | 2018-09-11T07:11:22.000Z | 2022-03-28T17:12:16.000Z | iotedgehubdev/certutils.py | TheVinhLuong102/iotedgehubdev | 0673511c26d24c1f749361e683c1e4a3a2f4f0ef | [
"MIT"
] | 35 | 2018-11-05T02:53:06.000Z | 2022-03-18T16:53:27.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
from OpenSSL import crypto
from shutil import copy2
from datetime import datetime
from .errors import EdgeFileAccessError, EdgeInvalidArgument, EdgeValueError
from .constants import EdgeConstants as EC
from .utils ... | 46.748239 | 120 | 0.573306 |
deffa7eb0ecf6ff6da190fab837eacce5446302f | 8,654 | py | Python | app/server.py | tezike/car_classifier | 30f9c1810e41ef9e08a7da8158b7974205f009e0 | [
"MIT"
] | null | null | null | app/server.py | tezike/car_classifier | 30f9c1810e41ef9e08a7da8158b7974205f009e0 | [
"MIT"
] | null | null | null | app/server.py | tezike/car_classifier | 30f9c1810e41ef9e08a7da8158b7974205f009e0 | [
"MIT"
] | null | null | null | from starlette.applications import Starlette
from starlette.responses import HTMLResponse
from starlette.staticfiles import StaticFiles
from starlette.middleware.cors import CORSMiddleware
import uvicorn, aiohttp, asyncio
from io import BytesIO
from fastai.vision import *
import base64
model_file_url = 'https://drive.... | 32.780303 | 135 | 0.728103 |
49de2c140ec2e4d73a0023cc3d80da68ac6942cf | 11,413 | py | Python | openmdao/core/indepvarcomp.py | LeeElvis/OpenMDAO | e9e002054c0ecad7467da2a7bbb8fdf68fccfb8c | [
"Apache-2.0"
] | null | null | null | openmdao/core/indepvarcomp.py | LeeElvis/OpenMDAO | e9e002054c0ecad7467da2a7bbb8fdf68fccfb8c | [
"Apache-2.0"
] | null | null | null | openmdao/core/indepvarcomp.py | LeeElvis/OpenMDAO | e9e002054c0ecad7467da2a7bbb8fdf68fccfb8c | [
"Apache-2.0"
] | null | null | null | """Define the IndepVarComp class."""
import numpy as np
from openmdao.core.explicitcomponent import ExplicitComponent
from openmdao.utils.general_utils import make_set, warn_deprecation
class IndepVarComp(ExplicitComponent):
"""
Class to use when all output variables are independent.
"""
def __init... | 41.501818 | 99 | 0.578551 |
0f1e99639981d698502c33f3d97193a40a15e357 | 4,378 | py | Python | models/transformers/vit.py | cankocagil/TT-SRN | 83eb03a9393442e6b09aa736862b3a2d5bdcf5b6 | [
"Apache-2.0"
] | 4 | 2021-11-18T08:34:54.000Z | 2021-12-27T00:49:36.000Z | models/transformers/vit.py | cankocagil/TT-SPN | 83eb03a9393442e6b09aa736862b3a2d5bdcf5b6 | [
"Apache-2.0"
] | 1 | 2021-10-14T06:34:04.000Z | 2021-10-14T06:34:04.000Z | models/transformers/vit.py | cankocagil/TT-SPN | 83eb03a9393442e6b09aa736862b3a2d5bdcf5b6 | [
"Apache-2.0"
] | 1 | 2021-12-16T17:28:05.000Z | 2021-12-16T17:28:05.000Z | import torch
from torch import nn, einsum
import torch.nn.functional as F
from einops import rearrange, repeat
from einops.layers.torch import Rearrange
# helpers
def pair(t):
return t if isinstance(t, tuple) else (t, t)
# classes
class PreNorm(nn.Module):
def __init__(self, dim, fn):
... | 34.472441 | 167 | 0.558931 |
35873ada731fd4ff5b0b6777ea374fe175e28a11 | 14,894 | py | Python | epf/src/model/asfinag_tree_cover.py | MLReef/mlreef | ec90e000fecde04a8256b0400fe40bc81ebb6f04 | [
"MIT"
] | 1,607 | 2020-08-31T18:15:51.000Z | 2022-03-18T09:13:21.000Z | epf/src/model/asfinag_tree_cover.py | Bronmus/mlreef | 4063f937f2f65e87ee24174b2ac89dac5c255854 | [
"MIT"
] | 9 | 2021-07-13T11:10:05.000Z | 2022-01-12T16:48:54.000Z | epf/src/model/asfinag_tree_cover.py | Bronmus/mlreef | 4063f937f2f65e87ee24174b2ac89dac5c255854 | [
"MIT"
] | 318 | 2020-11-04T05:33:18.000Z | 2022-03-04T10:05:25.000Z | # -*- coding: utf-8 -*-
"""tree-cover-keras.py
# Example notebook for training a U-net deep learning network to predict tree cover
This script presents a toy example for training a deep learning architecture for semantic segmentation of satellite images using `eo-learn` and `keras`. The example showcases tree cover pr... | 43.171014 | 476 | 0.626292 |
90113d27858de638cbc94e562ecda0b0946595c1 | 5,865 | py | Python | src/tequila/optimizers/__init__.py | naomicurnow/tequila | 739a76222005558d348a428cf2ce7cb5dfe290de | [
"MIT"
] | 1 | 2021-01-11T18:40:47.000Z | 2021-01-11T18:40:47.000Z | src/tequila/optimizers/__init__.py | kiminh/tequila | 464085265e125222c63e65446861e9c0a2428bab | [
"MIT"
] | 3 | 2020-12-08T14:15:56.000Z | 2020-12-17T16:38:35.000Z | src/tequila/optimizers/__init__.py | kiminh/tequila | 464085265e125222c63e65446861e9c0a2428bab | [
"MIT"
] | null | null | null | from tequila.optimizers.optimizer_base import OptimizerHistory, Optimizer, TequilaOptimizerException
from tequila.optimizers.optimizer_scipy import OptimizerSciPy
from tequila.optimizers.optimizer_gd import OptimizerGD
from tequila.optimizers.optimizer_scipy import minimize as minimize_scipy
from tequila.optimizers.opt... | 39.897959 | 108 | 0.631543 |
d15b6741e19c044e6adadde184092713f1e06b77 | 11,053 | py | Python | conans/test/build_helpers/msbuild_test.py | amatoshka/conan | c2726e8c255adb120b5f7bdee9e3ec0bc90f1d7a | [
"MIT"
] | null | null | null | conans/test/build_helpers/msbuild_test.py | amatoshka/conan | c2726e8c255adb120b5f7bdee9e3ec0bc90f1d7a | [
"MIT"
] | null | null | null | conans/test/build_helpers/msbuild_test.py | amatoshka/conan | c2726e8c255adb120b5f7bdee9e3ec0bc90f1d7a | [
"MIT"
] | null | null | null | import os
import platform
import unittest
import mock
from nose.plugins.attrib import attr
from parameterized import parameterized
from conans.client import tools
from conans.client.build.msbuild import MSBuild
from conans.errors import ConanException
from conans.model.version import Version
from conans.paths import ... | 41.089219 | 98 | 0.590428 |
8d18128f83cfc4fc92a91ef23e12b3ec35d182a6 | 19,802 | py | Python | database/compiled_templates/base_panels.mako.py | bopopescu/galaxy-pipelines | 109059d32a0a176a42f9d8949e72802677b8133d | [
"CC-BY-3.0"
] | null | null | null | database/compiled_templates/base_panels.mako.py | bopopescu/galaxy-pipelines | 109059d32a0a176a42f9d8949e72802677b8133d | [
"CC-BY-3.0"
] | null | null | null | database/compiled_templates/base_panels.mako.py | bopopescu/galaxy-pipelines | 109059d32a0a176a42f9d8949e72802677b8133d | [
"CC-BY-3.0"
] | 1 | 2020-07-25T21:10:26.000Z | 2020-07-25T21:10:26.000Z | # -*- encoding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 6
_modified_time = 1384542358.682444
_template_filename=u'templates/webapps/galaxy/base_panels.mako'
_template_uri=u'/base_panels.mako'
_template_cache=cach... | 45.837963 | 265 | 0.502626 |
f0d7934c612f9256b56288c52b56f93c27e662a1 | 2,784 | py | Python | dhub/get_pip.py | datahub-projects/dhub | 949d688c1ab83d717057688a3655a0979fbb6905 | [
"MIT"
] | null | null | null | dhub/get_pip.py | datahub-projects/dhub | 949d688c1ab83d717057688a3655a0979fbb6905 | [
"MIT"
] | 12 | 2020-05-28T20:09:49.000Z | 2020-06-05T17:25:09.000Z | dhub/get_pip.py | datahub-projects/dhub | 949d688c1ab83d717057688a3655a0979fbb6905 | [
"MIT"
] | null | null | null | #get pip package data (versions & release dates)
import sys, json, requests, datetime
from collections import OrderedDict as odic
from pprint import pprint
import dateutil.parser as dup
from .runrun import run as rrun
def get_package_dates(p):
#https://pypi.org/pypi/mido/json
url = "https://pypi.org/pypi/{0}/... | 29.305263 | 98 | 0.546336 |
3858b41dd95dee29fa3d8ad28d00fdf8453285d4 | 27 | py | Python | tests/test_diss.py | mvcisback/DISS | 3ac94d62d2f10e2642a5ea7ef27b1ed045664abc | [
"MIT"
] | null | null | null | tests/test_diss.py | mvcisback/DISS | 3ac94d62d2f10e2642a5ea7ef27b1ed045664abc | [
"MIT"
] | null | null | null | tests/test_diss.py | mvcisback/DISS | 3ac94d62d2f10e2642a5ea7ef27b1ed045664abc | [
"MIT"
] | null | null | null | def test_smoke():
pass
| 9 | 17 | 0.62963 |
42d7f81762fedef230b897f46e5338f39dd3f7fe | 43,968 | py | Python | LUCI/LuciFit.py | lyalcorn/LUCI | ed9dde4286ca80694f53a3a50e1da2073a92ff76 | [
"MIT"
] | null | null | null | LUCI/LuciFit.py | lyalcorn/LUCI | ed9dde4286ca80694f53a3a50e1da2073a92ff76 | [
"MIT"
] | null | null | null | LUCI/LuciFit.py | lyalcorn/LUCI | ed9dde4286ca80694f53a3a50e1da2073a92ff76 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.optimize import minimize
from scipy import interpolate
from numdifftools import Hessian, Hessdiag
import emcee
import scipy.special as sps
import astropy.stats as astrostats
import warnings
import dynesty
from dynesty import utils as dyfunc
from LUCI.LuciFunctions import Gaussian, Sinc, Si... | 51.424561 | 157 | 0.603302 |
8111b02774c6a4b4e8e75ad0d0cd8df32fe32696 | 184 | py | Python | src/conan_app_launcher/__main__.py | goszpeti/app_grid_conan | bd76c8528e6c6b839abd7a4d26d7194428faed7d | [
"MIT"
] | null | null | null | src/conan_app_launcher/__main__.py | goszpeti/app_grid_conan | bd76c8528e6c6b839abd7a4d26d7194428faed7d | [
"MIT"
] | null | null | null | src/conan_app_launcher/__main__.py | goszpeti/app_grid_conan | bd76c8528e6c6b839abd7a4d26d7194428faed7d | [
"MIT"
] | null | null | null | """
Entrypoint of Conan App Launcher
"""
from conan_app_launcher.app import run_application as run_conan_app_launcher
if __name__ == "__main__":
run_conan_app_launcher()
| 20.444444 | 77 | 0.75 |
798fc07c20b40ae91416bcf7d913e8ddc28a3484 | 3,377 | py | Python | battle.py | NoNotCar/BombAdventures | 9e0821c082e695b9069c5b0c400b7d5739ee8b1f | [
"MIT"
] | 1 | 2015-12-04T18:11:11.000Z | 2015-12-04T18:11:11.000Z | battle.py | NoNotCar/BombAdventures | 9e0821c082e695b9069c5b0c400b7d5739ee8b1f | [
"MIT"
] | 1 | 2015-12-08T09:35:36.000Z | 2016-06-15T11:23:57.000Z | battle.py | NoNotCar/BombAdventures | 9e0821c082e695b9069c5b0c400b7d5739ee8b1f | [
"MIT"
] | null | null | null | __author__ = 'NoNotCar'
import pygame, sys, os
pygame.init()
pygame.font.init()
screen = pygame.display.set_mode((640, 704))
import BattleWorld, Img
from random import choice
import Controllers
pdf = pygame.font.get_default_font()
tfont=pygame.font.Font(pdf,60)
sfont=pygame.font.Font(pdf,20)
clock = pygame.time.Clock(... | 34.459184 | 139 | 0.594611 |
4d5f5fdd280527966b8fa039883cb950c19f71ce | 2,532 | py | Python | sdk/core/azure-core/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/core/azure-core/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/core/azure-core/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 33.76 | 86 | 0.601501 |
674b4581ef6646ce0ae1961b5a854e933171b1d6 | 3,722 | py | Python | tests/mindspore_test_framework/utils/model_util.py | GuoSuiming/mindspore | 48afc4cfa53d970c0b20eedfb46e039db2a133d5 | [
"Apache-2.0"
] | 3,200 | 2020-02-17T12:45:41.000Z | 2022-03-31T20:21:16.000Z | tests/mindspore_test_framework/utils/model_util.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 176 | 2020-02-12T02:52:11.000Z | 2022-03-28T22:15:55.000Z | tests/mindspore_test_framework/utils/model_util.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 621 | 2020-03-09T01:31:41.000Z | 2022-03-30T03:43:19.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 32.365217 | 117 | 0.649382 |
3774ee4b81bd3cc90768e6d504ee16aa15b1311a | 2,722 | py | Python | solver.py | hashamtanveer/Cross-Word-Puzzle-Solver | 04c97d3239f45ebcafffb32bfff9f90778be9da5 | [
"MIT"
] | 1 | 2020-10-28T21:23:55.000Z | 2020-10-28T21:23:55.000Z | solver.py | hashamtanveer/Word-Search-Solver | 04c97d3239f45ebcafffb32bfff9f90778be9da5 | [
"MIT"
] | null | null | null | solver.py | hashamtanveer/Word-Search-Solver | 04c97d3239f45ebcafffb32bfff9f90778be9da5 | [
"MIT"
] | 2 | 2020-12-17T07:45:53.000Z | 2021-07-04T21:06:26.000Z |
import numpy as np
def find(word):
if checkRows(word) or checkCols(word) or checkDiag(word) or checkDiagRev(word):
return True
else:
return False
def checkRows(word):
found = False
for row in range(board.shape[0]) :
row_array = board[row,:]
row_string = ''.join(row_... | 30.58427 | 83 | 0.56723 |
6cd9acb3517366086f0919d4177293aadfc42af9 | 15,247 | py | Python | lib/galaxy/datatypes/display_applications/application.py | sneumann/galaxy | f6011bab5b8adbabae4986a45849bb9158ffc8bb | [
"CC-BY-3.0"
] | 1 | 2019-07-27T19:30:55.000Z | 2019-07-27T19:30:55.000Z | lib/galaxy/datatypes/display_applications/application.py | sneumann/galaxy | f6011bab5b8adbabae4986a45849bb9158ffc8bb | [
"CC-BY-3.0"
] | 4 | 2021-02-08T20:28:34.000Z | 2022-03-02T02:52:55.000Z | lib/galaxy/datatypes/display_applications/application.py | sneumann/galaxy | f6011bab5b8adbabae4986a45849bb9158ffc8bb | [
"CC-BY-3.0"
] | 1 | 2018-05-30T07:38:54.000Z | 2018-05-30T07:38:54.000Z | # Contains objects for using external display applications
import logging
from copy import deepcopy
from six import string_types
from six.moves.urllib.parse import quote_plus
from galaxy.util import (
parse_xml,
string_as_bool
)
from galaxy.util.odict import odict
from galaxy.util.template import fill_templat... | 43.813218 | 171 | 0.614941 |
bf02f32f68ab6690f0bf9e488a6bdedd71e37dfe | 5,142 | py | Python | RobotManipulation/robosuite/robosuite/wrappers/gym_wrapper_notflat.py | Lifelong-ML/Mendez2022ModularLifelongRL | c166c520a25c2a60b6bcae16fee2840027768809 | [
"Apache-2.0"
] | null | null | null | RobotManipulation/robosuite/robosuite/wrappers/gym_wrapper_notflat.py | Lifelong-ML/Mendez2022ModularLifelongRL | c166c520a25c2a60b6bcae16fee2840027768809 | [
"Apache-2.0"
] | null | null | null | RobotManipulation/robosuite/robosuite/wrappers/gym_wrapper_notflat.py | Lifelong-ML/Mendez2022ModularLifelongRL | c166c520a25c2a60b6bcae16fee2840027768809 | [
"Apache-2.0"
] | null | null | null | """
This file implements a wrapper for facilitating compatibility with OpenAI gym.
This is useful when using these environments with code that assumes a gym-like
interface.
"""
import numpy as np
from gym import spaces
from gym.core import Env
from robosuite.wrappers import Wrapper
from collections import OrderedDict... | 34.510067 | 107 | 0.605018 |
80ed935c0ba605d5c9c071a3b47cf77cbb2153f8 | 1,052 | py | Python | Part 1 - Data Preprocessing/DataProcessing/DataPreProcessing.py | KrishnanandRai/ML-Learning | ad4dcd98ebe889b14ffcdfc6a5ae6d9af9dd88b3 | [
"MIT"
] | null | null | null | Part 1 - Data Preprocessing/DataProcessing/DataPreProcessing.py | KrishnanandRai/ML-Learning | ad4dcd98ebe889b14ffcdfc6a5ae6d9af9dd88b3 | [
"MIT"
] | null | null | null | Part 1 - Data Preprocessing/DataProcessing/DataPreProcessing.py | KrishnanandRai/ML-Learning | ad4dcd98ebe889b14ffcdfc6a5ae6d9af9dd88b3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
dataset = pd.read_csv('Data.csv')
x = dataset.iloc[:, : -1].values
y = dataset.iloc[:, -1].values
from sklearn.preprocessing import Imputer
imputer = Imputer(missin... | 26.974359 | 92 | 0.744297 |
48c5c7a82ea39fd48742ff2d5209c8bc0aa539c5 | 837 | py | Python | phial/commands.py | runz0rd/phial | 28e05bcee9628ab8e027671c3b850459ad19baf9 | [
"MIT"
] | null | null | null | phial/commands.py | runz0rd/phial | 28e05bcee9628ab8e027671c3b850459ad19baf9 | [
"MIT"
] | null | null | null | phial/commands.py | runz0rd/phial | 28e05bcee9628ab8e027671c3b850459ad19baf9 | [
"MIT"
] | null | null | null | from typing import TYPE_CHECKING, cast
from phial.utils import parse_help_text
if TYPE_CHECKING:
from phial import Phial # noqa
def help_command(bot: 'Phial') -> str:
'''List all regsitered commmands'''
help_text = cast(str, bot.config.get('baseHelpText', ""))
if help_text:
help_text += "\n"... | 38.045455 | 77 | 0.684588 |
2b647f2cf82fbf9546482c9c140e2d8963196c4b | 3,317 | py | Python | deciphon/hmmer_model.py | EBI-Metagenomics/deciphon-py | 81df946c4f2f53c55ac96fc78ed2f95958b291d8 | [
"MIT"
] | null | null | null | deciphon/hmmer_model.py | EBI-Metagenomics/deciphon-py | 81df946c4f2f53c55ac96fc78ed2f95958b291d8 | [
"MIT"
] | 1 | 2021-07-02T10:24:19.000Z | 2021-07-02T10:24:19.000Z | deciphon/hmmer_model.py | EBI-Metagenomics/deciphon-py | 81df946c4f2f53c55ac96fc78ed2f95958b291d8 | [
"MIT"
] | null | null | null | from math import log
from typing import List, Mapping, NamedTuple, Union
import hmmer_reader
from imm import lprob_zero
from nmm import DNAAlphabet, IUPACAminoAlphabet, RNAAlphabet
from .alphabet import infer_alphabet
from .model import Transitions
__all__ = ["HMMERModel", "ModelID"]
ModelID = NamedTuple("ModelID",... | 28.594828 | 82 | 0.597528 |
d9b82d4274689c566be36dbeae9924a9afd7a32b | 5,346 | py | Python | tests/phases/install/turbine_install/test_turbine_install.py | johnjasa/ORBIT | b7b1fd7083c3cee58e53f8e5d2f29a898b2b786b | [
"Apache-2.0"
] | null | null | null | tests/phases/install/turbine_install/test_turbine_install.py | johnjasa/ORBIT | b7b1fd7083c3cee58e53f8e5d2f29a898b2b786b | [
"Apache-2.0"
] | null | null | null | tests/phases/install/turbine_install/test_turbine_install.py | johnjasa/ORBIT | b7b1fd7083c3cee58e53f8e5d2f29a898b2b786b | [
"Apache-2.0"
] | null | null | null | """Tests for the `MonopileInstallation` class without feeder barges."""
__author__ = "Jake Nunemaker"
__copyright__ = "Copyright 2019, National Renewable Energy Laboratory"
__maintainer__ = "Jake Nunemaker"
__email__ = "jake.nunemaker@nrel.gov"
from copy import deepcopy
import pandas as pd
import pytest
from tests... | 27.27551 | 78 | 0.666293 |
3724d691e70fd3ed06330116468c5e2da79590b7 | 11,666 | py | Python | packages/hagrid/hagrid/grammar.py | callezenwaka/PySyft | 2545c302441cfe727ec095c4f9aa136bff02be32 | [
"Apache-1.1"
] | null | null | null | packages/hagrid/hagrid/grammar.py | callezenwaka/PySyft | 2545c302441cfe727ec095c4f9aa136bff02be32 | [
"Apache-1.1"
] | 2 | 2021-04-02T10:12:44.000Z | 2021-04-02T10:12:50.000Z | packages/hagrid/hagrid/grammar.py | callezenwaka/PySyft | 2545c302441cfe727ec095c4f9aa136bff02be32 | [
"Apache-1.1"
] | 1 | 2021-08-19T12:23:01.000Z | 2021-08-19T12:23:01.000Z | # future
from __future__ import annotations
# stdlib
import socket
from typing import Any
from typing import Callable
from typing import Dict as TypeDict
from typing import List as TypeList
from typing import Optional
from typing import Tuple as TypeTuple
from typing import Union
# relative
from .lib import find_avai... | 31.787466 | 114 | 0.578604 |
ddaec6de94fc152bc255e45ab7e526d308b7c990 | 222 | py | Python | script/move.py | RonLek/ALPR-and-Identification-for-Indian-Vehicles | 2c6cd5d6d883e67ed17a8dbb96830f813c6ab55e | [
"FTL",
"Xnet",
"X11"
] | 13 | 2020-09-25T16:48:06.000Z | 2022-01-31T01:36:33.000Z | script/move.py | RonLek/ALPR-and-Identification-for-Indian-Vehicles | 2c6cd5d6d883e67ed17a8dbb96830f813c6ab55e | [
"FTL",
"Xnet",
"X11"
] | 5 | 2021-01-19T09:36:59.000Z | 2022-03-25T06:56:08.000Z | script/move.py | RonLek/ALPR-and-Identification-for-Indian-Vehicles | 2c6cd5d6d883e67ed17a8dbb96830f813c6ab55e | [
"FTL",
"Xnet",
"X11"
] | 7 | 2020-09-24T01:15:52.000Z | 2022-03-23T06:50:55.000Z | import os, sys
import shutil
def move():
path = (os.getcwd()+'/data')
i=0
for item in os.listdir(path):
print(item)
if i%2==0:
shutil.move('data/' +item, 'final')
print(item)
i+=1
move()
| 14.8 | 42 | 0.54955 |
297d95287d169a59077cb42f79de0d8e5a991cd3 | 5,130 | py | Python | utility/response_selection/keyword_based.py | WanzhengZhu/GPS | ca93df78df8c2114ad8e4a0b6c231d00acbe258b | [
"MIT"
] | 6 | 2021-06-03T15:13:11.000Z | 2021-10-21T05:25:29.000Z | utility/response_selection/keyword_based.py | WanzhengZhu/GPS | ca93df78df8c2114ad8e4a0b6c231d00acbe258b | [
"MIT"
] | null | null | null | utility/response_selection/keyword_based.py | WanzhengZhu/GPS | ca93df78df8c2114ad8e4a0b6c231d00acbe258b | [
"MIT"
] | 1 | 2021-08-29T06:31:05.000Z | 2021-08-29T06:31:05.000Z | """Baseline response ranking methods using keyword matching."""
import numpy as np
import scipy.sparse as sp
from sklearn.feature_extraction.text import (HashingVectorizer, TfidfTransformer, _document_frequency)
# from sklearn.utils.testing import ignore_warnings
from utility.response_selection import method
class B... | 43.474576 | 150 | 0.690838 |
ccbeaf6e7af04b1c42759d25e1ddff4f9fe586c2 | 1,904 | py | Python | glue/formats/cocos2d.py | glensc/glue | bb02512a2913da0e095f8d02fcfe3dea3ae8c9d0 | [
"BSD-3-Clause"
] | 514 | 2015-01-01T17:27:02.000Z | 2022-03-22T03:41:15.000Z | glue/formats/cocos2d.py | seawenzhu/glue | 37aecf52db6f5fd52cdb9e288fde80fa45a37c19 | [
"BSD-3-Clause"
] | 66 | 2015-01-02T06:03:54.000Z | 2022-01-10T13:16:14.000Z | glue/formats/cocos2d.py | seawenzhu/glue | 37aecf52db6f5fd52cdb9e288fde80fa45a37c19 | [
"BSD-3-Clause"
] | 80 | 2015-01-16T02:22:50.000Z | 2021-09-15T09:47:45.000Z | import os
from base import BasePlistFormat
class Cocos2dFormat(BasePlistFormat):
extension = 'plist'
build_per_ratio = True
@classmethod
def populate_argument_parser(cls, parser):
group = parser.add_argument_group("Cocos2d format options")
group.add_argument("--cocos2d",
... | 41.391304 | 107 | 0.456408 |
0baaf0bd3d8090b9675aecad4192396da0ae0c15 | 2,408 | py | Python | Regression/LogisticRegression.py | MarkWh1te/MLAlgorithms | 1a3ba3adcbfe379a78a4508ae9433c78270d77f5 | [
"MIT"
] | null | null | null | Regression/LogisticRegression.py | MarkWh1te/MLAlgorithms | 1a3ba3adcbfe379a78a4508ae9433c78270d77f5 | [
"MIT"
] | null | null | null | Regression/LogisticRegression.py | MarkWh1te/MLAlgorithms | 1a3ba3adcbfe379a78a4508ae9433c78270d77f5 | [
"MIT"
] | null | null | null | import numpy as np
class LogisticRegression(object):
# setting learning rate and iteration times
def __init__(self, alpha=0.0005, lamb=0.1, iters=100):
self.iters = iters
self.alpha = alpha
self.lamb = lamb
# add one line for intercept
self.theta = np.array([0.0] * (X.sh... | 31.684211 | 77 | 0.574751 |
1323e24cda8815cd2cf39936bbe585832a58c777 | 5,807 | py | Python | tests/unit/facters/test_image.py | scorphus/holmes-api | 6b3c76d4299fecf2d8799d7b5c3c6a6442cacd59 | [
"MIT"
] | null | null | null | tests/unit/facters/test_image.py | scorphus/holmes-api | 6b3c76d4299fecf2d8799d7b5c3c6a6442cacd59 | [
"MIT"
] | null | null | null | tests/unit/facters/test_image.py | scorphus/holmes-api | 6b3c76d4299fecf2d8799d7b5c3c6a6442cacd59 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import lxml.html
from mock import Mock, call
from preggy import expect
from holmes.config import Config
from holmes.reviewer import Reviewer
from holmes.facters.images import ImageFacter
from tests.unit.base import FacterTestCase
from tests.fixtures import PageFactory
class... | 30.563158 | 92 | 0.574307 |
2a57fe1a4ac492377f6a556cd6d139381e252475 | 7,665 | py | Python | demos/odyssey/dodyssey.py | nakagami/reportlab | 0514ba380fe66c76746725cc0c1b7a3fee51c833 | [
"BSD-3-Clause"
] | 9 | 2016-12-21T02:19:24.000Z | 2021-08-07T11:39:47.000Z | demos/odyssey/dodyssey.py | nakagami/reportlab | 0514ba380fe66c76746725cc0c1b7a3fee51c833 | [
"BSD-3-Clause"
] | null | null | null | demos/odyssey/dodyssey.py | nakagami/reportlab | 0514ba380fe66c76746725cc0c1b7a3fee51c833 | [
"BSD-3-Clause"
] | 4 | 2018-08-24T14:50:14.000Z | 2022-03-01T08:46:40.000Z | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
__version__=''' $Id: dodyssey.py 3959 2012-09-27 14:39:39Z robin $ '''
__doc__=''
#REPORTLAB_TEST_SCRIPT
import sys, copy, os
from reportlab.platypus import *
_NEW_PARA=os.environ.get('NEW_PARA','0')[0] in ('y','Y','1')
_REDCAP=int(os.envi... | 31.158537 | 104 | 0.587867 |
1497cd939899f582c16268616175f38c273859f9 | 8,504 | py | Python | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_auditnslogpolicy_binding.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_auditnslogpolicy_binding.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_auditnslogpolicy_binding.py | culbertm/NSttyPython | ff9f6aedae3fb8495342cd0fc4247c819cf47397 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2016 Citrix Systems, 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 l... | 34.710204 | 417 | 0.746472 |
6fe479df92b2452bcfcf22f5315b289a4490444a | 6,126 | py | Python | src/optimize.py | rogonzales2011/ARTE | 6489547eb7cf066b034ce838c2a685e0a256b90d | [
"MIT"
] | null | null | null | src/optimize.py | rogonzales2011/ARTE | 6489547eb7cf066b034ce838c2a685e0a256b90d | [
"MIT"
] | null | null | null | src/optimize.py | rogonzales2011/ARTE | 6489547eb7cf066b034ce838c2a685e0a256b90d | [
"MIT"
] | null | null | null | from __future__ import print_function
import functools
import vgg, pdb, time
import tensorflow as tf, numpy as np, os
import transform
from utils import get_img
STYLE_LAYERS = ('relu1_1', 'relu2_1', 'relu3_1', 'relu4_1', 'relu5_1')
CONTENT_LAYER = 'relu4_2'
DEVICES = 'CUDA_VISIBLE_DEVICES'
# np arr, np arr... | 42.839161 | 98 | 0.578355 |
2a4ce4dccdd9097a8526c5682c071fea7f0673f6 | 7,190 | py | Python | src/rotorse/examples/rotorse_example1.py | HaidongHe/RotorSE | a4f75ed79f5ca10c869ed803037b52d5e74f0927 | [
"Apache-2.0"
] | 3 | 2018-04-23T03:36:38.000Z | 2020-04-14T03:59:56.000Z | src/rotorse/examples/rotorse_example1.py | HaidongHe/RotorSE | a4f75ed79f5ca10c869ed803037b52d5e74f0927 | [
"Apache-2.0"
] | 7 | 2016-11-29T22:31:50.000Z | 2018-11-06T20:41:10.000Z | src/rotorse/examples/rotorse_example1.py | HaidongHe/RotorSE | a4f75ed79f5ca10c869ed803037b52d5e74f0927 | [
"Apache-2.0"
] | 14 | 2015-04-03T21:52:56.000Z | 2020-10-02T06:33:07.000Z | from __future__ import print_function
class RotorSE_Example1():
def execute(self):
# --- Import Modules
import numpy as np
import os
from openmdao.api import IndepVarComp, Component, Group, Problem, Brent, ScipyGMRES
from rotorse.rotor_aeropower import RotorAeroPower
from rotorse.rotor_geometry import R... | 48.581081 | 241 | 0.675661 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.