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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7950095ff831d383e51d9132564bd0e35662127c | 22,682 | py | Python | src/robot/conf/settings.py | ishandutta2007/robotframework | f8fd5bf91c649506049e5c21766a47365cef8736 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-11-25T20:31:22.000Z | 2018-11-25T20:31:22.000Z | src/robot/conf/settings.py | ishandutta2007/robotframework | f8fd5bf91c649506049e5c21766a47365cef8736 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/conf/settings.py | ishandutta2007/robotframework | f8fd5bf91c649506049e5c21766a47365cef8736 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-11-25T20:31:26.000Z | 2018-11-25T20:31:26.000Z | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 36.2912 | 88 | 0.554228 |
795009c9b02f99279956290f6d81cc4bb4aa66e4 | 997 | py | Python | test/AggregateRun.py | takanokage/blocksWorld | 3ad99531c60551e2c51a7083891c724d35148686 | [
"MIT"
] | 1 | 2017-08-09T21:23:28.000Z | 2017-08-09T21:23:28.000Z | test/AggregateRun.py | takanokage/BlocksWorld | 3ad99531c60551e2c51a7083891c724d35148686 | [
"MIT"
] | 4 | 2018-10-10T16:09:31.000Z | 2020-07-12T23:18:44.000Z | test/AggregateRun.py | takanokage/BlocksWorld | 3ad99531c60551e2c51a7083891c724d35148686 | [
"MIT"
] | 8 | 2018-09-05T21:16:52.000Z | 2019-07-02T05:27:31.000Z | from BuildDataSet import *
#
# load the data set
Set1 = CreateDataSet()
# show the aggregate object before applying any actions
Set1.DisplayImage(saveImage='True',showImage='True')
# apply rotation by -30 degree ( minus means clockwise direction) for first aggregate object and 10 for the second
# in case there were m... | 35.607143 | 114 | 0.782347 |
79500a144c18fc61e43eeb7b685fd5ee0777ed82 | 6,214 | py | Python | python/datamongo/collections/supply_dimensions.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | python/datamongo/collections/supply_dimensions.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | python/datamongo/collections/supply_dimensions.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from pandas import DataFrame
from base import BaseObject
from datamongo.collections import Employees
from datamongo.collections import BandRegion
from datamongo.core.bp import CendantCollection
from datamongo.core.dmo import BaseMongoClient
from datamongo.core.dmo import... | 34.715084 | 100 | 0.540232 |
79500a21eec48f52921c1ef99795a9403445eb65 | 1,353 | py | Python | widgets/menubar.py | ostash-group/GeneticPlotter | 09389407c6d89b8f525f247e7a8af6ff0de1d665 | [
"MIT"
] | 3 | 2021-02-02T18:10:18.000Z | 2021-07-27T14:20:20.000Z | widgets/menubar.py | ostash-group/GeneticPlotter | 09389407c6d89b8f525f247e7a8af6ff0de1d665 | [
"MIT"
] | null | null | null | widgets/menubar.py | ostash-group/GeneticPlotter | 09389407c6d89b8f525f247e7a8af6ff0de1d665 | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QWidget
from PyQt5.QtWidgets import (QTextEdit, QPushButton, QMessageBox, QHBoxLayout,
QAction, QLabel, QMenuBar, QAction, QListWidget,
QStyleFactory)
from PyQt5.QtGui import QKeySequence, QIc... | 27.06 | 79 | 0.593496 |
79500a820e0789a4b3dbbcd5b155b0ec3c63edf4 | 5,968 | py | Python | src/tests/ftest/control/dmg_telemetry_io_basic.py | fedepad/daos | ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa | [
"BSD-2-Clause-Patent"
] | 429 | 2016-09-28T20:43:20.000Z | 2022-03-25T01:22:50.000Z | src/tests/ftest/control/dmg_telemetry_io_basic.py | fedepad/daos | ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa | [
"BSD-2-Clause-Patent"
] | 6,341 | 2016-11-24T12:34:26.000Z | 2022-03-31T23:53:46.000Z | src/tests/ftest/control/dmg_telemetry_io_basic.py | fedepad/daos | ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa | [
"BSD-2-Clause-Patent"
] | 202 | 2016-10-30T14:47:53.000Z | 2022-03-30T21:29:11.000Z | #!/usr/bin/python
"""
(C) Copyright 2018-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
from avocado.core.exceptions import TestFail
from ior_test_base import IorTestBase
from telemetry_test_base import TestWithTelemetry
from telemetry_utils import TelemetryUtils
class TestWithTelemetry... | 44.207407 | 79 | 0.500168 |
79500bed84e7dd864d0f7b76da1e61545a318733 | 152 | py | Python | setup.py | sevdog/django-reverse-js | 0f42aa956d710449bba91d35c6b3b7e5040acbbf | [
"MIT"
] | null | null | null | setup.py | sevdog/django-reverse-js | 0f42aa956d710449bba91d35c6b3b7e5040acbbf | [
"MIT"
] | null | null | null | setup.py | sevdog/django-reverse-js | 0f42aa956d710449bba91d35c6b3b7e5040acbbf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup
setup(
package_data={
'django_reverse_js': ['templates/django_reverse_js/*.js']
}
)
| 16.888889 | 65 | 0.671053 |
79500c01d96c2af833699e9bee66ee827ef01dc6 | 3,503 | py | Python | source/SC_Event_Service/app.py | red-hat-data-services/smart-city-with-rh-cloud-services | 29b29501214a69ccb939db1d2196c89d9b35132b | [
"MIT"
] | null | null | null | source/SC_Event_Service/app.py | red-hat-data-services/smart-city-with-rh-cloud-services | 29b29501214a69ccb939db1d2196c89d9b35132b | [
"MIT"
] | null | null | null | source/SC_Event_Service/app.py | red-hat-data-services/smart-city-with-rh-cloud-services | 29b29501214a69ccb939db1d2196c89d9b35132b | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine, Column, Integer, String, Numeric, DateTime, func, Boolean
from sqlalchemy.ext.declarative import declarative_base
from aiokafka import AIOKafkaConsumer
import asyncio, os, ast , sys
import nest_asyncio
nest_asyncio.apply()
## global variable :: setting this for kafka Consumer
KAFK... | 48.652778 | 444 | 0.675136 |
79500c370c9a169dd82b0c34a9fa63b5c61b195d | 1,657 | py | Python | tests/test_06_normaliseip.py | pcollinson/nftfw | c4c8aaf8f2aa7439848fd1c209d64b3d2991f1b7 | [
"MIT"
] | 14 | 2020-07-10T05:38:21.000Z | 2022-03-06T23:42:08.000Z | tests/test_06_normaliseip.py | pcollinson/nftfw | c4c8aaf8f2aa7439848fd1c209d64b3d2991f1b7 | [
"MIT"
] | 4 | 2020-07-09T03:00:05.000Z | 2020-07-11T14:40:40.000Z | tests/test_06_normaliseip.py | pcollinson/nftfw | c4c8aaf8f2aa7439848fd1c209d64b3d2991f1b7 | [
"MIT"
] | null | null | null | """ Test normalise address function """
from pathlib import Path
import pytest
from nftfw.normaliseaddress import NormaliseAddress
from nftfw.whitelistcheck import WhiteListCheck
from .configsetup import config_init
@pytest.fixture
def cf(): # pylint: disable=invalid-name
""" Get config from configsetup ... | 24.014493 | 69 | 0.629451 |
79500ce693e8c292c4818f7baf0c05445b5667cb | 9,072 | py | Python | double_dummy/algorithms.py | andCelli/efg_tools | 0de50f41e971d6ebb461ae4733843096af87e014 | [
"MIT"
] | null | null | null | double_dummy/algorithms.py | andCelli/efg_tools | 0de50f41e971d6ebb461ae4733843096af87e014 | [
"MIT"
] | null | null | null | double_dummy/algorithms.py | andCelli/efg_tools | 0de50f41e971d6ebb461ae4733843096af87e014 | [
"MIT"
] | null | null | null | """
For any particular deal, given the declarer and the trump suit (or notrump), the double dummy result is the number of
tricks the declarer will win when all four players can see all 52 cards, and each player always plays to his or her best
advantage.
A complete DDA consists of 20 results, calculated by considering, ... | 40.5 | 140 | 0.656856 |
79500d0d3bd98b4075bac7b9981cdb60fbeb7756 | 683 | py | Python | course_api/migrations/0025_auto_20180517_2230.py | dragonbone81/bobcat-courses-backend | d0f98b837f37eb16a89a24ce9bd3f3f0fd52064c | [
"MIT"
] | 3 | 2018-10-25T12:41:33.000Z | 2019-09-19T19:47:39.000Z | course_api/migrations/0025_auto_20180517_2230.py | dragonbone81/bobcat-courses-backend | d0f98b837f37eb16a89a24ce9bd3f3f0fd52064c | [
"MIT"
] | 22 | 2018-04-01T02:43:01.000Z | 2022-03-11T23:15:55.000Z | course_api/migrations/0025_auto_20180517_2230.py | dragonbone81/cse120 | d0f98b837f37eb16a89a24ce9bd3f3f0fd52064c | [
"MIT"
] | 1 | 2019-09-19T19:48:59.000Z | 2019-09-19T19:48:59.000Z | # Generated by Django 2.0.3 on 2018-05-18 05:30
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('course_api', '0024_auto_20180517_2200'),
]
operations = [
migrations.AlterField(
model_name='wa... | 27.32 | 131 | 0.626647 |
79500ecb1f3a129f0e980c93649abd12d47afcb4 | 955 | py | Python | core/python/utilities.py | MrOerni/3d-chess | 48172029dcb2ca1ab4efa98cdc59699419b9c450 | [
"MIT"
] | 1 | 2016-09-26T14:49:35.000Z | 2016-09-26T14:49:35.000Z | core/python/utilities.py | MrEbbinghaus/Tredisca | 48172029dcb2ca1ab4efa98cdc59699419b9c450 | [
"MIT"
] | 12 | 2015-09-02T21:31:09.000Z | 2016-02-20T18:39:41.000Z | core/python/utilities.py | MrOerni/Tredisca | 48172029dcb2ca1ab4efa98cdc59699419b9c450 | [
"MIT"
] | null | null | null | from enum import Enum
class bColors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def add_vector(a, b) -> tuple:
(x0, y0, z0) = a
(x1, y1, z1) = b
return x0 + x1... | 18.72549 | 54 | 0.512042 |
79501003dbc40acc3a9efc48f73fe010c81752b5 | 2,201 | py | Python | yt_dlp/extractor/onefootball.py | frainzy1477/yt-dlp | d298d33fe6ce410fcff5d936798486855b48c9ec | [
"Unlicense"
] | 2 | 2020-11-23T04:21:19.000Z | 2020-12-27T18:35:24.000Z | yt_dlp/extractor/onefootball.py | frainzy1477/yt-dlp | d298d33fe6ce410fcff5d936798486855b48c9ec | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/onefootball.py | frainzy1477/yt-dlp | d298d33fe6ce410fcff5d936798486855b48c9ec | [
"Unlicense"
] | 1 | 2021-11-19T06:18:33.000Z | 2021-11-19T06:18:33.000Z | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class OneFootballIE(InfoExtractor):
_VALID_URL = r'(?:https?://)(?:www\.)?onefootball\.com/[a-z]{2}/video/[^/&?#]+-(?P<id>\d+)'
_TESTS = [{
'url': 'https://onefootball.com/en/video/highlights-fc-zuerich-3-3-fc-... | 42.326923 | 163 | 0.600636 |
795010ea5fa304ce2c7fed7f7d6b5ef9a4b5e20d | 2,117 | py | Python | for-proriv/myfuture/students/migrations/0001_initial.py | DmitryAA/EdVision | 4a6a5d72eef1a6f2a0522e27666e17fca8e6dd10 | [
"MIT"
] | null | null | null | for-proriv/myfuture/students/migrations/0001_initial.py | DmitryAA/EdVision | 4a6a5d72eef1a6f2a0522e27666e17fca8e6dd10 | [
"MIT"
] | null | null | null | for-proriv/myfuture/students/migrations/0001_initial.py | DmitryAA/EdVision | 4a6a5d72eef1a6f2a0522e27666e17fca8e6dd10 | [
"MIT"
] | null | null | null | # Generated by Django 2.1 on 2019-06-23 00:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Address',
fields=[
... | 41.509804 | 118 | 0.586207 |
79501129bfde86305fe1e9dd55bd1c59bf26b1f0 | 1,941 | py | Python | benchmark/startPyquil3325.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil3325.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil3325.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=44
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += CNOT(0,3) # number=13
... | 25.207792 | 64 | 0.557445 |
795011b62d9bec89c716c342850b5a0e8e980d06 | 3,570 | py | Python | contrib/tools/python/src/Tools/scripts/db2pickle.py | HeyLey/catboost | f472aed90604ebe727537d9d4a37147985e10ec2 | [
"Apache-2.0"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | python/src/Tools/scripts/db2pickle.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | python/src/Tools/scripts/db2pickle.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | #!/usr/bin/env python
"""
Synopsis: %(prog)s [-h|-g|-b|-r|-a] dbfile [ picklefile ]
Convert the database file given on the command line to a pickle
representation. The optional flags indicate the type of the database:
-a - open using anydbm
-b - open as bsddb btree file
-d - open as dbm file
-g - op... | 26.25 | 76 | 0.529132 |
79501202b58d78eb975da4caa0a4754e5565a08f | 6,025 | py | Python | reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/src/markov/tests/test_utils.py | austinmw/amazon-sagemaker-examples | e215fcb4a11346c3b63bbe50f0a27b76f4bb83cb | [
"Apache-2.0"
] | 4 | 2020-06-15T14:07:43.000Z | 2020-06-28T12:34:13.000Z | reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/src/markov/tests/test_utils.py | austinmw/amazon-sagemaker-examples | e215fcb4a11346c3b63bbe50f0a27b76f4bb83cb | [
"Apache-2.0"
] | 4 | 2020-09-26T01:06:05.000Z | 2022-02-10T01:48:13.000Z | reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/src/markov/tests/test_utils.py | 99bcsagar/sagemaker | d6df186a527402352a612368879bfccfe0b80d02 | [
"Apache-2.0"
] | 5 | 2020-06-27T12:15:51.000Z | 2020-06-28T12:34:14.000Z | import pytest
import os
import multiprocessing
import json
import botocore
from markov import utils
from markov.s3_client import SageS3Client
from markov.log_handler.constants import (SIMAPP_EVENT_SYSTEM_ERROR,
SIMAPP_SIMULATION_WORKER_EXCEPTION,
... | 40.166667 | 100 | 0.71917 |
79501284d0e33713369f547ec3758bbf5fdca7c9 | 287 | py | Python | manimlib/utils/sounds.py | sunkisser/manim | 39673a80d7bbbea258c35ce5a1d37a0911aae4f1 | [
"MIT"
] | 1 | 2022-03-23T06:27:22.000Z | 2022-03-23T06:27:22.000Z | manimlib/utils/sounds.py | sunkisser/manim | 39673a80d7bbbea258c35ce5a1d37a0911aae4f1 | [
"MIT"
] | null | null | null | manimlib/utils/sounds.py | sunkisser/manim | 39673a80d7bbbea258c35ce5a1d37a0911aae4f1 | [
"MIT"
] | null | null | null | from manimlib.utils.file_ops import find_file
from manimlib.utils.directories import get_sound_dir
def get_full_sound_file_path(sound_file_name) -> str:
return find_file(
sound_file_name,
directories=[get_sound_dir()],
extensions=[".wav", ".mp3", ""]
)
| 26.090909 | 53 | 0.703833 |
795012e6f2327d16b58307bea7e7970f1eee1eb1 | 8,462 | py | Python | DataUtils/Embed.py | Wiser1990/pytorch_NER_BiLSTM_CNN_CRF | 6dcda3558001d6c7c3b7ca63ed08718a96effe02 | [
"Apache-2.0"
] | 1 | 2018-11-20T11:09:11.000Z | 2018-11-20T11:09:11.000Z | DataUtils/Embed.py | Wiser1990/pytorch_NER_BiLSTM_CNN_CRF | 6dcda3558001d6c7c3b7ca63ed08718a96effe02 | [
"Apache-2.0"
] | null | null | null | DataUtils/Embed.py | Wiser1990/pytorch_NER_BiLSTM_CNN_CRF | 6dcda3558001d6c7c3b7ca63ed08718a96effe02 | [
"Apache-2.0"
] | null | null | null | # @Author : bamtercelboo
# @Datetime : 2018/8/27 15:34
# @File : Embed.py
# @Last Modify Time : 2018/8/27 15:34
# @Contact : bamtercelboo@{gmail.com, 163.com}
"""
FILE : Embed.py
FUNCTION : None
"""
import os
import sys
import time
import tqdm
import numpy as np
import torch
import torch.nn as nn
import torc... | 37.442478 | 118 | 0.569369 |
795014765f7a2ae1d8640d57080b025b036fcc07 | 561 | py | Python | classes/item.py | chamburr/lamerpg | 05c125590500286af3664efa82b92a2874823219 | [
"MIT"
] | null | null | null | classes/item.py | chamburr/lamerpg | 05c125590500286af3664efa82b92a2874823219 | [
"MIT"
] | null | null | null | classes/item.py | chamburr/lamerpg | 05c125590500286af3664efa82b92a2874823219 | [
"MIT"
] | null | null | null | class Item:
def __init__(self, **kwargs):
self.type = kwargs.get("type")
self._name = kwargs.get("name")
self.level = kwargs.get("level")
def add_level(self, level):
self.level += level
@property
def name(self):
if self.type == "sword":
r... | 24.391304 | 45 | 0.500891 |
795015864f7353844b5b02560ee94e5f7f801d90 | 3,189 | py | Python | wit/dep/old_examples/simple-forum-matching.py | bkj/what-is-this | 49c6e4f9809623d8580433baf00e507faacb04f0 | [
"Apache-2.0"
] | 21 | 2016-01-12T05:20:29.000Z | 2022-01-05T18:14:40.000Z | wit/dep/old_examples/simple-forum-matching.py | bkj/what-is-this | 49c6e4f9809623d8580433baf00e507faacb04f0 | [
"Apache-2.0"
] | null | null | null | wit/dep/old_examples/simple-forum-matching.py | bkj/what-is-this | 49c6e4f9809623d8580433baf00e507faacb04f0 | [
"Apache-2.0"
] | 38 | 2016-11-08T04:49:17.000Z | 2019-01-10T04:47:52.000Z | # --
# Load deps
import keras
import pandas as pd
import urllib2
from hashlib import md5
from bs4 import BeautifulSoup
from pprint import pprint
from matplotlib import pyplot as plt
import sys
sys.path.append('/Users/BenJohnson/projects/what-is-this/wit/')
from wit import *
pd.set_option('display.max_rows', 50)
pd.... | 24.914063 | 90 | 0.661336 |
795015b71d6762abf2bd019c16e078fd5a5beba4 | 11,214 | py | Python | .venv/lib/python3.9/site-packages/pylint/checkers/refactoring/recommendation_checker.py | linuscyl/multimedia-computing-assignment | 4932f531f67a7f57e132ea358bf70a2347021aa9 | [
"Apache-2.0"
] | null | null | null | .venv/lib/python3.9/site-packages/pylint/checkers/refactoring/recommendation_checker.py | linuscyl/multimedia-computing-assignment | 4932f531f67a7f57e132ea358bf70a2347021aa9 | [
"Apache-2.0"
] | null | null | null | .venv/lib/python3.9/site-packages/pylint/checkers/refactoring/recommendation_checker.py | linuscyl/multimedia-computing-assignment | 4932f531f67a7f57e132ea358bf70a2347021aa9 | [
"Apache-2.0"
] | null | null | null | # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
from typing import cast
import astroid
from pylint import checkers, interfaces
from pylint.checkers import utils
class RecommendationChecker(checkers.BaseChecker):
... | 42.316981 | 97 | 0.580703 |
7950167e1acce229e0d62d8d9f3eb88d24b695d0 | 483 | py | Python | farms2face/home/migrations/0003_prepack_description.py | dev1farms2face/f2f | 54e58187a68574bf2bd0dfb7e58a2b416336106a | [
"MIT"
] | null | null | null | farms2face/home/migrations/0003_prepack_description.py | dev1farms2face/f2f | 54e58187a68574bf2bd0dfb7e58a2b416336106a | [
"MIT"
] | null | null | null | farms2face/home/migrations/0003_prepack_description.py | dev1farms2face/f2f | 54e58187a68574bf2bd0dfb7e58a2b416336106a | [
"MIT"
] | 2 | 2018-06-19T12:12:08.000Z | 2018-06-25T18:45:36.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-07-20 06:39
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0002_remove_prepack_description'),
]
operations = [
migrations.AddFie... | 23 | 75 | 0.63147 |
7950179855efec5ea4b62e994ebcee3789dfd1d2 | 4,547 | py | Python | src/poetry/console/commands/debug/resolve.py | yokomotod/poetry | 4838c9fe9645c62353be569a96765c693f03f1a3 | [
"MIT"
] | null | null | null | src/poetry/console/commands/debug/resolve.py | yokomotod/poetry | 4838c9fe9645c62353be569a96765c693f03f1a3 | [
"MIT"
] | null | null | null | src/poetry/console/commands/debug/resolve.py | yokomotod/poetry | 4838c9fe9645c62353be569a96765c693f03f1a3 | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import TYPE_CHECKING
from cleo.helpers import argument
from cleo.helpers import option
from cleo.io.outputs.output import Verbosity
from poetry.console.commands.init import InitCommand
if TYPE_CHECKING:
from poetry.console.commands.show import ShowCommand
class ... | 30.516779 | 88 | 0.575104 |
795019132d19ee23c6f45e79da2bff0141d0f804 | 856 | py | Python | sample.py | AdityaPai2398/OpenCV-Playground | 70969d9b60dc2e83e44c23632986b96d43eb2e95 | [
"MIT"
] | 1 | 2018-06-25T07:28:30.000Z | 2018-06-25T07:28:30.000Z | sample.py | AdityaPai2398/OpenCV-Playground | 70969d9b60dc2e83e44c23632986b96d43eb2e95 | [
"MIT"
] | null | null | null | sample.py | AdityaPai2398/OpenCV-Playground | 70969d9b60dc2e83e44c23632986b96d43eb2e95 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
#load image
img = cv2.imread('Lenna.png',-1)
cv2.imshow('This is Lenna',img)
rect =cv2.rectangle(img,(255,255),(275,275),(225,255,0),3)
circ =cv2.circle(img,(290,290),100,(205,205,255),3)
line =cv2.line(img,(345,265),(365,285),(225,255,0),3)
row,col,chan = img.shape... | 18.608696 | 59 | 0.606308 |
795019f9487a618d88e982b89f5169f5c08d740c | 13,418 | py | Python | sdk/core/azure-common/tests/test_client_factory.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-common/tests/test_client_factory.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/core/azure-common/tests/test_client_factory.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------------... | 44.578073 | 130 | 0.615591 |
79501a392f60a8275eeff58b243e5dbcd89abbc4 | 1,541 | py | Python | dcplib/aws/sqs_handler.py | HumanCellAtlas/dcplib | 5d1bd939393640b9623b040f13db1c97d83bcabd | [
"MIT"
] | 3 | 2019-02-28T06:03:05.000Z | 2019-07-01T18:29:11.000Z | dcplib/aws/sqs_handler.py | HumanCellAtlas/dcplib | 5d1bd939393640b9623b040f13db1c97d83bcabd | [
"MIT"
] | 64 | 2018-07-27T05:43:46.000Z | 2020-01-04T14:17:59.000Z | dcplib/aws/sqs_handler.py | HumanCellAtlas/dcplib | 5d1bd939393640b9623b040f13db1c97d83bcabd | [
"MIT"
] | 3 | 2019-11-01T14:24:25.000Z | 2020-09-07T18:42:17.000Z | import json
from . import resources, clients
class SQSHandler:
"""
A class encapsulating the behaviors associated with interacting with an SQS Queue object and raising errors when
queue-related behaviors fail.
"""
def __init__(self, queue_name=None, queue_url=None):
if queue_name:
... | 42.805556 | 116 | 0.670344 |
79501aafeb88ecde0e880582b6709ca60908990e | 12,199 | py | Python | src/tests/ftest/datamover/dst_create.py | fedepad/daos | ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa | [
"BSD-2-Clause-Patent"
] | 429 | 2016-09-28T20:43:20.000Z | 2022-03-25T01:22:50.000Z | src/tests/ftest/datamover/dst_create.py | fedepad/daos | ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa | [
"BSD-2-Clause-Patent"
] | 6,341 | 2016-11-24T12:34:26.000Z | 2022-03-31T23:53:46.000Z | src/tests/ftest/datamover/dst_create.py | fedepad/daos | ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa | [
"BSD-2-Clause-Patent"
] | 202 | 2016-10-30T14:47:53.000Z | 2022-03-30T21:29:11.000Z | #!/usr/bin/python
'''
(C) Copyright 2020-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
'''
from data_mover_test_base import DataMoverTestBase
from os.path import join
from pydaos.raw import DaosApiError
import avocado
class DmvrDstCreate(DataMoverTestBase):
# pylint: disable=too-many-an... | 36.966667 | 78 | 0.596934 |
79501c57ac300f7d4a0952562fb48b17595a8309 | 695 | py | Python | fable/fable_sources/fable/test/tst_show_calls.py | hickerson/bbn | 17ef63ad1717553ab2abb50592f8de79228c8523 | [
"MIT"
] | 4 | 2016-09-30T15:03:39.000Z | 2021-03-25T13:27:08.000Z | fable/fable_sources/fable/test/tst_show_calls.py | hickerson/bbn | 17ef63ad1717553ab2abb50592f8de79228c8523 | [
"MIT"
] | 1 | 2018-04-18T14:41:18.000Z | 2018-04-20T19:33:52.000Z | fable/fable_sources/fable/test/tst_show_calls.py | hickerson/bbn | 17ef63ad1717553ab2abb50592f8de79228c8523 | [
"MIT"
] | 3 | 2016-04-19T18:20:30.000Z | 2019-04-03T14:54:29.000Z | from __future__ import division
def run(args):
assert len(args) == 0
import libtbx.load_env
from cStringIO import StringIO
import os
op = os.path
t_dir = libtbx.env.under_dist(
module_name="fable", path="test/valid", test=op.isdir)
excluded_file_names = set("""\
blockdata_unnamed.f
""".splitlines())
... | 27.8 | 58 | 0.705036 |
79501c685578b8dfe069cef093080e87a0500853 | 971 | py | Python | example/tutorials/code/rosetta_naive_protocol.py | 00make/Rosetta-zh | 75f4f59956bd24bbf16637d94bede8b65c9db017 | [
"Apache-2.0"
] | null | null | null | example/tutorials/code/rosetta_naive_protocol.py | 00make/Rosetta-zh | 75f4f59956bd24bbf16637d94bede8b65c9db017 | [
"Apache-2.0"
] | null | null | null | example/tutorials/code/rosetta_naive_protocol.py | 00make/Rosetta-zh | 75f4f59956bd24bbf16637d94bede8b65c9db017 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Import rosetta package
import latticex.rosetta as rtt
import tensorflow as tf
# Attention!
# This is just for presentation of integrating a new protocol.
# NEVER USE THIS PROTOCOL IN PRODUCTION ENVIRONMENT!
rtt.activate("Naive")
# Get private data from P0 and P1
matrix_a = tf.Variable(rtt.pr... | 31.322581 | 75 | 0.746653 |
79501c75986e25ebca8b9c4edc71b4fd9256b1f5 | 4,332 | py | Python | src/eval.py | Artcs1/piou2 | 6ffda363b97969ea8e1c933a90d46720196a42b1 | [
"MIT"
] | 177 | 2020-07-22T08:06:11.000Z | 2022-03-04T03:24:13.000Z | src/eval.py | gds101054108/piou | 98f8d068a903d295f990609d8f90e4136e836495 | [
"MIT"
] | 18 | 2020-07-30T14:05:09.000Z | 2021-12-15T12:21:13.000Z | src/eval.py | gds101054108/piou | 98f8d068a903d295f990609d8f90e4136e836495 | [
"MIT"
] | 47 | 2020-07-21T01:38:55.000Z | 2022-03-04T03:24:15.000Z | import sys
from pycocotools.coco import COCO
import os
import cv2
import numpy as np
import mmcv
import codecs
import pandas as pd
import glob
CENTERNET_PATH = '/datadrive/sangliang/CenterNet/src/lib/'
sys.path.insert(0, CENTERNET_PATH)
from detectors.detector_factory import detector_factory
from opts import opts
thre... | 44.659794 | 196 | 0.638273 |
79501c81e535cd09aa50da6e5e608833a5696a6b | 4,342 | py | Python | get.py | yanxyz/cssgaga-changelog | 88fa780743e56f3bf131631992f2f550ce157ee9 | [
"MIT"
] | null | null | null | get.py | yanxyz/cssgaga-changelog | 88fa780743e56f3bf131631992f2f550ce157ee9 | [
"MIT"
] | null | null | null | get.py | yanxyz/cssgaga-changelog | 88fa780743e56f3bf131631992f2f550ce157ee9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Ivan Yan 2013-12-20
# 获取并整合 CssGaGa 更新日志
#
# 2014-04-10
# 改为 python 3.4
#
from __future__ import unicode_literals
import os
import sys
import subprocess
import re
import codecs
import json
import argparse
changelog = 'CHANGELOG.txt' # 整合的日志
currenttxt = 'current.txt... | 20.77512 | 92 | 0.622754 |
79501de39858f86defcb00475e8982760d1b52f5 | 8,370 | py | Python | dexp/datasets/operations/deconv.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 16 | 2021-04-21T14:09:19.000Z | 2022-03-22T02:30:59.000Z | dexp/datasets/operations/deconv.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 28 | 2021-04-15T17:43:08.000Z | 2022-03-29T16:08:35.000Z | dexp/datasets/operations/deconv.py | haesleinhuepf/dexp | 2ea84f3db323724588fac565fae56f0d522bc5ca | [
"BSD-3-Clause"
] | 3 | 2022-02-08T17:41:30.000Z | 2022-03-18T15:32:27.000Z | import functools
from pathlib import Path
from typing import List, Optional, Sequence, Tuple
import dask
import numpy
import scipy
from arbol.arbol import aprint, asection
from dask.distributed import Client
from dask_cuda import LocalCUDACluster
from dexp.datasets import BaseDataset
from dexp.optics.psf.standard_psf... | 35.168067 | 116 | 0.564636 |
79501f2744b77038ab7dd23922e0095416d78200 | 707 | py | Python | mcloud/test_utils.py | modera-manyrepo-packages/mcloud | 8ce3b1cc7bac01682a41c7b9d8d82f13a853d223 | [
"Apache-2.0"
] | null | null | null | mcloud/test_utils.py | modera-manyrepo-packages/mcloud | 8ce3b1cc7bac01682a41c7b9d8d82f13a853d223 | [
"Apache-2.0"
] | null | null | null | mcloud/test_utils.py | modera-manyrepo-packages/mcloud | 8ce3b1cc7bac01682a41c7b9d8d82f13a853d223 | [
"Apache-2.0"
] | null | null | null | from decorator import contextmanager
from flexmock import flexmock
import inject
from mcloud.txdocker import IDockerClient, DockerTwistedClient
def fake_inject(services):
def configurator(binder):
for key, item in services.items():
binder.bind(key, item)
inject.clear_and_configure(configur... | 23.566667 | 80 | 0.756719 |
7950202eee4765b131bf2c702b5844f9b64b3b30 | 10,302 | py | Python | pims/formats/utils/reader.py | hurondp/pims | 7d08bc4246375255611011d465db9de89fdc6ce9 | [
"Apache-2.0"
] | null | null | null | pims/formats/utils/reader.py | hurondp/pims | 7d08bc4246375255611011d465db9de89fdc6ce9 | [
"Apache-2.0"
] | 2 | 2022-01-05T10:39:54.000Z | 2022-01-06T12:54:04.000Z | pims/formats/utils/reader.py | hurondp/pims | 7d08bc4246375255611011d465db9de89fdc6ce9 | [
"Apache-2.0"
] | 1 | 2022-02-14T18:28:31.000Z | 2022-02-14T18:28:31.000Z | # * Copyright (c) 2020-2021. Authors: see NOTICE file.
# *
# * 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 ... | 40.559055 | 99 | 0.651912 |
795021749e83ee84c871792971aee5703ff86515 | 4,807 | py | Python | sdk/keyvault/azure-keyvault-secrets/samples/hello_world_async.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/keyvault/azure-keyvault-secrets/samples/hello_world_async.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-secrets/samples/hello_world_async.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | null | null | null | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import datetime
import os
import asyncio
from azure.keyvault.secrets.aio import SecretClient
from azure.identity.aio import DefaultAzureCredential
from azure.core.except... | 49.05102 | 125 | 0.641148 |
795021a26002835bc0bcb4af81922439e38bf0ca | 52,954 | py | Python | venv/Lib/site-packages/pandas/tests/scalar/period/test_period.py | itsAbdulKhadar/Machine-Learning-with-Streamlit | c8a0c7ca5a1bcf2730ae9587bcddfebe323965a3 | [
"MIT"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | venv/Lib/site-packages/pandas/tests/scalar/period/test_period.py | itsAbdulKhadar/Machine-Learning-with-Streamlit | c8a0c7ca5a1bcf2730ae9587bcddfebe323965a3 | [
"MIT"
] | 37 | 2020-10-20T08:30:53.000Z | 2020-12-22T13:15:45.000Z | venv/Lib/site-packages/pandas/tests/scalar/period/test_period.py | itsAbdulKhadar/Machine-Learning-with-Streamlit | c8a0c7ca5a1bcf2730ae9587bcddfebe323965a3 | [
"MIT"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | from datetime import date, datetime, timedelta
import numpy as np
import pytest
import pytz
from pandas._libs.tslibs import iNaT, period as libperiod
from pandas._libs.tslibs.ccalendar import DAYS, MONTHS
from pandas._libs.tslibs.parsing import DateParseError
from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MS... | 34.678454 | 88 | 0.535295 |
795021aefbc2348d21d7faf5f4cc9f4b96290793 | 5,042 | py | Python | review_classes.py | UstymHanyk/BookGoogle | 20f2825093c4676d05ca88138b6c140f1f8e174a | [
"MIT"
] | null | null | null | review_classes.py | UstymHanyk/BookGoogle | 20f2825093c4676d05ca88138b6c140f1f8e174a | [
"MIT"
] | null | null | null | review_classes.py | UstymHanyk/BookGoogle | 20f2825093c4676d05ca88138b6c140f1f8e174a | [
"MIT"
] | null | null | null | """
Module contains class 'Review', which contains information
about book review, written in english, and class 'ReviewList',
which keeps all book reviews.
"""
from nltk.sentiment import SentimentIntensityAnalyzer
from typing import List
from langdetect import detect
from langdetect.lang_detect_exception import LangDe... | 30.191617 | 83 | 0.57616 |
795021d76cc752df2b8878751822432b1a7ed04f | 15,352 | py | Python | gmprocess/io/knet/knet_fetcher.py | ftbernales/groundmotion-processing | 5be88da75e7168bd2421973d6f1e54a91c679dc8 | [
"Unlicense"
] | null | null | null | gmprocess/io/knet/knet_fetcher.py | ftbernales/groundmotion-processing | 5be88da75e7168bd2421973d6f1e54a91c679dc8 | [
"Unlicense"
] | null | null | null | gmprocess/io/knet/knet_fetcher.py | ftbernales/groundmotion-processing | 5be88da75e7168bd2421973d6f1e54a91c679dc8 | [
"Unlicense"
] | null | null | null | # stdlib imports
from datetime import datetime, timedelta
import re
from collections import OrderedDict
import tempfile
import os.path
import tarfile
import glob
import shutil
import logging
import urllib
# third party imports
import pytz
import numpy as np
import requests
from bs4 import BeautifulSoup
from openquake.... | 37.171913 | 483 | 0.562663 |
7950238be69e9050aec2650a52e7398b2f01da37 | 676 | py | Python | Process_Resolver/CPU.py | selcox/Process-Resolver | a31efc5ea928eccf0312b50ef70927930e215afd | [
"Apache-2.0"
] | null | null | null | Process_Resolver/CPU.py | selcox/Process-Resolver | a31efc5ea928eccf0312b50ef70927930e215afd | [
"Apache-2.0"
] | null | null | null | Process_Resolver/CPU.py | selcox/Process-Resolver | a31efc5ea928eccf0312b50ef70927930e215afd | [
"Apache-2.0"
] | null | null | null | import Constants
from FIFO import FIFO
from SJF import SJF
from SRTF import SRTF
from RR import RR
class CPU():
def __init__(self, algorithm, processes, quantum = -1):
self.processes = processes
self.start(algorithm, quantum)
def start(self, algorithm, quantum):
if algorithm == Constan... | 32.190476 | 62 | 0.653846 |
79502468629b69ff04f977c208d8d96fb008a187 | 3,670 | py | Python | catkin_ws/src/uv_robot_ros/src/clientToServer.py | noidname01/UV_Robotic_Challenge-Software | cd284fb46019c3e0cb96db4e7b6fe07512a62e05 | [
"MIT"
] | 1 | 2020-08-17T12:43:04.000Z | 2020-08-17T12:43:04.000Z | catkin_ws/src/uv_robot_ros/src/clientToServer.py | noidname01/UV_Robotic_Challenge-Software | cd284fb46019c3e0cb96db4e7b6fe07512a62e05 | [
"MIT"
] | 3 | 2022-02-13T19:38:23.000Z | 2022-02-27T09:49:33.000Z | catkin_ws/src/uv_robot_ros/src/clientToServer.py | noidname01/UV_Robotic_Challenge-Software | cd284fb46019c3e0cb96db4e7b6fe07512a62e05 | [
"MIT"
] | 1 | 2020-08-18T13:24:23.000Z | 2020-08-18T13:24:23.000Z | #!/usr/bin/env python
import socket
import time
import sys
import rospy
from uv_robot_ros.srv import cmdToRpi
#RPi's IP
#SERVER_IP = "192.168.43.35"
def cmd_to_rpi_client(actionType, dist_or_deg):
rospy.wait_for_service('cmdToRpiService')
try:
cmd_to_rpi = rospy.ServiceProxy('cmdToRpiService',cmdToRp... | 26.788321 | 92 | 0.543052 |
795025642023a3cb74f50cb0c798beb0615ad29b | 10,005 | py | Python | SamAppsUpdater.py | byethon/SamAppsUpdater | bda64c2792e582870872339d46d07eeae5e8b515 | [
"MIT"
] | null | null | null | SamAppsUpdater.py | byethon/SamAppsUpdater | bda64c2792e582870872339d46d07eeae5e8b515 | [
"MIT"
] | null | null | null | SamAppsUpdater.py | byethon/SamAppsUpdater | bda64c2792e582870872339d46d07eeae5e8b515 | [
"MIT"
] | null | null | null | import os
import re
from urllib import request
import requests
import subprocess
import sys
regex_info = re.compile(r".*<resultMsg>(?P<msg>[^']*)</resultMsg>"
r".*<downloadURI><!\[CDATA\[(?P<uri>[^']*)\]\]></downloadURI>"
r".*<versionCode>(?P<vs_code>\d+)</versionCode>",... | 38.77907 | 413 | 0.655272 |
795026a4fff1d07b5be14f3c5ab3c767272151cf | 9,140 | py | Python | bilateral_network/inference.py | siyangl/video-object-segmentation-motion-bilateral-network | b278fed4fb7f82f97e8e355e54138e4de6c14342 | [
"MIT"
] | 1 | 2019-03-17T01:34:22.000Z | 2019-03-17T01:34:22.000Z | bilateral_network/inference.py | siyangl/video-object-segmentation-motion-bilateral-network | b278fed4fb7f82f97e8e355e54138e4de6c14342 | [
"MIT"
] | null | null | null | bilateral_network/inference.py | siyangl/video-object-segmentation-motion-bilateral-network | b278fed4fb7f82f97e8e355e54138e4de6c14342 | [
"MIT"
] | 2 | 2019-04-29T06:42:40.000Z | 2019-07-15T01:54:39.000Z | import os
import numpy as np
import cv2
import tensorflow as tf
from tensorflow.python.platform import app
from tensorflow.python.platform import flags
from vos import utils
from data import davis_flow_dataset
flags.DEFINE_string('dataset', 'Davis', 'Dataset used for training')
flags.DEFINE_string('split', 'val', 'D... | 45.024631 | 104 | 0.633479 |
795026e41048008f28b0f0af7a1e134628864f65 | 2,316 | py | Python | asab/task.py | TeskaLabs/asab | f28894b62bad192d8d30df01a8ad1b842ee2a2fb | [
"BSD-3-Clause"
] | 23 | 2018-03-07T18:58:13.000Z | 2022-03-29T17:11:47.000Z | asab/task.py | TeskaLabs/asab | f28894b62bad192d8d30df01a8ad1b842ee2a2fb | [
"BSD-3-Clause"
] | 87 | 2018-04-04T19:44:13.000Z | 2022-03-31T11:18:00.000Z | asab/task.py | TeskaLabs/asab | f28894b62bad192d8d30df01a8ad1b842ee2a2fb | [
"BSD-3-Clause"
] | 10 | 2018-04-30T16:40:25.000Z | 2022-03-09T10:55:24.000Z | import logging
import asyncio
import asab
#
L = logging.getLogger(__name__)
#
class TaskService(asab.Service):
'''
Task service is for managed execution of fire-and-forget, one-off, background tasks.
The task is a coroutine, future (asyncio.ensure_future) or task (asyncio.create_task).
The task is executed i... | 22.485437 | 87 | 0.695596 |
79502845675e4de52f2ad916906bac3e5b1384e6 | 650 | py | Python | test.py | UWB-ACM/ACMBot | 7830eb2112e91ee037ca248f243e635bd65782df | [
"MIT"
] | null | null | null | test.py | UWB-ACM/ACMBot | 7830eb2112e91ee037ca248f243e635bd65782df | [
"MIT"
] | null | null | null | test.py | UWB-ACM/ACMBot | 7830eb2112e91ee037ca248f243e635bd65782df | [
"MIT"
] | null | null | null | import sys
import unittest
import doctest
# all of the testable modules
# when another module needs to be incorporated into tests
# they should be added here
import cogs.base
test_modules = [
cogs.base
]
def load_tests(tests):
# add each of the test modules
for mod in test_modules:
tests.addTest... | 19.117647 | 57 | 0.681538 |
7950287654fb772cf1113739c66a1436122fbb9b | 5,184 | py | Python | test/brahe/test_attitude.py | duncaneddy/brahe | 4a1746ef3c14211b0709de6e7e34b6f52fc0e686 | [
"MIT"
] | 14 | 2019-05-29T13:36:55.000Z | 2022-02-11T15:26:13.000Z | test/brahe/test_attitude.py | duncaneddy/brahe | 4a1746ef3c14211b0709de6e7e34b6f52fc0e686 | [
"MIT"
] | 1 | 2020-05-27T12:14:39.000Z | 2020-05-27T15:51:21.000Z | test/brahe/test_attitude.py | duncaneddy/brahe | 4a1746ef3c14211b0709de6e7e34b6f52fc0e686 | [
"MIT"
] | 2 | 2019-10-24T05:20:54.000Z | 2019-12-08T03:59:10.000Z | # Test Imports
from pytest import approx
from math import sin, cos, pi, sqrt
# Modules Under Test
from brahe.constants import *
from brahe.epoch import *
from brahe.attitude import *
def test_Rx():
deg = 45.0
rad = deg*pi/180
r = Rx(deg, use_degrees=True)
tol = 1e-8
assert approx(r[0, 0], 1.... | 26.181818 | 51 | 0.512346 |
79502987d5104aac630635b82708c07d0dfe2911 | 151 | py | Python | sqlite/03.py | mallimuondu/python-practice | 64fce60a646032152db8b35e20df06b2edc349ae | [
"MIT"
] | null | null | null | sqlite/03.py | mallimuondu/python-practice | 64fce60a646032152db8b35e20df06b2edc349ae | [
"MIT"
] | null | null | null | sqlite/03.py | mallimuondu/python-practice | 64fce60a646032152db8b35e20df06b2edc349ae | [
"MIT"
] | null | null | null |
def uppdate():
while True:
name = input("enter your name: ")
if not name.isalpha():
continue
break
uppdate() | 18.875 | 42 | 0.509934 |
7950298cc89dfd048251aaa9429cb98d8ad3ed33 | 9,120 | py | Python | script/show_result.py | ARQ-CRISP/bopt_grasp_quality | 219372e6644005651e166ed3091c5410385c7d30 | [
"MIT"
] | null | null | null | script/show_result.py | ARQ-CRISP/bopt_grasp_quality | 219372e6644005651e166ed3091c5410385c7d30 | [
"MIT"
] | null | null | null | script/show_result.py | ARQ-CRISP/bopt_grasp_quality | 219372e6644005651e166ed3091c5410385c7d30 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import division, absolute_import, print_function
import skopt
import argparse
import matplotlib.pyplot as plt
import matplotlib.font_manager
import numpy as np
from rospkg.rospack import RosPack
from skopt.acquisition import gaussian_ei
# from skopt.plots import plot_convergence
m... | 36.334661 | 139 | 0.580702 |
795029cad8d440ed2f3d573c08168e34d0a50bb6 | 18,583 | py | Python | qbert-agent-ale.py | Fenrir12/rl-qbert | 51ae397846c730169a9b6b76fe12d319fc5a84ff | [
"MIT"
] | null | null | null | qbert-agent-ale.py | Fenrir12/rl-qbert | 51ae397846c730169a9b6b76fe12d319fc5a84ff | [
"MIT"
] | null | null | null | qbert-agent-ale.py | Fenrir12/rl-qbert | 51ae397846c730169a9b6b76fe12d319fc5a84ff | [
"MIT"
] | null | null | null | from ale_python_interface import ALEInterface
import gym
import numpy as np
import random as rd
import matplotlib.pyplot as plt
import sys
import time as t
from PIL import Image
WEIGHTS1 = [1.3826337386217185, 23.894746079161084, 8.801830487930047, 11.254706535442095, 0.5956519333495852, 8.779244143679769, 1.214299047... | 34.864916 | 625 | 0.542162 |
79502ab042209e6de1ab0de209f2100a78ed64da | 8,080 | py | Python | src/Laplacian.py | tueboesen/Active-Learning | a924355e58dbe964b063d1cad08cc47dfcf2530b | [
"MIT"
] | null | null | null | src/Laplacian.py | tueboesen/Active-Learning | a924355e58dbe964b063d1cad08cc47dfcf2530b | [
"MIT"
] | null | null | null | src/Laplacian.py | tueboesen/Active-Learning | a924355e58dbe964b063d1cad08cc47dfcf2530b | [
"MIT"
] | null | null | null | import time
import hnswlib
import numpy as np
import torch
from scipy.sparse import coo_matrix, csr_matrix
def ANN_hnsw(x, k=10, euclidian_metric=False, union=True, eff=None,cutoff=False):
"""
Calculates the approximate nearest neighbours using the Hierarchical Navigable Small World Graph for fast ANN search... | 47.529412 | 397 | 0.675248 |
79502aced36752ecb8bbda7ccd71c3f2666bdf69 | 5,665 | py | Python | build_infrastructure/files/get_key.py | opentelekomcloud-infra/csm-ansible-roles | 64ec3f66013bb2cab67c26085f588eadc3f651a4 | [
"Apache-2.0"
] | null | null | null | build_infrastructure/files/get_key.py | opentelekomcloud-infra/csm-ansible-roles | 64ec3f66013bb2cab67c26085f588eadc3f651a4 | [
"Apache-2.0"
] | 16 | 2020-01-23T19:25:10.000Z | 2020-12-29T09:55:32.000Z | build_infrastructure/files/get_key.py | opentelekomcloud-infra/csm-ansible-roles | 64ec3f66013bb2cab67c26085f588eadc3f651a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import hashlib
import os
from argparse import ArgumentParser
from dataclasses import dataclass
import requests
from boto3.session import Session
from botocore.exceptions import ClientError
from cryptography.hazmat.backends import default_backend as crypto_default_backend
from cryptography.hazmat... | 32.371429 | 102 | 0.678906 |
79502b0f05c5277769186e77b2ddc9652987d044 | 267 | py | Python | listings/urls.py | snape-here/Real-Estate-Website | ac6b32cc641ee4c096b74792916baea1d1e83bdc | [
"MIT"
] | 1 | 2021-05-27T20:25:56.000Z | 2021-05-27T20:25:56.000Z | listings/urls.py | snape-here/Real-Estate-Website | ac6b32cc641ee4c096b74792916baea1d1e83bdc | [
"MIT"
] | null | null | null | listings/urls.py | snape-here/Real-Estate-Website | ac6b32cc641ee4c096b74792916baea1d1e83bdc | [
"MIT"
] | null | null | null | from django.urls import path
from django.urls.resolvers import URLPattern
from . import views
urlpatterns = [
path('', views.index, name='listings'),
path('<int:listing_id>', views.listing, name='listing'),
path('search', views.search, name='search'),
]
| 26.7 | 60 | 0.696629 |
79502c65cfec07129aba061182a628864cfcb16a | 2,600 | py | Python | src/azure-cli/azure/cli/command_modules/acs/_consts.py | jaredwelsh/azure-cli | ede8fe0a85543b7e52747e61d99955e916b95a5a | [
"MIT"
] | 1 | 2020-12-14T18:11:39.000Z | 2020-12-14T18:11:39.000Z | src/azure-cli/azure/cli/command_modules/acs/_consts.py | jaredwelsh/azure-cli | ede8fe0a85543b7e52747e61d99955e916b95a5a | [
"MIT"
] | 1 | 2020-11-06T02:53:03.000Z | 2020-11-06T02:53:03.000Z | src/azure-cli/azure/cli/command_modules/acs/_consts.py | jaredwelsh/azure-cli | ede8fe0a85543b7e52747e61d99955e916b95a5a | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 38.235294 | 94 | 0.780769 |
79502cb4202ba569a2eba82d0ca42f82cb61382c | 170 | py | Python | zenqueue/queue/sync.py | zacharyvoase/zenqueue | ffd2d87fa2423339423abe606312b3046c4efefe | [
"MIT"
] | 6 | 2015-11-05T13:36:19.000Z | 2019-12-08T14:08:38.000Z | zenqueue/queue/sync.py | zacharyvoase/zenqueue | ffd2d87fa2423339423abe606312b3046c4efefe | [
"MIT"
] | null | null | null | zenqueue/queue/sync.py | zacharyvoase/zenqueue | ffd2d87fa2423339423abe606312b3046c4efefe | [
"MIT"
] | 2 | 2015-09-18T14:59:22.000Z | 2019-03-26T08:59:08.000Z | # -*- coding: utf-8 -*-
from zenqueue.queue.common import AbstractQueue
from zenqueue.utils.sync import Semaphore
Queue = AbstractQueue.with_semaphore_class(Semaphore) | 24.285714 | 53 | 0.794118 |
79502ccc84c2b30dab7739d27002046b2f1c74dc | 2,631 | py | Python | retargeting/test.py | lcy2080/deep-motion-editing | 7872a076dbae8b3290b0dc94c8eac04159aef65e | [
"BSD-2-Clause"
] | null | null | null | retargeting/test.py | lcy2080/deep-motion-editing | 7872a076dbae8b3290b0dc94c8eac04159aef65e | [
"BSD-2-Clause"
] | null | null | null | retargeting/test.py | lcy2080/deep-motion-editing | 7872a076dbae8b3290b0dc94c8eac04159aef65e | [
"BSD-2-Clause"
] | null | null | null | import os
from os.path import join as pjoin
from get_error import full_batch
import numpy as np
from option_parser import try_mkdir
from eval import eval
import argparse
import platform
platform_name = platform.system()
def batch_copy(source_path, suffix, dest_path, dest_suffix=None):
try_mkdir(dest_path)
f... | 37.056338 | 191 | 0.646142 |
79502d0be18dad51aa55b9a58457eba20ecb7cd2 | 2,577 | py | Python | Timer.py | rlowrance/re-avm | d4cfa62e9f65d325e8ac98caa61d3fb666b8a6a2 | [
"BSD-3-Clause"
] | 25 | 2016-10-07T05:08:15.000Z | 2022-03-22T01:36:51.000Z | Timer.py | rlowrance/re-avm | d4cfa62e9f65d325e8ac98caa61d3fb666b8a6a2 | [
"BSD-3-Clause"
] | 1 | 2021-01-14T22:27:23.000Z | 2021-01-14T22:27:23.000Z | Timer.py | rlowrance/re-avm | d4cfa62e9f65d325e8ac98caa61d3fb666b8a6a2 | [
"BSD-3-Clause"
] | 8 | 2016-08-12T07:26:29.000Z | 2021-07-05T01:22:42.000Z | import atexit
import os
import pdb
import time
class Timer(object):
def __init__(self):
# time.clock() returns:
# unix ==> processor time in seconds as float (cpu time)
# windows ==> wall-clock seconds since first call to this function
# NOTE: time.clock() is deprecated in pytho... | 37.897059 | 103 | 0.599922 |
79502d7e78beeebddbee5c647692615691ce608d | 7,711 | py | Python | customhelp/themes/justcore.py | junaidrehaan/npc-cogs | dd1e22a6f333f3c349c9e095a0a6716a75084801 | [
"MIT"
] | null | null | null | customhelp/themes/justcore.py | junaidrehaan/npc-cogs | dd1e22a6f333f3c349c9e095a0a6716a75084801 | [
"MIT"
] | null | null | null | customhelp/themes/justcore.py | junaidrehaan/npc-cogs | dd1e22a6f333f3c349c9e095a0a6716a75084801 | [
"MIT"
] | null | null | null | from packaging import version
from redbot import __version__
from redbot.core.utils.chat_formatting import (box, humanize_list,
humanize_number)
from ..abc import ThemesMeta
from ..core.base_help import (CategoryConvert, Context, EmbedField,
... | 40.161458 | 111 | 0.520425 |
79502f3ed57ba967bbce22ce2b2b0391e6490992 | 535 | py | Python | website/example_problem_graders/base.py | pshen24/cmimc-online | 7d2435e506381fa19f3512635eb615f7a02e5f03 | [
"MIT"
] | null | null | null | website/example_problem_graders/base.py | pshen24/cmimc-online | 7d2435e506381fa19f3512635eb615f7a02e5f03 | [
"MIT"
] | null | null | null | website/example_problem_graders/base.py | pshen24/cmimc-online | 7d2435e506381fa19f3512635eb615f7a02e5f03 | [
"MIT"
] | null | null | null | class BaseGrader:
def __init__(self, problem):
self.problem = problem
def grade(self, submission, score):
'''
Assigns a point value to the submission, and updates the
corresponding score and competitor's total score
Returns: None
'''
raise Not... | 25.47619 | 67 | 0.585047 |
79502f804dd78a88f3370c07e27f6b051b927786 | 2,048 | py | Python | dohq_teamcity/models/state_field.py | DenKoren/teamcity | 69acb4d1402c316129b4602882a9cce2d55cf926 | [
"MIT"
] | 23 | 2018-10-19T07:28:45.000Z | 2021-11-12T12:46:09.000Z | dohq_teamcity/models/state_field.py | DenKoren/teamcity | 69acb4d1402c316129b4602882a9cce2d55cf926 | [
"MIT"
] | 31 | 2018-10-16T05:53:11.000Z | 2021-09-09T14:44:14.000Z | dohq_teamcity/models/state_field.py | DenKoren/teamcity | 69acb4d1402c316129b4602882a9cce2d55cf926 | [
"MIT"
] | 12 | 2018-10-28T23:00:17.000Z | 2021-09-07T12:07:13.000Z | # coding: utf-8
from dohq_teamcity.custom.base_model import TeamCityObject
class StateField(TeamCityObject):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
... | 24.674699 | 82 | 0.582031 |
795030089c7969b5c8308f008d6cb8c7b569fc87 | 6,916 | py | Python | pyeit/io/et4.py | DavidMetzIMT/pyEIT | a3c64f7b869e7a00a102fc93feea4999c8bed6d1 | [
"BSD-3-Clause"
] | null | null | null | pyeit/io/et4.py | DavidMetzIMT/pyEIT | a3c64f7b869e7a00a102fc93feea4999c8bed6d1 | [
"BSD-3-Clause"
] | null | null | null | pyeit/io/et4.py | DavidMetzIMT/pyEIT | a3c64f7b869e7a00a102fc93feea4999c8bed6d1 | [
"BSD-3-Clause"
] | null | null | null | # pylint: disable=no-member, invalid-name
# pylint: disable=too-many-arguments, too-many-instance-attributes
"""
Load .et4 file into mem (experimental).
This file structure may be modified in near future.
"""
# Copyright (c) Benyuan Liu. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt fo... | 31.013453 | 85 | 0.568103 |
79503018ac296e095baa91de3d0464cc7956adb8 | 374 | py | Python | base64/test.py | miloyip/benchmarks | e338363f2d3c35e8ff834c65d38d19f3108863b3 | [
"MIT"
] | 2 | 2020-01-09T02:44:27.000Z | 2022-03-12T01:35:44.000Z | base64/test.py | miloyip/benchmarks | e338363f2d3c35e8ff834c65d38d19f3108863b3 | [
"MIT"
] | null | null | null | base64/test.py | miloyip/benchmarks | e338363f2d3c35e8ff834c65d38d19f3108863b3 | [
"MIT"
] | 3 | 2015-12-18T06:59:16.000Z | 2020-03-19T06:49:25.000Z | import base64, time
STR_SIZE = 10000000
TRIES = 100
str = "a" * STR_SIZE
str2 = ""
t, s = time.time(), 0
for _ in range(0, TRIES):
str2 = base64.b64encode(str)
s += len(str2)
print("encode: {0}, {1}".format(s, time.time() - t))
t, s = time.time(), 0
for _ in range(0, TRIES):
s += len(base64.b64decode(str2))... | 19.684211 | 52 | 0.596257 |
7950305db4e7bcbdc7503ab0f86c072a3287da1b | 4,868 | py | Python | docs/conf.py | lenarother/santa-helpers | 0498b9922b357c98543929a39d9755085da527b0 | [
"MIT"
] | null | null | null | docs/conf.py | lenarother/santa-helpers | 0498b9922b357c98543929a39d9755085da527b0 | [
"MIT"
] | null | null | null | docs/conf.py | lenarother/santa-helpers | 0498b9922b357c98543929a39d9755085da527b0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# santa_helpers documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | 29.865031 | 77 | 0.688989 |
795031021b8e26cb347a86141cbac69062efcc76 | 1,285 | py | Python | realtime_hand_3d/segmentation/utils/metrics.py | NeelayS/realtime_hand | 219c772b9b7df60c390edac7da23f9cdddebca4d | [
"MIT"
] | null | null | null | realtime_hand_3d/segmentation/utils/metrics.py | NeelayS/realtime_hand | 219c772b9b7df60c390edac7da23f9cdddebca4d | [
"MIT"
] | null | null | null | realtime_hand_3d/segmentation/utils/metrics.py | NeelayS/realtime_hand | 219c772b9b7df60c390edac7da23f9cdddebca4d | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
def compute_iou(pred, target, is_idx=None):
n_classes = len(np.unique(target.cpu().data.numpy()))
if n_classes == 1:
pred_unique_np = np.unique(pred.cpu().data.numpy())
if len(pred_unique_np) == 1 and pred_... | 26.770833 | 78 | 0.550195 |
7950315a2b5f683d289359ab63cce16cec9c6871 | 262 | py | Python | python/train_fasttext.py | hsiaoko/REENet | 0763c7c6992a449e8e7ee77e889bb88e98faa389 | [
"MIT"
] | 1 | 2021-03-02T14:26:52.000Z | 2021-03-02T14:26:52.000Z | python/train_fasttext.py | hsiaoko/REENet | 0763c7c6992a449e8e7ee77e889bb88e98faa389 | [
"MIT"
] | null | null | null | python/train_fasttext.py | hsiaoko/REENet | 0763c7c6992a449e8e7ee77e889bb88e98faa389 | [
"MIT"
] | null | null | null | import fasttext
if __name__ == '__main__':
corpus_pth = "../corpus/dblp_acm/dblp_acm.title.csv"
model_pth = "../models/embeding/dblp_acm_title.bin"
model = fasttext.train_unsupervised(corpus_pth)
print(model.words)
model.save_model(model_pth) | 37.428571 | 56 | 0.732824 |
795032bb0ecff99121df7274f4717f56ce7ae0ce | 546 | py | Python | leetcode/binary_tree_preorder_traversal.py | alexandru-dinu/competitive-programming | 4515d221a649b3ab8bc012d01f38b9e4659e2e76 | [
"MIT"
] | null | null | null | leetcode/binary_tree_preorder_traversal.py | alexandru-dinu/competitive-programming | 4515d221a649b3ab8bc012d01f38b9e4659e2e76 | [
"MIT"
] | 6 | 2021-10-12T09:14:30.000Z | 2021-10-16T19:29:08.000Z | leetcode/binary_tree_preorder_traversal.py | alexandru-dinu/competitive-programming | 4515d221a649b3ab8bc012d01f38b9e4659e2e76 | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/binary-tree-preorder-traversal
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def preorderTraversal(self, root: Optional[T... | 28.736842 | 71 | 0.626374 |
795032c75c590697b381b1d3cab54ceec477988d | 17,664 | py | Python | cfgrib/eccodes.py | alexamici/cfgrib | 6536825ede61bbc61b7b51b827ec0c41efe9d0ee | [
"Apache-2.0"
] | null | null | null | cfgrib/eccodes.py | alexamici/cfgrib | 6536825ede61bbc61b7b51b827ec0c41efe9d0ee | [
"Apache-2.0"
] | null | null | null | cfgrib/eccodes.py | alexamici/cfgrib | 6536825ede61bbc61b7b51b827ec0c41efe9d0ee | [
"Apache-2.0"
] | 1 | 2020-05-18T21:59:22.000Z | 2020-05-18T21:59:22.000Z | #
# Copyright 2017-2018 European Centre for Medium-Range Weather Forecasts (ECMWF).
#
# 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... | 30.560554 | 99 | 0.691972 |
795033aff60052c00b4693a988adeb43873a0b22 | 8,050 | py | Python | Giveaways.py | CodeButt3rs/CodeButt3rsBot | db81d332b6595c6f102080e0ddbba3524ae1f600 | [
"Apache-2.0"
] | 1 | 2021-07-16T17:14:27.000Z | 2021-07-16T17:14:27.000Z | Giveaways.py | CodeButt3rs/CodeButt3rsBot | db81d332b6595c6f102080e0ddbba3524ae1f600 | [
"Apache-2.0"
] | null | null | null | Giveaways.py | CodeButt3rs/CodeButt3rsBot | db81d332b6595c6f102080e0ddbba3524ae1f600 | [
"Apache-2.0"
] | null | null | null | import datetime
import discord
import asyncio
import json
import random
import threading
from random import randrange
from discord_components.component import ButtonStyle
from discord_components import Button
from DatabaseTools import Database
from discord.ext import commands
from discord.utils import get
from tzlocal... | 50.3125 | 164 | 0.598261 |
795033f8c95d83ff27239242f77150aab8eac04b | 5,049 | py | Python | google/ads/google_ads/v4/services/transports/campaign_shared_set_service_grpc_transport.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v4/services/transports/campaign_shared_set_service_grpc_transport.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v4/services/transports/campaign_shared_set_service_grpc_transport.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2019 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... | 37.125 | 123 | 0.646465 |
7950344c30610719ecf652f4246cbb41d7c63ceb | 1,178 | py | Python | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/custom_audience_type.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/custom_audience_type.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/custom_audience_type.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- 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... | 28.047619 | 74 | 0.691002 |
795034f2b709de927c3d7655e99af0ab37f7a2a4 | 1,842 | py | Python | libs/python/test/test_line_data_list_dto.py | Scripta-Qumranica-Electronica/SQE_API_Connectors | aaa9b9eb8709d4257c32ea57321a179c6b1e041a | [
"MIT"
] | null | null | null | libs/python/test/test_line_data_list_dto.py | Scripta-Qumranica-Electronica/SQE_API_Connectors | aaa9b9eb8709d4257c32ea57321a179c6b1e041a | [
"MIT"
] | null | null | null | libs/python/test/test_line_data_list_dto.py | Scripta-Qumranica-Electronica/SQE_API_Connectors | aaa9b9eb8709d4257c32ea57321a179c6b1e041a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
SQE API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
impor... | 29.709677 | 124 | 0.623236 |
79503602a62e3b0ae4f93d55bf427b2497b5f25e | 7,417 | py | Python | tests/random.py | gravityshouldbenaut/MrMustard | 6ccd1036559dd587d34c9837e1e2424f690ac306 | [
"Apache-2.0"
] | null | null | null | tests/random.py | gravityshouldbenaut/MrMustard | 6ccd1036559dd587d34c9837e1e2424f690ac306 | [
"Apache-2.0"
] | null | null | null | tests/random.py | gravityshouldbenaut/MrMustard | 6ccd1036559dd587d34c9837e1e2424f690ac306 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 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 agre... | 29.086275 | 122 | 0.684913 |
7950380007661c1052ac20305267fd048615dc08 | 5,610 | py | Python | src/python/fsqio/pants/node/tasks/webpack_resolve.py | Eric-Arellano/fsqio | 9f809badb38679a00adef5b7cab3ad47e33391d0 | [
"Apache-2.0"
] | null | null | null | src/python/fsqio/pants/node/tasks/webpack_resolve.py | Eric-Arellano/fsqio | 9f809badb38679a00adef5b7cab3ad47e33391d0 | [
"Apache-2.0"
] | null | null | null | src/python/fsqio/pants/node/tasks/webpack_resolve.py | Eric-Arellano/fsqio | 9f809badb38679a00adef5b7cab3ad47e33391d0 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2016 Foursquare Labs Inc. All Rights Reserved.
from __future__ import absolute_import, division, print_function, unicode_literals
import hashlib
import logging
import os
from pants.base.build_environment import get_buildroot
from pants.base.fingerprint_strategy import DefaultFingerprintStr... | 40.071429 | 117 | 0.77451 |
795038a9d2cd47bd1f29f08bff644074623b8408 | 10,608 | py | Python | mmtbx/refinement/real_space/tst_fit_residues_4.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | 2 | 2021-03-18T12:31:57.000Z | 2022-03-14T06:27:06.000Z | mmtbx/refinement/real_space/tst_fit_residues_4.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/refinement/real_space/tst_fit_residues_4.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-02-04T15:39:06.000Z | 2020-02-04T15:39:06.000Z | from __future__ import absolute_import, division, print_function
import time
import mmtbx.refinement.real_space.fit_residues
import mmtbx.refinement.real_space
pdb_answer = """\
CRYST1 23.341 28.568 19.164 90.00 90.00 90.00 P 1
ATOM 1 N PHE A 58 8.659 20.073 11.185 1.00 7.73 N
ATO... | 62.4 | 78 | 0.473888 |
795038f6d5e8d3c2b7a8a9577f0e108212286b85 | 495 | py | Python | setup.py | stacks13/nbmerge | ee4e99d51278882d0ab1a9e7e1264fddc9da275e | [
"MIT"
] | null | null | null | setup.py | stacks13/nbmerge | ee4e99d51278882d0ab1a9e7e1264fddc9da275e | [
"MIT"
] | null | null | null | setup.py | stacks13/nbmerge | ee4e99d51278882d0ab1a9e7e1264fddc9da275e | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name='nbmerge',
version='0.1',
packages=setuptools.find_packages(),
url='https://github.com/stacks13/nbmerge',
license='',
long_description=long_description,
long_description_content_typ... | 26.052632 | 53 | 0.69899 |
79503a91f8a84d86c5f441a096dee3e74dea4505 | 314 | py | Python | tests/test_skeleton.py | DarrenMun/flaskPyscaffold | 74926da002acaa2079d4fc4c680bf17fc5cc0e11 | [
"MIT"
] | null | null | null | tests/test_skeleton.py | DarrenMun/flaskPyscaffold | 74926da002acaa2079d4fc4c680bf17fc5cc0e11 | [
"MIT"
] | null | null | null | tests/test_skeleton.py | DarrenMun/flaskPyscaffold | 74926da002acaa2079d4fc4c680bf17fc5cc0e11 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from my_project.skeleton import fib
__author__ = "creminsg"
__copyright__ = "creminsg"
__license__ = "mit"
def test_fib():
assert fib(1) == 1
assert fib(2) == 1
assert fib(7) == 13
with pytest.raises(AssertionError):
fib(-10)
| 17.444444 | 39 | 0.640127 |
79503ab684e9df04223791f1cd2b02bf7e4c464e | 5,415 | py | Python | scripts/viz_one_sim.py | idc9/repro_lap_reg | 1d3e846f8f2c3d04b4153d9ac56e0e9bd37198ca | [
"MIT"
] | null | null | null | scripts/viz_one_sim.py | idc9/repro_lap_reg | 1d3e846f8f2c3d04b4153d9ac56e0e9bd37198ca | [
"MIT"
] | null | null | null | scripts/viz_one_sim.py | idc9/repro_lap_reg | 1d3e846f8f2c3d04b4153d9ac56e0e9bd37198ca | [
"MIT"
] | null | null | null | from os.path import join, exists
from joblib import load
import numpy as np
# import matplotlib.pyplot as plt
import argparse
from itertools import product
import sys
from fclsp.reshaping_utils import fill_hollow_sym
from repro_lap_reg.viz_fit import viz_path_diagnostics, heatmap,\
print_estimators
# from repro_l... | 31.12069 | 78 | 0.638412 |
79503ac35bfc04c187863dda65e6afe9507af37b | 6,498 | py | Python | tools/nuscenes_to_coco.py | albertchristian92/RRPN | fd54271b74bbd1cd43cc00f46fd41b19336b4993 | [
"MIT"
] | 83 | 2019-05-03T15:21:27.000Z | 2022-02-01T19:55:25.000Z | tools/nuscenes_to_coco.py | albertchristian92/RRPN | fd54271b74bbd1cd43cc00f46fd41b19336b4993 | [
"MIT"
] | 11 | 2019-06-18T07:33:12.000Z | 2021-09-01T06:49:50.000Z | tools/nuscenes_to_coco.py | albertchristian92/RRPN | fd54271b74bbd1cd43cc00f46fd41b19336b4993 | [
"MIT"
] | 31 | 2019-05-03T12:39:00.000Z | 2022-02-01T19:55:28.000Z | import _init_path
import os
import sys
import pickle
import numpy as np
import argparse
from tqdm import tqdm, trange
from cocoplus.coco import COCO_PLUS
from pynuscenes.utils.nuscenes_utils import nuscenes_box_to_coco, nuscene_cat_to_coco
from pynuscenes.nuscenes_dataset import NuscenesDataset
from nuscenes.utils.geom... | 41.922581 | 96 | 0.517698 |
79503c3ce15efdb889ce64033029f2ff8292c255 | 59,826 | py | Python | lang/text_analysis.py | gtoffoli/commons-cops | e4b1f556c550e25bb2e6a9eabe8db963877c08d3 | [
"MIT"
] | null | null | null | lang/text_analysis.py | gtoffoli/commons-cops | e4b1f556c550e25bb2e6a9eabe8db963877c08d3 | [
"MIT"
] | null | null | null | lang/text_analysis.py | gtoffoli/commons-cops | e4b1f556c550e25bb2e6a9eabe8db963877c08d3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-"""
from importlib import import_module
import string
import re
import json
import requests
import tempfile
from collections import defaultdict, OrderedDict
from operator import itemgetter
import textract
import readability
from bs4 import BeautifulSoup
# from django.http import HttpResponse, H... | 46.775606 | 255 | 0.623859 |
79503d91aa391b2a666d7272020192061ad57717 | 28 | py | Python | discord_interaction/abc/__init__.py | HazemMeqdad/discord-interaction | 91a8807c09708e3b134c17c5bf255e8ca6c3fea7 | [
"MIT"
] | 2 | 2021-12-09T23:01:18.000Z | 2021-12-10T17:16:42.000Z | discord_interaction/abc/__init__.py | HazemMeqdad/discord-interaction | 91a8807c09708e3b134c17c5bf255e8ca6c3fea7 | [
"MIT"
] | null | null | null | discord_interaction/abc/__init__.py | HazemMeqdad/discord-interaction | 91a8807c09708e3b134c17c5bf255e8ca6c3fea7 | [
"MIT"
] | null | null | null | from .context import Context | 28 | 28 | 0.857143 |
79503de20dacbec0d393737860b6e6ace488c039 | 7,058 | py | Python | lib/IPython/core/hooks.py | sumanau7/Ele_CC_Sumanau | c0cdb3976bf02a09341393259908eafba3d1a345 | [
"Apache-2.0"
] | 652 | 2015-07-26T00:00:17.000Z | 2022-02-24T18:30:04.000Z | SLpackage/private/thirdparty/pythonpkgs/ipython/ipython_4.0.0/lib/python2.7/site-packages/IPython/core/hooks.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 8 | 2015-09-07T03:38:19.000Z | 2021-05-23T03:18:51.000Z | SLpackage/private/thirdparty/pythonpkgs/ipython/ipython_4.0.0/lib/python2.7/site-packages/IPython/core/hooks.py | fanglab/6mASCOPE | 3f1fdcb7693ff152f17623ce549526ec272698b1 | [
"BSD-3-Clause"
] | 40 | 2015-07-24T19:45:08.000Z | 2021-11-01T14:54:56.000Z | """Hooks for IPython.
In Python, it is possible to overwrite any method of any object if you really
want to. But IPython exposes a few 'hooks', methods which are *designed* to
be overwritten by users for customization purposes. This module defines the
default versions of all such hooks, which get used by IPython if ... | 32.827907 | 94 | 0.646359 |
79503efd8eaa401a4d84acb3e54dbbb3735203a5 | 15,101 | py | Python | webcamlib/Scheduler.py | mbuckaway/trailcam | ebea33b7f93b5b813af53e9d00076ba5d8fb6fbf | [
"MIT"
] | null | null | null | webcamlib/Scheduler.py | mbuckaway/trailcam | ebea33b7f93b5b813af53e9d00076ba5d8fb6fbf | [
"MIT"
] | null | null | null | webcamlib/Scheduler.py | mbuckaway/trailcam | ebea33b7f93b5b813af53e9d00076ba5d8fb6fbf | [
"MIT"
] | null | null | null | from webcamlib.Config import Config, ConfigScheduler
from webcamlib.Exceptions import InvalidFunctionError
from webcamlib.Annotate import Annotate
from webcamlib.TemperatureSensor import TemperatureSensor
from webcamlib.VoltageSensor import VoltageSensor
from webcamlib.LightSensor import LightSensor
from webcamlib.Thin... | 38.133838 | 133 | 0.62135 |
795040d51dd4a7e37cc75e7fa31de41504733dd3 | 435 | py | Python | intro/numpy/solutions/2_3_crude_integration.py | junghun73/Learning | 8b5a295c42f142a3b2f5fa13fc75434a2ea9235a | [
"CC-BY-4.0"
] | 419 | 2016-03-05T08:50:48.000Z | 2022-03-24T15:16:46.000Z | intro/numpy/solutions/2_3_crude_integration.py | techeye220/scipy-lecture-notes-zh-CN | cc87204fcc4bd2f4702f7c29c83cb8ed5c94b7d6 | [
"CC-BY-4.0"
] | 5 | 2016-05-21T14:21:12.000Z | 2017-10-06T11:09:48.000Z | intro/numpy/solutions/2_3_crude_integration.py | techeye220/scipy-lecture-notes-zh-CN | cc87204fcc4bd2f4702f7c29c83cb8ed5c94b7d6 | [
"CC-BY-4.0"
] | 233 | 2016-02-13T09:22:57.000Z | 2021-11-11T17:58:44.000Z | import numpy as np
from numpy import newaxis
def f(a, b, c):
return a**b - c
a = np.linspace(0, 1, 24)
b = np.linspace(0, 1, 12)
c = np.linspace(0, 1, 6)
samples = f(a[:,newaxis,newaxis],
b[newaxis,:,newaxis],
c[newaxis,newaxis,:])
# or,
#
# a, b, c = np.ogrid[0:1:24j, 0:1:12j, 0:1:6j]
#... | 18.125 | 46 | 0.574713 |
795042c3385f0f20f02e040e644e02d653693671 | 11,159 | py | Python | rest-service/manager_rest/utils.py | TS-at-WS/cloudify-manager | 3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc | [
"Apache-2.0"
] | null | null | null | rest-service/manager_rest/utils.py | TS-at-WS/cloudify-manager | 3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc | [
"Apache-2.0"
] | null | null | null | rest-service/manager_rest/utils.py | TS-at-WS/cloudify-manager | 3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc | [
"Apache-2.0"
] | null | null | null | #########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | 31.792023 | 79 | 0.683663 |
795042ce3f3a51eaca4061c6aad6ca978e6b8b10 | 1,113 | py | Python | panel/_testing/fixtures.py | rupakgoyal/panel- | 4e1e01e1766ebfc2fc1efb409734fd51efc60c01 | [
"BSD-3-Clause"
] | 1 | 2019-10-15T13:21:20.000Z | 2019-10-15T13:21:20.000Z | panel/_testing/fixtures.py | rupakgoyal/panel- | 4e1e01e1766ebfc2fc1efb409734fd51efc60c01 | [
"BSD-3-Clause"
] | null | null | null | panel/_testing/fixtures.py | rupakgoyal/panel- | 4e1e01e1766ebfc2fc1efb409734fd51efc60c01 | [
"BSD-3-Clause"
] | 1 | 2019-06-04T04:17:53.000Z | 2019-06-04T04:17:53.000Z | """
A module containing testing utilities and fixtures.
"""
from __future__ import absolute_import, division, unicode_literals
import re
import shutil
import pytest
from bokeh.document import Document
from pyviz_comms import Comm
@pytest.fixture
def document():
return Document()
@pytest.fixture
def comm(... | 20.236364 | 66 | 0.71159 |
795043147a5a5969d9454ed0cf389b455c8534be | 6,635 | py | Python | test.py | zhhugh/Violation-detection | 0a3c0306a9fcac0518e5adc524d457af9e58e8d3 | [
"MIT"
] | 1 | 2021-04-23T09:26:20.000Z | 2021-04-23T09:26:20.000Z | test.py | zhhugh/Violation-detection | 0a3c0306a9fcac0518e5adc524d457af9e58e8d3 | [
"MIT"
] | null | null | null | test.py | zhhugh/Violation-detection | 0a3c0306a9fcac0518e5adc524d457af9e58e8d3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project :building detection
@File :test.py
@Author :zhouhan
@Date :2021/4/22 5:56 下午
'''
# -*- coding: utf-8 -*-
import warnings
warnings.filterwarnings("ignore")
import os
import sys
import random
import math
import numpy as np
import skimage.io
import matplotlib... | 32.208738 | 120 | 0.652449 |
795043227ee9d2ef627c08f58b3fd158da97d30c | 59,759 | py | Python | core/domain/topic_services_test.py | group1oppia/oppia | 84d9f4f7cf9f8737c4bb7677468eec41607bc187 | [
"Apache-2.0"
] | null | null | null | core/domain/topic_services_test.py | group1oppia/oppia | 84d9f4f7cf9f8737c4bb7677468eec41607bc187 | [
"Apache-2.0"
] | null | null | null | core/domain/topic_services_test.py | group1oppia/oppia | 84d9f4f7cf9f8737c4bb7677468eec41607bc187 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2018 The Oppia 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 requi... | 43.461091 | 80 | 0.645175 |
795043f7d3025281eea1e6c9f7a2acc1c46ca269 | 1,043 | py | Python | src/mtenv/tests/examples/wrapped_bandit_test.py | NagisaZj/ac-teach | 481811d5c80d0dbee54f16c063b4ea3262b82050 | [
"MIT"
] | 56 | 2021-02-11T19:15:17.000Z | 2022-03-03T02:58:18.000Z | src/mtenv/tests/examples/wrapped_bandit_test.py | NagisaZj/ac-teach | 481811d5c80d0dbee54f16c063b4ea3262b82050 | [
"MIT"
] | 1 | 2021-04-12T11:20:16.000Z | 2021-04-20T22:53:28.000Z | src/mtenv/tests/examples/wrapped_bandit_test.py | NagisaZj/ac-teach | 481811d5c80d0dbee54f16c063b4ea3262b82050 | [
"MIT"
] | 3 | 2021-02-27T11:46:16.000Z | 2021-11-06T13:59:40.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from typing import List
import pytest
from gym import spaces
from examples.bandit import BanditEnv # noqa: E402
from examples.wrapped_bandit import MTBanditWrapper # noqa: E402
from tests.utils.utils import validate_mtenv
def get_valid_n_arms(... | 26.74359 | 82 | 0.712368 |
795045dfa933cfc06c5e6a09735294df64ac4b91 | 15,101 | py | Python | sciibo/tests/test_ai.py | fdev/sciibo | 984ec1945cd0f371bce148c1eb1e811befadb478 | [
"MIT"
] | 14 | 2017-06-16T14:16:57.000Z | 2021-02-26T13:53:56.000Z | sciibo/tests/test_ai.py | fdev/sciibo | 984ec1945cd0f371bce148c1eb1e811befadb478 | [
"MIT"
] | 1 | 2018-06-27T16:11:48.000Z | 2019-01-23T12:02:17.000Z | sciibo/tests/test_ai.py | fdev/sciibo | 984ec1945cd0f371bce148c1eb1e811befadb478 | [
"MIT"
] | null | null | null | import unittest
from sciibo.bot import ai
from sciibo.core.helpers import nextcard, fitson
def print_layout(stock=None, discards=None, hand=None, builds=None):
layout = "" \
" __ __ __ __ \n" \
" |xx| |xx| |xx| |xx| \n" \
" |__| |__| |... | 28.984645 | 83 | 0.417456 |
795045f34cc14295a4f5d5dd8810e2a630dc4eb4 | 837 | py | Python | Assignment_5/Graph_Plotter.py | pkck28/Applied-Computation-in-Mechanical-Sciences | 411d56faae2291fd056cd2f1a3e09e2854f84b49 | [
"MIT"
] | null | null | null | Assignment_5/Graph_Plotter.py | pkck28/Applied-Computation-in-Mechanical-Sciences | 411d56faae2291fd056cd2f1a3e09e2854f84b49 | [
"MIT"
] | null | null | null | Assignment_5/Graph_Plotter.py | pkck28/Applied-Computation-in-Mechanical-Sciences | 411d56faae2291fd056cd2f1a3e09e2854f84b49 | [
"MIT"
] | null | null | null | # Importing the required module
import pandas as pd
import matplotlib.pyplot as plt
# Reading Data from CSV File
data = pd.read_csv("/home/pavan/Desktop/ACMS/Assignment_5/GSS_Error.csv")
# Ploting Graph for error variation
GSS_figure = plt.figure(1)
plt.plot(data.index,data["Ea"],'b')
plt.xlabel("Number of itera... | 28.862069 | 73 | 0.757467 |
795047528e25d1c1ca7338ed67ea346c26db6941 | 709 | py | Python | src/google/appengine/api/runtime/__init__.py | phil-lopreiato/appengine-python-standard | 5e2c400a24d299bb86e98f755a6ef510b4e1e0df | [
"Apache-2.0"
] | 28 | 2021-01-06T19:55:21.000Z | 2022-03-28T09:41:08.000Z | src/google/appengine/api/runtime/__init__.py | SOFTWARESOLUTONS-PVT-LIMITED/appengine-python-standard | 530a54b0fc0eb74d9dc29b19b7c4cdfab0556ebc | [
"Apache-2.0"
] | 13 | 2021-06-17T09:38:17.000Z | 2022-03-11T01:12:33.000Z | src/google/appengine/api/runtime/__init__.py | SOFTWARESOLUTONS-PVT-LIMITED/appengine-python-standard | 530a54b0fc0eb74d9dc29b19b7c4cdfab0556ebc | [
"Apache-2.0"
] | 28 | 2021-03-09T19:27:37.000Z | 2022-01-21T21:18:52.000Z | #!/usr/bin/env python
#
# Copyright 2007 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... | 26.259259 | 74 | 0.7433 |
795047ae1cf7c59c07e8dd149ebe8cfc3286b0db | 78,921 | py | Python | snakemake/dag.py | scholer/snakemake | 99de496322f4813fea590ee50607be8042f176d5 | [
"MIT"
] | null | null | null | snakemake/dag.py | scholer/snakemake | 99de496322f4813fea590ee50607be8042f176d5 | [
"MIT"
] | null | null | null | snakemake/dag.py | scholer/snakemake | 99de496322f4813fea590ee50607be8042f176d5 | [
"MIT"
] | null | null | null | __author__ = "Johannes Köster"
__copyright__ = "Copyright 2015-2019, Johannes Köster"
__email__ = "koester@jimmy.harvard.edu"
__license__ = "MIT"
import html
import os
import shutil
import textwrap
import time
import tarfile
from collections import defaultdict, Counter, deque, namedtuple
from itertools import chain, f... | 37.297259 | 132 | 0.528681 |
79504808c893c374ddc7bef3ad2b52f5959d8d02 | 1,797 | py | Python | dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py | InterestingLab/dolphinscheduler | 2ff76c7e7330c166fba1e514aba6ddf2dbe74f57 | [
"Apache-2.0"
] | 2,086 | 2021-04-15T20:28:24.000Z | 2022-03-31T22:30:49.000Z | dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py | InterestingLab/dolphinscheduler | 2ff76c7e7330c166fba1e514aba6ddf2dbe74f57 | [
"Apache-2.0"
] | 3,789 | 2021-04-15T16:00:32.000Z | 2022-03-31T13:38:53.000Z | dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/python.py | InterestingLab/dolphinscheduler | 2ff76c7e7330c166fba1e514aba6ddf2dbe74f57 | [
"Apache-2.0"
] | 1,170 | 2021-04-16T06:40:24.000Z | 2022-03-31T22:30:51.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.557692 | 83 | 0.705064 |
79504898c59d1869aade50ce83cb130522a806d4 | 1,199 | py | Python | demo/config.py | jpoikela/sappho | 58f72b6d04c1d0ec511026473f4475eed15c9bd5 | [
"MIT"
] | 7 | 2016-08-19T23:31:02.000Z | 2017-03-30T11:58:42.000Z | demo/config.py | jpoikela/sappho | 58f72b6d04c1d0ec511026473f4475eed15c9bd5 | [
"MIT"
] | 45 | 2016-07-26T19:48:09.000Z | 2016-12-10T22:50:14.000Z | demo/config.py | lily-seabreeze/sappho | 58f72b6d04c1d0ec511026473f4475eed15c9bd5 | [
"MIT"
] | 1 | 2018-11-29T14:16:59.000Z | 2018-11-29T14:16:59.000Z | """Configuration constants for Sappho demo."""
import pkg_resources
# Constants/game config
# The path to the file that's being used to represent the player
ANIMATED_SPRITE_PATH = pkg_resources.resource_filename("test_scene", "test.gif")
# The path to the file being used as the tilesheet
TILESHEET_PATH = pkg_resourc... | 27.883721 | 80 | 0.744787 |
795048bb8fdc99b2d38eeda188d4301803ce61c7 | 1,014 | py | Python | tutorials/true_model_mpc/tutorial_one.py | wangsd01/blackbox_mpc | 7876dee1bd85bde310e88741f5c63e3f7bd93916 | [
"MIT"
] | 29 | 2020-10-20T08:14:45.000Z | 2022-02-01T13:43:13.000Z | tutorials/true_model_mpc/tutorial_one.py | wangsd01/blackbox_mpc | 7876dee1bd85bde310e88741f5c63e3f7bd93916 | [
"MIT"
] | 3 | 2020-11-27T13:25:08.000Z | 2021-12-12T04:30:41.000Z | tutorials/true_model_mpc/tutorial_one.py | wangsd01/blackbox_mpc | 7876dee1bd85bde310e88741f5c63e3f7bd93916 | [
"MIT"
] | 3 | 2021-04-15T14:23:41.000Z | 2022-03-28T05:43:29.000Z | """
- instantiate an env for a pendulum
- instantiate an MPC controller using the true known analytical model
- define cost/reward functions as used in the openAI gym env.
- render the resulting MPC afterwards
"""
from blackbox_mpc.policies.mpc_policy import \
MPCPolicy
from blackbox_mpc.utils.pendulum import Pendu... | 36.214286 | 70 | 0.68146 |
7950494fa540a3d73b3a5c1228a1b4be9ff19522 | 2,660 | py | Python | app/htmlSectionsExtractor.py | daniel-julio-iglesias/sectionsextractor | 3337d770bf39d06cd79e0ae6608889004e6ea8f6 | [
"MIT"
] | null | null | null | app/htmlSectionsExtractor.py | daniel-julio-iglesias/sectionsextractor | 3337d770bf39d06cd79e0ae6608889004e6ea8f6 | [
"MIT"
] | 4 | 2020-03-24T16:10:04.000Z | 2022-03-08T21:09:17.000Z | app/htmlSectionsExtractor.py | daniel-julio-iglesias/sectionsextractor | 3337d770bf39d06cd79e0ae6608889004e6ea8f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#! /usr/bin/env python3
# -*- coding: cp1252 -*-
"""
GNU+Health%2FFamilies
GNUHealthFamilies.html
https://en.wikibooks.org/wiki/GNU_Health/Families
exampleSoup.select('p')
exampleSoup.select('h1')
exampleSoup.select('h2')
"""
import os
import codecs
import math
from co... | 28.602151 | 125 | 0.611278 |
79504ae293a9e48f06cacfbea0be75c1633b27fe | 2,189 | py | Python | PWE_Diagnostic_Lattice_Tool/ASP_LogicProgram.py | idaks/PWE-Diagnostic-Lattice-Tool | b8b4823d7a3a350b1fd1341160a900337c4d7cd8 | [
"MIT"
] | null | null | null | PWE_Diagnostic_Lattice_Tool/ASP_LogicProgram.py | idaks/PWE-Diagnostic-Lattice-Tool | b8b4823d7a3a350b1fd1341160a900337c4d7cd8 | [
"MIT"
] | null | null | null | PWE_Diagnostic_Lattice_Tool/ASP_LogicProgram.py | idaks/PWE-Diagnostic-Lattice-Tool | b8b4823d7a3a350b1fd1341160a900337c4d7cd8 | [
"MIT"
] | null | null | null | from .LogicProgram import LogicProgram
from PW_explorer.run_clingo import run_clingo
from PW_explorer.run_dlv import run_dlv
from PW_explorer.load_worlds import load_worlds
from .LatticeNode import NodeAmbiguityType
class ASP_LogicProgram(LogicProgram):
def __init__(self, initial_encoding: str, constraint_keywor... | 39.8 | 116 | 0.655094 |
79504bb215540ac7e388ee79c9965b53c49a36b0 | 156 | py | Python | runbot.py | tkgwku/meiro-ilas-seminar-2017 | 5215aeb3c16c69726133303cdaff4d3fbd5916d3 | [
"MIT"
] | null | null | null | runbot.py | tkgwku/meiro-ilas-seminar-2017 | 5215aeb3c16c69726133303cdaff4d3fbd5916d3 | [
"MIT"
] | null | null | null | runbot.py | tkgwku/meiro-ilas-seminar-2017 | 5215aeb3c16c69726133303cdaff4d3fbd5916d3 | [
"MIT"
] | null | null | null | # coding: utf-8
from slackbot.bot import Bot
def main():
bot = Bot()
bot.run()
if __name__ == "__main__":
print('start slackbot')
main() | 13 | 28 | 0.596154 |
79504beac7c863d7e48b30cb1edac572ac9af7b4 | 3,293 | py | Python | docs/examples/aggplot-collisions.py | lmmarsano/geoplot | 77470728ddf726292bc84b2ed207d932d2069862 | [
"MIT"
] | null | null | null | docs/examples/aggplot-collisions.py | lmmarsano/geoplot | 77470728ddf726292bc84b2ed207d932d2069862 | [
"MIT"
] | null | null | null | docs/examples/aggplot-collisions.py | lmmarsano/geoplot | 77470728ddf726292bc84b2ed207d932d2069862 | [
"MIT"
] | null | null | null | # This example demonstrates how to use the `aggplot` function, using part of a NYC traffic collisions dataset.
#
# In the first plot we have a bunch of point data, but don't provide any geometry about the locations. So `aggplot`
# invents its own, partitioning the sample space into increasingly fine squares (known as a... | 44.5 | 119 | 0.696022 |
79504c2079f89bdf3ec5c225cf4f0f9259ca5750 | 14,123 | py | Python | src/lib/reportlab/graphics/charts/spider.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | 1 | 2018-06-15T09:42:22.000Z | 2018-06-15T09:42:22.000Z | src/lib/reportlab/graphics/charts/spider.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | src/lib/reportlab/graphics/charts/spider.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | #Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/charts/spider.py
# spider chart, also known as radar chart
"""Spider Chart
Normal use shows variation of 5-10 parameters against ... | 39.89548 | 115 | 0.547971 |
79504cecc47c361158d211cf030837cc970e51f1 | 10,739 | py | Python | msw/config/configs/spatial.py | takaratruong/minishapeworld | ee23712d59248c502f5b9247916a60853f21b508 | [
"MIT"
] | 4 | 2020-04-04T23:25:14.000Z | 2021-03-19T02:05:45.000Z | msw/config/configs/spatial.py | takaratruong/minishapeworld | ee23712d59248c502f5b9247916a60853f21b508 | [
"MIT"
] | 2 | 2022-01-13T03:46:49.000Z | 2022-03-12T00:58:20.000Z | msw/config/configs/spatial.py | takaratruong/minishapeworld | ee23712d59248c502f5b9247916a60853f21b508 | [
"MIT"
] | 2 | 2020-07-03T01:41:27.000Z | 2021-06-27T21:01:42.000Z | from collections import namedtuple
from enum import Enum
import numpy as np
from ... import color
from ... import constants as C
from ... import shape
from .. import spec
from .. import util as config_util
from . import configbase
_SpatialConfigBase = namedtuple("SpatialConfig", ["shapes", "relation", "dir"])
def ... | 33.876972 | 99 | 0.521371 |
79504d96196fc00e92ed8f5d2cf47d27e87b96ab | 63,620 | py | Python | tests/unit/gapic/compute_v1/test_firewalls.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_firewalls.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_firewalls.py | georgiyekkert/python-compute | d128efbb3bf10af9b41e55b20aaa8080b3221e77 | [
"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... | 38.487598 | 105 | 0.685775 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.