hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
efd3f9d1de68654dbc76d3fbfef70bcad64b263b | 585 | py | Python | main/methods/analysis.py | hannxiao/autotrade2 | 8e6f3d463334b6ea8a18074de58e25c0dab93f39 | [
"MIT"
] | null | null | null | main/methods/analysis.py | hannxiao/autotrade2 | 8e6f3d463334b6ea8a18074de58e25c0dab93f39 | [
"MIT"
] | 6 | 2020-06-06T01:05:02.000Z | 2021-12-13T20:42:16.000Z | main/methods/analysis.py | hannxiao/autotrade | 8e6f3d463334b6ea8a18074de58e25c0dab93f39 | [
"MIT"
] | null | null | null | from . import toolFuncs
def DefineTrend(data, K):
'''
Filter all the trend whose range less than K%
'''
pairs = list(zip(data['Date'], data['Close']))
is_extreme = toolFuncs.extreme_point(data['Close'], K, recognition_method='height')
output = [pairs[i] for i... | 32.5 | 98 | 0.529915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 188 | 0.321368 |
efd40da6f7f764459934c721ccc5ec880311c2e3 | 607 | py | Python | FaceClassify/losses/TripletMarginLoss.py | CharlesPikachu/CharlesFace | 90bfe38c58068228d0069dce43b55b2570acaa16 | [
"MIT"
] | 13 | 2018-05-23T07:07:28.000Z | 2021-05-28T07:37:30.000Z | FaceClassify/losses/TripletMarginLoss.py | CharlesPikachu/CharlesFace | 90bfe38c58068228d0069dce43b55b2570acaa16 | [
"MIT"
] | null | null | null | FaceClassify/losses/TripletMarginLoss.py | CharlesPikachu/CharlesFace | 90bfe38c58068228d0069dce43b55b2570acaa16 | [
"MIT"
] | null | null | null | # Author:
# Charles
# Function:
# Triplet loss function.
import torch
from torch.autograd import Function
import sys
sys.path.append('../')
from utils.utils import *
class TripletMarginLoss(Function):
def __init__(self, margin):
super(TripletMarginLoss, self).__init__()
self.margin = margin
# norm 2
self.p... | 26.391304 | 66 | 0.744646 | 437 | 0.719934 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.112026 |
efd461c9230c324e2c8e6e92be4631dc26caa578 | 768 | py | Python | DailyProgrammer/20120316A.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | 2 | 2020-12-23T18:59:22.000Z | 2021-04-14T13:16:09.000Z | DailyProgrammer/20120316A.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | DailyProgrammer/20120316A.py | DayGitH/Python-Challenges | bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf | [
"MIT"
] | null | null | null | """
you have a string "ddaaiillyypprrooggrraammeerr". We want to remove all the consecutive duplicates and put them in a
separate string, which yields two separate instances of the string "dailyprogramer".
use this list for testing:
input: "balloons"
expected output: "balons" "lo"
input: "ddaaiillyypprrooggrraammeerr"... | 25.6 | 116 | 0.69401 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 566 | 0.736979 |
efd60ec0f5dfed774930cf3e30f7572bed405c2b | 6,485 | py | Python | src/preppipe/enginesupport/enginesupport.py | PrepPipe/preppipe-python | 6fc547a539737ec37a7528eb97ce92e56d4f404a | [
"Apache-2.0"
] | 1 | 2022-02-28T03:34:57.000Z | 2022-02-28T03:34:57.000Z | src/preppipe/enginesupport/enginesupport.py | PrepPipe/preppipe-python | 6fc547a539737ec37a7528eb97ce92e56d4f404a | [
"Apache-2.0"
] | null | null | null | src/preppipe/enginesupport/enginesupport.py | PrepPipe/preppipe-python | 6fc547a539737ec37a7528eb97ce92e56d4f404a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import typing
import PIL.Image
from enum import Enum
import re
import preppipe.commontypes
from preppipe.vnmodel import *
class EngineSupport:
"""All engine support classes inherit this class, so that we can use reflection to query all supported engines"""
pass
# we define a... | 32.918782 | 143 | 0.665998 | 2,062 | 0.317965 | 0 | 0 | 0 | 0 | 0 | 0 | 1,611 | 0.248419 |
efd85393ed4e8b07da224123311c11a7291f7173 | 190 | py | Python | openprocurement/tender/limited/__init__.py | Leits/openprocurement.tender.limited | c216e5b96dc850036d94fdf21883845afee34252 | [
"Apache-2.0"
] | null | null | null | openprocurement/tender/limited/__init__.py | Leits/openprocurement.tender.limited | c216e5b96dc850036d94fdf21883845afee34252 | [
"Apache-2.0"
] | 2 | 2021-03-26T00:30:52.000Z | 2022-03-21T22:22:09.000Z | openprocurement/tender/limited/__init__.py | Leits/openprocurement.tender.limited | c216e5b96dc850036d94fdf21883845afee34252 | [
"Apache-2.0"
] | null | null | null | from openprocurement.tender.limited.models import Tender
def includeme(config):
config.add_tender_procurementMethodType(Tender)
config.scan("openprocurement.tender.limited.views")
| 27.142857 | 56 | 0.815789 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.2 |
efd8cec6101a750931dee27419124950274496b7 | 3,422 | py | Python | upload.py | woodlords/nftmaker-pro-scripts | 86e1eef0d297bf9589d56272b1edea9bb3e18612 | [
"Apache-2.0"
] | 2 | 2022-02-09T17:48:33.000Z | 2022-02-12T08:18:42.000Z | upload.py | woodlords/nftmaker-pro-scripts | 86e1eef0d297bf9589d56272b1edea9bb3e18612 | [
"Apache-2.0"
] | null | null | null | upload.py | woodlords/nftmaker-pro-scripts | 86e1eef0d297bf9589d56272b1edea9bb3e18612 | [
"Apache-2.0"
] | null | null | null | from pprint import pprint
import requests
import base64
import json
import argparse
import sys
p = argparse.ArgumentParser(description="New")
p.add_argument('-f','--folder-name', required=True, help='Folder name of the images/metadata files')
p.add_argument('-s','--start', required=False, help='Start ID to upload')
p... | 30.553571 | 136 | 0.648159 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 982 | 0.286967 |
efdbc298676774176ab064bb9bca24e8e6416478 | 1,613 | py | Python | runner/runner.py | lorne-luo/quicksilver | 79f2b66de9ab7aa63a35f56cac800b64c202f70c | [
"MIT"
] | null | null | null | runner/runner.py | lorne-luo/quicksilver | 79f2b66de9ab7aa63a35f56cac800b64c202f70c | [
"MIT"
] | null | null | null | runner/runner.py | lorne-luo/quicksilver | 79f2b66de9ab7aa63a35f56cac800b64c202f70c | [
"MIT"
] | null | null | null | import logging
from queue import Queue
from redis_queue.queue import RedisQueue
from runner.base import BaseRunner
logger = logging.getLogger(__name__)
class MemoryQueueRunner(BaseRunner):
"""Memory queue runner"""
def create_queue(self, queue_name):
return Queue(maxsize=2000)
class ReisQueueRunn... | 25.603175 | 97 | 0.650341 | 1,225 | 0.759454 | 0 | 0 | 0 | 0 | 0 | 0 | 222 | 0.137632 |
efdeda6cab101f5fe55ec27079a0f853fcc20c7e | 6,790 | py | Python | ultron/sentry/Analysis/TechnicalAnalysis/__init__.py | wangjiehui11235/ultron | ade46fdcff7eaf01187cdf9b9fb1d6a04ae972b7 | [
"Apache-2.0"
] | 4 | 2019-06-06T09:38:49.000Z | 2022-01-29T00:02:11.000Z | ultron/sentry/Analysis/TechnicalAnalysis/__init__.py | wangjiehui11235/ultron | ade46fdcff7eaf01187cdf9b9fb1d6a04ae972b7 | [
"Apache-2.0"
] | 1 | 2022-02-11T03:43:10.000Z | 2022-02-11T03:43:10.000Z | ultron/sentry/Analysis/TechnicalAnalysis/__init__.py | wangjiehui11235/ultron | ade46fdcff7eaf01187cdf9b9fb1d6a04ae972b7 | [
"Apache-2.0"
] | 8 | 2019-06-02T13:11:00.000Z | 2021-11-11T01:06:22.000Z | # -*- coding: utf-8 -*-
from ultron.sentry.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import SecuritySignValueHolder
from ultron.sentry.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import SecurityAverageValueHolder
from ultron.sentry.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import S... | 70 | 119 | 0.841679 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,224 | 0.180265 |
efdf05259aeb476a54f281ec506c8577fe42f662 | 17,015 | py | Python | app/common/helper.py | lguobin/KB_API | f7180cf430cb8de2eac8fa78e3937666da950c7a | [
"Apache-2.0"
] | null | null | null | app/common/helper.py | lguobin/KB_API | f7180cf430cb8de2eac8fa78e3937666da950c7a | [
"Apache-2.0"
] | null | null | null | app/common/helper.py | lguobin/KB_API | f7180cf430cb8de2eac8fa78e3937666da950c7a | [
"Apache-2.0"
] | null | null | null | # from app.common.utils import *
from sqlalchemy import desc
from settings import Config
from app.models import *
from app.extensions import db
from app.models.base import _BaseModel
from app.common.message import DBError
# 获取分页数据
def Pages(_request, _TABLE, _filter=None):
page = get_page_value(_request)
per... | 33.759921 | 132 | 0.53253 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,274 | 0.132202 |
efe02360bc1283274b4bc2434f2af992e192e9a4 | 7,403 | py | Python | package/tests/test_cp/test_azure/test_domain/test_services/test_vm_credentials_service.py | tim-spiglanin/Azure-Shell | 58c52994f0d6cfd798c5dca33737419ec18363d4 | [
"Apache-2.0"
] | 5 | 2016-09-08T08:33:47.000Z | 2020-02-10T12:31:15.000Z | package/tests/test_cp/test_azure/test_domain/test_services/test_vm_credentials_service.py | tim-spiglanin/Azure-Shell | 58c52994f0d6cfd798c5dca33737419ec18363d4 | [
"Apache-2.0"
] | 505 | 2016-08-09T07:41:03.000Z | 2021-02-08T20:26:46.000Z | package/tests/test_cp/test_azure/test_domain/test_services/test_vm_credentials_service.py | tim-spiglanin/Azure-Shell | 58c52994f0d6cfd798c5dca33737419ec18363d4 | [
"Apache-2.0"
] | 5 | 2016-12-21T12:52:55.000Z | 2021-07-08T09:50:42.000Z | from unittest import TestCase
import mock
from cloudshell.cp.azure.domain.services.vm_credentials_service import VMCredentialsService
from cloudshell.cp.azure.models.vm_credentials import VMCredentials
class TestVMCredentialsService(TestCase):
def setUp(self):
self.test_username = "test_username"
... | 51.409722 | 120 | 0.685533 | 7,196 | 0.972038 | 0 | 0 | 3,528 | 0.476564 | 0 | 0 | 1,299 | 0.175469 |
efe17a7b9267d6d10ac42dd61070b721d1c277ec | 751 | py | Python | src/handler/quit.py | junhg0211/Kreylin | aae5e1e5ba5cfaadfab6708cb0bf26a75c6dcb7a | [
"Apache-2.0"
] | 1 | 2019-09-11T12:02:53.000Z | 2019-09-11T12:02:53.000Z | src/handler/quit.py | junhg0211/Kreylin | aae5e1e5ba5cfaadfab6708cb0bf26a75c6dcb7a | [
"Apache-2.0"
] | 8 | 2019-09-11T12:06:54.000Z | 2020-02-09T04:42:13.000Z | src/handler/quit.py | junhg0211/Kreylin | aae5e1e5ba5cfaadfab6708cb0bf26a75c6dcb7a | [
"Apache-2.0"
] | 1 | 2021-05-24T12:43:07.000Z | 2021-05-24T12:43:07.000Z | from sys import platform
import pygame
from handler.handler import Handler
class Quit(Handler):
def __init__(self, keyboard_manager, shutdown):
self.keyboard_manager = keyboard_manager
self.shutdown = shutdown
def tick(self):
if self.keyboard_manager.is_start(pygame.K_F4):
... | 34.136364 | 120 | 0.663116 | 671 | 0.893475 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.019973 |
efe1e27548d4a791c0325857f9e7735c777989c1 | 2,635 | py | Python | decisive/__init__.py | decisive/api-demo-python | 58cd14e9e1f6373a3cd927536fd29f5f286940a0 | [
"MIT"
] | null | null | null | decisive/__init__.py | decisive/api-demo-python | 58cd14e9e1f6373a3cd927536fd29f5f286940a0 | [
"MIT"
] | null | null | null | decisive/__init__.py | decisive/api-demo-python | 58cd14e9e1f6373a3cd927536fd29f5f286940a0 | [
"MIT"
] | null | null | null | import requests
import requests.exceptions
import datetime
import ujson as json
import logging
class DecisiveApiClient(object):
HOST = 'https://ads.decisive.is'.strip('/')
def __init__(self, api_key, host=None):
self.session = requests.Session()
self.session.auth = (api_key,'')
s... | 38.188406 | 88 | 0.603036 | 2,535 | 0.962049 | 301 | 0.114231 | 0 | 0 | 0 | 0 | 270 | 0.102467 |
efe41b6dc8f659359b1e12cb86ef509b2e8e51a8 | 38,284 | py | Python | app/main/views/service_settings.py | karlchillmaid/notifications-admin | 9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880 | [
"MIT"
] | null | null | null | app/main/views/service_settings.py | karlchillmaid/notifications-admin | 9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880 | [
"MIT"
] | null | null | null | app/main/views/service_settings.py | karlchillmaid/notifications-admin | 9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880 | [
"MIT"
] | null | null | null | from flask import (
abort,
current_app,
flash,
redirect,
render_template,
request,
session,
url_for,
)
from flask_login import current_user, login_required
from notifications_python_client.errors import HTTPError
from notifications_utils.field import Field
from notifications_utils.format... | 37.132881 | 119 | 0.709252 | 0 | 0 | 0 | 0 | 35,426 | 0.925154 | 0 | 0 | 9,391 | 0.245247 |
efe457cbb3f9ed9d770c24aeb1ca7014a5e1296d | 3,094 | py | Python | doctools/spelling.py | Sketch98/oil | 2d5c51432b9699e48178236da2e5b3bf1a33d79f | [
"Apache-2.0"
] | null | null | null | doctools/spelling.py | Sketch98/oil | 2d5c51432b9699e48178236da2e5b3bf1a33d79f | [
"Apache-2.0"
] | null | null | null | doctools/spelling.py | Sketch98/oil | 2d5c51432b9699e48178236da2e5b3bf1a33d79f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
"""
spelling.py
Filter the output of 'lynx -dump' into a list of words to spell check.
"""
from __future__ import print_function
from collections import Counter
import optparse
import re
import sys
def log(msg, *args):
if args:
msg = msg % args
print(msg, file=sys.stderr)
def SplitW... | 21.636364 | 80 | 0.591791 | 0 | 0 | 493 | 0.159341 | 0 | 0 | 0 | 0 | 1,075 | 0.347447 |
efe4b76066b7fc615a3d5cb419d39e72b57d7593 | 20,659 | py | Python | train_deep_ls.py | Kamysek/DeepLocalShapes | 24ee92889381d40acbb5ad1c7c8abb512a8c26b5 | [
"MIT"
] | 4 | 2021-09-23T11:36:30.000Z | 2022-02-23T20:10:46.000Z | train_deep_ls.py | Kamysek/DeepLocalShapes | 24ee92889381d40acbb5ad1c7c8abb512a8c26b5 | [
"MIT"
] | null | null | null | train_deep_ls.py | Kamysek/DeepLocalShapes | 24ee92889381d40acbb5ad1c7c8abb512a8c26b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Based on: https://github.com/facebookresearch/DeepSDF using MIT LICENSE (https://github.com/facebookresearch/DeepSDF/blob/master/LICENSE)
# Copyright 2021-present Philipp Friedrich, Josef Kamysek. All Rights Reserved.
import functools
import json
import logging
import math
import os
import sig... | 32.330203 | 182 | 0.628588 | 965 | 0.046711 | 0 | 0 | 0 | 0 | 0 | 0 | 3,873 | 0.187473 |
efe7d81ac7833b8ba25967361da1b664addd861c | 498 | py | Python | setup.py | nicosandller/python-ethereumrpc | e826f99bbb34dc3d8009ac9392677e9ae2c9fa36 | [
"MIT"
] | 1 | 2019-03-28T19:16:21.000Z | 2019-03-28T19:16:21.000Z | setup.py | nicosandller/python-ethereumrpc | e826f99bbb34dc3d8009ac9392677e9ae2c9fa36 | [
"MIT"
] | null | null | null | setup.py | nicosandller/python-ethereumrpc | e826f99bbb34dc3d8009ac9392677e9ae2c9fa36 | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name = 'python-ethereumrpc',
packages = ['python-ethereumrpc'],
version = '0.1',
description = 'A python interface for ethereum JSON-RPC service.',
author = 'Nicolas Sandller',
author_email = '[email protected]',
url = 'https://github.com/nicosandller/python-et... | 35.571429 | 82 | 0.696787 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 290 | 0.582329 |
efe8537711357e13e0aa907bd882c404ad86cc4e | 988 | py | Python | interface.py | robotafm/motor | 1c0838db12514304b930aec976d7adcbc51b7c92 | [
"MIT"
] | null | null | null | interface.py | robotafm/motor | 1c0838db12514304b930aec976d7adcbc51b7c92 | [
"MIT"
] | null | null | null | interface.py | robotafm/motor | 1c0838db12514304b930aec976d7adcbc51b7c92 | [
"MIT"
] | null | null | null | # /robotafm/motor/interface.py
# Main web interface, contains basic
# information display
# imports:
import xml.dom.minidom
from flask import Flask, render_template
# constants:
LANG = "./lang/rus.xml"
# XML: load text strings from language file
dom = xml.dom.minidom.parse(LANG)
main_title = dom.getElem... | 29.058824 | 87 | 0.709514 | 0 | 0 | 0 | 0 | 227 | 0.229757 | 0 | 0 | 281 | 0.284413 |
efe95ae7664ab58458aa225b5cb6251325f40d6d | 317 | py | Python | src/eval_codalab_offline.py | bjj9/EVE_SCPT | c91b13f8bbfe8ea29a0e9f1df0dc016a258c904f | [
"MIT"
] | 21 | 2021-06-20T02:35:08.000Z | 2022-03-16T06:57:03.000Z | src/eval_codalab_offline.py | bjj9/EVE_SCPT | c91b13f8bbfe8ea29a0e9f1df0dc016a258c904f | [
"MIT"
] | 2 | 2021-06-20T15:43:28.000Z | 2021-08-02T08:37:02.000Z | src/eval_codalab_offline.py | bjj9/EVE_SCPT | c91b13f8bbfe8ea29a0e9f1df0dc016a258c904f | [
"MIT"
] | 1 | 2021-07-19T11:07:13.000Z | 2021-07-19T11:07:13.000Z | from eval_codalab_basic import eval_codalab_basic
if __name__ == '__main__':
# 1. run first round to prepare full memory
eval_codalab_basic(output_suffix='online', skip_first_round_if_memory_is_ready=True)
# 2. do offline evaluation when memory is ready
eval_codalab_basic(output_suffix='offline')
| 31.7 | 88 | 0.782334 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 117 | 0.369085 |
efed594b93f7036fd9e0fbb23d74fff628cd47d4 | 922 | py | Python | CountingValleys/ValleyCounter.py | monemonesi/TDD_Katas_Python | f21a4f3516b75d7618dcd044453e25be015b4251 | [
"MIT"
] | null | null | null | CountingValleys/ValleyCounter.py | monemonesi/TDD_Katas_Python | f21a4f3516b75d7618dcd044453e25be015b4251 | [
"MIT"
] | null | null | null | CountingValleys/ValleyCounter.py | monemonesi/TDD_Katas_Python | f21a4f3516b75d7618dcd044453e25be015b4251 | [
"MIT"
] | null | null | null | UP = "U"
DOWN = "D"
ALLOWED_PATH_I = [UP, DOWN]
def update_high_for_step(high: int, step: str) -> int:
"""Update the current high given a step"""
if step == UP:
high += 1
elif step == DOWN:
high -= 1
return high
def update_valley_count(valleys_count: int, high: int, pre... | 27.117647 | 83 | 0.611714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.173536 |
efee0f491f5feefbc9f83692582c209722451e90 | 84 | py | Python | examples/coordinates3.py | r0the/gpanel | 34cb31ef5abf08b139330fce6b301d920b22cea4 | [
"MIT"
] | 1 | 2021-03-22T06:31:38.000Z | 2021-03-22T06:31:38.000Z | examples/coordinates3.py | r0the/gpanel | 34cb31ef5abf08b139330fce6b301d920b22cea4 | [
"MIT"
] | 8 | 2021-03-10T09:50:04.000Z | 2021-03-22T06:33:18.000Z | examples/coordinates3.py | r0the/gpanel | 34cb31ef5abf08b139330fce6b301d920b22cea4 | [
"MIT"
] | null | null | null | from gpanel import *
coordinates(-3, -3, 11, 11)
line(0, 0, 8, 8)
line(8, 0, 0, 8)
| 14 | 27 | 0.583333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
efee15be03037d97374bea9c4059f5490403f268 | 682 | py | Python | Tree/Leetcode 226. Invert Binary Tree.py | kaizhengny/LeetCode | 67d64536ab80f4966699fe7460d165f2a98d6a82 | [
"MIT"
] | 31 | 2020-06-23T00:40:04.000Z | 2022-01-08T11:06:24.000Z | Tree/Leetcode 226. Invert Binary Tree.py | kaizhengny/LeetCode | 67d64536ab80f4966699fe7460d165f2a98d6a82 | [
"MIT"
] | null | null | null | Tree/Leetcode 226. Invert Binary Tree.py | kaizhengny/LeetCode | 67d64536ab80f4966699fe7460d165f2a98d6a82 | [
"MIT"
] | 7 | 2020-04-30T08:46:03.000Z | 2021-08-28T16:25:54.000Z | class Solution:
def invertTree(self, root: TreeNode) -> TreeNode:
if not root: return root
root.left, root.right = root.right, root.left
self.invertTree(root.left)
self.invertTree(root.right)
return root
class Solution:
def invertTree(self, root: TreeNode) -> TreeNode:
... | 29.652174 | 56 | 0.541056 | 680 | 0.997067 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
efee470e855ae2a217e0a35720dd990d8a0f3c8b | 333 | py | Python | Ex044.py | JeanPauloGarcia/Python-Exercicios | faff4670806c423680ee00a88d3c4c49b437e72e | [
"MIT"
] | null | null | null | Ex044.py | JeanPauloGarcia/Python-Exercicios | faff4670806c423680ee00a88d3c4c49b437e72e | [
"MIT"
] | null | null | null | Ex044.py | JeanPauloGarcia/Python-Exercicios | faff4670806c423680ee00a88d3c4c49b437e72e | [
"MIT"
] | null | null | null | preço = float(input('Preço: '))
print('''Preencha a forma de pagamento com:
1 - p/ À VISTA
2 - p/ CARTÃO 1x
3 - p/ CARTÃO 2x
4 - p/ CARTÃO 3x ou mais
''')
pagto = str(input('Pagamento: ')).strip()
if pagto == '1':
preço = preço*0.9
elif pagto == '2':
preço = preço*0.95
elif pagto == '4':
preço = preço*1.2
p... | 19.588235 | 43 | 0.597598 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0.436416 |
eff27556e4f9b47dbc9ed41d42898d35ce432f5c | 1,264 | py | Python | scorebee/main.py | mikeboers/ScoreBee | e8c3476b6401808a61b495b9c42e8cbe752906b4 | [
"BSD-3-Clause"
] | null | null | null | scorebee/main.py | mikeboers/ScoreBee | e8c3476b6401808a61b495b9c42e8cbe752906b4 | [
"BSD-3-Clause"
] | null | null | null | scorebee/main.py | mikeboers/ScoreBee | e8c3476b6401808a61b495b9c42e8cbe752906b4 | [
"BSD-3-Clause"
] | null | null | null |
import logging
import sys
from .application import Application
from .document import Document, Track, Event
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
app = Application(sys.argv)
if '--debug' in sys.argv:
# # Load a document.
# # We absolutely MUST have ... | 28.088889 | 84 | 0.511076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 538 | 0.425633 |
eff28154f7d481027598302c0ee3f1c65be8e270 | 45,609 | py | Python | ceci/stage.py | eacharles/ceci | e52e956c9e373c9a632ad0c312770f32ceab0c8b | [
"BSD-3-Clause"
] | null | null | null | ceci/stage.py | eacharles/ceci | e52e956c9e373c9a632ad0c312770f32ceab0c8b | [
"BSD-3-Clause"
] | 1 | 2022-01-05T22:04:57.000Z | 2022-01-05T22:04:57.000Z | ceci/stage.py | eacharles/ceci | e52e956c9e373c9a632ad0c312770f32ceab0c8b | [
"BSD-3-Clause"
] | null | null | null | """Module with core functionality for a single pipeline stage """
import pathlib
import os
import sys
from textwrap import dedent
import shutil
import cProfile
from abc import abstractmethod
from . import errors
from .monitor import MemoryMonitor
from .config import StageConfig, cast_to_streamable
SERIAL = "serial"
... | 35.912598 | 118 | 0.568967 | 45,206 | 0.991164 | 4,335 | 0.095047 | 16,911 | 0.370782 | 0 | 0 | 22,892 | 0.501918 |
eff725f55234c2a2a095069fa9d26ab47ed278d3 | 8,400 | py | Python | TrinaPointAndClick/src/TrinaPointAndClick/scripts/Marker_List_Node.py | mjclements/TRINA-WPI-2.0 | aa060819522ed9010d20e9db0cf45b19f6b083af | [
"MIT"
] | null | null | null | TrinaPointAndClick/src/TrinaPointAndClick/scripts/Marker_List_Node.py | mjclements/TRINA-WPI-2.0 | aa060819522ed9010d20e9db0cf45b19f6b083af | [
"MIT"
] | null | null | null | TrinaPointAndClick/src/TrinaPointAndClick/scripts/Marker_List_Node.py | mjclements/TRINA-WPI-2.0 | aa060819522ed9010d20e9db0cf45b19f6b083af | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import numpy as np
import math
from geometry_msgs.msg import PoseStamped, Transform
from TrinaPointAndClick.msg import Marker, MarkerArray
class Marker_Node():
"""
This node listens to marker tracker data and keeps track of the pose of all markers seen during run-time. This n... | 38.181818 | 202 | 0.616548 | 7,822 | 0.93119 | 0 | 0 | 0 | 0 | 0 | 0 | 3,671 | 0.437024 |
eff99e10986bd9b8e0f53017db77d82913562ddf | 1,102 | py | Python | topology.py | Patatone/ryu-static-load-balancing | 7f3508ff8b135736150ad5c38b544d6e6ba90509 | [
"Apache-2.0"
] | null | null | null | topology.py | Patatone/ryu-static-load-balancing | 7f3508ff8b135736150ad5c38b544d6e6ba90509 | [
"Apache-2.0"
] | null | null | null | topology.py | Patatone/ryu-static-load-balancing | 7f3508ff8b135736150ad5c38b544d6e6ba90509 | [
"Apache-2.0"
] | null | null | null | from mininet.topo import Topo
from mininet.link import TCLink
class Topology(Topo):
def build(self):
# Hosts and switches
host1 = self.addHost('H1')
host2 = self.addHost('H2')
host3 = self.addHost('H3')
host4 = self.addHost('H4')
host5 = self.addHost('H5')
... | 39.357143 | 81 | 0.607985 | 989 | 0.897459 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.155172 |
eff9cec3835ce08f6cdd64396a53993ba845ce23 | 5,155 | py | Python | JFJB.py | stevevai/JFJB-crawler | 182c8930e5e979ea9176452764e9494a17574b1f | [
"Apache-2.0"
] | 1 | 2019-04-14T16:28:28.000Z | 2019-04-14T16:28:28.000Z | JFJB.py | stevevai/JFJB-crawler | 182c8930e5e979ea9176452764e9494a17574b1f | [
"Apache-2.0"
] | null | null | null | JFJB.py | stevevai/JFJB-crawler | 182c8930e5e979ea9176452764e9494a17574b1f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 12 23:00:28 2018
@author: wangshuai
"""
import urllib
import urllib.request as urllib2
import http.cookiejar as cookielib
import io
import re
import gzip
from selenium import webdriver
import datetime
def get_Time():
begin = datetime.date(2016,1,1)
end = datetime.d... | 31.625767 | 156 | 0.49098 | 2,610 | 0.496292 | 0 | 0 | 0 | 0 | 0 | 0 | 1,231 | 0.234075 |
effa145f7d27636ce9979e5fe2ebebe04e1345c3 | 392 | py | Python | tensorprob/samplers/base.py | ibab/tensorfit | 53bbb324520f34335a272dc057c3ae6e9d2c575e | [
"MIT"
] | 95 | 2016-02-29T08:25:07.000Z | 2021-06-02T15:33:01.000Z | tensorprob/samplers/base.py | ibab/tensorprob | 79efa5678f984a2bb92573fb25c17b9475baef23 | [
"MIT"
] | 48 | 2016-02-19T00:56:05.000Z | 2016-02-28T23:12:12.000Z | tensorprob/samplers/base.py | ibab/tensorfit | 53bbb324520f34335a272dc057c3ae6e9d2c575e | [
"MIT"
] | 19 | 2016-02-29T00:14:34.000Z | 2020-06-18T06:07:39.000Z | import tensorflow as tf
class BaseSampler(object):
def __init__(self, session=None):
self._session = session or tf.get_default_session()
def sample(self, variables, cost, gradient=None):
raise NotImplementedError
@property
def session(self):
return self._session
@session... | 21.777778 | 59 | 0.67602 | 366 | 0.933673 | 0 | 0 | 140 | 0.357143 | 0 | 0 | 0 | 0 |
effaf46adea62c6d7c4589ee3471fc9f1f1bc8dc | 3,327 | py | Python | scripts/ocgis_subset.py | Zeitsperre/flyingpigeon | 678370bf428af7ffe11ee79be3b8a89c73215e5e | [
"Apache-2.0"
] | 1 | 2016-12-04T18:01:49.000Z | 2016-12-04T18:01:49.000Z | scripts/ocgis_subset.py | Zeitsperre/flyingpigeon | 678370bf428af7ffe11ee79be3b8a89c73215e5e | [
"Apache-2.0"
] | 13 | 2017-03-16T15:44:21.000Z | 2019-08-19T16:56:04.000Z | scripts/ocgis_subset.py | Zeitsperre/flyingpigeon | 678370bf428af7ffe11ee79be3b8a89c73215e5e | [
"Apache-2.0"
] | null | null | null | from os import path, listdir
import ocgis
from flyingpigeon import subset
from flyingpigeon import utils
from flyingpigeon.ocgis_module import call
def get_prediction(gam_model, ncs_indices): # mask=None
"""
predict the probabillity based on the gam_model and the given climate index datasets
:param gam... | 31.386792 | 110 | 0.644725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,479 | 0.444545 |
effb3d0f203ab8c4e4ea27554b71aa4fcc456877 | 746 | py | Python | jacc/migrations/0019_entrytype_identifier.py | bachvtuan/django-jacc | 37cdd54d8602d25e43a433bd66ccbed61f45a112 | [
"MIT"
] | 10 | 2019-02-25T23:30:33.000Z | 2021-05-02T18:02:48.000Z | jacc/migrations/0019_entrytype_identifier.py | bachvtuan/django-jacc | 37cdd54d8602d25e43a433bd66ccbed61f45a112 | [
"MIT"
] | null | null | null | jacc/migrations/0019_entrytype_identifier.py | bachvtuan/django-jacc | 37cdd54d8602d25e43a433bd66ccbed61f45a112 | [
"MIT"
] | 4 | 2019-09-09T09:33:55.000Z | 2022-01-01T09:28:13.000Z | # Generated by Django 2.1.2 on 2018-10-18 15:36
from django.db import migrations, models
from django.db.models import F
def migr_code_to_identifier_0019_entrytype_identifier(apps, schema):
EntryType = apps.get_model("jacc", "EntryType")
EntryType.objects.all().update(identifier=F("code"))
class Migration(m... | 28.692308 | 116 | 0.687668 | 442 | 0.592493 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.184987 |
effc0cb6fddb743089c7bdb462500e13e334b104 | 342 | py | Python | tests/test_invalid_login.py | joshmgrant/Python-Pytest-Nerodia | 55e8d92cd21e3093e6eb434e4ab7b126c974c6f0 | [
"MIT"
] | 1 | 2019-03-19T08:29:02.000Z | 2019-03-19T08:29:02.000Z | tests/test_invalid_login.py | joshmgrant/Python-Pytest-Nerodia | 55e8d92cd21e3093e6eb434e4ab7b126c974c6f0 | [
"MIT"
] | null | null | null | tests/test_invalid_login.py | joshmgrant/Python-Pytest-Nerodia | 55e8d92cd21e3093e6eb434e4ab7b126c974c6f0 | [
"MIT"
] | null | null | null | import pytest
def test_locked_out_user(browser):
browser.goto('http://www.saucedemo.com')
browser.text_field(data_test='username').value = 'locked_out_user'
browser.text_field(data_test='password').value ='secret_sauce'
browser.button(type='submit').click()
assert browser.button(class_name='erro... | 28.5 | 70 | 0.733918 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.289474 |
effc7b61a293ddc828780cd36ebddcbb6d17256b | 403 | py | Python | splicemachine/mlflow_support/flavors/mlflow_onnx.py | myles-novick/pysplice | 96a848d4adda0a937002798865d32939f059f4d1 | [
"Apache-2.0"
] | null | null | null | splicemachine/mlflow_support/flavors/mlflow_onnx.py | myles-novick/pysplice | 96a848d4adda0a937002798865d32939f059f4d1 | [
"Apache-2.0"
] | null | null | null | splicemachine/mlflow_support/flavors/mlflow_onnx.py | myles-novick/pysplice | 96a848d4adda0a937002798865d32939f059f4d1 | [
"Apache-2.0"
] | null | null | null | from splicemachine.mlflow_support import *
from splicemachine.mlflow_support.mlflow_support import _GORILLA_SETTINGS
import gorilla
import mlflow.onnx
def _log_model(model, name='onnx_model', **flavor_options):
mlflow.log_model(model, name=name, model_lib='onnx', **flavor_options)
gorilla.apply(gorilla.Patch(mlfl... | 40.3 | 114 | 0.816377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.052109 |
effc868ba3985263b54f27c9ba1dafa032b3a960 | 351 | py | Python | services/shortto.py | joshthecoder/shorty-python | 35687d010683944d75e3f0dce7799903296172c5 | [
"MIT"
] | 11 | 2015-05-29T04:58:28.000Z | 2020-05-31T17:07:52.000Z | services/shortto.py | joshthecoder/shorty-python | 35687d010683944d75e3f0dce7799903296172c5 | [
"MIT"
] | null | null | null | services/shortto.py | joshthecoder/shorty-python | 35687d010683944d75e3f0dce7799903296172c5 | [
"MIT"
] | 2 | 2015-03-10T06:22:31.000Z | 2018-06-18T18:20:59.000Z | ## Shorty
## Copyright 2009 Joshua Roesslein
## See LICENSE
## @url short.to
class Shortto(Service):
def shrink(self, bigurl):
resp = request('http://short.to/s.txt', {'url': bigurl})
return resp.read()
def expand(self, tinyurl):
resp = request('http://long.to/do.txt', {'url': tinyurl... | 21.9375 | 65 | 0.60114 | 271 | 0.77208 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.367521 |
effded4514a6e107993718820a8e681baef231bd | 4,743 | py | Python | spinup/examples/pg_math/1_simple_pg.py | MengTianjian/spinningup-pytorch | 6b9b87ed7a8140a52f3c86cc88f61428a9fd1176 | [
"MIT"
] | 1 | 2019-04-23T04:32:35.000Z | 2019-04-23T04:32:35.000Z | spinup/examples/pg_math/1_simple_pg.py | MengTianjian/spinningup-pytorch | 6b9b87ed7a8140a52f3c86cc88f61428a9fd1176 | [
"MIT"
] | null | null | null | spinup/examples/pg_math/1_simple_pg.py | MengTianjian/spinningup-pytorch | 6b9b87ed7a8140a52f3c86cc88f61428a9fd1176 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Categorical
import numpy as np
import gym
from gym.spaces import Discrete, Box
class MLP(nn.Module):
def __init__(self, obs_dim, sizes, activation=nn.Tanh, output_activation=None):
super(MLP, self).__init__()... | 37.346457 | 83 | 0.609741 | 646 | 0.136201 | 0 | 0 | 0 | 0 | 0 | 0 | 1,231 | 0.25954 |
560191c793a93a302d95f1bc0f3bed7552833bd0 | 2,334 | py | Python | examples/protobuf/protobuftools.py | sunjinopensource/asynmsg | 9c1d14f859cc6702446c3bb30b9916280429bd1d | [
"MIT"
] | 3 | 2015-05-10T16:10:35.000Z | 2019-02-08T12:22:27.000Z | examples/protobuf/protobuftools.py | sunjinopensource/asynmsg | 9c1d14f859cc6702446c3bb30b9916280429bd1d | [
"MIT"
] | null | null | null | examples/protobuf/protobuftools.py | sunjinopensource/asynmsg | 9c1d14f859cc6702446c3bb30b9916280429bd1d | [
"MIT"
] | null | null | null | import asynmsg
import struct
import google.protobuf.message
def protobuf_handler_config(msg_id, msg_cls=None):
def wrapper(func):
@asynmsg.message_handler_config(msg_id)
def wrapper2(self, msg_id, msg_data):
if msg_cls is None:
proto_data = msg_data
else:
... | 33.826087 | 115 | 0.602828 | 849 | 0.363753 | 0 | 0 | 735 | 0.31491 | 0 | 0 | 62 | 0.026564 |
56027f5cae2f8100bbcabdb3f59b412acf2181e4 | 6,402 | py | Python | client/python/thegame/entity.py | afq984/thegame | 3769fffa281b7d5e8d1336d57e73c8e8d4d2289a | [
"MIT"
] | 3 | 2017-08-18T00:32:54.000Z | 2017-11-18T02:25:51.000Z | client/python/thegame/entity.py | afq984/thegame | 3769fffa281b7d5e8d1336d57e73c8e8d4d2289a | [
"MIT"
] | 3 | 2017-08-15T09:59:25.000Z | 2018-08-22T17:28:13.000Z | client/python/thegame/entity.py | afq984/thegame | 3769fffa281b7d5e8d1336d57e73c8e8d4d2289a | [
"MIT"
] | 1 | 2018-08-07T12:38:48.000Z | 2018-08-07T12:38:48.000Z | import collections
from thegame.abilities import Ability
Vector = collections.namedtuple('Vector', ('x', 'y'))
Vector.__doc__ = '''
A 2D vector.
Used to represent a point and velocity in thegame
'''
class _EntityAttribute:
def __init__(self, doc=None):
self.__doc__ = doc
def __set_name__(self, kla... | 25.710843 | 76 | 0.592002 | 5,984 | 0.934708 | 0 | 0 | 1,399 | 0.218525 | 0 | 0 | 2,666 | 0.416432 |
4bc69e662f7af10d0c2438ee8ea0f1bb00d372e9 | 3,456 | py | Python | services/web/project/__init__.py | shekharRavi/croationa_topic_api | a68bc69a69c5a6898b74ee0f3adf83b23d29b40b | [
"MIT"
] | null | null | null | services/web/project/__init__.py | shekharRavi/croationa_topic_api | a68bc69a69c5a6898b74ee0f3adf83b23d29b40b | [
"MIT"
] | null | null | null | services/web/project/__init__.py | shekharRavi/croationa_topic_api | a68bc69a69c5a6898b74ee0f3adf83b23d29b40b | [
"MIT"
] | null | null | null | import os
import json
# import wget
from flask import (
Flask,
jsonify,
send_from_directory,
request,
redirect,
url_for
)
from flask_sqlalchemy import SQLAlchemy
import werkzeug
werkzeug.cached_property = werkzeug.utils.cached_property
from werkzeug.utils import secure_filename
from werkzeug.mi... | 35.628866 | 109 | 0.739005 | 895 | 0.25897 | 0 | 0 | 1,227 | 0.355035 | 0 | 0 | 1,067 | 0.308738 |
4bc780e7bf91dc67b2e9b3c85f1b9477066d6c29 | 87 | py | Python | opensanctions/helpers/gender.py | fastbone/opensanctions | dea7f7d073083eece26241bcade697a2b959a09e | [
"MIT"
] | null | null | null | opensanctions/helpers/gender.py | fastbone/opensanctions | dea7f7d073083eece26241bcade697a2b959a09e | [
"MIT"
] | null | null | null | opensanctions/helpers/gender.py | fastbone/opensanctions | dea7f7d073083eece26241bcade697a2b959a09e | [
"MIT"
] | null | null | null | # Welcome to the wonderful world of police databases:
MALE = "male"
FEMALE = "female"
| 17.4 | 53 | 0.724138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.770115 |
4bc81ada6770b9d230169abfe03aa04a2271356b | 472 | py | Python | backups_operator/servers/views.py | jetchirag/backops | 777e8d3b3b89afdc0482f71f1ecc499036c62968 | [
"MIT"
] | null | null | null | backups_operator/servers/views.py | jetchirag/backops | 777e8d3b3b89afdc0482f71f1ecc499036c62968 | [
"MIT"
] | null | null | null | backups_operator/servers/views.py | jetchirag/backops | 777e8d3b3b89afdc0482f71f1ecc499036c62968 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from backups_operator.servers.models import Server
# Create your views here.
def home(request):
servers = Server.objects.all()
data = {
'servers': servers
}
return render(request, 'sources/home.html', data)
def test(req... | 21.454545 | 53 | 0.711864 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.150424 |
4bc9a28e7931530bacfb9f635e9e8859c38140a3 | 1,460 | py | Python | scripts/inspect_docker.py | lijing1996/DockerMonitor | b1105e120d9079a0d24a90ef401221dfceeed7b6 | [
"Apache-2.0"
] | 1 | 2021-04-12T09:35:08.000Z | 2021-04-12T09:35:08.000Z | scripts/inspect_docker.py | lijing1996/DockerMonitor | b1105e120d9079a0d24a90ef401221dfceeed7b6 | [
"Apache-2.0"
] | null | null | null | scripts/inspect_docker.py | lijing1996/DockerMonitor | b1105e120d9079a0d24a90ef401221dfceeed7b6 | [
"Apache-2.0"
] | null | null | null | import argparse
import sys
import subprocess
import psutil
def insepect_process(pid):
"""Determine
1. is the process running in the container
2. if it's true, ourput the container id and the user
:return:
"""
assert psutil.pid_exists(pid), "The process doesn't exist"
try:
result = ... | 33.181818 | 113 | 0.678767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 522 | 0.357534 |
4bc9dc6d068e1225034cf817b0d3efa5bdeee220 | 128 | py | Python | Aula10.py | rsmelocunha/Python-projects | 1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093 | [
"MIT"
] | null | null | null | Aula10.py | rsmelocunha/Python-projects | 1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093 | [
"MIT"
] | null | null | null | Aula10.py | rsmelocunha/Python-projects | 1740d1cbafb0aebfffeb0bfdb4ccccf0dbd14093 | [
"MIT"
] | null | null | null | ano = int(input('Digite o ano do seu carro: '))
idadecarro = 2022 - ano
print('Carro novo' if idadecarro <=3 else 'Carro Velho') | 42.666667 | 56 | 0.695313 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.421875 |
4bca99ba9eda853683218d8ee0882faa531e6181 | 3,531 | py | Python | companion_app/live_log_retrieval.py | MorganJamesSmith/uni-project-ideas | 6c48d0edb526908ed95192e97ab47df1257b6036 | [
"BSD-3-Clause"
] | 1 | 2020-09-15T15:33:33.000Z | 2020-09-15T15:33:33.000Z | companion_app/live_log_retrieval.py | MorganJamesSmith/uni-project | 6c48d0edb526908ed95192e97ab47df1257b6036 | [
"BSD-3-Clause"
] | null | null | null | companion_app/live_log_retrieval.py | MorganJamesSmith/uni-project | 6c48d0edb526908ed95192e97ab47df1257b6036 | [
"BSD-3-Clause"
] | null | null | null | """
implements a wrapper for loading live data from the serial connection and passing it to plotting
"""
import serial
import time
import struct
import plotly.express as px
try:
from . import log_parser
except ImportError:
import log_parser
# TODO: clean up CLI code
class LiveLogFile():
def __init__(self, s... | 46.460526 | 118 | 0.664118 | 2,818 | 0.798074 | 0 | 0 | 428 | 0.121212 | 0 | 0 | 745 | 0.210988 |
4bcbbf9c4a02cc75f67572b9d3e876126fc65c10 | 313 | py | Python | bin/bucrm.py | aelzenaar/bucephalus | 49cc084a5444ffbde2f850fc1f7b230d3bb8dfbc | [
"MIT"
] | null | null | null | bin/bucrm.py | aelzenaar/bucephalus | 49cc084a5444ffbde2f850fc1f7b230d3bb8dfbc | [
"MIT"
] | 12 | 2018-11-09T03:00:28.000Z | 2019-01-02T05:39:55.000Z | bin/bucrm.py | aelzenaar/bucephalus | 49cc084a5444ffbde2f850fc1f7b230d3bb8dfbc | [
"MIT"
] | null | null | null | import sys
import dbops
from pathlib import Path
if len(sys.argv) < 2:
print("Bucephalus Remove File Script")
print("Usage: " + sys.argv[0] + " <identifier>")
sys.exit()
sys.argv.pop(0)
ident = sys.argv.pop(0)
if dbops.remove_record_by_id(ident) == None:
print("*** Error: failed to remove record.")
| 18.411765 | 50 | 0.677316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.29393 |
4bcbcc55408d8cf46761e62d961a3d39291ace5d | 440 | py | Python | tests/test_get_current_os_name.py | c-pher/PyWinOS | a16a16a24abaa53a06b9365b2535c8ab31a7fdfb | [
"MIT"
] | 4 | 2020-04-17T15:54:43.000Z | 2020-11-08T06:39:05.000Z | tests/test_get_current_os_name.py | c-pher/PyWinOS | a16a16a24abaa53a06b9365b2535c8ab31a7fdfb | [
"MIT"
] | 65 | 2020-01-05T21:45:17.000Z | 2022-03-31T16:50:20.000Z | tests/test_get_current_os_name.py | c-pher/PyWinOS | a16a16a24abaa53a06b9365b2535c8ab31a7fdfb | [
"MIT"
] | null | null | null | import os
def test_get_current_os_name(client_local):
response = client_local.get_current_os_name_local()
print(response)
print(os.name)
if os.name == 'nt':
assert 'Windows' in response, 'Current OS name is not Windows'
elif os.name == 'Linux':
assert 'Linux' in response, 'Current... | 29.333333 | 70 | 0.661364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.304545 |
4bcc388c3974bdfcd63888beb8ed71bb0fa61380 | 5,133 | py | Python | GUI/GUI_windows/TranslationLanguageWindow.py | Chenger1/stellaris-trpack | 5d85bbbc7374975b5da729899b5691ea77c16ea2 | [
"MIT"
] | 3 | 2020-07-23T00:32:06.000Z | 2020-10-09T18:05:56.000Z | GUI/GUI_windows/TranslationLanguageWindow.py | Chenger1/stellaris-trpack | 5d85bbbc7374975b5da729899b5691ea77c16ea2 | [
"MIT"
] | 105 | 2020-07-16T12:23:57.000Z | 2021-01-18T18:11:40.000Z | GUI/GUI_windows/TranslationLanguageWindow.py | Letiso/Stellaris-True-Machine-Translation-Tool | b80431c1c9b49c2482cb9aefa02eb0de62d7cc56 | [
"MIT"
] | 1 | 2020-07-15T13:30:57.000Z | 2020-07-15T13:30:57.000Z | """
↓ Инициализация данных ↓
"""
from PyQt5 import QtWidgets, QtCore
from GUI.GUI_windows_source import TranslationLanguage
from json import load, dump
from functools import partial
import copy
from scripts.stylesheets import choosen_lang_style, not_chosen_lang_style
class TranslationLa... | 37.742647 | 109 | 0.601403 | 4,966 | 0.938575 | 0 | 0 | 0 | 0 | 0 | 0 | 1,223 | 0.231147 |
4bcc5632c54ea11fd3756fc709d789ae83392c50 | 55 | py | Python | dearpygui_map/__init__.py | mkouhia/dearpygui_map | 8db86e6917b88c118aff94a22e383ef517c40620 | [
"MIT"
] | null | null | null | dearpygui_map/__init__.py | mkouhia/dearpygui_map | 8db86e6917b88c118aff94a22e383ef517c40620 | [
"MIT"
] | 21 | 2022-02-21T08:31:03.000Z | 2022-03-08T19:27:33.000Z | dearpygui_map/__init__.py | mkouhia/dearpygui_map | 8db86e6917b88c118aff94a22e383ef517c40620 | [
"MIT"
] | null | null | null | """Map widget for Dear PyGui"""
__version__ = "0.0.1"
| 13.75 | 31 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.690909 |
4bcdc5c2dfab2675a93de75f43fee73049b1f7fb | 1,347 | py | Python | demosauruswebapp/demosaurus/subject_headings.py | KBNLresearch/Demosaurus | 9235e315d9eef9d8d64f94a90ab4fc8220670ef2 | [
"Apache-2.0"
] | 1 | 2020-06-25T16:39:35.000Z | 2020-06-25T16:39:35.000Z | demosauruswebapp/demosaurus/subject_headings.py | KBNLresearch/Demosaurus | 9235e315d9eef9d8d64f94a90ab4fc8220670ef2 | [
"Apache-2.0"
] | 6 | 2020-03-06T12:31:38.000Z | 2021-09-20T15:08:17.000Z | demosauruswebapp/demosaurus/subject_headings.py | KBNLresearch/Demosaurus | 9235e315d9eef9d8d64f94a90ab4fc8220670ef2 | [
"Apache-2.0"
] | null | null | null | from flask import (
Blueprint, request)#, flash, g, redirect, render_template, get_template_attribute, url_for, jsonify
# )
# from werkzeug.exceptions import abort
import requests
# from demosaurus.db import get_db
# import pandas as pd
# from nltk.metrics import distance
# import re
# import numpy as np
bp = B... | 32.071429 | 104 | 0.697105 | 0 | 0 | 0 | 0 | 938 | 0.696362 | 0 | 0 | 561 | 0.416481 |
4bcf6cd36f0a7b205b865ac0d3e32dffbb450890 | 1,114 | py | Python | Modules/ZoneAnalysis_FULL.py | amaurijp/BioSPA | fd10b58c5a6aa444f34690a98cd939dd5111c4d5 | [
"MIT"
] | 3 | 2019-10-29T17:26:24.000Z | 2021-01-08T22:15:17.000Z | Modules/ZoneAnalysis_FULL.py | amaurijp/BioSPA | fd10b58c5a6aa444f34690a98cd939dd5111c4d5 | [
"MIT"
] | null | null | null | Modules/ZoneAnalysis_FULL.py | amaurijp/BioSPA | fd10b58c5a6aa444f34690a98cd939dd5111c4d5 | [
"MIT"
] | null | null | null |
def ZoneAnalysis_FULL(SettingsDic):
import MODZoneAnalysis
import os
diretorio=os.getcwd()
# Análises das regioes com bacterias
MODZoneAnalysis.DetVolume(diretorio,
importstackRootName=SettingsDic['FolderName'],
FirstStack=... | 37.133333 | 80 | 0.502693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 572 | 0.512545 |
4bcf87fdcdb2f4bd16f622a1e7e79b1aeb825b7c | 3,448 | py | Python | server/Kusa/views.py | meshellchoo/senior-design-project-kusa | 829575259c31a620c895a0f2d5654ea099298eb6 | [
"MIT"
] | 1 | 2022-03-28T23:20:09.000Z | 2022-03-28T23:20:09.000Z | server/Kusa/views.py | meshellchoo/senior-design-project-kusa | 829575259c31a620c895a0f2d5654ea099298eb6 | [
"MIT"
] | null | null | null | server/Kusa/views.py | meshellchoo/senior-design-project-kusa | 829575259c31a620c895a0f2d5654ea099298eb6 | [
"MIT"
] | 2 | 2022-03-24T07:17:27.000Z | 2022-03-28T23:20:18.000Z | from django.http import HttpResponse
from django.http.response import JsonResponse
from django.shortcuts import render
from rest_framework.serializers import Serializer
from admin import settings
import requests
from rest_framework import viewsets
from time import gmtime, strftime
from Kusa.models import SteamUser
from... | 36.680851 | 231 | 0.706787 | 0 | 0 | 0 | 0 | 351 | 0.101798 | 0 | 0 | 758 | 0.219838 |
4bd7a0c2448cc617b69365e5bcaa51dd7caf5ceb | 478 | py | Python | webapp/config.py | sebastien6/simple-project | 2f662c74695a7f566172330dcb7140efd6c71723 | [
"MIT"
] | null | null | null | webapp/config.py | sebastien6/simple-project | 2f662c74695a7f566172330dcb7140efd6c71723 | [
"MIT"
] | null | null | null | webapp/config.py | sebastien6/simple-project | 2f662c74695a7f566172330dcb7140efd6c71723 | [
"MIT"
] | null | null | null | import os
from redis import StrictRedis
class Config(object):
SECRET_KEY = os.environ.get('FLASK_SECRET')
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')
SQLALCHEMY_TRACK_MODIFICATIONS = False
SESSION_TYPE = 'redis'
SESSION_REDIS = StrictRedis(host=os.environ.get('REDIS_HOST'), db=... | 31.866667 | 73 | 0.728033 | 428 | 0.895397 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.123431 |
4bd7fb5f5d36389c2c5a61d083613ef4ed377538 | 15,928 | py | Python | moleculegen/estimation/model.py | sanjaradylov/moleculegen-ml | 4acb77244909cf8cfe4fb75461d4bed9b77f29f1 | [
"BSD-3-Clause"
] | 3 | 2021-11-18T11:41:21.000Z | 2022-02-08T22:01:20.000Z | moleculegen/estimation/model.py | sanjaradylov/moleculegen-ml | 4acb77244909cf8cfe4fb75461d4bed9b77f29f1 | [
"BSD-3-Clause"
] | 20 | 2019-12-12T11:47:32.000Z | 2021-06-02T07:55:18.000Z | moleculegen/estimation/model.py | sanjaradylov/moleculegen-ml | 4acb77244909cf8cfe4fb75461d4bed9b77f29f1 | [
"BSD-3-Clause"
] | 2 | 2019-12-23T08:17:01.000Z | 2022-02-08T22:01:21.000Z | """
Generative language models.
Classes
-------
SMILESEncoderDecoder
A generative recurrent neural network to encode-decode SMILES strings.
SMILESEncoderDecoderFineTuner
The fine-tuner of SMILESEncoderDecoder model.
"""
__all__ = (
'SMILESEncoderDecoder',
'SMILESEncoderDecoderFineTuner',
)
import jso... | 36.28246 | 89 | 0.597878 | 15,387 | 0.966035 | 0 | 0 | 4,083 | 0.256341 | 0 | 0 | 7,411 | 0.465281 |
4bdd1cbdd04848eac2016e69df46179145d19903 | 2,351 | py | Python | projects/radish_paper/run_tpch_radish_sym_gbp.py | bmyerz/log2slqite | edb6bcba061132caa545b5e46c98b86547c68b48 | [
"MIT"
] | null | null | null | projects/radish_paper/run_tpch_radish_sym_gbp.py | bmyerz/log2slqite | edb6bcba061132caa545b5e46c98b86547c68b48 | [
"MIT"
] | 1 | 2015-07-15T00:00:19.000Z | 2015-07-15T00:06:33.000Z | projects/radish_paper/run_tpch_radish_sym_gbp.py | bmyerz/log2slqite | edb6bcba061132caa545b5e46c98b86547c68b48 | [
"MIT"
] | null | null | null | from grappa import GrappaExperiment, MPIRunGrappaExperiment
tpch_bigdatann = MPIRunGrappaExperiment({
'trial': range(1, 3 + 1),
#'qn': [x for x in range(8, 20 + 1) if x!=7 and x!=9 and x!=8 and x!=10 and x!=11], # exclude 7 that runs forever
... | 54.674419 | 146 | 0.35772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 795 | 0.338154 |
4bdf2c801d395b3543ef88d753e14f32dd4a9b4a | 362 | py | Python | Activation Function/Softmax/softmax_cpp/test.py | kaka-lin/ML-Notes | 047b88d59346b2ec719b1b3e2fcd605e1ccfaf91 | [
"MIT"
] | null | null | null | Activation Function/Softmax/softmax_cpp/test.py | kaka-lin/ML-Notes | 047b88d59346b2ec719b1b3e2fcd605e1ccfaf91 | [
"MIT"
] | null | null | null | Activation Function/Softmax/softmax_cpp/test.py | kaka-lin/ML-Notes | 047b88d59346b2ec719b1b3e2fcd605e1ccfaf91 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.special import softmax
np.set_printoptions(precision=6)
def k_softmax(x):
exp = np.exp(x)
return exp / np.sum(exp, axis=1)
if __name__ == "__main__":
x = np.array([[1, 4.2, 0.6, 1.23, 4.3, 1.2, 2.5]])
print("Input Array: ", x)
print("Softmax Array: ", k_softmax(x))... | 21.294118 | 54 | 0.618785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.162983 |
4be3297fddc6fb6fba4bd8355331638ba8b66d70 | 707 | py | Python | models/zeros.py | DawyD/illumination-preserving-rotations | 4fb69dc2526579a7677c27e75eae3a0b0000b5de | [
"MIT"
] | null | null | null | models/zeros.py | DawyD/illumination-preserving-rotations | 4fb69dc2526579a7677c27e75eae3a0b0000b5de | [
"MIT"
] | null | null | null | models/zeros.py | DawyD/illumination-preserving-rotations | 4fb69dc2526579a7677c27e75eae3a0b0000b5de | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.layers import Conv2D, ReLU, SeparableConv2D, Input, SpatialDropout2D, MaxPool2D, Concatenate, Conv2DTranspose, BatchNormalization
from tensorflow.keras.regularizers import l1, l2
from models.net import Net
from layers.kerasGroupNorm import GroupNormalization
class Zeros(Ne... | 35.35 | 151 | 0.721358 | 400 | 0.565771 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.029703 |
4be3c4c8872c7fe3765bcf529106a1cedf839f7c | 7,008 | py | Python | util/post_db.py | ReadMoa/web-service | f47c6cce471d97104074d403ab9ec39a08276213 | [
"MIT"
] | null | null | null | util/post_db.py | ReadMoa/web-service | f47c6cce471d97104074d403ab9ec39a08276213 | [
"MIT"
] | 21 | 2020-08-19T05:05:45.000Z | 2021-02-07T23:21:17.000Z | util/post_db.py | ReadMoa/web-service | f47c6cce471d97104074d403ab9ec39a08276213 | [
"MIT"
] | 1 | 2020-09-05T03:40:45.000Z | 2020-09-05T03:40:45.000Z | """PostDB class definition.
PostDB encapsualte interactions (lookup, scan, insert) with the posts table.
Typical usage example:
from post import Post
from post_db import PostDB
post_db = PostDB(mode = "dev")
post = Post(
post_url = "https://www.example.com/",
title = "Test",
main_image... | 36.884211 | 85 | 0.558219 | 6,398 | 0.912957 | 0 | 0 | 0 | 0 | 0 | 0 | 3,354 | 0.478596 |
4be4aa437d26726d4e8976afdb8dcefd45f45a42 | 9,491 | py | Python | plugins/leading_bot_mention.py | YukiSinonome/guided_bot | 3aff47c4192e9dae4ad4d95c1553a4752ce043cc | [
"MIT"
] | null | null | null | plugins/leading_bot_mention.py | YukiSinonome/guided_bot | 3aff47c4192e9dae4ad4d95c1553a4752ce043cc | [
"MIT"
] | null | null | null | plugins/leading_bot_mention.py | YukiSinonome/guided_bot | 3aff47c4192e9dae4ad4d95c1553a4752ce043cc | [
"MIT"
] | null | null | null | # coding: utf-8
from slackbot.bot import respond_to
from slacker import Slacker
import slackbot_settings
# @respond_to("疲れた")
# @respond_to("つかれた")
# def cheer(message):
# message.reply("ファイト!")
import MeCab
import random
import ChatBotScript
import SentenceGenerator
import datetime
import webbrowser
import time... | 38.425101 | 599 | 0.565272 | 0 | 0 | 0 | 0 | 8,832 | 0.800072 | 0 | 0 | 3,645 | 0.330193 |
4be54c7f61feb9501683fa638bd0374bbe09f529 | 13,922 | py | Python | Lib/pagebot/elements/conditions.py | bghryct/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 68 | 2018-10-22T22:42:58.000Z | 2022-03-19T11:07:31.000Z | Lib/pagebot/elements/conditions.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 97 | 2017-07-10T23:49:30.000Z | 2018-10-03T08:17:55.000Z | Lib/pagebot/elements/conditions.py | TypeNetwork/PageBot | 394150c0fd399f02faec28f4576046882f4d7d39 | [
"MIT"
] | 9 | 2017-07-11T09:59:00.000Z | 2018-09-12T11:59:30.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T
#
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# ... | 35.789203 | 108 | 0.617943 | 13,364 | 0.95992 | 0 | 0 | 0 | 0 | 0 | 0 | 3,548 | 0.254848 |
4be5a05c40ee31ef9f187f13c41d25d878a65ca6 | 7,099 | py | Python | Pix2Pix/Streamlit_Pix2Pix_Main.py | NB094/LHL_Final_Project | 5df15d7bbf33d51840ea274629591cd938f58fce | [
"Apache-2.0"
] | 2 | 2021-10-04T05:53:29.000Z | 2022-01-21T12:53:43.000Z | Pix2Pix/Streamlit_Pix2Pix_Main.py | NB094/LHL_Final_Project | 5df15d7bbf33d51840ea274629591cd938f58fce | [
"Apache-2.0"
] | null | null | null | Pix2Pix/Streamlit_Pix2Pix_Main.py | NB094/LHL_Final_Project | 5df15d7bbf33d51840ea274629591cd938f58fce | [
"Apache-2.0"
] | 1 | 2021-10-04T05:53:32.000Z | 2021-10-04T05:53:32.000Z | from PIL import Image
import streamlit as st
from streamlit_drawable_canvas import st_canvas
from Streamlit_Pix2Pix_Generator import Generator
import numpy as np
import urllib.request
from keras.preprocessing.image import load_img
from keras.models import load_model
import requests
# Page intro
st.title('Pix2Pix – See... | 41.273256 | 190 | 0.720947 | 0 | 0 | 0 | 0 | 1,082 | 0.152373 | 0 | 0 | 4,215 | 0.593578 |
4be8b0689a8d30b24d0eb351d73f642c1be6c5a9 | 4,584 | py | Python | rbs/rbs.py | dexbiobot/SML-Cogs | e8d3d12e5bf1d760196006f86a6c16ed95e3c964 | [
"MIT"
] | 17 | 2017-05-30T13:21:18.000Z | 2022-03-27T13:08:17.000Z | rbs/rbs.py | dexbiobot/SML-Cogs | e8d3d12e5bf1d760196006f86a6c16ed95e3c964 | [
"MIT"
] | 16 | 2017-06-11T12:55:06.000Z | 2019-02-20T21:00:59.000Z | rbs/rbs.py | dexbiobot/SML-Cogs | e8d3d12e5bf1d760196006f86a6c16ed95e3c964 | [
"MIT"
] | 17 | 2017-05-03T16:09:46.000Z | 2020-05-13T21:19:37.000Z | """
The MIT License (MIT)
Copyright (c) 2017 SML
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish,... | 29.960784 | 75 | 0.648778 | 2,770 | 0.603749 | 0 | 0 | 2,149 | 0.468396 | 2,108 | 0.459459 | 2,122 | 0.462511 |
4beabadec3de979135423c3abb7be1e6a84c41ad | 2,845 | py | Python | tests/nutsflow/test_iterfunction.py | maet3608/nuts-flow | 0d7b8eefc80cb45c079b155ff5062d1d93ff2caf | [
"Apache-2.0"
] | 21 | 2017-05-01T10:15:41.000Z | 2022-01-25T07:02:44.000Z | tests/nutsflow/test_iterfunction.py | maet3608/nuts-flow | 0d7b8eefc80cb45c079b155ff5062d1d93ff2caf | [
"Apache-2.0"
] | 7 | 2017-02-09T03:36:37.000Z | 2017-08-22T11:23:03.000Z | tests/nutsflow/test_iterfunction.py | maet3608/nuts-flow | 0d7b8eefc80cb45c079b155ff5062d1d93ff2caf | [
"Apache-2.0"
] | 5 | 2017-05-30T01:56:31.000Z | 2020-10-05T08:21:43.000Z | """
.. module:: test_iterfunction
:synopsis: Unit tests for iterfunction module
"""
import time
import nutsflow.iterfunction as itf
from six.moves import range
def test_length():
assert itf.length(range(10)) == 10
assert itf.length([]) == 0
def test_interleave():
it1 = [1, 2]
it2 = 'abc'
it... | 23.319672 | 63 | 0.555712 | 0 | 0 | 450 | 0.158172 | 0 | 0 | 0 | 0 | 143 | 0.050264 |
4beb4afba8d4e82f6ec0587a4a66ce29bdfa1be9 | 6,591 | py | Python | microcosm_flask/tests/conventions/test_upload.py | Sinon/microcosm-flask | c1404ebc94459c8156b04f5e04490a330117524c | [
"Apache-2.0"
] | 11 | 2017-01-30T21:53:20.000Z | 2020-05-29T22:39:19.000Z | microcosm_flask/tests/conventions/test_upload.py | Sinon/microcosm-flask | c1404ebc94459c8156b04f5e04490a330117524c | [
"Apache-2.0"
] | 139 | 2016-03-09T19:09:59.000Z | 2021-09-03T17:14:00.000Z | microcosm_flask/tests/conventions/test_upload.py | Sinon/microcosm-flask | c1404ebc94459c8156b04f5e04490a330117524c | [
"Apache-2.0"
] | 10 | 2016-12-19T22:39:42.000Z | 2021-03-09T19:23:15.000Z | """
Alias convention tests.
"""
from io import BytesIO
from json import loads
from uuid import uuid4
from hamcrest import (
all_of,
anything,
assert_that,
contains,
equal_to,
has_entries,
has_entry,
has_item,
has_key,
is_,
is_not,
)
from marshmallow import Schema, fields
fr... | 29.823529 | 103 | 0.576847 | 5,801 | 0.88014 | 0 | 0 | 0 | 0 | 0 | 0 | 839 | 0.127295 |
4becdb4fe42c069830f83a3d86842e13caf2edcf | 135 | py | Python | molecool/io/__init__.py | nitrosx/molecool | 58ce78aceb707ff92b26bf6c90b3703714c09786 | [
"BSD-3-Clause"
] | null | null | null | molecool/io/__init__.py | nitrosx/molecool | 58ce78aceb707ff92b26bf6c90b3703714c09786 | [
"BSD-3-Clause"
] | null | null | null | molecool/io/__init__.py | nitrosx/molecool | 58ce78aceb707ff92b26bf6c90b3703714c09786 | [
"BSD-3-Clause"
] | null | null | null | '''
molecool.io package
configure access to subpackage functions
'''
from .pdb import open_pdb
from .xyz import open_xyz, write_xyz
| 13.5 | 40 | 0.77037 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.511111 |
4bf119d7edb9acf18b1f1e428e435fcd728fc1f4 | 866 | py | Python | tests/check-result.py | getupcloud/tiny-controllers | e896b2015a9e29eab421225cb5a5f0d488df9e37 | [
"Apache-2.0"
] | null | null | null | tests/check-result.py | getupcloud/tiny-controllers | e896b2015a9e29eab421225cb5a5f0d488df9e37 | [
"Apache-2.0"
] | null | null | null | tests/check-result.py | getupcloud/tiny-controllers | e896b2015a9e29eab421225cb5a5f0d488df9e37 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import json
from flatten_dict import flatten as _flatten
try:
data = json.load(sys.stdin)['object']
except Exception as ex:
print("Missing or invalid test data:", ex)
sys.exit(1)
try:
results = json.load(open(sys.argv[1], "r"))['results']
except Exception as ex:
p... | 23.405405 | 88 | 0.590069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.218245 |
4bf224e8c8f4fa354c35d1431a9957707b55eb9b | 331 | py | Python | thriftpy2_httpx_client/__init__.py | hans00/ThriftPy2-HTTPX-Client | e94944218915bcec6b2e0c00200f5d5e6f823053 | [
"MIT"
] | null | null | null | thriftpy2_httpx_client/__init__.py | hans00/ThriftPy2-HTTPX-Client | e94944218915bcec6b2e0c00200f5d5e6f823053 | [
"MIT"
] | 5 | 2021-07-13T13:56:17.000Z | 2022-03-02T02:43:46.000Z | thriftpy2_httpx_client/__init__.py | hans00/ThriftPy2-HTTPX-Client | e94944218915bcec6b2e0c00200f5d5e6f823053 | [
"MIT"
] | 2 | 2021-07-13T06:08:59.000Z | 2022-03-16T22:15:57.000Z | __all__ = [
'make_aio_client',
'make_sync_client',
'TAsyncHTTPXClient',
'THTTPXClient',
]
from .aio import TAsyncHTTPXClient, make_client as make_aio_client
from .sync import THTTPXClient, make_client as make_sync_client
from ._version import get_versions
__version__ = get_versions()['version']
del ge... | 23.642857 | 66 | 0.770393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.232628 |
4bf41bde14de2173375d4d1e4381757de1699557 | 3,553 | py | Python | kalc/model/kinds/Node.py | KellyGriffin/kalc | 9b78c4177ed9ffccbf1ecfbf9a7946286cd7c583 | [
"Apache-2.0"
] | null | null | null | kalc/model/kinds/Node.py | KellyGriffin/kalc | 9b78c4177ed9ffccbf1ecfbf9a7946286cd7c583 | [
"Apache-2.0"
] | null | null | null | kalc/model/kinds/Node.py | KellyGriffin/kalc | 9b78c4177ed9ffccbf1ecfbf9a7946286cd7c583 | [
"Apache-2.0"
] | null | null | null | import sys
import random
from kalc.model.system.base import ModularKind
from typing import Set
from kalc.model.system.primitives import Label, StatusNode
from kalc.model.system.base import HasLabel
from kalc.misc.util import cpuConvertToAbstractProblem, memConvertToAbstractProblem
from kalc.misc.const import STATUS_NOD... | 33.838095 | 83 | 0.690684 | 2,994 | 0.842668 | 0 | 0 | 403 | 0.113425 | 0 | 0 | 242 | 0.068111 |
4bf46aef0cec7975f957c42ac0e9212705e2eac4 | 6,154 | py | Python | Betsy/Betsy/modules/summarize_fastqc_results.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 9 | 2017-01-13T02:38:41.000Z | 2021-04-08T00:44:39.000Z | Betsy/Betsy/modules/summarize_fastqc_results.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | null | null | null | Betsy/Betsy/modules/summarize_fastqc_results.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 4 | 2017-01-05T16:25:25.000Z | 2019-12-12T20:07:38.000Z | from Module import AbstractModule
class Module(AbstractModule):
def __init__(self):
AbstractModule.__init__(self)
def run(
self, network, in_data, out_attributes, user_options, num_cores,
outfile):
import os
from genomicode import filelib
from genomicode import ... | 34.573034 | 76 | 0.614722 | 2,958 | 0.480663 | 0 | 0 | 0 | 0 | 0 | 0 | 1,393 | 0.226357 |
4bf674c2dd9e1aaac9f80a20682c800896278be3 | 792 | py | Python | propnet/models/__init__.py | nile0316/propnet | 3e1f1476c70a878c6eb43587c328d108b0e2a410 | [
"BSD-3-Clause-LBNL"
] | 57 | 2018-01-09T14:56:20.000Z | 2022-02-24T11:44:42.000Z | propnet/models/__init__.py | ruriboshi/propnet | 770703fb4fc344f785f89c02f26b31ea5733d2bd | [
"BSD-3-Clause-LBNL"
] | 214 | 2017-09-26T23:31:09.000Z | 2022-03-14T04:50:58.000Z | propnet/models/__init__.py | nile0316/propnet | 3e1f1476c70a878c6eb43587c328d108b0e2a410 | [
"BSD-3-Clause-LBNL"
] | 26 | 2017-10-29T21:34:22.000Z | 2022-01-12T05:59:12.000Z | # noinspection PyUnresolvedReferences
import propnet.symbols
from propnet.models import serialized, python, composite
from propnet.core.registry import Registry
# This is just to enable importing the model directly from this module for example code generation
def _update_globals():
for name, model in Registry("mo... | 33 | 98 | 0.792929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.180556 |
4bf6a8cffebce41ae5095ad681541b2d2a477027 | 1,369 | py | Python | python/clean_dataset.py | catarinaacsilva/user_mapping_twitter | 7350ed35b465a7db6747c4035e7b119bff23131d | [
"MIT"
] | null | null | null | python/clean_dataset.py | catarinaacsilva/user_mapping_twitter | 7350ed35b465a7db6747c4035e7b119bff23131d | [
"MIT"
] | null | null | null | python/clean_dataset.py | catarinaacsilva/user_mapping_twitter | 7350ed35b465a7db6747c4035e7b119bff23131d | [
"MIT"
] | null | null | null |
import csv
import re
regex = re.compile('[^a-zA-Z]')
def f7(seq):
seen = set()
seen_add = seen.add
return [x for x in seq if not (x in seen or seen_add(x))]
def clean_dataset(screen_name, n_tweets=300):
# open CSV file
all_words = []
with open('%s_tweets.csv' % screen_name,... | 30.422222 | 89 | 0.519357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 357 | 0.260774 |
4bf72918258e1f5f04c1079f6fc0ade0637b2962 | 4,690 | py | Python | kpext/kp_crfsuite.py | snovd/sdavid-tests | c5f7e60f83ecb2d4cbaec18fff84861907f59c27 | [
"MIT"
] | null | null | null | kpext/kp_crfsuite.py | snovd/sdavid-tests | c5f7e60f83ecb2d4cbaec18fff84861907f59c27 | [
"MIT"
] | null | null | null | kpext/kp_crfsuite.py | snovd/sdavid-tests | c5f7e60f83ecb2d4cbaec18fff84861907f59c27 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import os
from nltk.tokenize import TreebankWordTokenizer as Tokenizer
from nltk.tag.perceptron import PerceptronTagger
import operator
from itertools import chain
import nltk
from sklearn.metrics import classification_report, confusion_matrix
from sklearn.preprocessing import LabelBinariz... | 41.875 | 141 | 0.465885 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 754 | 0.160768 |
4bf9bd37e91a5feca68c63420808cdbf5f96022e | 6,736 | py | Python | models/analysis_transform.py | LiuLei95/PyTorch-Learned-Image-Compression-with-GMM-and-Attention | 484aced5bea25fbc1ba1380f4ab81bda9b099c1e | [
"Apache-2.0"
] | 27 | 2021-07-28T01:33:02.000Z | 2022-03-18T04:01:02.000Z | models/analysis_transform.py | LiuLei95/PyTorch-Learned-Image-Compression-with-GMM-and-Attention | 484aced5bea25fbc1ba1380f4ab81bda9b099c1e | [
"Apache-2.0"
] | 5 | 2021-11-13T05:58:51.000Z | 2022-02-13T09:07:44.000Z | models/analysis_transform.py | LiuLei95/PyTorch-Learned-Image-Compression-with-GMM-and-Attention | 484aced5bea25fbc1ba1380f4ab81bda9b099c1e | [
"Apache-2.0"
] | 1 | 2021-08-21T13:14:28.000Z | 2021-08-21T13:14:28.000Z | #!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
import math
import torch.nn as nn
import torch
from .GDN import GDN
from .attention import Attention
# class Analysis_transform(nn.Module):
# def __init__(self, num_filters=128):
# super(Analysis_transform, self).__init__()
# self.co... | 38.936416 | 96 | 0.55478 | 3,442 | 0.510986 | 0 | 0 | 0 | 0 | 0 | 0 | 2,995 | 0.444626 |
4bf9cae86ed3b64532d63a132ed50c966d6bd0b4 | 826 | py | Python | app/models.py | Katze2/Flask-template | 99925f6bfbaf92ace9b0fd7c792b989ed90a7e00 | [
"MIT"
] | null | null | null | app/models.py | Katze2/Flask-template | 99925f6bfbaf92ace9b0fd7c792b989ed90a7e00 | [
"MIT"
] | null | null | null | app/models.py | Katze2/Flask-template | 99925f6bfbaf92ace9b0fd7c792b989ed90a7e00 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from app import db
class ModelExample(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(250))
content = db.Column(db.Text)
date = db.Column(db.DateTime)
class User(db.Model):
id = db.Column(db.Integer, primary_key = True)
user = db.Column(db.St... | 24.294118 | 75 | 0.634383 | 775 | 0.938257 | 0 | 0 | 0 | 0 | 0 | 0 | 107 | 0.12954 |
4bfa32e39dba78be88b0f520adb14e8e58f436e8 | 938 | py | Python | test/hlt/pytest/python/com/huawei/iotplatform/client/dto/DeviceServiceB.py | yuanyi-thu/AIOT- | 27f67d98324593c4c6c66bbd5e2a4aa7b9a4ac1e | [
"BSD-3-Clause"
] | 128 | 2018-10-29T04:11:47.000Z | 2022-03-07T02:19:14.000Z | test/hlt/pytest/python/com/huawei/iotplatform/client/dto/DeviceServiceB.py | yuanyi-thu/AIOT- | 27f67d98324593c4c6c66bbd5e2a4aa7b9a4ac1e | [
"BSD-3-Clause"
] | 40 | 2018-11-02T00:40:48.000Z | 2021-12-07T09:33:56.000Z | test/hlt/pytest/python/com/huawei/iotplatform/client/dto/DeviceServiceB.py | yuanyi-thu/AIOT- | 27f67d98324593c4c6c66bbd5e2a4aa7b9a4ac1e | [
"BSD-3-Clause"
] | 118 | 2018-10-29T08:43:57.000Z | 2022-01-07T06:49:25.000Z | class DeviceServiceB(object):
def __init__(self):
self.serviceId = None
self.reportedProps = None
self.desiredProps = None
self.eventTime = None
self.serviceType = None
def getServiceId(self):
return self.serviceId
def setServiceId(self, serviceId):
... | 24.051282 | 46 | 0.66951 | 937 | 0.998934 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4bfb4d961bec58ff15fe5b25777f51138ea3c5dc | 1,516 | py | Python | tests/dataset_balancer_test.py | MarinkoBa/Hate-Speech-Classification | 72f6bbe93b823daefa138df4f81a3a4df5b34c4c | [
"MIT"
] | null | null | null | tests/dataset_balancer_test.py | MarinkoBa/Hate-Speech-Classification | 72f6bbe93b823daefa138df4f81a3a4df5b34c4c | [
"MIT"
] | null | null | null | tests/dataset_balancer_test.py | MarinkoBa/Hate-Speech-Classification | 72f6bbe93b823daefa138df4f81a3a4df5b34c4c | [
"MIT"
] | 1 | 2020-12-14T13:56:50.000Z | 2020-12-14T13:56:50.000Z | # -*- coding: utf-8 -*-
from src.utils.get_data import load_data
from src.utils.get_data import get_datasets
from src.utils.get_data import concatenate_datasets
from src.utils.dataset_balancer import balance_data
import os
import pandas as pd
import unittest
class TestDataBalancer(unittest.TestCase):
def setUp(... | 35.255814 | 110 | 0.550792 | 1,154 | 0.761214 | 0 | 0 | 0 | 0 | 0 | 0 | 186 | 0.122691 |
4bfb89534390da200300df58f33c846fbb2cba39 | 12,695 | py | Python | gptorch/models/sparse_gpr.py | cics-nd/gptorch | 80c62a227c466bb7fa29e11263e94c41f96ff93f | [
"MIT"
] | 28 | 2018-11-05T03:01:18.000Z | 2021-04-02T18:11:05.000Z | gptorch/models/sparse_gpr.py | cics-nd/gptorch | 80c62a227c466bb7fa29e11263e94c41f96ff93f | [
"MIT"
] | 7 | 2019-06-04T21:43:40.000Z | 2021-11-04T04:19:26.000Z | gptorch/models/sparse_gpr.py | cics-nd/gptorch | 80c62a227c466bb7fa29e11263e94c41f96ff93f | [
"MIT"
] | 8 | 2019-04-03T12:28:05.000Z | 2021-12-23T10:15:34.000Z | #
# Yinhao Zhu, May 01, 2017
#
"""
Sparse GP regression, including variational GP and others.
"""
from __future__ import absolute_import
import torch
import numpy as np
from torch.utils.data import TensorDataset, DataLoader
from torch.distributions.transforms import LowerCholeskyTransform
from ..model import Param
f... | 33.232984 | 87 | 0.59228 | 11,610 | 0.914533 | 0 | 0 | 1,888 | 0.14872 | 0 | 0 | 4,901 | 0.386058 |
4bfe5926292aa222488a49dbf22dd03f8782815e | 1,405 | py | Python | exercises/pt/test_01_11.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/test_01_11.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/test_01_11.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
import spacy.matcher
assert isinstance(
matcher, spacy.matcher.Matcher
), "Você está inicializando o Comparador corretamente?"
assert (
"Matcher(nlp.vocab)" in __solution__
), "Você está inicializando o Comparador corretamente com o vocabulário compartilhado?"
assert... | 39.027778 | 91 | 0.646263 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 790 | 0.550907 |
4bfe8f82bf9964afbee833e2a996e71d61b97873 | 1,638 | py | Python | Code/list.py | sunjinshuai/Python | b4d76bc20e9d740108c98cb8d023ca5da3e6c070 | [
"MIT"
] | null | null | null | Code/list.py | sunjinshuai/Python | b4d76bc20e9d740108c98cb8d023ca5da3e6c070 | [
"MIT"
] | null | null | null | Code/list.py | sunjinshuai/Python | b4d76bc20e9d740108c98cb8d023ca5da3e6c070 | [
"MIT"
] | null | null | null | list1 = ['physics', 'chemistry', 1997, 2000]
list2 = [1, 2, 3, 4, 5 ]
list3 = ["a", "b", "c", "d"]
print list1, list2, list3
# 访问列表中的值
# 使用下标索引来访问列表中的值,同样你也可以使用方括号的形式截取字符,如下所示:
print "list1[0]: ", list1[0]
print "list2[1:5]: ", list2[1:5]
# 更新列表
# 你可以对列表的数据项进行修改或更新,你也可以使用append()方法来添加列表项,如下所示:
list = [] ... | 20.222222 | 49 | 0.651404 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,753 | 0.699521 |
ef0025261578f6f3b594dd1953fdfd38e1b064c9 | 10,015 | py | Python | xyw_macro/notify.py | xue0228/keyboard | dcb0def1d87a9197676c0f405b980a67e128ab24 | [
"MIT"
] | null | null | null | xyw_macro/notify.py | xue0228/keyboard | dcb0def1d87a9197676c0f405b980a67e128ab24 | [
"MIT"
] | null | null | null | xyw_macro/notify.py | xue0228/keyboard | dcb0def1d87a9197676c0f405b980a67e128ab24 | [
"MIT"
] | null | null | null | import tkinter as tk
import tkinter.font as tf
from tkinter import ttk
from tkinter import messagebox
from tkinter.filedialog import askopenfilename, askdirectory
import time
import threading
from functools import wraps
from xyw_macro.utils import SingletonType
from xyw_macro.contants import SLEEP_TIME
class Notifi... | 30.348485 | 120 | 0.563155 | 8,361 | 0.804174 | 0 | 0 | 576 | 0.055401 | 0 | 0 | 1,984 | 0.190824 |
ef015b72b0d9f9a36582b5d4563b3165aa3bb897 | 1,206 | py | Python | tests/test_utils.py | yiannisha/dbmanage | 9e1e36e2b59e7e369595f4804bef2c2a7ec0ec56 | [
"Apache-2.0"
] | null | null | null | tests/test_utils.py | yiannisha/dbmanage | 9e1e36e2b59e7e369595f4804bef2c2a7ec0ec56 | [
"Apache-2.0"
] | 10 | 2021-11-06T18:12:54.000Z | 2021-12-01T18:49:29.000Z | tests/test_utils.py | yiannisha/dbmanage | 9e1e36e2b59e7e369595f4804bef2c2a7ec0ec56 | [
"Apache-2.0"
] | null | null | null |
""" Utilities for testing """
import os
import json
TESTDATADIR = os.path.join(os.path.dirname(__file__), 'testdata')
def get_pass(pass_name : str) -> str:
""" Returns pass from test_credentials.json """
creds_path = os.path.join(os.path.dirname(__file__), 'test_credentials.json')
with open(creds_path,... | 28.046512 | 93 | 0.619403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 340 | 0.281924 |
ef0261d204ca26d250b0a03064510e798b9c7feb | 152 | py | Python | ballistics/collision/dispatch/__init__.py | flupke/ballistics | 844ef7dd9fd55f6f7d0be04df6b564beaa5aaa1a | [
"Zlib"
] | null | null | null | ballistics/collision/dispatch/__init__.py | flupke/ballistics | 844ef7dd9fd55f6f7d0be04df6b564beaa5aaa1a | [
"Zlib"
] | null | null | null | ballistics/collision/dispatch/__init__.py | flupke/ballistics | 844ef7dd9fd55f6f7d0be04df6b564beaa5aaa1a | [
"Zlib"
] | 1 | 2020-04-29T13:52:31.000Z | 2020-04-29T13:52:31.000Z | from ballistics.collision.dispatch.config import DefaultCollisionConfiguration
from ballistics.collision.dispatch.dispatcher import CollisionDispatcher
| 50.666667 | 78 | 0.907895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ef032589a15b54709c2cc0f764228c621cd157d2 | 750 | py | Python | venv/lib/python3.7/site-packages/webdriver_manager/chrome.py | wayshon/pylogin | 12ecfddc3ceaf552a42f62608027924541c63254 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.7/site-packages/webdriver_manager/chrome.py | wayshon/pylogin | 12ecfddc3ceaf552a42f62608027924541c63254 | [
"Apache-2.0"
] | 7 | 2019-12-04T23:08:08.000Z | 2022-02-10T12:47:38.000Z | venv/lib/python3.7/site-packages/webdriver_manager/chrome.py | wayshon/pylogin | 12ecfddc3ceaf552a42f62608027924541c63254 | [
"Apache-2.0"
] | null | null | null | import os
from webdriver_manager.driver import ChromeDriver
from webdriver_manager.manager import DriverManager
from webdriver_manager import utils
class ChromeDriverManager(DriverManager):
def __init__(self, version=None, os_type=utils.os_type()):
# type: (str, str) -> None
super(ChromeDriverMana... | 34.090909 | 72 | 0.652 | 599 | 0.798667 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.118667 |
ef038b82c703bdd42d7eb00adaf52c73105e5c39 | 321 | py | Python | polling_stations/apps/data_importers/management/commands/import_brent.py | danielgriffin48/UK-Polling-Stations | 0e5273357a4fdc00c2af794c71558b6f8f2a0a49 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_importers/management/commands/import_brent.py | danielgriffin48/UK-Polling-Stations | 0e5273357a4fdc00c2af794c71558b6f8f2a0a49 | [
"BSD-3-Clause"
] | null | null | null | polling_stations/apps/data_importers/management/commands/import_brent.py | danielgriffin48/UK-Polling-Stations | 0e5273357a4fdc00c2af794c71558b6f8f2a0a49 | [
"BSD-3-Clause"
] | null | null | null | from data_importers.management.commands import BaseDemocracyCountsCsvImporter
class Command(BaseDemocracyCountsCsvImporter):
council_id = "E09000005"
addresses_name = "europarl.2019-05-23/Version 1/DC PD.csv"
stations_name = "europarl.2019-05-23/Version 1/DC PS.csv"
elections = ["europarl.2019-05-23"]... | 35.666667 | 77 | 0.76947 | 240 | 0.747664 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.35514 |
ef0469d45705f95287d4ed042d4ea25304eabf8c | 3,217 | py | Python | tests/test_data/movies.py | jmolinski/traktpy | e6ff22acaf273b7b45070a4f8938c210fe4d63d7 | [
"MIT"
] | null | null | null | tests/test_data/movies.py | jmolinski/traktpy | e6ff22acaf273b7b45070a4f8938c210fe4d63d7 | [
"MIT"
] | 1 | 2019-04-13T10:15:48.000Z | 2019-04-13T10:15:48.000Z | tests/test_data/movies.py | jmolinski/traktpy | e6ff22acaf273b7b45070a4f8938c210fe4d63d7 | [
"MIT"
] | null | null | null | MOVIE1 = {
"title": "Guardians of the Galaxy",
"year": 2014,
"ids": {
"trakt": 28,
"slug": "guardians-of-the-galaxy-2014",
"imdb": "tt2015381",
"tmdb": 118340,
},
}
MOVIE2 = {
"title": "Guardians of the Galaxy",
"year": 2014,
"ids": {
"trakt": 28,
... | 22.496503 | 269 | 0.520361 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,615 | 0.501709 |
ef051797168d89a7cce543aa7efcba75f787978c | 2,689 | py | Python | azext_iot/digitaltwins/common.py | v-andreaco/azure-iot-cli-extension | 18b20b0a6ba9f75556979eb905e6d2271eb27ddd | [
"MIT"
] | null | null | null | azext_iot/digitaltwins/common.py | v-andreaco/azure-iot-cli-extension | 18b20b0a6ba9f75556979eb905e6d2271eb27ddd | [
"MIT"
] | null | null | null | azext_iot/digitaltwins/common.py | v-andreaco/azure-iot-cli-extension | 18b20b0a6ba9f75556979eb905e6d2271eb27ddd | [
"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.
# -----------------------------------------------------... | 31.267442 | 121 | 0.670881 | 910 | 0.338416 | 0 | 0 | 0 | 0 | 0 | 0 | 1,735 | 0.645221 |
ef05389e99b6d9f3d5e451c4f3f4a586cd843bd5 | 7,580 | py | Python | lib/FeatureSetUtils/Utils/AveExpressionMatrixBuilder.py | mclark58/FeatureSetUtils | 2b84bc40d6a8f8aec878aa965ca567537c67267e | [
"MIT"
] | 1 | 2020-01-13T19:38:50.000Z | 2020-01-13T19:38:50.000Z | lib/FeatureSetUtils/Utils/AveExpressionMatrixBuilder.py | mclark58/FeatureSetUtils | 2b84bc40d6a8f8aec878aa965ca567537c67267e | [
"MIT"
] | 6 | 2017-09-19T17:46:03.000Z | 2020-06-09T04:28:36.000Z | lib/FeatureSetUtils/Utils/AveExpressionMatrixBuilder.py | mclark58/FeatureSetUtils | 2b84bc40d6a8f8aec878aa965ca567537c67267e | [
"MIT"
] | 9 | 2017-06-30T16:01:48.000Z | 2020-08-13T20:19:42.000Z | import json
import time
import uuid
from installed_clients.DataFileUtilClient import DataFileUtil
from installed_clients.KBaseReportClient import KBaseReport
from installed_clients.WorkspaceClient import Workspace as Workspace
def log(message, prefix_newline=False):
"""Logging function, provides a hook to suppre... | 41.648352 | 98 | 0.61504 | 7,127 | 0.940237 | 0 | 0 | 0 | 0 | 0 | 0 | 2,160 | 0.28496 |
ef055217f03abbaf7fba6a972f73a617fc132c0f | 838 | py | Python | src/python/modules/TensorflowCommon/utils.py | dsyme/ADBench | 87af0219a568807f8432754688ceb636efac12c6 | [
"MIT"
] | 58 | 2019-12-30T16:22:01.000Z | 2022-01-23T12:26:51.000Z | src/python/modules/TensorflowCommon/utils.py | dsyme/ADBench | 87af0219a568807f8432754688ceb636efac12c6 | [
"MIT"
] | 112 | 2019-05-25T07:26:58.000Z | 2019-12-28T13:55:33.000Z | src/python/modules/TensorflowCommon/utils.py | dsyme/ADBench | 87af0219a568807f8432754688ceb636efac12c6 | [
"MIT"
] | 22 | 2020-03-12T16:37:55.000Z | 2022-02-23T10:14:37.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import tensorflow as tf
def to_tf_tensor(ndarray, dtype = tf.float64):
'''Converts the given multidimensional array to a tensorflow tensor.
Args:
ndarray (ndarray-like): parameter for conversion.
dtype (type, optional)... | 22.648649 | 78 | 0.674224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 458 | 0.546539 |
ef066c9d7e1e24986e561e37f408aef403cdc52a | 127 | py | Python | learning_sets.py | guppikan/PythonLearning | b1674b7187c783b682da26c2190e2b47938faa16 | [
"MIT"
] | null | null | null | learning_sets.py | guppikan/PythonLearning | b1674b7187c783b682da26c2190e2b47938faa16 | [
"MIT"
] | null | null | null | learning_sets.py | guppikan/PythonLearning | b1674b7187c783b682da26c2190e2b47938faa16 | [
"MIT"
] | null | null | null | # this file describe sets data structures on python
thisSet={"Car","Bike","Truk"}
# Printing sets on terminal
print(thisSet) | 21.166667 | 52 | 0.740157 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 96 | 0.755906 |
ef071178a07b347765b3a959b7f835718f3934a3 | 588 | py | Python | s3bro/pool_map.py | rsavordelli/s3bro | e5b1d41052fd2491c08589b8a2bffeb6aae7cf33 | [
"MIT"
] | 22 | 2018-03-13T18:46:33.000Z | 2021-11-03T09:41:39.000Z | s3bro/pool_map.py | rsavordelli/s3bro | e5b1d41052fd2491c08589b8a2bffeb6aae7cf33 | [
"MIT"
] | 5 | 2018-06-26T21:39:06.000Z | 2020-08-03T12:53:10.000Z | s3bro/pool_map.py | rsavordelli/s3bro | e5b1d41052fd2491c08589b8a2bffeb6aae7cf33 | [
"MIT"
] | 2 | 2019-09-04T06:40:09.000Z | 2020-07-06T01:56:44.000Z | from multiprocessing import Pool
import logging
def multi_process(func, data, workers):
logging.warning('Consuming list with %s workers' % workers)
p = Pool(workers)
try:
# the timeout(.get(9999999) is a workaround for the KeyboardInterrupt. without that it just does not work.
# Seem to be... | 32.666667 | 114 | 0.690476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 249 | 0.423469 |
ef07256f31589e2d434bffa64e958f93097dc4b3 | 11,290 | py | Python | htmlmth/utils.py | ZwCreatePhoton/htmlmth | 74d23ca2fa53e11b2587251d2f71c8f275548182 | [
"MIT"
] | null | null | null | htmlmth/utils.py | ZwCreatePhoton/htmlmth | 74d23ca2fa53e11b2587251d2f71c8f275548182 | [
"MIT"
] | null | null | null | htmlmth/utils.py | ZwCreatePhoton/htmlmth | 74d23ca2fa53e11b2587251d2f71c8f275548182 | [
"MIT"
] | null | null | null | import os
import yaml
from HTMLScriptExtractor import HTMLScriptExtractor
MIME_TYPE_MAP = {
'.htm': 'text/html',
'.html': 'text/html',
'.js': 'text/javascript',
'.vbs': 'text/vbscript',
'.txt': 'text/plain',
'.jpg': 'image/jpeg',
'.jpeg': 'image/jpeg'
}
# input:
# a function "mime_ty... | 35.84127 | 184 | 0.615766 | 6,054 | 0.536227 | 0 | 0 | 3,884 | 0.344021 | 0 | 0 | 2,115 | 0.187334 |
ef094d452aa651937866c8d859cce7f5a8e866fa | 1,265 | py | Python | examples/235. Lowest Common Ancestor of a Binary Search Tree.py | yehzhang/RapidTest | 2302fc10ddafba1d16ef1d7448d46c66f5a05da2 | [
"MIT"
] | null | null | null | examples/235. Lowest Common Ancestor of a Binary Search Tree.py | yehzhang/RapidTest | 2302fc10ddafba1d16ef1d7448d46c66f5a05da2 | [
"MIT"
] | null | null | null | examples/235. Lowest Common Ancestor of a Binary Search Tree.py | yehzhang/RapidTest | 2302fc10ddafba1d16ef1d7448d46c66f5a05da2 | [
"MIT"
] | null | null | null | from rapidtest import Test, Case, TreeNode
from solutions.lowest_common_ancestor_of_a_binary_search_tree import Solution
with Test(Solution, post_proc=TreeNode.get_val) as test:
root = TreeNode.from_iterable([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5])
Case(root, TreeNode(2), TreeNode(4), result=TreeNode(2))
C... | 43.62069 | 91 | 0.660079 | 0 | 0 | 0 | 0 | 326 | 0.257708 | 0 | 0 | 0 | 0 |
ef09cb460708054f80c71807033f5ec91f1f2963 | 12,087 | py | Python | proto/npu_utilization_pb2.py | akaczm/jun-telemetry | 84c7208669f4f1749f8db45f4815dafefdbec083 | [
"MIT"
] | 4 | 2019-12-02T12:20:47.000Z | 2021-08-25T12:52:26.000Z | proto/npu_utilization_pb2.py | akaczm/jun-telemetry | 84c7208669f4f1749f8db45f4815dafefdbec083 | [
"MIT"
] | null | null | null | proto/npu_utilization_pb2.py | akaczm/jun-telemetry | 84c7208669f4f1749f8db45f4815dafefdbec083 | [
"MIT"
] | 1 | 2021-08-25T12:47:44.000Z | 2021-08-25T12:47:44.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: npu_utilization.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.prot... | 40.972881 | 1,125 | 0.755522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,945 | 0.24365 |
ef0a465c711275ee344dd982144bb689f29fa28c | 4,409 | py | Python | tests/test_models.py | rramaa/pynnotate | 7cf983dd16726032d3d53340415a823c9e8bd76c | [
"MIT"
] | 1 | 2019-07-24T12:56:16.000Z | 2019-07-24T12:56:16.000Z | tests/test_models.py | rramaa/pynnotate | 7cf983dd16726032d3d53340415a823c9e8bd76c | [
"MIT"
] | 14 | 2019-03-12T08:49:34.000Z | 2019-04-04T09:51:16.000Z | tests/test_models.py | rramaa/pynnotate | 7cf983dd16726032d3d53340415a823c9e8bd76c | [
"MIT"
] | 2 | 2019-10-13T14:45:11.000Z | 2019-12-24T22:22:46.000Z | from annotatelib.models import (
models, class_from_filename,
table_name_from_filename, _get_column_description_from_object,
_get_indices_description_from_oject
)
import sqlite3
from orator import DatabaseManager
import os
import sys
sys.path.insert(0, os.path.abspath(
os.path.join(os.path.dirname(__fil... | 41.205607 | 148 | 0.577682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,827 | 0.41438 |
ef0b1e90a414cd10b99ab947636c1ca2151cab55 | 430 | py | Python | flatlist/__init__.py | dwabece/flatlist | 61b6f7f70bf9db2bf14f8bfdebce2c4f9a95811f | [
"WTFPL"
] | null | null | null | flatlist/__init__.py | dwabece/flatlist | 61b6f7f70bf9db2bf14f8bfdebce2c4f9a95811f | [
"WTFPL"
] | null | null | null | flatlist/__init__.py | dwabece/flatlist | 61b6f7f70bf9db2bf14f8bfdebce2c4f9a95811f | [
"WTFPL"
] | null | null | null | __version__ = '0.0.1'
def flatten_list(input_list):
"""
Flattens list with many nested lists.
>>> flatten_list([1, [2, [3], [4]]])
[1, 2, 3, 4]
"""
result = []
for item in input_list:
if isinstance(item, list):
result.extend(flatten_list(item))
# yield from... | 20.47619 | 45 | 0.532558 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.376744 |
ef0dbb4129bccb5de4e10f51b60990b9ac3393bb | 607 | py | Python | slackcast/token.py | rbdixon/slackcast | ac4ac4591bbcf62d64ec05b5479e6e8315f92a69 | [
"MIT"
] | null | null | null | slackcast/token.py | rbdixon/slackcast | ac4ac4591bbcf62d64ec05b5479e6e8315f92a69 | [
"MIT"
] | 1 | 2021-11-15T17:47:27.000Z | 2021-11-15T17:47:27.000Z | slackcast/token.py | rbdixon/slackcast | ac4ac4591bbcf62d64ec05b5479e6e8315f92a69 | [
"MIT"
] | null | null | null | import os
import keyring
from prompt_toolkit import prompt
KEY = ('slackcast', 'token')
SLACKCAST_INSTALL_URL = os.environ.get(
'SLACKCAST_INSTALL_URL', 'https://slackcast.devtestit.com/install'
)
def get_token():
# For testing
token = os.environ.get('SLACKCAST_TOKEN', None)
if token is None:
... | 22.481481 | 88 | 0.667216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 179 | 0.294893 |
ef0f41777334766f27b085f4b278863d8beee416 | 790 | py | Python | baidupan.py | iSteveyang/GraduateDesign-pyqt | ce4e6c8b0de2398081a83c63fb98cc03126bc6d0 | [
"MIT"
] | null | null | null | baidupan.py | iSteveyang/GraduateDesign-pyqt | ce4e6c8b0de2398081a83c63fb98cc03126bc6d0 | [
"MIT"
] | null | null | null | baidupan.py | iSteveyang/GraduateDesign-pyqt | ce4e6c8b0de2398081a83c63fb98cc03126bc6d0 | [
"MIT"
] | null | null | null | import progressbar
from baidupcsapi import PCS
class ProgressBar():
def __init__(self):
self.first_call = True
def __call__(self, *args, **kwargs):
if self.first_call:
self.widgets = [progressbar.Percentage(), ' ', progressbar.Bar(marker=progressbar.RotatingMarker('>')),
... | 34.347826 | 115 | 0.611392 | 593 | 0.750633 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.118987 |
ef0f95f25a14e3a1c31217d9a079a1f1c52c743d | 541 | py | Python | pps/message.py | SeungUkLee/preview-pipfile-script | d28d963f1feee9ed1621a04b25c02d34a0919829 | [
"MIT"
] | null | null | null | pps/message.py | SeungUkLee/preview-pipfile-script | d28d963f1feee9ed1621a04b25c02d34a0919829 | [
"MIT"
] | null | null | null | pps/message.py | SeungUkLee/preview-pipfile-script | d28d963f1feee9ed1621a04b25c02d34a0919829 | [
"MIT"
] | null | null | null | """
messages
"""
from .color import ENDC, FAIL, OKBLUE, YELLOW
EXE_SCRIPT_ERR_MSG = '{0}[!]{1} An error occurred while executing script in Pipfile'.format(
FAIL, ENDC
)
KEYWORD_NOT_FOUND_MSG = "{0}[!]{1} {2}Pipfile{1} in {3}[scripts]{1} keyword not found!".format(
FAIL, ENDC, OKBLUE, YELLOW
)
FILE_NOT_FOUND_MS... | 31.823529 | 95 | 0.685767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 243 | 0.449168 |
ef1093497c62d32b5e459bb8bfbe26c27ca18a49 | 2,101 | py | Python | lambdafunctions/LogEvent/LogEvent.py | rpetrina/slack-sentiment-bot | 47969d8a8c476aa60939fab88f0af793a24a4acc | [
"MIT"
] | null | null | null | lambdafunctions/LogEvent/LogEvent.py | rpetrina/slack-sentiment-bot | 47969d8a8c476aa60939fab88f0af793a24a4acc | [
"MIT"
] | null | null | null | lambdafunctions/LogEvent/LogEvent.py | rpetrina/slack-sentiment-bot | 47969d8a8c476aa60939fab88f0af793a24a4acc | [
"MIT"
] | null | null | null | import sys
import logging
import pymysql
import json
import os
#rds settings - Lambda role must have RDS access
rds_host = os.environ['RDS_HOST'] # Set in Lambda Dashboard
name = os.environ['DB_USERNAME']
password = os.environ['DB_PW']
db_name = os.environ['DB_NAME']
db_table = os.environ['DB_TABLE']
logger = loggin... | 29.180556 | 107 | 0.619229 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 863 | 0.410757 |
ef124d3ce81475f29c8f62fc6238715aeebcf110 | 764 | py | Python | ACCNTS/migrations/0012_auto_20190329_0554.py | domambia/csdigital-gs1kenya-internal-erp | 6736d0e9a3a51653689f8ae921cf811f378d9d8e | [
"MIT"
] | 12 | 2019-08-02T07:58:16.000Z | 2022-01-31T23:45:08.000Z | ACCNTS/migrations/0012_auto_20190329_0554.py | domambia/csdigital-gs1kenya-internal-erp | 6736d0e9a3a51653689f8ae921cf811f378d9d8e | [
"MIT"
] | 8 | 2019-08-02T08:06:18.000Z | 2022-03-11T23:45:17.000Z | ACCNTS/migrations/0012_auto_20190329_0554.py | domambia/csdigital-gs1kenya-internal-erp | 6736d0e9a3a51653689f8ae921cf811f378d9d8e | [
"MIT"
] | 11 | 2019-07-31T16:23:36.000Z | 2022-01-29T08:30:07.000Z | # Generated by Django 2.1.5 on 2019-03-29 05:54
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ACCNTS', '0011_asset_employeetax_income_liability'),
]
operations = [
migrations.AddField(
model_name='asset',
... | 25.466667 | 66 | 0.590314 | 655 | 0.85733 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.187173 |
ef1252f9351ea7758743cb386119d19cc1470cf1 | 171 | py | Python | doacao/forms.py | CyberDagger/quatropatas | 7fd9b51dd65d6242112ab40c834a66c4cc8c8c73 | [
"MIT"
] | null | null | null | doacao/forms.py | CyberDagger/quatropatas | 7fd9b51dd65d6242112ab40c834a66c4cc8c8c73 | [
"MIT"
] | null | null | null | doacao/forms.py | CyberDagger/quatropatas | 7fd9b51dd65d6242112ab40c834a66c4cc8c8c73 | [
"MIT"
] | 1 | 2019-04-16T19:19:10.000Z | 2019-04-16T19:19:10.000Z | from django import forms
from .models import Doacao
class DoacaoForm(forms.ModelForm):
class Meta:
model = Doacao
fields = ['nib', 'quantia',]
| 21.375 | 37 | 0.631579 | 113 | 0.660819 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.081871 |
ef12df78f36f2adabef28423fa54313ee1270534 | 1,707 | py | Python | data/build_wd_elastic_index.py | flaneuse/reframedb-backend | 863423fb9fad547aa8c2f826dc2d39939fe1b991 | [
"MIT"
] | null | null | null | data/build_wd_elastic_index.py | flaneuse/reframedb-backend | 863423fb9fad547aa8c2f826dc2d39939fe1b991 | [
"MIT"
] | null | null | null | data/build_wd_elastic_index.py | flaneuse/reframedb-backend | 863423fb9fad547aa8c2f826dc2d39939fe1b991 | [
"MIT"
] | null | null | null | import requests
from elasticsearch import Elasticsearch, client
from elasticsearch.exceptions import RequestError
es = Elasticsearch()
# retrieve all QIDs from the populated reframe ES index
body = {
"_source": {
"includes": ["qid"],
},
"query": {
"query_string": {
"query": "... | 21.884615 | 91 | 0.565319 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.314001 |
ef135d999c596568c19df6fc41a299bbb48ab07f | 3,049 | py | Python | dj_twitter_clone_app/blog/views.py | ivanprytula/dj_demo_app | 49ca506b22d3d99608e192b28787e185b39d3c24 | [
"MIT"
] | null | null | null | dj_twitter_clone_app/blog/views.py | ivanprytula/dj_demo_app | 49ca506b22d3d99608e192b28787e185b39d3c24 | [
"MIT"
] | null | null | null | dj_twitter_clone_app/blog/views.py | ivanprytula/dj_demo_app | 49ca506b22d3d99608e192b28787e185b39d3c24 | [
"MIT"
] | null | null | null | from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.urls import reverse_lazy
from django.views.generic import (ListView, CreateView, TemplateView, )
from django.views.generic.detail import DetailView
from django.views.generic.edit import (UpdateView, DeleteView, )
from blog.models impo... | 29.601942 | 73 | 0.648081 | 2,005 | 0.657593 | 0 | 0 | 0 | 0 | 0 | 0 | 1,234 | 0.404723 |