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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7952b76a0e355dbd7466342c0d34c676ea5a52f1 | 1,850 | py | Python | sdk/python/pulumi_aws/waf/get_rate_based_rule.py | JakeGinnivan/pulumi-aws | c91ef78932964ac74eda7f5da81f65b0f1798c93 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/waf/get_rate_based_rule.py | JakeGinnivan/pulumi-aws | c91ef78932964ac74eda7f5da81f65b0f1798c93 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/waf/get_rate_based_rule.py | JakeGinnivan/pulumi-aws | c91ef78932964ac74eda7f5da81f65b0f1798c93 | [
"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 GetRat... | 28.030303 | 107 | 0.657297 |
7952b866b5554bd0bd823fe81e42316f23fa7b9d | 9,267 | py | Python | myanimelist/media_list.py | Zenrac/python3-mal | 025444816ba23a0a9192265e87b7768d4f5488bf | [
"WTFPL"
] | null | null | null | myanimelist/media_list.py | Zenrac/python3-mal | 025444816ba23a0a9192265e87b7768d4f5488bf | [
"WTFPL"
] | null | null | null | myanimelist/media_list.py | Zenrac/python3-mal | 025444816ba23a0a9192265e87b7768d4f5488bf | [
"WTFPL"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import abc
import collections
from lxml import etree as et
import decimal
import datetime
import urllib.request, urllib.parse, urllib.error
from . import utilities
from .base import Base, MalformedPageError, InvalidBaseError, loadable
class MalformedMediaListPageError(Malfo... | 33.576087 | 119 | 0.553038 |
7952b885f3aef57c07eba85abd55ff979228c601 | 40,477 | py | Python | onmt/opts.py | biomed-AI/PROTAC-RL | d682c0d517a2ff8362e5a4a67bb297773daaf5bf | [
"MIT"
] | 1 | 2022-02-15T00:54:34.000Z | 2022-02-15T00:54:34.000Z | onmt/opts.py | TanYoh/PROTAC-RL | a8074af6afa478404a3a04da878eb0704e3ec984 | [
"MIT"
] | null | null | null | onmt/opts.py | TanYoh/PROTAC-RL | a8074af6afa478404a3a04da878eb0704e3ec984 | [
"MIT"
] | null | null | null | """ Implementation of all available options """
from __future__ import print_function
import argparse
from onmt.models.sru import CheckSRU
def model_opts(parser):
"""
These options are passed to the construction of the model.
Be careful with these as they will be used during translation.
"""
# E... | 53.329381 | 97 | 0.572226 |
7952b8a671b44307164f1eff8fdc3c70ecbe3a59 | 18,263 | py | Python | openfold/model/template.py | aqlaboratory/openfold | d6b36a80e3ee82eee8ac09215fce553d822f86a3 | [
"Apache-2.0"
] | 789 | 2021-11-12T16:12:21.000Z | 2022-03-28T05:45:19.000Z | openfold/model/template.py | aqlaboratory/openfold | d6b36a80e3ee82eee8ac09215fce553d822f86a3 | [
"Apache-2.0"
] | 84 | 2021-11-12T22:23:50.000Z | 2022-03-29T01:06:06.000Z | openfold/model/template.py | aqlaboratory/openfold | d6b36a80e3ee82eee8ac09215fce553d822f86a3 | [
"Apache-2.0"
] | 114 | 2021-11-12T16:00:57.000Z | 2022-03-27T21:32:31.000Z | # Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | 29.7443 | 81 | 0.562503 |
7952ba3874e8098d26cad37114917cd1079b06b4 | 990 | py | Python | multi_timer.py | emguse/env_logger | 8db848e8231f995cc056d51d3c6868b382f0ef39 | [
"MIT"
] | null | null | null | multi_timer.py | emguse/env_logger | 8db848e8231f995cc056d51d3c6868b382f0ef39 | [
"MIT"
] | null | null | null | multi_timer.py | emguse/env_logger | 8db848e8231f995cc056d51d3c6868b382f0ef39 | [
"MIT"
] | null | null | null | import time
class multi_timer():
def __init__(self, interval):
self.last_time = 0.0
self.up_state = False
self.interval = interval
def timer(self):
if self.last_time + self.interval <= time.time():
self.last_time = time.time()
self.up_state = Tru... | 28.285714 | 68 | 0.586869 |
7952ba6189b49ef4456cd9944dc2e1df35c70bb3 | 3,708 | py | Python | src/statick_web/plugins/tool/jshint_tool_plugin.py | xydesa/statick-web | 600f655c128e40a8c1439d912a3d9ab4df7c813a | [
"CC0-1.0"
] | 2 | 2020-02-07T00:13:53.000Z | 2020-02-07T00:58:26.000Z | src/statick_web/plugins/tool/jshint_tool_plugin.py | xydesa/statick-web | 600f655c128e40a8c1439d912a3d9ab4df7c813a | [
"CC0-1.0"
] | 19 | 2020-02-14T23:47:25.000Z | 2022-02-28T21:38:01.000Z | src/statick_web/plugins/tool/jshint_tool_plugin.py | xydesa/statick-web | 600f655c128e40a8c1439d912a3d9ab4df7c813a | [
"CC0-1.0"
] | 3 | 2020-02-12T16:16:54.000Z | 2020-02-14T00:53:46.000Z | """Apply jshint tool and gather results."""
import logging
import re
import subprocess
from typing import List, Match, Optional, Pattern
from statick_tool.issue import Issue
from statick_tool.package import Package
from statick_tool.tool_plugin import ToolPlugin
class JSHintToolPlugin(ToolPlugin): # type: ignore
... | 34.018349 | 83 | 0.515372 |
7952bba8abe54583f998a8961c47562a40ef4443 | 6,767 | py | Python | pylearn2/cross_validation/tests/test_cross_validation.py | ikervazquezlopez/Pylearn2 | 2971e8f64374ffde572d4cf967aad5342beaf5e0 | [
"BSD-3-Clause"
] | 2,045 | 2015-01-01T14:07:52.000Z | 2022-03-08T08:56:41.000Z | pylearn2/cross_validation/tests/test_cross_validation.py | ikervazquezlopez/Pylearn2 | 2971e8f64374ffde572d4cf967aad5342beaf5e0 | [
"BSD-3-Clause"
] | 305 | 2015-01-02T13:18:24.000Z | 2021-08-20T18:03:28.000Z | pylearn2/cross_validation/tests/test_cross_validation.py | ikervazquezlopez/Pylearn2 | 2971e8f64374ffde572d4cf967aad5342beaf5e0 | [
"BSD-3-Clause"
] | 976 | 2015-01-01T17:08:51.000Z | 2022-03-25T19:53:17.000Z | """
Tests for cross-validation module.
"""
import os
import tempfile
from pylearn2.config import yaml_parse
from pylearn2.testing.skip import skip_if_no_sklearn
def test_train_cv():
"""Test TrainCV class."""
skip_if_no_sklearn()
handle, layer0_filename = tempfile.mkstemp()
handle, layer1_filename = t... | 31.919811 | 78 | 0.577213 |
7952bc3d09b6d4ebbc2cd05122e182bdc8d497b5 | 3,127 | py | Python | msgraph-cli-extensions/v1_0/schemaextensions_v1_0/azext_schemaextensions_v1_0/vendored_sdks/schemaextensions/_schema_extensions.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/schemaextensions_v1_0/azext_schemaextensions_v1_0/vendored_sdks/schemaextensions/_schema_extensions.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | 22 | 2022-03-29T22:54:37.000Z | 2022-03-29T22:55:27.000Z | msgraph-cli-extensions/v1_0/schemaextensions_v1_0/azext_schemaextensions_v1_0/vendored_sdks/schemaextensions/_schema_extensions.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"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 ... | 38.134146 | 119 | 0.668052 |
7952bc3d985dfacdb5896735e8f111f36c8b2254 | 10,203 | py | Python | brian2/sphinxext/briandoc.py | chbehrens/brian2 | 46b5264caa5375ae13084508b5c1049e0c9e019e | [
"BSD-2-Clause"
] | null | null | null | brian2/sphinxext/briandoc.py | chbehrens/brian2 | 46b5264caa5375ae13084508b5c1049e0c9e019e | [
"BSD-2-Clause"
] | null | null | null | brian2/sphinxext/briandoc.py | chbehrens/brian2 | 46b5264caa5375ae13084508b5c1049e0c9e019e | [
"BSD-2-Clause"
] | null | null | null | """
========
briandoc
========
Sphinx extension that handles docstrings in the Numpy standard format with some
brian-specific tweaks. [1]
It will:
- Convert Parameters etc. sections to field lists.
- Convert See Also section to a See also entry.
- Renumber references.
- Extract the signature from the docstring, if i... | 36.701439 | 105 | 0.559541 |
7952bce0cd016ab73746766050ad45faabc7be49 | 872 | py | Python | Generic/patterns/observer.py | hc-tec/redis-py | 28172eb4de2bfc61b0ff1023dbf7b52d4f4ba47c | [
"MIT"
] | 1 | 2021-11-24T07:54:17.000Z | 2021-11-24T07:54:17.000Z | Generic/patterns/observer.py | hc-tec/pydis | 28172eb4de2bfc61b0ff1023dbf7b52d4f4ba47c | [
"MIT"
] | 1 | 2021-11-13T15:08:14.000Z | 2021-11-13T15:08:14.000Z | Generic/patterns/observer.py | hc-tec/pydis | 28172eb4de2bfc61b0ff1023dbf7b52d4f4ba47c | [
"MIT"
] | 1 | 2021-11-24T07:54:28.000Z | 2021-11-24T07:54:28.000Z |
from typing import List
from abc import abstractmethod
class AbstractObserver:
@abstractmethod
def update(self, *args, **kwargs): ...
class AbstractSubject:
@abstractmethod
def attach(self, observer: AbstractObserver): ...
@abstractmethod
def detach(self, observer: AbstractObserver): ...... | 19.818182 | 53 | 0.66055 |
7952be95f94342b709705ee79481164113b97434 | 2,034 | py | Python | hyperlpr/e2e.py | lillin-bug/Vehicle-Detection | 4fe7a376788033e67ffec5a0ab584a6b44c0c000 | [
"Apache-2.0"
] | 13 | 2018-06-20T08:48:15.000Z | 2019-03-07T01:50:07.000Z | hyperlpr/e2e.py | 617475jordan/hyperDemo | 2b6eb60b900090034373d058646f2d4253a49b90 | [
"Apache-2.0"
] | null | null | null | hyperlpr/e2e.py | 617475jordan/hyperDemo | 2b6eb60b900090034373d058646f2d4253a49b90 | [
"Apache-2.0"
] | 5 | 2018-06-20T09:13:18.000Z | 2020-04-10T15:24:45.000Z | #coding=utf-8
from keras import backend as K
from keras.models import load_model
from keras.layers import *
import numpy as np
import random
import string
import cv2
import e2emodel as model
chars = [u"京", u"沪", u"津", u"渝", u"冀", u"晋", u"蒙", u"辽", u"吉", u"黑", u"苏", u"浙", u"皖", u"闽", u"赣", u"鲁", u"豫", u"鄂", u"湘", u"粤",... | 31.78125 | 138 | 0.555064 |
7952beab10b4a44cd448cd627097ea34b8e3125c | 7,308 | py | Python | composer/algorithms/colout/colout.py | anisehsani/composer | 42599682d50409b4a4eb7c91fad85d67418cee13 | [
"Apache-2.0"
] | null | null | null | composer/algorithms/colout/colout.py | anisehsani/composer | 42599682d50409b4a4eb7c91fad85d67418cee13 | [
"Apache-2.0"
] | null | null | null | composer/algorithms/colout/colout.py | anisehsani/composer | 42599682d50409b4a4eb7c91fad85d67418cee13 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
"""Core ColOut classes and functions."""
from __future__ import annotations
import logging
import textwrap
import weakref
from typing import TypeVar
import torch
from PIL.Image import Image as PillowImage
from torchvision.datasets import VisionDataset
from composer.a... | 37.476923 | 120 | 0.655446 |
7952c318602472bf666621ed5e15363ef9620813 | 59 | py | Python | nnsvs/__init__.py | oatsu-gh/nnsvs | 510f37bc1d1f15282646e4d34435b5d63686cf40 | [
"MIT"
] | 298 | 2020-05-03T04:45:59.000Z | 2022-03-31T14:38:52.000Z | nnsvs/__init__.py | oatsu-gh/nnsvs | 510f37bc1d1f15282646e4d34435b5d63686cf40 | [
"MIT"
] | 54 | 2020-05-02T16:14:30.000Z | 2022-03-30T18:04:11.000Z | nnsvs/__init__.py | oatsu-gh/nnsvs | 510f37bc1d1f15282646e4d34435b5d63686cf40 | [
"MIT"
] | 39 | 2020-05-08T04:50:17.000Z | 2022-03-21T18:46:14.000Z | # coding: utf-8
from .version import version as __version__ | 29.5 | 43 | 0.79661 |
7952c5430ec778869f3f63341b3815069c7cf637 | 1,826 | py | Python | hooks/pre_gen_project.py | ma7modx/cookiecutter-django | c29ed729acc973977809311bdaa493342dfd38c6 | [
"BSD-3-Clause"
] | null | null | null | hooks/pre_gen_project.py | ma7modx/cookiecutter-django | c29ed729acc973977809311bdaa493342dfd38c6 | [
"BSD-3-Clause"
] | 2 | 2018-09-27T10:51:31.000Z | 2018-10-04T17:16:42.000Z | hooks/pre_gen_project.py | ma7modx/cookiecutter-django | c29ed729acc973977809311bdaa493342dfd38c6 | [
"BSD-3-Clause"
] | null | null | null | """
NOTE:
the below code is to be maintained Python 2.x-compatible
as the whole Cookiecutter Django project initialization
can potentially be run in Python 2.x environment.
TODO: ? restrict Cookiecutter Django project initialization to Python 3.x environments only
"""
from __future__ import print_function
... | 32.607143 | 101 | 0.572289 |
7952c55667949ed2ef22e3aaff632db7c22d313e | 19,460 | py | Python | beets/autotag/mb.py | adammillerio/beets | c1d93165f05ba87387c61ae2eda3c93a77efa956 | [
"MIT"
] | null | null | null | beets/autotag/mb.py | adammillerio/beets | c1d93165f05ba87387c61ae2eda3c93a77efa956 | [
"MIT"
] | null | null | null | beets/autotag/mb.py | adammillerio/beets | c1d93165f05ba87387c61ae2eda3c93a77efa956 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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 t... | 35.641026 | 77 | 0.616084 |
7952c5a014fd6436c3d7ad00c4de38a77f55cd98 | 230 | py | Python | public/app/models/all_transactions.py | iconation/ICONScan | 3fb2f364a678a0e8d2b8a4a0d2275fbe8e2e3b50 | [
"Apache-2.0"
] | null | null | null | public/app/models/all_transactions.py | iconation/ICONScan | 3fb2f364a678a0e8d2b8a4a0d2275fbe8e2e3b50 | [
"Apache-2.0"
] | null | null | null | public/app/models/all_transactions.py | iconation/ICONScan | 3fb2f364a678a0e8d2b8a4a0d2275fbe8e2e3b50 | [
"Apache-2.0"
] | null | null | null |
class AllTransactions:
def __init__ (self, db):
db.sql.execute (open ("app/sql/all_icx_transactions.sql", "rb").read())
self.result = db.sql.fetchall()
def process (db):
return AllTransactions(db).result
| 25.555556 | 79 | 0.66087 |
7952c6bcb478498482cddbee36d74677a502ecd2 | 5,403 | py | Python | contrib/seeds/makeseeds.py | afiniel/but | ac5a1d9d05c3b4cb7c6087bcfb19da218e40f8c3 | [
"MIT"
] | 13 | 2021-04-24T14:07:48.000Z | 2021-12-29T18:10:08.000Z | contrib/seeds/makeseeds.py | afiniel/but | ac5a1d9d05c3b4cb7c6087bcfb19da218e40f8c3 | [
"MIT"
] | 13 | 2021-04-22T17:44:59.000Z | 2022-02-22T10:38:44.000Z | contrib/seeds/makeseeds.py | afiniel/but | ac5a1d9d05c3b4cb7c6087bcfb19da218e40f8c3 | [
"MIT"
] | 22 | 2021-06-05T00:58:07.000Z | 2022-02-12T16:46:36.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from "protx list valid 1"
#
NSEEDS=512
MAX_SEEDS_PER_ASN=4
# These are hosts tha... | 31.596491 | 168 | 0.585601 |
7952c88d5ecff2e02c14d66029c5f34017d324d0 | 5,468 | py | Python | awx_collection/plugins/modules/tower_receive.py | bhyunki/awx | ce588a6af5a5c7f71a5b176ffe53eda5ebc3492c | [
"Apache-2.0"
] | 1 | 2021-04-15T18:50:58.000Z | 2021-04-15T18:50:58.000Z | awx_collection/plugins/modules/tower_receive.py | bhyunki/awx | ce588a6af5a5c7f71a5b176ffe53eda5ebc3492c | [
"Apache-2.0"
] | 35 | 2021-03-01T06:34:26.000Z | 2022-03-01T01:18:42.000Z | awx_collection/plugins/modules/tower_receive.py | bhyunki/awx | ce588a6af5a5c7f71a5b176ffe53eda5ebc3492c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, John Westcott IV <john.westcott.iv@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version':... | 27.34 | 131 | 0.645208 |
7952c9600d46fc478a084344b6b070cb5976121f | 972 | py | Python | promgen/util.py | kfdm/promgen | 2fdff588fbee7cc74fdffec35f18c64e8ec420e6 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | promgen/util.py | kfdm/promgen | 2fdff588fbee7cc74fdffec35f18c64e8ec420e6 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | promgen/util.py | kfdm/promgen | 2fdff588fbee7cc74fdffec35f18c64e8ec420e6 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017 LINE Corporation
# These sources are released under the terms of the MIT license: see LICENSE
import requests.sessions
from promgen.version import __version__
# Wrappers around request api to ensure we always attach our user agent
# https://github.com/requests/requests/blob/master/requests/api.p... | 34.714286 | 76 | 0.708848 |
7952c977de00561db80ce8d8b1efbcdbbfd6764c | 2,412 | py | Python | Software/Python/grove_dht_pro.py | yasu-kun/GrovePi | 1d583cfee9397290587282750bdc25dd910b0018 | [
"MIT"
] | null | null | null | Software/Python/grove_dht_pro.py | yasu-kun/GrovePi | 1d583cfee9397290587282750bdc25dd910b0018 | [
"MIT"
] | null | null | null | Software/Python/grove_dht_pro.py | yasu-kun/GrovePi | 1d583cfee9397290587282750bdc25dd910b0018 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# GrovePi Example for using the Grove Temperature & Humidity Sensor Pro
# (http://www.seeedstudio.com/wiki/Grove_-_Temperature_and_Humidity_Sensor_Pro)
#
# The GrovePi connects the Raspberry Pi and Grove sensors.
# You can learn more about GrovePi here: http://www.dexterindustries.com/GroveP... | 40.881356 | 107 | 0.752488 |
7952c97ca185c8c1f29d623c1376ff5ca796fd56 | 3,711 | py | Python | heatmap/guided_backprop.py | MickeyZeng/Data-Visualization | c7005d1096545d7a5eb96dd0c9bc13e874d42fa4 | [
"MIT"
] | null | null | null | heatmap/guided_backprop.py | MickeyZeng/Data-Visualization | c7005d1096545d7a5eb96dd0c9bc13e874d42fa4 | [
"MIT"
] | null | null | null | heatmap/guided_backprop.py | MickeyZeng/Data-Visualization | c7005d1096545d7a5eb96dd0c9bc13e874d42fa4 | [
"MIT"
] | null | null | null | """
Created on Thu Oct 26 11:23:47 2017
@author: Utku Ozbulak - github.com/utkuozbulak
"""
import torch
from torch.nn import ReLU
class GuidedBackprop():
"""
Produces gradients generated with guided back propagation from the given image
"""
def __init__(self, model):
self.model = model
... | 37.484848 | 95 | 0.663164 |
7952c9f24c36ca687a698eb5f5a58215c97c6724 | 1,800 | py | Python | skl2onnx/shape_calculators/svd.py | MaxNoe/sklearn-onnx | 698c9347e7c70cbb1a2c5bba1657e6548ff5897d | [
"MIT"
] | 1 | 2021-04-12T12:38:20.000Z | 2021-04-12T12:38:20.000Z | skl2onnx/shape_calculators/svd.py | MaxNoe/sklearn-onnx | 698c9347e7c70cbb1a2c5bba1657e6548ff5897d | [
"MIT"
] | null | null | null | skl2onnx/shape_calculators/svd.py | MaxNoe/sklearn-onnx | 698c9347e7c70cbb1a2c5bba1657e6548ff5897d | [
"MIT"
] | 1 | 2020-10-01T09:26:27.000Z | 2020-10-01T09:26:27.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from ..co... | 39.130435 | 76 | 0.655556 |
7952caa64d8b156eb59cb505b7bc2793a2d3ee09 | 19,226 | py | Python | py/riscv/AssemblyHelperRISCV.py | jeremybennett/force-riscv | a5222a3b3fa8a0b9464204056ddca148f16b7e49 | [
"Apache-2.0"
] | null | null | null | py/riscv/AssemblyHelperRISCV.py | jeremybennett/force-riscv | a5222a3b3fa8a0b9464204056ddca148f16b7e49 | [
"Apache-2.0"
] | null | null | null | py/riscv/AssemblyHelperRISCV.py | jeremybennett/force-riscv | a5222a3b3fa8a0b9464204056ddca148f16b7e49 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) [2020] Futurewei Technologies, Inc.
#
# FORCE-RISCV is 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
#
# THIS SOFTWARE IS PRO... | 60.649842 | 202 | 0.731041 |
7952cabc78198b5ff97e744c979d3651ab8906ec | 6,404 | py | Python | src/datadog_api_client/v1/model/widget_display_type.py | mrhwick/datadog-api-client-python | 9f57bf378b80b7558070087182722f4ca88d630d | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v1/model/widget_display_type.py | mrhwick/datadog-api-client-python | 9f57bf378b80b7558070087182722f4ca88d630d | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v1/model/widget_display_type.py | mrhwick/datadog-api-client-python | 9f57bf378b80b7558070087182722f4ca88d630d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
import re # noqa: F401
import sys # noqa: F401
import nulltype # ... | 38.119048 | 122 | 0.574329 |
7952cbd7eb2c048813931c881ec351c93bfb8214 | 81 | py | Python | web_server/web_server/models/__init__.py | mahonda/project-vending-machine | 8180163047a14ec61cbbedc5a63702f7b05c4c29 | [
"MIT"
] | null | null | null | web_server/web_server/models/__init__.py | mahonda/project-vending-machine | 8180163047a14ec61cbbedc5a63702f7b05c4c29 | [
"MIT"
] | null | null | null | web_server/web_server/models/__init__.py | mahonda/project-vending-machine | 8180163047a14ec61cbbedc5a63702f7b05c4c29 | [
"MIT"
] | null | null | null | from .Doggo import Doggo
from .Owner import Owner
from .invmodel import invmodel
| 20.25 | 30 | 0.814815 |
7952cc0e4763474e66bcd6758d30899b7a38a931 | 13,385 | py | Python | featexp/base.py | luobaozhu/featexp | c371494e9cfd08dababdfa5226929b1b7f0c8f73 | [
"MIT"
] | 1 | 2020-11-26T07:46:58.000Z | 2020-11-26T07:46:58.000Z | featexp/base.py | luobaozhu/featexp | c371494e9cfd08dababdfa5226929b1b7f0c8f73 | [
"MIT"
] | null | null | null | featexp/base.py | luobaozhu/featexp | c371494e9cfd08dababdfa5226929b1b7f0c8f73 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
def get_grouped_data(input_data, feature, target_col, bins, cuts=0):
"""
Bins continuous features into equal sample size buckets and returns the target mean in each bucket. Separates out
nulls into another bucket.
:param input_... | 49.758364 | 125 | 0.665446 |
7952ccc66a9215c56e45a434eec475746810d3ac | 1,033 | py | Python | setup.py | krzpiesiewicz/timeseries-pytorch | 1e543caf9ea3918fc65fa9d715a75273be99c8ec | [
"MIT"
] | null | null | null | setup.py | krzpiesiewicz/timeseries-pytorch | 1e543caf9ea3918fc65fa9d715a75273be99c8ec | [
"MIT"
] | null | null | null | setup.py | krzpiesiewicz/timeseries-pytorch | 1e543caf9ea3918fc65fa9d715a75273be99c8ec | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="timeseries-pytorch",
version="0.0.1",
author="Krzysztof Piesiewicz",
author_email="krz.piesiewicz@gmail.com",
description="A pytorch extension for timeseries package",
... | 32.28125 | 71 | 0.659245 |
7952ceaaed122da5fb26882fa23ff22ff2e25b08 | 4,281 | py | Python | Gaurav/Assignment 7/faster thread.py | Gaurav3963/AGS-intern-files | ee4db12755cf680c0575b3c1a6a6146ee415743a | [
"MIT"
] | null | null | null | Gaurav/Assignment 7/faster thread.py | Gaurav3963/AGS-intern-files | ee4db12755cf680c0575b3c1a6a6146ee415743a | [
"MIT"
] | null | null | null | Gaurav/Assignment 7/faster thread.py | Gaurav3963/AGS-intern-files | ee4db12755cf680c0575b3c1a6a6146ee415743a | [
"MIT"
] | 1 | 2021-07-26T05:45:53.000Z | 2021-07-26T05:45:53.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 3 16:07:39 2021
@author: patil
"""
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 2 17:47:33 2021
@author: patil
"""
import pyodbc as db
import pandas as pd
import time as t
import _thread
conn = db.connect('Driver={SQL Server};''Server=DESKTOP-VI5MRAI\GAURAVPATIL;''D... | 32.431818 | 125 | 0.636066 |
7952cefda21df3ff6c858300dc512504405e1924 | 40,265 | py | Python | ui/Ui_UpSite.py | osDanielLee/UpSite | 99da7c321dde2df52c2b886263541b30dd998f67 | [
"BSD-3-Clause"
] | 1 | 2016-11-25T11:10:44.000Z | 2016-11-25T11:10:44.000Z | ui/Ui_UpSite.py | osDanielLee/UpSite | 99da7c321dde2df52c2b886263541b30dd998f67 | [
"BSD-3-Clause"
] | null | null | null | ui/Ui_UpSite.py | osDanielLee/UpSite | 99da7c321dde2df52c2b886263541b30dd998f67 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'E:\workspace\UpSite\ui\UpSite.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attri... | 60.186846 | 118 | 0.701229 |
7952cf6aeeaddde1a6cb8780b0d0c59ade36800c | 50,779 | py | Python | napalm/nxos/nxos.py | TomCos/napalm | 81045d7e3a095b8d125505718ffe88fe40378be8 | [
"Apache-2.0"
] | null | null | null | napalm/nxos/nxos.py | TomCos/napalm | 81045d7e3a095b8d125505718ffe88fe40378be8 | [
"Apache-2.0"
] | null | null | null | napalm/nxos/nxos.py | TomCos/napalm | 81045d7e3a095b8d125505718ffe88fe40378be8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2015 Spotify AB. All rights reserved.
#
# The contents of this file are 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/LICE... | 38.911111 | 95 | 0.537801 |
7952cf6f77f4ac9948de6020fb529933a715bc93 | 337 | py | Python | pythran/tests/openmp.legacy/omp_parallel_private.py | xmar/pythran | dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592 | [
"BSD-3-Clause"
] | null | null | null | pythran/tests/openmp.legacy/omp_parallel_private.py | xmar/pythran | dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592 | [
"BSD-3-Clause"
] | null | null | null | pythran/tests/openmp.legacy/omp_parallel_private.py | xmar/pythran | dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592 | [
"BSD-3-Clause"
] | 1 | 2017-03-12T20:32:36.000Z | 2017-03-12T20:32:36.000Z | def omp_parallel_private():
sum = 0
num_threads = 0
if 'omp parallel':
sum1 = 7
'omp for'
for i in xrange(1, 1000):
sum1 += i
if 'omp critical':
sum += sum1
num_threads += 1
known_sum = (999 * 1000) / 2 + 7 * num_threads
return ... | 18.722222 | 50 | 0.486647 |
7952cffea3bdbe7a056dbe492ad7a909cd23fe13 | 17,818 | py | Python | models/external_functions.py | fyviezhao/dressing-in-order | 63790663ad0420d9d2dabed22d5c56dd40422313 | [
"BSD-3-Clause"
] | null | null | null | models/external_functions.py | fyviezhao/dressing-in-order | 63790663ad0420d9d2dabed22d5c56dd40422313 | [
"BSD-3-Clause"
] | null | null | null | models/external_functions.py | fyviezhao/dressing-in-order | 63790663ad0420d9d2dabed22d5c56dd40422313 | [
"BSD-3-Clause"
] | null | null | null | """
Functions are modified on top of GFLA.
GFLA's license: https://github.com/RenYurui/Global-Flow-Local-Attention/blob/master/LICENSE.md
"""
import torch
import torch.nn as nn
import torchvision.models as models
import torch.nn.functional as F
import os
import torchvision.transforms as transforms
import numpy as np
... | 39.861298 | 143 | 0.602986 |
7952d2538afb2a1c560af0897c14f0bc2c2e1a03 | 124 | py | Python | npm/apps.py | alexsilva/django-npm | 8d5c55c0219fda074ceabdd93b3806e65a008d9e | [
"MIT"
] | null | null | null | npm/apps.py | alexsilva/django-npm | 8d5c55c0219fda074ceabdd93b3806e65a008d9e | [
"MIT"
] | null | null | null | npm/apps.py | alexsilva/django-npm | 8d5c55c0219fda074ceabdd93b3806e65a008d9e | [
"MIT"
] | 1 | 2019-10-17T15:13:13.000Z | 2019-10-17T15:13:13.000Z | from django.apps import AppConfig
class NPMConfig(AppConfig):
name = 'npm'
verbose_name = "NPM package installer"
| 17.714286 | 42 | 0.725806 |
7952d2b747f6fc0fb56f9bda37d301b79d4f78ec | 6,353 | py | Python | seahub/api2/endpoints/repo_trash.py | weimens/seahub | 5ecf78ed7a2ddc72a23961804ee41be21c24893f | [
"Apache-2.0"
] | 101 | 2021-05-16T06:00:03.000Z | 2021-12-01T02:02:29.000Z | seahub/api2/endpoints/repo_trash.py | weimens/seahub | 5ecf78ed7a2ddc72a23961804ee41be21c24893f | [
"Apache-2.0"
] | null | null | null | seahub/api2/endpoints/repo_trash.py | weimens/seahub | 5ecf78ed7a2ddc72a23961804ee41be21c24893f | [
"Apache-2.0"
] | 2 | 2021-10-19T05:22:40.000Z | 2022-01-12T03:55:34.000Z | # Copyright (c) 2012-2016 Seafile Ltd.
import stat
import logging
from rest_framework.authentication import SessionAuthentication
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
from seahub.a... | 35.294444 | 98 | 0.647096 |
7952d3806dbc35bce4dfeb2e6e4b9d9cca068fae | 1,108 | py | Python | tests/passive/test_all_ports.py | jonyboi396825/COM-Server | e4e8a1a5e9f86c1036ebb7ac3d39c20b63e7e905 | [
"MIT"
] | 4 | 2021-11-09T04:11:51.000Z | 2022-01-30T01:03:16.000Z | tests/passive/test_all_ports.py | jonyboi396825/COM-Server | e4e8a1a5e9f86c1036ebb7ac3d39c20b63e7e905 | [
"MIT"
] | 55 | 2021-11-15T16:36:25.000Z | 2022-03-10T04:48:08.000Z | tests/passive/test_all_ports.py | jonyboi396825/COM-Server | e4e8a1a5e9f86c1036ebb7ac3d39c20b63e7e905 | [
"MIT"
] | 1 | 2021-11-12T02:14:07.000Z | 2021-11-12T02:14:07.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests if lists ports properly. Needs Arduino microcontroller to be plugged in to test (otherwise skipped).
"""
import glob
import sys
import re
from com_server.tools import all_ports
import pytest
if sys.platform.startswith("linux"):
# usb and acm for linux on... | 24.622222 | 106 | 0.624549 |
7952d4429bcacf01ac83eb864d49b7b030f98b62 | 5,648 | py | Python | core/webserver.py | RASSec/Mario-Mario- | 7bc3e6fbf9548ec4be0864c47b250f5e1fbb0a28 | [
"Apache-2.0"
] | 1 | 2021-11-09T08:55:10.000Z | 2021-11-09T08:55:10.000Z | core/webserver.py | RASSec/Mario-Mario- | 7bc3e6fbf9548ec4be0864c47b250f5e1fbb0a28 | [
"Apache-2.0"
] | null | null | null | core/webserver.py | RASSec/Mario-Mario- | 7bc3e6fbf9548ec4be0864c47b250f5e1fbb0a28 | [
"Apache-2.0"
] | 1 | 2021-11-09T08:55:12.000Z | 2021-11-09T08:55:12.000Z | import time
import api.web
from api.mongo import evetomongo
from lib.data import config, clean_status
from api.mongo import clean_mongo, show_db
from api.logger import logger
import os
import json
from flask import Flask, request, redirect, url_for, jsonify, send_from_directory, make_response, Response
def webserver(... | 37.157895 | 106 | 0.578081 |
7952d445d9c100ea5f467f1fd717585ed0f0dc89 | 337 | py | Python | testMonthbox.py | altmind/npyscreen | 8ce31204e1de1fbd2939ffe2d8c3b3120e93a4d0 | [
"BSD-2-Clause"
] | 442 | 2015-06-01T15:02:34.000Z | 2022-02-23T12:40:58.000Z | testMonthbox.py | altmind/npyscreen | 8ce31204e1de1fbd2939ffe2d8c3b3120e93a4d0 | [
"BSD-2-Clause"
] | 79 | 2015-06-23T15:06:51.000Z | 2021-09-06T20:29:16.000Z | testMonthbox.py | altmind/npyscreen | 8ce31204e1de1fbd2939ffe2d8c3b3120e93a4d0 | [
"BSD-2-Clause"
] | 138 | 2015-07-07T20:05:21.000Z | 2022-01-21T17:09:42.000Z | #!/bin/env python
import npyscreen
class MainFm(npyscreen.Form):
def create(self):
self.mb = self.add(npyscreen.MonthBox,
use_datetime = True)
class TestApp(npyscreen.NPSAppManaged):
def onStart(self):
self.addForm("MAIN", MainFm)
if __name__ == "__main__":
A = TestA... | 18.722222 | 46 | 0.620178 |
7952d60c21430e41013b1b0ef3079780b0ec6f18 | 6,150 | py | Python | PythonClient/car/lidar_occ_grid.py | VegaVK/AirSim | c7c1f55a7d5dc97f1fdd98fb1df191db2576da12 | [
"MIT"
] | null | null | null | PythonClient/car/lidar_occ_grid.py | VegaVK/AirSim | c7c1f55a7d5dc97f1fdd98fb1df191db2576da12 | [
"MIT"
] | null | null | null | PythonClient/car/lidar_occ_grid.py | VegaVK/AirSim | c7c1f55a7d5dc97f1fdd98fb1df191db2576da12 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import rospy
import setup_path
import airsim
import cv2
import numpy as np
import os
import sys
import math
import setup_path
import argparse
import pprint
import time
from geometry_msgs.msg import Point
from visualization_msgs.msg import Marker
# Use below in settings.json with blocks enviro... | 32.198953 | 99 | 0.687967 |
7952d6b36661d93c315d7500c0c1c017f48fd367 | 9,728 | py | Python | src/train.py | prabhudevguntur/voice_conversion | 0f6799870d8dbd2a61639bfb0530e8979cdd1ff7 | [
"MIT"
] | null | null | null | src/train.py | prabhudevguntur/voice_conversion | 0f6799870d8dbd2a61639bfb0530e8979cdd1ff7 | [
"MIT"
] | null | null | null | src/train.py | prabhudevguntur/voice_conversion | 0f6799870d8dbd2a61639bfb0530e8979cdd1ff7 | [
"MIT"
] | null | null | null | import argparse
import os
import numpy as np
import itertools
import sys
from tqdm import tqdm
from torch.utils.data import DataLoader
from torch.autograd import Variable
from models import *
from data_proc import DataProc
import torch.nn as nn
import torch.nn.functional as F
import torch
from utils import plot_bat... | 36.709434 | 121 | 0.663343 |
7952d8d0d8ac3b4f74da68cb9d1e2efc59cfae5c | 3,098 | py | Python | opsdroid/memory.py | JiahnChoi/opsdroid.kr | 0893456b0f9f6c70edf7c330a7593d87450538cc | [
"Apache-2.0"
] | 712 | 2016-08-09T21:30:07.000Z | 2022-03-24T09:38:21.000Z | opsdroid/memory.py | JiahnChoi/opsdroid.kr | 0893456b0f9f6c70edf7c330a7593d87450538cc | [
"Apache-2.0"
] | 1,767 | 2016-07-27T13:01:25.000Z | 2022-03-29T04:25:10.000Z | opsdroid/memory.py | JiahnChoi/opsdroid.kr | 0893456b0f9f6c70edf7c330a7593d87450538cc | [
"Apache-2.0"
] | 536 | 2016-07-31T14:23:41.000Z | 2022-03-22T17:35:15.000Z | """Class for persisting information in opsdroid."""
import logging
_LOGGER = logging.getLogger(__name__)
class Memory:
"""A Memory object.
An object to obtain, store and persist data outside of opsdroid.
Attributes:
databases (:obj:`list` of :obj:`Database`): List of database objects.
... | 26.93913 | 77 | 0.585862 |
7952d9c8f97cebb4f884183a34924c457f717577 | 1,931 | py | Python | pipenv/resolver.py | ksonj/pipenv | 72bbd6206ae80fcdbcb25a11a7a289a12ad5c1d6 | [
"MIT"
] | null | null | null | pipenv/resolver.py | ksonj/pipenv | 72bbd6206ae80fcdbcb25a11a7a289a12ad5c1d6 | [
"MIT"
] | null | null | null | pipenv/resolver.py | ksonj/pipenv | 72bbd6206ae80fcdbcb25a11a7a289a12ad5c1d6 | [
"MIT"
] | null | null | null | import os
import sys
import json
import logging
os.environ['PIP_PYTHON_PATH'] = sys.executable
for _dir in ('vendor', 'patched', '..'):
dirpath = os.path.sep.join([os.path.dirname(__file__), _dir])
sys.path.insert(0, dirpath)
def which(*args, **kwargs):
return sys.executable
def main():
is_verbose ... | 25.407895 | 68 | 0.5826 |
7952dc01bb9276dbc38704715c2103054e876005 | 3,306 | py | Python | CRUD/settings.py | Anik-Bardhan/Employee-List | 70f9361ce2a67c0a4966fb3075a53adc7cf62607 | [
"MIT"
] | null | null | null | CRUD/settings.py | Anik-Bardhan/Employee-List | 70f9361ce2a67c0a4966fb3075a53adc7cf62607 | [
"MIT"
] | null | null | null | CRUD/settings.py | Anik-Bardhan/Employee-List | 70f9361ce2a67c0a4966fb3075a53adc7cf62607 | [
"MIT"
] | null | null | null | """
Django settings for CRUD project.
Generated by 'django-admin startproject' using Django 3.2.9.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib im... | 25.430769 | 91 | 0.698427 |
7952dc47df56e7abe32825640599d818abb6b3e1 | 506 | py | Python | Interview_Preparation_Kit/balanced-brackets.py | csixteen/HackerRank | 3ef6fa48599341f481b9e266c69df2d449a7b313 | [
"MIT"
] | 4 | 2018-04-19T20:32:54.000Z | 2020-04-21T12:28:00.000Z | Interview_Preparation_Kit/balanced-brackets.py | csixteen/HackerRank | 3ef6fa48599341f481b9e266c69df2d449a7b313 | [
"MIT"
] | null | null | null | Interview_Preparation_Kit/balanced-brackets.py | csixteen/HackerRank | 3ef6fa48599341f481b9e266c69df2d449a7b313 | [
"MIT"
] | null | null | null | from collections import deque
def isBalanced(s):
brackets_close = {')': '(', '}': '{', ']': '['}
stack = deque(s[0])
for c in s[1:]:
if c in brackets_close:
if len(stack) > 0 and brackets_close[c] == stack[-1]:
stack.pop()
else:
return 'NO'
... | 22 | 65 | 0.488142 |
7952dc61a2a90601e50cb1193be023c9d0e4eca0 | 6,074 | py | Python | tests/django_init.py | MicrohexHQ/peeringdb | 179377ba778c594a1af3cf55a77f3b11e57f4b06 | [
"BSD-2-Clause"
] | null | null | null | tests/django_init.py | MicrohexHQ/peeringdb | 179377ba778c594a1af3cf55a77f3b11e57f4b06 | [
"BSD-2-Clause"
] | null | null | null | tests/django_init.py | MicrohexHQ/peeringdb | 179377ba778c594a1af3cf55a77f3b11e57f4b06 | [
"BSD-2-Clause"
] | null | null | null | from django.conf import settings
# lazy init for translations
_ = lambda s: s
#from django.utils.translation import ugettext_lazy as _
settings.configure(
PACKAGE_VERSION="dev",
RELEASE_ENV="dev",
MIGRATION_MODULES={"django_peeringdb":None},
INSTALLED_APPS=[
'django.contrib.auth',
'dj... | 33.558011 | 98 | 0.613928 |
7952dc8a75e875e334299f135e89fe68078f97df | 1,205 | py | Python | quick_sort.py | sazlin/data-structures | a7ec654dfcb46fdb1e3ccbf16d02c62e36ff2f36 | [
"MIT"
] | 1 | 2015-02-17T06:23:53.000Z | 2015-02-17T06:23:53.000Z | quick_sort.py | sazlin/data-structures | a7ec654dfcb46fdb1e3ccbf16d02c62e36ff2f36 | [
"MIT"
] | null | null | null | quick_sort.py | sazlin/data-structures | a7ec654dfcb46fdb1e3ccbf16d02c62e36ff2f36 | [
"MIT"
] | null | null | null | def quick_sort(values):
"""simple quick sort implementation"""
if len(values) == 0:
return []
elif len(values) == 1:
return values
elif len(values) == 2:
if values[0] > values[1]:
return values[::-1]
else:
return values
pivot = values[0]
le... | 30.125 | 72 | 0.580083 |
7952dccce0cf433f8f4ce4f89ca135aca74690aa | 2,033 | py | Python | tests/conftest.py | jackdesert/anony-mouse | 61e111ef6a38ea9e440fc76610676555dce1795c | [
"MIT"
] | null | null | null | tests/conftest.py | jackdesert/anony-mouse | 61e111ef6a38ea9e440fc76610676555dce1795c | [
"MIT"
] | null | null | null | tests/conftest.py | jackdesert/anony-mouse | 61e111ef6a38ea9e440fc76610676555dce1795c | [
"MIT"
] | null | null | null | import os
from pyramid.paster import get_appsettings
from pyramid.scripting import prepare
from pyramid.testing import DummyRequest, testConfig
import pytest
import webtest
from amouse import main
def pytest_addoption(parser):
parser.addoption('--ini', action='store', metavar='INI_FILE')
@pytest.fixture(scope=... | 23.367816 | 78 | 0.699951 |
7952dd8663c79f11a2df45c8e1155213164a9bef | 109 | py | Python | Sessions/S04/module2.py | paulbordea/session3 | a2edf697cbe9b9aa98383562416d4fdf1e19b482 | [
"MIT"
] | null | null | null | Sessions/S04/module2.py | paulbordea/session3 | a2edf697cbe9b9aa98383562416d4fdf1e19b482 | [
"MIT"
] | null | null | null | Sessions/S04/module2.py | paulbordea/session3 | a2edf697cbe9b9aa98383562416d4fdf1e19b482 | [
"MIT"
] | null | null | null | def f():
print('f executed from module 2')
if __name__ == '__main__':
print('We are in module 2')
| 13.625 | 37 | 0.605505 |
7952dd9397307dafc607ed562a985e589e5af5a6 | 695 | py | Python | validation_tool/iout/ancillary_data.py | TUW-GEO/web-validation-tool | e73faeeda0a5abe4366f1dd39c77d2e63d8bae93 | [
"MIT"
] | null | null | null | validation_tool/iout/ancillary_data.py | TUW-GEO/web-validation-tool | e73faeeda0a5abe4366f1dd39c77d2e63d8bae93 | [
"MIT"
] | null | null | null | validation_tool/iout/ancillary_data.py | TUW-GEO/web-validation-tool | e73faeeda0a5abe4366f1dd39c77d2e63d8bae93 | [
"MIT"
] | null | null | null | '''
Created on Jun 26, 2013
@author: pydev
'''
import scipy.io as sc_io
import numpy as np
#import general.grid.dgg.warp_grid_constants as dgg_const
import psycopg2 as psql
#ind_ld = dgg_const.ind_ld()
porosity = sc_io.readsav('/media/sf_D/porosity_ind_ld.sav')['porosity']
porosity_top=porosity['porosity_top']
c... | 20.441176 | 96 | 0.717986 |
7952ddc643f193680f513dcde6ca7fba6cbaa322 | 5,539 | py | Python | girder/api/docs.py | adsorensen/girder | ae461d1198e6173f36168a71d4f7a9a5f66e6b70 | [
"Apache-2.0"
] | null | null | null | girder/api/docs.py | adsorensen/girder | ae461d1198e6173f36168a71d4f7a9a5f66e6b70 | [
"Apache-2.0"
] | null | null | null | girder/api/docs.py | adsorensen/girder | ae461d1198e6173f36168a71d4f7a9a5f66e6b70 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | 34.836478 | 79 | 0.657339 |
7952dec39289e9e4e164e9af1642a14cd5f7c5ce | 12,850 | py | Python | lib/python/treadmill/tests/presence_test.py | krcooke/treadmill | 613008fee88a150f983ab12d8ef2e118fb77bb51 | [
"Apache-2.0"
] | 133 | 2016-09-15T13:36:12.000Z | 2021-01-18T06:29:13.000Z | lib/python/treadmill/tests/presence_test.py | krcooke/treadmill | 613008fee88a150f983ab12d8ef2e118fb77bb51 | [
"Apache-2.0"
] | 108 | 2016-12-28T23:41:27.000Z | 2020-03-05T21:20:37.000Z | lib/python/treadmill/tests/presence_test.py | krcooke/treadmill | 613008fee88a150f983ab12d8ef2e118fb77bb51 | [
"Apache-2.0"
] | 69 | 2016-09-23T20:38:58.000Z | 2020-11-11T02:31:21.000Z | """Unit test for Treadmill linux runtime presence module.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import io
import shutil
import tempfile
import time
import unittest
import kazoo
import kazoo.cl... | 35.793872 | 144 | 0.588794 |
7952ded1ad228e7ffae3f9667d8caefdf29a86c8 | 16,846 | py | Python | apps/sad/models.py | upeu-jul-20161-epis-ads2/americas | a9632bb7d6fb4f6479f41e5cd61efcdd3d435095 | [
"BSD-3-Clause"
] | null | null | null | apps/sad/models.py | upeu-jul-20161-epis-ads2/americas | a9632bb7d6fb4f6479f41e5cd61efcdd3d435095 | [
"BSD-3-Clause"
] | null | null | null | apps/sad/models.py | upeu-jul-20161-epis-ads2/americas | a9632bb7d6fb4f6479f41e5cd61efcdd3d435095 | [
"BSD-3-Clause"
] | null | null | null | # _*_ coding: utf-8 _*_
"""
@copyright Copyright (c) 2014 Submit Consulting
@author Angel Sullon (@asullom)
@package auth
@Descripcion Definición de los modelos
"""
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.text import capfirst, get_text_list
from ... | 31.784906 | 152 | 0.631248 |
7952df80495044abc65ee30af9623cc1e23e09ba | 7,628 | py | Python | base/base_trainer.py | Lo1s/superresolution | 18052465694bfc2543b9af71d8012d854a516d1a | [
"MIT",
"Unlicense"
] | 1 | 2021-06-19T15:03:58.000Z | 2021-06-19T15:03:58.000Z | base/base_trainer.py | Lo1s/superresolution | 18052465694bfc2543b9af71d8012d854a516d1a | [
"MIT",
"Unlicense"
] | null | null | null | base/base_trainer.py | Lo1s/superresolution | 18052465694bfc2543b9af71d8012d854a516d1a | [
"MIT",
"Unlicense"
] | null | null | null | import os
import torch
import torchvision.transforms as transforms
import torchvision.utils as vutils
from PIL import Image
from abc import abstractmethod
from numpy import inf
from logger import TensorboardWriter
from model.esrgan.utils.utils import MODEL_KEY, GENERATOR_KEY, DISCRIMINATOR_KEY
from test import save_pre... | 39.937173 | 112 | 0.583901 |
7952e11bfc31e447441b435b7e5ed005bbd41a60 | 53,020 | py | Python | src/datera/datera_api22.py | JochenFriedrich/cinder-driver | bab97011d30b8927e13908dc6651d45257d6522c | [
"Apache-2.0"
] | null | null | null | src/datera/datera_api22.py | JochenFriedrich/cinder-driver | bab97011d30b8927e13908dc6651d45257d6522c | [
"Apache-2.0"
] | null | null | null | src/datera/datera_api22.py | JochenFriedrich/cinder-driver | bab97011d30b8927e13908dc6651d45257d6522c | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Datera
# 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 applic... | 41.78093 | 79 | 0.530441 |
7952e21d54a6679133845f09ca3eb01188569397 | 590 | py | Python | exercises/exc_01_11.py | attwaben/spacy-course | aa684aef31cfe8c41838017b9f6bf77fb89eac0f | [
"MIT"
] | null | null | null | exercises/exc_01_11.py | attwaben/spacy-course | aa684aef31cfe8c41838017b9f6bf77fb89eac0f | [
"MIT"
] | null | null | null | exercises/exc_01_11.py | attwaben/spacy-course | aa684aef31cfe8c41838017b9f6bf77fb89eac0f | [
"MIT"
] | null | null | null | import spacy
# Import the Matcher
from spacy.matcher import Matcher
nlp = spacy.load("en_core_web_sm")
doc = nlp("New iPhone X release date leaked as Apple reveals pre-orders by mistake")
# Initialize the Matcher with the shared vocabulary
matcher = Matcher(nlp.vocab)
# Create a pattern matching two tokens: "iPhone... | 28.095238 | 84 | 0.728814 |
7952e44a92a97ea590ea4378f2d36072e403617b | 3,825 | py | Python | pipeline/component_framework/constant.py | sdgdsffdsfff/bk-sops-tencent | e8aff91f822e79031e12b0f66943830f44ced506 | [
"Apache-2.0"
] | 1 | 2020-09-24T07:39:16.000Z | 2020-09-24T07:39:16.000Z | pipeline/component_framework/constant.py | sdgdsffdsfff/bk-sops-tencent | e8aff91f822e79031e12b0f66943830f44ced506 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:46:54.000Z | 2021-06-10T22:54:45.000Z | pipeline/component_framework/constant.py | sdgdsffdsfff/bk-sops-tencent | e8aff91f822e79031e12b0f66943830f44ced506 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 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... | 37.135922 | 115 | 0.641569 |
7952e4b01196c04380ea23918dc575f02235b708 | 5,961 | py | Python | src/mbed_cloud/_backends/billing/models/quota_usage_report.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 12 | 2017-12-28T11:18:43.000Z | 2020-10-04T12:11:15.000Z | src/mbed_cloud/_backends/billing/models/quota_usage_report.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 50 | 2017-12-21T12:50:41.000Z | 2020-01-13T16:07:08.000Z | src/mbed_cloud/_backends/billing/models/quota_usage_report.py | GQMai/mbed-cloud-sdk-python | 76ef009903415f37f69dcc5778be8f5fb14c08fe | [
"Apache-2.0"
] | 8 | 2018-04-25T17:47:29.000Z | 2019-08-29T06:38:27.000Z | # coding: utf-8
"""
Billing API
Billing API allows users to retrieve billing reports and service package details.
OpenAPI spec version: 1.4.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class QuotaUsageRe... | 27.85514 | 152 | 0.571716 |
7952e4f4ec31da946e6d02032a7f8c3804c54a34 | 3,077 | py | Python | p053_more_on_functions.py | bayramcicek/py-repo | e99d8881dd3eb5296ec5dcfba4de2c3418044897 | [
"Unlicense"
] | null | null | null | p053_more_on_functions.py | bayramcicek/py-repo | e99d8881dd3eb5296ec5dcfba4de2c3418044897 | [
"Unlicense"
] | null | null | null | p053_more_on_functions.py | bayramcicek/py-repo | e99d8881dd3eb5296ec5dcfba4de2c3418044897 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3.6
# created by cicek on 13.09.2018 22:19
'''
Python allows to have function with varying number of arguments. Using *args as
a function parameter enables you to pass an arbitrary number of arguments to
that function. The arguments are then accessible as the tuple args in the body
of the function.
''... | 21.669014 | 109 | 0.579786 |
7952e4fb88eb85def3df4c7041294dd733063c80 | 3,629 | py | Python | robinhood/quote.py | Marxvim/Robinhood-1 | c3c83391dcb3eb1b1584bf83a0d965d82c4679ed | [
"MIT"
] | 17 | 2020-03-21T14:19:11.000Z | 2021-12-29T07:16:01.000Z | robinhood/quote.py | Marxvim/Robinhood-1 | c3c83391dcb3eb1b1584bf83a0d965d82c4679ed | [
"MIT"
] | null | null | null | robinhood/quote.py | Marxvim/Robinhood-1 | c3c83391dcb3eb1b1584bf83a0d965d82c4679ed | [
"MIT"
] | 5 | 2020-06-11T20:51:44.000Z | 2022-01-10T06:35:25.000Z | from .detail.const_dict import ConstDict
from .detail.common import timestamp_now, _to_float
from datetime import datetime
import pandas as pd
class QuoteBase(ConstDict):
def __init__(self, quote, time=None):
quote['time'] = time if time else timestamp_now()
ConstDict.__init__(self, quote)
def _get(self, key)... | 22.128049 | 93 | 0.695233 |
7952e546db55a99523e0d050f27e09da0723baf3 | 49,045 | py | Python | third_party/python/Lib/test/test_sys.py | appotry/cosmopolitan | af4687cc3f2331a23dc336183ab58fe001cda082 | [
"ISC"
] | null | null | null | third_party/python/Lib/test/test_sys.py | appotry/cosmopolitan | af4687cc3f2331a23dc336183ab58fe001cda082 | [
"ISC"
] | null | null | null | third_party/python/Lib/test/test_sys.py | appotry/cosmopolitan | af4687cc3f2331a23dc336183ab58fe001cda082 | [
"ISC"
] | null | null | null | import unittest, test.support
from test.support.script_helper import assert_python_ok, assert_python_failure
import sys, io, os
import cosmo
import struct
import subprocess
import textwrap
import warnings
import operator
import codecs
import gc
import sysconfig
import platform
import locale
# count the number of test ... | 38.346364 | 116 | 0.582852 |
7952e5c7ae85dbca7d6c640913b3074b35e01434 | 602 | py | Python | src/main/easy/search_insert.py | eu-snehagupta/Leetcode | 7cfce8a385e0b0290fe054ecfd48e9a7a9a5ba83 | [
"MIT"
] | null | null | null | src/main/easy/search_insert.py | eu-snehagupta/Leetcode | 7cfce8a385e0b0290fe054ecfd48e9a7a9a5ba83 | [
"MIT"
] | null | null | null | src/main/easy/search_insert.py | eu-snehagupta/Leetcode | 7cfce8a385e0b0290fe054ecfd48e9a7a9a5ba83 | [
"MIT"
] | null | null | null | # Given a sorted array of distinct integers and
# a target value, return the index if the target is found.
# If not, return the index where it would be if it were inserted in order.
#
# Example 1:
# Input: nums = [1,3,5,6], target = 5
# Output: 2
# Constraints:
# 1 <= nums.length <= 10**4
# -10**4 <= nums[i] <= 10**4
... | 26.173913 | 74 | 0.664452 |
7952e5ca7de493242a32782badc6302611bb2a91 | 14,175 | py | Python | homeassistant/components/onewire/sensor.py | galihmelon/core | 0c852b5f816c9b21f244b7acebfcc952ff29b937 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/onewire/sensor.py | galihmelon/core | 0c852b5f816c9b21f244b7acebfcc952ff29b937 | [
"Apache-2.0"
] | 33 | 2020-12-18T07:14:41.000Z | 2022-03-31T06:03:54.000Z | homeassistant/components/onewire/sensor.py | galihmelon/core | 0c852b5f816c9b21f244b7acebfcc952ff29b937 | [
"Apache-2.0"
] | null | null | null | """Support for 1-Wire environment sensors."""
from glob import glob
import logging
import os
from pi1wire import InvalidCRCException, Pi1Wire, UnsupportResponseException
from pyownet import protocol
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.config_entries ... | 35.977157 | 131 | 0.605996 |
7952e61159ec31a4be5394b50f30cbc20f9b414e | 22,649 | py | Python | tools/aws_benchmarking/server/cluster_master.py | missyliu/Paddle | 3fd33d4df9aa44f482bca8214cca8e6d90f06da2 | [
"Apache-2.0"
] | null | null | null | tools/aws_benchmarking/server/cluster_master.py | missyliu/Paddle | 3fd33d4df9aa44f482bca8214cca8e6d90f06da2 | [
"Apache-2.0"
] | null | null | null | tools/aws_benchmarking/server/cluster_master.py | missyliu/Paddle | 3fd33d4df9aa44f482bca8214cca8e6d90f06da2 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle 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 app... | 32.68254 | 103 | 0.622721 |
7952e748d0d63226000aab83d0f9108214accaf9 | 970 | py | Python | mcpipy/mobius.py | wangtt03/raspberryjammod | d828d1b225c0dfc25d91f4e3569ce620fa231e14 | [
"MIT"
] | 338 | 2015-01-20T15:07:48.000Z | 2022-02-25T17:31:06.000Z | mcpipy/mobius.py | wangtt03/raspberryjammod | d828d1b225c0dfc25d91f4e3569ce620fa231e14 | [
"MIT"
] | 58 | 2015-03-26T12:21:41.000Z | 2022-02-20T21:01:33.000Z | mcpipy/mobius.py | wangtt03/raspberryjammod | d828d1b225c0dfc25d91f4e3569ce620fa231e14 | [
"MIT"
] | 112 | 2015-08-10T19:20:44.000Z | 2022-02-23T08:58:52.000Z | #
# Code by Alexander Pruss and under the MIT license
#
from mine import *
import sys
def draw_surface(xf,yf,zf,a0,a1,asteps,b0,b1,bsteps,ox,oy,oz,scalex,scaley,scalez,mcblock,mcmeta):
for i in range(asteps):
a = (a0 * (asteps-1-i) + a1 * i) / asteps
for j in range(bsteps):
b = (b0 * ... | 28.529412 | 138 | 0.593814 |
7952e824ec1f34f2bd465f3e6cfe635a7991d294 | 21,266 | py | Python | tests/hikari/impl/test_rate_limits.py | sabidib/hikari | e1e112a1b2938890e4abd38eb07b559fda7eedbb | [
"MIT"
] | 520 | 2020-10-12T22:53:55.000Z | 2022-03-30T17:59:53.000Z | tests/hikari/impl/test_rate_limits.py | sabidib/hikari | e1e112a1b2938890e4abd38eb07b559fda7eedbb | [
"MIT"
] | 319 | 2020-10-11T19:04:03.000Z | 2022-03-31T16:55:28.000Z | tests/hikari/impl/test_rate_limits.py | sabidib/hikari | e1e112a1b2938890e4abd38eb07b559fda7eedbb | [
"MIT"
] | 85 | 2020-10-17T20:25:47.000Z | 2022-03-31T15:19:40.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020 Nekokatt
# Copyright (c) 2021 davfsa
#
# 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 right... | 40.429658 | 119 | 0.67615 |
7952e8f694241643e0e7988d971554f6b4d638d0 | 42 | py | Python | src/pyecom/__init__.py | xavibj/pyecom | f66aa8db9ec0edb77d3f707a72ac0b7594002c7b | [
"MIT"
] | null | null | null | src/pyecom/__init__.py | xavibj/pyecom | f66aa8db9ec0edb77d3f707a72ac0b7594002c7b | [
"MIT"
] | null | null | null | src/pyecom/__init__.py | xavibj/pyecom | f66aa8db9ec0edb77d3f707a72ac0b7594002c7b | [
"MIT"
] | null | null | null | __version__ = "0.1.1"
from .main import * | 14 | 21 | 0.666667 |
7952e9370ca246690c07443dd0649685a5fcbfd0 | 18,399 | py | Python | datasets/spoken_word_dataset.py | lwang114/InformationQuantizer | 45419140708e612495fd324a9e5724306d4d4129 | [
"MIT"
] | null | null | null | datasets/spoken_word_dataset.py | lwang114/InformationQuantizer | 45419140708e612495fd324a9e5724306d4d4129 | [
"MIT"
] | null | null | null | datasets/spoken_word_dataset.py | lwang114/InformationQuantizer | 45419140708e612495fd324a9e5724306d4d4129 | [
"MIT"
] | null | null | null | import torch
import torchaudio
import torchvision
from torchvision import transforms
import nltk
from nltk.stem import WordNetLemmatizer
from collections import defaultdict
# from allennlp.predictors.predictor import Predictor
# import allennlp_models.structured_prediction
import numpy as np
import re
import os
import ... | 35.179732 | 140 | 0.613946 |
7952eaa0e9016cfbd529661ea6ed10b4951e3805 | 778 | py | Python | examples/python/kitti_pipeline.py | PRBonn/voxblox_pybind | 69337cff825260434a908df13aae2bc04ea3f8da | [
"MIT"
] | 7 | 2022-02-09T13:46:20.000Z | 2022-02-10T02:29:38.000Z | examples/python/kitti_pipeline.py | PRBonn/voxblox_pybind | 69337cff825260434a908df13aae2bc04ea3f8da | [
"MIT"
] | null | null | null | examples/python/kitti_pipeline.py | PRBonn/voxblox_pybind | 69337cff825260434a908df13aae2bc04ea3f8da | [
"MIT"
] | 2 | 2022-02-09T13:07:10.000Z | 2022-02-09T16:12:56.000Z | #!/usr/bin/env python3
# @file kitti_pipeline.py
# @author Ignacio Vizzo [ivizzo@uni-bonn.de]
#
# Copyright (c) 2021 Ignacio Vizzo, all rights reserved
import argh
from kitti_dataset import KITTIOdometryDataset as Dataset
from tsdf_pipeline import TSDFPipeline
def main(
kitti_root_dir: str,
seque... | 25.933333 | 69 | 0.690231 |
7952eab8feb8e3fa120ac79428ec0286d3a9abc8 | 1,601 | py | Python | tests/test_linter.py | noma4i/SublimeLinter3_backup | 479feb8acb3847b71c24f88835f091a023948b17 | [
"MIT"
] | null | null | null | tests/test_linter.py | noma4i/SublimeLinter3_backup | 479feb8acb3847b71c24f88835f091a023948b17 | [
"MIT"
] | 1 | 2021-09-08T11:18:17.000Z | 2021-09-08T11:18:17.000Z | tests/test_linter.py | noma4i/SublimeLinter3_backup | 479feb8acb3847b71c24f88835f091a023948b17 | [
"MIT"
] | 1 | 2021-09-08T09:43:47.000Z | 2021-09-08T09:43:47.000Z | # coding=utf8
#
# test_util.py
# Part of SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Joshua Hagins
#
# Project: https://github.com/SublimeLinter/SublimeLinter3
# License: MIT
#
"""This module tests functions in the lint.util module."""
from mock import MagicMock
class TestLinter:
... | 33.354167 | 114 | 0.662711 |
7952eb7c6fc70c7fa57bceb81769e6bc2c6286fa | 1,313 | py | Python | ieeextreme/x10_memory_management.py | ieeeunswsb/cpworkshop | 8da33deb295f4ca04ec025adc510d67a65d3d56c | [
"MIT"
] | 1 | 2019-07-09T14:40:18.000Z | 2019-07-09T14:40:18.000Z | ieeextreme/x10_memory_management.py | ieeeunswsb/cpworkshop | 8da33deb295f4ca04ec025adc510d67a65d3d56c | [
"MIT"
] | null | null | null | ieeextreme/x10_memory_management.py | ieeeunswsb/cpworkshop | 8da33deb295f4ca04ec025adc510d67a65d3d56c | [
"MIT"
] | null | null | null | # from math import floor
answers = []
test_cases = int(input())
for i in range(test_cases):
pages, page_size, memory_accesses = map(int, input().split(" "))
fifo_swaps = 0
lru_swaps = 0
lru_mem = []
fifo_mem = []
for j in range(memory_accesses):
address_accessed = int(input())
... | 26.26 | 72 | 0.538462 |
7952ecd98f17ddf979b725287530c9581f1bbf37 | 33,956 | py | Python | dataset.py | etraiger/PCWG | e66441df98dc712d3b9915aaf2c6f0d7feb7e52d | [
"MIT"
] | 1 | 2019-03-18T17:05:27.000Z | 2019-03-18T17:05:27.000Z | dataset.py | etraiger/PCWG | e66441df98dc712d3b9915aaf2c6f0d7feb7e52d | [
"MIT"
] | null | null | null | dataset.py | etraiger/PCWG | e66441df98dc712d3b9915aaf2c6f0d7feb7e52d | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import datetime
import math
import configuration
import rews
import binning
import warnings
warnings.simplefilter('ignore', np.RankWarning)
def getSeparatorValue(separator):
try:
return {"TAB":"\t",
"SPACE":" ",
"COMMA": ",",
... | 46.13587 | 264 | 0.668012 |
7952ed9bfc2d2444ea096f1a732945fb800bae3c | 424 | py | Python | examples/textrank-docker/textrank.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 82 | 2018-05-01T16:32:38.000Z | 2019-05-18T01:43:15.000Z | examples/textrank-docker/textrank.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 20 | 2018-05-01T19:32:48.000Z | 2019-04-12T07:57:48.000Z | examples/textrank-docker/textrank.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 15 | 2018-05-01T17:34:11.000Z | 2019-05-07T09:28:21.000Z | import json, sys
from gensim.summarization.summarizer import summarize
WORD_COUNT = 50
for line in sys.stdin:
article = json.loads(line)
try:
summary = summarize(
article["text"],
word_count = WORD_COUNT)
except ValueError:
# Handles "input must have more tha... | 16.96 | 58 | 0.617925 |
7952ee1a3eefcd6338a4c035fbaa51d6e720aae8 | 3,399 | py | Python | asposehtmlcloud/models/object_exist.py | aspose-html-cloud/aspose-html-cloud-python | b5abc7aba8ef0df355207480c2cccb282c09a970 | [
"MIT"
] | 2 | 2020-08-27T15:45:12.000Z | 2022-03-07T03:52:16.000Z | asposehtmlcloud/models/object_exist.py | aspose-html-cloud/aspose-html-cloud-python | b5abc7aba8ef0df355207480c2cccb282c09a970 | [
"MIT"
] | null | null | null | asposehtmlcloud/models/object_exist.py | aspose-html-cloud/aspose-html-cloud-python | b5abc7aba8ef0df355207480c2cccb282c09a970 | [
"MIT"
] | 4 | 2018-05-19T16:03:03.000Z | 2021-11-19T10:58:33.000Z | # coding: utf-8
"""
--------------------------------------------------------------------------------------------------------------------
<copyright company="Aspose" file="object_exist.py">
Copyright (c) 2020 Aspose.HTML for Cloud
</copyright>
<summary>
Permission is hereby granted, free of charge, to any person obtai... | 31.472222 | 116 | 0.614593 |
7952ef68d33755b7f8de00981d79347d5622988d | 791 | py | Python | tests/kubernetes/checks/test_ImageDigest.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 4,013 | 2019-12-09T13:16:54.000Z | 2022-03-31T14:31:01.000Z | tests/kubernetes/checks/test_ImageDigest.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 1,258 | 2019-12-17T09:55:51.000Z | 2022-03-31T19:17:17.000Z | tests/kubernetes/checks/test_ImageDigest.py | cclauss/checkov | 60a385fcaff1499cf00c2d0018575fe5ab71f556 | [
"Apache-2.0"
] | 638 | 2019-12-19T08:57:38.000Z | 2022-03-30T21:38:37.000Z | import os
import unittest
from checkov.kubernetes.checks.ImageDigest import check
from checkov.kubernetes.runner import Runner
from checkov.runner_filter import RunnerFilter
class TestImageDigest(unittest.TestCase):
def test_summary(self):
runner = Runner()
current_dir = os.path.dirname(os.path.... | 29.296296 | 101 | 0.71555 |
7952ef9311339b7f142769365f4abb26e89c3009 | 669 | py | Python | source_code_final/entries/urls.py | momentum-pt-team-1/django-diary-example | 89bb758a64ede14123b28504c7eea1c8df582a64 | [
"MIT"
] | null | null | null | source_code_final/entries/urls.py | momentum-pt-team-1/django-diary-example | 89bb758a64ede14123b28504c7eea1c8df582a64 | [
"MIT"
] | null | null | null | source_code_final/entries/urls.py | momentum-pt-team-1/django-diary-example | 89bb758a64ede14123b28504c7eea1c8df582a64 | [
"MIT"
] | 3 | 2021-07-06T14:07:44.000Z | 2021-07-06T20:14:08.000Z | from django.urls import path
from . import views
urlpatterns = [
path("", views.EntryListView.as_view(), name="entry-list"),
path(
"entry/<int:pk>", views.EntryDetailView.as_view(), name="entry-detail"
),
path("create", views.EntryCreateView.as_view(), name="entry-create"),
path(
"... | 27.875 | 78 | 0.615845 |
7952efb0e9e83b2728995926109d06ff5683ae2c | 18,674 | py | Python | playwright/_impl/_assertions.py | px-tech/playwright-python | ab954acef18fba57bb1c114fe2399d3d02a9ecb9 | [
"Apache-2.0"
] | null | null | null | playwright/_impl/_assertions.py | px-tech/playwright-python | ab954acef18fba57bb1c114fe2399d3d02a9ecb9 | [
"Apache-2.0"
] | null | null | null | playwright/_impl/_assertions.py | px-tech/playwright-python | ab954acef18fba57bb1c114fe2399d3d02a9ecb9 | [
"Apache-2.0"
] | 1 | 2022-01-29T10:35:58.000Z | 2022-01-29T10:35:58.000Z | # Copyright (c) Microsoft Corporation.
#
# 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 wri... | 31.227425 | 104 | 0.584717 |
7952f0281ff39a40555f5d12a1bb289ddbcf363f | 1,995 | py | Python | gauss_carrier_vs_space.py | kai-neuhaus/mr-oct-simulation | a99576377da916418b937eb553b62af6ab44b8fd | [
"MIT"
] | 4 | 2020-07-30T00:38:34.000Z | 2021-11-09T10:53:39.000Z | gauss_carrier_vs_space.py | kai-neuhaus/mr-oct-simulation | a99576377da916418b937eb553b62af6ab44b8fd | [
"MIT"
] | null | null | null | gauss_carrier_vs_space.py | kai-neuhaus/mr-oct-simulation | a99576377da916418b937eb553b62af6ab44b8fd | [
"MIT"
] | null | null | null | from scipy import *
from scipy.signal import hilbert
from matplotlib.pyplot import *
import my_format_lib as mylib
mylib.format_plot()
# manuscript:lst:gausscarrspace
N = 20000 # buffer size
SR = 20e6 # sample rate [s]
tau_scan = linspace(0, N / SR, N) # time range [s]
wavelength = 1330e-9 # [m]
wavelengthBW = 60e-9 ... | 32.177419 | 69 | 0.594486 |
7952f09d5b4ba247e95a7aef094f51906cbf8652 | 3,702 | py | Python | n3jet/general/single/general_init_model_rerun.py | JosephPB/n3jet | f097c5e829b5f86fc0ce9007c5fa76ea229dfc56 | [
"MIT"
] | 3 | 2020-06-03T13:50:59.000Z | 2021-12-01T08:21:34.000Z | n3jet/general/single/general_init_model_rerun.py | JosephPB/n3jet | f097c5e829b5f86fc0ce9007c5fa76ea229dfc56 | [
"MIT"
] | 2 | 2021-08-25T16:15:38.000Z | 2022-02-10T03:36:12.000Z | n3jet/general/single/general_init_model_rerun.py | JosephPB/n3jet | f097c5e829b5f86fc0ce9007c5fa76ea229dfc56 | [
"MIT"
] | 1 | 2020-06-12T15:00:56.000Z | 2020-06-12T15:00:56.000Z | import argparse
from n3jet.general import SingleModelRun
from n3jet.utils.general_utils import bool_convert
def parse():
"""
Parse arguments
"""
parser = argparse.ArgumentParser(description=
"""
Training multiple models on the ... | 24.038961 | 116 | 0.548622 |
7952f0ae105c9158cae0204ff0d3102e8bd96c83 | 2,192 | py | Python | scripts/patches/sagemaker.py | compose-x/troposphere | 9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4 | [
"BSD-2-Clause"
] | null | null | null | scripts/patches/sagemaker.py | compose-x/troposphere | 9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4 | [
"BSD-2-Clause"
] | null | null | null | scripts/patches/sagemaker.py | compose-x/troposphere | 9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4 | [
"BSD-2-Clause"
] | null | null | null | patches = [
# Rename AWS::SageMaker::Device.Device to AWS::SageMaker::Device.DeviceProperty
{
"op": "move",
"from": "/PropertyTypes/AWS::SageMaker::Device.Device",
"path": "/PropertyTypes/AWS::SageMaker::Device.DeviceProperty",
},
{
"op": "replace",
"path": "/Reso... | 46.638298 | 160 | 0.694343 |
7952f0eed3a20f9c04bf3c7a1b79a112291b37d7 | 220 | py | Python | exercises/en/exc_01_28b.py | betatim/MCL-DSCI-011-programming-in-python | b51f43a6bb1bedf0db028613d48d6566309ec44a | [
"MIT"
] | 1 | 2020-06-26T20:15:44.000Z | 2020-06-26T20:15:44.000Z | exercises/en/exc_01_28b.py | betatim/MCL-DSCI-011-programming-in-python | b51f43a6bb1bedf0db028613d48d6566309ec44a | [
"MIT"
] | 20 | 2020-06-15T23:05:20.000Z | 2020-09-01T22:07:45.000Z | exercises/en/exc_01_28b.py | betatim/MCL-DSCI-011-programming-in-python | b51f43a6bb1bedf0db028613d48d6566309ec44a | [
"MIT"
] | 1 | 2020-06-25T20:53:13.000Z | 2020-06-25T20:53:13.000Z | import pandas as pd
# The data
hockey_players = pd.read_csv('data/canucks.csv')
# Find the total salary of the team
# Save it in an object called player_cost
____ = hockey_players[[____]].____()
# Display it
____
| 14.666667 | 48 | 0.727273 |
7952f13c6642c0e09f4344de98e4f32f9c029029 | 2,801 | py | Python | asreview/webapp/start_flask.py | J535D165/asreview | eda3c52a595d739093c3cd6cd37d41eeed6dd15c | [
"Apache-2.0"
] | null | null | null | asreview/webapp/start_flask.py | J535D165/asreview | eda3c52a595d739093c3cd6cd37d41eeed6dd15c | [
"Apache-2.0"
] | null | null | null | asreview/webapp/start_flask.py | J535D165/asreview | eda3c52a595d739093c3cd6cd37d41eeed6dd15c | [
"Apache-2.0"
] | null | null | null | import logging
import os
import webbrowser
from threading import Timer
from flask import Flask
from flask import send_from_directory
from flask.json import jsonify
from flask.templating import render_template
from flask_cors import CORS
from asreview import __version__ as asreview_version
from asreview.entry_points.l... | 24.146552 | 74 | 0.625134 |
7952f2635431c35255bc154f6b7373b0943fcb7a | 2,156 | py | Python | deprecated/examples_robust/affect/mosi_early_fusion_robust.py | kapikantzari/MultiBench | 44ab6ea028682040a0c04de68239ce5cdf15123f | [
"MIT"
] | 148 | 2021-03-06T06:54:13.000Z | 2022-03-29T19:27:21.000Z | deprecated/examples_robust/affect/mosi_early_fusion_robust.py | kapikantzari/MultiBench | 44ab6ea028682040a0c04de68239ce5cdf15123f | [
"MIT"
] | 10 | 2021-07-19T22:57:49.000Z | 2022-02-04T03:12:29.000Z | deprecated/examples_robust/affect/mosi_early_fusion_robust.py | kapikantzari/MultiBench | 44ab6ea028682040a0c04de68239ce5cdf15123f | [
"MIT"
] | 18 | 2021-07-22T07:17:27.000Z | 2022-03-27T16:11:40.000Z | from unimodals.common_models import GRU, MLP
from robustness.all_in_one import general_train, general_test
from get_data_robust import get_dataloader
from fusions.common_fusions import ConcatEarly
from training_structures.Simple_Early_Fusion import train, test
import torch
import sys
import os
sys.path.append(os.path.d... | 34.222222 | 121 | 0.743043 |
7952f2bd3b02fc360aa21f0d361a6d348cd09ff7 | 9,372 | py | Python | ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2022-01-25T22:52:58.000Z | 2022-01-25T22:52:58.000Z | ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | ansible/modules/cloud/digital_ocean/digital_ocean_floating_ip.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Patrick F. Marques <patrickfmarques@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_versi... | 28.925926 | 113 | 0.606701 |
7952f36b73aea65f0b8715440b4ec099ba021ea4 | 896 | py | Python | main.py | jphandrigan/exposedsurface | 796c2af01247750e9957173ee9b4938e537af467 | [
"Unlicense"
] | null | null | null | main.py | jphandrigan/exposedsurface | 796c2af01247750e9957173ee9b4938e537af467 | [
"Unlicense"
] | null | null | null | main.py | jphandrigan/exposedsurface | 796c2af01247750e9957173ee9b4938e537af467 | [
"Unlicense"
] | null | null | null | #import libraries
from scipy.interpolate import interp1d
import matplotlib.pyplot as plt
import numpy as np
#set the tank/compartment volume (in Litres)
volume = '12124'
x = np.array([20820, 43910, 5254, 6272, 4343, 2380, 3372, 5678, 1575, 2978, 3675, 4155, 7948, 10510, 3186, 9464, 7949, 3785, 5678, 7949, 34000, 166... | 49.777778 | 284 | 0.668527 |
7952f3af071807311bee5afeb1e9ec3bf7e1fa4f | 288 | py | Python | Python/Curos_Python_curemvid/Exercicios_dos_videos/Ex104.py | Jhonattan-rocha/Meus-primeiros-programas | f5971b66c0afd049b5d0493e8b7a116b391d058e | [
"MIT"
] | null | null | null | Python/Curos_Python_curemvid/Exercicios_dos_videos/Ex104.py | Jhonattan-rocha/Meus-primeiros-programas | f5971b66c0afd049b5d0493e8b7a116b391d058e | [
"MIT"
] | null | null | null | Python/Curos_Python_curemvid/Exercicios_dos_videos/Ex104.py | Jhonattan-rocha/Meus-primeiros-programas | f5971b66c0afd049b5d0493e8b7a116b391d058e | [
"MIT"
] | null | null | null | def leiaint(msg):
while True:
n = input(msg)
if n.isnumeric():
valor = int(n)
break
else:
print("Digite um número válido")
return valor
num = leiaint("digite um número inteiro: ")
print(f"Você digitou o número {num}")
| 20.571429 | 44 | 0.538194 |
7952f3b68dabd65d8015eb5dcae6347e711f3ea0 | 2,101 | py | Python | frappe/desk/form/run_method.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 5 | 2017-09-12T15:56:31.000Z | 2022-03-09T13:50:21.000Z | frappe/desk/form/run_method.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 212 | 2017-08-16T13:03:18.000Z | 2020-10-06T12:26:21.000Z | frappe/desk/form/run_method.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 14 | 2020-11-04T11:22:44.000Z | 2022-02-01T20:59:37.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import json, inspect
import frappe
from frappe import _
from frappe.utils import cint
from six import text_type, string_types
@frappe.whitelist()
def runserverobj(method, docs=No... | 25.621951 | 78 | 0.698239 |
7952f4768e11aeef8d12a312c4032a70c9ce1d05 | 8,080 | py | Python | pysnmp/HH3C-MP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/HH3C-MP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/HH3C-MP-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module HH3C-MP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-MP-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:15:35 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 113.802817 | 1,175 | 0.757797 |
7952f4da8d0f59c070bdbc91205dac936d33fe41 | 489 | py | Python | setup.py | shardul08/Code-Sleep-Python | b76e6eccca62f92d6064eaeeaadc385a6f2b39d8 | [
"MIT"
] | 420 | 2017-05-13T13:43:46.000Z | 2022-03-29T20:22:39.000Z | setup.py | shardul08/Code-Sleep-Python | b76e6eccca62f92d6064eaeeaadc385a6f2b39d8 | [
"MIT"
] | 162 | 2017-10-04T15:48:10.000Z | 2022-02-04T07:32:07.000Z | setup.py | shardul08/Code-Sleep-Python | b76e6eccca62f92d6064eaeeaadc385a6f2b39d8 | [
"MIT"
] | 280 | 2017-10-04T16:20:04.000Z | 2022-02-04T07:15:06.000Z | from setuptools import setup
setup(
name="code_sleep_python",
description="Launch some awesome python projects",
url="https://github.com/prateekiiest/Code-Sleep-Python",
author="Prateek Chanda",
author_email="prateekkol21@gmail.com",
license="MIT",
packages=['code_sleep_python'],
includ... | 25.736842 | 60 | 0.660532 |
7952f50419b3ddda31f9908adb2efe1750212d2f | 695 | bzl | Python | source/bazel/deps/ubuntu_14_04_clang_10_sysroot/get.bzl | luxe/unilang | 6c8a431bf61755f4f0534c6299bd13aaeba4b69e | [
"MIT"
] | 33 | 2019-05-30T07:43:32.000Z | 2021-12-30T13:12:32.000Z | source/bazel/deps/ubuntu_14_04_clang_10_sysroot/get.bzl | luxe/unilang | 6c8a431bf61755f4f0534c6299bd13aaeba4b69e | [
"MIT"
] | 371 | 2019-05-16T15:23:50.000Z | 2021-09-04T15:45:27.000Z | source/bazel/deps/ubuntu_14_04_clang_10_sysroot/get.bzl | luxe/unilang | 6c8a431bf61755f4f0534c6299bd13aaeba4b69e | [
"MIT"
] | 6 | 2019-08-22T17:37:36.000Z | 2020-11-07T07:15:32.000Z | # Do not edit this file directly.
# It was auto-generated by: code/programs/reflexivity/reflexive_refresh
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def ubuntu1404Clang10Sysroot():
http_archive(
name="ubuntu_14_04_clang_10_sysroot" ,
build_file="//bazel/deps/ubuntu_14_04... | 40.882353 | 127 | 0.755396 |
7952f5cfcfcb30086bde61904447171d9e42d0cd | 28,101 | py | Python | northstar/averages.py | iosonofabio/semiknn | c7819a7ae850df1264f8d92f7bdc02f85afc21c2 | [
"MIT"
] | null | null | null | northstar/averages.py | iosonofabio/semiknn | c7819a7ae850df1264f8d92f7bdc02f85afc21c2 | [
"MIT"
] | null | null | null | northstar/averages.py | iosonofabio/semiknn | c7819a7ae850df1264f8d92f7bdc02f85afc21c2 | [
"MIT"
] | null | null | null | # vim: fdm=indent
# author: Fabio Zanini
# date: 17/06/19
# content: Atlas averages
__all__ = ['Averages']
import warnings
import numpy as np
import pandas as pd
from anndata import AnnData
import leidenalg
from .fetch_atlas import AtlasFetcher
from .cluster_with_annotations import ClusterWithAnnotations
... | 38.813536 | 103 | 0.585388 |
7952f6c31b36e611f26f0127b69a16a8c23ba42c | 750 | py | Python | benchmark_apps/elmerfem/umfpack/src/amd/deps.py | readex-eu/readex-apps | 38493b11806c306f4e8f1b7b2d97764b45fac8e2 | [
"BSD-3-Clause"
] | 2 | 2020-11-25T13:10:11.000Z | 2021-03-15T20:26:35.000Z | elmerfem/umfpack/src/amd/deps.py | jcmcmurry/pipelining | 8fface1a501b5050f58e7b902aacdcdde68e9648 | [
"MIT"
] | null | null | null | elmerfem/umfpack/src/amd/deps.py | jcmcmurry/pipelining | 8fface1a501b5050f58e7b902aacdcdde68e9648 | [
"MIT"
] | 2 | 2021-08-02T23:23:40.000Z | 2022-02-26T12:39:30.000Z | #!/usr/bin/python
#
# create preprocessing instructions
# from sources.lst
#
import re
sources="amd_aat amd_1 amd_2 amd_dump amd_postorder amd_post_tree amd_defaults amd_order amd_control amd_info amd_valid amd_preprocess"
amd_sources=[]
for f in re.split(" ",sources):
nf=re.sub('amd_','amd_i_',f) + ".c"
amd... | 25.862069 | 135 | 0.612 |
7952f7ba9aac09e27d901d3b907dbba68d8f6bd6 | 1,665 | py | Python | nemo_text_processing/inverse_text_normalization/ru/taggers/electronic.py | hamjam/NeMo | b3484d32e1317666151f931bfa39867d88ed8658 | [
"Apache-2.0"
] | 4,145 | 2019-09-13T08:29:43.000Z | 2022-03-31T18:31:44.000Z | nemo_text_processing/inverse_text_normalization/ru/taggers/electronic.py | hamjam/NeMo | b3484d32e1317666151f931bfa39867d88ed8658 | [
"Apache-2.0"
] | 2,031 | 2019-09-17T16:51:39.000Z | 2022-03-31T23:52:41.000Z | nemo_text_processing/inverse_text_normalization/ru/taggers/electronic.py | hamjam/NeMo | b3484d32e1317666151f931bfa39867d88ed8658 | [
"Apache-2.0"
] | 1,041 | 2019-09-13T10:08:21.000Z | 2022-03-30T06:37:38.000Z | # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. 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... | 37 | 94 | 0.718318 |
7952f8e616853ea1228bb4e68a099563a531d6be | 2,704 | py | Python | dask/array/tests/test_svg.py | Juanlu001/dask | ba29ba377ae71e5a90fa5ef5198c7d317b45c06a | [
"BSD-3-Clause"
] | 9,684 | 2016-02-12T16:09:21.000Z | 2022-03-31T19:38:26.000Z | dask/array/tests/test_svg.py | Juanlu001/dask | ba29ba377ae71e5a90fa5ef5198c7d317b45c06a | [
"BSD-3-Clause"
] | 7,059 | 2016-02-11T18:32:45.000Z | 2022-03-31T22:12:40.000Z | dask/array/tests/test_svg.py | Juanlu001/dask | ba29ba377ae71e5a90fa5ef5198c7d317b45c06a | [
"BSD-3-Clause"
] | 1,794 | 2016-02-13T23:28:39.000Z | 2022-03-30T14:33:19.000Z | import xml.etree.ElementTree
import pytest
import dask.array as da
from dask.array.svg import draw_sizes
def parses(text):
cleaned = text.replace("→", "") # xml doesn't like righarrow character
assert xml.etree.ElementTree.fromstring(cleaned) is not None # parses cleanly
def test_basic():
parse... | 28.166667 | 82 | 0.629438 |
7952f9949f07290893265d144331fc1b932ae0fa | 197 | py | Python | membership/admin.py | ADpDinamo/site | d7313cd6c151a381ccc803b81768673587cb8d45 | [
"Apache-2.0"
] | null | null | null | membership/admin.py | ADpDinamo/site | d7313cd6c151a381ccc803b81768673587cb8d45 | [
"Apache-2.0"
] | 8 | 2021-03-19T10:14:39.000Z | 2022-03-12T00:24:41.000Z | membership/admin.py | ADpDinamo/site | d7313cd6c151a381ccc803b81768673587cb8d45 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Membership, UserMembership, Subcription
admin.site.register(Membership)
admin.site.register(UserMembership)
admin.site.register(Subcription)
| 21.888889 | 59 | 0.837563 |
7952f99a1868e1fbb8a2550993cea9165a5f32aa | 10,530 | py | Python | src/Methods/utils/Crqa.py | syncpy/SyncPy | 70f990971a4b4215549559134812c7469c87c88f | [
"CECILL-B"
] | 20 | 2015-11-27T10:08:57.000Z | 2021-11-17T22:19:36.000Z | src/Methods/utils/Crqa.py | syncpy/SyncPy | 70f990971a4b4215549559134812c7469c87c88f | [
"CECILL-B"
] | 3 | 2015-11-13T13:08:04.000Z | 2022-02-03T15:42:40.000Z | src/Methods/utils/Crqa.py | syncpy/SyncPy | 70f990971a4b4215549559134812c7469c87c88f | [
"CECILL-B"
] | 14 | 2015-12-17T09:25:43.000Z | 2021-02-26T14:37:48.000Z | ### This file is a part of the Syncpy library.
### Copyright 2015, ISIR / Universite Pierre et Marie Curie (UPMC)
### Main contributor(s): Giovanna Varni, Marie Avril,
### syncpy@isir.upmc.fr
###
### This software is a computer program whose for investigating
### synchrony in a fast and exhaustive way.
###
### This ... | 36.310345 | 172 | 0.653086 |
7952f9fcef76496c3d8f5d171b6746ea451f785c | 4,949 | py | Python | gr_utilities/_paramtreecfg.py | ZeitgeberH/FISH-VIEWER | ce7e2e89d1f1895e8e7596da1d04afb324a0075d | [
"BSD-3-Clause"
] | 5 | 2022-01-25T17:35:15.000Z | 2022-02-09T00:52:20.000Z | gr_utilities/_paramtreecfg.py | ZeitgeberH/FISH-VIEWER | ce7e2e89d1f1895e8e7596da1d04afb324a0075d | [
"BSD-3-Clause"
] | null | null | null | gr_utilities/_paramtreecfg.py | ZeitgeberH/FISH-VIEWER | ce7e2e89d1f1895e8e7596da1d04afb324a0075d | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from pyqtgraph.parametertree.parameterTypes import QtEnumParameter as enum
from pyqtgraph.Qt import QtWidgets
dlg = QtWidgets.QFileDialog
cfg = {
'list': {
'limits': {
'type': 'checklist',
'limits': ['a', 'b', 'c']
}
},
'file': {
... | 26.324468 | 119 | 0.372398 |
7952fb4aeaa03cc7c4b7284e40eb5e8011bbbaa9 | 4,904 | py | Python | layers.py | zhangbo2008/GAT_network | c871a2aceceaa5d638c96c21d23d64ed07c07b4c | [
"MIT"
] | null | null | null | layers.py | zhangbo2008/GAT_network | c871a2aceceaa5d638c96c21d23d64ed07c07b4c | [
"MIT"
] | null | null | null | layers.py | zhangbo2008/GAT_network | c871a2aceceaa5d638c96c21d23d64ed07c07b4c | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# 这个是做cities 问题的
class GraphAttentionLayer(nn.Module):
"""
Simple GAT layer, similar to https://arxiv.org/abs/1710.10903
"""
def __init__(self, in_features, out_features, dropout, alpha, concat=True):
super(G... | 34.780142 | 119 | 0.611338 |
7952fbb0ee1a2207bcd4f39f82106a3ed13b8043 | 14,773 | py | Python | pytype/blocks_test.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 3,882 | 2015-03-22T12:17:15.000Z | 2022-03-31T17:13:20.000Z | pytype/blocks_test.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 638 | 2015-11-03T06:34:44.000Z | 2022-03-31T23:41:48.000Z | pytype/blocks_test.py | Jrryy/pytype | 2d2855dc97d5ccee22ad233a83524616c17c44c9 | [
"Apache-2.0"
] | 301 | 2015-08-14T10:21:17.000Z | 2022-03-08T11:03:40.000Z | """Tests for blocks.py.
To create test cases, you can disassemble source code with the help of the dis
module. For example, in Python 3.7, this snippet:
import dis
import opcode
def f(): return None
bytecode = dis.Bytecode(f)
for x in bytecode.codeobj.co_code:
print(f'{x} ({opcode.opname[x]})')
prints:... | 28.90998 | 78 | 0.613484 |
7952fc086c62542f78d17bc2a34db6fbd7bd1105 | 1,468 | py | Python | test/test_remove_file_extensions.py | DanB288/youtube_title_parse | 965b4a6a4d233ac20a6bbd974a26490d6306059c | [
"MIT"
] | 15 | 2018-10-28T09:30:18.000Z | 2022-02-08T11:40:15.000Z | test/test_remove_file_extensions.py | DanB288/youtube_title_parse | 965b4a6a4d233ac20a6bbd974a26490d6306059c | [
"MIT"
] | 12 | 2020-04-19T12:54:14.000Z | 2021-05-19T20:34:40.000Z | test/test_remove_file_extensions.py | DanB288/youtube_title_parse | 965b4a6a4d233ac20a6bbd974a26490d6306059c | [
"MIT"
] | 4 | 2020-05-24T17:18:07.000Z | 2021-11-12T20:50:42.000Z | # -*- coding: utf-8 -*-
import unittest
from six import with_metaclass
from .meta import MetaTestSequence
tests = [
# https://youtu.be/A2RwHnfI2y8
{
"input": "Ga-In (가인) - Nostalgia (노스텔지아) - Lyrics [Hangul+Translation] .mov",
"expected": ["Ga-In (가인)", "Nostalgia (노스텔지아)"],
},
# https:... | 31.913043 | 89 | 0.595368 |
7952fc143114ff6681ef7955223d2174514d27f5 | 266 | py | Python | xontrib/macro_lib/data.py | anki-code/xontrib-macro-lib | 9ec22bb104399ad92a4b4f583c4a7d1de7fbf576 | [
"MIT"
] | 5 | 2021-03-27T09:28:05.000Z | 2022-03-23T08:14:38.000Z | xontrib/macro_lib/data.py | anki-code/xontrib-macro-lib | 9ec22bb104399ad92a4b4f583c4a7d1de7fbf576 | [
"MIT"
] | null | null | null | xontrib/macro_lib/data.py | anki-code/xontrib-macro-lib | 9ec22bb104399ad92a4b4f583c4a7d1de7fbf576 | [
"MIT"
] | 1 | 2022-03-18T20:40:09.000Z | 2022-03-18T20:40:09.000Z | import json
from xonsh.contexts import Block
class JsonBlock(Block):
__xonsh_block__ = str
def __enter__(self):
return json.loads(self.macro_block)
def __exit__(self, *exc):
del self.macro_block, self.macro_globals, self.macro_locals | 20.461538 | 67 | 0.714286 |
7952fd29bf76b6400d20eaed6774b5e72f8c970b | 267 | py | Python | 125. Valid palindrome.py | bogdan824/LeetCode-Problems_02 | b5ffd0b0bbb8f63fde2f89c672ca1976c2855b09 | [
"MIT"
] | null | null | null | 125. Valid palindrome.py | bogdan824/LeetCode-Problems_02 | b5ffd0b0bbb8f63fde2f89c672ca1976c2855b09 | [
"MIT"
] | null | null | null | 125. Valid palindrome.py | bogdan824/LeetCode-Problems_02 | b5ffd0b0bbb8f63fde2f89c672ca1976c2855b09 | [
"MIT"
] | null | null | null | def isPalindrome(s):
s = s.lower()
holdit = ""
for charac in s:
if charac.isalpha():
holdit+=charac
i=0
j=len(holdit)-1
while i<=j:
if holdit[i]!=holdit[j]:
return False
i+=1
j-=1
return True
s = "0P"
print(isPalindrome(s)) | 14.052632 | 27 | 0.561798 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.