hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a0cc67aabdad3a542d63e0ca66671017c7689a2 | 4,178 | py | Python | benchmark/startQiskit_Class2362.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_Class2362.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_Class2362.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=39
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np
import networkx as nx
def bitwise_... | 34.528926 | 140 | 0.647439 |
4a0cc7511e6cc3468bc2dbd8746eb144bdefeecb | 407 | py | Python | week_1/13_lesson.py | SekachVitaliy/Python | 4d199a571cfedca51ec6e724e4d8c98e086e984d | [
"Unlicense"
] | null | null | null | week_1/13_lesson.py | SekachVitaliy/Python | 4d199a571cfedca51ec6e724e4d8c98e086e984d | [
"Unlicense"
] | null | null | null | week_1/13_lesson.py | SekachVitaliy/Python | 4d199a571cfedca51ec6e724e4d8c98e086e984d | [
"Unlicense"
] | null | null | null | # Даны два момента времени в пределах одних и тех же суток. Для каждого момента указан час,
# минута и секунда. Известно, что второй момент времени наступил не раньше первого.
# Определите сколько секунд прошло между двумя моментами времени.
h1 = int(input())
m1 = int(input())
s1 = int(input())
h2 = int(input())
m2 = i... | 37 | 91 | 0.68059 |
4a0cc9354e75d235f00376a8eb09a3ae55f84b6a | 4,271 | py | Python | dispatcher/judge.py | zerolfx/eoj3 | 156060399d1c3e5f7bcdbf34eaffbe2be66e1b20 | [
"MIT"
] | 1 | 2020-11-17T13:08:07.000Z | 2020-11-17T13:08:07.000Z | dispatcher/judge.py | zerolfx/eoj3 | 156060399d1c3e5f7bcdbf34eaffbe2be66e1b20 | [
"MIT"
] | null | null | null | dispatcher/judge.py | zerolfx/eoj3 | 156060399d1c3e5f7bcdbf34eaffbe2be66e1b20 | [
"MIT"
] | null | null | null | import time
import traceback
from datetime import datetime
from random import randint
import requests
from django.conf import settings
from django.core.cache import cache
from django.core.mail import send_mail
from django_redis import get_redis_connection
# from dispatcher.semaphore import Semaphore
from dispatcher.m... | 42.71 | 118 | 0.670569 |
4a0ccb74ef3c5946be26afcb31bffdfd9118af37 | 4,219 | py | Python | open_seq2seq/losses/loss.py | sugartom/OpenSeq2Seq | 2866f67deb15d09798b075c665c4f6d8935708e4 | [
"Apache-2.0"
] | null | null | null | open_seq2seq/losses/loss.py | sugartom/OpenSeq2Seq | 2866f67deb15d09798b075c665c4f6d8935708e4 | [
"Apache-2.0"
] | null | null | null | open_seq2seq/losses/loss.py | sugartom/OpenSeq2Seq | 2866f67deb15d09798b075c665c4f6d8935708e4 | [
"Apache-2.0"
] | 2 | 2019-03-11T18:30:02.000Z | 2019-03-17T21:08:22.000Z | # Copyright (c) 2018 NVIDIA Corporation
from __future__ import absolute_import, division, print_function
from __future__ import unicode_literals
import abc
import copy
import six
import tensorflow as tf
from OpenSeq2Seq.open_seq2seq.utils.utils import check_params, cast_types
@six.add_metaclass(abc.ABCMeta)
class ... | 31.962121 | 82 | 0.671723 |
4a0ccc01544dc052a5dd38892efa2f6070fda721 | 1,291 | py | Python | app/Authentification/forms.py | dancan-sandys/blogging_site | e0ace5f164fc033bea5c3c1d84e5a92c3ca515d2 | [
"MIT"
] | null | null | null | app/Authentification/forms.py | dancan-sandys/blogging_site | e0ace5f164fc033bea5c3c1d84e5a92c3ca515d2 | [
"MIT"
] | null | null | null | app/Authentification/forms.py | dancan-sandys/blogging_site | e0ace5f164fc033bea5c3c1d84e5a92c3ca515d2 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, BooleanField, SubmitField, SelectField, PasswordField
from wtforms.validators import ValidationError, Email, Required, EqualTo
from ..models import User
class SignUp(FlaskForm):
username = StringField('Username:', validators=[Required()] )
email ... | 37.970588 | 117 | 0.7134 |
4a0ccc0447e5fdbb4a1303afb434af16c9bb6dab | 620 | py | Python | twitter_app/admin.py | munisisazade/twitter_app | 2ca4f3fecdce18ffc82a2734e38a47b4e224fcee | [
"MIT"
] | null | null | null | twitter_app/admin.py | munisisazade/twitter_app | 2ca4f3fecdce18ffc82a2734e38a47b4e224fcee | [
"MIT"
] | 7 | 2019-01-11T08:22:01.000Z | 2019-01-25T06:59:33.000Z | twitter_app/admin.py | munisisazade/twitter_app | 2ca4f3fecdce18ffc82a2734e38a47b4e224fcee | [
"MIT"
] | 5 | 2019-01-15T07:13:47.000Z | 2019-01-15T07:47:45.000Z | from django.contrib import admin
from .models import Post, Comment, LikeModel, Follow
# Register your models here.
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
list_display = ('user', 'picture', 'context')
@admin.register(Comment)
class CommentAdmin(admin.ModelAdmin):
list_display = ('post', 'us... | 25.833333 | 70 | 0.724194 |
4a0ccc31d357bc5355a11417b800676ad4c9ed7c | 3,349 | py | Python | modules/zivid/_calibration/multi_camera.py | Skylion007/zivid-python | 28b16a2f260e5d060e4fb5a3436a3f1c7d659954 | [
"BSD-3-Clause"
] | 23 | 2019-07-01T09:50:04.000Z | 2022-03-06T23:54:28.000Z | modules/zivid/_calibration/multi_camera.py | Skylion007/zivid-python | 28b16a2f260e5d060e4fb5a3436a3f1c7d659954 | [
"BSD-3-Clause"
] | 100 | 2019-07-02T07:49:13.000Z | 2022-02-16T21:05:39.000Z | modules/zivid/_calibration/multi_camera.py | Skylion007/zivid-python | 28b16a2f260e5d060e4fb5a3436a3f1c7d659954 | [
"BSD-3-Clause"
] | 13 | 2019-10-01T07:26:05.000Z | 2022-02-16T20:21:56.000Z | """Module containing implementation of multi-camera calibration functionality.
This module should not be imported directly by end-user, but rather accessed through
the zivid.calibration module.
"""
import _zivid
class MultiCameraResidual:
"""Class representing the estimated errors of a multi-camera calibration.... | 28.623932 | 91 | 0.622275 |
4a0ccc83978e440aba6c6b608f97f8fdc685b328 | 468,456 | py | Python | modules/s3db/hrm.py | nursix/rlpptm | e7b50b2fdf6277aed5f198ca10ad773c5ca0b947 | [
"MIT"
] | 1 | 2022-03-21T21:58:30.000Z | 2022-03-21T21:58:30.000Z | modules/s3db/hrm.py | nursix/rlpptm | e7b50b2fdf6277aed5f198ca10ad773c5ca0b947 | [
"MIT"
] | null | null | null | modules/s3db/hrm.py | nursix/rlpptm | e7b50b2fdf6277aed5f198ca10ad773c5ca0b947 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Sahana Eden Human Resources Management
@copyright: 2011-2021 (c) Sahana Software Foundation
@license: MIT
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 S... | 42.777463 | 233 | 0.424774 |
4a0ccc8e4e0987bb775c980ef0a94788bdb6a4c0 | 11,629 | py | Python | st2common/st2common/constants/triggers.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | null | null | null | st2common/st2common/constants/triggers.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 15 | 2021-02-11T22:58:54.000Z | 2021-08-06T18:03:47.000Z | st2common/st2common/constants/triggers.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 1 | 2021-07-10T15:02:29.000Z | 2021-07-10T15:02:29.000Z | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... | 26.733333 | 100 | 0.543383 |
4a0ccca59c9584ee25dd0100eca122f2b246f24c | 755 | py | Python | gabriel_lego/cv/image_util.py | molguin92/gabriel-lego-py3 | 2f8828326ca025997687a19d1af80bc1590a9290 | [
"Apache-2.0"
] | null | null | null | gabriel_lego/cv/image_util.py | molguin92/gabriel-lego-py3 | 2f8828326ca025997687a19d1af80bc1590a9290 | [
"Apache-2.0"
] | 1 | 2019-09-10T23:41:41.000Z | 2019-09-11T20:21:11.000Z | gabriel_lego/cv/image_util.py | molguin92/gabriel-lego-py3 | 2f8828326ca025997687a19d1af80bc1590a9290 | [
"Apache-2.0"
] | 1 | 2022-02-22T15:29:27.000Z | 2022-02-22T15:29:27.000Z | import cv2
import numpy as np
from gabriel_lego.cv import lego_cv as lc
from gabriel_lego.lego_engine import config
def resize_img(img):
return img if img.shape == (config.IMAGE_WIDTH, config.IMAGE_HEIGHT, 3) \
else cv2.resize(img, (config.IMAGE_WIDTH, config.IMAGE_HEIGHT),
interp... | 30.2 | 77 | 0.663576 |
4a0ccd02d9806956e88af6ffd3af1b03d146c90c | 9,414 | py | Python | pyrolite/util/plot/axes.py | bomtuckle/pyrolite | c0af0ade14ff26b4e9fdd5a033b27e73df085c55 | [
"BSD-3-Clause"
] | 69 | 2019-02-25T00:17:53.000Z | 2022-03-31T17:26:48.000Z | pyrolite/util/plot/axes.py | bomtuckle/pyrolite | c0af0ade14ff26b4e9fdd5a033b27e73df085c55 | [
"BSD-3-Clause"
] | 68 | 2018-07-20T09:01:01.000Z | 2022-03-31T16:28:36.000Z | pyrolite/util/plot/axes.py | bomtuckle/pyrolite | c0af0ade14ff26b4e9fdd5a033b27e73df085c55 | [
"BSD-3-Clause"
] | 24 | 2018-10-02T04:32:10.000Z | 2021-11-10T08:24:17.000Z | """
Functions for creating, ordering and modifying :class:`~matplolib.axes.Axes`.
"""
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
from ..meta import subkwargs
from ..log import Handle
logger = Handle(__name__)
def get_ordered_axes(fig):
... | 30.466019 | 96 | 0.568834 |
4a0cce09b08fcccafebd977b0ca63f6c5171578e | 2,611 | py | Python | objects/Person.py | Bhaskers-Blu-Org1/long-way-home-callforcode | 81cc683f4b2e86f3d3afaafb8b2ced915707ea2b | [
"Apache-2.0"
] | 6 | 2019-07-29T06:16:35.000Z | 2021-11-08T09:34:00.000Z | objects/Person.py | Bhaskers-Blu-Org1/long-way-home-callforcode | 81cc683f4b2e86f3d3afaafb8b2ced915707ea2b | [
"Apache-2.0"
] | 15 | 2019-08-27T09:57:58.000Z | 2022-02-26T10:52:55.000Z | objects/Person.py | IBM/long-way-home-callforcode | 7a86266d33c67f84b6e471912a3710d7db0bec6f | [
"Apache-2.0"
] | 2 | 2019-11-02T08:54:00.000Z | 2020-06-29T14:30:31.000Z | from typing import Optional, Dict, List, Any
from cloudant.database import CouchDatabase
import uuid
from objects.PhotoEncoding import PhotoEncoding
class Person:
def __init__(
self,
is_missing, #type: bool
is_reunited, #type: bool
reporting_org, #type: str
id=No... | 29.337079 | 78 | 0.623133 |
4a0ccf138359147393bda74503ab7903888d52aa | 118 | py | Python | userlog/test_settings.py | aaugustin/django-userlog | 6cd34d0a319f6a954fec74420d0d391c32c46060 | [
"BSD-3-Clause"
] | 53 | 2015-01-04T17:53:40.000Z | 2021-07-27T06:53:19.000Z | userlog/test_settings.py | aaugustin/django-userlog | 6cd34d0a319f6a954fec74420d0d391c32c46060 | [
"BSD-3-Clause"
] | 1 | 2015-07-04T11:42:45.000Z | 2015-07-04T11:42:45.000Z | userlog/test_settings.py | aaugustin/django-userlog | 6cd34d0a319f6a954fec74420d0d391c32c46060 | [
"BSD-3-Clause"
] | 8 | 2015-09-05T08:03:32.000Z | 2020-02-28T08:48:13.000Z | from .example_settings import * # noqa
CACHES['userlog']['LOCATION'] = os.path.join(BASE_DIR, 'redis.sock') # noqa
| 29.5 | 76 | 0.694915 |
4a0ccf509424e8a777656a305d4bef7ca2518338 | 10,966 | py | Python | src/hpc/autoscale/results.py | hmeiland/cyclecloud-scalelib | f246737ddea631c7378d716a51431857eb6b06b3 | [
"MIT"
] | null | null | null | src/hpc/autoscale/results.py | hmeiland/cyclecloud-scalelib | f246737ddea631c7378d716a51431857eb6b06b3 | [
"MIT"
] | null | null | null | src/hpc/autoscale/results.py | hmeiland/cyclecloud-scalelib | f246737ddea631c7378d716a51431857eb6b06b3 | [
"MIT"
] | null | null | null | """ A collection of Result types that are used throughout the demand calculation."""
import typing
from abc import ABC, abstractmethod
from collections.abc import Hashable
from typing import Callable, Dict, List, Optional, TypeVar
from uuid import uuid4
import hpc.autoscale.hpclogging as logging
from hpc.autoscale imp... | 27.903308 | 89 | 0.58426 |
4a0cd01397e6aca24431e95a0a7c417861527528 | 24,178 | py | Python | tools/tests/object_utils.py | BUSS-DeeCamp/Det3D | c8f4d59af8a0721b22ffcfed8be3805d4b9bd824 | [
"Apache-2.0"
] | null | null | null | tools/tests/object_utils.py | BUSS-DeeCamp/Det3D | c8f4d59af8a0721b22ffcfed8be3805d4b9bd824 | [
"Apache-2.0"
] | null | null | null | tools/tests/object_utils.py | BUSS-DeeCamp/Det3D | c8f4d59af8a0721b22ffcfed8be3805d4b9bd824 | [
"Apache-2.0"
] | null | null | null | import time
import numpy as np
import open3d as o3d
class Box(object):
def __init__(self, location, rotation, dimension):
self.location = location
self.rotation = rotation
self.dimension = dimension
class ObjectWithBox(object):
def __init__(self, cloud_points, box3d):
# the ... | 38.438792 | 120 | 0.64476 |
4a0cd0762ad6f6a0cf6eb0f6d7dd2f0eb68712c2 | 1,289 | py | Python | setup.py | scopedsecurity/lsassy | 43763dd593ac176f5fbd1e774fc5412c30c352af | [
"MIT"
] | 1,212 | 2019-12-03T15:10:35.000Z | 2022-03-27T03:17:53.000Z | setup.py | scopedsecurity/lsassy | 43763dd593ac176f5fbd1e774fc5412c30c352af | [
"MIT"
] | 41 | 2019-12-12T14:08:53.000Z | 2022-03-03T08:15:18.000Z | setup.py | scopedsecurity/lsassy | 43763dd593ac176f5fbd1e774fc5412c30c352af | [
"MIT"
] | 170 | 2019-12-03T20:04:14.000Z | 2022-03-13T09:05:31.000Z | # Author:
# Romain Bentz (pixis - @hackanddo)
# Website:
# https://beta.hackndo.com [FR]
# https://en.hackndo.com [EN]
import pathlib
from setuptools import setup, find_packages
HERE = pathlib.Path(__file__).parent
README = (HERE / "README.md").read_text()
setup(
name="lsassy",
version="3.0.3",
autho... | 26.306122 | 76 | 0.612878 |
4a0cd0bc9fd3d6ac41e00a9ced0568e42353ca00 | 1,360 | py | Python | tests/terraform/checks/resource/aws/test_DAXEncryption.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 4,013 | 2019-12-09T13:16:54.000Z | 2022-03-31T14:31:01.000Z | tests/terraform/checks/resource/aws/test_DAXEncryption.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 1,258 | 2019-12-17T09:55:51.000Z | 2022-03-31T19:17:17.000Z | tests/terraform/checks/resource/aws/test_DAXEncryption.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 638 | 2019-12-19T08:57:38.000Z | 2022-03-30T21:38:37.000Z | import unittest
from checkov.terraform.checks.resource.aws.DAXEncryption import check
from checkov.common.models.enums import CheckResult
class TestDAXEncryption(unittest.TestCase):
def test_failure(self):
resource_conf = {
"cluster_name": "${var.cluster_name}",
"iam_role_arn": "$... | 34 | 80 | 0.603676 |
4a0cd16b9adcabb54929b95eeedc8ce34ec2e3f8 | 3,313 | py | Python | startup/gui/cache.py | PaulDoessel/gaffer-play | 8b72dabb388e12424c230acfb0bd209049b01bd6 | [
"BSD-3-Clause"
] | 1 | 2016-07-31T09:55:09.000Z | 2016-07-31T09:55:09.000Z | startup/gui/cache.py | Kthulhu/gaffer | 8995d579d07231988abc92c3ac2788c15c8bc75c | [
"BSD-3-Clause"
] | null | null | null | startup/gui/cache.py | Kthulhu/gaffer | 8995d579d07231988abc92c3ac2788c15c8bc75c | [
"BSD-3-Clause"
] | 1 | 2020-02-15T16:15:54.000Z | 2020-02-15T16:15:54.000Z | ##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that ... | 39.915663 | 133 | 0.71144 |
4a0cd1fb1de412354691798343277cb0dd7aeaba | 909 | py | Python | examples/fringes_transform.py | parkertomf/WrightTools | 09642b868fb51dab032470e8a6bc9c9fd5a541d4 | [
"MIT"
] | null | null | null | examples/fringes_transform.py | parkertomf/WrightTools | 09642b868fb51dab032470e8a6bc9c9fd5a541d4 | [
"MIT"
] | null | null | null | examples/fringes_transform.py | parkertomf/WrightTools | 09642b868fb51dab032470e8a6bc9c9fd5a541d4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Fringes transform
=================
An example of transform on a dataset containing fringes.
"""
import matplotlib.pyplot as plt
import WrightTools as wt
from WrightTools import datasets
p = datasets.PyCMDS.w2_w1_000
data = wt.data.from_PyCMDS(p)
data.signal_mean.symmetric_root(0.5) # ... | 22.170732 | 71 | 0.715072 |
4a0cd1fb7c2139b764d8707a55478f817791d6e7 | 2,061 | py | Python | quotmgmt/quotation_management/doctype/quote_approval_requests/quote_approval_requests.py | dgsol/quotmgmt | d863f5838913ad601e1a2f92124cf149a8c4dd83 | [
"MIT"
] | null | null | null | quotmgmt/quotation_management/doctype/quote_approval_requests/quote_approval_requests.py | dgsol/quotmgmt | d863f5838913ad601e1a2f92124cf149a8c4dd83 | [
"MIT"
] | null | null | null | quotmgmt/quotation_management/doctype/quote_approval_requests/quote_approval_requests.py | dgsol/quotmgmt | d863f5838913ad601e1a2f92124cf149a8c4dd83 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, DGSOL InfoTech and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, time
from frappe import msgprint, _
from frappe.model.document import Document
class QuoteApprovalRequests(Document):
def onload(self)... | 30.761194 | 93 | 0.696749 |
4a0cd36f3f1c02b66409d21d7ed6d4fe52ba8213 | 12,272 | py | Python | TicTacToe/TicTacToe.py | HenrikBojsenNehm/TicTacToe | 12101cb60e2a00966b0505d263b670c2ba0e5ccf | [
"MIT"
] | null | null | null | TicTacToe/TicTacToe.py | HenrikBojsenNehm/TicTacToe | 12101cb60e2a00966b0505d263b670c2ba0e5ccf | [
"MIT"
] | null | null | null | TicTacToe/TicTacToe.py | HenrikBojsenNehm/TicTacToe | 12101cb60e2a00966b0505d263b670c2ba0e5ccf | [
"MIT"
] | null | null | null | #imports
#----------------------------------------------------------------
import tkinter as tk
import time
from tkinter import *
from tkinter import messagebox
from tkinter.font import names
from PIL import ImageTk, Image
#------------------------------|imports|-------------------------
#gloabal variables... | 46.484848 | 122 | 0.393986 |
4a0cd4ac68ec9679857c3f2f67891ffc22c71723 | 2,720 | py | Python | src/main.py | jefferson-dantonio/snake-game | 616d6721158b3c0514e8812d788aa9071a4e2eb1 | [
"MIT"
] | null | null | null | src/main.py | jefferson-dantonio/snake-game | 616d6721158b3c0514e8812d788aa9071a4e2eb1 | [
"MIT"
] | null | null | null | src/main.py | jefferson-dantonio/snake-game | 616d6721158b3c0514e8812d788aa9071a4e2eb1 | [
"MIT"
] | null | null | null | import pygame
import random
pygame.init()
###Sets
roxo = (105,89,205)
verde = (34,139,34)
vermelho = (250,128,114)
ciano = (0,255,255)
dimensoes = (400, 400)
### VALORES INICIAIS ###
x = 200
y = 200
d = 20
lista_cobra = [[x, y]]
dx = 0
dy = 0
x_comida = round(random.randrange(0, 400 - d) / 20) * 20
y_comida = round(r... | 29.89011 | 69 | 0.611029 |
4a0cd72a11c608a7a26810b2716586c13aaf5b17 | 2,897 | py | Python | src/overlapper/dovetail_overlap.py | yoshihikosuzuki/RepeatAssembly | a5629affd669c9c029058f6f1519205ea592d1f1 | [
"MIT"
] | 1 | 2020-01-30T13:50:05.000Z | 2020-01-30T13:50:05.000Z | src/overlapper/dovetail_overlap.py | yoshihikosuzuki/RepeatAssembly | a5629affd669c9c029058f6f1519205ea592d1f1 | [
"MIT"
] | null | null | null | src/overlapper/dovetail_overlap.py | yoshihikosuzuki/RepeatAssembly | a5629affd669c9c029058f6f1519205ea592d1f1 | [
"MIT"
] | null | null | null | from BITS.seq.align import EdlibRunner
from BITS.seq.utils import reverse_seq
er_prefix = EdlibRunner("prefix", revcomp=False, cyclic=False)
def can_be_query(focal_seq, opponent_seq):
"""Check if `focal_seq` can be a query for `opponent_seq`. If `focal_seq` is too long to
map to `opponent_seq`, return False.... | 42.602941 | 100 | 0.688643 |
4a0cd75ad827ec73c9f052e1985296f2a9b15f38 | 134 | py | Python | mabel/operators/minio/__init__.py | mabel-dev/mabel | ee1fdfcfe5fb87d2c5ce4f24b4b7113478ba1b8a | [
"Apache-2.0"
] | null | null | null | mabel/operators/minio/__init__.py | mabel-dev/mabel | ee1fdfcfe5fb87d2c5ce4f24b4b7113478ba1b8a | [
"Apache-2.0"
] | 287 | 2021-05-14T21:25:26.000Z | 2022-03-30T12:02:51.000Z | mabel/operators/minio/__init__.py | gva-jjoyce/mabel | eb99e02d0287b851e65ad9a75b5f4188805d4ec9 | [
"Apache-2.0"
] | 1 | 2021-04-29T18:18:20.000Z | 2021-04-29T18:18:20.000Z | from .minio_batch_writer_operator import MinIoBatchWriterOperator
from .minio_stream_writer_operator import MinIoStreamWriterOperator
| 44.666667 | 67 | 0.925373 |
4a0cd79a415a4741e2b7441d2362e5b5e2a67847 | 2,168 | py | Python | data/dataset/coco_class.py | donnyyou/centerX | 6e381cb669a6014d02e31a43915271237690531c | [
"Apache-2.0"
] | 350 | 2020-12-01T09:55:16.000Z | 2020-12-23T13:47:43.000Z | data/dataset/coco_class.py | powerlic/centerX | 1073753533f26483c3ab053a7d8753708fcacde7 | [
"Apache-2.0"
] | 39 | 2020-12-24T13:42:29.000Z | 2022-02-10T01:09:56.000Z | data/dataset/coco_class.py | powerlic/centerX | 1073753533f26483c3ab053a7d8753708fcacde7 | [
"Apache-2.0"
] | 49 | 2020-12-01T11:39:14.000Z | 2020-12-21T01:45:39.000Z | from detectron2.data import DatasetCatalog, MetadataCatalog
from detectron2.structures import BoxMode
from pycocotools.coco import COCO
import os
__all__ = ["load_coco_class_instances", "register_coco_class"]
# fmt: off
#CLASS_NAMES = ("person",)
# fmt: on
def load_coco_class_instances(json_file, image_root, class... | 30.971429 | 110 | 0.578413 |
4a0cd856272be8d17ffe5802cf7d8cdca05c7b3c | 18,851 | bzl | Python | pex/pex_rules.bzl | makewhatis/bazel_rules_pex | b88dfd0d08e1a59fdb6e63c7193481a5292c872c | [
"Apache-2.0"
] | null | null | null | pex/pex_rules.bzl | makewhatis/bazel_rules_pex | b88dfd0d08e1a59fdb6e63c7193481a5292c872c | [
"Apache-2.0"
] | null | null | null | pex/pex_rules.bzl | makewhatis/bazel_rules_pex | b88dfd0d08e1a59fdb6e63c7193481a5292c872c | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 31.523411 | 155 | 0.66458 |
4a0cdb7cae947bbb27801ff9142f82aaf72a356c | 10,903 | py | Python | kge/util/loss.py | LB0828/EmbedKGQA_Learning | db4bb5a91f99db8a36efdf3ae4f668d60ba018d3 | [
"Apache-2.0"
] | 306 | 2020-05-20T17:21:55.000Z | 2022-03-28T01:40:59.000Z | kge/util/loss.py | Lirkrid/EmbedKGQA | 34d6f70f4de914394314f4a2dae2b4be77d4ba2d | [
"Apache-2.0"
] | 116 | 2020-06-18T09:05:12.000Z | 2022-03-16T03:39:58.000Z | kge/util/loss.py | Lirkrid/EmbedKGQA | 34d6f70f4de914394314f4a2dae2b4be77d4ba2d | [
"Apache-2.0"
] | 81 | 2020-05-31T14:01:09.000Z | 2022-03-22T05:53:09.000Z | import math
import torch
import torch.nn.functional as F
from kge import Config
# Documented losses
# - See description in config-default.yaml
#
# Other, undocumented losses. EXPERIMENTAL, may be removed.
#
# bce_mean (not KvsAll): as BCE but for each positive triple, average the BCE of the
# positive triple and the *... | 39.647273 | 88 | 0.591672 |
4a0cdce4c6bb123a60f948a1b00f89b452266fc6 | 8,918 | py | Python | python/ray/test_utils.py | BrentSouza/ray | 82a5ed3fb57a79b956fa224ed4569c85811d1609 | [
"Apache-2.0"
] | null | null | null | python/ray/test_utils.py | BrentSouza/ray | 82a5ed3fb57a79b956fa224ed4569c85811d1609 | [
"Apache-2.0"
] | null | null | null | python/ray/test_utils.py | BrentSouza/ray | 82a5ed3fb57a79b956fa224ed4569c85811d1609 | [
"Apache-2.0"
] | null | null | null | import asyncio
import errno
import json
import fnmatch
import os
import subprocess
import sys
import time
import socket
import ray
import psutil # We must import psutil after ray because we bundle it with ray.
if sys.platform == "win32":
import _winapi
class RayTestTimeoutException(Exception):
"""Exceptio... | 28.132492 | 79 | 0.615272 |
4a0cdd49cd3dead863998a8f6c3377fba809853b | 137 | py | Python | antarest/study/storage/rawstudy/model/filesystem/exceptions.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2020-09-30T11:40:22.000Z | 2020-11-09T09:06:30.000Z | antarest/study/storage/rawstudy/model/filesystem/exceptions.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | antarest/study/storage/rawstudy/model/filesystem/exceptions.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | class DenormalizationException(Exception):
def __init__(self, msg: str):
super(DenormalizationException, self).__init__(msg)
| 34.25 | 59 | 0.751825 |
4a0cdd7155b61f99abd1facaede40c1f458db2cd | 651 | py | Python | manage.py | JuanCG13/djangoproject | 62fb31300f75e0470f022ecb1ba2ec24e14d244a | [
"MIT"
] | null | null | null | manage.py | JuanCG13/djangoproject | 62fb31300f75e0470f022ecb1ba2ec24e14d244a | [
"MIT"
] | 4 | 2021-03-19T01:21:47.000Z | 2021-09-22T18:48:28.000Z | manage.py | JuanCG13/djangoproject | 62fb31300f75e0470f022ecb1ba2ec24e14d244a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_pjt.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
... | 29.590909 | 75 | 0.662058 |
4a0cde0784c29cb4badf3000bcb836b1178fd636 | 993 | py | Python | script/convert_embedding_to_vocab_txt.py | GMDennis/claf | d1e064e593127e5d654f000f5506c5ae1caab5ce | [
"MIT"
] | 225 | 2019-02-27T06:22:09.000Z | 2022-03-05T23:19:59.000Z | script/convert_embedding_to_vocab_txt.py | GMDennis/claf | d1e064e593127e5d654f000f5506c5ae1caab5ce | [
"MIT"
] | 25 | 2019-03-08T05:04:24.000Z | 2021-09-02T07:19:27.000Z | script/convert_embedding_to_vocab_txt.py | GMDennis/claf | d1e064e593127e5d654f000f5506c5ae1caab5ce | [
"MIT"
] | 41 | 2019-02-27T16:09:30.000Z | 2022-02-09T15:56:09.000Z |
import argparse
def read_embedding_vocabs(file_path):
print("Reading vocabs from file")
vocabs = []
with open(file_path, "rb") as embeddings_file:
for line in embeddings_file:
fields = line.decode("utf-8").rstrip().split(" ")
word = fields[0]
vocabs.append(word... | 30.090909 | 61 | 0.656596 |
4a0cde6de0f6f7ceb318de3276928bb14f0ccbd2 | 2,744 | py | Python | neikea/plugins/__init__.py | vhata/neikea | ad7dbe40a6d5bca9a09f4c9c902fd6a996b637b6 | [
"MIT"
] | null | null | null | neikea/plugins/__init__.py | vhata/neikea | ad7dbe40a6d5bca9a09f4c9c902fd6a996b637b6 | [
"MIT"
] | 1 | 2021-11-09T13:12:56.000Z | 2021-11-09T13:12:56.000Z | neikea/plugins/__init__.py | vhata/neikea | ad7dbe40a6d5bca9a09f4c9c902fd6a996b637b6 | [
"MIT"
] | null | null | null | import logging
import re
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("neikea.plugins")
class Processor(object):
"""Base class for plugins.
Processors receive events and (optionally) do things with them.
The following attributes affect how events are handled:
event_types: Only... | 30.153846 | 78 | 0.598761 |
4a0cdeffdaccb2b45c2d95c145747de19e6e4d05 | 1,972 | py | Python | tests/python_ref/sum_graph.py | T-head-Semi/csi-nn2 | bca6d703fa9d87d6f47c1182f0c3834f5d75b935 | [
"Apache-2.0"
] | 9 | 2021-10-18T09:04:47.000Z | 2022-03-17T22:54:58.000Z | tests/python_ref/sum_graph.py | T-head-Semi/csi-nn2 | bca6d703fa9d87d6f47c1182f0c3834f5d75b935 | [
"Apache-2.0"
] | null | null | null | tests/python_ref/sum_graph.py | T-head-Semi/csi-nn2 | bca6d703fa9d87d6f47c1182f0c3834f5d75b935 | [
"Apache-2.0"
] | 5 | 2021-10-20T18:29:21.000Z | 2022-03-17T22:55:02.000Z | #!/usr/bin/python
#-*- coding:utf-8 -*-
import sys
import struct
import numpy as np
import random
import tensorflow as tf
def reduce_sum_f32():
para = []
# init the input data and parameters
batch = int(np.random.randint(2, high=4, size=1))
in_size_x = int(np.random.randint(8, high=10, size=1))
... | 28.171429 | 93 | 0.641481 |
4a0ce03bdacd18c01b611385fc0f2f8f5f7f35d5 | 544 | py | Python | students/K33401/Goncharov_Vladimir/Lr3/hotel/hotel_app/serializers.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 4 | 2020-09-03T15:41:42.000Z | 2021-12-24T15:28:20.000Z | students/K33401/Goncharov_Vladimir/Lr3/hotel/hotel_app/serializers.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 48 | 2020-09-13T20:22:42.000Z | 2021-04-30T11:13:30.000Z | students/K33401/Goncharov_Vladimir/Lr3/hotel/hotel_app/serializers.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 69 | 2020-09-06T10:32:37.000Z | 2021-11-28T18:13:17.000Z | from rest_framework import serializers
from .models import *
class RoomSerializer(serializers.ModelSerializer):
class Meta:
model = Room
fields = "__all__"
class StaffSerializer(serializers.ModelSerializer):
class Meta:
model = Staff
fields = "__all__"
class GuestSerialize... | 18.133333 | 54 | 0.674632 |
4a0ce0484d033ad8e6a5ed018d97365d7d5506a6 | 20,785 | bzl | Python | rules/docker_config.bzl | perfinion/bazel-toolchains | 7878903ef119a1773660db01622ded9a4161f282 | [
"Apache-2.0"
] | null | null | null | rules/docker_config.bzl | perfinion/bazel-toolchains | 7878903ef119a1773660db01622ded9a4161f282 | [
"Apache-2.0"
] | null | null | null | rules/docker_config.bzl | perfinion/bazel-toolchains | 7878903ef119a1773660db01622ded9a4161f282 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Bazel 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 applicable la... | 39.590476 | 106 | 0.660188 |
4a0ce22fa9f3be15a848fe86a7ed527e07228ddb | 25 | py | Python | keras_tuner/protos/__init__.py | kayzhu/keras-tuner | 32240940cd5814a905aadf8e646497649cbbb046 | [
"Apache-2.0"
] | 2,676 | 2019-06-06T23:02:21.000Z | 2022-03-29T08:04:52.000Z | keras_tuner/protos/__init__.py | kayzhu/keras-tuner | 32240940cd5814a905aadf8e646497649cbbb046 | [
"Apache-2.0"
] | 546 | 2019-06-07T11:31:31.000Z | 2022-03-28T12:16:33.000Z | keras_tuner/protos/__init__.py | kayzhu/keras-tuner | 32240940cd5814a905aadf8e646497649cbbb046 | [
"Apache-2.0"
] | 354 | 2019-06-11T05:59:16.000Z | 2022-03-30T14:53:12.000Z | """KerasTuner protos."""
| 12.5 | 24 | 0.64 |
4a0ce2469e03c7997aa6d3db0d78942e0da4194a | 2,662 | py | Python | instapy/test/test_blur.py | UBC-MDS/TIA_Python | ed6d2bae2aedac7b2c84d5c509e7b3a4c00a09e2 | [
"Apache-2.0"
] | null | null | null | instapy/test/test_blur.py | UBC-MDS/TIA_Python | ed6d2bae2aedac7b2c84d5c509e7b3a4c00a09e2 | [
"Apache-2.0"
] | null | null | null | instapy/test/test_blur.py | UBC-MDS/TIA_Python | ed6d2bae2aedac7b2c84d5c509e7b3a4c00a09e2 | [
"Apache-2.0"
] | null | null | null | #Copyright 2018 Indiana Nikel
#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
# March 2018
# This script tests the function from blur.R.
# This script t... | 40.333333 | 100 | 0.645379 |
4a0ce45aecd14cc58dd99cdbf58a572fe25608a9 | 2,825 | py | Python | ch09/code/ch09-02_point_covers_line_endpoint.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 98 | 2015-06-14T08:42:21.000Z | 2022-03-09T16:48:43.000Z | ch09/code/ch09-02_point_covers_line_endpoint.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 6 | 2015-12-23T09:56:33.000Z | 2022-02-13T20:06:05.000Z | ch09/code/ch09-02_point_covers_line_endpoint.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 43 | 2015-08-24T13:13:32.000Z | 2022-03-14T20:55:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from utils import shp2_geojson_obj
from utils import create_shply_multigeom
from utils import out_geoj
from shapely.geometry import Point, MultiPoint
in_shp_line = "../geodata/topo_line.shp"
in_shp_point = "../geodata/topo_points.shp"
# create our geojson like object fro... | 30.376344 | 73 | 0.664071 |
4a0ce4c7289d0030795dcfcbbfc08dd912ff5d23 | 4,827 | py | Python | stac_fastapi/pgstac/stac_fastapi/pgstac/utils.py | HummingbirdTechGroup/stac-fastapi | 3a08fb2427897d0e5db2e783e87d9375c25aa658 | [
"MIT"
] | null | null | null | stac_fastapi/pgstac/stac_fastapi/pgstac/utils.py | HummingbirdTechGroup/stac-fastapi | 3a08fb2427897d0e5db2e783e87d9375c25aa658 | [
"MIT"
] | null | null | null | stac_fastapi/pgstac/stac_fastapi/pgstac/utils.py | HummingbirdTechGroup/stac-fastapi | 3a08fb2427897d0e5db2e783e87d9375c25aa658 | [
"MIT"
] | null | null | null | """stac-fastapi utility methods."""
from typing import Any, Dict, Optional, Set, Union
from stac_fastapi.types.stac import Item
def filter_fields(
item: Union[Item, Dict[str, Any]],
include: Optional[Set[str]] = None,
exclude: Optional[Set[str]] = None,
) -> Item:
"""Preserve and remove fields as ind... | 41.612069 | 92 | 0.567433 |
4a0ce4f8dedc0cab1ea2ca52aa976d85b9fde9c1 | 12,623 | py | Python | kriging_exploration/src/kriging_exploration/data_grid.py | Jailander/COSMOS | d286ff7402e35a465045019addaedff0429c7781 | [
"MIT"
] | null | null | null | kriging_exploration/src/kriging_exploration/data_grid.py | Jailander/COSMOS | d286ff7402e35a465045019addaedff0429c7781 | [
"MIT"
] | 1 | 2018-03-09T11:21:22.000Z | 2018-03-09T11:21:22.000Z | kriging_exploration/src/kriging_exploration/data_grid.py | Jailander/COSMOS | d286ff7402e35a465045019addaedff0429c7781 | [
"MIT"
] | 3 | 2018-03-07T10:46:18.000Z | 2018-03-13T15:29:51.000Z | import utm
import yaml
import numpy as np
from map_coords import MapCoords
from krigging_data import KriggingDataPoint
from krigging_data import KriggingData
from map_polyareas import MapPolyareas
#def line_intersection(line1, line2):
# #print line1
# #print line2
#
# xdiff = (line1[0][0] - line1[1... | 34.024259 | 107 | 0.530936 |
4a0ce4ff88d64b5ab8d259d08b14cdacb6ff0db9 | 3,146 | py | Python | pennylane/templates/embeddings/angle.py | kareem1925/pennylane | 04bb5ba0fcced558e1273b94b3ea8c39622c5ca4 | [
"Apache-2.0"
] | null | null | null | pennylane/templates/embeddings/angle.py | kareem1925/pennylane | 04bb5ba0fcced558e1273b94b3ea8c39622c5ca4 | [
"Apache-2.0"
] | null | null | null | pennylane/templates/embeddings/angle.py | kareem1925/pennylane | 04bb5ba0fcced558e1273b94b3ea8c39622c5ca4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2020 Xanadu Quantum Technologies 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... | 34.571429 | 113 | 0.675461 |
4a0ce593d58c2f29423cf6a92677bfabf451e790 | 4,255 | py | Python | connexion/decorators/parameter.py | groupnexus/connexion | 15f1b805643f3866760b33f61c7441d4e190afc2 | [
"Apache-2.0"
] | null | null | null | connexion/decorators/parameter.py | groupnexus/connexion | 15f1b805643f3866760b33f61c7441d4e190afc2 | [
"Apache-2.0"
] | null | null | null | connexion/decorators/parameter.py | groupnexus/connexion | 15f1b805643f3866760b33f61c7441d4e190afc2 | [
"Apache-2.0"
] | 1 | 2021-06-06T19:55:30.000Z | 2021-06-06T19:55:30.000Z | import functools
import inspect
import logging
import re
import inflection
from ..http_facts import FORM_CONTENT_TYPES
from ..lifecycle import ConnexionRequest # NOQA
from ..utils import is_json_mimetype, is_xml_mimetype
try:
import builtins
except ImportError: # pragma: no cover
import __builtin__ as buil... | 33.769841 | 119 | 0.675441 |
4a0ce59b9a1f2a5d07437f29bab1f5dc5a61bc32 | 6,060 | py | Python | main.py | idinium96/tf2-autocord | 0add8f54cab052b65855485761f20be115feb2e6 | [
"MIT"
] | 3 | 2020-06-03T06:13:20.000Z | 2021-06-02T10:08:42.000Z | main.py | idinium96/tf2-autocord | 0add8f54cab052b65855485761f20be115feb2e6 | [
"MIT"
] | null | null | null | main.py | idinium96/tf2-autocord | 0add8f54cab052b65855485761f20be115feb2e6 | [
"MIT"
] | 5 | 2020-05-07T19:57:49.000Z | 2021-12-27T18:17:04.000Z | from gevent.monkey import patch_socket, patch_ssl; patch_socket(); patch_ssl()
from aiohttp import ClientSession
from datetime import datetime
from logging import getLogger, Formatter, StreamHandler, FileHandler, DEBUG, ERROR
from os import listdir
from os.path import isfile, join
from sys import stderr
from tra... | 41.506849 | 118 | 0.594719 |
4a0ce69077a143bc62816656ebb3282bf53dd8fb | 10,397 | py | Python | test/functional/feature_llmq_data_recovery.py | mytitanium/Titanium-Core-1.0 | 470e6a0a23de1ea867d693e362d1a0f6ccc12aa7 | [
"MIT"
] | 2 | 2020-12-01T17:15:50.000Z | 2020-12-11T13:29:54.000Z | test/functional/feature_llmq_data_recovery.py | mytitanium/Titanium-Core-1.0 | 470e6a0a23de1ea867d693e362d1a0f6ccc12aa7 | [
"MIT"
] | 1 | 2020-07-27T10:54:07.000Z | 2020-08-28T05:37:26.000Z | test/functional/feature_llmq_data_recovery.py | mytitanium/Titanium-Core-1.0 | 470e6a0a23de1ea867d693e362d1a0f6ccc12aa7 | [
"MIT"
] | 2 | 2020-11-09T16:38:04.000Z | 2021-04-02T05:27:36.000Z | #!/usr/bin/env python3
# Copyright (c) 2021 The Ttm Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import time
from test_framework.mininode import logger
from test_framework.test_framework import TtmTestFramework
... | 56.814208 | 120 | 0.689622 |
4a0ce70f54ff44597e6dfeef2d096fcb6253b9ea | 291 | py | Python | step_impl/base.py | okafke/ddcc-gateway-api-tests | b6fdc529158550c237d29dd252f8a3b40d426010 | [
"Apache-2.0"
] | null | null | null | step_impl/base.py | okafke/ddcc-gateway-api-tests | b6fdc529158550c237d29dd252f8a3b40d426010 | [
"Apache-2.0"
] | null | null | null | step_impl/base.py | okafke/ddcc-gateway-api-tests | b6fdc529158550c237d29dd252f8a3b40d426010 | [
"Apache-2.0"
] | 2 | 2022-02-04T11:10:27.000Z | 2022-02-17T09:06:29.000Z | from getgauge.python import step
from time import sleep
@step("wait for <seconds> seconds")
def wait_for_seconds(seconds):
print(f"Waiting for {seconds} seconds...")
sleep(int(seconds))
@step("Reference <testcase>")
def reference(testcase):
print(f'Reference to {testcase}')
| 20.785714 | 46 | 0.718213 |
4a0ce7c3dea0e9c7053ec1df30f0aa1483a29ed6 | 1,411 | py | Python | paa191t1/dijkstra/datastructs/graph.py | dmmoura/PAA-2021 | 435005f6494ece76f03807fb524e0d4a3e1d7222 | [
"Apache-2.0"
] | null | null | null | paa191t1/dijkstra/datastructs/graph.py | dmmoura/PAA-2021 | 435005f6494ece76f03807fb524e0d4a3e1d7222 | [
"Apache-2.0"
] | null | null | null | paa191t1/dijkstra/datastructs/graph.py | dmmoura/PAA-2021 | 435005f6494ece76f03807fb524e0d4a3e1d7222 | [
"Apache-2.0"
] | null | null | null | class Graph(object):
"""Graph é um wrapper para simplificar e abstrair detalhes de implementação de qualquer biblioteca
de grafos que seja utilizada neste projeto.
Examples:
>>> import networkx as nx
>>> dg = nx.DiGraph()
>>> dg.add_weighted_edges_from([(0, 1, 1), (1, 2, 1), (2, ... | 27.666667 | 102 | 0.579022 |
4a0ce7d71c2c42432e28c07164dacabe55056dd6 | 10,391 | py | Python | scripts/.ipynb_checkpoints/train_bert-checkpoint.py | jerrykuo7727/QA-FGC-embeddings | 23c46b6e4e201c4332c129ea59559c67fb5668b3 | [
"Apache-2.0"
] | 1 | 2020-06-04T10:07:32.000Z | 2020-06-04T10:07:32.000Z | scripts/train_bert.py | jerrykuo7727/QA-FGC-embeddings | 23c46b6e4e201c4332c129ea59559c67fb5668b3 | [
"Apache-2.0"
] | null | null | null | scripts/train_bert.py | jerrykuo7727/QA-FGC-embeddings | 23c46b6e4e201c4332c129ea59559c67fb5668b3 | [
"Apache-2.0"
] | null | null | null | import sys
import numpy as np
from os.path import join
from copy import deepcopy
import torch
from torch.nn.functional import softmax
from torch.nn.utils import clip_grad_norm_
from transformers import BertTokenizer #, BertForQuestionAnswering
from custom_bert import CustomBertForQuestionAnswering as BertForQuestionAn... | 42.586066 | 146 | 0.607064 |
4a0ce8e7e833dc3cc944407e59da911b28b7e18f | 4,464 | py | Python | blueoil/converter/core/params.py | ananno/blueoil | 107c4fc71685159e6bfe077b263ac441d126b602 | [
"Apache-2.0"
] | null | null | null | blueoil/converter/core/params.py | ananno/blueoil | 107c4fc71685159e6bfe077b263ac441d126b602 | [
"Apache-2.0"
] | null | null | null | blueoil/converter/core/params.py | ananno/blueoil | 107c4fc71685159e6bfe077b263ac441d126b602 | [
"Apache-2.0"
] | 1 | 2018-12-21T05:21:04.000Z | 2018-12-21T05:21:04.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 The Blueoil 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
#
# Unles... | 31.659574 | 107 | 0.657258 |
4a0cea6020bf8e461d8bf56fcfdcc9f06b25aa77 | 783 | py | Python | forte/common/__init__.py | AvinashBukkittu/forte | 6d3a7c059ae439d8dde296c88cb92ba7363cbd83 | [
"Apache-2.0"
] | null | null | null | forte/common/__init__.py | AvinashBukkittu/forte | 6d3a7c059ae439d8dde296c88cb92ba7363cbd83 | [
"Apache-2.0"
] | null | null | null | forte/common/__init__.py | AvinashBukkittu/forte | 6d3a7c059ae439d8dde296c88cb92ba7363cbd83 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Forte 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 applicable ... | 39.15 | 74 | 0.771392 |
4a0ced821a897272bea397fa9863f1b1d252061b | 1,491 | py | Python | pycritty/commands/create.py | binRick/pycritty | ae27e61fe597c22e6830d62533e11d64bf06a3ae | [
"MIT"
] | null | null | null | pycritty/commands/create.py | binRick/pycritty | ae27e61fe597c22e6830d62533e11d64bf06a3ae | [
"MIT"
] | null | null | null | pycritty/commands/create.py | binRick/pycritty | ae27e61fe597c22e6830d62533e11d64bf06a3ae | [
"MIT"
] | null | null | null | from typing import Dict, Any, Union
from pathlib import Path
from .. import PycrittyError
from .command import Command
from ..io import log, yio
from ..resources import config_file, saves_dir
from ..resources.resource import ConfigFile
from rich import print, pretty, inspect
from rich.console import Console
console = C... | 33.133333 | 89 | 0.63112 |
4a0cedc4cfca327c8eb41e0b26ebad7e91361c0a | 1,556 | py | Python | Array/763PartitionLabels.py | john-the-dev/leetcode | f1038a5357c841a0d3c8aca1ae1a7d0387f77545 | [
"Apache-2.0"
] | null | null | null | Array/763PartitionLabels.py | john-the-dev/leetcode | f1038a5357c841a0d3c8aca1ae1a7d0387f77545 | [
"Apache-2.0"
] | null | null | null | Array/763PartitionLabels.py | john-the-dev/leetcode | f1038a5357c841a0d3c8aca1ae1a7d0387f77545 | [
"Apache-2.0"
] | null | null | null | # 763. Partition Labels
'''
A string S of lowercase English letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representing the size of these parts.
Example 1:
Input: S = "ababcbacadefegdehijhklij"
Output:... | 35.363636 | 230 | 0.667095 |
4a0ceeb24f8f7c31b09dd9ebbfbcdff786441f9d | 10,196 | py | Python | astropop/image/calibration.py | juliotux/astropop | cb8e5b7527fe04de82d1322615c78510bf0ae5b0 | [
"BSD-3-Clause"
] | 10 | 2018-05-30T19:18:58.000Z | 2021-07-27T08:15:51.000Z | astropop/image/calibration.py | sparc4-dev/astropop | 6d329f09e2274490dc15b2a41d0c5e43c37ee955 | [
"BSD-3-Clause"
] | 8 | 2021-06-16T15:52:50.000Z | 2022-03-30T21:27:38.000Z | astropop/image/calibration.py | juliotux/astropop | cb8e5b7527fe04de82d1322615c78510bf0ae5b0 | [
"BSD-3-Clause"
] | 9 | 2019-06-20T00:33:34.000Z | 2022-03-03T21:52:47.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import numpy as np
import astroscrappy
from ..logger import logger
from .imarith import imarith
from ..framedata import check_framedata
__all__ = ['cosmics_lacosmic', 'gain_correct', 'subtract_bias',
'subtract_dark', 'flat_correct'... | 34.917808 | 79 | 0.653982 |
4a0ceeeb25fa38910adfe75fd0e0ebfc66d10d91 | 9,086 | py | Python | nussl/separation/projet.py | KingStorm/nussl | 78edfdaad16845fc705cefb336a7e6e5923fbcd4 | [
"MIT"
] | null | null | null | nussl/separation/projet.py | KingStorm/nussl | 78edfdaad16845fc705cefb336a7e6e5923fbcd4 | [
"MIT"
] | null | null | null | nussl/separation/projet.py | KingStorm/nussl | 78edfdaad16845fc705cefb336a7e6e5923fbcd4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Projet for spatial audio separation
from this paper:
@inproceedings{fitzgeraldPROJETa,
TITLE = {{PROJET - Spatial Audio Separation Using Projections}},
AUTHOR = {D. Fitzgerald and A. Liutkus and R. Badeau},
BOOKTITLE = {{41st International Conference on Acoustics, Spee... | 41.488584 | 136 | 0.631851 |
4a0cef107d3089b9114e3011b2f20f98b8120a44 | 1,061 | py | Python | CursoEmVideo/Python/Mundo 2/ex044.py | GabriellyBailon/Cursos | 0fe82881638a48dabbfd5963db39d2a0b7d7e4c3 | [
"MIT"
] | null | null | null | CursoEmVideo/Python/Mundo 2/ex044.py | GabriellyBailon/Cursos | 0fe82881638a48dabbfd5963db39d2a0b7d7e4c3 | [
"MIT"
] | null | null | null | CursoEmVideo/Python/Mundo 2/ex044.py | GabriellyBailon/Cursos | 0fe82881638a48dabbfd5963db39d2a0b7d7e4c3 | [
"MIT"
] | null | null | null | #Ler o valor da compra e o modo de pagamento
print("=" * 10, "LOJAS BAILON", "=" * 10);
valor = float(input("Digite o valor da compra: R$"));
print ('''Qual será o meio de pagamento?
[1] à vista dinheiro/cheque
[2] à vista no cartão
[3] em até 2x no cartão
[4] em 3x ou mais no cartão''');
resposta = int(input("... | 35.366667 | 149 | 0.606975 |
4a0cf0ffc5102428e3efb1b0d94009e1aeabae72 | 8,912 | py | Python | back-end/www/grad_cam_viz.py | yenchiah/deep-smoke-machine | 5f779f723a3c891145db43663c8825f9ab55dc74 | [
"BSD-3-Clause"
] | 88 | 2019-05-29T07:38:45.000Z | 2022-03-17T01:50:50.000Z | back-end/www/grad_cam_viz.py | yenchiah/deep-smoke-machine | 5f779f723a3c891145db43663c8825f9ab55dc74 | [
"BSD-3-Clause"
] | 6 | 2019-05-30T08:47:07.000Z | 2021-09-01T07:45:54.000Z | back-end/www/grad_cam_viz.py | yenchiah/deep-smoke-machine | 5f779f723a3c891145db43663c8825f9ab55dc74 | [
"BSD-3-Clause"
] | 22 | 2019-06-17T01:15:35.000Z | 2021-11-17T10:29:00.000Z | """
Modified from https://github.com/utkuozbulak/pytorch-cnn-visualizations
"""
from PIL import Image
import matplotlib.cm as mpl_color_map
import numpy as np
import torch
import sys
import os
import copy
from torch.nn.parallel import DistributedDataParallel as DDP
from torchvision import models
from i3d_learner import... | 38.413793 | 115 | 0.647666 |
4a0cf1189d18aef927eacf0ea39c7c8cdc43fc13 | 1,816 | py | Python | K-Means/main.py | PBonnema/Applied-AI-Assignments | f5804a4cea899b7a77981a7d1329750726a6444a | [
"MIT"
] | 4 | 2019-09-26T19:28:18.000Z | 2021-11-01T10:30:12.000Z | K-Means/main.py | PBonnema/Applied-AI-Assignments | f5804a4cea899b7a77981a7d1329750726a6444a | [
"MIT"
] | 1 | 2019-04-27T15:22:22.000Z | 2019-04-27T15:22:22.000Z | K-Means/main.py | PBonnema/Applied-AI-Assignments | f5804a4cea899b7a77981a7d1329750726a6444a | [
"MIT"
] | 5 | 2019-05-27T07:52:14.000Z | 2020-12-06T08:44:35.000Z | from importData import import_training_data, import_validation_data, import_unlabeled
from KMeans import KMeans
import numpy as np
# Import the training data, validation data, and the unlabeled data
training_labels, training_samples = import_training_data('..\\dataset1.csv')
labeled_samples = import_unlabeled('..\\da... | 50.444444 | 161 | 0.789648 |
4a0cf1841c9d6abd19ab57616f8ac4cf08eda6ce | 6,500 | py | Python | tests/suggestions/test_suggest_team_media_controller.py | tervay/the-blue-alliance | e14c15cb04b455f90a2fcfdf4c1cdbf8454e17f8 | [
"MIT"
] | 1 | 2016-03-19T20:29:35.000Z | 2016-03-19T20:29:35.000Z | tests/suggestions/test_suggest_team_media_controller.py | gregmarra/the-blue-alliance | 5bedaf5c80b4623984760d3da3289640639112f9 | [
"MIT"
] | 11 | 2020-10-10T03:05:29.000Z | 2022-02-27T09:57:22.000Z | tests/suggestions/test_suggest_team_media_controller.py | gregmarra/the-blue-alliance | 5bedaf5c80b4623984760d3da3289640639112f9 | [
"MIT"
] | null | null | null | import unittest2
import webapp2
import webtest
from google.appengine.ext import ndb
from google.appengine.ext import testbed
from webapp2_extras.routes import RedirectRoute
from controllers.suggestions.suggest_team_media_controller import SuggestTeamMediaController, \
SuggestTeamSocialMediaController
from models.... | 34.946237 | 139 | 0.657231 |
4a0cf1fa97c185418a0ffbcb051625ed5df46f03 | 248 | py | Python | giico/giico/doctype/test_3/test_3.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | giico/giico/doctype/test_3/test_3.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | giico/giico/doctype/test_3/test_3.py | thispl/giico | 14c5631639ab56a586a7962be9871d722c20e205 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, VHRS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class Test3(Document):
pass
| 22.545455 | 49 | 0.766129 |
4a0cf2b50f5b2fa0f6f30013de45476e0e551b7a | 6,217 | py | Python | lib/data_pre_processing/utils.py | initze/thaw-slump-segmentation | 894874dc68be1f46385ec12531267e2404224408 | [
"MIT"
] | 3 | 2021-11-04T06:33:22.000Z | 2022-01-20T13:26:41.000Z | lib/data_pre_processing/utils.py | initze/thaw-slump-segmentation | 894874dc68be1f46385ec12531267e2404224408 | [
"MIT"
] | 20 | 2021-10-06T06:08:08.000Z | 2022-03-28T09:49:44.000Z | lib/data_pre_processing/utils.py | initze/thaw-slump-segmentation | 894874dc68be1f46385ec12531267e2404224408 | [
"MIT"
] | 1 | 2021-10-07T13:48:19.000Z | 2021-10-07T13:48:19.000Z | # Copyright (c) Ingmar Nitze and Konrad Heidler
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import glob
import os
import shutil
import numpy as np
import rasterio as rio
from .udm import burn_mask
from ..utils import get_logger, log_run
... | 37.908537 | 166 | 0.66479 |
4a0cf418face55bf44d8b5ae2b2fedb2c9570cdb | 5,704 | py | Python | agent/optim/loss.py | jbr-ai-labs/mamba | bd05023bd0d66f89ffbe42c315c4c4a6612b8fb4 | [
"MIT"
] | 3 | 2022-02-08T20:23:18.000Z | 2022-02-11T13:49:14.000Z | agent/optim/loss.py | jbr-ai-labs/mamba | bd05023bd0d66f89ffbe42c315c4c4a6612b8fb4 | [
"MIT"
] | null | null | null | agent/optim/loss.py | jbr-ai-labs/mamba | bd05023bd0d66f89ffbe42c315c4c4a6612b8fb4 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import wandb
import torch.nn.functional as F
from agent.optim.utils import rec_loss, compute_return, state_divergence_loss, calculate_ppo_loss, \
batch_multi_agent, log_prob_loss, info_loss
from agent.utils.params import FreezeParameters
from networks.dreamer.rnns import rollout_rep... | 51.387387 | 118 | 0.667952 |
4a0cf44e79ed6619aeeeab672066a7d234b25447 | 5,152 | py | Python | venv/Lib/site-packages/msrestazure/polling/async_arm_polling.py | Uma0221/AI-102-AIEngineer | 32112b354e81cb5d8790b9c2b4f733ef5740a19f | [
"MIT"
] | 20 | 2016-10-17T22:28:24.000Z | 2021-07-21T21:24:50.000Z | venv/Lib/site-packages/msrestazure/polling/async_arm_polling.py | Uma0221/AI-102-AIEngineer | 32112b354e81cb5d8790b9c2b4f733ef5740a19f | [
"MIT"
] | 113 | 2016-10-24T22:51:51.000Z | 2022-03-08T17:43:21.000Z | venv/Lib/site-packages/msrestazure/polling/async_arm_polling.py | Uma0221/AI-102-AIEngineer | 32112b354e81cb5d8790b9c2b4f733ef5740a19f | [
"MIT"
] | 38 | 2016-10-24T17:59:16.000Z | 2022-02-14T21:38:29.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), ... | 40.888889 | 112 | 0.662849 |
4a0cf486c2fbeae6a380020e9c540b95f48c59a0 | 20,429 | py | Python | data/get_bert_embeddings/pretrain_on_vcr.py | yuweijiang/HGL-pytorch | 80238500b96edf051d750670de7300168e456424 | [
"MIT"
] | 50 | 2019-11-01T17:13:19.000Z | 2022-03-19T14:11:35.000Z | data/get_bert_embeddings/pretrain_on_vcr.py | yuweijiang/HGL-pytorch | 80238500b96edf051d750670de7300168e456424 | [
"MIT"
] | 7 | 2019-12-13T13:49:36.000Z | 2021-01-25T06:36:12.000Z | data/get_bert_embeddings/pretrain_on_vcr.py | yuweijiang/HGL-pytorch | 80238500b96edf051d750670de7300168e456424 | [
"MIT"
] | 14 | 2019-12-05T06:25:00.000Z | 2022-03-04T10:46:05.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 41.948665 | 113 | 0.644721 |
4a0cf4aa7b42c97b661bf312e731776a6315ccc1 | 1,958 | py | Python | alipay/aop/api/response/KoubeiMemberDataOauthQueryResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/KoubeiMemberDataOauthQueryResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/KoubeiMemberDataOauthQueryResponse.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class KoubeiMemberDataOauthQueryResponse(AlipayResponse):
def __init__(self):
super(KoubeiMemberDataOauthQueryResponse, self).__init__()
self._ext_info = None... | 29.666667 | 107 | 0.6762 |
4a0cf542e794e13426ef840e9f374f8e7f0a0964 | 222 | py | Python | pyFileFixity/lib/gooey/__main__.py | lrq3000/rfigc | a68021a506fee1aabea6b2fb88e685de347d900f | [
"MIT"
] | 82 | 2015-03-20T18:43:37.000Z | 2022-03-05T13:23:12.000Z | pyFileFixity/lib/gooey/__main__.py | lrq3000/rfigc | a68021a506fee1aabea6b2fb88e685de347d900f | [
"MIT"
] | 9 | 2015-12-05T17:32:14.000Z | 2021-06-11T15:51:38.000Z | pyFileFixity/lib/gooey/__main__.py | hadi-f90/pyFileFixity | 2cb3dd6225a6b062a98fa2d61c4a0a29d8010428 | [
"MIT"
] | 10 | 2015-12-13T18:51:44.000Z | 2022-02-21T10:50:28.000Z | # '''
# Delegates arguments to the main Gooey runner
#
# For use when run directly from command line with the -m (module) flag:
#
# e.g. $ python -m gooey
#
# '''
#
# from gooey import application
#
# application.main()
| 17.076923 | 72 | 0.662162 |
4a0cf572983e9f76f36dece4f158b8966f464bf9 | 12,422 | py | Python | keystoneclient/tests/auth/test_identity_common.py | alexpilotti/python-keystoneclient | 44409f02c2b052a78baac1344746e9af44ad1efc | [
"Apache-1.1"
] | 5 | 2017-03-21T09:11:55.000Z | 2018-11-19T14:44:36.000Z | keystoneclient/tests/auth/test_identity_common.py | alexpilotti/python-keystoneclient | 44409f02c2b052a78baac1344746e9af44ad1efc | [
"Apache-1.1"
] | 3 | 2018-02-06T06:17:10.000Z | 2020-07-10T17:29:47.000Z | keystoneclient/tests/auth/test_identity_common.py | alexpilotti/python-keystoneclient | 44409f02c2b052a78baac1344746e9af44ad1efc | [
"Apache-1.1"
] | 7 | 2018-02-06T03:54:13.000Z | 2021-09-08T10:51:38.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 34.795518 | 79 | 0.591129 |
4a0cf5e1c5c44f0c89d3f72c13e85ed43920ec08 | 56,104 | py | Python | tests/test_modeling_common.py | suakow/transformers | 0ec3619bb2c212737d2472cccaf6658317d2bfa1 | [
"Apache-2.0"
] | 3 | 2021-06-17T16:32:40.000Z | 2021-08-31T09:00:08.000Z | tests/test_modeling_common.py | suakow/transformers | 0ec3619bb2c212737d2472cccaf6658317d2bfa1 | [
"Apache-2.0"
] | null | null | null | tests/test_modeling_common.py | suakow/transformers | 0ec3619bb2c212737d2472cccaf6658317d2bfa1 | [
"Apache-2.0"
] | 1 | 2021-06-17T16:32:43.000Z | 2021-06-17T16:32:43.000Z | # coding=utf-8
# Copyright 2019 HuggingFace 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 ag... | 43.62675 | 315 | 0.629848 |
4a0cf616e30414635fb4b6f05820258698f3ebd8 | 24,032 | py | Python | tests/providers/google/cloud/operators/test_spanner.py | dorranh/airflow | 1a9a2cadcf8606cfcb729d1323dd33dfacc64633 | [
"Apache-2.0"
] | null | null | null | tests/providers/google/cloud/operators/test_spanner.py | dorranh/airflow | 1a9a2cadcf8606cfcb729d1323dd33dfacc64633 | [
"Apache-2.0"
] | 1 | 2019-05-14T14:32:40.000Z | 2019-05-14T14:32:40.000Z | tests/providers/google/cloud/operators/test_spanner.py | dorranh/airflow | 1a9a2cadcf8606cfcb729d1323dd33dfacc64633 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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
#... | 44.835821 | 101 | 0.665654 |
4a0cf7c268eb0a04d2349e048189f2b66741caf2 | 64 | py | Python | data_analysis/__init__.py | soggyheron/2018aguOSS | c304ef93cba6fbfe1093ca82b13846b330e0b70a | [
"MIT"
] | null | null | null | data_analysis/__init__.py | soggyheron/2018aguOSS | c304ef93cba6fbfe1093ca82b13846b330e0b70a | [
"MIT"
] | null | null | null | data_analysis/__init__.py | soggyheron/2018aguOSS | c304ef93cba6fbfe1093ca82b13846b330e0b70a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from data_analysis.data_analysis import *
| 21.333333 | 41 | 0.796875 |
4a0cf82899791b851887306d6d67305e189a0d9c | 7,000 | py | Python | noxfile.py | anweshan/python-analytics-data | abba4bfcb7ed258edba0fe642f491b9ce879b155 | [
"Apache-2.0"
] | null | null | null | noxfile.py | anweshan/python-analytics-data | abba4bfcb7ed258edba0fe642f491b9ce879b155 | [
"Apache-2.0"
] | null | null | null | noxfile.py | anweshan/python-analytics-data | abba4bfcb7ed258edba0fe642f491b9ce879b155 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2018 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... | 29.045643 | 87 | 0.623286 |
4a0cfa516e7daf783cdbe010ee7fc4c2aee9fbb1 | 32 | py | Python | hckcli/test/test_main.py | zealsham/Hckcli | 6cabbfd730894e540578d137faccbcffd7b41ba9 | [
"MIT"
] | null | null | null | hckcli/test/test_main.py | zealsham/Hckcli | 6cabbfd730894e540578d137faccbcffd7b41ba9 | [
"MIT"
] | null | null | null | hckcli/test/test_main.py | zealsham/Hckcli | 6cabbfd730894e540578d137faccbcffd7b41ba9 | [
"MIT"
] | null | null | null | import hckcli.main
import pytest | 16 | 18 | 0.875 |
4a0cfa87dc3b4aecd6d93c8515932525b5930c42 | 2,029 | py | Python | Python/OOP/game2/complete/Character.py | sug5806/TIL | 2309d8a270e4a7b8961268a40b6492c5db317e37 | [
"MIT"
] | null | null | null | Python/OOP/game2/complete/Character.py | sug5806/TIL | 2309d8a270e4a7b8961268a40b6492c5db317e37 | [
"MIT"
] | 102 | 2020-02-12T00:10:33.000Z | 2022-03-11T23:58:41.000Z | Python/OOP/game2/complete/Character.py | sug5806/TIL | 2309d8a270e4a7b8961268a40b6492c5db317e37 | [
"MIT"
] | null | null | null | # 확장할 때 마다 Character 클래스와
# Monster 클래스의 코드가 변한다.
from abc import ABCMeta, abstractmethod
from attack_kind import AttackKindFactory
class Character(metaclass=ABCMeta):
def __init__(self, name, hp, power):
self.name = name
self.hp = hp
self.power = power
@abstractmethod
def attack(... | 27.053333 | 69 | 0.601774 |
4a0cfb45549314650ad075aee54c2d24681c9c42 | 7,364 | py | Python | resistance_manager.py | charterchap/nimi-basics | f224759e5f640968b004bc1984b8dccbf8f6d263 | [
"Apache-2.0"
] | null | null | null | resistance_manager.py | charterchap/nimi-basics | f224759e5f640968b004bc1984b8dccbf8f6d263 | [
"Apache-2.0"
] | null | null | null | resistance_manager.py | charterchap/nimi-basics | f224759e5f640968b004bc1984b8dccbf8f6d263 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""
Author Jeff Charter Chapman
Except Subset Sum implementation modified from saltycrane
A Resistance Manager instance can manage 1 channel on the NI PXI 2722 card
There are 16 possible channels
"""
import sys
import niswitch
import logging
log = logging.getLogger(__name__)
class ResistanceMa... | 36.455446 | 92 | 0.585959 |
4a0cfbbae42bf1c34a4fa99d1ae3cc790f6ddf03 | 96 | py | Python | venv/lib/python3.8/site-packages/rope/refactor/importutils/importinfo.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/rope/refactor/importutils/importinfo.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/rope/refactor/importutils/importinfo.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/1e/b2/0d/788e18b255706aed6aa24dd35bcfd12f8ca64d5de6a36c978a2136918d | 96 | 96 | 0.895833 |
4a0cfc0ad62f9ca5025ecb648e9385c93bd8c4c5 | 965 | py | Python | merger/merge_patients.py | IraKorshunova/kaggle-seizure-detection | c9b72dfcf1dfe4c80a099781210c98b9f72745c0 | [
"MIT"
] | 1 | 2020-12-18T16:15:32.000Z | 2020-12-18T16:15:32.000Z | merger/merge_patients.py | IraKorshunova/kaggle-seizure-detection | c9b72dfcf1dfe4c80a099781210c98b9f72745c0 | [
"MIT"
] | null | null | null | merger/merge_patients.py | IraKorshunova/kaggle-seizure-detection | c9b72dfcf1dfe4c80a099781210c98b9f72745c0 | [
"MIT"
] | 1 | 2020-12-18T16:15:36.000Z | 2020-12-18T16:15:36.000Z | from pandas import read_csv, merge
import csv
import sys
def merge_csv_data(seizure_path, early_path, patients, submission_name):
with open('submission_'+submission_name+'.csv', 'wb') as f:
writer = csv.writer(f)
writer.writerow(['clip', 'seizure', 'early'])
for patient in patients:
d... | 37.115385 | 116 | 0.645596 |
4a0cfc907c98f0a309594e63ca8578374d765f2d | 760 | py | Python | tests/test_tytest.py | typhoon-hil/pytest-typhoon-config | 3c964c7d46c6228b727c5aa613ecc279ad497a1f | [
"MIT"
] | null | null | null | tests/test_tytest.py | typhoon-hil/pytest-typhoon-config | 3c964c7d46c6228b727c5aa613ecc279ad497a1f | [
"MIT"
] | null | null | null | tests/test_tytest.py | typhoon-hil/pytest-typhoon-config | 3c964c7d46c6228b727c5aa613ecc279ad497a1f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def test_parameters(testdir):
test_config = """
param1 = range(10)
param2 = ['a', 'b', 'c']
even_values = [v for v in range(20) if v % 2 == 0]
"""
test_example = """
import pytest
from tytest.config.runtime_settings import Config as C
pytest_plugins = "pyt... | 26.206897 | 61 | 0.639474 |
4a0cfd206328400228d641cce69e03bc4e9b9e37 | 13,579 | py | Python | geoloc-server/ppmeasurements/util.py | muzammilar/passport | 7918561916fbcb5e82cd73d577873fb17a819d19 | [
"BSD-3-Clause"
] | 1 | 2021-12-06T01:32:56.000Z | 2021-12-06T01:32:56.000Z | geoloc-server/ppmeasurements/util.py | muzammilar/passport | 7918561916fbcb5e82cd73d577873fb17a819d19 | [
"BSD-3-Clause"
] | null | null | null | geoloc-server/ppmeasurements/util.py | muzammilar/passport | 7918561916fbcb5e82cd73d577873fb17a819d19 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
ppmeasurements.util
~~~~~~~~~~~~~~
This module contains utility functions for parsing information,
checking for non-global IP address, convert traceroutes to machine-readable
structures, etc.
:author: Muzammil Abdul Rehman
:copyright: Northeastern University © ... | 41.148485 | 198 | 0.579498 |
4a0cfd922adfd5e43bad9ac16d1a9f58c1c10c53 | 2,324 | py | Python | alipay/aop/api/domain/QueryGroup.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/QueryGroup.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/QueryGroup.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.QueryComplexLabelRule import QueryComplexLabelRule
class QueryGroup(object):
def __init__(self):
self._id = None
self._label_rule = None
... | 28 | 86 | 0.54475 |
4a0cfe4df8d53f017bbee7a399b7b52e97a7e02b | 11,883 | py | Python | app.py | aeturrell/uk-economy-app | 915272d9843f5bf4ad6ace1d5353e7ae58a7b6be | [
"MIT"
] | null | null | null | app.py | aeturrell/uk-economy-app | 915272d9843f5bf4ad6ace1d5353e7ae58a7b6be | [
"MIT"
] | null | null | null | app.py | aeturrell/uk-economy-app | 915272d9843f5bf4ad6ace1d5353e7ae58a7b6be | [
"MIT"
] | null | null | null | import streamlit as st
import altair as alt
import pandas as pd
import numpy as np
import requests
import matplotlib.pyplot as plt
import plotly.express as px
from pathlib import Path
from functools import lru_cache
import statsmodels.formula.api as smf
from datetime import datetime
import pandasdmx as pdmx
plt.style.... | 30.469231 | 300 | 0.557098 |
4a0cfe66acb8c6b7cdc4066558f27579e4c5aa56 | 941 | py | Python | tests/kyu_5_tests/test_readability_is_king.py | the-zebulan/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 40 | 2016-03-09T12:26:20.000Z | 2022-03-23T08:44:51.000Z | tests/kyu_5_tests/test_readability_is_king.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | null | null | null | tests/kyu_5_tests/test_readability_is_king.py | akalynych/CodeWars | 1eafd1247d60955a5dfb63e4882e8ce86019f43a | [
"MIT"
] | 36 | 2016-11-07T19:59:58.000Z | 2022-03-31T11:18:27.000Z | import unittest
from katas.kyu_5.readability_is_king import flesch_kincaid
class FleschKincaidTestCase(unittest.TestCase):
def test_equals(self):
self.assertEqual(flesch_kincaid('The turtle is leaving.'), 3.67)
def test_equals_2(self):
self.assertEqual(flesch_kincaid('A good book is hard to ... | 34.851852 | 79 | 0.670563 |
4a0cfedd3f80b113a97d5c0a256a8057e7a32f0d | 1,101 | py | Python | python/src/year2020/day25.py | Farbfetzen/Advent_of_Code | 246a7db8992bcff19fc0848cc6e5f556ab77cbfc | [
"MIT"
] | 4 | 2021-12-07T14:06:11.000Z | 2022-03-05T04:23:11.000Z | python/src/year2020/day25.py | Farbfetzen/Advent_of_Code | 246a7db8992bcff19fc0848cc6e5f556ab77cbfc | [
"MIT"
] | 6 | 2021-11-23T20:50:18.000Z | 2022-03-06T13:42:21.000Z | python/src/year2020/day25.py | Farbfetzen/Advent_of_Code | 246a7db8992bcff19fc0848cc6e5f556ab77cbfc | [
"MIT"
] | 5 | 2021-12-11T23:22:22.000Z | 2022-01-25T13:35:02.000Z | # https://adventofcode.com/2020/day/25
# No part 2 on the 25th.
from src.util.types import Data, Solution
def prepare_data(data: str) -> list[int]:
return [int(x) for x in data.splitlines()]
def part_1(public_keys):
value = 1
found = 0
loop_sizes = [0, 0]
i = 0
while True:
i += 1
... | 25.604651 | 76 | 0.634877 |
4a0cff3731566baa709ad58f4e75106516c1eb92 | 53,333 | py | Python | src/zipline/testing/core.py | chronoverse/zipline-reloaded | c07be2e2b48fded0295d074ea1e7b11047946090 | [
"Apache-2.0"
] | 254 | 2021-03-29T16:18:39.000Z | 2022-03-31T22:06:01.000Z | src/zipline/testing/core.py | chronoverse/zipline-reloaded | c07be2e2b48fded0295d074ea1e7b11047946090 | [
"Apache-2.0"
] | 52 | 2021-04-06T01:46:24.000Z | 2022-03-29T20:54:19.000Z | src/zipline/testing/core.py | chronoverse/zipline-reloaded | c07be2e2b48fded0295d074ea1e7b11047946090 | [
"Apache-2.0"
] | 53 | 2021-04-05T14:43:29.000Z | 2022-03-31T22:06:04.000Z | from abc import ABCMeta, abstractmethod, abstractproperty
from contextlib import contextmanager
import gzip
from itertools import (
combinations,
count,
product,
)
import json
import operator
import os
from os.path import abspath, dirname, join, realpath
import shutil
import sys
import tempfile
from traceba... | 29.844992 | 88 | 0.615979 |
4a0cff730de7019888973a95710c46b497d150fb | 18,031 | py | Python | line_extraction_primitives/grid.py | LBNL-ETA/a3dbr | 1dcfeac560e4f859812258cb7021fa664aa35644 | [
"BSD-3-Clause-LBNL"
] | 2 | 2021-03-05T19:00:14.000Z | 2021-09-08T17:03:50.000Z | line_extraction_primitives/grid.py | LBNL-ETA/a3dbr | 1dcfeac560e4f859812258cb7021fa664aa35644 | [
"BSD-3-Clause-LBNL"
] | null | null | null | line_extraction_primitives/grid.py | LBNL-ETA/a3dbr | 1dcfeac560e4f859812258cb7021fa664aa35644 | [
"BSD-3-Clause-LBNL"
] | null | null | null | import line_extraction_primitives.extraction_helper_methods as hm
from scipy import ndimage
from scipy.signal import medfilt
from line_extraction_primitives.cell import Cell
from line_extraction_primitives.line import Line
import numpy as np
import math
class Grid:
"""Initialize the grid from a set of poin... | 41.166667 | 152 | 0.600743 |
4a0d004252e7e7c7f61a25aaf3fa7b76e6fd6b6f | 32,994 | py | Python | src/ansible_navigator/ui_framework/ui.py | saito-hideki/ansible-navigator | 0a15b83c2a9a548315765360bd19d6fd270862d4 | [
"Apache-2.0"
] | null | null | null | src/ansible_navigator/ui_framework/ui.py | saito-hideki/ansible-navigator | 0a15b83c2a9a548315765360bd19d6fd270862d4 | [
"Apache-2.0"
] | 8 | 2021-12-13T20:56:47.000Z | 2022-03-10T14:53:04.000Z | src/ansible_navigator/ui_framework/ui.py | alisonlhart/ansible-navigator | 006db536ef1ea5b38a195a21ae7c0729d995bebc | [
"Apache-2.0"
] | null | null | null | # cspell:ignore KEY_NPAGE, KEY_PPAGE
"""the main UI renderer
"""
import curses
import logging
import re
from collections.abc import Mapping
from curses import ascii as curses_ascii
from functools import lru_cache
from math import ceil
from math import floor
from typing import Any
from typing import Callable
from typin... | 35.941176 | 100 | 0.57665 |
4a0d00d8b7f643aff6448ee44fcfeadf7dadf21f | 17,759 | py | Python | tools/test_idf_tools/test_idf_tools.py | mishafarms/esp-idf | b886dc699880e6f068d5abc0433deb60a6466fee | [
"Apache-2.0"
] | 5 | 2021-11-22T06:47:54.000Z | 2022-01-04T06:58:43.000Z | tools/test_idf_tools/test_idf_tools.py | mishafarms/esp-idf | b886dc699880e6f068d5abc0433deb60a6466fee | [
"Apache-2.0"
] | null | null | null | tools/test_idf_tools/test_idf_tools.py | mishafarms/esp-idf | b886dc699880e6f068d5abc0433deb60a6466fee | [
"Apache-2.0"
] | 1 | 2021-11-19T14:07:54.000Z | 2021-11-19T14:07:54.000Z | #!/usr/bin/env python
#
# SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import os
import shutil
import sys
import tempfile
import unittest
try:
from contextlib import redirect_stdout
except ImportError:
import contextlib
@contextlib.contextman... | 55.496875 | 118 | 0.685681 |
4a0d010e92af0c39726fe15c4eaee78e231a4ebc | 3,751 | py | Python | sapp/lint.py | arpancodes/sapp | 709ffae4d4f35ffd9a85e2ff272df1b979aeb51b | [
"MIT"
] | 1 | 2021-06-17T16:32:58.000Z | 2021-06-17T16:32:58.000Z | sapp/lint.py | EdOverflow/sapp | ecb2b54c27294aa3b2d7fc52c186053b6349cb11 | [
"MIT"
] | 11 | 2021-07-20T11:28:54.000Z | 2021-12-11T16:28:03.000Z | sapp/lint.py | EdOverflow/sapp | ecb2b54c27294aa3b2d7fc52c186053b6349cb11 | [
"MIT"
] | 1 | 2021-06-17T16:33:01.000Z | 2021-06-17T16:33:01.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import json
from operator import itemgetter
from pathlib import Path
from typing import List
import click
from sqlalchemy.orm import aliased
... | 35.056075 | 81 | 0.625167 |
4a0d017b052d903f5bf426bf9eb53a2e0b354aeb | 437 | py | Python | meeting-rooms-ii/meeting-rooms-ii.py | Dongfang1021/Leetcode | 4ecdad3279300720e92eeac683962ebc52c98a12 | [
"MIT"
] | 1 | 2021-06-05T06:26:32.000Z | 2021-06-05T06:26:32.000Z | meeting-rooms-ii/meeting-rooms-ii.py | Dongfang1021/Leetcode | 4ecdad3279300720e92eeac683962ebc52c98a12 | [
"MIT"
] | null | null | null | meeting-rooms-ii/meeting-rooms-ii.py | Dongfang1021/Leetcode | 4ecdad3279300720e92eeac683962ebc52c98a12 | [
"MIT"
] | null | null | null | class Solution:
def minMeetingRooms(self, intervals: List[List[int]]) -> int:
if not intervals:
return 0
free_rooms = []
intervals.sort(key = lambda x: x[0])
heapq.heappush(free_rooms, intervals[0][1])
for i in intervals[1:]:
if free_rooms[0] <= i[0]:
... | 36.416667 | 65 | 0.560641 |
4a0d01cf32cda31207d23be5d661003d41c429cb | 3,040 | py | Python | templot/plot_polar_bar_evolution_interactive.py | khllkcm/templot | 9ba85f35c0e7a3a8c238071be4911c25c03a3883 | [
"MIT"
] | null | null | null | templot/plot_polar_bar_evolution_interactive.py | khllkcm/templot | 9ba85f35c0e7a3a8c238071be4911c25c03a3883 | [
"MIT"
] | null | null | null | templot/plot_polar_bar_evolution_interactive.py | khllkcm/templot | 9ba85f35c0e7a3a8c238071be4911c25c03a3883 | [
"MIT"
] | null | null | null | """
Plot Interactive polar bar.
"""
import plotly.express as px
import pandas as pd
import warnings
def plot_polar_bar_evolution_interactive(
df, var, year, group="Regions", agr="average"
):
"""
Plots an interactive animated polar bar showing the evolution of a variable by group across year.
:param... | 30.09901 | 140 | 0.613158 |
4a0d01f2059cd52325fba0f7cc096fc5c3adcef3 | 3,372 | py | Python | merlinskinthemes/src/MerlinSkinThemesHelp.py | FoxyRabbit67/enigma2-plugins | f6b94012726931fdf28e80a26226aec612b350de | [
"Linux-OpenIB"
] | 41 | 2016-01-21T17:54:44.000Z | 2021-06-26T05:54:41.000Z | merlinskinthemes/src/MerlinSkinThemesHelp.py | FoxyRabbit67/enigma2-plugins | f6b94012726931fdf28e80a26226aec612b350de | [
"Linux-OpenIB"
] | 22 | 2016-11-16T11:25:26.000Z | 2021-12-13T09:13:06.000Z | merlinskinthemes/src/MerlinSkinThemesHelp.py | FoxyRabbit67/enigma2-plugins | f6b94012726931fdf28e80a26226aec612b350de | [
"Linux-OpenIB"
] | 62 | 2016-02-05T22:55:48.000Z | 2022-03-12T21:48:22.000Z | from Components.ActionMap import ActionMap
from Components.MenuList import MenuList
from Screens.Screen import Screen
from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_HALIGN_RIGHT, RT_VALIGN_CENTER
from skin import TemplatedListFonts, componentSizes
class MerlinSkinThemesHelp... | 44.368421 | 159 | 0.744662 |
4a0d02fc4a226a0d096965019d24c8eab76780c3 | 6,529 | py | Python | youtube_dlc/postprocessor/embedthumbnail.py | jesterjunk/yt-dlc | 4bc4befc082268fae1af3ffa43fcc3f8b3788b8c | [
"Unlicense"
] | 30 | 2020-11-03T03:11:20.000Z | 2022-02-24T07:54:27.000Z | youtube_dlc/postprocessor/embedthumbnail.py | jesterjunk/yt-dlc | 4bc4befc082268fae1af3ffa43fcc3f8b3788b8c | [
"Unlicense"
] | 1 | 2020-11-29T05:56:09.000Z | 2020-11-29T05:56:09.000Z | youtube_dlc/postprocessor/embedthumbnail.py | jesterjunk/yt-dlc | 4bc4befc082268fae1af3ffa43fcc3f8b3788b8c | [
"Unlicense"
] | 11 | 2020-11-03T06:46:06.000Z | 2022-02-08T13:10:50.000Z | # coding: utf-8
from __future__ import unicode_literals
import os
import subprocess
from .ffmpeg import FFmpegPostProcessor
from ..utils import (
check_executable,
encodeArgument,
encodeFilename,
PostProcessingError,
prepend_extension,
replace_extension,
shell_quote
)
class EmbedThumbn... | 44.719178 | 118 | 0.642212 |
4a0d038d71c0a1be7b444b07d2ff1a2a347f97ac | 62,477 | py | Python | src-py/libcloud-trunk/libcloud/test/compute/test_ec2.py | Schnitzl42/JLibcloud | 42914a5e1b0e80b2d2fd61a37592998ecb4a4de1 | [
"Apache-2.0"
] | 1 | 2016-01-30T19:23:16.000Z | 2016-01-30T19:23:16.000Z | src-py/libcloud-trunk/libcloud/test/compute/test_ec2.py | Schnitzl42/JLibcloud | 42914a5e1b0e80b2d2fd61a37592998ecb4a4de1 | [
"Apache-2.0"
] | null | null | null | src-py/libcloud-trunk/libcloud/test/compute/test_ec2.py | Schnitzl42/JLibcloud | 42914a5e1b0e80b2d2fd61a37592998ecb4a4de1 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 42.792466 | 119 | 0.632697 |
4a0d03cb50e57e3d714923c7de1f4428e5f113e0 | 1,181 | py | Python | src/main/resources/python/project_info.py | fschueler/systemml | cdd0bacf845a0d4eeb3ec3e260ae1e3a96d706ef | [
"Apache-2.0"
] | 15 | 2016-03-03T09:23:25.000Z | 2017-02-21T22:09:57.000Z | src/main/resources/python/project_info.py | fschueler/systemml | cdd0bacf845a0d4eeb3ec3e260ae1e3a96d706ef | [
"Apache-2.0"
] | 1 | 2019-09-26T10:58:55.000Z | 2019-09-26T10:58:55.000Z | src/main/resources/python/project_info.py | fschueler/systemml | cdd0bacf845a0d4eeb3ec3e260ae1e3a96d706ef | [
"Apache-2.0"
] | 10 | 2016-01-18T01:50:25.000Z | 2020-03-03T20:25:44.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... | 42.178571 | 66 | 0.691787 |
4a0d04fd0d1f68711f147453c62d38e61bfe09f5 | 6,451 | py | Python | testing/mdp_gen_schedule_test.py | bmielnicki/overcooked_ai | bd4937bbc86d023b60f6803a941c0d083e985673 | [
"MIT"
] | null | null | null | testing/mdp_gen_schedule_test.py | bmielnicki/overcooked_ai | bd4937bbc86d023b60f6803a941c0d083e985673 | [
"MIT"
] | null | null | null | testing/mdp_gen_schedule_test.py | bmielnicki/overcooked_ai | bd4937bbc86d023b60f6803a941c0d083e985673 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from overcooked_ai_py.mdp.actions import Direction, Action
from overcooked_ai_py.mdp.overcooked_mdp import OvercookedGridworld, PlayerState, ObjectState
from overcooked_ai_py.agents.benchmarking import AgentEvaluator
np.random.seed(42)
n, s = Direction.NORTH, Direction.SOUTH
e, w =... | 37.947059 | 118 | 0.632305 |
4a0d052bf5c4a1a92bf20a8b52f045f982610b4c | 1,096 | py | Python | nodemanager/gui_utils.py | beatreichenbach/node-manager | e27ed2b193c99c90e8a4880bf1d494983b5b9f89 | [
"MIT"
] | 1 | 2022-03-03T08:08:29.000Z | 2022-03-03T08:08:29.000Z | nodemanager/gui_utils.py | beatreichenbach/node-manager | e27ed2b193c99c90e8a4880bf1d494983b5b9f89 | [
"MIT"
] | null | null | null | nodemanager/gui_utils.py | beatreichenbach/node-manager | e27ed2b193c99c90e8a4880bf1d494983b5b9f89 | [
"MIT"
] | null | null | null | import os
import sys
from PySide2 import QtUiTools, QtWidgets, QtCore
def load_ui(parent, file_name):
"""Loads the specified ui file and attaches them to the parent.
Args: parent: the object to load the ui elements into
file_name: the file name of the ui file in the ui folder.
"""
load... | 27.4 | 78 | 0.645985 |
4a0d0675aaadb8a169921ebaa45b2870284d9e3c | 1,577 | py | Python | example_compute.py | rgharris/libcloud | 90971e17bfd7b6bb97b2489986472c531cc8e140 | [
"Apache-2.0"
] | null | null | null | example_compute.py | rgharris/libcloud | 90971e17bfd7b6bb97b2489986472c531cc8e140 | [
"Apache-2.0"
] | null | null | null | example_compute.py | rgharris/libcloud | 90971e17bfd7b6bb97b2489986472c531cc8e140 | [
"Apache-2.0"
] | 1 | 2019-08-05T10:12:02.000Z | 2019-08-05T10:12:02.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 use ... | 35.044444 | 78 | 0.748256 |
4a0d070f38cc7162b5cce911490f5375328aaaea | 287 | py | Python | ex032.py | danieldf0l/exercicios-curso-python3 | 8f8a0e2467efee855da47ea47a4c2f4fda152c41 | [
"MIT"
] | null | null | null | ex032.py | danieldf0l/exercicios-curso-python3 | 8f8a0e2467efee855da47ea47a4c2f4fda152c41 | [
"MIT"
] | null | null | null | ex032.py | danieldf0l/exercicios-curso-python3 | 8f8a0e2467efee855da47ea47a4c2f4fda152c41 | [
"MIT"
] | null | null | null | from datetime import date
ano = int(input('Que ano deseja analisar? digite 0 caso seja o ano vigente. '))
if ano == 0:
ano = date.today().year
if ano % 4 == 0 and ano % 100 != 0 or ano % 400 == 0:
print(f'O ano {ano} é BISSEXTO')
else:
print(f'O ano {ano} não é BISSEXTO')
| 31.888889 | 79 | 0.620209 |
4a0d0753ede104f7b864ffa8ef7b104241869199 | 6,263 | py | Python | CheapCraig.py | iamshreeram/Craigslist | 8dc97900e4b8f2871dfd56638de0722f21171983 | [
"MIT"
] | null | null | null | CheapCraig.py | iamshreeram/Craigslist | 8dc97900e4b8f2871dfd56638de0722f21171983 | [
"MIT"
] | null | null | null | CheapCraig.py | iamshreeram/Craigslist | 8dc97900e4b8f2871dfd56638de0722f21171983 | [
"MIT"
] | null | null | null | # Variable declaration and imports
import random
import time
import traceback
import urllib2
import webbrowser
import os
import os.path
import os.path
import re
results = re.compile('<p.+</p>', re.DOTALL) # Find pattern for search results.
prices = re.compile('<span class="price".*?</span>', re.DOTALL) # Find patte... | 30.70098 | 147 | 0.631966 |
4a0d077b688f324bbb04036a00015f9468cd7348 | 4,185 | py | Python | thenewboston_node/business_logic/tests/test_blockchain_base/test_get_root_account_file.py | nishp77/thenewboston-node | 158b1f1739b2c6c9c21c80e9da854ca141f1cf8f | [
"MIT"
] | 30 | 2021-03-05T22:08:17.000Z | 2021-09-23T02:45:45.000Z | thenewboston_node/business_logic/tests/test_blockchain_base/test_get_root_account_file.py | nishp77/thenewboston-node | 158b1f1739b2c6c9c21c80e9da854ca141f1cf8f | [
"MIT"
] | 148 | 2021-03-05T23:37:50.000Z | 2021-11-02T02:18:58.000Z | thenewboston_node/business_logic/tests/test_blockchain_base/test_get_root_account_file.py | nishp77/thenewboston-node | 158b1f1739b2c6c9c21c80e9da854ca141f1cf8f | [
"MIT"
] | 14 | 2021-03-05T21:58:46.000Z | 2021-10-15T17:27:52.000Z | import pytest
from thenewboston_node.business_logic.exceptions import InvalidBlockchainError
from thenewboston_node.business_logic.tests.mocks.utils import patch_blockchain_states
def test_can_get_account_root_file_count(blockchain_base, blockchain_state_10, blockchain_state_20):
with patch_blockchain_states(blo... | 45.989011 | 115 | 0.826045 |
4a0d083047e8d7d7eb0763a532fbee58f9121a41 | 1,045 | py | Python | graph/adj_matrix.py | dkryvitskaya/computations | 52615b486602be43c51b1dc39a6dda696cbf13fd | [
"Apache-2.0"
] | null | null | null | graph/adj_matrix.py | dkryvitskaya/computations | 52615b486602be43c51b1dc39a6dda696cbf13fd | [
"Apache-2.0"
] | null | null | null | graph/adj_matrix.py | dkryvitskaya/computations | 52615b486602be43c51b1dc39a6dda696cbf13fd | [
"Apache-2.0"
] | 4 | 2020-12-16T18:12:02.000Z | 2021-06-05T08:45:26.000Z |
graph_a = [ [0, 0, 0, 1, 1, 0, 1, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0]
graph_... | 26.125 | 112 | 0.354067 |
4a0d08b860b8849e6588a44b1aac24ab761857ea | 4,518 | py | Python | llvm-5.0.1.src/utils/lit/tests/selecting.py | ShawnLess/TBD | fc98e93b3462509022fdf403978cd82aa05c2331 | [
"Apache-2.0"
] | 60 | 2017-12-21T06:49:58.000Z | 2022-02-24T09:43:52.000Z | llvm-5.0.1.src/utils/lit/tests/selecting.py | ShawnLess/TBD | fc98e93b3462509022fdf403978cd82aa05c2331 | [
"Apache-2.0"
] | null | null | null | llvm-5.0.1.src/utils/lit/tests/selecting.py | ShawnLess/TBD | fc98e93b3462509022fdf403978cd82aa05c2331 | [
"Apache-2.0"
] | 17 | 2017-12-20T09:54:56.000Z | 2021-06-24T05:39:36.000Z | # RUN: %{lit} %{inputs}/discovery | FileCheck --check-prefix=CHECK-BASIC %s
# CHECK-BASIC: Testing: 5 tests
# Check that regex-filtering works
#
# RUN: %{lit} --filter 'o[a-z]e' %{inputs}/discovery | FileCheck --check-prefix=CHECK-FILTER %s
# CHECK-FILTER: Testing: 2 of 5 tests
# Check that regex-filtering based on ... | 47.0625 | 105 | 0.673085 |
4a0d08c0a6e339ef263a404efd1a3a944d10ff9a | 63,926 | py | Python | sympy/core/power.py | rwong/sympy | cd39c1f32dc68bef7fa23295dd3053fd17276446 | [
"BSD-3-Clause"
] | 1 | 2020-04-09T07:57:25.000Z | 2020-04-09T07:57:25.000Z | sympy/core/power.py | kenluck2001/sympy | 2d700c4b3c0871a26741456787b0555eed9d5546 | [
"BSD-3-Clause"
] | null | null | null | sympy/core/power.py | kenluck2001/sympy | 2d700c4b3c0871a26741456787b0555eed9d5546 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division
from math import log as _log
from .sympify import _sympify
from .cache import cacheit
from .singleton import S
from .expr import Expr
from .evalf import PrecisionExhausted
from .function import (_coeff_isneg, expand_complex, expand_multinomial,
expand_mul)
from .log... | 37.296383 | 98 | 0.463145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.