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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a06b1df56785e99084d56d614ec2e371dbd7d04 | 979 | py | Python | journal.py | joeryan/pytest-practice | 45b485cdc654f8d03608a57bbf0b26fcc9b5b82e | [
"MIT"
] | null | null | null | journal.py | joeryan/pytest-practice | 45b485cdc654f8d03608a57bbf0b26fcc9b5b82e | [
"MIT"
] | null | null | null | journal.py | joeryan/pytest-practice | 45b485cdc654f8d03608a57bbf0b26fcc9b5b82e | [
"MIT"
] | null | null | null | import sys
from pathlib import Path
jfile = Path('./data/default.jrn')
print('-'*40 + "\n")
print("\t\tJOURNAL APP")
print('-'*40 + "\n")
journal = []
if jfile.is_file():
count = 0
print("... loading journal from ./data/default.jrn ...")
with open(jfile) as jf:
for entry in jf.readlines():
journal.append(ent... | 23.309524 | 69 | 0.618999 |
4a06b2994c123438ce3bc83c102ddcf6de8d822e | 40,202 | py | Python | cloudbridge/providers/aws/resources.py | FabioRosado/cloudbridge | bf11839158d2e2fda6fc651f94075c5315aad8f6 | [
"MIT"
] | null | null | null | cloudbridge/providers/aws/resources.py | FabioRosado/cloudbridge | bf11839158d2e2fda6fc651f94075c5315aad8f6 | [
"MIT"
] | null | null | null | cloudbridge/providers/aws/resources.py | FabioRosado/cloudbridge | bf11839158d2e2fda6fc651f94075c5315aad8f6 | [
"MIT"
] | 1 | 2021-11-17T02:55:37.000Z | 2021-11-17T02:55:37.000Z | """
DataTypes used by this provider
"""
import hashlib
import inspect
import logging
from botocore.exceptions import ClientError
import tenacity
from cloudbridge.base.resources import BaseAttachmentInfo
from cloudbridge.base.resources import BaseBucket
from cloudbridge.base.resources import BaseBucketObject
from clo... | 29.97912 | 84 | 0.621959 |
4a06b3bd536ded5eb24bce08c4ec1816d01fee52 | 805 | py | Python | awx/main/migrations/0061_v350_track_native_credentialtype_source.py | Avinesh/awx | 6310a2edd890d6062a9f6bcdeb2b46c4b876c2bf | [
"Apache-2.0"
] | 17 | 2021-04-03T01:40:17.000Z | 2022-03-03T11:45:20.000Z | awx/main/migrations/0061_v350_track_native_credentialtype_source.py | Avinesh/awx | 6310a2edd890d6062a9f6bcdeb2b46c4b876c2bf | [
"Apache-2.0"
] | 24 | 2021-05-18T21:13:35.000Z | 2022-03-29T10:23:52.000Z | awx/main/migrations/0061_v350_track_native_credentialtype_source.py | Avinesh/awx | 6310a2edd890d6062a9f6bcdeb2b46c4b876c2bf | [
"Apache-2.0"
] | 24 | 2020-11-27T08:37:35.000Z | 2021-03-08T13:27:15.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-02-19 04:27
from __future__ import unicode_literals
from django.db import migrations, models
from awx.main.models import CredentialType
from awx.main.utils.common import set_current_apps
def migrate_to_static_inputs(apps, schema_editor):
set_current_... | 26.833333 | 93 | 0.711801 |
4a06b4111c09991f5b3ba8b06f3c5f2afd640272 | 1,956 | py | Python | geotrek/api/v2/views/__init__.py | numahell/Geotrek-admin | e279875b0b06ef60928c049d51533f76716c902a | [
"BSD-2-Clause"
] | 1 | 2019-12-11T11:04:05.000Z | 2019-12-11T11:04:05.000Z | geotrek/api/v2/views/__init__.py | numahell/Geotrek-admin | e279875b0b06ef60928c049d51533f76716c902a | [
"BSD-2-Clause"
] | null | null | null | geotrek/api/v2/views/__init__.py | numahell/Geotrek-admin | e279875b0b06ef60928c049d51533f76716c902a | [
"BSD-2-Clause"
] | null | null | null | from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from rest_framework import response, permissions
from rest_framework.views import APIView
from django.conf import settings
from django.contrib.gis.geos import Polygon
from .authent import StructureViewSet # noqa
from .common import TargetPortalVi... | 39.12 | 175 | 0.754601 |
4a06b620ecef0174df64d32bf3cce002500f78c6 | 15,366 | py | Python | apps/reports/tests/case.py | commtrack/commtrack-old-to-del | cc9c22754ac192a45483cef609bdcf09aa990340 | [
"BSD-3-Clause"
] | 1 | 2017-05-19T07:23:00.000Z | 2017-05-19T07:23:00.000Z | apps/reports/tests/case.py | commtrack/commtrack-old-to-del | cc9c22754ac192a45483cef609bdcf09aa990340 | [
"BSD-3-Clause"
] | null | null | null | apps/reports/tests/case.py | commtrack/commtrack-old-to-del | cc9c22754ac192a45483cef609bdcf09aa990340 | [
"BSD-3-Clause"
] | null | null | null | import unittest
import os
from receiver.models import Submission, Attachment
from reports.models import *
from xformmanager.tests.util import *
from xformmanager.models import *
from xformmanager.storageutility import StorageUtility
from hq.models import Domain
#from django.test import TestCase
class CaseTestCase(unit... | 48.626582 | 167 | 0.626904 |
4a06b647ae810cc83badaf9bc15d9958891a2a0c | 30,941 | py | Python | ryu/ofproto/nicira_ext.py | yyd01245/ryu | 2ed74efd26bc6bb32ca9292ee7c22c7600ee89d2 | [
"Apache-2.0"
] | null | null | null | ryu/ofproto/nicira_ext.py | yyd01245/ryu | 2ed74efd26bc6bb32ca9292ee7c22c7600ee89d2 | [
"Apache-2.0"
] | null | null | null | ryu/ofproto/nicira_ext.py | yyd01245/ryu | 2ed74efd26bc6bb32ca9292ee7c22c7600ee89d2 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp>
#
# 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
#
... | 41.199734 | 79 | 0.654762 |
4a06b74c49584a8700af25bb344579795873a8ee | 246 | py | Python | setup.py | florianwittkamp/nicegui | 4c054f4e5b82e4ac56db93b73d5fb5ffcd480d06 | [
"MIT"
] | 30 | 2021-06-16T15:46:45.000Z | 2022-03-27T03:14:18.000Z | setup.py | florianwittkamp/nicegui | 4c054f4e5b82e4ac56db93b73d5fb5ffcd480d06 | [
"MIT"
] | 11 | 2021-05-24T17:05:22.000Z | 2022-02-19T07:13:18.000Z | setup.py | florianwittkamp/nicegui | 4c054f4e5b82e4ac56db93b73d5fb5ffcd480d06 | [
"MIT"
] | 7 | 2021-07-22T05:51:04.000Z | 2022-01-31T19:39:37.000Z | #!/usr/bin/env python3
from distutils.core import setup
setup(
name='NiceGUI',
version='1.0',
author='Zauberzeug',
author_email='info@zauberzeug.com',
url='https://github.com/zauberzeug/nicegui/',
packages=['nicegui'],
)
| 20.5 | 49 | 0.662602 |
4a06b7b17f15a557d0cd06a942bb026540c53821 | 362 | py | Python | Daily Programmer/Easy Challenges/0016 - Character Removal/Solution.py | MJVL/Daily-Programmer-Challenges | 7db19b46754436189dbcf980348fe47708b44c7e | [
"MIT"
] | 2 | 2018-03-28T18:08:51.000Z | 2018-06-09T20:27:52.000Z | Daily Programmer/Easy Challenges/0016 - Character Removal/Solution.py | MJVL/Programming-Challenges | 7db19b46754436189dbcf980348fe47708b44c7e | [
"MIT"
] | null | null | null | Daily Programmer/Easy Challenges/0016 - Character Removal/Solution.py | MJVL/Programming-Challenges | 7db19b46754436189dbcf980348fe47708b44c7e | [
"MIT"
] | null | null | null | def remove_characters(str_one, str_two):
for c in str_two:
str_one = str_one.replace(c, "")
return str_one
def main():
str_one = str(input("Enter the string: "))
characters = str(input("Enter characters to remove: "))
print("Modified string: %s" % remove_characters(str_one, characters))
... | 24.133333 | 73 | 0.649171 |
4a06b947056dbce421714238d115bf0ad07ac1cc | 7,718 | py | Python | ROS/rufus_remote/src/bras_teleop.py | Beam-create/S4_projet_QUADRUS_V2 | 304b434b552a4a5377dd2f49c4bb4c8e9fcb714b | [
"MIT"
] | null | null | null | ROS/rufus_remote/src/bras_teleop.py | Beam-create/S4_projet_QUADRUS_V2 | 304b434b552a4a5377dd2f49c4bb4c8e9fcb714b | [
"MIT"
] | 52 | 2022-02-12T17:12:17.000Z | 2022-03-30T00:39:18.000Z | ROS/rufus_remote/src/bras_teleop.py | Beam-create/S4_projet_QUADRUS_V2 | 304b434b552a4a5377dd2f49c4bb4c8e9fcb714b | [
"MIT"
] | 2 | 2022-01-19T15:44:53.000Z | 2022-01-20T21:44:41.000Z | #!/usr/bin/env python3
"""
File to convert joy messages to joint angles messages
Subscriber : joy
Publisher : rufus/bras_teleop
"""
import rospy
from sensor_msgs.msg import Joy
from rufus_master.msg import bras_commands
from geometry_msgs.msg import Vector3
from sympy import *
class bras_teleop:
def __init__(sel... | 32.842553 | 206 | 0.549754 |
4a06ba244aa65eeebc0bd9877f86082732bae47b | 482 | py | Python | examples/sync_client.py | william-wambua/rpc.py | af43ccc9734c751ab49171c3a4c004a996612d73 | [
"Apache-2.0"
] | 152 | 2020-07-11T07:56:35.000Z | 2022-03-23T07:06:19.000Z | examples/sync_client.py | william-wambua/rpc.py | af43ccc9734c751ab49171c3a4c004a996612d73 | [
"Apache-2.0"
] | 14 | 2020-07-16T02:16:21.000Z | 2022-03-30T13:54:59.000Z | examples/sync_client.py | william-wambua/rpc.py | af43ccc9734c751ab49171c3a4c004a996612d73 | [
"Apache-2.0"
] | 11 | 2020-11-26T14:23:05.000Z | 2021-12-02T18:36:29.000Z | from typing import Generator
import httpx
from rpcpy.client import Client
from rpcpy.typing import TypedDict
app = Client(httpx.Client(), base_url="http://127.0.0.1:65432/")
@app.remote_call
def none() -> None:
...
@app.remote_call
def sayhi(name: str) -> str:
...
@app.remote_call
def yield_data(max_nu... | 15.0625 | 64 | 0.661826 |
4a06bb62e8deb7cd306af483b416feb6f18be2dd | 8,314 | py | Python | asposewordscloud/models/style_update.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | asposewordscloud/models/style_update.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | asposewordscloud/models/style_update.py | rizwanniazigroupdocs/aspose-words-cloud-python | b943384a1e3c0710cc84df74119e6edf7356037e | [
"MIT"
] | null | null | null | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="style_update.py">
# Copyright (c) 2020 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this... | 36.147826 | 166 | 0.610536 |
4a06bbd5e0b3d04198b83195c6b3c4ee8d0741e4 | 489 | py | Python | user/migrations/0002_auto_20171101_1602.py | Ilmanfordinner/registration | d729f9a990d6f63dc29e14c1657dba87c3233971 | [
"MIT"
] | null | null | null | user/migrations/0002_auto_20171101_1602.py | Ilmanfordinner/registration | d729f9a990d6f63dc29e14c1657dba87c3233971 | [
"MIT"
] | null | null | null | user/migrations/0002_auto_20171101_1602.py | Ilmanfordinner/registration | d729f9a990d6f63dc29e14c1657dba87c3233971 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-11-01 23:02
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0001_initial'),
]
operations = [
migrations.AlterFiel... | 23.285714 | 83 | 0.593047 |
4a06bbfc90ce78ff69e3b34567739468b5c5deba | 2,295 | py | Python | services/dy-3dvis/src/3d-viewer/utils/state_manager.py | GitHK/osparc-services-forked | a8ab08ff7c32de8f1abde015c1515e8cf61426c0 | [
"MIT"
] | 1 | 2019-07-26T02:04:44.000Z | 2019-07-26T02:04:44.000Z | services/dy-3dvis/src/3d-viewer/utils/state_manager.py | GitHK/osparc-services-forked | a8ab08ff7c32de8f1abde015c1515e8cf61426c0 | [
"MIT"
] | null | null | null | services/dy-3dvis/src/3d-viewer/utils/state_manager.py | GitHK/osparc-services-forked | a8ab08ff7c32de8f1abde015c1515e8cf61426c0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
""" Tries to pull the node data from S3. Will return error code unless the --silent flag is on and only a warning will be output.
Usage python state_puller.py PATH_OR_FILE --silent
:return: error code
"""
import argparse
import asyncio
import logging
import os
import sys
import time
from enum i... | 33.26087 | 129 | 0.67146 |
4a06bc0478fdfb66443a29a5adbad3df630a4f94 | 10,343 | py | Python | script/train.py | Wei-Jyu/Deep-Hierarchical-Interest-Network-for-Click-Through-Rate-Prediction | e7348f4e3e1297f85ca68b006890cbd62ca2cb8b | [
"MIT"
] | null | null | null | script/train.py | Wei-Jyu/Deep-Hierarchical-Interest-Network-for-Click-Through-Rate-Prediction | e7348f4e3e1297f85ca68b006890cbd62ca2cb8b | [
"MIT"
] | null | null | null | script/train.py | Wei-Jyu/Deep-Hierarchical-Interest-Network-for-Click-Through-Rate-Prediction | e7348f4e3e1297f85ca68b006890cbd62ca2cb8b | [
"MIT"
] | 1 | 2020-11-20T07:14:30.000Z | 2020-11-20T07:14:30.000Z | import tensorflow as tf
import numpy
from data_iterator import DataIterator
from model import *
#import time
import argparse
import random
import sys
from utils import *
parser = argparse.ArgumentParser()
parser.add_argument('-task', type=str, default='train', help='train | test')
parser.add_argument('--model_type', t... | 43.826271 | 236 | 0.614909 |
4a06bc69d5c850fa9f7c4861bc6b3acca3905056 | 34,448 | py | Python | src/pip/_vendor/urllib3/contrib/securetransport.py | Harry-Hopkinson/pip | 4fe127ebde383235a5d5c30e801b2440e057780d | [
"MIT"
] | 1 | 2022-03-06T13:06:33.000Z | 2022-03-06T13:06:33.000Z | src/pip/_vendor/urllib3/contrib/securetransport.py | Harry-Hopkinson/pip | 4fe127ebde383235a5d5c30e801b2440e057780d | [
"MIT"
] | null | null | null | src/pip/_vendor/urllib3/contrib/securetransport.py | Harry-Hopkinson/pip | 4fe127ebde383235a5d5c30e801b2440e057780d | [
"MIT"
] | null | null | null | """
SecureTranport support for urllib3 via ctypes.
This makes platform-native TLS available to urllib3 users on macOS without the
use of a compiler. This is an important feature because the Python Package
Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL
that ships with macOS is not capable... | 37.362256 | 86 | 0.658761 |
4a06bdc2fdb67c9b6050fa93c154bff2a347980b | 1,320 | py | Python | src/python/pants/init/load_backends_integration_test.py | thamenato/pants | bc4a8fb3f07f6145649f02b06a1e5599aa28b36c | [
"Apache-2.0"
] | null | null | null | src/python/pants/init/load_backends_integration_test.py | thamenato/pants | bc4a8fb3f07f6145649f02b06a1e5599aa28b36c | [
"Apache-2.0"
] | null | null | null | src/python/pants/init/load_backends_integration_test.py | thamenato/pants | bc4a8fb3f07f6145649f02b06a1e5599aa28b36c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pathlib import Path
from typing import List
from pants.testutil.pants_integration_test import run_pants
def discover_backends() -> List[str]:
register_pys = Path().glob("src/py... | 32.195122 | 95 | 0.709091 |
4a06be2576920b10ad2b3cba4b3ba8c3a1be628a | 135 | py | Python | gloomhaven/__init__.py | Softyy/gloomhaven-campaign-manager | 0d704c248184edfe62b95d286203d58febb011c5 | [
"MIT"
] | null | null | null | gloomhaven/__init__.py | Softyy/gloomhaven-campaign-manager | 0d704c248184edfe62b95d286203d58febb011c5 | [
"MIT"
] | null | null | null | gloomhaven/__init__.py | Softyy/gloomhaven-campaign-manager | 0d704c248184edfe62b95d286203d58febb011c5 | [
"MIT"
] | null | null | null | from .server import *
from .components.cyto_reactor import *
from .components.modal import *
from .components.campaign_modal import *
| 22.5 | 40 | 0.792593 |
4a06beca153a0de848847edbe29e4186a26303fd | 813 | py | Python | manage.py | crod93/Woodward-Monitoring-Wells | ebea1e3f902701e18a6a91bb3480ad633f9b3104 | [
"MIT"
] | null | null | null | manage.py | crod93/Woodward-Monitoring-Wells | ebea1e3f902701e18a6a91bb3480ad633f9b3104 | [
"MIT"
] | null | null | null | manage.py | crod93/Woodward-Monitoring-Wells | ebea1e3f902701e18a6a91bb3480ad633f9b3104 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "monitoringwells.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure t... | 35.347826 | 79 | 0.645756 |
4a06bedb7891380e9d6f6d5184bde9d3798f3f6b | 723 | py | Python | pages/admin.py | wonderbeyond/ezlog | 6c0673d5ef0c90a5f977d410f3cc20587e239815 | [
"BSD-2-Clause"
] | 31 | 2015-02-19T03:23:52.000Z | 2021-03-30T09:38:27.000Z | pages/admin.py | rouqiu/ezlog | 6c0673d5ef0c90a5f977d410f3cc20587e239815 | [
"BSD-2-Clause"
] | null | null | null | pages/admin.py | rouqiu/ezlog | 6c0673d5ef0c90a5f977d410f3cc20587e239815 | [
"BSD-2-Clause"
] | 37 | 2015-01-13T07:42:58.000Z | 2018-04-08T08:06:28.000Z | # coding=utf-8
from django.contrib import admin
from mptt.admin import MPTTModelAdmin
from pages.models import *
class PageAdmin(MPTTModelAdmin):
mptt_level_indent = 20
fields = ('title', 'parent', 'public', 'in_navigation', 'allow_comment',
'content',)
list_display = ('title', 'created', 'modified',
... | 30.125 | 76 | 0.633472 |
4a06bfc5b97ddab9e27e05820ab72e5e9f474d9b | 8,150 | py | Python | autofit/graphical/declarative/graph.py | caoxiaoyue/PyAutoFit | 819cd2acc8d4069497a161c3bb6048128e44d828 | [
"MIT"
] | 39 | 2019-01-24T10:45:23.000Z | 2022-03-18T09:37:59.000Z | autofit/graphical/declarative/graph.py | caoxiaoyue/PyAutoFit | 819cd2acc8d4069497a161c3bb6048128e44d828 | [
"MIT"
] | 260 | 2018-11-27T12:56:33.000Z | 2022-03-31T16:08:59.000Z | autofit/graphical/declarative/graph.py | caoxiaoyue/PyAutoFit | 819cd2acc8d4069497a161c3bb6048128e44d828 | [
"MIT"
] | 13 | 2018-11-30T16:49:05.000Z | 2022-01-21T17:39:29.000Z | from abc import ABC, abstractmethod
from typing import List, cast, Optional, Union
from autofit.graphical.declarative.factor.prior import PriorFactor
from autofit.graphical.expectation_propagation.ep_mean_field import EPMeanField
from autofit.graphical.factor_graphs.factor import Factor
from autofit.graphical.factor_g... | 28.006873 | 104 | 0.563558 |
4a06bfc9e647686d165497bc22ed4de731c042d4 | 5,960 | py | Python | ccaches.py | btidor/mailto | fbc3dee3a9d4f0aaf12c3ddf85b0cb1d455b444b | [
"MIT"
] | 2 | 2015-09-15T17:21:38.000Z | 2016-01-13T23:46:40.000Z | ccaches.py | garywang/subscribe | 7aff399122f6f43aaf460837b079d5388b25eb16 | [
"MIT"
] | null | null | null | ccaches.py | garywang/subscribe | 7aff399122f6f43aaf460837b079d5388b25eb16 | [
"MIT"
] | null | null | null | """
Utilities to convert Webathena tickets into a ccache; make_ccache is the
interesting one (it takes r.session from the client and returns a ccache)
Drawn from davidben's shellinabox example in the Webathena source tree.
https://github.com/davidben/webathena.
"""
import base64
import struct
# Some DER encoding st... | 36.790123 | 98 | 0.60906 |
4a06bfdbe5f9f073066685af3536ae8c892d9894 | 6,185 | py | Python | test/function_test.py | TaekedeHaan/rqt_ez_publisher | 80f1a26f738beca02c520ebaf77019441cd564e5 | [
"BSD-3-Clause"
] | 26 | 2015-01-22T13:11:48.000Z | 2022-02-23T15:07:23.000Z | test/function_test.py | TaekedeHaan/rqt_ez_publisher | 80f1a26f738beca02c520ebaf77019441cd564e5 | [
"BSD-3-Clause"
] | 15 | 2015-03-22T04:39:18.000Z | 2020-12-01T01:42:11.000Z | test/function_test.py | TaekedeHaan/rqt_ez_publisher | 80f1a26f738beca02c520ebaf77019441cd564e5 | [
"BSD-3-Clause"
] | 14 | 2015-11-12T16:07:07.000Z | 2021-08-17T13:58:23.000Z | #!/usr/bin/env python
import unittest
import geometry_msgs.msg as geo_msgs
import rqt_ez_publisher.ez_publisher_model as ez_model
from rqt_ez_publisher import quaternion_module
PKG='rqt_ez_publisher'
class FunctionTest(unittest.TestCase):
def test_make_topic_strings(self):
strings = ez_model.make_topic... | 41.510067 | 124 | 0.648343 |
4a06c1258d3e7e8c1bf15b4b051ad02a26127397 | 7,658 | py | Python | tools/telemetry/telemetry/core/backends/chrome/android_browser_finder.py | hefen1/chromium | 52f0b6830e000ca7c5e9aa19488af85be792cc88 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/telemetry/core/backends/chrome/android_browser_finder.py | hefen1/chromium | 52f0b6830e000ca7c5e9aa19488af85be792cc88 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/telemetry/core/backends/chrome/android_browser_finder.py | hefen1/chromium | 52f0b6830e000ca7c5e9aa19488af85be792cc88 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-04-04T13:34:56.000Z | 2020-11-04T07:17:52.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Finds android browsers that can be controlled by telemetry."""
import logging
import os
from telemetry import decorators
from telemetry.core import brow... | 35.953052 | 80 | 0.719509 |
4a06c1716260e1f13d2b189f34f1d31dcd968fb8 | 2,624 | py | Python | core/groups.py | PIESBOYBRO/MusicPlayer-1 | da36513888318d3ce6031b9cf3e94f2a4d0d9de9 | [
"MIT"
] | 1 | 2022-02-12T11:45:27.000Z | 2022-02-12T11:45:27.000Z | core/groups.py | PIESBOYBRO/MusicPlayer-1 | da36513888318d3ce6031b9cf3e94f2a4d0d9de9 | [
"MIT"
] | null | null | null | core/groups.py | PIESBOYBRO/MusicPlayer-1 | da36513888318d3ce6031b9cf3e94f2a4d0d9de9 | [
"MIT"
] | 1 | 2022-02-08T03:31:31.000Z | 2022-02-08T03:31:31.000Z | """
Music Player, Telegram Voice Chat Bot
Copyright (c) 2021-present PIESBOY BRO <https://github.com/PIESBOYBRO>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License... | 30.870588 | 84 | 0.720274 |
4a06c183589102dcce3df81650858654b12561b4 | 91 | py | Python | tests/roots/test-ext-autosectionlabel/conf.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 3 | 2019-06-11T09:42:08.000Z | 2020-03-10T15:57:09.000Z | tests/roots/test-ext-autosectionlabel/conf.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 12 | 2019-01-09T15:43:57.000Z | 2020-01-21T10:46:30.000Z | tests/roots/test-ext-autosectionlabel/conf.py | zhsj/sphinx | 169297d0b76bf0b503033dadeb14f9a2b735e422 | [
"BSD-2-Clause"
] | 10 | 2019-02-04T11:49:35.000Z | 2020-03-21T13:32:20.000Z | # -*- coding: utf-8 -*-
extensions = ['sphinx.ext.autosectionlabel']
master_doc = 'index'
| 18.2 | 44 | 0.659341 |
4a06c29ecc1685e747b5e654f75ffa8576749972 | 109 | py | Python | django_gotolong/broker/zerodha/zsum/apps.py | ParikhKadam/gotolong | 839beb8aa37055a2078eaa289b8ae05b62e8905e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 15 | 2019-12-06T16:19:45.000Z | 2021-08-20T13:22:22.000Z | django_gotolong/broker/zerodha/zsum/apps.py | ParikhKadam/gotolong | 839beb8aa37055a2078eaa289b8ae05b62e8905e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 14 | 2020-12-08T10:45:05.000Z | 2021-09-21T17:23:45.000Z | django_gotolong/broker/zerodha/zsum/apps.py | ParikhKadam/gotolong | 839beb8aa37055a2078eaa289b8ae05b62e8905e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 9 | 2020-01-01T03:04:29.000Z | 2021-04-18T08:42:30.000Z | from django.apps import AppConfig
class BrokerZerodhaSumConfig(AppConfig):
name = 'broker_zerodha_sum'
| 18.166667 | 40 | 0.798165 |
4a06c3e9b2ddec02e0144a635e5eb195ca560130 | 241 | py | Python | LABORATORIO 3/numero suerte.py | msolivera/Phyton | 1322fa2ff4bb06a17350fefa7e5268c0969e5b53 | [
"bzip2-1.0.6"
] | null | null | null | LABORATORIO 3/numero suerte.py | msolivera/Phyton | 1322fa2ff4bb06a17350fefa7e5268c0969e5b53 | [
"bzip2-1.0.6"
] | null | null | null | LABORATORIO 3/numero suerte.py | msolivera/Phyton | 1322fa2ff4bb06a17350fefa7e5268c0969e5b53 | [
"bzip2-1.0.6"
] | null | null | null | def numero_suerte (n):
suma = 0
while n != 0:
n=n//10
resto=n%10
suma += resto
if suma==21:
print ("numero de la suerte")
else:
print("numero cualquiera")
numero_suerte(993)
| 16.066667 | 37 | 0.497925 |
4a06c3ff4e2a48afd8f0175e367ab7cd0b420ccb | 5,279 | py | Python | Tools/mavlink_direct.py | clearbothk/PX4-Autopilot | 235845bb5c879d3ede6d7a0d042826a87c08be7f | [
"BSD-3-Clause"
] | null | null | null | Tools/mavlink_direct.py | clearbothk/PX4-Autopilot | 235845bb5c879d3ede6d7a0d042826a87c08be7f | [
"BSD-3-Clause"
] | null | null | null | Tools/mavlink_direct.py | clearbothk/PX4-Autopilot | 235845bb5c879d3ede6d7a0d042826a87c08be7f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
Open a shell over MAVLink.
@author: Beat Kueng (beat-kueng@gmx.net)
"""
from __future__ import print_function
import sys, select
import termios
from timeit import default_timer as timer
from argparse import ArgumentParser
import os
try:
from pymavlink import mavutil
except ImportErro... | 34.503268 | 117 | 0.520743 |
4a06c4b83cfdb697b35e6e573c927b8f40c19ea0 | 2,420 | py | Python | forkit/tests/diff.py | bartee/django-forkit | a9f236c5ff969d4e2dbc12b0670587b82edcf446 | [
"BSD-3-Clause"
] | 1 | 2018-11-09T11:09:26.000Z | 2018-11-09T11:09:26.000Z | forkit/tests/diff.py | bartee/django-forkit | a9f236c5ff969d4e2dbc12b0670587b82edcf446 | [
"BSD-3-Clause"
] | 1 | 2018-11-09T11:04:47.000Z | 2018-11-15T12:54:17.000Z | forkit/tests/diff.py | bartee/django-forkit | a9f236c5ff969d4e2dbc12b0670587b82edcf446 | [
"BSD-3-Clause"
] | 3 | 2016-12-02T22:15:00.000Z | 2018-11-08T13:33:57.000Z | from django.test import TestCase
from forkit.tests.models import Author, Post, Blog, Tag, C
__all__ = ('DiffModelObjectTestCase',)
class DiffModelObjectTestCase(TestCase):
fixtures = ['test_data.json']
def setUp(self):
self.author = Author.objects.get(pk=1)
self.post = Post.objects.get(pk=1)
... | 27.816092 | 73 | 0.533471 |
4a06c55e9dc9956778fd62ed6903b15aad18b22d | 1,654 | py | Python | userbot/plugins/design.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/design.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/design.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | """.admin Plugin for @UniBorg"""
from telethon.tl.types import ChannelParticipantsAdmins
from userbot.utils import lightning_cmd
@borg.on(lightning_cmd("join"))
async def _(event):
if event.fwd_from:
return
mentions = "`━━━━━┓ \n┓┓┓┓┓┃\n┓┓┓┓┓┃ ヽ○ノ ⇦ Me When You Joined \n┓┓┓┓┓┃. / \n┓┓┓┓┓┃ ノ) \n┓... | 42.410256 | 368 | 0.484281 |
4a06c594fab888587b59e4ea2457c0aff53db122 | 4,296 | py | Python | hyperactive/hyperactive.py | nevinadalal/Hyperactive | 3232ffeda70c5d4853b9e71aaf5d1e761c0db9c2 | [
"MIT"
] | null | null | null | hyperactive/hyperactive.py | nevinadalal/Hyperactive | 3232ffeda70c5d4853b9e71aaf5d1e761c0db9c2 | [
"MIT"
] | null | null | null | hyperactive/hyperactive.py | nevinadalal/Hyperactive | 3232ffeda70c5d4853b9e71aaf5d1e761c0db9c2 | [
"MIT"
] | null | null | null | # Author: Simon Blanke
# Email: simon.blanke@yahoo.com
# License: MIT License
import multiprocessing as mp
from tqdm import tqdm
from .optimizers import RandomSearchOptimizer
from .run_search import run_search
from .results import Results
from .print_results import PrintResults
from .search_space import SearchSpace... | 28.263158 | 87 | 0.58473 |
4a06c5ca3032b728d78967c36e56de39ff4025ea | 218 | py | Python | pymatgen/io/exciting/__init__.py | Crivella/pymatgen | dd3737011e76520da1347d5db75db3a3f87e520f | [
"MIT"
] | 1 | 2021-11-02T21:10:11.000Z | 2021-11-02T21:10:11.000Z | pymatgen/io/exciting/__init__.py | Crivella/pymatgen | dd3737011e76520da1347d5db75db3a3f87e520f | [
"MIT"
] | 5 | 2018-08-07T23:00:23.000Z | 2021-01-05T22:46:23.000Z | pymatgen/io/exciting/__init__.py | Crivella/pymatgen | dd3737011e76520da1347d5db75db3a3f87e520f | [
"MIT"
] | 6 | 2019-04-26T18:50:41.000Z | 2020-03-29T17:58:34.000Z | # Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This package containes classes to parse input files from the exciting
code package.
"""
from .inputs import * # noqa
| 19.818182 | 69 | 0.743119 |
4a06c6688768d0b399a05d294ea0946512424bc5 | 687 | py | Python | python/admin/tables/orders_table/accept_order_by_user.py | OSAMAMOHAMED1234/E-Commerce_Blueprint | eca5d0c2eb22a0e6a30bfd2499e85775b43ef919 | [
"MIT"
] | 1 | 2019-05-04T11:52:49.000Z | 2019-05-04T11:52:49.000Z | python/admin/tables/orders_table/accept_order_by_user.py | osama-mohamed/E-Commerce_Blueprint | eca5d0c2eb22a0e6a30bfd2499e85775b43ef919 | [
"MIT"
] | null | null | null | python/admin/tables/orders_table/accept_order_by_user.py | osama-mohamed/E-Commerce_Blueprint | eca5d0c2eb22a0e6a30bfd2499e85775b43ef919 | [
"MIT"
] | null | null | null |
from python.admin.login.login_check import *
from python.database.flask_database import *
accept_order_by_user_admin = Blueprint('accept_order_by_user_admin', __name__)
# admin accept orders for user
@accept_order_by_user_admin.route('/admin/accept_order_user/<username>/<id>', methods=['post', 'get'])
@is_admin_l... | 36.157895 | 115 | 0.746725 |
4a06c6be0f8080efc2cdca274d38545714c2cf34 | 280 | py | Python | examples/listDoubt.py | mnishitha/INF502-Fall2020 | 63c93219ba593fe50accfb24ea04752be2a62ddb | [
"Unlicense"
] | 8 | 2020-08-07T00:04:02.000Z | 2020-12-14T21:43:54.000Z | examples/listDoubt.py | mnishitha/INF502-Fall2020 | 63c93219ba593fe50accfb24ea04752be2a62ddb | [
"Unlicense"
] | 34 | 2020-09-05T04:13:37.000Z | 2020-10-13T21:57:29.000Z | examples/listDoubt.py | mnishitha/INF502-Fall2020 | 63c93219ba593fe50accfb24ea04752be2a62ddb | [
"Unlicense"
] | 34 | 2020-08-18T22:42:39.000Z | 2020-09-11T00:25:14.000Z | def list_the_numbers(list1):
print("This list contains ", len(list1), " elements, as follows:")
for element in list1:
print (element)
my_list=[1,2,3,4,5]
my_list_float=[1.1,2.3,4.5]
my_list_string=['Igor','Maria','Andreia','Enzo']
list_the_numbers(my_list_string) | 31.111111 | 70 | 0.692857 |
4a06c6f8a38e232110c2dd2e26af5536e9fb35c5 | 737 | py | Python | beginning-python-3ed-master/Chapter13/listing13-1.py | zhuxinkai/python3-book-practice | a0d297df0755eaf239398f138c3b38746c32ac99 | [
"MIT"
] | null | null | null | beginning-python-3ed-master/Chapter13/listing13-1.py | zhuxinkai/python3-book-practice | a0d297df0755eaf239398f138c3b38746c32ac99 | [
"MIT"
] | 1 | 2020-06-19T05:47:38.000Z | 2020-06-19T05:47:46.000Z | beginning-python-3ed-master/Chapter13/listing13-1.py | zhuxinkai/python3-book-practice | a0d297df0755eaf239398f138c3b38746c32ac99 | [
"MIT"
] | null | null | null | import sqlite3
def convert(value):
if value.startswith('~'):
return value.strip('~')
if not value:
value = '0'
return float(value)
conn = sqlite3.connect('food.db')
curs = conn.cursor()
curs.execute('''
CREATE TABLE food (
id TEXT PRIMARY KEY,
desc TEXT,
water ... | 19.918919 | 55 | 0.552239 |
4a06c707d3ac8b0757e64f628d710388e55f63d1 | 4,718 | py | Python | train1.py | lilinlin001/YOLOv3 | 00ee3c5832a73ef4e01b71db2502f83968c8008e | [
"MIT"
] | null | null | null | train1.py | lilinlin001/YOLOv3 | 00ee3c5832a73ef4e01b71db2502f83968c8008e | [
"MIT"
] | null | null | null | train1.py | lilinlin001/YOLOv3 | 00ee3c5832a73ef4e01b71db2502f83968c8008e | [
"MIT"
] | null | null | null | """
Retrain the YOLO model for your own dataset.
"""
import numpy as np
import keras.backend as K
from keras.layers import Input, Lambda
from keras.models import Model
from keras.callbacks import TensorBoard, ModelCheckpoint, EarlyStopping
from yolo3.model import preprocess_true_boxes, yolo_body, tiny_yolo_body, yolo... | 42.890909 | 114 | 0.687368 |
4a06c81783fcb4e35bab25411155a9e9b0e24b3f | 909 | py | Python | setup.py | Raguggg/pywhatsbomb | 5f43083e9487f8e7867fac531635a26204f80c93 | [
"MIT"
] | null | null | null | setup.py | Raguggg/pywhatsbomb | 5f43083e9487f8e7867fac531635a26204f80c93 | [
"MIT"
] | null | null | null | setup.py | Raguggg/pywhatsbomb | 5f43083e9487f8e7867fac531635a26204f80c93 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
def readme() -> str:
with open(r"README.txt") as f:
README = f.read()
return README
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Education',
'Operating System :: Microsoft :: Windows :... | 25.971429 | 73 | 0.636964 |
4a06c86195e5c818166f2c12d7a8542ae3a9fb6a | 1,530 | py | Python | samples/generated_samples/aiplatform_generated_aiplatform_v1_endpoint_service_list_endpoints_sync.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 1 | 2022-03-30T05:23:29.000Z | 2022-03-30T05:23:29.000Z | samples/generated_samples/aiplatform_generated_aiplatform_v1_endpoint_service_list_endpoints_sync.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/aiplatform_generated_aiplatform_v1_endpoint_service_list_endpoints_sync.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"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... | 32.553191 | 85 | 0.763399 |
4a06c8ae565632ac79d897d3726955f8f6103433 | 5,226 | py | Python | mlonmcu/flow/tvm/backend/tvmrt.py | tum-ei-eda/mlonmcu | 0d5c114b85f2ae9e48e7d815bfce8df04c2bdb46 | [
"Apache-2.0"
] | 3 | 2022-03-07T09:38:12.000Z | 2022-03-24T09:28:36.000Z | mlonmcu/flow/tvm/backend/tvmrt.py | tum-ei-eda/mlonmcu | 0d5c114b85f2ae9e48e7d815bfce8df04c2bdb46 | [
"Apache-2.0"
] | 24 | 2022-03-07T16:09:32.000Z | 2022-03-31T08:08:51.000Z | mlonmcu/flow/tvm/backend/tvmrt.py | tum-ei-eda/mlonmcu | 0d5c114b85f2ae9e48e7d815bfce8df04c2bdb46 | [
"Apache-2.0"
] | 1 | 2022-03-07T09:38:17.000Z | 2022-03-07T09:38:17.000Z | #
# Copyright (c) 2022 TUM Department of Electrical and Computer Engineering.
#
# This file is part of MLonMCU.
# See https://github.com/tum-ei-eda/mlonmcu.git for further info.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You m... | 36.041379 | 106 | 0.561041 |
4a06c9179a1d83d35ee9319306557e56d4cc15e0 | 6,671 | py | Python | main/bot.py | Balakae/fishing-bot | 5d75a8371e00eed1f8e0aa91fc150e12182e25d7 | [
"MIT"
] | null | null | null | main/bot.py | Balakae/fishing-bot | 5d75a8371e00eed1f8e0aa91fc150e12182e25d7 | [
"MIT"
] | null | null | null | main/bot.py | Balakae/fishing-bot | 5d75a8371e00eed1f8e0aa91fc150e12182e25d7 | [
"MIT"
] | null | null | null | from cv2 import cv2
import mss
import numpy as np
import os
import time
#from pynput.mouse import Button, Controller
from pynput import mouse, keyboard
import random
import pydirectinput
class Fisher:
def __init__(self):
self.stc = mss.mss()
path = os.path.dirname(os.path.dirname(__file__))
... | 34.386598 | 100 | 0.570529 |
4a06c96834cebd3d034658fbb6fe392d1ef00835 | 978 | py | Python | ferkeeRun.py | pyrasun/ferkee | 8c9986c748662aa58c95b05cb2ce43a1ad4897a6 | [
"BSD-2-Clause"
] | null | null | null | ferkeeRun.py | pyrasun/ferkee | 8c9986c748662aa58c95b05cb2ce43a1ad4897a6 | [
"BSD-2-Clause"
] | 6 | 2017-12-02T01:24:17.000Z | 2018-01-02T18:10:37.000Z | ferkeeRun.py | pyrasun/ferkee | 8c9986c748662aa58c95b05cb2ce43a1ad4897a6 | [
"BSD-2-Clause"
] | null | null | null | import sys
import pprint
import ConfigParser as configparser
import argparse
import ferkee_props
from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings
from scrapy.utils.log import configure_logging
parser = argparse.ArgumentParser()
parser.add_argument("-p", "--properties", ... | 29.636364 | 96 | 0.787321 |
4a06c9a0bd7c32adce14488cdce87d23e954ba55 | 2,454 | py | Python | covid/views.py | CMU-TRP/podd-api | 6eb5c4598f848f75d131287163cd9babf2a0a0fc | [
"MIT"
] | null | null | null | covid/views.py | CMU-TRP/podd-api | 6eb5c4598f848f75d131287163cd9babf2a0a0fc | [
"MIT"
] | null | null | null | covid/views.py | CMU-TRP/podd-api | 6eb5c4598f848f75d131287163cd9babf2a0a0fc | [
"MIT"
] | 1 | 2021-11-30T15:25:40.000Z | 2021-11-30T15:25:40.000Z | from datetime import timedelta, date
import pytz
from django.shortcuts import render
from rest_framework.authentication import TokenAuthentication, SessionAuthentication
from rest_framework.decorators import api_view, authentication_classes, permission_classes
from rest_framework.permissions import IsAuthenticated
fro... | 36.626866 | 115 | 0.749796 |
4a06c9e3bca9fe78bdc94f0f2bc7af5e3342b5d0 | 5,164 | py | Python | tests/unit/test_validation_error_collection.py | futureironman/braintree_python | 26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac | [
"MIT"
] | 182 | 2015-01-09T05:26:46.000Z | 2022-03-16T14:10:06.000Z | tests/unit/test_validation_error_collection.py | futureironman/braintree_python | 26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac | [
"MIT"
] | 95 | 2015-02-24T23:29:56.000Z | 2022-03-13T03:27:58.000Z | tests/unit/test_validation_error_collection.py | futureironman/braintree_python | 26bb8a857bc29322a8bca2e8e0fe6d99cfe6a1ac | [
"MIT"
] | 93 | 2015-02-19T17:59:06.000Z | 2022-03-19T17:01:25.000Z | from tests.test_helper import *
class TestValidationErrorCollection(unittest.TestCase):
def test_it_builds_an_array_of_errors_given_an_array_of_hashes(self):
test_hash = {"errors": [{"attribute": "some model attribute", "code": 1, "message": "bad juju"}]}
errors = ValidationErrorCollection(test_has... | 44.517241 | 142 | 0.537374 |
4a06ca0f124311ce6fb2e8458823b029bce2c684 | 6,870 | py | Python | util.py | Fanta007/Graph-U-Nets | 96fcd45fd1f486d2e9e45cde169b7cadaca86247 | [
"MIT"
] | 1 | 2021-07-12T18:14:14.000Z | 2021-07-12T18:14:14.000Z | util.py | Fanta007/Graph-U-Nets | 96fcd45fd1f486d2e9e45cde169b7cadaca86247 | [
"MIT"
] | null | null | null | util.py | Fanta007/Graph-U-Nets | 96fcd45fd1f486d2e9e45cde169b7cadaca86247 | [
"MIT"
] | null | null | null | from __future__ import print_function
import numpy as np
import networkx as nx
import argparse
from sklearn.model_selection import StratifiedKFold
# added by Guan
import matplotlib.pyplot as plt
cmd_opt = argparse.ArgumentParser(description='Argparser for graph_classification')
cmd_opt.add_argument('-mode', default=... | 43.757962 | 153 | 0.615866 |
4a06ca29f8d3167c6502cb66747c9e193d4a9e43 | 8 | py | Python | test/integration/Value/infinity.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 30 | 2019-10-29T12:47:50.000Z | 2022-02-12T06:41:39.000Z | test/integration/Value/infinity.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 247 | 2017-09-21T17:11:18.000Z | 2019-10-08T12:59:07.000Z | test/integration/Value/infinity.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 17 | 2017-10-01T16:53:20.000Z | 2018-11-28T07:20:35.000Z | #
inf
#
| 2 | 3 | 0.375 |
4a06ca80ff0955f5cb1c4f3bc6a59780aca5d74c | 3,113 | py | Python | p4a/pythonforandroid/recipes/android/__init__.py | Janith96/lbry-android | b44770c77fc6103a7f366fac3446366365a74fea | [
"MIT"
] | 4 | 2019-07-09T17:50:46.000Z | 2019-12-07T08:37:58.000Z | p4a/pythonforandroid/recipes/android/__init__.py | Janith96/lbry-android | b44770c77fc6103a7f366fac3446366365a74fea | [
"MIT"
] | 4 | 2020-07-17T01:37:37.000Z | 2020-07-21T14:21:08.000Z | p4a/pythonforandroid/recipes/android/__init__.py | Janith96/lbry-android | b44770c77fc6103a7f366fac3446366365a74fea | [
"MIT"
] | 3 | 2020-02-21T04:34:20.000Z | 2021-03-19T22:32:38.000Z | from __future__ import unicode_literals
from pythonforandroid.recipe import CythonRecipe, IncludedFilesBehaviour
from pythonforandroid.util import current_directory
from pythonforandroid.patching import will_build
from pythonforandroid import logger
from os.path import join
class AndroidRecipe(IncludedFilesBehaviour... | 32.427083 | 77 | 0.558946 |
4a06cb111ee2e3131d70354ca9e65f4eb223a7dc | 2,159 | py | Python | Prediction and Control with Function Approximation/Week 3/Notebook: Function Approximation and Control/random_agent.py | Shreyas-Donki/Reinforcement-Learning-Specialization-master | 6568b237e29b3dc19f419d0825d09354fcc71011 | [
"MIT"
] | 83 | 2019-10-23T04:16:43.000Z | 2022-03-31T01:31:16.000Z | Prediction and Control with Function Approximation/Week 3/Notebook: Function Approximation and Control/random_agent.py | Shreyas-Donki/Reinforcement-Learning-Specialization-master | 6568b237e29b3dc19f419d0825d09354fcc71011 | [
"MIT"
] | 1 | 2020-08-31T23:52:00.000Z | 2020-08-31T23:52:00.000Z | Prediction and Control with Function Approximation/Week 3/Notebook: Function Approximation and Control/random_agent.py | Shreyas-Donki/Reinforcement-Learning-Specialization-master | 6568b237e29b3dc19f419d0825d09354fcc71011 | [
"MIT"
] | 76 | 2019-12-22T19:05:12.000Z | 2022-03-23T01:48:41.000Z | #!/usr/bin/env python
from agent import BaseAgent
import numpy as np
class Agent(BaseAgent):
"""agent does *no* learning, selects action 0 always"""
def __init__(self):
self.last_action = None
def agent_init(self, agent_info={}):
"""Setup for the agent called when the experiment first st... | 30.842857 | 80 | 0.600278 |
4a06cbbf2edcd0735283593c7fb6684010cdda69 | 1,486 | py | Python | reviewboard/admin/tests.py | Khan/reviewboard | 51ec4261e67b8bf4e2cfa9a0894a97b16509ad33 | [
"MIT"
] | 1 | 2015-09-11T15:50:17.000Z | 2015-09-11T15:50:17.000Z | reviewboard/admin/tests.py | Khan/reviewboard | 51ec4261e67b8bf4e2cfa9a0894a97b16509ad33 | [
"MIT"
] | null | null | null | reviewboard/admin/tests.py | Khan/reviewboard | 51ec4261e67b8bf4e2cfa9a0894a97b16509ad33 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.test import TestCase
from reviewboard.admin import checks
class UpdateTests(TestCase):
"""Tests for update required pages"""
def tearDown(self):
# Make sure we don't break further tests by resetting this fully.
checks.reset_check_cache()
def ... | 36.243902 | 79 | 0.700538 |
4a06cbddc86b56e32735fbb7b3ce81c102a06aac | 2,086 | py | Python | applications/robin/test.py | beckerrh/simfemsrc | d857eb6f6f8627412d4f9d89a871834c756537db | [
"MIT"
] | null | null | null | applications/robin/test.py | beckerrh/simfemsrc | d857eb6f6f8627412d4f9d89a871834c756537db | [
"MIT"
] | 1 | 2019-01-31T10:59:11.000Z | 2019-01-31T10:59:11.000Z | applications/robin/test.py | beckerrh/simfemsrc | d857eb6f6f8627412d4f9d89a871834c756537db | [
"MIT"
] | null | null | null | from __future__ import print_function
import sys, os, shutil
from argparse import ArgumentParser
sys.path.append("@simfempythonpath@")
sys.path.append("@libpythonpath@")
import tools.plot
import tools.testerrors
import simfempy
import simfemrobin
#---------------------------------------------------------#
def main()... | 33.645161 | 207 | 0.59396 |
4a06cc790959accdabadf078313607a5149863ba | 1,350 | py | Python | pygears/cookbook/trr_dist.py | Risto97/pygears | 19393e85101a16762cb3bbbf3010946ef69217f2 | [
"MIT"
] | null | null | null | pygears/cookbook/trr_dist.py | Risto97/pygears | 19393e85101a16762cb3bbbf3010946ef69217f2 | [
"MIT"
] | null | null | null | pygears/cookbook/trr_dist.py | Risto97/pygears | 19393e85101a16762cb3bbbf3010946ef69217f2 | [
"MIT"
] | null | null | null | from pygears import gear
from pygears.conf import gear_log
from pygears.svgen.inst import SVGenInstPlugin
from pygears.svgen.svmod import SVModuleGen
from pygears.typing import Queue
def trr_dist_type(dtype):
return Queue[dtype[0]]
@gear
async def trr_dist(din: Queue, *,
dout_num) -> b'(trr_d... | 27 | 74 | 0.606667 |
4a06cc82521bed749b2fa0ce8fa02cd8644265bd | 3,064 | py | Python | pyscf/scf/test/test_diis.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 501 | 2018-12-06T23:48:17.000Z | 2022-03-31T11:53:18.000Z | pyscf/scf/test/test_diis.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 710 | 2018-11-26T22:04:52.000Z | 2022-03-30T03:53:12.000Z | pyscf/scf/test/test_diis.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 273 | 2018-11-26T10:10:24.000Z | 2022-03-30T12:25:28.000Z | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | 30.039216 | 74 | 0.558094 |
4a06ccb621b6d05c246cb10d482762e47f67009b | 670 | py | Python | data/quantum/species/bR/species.py | goldmanm/butanol_paper_data | 20d25a8287de63a762ac18d66d660c153325a2c7 | [
"MIT"
] | null | null | null | data/quantum/species/bR/species.py | goldmanm/butanol_paper_data | 20d25a8287de63a762ac18d66d660c153325a2c7 | [
"MIT"
] | null | null | null | data/quantum/species/bR/species.py | goldmanm/butanol_paper_data | 20d25a8287de63a762ac18d66d660c153325a2c7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
spinMultiplicity = 2
opticalIsomers = 1
externalSymmetry = 2
energy = {
'CBS-QB3': GaussianLog('p5.log'),
'CCSD(T)-F12/cc-pVTZ-F12': MolproLog('p5_f12.out'),
}
frequencies = GaussianLog('p5freq.log')
rotors = [HinderedRotor(scanLog=ScanLog('scan_0.lo... | 37.222222 | 105 | 0.631343 |
4a06cdbe13ac566c4f884acb7c05fef7e9188e1d | 5,276 | py | Python | src/firebot/settings/base.py | zipmex/fire | a41bbdbc86085c055ae4706fadea4f142e881a85 | [
"Apache-2.0"
] | 52 | 2017-03-15T16:25:14.000Z | 2022-03-01T16:50:14.000Z | src/firebot/settings/base.py | zipmex/fire | a41bbdbc86085c055ae4706fadea4f142e881a85 | [
"Apache-2.0"
] | 239 | 2017-03-16T17:10:22.000Z | 2022-03-06T07:24:24.000Z | src/firebot/settings/base.py | zipmex/fire | a41bbdbc86085c055ae4706fadea4f142e881a85 | [
"Apache-2.0"
] | 8 | 2017-03-15T17:45:18.000Z | 2022-01-26T14:51:03.000Z | import json
import os
###############################################################################
# Django
###############################################################################
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
SITE_ID = 1
INSTALLED_APPS = (
'd... | 25.990148 | 91 | 0.554966 |
4a06cdf788cb0e18ef66e9a1f3f50e0a25414d72 | 818 | py | Python | django_alive/tests/test_middleware.py | lincolnloop/django-alive | 608fd0a1d94f90f51a48a943348e9038f402a504 | [
"MIT"
] | 25 | 2018-08-22T12:42:14.000Z | 2022-01-18T19:03:05.000Z | django_alive/tests/test_middleware.py | lincolnloop/django-alive | 608fd0a1d94f90f51a48a943348e9038f402a504 | [
"MIT"
] | 7 | 2019-11-05T23:52:49.000Z | 2020-07-01T18:03:32.000Z | django_alive/tests/test_middleware.py | lincolnloop/django-alive | 608fd0a1d94f90f51a48a943348e9038f402a504 | [
"MIT"
] | null | null | null | from django.core.exceptions import DisallowedHost
from django.test import RequestFactory, TestCase, override_settings
from django.urls import reverse
from ..middleware import healthcheck_bypass_host_check
class MiddlewareTestCase(TestCase):
def setUp(self):
self.middleware = healthcheck_bypass_host_check... | 35.565217 | 68 | 0.744499 |
4a06ce3e37af80377adea147a10b95bc7483c91a | 680 | py | Python | python_auto/ex02.py | eatmore/python_practice | c6a773c8d24182b23a86fd9b66b27b5ff948b258 | [
"MIT"
] | null | null | null | python_auto/ex02.py | eatmore/python_practice | c6a773c8d24182b23a86fd9b66b27b5ff948b258 | [
"MIT"
] | null | null | null | python_auto/ex02.py | eatmore/python_practice | c6a773c8d24182b23a86fd9b66b27b5ff948b258 | [
"MIT"
] | 1 | 2020-03-12T06:05:38.000Z | 2020-03-12T06:05:38.000Z | import re
beginsWithHello = re.compile(r'Hello')
mo1 = beginsWithHello.search('Hello world')
mo2 = beginsWithHello.search('He said Hello')
print(mo1.group(),mo2.group())
endsWithNumber = re.compile(r'\d$')
mo3 = endsWithNumber.search('Your number is 42')
print(mo3.group())
atRegex = re.compile(r'.at')
mo4 = atRegex.... | 30.909091 | 96 | 0.713235 |
4a06ce733a9b6ee4257a3099591c4861e7636260 | 125 | py | Python | ncssl_api_client/api/commands/retry_dcv_command.py | antonku/ncssl_api_client | c463b000960d50368d39bde2a180499f1da3a29a | [
"MIT"
] | 8 | 2017-11-28T11:05:52.000Z | 2021-11-16T13:52:45.000Z | ncssl_api_client/api/commands/retry_dcv_command.py | antonku/ncssl_api_client | c463b000960d50368d39bde2a180499f1da3a29a | [
"MIT"
] | 4 | 2018-12-23T14:52:11.000Z | 2019-08-09T21:01:44.000Z | ncssl_api_client/api/commands/retry_dcv_command.py | antonku/ncssl_api_client | c463b000960d50368d39bde2a180499f1da3a29a | [
"MIT"
] | 2 | 2017-11-28T14:38:24.000Z | 2017-11-29T09:03:20.000Z | from ncssl_api_client.api.commands.abstract_command import AbstractCommand
class RetryDcvCommand(AbstractCommand):
pass | 25 | 74 | 0.856 |
4a06ceb204228cfe2b9058e43ee2d638c24a11f1 | 2,871 | py | Python | Day 08/problem 02.py | RealTigerCZ/AoC2021 | 22d8a05a15fec4abab6713e678f8c29400ee56a3 | [
"MIT"
] | null | null | null | Day 08/problem 02.py | RealTigerCZ/AoC2021 | 22d8a05a15fec4abab6713e678f8c29400ee56a3 | [
"MIT"
] | null | null | null | Day 08/problem 02.py | RealTigerCZ/AoC2021 | 22d8a05a15fec4abab6713e678f8c29400ee56a3 | [
"MIT"
] | null | null | null | path = "input.txt"
file = open(path)
input = file.readlines()
file.close()
#Logic solution
"""
∩ = intersection of sets
/ = without
A = !4 ∩ 7 = 7 / 1
B = !3 ∩ 4
---------
C = 1 ∩ 2 = !6
D = !0
E = !9
F = !2 ∩ 1
G =
--------- not needed
C, F = 7 / A
B, D = 4 / 1
problematic:
0, 6, 9
2, 3, 5
2 ∩ 1 != 1
3 ∩ 1 = 1
... | 21.425373 | 61 | 0.540578 |
4a06cf11a992fc08950163fd5e207b562d7ca738 | 9,783 | py | Python | models/algorithms/daal_trees.py | mdolinski-equinix/driverlessai-recipes | 51e991eacb716746da88390bcf7960dda3d7427b | [
"Apache-2.0"
] | null | null | null | models/algorithms/daal_trees.py | mdolinski-equinix/driverlessai-recipes | 51e991eacb716746da88390bcf7960dda3d7427b | [
"Apache-2.0"
] | null | null | null | models/algorithms/daal_trees.py | mdolinski-equinix/driverlessai-recipes | 51e991eacb716746da88390bcf7960dda3d7427b | [
"Apache-2.0"
] | null | null | null | """Binary Classification and Regression for Decision Forest and Gradient Boosting based on Intel DAAL"""
import datatable as dt
from h2oaicore.models import CustomModel
import numpy as np
from h2oaicore.systemutils import arch_type
from sklearn.preprocessing import LabelEncoder
if arch_type != 'ppc64le':
import d... | 44.671233 | 118 | 0.637841 |
4a06cf761af3b973b83ed6b56c53d4ad1ab83c79 | 451 | py | Python | freezing/model/migrations/versions/41c3e58a61aa_bookkeeping.py | freezingsaddles/freezing-model | 3bb03739d5bdff418bcf17707a52c9994c45e52f | [
"Apache-2.0"
] | 2 | 2020-01-02T01:23:00.000Z | 2022-01-03T20:57:39.000Z | freezing/model/migrations/versions/41c3e58a61aa_bookkeeping.py | freezingsaddles/freezing-model | 3bb03739d5bdff418bcf17707a52c9994c45e52f | [
"Apache-2.0"
] | 8 | 2018-01-19T14:36:05.000Z | 2021-11-24T19:22:19.000Z | freezing/model/migrations/versions/41c3e58a61aa_bookkeeping.py | freezingsaddles/freezing-model | 3bb03739d5bdff418bcf17707a52c9994c45e52f | [
"Apache-2.0"
] | 1 | 2018-10-28T16:09:51.000Z | 2018-10-28T16:09:51.000Z | """bookkeeping
Revision ID: 41c3e58a61aa
Revises: 17b73a90925d
Create Date: 2016-01-29 21:58:13.978603
"""
# revision identifiers, used by Alembic.
revision = "41c3e58a61aa"
down_revision = "17b73a90925d"
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column(
"rides", sa.Column("... | 18.04 | 87 | 0.720621 |
4a06cfac135b2b72f0f46068047a38a6889f2a25 | 33 | py | Python | python/print/print/src/print/print.py | bg1bgst333/Sample | 68e3a5c26c6d9bc1906ce0cca2fd586f0790fa52 | [
"MIT"
] | 9 | 2016-12-22T20:24:09.000Z | 2021-05-08T08:48:24.000Z | python/print/print/src/print/print.py | bg1bgst333/Sample | 68e3a5c26c6d9bc1906ce0cca2fd586f0790fa52 | [
"MIT"
] | 36 | 2018-08-16T06:43:36.000Z | 2022-03-25T19:01:34.000Z | python/print/print/src/print/print.py | bg1bgst333/Sample | 68e3a5c26c6d9bc1906ce0cca2fd586f0790fa52 | [
"MIT"
] | 9 | 2016-09-03T02:57:31.000Z | 2021-09-09T02:42:26.000Z | #!/usr/bin/python
print "ABCDE"
| 8.25 | 17 | 0.666667 |
4a06cfcff23b4c046c45b3a7a948fb7198fa8158 | 3,056 | py | Python | simple LSTM.py | 55708r/ANCM-Mini-Project | 4c66ef03e88c9cbfa5468192221f8c00c286d591 | [
"MIT"
] | 2 | 2020-12-01T13:25:04.000Z | 2022-01-21T02:20:30.000Z | simple LSTM.py | 55708r/ANCM-Mini-Project | 4c66ef03e88c9cbfa5468192221f8c00c286d591 | [
"MIT"
] | null | null | null | simple LSTM.py | 55708r/ANCM-Mini-Project | 4c66ef03e88c9cbfa5468192221f8c00c286d591 | [
"MIT"
] | 1 | 2020-12-10T13:01:36.000Z | 2020-12-10T13:01:36.000Z | #Import the libraries
import math
import numpy as np
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
from keras.models import Sequential
from keras.layers import Dense, LSTM
import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
features = (np.random.randint(10, size=(100, 1)))
... | 26.807018 | 91 | 0.703534 |
4a06d07806e754ba517f028ac5aa705c8eab3efe | 3,871 | py | Python | libs/rtm_dispatcher.py | Arthuchaut/clue | 95f215f28adc5550e0c5a5f1470f36f07214bffe | [
"MIT"
] | null | null | null | libs/rtm_dispatcher.py | Arthuchaut/clue | 95f215f28adc5550e0c5a5f1470f36f07214bffe | [
"MIT"
] | null | null | null | libs/rtm_dispatcher.py | Arthuchaut/clue | 95f215f28adc5550e0c5a5f1470f36f07214bffe | [
"MIT"
] | null | null | null | """The Slack bot commands dispatcher class.
"""
from typing import Dict, List, Awaitable, Any
import asyncio
import logging
import slack
from config.custom_type import (
EventLoop,
RTMClient,
WebClient
)
class RTMDispatcher:
"""The SlackbotRTMDispatcher class declaration.
"""
def __init__(s... | 31.217742 | 79 | 0.573754 |
4a06d0821d5a4970caddf87d61fc7ebe786a6ee1 | 3,229 | py | Python | models/addatt_RNN.py | caokyhieu/DELAFO | 1c84e5f4ef9690e453973b57d1f0feb194a55a8c | [
"MIT"
] | 17 | 2020-05-04T08:54:14.000Z | 2022-03-28T08:43:09.000Z | models/addatt_RNN.py | caokyhieu/DELAFO | 1c84e5f4ef9690e453973b57d1f0feb194a55a8c | [
"MIT"
] | 2 | 2020-11-03T01:07:24.000Z | 2021-08-06T16:56:18.000Z | models/addatt_RNN.py | caokyhieu/DELAFO | 1c84e5f4ef9690e453973b57d1f0feb194a55a8c | [
"MIT"
] | 10 | 2020-06-11T15:59:32.000Z | 2022-03-22T14:00:04.000Z | from keras.layers import Input, Activation, Dense,Flatten, BatchNormalization, Add, Conv2D
from keras.layers import MaxPooling2D,AveragePooling2D,Permute,Reshape,LSTM,Lambda,GRU,Bidirectional,BatchNormalization,Concatenate
from keras import regularizers
from keras.optimizers import Adam
from models.attention_layer impo... | 33.989474 | 135 | 0.69681 |
4a06d0862fd3797185603a3f77a10e4abd1f28f9 | 6,319 | py | Python | phase_diagrammer/lennard-jones_diameter_overlay_mono.py | kolbt/whingdingdilly | 4c17b594ebc583750fe7565d6414f08678ea7882 | [
"BSD-3-Clause"
] | 4 | 2017-09-04T14:36:57.000Z | 2022-03-28T23:24:58.000Z | phase_diagrammer/lennard-jones_diameter_overlay_mono.py | kolbt/whingdingdilly | 4c17b594ebc583750fe7565d6414f08678ea7882 | [
"BSD-3-Clause"
] | null | null | null | phase_diagrammer/lennard-jones_diameter_overlay_mono.py | kolbt/whingdingdilly | 4c17b594ebc583750fe7565d6414f08678ea7882 | [
"BSD-3-Clause"
] | null | null | null | '''
# This is an 80 character line #
This file:
1. Reads in data for diameter from textfiles
2. Computes the LJ force for given distances
3. Plots this data
'''
# Imports and loading the .gsd file
import sys
import numpy as np
import math
import matplotli... | 27.120172 | 97 | 0.582212 |
4a06d0d54b31fc7d8aabfed18cf80960d0026b9e | 19,541 | py | Python | ax/service/utils/with_db_settings_base.py | trsvchn/Ax | 0b430641c6b33920757dd09ae4318ea487fb4136 | [
"MIT"
] | null | null | null | ax/service/utils/with_db_settings_base.py | trsvchn/Ax | 0b430641c6b33920757dd09ae4318ea487fb4136 | [
"MIT"
] | null | null | null | ax/service/utils/with_db_settings_base.py | trsvchn/Ax | 0b430641c6b33920757dd09ae4318ea487fb4136 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# 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 time
from logging import INFO
from typing import List, Optional, Tuple, Type
from ax.core.base_trial import Bas... | 37.506718 | 88 | 0.654265 |
4a06d0ea15c87f2bc930a15b51b282d1669874ca | 6,609 | gyp | Python | binding.gyp | naturalatlas/node-mapnik | 02e5d8eb0488128e1c51ad7d9ea9e5becb57dbb9 | [
"BSD-3-Clause"
] | null | null | null | binding.gyp | naturalatlas/node-mapnik | 02e5d8eb0488128e1c51ad7d9ea9e5becb57dbb9 | [
"BSD-3-Clause"
] | null | null | null | binding.gyp | naturalatlas/node-mapnik | 02e5d8eb0488128e1c51ad7d9ea9e5becb57dbb9 | [
"BSD-3-Clause"
] | null | null | null | {
'includes': [ 'common.gypi' ],
'variables': {
'ENABLE_GLIBC_WORKAROUND%':'false', # can be overriden by a command line variable because of the % sign
'napi_build_version%':'3', # can be overriden by a command line variable because of the % sign
'enable_sse%':'true'
},
'targets': [
{
... | 35.724324 | 109 | 0.525042 |
4a06d12199b0d758b9fe073ced5f8c72fa752574 | 3,867 | py | Python | Day19/first.py | PulakIIIT/AOC-2021 | 3f54b4bbce5e84d604d4718ba479beb566fc17d1 | [
"MIT"
] | null | null | null | Day19/first.py | PulakIIIT/AOC-2021 | 3f54b4bbce5e84d604d4718ba479beb566fc17d1 | [
"MIT"
] | null | null | null | Day19/first.py | PulakIIIT/AOC-2021 | 3f54b4bbce5e84d604d4718ba479beb566fc17d1 | [
"MIT"
] | null | null | null | from collections import defaultdict
import sys
import pprint
from itertools import permutations
def subt(pt1, pt2):
return pt1[0] - pt2[0], pt1[1] - pt2[1], pt1[2] - pt2[2]
def add(pt1, pt2):
return pt1[0] + pt2[0], pt1[1] + pt2[1], pt1[2] + pt2[2]
def rotate(pt, permut):
return pt[permut[0]], pt[perm... | 26.128378 | 77 | 0.438583 |
4a06d1352fbea5c2fe7f2006a82b5c821b642310 | 195 | py | Python | appengine_config.py | avishekhbharati/GcloudPythonSimpleLoginApp | 7299b5825216521cc3949be70ea3372350158481 | [
"Apache-2.0"
] | null | null | null | appengine_config.py | avishekhbharati/GcloudPythonSimpleLoginApp | 7299b5825216521cc3949be70ea3372350158481 | [
"Apache-2.0"
] | null | null | null | appengine_config.py | avishekhbharati/GcloudPythonSimpleLoginApp | 7299b5825216521cc3949be70ea3372350158481 | [
"Apache-2.0"
] | null | null | null | from gaesessions import SessionMiddleware
def webapp_add_wsgi_middleware(app):
app = SessionMiddleware(app, cookie_key="jkdhgfdjkghfjdkghfdgjhdfkjghdfjgnmxbvxcmnvbitueotuirt")
return app | 39 | 100 | 0.846154 |
4a06d25e2fcbd1b5bed452dbaf1f0689d0ad2995 | 5,131 | py | Python | tests/unit/test_timeslive_crawler.py | CodeForAfrica/mma-dexter | 10d7f0c51bb935399c708a432699e06418049a33 | [
"Apache-2.0"
] | 12 | 2015-06-14T05:50:39.000Z | 2021-09-12T17:03:47.000Z | tests/unit/test_timeslive_crawler.py | CodeForAfrica/mma-dexter | 10d7f0c51bb935399c708a432699e06418049a33 | [
"Apache-2.0"
] | 32 | 2019-07-25T06:17:31.000Z | 2019-08-05T02:41:42.000Z | tests/unit/test_timeslive_crawler.py | CodeForAfricaLabs/mma-dexter | 10d7f0c51bb935399c708a432699e06418049a33 | [
"Apache-2.0"
] | 9 | 2016-04-04T03:08:22.000Z | 2020-02-19T09:55:45.000Z | import unittest
from dexter.models import Document, db
from dexter.models.seeds import seed_db
from dexter.processing.crawlers import TimesLiveCrawler
class TestTimesliveCrawler(unittest.TestCase):
def setUp(self):
self.crawler = TimesLiveCrawler()
self.db = db
self.db.drop_all()
... | 60.364706 | 1,022 | 0.634184 |
4a06d27a66e5e8ae6a75f59aa2b5e6685afe7a9e | 378 | py | Python | app/main/forms/Compra_forms.py | amandapersampa/Franguinho | 940b6601a821ab4857de7f0a5a0ac53f6f54a564 | [
"MIT"
] | null | null | null | app/main/forms/Compra_forms.py | amandapersampa/Franguinho | 940b6601a821ab4857de7f0a5a0ac53f6f54a564 | [
"MIT"
] | 8 | 2017-03-14T11:55:07.000Z | 2017-04-03T00:53:32.000Z | app/main/forms/Compra_forms.py | amandapersampa/MicroGerencia | 940b6601a821ab4857de7f0a5a0ac53f6f54a564 | [
"MIT"
] | null | null | null | # coding=utf-8
from flask_wtf import FlaskForm
from wtforms import *
from wtforms.validators import DataRequired
class Compra_forms(FlaskForm):
produto = SelectField('produto')
quantidade = IntegerField("quantidade", validators=[DataRequired()])
valor = FloatField("quantidade", validators=[DataRequired()])... | 37.8 | 72 | 0.753968 |
4a06d2807a057e15a676c6c0c426bc1b7957e993 | 2,417 | py | Python | redash/cli/__init__.py | aladdinwang/redash | 934b340ff7dab7caa3c91618ffdbe109dfdb31f5 | [
"BSD-2-Clause"
] | 1 | 2019-10-25T07:30:26.000Z | 2019-10-25T07:30:26.000Z | redash/cli/__init__.py | aladdinwang/redash | 934b340ff7dab7caa3c91618ffdbe109dfdb31f5 | [
"BSD-2-Clause"
] | null | null | null | redash/cli/__init__.py | aladdinwang/redash | 934b340ff7dab7caa3c91618ffdbe109dfdb31f5 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function
import click
import simplejson
from flask import current_app
from flask.cli import FlaskGroup, run_command
from redash import __version__, create_app, settings
from redash.cli import data_sources, database, groups, organization, queries, users
from redash.monitor import get_statu... | 25.712766 | 88 | 0.6988 |
4a06d28f0b85231426ffbef9115775f9a8cf8b81 | 4,092 | py | Python | pychron/graph/tools/point_inspector.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | 1 | 2019-02-27T21:57:44.000Z | 2019-02-27T21:57:44.000Z | pychron/graph/tools/point_inspector.py | ael-noblegas/pychron | 6ebbbb1f66a614972b62b7a9be4c784ae61b5d62 | [
"Apache-2.0"
] | 80 | 2018-07-17T20:10:20.000Z | 2021-08-17T15:38:24.000Z | pychron/graph/tools/point_inspector.py | AGESLDEO/pychron | 1a81e05d9fba43b797f335ceff6837c016633bcf | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2012 Jake Ross
#
# 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/licens... | 35.275862 | 86 | 0.501222 |
4a06d2ebb02786c2a9c7d23f89d327d48dc27c44 | 12,854 | py | Python | tests/clients/test_pika.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 61 | 2017-09-27T02:50:17.000Z | 2022-03-22T12:13:37.000Z | tests/clients/test_pika.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 82 | 2017-07-11T13:47:33.000Z | 2022-03-22T10:10:38.000Z | tests/clients/test_pika.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 27 | 2017-09-11T16:22:32.000Z | 2022-03-11T17:21:49.000Z | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2021
from __future__ import absolute_import
import os
import pika
import unittest
import mock
import threading
import time
from ..helpers import testenv
from instana.singletons import tracer
class _TestPika(unittest.TestCase):
@staticmethod
@mock.... | 34.005291 | 95 | 0.642991 |
4a06d43eead8313b5334d2c7d9a287b29ece4515 | 11,618 | py | Python | tensorflow/contrib/data/python/ops/readers.py | dantkz/tensorflow | 5333bbeb3142af2a06f1ebd971061fc4e28da743 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/data/python/ops/readers.py | dantkz/tensorflow | 5333bbeb3142af2a06f1ebd971061fc4e28da743 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/data/python/ops/readers.py | dantkz/tensorflow | 5333bbeb3142af2a06f1ebd971061fc4e28da743 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.477419 | 81 | 0.669909 |
4a06d4aa0e577ae6e113d2b4003bd5f44efb648a | 388 | py | Python | docs/hh_guide/hh_guide.py | notsue/HaHa | c7969bb3b54121f117f96ffacb96661f7d11eecc | [
"MIT"
] | null | null | null | docs/hh_guide/hh_guide.py | notsue/HaHa | c7969bb3b54121f117f96ffacb96661f7d11eecc | [
"MIT"
] | null | null | null | docs/hh_guide/hh_guide.py | notsue/HaHa | c7969bb3b54121f117f96ffacb96661f7d11eecc | [
"MIT"
] | null | null | null | import sys
sys.path.append('../../')
import hh
config = {'sourcefile':'hh_guide.hh', 'outputfile': None, 'toc':2, 'h1':0, 'numbers': 1, 'includes': 3 , 'x3d': 1,
'css':'default', 'katex':1, 'highlight': 1, 'highlight-css': 'github.min.css', 'dir':'ltr', 'lang':'en', 'class': 'hh', 'view': 0}
doc = h... | 32.333333 | 140 | 0.582474 |
4a06d54179b4c5cc94564d42c84bb597a12961f7 | 301,861 | py | Python | meerk40t/svgelements.py | apbarratt/meerk40t | 7049ab7693d482bd96ff3a298a9fc164836a750d | [
"MIT"
] | 118 | 2019-09-09T14:15:28.000Z | 2022-03-17T18:54:27.000Z | meerk40t/svgelements.py | apbarratt/meerk40t | 7049ab7693d482bd96ff3a298a9fc164836a750d | [
"MIT"
] | 656 | 2019-07-21T03:34:12.000Z | 2022-03-30T18:10:31.000Z | meerk40t/svgelements.py | apbarratt/meerk40t | 7049ab7693d482bd96ff3a298a9fc164836a750d | [
"MIT"
] | 48 | 2019-12-22T23:05:27.000Z | 2022-03-17T18:54:25.000Z | # -*- coding: ISO-8859-1 -*-
import re
try:
from collections.abc import MutableSequence # noqa
except ImportError:
from collections import MutableSequence # noqa
from copy import copy
from math import (
acos,
atan,
atan2,
ceil,
cos,
degrees,
hypot,
log,
radians,
sin,... | 34.333599 | 464 | 0.533749 |
4a06d712c63678d73594b560ac852ba069e92509 | 8,426 | py | Python | SeanCody.bundle/Contents/Code/__init__.py | legosteve/plex-gay-metadata-agent | 83571b942ac104906ed3c1915572410b112f25cb | [
"MIT"
] | null | null | null | SeanCody.bundle/Contents/Code/__init__.py | legosteve/plex-gay-metadata-agent | 83571b942ac104906ed3c1915572410b112f25cb | [
"MIT"
] | null | null | null | SeanCody.bundle/Contents/Code/__init__.py | legosteve/plex-gay-metadata-agent | 83571b942ac104906ed3c1915572410b112f25cb | [
"MIT"
] | null | null | null | # SeanCody
import re, os, platform, simplejson as json
PLUGIN_LOG_TITLE = 'Sean Cody' # Log Title
VERSION_NO = '2017.07.26.0'
# Delay used when requesting HTML, may be good to have to prevent being
# banned from the site
REQUEST_DELAY = 0
# URLS
BASE_URL = 'https://www.seancody.com%s'
# Example To... | 38.474886 | 157 | 0.570377 |
4a06d730bf35f3c2ae36de268f8d757fca89df03 | 557 | py | Python | conftest.py | bob-r/crudlfap | 7034718bbd9e18bb0fccae03638fed04243c9fe4 | [
"BSD-4-Clause"
] | 19 | 2017-09-21T18:29:49.000Z | 2021-06-10T21:57:54.000Z | conftest.py | jpic/crudlfap | 8d569973f9abba6dcb3bcca0e58731afdee27414 | [
"BSD-4-Clause"
] | 81 | 2017-10-29T15:50:23.000Z | 2018-10-05T05:59:32.000Z | conftest.py | jpic/crudlfap | 8d569973f9abba6dcb3bcca0e58731afdee27414 | [
"BSD-4-Clause"
] | 10 | 2017-10-26T10:21:01.000Z | 2022-02-19T13:21:56.000Z | import pytest
from django.contrib.sessions.backends.base import SessionBase
from django.test.client import RequestFactory as drf
class RequestFactory(drf):
def __init__(self, user):
self.user = user
super().__init__()
def generic(self, *args, **kwargs):
request = super().generic(*args... | 25.318182 | 61 | 0.691203 |
4a06d8701835e3b2b9d08dd92573742fa03c0f03 | 603 | py | Python | tests/functional/test_bd.py | AbacherlyGabriel/tech.academy | ff2c3155397da61d9dfbb729b776c1725b63b327 | [
"MIT"
] | 3 | 2020-09-20T22:04:05.000Z | 2020-09-25T04:35:08.000Z | tests/functional/test_bd.py | AbacherlyGabriel/tech.academy | ff2c3155397da61d9dfbb729b776c1725b63b327 | [
"MIT"
] | null | null | null | tests/functional/test_bd.py | AbacherlyGabriel/tech.academy | ff2c3155397da61d9dfbb729b776c1725b63b327 | [
"MIT"
] | null | null | null | from src.dao import UserDao
def test_dao_read():
assert UserDao().read("admin@admin.com", "pass") is True
def test_dao_read_wrong_password():
assert UserDao().read("admin@admin.com", "wrong") is False
def test_dao_create_error_different_passwords():
assert UserDao().create_user("admin@admin.com", "adm... | 27.409091 | 86 | 0.719735 |
4a06d90fb1ed9c33cc25272467c30ced3cb8a0e7 | 1,369 | py | Python | discovery/api/catalog.py | amenezes/discovery-client | 9c41456d1cc14f4aab34628ad4e13423e00bc4be | [
"Apache-2.0"
] | 2 | 2019-07-18T22:43:49.000Z | 2020-03-09T03:27:41.000Z | discovery/api/catalog.py | amenezes/discovery-client | 9c41456d1cc14f4aab34628ad4e13423e00bc4be | [
"Apache-2.0"
] | 20 | 2019-02-27T19:08:03.000Z | 2021-06-22T16:47:32.000Z | discovery/api/catalog.py | amenezes/discovery-client | 9c41456d1cc14f4aab34628ad4e13423e00bc4be | [
"Apache-2.0"
] | null | null | null | from discovery.api.abc import Api
class Catalog(Api):
def __init__(self, endpoint: str = "/catalog", **kwargs):
super().__init__(endpoint=endpoint, **kwargs)
async def register(self, data: dict, **kwargs):
response = await self.client.put(f"{self.url}/register", data=data, **kwargs)
r... | 35.102564 | 87 | 0.636231 |
4a06d989ce2457797a6ea5a2ae31da44cb4c1891 | 23,244 | py | Python | tests/components/media_player/test_universal.py | sbidoul/home-assistant | 75adb7ff46e64e510c206d2b1f141253bbc4997a | [
"MIT"
] | 1 | 2017-01-25T15:31:20.000Z | 2017-01-25T15:31:20.000Z | tests/components/media_player/test_universal.py | bytebility/home-assistant | 6015274ee2486f797fd6ee8f5f2074a601953e03 | [
"MIT"
] | null | null | null | tests/components/media_player/test_universal.py | bytebility/home-assistant | 6015274ee2486f797fd6ee8f5f2074a601953e03 | [
"MIT"
] | 2 | 2018-10-22T17:05:47.000Z | 2021-09-22T10:52:31.000Z | """The tests for the Universal Media player platform."""
from copy import copy
import unittest
from homeassistant.const import (
STATE_OFF, STATE_ON, STATE_UNKNOWN, STATE_PLAYING, STATE_PAUSED)
import homeassistant.components.switch as switch
import homeassistant.components.input_slider as input_slider
import home... | 36.1493 | 79 | 0.654276 |
4a06da0a84fe5683e7da64ac74a1fba9cff87852 | 10,722 | py | Python | src/mbed_os_tools/test/host_tests_runner/mbed_base.py | noralsydmp/mbed-os-tools | 5a14958aa49eb5764afba8e1dc3208cae2955cd7 | [
"Apache-2.0"
] | null | null | null | src/mbed_os_tools/test/host_tests_runner/mbed_base.py | noralsydmp/mbed-os-tools | 5a14958aa49eb5764afba8e1dc3208cae2955cd7 | [
"Apache-2.0"
] | null | null | null | src/mbed_os_tools/test/host_tests_runner/mbed_base.py | noralsydmp/mbed-os-tools | 5a14958aa49eb5764afba8e1dc3208cae2955cd7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018, Arm Limited and affiliates.
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# ... | 44.305785 | 119 | 0.556333 |
4a06db6e827c46cc63841deee2d6fbb96949412e | 27,345 | py | Python | qcodes/utils/helpers.py | Dominik-Vogel/Qcodes | b4cf7d58bc1bf3be97af6bf48f57cb6b87d588bb | [
"MIT"
] | 1 | 2019-12-07T01:25:49.000Z | 2019-12-07T01:25:49.000Z | qcodes/utils/helpers.py | Dominik-Vogel/Qcodes | b4cf7d58bc1bf3be97af6bf48f57cb6b87d588bb | [
"MIT"
] | null | null | null | qcodes/utils/helpers.py | Dominik-Vogel/Qcodes | b4cf7d58bc1bf3be97af6bf48f57cb6b87d588bb | [
"MIT"
] | null | null | null | import io
import json
import logging
import math
import numbers
import time
import os
from pathlib import Path
from collections.abc import Iterator, Sequence, Mapping
from copy import deepcopy
from typing import (Dict, Any, TypeVar, Type, List, Tuple, Union, Optional,
cast, Callable, SupportsAbs)
f... | 35.012804 | 116 | 0.604717 |
4a06dbeee5a2ebfc3240b782941f56b7845bdf2e | 4,790 | py | Python | enaBrowserTools/enaDataGet.py | esteinig/enaBrowserTools | f2f69acee61039872243b28dbab0ef32ee651726 | [
"Apache-2.0"
] | null | null | null | enaBrowserTools/enaDataGet.py | esteinig/enaBrowserTools | f2f69acee61039872243b28dbab0ef32ee651726 | [
"Apache-2.0"
] | null | null | null | enaBrowserTools/enaDataGet.py | esteinig/enaBrowserTools | f2f69acee61039872243b28dbab0ef32ee651726 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# enaDataGet.py
#
#
# Copyright 2017 EMBL-EBI, Hinxton outstation
#
# 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
#
#... | 45.188679 | 121 | 0.646555 |
4a06dd3d00d3e3378737bbd5701a9e2ac32904a7 | 465 | py | Python | exceptions.py | spausanc/astr-119-hw-1 | f2e17dbea70f0eebdd3555718285cafce2ac3cf4 | [
"MIT"
] | null | null | null | exceptions.py | spausanc/astr-119-hw-1 | f2e17dbea70f0eebdd3555718285cafce2ac3cf4 | [
"MIT"
] | 1 | 2018-10-25T23:42:12.000Z | 2018-10-25T23:42:12.000Z | exceptions.py | spausanc/astr-119-hw-2 | f2e17dbea70f0eebdd3555718285cafce2ac3cf4 | [
"MIT"
] | 1 | 2018-10-18T01:53:25.000Z | 2018-10-18T01:53:25.000Z | # Python exceptions let you deal with
#unexpected results
try:
print(a) # This will throw and exception since a is not defined
except:
print("a is not defined!")
# There are specific errors to help with cases
try:
print(a) # This will throw an exception since a is not defined
except NameError:
print(... | 23.25 | 65 | 0.707527 |
4a06dd8b676947adc1c1600e0b2663840b1a36fc | 8,253 | py | Python | nemo/collections/nlp/modules/common/tokenizer_utils.py | madhukarkm/NeMo | 648c97f076147684bee6aaada209f2f20adcaf5d | [
"Apache-2.0"
] | null | null | null | nemo/collections/nlp/modules/common/tokenizer_utils.py | madhukarkm/NeMo | 648c97f076147684bee6aaada209f2f20adcaf5d | [
"Apache-2.0"
] | 1 | 2021-11-10T14:59:54.000Z | 2021-11-12T16:42:14.000Z | nemo/collections/nlp/modules/common/tokenizer_utils.py | madhukarkm/NeMo | 648c97f076147684bee6aaada209f2f20adcaf5d | [
"Apache-2.0"
] | 2 | 2021-11-04T14:39:00.000Z | 2021-11-04T14:56:30.000Z | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 42.541237 | 185 | 0.723131 |
4a06de353f751b7923da3d442bdbeba1268b3324 | 1,704 | py | Python | pdfparser/modules/rolls/daman/english.py | in-rolls/parse_searchable_rolls | f8f41ac4f848c6a29be1d98dcfb00d1549c16e43 | [
"MIT"
] | 3 | 2020-12-16T09:00:59.000Z | 2021-07-11T01:17:18.000Z | pdfparser/modules/rolls/daman/english.py | in-rolls/parse_elex_rolls | f8f41ac4f848c6a29be1d98dcfb00d1549c16e43 | [
"MIT"
] | 2 | 2018-07-09T16:01:26.000Z | 2019-07-08T05:35:19.000Z | pdfparser/modules/rolls/daman/english.py | in-rolls/parse_searchable_rolls | f8f41ac4f848c6a29be1d98dcfb00d1549c16e43 | [
"MIT"
] | 3 | 2021-08-24T10:49:50.000Z | 2022-01-22T01:11:36.000Z | from ..base import Reader, Patterns, Elector
__all__ = ['DamanPDF']
class DamanPatterns(Patterns):
part_patterns = dict(
main=r'(?<=Page2)(.*?)(?=\nSUMMARY OF ELECTORS\n)',
addition=None,
correction=None,
deletion=None,
)
box_patterns = dict(
main=r'(\d+\n[FHM]\. ... | 30.981818 | 79 | 0.460681 |
4a06de62ac332216a2cc44f25165b334686fa0e7 | 2,168 | py | Python | sa/profiles/HP/1910/get_arp.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | sa/profiles/HP/1910/get_arp.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | sa/profiles/HP/1910/get_arp.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# HP.1910.get_arp
# ---------------------------------------------------------------------
# Copyright (C) 2007-2013 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------... | 35.540984 | 98 | 0.416052 |
4a06de876a031af3ee0ba354f126a3faa66b0c84 | 3,034 | py | Python | Guess_a_number/guess_a_num.py | chineidu/Python_projects | 6d1909338e964ea36a58d3318eeaf9cc796ecb67 | [
"MIT"
] | null | null | null | Guess_a_number/guess_a_num.py | chineidu/Python_projects | 6d1909338e964ea36a58d3318eeaf9cc796ecb67 | [
"MIT"
] | null | null | null | Guess_a_number/guess_a_num.py | chineidu/Python_projects | 6d1909338e964ea36a58d3318eeaf9cc796ecb67 | [
"MIT"
] | null | null | null | import random
def guess_num(num: int) -> None:
""" This function is used to guess the computer's number.
Arguments:
----------
num -- An integer that's greater than 1.
Returns:
--------
None
"""
random_num = random.randint(1, num)
active = True
while active:
guess... | 25.711864 | 102 | 0.515491 |
4a06df79a6acb87bef0dffe0ac8eb8ae06eb888b | 1,930 | py | Python | Users/RemindPendingMembers.py | dropbox/DropboxBusinessScripts | 4f4c32ddd488b29e7fd16a40966761e70a758239 | [
"Apache-2.0"
] | 48 | 2015-11-09T20:05:14.000Z | 2021-12-17T23:35:12.000Z | Users/RemindPendingMembers.py | dropbox/DropboxBusinessScripts | 4f4c32ddd488b29e7fd16a40966761e70a758239 | [
"Apache-2.0"
] | null | null | null | Users/RemindPendingMembers.py | dropbox/DropboxBusinessScripts | 4f4c32ddd488b29e7fd16a40966761e70a758239 | [
"Apache-2.0"
] | 24 | 2015-11-18T16:15:18.000Z | 2022-03-04T10:35:22.000Z | import urllib
import urllib2
import json
import argparse
import sys
from collections import Counter
reload(sys)
sys.setdefaultencoding('UTF8')
parser = argparse.ArgumentParser(description='Send reminder emails to all invited (but not joined) members.')
args = parser.parse_args()
dfbToken = raw_input('Enter your Dro... | 31.639344 | 118 | 0.690155 |
4a06dfd9a26e7533b319c9cdc7b2bf3c1868a57d | 238 | py | Python | service/service/settings/local.py | gitter-badger/share-analytics | 2a1a6d2d2ba412627750517a6b02088456c04c23 | [
"Apache-2.0"
] | null | null | null | service/service/settings/local.py | gitter-badger/share-analytics | 2a1a6d2d2ba412627750517a6b02088456c04c23 | [
"Apache-2.0"
] | null | null | null | service/service/settings/local.py | gitter-badger/share-analytics | 2a1a6d2d2ba412627750517a6b02088456c04c23 | [
"Apache-2.0"
] | null | null | null | DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'public',
'USER': 'admin',
'PASSWORD': 'itsover9000',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
| 21.636364 | 59 | 0.47479 |
4a06e17c2f375b54b22dc567d85674d1d73ae970 | 280 | py | Python | tests/test_key_transform.py | dana/python-message-transform | f505ae814c2430b523751ef86e6772af27593797 | [
"MIT"
] | null | null | null | tests/test_key_transform.py | dana/python-message-transform | f505ae814c2430b523751ef86e6772af27593797 | [
"MIT"
] | null | null | null | tests/test_key_transform.py | dana/python-message-transform | f505ae814c2430b523751ef86e6772af27593797 | [
"MIT"
] | null | null | null | import sys
sys.path.append('..')
sys.path.append('.')
from message_transform import mtransform # noqa: E402
def test_simple_key_transform():
message = {'a': 'b'}
mtransform(message, {' specials/$message->{a}': ' specials/$message->{a}'})
assert message['b'] == 'b'
| 25.454545 | 79 | 0.646429 |
4a06e312c3d1739d7287797f019839de0a837882 | 858 | py | Python | pydov/search/bodemdiepteinterval.py | DOV-Vlaanderen/dov-pydownloader | 126b17f4ad870d9fae5cb2c4b868c564cf7cd1b3 | [
"MIT"
] | null | null | null | pydov/search/bodemdiepteinterval.py | DOV-Vlaanderen/dov-pydownloader | 126b17f4ad870d9fae5cb2c4b868c564cf7cd1b3 | [
"MIT"
] | 4 | 2016-12-23T10:36:05.000Z | 2017-01-03T11:38:39.000Z | pydov/search/bodemdiepteinterval.py | DOV-Vlaanderen/dov-pydownloader | 126b17f4ad870d9fae5cb2c4b868c564cf7cd1b3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Module containing the search classes to retrieve DOV
bodemdiepteinterval data."""
from ..types.bodemdiepteinterval import Bodemdiepteinterval
from .abstract import AbstractSearch
class BodemdiepteintervalSearch(AbstractSearch):
"""Search class to retrieve information about bodemdieptein... | 35.75 | 77 | 0.712121 |
4a06e331ec2e457386e696ab5958f864f4a212c5 | 4,027 | py | Python | alipay/aop/api/request/KoubeiServindustryExerciseRecordDeleteRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/KoubeiServindustryExerciseRecordDeleteRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/KoubeiServindustryExerciseRecordDeleteRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.KoubeiServindustryExerciseRecordDeleteModel import KoubeiServindustryExerciseRecordDeleteModel
class KoubeiServindustryExerciseRecor... | 27.772414 | 148 | 0.649615 |
4a06e404db3ecfde274f00856070f7394b9946fa | 25,423 | py | Python | ncov_ism/_pickism.py | EESI/ncov_ism | 9ef8971eb59b5fd3086c13876818bda94660f0ad | [
"BSD-3-Clause"
] | 1 | 2021-12-24T19:36:38.000Z | 2021-12-24T19:36:38.000Z | ncov_ism/_pickism.py | EESI/ncov_ism | 9ef8971eb59b5fd3086c13876818bda94660f0ad | [
"BSD-3-Clause"
] | null | null | null | ncov_ism/_pickism.py | EESI/ncov_ism | 9ef8971eb59b5fd3086c13876818bda94660f0ad | [
"BSD-3-Clause"
] | null | null | null | import logging
import json
import datetime
import pandas as pd
import numpy as np
import itertools
from collections import Counter, OrderedDict
from math import log2, ceil
from Bio import SeqIO
logging.basicConfig(format='%(asctime)s - %(message)s', datefmt='%d-%b-%y %H:%M:%S', level=logging.INFO)
def base_entropy_ma... | 39.910518 | 193 | 0.6052 |
4a06e4c4ca2e92b339c224058c2e4c7bdd891119 | 14,504 | py | Python | legacy/PPchan.py | andreagalle/pigcasso | e9b60fb595ba6bd2c402a5b4b16665d4d41fa748 | [
"MIT"
] | null | null | null | legacy/PPchan.py | andreagalle/pigcasso | e9b60fb595ba6bd2c402a5b4b16665d4d41fa748 | [
"MIT"
] | 4 | 2020-06-13T09:17:15.000Z | 2020-06-17T16:26:03.000Z | legacy/PPchan.py | andreagalle/pigcasso | e9b60fb595ba6bd2c402a5b4b16665d4d41fa748 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
PPchan.py
"""
import modUtils as util
import os, sys, shutil
import draft as fct
import vtk
import numpy as np
import scipy.integrate
import toolCase as toca
import time
from scipy.interpolate import griddata
import matplotlib
import matplotlib.pyplot as plt
"############################... | 39.306233 | 153 | 0.601489 |
4a06e515a6c37fc2503a95598a02935f95c24aa4 | 3,750 | py | Python | lib/galaxy/datatypes/xml.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | 2 | 2016-02-23T00:09:14.000Z | 2019-02-11T07:48:44.000Z | lib/galaxy/datatypes/xml.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/datatypes/xml.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | 6 | 2015-05-27T13:09:50.000Z | 2019-02-11T07:48:46.000Z | """
XML format classes
"""
import data
import logging
from galaxy.datatypes.sniff import *
log = logging.getLogger(__name__)
class GenericXml( data.Text ):
"""Base format class for any XML file."""
file_ext = "xml"
def set_peek( self, dataset, is_multi_byte=False ):
"""Set the peek and blurb text... | 34.722222 | 124 | 0.610933 |
4a06e597c3608a1bf79d6a651f864ad6f8162aca | 8,828 | py | Python | homeassistant/components/mill/climate.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 3 | 2021-11-22T22:37:43.000Z | 2022-03-17T00:55:28.000Z | homeassistant/components/mill/climate.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 25 | 2021-11-24T06:24:10.000Z | 2022-03-31T06:23:06.000Z | homeassistant/components/mill/climate.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 3 | 2022-01-02T18:49:54.000Z | 2022-01-25T02:03:54.000Z | """Support for mill wifi-enabled home heaters."""
import mill
import voluptuous as vol
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
CURRENT_HVAC_HEAT,
CURRENT_HVAC_IDLE,
FAN_ON,
HVAC_MODE_HEAT,
HVAC_MODE_OFF,
SUPPORT_FAN_MODE,
... | 35.312 | 87 | 0.684073 |
4a06e5de2da165a36c6b311bf97fa8f2e1be6e98 | 95,575 | py | Python | src/azure-cli/azure/cli/command_modules/appservice/_help.py | sudokylumaster/azure-cli | 5bbb75e4860dcd086ca8b4c413a64acb9a6dbb2f | [
"MIT"
] | 1 | 2020-08-25T00:21:50.000Z | 2020-08-25T00:21:50.000Z | src/azure-cli/azure/cli/command_modules/appservice/_help.py | sudokylumaster/azure-cli | 5bbb75e4860dcd086ca8b4c413a64acb9a6dbb2f | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/appservice/_help.py | sudokylumaster/azure-cli | 5bbb75e4860dcd086ca8b4c413a64acb9a6dbb2f | [
"MIT"
] | null | null | null | # 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.
# -----------------------------------------------------... | 39.347468 | 318 | 0.734742 |
4a06e623e59ce627420942321afc12d25246ec22 | 1,800 | py | Python | tests/unit/small_text/integrations/transformers/classifiers/test_base.py | chschroeder/small-text | ef28e91ba0c94fe938dde4f16253aa8695ea13b7 | [
"MIT"
] | 218 | 2021-05-26T16:38:53.000Z | 2022-03-30T09:48:54.000Z | tests/unit/small_text/integrations/transformers/classifiers/test_base.py | chschroeder/small-text | ef28e91ba0c94fe938dde4f16253aa8695ea13b7 | [
"MIT"
] | 9 | 2021-10-16T23:23:02.000Z | 2022-02-22T15:23:11.000Z | tests/unit/small_text/integrations/transformers/classifiers/test_base.py | chschroeder/small-text | ef28e91ba0c94fe938dde4f16253aa8695ea13b7 | [
"MIT"
] | 21 | 2021-06-24T11:19:44.000Z | 2022-03-12T16:29:53.000Z | import pytest
import unittest
import numpy as np
from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
try:
import torch
from small_text.integrations.transformers.datasets import TransformersDataset
from small_text.integrations.transformers.classifiers import TransformerBasedClassi... | 34.615385 | 121 | 0.737778 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.