hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33d9116df66190b4bcd4b6335837886228590452 | 466 | py | Python | Lib/site-packages/py2exe/samples/pywin32/com_typelib/pre_gen/wscript/show_info.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 35 | 2015-08-15T14:32:38.000Z | 2021-12-09T16:21:26.000Z | Lib/site-packages/py2exe/samples/pywin32/com_typelib/pre_gen/wscript/show_info.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 4 | 2015-09-12T10:42:57.000Z | 2017-02-27T04:05:51.000Z | Lib/site-packages/py2exe/samples/pywin32/com_typelib/pre_gen/wscript/show_info.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 15 | 2015-07-10T23:58:07.000Z | 2022-01-23T22:16:33.000Z | # Print some simple information using the WScript.Network object.
import sys
from win32com.client.gencache import EnsureDispatch
ob = EnsureDispatch('WScript.Network')
# For the sake of ensuring the correct module is used...
mod = sys.modules[ob.__module__]
print "The module hosting the object is", mod
# Now use the... | 25.888889 | 65 | 0.761803 |
33d92d4fbb89c7c57ceb425792af8e4d897776ca | 687 | py | Python | spider/spider/spider/spiders/book_spider.py | glstr/python_learning | 243908d6f358764386f2e58dfbfde10a406d803c | [
"Apache-2.0"
] | 2 | 2018-09-20T06:08:00.000Z | 2018-09-26T13:57:20.000Z | spider/spider/spider/spiders/book_spider.py | glstr/python_learning | 243908d6f358764386f2e58dfbfde10a406d803c | [
"Apache-2.0"
] | null | null | null | spider/spider/spider/spiders/book_spider.py | glstr/python_learning | 243908d6f358764386f2e58dfbfde10a406d803c | [
"Apache-2.0"
] | 1 | 2019-03-25T05:53:32.000Z | 2019-03-25T05:53:32.000Z | #!/usr/bin/python
#coding=utf-8
import scrapy
class BooksSpider(scrapy.Spider):
#spider name
name = 'books'
# start point
start_urls = ['http://books.toscrape.com']
def parse(self, response):
for book in response.css('article.product_pod'):
name = book.xpath('./h3/a/@title').e... | 31.227273 | 86 | 0.605531 |
33d957ee7e32a9a45d8d60af43b6793f94d3d723 | 2,703 | py | Python | scrabbler/player.py | jfoley-yw/scrabble | 049a69572138b06341af163ec69e18a1eb20b737 | [
"MIT"
] | 1 | 2021-04-01T14:24:17.000Z | 2021-04-01T14:24:17.000Z | scrabbler/player.py | jfoley-yw/scrabble | 049a69572138b06341af163ec69e18a1eb20b737 | [
"MIT"
] | 3 | 2021-04-05T01:09:16.000Z | 2021-04-19T20:19:30.000Z | scrabbler/player.py | jfoley-yw/scrabble | 049a69572138b06341af163ec69e18a1eb20b737 | [
"MIT"
] | null | null | null | import copy
class Player:
'''
Player Class represents a player in scrabble that takes in a midgame strategy and an optional endgame strategy.
'''
def __init__ (self, midgame_strategy, endgame_strategy=None, name=None):
self.mid_strat = midgame_strategy
# If no end game strategy is spec... | 38.070423 | 116 | 0.613023 |
33d9cd9d17f91bcbb85576d49af7c321cc7e738d | 986 | py | Python | taxamo/test/test_geoip_api.py | taxamo/taxamo-python | 190bdda68963860c131d2b1e9d31cd88de10d694 | [
"Apache-2.0"
] | 4 | 2016-03-14T03:59:08.000Z | 2020-06-21T07:58:38.000Z | taxamo/test/test_geoip_api.py | taxamo/taxamo-python | 190bdda68963860c131d2b1e9d31cd88de10d694 | [
"Apache-2.0"
] | 2 | 2016-03-07T13:41:23.000Z | 2017-07-11T13:39:44.000Z | taxamo/test/test_geoip_api.py | taxamo/taxamo-python | 190bdda68963860c131d2b1e9d31cd88de10d694 | [
"Apache-2.0"
] | 8 | 2016-01-13T14:32:19.000Z | 2021-08-16T11:14:06.000Z | """
Copyright 2014-2021 by Taxamo
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 ... | 30.8125 | 76 | 0.711968 |
33d9d1cd61acbd2d18c0ea714e4106f7de3341b9 | 3,377 | py | Python | src/evaluator.py | adrelino/CSGNet | 459ba6a49635badcf0fa50555c69dbcb3912eb0a | [
"MIT"
] | 1 | 2020-06-01T14:08:01.000Z | 2020-06-01T14:08:01.000Z | src/evaluator.py | adrelino/CSGNet | 459ba6a49635badcf0fa50555c69dbcb3912eb0a | [
"MIT"
] | null | null | null | src/evaluator.py | adrelino/CSGNet | 459ba6a49635badcf0fa50555c69dbcb3912eb0a | [
"MIT"
] | 1 | 2020-10-14T16:58:34.000Z | 2020-10-14T16:58:34.000Z | import numpy as np
import torch
import matplotlib.pyplot as plt
from torch.autograd.variable import Variable
from .Models.models import Encoder
from .Models.models import ImitateJoint
from .utils.train_utils import prepare_input_op, chamfer, cosine_similarity
def compute_batch_metrics(target_images, pred_images):
... | 45.026667 | 126 | 0.640805 |
33d9fbd5d2d6f1e205fbdfd50ff5d99b5fda6372 | 474 | py | Python | hw06/user/urls.py | dmryutov/otus-python-0319 | c825166ff16a2e26f3d99e375b13c9e2e8ada49b | [
"MIT"
] | null | null | null | hw06/user/urls.py | dmryutov/otus-python-0319 | c825166ff16a2e26f3d99e375b13c9e2e8ada49b | [
"MIT"
] | null | null | null | hw06/user/urls.py | dmryutov/otus-python-0319 | c825166ff16a2e26f3d99e375b13c9e2e8ada49b | [
"MIT"
] | null | null | null | from django.contrib.auth.views import LoginView, LogoutView
from django.conf import settings
from django.urls import path
from . import views
urlpatterns = [
path('login/', LoginView.as_view(template_name='user/login.html'), name='login'),
path('logout/', LogoutView.as_view(next_page=settings.INDEX_URL), nam... | 33.857143 | 85 | 0.732068 |
33da13aeda7e0e239e02bc4219a4cf9ccb48c01d | 2,060 | py | Python | es_user/models.py | adam-iris/es-example-django | 012a30bd3ba3f47f86c59cc73773dae79f88379d | [
"MIT"
] | null | null | null | es_user/models.py | adam-iris/es-example-django | 012a30bd3ba3f47f86c59cc73773dae79f88379d | [
"MIT"
] | null | null | null | es_user/models.py | adam-iris/es-example-django | 012a30bd3ba3f47f86c59cc73773dae79f88379d | [
"MIT"
] | 2 | 2021-08-05T18:19:34.000Z | 2021-08-12T19:42:18.000Z | from logging import getLogger
from django.contrib.auth.signals import user_logged_in, user_logged_out
from django.core.serializers.json import DjangoJSONEncoder
from django.db import models
from django.dispatch import receiver
from es_user.vouch_proxy import VouchProxyJWT
LOGGER = getLogger(__name__)
class UserJWT... | 29.855072 | 71 | 0.643204 |
33da197bfa314e68e85e98c2906f48995fb5444a | 1,553 | py | Python | appengine/findit/services/irc.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/services/irc.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/services/irc.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module is for irc-related operations.
It provides functions to:
* send notification to irc.
"""
import logging
import textwrap
from libs.irc_clie... | 33.042553 | 77 | 0.713458 |
33da1a271f81f47f9de18a0a1905f86ef3f1a0a2 | 2,149 | py | Python | rossum/configure.py | tunystom-rossum/rossum | a49c5e02bdfbae95fe54e7ee556439355e4c339d | [
"MIT"
] | 5 | 2021-07-27T02:20:37.000Z | 2022-03-30T07:53:30.000Z | rossum/configure.py | tunystom-rossum/rossum | a49c5e02bdfbae95fe54e7ee556439355e4c339d | [
"MIT"
] | 31 | 2020-09-29T15:06:46.000Z | 2022-02-17T09:51:16.000Z | rossum/configure.py | tunystom-rossum/rossum | a49c5e02bdfbae95fe54e7ee556439355e4c339d | [
"MIT"
] | 6 | 2021-02-25T08:17:44.000Z | 2022-02-16T17:09:35.000Z | import configparser
import os
from typing import Optional
from pathlib import Path
import click
from rossum import CTX_PROFILE, CTX_DEFAULT_PROFILE
CONFIGURATION_PATH = Path.home() / ".rossum" / "credentials"
DEFAULT_ROSSUM_URL = "https://api.elis.rossum.ai"
ROSSUM_ENV_PROFILE_VAR = "ROSSUM_PROFILE"
HELP = f"""... | 29.040541 | 98 | 0.70591 |
33da4f45e4dcad89bf026012c9e9bd090503efe0 | 10,228 | py | Python | celery/worker/buckets.py | gthb/celery | 13057dc69a6ecda6aabfae7b7640d971176251fb | [
"BSD-3-Clause"
] | null | null | null | celery/worker/buckets.py | gthb/celery | 13057dc69a6ecda6aabfae7b7640d971176251fb | [
"BSD-3-Clause"
] | null | null | null | celery/worker/buckets.py | gthb/celery | 13057dc69a6ecda6aabfae7b7640d971176251fb | [
"BSD-3-Clause"
] | null | null | null | import threading
import time
from collections import deque
from Queue import Queue, Empty as QueueEmpty
from celery.datastructures import TokenBucket
from celery.utils import all
from celery.utils import timeutils
from celery.utils.compat import izip_longest, chain_from_iterable
class RateLimitExceeded(Exception):
... | 31.862928 | 78 | 0.614294 |
33da7dda878e8518b019080254da1ac2b575b2c4 | 4,667 | py | Python | tests/msodde_doc/test_basic.py | Teme64/oletools | a3bb2df85da0cc02e0b5964243d502c9382f8372 | [
"MIT",
"Unlicense"
] | null | null | null | tests/msodde_doc/test_basic.py | Teme64/oletools | a3bb2df85da0cc02e0b5964243d502c9382f8372 | [
"MIT",
"Unlicense"
] | null | null | null | tests/msodde_doc/test_basic.py | Teme64/oletools | a3bb2df85da0cc02e0b5964243d502c9382f8372 | [
"MIT",
"Unlicense"
] | null | null | null | """ Test some basic behaviour of msodde.py
Ensure that
- doc and docx are read without error
- garbage returns error return status
- dde-links are found where appropriate
"""
from __future__ import print_function
import unittest
from oletools import msodde
from tests.test_utils import OutputCapture, DATA_BASE_DIR as... | 38.254098 | 87 | 0.590101 |
33da8d35d617a74c6a8152802deba88f104c9a5c | 7,817 | py | Python | troposphere/awslambda.py | jpvowen/troposphere | 6a9efa7717db75905b846a9f3aafd092f55c7925 | [
"BSD-2-Clause"
] | 1 | 2021-01-11T22:01:37.000Z | 2021-01-11T22:01:37.000Z | troposphere/awslambda.py | jpvowen/troposphere | 6a9efa7717db75905b846a9f3aafd092f55c7925 | [
"BSD-2-Clause"
] | null | null | null | troposphere/awslambda.py | jpvowen/troposphere | 6a9efa7717db75905b846a9f3aafd092f55c7925 | [
"BSD-2-Clause"
] | 3 | 2020-01-13T04:52:01.000Z | 2021-09-29T00:05:19.000Z | import re
from . import AWSObject, AWSProperty, Join, Tags
from .validators import positive_integer
MEMORY_VALUES = [x for x in range(128, 3009, 64)]
RESERVED_ENVIRONMENT_VARIABLES = [
'AWS_ACCESS_KEY',
'AWS_ACCESS_KEY_ID',
'AWS_DEFAULT_REGION',
'AWS_EXECUTION_ENV',
'AWS_LAMBDA_FUNCTION_MEMORY_SIZE... | 29.05948 | 79 | 0.607138 |
33dab0f95ec063b23cd756757a7f73ac0d5d611d | 6,507 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta2_deployment_list.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta2_deployment_list.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta2_deployment_list.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1bet... | 32.863636 | 295 | 0.619026 |
33dae714ba04fdce8afb2828a8a48875427d2250 | 3,313 | py | Python | ufcStats/settings.py | fanghuiz/ufc-stats-crawler | f13b6581aec890d46d9986471fd3adda83e8c801 | [
"MIT"
] | 14 | 2020-02-06T06:42:25.000Z | 2022-03-08T22:35:01.000Z | ufcStats/settings.py | fanghuiz/ufc-stats-crawler | f13b6581aec890d46d9986471fd3adda83e8c801 | [
"MIT"
] | 2 | 2020-02-06T07:57:06.000Z | 2020-10-11T19:31:11.000Z | ufcStats/settings.py | fanghuiz/ufc-stats-crawler | f13b6581aec890d46d9986471fd3adda83e8c801 | [
"MIT"
] | 9 | 2020-09-01T06:11:47.000Z | 2022-03-13T09:51:00.000Z | # -*- coding: utf-8 -*-
import pathlib
from .utils import print_time
# Scrapy settings for ufcStats project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.h... | 33.464646 | 103 | 0.773921 |
33db0d368565ea1d5ffe9547a593c86507c344b4 | 8,873 | py | Python | TrainingExtensions/torch/src/python/aimet_torch/svd/svd.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 945 | 2020-04-30T02:23:55.000Z | 2022-03-31T08:44:32.000Z | TrainingExtensions/torch/src/python/aimet_torch/svd/svd.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 563 | 2020-05-01T03:07:22.000Z | 2022-03-30T05:35:58.000Z | TrainingExtensions/torch/src/python/aimet_torch/svd/svd.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 186 | 2020-04-30T00:55:26.000Z | 2022-03-30T09:54:51.000Z | # /usr/bin/env python3.5
# -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2018, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification,... | 55.45625 | 167 | 0.648822 |
33db5ee8e65f6f89a31ac4c80ec868f03e17fedf | 353 | py | Python | event.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | event.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | event.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | import itertools
names = 'Tim Bob Julian Carmen Sofia Mike Kim Andre'.split()
locations = 'DE ES AUS NL BR US'.split()
confirmed = [False, True, True, False, True]
def get_attendees():
for participant in itertools.zip_longest(names, locations, confirmed, fillvalue='-'):
print(participant)
if __name__ =... | 25.214286 | 89 | 0.705382 |
33db7d80fc8f4aab733d0a101af90f43f691c015 | 46,552 | py | Python | sandbox/grist/test_useractions.py | petarnikolovski/grist-core | aa3fe975e799ebe81873c71ff9c40ff679f4b860 | [
"Apache-2.0"
] | null | null | null | sandbox/grist/test_useractions.py | petarnikolovski/grist-core | aa3fe975e799ebe81873c71ff9c40ff679f4b860 | [
"Apache-2.0"
] | null | null | null | sandbox/grist/test_useractions.py | petarnikolovski/grist-core | aa3fe975e799ebe81873c71ff9c40ff679f4b860 | [
"Apache-2.0"
] | null | null | null | import json
import types
import logger
import useractions
import testutil
import test_engine
from test_engine import Table, Column, View, Section, Field
log = logger.Logger(__name__, logger.INFO)
class TestUserActions(test_engine.EngineTestCase):
sample = testutil.parse_test_sample({
"SCHEMA": [
[1, "Add... | 37.391165 | 99 | 0.522126 |
33dba007bd96d24cab6ae86cf9fd191ad7dc09d3 | 85 | py | Python | swm/__init__.py | GetmeUK/swm | 4baad7e1eb2b6e763f89be353ce199414731f07e | [
"MIT"
] | 2 | 2019-07-30T13:26:41.000Z | 2020-01-08T11:44:46.000Z | swm/__init__.py | GetmeUK/swm | 4baad7e1eb2b6e763f89be353ce199414731f07e | [
"MIT"
] | null | null | null | swm/__init__.py | GetmeUK/swm | 4baad7e1eb2b6e763f89be353ce199414731f07e | [
"MIT"
] | null | null | null | from . import events
from . import servers
from . import tasks
from . import workers
| 17 | 21 | 0.764706 |
33dba8ace2e2b1542065f2a9c9bd2ad6e27f29e9 | 3,760 | py | Python | init/models/db.py | davidhampgonsalves/mix-tree | f9907d30ed13340ffb31239176b4de0bbba86f6a | [
"MIT"
] | null | null | null | init/models/db.py | davidhampgonsalves/mix-tree | f9907d30ed13340ffb31239176b4de0bbba86f6a | [
"MIT"
] | null | null | null | init/models/db.py | davidhampgonsalves/mix-tree | f9907d30ed13340ffb31239176b4de0bbba86f6a | [
"MIT"
] | null | null | null | # coding: utf8
#########################################################################
## This scaffolding model makes your app work on Google App Engine too
#########################################################################
if request.env.web2py_runtime_gae: # if running on Google App Engine
from gluon.... | 40.430108 | 89 | 0.593883 |
33dc14186f514f99d44fe9d5006edb8f7744ad0a | 958 | py | Python | lang/py/src/avro/tether/__init__.py | gth828r/avro-python3 | c8379728b4a762d99262e526fb53f631076fb143 | [
"Apache-2.0"
] | 32 | 2018-01-09T05:07:18.000Z | 2022-03-13T15:50:40.000Z | lang/py/src/avro/tether/__init__.py | gth828r/avro-python3 | c8379728b4a762d99262e526fb53f631076fb143 | [
"Apache-2.0"
] | 16 | 2018-03-15T23:11:29.000Z | 2021-09-20T12:45:54.000Z | lang/py/src/avro/tether/__init__.py | gth828r/avro-python3 | c8379728b4a762d99262e526fb53f631076fb143 | [
"Apache-2.0"
] | 25 | 2018-01-05T15:13:55.000Z | 2021-12-10T20:01:28.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 35.481481 | 62 | 0.777662 |
33dc1bc8737ae5efb9539a0e2630c93788a5dee3 | 70 | py | Python | src/coberturas_medicas/__init__.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | src/coberturas_medicas/__init__.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | 32 | 2016-05-09T19:37:08.000Z | 2022-01-13T01:00:52.000Z | src/coberturas_medicas/__init__.py | mava-ar/sgk | cb8b3abf243b4614e6a45e4e2db5bb7cce94dee4 | [
"Apache-2.0"
] | null | null | null | default_app_config = 'coberturas_medicas.apps.CoberturasMedicasConfig' | 70 | 70 | 0.9 |
33dc1e3ef19fc65915781b49ec3a43becf49d64b | 1,341 | py | Python | 213 House Robber II.py | qicst23/LeetCode-pythonSolu | 35064d52f9344494330261cd59da2e8d33f8bfdb | [
"MIT"
] | 1 | 2016-01-31T23:49:58.000Z | 2016-01-31T23:49:58.000Z | 213 House Robber II.py | qicst23/LeetCode-pythonSolu | 35064d52f9344494330261cd59da2e8d33f8bfdb | [
"MIT"
] | null | null | null | 213 House Robber II.py | qicst23/LeetCode-pythonSolu | 35064d52f9344494330261cd59da2e8d33f8bfdb | [
"MIT"
] | null | null | null | """
Note: This is an extension of House Robber.
After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not
get too much attention. This time, all houses at this place are arranged in a circle. That means the first house is the
neighbor of the last one. Meanw... | 33.525 | 119 | 0.623415 |
33dc20707922e9aa43e9b4f033015040899fb50a | 16,669 | py | Python | pysoa/test/plan/grammar/assertions.py | arareko/pysoa | a90e428558500cf692f7f6e33fd358dd2779c328 | [
"Apache-2.0"
] | 91 | 2017-05-08T22:41:33.000Z | 2022-02-09T11:37:07.000Z | pysoa/test/plan/grammar/assertions.py | arareko/pysoa | a90e428558500cf692f7f6e33fd358dd2779c328 | [
"Apache-2.0"
] | 63 | 2017-06-14T20:08:49.000Z | 2021-06-16T23:08:25.000Z | pysoa/test/plan/grammar/assertions.py | arareko/pysoa | a90e428558500cf692f7f6e33fd358dd2779c328 | [
"Apache-2.0"
] | 26 | 2017-10-13T23:23:13.000Z | 2022-01-11T16:58:17.000Z | from __future__ import (
absolute_import,
unicode_literals,
)
import pprint
from typing import (
AbstractSet,
Any,
Dict,
Iterable,
List,
Mapping,
Optional,
Tuple,
Union,
)
import six
from pysoa.test.plan.grammar.tools import (
get_all_paths,
path_get,
)
__test_pl... | 34.440083 | 117 | 0.619593 |
33dc4e1ab3c678a7d28170f127d0a3e084c795e7 | 21,897 | py | Python | espnet/nets/pytorch_backend/tacotron2/decoder.py | creatorscan/espnet-asrtts | e516601bd550aeb5d75ee819749c743fc4777eee | [
"Apache-2.0"
] | 5 | 2021-04-17T13:12:20.000Z | 2022-02-22T09:36:45.000Z | espnet/nets/pytorch_backend/tacotron2/decoder.py | creatorscan/espnet-asrtts | e516601bd550aeb5d75ee819749c743fc4777eee | [
"Apache-2.0"
] | null | null | null | espnet/nets/pytorch_backend/tacotron2/decoder.py | creatorscan/espnet-asrtts | e516601bd550aeb5d75ee819749c743fc4777eee | [
"Apache-2.0"
] | 5 | 2020-02-24T08:13:54.000Z | 2022-02-22T09:03:09.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2019 Nagoya University (Tomoki Hayashi)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""Tacotron2 decoder related modules."""
import six
import torch
import torch.nn.functional as F
from espnet.nets.pytorch_backend.rnn.attentions import AttF... | 39.812727 | 117 | 0.581084 |
33dc5ba052d7f8e25717685ea8e82a5bfedd1d24 | 706 | py | Python | tests/integration/core/test_slugfield.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/core/test_slugfield.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/core/test_slugfield.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
from unittest import skipIf
from django import VERSION as DJANGO_VERSION
from django.test import TestCase
from django.test.utils import override_settings
class SlugFieldTest(TestCase):
@skipIf(DJANGO_VERSION < (1, 9),
"unicode slugs not supported by Django<1.9")
def ... | 33.619048 | 63 | 0.712465 |
33dc6b8dd8e6b13914629184545a9a517ec29c1f | 30 | py | Python | djangae/db/backends/appengine/query.py | benvand/djangae | 7b186fbe6952c5ae0afe5eb8258516c35760f96d | [
"BSD-3-Clause"
] | null | null | null | djangae/db/backends/appengine/query.py | benvand/djangae | 7b186fbe6952c5ae0afe5eb8258516c35760f96d | [
"BSD-3-Clause"
] | null | null | null | djangae/db/backends/appengine/query.py | benvand/djangae | 7b186fbe6952c5ae0afe5eb8258516c35760f96d | [
"BSD-3-Clause"
] | null | null | null | class Query(object):
pass
| 10 | 20 | 0.666667 |
33dc8687dc4883cb919c3a5a61aa8fd64f1e0ef0 | 143 | py | Python | tests_api/utils/url.py | LoshmanovNA/pet-project | 127e8efc11738ef681220dc7dece18dd3f14ec08 | [
"MIT"
] | 1 | 2020-01-18T18:18:33.000Z | 2020-01-18T18:18:33.000Z | tests_api/utils/url.py | LoshmanovNA/moesk | 127e8efc11738ef681220dc7dece18dd3f14ec08 | [
"MIT"
] | 3 | 2021-03-31T19:32:57.000Z | 2021-12-13T20:33:50.000Z | tests_api/utils/url.py | LoshmanovNA/moesk | 127e8efc11738ef681220dc7dece18dd3f14ec08 | [
"MIT"
] | null | null | null |
class Url:
# BASE_URL = config.get('api', 'url')
USER_AUTH = BASE_URL + '/user/auth'
USER_REGISTER = BASE_URL + '/user/register' | 20.428571 | 47 | 0.622378 |
33dc8e55796570ef3e5a154bd325d301548b1716 | 1,285 | py | Python | smash/drag.py | mlunacek/smash | 8c498c2707204ec56c38cf2cdd354c1d92ce8e8f | [
"BSD-2-Clause"
] | null | null | null | smash/drag.py | mlunacek/smash | 8c498c2707204ec56c38cf2cdd354c1d92ce8e8f | [
"BSD-2-Clause"
] | null | null | null | smash/drag.py | mlunacek/smash | 8c498c2707204ec56c38cf2cdd354c1d92ce8e8f | [
"BSD-2-Clause"
] | null | null | null | import json
import networkx as nx
import smash
from base import smash_base
def get_edges(g, stroke_width):
return [ {'source': x[0], 'target': x[1], 'stroke_width': stroke_width } for x in g.edges()]
def get_nodes(pos, size, font_size, colors, scale):
fs = 0
if not isinstance(font_size, dict):
... | 23.796296 | 97 | 0.507393 |
33dc92ac77ee6772321f39873b6c88a54e560691 | 6,830 | py | Python | Week 1/day 3 - Control Flow + Logical Operators/code_challenge.py | eddie246/python-playground | 10c4a43c0a4974c1beab52c8b6533ffd93b01520 | [
"MIT"
] | 1 | 2021-07-26T05:31:57.000Z | 2021-07-26T05:31:57.000Z | Week 1/day 3 - Control Flow + Logical Operators/code_challenge.py | eddie246/python-playground | 10c4a43c0a4974c1beab52c8b6533ffd93b01520 | [
"MIT"
] | null | null | null | Week 1/day 3 - Control Flow + Logical Operators/code_challenge.py | eddie246/python-playground | 10c4a43c0a4974c1beab52c8b6533ffd93b01520 | [
"MIT"
] | null | null | null | # Write a program that works out whether if a given number is an odd or even number.
# Even numbers can be divided by 2 with no remainder.
# e.g. 86 is even because 86 ÷ 2 = 43
# 43 does not have any decimal places. Therefore the division is clean.
# e.g. 59 is odd because 59 ÷ 2 = 29.5
# 29.5 is not a whole number... | 27.540323 | 242 | 0.650366 |
33dcde0363ef7b6e941e9f93cb0e393ca334f86d | 7,738 | py | Python | lib/pyfrc/sim/ui_widgets.py | auscompgeek/pyfrc | d8e76a9284690f71ea7fab7d2aa9022cb6eec27d | [
"MIT"
] | 1 | 2017-12-15T20:55:33.000Z | 2017-12-15T20:55:33.000Z | lib/pyfrc/sim/ui_widgets.py | auscompgeek/pyfrc | d8e76a9284690f71ea7fab7d2aa9022cb6eec27d | [
"MIT"
] | null | null | null | lib/pyfrc/sim/ui_widgets.py | auscompgeek/pyfrc | d8e76a9284690f71ea7fab7d2aa9022cb6eec27d | [
"MIT"
] | null | null | null |
import tkinter as tk
# user drawable widget for tk
class ValueWidget(tk.Frame):
def __init__(self, master, width=80, height=20, clickable=False, default=None, minval=-1.0, maxval=1.0, step=0.05, round_to_step=False):
super().__init__(master)
self.w = width
self.h = ... | 27.834532 | 140 | 0.5252 |
33dce3625e851cab966b2cc512cab22e4a6d358d | 5,613 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.972222 | 202 | 0.74274 |
33dcf862249f089065ef522fad76b32caf4db61e | 10,310 | py | Python | qsiprep/workflows/dwi/resampling.py | MPIB/qsiprep | 76c306305538a1d439838683c923f114e0cf3e89 | [
"BSD-3-Clause"
] | null | null | null | qsiprep/workflows/dwi/resampling.py | MPIB/qsiprep | 76c306305538a1d439838683c923f114e0cf3e89 | [
"BSD-3-Clause"
] | null | null | null | qsiprep/workflows/dwi/resampling.py | MPIB/qsiprep | 76c306305538a1d439838683c923f114e0cf3e89 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Resampling workflows
++++++++++++++++++++
.. autofunction:: init_dwi_trans_wf
"""
from nipype.pipeline import engine as pe
from nipype.interfaces import utility as niu, ants
f... | 38.327138 | 95 | 0.597769 |
33dd1a7491c2fc0d2fcfb85466a2347498ae8afc | 503 | py | Python | tests/simple.py | timcallow/AvAtom | fe077a4783afad821de5944a5266b60b873c30d1 | [
"BSD-3-Clause"
] | null | null | null | tests/simple.py | timcallow/AvAtom | fe077a4783afad821de5944a5266b60b873c30d1 | [
"BSD-3-Clause"
] | null | null | null | tests/simple.py | timcallow/AvAtom | fe077a4783afad821de5944a5266b60b873c30d1 | [
"BSD-3-Clause"
] | null | null | null | """
Simple example using default settings wherever possible
"""
import AvAtom
atom_species = "He" # helium
r_s = 3.0 # Wigner-Seitz radius
temperature = 0.1 # temp in hartree
# initialize the atom object
He_atom = AvAtom.Atom(atom_species, radius=r_s, temp=temperature)
# initialize the model
model = AvAtom.ISMod... | 20.958333 | 65 | 0.737575 |
33dd1f06d6a9fa70a0eeedad03b1f861c23dd6e9 | 10,421 | py | Python | tests/conftest.py | oarepo/invenio-acls | a649b2e71e729e3bcfa44110afeb73358aa6034a | [
"MIT"
] | null | null | null | tests/conftest.py | oarepo/invenio-acls | a649b2e71e729e3bcfa44110afeb73358aa6034a | [
"MIT"
] | 7 | 2019-05-08T08:35:01.000Z | 2021-06-25T15:21:34.000Z | tests/conftest.py | oarepo/invenio-explicit-acls | a649b2e71e729e3bcfa44110afeb73358aa6034a | [
"MIT"
] | 2 | 2019-03-31T19:07:30.000Z | 2019-05-06T08:11:45.000Z | #
# Copyright (c) 2019 UCT Prague.
#
# conftest.py is part of Invenio Explicit ACLs
# (see https://github.com/oarepo/invenio-explicit-acls).
#
# 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 ... | 33.616129 | 106 | 0.69763 |
33dd2a66f3c80018fd8dd6a01c3c64f940f88fca | 4,882 | py | Python | razor/config.py | lahiri-phdworks/OCCAM | 21919b0819606b8f76a391965151fba6df86cee7 | [
"BSD-3-Clause"
] | 1 | 2021-04-27T01:33:01.000Z | 2021-04-27T01:33:01.000Z | razor/config.py | lahiri-phdworks/OCCAM | 21919b0819606b8f76a391965151fba6df86cee7 | [
"BSD-3-Clause"
] | null | null | null | razor/config.py | lahiri-phdworks/OCCAM | 21919b0819606b8f76a391965151fba6df86cee7 | [
"BSD-3-Clause"
] | null | null | null | """
OCCAM
Copyright (c) 2011-2017, SRI International
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of con... | 32.986486 | 79 | 0.652397 |
33dd45686440466ef39ead7993c072b2434cd3cd | 381 | py | Python | Courses/Codeval/Easy/Python/05-SortedNumbers.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2019-02-13T12:02:26.000Z | 2019-02-13T12:02:26.000Z | Courses/Codeval/Easy/Python/05-SortedNumbers.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2018-08-13T15:58:33.000Z | 2018-08-13T15:58:33.000Z | Courses/Codeval/Easy/Python/05-SortedNumbers.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 2 | 2017-08-10T20:01:29.000Z | 2021-07-01T08:39:13.000Z | '''
https://www.codeeval.com/open_challenges/91/
'''
import sys
def main():
with open(sys.argv[1]) as word_file:
all_lines = word_file.readlines()
num_sorted = []
for line in all_lines:
num_sorted.append(sorted([float(n) for n in line.split()]))
for entry in num_sorted:
for n in entry:
print("%.3... | 19.05 | 62 | 0.637795 |
33dd492702dc5502b995513530b2fcb39f52dc9f | 5,327 | py | Python | telethon_asyncpg/sessions/abstract.py | ukinti/telethon_asyncpg | 12fdfba905b493ac2c677a5f65c72c2051f02eb9 | [
"MIT"
] | 7 | 2020-12-06T13:16:15.000Z | 2021-11-08T09:58:01.000Z | telethon_asyncpg/sessions/abstract.py | ukinti/telethon_asyncpg | 12fdfba905b493ac2c677a5f65c72c2051f02eb9 | [
"MIT"
] | null | null | null | telethon_asyncpg/sessions/abstract.py | ukinti/telethon_asyncpg | 12fdfba905b493ac2c677a5f65c72c2051f02eb9 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Any, Dict, Tuple
class AbstractAsyncSession(ABC):
started: bool = False # Changes according to implementation
@abstractmethod
async def start(self, instructions: Dict[str, Tuple[Tuple, Dict[str, Any]]]):
"""
:param instructions:
... | 31.52071 | 81 | 0.611601 |
33dd9f5e86c3dd9592376d5fd89404eb80a6c7f4 | 1,580 | py | Python | alipay/aop/api/domain/TemplatePlaceholderDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/TemplatePlaceholderDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/TemplatePlaceholderDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class TemplatePlaceholderDTO(object):
def __init__(self):
self._placeholder_key = None
self._placeholder_value = None
@property
def placeholder_key(self):
return self._... | 28.214286 | 85 | 0.639241 |
33ddbb5d79d2ac557a7b7a64a7c78ec2fac33f94 | 4,082 | py | Python | alipay/aop/api/request/AlipayCommerceOperationTimescardAuthorityDeleteRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayCommerceOperationTimescardAuthorityDeleteRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayCommerceOperationTimescardAuthorityDeleteRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceOperationTimescardAuthorityDeleteModel import AlipayCommerceOperationTimescardAuthorityDeleteModel
class AlipayCommerc... | 28.151724 | 148 | 0.654091 |
33de0fdde6b54ee548f2bc3f862c3fc2b30d99e5 | 12,022 | py | Python | controller/market_datasource.py | Saiket/easymoney | 01ba95ce584ee472c56607ee6c0e2a290f88b402 | [
"MIT-0",
"MIT"
] | 1 | 2020-02-26T14:20:04.000Z | 2020-02-26T14:20:04.000Z | controller/market_datasource.py | Saiket/EasyMoney | 01ba95ce584ee472c56607ee6c0e2a290f88b402 | [
"MIT-0",
"MIT"
] | null | null | null | controller/market_datasource.py | Saiket/EasyMoney | 01ba95ce584ee472c56607ee6c0e2a290f88b402 | [
"MIT-0",
"MIT"
] | null | null | null | """Defines `MarketDatasource` and supporting classes."""
__copyright__ = 'Copyright © 2019, Erik Anderson, James Abernathy, and Tyler Gerritsen'
__license__ = 'MIT'
import datetime
import json
import typing
import dispatch
class SymbolPrice(typing.NamedTuple):
"""A single stock symbol's price datapoint at ... | 34.250712 | 87 | 0.648811 |
33de16dd1827b8b120552c20616093c6c762faeb | 101 | py | Python | lewis_emulators/keithley_2400/interfaces/__init__.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 2 | 2020-10-20T16:49:13.000Z | 2021-02-19T10:41:44.000Z | lewis_emulators/keithley_2400/interfaces/__init__.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 9 | 2019-03-22T15:35:15.000Z | 2021-07-28T11:05:43.000Z | lewis_emulators/keithley_2400/interfaces/__init__.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 1 | 2020-10-21T17:02:44.000Z | 2020-10-21T17:02:44.000Z | from .stream_interface import Keithley2400StreamInterface
__all__ = ['Keithley2400StreamInterface']
| 25.25 | 57 | 0.861386 |
33de312b45f96b336b938afd09a07d764c3729e0 | 694 | py | Python | sciwing/api/routers/citation_intent_clf.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | null | null | null | sciwing/api/routers/citation_intent_clf.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | null | null | null | sciwing/api/routers/citation_intent_clf.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | null | null | null | from fastapi import APIRouter
from sciwing.models.citation_intent_clf import CitationIntentClassification
router = APIRouter()
citation_intent_clf_model = None
@router.get("/cit_int_clf/{citation}")
def classify_citation_intent(citation: str):
""" End point to classify a citation
Parameters
----------
... | 25.703704 | 75 | 0.730548 |
33de6f4d1a077f9cd12d9e6ac4a1a46d394251bb | 302 | py | Python | tests/routers/test_system.py | geco91/blitz_api | 42538a77b3de6a032bb6fdb60249433a0ad5ec56 | [
"MIT"
] | null | null | null | tests/routers/test_system.py | geco91/blitz_api | 42538a77b3de6a032bb6fdb60249433a0ad5ec56 | [
"MIT"
] | null | null | null | tests/routers/test_system.py | geco91/blitz_api | 42538a77b3de6a032bb6fdb60249433a0ad5ec56 | [
"MIT"
] | null | null | null | from starlette.testclient import TestClient
from tests.routers.utils import call_route
def test_route_authentications_latest(test_client: TestClient):
prefixes = ["/latest/system", "/v1/system"]
for prefix in prefixes:
call_route(test_client, f"{prefix}/refresh-token", method="p")
| 27.454545 | 70 | 0.751656 |
33de75d9166d6b3f6551798e0de39efdbaa890ed | 72,422 | py | Python | numba/ir_utils.py | sighingnow/numba | ae88a6ff4a41f76e50672a1af9d9aa66c205b51b | [
"BSD-2-Clause"
] | 1 | 2019-02-13T09:22:51.000Z | 2019-02-13T09:22:51.000Z | numba/ir_utils.py | sighingnow/numba | ae88a6ff4a41f76e50672a1af9d9aa66c205b51b | [
"BSD-2-Clause"
] | null | null | null | numba/ir_utils.py | sighingnow/numba | ae88a6ff4a41f76e50672a1af9d9aa66c205b51b | [
"BSD-2-Clause"
] | null | null | null | #
# Copyright (c) 2017 Intel Corporation
# SPDX-License-Identifier: BSD-2-Clause
#
from __future__ import print_function, absolute_import
import numpy
import types as pytypes
import collections
import operator
from llvmlite import ir as lir
import numba
from numba.six import exec_
from numba import ir, types, typin... | 38.999461 | 109 | 0.603988 |
33de92e36e7ddec0057f3e5f778fa676ccc48da6 | 63,571 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.304496 | 250 | 0.663903 |
33dec23d1ed6c1e01be9004e7b62d67a2f1b1cad | 1,510 | py | Python | search_service/models/table.py | jornh/amundsensearchlibrary | 1a05eb2f063a0805d16261fcf4a6751023f502f9 | [
"Apache-2.0"
] | 1 | 2019-10-13T15:54:26.000Z | 2019-10-13T15:54:26.000Z | search_service/models/table.py | ttannis/amundsensearchlibrary | b13414ba53f21c92a9e8a3c0073dd79f0469c440 | [
"Apache-2.0"
] | null | null | null | search_service/models/table.py | ttannis/amundsensearchlibrary | b13414ba53f21c92a9e8a3c0073dd79f0469c440 | [
"Apache-2.0"
] | null | null | null | from typing import Iterable
class Table:
def __init__(self, *,
name: str,
key: str,
description: str,
cluster: str,
database: str,
schema_name: str,
column_names: Iterable[str],
... | 40.810811 | 84 | 0.394702 |
33ded169756655fceefcf7669ce8d10c54956396 | 1,366 | py | Python | scripts/practice/FB/LowestCommonAncestor.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/practice/FB/LowestCommonAncestor.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/practice/FB/LowestCommonAncestor.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
"""
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode':
self.ans = None
... | 25.773585 | 107 | 0.523426 |
33def0c89e20ac69a55e0edce87883aec46e6310 | 278 | py | Python | froide/account/templatetags/account_tags.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | froide/account/templatetags/account_tags.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | 3 | 2020-02-11T21:43:56.000Z | 2021-11-15T17:47:06.000Z | froide/account/templatetags/account_tags.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | from django import template
from froide.account.forms import NewUserForm
register = template.Library()
def get_new_user_form(context, var_name):
form = NewUserForm()
context[var_name] = form
return ""
register.simple_tag(takes_context=True)(get_new_user_form)
| 18.533333 | 58 | 0.766187 |
33df198c3659f78789779b39f5f5b9b9c56b24a5 | 9,997 | py | Python | src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/commands.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/commands.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 3 | 2021-03-26T00:48:20.000Z | 2022-03-29T22:05:39.000Z | src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/commands.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 1 | 2017-12-28T04:51:44.000Z | 2017-12-28T04:51:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 45.031532 | 103 | 0.638492 |
33df22bd27434ca508120f8ddb2cee336a354e35 | 1,703 | py | Python | glsvg/glutils.py | fathat/glsvg | b58f947d0195ed866d8342e79b787d3e1ed6fe37 | [
"WTFPL"
] | 16 | 2015-10-05T18:59:40.000Z | 2021-03-04T17:03:38.000Z | glsvg/glutils.py | fathat/glsvg | b58f947d0195ed866d8342e79b787d3e1ed6fe37 | [
"WTFPL"
] | 6 | 2015-07-13T10:49:53.000Z | 2015-10-05T20:29:11.000Z | glsvg/glutils.py | fathat/glsvg | b58f947d0195ed866d8342e79b787d3e1ed6fe37 | [
"WTFPL"
] | 5 | 2015-07-16T15:47:25.000Z | 2018-12-28T13:02:07.000Z | import OpenGL.GL as gl
class CurrentTransform:
def __enter__(self):
gl.glPushMatrix()
return self
def __exit__(self, type, value, traceback):
gl.glPopMatrix()
class DisplayList:
def __init__(self):
self.display_list_id = gl.glGenLists(1)
def __call__(self):
... | 28.383333 | 93 | 0.625367 |
33df2f29c9c9cb6d0695c2677d856d37d0935e5f | 952 | py | Python | src/olympia/blocklist/migrations/0015_auto_20200520_1725.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/blocklist/migrations/0015_auto_20200520_1725.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/blocklist/migrations/0015_auto_20200520_1725.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | # Generated by Django 2.2.12 on 2020-05-20 17:25
from django.db import migrations, models
import django.utils.timezone
import django_extensions.db.fields.json
import olympia.amo.models
class Migration(migrations.Migration):
dependencies = [
('blocklist', '0014_auto_20200513_1212'),
]
operations... | 25.72973 | 49 | 0.576681 |
33df5247536652d605e7b5054671475e36aa86f0 | 2,258 | py | Python | BagModules/bag_digital_ec/nor.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | null | null | null | BagModules/bag_digital_ec/nor.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | null | null | null | BagModules/bag_digital_ec/nor.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | 2 | 2019-06-30T07:03:02.000Z | 2020-01-07T04:55:21.000Z | # -*- coding: utf-8 -*-
from typing import Dict, Any
import os
import pkg_resources
from bag.design import Module
yaml_file = pkg_resources.resource_filename(__name__, os.path.join('netlist_info', 'nor.yaml'))
# noinspection PyPep8Naming
class bag_digital_ec__nor(Module):
"""Module for library bag_digital_ec... | 30.106667 | 95 | 0.529672 |
33df530f6b6c367ba5359ce681b145e861d72586 | 10,530 | py | Python | scripts/diff_trace.py | futurecore/revelation | 859de37f5c3ecf5366cc7ba65900754862843366 | [
"BSD-3-Clause"
] | 4 | 2015-09-21T13:52:33.000Z | 2016-12-29T23:24:51.000Z | scripts/diff_trace.py | futurecore/revelation | 859de37f5c3ecf5366cc7ba65900754862843366 | [
"BSD-3-Clause"
] | 59 | 2015-07-17T01:09:12.000Z | 2016-09-19T13:32:19.000Z | scripts/diff_trace.py | futurecore/epiphany-simulator | 859de37f5c3ecf5366cc7ba65900754862843366 | [
"BSD-3-Clause"
] | 1 | 2015-08-01T00:42:03.000Z | 2015-08-01T00:42:03.000Z | #!/usr/bin/env python
"""diff_trace diffs traces produced by the Revelation and Adapteva simulators.
To use this script, first produce a trace from the e-sim tool:
$ e-sim -r 1 -c 1 --extra-args="--trace=on --trace-file e_trace.out" myfile.elf
Then create a trace from Revelation:
$ python revelation/sim.py --... | 41.456693 | 219 | 0.549858 |
33df5662f1eea217b9e1e971978c4bca0e9264a6 | 3,707 | py | Python | astetik/plots/violin.py | C0NTRIBUTE/astetik | c482f13ca1f8af1926dc0b62b2a7fb963218746e | [
"MIT"
] | null | null | null | astetik/plots/violin.py | C0NTRIBUTE/astetik | c482f13ca1f8af1926dc0b62b2a7fb963218746e | [
"MIT"
] | null | null | null | astetik/plots/violin.py | C0NTRIBUTE/astetik | c482f13ca1f8af1926dc0b62b2a7fb963218746e | [
"MIT"
] | null | null | null | import seaborn as sns
import matplotlib.pyplot as plt
from ..style.style import params
from ..style.titles import _titles
from ..style.formats import _thousand_sep
from ..style.template import _header, _footer
from ..utils.utils import _limiter, _scaler
def violin(data,
x,
y,
hue=Non... | 26.29078 | 68 | 0.514972 |
33df6db23d4c9ccfbfa865bc01d0105dde15fc3c | 21,380 | py | Python | great_expectations/core/util.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | 1 | 2021-11-22T12:51:08.000Z | 2021-11-22T12:51:08.000Z | great_expectations/core/util.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | null | null | null | great_expectations/core/util.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | 1 | 2021-10-08T01:24:50.000Z | 2021-10-08T01:24:50.000Z | import copy
import datetime
import decimal
import logging
import os
import re
import sys
import uuid
from collections import OrderedDict
from collections.abc import Mapping
from typing import Any, Dict, Iterable, List, Optional, Union
from urllib.parse import urlparse
import dateutil.parser
import numpy as np
import p... | 33.510972 | 134 | 0.651964 |
33dfa690632dbb1d4dc099240a76689f59f595df | 23,225 | py | Python | homeassistant/components/zwave/__init__.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | 4 | 2017-03-22T21:16:45.000Z | 2021-06-11T05:08:14.000Z | homeassistant/components/zwave/__init__.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/zwave/__init__.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | 4 | 2016-11-27T01:59:49.000Z | 2018-03-11T07:17:25.000Z | """
Support for Z-Wave.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/zwave/
"""
import logging
import os.path
import time
from pprint import pprint
import voluptuous as vol
from homeassistant.helpers import discovery
from homeassistant.const import ... | 38.199013 | 79 | 0.638536 |
33dfbd3eb0bffc6de0f30c14b11575540c348163 | 2,740 | py | Python | .leetcode/424.longest-repeating-character-replacement.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/424.longest-repeating-character-replacement.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/424.longest-repeating-character-replacement.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=424 lang=python3
#
# [424] Longest Repeating Character Replacement
#
# https://leetcode.com/problems/longest-repeating-character-replacement/description/
#
# algorithms
# Medium (49.38%)
# Likes: 2932
# Dislikes: 130
# Total Accepted: 134.5K
# Total Submissions: 272.1K
# Testcase Example: '... | 21.40625 | 84 | 0.544526 |
33dfc79cd8a9bbbb7ad8368079053b2cbfe4751e | 7,043 | py | Python | Networks/CustomNet.py | erwangccc/Keras-yolov3 | 9d211e71218a4e4b744f5a86ad4833fd340351be | [
"Apache-2.0"
] | 3 | 2019-12-13T07:03:25.000Z | 2020-03-19T15:10:28.000Z | Networks/CustomNet.py | erwangccc/Keras-yolov3 | 9d211e71218a4e4b744f5a86ad4833fd340351be | [
"Apache-2.0"
] | null | null | null | Networks/CustomNet.py | erwangccc/Keras-yolov3 | 9d211e71218a4e4b744f5a86ad4833fd340351be | [
"Apache-2.0"
] | 1 | 2020-10-04T03:44:47.000Z | 2020-10-04T03:44:47.000Z | import os
import colorsys
import tensorflow as tf
import numpy as np
from tensorflow.python.keras import layers
from tensorflow.python.keras import backend as K
from tensorflow.python.keras.models import load_model
from tensorflow.python.keras import Input
from tensorflow.python.keras.utils import plot_model
from PIL ... | 44.859873 | 117 | 0.603294 |
33e01a2d7b07f7eef4be872fa59e03ccb6b1eb50 | 291 | py | Python | crowdsorter/api/_exceptions.py | jacebrowning/crowdsorter | 1c847f1f0284fc810ec1f2dd501acb4dbfa16bbb | [
"MIT"
] | 2 | 2020-05-09T23:46:23.000Z | 2021-03-23T18:40:26.000Z | crowdsorter/api/_exceptions.py | jacebrowning/crowdsorter | 1c847f1f0284fc810ec1f2dd501acb4dbfa16bbb | [
"MIT"
] | 1 | 2020-10-18T17:15:49.000Z | 2020-11-11T18:25:05.000Z | crowdsorter/api/_exceptions.py | jacebrowning/crowdsorter | 1c847f1f0284fc810ec1f2dd501acb4dbfa16bbb | [
"MIT"
] | 1 | 2021-03-23T18:41:16.000Z | 2021-03-23T18:41:16.000Z | # pylint: disable=wildcard-import,unused-wildcard-import
from mongoengine.errors import *
from flask_api.exceptions import *
class UnprocessableEntity(APIException):
status_code = 422
detail = "Unable to process the request."
class Conflict(APIException):
status_code = 409
| 20.785714 | 56 | 0.766323 |
33e01d43f7bb9fa36167ddee5f6a913d177f0958 | 5,962 | py | Python | leo/plugins/importers/markdown.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/plugins/importers/markdown.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/plugins/importers/markdown.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | #@+leo-ver=5-thin
#@+node:ekr.20140725190808.18066: * @file importers/markdown.py
'''The @auto importer for the markdown language.'''
import re
import leo.core.leoGlobals as g
import leo.plugins.importers.linescanner as linescanner
Importer = linescanner.Importer
#@+others
#@+node:ekr.20161124192050.2: ** class Markdow... | 34.662791 | 78 | 0.53841 |
33e06204920629b4e27c4b0749eff4b1d8e9cd12 | 7,174 | py | Python | src/vivarium_gates_iv_iron/results_processing/process_results.py | ihmeuw/vivarium_gates_iv_iron | 2d22ef63101a49b8c825884537c6fc79d559ba09 | [
"BSD-3-Clause"
] | null | null | null | src/vivarium_gates_iv_iron/results_processing/process_results.py | ihmeuw/vivarium_gates_iv_iron | 2d22ef63101a49b8c825884537c6fc79d559ba09 | [
"BSD-3-Clause"
] | 1 | 2022-02-16T21:15:26.000Z | 2022-02-16T21:15:26.000Z | src/vivarium_gates_iv_iron/results_processing/process_results.py | ihmeuw/vivarium_gates_iv_iron | 2d22ef63101a49b8c825884537c6fc79d559ba09 | [
"BSD-3-Clause"
] | null | null | null | from pathlib import Path
from typing import NamedTuple, List
import pandas as pd
from loguru import logger
import yaml
from vivarium_gates_iv_iron.constants import results
SCENARIO_COLUMN = "scenario"
GROUPBY_COLUMNS = [results.INPUT_DRAW_COLUMN, SCENARIO_COLUMN]
OUTPUT_COLUMN_SORT_ORDER = [
"age_group",
"se... | 33.680751 | 96 | 0.681628 |
33e08b9e5d94fac4dd10d6904b99850afb5e9dd4 | 307 | py | Python | src/views/category/admin.py | svenvandescheur/svenv.nl-new | c448714853d96ad31d26c825d8b35c4890be40a1 | [
"MIT"
] | null | null | null | src/views/category/admin.py | svenvandescheur/svenv.nl-new | c448714853d96ad31d26c825d8b35c4890be40a1 | [
"MIT"
] | null | null | null | src/views/category/admin.py | svenvandescheur/svenv.nl-new | c448714853d96ad31d26c825d8b35c4890be40a1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from cms.extensions import PageExtensionAdmin
from .models import CategoryExtension
class CategoryExtensionAdmin(PageExtensionAdmin):
"""
A recursive overview of all child articles.
"""
pass
admin.site.register(CategoryExtension, CategoryExtensionAdmin)
| 21.928571 | 62 | 0.791531 |
33e08d20fd88f30d5ea4d9c659dda22c62b09678 | 2,920 | py | Python | sdks/bkapi-client-core/tests/esb/test_client.py | IMBlues/bkpaas-python-sdk | a87bee3d26f0ddeac124c7a4679cd3eff4abb8fc | [
"MIT"
] | 17 | 2021-08-03T03:15:35.000Z | 2022-03-18T06:10:04.000Z | sdks/bkapi-client-core/tests/esb/test_client.py | IMBlues/bkpaas-python-sdk | a87bee3d26f0ddeac124c7a4679cd3eff4abb8fc | [
"MIT"
] | 7 | 2021-08-03T07:10:12.000Z | 2022-03-23T04:47:22.000Z | sdks/bkapi-client-core/tests/esb/test_client.py | IMBlues/bkpaas-python-sdk | a87bee3d26f0ddeac124c7a4679cd3eff4abb8fc | [
"MIT"
] | 9 | 2021-08-03T03:20:36.000Z | 2022-03-08T13:47:50.000Z | # -*- coding: utf-8 -*-
"""
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-蓝鲸 PaaS 平台(BlueKing-PaaS) available.
* Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except in co... | 33.181818 | 118 | 0.589726 |
33e09abfc15124077b0ac60a0e8dc1d58c0ac2c2 | 3,407 | py | Python | depth_first_search.py | GoaPhuDen/algorithms-in-python | ccb8657eab0068b4b789dd4c363411a0df878900 | [
"MIT"
] | 100 | 2015-07-02T21:47:36.000Z | 2022-03-19T21:18:11.000Z | depth_first_search.py | alpaix/algorithms-in-python | ccb8657eab0068b4b789dd4c363411a0df878900 | [
"MIT"
] | null | null | null | depth_first_search.py | alpaix/algorithms-in-python | ccb8657eab0068b4b789dd4c363411a0df878900 | [
"MIT"
] | 41 | 2016-01-25T17:51:37.000Z | 2021-03-01T08:57:29.000Z | """ Depth-first search (recursive and iterative solutions)
This ignores the distance between the city data, and just cares about number of hops.
This implementation is admittedly tightly-coupled to my particular city_data data set
(to add clarity in understanding by making it tied to concrete data).
The city_data is... | 33.07767 | 103 | 0.649839 |
33e0c6b34ae964a44eb0a1b9256655793f79db1a | 1,007 | py | Python | lace/serialization/mesh.py | bodylabs/lace | a6ae80787c8c6ba197bd9bad9254b503f4e05c73 | [
"BSD-2-Clause"
] | 2 | 2020-05-30T10:28:34.000Z | 2021-02-17T13:47:23.000Z | lace/serialization/mesh.py | lace/lace | a6ae80787c8c6ba197bd9bad9254b503f4e05c73 | [
"BSD-2-Clause"
] | 11 | 2019-08-29T16:53:29.000Z | 2021-07-01T06:24:37.000Z | lace/serialization/mesh.py | metabolize/lace | 75cee6a118932cd027692d6cfe36b3726b3a4a5c | [
"BSD-2-Clause"
] | 5 | 2017-05-09T16:18:16.000Z | 2018-05-08T16:16:09.000Z | def load(f, existing_mesh=None):
from baiji.serialization.util.openlib import ensure_file_open_and_call
return ensure_file_open_and_call(f, _load, mode='rb', existing_mesh=existing_mesh)
def _load(f, existing_mesh=None):
import os
from lace.serialization import ply, obj, wrl, stl, xyz, bsf
ext = os... | 40.28 | 86 | 0.673287 |
33e0c9229a011bb7dfdb8f9d207e6726d4e196b6 | 414 | py | Python | run_tests.py | MaxPoint/buildmatrix | 1678bd37c856ec2003920390e1ee7897b23ff07a | [
"BSD-3-Clause"
] | null | null | null | run_tests.py | MaxPoint/buildmatrix | 1678bd37c856ec2003920390e1ee7897b23ff07a | [
"BSD-3-Clause"
] | null | null | null | run_tests.py | MaxPoint/buildmatrix | 1678bd37c856ec2003920390e1ee7897b23ff07a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
import pytest
if __name__ == '__main__':
# show output results from every test function
args = ['-v']
# show the message output for skipped and expected failure tests
args.append('-rxs')
args.extend(sys.argv[1:])
# call pytest and exit with the return code from ... | 29.571429 | 68 | 0.690821 |
33e0e28b4cda56056c727fcc09b1cc9c8bf984db | 1,845 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/rpc_result.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/base/rpc_result.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/base/rpc_result.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 36.9 | 88 | 0.635772 |
33e0f13ebbb3639c38496c34e2dceba6399b15b2 | 8,239 | py | Python | main.py | snook9/arxiv_intelligence | 542de9af27aa5680fa4386ec4c394f7a73a70da2 | [
"MIT"
] | 1 | 2021-11-05T07:55:58.000Z | 2021-11-05T07:55:58.000Z | main.py | snook9/arxiv_intelligence | 542de9af27aa5680fa4386ec4c394f7a73a70da2 | [
"MIT"
] | 1 | 2022-02-24T10:09:15.000Z | 2022-03-25T09:57:37.000Z | main.py | snook9/arxiv_intelligence | 542de9af27aa5680fa4386ec4c394f7a73a70da2 | [
"MIT"
] | null | null | null | """
Name: arXiv Intelligence
Authors: Jonathan CASSAING
Highlighting the relationship between authors and scientists
"""
import time
import logging
import getopt
import sys
from pathlib import Path
from datetime import datetime
from progress.bar import IncrementalBar
from hdfs.util import HdfsError
from services.api.a... | 42.469072 | 100 | 0.584901 |
33e147af225b5b8353c2fc4ae7cc847b8b7fdd2b | 901 | py | Python | gen_txt.py | abhishek4747/imagenet2010-devkit | 6ad756179dc2f85aec65ee5ed3a94ef17f351d81 | [
"MIT"
] | 2 | 2017-11-28T14:58:46.000Z | 2020-05-05T04:43:43.000Z | gen_txt.py | abhishek4747/imagenet2010-devkit | 6ad756179dc2f85aec65ee5ed3a94ef17f351d81 | [
"MIT"
] | null | null | null | gen_txt.py | abhishek4747/imagenet2010-devkit | 6ad756179dc2f85aec65ee5ed3a94ef17f351d81 | [
"MIT"
] | 2 | 2020-05-05T04:43:47.000Z | 2021-11-27T16:49:35.000Z | meta = open('meta.txt').readlines()
w2i = {}
for m in meta:
m2 = m.strip().split(' ')
w2i[m2[1]] = str(int(m2[0]) - 1)
v = w2i.values()
vs = '\n'.join(v)
open('labels.txt','w').write(vs)
import os
if 1:
train_files = os.listdir('../train')
outfile = open('train.txt', 'w')
for tf in train_files:
f = tf.split(... | 23.710526 | 119 | 0.605993 |
33e147cbe7856902965390c1885641fdbd27cfb9 | 116 | py | Python | python/q009/test009.py | MatthewTsan/Leetcode | b0705013eea8517ba7742730cd14ea8601b83c70 | [
"Apache-2.0"
] | null | null | null | python/q009/test009.py | MatthewTsan/Leetcode | b0705013eea8517ba7742730cd14ea8601b83c70 | [
"Apache-2.0"
] | null | null | null | python/q009/test009.py | MatthewTsan/Leetcode | b0705013eea8517ba7742730cd14ea8601b83c70 | [
"Apache-2.0"
] | null | null | null | import q009 as code
if __name__ == '__main__':
solution = code.Solution()
print(solution.isPalindrome(10))
| 19.333333 | 36 | 0.698276 |
33e1996517e6ad6342a956eaabdebd2c01119905 | 2,236 | py | Python | neutronclient/osc/v2/networking_bgpvpn/network_association.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | null | null | null | neutronclient/osc/v2/networking_bgpvpn/network_association.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | 2 | 2018-11-01T21:50:21.000Z | 2018-11-13T21:40:09.000Z | neutronclient/osc/v2/networking_bgpvpn/network_association.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | 3 | 2018-11-01T17:55:23.000Z | 2018-11-23T19:16:06.000Z | # Copyright (c) 2016 Juniper Networks Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 34.9375 | 79 | 0.755367 |
33e1b5845a133de225d5339fd825867a85c67616 | 9,021 | py | Python | scoring_func_comparison.py | rsjones94/point-disorder | 07ebe4c8a2b2e4ec965d6b9a78a78e7e8956810c | [
"MIT"
] | null | null | null | scoring_func_comparison.py | rsjones94/point-disorder | 07ebe4c8a2b2e4ec965d6b9a78a78e7e8956810c | [
"MIT"
] | 1 | 2021-06-02T01:47:20.000Z | 2021-06-02T01:47:20.000Z | scoring_func_comparison.py | rsjones94/point-disorder | 07ebe4c8a2b2e4ec965d6b9a78a78e7e8956810c | [
"MIT"
] | 1 | 2020-01-06T17:39:14.000Z | 2020-01-06T17:39:14.000Z | import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import scipy
from neighborhood_funcs import *
from pattern_generation import *
from icp import icp, realign_points
np.random.seed(0)
poi_1 = 370
write = False
params = {'neighbor_search_dist': 45,
'ka': 6,
'coop': 6,
... | 35.797619 | 120 | 0.681964 |
33e1dd2f615abc525df74208538380758af883d5 | 402 | py | Python | iris_sdk/models/data/hosts.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/data/hosts.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/data/hosts.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.base_resource import BaseData, BaseResourceList
from iris_sdk.models.data.host import Host
from iris_sdk.models.maps.hosts import HostsMap
class Hosts(HostsMap, BaseData):
@property
def items(self):
return self.host.items
def __init__(self):
sel... | 23.647059 | 68 | 0.716418 |
33e1fe9cccb80b1963877a7b6c6d01f676bff774 | 685 | py | Python | tests/days/Day13Test.py | IstvanOri/adventofcode-2020 | 28c1203fd8f7e1863c8322e60161a32848d9a55b | [
"Apache-2.0"
] | null | null | null | tests/days/Day13Test.py | IstvanOri/adventofcode-2020 | 28c1203fd8f7e1863c8322e60161a32848d9a55b | [
"Apache-2.0"
] | null | null | null | tests/days/Day13Test.py | IstvanOri/adventofcode-2020 | 28c1203fd8f7e1863c8322e60161a32848d9a55b | [
"Apache-2.0"
] | null | null | null | import unittest
from ac2020.days.Day13 import Day13
class Day13Test(unittest.TestCase):
def test_empty_input(self):
day = Day13()
day._set_input('')
self.assertEqual('No result', day.part1())
self.assertEqual('No result', day.part2())
def test_correct_input(self):
da... | 27.4 | 51 | 0.621898 |
33e1fef8fdd774c7b29a9b72581b2f9d33dfdd9e | 28,037 | py | Python | src/lib/reportlab/pdfbase/pdfmetrics.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | 1 | 2018-06-15T09:42:22.000Z | 2018-06-15T09:42:22.000Z | src/lib/reportlab/pdfbase/pdfmetrics.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | src/lib/reportlab/pdfbase/pdfmetrics.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | #Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfbase/pdfmetrics.py
#$Header $
__version__=''' $Id: pdfmetrics.py,v 1.1 2006/05/26 19:19:47 thomas Exp $ '''
__doc__="""
This provides a databa... | 36.223514 | 156 | 0.580733 |
33e232b8747a4208c1caacb12b828507ebf8938c | 1,314 | py | Python | jina/types/message/common.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | jina/types/message/common.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | jina/types/message/common.py | liushuigs/jina | b3550e901b2a340924330b5ba2801603e493c933 | [
"Apache-2.0"
] | null | null | null | from . import Message
from ..request import Request
from ...proto import jina_pb2
_available_commands = dict(
jina_pb2.RequestProto.ControlRequestProto.DESCRIPTOR.enum_values_by_name
)
__all__ = ['ControlMessage']
class ControlMessage(Message):
"""
Class of the protobuf message.
:param command: Com... | 33.692308 | 97 | 0.657534 |
33e2837a69f0a537483adc67c71a6b8e97ec86c3 | 2,094 | py | Python | extra/TF_Deformable_Net/lib/networks/factory.py | knmac/LCDC_release | f977ca1cda972983cac7e33b324f07f2e1463a19 | [
"MIT"
] | 24 | 2019-09-18T09:22:08.000Z | 2022-03-08T06:47:33.000Z | extra/TF_Deformable_Net/lib/networks/factory.py | knmac/LCDC_release | f977ca1cda972983cac7e33b324f07f2e1463a19 | [
"MIT"
] | 6 | 2019-09-18T09:21:02.000Z | 2022-02-09T23:31:48.000Z | extra/TF_Deformable_Net/lib/networks/factory.py | knmac/LCDC_release | f977ca1cda972983cac7e33b324f07f2e1463a19 | [
"MIT"
] | 4 | 2020-08-06T02:05:36.000Z | 2021-12-12T07:19:17.000Z | # --------------------------------------------------------
# SubCNN_TF
# Copyright (c) 2016 CVGL Stanford
# Licensed under The MIT License [see LICENSE for details]
# Written by Yu Xiang
# --------------------------------------------------------
"""Factory method for easily getting imdbs by name."""
__sets = {}
from... | 34.327869 | 64 | 0.56829 |
33e28bbc42dd444cb995d46485a4c0988ae25df7 | 905 | py | Python | qiller/whatimg.py | MADindustries/WhatManager2 | d000c53fd993cb526aee85ce2dbc957fa4070ab8 | [
"MIT"
] | 4 | 2015-08-26T05:13:58.000Z | 2022-01-24T07:29:51.000Z | qiller/whatimg.py | point-source/WhatManager2 | d087f3603a5a96cf191a30d56619c0f5ce0dabc7 | [
"MIT"
] | 21 | 2015-08-14T03:58:43.000Z | 2019-11-14T18:25:37.000Z | qiller/whatimg.py | point-source/WhatManager2 | d087f3603a5a96cf191a30d56619c0f5ce0dabc7 | [
"MIT"
] | 2 | 2015-10-28T09:02:16.000Z | 2019-09-23T00:21:54.000Z | import pyquery
import requests
import json
def login(session, username, password):
payload = {
'email': username,
'pass': password,
}
r = session.post('https://ptpimg.me/login.php', data=payload)
pq = pyquery.PyQuery(r.text)
api_key = pq('input').attr('value')
return api_key
de... | 30.166667 | 87 | 0.625414 |
33e298db49165c60f9d7cbad0b21835caf102b20 | 20,933 | py | Python | python/ray/serve/client.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | null | null | null | python/ray/serve/client.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | null | null | null | python/ray/serve/client.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | null | null | null | import asyncio
import atexit
import random
import logging
import time
from functools import wraps
from typing import (
Any,
Callable,
Dict,
Optional,
Tuple,
Type,
Union,
List,
Iterable,
)
import ray
from ray.actor import ActorHandle
from ray.serve.common import (
DeploymentInfo,... | 36.342014 | 104 | 0.608226 |
33e2ac69de053e1d47c69a33b2db512dbd4fef1f | 1,611 | py | Python | xml_longs_retriever.py | dmollaaliod/ebmweb-comp3900-2020S2 | c7375a225e27d94218827f1c1a65ce31f4d36658 | [
"Apache-2.0"
] | null | null | null | xml_longs_retriever.py | dmollaaliod/ebmweb-comp3900-2020S2 | c7375a225e27d94218827f1c1a65ce31f4d36658 | [
"Apache-2.0"
] | null | null | null | xml_longs_retriever.py | dmollaaliod/ebmweb-comp3900-2020S2 | c7375a225e27d94218827f1c1a65ce31f4d36658 | [
"Apache-2.0"
] | null | null | null | from xml.dom.minidom import parse
import os
from xml_abstract_retriever import getText, getAbstract
TEST_QUESTIONS_PATH = os.path.join("..","devtestset-questions.txt")
ABSTRACTS_PATH = os.path.join("..")
CORPUS_PATH = os.path.join("..","ClinicalInquiries.xml")
def getLongs(q_path=TEST_QUESTIONS_PATH,
a... | 37.465116 | 82 | 0.651148 |
33e2b39f0fc8e3cae471cdc807d62cab3e7f49c0 | 2,067 | py | Python | pinn/io/qm9.py | FZJ-IAS5-MLMD/PiNN | bbadd16b534b1c32de18da482fc04d463a6131f6 | [
"BSD-3-Clause"
] | null | null | null | pinn/io/qm9.py | FZJ-IAS5-MLMD/PiNN | bbadd16b534b1c32de18da482fc04d463a6131f6 | [
"BSD-3-Clause"
] | 1 | 2020-09-15T11:50:41.000Z | 2020-09-15T11:50:41.000Z | pinn/io/qm9.py | FZJ-IAS5-MLMD/PiNN | bbadd16b534b1c32de18da482fc04d463a6131f6 | [
"BSD-3-Clause"
] | 1 | 2020-09-07T09:56:43.000Z | 2020-09-07T09:56:43.000Z | # -*- coding: utf-8 -*-
import numpy as np
import tensorflow as tf
from ase.data import atomic_numbers
from pinn.io.base import list_loader
def _qm9_format(label_map):
"""Returns format dict for the QM9 dataset"""
format_dict = {
'elems': {'dtype': tf.int32, 'shape': [None]},
'coord': {'dty... | 35.637931 | 83 | 0.574746 |
33e2c26cbcf614edfa6bad96562af37df42e7156 | 44,285 | py | Python | datalad/metadata/aggregate.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/metadata/aggregate.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/metadata/aggregate.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ... | 41.118849 | 211 | 0.630733 |
33e2cc55df2ce7119153ebeb4f6e8b1691c66859 | 1,055 | py | Python | onadata/libs/serializers/fields/hyperlinked_multi_identity_field.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/serializers/fields/hyperlinked_multi_identity_field.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/libs/serializers/fields/hyperlinked_multi_identity_field.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
from rest_framework import serializers
from rest_framework.reverse import reverse
class HyperlinkedMultiIdentityField(serializers.HyperlinkedIdentityField):
lookup_fields = (('pk', 'pk'), )
def __init__(self, *... | 36.37931 | 82 | 0.69763 |
33e2e2a3f71718573567f7f1977e17a91950d535 | 2,883 | py | Python | lib/coloraide/spaces/_parse.py | adaminfinitum/ColorHelper | d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47 | [
"MIT"
] | 253 | 2015-03-04T06:48:43.000Z | 2022-03-25T14:22:17.000Z | lib/coloraide/spaces/_parse.py | adaminfinitum/ColorHelper | d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47 | [
"MIT"
] | 197 | 2015-03-04T21:40:47.000Z | 2022-03-25T17:04:36.000Z | lib/coloraide/spaces/_parse.py | adaminfinitum/ColorHelper | d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47 | [
"MIT"
] | 32 | 2015-03-21T03:28:01.000Z | 2021-09-06T07:20:51.000Z | """Parse utilities."""
import re
import math
from .. import util
RGB_CHANNEL_SCALE = 1.0 / 255.0
HUE_SCALE = 1.0 / 360.0
SCALE_PERCENT = 1 / 100.0
CONVERT_TURN = 360
CONVERT_GRAD = 90 / 100
RE_CHAN_SPLIT = re.compile(r'(?:\s*[,/]\s*|\s+)')
RE_COMMA_SPlIT = re.compile(r'(?:\s*,\s*)')
RE_SLASH_SPLIT = re.compile(r'(?:... | 27.198113 | 96 | 0.576483 |
33e2e2aabd0e714320839bba96fcc1797110e06a | 3,175 | py | Python | spyder/plugins/projects/utils/watcher.py | Nicztin/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | 1 | 2019-09-25T15:08:24.000Z | 2019-09-25T15:08:24.000Z | spyder/plugins/projects/utils/watcher.py | jorgeps86/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | null | null | null | spyder/plugins/projects/utils/watcher.py | jorgeps86/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""Watcher to detect filesystem changes in the project's directory."""
# Standard lib imports
import logging
# Third-party imports
from qtpy.QtCore import QObject, ... | 32.070707 | 77 | 0.687244 |
33e2fe3e3c89d7ccde194b73445f464d175f8aaa | 386 | py | Python | util/test/util/file_iterator.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 63 | 2017-08-31T10:02:52.000Z | 2021-12-18T21:42:14.000Z | util/test/util/file_iterator.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 284 | 2017-10-20T15:35:26.000Z | 2020-09-11T15:25:40.000Z | util/test/util/file_iterator.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 44 | 2017-08-21T19:47:57.000Z | 2020-11-22T22:45:50.000Z | import os
def process_directory(dir_path, config_files=[]):
for filename in os.listdir(dir_path):
path = os.path.join(dir_path, filename)
if os.path.isdir(path):
process_directory(path, config_files)
else:
if filename.endswith(".json"):
config_files.... | 29.692308 | 52 | 0.606218 |
33e2fed95a4f0826b24021cd8d7d20c15c12a7d5 | 6,656 | py | Python | scattertext/TermDocMatrixFromPandas.py | tigerneil/scattertext | 23351895ada347fae300bf910c2c77f47ac58a35 | [
"Apache-2.0"
] | 1 | 2020-08-11T03:27:28.000Z | 2020-08-11T03:27:28.000Z | scattertext/TermDocMatrixFromPandas.py | tigerneil/scattertext | 23351895ada347fae300bf910c2c77f47ac58a35 | [
"Apache-2.0"
] | null | null | null | scattertext/TermDocMatrixFromPandas.py | tigerneil/scattertext | 23351895ada347fae300bf910c2c77f47ac58a35 | [
"Apache-2.0"
] | 1 | 2020-01-08T00:25:31.000Z | 2020-01-08T00:25:31.000Z | import numpy as np
import pandas as pd
from scattertext.AsianNLP import chinese_nlp
from scattertext.CSRMatrixTools import CSRMatrixFactory
from scattertext.TermDocMatrix import TermDocMatrix
from scattertext.TermDocMatrixFactory import TermDocMatrixFactory
from scattertext.indexstore.IndexStore import IndexStore
cl... | 38.923977 | 124 | 0.605619 |
33e302496ccca878613a318fe39d9c8397a693d2 | 160 | py | Python | missionaries_and_cannibals/__init__.py | aroques/missionaries_and_cannibals | c1e5fa1b07a010f34725bcfd3a7d0771806a4766 | [
"MIT"
] | 3 | 2019-10-01T12:46:34.000Z | 2021-07-28T21:05:52.000Z | missionaries_and_cannibals/__init__.py | aroques/missionaries_and_cannibals | c1e5fa1b07a010f34725bcfd3a7d0771806a4766 | [
"MIT"
] | 1 | 2018-02-17T20:10:10.000Z | 2018-02-17T22:16:21.000Z | missionaries_and_cannibals/__init__.py | aroques/missionaries_and_cannibals | c1e5fa1b07a010f34725bcfd3a7d0771806a4766 | [
"MIT"
] | null | null | null | from .state import State
from .node import Node
from .missionaries_and_cannibals import MissionariesAndCannibals
from .search import iterative_deepening_search
| 32 | 64 | 0.875 |
33e33128763249be34ddb90a43a671835981da0a | 13,055 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-07-15T09:50:14.000Z | 2020-07-15T09:50:14.000Z | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 43.662207 | 150 | 0.641976 |
33e34168feb49a238a5d9b2635ffcdb34a0ec818 | 2,821 | py | Python | encoding/models/sseg/psp.py | Womcos/SCARF | b90251bc23410cb810a7082ca75147a7aae21dec | [
"MIT"
] | 1 | 2021-04-06T11:29:04.000Z | 2021-04-06T11:29:04.000Z | experiments/segmentation/encoding/models/sseg/psp.py | coolgrasshopper/amodal_road_segmentation | 462209242973815055f085ada99772af32082f5c | [
"MIT"
] | null | null | null | experiments/segmentation/encoding/models/sseg/psp.py | coolgrasshopper/amodal_road_segmentation | 462209242973815055f085ada99772af32082f5c | [
"MIT"
] | 1 | 2021-04-06T08:41:12.000Z | 2021-04-06T08:41:12.000Z |
from __future__ import division
import os
import numpy as np
import torch
import torch.nn as nn
from torch.nn.functional import interpolate
from .base import BaseNet
from .fcn import FCNHead
from ...nn import PyramidPooling
class PSP(BaseNet):
def __init__(self, nclass, backbone, aux=True, se_loss=False, norm_la... | 36.166667 | 104 | 0.62212 |
33e36aaef34826c9cc84bb071c5947e13b437f41 | 4,117 | py | Python | lbrynet/error.py | Leopere/lbry | af43b21ef6a5de5ce1fee21425bea6f8d6bf335f | [
"MIT"
] | null | null | null | lbrynet/error.py | Leopere/lbry | af43b21ef6a5de5ce1fee21425bea6f8d6bf335f | [
"MIT"
] | null | null | null | lbrynet/error.py | Leopere/lbry | af43b21ef6a5de5ce1fee21425bea6f8d6bf335f | [
"MIT"
] | null | null | null | class RPCError(Exception):
code = 0
class PriceDisagreementError(Exception):
pass
class DuplicateStreamHashError(Exception):
pass
class DownloadCancelledError(Exception):
pass
class DownloadSDTimeout(Exception):
def __init__(self, download):
super().__init__(f'Failed to download sd b... | 20.792929 | 93 | 0.701239 |
33e37eab1e9c3bb666b93119fa297ea889d1103a | 10,956 | py | Python | docker/dockerfile/ScanSmb/discoverFile/DiscoverFile.py | mytliulei/boundless | e2c756e80f838cdb49914a5967a2a9a30a04664f | [
"Apache-2.0"
] | 9 | 2015-02-10T08:22:00.000Z | 2021-07-05T15:12:41.000Z | docker/dockerfile/ScanSmb/discoverFile/DiscoverFile.py | mytliulei/boundless | e2c756e80f838cdb49914a5967a2a9a30a04664f | [
"Apache-2.0"
] | null | null | null | docker/dockerfile/ScanSmb/discoverFile/DiscoverFile.py | mytliulei/boundless | e2c756e80f838cdb49914a5967a2a9a30a04664f | [
"Apache-2.0"
] | 6 | 2016-04-06T09:26:43.000Z | 2021-06-15T04:47:47.000Z | #!/usr/bin/env python
#-*- coding: UTF-8 -*-
# Copyright 2008-2016 Hangzhou DPtech Technologies Co., Ltd.
#
# 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/li... | 37.77931 | 128 | 0.6046 |
33e391b5c9107e04e99b6bdd2eaaa24b548aa305 | 1,644 | py | Python | examples/jbnmr_examples/s7-s9_s3e_processing/xy_s3e.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 150 | 2015-01-16T12:24:13.000Z | 2022-03-03T18:01:18.000Z | examples/jbnmr_examples/s7-s9_s3e_processing/xy_s3e.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 129 | 2015-01-13T04:58:56.000Z | 2022-03-02T13:39:16.000Z | examples/jbnmr_examples/s7-s9_s3e_processing/xy_s3e.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 88 | 2015-02-16T20:04:12.000Z | 2022-03-10T06:50:30.000Z | import nmrglue as ng
# process the direct dimension of the sum data set
sdic, sdata = ng.pipe.read('test_sum.fid')
sdic, sdata = ng.pipe_proc.sp(sdic, sdata, off=0.45, end=0.95, pow=1, c=1.0)
sdic, sdata = ng.pipe_proc.zf(sdic, sdata, size=8192)
sdic, sdata = ng.pipe_proc.ft(sdic, sdata)
uc = ng.pipe.make_uc(sdic, sda... | 40.097561 | 76 | 0.684915 |
33e39db415c39e3dd1c591b430bb6539bcbd5879 | 11,054 | py | Python | unik/magik.py | balbasty/unik | 7b8b2a0989495eec7bc0db6c672ce904cbcb1063 | [
"MIT"
] | null | null | null | unik/magik.py | balbasty/unik | 7b8b2a0989495eec7bc0db6c672ce904cbcb1063 | [
"MIT"
] | null | null | null | unik/magik.py | balbasty/unik | 7b8b2a0989495eec7bc0db6c672ce904cbcb1063 | [
"MIT"
] | null | null | null | """This module implements decorators and helpers to make generic functions.
Unik defines function that work on numpy arrays, tensorflow eager tensors,
tensorflow static tensors and keras tensors. This module defines helpers
that help reaching this goal.
"""
import inspect
import functools
import numpy as np
import te... | 35.203822 | 91 | 0.582685 |
33e3c8daefd2730561121c24cd3c80829908eb45 | 23,920 | py | Python | maro/simulator/scenarios/ecr/business_engine.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/simulator/scenarios/ecr/business_engine.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/simulator/scenarios/ecr/business_engine.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
from math import ceil, floor
from yaml import safe_load
from maro.backends.frame import FrameBase, SnapshotList
from maro.event_buffer import DECISION_EVENT, Event, EventBuffer
from maro.simulator.scenarios import AbsBusinessEngine
f... | 37.085271 | 176 | 0.639716 |
33e3f866fbf4b44d81c0d9583899b9f15fe0fa48 | 6,447 | py | Python | mi/dataset/parser/test/test_wc_hmr_cspp.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_wc_hmr_cspp.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/test/test_wc_hmr_cspp.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
@package mi.dataset.parser.test
@file marine-integrations/mi/dataset/parser/test/test_wc_hmr_cspp.py
@author Jeff Roy
@brief Test code for a wc_hmr_cspp data parser
wc_hmr_cspp is based on cspp_base.py
ttest_wc_hmr_cspp.py fully tests all of the capabilities of the
base parser. That level o... | 35.229508 | 94 | 0.670544 |
33e4430b6bc942c3d0bb3e05813114432a581355 | 2,191 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/upload/cdn_file.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/base/upload/cdn_file.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/base/upload/cdn_file.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 37.135593 | 99 | 0.638521 |
33e4451dff7c8f22ccd9acba3459a76a93e70d60 | 8,567 | py | Python | kmclient/tests/osc/v1/test_datakey.py | huaweicloudsdk/osc_kms | 706db158df29c06c22c1158c379bb5ecb5f69f5d | [
"Apache-2.0"
] | 3 | 2017-10-18T06:58:50.000Z | 2021-06-09T11:08:12.000Z | kmclient/tests/osc/v1/test_datakey.py | huaweicloudsdk/osc_kms | 706db158df29c06c22c1158c379bb5ecb5f69f5d | [
"Apache-2.0"
] | 11 | 2017-02-25T07:49:03.000Z | 2017-07-14T09:04:50.000Z | kmclient/tests/osc/v1/test_datakey.py | Huawei/OpenStackClient_KMS | 706db158df29c06c22c1158c379bb5ecb5f69f5d | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Huawei, Inc. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.110656 | 77 | 0.577915 |
33e44bc615e0bdab5047a9a952e4469ce8078a89 | 5,408 | py | Python | tests/test_language_model_usage/test_winograd_schema_challenge/test_metrics.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 6 | 2020-04-17T17:37:24.000Z | 2021-12-04T03:03:46.000Z | tests/test_language_model_usage/test_winograd_schema_challenge/test_metrics.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 62 | 2019-05-21T21:06:42.000Z | 2020-01-26T17:33:45.000Z | tests/test_language_model_usage/test_winograd_schema_challenge/test_metrics.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 1 | 2019-07-22T10:19:38.000Z | 2019-07-22T10:19:38.000Z | import pandas as pd
import pytest
from src.language_model_usage.winograd_schema_challenge import (
calculate_single_accuracy, calculate_accuracy, calculate_consistency, calculate_metrics
)
@pytest.fixture()
def df():
df = pd.DataFrame({
'is_associative': [True, True, True, True, T... | 46.62069 | 106 | 0.694527 |
33e4599ddd12b70480d293e12d278e7049f797b8 | 35,993 | py | Python | tilesets/views.py | dbmi-bgm/cgap-higlass-server | c3d1b640cdbbcb92740a20988620ab6728d5a159 | [
"MIT"
] | null | null | null | tilesets/views.py | dbmi-bgm/cgap-higlass-server | c3d1b640cdbbcb92740a20988620ab6728d5a159 | [
"MIT"
] | null | null | null | tilesets/views.py | dbmi-bgm/cgap-higlass-server | c3d1b640cdbbcb92740a20988620ab6728d5a159 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import csv
import h5py
import json
import logging
import math
import clodius.db_tiles as cdt
import clodius.hdf_tiles as hdft
import collections as col
import django.db.models as dbm
import django.db.models.functions as dbmf
import django.core.exceptions... | 33.48186 | 114 | 0.607396 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.