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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79752dfeea92e5663a4751ca66827c1f32a6ad2e | 387 | py | Python | books/migrations/0003_book_cover.py | vasylpiasetskyi/django_bookstore_app | 9a85312195aa0d46d645f8ebed6e088daadf319d | [
"MIT"
] | null | null | null | books/migrations/0003_book_cover.py | vasylpiasetskyi/django_bookstore_app | 9a85312195aa0d46d645f8ebed6e088daadf319d | [
"MIT"
] | null | null | null | books/migrations/0003_book_cover.py | vasylpiasetskyi/django_bookstore_app | 9a85312195aa0d46d645f8ebed6e088daadf319d | [
"MIT"
] | null | null | null | # Generated by Django 3.1.14 on 2022-02-16 13:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('books', '0002_review'),
]
operations = [
migrations.AddField(
model_name='book',
name='cover',
field=mo... | 20.368421 | 69 | 0.583979 |
79752e4b3e4c901910d92702f3f1074be288575a | 860 | py | Python | var/spack/repos/builtin/packages/direnv/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2021-09-29T02:14:40.000Z | 2022-01-27T20:50:36.000Z | var/spack/repos/builtin/packages/direnv/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2022-02-28T11:30:18.000Z | 2022-03-23T19:34:56.000Z | var/spack/repos/builtin/packages/direnv/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Direnv(Package):
"""direnv is an environment switcher for the shell."""
homepage = "h... | 34.4 | 96 | 0.731395 |
79752f0de4264c9889f09d42865fae11402ad87b | 31,577 | py | Python | websecurityscanner/google/cloud/websecurityscanner_v1beta/proto/scan_config_pb2.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 2 | 2021-11-26T07:08:43.000Z | 2022-03-07T20:20:04.000Z | websecurityscanner/google/cloud/websecurityscanner_v1beta/proto/scan_config_pb2.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 6 | 2019-05-27T22:05:58.000Z | 2019-08-05T16:46:16.000Z | websecurityscanner/google/cloud/websecurityscanner_v1beta/proto/scan_config_pb2.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 1 | 2021-07-21T17:59:33.000Z | 2021-07-21T17:59:33.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/websecurityscanner_v1beta/proto/scan_config.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.prot... | 37.86211 | 2,796 | 0.645723 |
797530be9af8fe2a00be3e47a0aab4e7d65a7741 | 2,011 | py | Python | basf/extract_submol.py | basflearn/ensemble | d8346edd3c82c08154589024f3c8e7fa91cf7077 | [
"MIT"
] | null | null | null | basf/extract_submol.py | basflearn/ensemble | d8346edd3c82c08154589024f3c8e7fa91cf7077 | [
"MIT"
] | null | null | null | basf/extract_submol.py | basflearn/ensemble | d8346edd3c82c08154589024f3c8e7fa91cf7077 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# MIT License
#
# Copyright (c) 2018 Stefan Chmiela
#
# 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,... | 31.421875 | 81 | 0.7454 |
797530dc7b99a893d09b353236e92a1c02e92783 | 1,642 | py | Python | book/urls.py | fbreversg/django_playing | ebeb9fb35350a65d970e950e99088fa5741ae09c | [
"MIT"
] | null | null | null | book/urls.py | fbreversg/django_playing | ebeb9fb35350a65d970e950e99088fa5741ae09c | [
"MIT"
] | null | null | null | book/urls.py | fbreversg/django_playing | ebeb9fb35350a65d970e950e99088fa5741ae09c | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, url, include
from django.contrib import admin
from views import hello, current_datetime, hours_ahead, current_datetime_render, display_meta, requires_login
from books import views
from contact import views as cviews
admin.autodiscover()
urlpatterns = patterns('',
... | 46.914286 | 123 | 0.503654 |
79753134eeafe662aef3ff740d3c364f65cdb814 | 825 | py | Python | hackerrank/30 Days of Code/Day 4 - Class vs. Instance/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerrank/30 Days of Code/Day 4 - Class vs. Instance/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerrank/30 Days of Code/Day 4 - Class vs. Instance/solution.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | class Person:
def __init__(self, initialAge):
# Add some more code to run some checks on initialAge
self.age = initialAge
if initialAge < 0:
print('Age is not valid, setting age to 0.')
self.age = 0
def amIOld(self):
# Do some computations in here and pri... | 25.78125 | 89 | 0.544242 |
797533c6f4df2bd2aede5ff95ffba6d0b6c7ae07 | 2,335 | py | Python | Election_Portal/migrations/0003_auto_20170928_0851.py | GT-18/Election-Portal-IIT-BHU | 6a621f0692cbf57d338674a57b38e9534cfaf220 | [
"MIT"
] | null | null | null | Election_Portal/migrations/0003_auto_20170928_0851.py | GT-18/Election-Portal-IIT-BHU | 6a621f0692cbf57d338674a57b38e9534cfaf220 | [
"MIT"
] | null | null | null | Election_Portal/migrations/0003_auto_20170928_0851.py | GT-18/Election-Portal-IIT-BHU | 6a621f0692cbf57d338674a57b38e9534cfaf220 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-09-28 08:51
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
... | 40.258621 | 120 | 0.602998 |
79753405ec2d3cb40e0d692faca2431d09656d5a | 600 | py | Python | lab11-master/lab11/create-aws-queue.py | DGregan/dt211-cloud-repo | bacfc6316ce9b372c9c77218ae35535c8e8c4d0a | [
"MIT"
] | null | null | null | lab11-master/lab11/create-aws-queue.py | DGregan/dt211-cloud-repo | bacfc6316ce9b372c9c77218ae35535c8e8c4d0a | [
"MIT"
] | null | null | null | lab11-master/lab11/create-aws-queue.py | DGregan/dt211-cloud-repo | bacfc6316ce9b372c9c77218ae35535c8e8c4d0a | [
"MIT"
] | null | null | null |
import requests
import string
import urllib2
import boto.sqs
import boto.sqs.queue
from boto.sqs.message import Message
from boto.sqs.connection import SQSConnection
from boto.exception import SQSError
import sys
#Spliting keys
access_key_id, secret_access_key = urllib2.urlopen('http://ec2-52-30-7-5.eu-west-1.compu... | 25 | 131 | 0.788333 |
797534910997b846060eb43c64eadf6fb51239a1 | 7,345 | py | Python | tests/test_image_rw.py | function2-llx/MONAI | 4cddaa830b61b88ec78e089bb5f21e05bb1a78f4 | [
"Apache-2.0"
] | null | null | null | tests/test_image_rw.py | function2-llx/MONAI | 4cddaa830b61b88ec78e089bb5f21e05bb1a78f4 | [
"Apache-2.0"
] | null | null | null | tests/test_image_rw.py | function2-llx/MONAI | 4cddaa830b61b88ec78e089bb5f21e05bb1a78f4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 43.205882 | 120 | 0.65228 |
797534933a7330993cd6578ac8facdb12f90fe43 | 2,357 | py | Python | game_seq_embedder/app/run_finetune.py | Anonymous9999999/Pretrain-via-MTC | bc47c162aecb68708b68d8ff7c9bfd54b0fc485e | [
"Artistic-1.0-Perl"
] | null | null | null | game_seq_embedder/app/run_finetune.py | Anonymous9999999/Pretrain-via-MTC | bc47c162aecb68708b68d8ff7c9bfd54b0fc485e | [
"Artistic-1.0-Perl"
] | null | null | null | game_seq_embedder/app/run_finetune.py | Anonymous9999999/Pretrain-via-MTC | bc47c162aecb68708b68d8ff7c9bfd54b0fc485e | [
"Artistic-1.0-Perl"
] | null | null | null | import argparse
import h5py
import sys
from torch import optim
import random
import ipdb
sys.path.append('..')
from game_seq_embedder import init_behavior_sequence_embedder
# [BPE, Use Time Embedding]
# python run_finetune.py --model_dir /home/iamlxb3/temp_rsync_dir/game_bert/bert_model/game_bert_time_embed_BPE_DEBU... | 36.261538 | 152 | 0.742469 |
7975361749f7d79f3e4347325c78eccb76b721b8 | 87,035 | py | Python | src/transformers/models/rag/modeling_rag.py | reichang182/Transformer | 301536b15f1e757c51411800c25876617e9f1191 | [
"Apache-2.0"
] | 34 | 2021-07-05T02:44:31.000Z | 2022-03-28T14:39:57.000Z | src/transformers/models/rag/modeling_rag.py | slavetothebiologicalforce/transformers | 6f90c29eaaba898919b7689ab7e2cfce1604cdb8 | [
"Apache-2.0"
] | 3 | 2021-07-22T15:49:44.000Z | 2022-03-19T08:46:27.000Z | src/transformers/models/rag/modeling_rag.py | slavetothebiologicalforce/transformers | 6f90c29eaaba898919b7689ab7e2cfce1604cdb8 | [
"Apache-2.0"
] | 6 | 2021-07-05T02:44:32.000Z | 2022-02-14T10:10:13.000Z | # coding=utf-8
# Copyright 2020, The RAG Authors and The HuggingFace Inc. team.
#
# 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 r... | 53.791718 | 190 | 0.665365 |
7975367638974979532191242ae89eeddc64e809 | 4,418 | py | Python | jacket/compute/opts.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | null | null | null | jacket/compute/opts.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | null | null | null | jacket/compute/opts.py | bopopescu/jacket | d7ad3147fcb43131098c2a5210847634ff5fb325 | [
"Apache-2.0"
] | 2 | 2016-08-10T02:21:49.000Z | 2020-07-24T01:57:21.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 40.53211 | 85 | 0.716614 |
7975373a05adc2f85b025b352b84936c081aa501 | 5,948 | py | Python | src/pybel_git/gitlab.py | cthoyt/pybel-git | a1e4a2477a7a003d1786eeb3754615f37de8dfe7 | [
"MIT"
] | 1 | 2019-11-09T02:32:57.000Z | 2019-11-09T02:32:57.000Z | src/pybel_git/gitlab.py | pybel/pybel-git | a1e4a2477a7a003d1786eeb3754615f37de8dfe7 | [
"MIT"
] | 4 | 2018-12-01T11:03:53.000Z | 2019-11-20T00:23:20.000Z | src/pybel_git/gitlab.py | cthoyt/pybel-git | a1e4a2477a7a003d1786eeb3754615f37de8dfe7 | [
"MIT"
] | 1 | 2019-01-27T14:06:52.000Z | 2019-01-27T14:06:52.000Z | # -*- coding: utf-8 -*-
"""Utilities for interacting with the HBP repository on GitLab."""
import logging
from io import StringIO
from typing import Iterable, Optional, Set
import click
from easy_config import EasyConfig
from git import GitCommandError, Repo
from gitlab import Gitlab
from gitlab.v4.objects import Pr... | 29.74 | 89 | 0.570108 |
7975376e318726f265a6b3a28c4787bbc8a60c98 | 7,620 | py | Python | spiderJD.py | PALYmyGXG/tensoflow_flask_httpx_id48_project | 45efe14e2dad13eb94a10a0d87b69b08737d02c3 | [
"Apache-2.0"
] | 1 | 2021-07-21T06:46:03.000Z | 2021-07-21T06:46:03.000Z | spiderJD.py | PALYmyGXG/tensoflow_flask_httpx_id48_project | 45efe14e2dad13eb94a10a0d87b69b08737d02c3 | [
"Apache-2.0"
] | null | null | null | spiderJD.py | PALYmyGXG/tensoflow_flask_httpx_id48_project | 45efe14e2dad13eb94a10a0d87b69b08737d02c3 | [
"Apache-2.0"
] | null | null | null | import asyncio
import datetime
from lxml import etree
from httpx import AsyncClient
from sqlalchemy.orm import sessionmaker
import isHoliday, SQLModule
from SQLModule import engine
from proxy import MySession
class JingDong():
def __init__(self, Session_class):
self.AsyncSession = AsyncClient()
s... | 59.53125 | 1,657 | 0.62021 |
79753861ba92575994abda451e707f710ddb2794 | 35,610 | py | Python | pipenv/patched/pip/req/req_set.py | hoesler/pipenv | 704c622369154d7421de6bac28eda466565cd3a4 | [
"MIT"
] | 1 | 2021-02-05T17:35:47.000Z | 2021-02-05T17:35:47.000Z | pipenv/patched/pip/req/req_set.py | hoesler/pipenv | 704c622369154d7421de6bac28eda466565cd3a4 | [
"MIT"
] | 4 | 2020-03-24T16:06:51.000Z | 2021-06-10T20:48:41.000Z | pipenv/patched/pip/req/req_set.py | hoesler/pipenv | 704c622369154d7421de6bac28eda466565cd3a4 | [
"MIT"
] | 1 | 2021-11-15T22:41:10.000Z | 2021-11-15T22:41:10.000Z | from __future__ import absolute_import
from collections import defaultdict
from itertools import chain
import logging
import os
from pip._vendor import pkg_resources
from pip._vendor import requests
from pip.compat import expanduser
from pip.download import (is_file_url, is_dir_url, is_vcs_url, url_to_path,
... | 42.955368 | 96 | 0.562932 |
79753979b94d9cdc7f541ddae4a68b2ce87c2d30 | 9,723 | py | Python | Tic-Tac-Toe/task/tests.py | drtierney/hyperskill-TicTacToe-python | 9e95799f20603c7e973a2685238b4ce0673726b7 | [
"MIT"
] | null | null | null | Tic-Tac-Toe/task/tests.py | drtierney/hyperskill-TicTacToe-python | 9e95799f20603c7e973a2685238b4ce0673726b7 | [
"MIT"
] | null | null | null | Tic-Tac-Toe/task/tests.py | drtierney/hyperskill-TicTacToe-python | 9e95799f20603c7e973a2685238b4ce0673726b7 | [
"MIT"
] | null | null | null | from hstest.stage_test import *
from hstest.test_case import TestCase
from enum import Enum
from typing import List, Optional
from copy import deepcopy
CheckResult.correct = lambda: CheckResult(True, '')
CheckResult.wrong = lambda feedback: CheckResult(False, feedback)
class FieldState(Enum):
X = 'X'
O = 'O'... | 30.102167 | 87 | 0.492749 |
79753985dfd0a4954826f3f04671f1fb08817025 | 638 | py | Python | contest/urls/admin.py | BUPT-EDU/OnlineJudge | f8b135cedb9978989dfd4130fd596820953c93a6 | [
"MIT"
] | 2 | 2019-11-12T02:58:06.000Z | 2019-11-13T06:33:51.000Z | contest/urls/admin.py | BUPT-EDU/OnlineJudge | f8b135cedb9978989dfd4130fd596820953c93a6 | [
"MIT"
] | 6 | 2020-06-06T00:37:26.000Z | 2021-06-10T22:14:44.000Z | contest/urls/admin.py | BUPT-EDU/OnlineJudge | f8b135cedb9978989dfd4130fd596820953c93a6 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from ..views.admin import ContestAnnouncementAPI, ContestAPI, ACMContestHelper, DownloadContestSubmissions, ContestGroupAPI
urlpatterns = [
url(r"^contest/?$", ContestAPI.as_view(), name="contest_admin_api"),
url(r"^contest/announcement/?$", ContestAnnouncementAPI.as_view(), n... | 53.166667 | 123 | 0.763323 |
79753a351e7fd162453a545892efc07c31147bef | 379 | py | Python | JumpScale9Lib/servers/gedis/base/blueprints/gedis/routes.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 2 | 2017-06-07T08:11:47.000Z | 2017-11-10T02:19:48.000Z | JumpScale9Lib/servers/gedis/base/blueprints/gedis/routes.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 188 | 2017-06-21T06:16:13.000Z | 2020-06-17T14:20:24.000Z | JumpScale9Lib/servers/gedis/base/blueprints/gedis/routes.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 3 | 2018-06-12T05:18:28.000Z | 2019-09-24T06:49:17.000Z | from flask import render_template, redirect, request, url_for
from blueprints.gedis import *
from js9 import j
login_manager = j.servers.web.latest.loader.login_manager
@blueprint.route('/')
def route_default():
return redirect('/%s/index_.html'%name)
# @login_required
@blueprint.route('/<template>')
def route_... | 21.055556 | 61 | 0.762533 |
79753a5b5a5c79e513e2ae69864892feacbb226e | 21,689 | py | Python | src/hw_intf_keepkey.py | gewelio/gewel-masternode-tool | 3d18a68789f6428f9f631689d19c69eb8d384fa4 | [
"MIT"
] | null | null | null | src/hw_intf_keepkey.py | gewelio/gewel-masternode-tool | 3d18a68789f6428f9f631689d19c69eb8d384fa4 | [
"MIT"
] | null | null | null | src/hw_intf_keepkey.py | gewelio/gewel-masternode-tool | 3d18a68789f6428f9f631689d19c69eb8d384fa4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: Bertrand256
# Created on: 2017-03
import json
import binascii
import logging
import struct
import unicodedata
from decimal import Decimal
from typing import Optional, Tuple, List, Dict
from keepkeylib.client import TextUIMixin as keepkey_TextUIMixin
from keepkeyl... | 40.164815 | 119 | 0.624648 |
79753acaa87dcb7e792ab8132bb844c48333d1cb | 12,041 | py | Python | llvm/utils/update_cc_test_checks.py | dan-zheng/llvm-project | 6b792850da0345274758c9260fda5df5e57ab486 | [
"Apache-2.0"
] | null | null | null | llvm/utils/update_cc_test_checks.py | dan-zheng/llvm-project | 6b792850da0345274758c9260fda5df5e57ab486 | [
"Apache-2.0"
] | null | null | null | llvm/utils/update_cc_test_checks.py | dan-zheng/llvm-project | 6b792850da0345274758c9260fda5df5e57ab486 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
'''A utility to update LLVM IR CHECK lines in C/C++ FileCheck test files.
Example RUN lines in .c/.cc test files:
// RUN: %clang -emit-llvm -S %s -o - -O2 | FileCheck %s
// RUN: %clangxx -emit-llvm -S %s -o - -O2 | FileCheck -check-prefix=CHECK-A %s
Usage:
% utils/update_cc_test_checks.py --l... | 39.221498 | 103 | 0.655759 |
79753bb140d50eaef6b699a69799666a6e5e5ea4 | 150 | py | Python | ten-sum-positive.py | Omi0604/DCU-Einstein- | b35e2657b8e27904035e881021c9bdf9e51675bb | [
"MIT"
] | null | null | null | ten-sum-positive.py | Omi0604/DCU-Einstein- | b35e2657b8e27904035e881021c9bdf9e51675bb | [
"MIT"
] | null | null | null | ten-sum-positive.py | Omi0604/DCU-Einstein- | b35e2657b8e27904035e881021c9bdf9e51675bb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
total = 0
n = 10
i = 0
while i < n:
p = int(input())
if p > 0:
total = total + p
i = i + 1
print(total)
| 10.714286 | 25 | 0.473333 |
79753be4b460f489f4c8171779116be6ee585336 | 34 | py | Python | tests/__init__.py | eas342/jtow | 22f07da7e625b7d62dd93eaa240412cecc75893b | [
"MIT"
] | null | null | null | tests/__init__.py | eas342/jtow | 22f07da7e625b7d62dd93eaa240412cecc75893b | [
"MIT"
] | null | null | null | tests/__init__.py | eas342/jtow | 22f07da7e625b7d62dd93eaa240412cecc75893b | [
"MIT"
] | null | null | null | """Unit test package for jtow."""
| 17 | 33 | 0.647059 |
79753c3e71dc1fb7bed45eeaf9b0f1321c659f6d | 11,514 | py | Python | vae/qgevalcap/eval.py | Carlos-UR/Info-HCVAE | 6d869c8be2ed123c3e8eb9970c4a0b60b0b3c6d5 | [
"Apache-2.0"
] | 120 | 2020-04-12T12:48:41.000Z | 2022-03-28T06:57:16.000Z | vae/qgevalcap/eval.py | Carlos-UR/Info-HCVAE | 6d869c8be2ed123c3e8eb9970c4a0b60b0b3c6d5 | [
"Apache-2.0"
] | 12 | 2020-07-21T04:16:53.000Z | 2022-03-22T06:59:31.000Z | vae/qgevalcap/eval.py | Carlos-UR/Info-HCVAE | 6d869c8be2ed123c3e8eb9970c4a0b60b0b3c6d5 | [
"Apache-2.0"
] | 20 | 2020-06-02T17:35:37.000Z | 2022-03-12T08:10:46.000Z | import os
import copy
from collections import defaultdict
from argparse import ArgumentParser
import pickle
import json
from json import encoder
import math
def precook(s, n=4, out=False):
"""Takes a string as input and returns an object that can be given to
either cook_refs or cook_test. This is optional: co... | 31.80663 | 116 | 0.558364 |
79753c53bf71faa355bf4ce8484e204607fecf86 | 1,214 | py | Python | tests/analysis/trials/test_create.py | NRauschmayr/sagemaker-debugger | 24ed65631143fcc0457fb325a102500ebd69adfc | [
"Apache-2.0"
] | 133 | 2019-12-03T18:56:27.000Z | 2022-03-18T19:54:49.000Z | tests/analysis/trials/test_create.py | NRauschmayr/sagemaker-debugger | 24ed65631143fcc0457fb325a102500ebd69adfc | [
"Apache-2.0"
] | 384 | 2019-12-04T03:04:14.000Z | 2022-03-31T20:42:48.000Z | tests/analysis/trials/test_create.py | NRauschmayr/sagemaker-debugger | 24ed65631143fcc0457fb325a102500ebd69adfc | [
"Apache-2.0"
] | 64 | 2019-12-05T20:39:51.000Z | 2022-03-25T13:30:54.000Z | # Standard Library
import uuid
# Third Party
import pytest
from tests.analysis.utils import generate_data
# First Party
from smdebug.trials import create_trial
def test_creation_local():
trial_name = str(uuid.uuid4())
path = "ts_output/train/"
num_steps = 20
num_tensors = 10
for i in range(num_s... | 24.77551 | 66 | 0.574135 |
79753d1f071fe8bdebf227b122dff03ce3880696 | 1,579 | py | Python | rot13.py | BenFeder/kenzie-se-q3-rot13-BenFeder | ed50379784d48b16f801d5183dd68912237476c8 | [
"MIT"
] | null | null | null | rot13.py | BenFeder/kenzie-se-q3-rot13-BenFeder | ed50379784d48b16f801d5183dd68912237476c8 | [
"MIT"
] | null | null | null | rot13.py | BenFeder/kenzie-se-q3-rot13-BenFeder | ed50379784d48b16f801d5183dd68912237476c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Kenzie Assignment: rot13
"""
# Your name, plus anyone who helped you with this assignment.
# Give credit where credit is due.
__author__ = "Benjamin Feder, http://www.asciitable.com/, geeksforgeeks.org"
import sys
def rotate(message):
"""
Returns the encoded... | 24.671875 | 78 | 0.576314 |
79753dcd1129590295eb6c21ff7163679deaae10 | 2,676 | py | Python | NMT_Analogies/utils.py | justinxu421/224n-project | d7782ec15ca944c67b3808fd55b7fa11a2f5124e | [
"BSD-2-Clause"
] | 1 | 2019-07-18T06:35:11.000Z | 2019-07-18T06:35:11.000Z | NMT_Analogies/utils.py | justinxu421/224n-project | d7782ec15ca944c67b3808fd55b7fa11a2f5124e | [
"BSD-2-Clause"
] | null | null | null | NMT_Analogies/utils.py | justinxu421/224n-project | d7782ec15ca944c67b3808fd55b7fa11a2f5124e | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
CS224N 2018-19: Homework 4
nmt.py: NMT Model
Pencheng Yin <pcyin@cs.cmu.edu>
Sahil Chopra <schopra8@stanford.edu>
"""
import math
from typing import List
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
def pad_sents(sents, pad... | 31.482353 | 100 | 0.642003 |
79753e32284755a48ef322ae04857148e1ba8635 | 2,581 | py | Python | pycomicvine/tests/story_arcs.py | jbbandos/pycomicvine | 8af948567c23ba95927e6bdeb300c3377761cdfa | [
"MIT"
] | 12 | 2016-08-08T09:24:59.000Z | 2021-12-10T18:34:29.000Z | pycomicvine/tests/story_arcs.py | jbbandos/pycomicvine | 8af948567c23ba95927e6bdeb300c3377761cdfa | [
"MIT"
] | 1 | 2015-08-07T16:32:28.000Z | 2015-08-07T16:32:28.000Z | pycomicvine/tests/story_arcs.py | jbbandos/pycomicvine | 8af948567c23ba95927e6bdeb300c3377761cdfa | [
"MIT"
] | 4 | 2015-01-14T23:43:38.000Z | 2015-10-19T15:32:12.000Z | import pycomicvine
import datetime
from pycomicvine.tests.utils import *
pycomicvine.api_key = "476302e62d7e8f8f140182e36aebff2fe935514b"
class TestStoryArcsList(ListResourceTestCase):
def test_get_id_and_name(self):
self.get_id_and_name_test(
pycomicvine.StoryArcs,
pycomic... | 32.2625 | 69 | 0.489345 |
79753eebd29af42caaa2b2f764faa29abbe6c28c | 1,335 | py | Python | Chapter08/0815.py | 0201shj/Python-OpenCV | 249f8cc9404e547da0f5c68000f29f2e598562a5 | [
"MIT"
] | null | null | null | Chapter08/0815.py | 0201shj/Python-OpenCV | 249f8cc9404e547da0f5c68000f29f2e598562a5 | [
"MIT"
] | null | null | null | Chapter08/0815.py | 0201shj/Python-OpenCV | 249f8cc9404e547da0f5c68000f29f2e598562a5 | [
"MIT"
] | null | null | null | # 0815.py
import cv2
import numpy as np
#1
src = cv2.imread('./data/hand.jpg')
hsv = cv2.cvtColor(src, cv2.COLOR_BGR2HSV)
lowerb = (0, 40, 0)
upperb = (20, 180, 255)
bImage = cv2.inRange(hsv, lowerb, upperb)
mode = cv2.RETR_EXTERNAL
method = cv2.CHAIN_APPROX_SIMPLE
contours, hierarchy = cv2.findContour... | 26.7 | 61 | 0.601498 |
7975401e5fca400cd128322279ce4fc8fb011652 | 1,669 | py | Python | python/heap_sort.py | Surya-06/My-Solutions | 58f7c7f1a0a3a28f25eff22d03a09cb2fbcf7806 | [
"MIT"
] | null | null | null | python/heap_sort.py | Surya-06/My-Solutions | 58f7c7f1a0a3a28f25eff22d03a09cb2fbcf7806 | [
"MIT"
] | null | null | null | python/heap_sort.py | Surya-06/My-Solutions | 58f7c7f1a0a3a28f25eff22d03a09cb2fbcf7806 | [
"MIT"
] | null | null | null | import sys
a=raw_input("enter the numbers\n").split(" ")
add=[]
found=False
total=0
class node:
global total,add,found
data=left=right=None
def __init__(self,dat):
self.data=dat
def ins(self,num):
global total
if self.left==None:
self.left=node(num)
total+=1
add.append(self.left)
self.check()
# ... | 24.188406 | 61 | 0.667466 |
79754068ec795347df745302df5ec22e41e09608 | 102,762 | py | Python | unittests/test_iso8601.py | UKTradeInvestment/pyslet | 70f9731df4d874379649eeacb79d8a6583b3dcaa | [
"BSD-3-Clause"
] | 2 | 2016-09-16T11:17:43.000Z | 2016-10-19T11:15:53.000Z | unittests/test_iso8601.py | UKTradeInvestment/pyslet | 70f9731df4d874379649eeacb79d8a6583b3dcaa | [
"BSD-3-Clause"
] | 2 | 2018-06-29T10:53:50.000Z | 2021-04-06T07:55:54.000Z | unittests/test_iso8601.py | UKTradeInvestment/pyslet | 70f9731df4d874379649eeacb79d8a6583b3dcaa | [
"BSD-3-Clause"
] | 2 | 2016-10-13T15:12:50.000Z | 2021-01-13T11:58:18.000Z | #! /usr/bin/env python
"""Runs unit tests on the pyslet.iso8601 module"""
import logging
import time
import unittest
import pyslet.iso8601 as iso
from pyslet.py2 import is_unicode, range3, to_text, ul
def suite():
return unittest.TestSuite((
unittest.makeSuite(MiscTests),
unittest.makeSuite(Da... | 47.53099 | 79 | 0.554076 |
7975414e868a7b4feb59184f1ae397de5340dbc1 | 4,043 | py | Python | humingobuild.py | jpvelsamy/sparrow | d6424a02047cf0ce5fff66c06e3365df3e36a58e | [
"Apache-2.0"
] | null | null | null | humingobuild.py | jpvelsamy/sparrow | d6424a02047cf0ce5fff66c06e3365df3e36a58e | [
"Apache-2.0"
] | null | null | null | humingobuild.py | jpvelsamy/sparrow | d6424a02047cf0ce5fff66c06e3365df3e36a58e | [
"Apache-2.0"
] | 4 | 2017-09-30T05:10:23.000Z | 2018-12-15T19:51:36.000Z | import logging
import os
import sys
import subprocess
import pwd
import io
import humingocommons
logger = logging.getLogger("CommandCenter")
class Build:
def __init__(self, configObject):
self.configObject=configObject
self.javaHome=configObject.getJavaHome()
def cleanBuild(self):
... | 45.426966 | 194 | 0.736582 |
7975415464bdf9086363882be5e74bf46c4eaee1 | 5,362 | py | Python | src/simple_regression.py | haojunqiu/csc110-project | f379d66709c89e33a312fb054bc91619e0fe6a92 | [
"MIT"
] | null | null | null | src/simple_regression.py | haojunqiu/csc110-project | f379d66709c89e33a312fb054bc91619e0fe6a92 | [
"MIT"
] | null | null | null | src/simple_regression.py | haojunqiu/csc110-project | f379d66709c89e33a312fb054bc91619e0fe6a92 | [
"MIT"
] | 1 | 2022-01-11T04:26:48.000Z | 2022-01-11T04:26:48.000Z | """CSC110 final project, main module
Descriptions
===============================
This module contains all the functions we used to implement the
simple linear regression model.
Copyright and Usage Information
===============================
All forms of distribution of this code, whether as given or with any chang... | 31.356725 | 92 | 0.619172 |
797542f9dcc68a9a4c0ef008f565f7f76ee648e5 | 42,154 | py | Python | cea/technologies/thermal_network/substation_matrix.py | pajotca/CityEnergyAnalyst | f3d0a08f7b5f5967961bf831625544a95c7702f0 | [
"MIT"
] | 1 | 2018-08-16T14:34:23.000Z | 2018-08-16T14:34:23.000Z | cea/technologies/thermal_network/substation_matrix.py | pajotca/CityEnergyAnalyst | f3d0a08f7b5f5967961bf831625544a95c7702f0 | [
"MIT"
] | null | null | null | cea/technologies/thermal_network/substation_matrix.py | pajotca/CityEnergyAnalyst | f3d0a08f7b5f5967961bf831625544a95c7702f0 | [
"MIT"
] | null | null | null | """
Implements the substation model.
"""
from __future__ import division
import pandas as pd
import time
import numpy as np
import scipy
import cea.config
from math import ceil
from cea.constants import HEAT_CAPACITY_OF_WATER_JPERKGK
from cea.technologies.constants import DT_COOL, DT_HEAT, U_COOL, U_HEAT, FULL_COOLING_... | 48.01139 | 135 | 0.572117 |
797543cc8cf5a986a13ed8e3779676075a7b57da | 4,039 | py | Python | configs/wider_face/ssd300_wider_face.py | Lechatelia/own_mmdet | eac5db1d1bee8eafe0ed46fa4bb61ca8605b502f | [
"Apache-2.0"
] | 24 | 2021-10-14T03:28:28.000Z | 2022-03-29T09:30:04.000Z | configs/wider_face/ssd300_wider_face.py | Lechatelia/own_mmdet | eac5db1d1bee8eafe0ed46fa4bb61ca8605b502f | [
"Apache-2.0"
] | 4 | 2021-12-14T15:04:49.000Z | 2022-02-19T09:54:42.000Z | configs/wider_face/ssd300_wider_face.py | Lechatelia/own_mmdet | eac5db1d1bee8eafe0ed46fa4bb61ca8605b502f | [
"Apache-2.0"
] | 4 | 2021-10-31T11:23:06.000Z | 2021-12-17T06:38:50.000Z | # model settings
input_size = 300
model = dict(
type='SingleStageDetector',
pretrained='open-mmlab://vgg16_caffe',
backbone=dict(
type='SSDVGG',
input_size=input_size,
depth=16,
with_last_pool=False,
ceil_mode=True,
out_indices=(3, 4),
out_... | 29.698529 | 80 | 0.581332 |
797545a4b0f70cd73c0bed06cb5ecb8621241459 | 5,927 | py | Python | object_detection/eval.py | DengZhuangSouthRd/SatelliteDetector | 090ad65f495a665226d00023cc0a1e954d21ead3 | [
"Apache-2.0"
] | 1 | 2018-05-28T04:18:42.000Z | 2018-05-28T04:18:42.000Z | object_detection/eval.py | DengZhuangSouthRd/SatelliteDetector | 090ad65f495a665226d00023cc0a1e954d21ead3 | [
"Apache-2.0"
] | null | null | null | object_detection/eval.py | DengZhuangSouthRd/SatelliteDetector | 090ad65f495a665226d00023cc0a1e954d21ead3 | [
"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.27673 | 80 | 0.709634 |
79754675f5af7c479c47fc06d3ba1990857b453a | 5,301 | py | Python | network/lraspp.py | ekzhang/semantic-segmentation | 12169882f443f0e1a026d3d04275908a0f14b463 | [
"BSD-3-Clause"
] | 15 | 2020-10-06T08:24:50.000Z | 2022-02-17T06:46:10.000Z | network/lraspp.py | ekzhang/semantic-segmentation | 12169882f443f0e1a026d3d04275908a0f14b463 | [
"BSD-3-Clause"
] | null | null | null | network/lraspp.py | ekzhang/semantic-segmentation | 12169882f443f0e1a026d3d04275908a0f14b463 | [
"BSD-3-Clause"
] | 4 | 2020-11-29T10:07:46.000Z | 2021-08-30T08:26:13.000Z | """Lite Reduced Atrous Spatial Pyramid Pooling
Architecture introduced in the MobileNetV3 (2019) paper, as an
efficient semantic segmentation head.
This file was modified from FastSeg. Original source:
https://github.com/ekzhang/fastseg
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
from net... | 37.330986 | 92 | 0.589134 |
797548274cc33d9de148225534342c7e1774d7dd | 23,646 | py | Python | model.py | ZLJ2015106/CAMP_iccv19 | 18d9ae24932b13905f1f5451efe13e77b3ec8e89 | [
"Apache-2.0"
] | null | null | null | model.py | ZLJ2015106/CAMP_iccv19 | 18d9ae24932b13905f1f5451efe13e77b3ec8e89 | [
"Apache-2.0"
] | null | null | null | model.py | ZLJ2015106/CAMP_iccv19 | 18d9ae24932b13905f1f5451efe13e77b3ec8e89 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.distributed as dist ## 分布式通信,可以做分布式训练,多线程多节点训练
import torch.nn.init ## 参数初始化
import torchvision.models as models ## pytorch中集成的经典模型,resnet等
from torch.autograd import Variable ## 图的自动求导机制
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence ## 填充序列... | 37.179245 | 107 | 0.580267 |
79754828822951e51cb6d31eafefec19647d454b | 7,667 | py | Python | src/homepage2vec/textual_extractor.py | epfl-dlab/homepage2vec | 7f5983abee781434fa0bb24a3c44a5adc97b5d25 | [
"MIT"
] | 8 | 2022-01-18T07:06:44.000Z | 2022-03-10T14:27:32.000Z | src/homepage2vec/textual_extractor.py | epfl-dlab/homepage2vec | 7f5983abee781434fa0bb24a3c44a5adc97b5d25 | [
"MIT"
] | 1 | 2022-02-10T09:29:32.000Z | 2022-03-23T20:55:22.000Z | src/homepage2vec/textual_extractor.py | epfl-dlab/homepage2vec | 7f5983abee781434fa0bb24a3c44a5adc97b5d25 | [
"MIT"
] | 1 | 2022-02-21T17:00:01.000Z | 2022-02-21T17:00:01.000Z | import re
from bs4 import BeautifulSoup
from sentence_transformers import SentenceTransformer
# import pandas as pd
from collections import Counter
class TextualExtractor:
"""
Extract textual features from the html content of a webpage
"""
xlmr = None
def __init__(self, device='cpu'):
if ... | 28.715356 | 116 | 0.632712 |
79754874bed52bd8d28b69f5e66bd0e93d86186c | 16,845 | py | Python | rmgpy/thermo/nasaTest.py | tza0035/RMG-Py | 38c49f7107d1b19e4a534408a1040ddd313b8596 | [
"MIT"
] | 250 | 2015-06-06T23:32:00.000Z | 2022-03-22T16:45:16.000Z | rmgpy/thermo/nasaTest.py | tza0035/RMG-Py | 38c49f7107d1b19e4a534408a1040ddd313b8596 | [
"MIT"
] | 1,781 | 2015-05-26T23:52:00.000Z | 2022-03-31T19:07:54.000Z | rmgpy/thermo/nasaTest.py | tza0035/RMG-Py | 38c49f7107d1b19e4a534408a1040ddd313b8596 | [
"MIT"
] | 161 | 2015-06-02T14:28:59.000Z | 2022-03-02T19:37:14.000Z | #!/usr/bin/env python3
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# ... | 46.150685 | 120 | 0.583912 |
797548b50a200c6476125cd90e001d3dcd90bfb8 | 6,125 | gyp | Python | appRTCdesk.gyp | Temasys/appRTCDesk | 5b956fa12ea6b3b03a8d732f707bd3968af04928 | [
"Apache-2.0"
] | 46 | 2015-01-05T15:37:00.000Z | 2022-02-03T08:16:16.000Z | appRTCdesk.gyp | Temasys/appRTCDesk | 5b956fa12ea6b3b03a8d732f707bd3968af04928 | [
"Apache-2.0"
] | 2 | 2015-03-02T08:59:04.000Z | 2018-06-01T04:45:30.000Z | appRTCdesk.gyp | Temasys/appRTCDesk | 5b956fa12ea6b3b03a8d732f707bd3968af04928 | [
"Apache-2.0"
] | 19 | 2015-04-27T17:24:44.000Z | 2020-03-13T09:54:02.000Z | # (c) Copyright 2014 Temasys Communication, Pte Ltd.
{
'variables':
{
'conditions':
[
[ 'OS in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]',
{
# Use the systemwide Qt libs by default
'variables':
{
'qt_sdk%': '/usr',
},
'qt_sdk': '<(qt_sdk)',
'qt_moc%': '/usr/bin... | 24.598394 | 102 | 0.556082 |
79754954225b672bd997f00e33b95e01a2223818 | 23,313 | py | Python | cohesity_management_sdk/models/cluster.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | 1 | 2019-11-07T23:19:32.000Z | 2019-11-07T23:19:32.000Z | cohesity_management_sdk/models/cluster.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | cohesity_management_sdk/models/cluster.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
import cohesity_management_sdk.models.apps_config
import cohesity_management_sdk.models.cluster_audit_log_configuration
import cohesity_management_sdk.models.eula_config
import cohesity_management_sdk.models.filer_audit_log_configuration
import cohesity_management... | 53.347826 | 236 | 0.676532 |
79754a8eadd7db0ff363c4a80c9de0bfa53a491d | 2,737 | py | Python | tests/models/validators/v2_1_1/jsd_9582ab824ce8b29d.py | wastorga/dnacentersdk | 1a25aaef2eaa016fe54ebebbd7448919e0effa3f | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_1/jsd_9582ab824ce8b29d.py | wastorga/dnacentersdk | 1a25aaef2eaa016fe54ebebbd7448919e0effa3f | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_1/jsd_9582ab824ce8b29d.py | wastorga/dnacentersdk | 1a25aaef2eaa016fe54ebebbd7448919e0effa3f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Add Port assignment for user device data model.
Copyright (c) 2019 Cisco and/or its affiliates.
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 restr... | 32.583333 | 78 | 0.595543 |
79754c5cb2051b2414dda799092b2e79e32e3ba0 | 4,958 | py | Python | gammux3.py | Feriixu/gammux | 6537d079d503f8fdf77f22ac807a4bb39a23ff9d | [
"Apache-2.0"
] | 45 | 2018-09-18T18:09:25.000Z | 2021-06-18T19:04:08.000Z | gammux3.py | Feriixu/gammux | 6537d079d503f8fdf77f22ac807a4bb39a23ff9d | [
"Apache-2.0"
] | 4 | 2019-03-23T23:32:29.000Z | 2019-04-02T16:48:34.000Z | gammux3.py | Feriixu/gammux | 6537d079d503f8fdf77f22ac807a4bb39a23ff9d | [
"Apache-2.0"
] | 3 | 2019-03-29T16:18:52.000Z | 2021-06-17T18:26:10.000Z | #!/usr/bin/python
"""
This program muxes two images together by splitting them into high and low gamma pieces, and then
interleaving them. Several imaging programs don't honor the gamma settings on images when
resizing them, leading to an incorrect (and amusing) preference for the Thumbnail image. This is
ca... | 37.278195 | 100 | 0.61315 |
79754e36a4d5ef00133a0449f555a51c006cb13f | 390 | py | Python | HackerRank/Python/Python_Functionals/Validating_Email_Adresses_With_a_Filter.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | 1 | 2018-01-30T13:21:30.000Z | 2018-01-30T13:21:30.000Z | HackerRank/Python/Python_Functionals/Validating_Email_Adresses_With_a_Filter.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | null | null | null | HackerRank/Python/Python_Functionals/Validating_Email_Adresses_With_a_Filter.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | 1 | 2018-08-29T13:26:50.000Z | 2018-08-29T13:26:50.000Z | def check(s):
idx1, idx2 = s.find("@"), s.find(".")
ok = idx1>0 and all(it.isalnum() or it=="@" or it=="-" or it=="_" for it in s[:idx1])
ok &= ~idx2 and idx2-idx1>1 and all(it.isalnum() for it in s[idx1+1:idx2])
ok &= ~idx2 and 1<=len(s[idx2+1:])<=3 and s.count("@")==1 and s.count(".")==1
return ok... | 48.75 | 89 | 0.561538 |
79754f2de69719c3f9e51b70931dff1f55520118 | 6,067 | py | Python | cride/rides/serializers/rides.py | juanmunoz22-bit/cride | 30f0c6b260b304894e6eb8043acaf6b0be20b971 | [
"MIT"
] | null | null | null | cride/rides/serializers/rides.py | juanmunoz22-bit/cride | 30f0c6b260b304894e6eb8043acaf6b0be20b971 | [
"MIT"
] | null | null | null | cride/rides/serializers/rides.py | juanmunoz22-bit/cride | 30f0c6b260b304894e6eb8043acaf6b0be20b971 | [
"MIT"
] | null | null | null | """Rides Serializer"""
# DRF
from rest_framework import serializers
# Models
from cride.rides.models import Ride
from cride.circles.models import Membership, Circle
from cride.users.models import User
# Serializers
from cride.users.serializers import UserModelSerializer
# Utils
from datetime import ti... | 30.335 | 98 | 0.598978 |
79755370490ebdbb25c8d678d4771f0c571de26c | 10,409 | py | Python | src/pretix/presale/urls.py | fakegit/pretix | b6e9e64ff967f7b4f91fe88694f4157d8a0787b4 | [
"Apache-2.0"
] | null | null | null | src/pretix/presale/urls.py | fakegit/pretix | b6e9e64ff967f7b4f91fe88694f4157d8a0787b4 | [
"Apache-2.0"
] | 56 | 2020-05-07T07:54:17.000Z | 2021-04-19T12:14:14.000Z | src/pretix/presale/urls.py | fakegit/pretix | b6e9e64ff967f7b4f91fe88694f4157d8a0787b4 | [
"Apache-2.0"
] | null | null | null | #
# This file is part of pretix (Community Edition).
#
# Copyright (C) 2014-2020 Raphael Michel and contributors
# Copyright (C) 2020-2021 rami.io GmbH and contributors
#
# 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 ... | 58.80791 | 135 | 0.688635 |
7975544fac920886dcc741f32ea5381fbbd7b6cc | 3,671 | py | Python | GA3C_ipy/ProcessAgent.py | JungAh12/GA3C | dd5b508669cddaefc5d6b9832885097b4bdfadd5 | [
"BSD-3-Clause"
] | null | null | null | GA3C_ipy/ProcessAgent.py | JungAh12/GA3C | dd5b508669cddaefc5d6b9832885097b4bdfadd5 | [
"BSD-3-Clause"
] | null | null | null | GA3C_ipy/ProcessAgent.py | JungAh12/GA3C | dd5b508669cddaefc5d6b9832885097b4bdfadd5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from datetime import datetime
from multiprocessing import Process, Queue, Value
# In[2]:
import numpy as np
import time
# In[3]:
from Config import Config
from Environment import Environment
from Experience import Experience
# In[ ]:
class ProcessAgent(Proce... | 30.338843 | 114 | 0.57423 |
7975549d42cb919f12b0eeb2be1d78e9bfea7b95 | 3,880 | py | Python | src/landing_cms/settings.py | one-quaker/landing-cms | 0b4b5fcad2a8f231ef019d5a79c49db9583fc856 | [
"MIT"
] | null | null | null | src/landing_cms/settings.py | one-quaker/landing-cms | 0b4b5fcad2a8f231ef019d5a79c49db9583fc856 | [
"MIT"
] | 12 | 2020-02-12T00:07:12.000Z | 2022-03-11T23:45:28.000Z | src/landing_cms/settings.py | one-quaker/landing-cms | 0b4b5fcad2a8f231ef019d5a79c49db9583fc856 | [
"MIT"
] | 1 | 2019-04-22T18:05:48.000Z | 2019-04-22T18:05:48.000Z | """
Django settings for landing_cms project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
... | 26.040268 | 91 | 0.686856 |
79755621085ef2d4ff186cf406a6f341b1b65cba | 13,639 | py | Python | great_expectations/checkpoint/toolkit.py | denimalpaca/great_expectations | 0f28f3c2b3cc6fae3bc5d257c6d4d13dbcf37df0 | [
"Apache-2.0"
] | null | null | null | great_expectations/checkpoint/toolkit.py | denimalpaca/great_expectations | 0f28f3c2b3cc6fae3bc5d257c6d4d13dbcf37df0 | [
"Apache-2.0"
] | null | null | null | great_expectations/checkpoint/toolkit.py | denimalpaca/great_expectations | 0f28f3c2b3cc6fae3bc5d257c6d4d13dbcf37df0 | [
"Apache-2.0"
] | null | null | null | import datetime
import itertools
import os
import uuid
from typing import List, Optional, Union
import great_expectations.exceptions as ge_exceptions
from great_expectations.checkpoint import Checkpoint, LegacyCheckpoint, SimpleCheckpoint
from great_expectations.checkpoint.types.checkpoint_result import CheckpointResu... | 38.637394 | 114 | 0.696972 |
797556cab0abb8a9fa8e48a75a5a50a9b4db880a | 1,054 | py | Python | openstack_dashboard/dashboards/admin/users/panel.py | ameoba/horizon | ff9e367c98a8bb79f10914abffaaa04b0a461819 | [
"Apache-2.0"
] | 2 | 2019-12-29T09:20:13.000Z | 2020-01-01T13:12:34.000Z | openstack_dashboard/dashboards/admin/users/panel.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 1 | 2015-03-12T01:03:44.000Z | 2015-03-12T01:03:44.000Z | openstack_dashboard/dashboards/admin/users/panel.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 4 | 2015-05-05T08:17:28.000Z | 2020-02-05T10:47:06.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | 31 | 78 | 0.746679 |
7975574f12ac90e441c8d5cb5f486c5e1f497e82 | 47,858 | py | Python | fosscord/ext/commands/help.py | Random-Access-Exomemory/fosscord.py | 9a86358be9e973a9cbd2d2b0863a975dd18dde05 | [
"MIT"
] | null | null | null | fosscord/ext/commands/help.py | Random-Access-Exomemory/fosscord.py | 9a86358be9e973a9cbd2d2b0863a975dd18dde05 | [
"MIT"
] | null | null | null | fosscord/ext/commands/help.py | Random-Access-Exomemory/fosscord.py | 9a86358be9e973a9cbd2d2b0863a975dd18dde05 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
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, merg... | 35.714925 | 133 | 0.626102 |
7975575158ed442f634796e047b8ae26fb2c63d9 | 2,244 | py | Python | src/Infraestructura/clusterServer/loadBalancing/loadBalancer.py | lbarriosh/cygnus-cloud | 1a17fbb55de69adba2ec42db4c9a063865af4fbd | [
"Apache-2.0"
] | 3 | 2017-09-03T22:01:35.000Z | 2019-01-10T05:40:44.000Z | src/Infraestructura/clusterServer/loadBalancing/loadBalancer.py | lbarriosh/cygnus-cloud | 1a17fbb55de69adba2ec42db4c9a063865af4fbd | [
"Apache-2.0"
] | null | null | null | src/Infraestructura/clusterServer/loadBalancing/loadBalancer.py | lbarriosh/cygnus-cloud | 1a17fbb55de69adba2ec42db4c9a063865af4fbd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
'''
========================================================================
CygnusCloud
========================================================================
File: loadBalancer.py
Version: 1.1
Description: load balancer interfac... | 38.689655 | 97 | 0.613636 |
7975578d1580a0418c39f9336342ac96b96dc29c | 7,933 | py | Python | python-lophi/lophi/capture/__init__.py | patriotemeritus/LO-PHI | 8f92c4efb94061cb08b7e9b0ff96346565c12653 | [
"BSD-3-Clause"
] | 28 | 2016-02-26T00:54:16.000Z | 2022-02-24T12:21:15.000Z | python-lophi/lophi/capture/__init__.py | patriotemeritus/LO-PHI | 8f92c4efb94061cb08b7e9b0ff96346565c12653 | [
"BSD-3-Clause"
] | 2 | 2016-03-15T21:49:09.000Z | 2016-07-12T22:11:39.000Z | python-lophi/lophi/capture/__init__.py | patriotemeritus/LO-PHI | 8f92c4efb94061cb08b7e9b0ff96346565c12653 | [
"BSD-3-Clause"
] | 9 | 2016-06-08T14:42:28.000Z | 2021-11-11T03:51:34.000Z | """
Classes for capturing raw data
(c) 2015 Massachusetts Institute of Technology
"""
# Native
import multiprocessing
import logging
import time
import struct
logger = logging.getLogger(__name__)
# LO-PHI
from lophi.data import DataStruct
class CapHeader(DataStruct):
"""
This is the header format... | 27.545139 | 81 | 0.5104 |
79755849cb53ce0ce17bca81275281015254df46 | 70,284 | py | Python | cah/cah.py | DariusStClair/aikaterna-cogs | 58b0c0a62729966a7fc720d490ca666a93607c4d | [
"MIT"
] | null | null | null | cah/cah.py | DariusStClair/aikaterna-cogs | 58b0c0a62729966a7fc720d490ca666a93607c4d | [
"MIT"
] | null | null | null | cah/cah.py | DariusStClair/aikaterna-cogs | 58b0c0a62729966a7fc720d490ca666a93607c4d | [
"MIT"
] | null | null | null | import asyncio
import discord
import html
import json
import random
import time
from random import shuffle
from redbot.core import commands
from redbot.core.data_manager import bundled_data_path
class CardsAgainstHumanity(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.games = []
... | 40.60312 | 210 | 0.491833 |
79755897529ceef14349a3327dc829409eee14eb | 75,221 | py | Python | storage/google/cloud/storage/bucket.py | TheNeuralBit/google-cloud-python | 226cdf12f5dd69afb0ef665bb9e897d32d56f4b6 | [
"Apache-2.0"
] | null | null | null | storage/google/cloud/storage/bucket.py | TheNeuralBit/google-cloud-python | 226cdf12f5dd69afb0ef665bb9e897d32d56f4b6 | [
"Apache-2.0"
] | null | null | null | storage/google/cloud/storage/bucket.py | TheNeuralBit/google-cloud-python | 226cdf12f5dd69afb0ef665bb9e897d32d56f4b6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 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 agreed to in writing, s... | 36.059923 | 162 | 0.614642 |
797558fa2dacd7f2222239c1e19a10fa9314be76 | 31,010 | py | Python | zarr/n5.py | boazmohar/zarr-python | 5c71212ccf5abe9f8a5ab7996c5ce3abbbbd61e2 | [
"MIT"
] | 572 | 2019-07-10T19:31:23.000Z | 2022-03-28T17:31:31.000Z | zarr/n5.py | boazmohar/zarr-python | 5c71212ccf5abe9f8a5ab7996c5ce3abbbbd61e2 | [
"MIT"
] | 580 | 2019-07-03T22:08:29.000Z | 2022-03-31T23:29:44.000Z | zarr/n5.py | boazmohar/zarr-python | 5c71212ccf5abe9f8a5ab7996c5ce3abbbbd61e2 | [
"MIT"
] | 115 | 2019-07-17T13:26:31.000Z | 2022-03-31T13:29:46.000Z | """This module contains a storage class and codec to support the N5 format.
"""
import os
import struct
import sys
import warnings
import numpy as np
from numcodecs.abc import Codec
from numcodecs.compat import ndarray_copy
from numcodecs.registry import get_codec, register_codec
from .meta import ZARR_FORMAT, json_d... | 32.884411 | 99 | 0.612286 |
79755a09d979f2f64ae2aaa8c54fc80ec0deada6 | 1,409 | py | Python | subdomain_visit_count.py | erjan/coding_exercises | 53ba035be85f1e7a12b4d4dbf546863324740467 | [
"Apache-2.0"
] | null | null | null | subdomain_visit_count.py | erjan/coding_exercises | 53ba035be85f1e7a12b4d4dbf546863324740467 | [
"Apache-2.0"
] | null | null | null | subdomain_visit_count.py | erjan/coding_exercises | 53ba035be85f1e7a12b4d4dbf546863324740467 | [
"Apache-2.0"
] | null | null | null | '''
A website domain like "discuss.leetcode.com" consists of various
subdomains. At the top level, we have "com", at the next level, we have "leetcode.com", and at the
lowest level, "discuss.leetcode.com". When we visit a domain like "discuss.leetcode.com", we will also
visit the parent domains "leetcode.com" and "co... | 36.128205 | 103 | 0.603265 |
79755b06e8626d51f6a480bf6715e81674a2cb5a | 54,094 | py | Python | tensorforce/models/model.py | petrosgk/tensorforce | dd04f904acac78fd185ea8ee2c3ce6bac8859c1d | [
"Apache-2.0"
] | 1 | 2019-04-06T10:04:00.000Z | 2019-04-06T10:04:00.000Z | tensorforce/models/model.py | petrosgk/tensorforce | dd04f904acac78fd185ea8ee2c3ce6bac8859c1d | [
"Apache-2.0"
] | null | null | null | tensorforce/models/model.py | petrosgk/tensorforce | dd04f904acac78fd185ea8ee2c3ce6bac8859c1d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 reinforce.io. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.137161 | 127 | 0.606796 |
79755b81e0cc4d16c56ac4da97b661306cfcee71 | 22,974 | py | Python | examples/distillation/distiller.py | brian41005/transformers | 2195c0d5f9464385d14c43605a7e9f9a93a91b9a | [
"Apache-2.0"
] | 3 | 2019-11-11T06:00:50.000Z | 2020-12-16T03:00:36.000Z | examples/distillation/distiller.py | brian41005/transformers | 2195c0d5f9464385d14c43605a7e9f9a93a91b9a | [
"Apache-2.0"
] | 3 | 2021-06-02T02:44:05.000Z | 2022-02-10T02:26:13.000Z | examples/distillation/distiller.py | brian41005/transformers | 2195c0d5f9464385d14c43605a7e9f9a93a91b9a | [
"Apache-2.0"
] | 3 | 2019-10-08T07:52:43.000Z | 2020-06-15T12:38:39.000Z | # coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team and Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 46.790224 | 163 | 0.619526 |
79755c228fa2ec752e2d362ae564a393a5cfcd79 | 1,584 | py | Python | Reading/SegregationReport.py | kchandra423/Segregation-Analyzer | 4f2f3d3f9b0d11ac8f7b1ef400936b067c73edae | [
"MIT"
] | null | null | null | Reading/SegregationReport.py | kchandra423/Segregation-Analyzer | 4f2f3d3f9b0d11ac8f7b1ef400936b067c73edae | [
"MIT"
] | null | null | null | Reading/SegregationReport.py | kchandra423/Segregation-Analyzer | 4f2f3d3f9b0d11ac8f7b1ef400936b067c73edae | [
"MIT"
] | null | null | null | import pprint
STATE = 'STATE'
COUNTY = 'COUNTY'
USA = 'US'
class SegregationReport:
# Measures of evenness
# dissimilarity
# gini
# Measures of exposure
# Isolation
def __init__(self, json: dict, sub_levels: str):
self._dis = 0
self._isol = 0
self._sub_level_data = {}
... | 38.634146 | 120 | 0.599747 |
79755c52dcdd48d8c311ec093d2c0748e4b273c2 | 15,446 | py | Python | env/lib/python3.5/site-packages/google/api/service_pb2.py | dwirya/codebrew17-starving | dc9d7fbe60c23dfd0fbf4cefd917d566eb2fd4b9 | [
"MIT"
] | 39 | 2016-12-05T14:36:37.000Z | 2021-07-29T18:22:34.000Z | env/lib/python3.5/site-packages/google/api/service_pb2.py | dwirya/codebrew17-starving | dc9d7fbe60c23dfd0fbf4cefd917d566eb2fd4b9 | [
"MIT"
] | 68 | 2016-12-12T20:38:47.000Z | 2020-07-26T18:28:49.000Z | env/lib/python3.5/site-packages/google/api/service_pb2.py | dwirya/codebrew17-starving | dc9d7fbe60c23dfd0fbf4cefd917d566eb2fd4b9 | [
"MIT"
] | 120 | 2016-08-18T14:53:03.000Z | 2020-06-16T13:27:20.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/service.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.protobuf import reflectio... | 59.868217 | 2,246 | 0.781303 |
79755c6bc3b8783220e857587c12ac1b0d739486 | 743 | py | Python | example/settings.py | imtapps/django-wizard | 1e8817fbb085107a9f8cd15a789bd2a28f33691b | [
"BSD-2-Clause"
] | 5 | 2015-10-13T05:31:17.000Z | 2021-01-19T14:27:53.000Z | example/settings.py | imtapps/django-wizard | 1e8817fbb085107a9f8cd15a789bd2a28f33691b | [
"BSD-2-Clause"
] | null | null | null | example/settings.py | imtapps/django-wizard | 1e8817fbb085107a9f8cd15a789bd2a28f33691b | [
"BSD-2-Clause"
] | 2 | 2016-05-20T08:16:27.000Z | 2018-07-08T18:52:13.000Z | # rules lives in a directory above our example
# app so we need to make sure it is findable on our path.
import sys
from os.path import abspath, dirname, join
parent = abspath(dirname(__file__))
grandparent = abspath(join(parent, '..'))
for path in (grandparent, parent):
if path not in sys.path:
sys.path.in... | 21.852941 | 57 | 0.681023 |
79755d20557278066f302409bee985e51587d896 | 6,404 | py | Python | sdk/python/pulumi_aws/cloudwatch/log_metric_filter.py | dixler/pulumi-aws | 88838ed6d412c092717a916b0b5b154f68226c3a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/cloudwatch/log_metric_filter.py | dixler/pulumi-aws | 88838ed6d412c092717a916b0b5b154f68226c3a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/cloudwatch/log_metric_filter.py | dixler/pulumi-aws | 88838ed6d412c092717a916b0b5b154f68226c3a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class LogMet... | 49.261538 | 178 | 0.671924 |
79755d351318d79d31edc92c34639dd861b45748 | 3,765 | py | Python | env/lib/python3.6/site-packages/sphinx/ext/imgconverter.py | bopopescu/smart_contracts7 | 40a487cb3843e86ab5e4cb50b1aafa2095f648cd | [
"Apache-2.0"
] | 1 | 2019-03-26T03:07:13.000Z | 2019-03-26T03:07:13.000Z | env/lib/python3.6/site-packages/sphinx/ext/imgconverter.py | bopopescu/smart_contracts7 | 40a487cb3843e86ab5e4cb50b1aafa2095f648cd | [
"Apache-2.0"
] | 9 | 2020-06-06T01:35:57.000Z | 2022-02-10T12:12:35.000Z | cvproject/Lib/site-packages/sphinx/ext/imgconverter.py | MdReyajuddin/Big-Project-Codes | 79ab22f2f51e29e2ff17f680306877559c719a56 | [
"BSD-3-Clause"
] | 1 | 2020-07-24T17:53:25.000Z | 2020-07-24T17:53:25.000Z | # -*- coding: utf-8 -*-
"""
sphinx.ext.imgconverter
~~~~~~~~~~~~~~~~~~~~~~~
Image converter extension for Sphinx
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import locale
import subprocess
from sphinx.errors import ExtensionError
fr... | 33.616071 | 86 | 0.557503 |
79755ece722b1e1d9edcd6378bd85f0863a9a41f | 537 | py | Python | menpo/transform/test/test_image_tcoords.py | apapaion/menpo | 9834f0437ca3cbe6a972c2a62f7c970ae950cf32 | [
"BSD-3-Clause"
] | 311 | 2015-01-01T17:16:18.000Z | 2021-12-20T11:25:23.000Z | menpo/transform/test/test_image_tcoords.py | apapaion/menpo | 9834f0437ca3cbe6a972c2a62f7c970ae950cf32 | [
"BSD-3-Clause"
] | 298 | 2015-01-02T17:30:22.000Z | 2022-01-02T22:12:17.000Z | menpo/transform/test/test_image_tcoords.py | apapaion/menpo | 9834f0437ca3cbe6a972c2a62f7c970ae950cf32 | [
"BSD-3-Clause"
] | 80 | 2015-02-02T14:17:36.000Z | 2021-12-22T10:09:28.000Z | import numpy as np
from numpy.testing import assert_equal
from menpo.transform import image_coords_to_tcoords, tcoords_to_image_coords
IMG_SHAPE = (121, 251)
TCOORDS = np.array([[0, 0], [0, 1], [1, 1], [1, 0], [0.5, 0.5]])
IMG_COORDS = np.array([[120, 0], [0, 0], [0, 250], [120, 250], [60, 125]])
def test_tcoords_... | 29.833333 | 79 | 0.729981 |
79755ee3f8c8d871ec9d19ce72c3ae941488abcf | 258 | py | Python | ImageDataAugmentor/__init__.py | LiamRMoore/ImageDataAugmentor | cb13d035a546877a92b0d4a7e89385d7d485ac1b | [
"MIT"
] | 80 | 2019-08-02T10:27:36.000Z | 2022-02-26T11:30:40.000Z | ImageDataAugmentor/__init__.py | LiamRMoore/ImageDataAugmentor | cb13d035a546877a92b0d4a7e89385d7d485ac1b | [
"MIT"
] | 14 | 2019-08-30T15:45:54.000Z | 2022-02-01T08:13:21.000Z | ImageDataAugmentor/__init__.py | LiamRMoore/ImageDataAugmentor | cb13d035a546877a92b0d4a7e89385d7d485ac1b | [
"MIT"
] | 25 | 2020-01-22T02:45:52.000Z | 2021-12-05T07:33:08.000Z | from .dataframe_iterator import DataFrameIterator
from .directory_iterator import DirectoryIterator
from .image_data_augmentor import ImageDataAugmentor
from .iterator import Iterator
from .numpy_array_iterator import NumpyArrayIterator
from .utils import *
| 36.857143 | 52 | 0.879845 |
79755fd38a6471a095279ba35ffc4388b8708501 | 401 | py | Python | backend/tests2_33877/wsgi.py | crowdbotics-apps/tests2-33877 | ac9ded198445583d7e819be3368cba62e0e2dfea | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/tests2_33877/wsgi.py | crowdbotics-apps/tests2-33877 | ac9ded198445583d7e819be3368cba62e0e2dfea | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/tests2_33877/wsgi.py | crowdbotics-apps/tests2-33877 | ac9ded198445583d7e819be3368cba62e0e2dfea | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for tests2_33877 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
79756037997ac7be9633451c60a218cbb6dc6bd1 | 10,234 | py | Python | tests/test_grouping.py | colour-science/trimesh | ee5db2ac81b2357886d854dfa1436b5e4ec5e8d8 | [
"MIT"
] | 2 | 2019-12-10T22:40:58.000Z | 2022-01-28T03:49:11.000Z | tests/test_grouping.py | colour-science/trimesh | ee5db2ac81b2357886d854dfa1436b5e4ec5e8d8 | [
"MIT"
] | 1 | 2020-03-27T14:21:14.000Z | 2020-03-27T15:25:49.000Z | tests/test_grouping.py | colour-science/trimesh | ee5db2ac81b2357886d854dfa1436b5e4ec5e8d8 | [
"MIT"
] | 3 | 2018-04-10T15:44:44.000Z | 2021-07-23T07:19:10.000Z | try:
from . import generic as g
except BaseException:
import generic as g
class GroupTests(g.unittest.TestCase):
def test_unique_rows(self):
count = 10000
subset = int(count / 10)
# check unique_rows on float data
data = g.np.arange(count * 3).reshape((-1, 3)).astype(
... | 32.696486 | 72 | 0.52863 |
797560fc5da2d3cb697b31787dcb3a9ff15f503f | 1,330 | py | Python | src/extensions/__linux__/apt-pacakge-search.ext/main.py | yemenPython/TheBossBaby | 86e447b3fa360646a179e62c70b1750da5427541 | [
"MIT"
] | 1 | 2021-12-16T16:31:29.000Z | 2021-12-16T16:31:29.000Z | src/extensions/__linux__/apt-pacakge-search.ext/main.py | yemenPython/TheBossBaby | 86e447b3fa360646a179e62c70b1750da5427541 | [
"MIT"
] | null | null | null | src/extensions/__linux__/apt-pacakge-search.ext/main.py | yemenPython/TheBossBaby | 86e447b3fa360646a179e62c70b1750da5427541 | [
"MIT"
] | 1 | 2021-12-16T16:31:35.000Z | 2021-12-16T16:31:35.000Z | #!/usr/bin/python3
import os
from UIBox import pkg
def Results(parent):
data = os.popen("apt-cache search " + parent.text, "r").readlines()
if not parent.text:
return [{
"title" : "Start typing the package name",
"subtitle" : "Remember, you can use regular expresions For exampl... | 33.25 | 151 | 0.52406 |
79756111170b2ea4dc3e1e4ed390d1c8c1c3ae24 | 19,323 | py | Python | tests/test_rubeus.py | bdyetton/prettychart | e8b33a7dfdc8c33d15969586be7f68172795f76d | [
"Apache-2.0"
] | null | null | null | tests/test_rubeus.py | bdyetton/prettychart | e8b33a7dfdc8c33d15969586be7f68172795f76d | [
"Apache-2.0"
] | null | null | null | tests/test_rubeus.py | bdyetton/prettychart | e8b33a7dfdc8c33d15969586be7f68172795f76d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import os
from types import NoneType
from xmlrpclib import DateTime
import mock
from nose.tools import *
from webtest_plus import TestApp
from tests.base import OsfTestCase
from tests.factories import (UserFactory, ProjectFactory, NodeFactory,
AuthFactory, PointerFactory, ... | 34.691203 | 102 | 0.622108 |
797561d38707ba8e3f6ce734cf0800f24ba057ce | 6,103 | py | Python | bigmler/tests/basic_time_series_steps.py | mmerce/bigmler | e411bb292a3c8db4cac6754b2b744ffe27fdb47a | [
"Apache-2.0"
] | null | null | null | bigmler/tests/basic_time_series_steps.py | mmerce/bigmler | e411bb292a3c8db4cac6754b2b744ffe27fdb47a | [
"Apache-2.0"
] | null | null | null | bigmler/tests/basic_time_series_steps.py | mmerce/bigmler | e411bb292a3c8db4cac6754b2b744ffe27fdb47a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2017-2020 BigML
#
# 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 ... | 42.678322 | 120 | 0.586597 |
797561d619372f1fc5f2cdc2143299eb720e57b3 | 765 | py | Python | tests/integration/test_text_functions.py | jaredkeil/wikiVideoCreator | 769e3681d2580b84149a13d039d828b6fc576bde | [
"MIT"
] | null | null | null | tests/integration/test_text_functions.py | jaredkeil/wikiVideoCreator | 769e3681d2580b84149a13d039d828b6fc576bde | [
"MIT"
] | null | null | null | tests/integration/test_text_functions.py | jaredkeil/wikiVideoCreator | 769e3681d2580b84149a13d039d828b6fc576bde | [
"MIT"
] | null | null | null | from unittest import TestCase
import wikipediaapi
from wiki_movie.text import generate_section_dictionaries_list, flush_sections, remove_stopwords
from tests.data.wiki_api.flushed_example import flushed
class TextFunctionsTest(TestCase):
def setUp(self):
self.wiki = wikipediaapi.Wikipedia('en')
def... | 30.6 | 96 | 0.709804 |
79756275dc5457c66ef32ea1b080d72bd6d5a06c | 2,673 | py | Python | app/websocket/app/main/__init__.py | javanlacerda/PyGrid | 9cac0de75a1f7ecb2a7133e2490cefb0ea543388 | [
"Apache-2.0"
] | 1 | 2020-02-18T21:51:01.000Z | 2020-02-18T21:51:01.000Z | app/websocket/app/main/__init__.py | jazken/PyGrid | 0538a3b84420cccb7e95312fb343c0479319afb4 | [
"Apache-2.0"
] | null | null | null | app/websocket/app/main/__init__.py | jazken/PyGrid | 0538a3b84420cccb7e95312fb343c0479319afb4 | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint
import syft as sy
import torch as th
from typing import List
from typing import Tuple
from typing import Union
from syft.serde import serialize, deserialize
from syft.generic.frameworks.types import FrameworkTensor
from syft.generic.object import AbstractObject
from syft.generic.pointers.... | 33.4125 | 95 | 0.645342 |
79756299c696b1cef996a777c00597a804833746 | 12,650 | py | Python | src/wechaty_puppet/puppet.py | wj-Mcat/python-wechaty-puppet | b60ace8c193b743f08ad6ee503e0b35edc38cd6d | [
"Apache-2.0"
] | 7 | 2020-05-02T07:58:32.000Z | 2021-12-20T13:41:41.000Z | src/wechaty_puppet/puppet.py | wj-Mcat/python-wechaty-puppet | b60ace8c193b743f08ad6ee503e0b35edc38cd6d | [
"Apache-2.0"
] | 20 | 2020-03-09T17:22:28.000Z | 2021-11-14T10:12:35.000Z | src/wechaty_puppet/puppet.py | wj-Mcat/python-wechaty-puppet | b60ace8c193b743f08ad6ee503e0b35edc38cd6d | [
"Apache-2.0"
] | 12 | 2020-05-04T10:49:43.000Z | 2021-09-14T13:22:59.000Z | """
Python Wechaty - https://github.com/wechaty/python-wechaty
Authors: Huan LI (李卓桓) <https://github.com/huan>
Jingjing WU (吴京京) <https://github.com/wj-Mcat>
2020-now @ Copyright Wechaty
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance wit... | 25.555556 | 84 | 0.574862 |
7975639699ad743b018f7106c8545ace70613e9c | 7,531 | py | Python | skywinder/communication/tests/test_packet_classes.py | PolarMesosphericClouds/SkyWinder | ee136cffca167905ebcd3edf88e2c7456b56a51a | [
"BSD-3-Clause"
] | null | null | null | skywinder/communication/tests/test_packet_classes.py | PolarMesosphericClouds/SkyWinder | ee136cffca167905ebcd3edf88e2c7456b56a51a | [
"BSD-3-Clause"
] | null | null | null | skywinder/communication/tests/test_packet_classes.py | PolarMesosphericClouds/SkyWinder | ee136cffca167905ebcd3edf88e2c7456b56a51a | [
"BSD-3-Clause"
] | null | null | null | from nose.tools import assert_raises
from skywinder.communication import packet_classes
def test_gse_short_packet_roundtrip():
packet = packet_classes.GSEPacket(sync2_byte=0xFA, origin=1, payload=b'hi there!')
packet2 = packet_classes.GSEPacket(buffer=packet.to_buffer())
assert packet.sync2_byte == packe... | 46.776398 | 136 | 0.742398 |
79756415c7266f5f8f6b021c29939d99cf23e794 | 4,119 | py | Python | graphs.py | ooransoy/pygraphs | 3d01cfeca24088e2b065c8455c2d026714622b77 | [
"MIT"
] | null | null | null | graphs.py | ooransoy/pygraphs | 3d01cfeca24088e2b065c8455c2d026714622b77 | [
"MIT"
] | null | null | null | graphs.py | ooransoy/pygraphs | 3d01cfeca24088e2b065c8455c2d026714622b77 | [
"MIT"
] | null | null | null | from itertools import combinations as comb
from math import inf
class Vertex:
def __init__(self, l):
self.__n = []
self.l = l
def n(self):
return list(self.__n)
def add_n(self, l):
self.__n.append(l)
def __repr__(self):
return "<%s>" % str(self.l)
class Graph:
def __init__(self):
self.__v = []
s... | 22.883333 | 80 | 0.549405 |
79756628c0832feefe51d209083fe43d3f4319cb | 16,440 | py | Python | flexget/plugins/api_tmdb.py | fcharlier/Flexget | beda57a6f335fb00eab4d69ebb6778fcf2113c35 | [
"MIT"
] | null | null | null | flexget/plugins/api_tmdb.py | fcharlier/Flexget | beda57a6f335fb00eab4d69ebb6778fcf2113c35 | [
"MIT"
] | null | null | null | flexget/plugins/api_tmdb.py | fcharlier/Flexget | beda57a6f335fb00eab4d69ebb6778fcf2113c35 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from datetime import datetime, timedelta
import logging
import os
import posixpath
import socket
import sys
from urllib2 import URLError
from sqlalchemy import Table, Column, Integer, Float, String, Unicode, Boolean, DateTime, func
from sqlalchemy.sche... | 43.492063 | 123 | 0.617457 |
7975670fd7b12212583e460371ae4a3ed9c7e29f | 1,549 | py | Python | tests/gamestonk_terminal/stocks/dark_pool_shorts/test_sec_view.py | DidierRLopes/GST-discordbot | 8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c | [
"MIT"
] | 1 | 2021-12-31T04:10:42.000Z | 2021-12-31T04:10:42.000Z | tests/gamestonk_terminal/stocks/dark_pool_shorts/test_sec_view.py | DidierRLopes/GST-discordbot | 8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c | [
"MIT"
] | null | null | null | tests/gamestonk_terminal/stocks/dark_pool_shorts/test_sec_view.py | DidierRLopes/GST-discordbot | 8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c | [
"MIT"
] | null | null | null | # IMPORTATION STANDARD
from datetime import datetime
# IMPORTATION THIRDPARTY
import pandas as pd
import pytest
# IMPORTATION INTERNAL
from gamestonk_terminal.stocks import stocks_helper
from gamestonk_terminal.stocks.dark_pool_shorts import sec_view
df_fails_to_deliver = pd.DataFrame(
data={
"SETTLEMEN... | 24.983871 | 91 | 0.627502 |
797567251cb78e66a6eac44f5f1c105c0a303d63 | 1,850 | py | Python | sameerpuri_matcher.py | sameer/degree-advisor | a8a6ba8c90169f465beb69c2537c121161714ad7 | [
"MIT"
] | null | null | null | sameerpuri_matcher.py | sameer/degree-advisor | a8a6ba8c90169f465beb69c2537c121161714ad7 | [
"MIT"
] | null | null | null | sameerpuri_matcher.py | sameer/degree-advisor | a8a6ba8c90169f465beb69c2537c121161714ad7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pprint import pprint
import re
from collections import namedtuple
import course_dictionary as cd
from typing import Dict, List
p = re.compile(r'([A-Z-]{2,5}[ ]\d{4}[WL]{0,1})[.] ([\w:\-,’\'\s]+?[.])[ ]{0,1}(?:[\[(](Formerly[\s\S]+?)[\])][.]{0,1}){0,1}([\S\s]*?[.]*)... | 37 | 159 | 0.615676 |
79756785b7acd9b0306cadedd23f88a898e5e6c9 | 236 | py | Python | model/Title.py | karthanistyr/gw2api | 2a528338a5759779caeae0c470c42f4a0129bdc3 | [
"MIT"
] | null | null | null | model/Title.py | karthanistyr/gw2api | 2a528338a5759779caeae0c470c42f4a0129bdc3 | [
"MIT"
] | null | null | null | model/Title.py | karthanistyr/gw2api | 2a528338a5759779caeae0c470c42f4a0129bdc3 | [
"MIT"
] | null | null | null | from .LoadableObject import LoadableObjectBase
class Title(LoadableObjectBase):
def __init__(self, id):
self.id = id
self.name = None
def _populate_inner(self, json):
self.name = json.get("name", None)
| 23.6 | 46 | 0.661017 |
797567da3bb8c571f9a10b15b5b6e6defbec4462 | 8,068 | py | Python | decoder.py | nhh1501/deepsp | c57d30954b8df1a614dad1b2f656b647eb076e87 | [
"MIT"
] | 2 | 2018-02-24T12:08:41.000Z | 2019-09-02T13:20:17.000Z | decoder.py | nhh1501/deepsp | c57d30954b8df1a614dad1b2f656b647eb076e87 | [
"MIT"
] | null | null | null | decoder.py | nhh1501/deepsp | c57d30954b8df1a614dad1b2f656b647eb076e87 | [
"MIT"
] | 2 | 2018-05-21T05:51:27.000Z | 2019-10-28T19:36:22.000Z | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015-2016 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#... | 40.747475 | 120 | 0.597422 |
7975684244beaef25777acc1e3af7f6feb04df5e | 20,021 | py | Python | mesonbuild/mintro.py | ueno/meson | 5a0fec13b6463f45f88860d67e8fb50f34c8d739 | [
"Apache-2.0"
] | null | null | null | mesonbuild/mintro.py | ueno/meson | 5a0fec13b6463f45f88860d67e8fb50f34c8d739 | [
"Apache-2.0"
] | null | null | null | mesonbuild/mintro.py | ueno/meson | 5a0fec13b6463f45f88860d67e8fb50f34c8d739 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-2016 The Meson development team
# 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 agree... | 39.88247 | 154 | 0.6188 |
7975685e8f6137f7e86f57375630e618c7480fdd | 13,405 | py | Python | box_track/box_level_tracking.py | Mandroide/Research | 41e875d7be8194a55b4d97d7e56ffa464da71fbc | [
"Apache-2.0"
] | null | null | null | box_track/box_level_tracking.py | Mandroide/Research | 41e875d7be8194a55b4d97d7e56ffa464da71fbc | [
"Apache-2.0"
] | null | null | null | box_track/box_level_tracking.py | Mandroide/Research | 41e875d7be8194a55b4d97d7e56ffa464da71fbc | [
"Apache-2.0"
] | null | null | null | # code for box_level tracking
# -*- coding: UTF-8 -*-
import copy
import numpy as np
import cv2
import pickle
import math
import os
score_threshold = 0.5 # threshold for detection score
mask_threshold = 0.5 # threshold for abnormal mask
link_iou_threshold = 0.4 # linking IoU 1
iou_threshold = 0.1 # linking IoU 2
time_... | 39.542773 | 143 | 0.553749 |
797568738893b6a8135c9030532e20f98827fd42 | 1,860 | py | Python | git-chains.py | Christian-Nunnally/git-chains | cd83f3620424bc96b3ef06d2971c4e65d5ce1ba5 | [
"MIT"
] | null | null | null | git-chains.py | Christian-Nunnally/git-chains | cd83f3620424bc96b3ef06d2971c4e65d5ce1ba5 | [
"MIT"
] | null | null | null | git-chains.py | Christian-Nunnally/git-chains | cd83f3620424bc96b3ef06d2971c4e65d5ce1ba5 | [
"MIT"
] | null | null | null | import os
import argparse
import colorama
from pygit2 import Repository
from ChainRepository import ChainRepository
from ChainHierarchyPrinter import ChainHierarchyPrinter
from BranchFilters.HeadToMasterBranchFilterer import HeadToMasterBranchFilterer
from BranchFilters.BranchFilterer import BranchFilterer
from BranchF... | 37.959184 | 119 | 0.75914 |
797568daf6279f1d24b6c6e66c65588f19394e15 | 7,727 | py | Python | applications/experimental/pipelines/pipelines/nodes/base.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/pipelines/nodes/base.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/pipelines/nodes/base.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
# Copyright 2021 deepset GmbH. 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.o... | 37.328502 | 119 | 0.606316 |
797568f694b678c01c6981cdbb166533d53277ec | 1,902 | py | Python | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/DeleteProductTagsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/DeleteProductTagsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/DeleteProductTagsRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 37.294118 | 76 | 0.763933 |
7975693a838ee95813ef5842de6569b27c7eb3ae | 36,696 | py | Python | pyxdf/pyxdf.py | AnonymousAuthor-2021/pyxdf | f4969abd7a862c05261e850fe5bb5bc26fa42ed0 | [
"BSD-2-Clause"
] | null | null | null | pyxdf/pyxdf.py | AnonymousAuthor-2021/pyxdf | f4969abd7a862c05261e850fe5bb5bc26fa42ed0 | [
"BSD-2-Clause"
] | null | null | null | pyxdf/pyxdf.py | AnonymousAuthor-2021/pyxdf | f4969abd7a862c05261e850fe5bb5bc26fa42ed0 | [
"BSD-2-Clause"
] | null | null | null | # Authors: Christian Kothe & the Intheon pyxdf team
# Chadwick Boulay
# Tristan Stenner
# Clemens Brunner
#
# License: BSD (2-clause)
"""Defines the function load_xdf, which imports XDF files.
This function is closely following the load_xdf reference implementation.
"""
import io
import str... | 39.373391 | 104 | 0.57881 |
79756a45686e3c0dc7d9c21dfab6bc4cd22ae46f | 421 | py | Python | django_cbrf/utils.py | egregors/django-cbrf | 03a245a2eda73ae67a18a883bd287a14d2f5d2c6 | [
"MIT"
] | 3 | 2018-03-02T02:41:57.000Z | 2019-02-11T10:41:09.000Z | django_cbrf/utils.py | egregors/django-cbrf | 03a245a2eda73ae67a18a883bd287a14d2f5d2c6 | [
"MIT"
] | 2 | 2019-08-15T14:07:03.000Z | 2020-09-28T04:21:19.000Z | django_cbrf/utils.py | egregors/django-cbrf | 03a245a2eda73ae67a18a883bd287a14d2f5d2c6 | [
"MIT"
] | 1 | 2020-10-06T10:51:32.000Z | 2020-10-06T10:51:32.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.apps import apps
from .settings import CBRF_APP_NAME
get_model = apps.get_model
def get_cbrf_model(model_name, *args, **kwargs):
"""
Returns currency model, either default either customised, depending on
... | 24.764706 | 77 | 0.72209 |
79756a9f3a151654a9e7982885920e73f026de82 | 4,450 | py | Python | ann_benchmarks/algorithms/qg_ngt.py | lajiyuan/ann-benchmarks | 01f99a90f07d55e6e89b5f6bc56fd006f878df67 | [
"MIT"
] | 1 | 2021-08-23T00:47:27.000Z | 2021-08-23T00:47:27.000Z | ann_benchmarks/algorithms/qg_ngt.py | lajiyuan/ann-benchmarks | 01f99a90f07d55e6e89b5f6bc56fd006f878df67 | [
"MIT"
] | 9 | 2021-01-22T16:24:31.000Z | 2021-11-22T15:10:57.000Z | ann_benchmarks/algorithms/qg_ngt.py | lajiyuan/ann-benchmarks | 01f99a90f07d55e6e89b5f6bc56fd006f878df67 | [
"MIT"
] | 1 | 2019-04-17T00:34:13.000Z | 2019-04-17T00:34:13.000Z | from __future__ import absolute_import
import sys
import os
import ngtpy
import numpy as np
import subprocess
import time
from ann_benchmarks.algorithms.base import BaseANN
from ann_benchmarks.constants import INDEX_DIR
class QG(BaseANN):
def __init__(self, metric, object_type, epsilon, param):
metrics = {... | 42.788462 | 103 | 0.552584 |
79756adc2caffb9e11241398025f6efcb9e10bc6 | 3,222 | py | Python | cirq-core/cirq/value/angle.py | Saibaba-Alapati/Cirq | 782efcd04c3bbf73a0d630306a3d1cfd9966521d | [
"Apache-2.0"
] | 2 | 2019-01-12T07:10:32.000Z | 2020-09-08T03:47:22.000Z | cirq-core/cirq/value/angle.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | 5 | 2020-08-20T01:03:57.000Z | 2021-04-13T00:26:48.000Z | cirq-core/cirq/value/angle.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | 1 | 2021-12-30T21:50:00.000Z | 2021-12-30T21:50:00.000Z | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 30.396226 | 96 | 0.699255 |
79756aeb09b560d5c3b706af29bdc8a1bc957dac | 2,057 | py | Python | test.py | calmisential/HRNet_Pose_Estimation_TensorFlow2 | ba1ada9b2ca49a5a2f0bb0a7ef6bfa94e55d4afd | [
"MIT"
] | 16 | 2020-02-06T16:10:16.000Z | 2022-02-15T02:24:24.000Z | test.py | calmisential/HRNet_Pose_Estimation_TensorFlow2 | ba1ada9b2ca49a5a2f0bb0a7ef6bfa94e55d4afd | [
"MIT"
] | 2 | 2020-04-16T11:31:35.000Z | 2020-09-28T03:26:39.000Z | test.py | calmisential/HRNet_Pose_Estimation_TensorFlow2 | ba1ada9b2ca49a5a2f0bb0a7ef6bfa94e55d4afd | [
"MIT"
] | 6 | 2020-01-06T14:07:09.000Z | 2022-03-06T15:12:52.000Z | import tensorflow as tf
import cv2
from pathlib import Path
from configuration.base_config import Config
from utils.tools import get_config_params
from utils.transforms import read_image
from utils.work_flow import get_model, print_model_summary, inference
def image_preprocess(cfg, picture_dir):
image_tensor = r... | 40.333333 | 124 | 0.734565 |
79756b3808ca0cdf815146c0263f8c877d8f1417 | 1,403 | py | Python | container_limit_calculation.py | shurikg/container-limit-calculation | 08ff37be5a367c3f16c603ecbbafb87e1385949f | [
"Apache-2.0"
] | null | null | null | container_limit_calculation.py | shurikg/container-limit-calculation | 08ff37be5a367c3f16c603ecbbafb87e1385949f | [
"Apache-2.0"
] | null | null | null | container_limit_calculation.py | shurikg/container-limit-calculation | 08ff37be5a367c3f16c603ecbbafb87e1385949f | [
"Apache-2.0"
] | null | null | null | import argparse
def scale_iteration_calculation(min, max, iteration_num):
scale = []
step = (max-min)/iteration_num
for index in range(iteration_num+1):
scale.append(min + index*step)
return scale
parser = argparse.ArgumentParser(description='Short sample app')
parser.add_argument('-mic'... | 46.766667 | 117 | 0.744833 |
79756b49fa7e347bfc59f0c1429a708760b65eca | 4,784 | py | Python | xitorch/_tests/test_pure_function.py | Jaikinator/xitorch | 053db8d27a7777baa7f572c2d37004e788ff4cb8 | [
"MIT"
] | null | null | null | xitorch/_tests/test_pure_function.py | Jaikinator/xitorch | 053db8d27a7777baa7f572c2d37004e788ff4cb8 | [
"MIT"
] | null | null | null | xitorch/_tests/test_pure_function.py | Jaikinator/xitorch | 053db8d27a7777baa7f572c2d37004e788ff4cb8 | [
"MIT"
] | null | null | null | import xitorch
import torch
import pytest
from xitorch._core.pure_function import get_pure_function, PureFunction
def func1(x, a, b):
return x * a + b
@torch.jit.script
def jitfunc1(x, a, b):
return x * a + b
class TorchModule(torch.nn.Module):
def __init__(self, a, b):
super().__in... | 29.9 | 73 | 0.60995 |
79756c4c1711bcbc46d19fc633509ba077ede581 | 1,452 | py | Python | resources/usr/lib/python2.7/dist-packages/numpy/testing/numpytest.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | null | null | null | resources/usr/lib/python2.7/dist-packages/numpy/testing/numpytest.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | null | null | null | resources/usr/lib/python2.7/dist-packages/numpy/testing/numpytest.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | 1 | 2020-05-28T23:01:44.000Z | 2020-05-28T23:01:44.000Z | import os
import sys
import traceback
__all__ = ['IgnoreException', 'importall',]
DEBUG=0
get_frame = sys._getframe
class IgnoreException(Exception):
"Ignoring this exception due to disabled feature"
def output_exception(printstream = sys.stdout):
try:
type, value, tb = sys.exc_info()
info ... | 28.470588 | 68 | 0.619146 |
79756d18aa9ce37f46716430649913a49b0d156e | 3,846 | py | Python | uspto_tools/parse/sgml.py | clicumu/uspto-tools | cd6d43769a8df633c9734aa4fcfb8f892e51b0d4 | [
"MIT"
] | null | null | null | uspto_tools/parse/sgml.py | clicumu/uspto-tools | cd6d43769a8df633c9734aa4fcfb8f892e51b0d4 | [
"MIT"
] | null | null | null | uspto_tools/parse/sgml.py | clicumu/uspto-tools | cd6d43769a8df633c9734aa4fcfb8f892e51b0d4 | [
"MIT"
] | null | null | null | """ This module contains chunker and parser for USPTO SGML/XML v2.5
full-text used for patents granted 2002-2004.
"""
from bs4 import BeautifulSoup
from .patent import USPatent, Inventor, PatentClassification, USReference
def chunk_sgml_file(sgml, chunk_on='PATDOC'):
""" Iterate over patents in SGML-file.
P... | 26.163265 | 83 | 0.578263 |
79756d4c0cfabc6ec2bb9c560540d86bcad28199 | 31,169 | py | Python | pandas/core/dtypes/dtypes.py | r00ta/pandas | 33f91d8f9f2e84f2b5f3ac3f0481b691c977c427 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2019-04-16T21:03:23.000Z | 2021-05-08T13:25:44.000Z | pandas/core/dtypes/dtypes.py | chanson90/pandas | 3f1e5940e3929577f094ea2708f94ee184e7a336 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/dtypes/dtypes.py | chanson90/pandas | 3f1e5940e3929577f094ea2708f94ee184e7a336 | [
"BSD-3-Clause"
] | null | null | null | """ define extension dtypes """
import re
import warnings
import numpy as np
import pytz
from pandas._libs.interval import Interval
from pandas._libs.tslibs import NaT, Period, Timestamp, timezones
from pandas.core.dtypes.generic import ABCCategoricalIndex, ABCIndexClass
from pandas import compat
from .base import... | 31.675813 | 79 | 0.580673 |
79756d5932f7c09eba072e25f33dd09fd34e148c | 38 | py | Python | tests/__init__.py | Sergeileduc/py_casim | a464c99c2acea003061dde3f49245a3f6a576ade | [
"MIT"
] | 2 | 2020-02-16T22:17:25.000Z | 2020-02-17T19:21:10.000Z | tests/__init__.py | Sergeileduc/py-casim | a464c99c2acea003061dde3f49245a3f6a576ade | [
"MIT"
] | 2 | 2021-03-17T08:48:51.000Z | 2021-03-17T14:59:38.000Z | tests/__init__.py | Sergeileduc/py-casim | a464c99c2acea003061dde3f49245a3f6a576ade | [
"MIT"
] | 1 | 2020-07-22T08:55:53.000Z | 2020-07-22T08:55:53.000Z | """Unit test package for py_casim."""
| 19 | 37 | 0.684211 |
79756e86d48759a8506f424183ab3950a7e053a3 | 2,104 | py | Python | sahara/plugins/mapr/versions/v4_0_1_mrv2/version_handler.py | esikachev/scenario | 40a59114c7bac44fea510767a3c07d73649f4caf | [
"Apache-2.0"
] | null | null | null | sahara/plugins/mapr/versions/v4_0_1_mrv2/version_handler.py | esikachev/scenario | 40a59114c7bac44fea510767a3c07d73649f4caf | [
"Apache-2.0"
] | null | null | null | sahara/plugins/mapr/versions/v4_0_1_mrv2/version_handler.py | esikachev/scenario | 40a59114c7bac44fea510767a3c07d73649f4caf | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015, MapR Technologies
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.066667 | 75 | 0.688213 |
79756f14745e7a795e165148809909ebc0e8a1ee | 52,703 | py | Python | unit_tests/payloads2.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | null | null | null | unit_tests/payloads2.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | null | null | null | unit_tests/payloads2.py | LandRegistry/validation-api | f24930236622de7b481bbd378138ab1d6b5345b4 | [
"MIT"
] | 1 | 2021-04-11T05:24:47.000Z | 2021-04-11T05:24:47.000Z | simple_charge = {
"schema-version": "2.0",
"geometry": {
"type": "FeatureCollection",
"features": [
{
"geometry": {
"type": "Polygon",
"coordinates": [[[291267.338, 93516.097],
[291267.912, 9... | 34.491492 | 67 | 0.458949 |
79756f40b0684f049d616bf789534857aeb5a28a | 606 | py | Python | Tests/servoTest2.py | LeoWhite/WallE | 67ff44ca53ddfd4811325466f6a048d3794fd5cc | [
"MIT"
] | null | null | null | Tests/servoTest2.py | LeoWhite/WallE | 67ff44ca53ddfd4811325466f6a048d3794fd5cc | [
"MIT"
] | null | null | null | Tests/servoTest2.py | LeoWhite/WallE | 67ff44ca53ddfd4811325466f6a048d3794fd5cc | [
"MIT"
] | null | null | null | import gpiozero
from gpiozero import Servo
from time import sleep
import pigpio
from gpiozero.pins.pigpio import PiGPIOFactory
from time import sleep
#gpiozero.Device.pin_factory = PiGPIOFactory()
pi = pigpio.pi()
while True:
pi.set_servo_pulsewidth(5, 700)
pi.set_servo_pulsewidth(12, 700)
pi.set_servo_... | 23.307692 | 46 | 0.740924 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.