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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a21667339c2f8fc566e000b8dbe9b0df517ca6d | 376 | py | Python | downloadData.py | hagianga21/MaxCon_RL | 60f24eb74673998de3a37db251f4222ee33ba1c4 | [
"MIT"
] | 3 | 2021-06-09T15:40:44.000Z | 2022-03-30T03:16:07.000Z | downloadData.py | hagianga21/MaxCon_RL | 60f24eb74673998de3a37db251f4222ee33ba1c4 | [
"MIT"
] | null | null | null | downloadData.py | hagianga21/MaxCon_RL | 60f24eb74673998de3a37db251f4222ee33ba1c4 | [
"MIT"
] | 1 | 2021-11-20T07:44:56.000Z | 2021-11-20T07:44:56.000Z | import os
from google_drive_downloader import GoogleDriveDownloader as gdd
#Download training file
gdd.download_file_from_google_drive(file_id='1MkeJlbzueNJdjatyvZ4B4cO4WEnn1MwS',
dest_path='./Data/train.zip',
showsize=True,
... | 37.6 | 80 | 0.593085 |
4a2166ba2fe95203822cafea8333da6491cf96bf | 5,769 | py | Python | models/sepc/builder.py | xchani/simpledet | 3e7587f0a4403003bc4eda8a8403ec385bb980f8 | [
"Apache-2.0"
] | 3,195 | 2019-01-29T09:08:46.000Z | 2022-03-29T08:20:44.000Z | models/sepc/builder.py | xchani/simpledet | 3e7587f0a4403003bc4eda8a8403ec385bb980f8 | [
"Apache-2.0"
] | 275 | 2019-01-29T10:16:12.000Z | 2022-03-15T17:56:39.000Z | models/sepc/builder.py | xchani/simpledet | 3e7587f0a4403003bc4eda8a8403ec385bb980f8 | [
"Apache-2.0"
] | 563 | 2019-01-29T09:32:07.000Z | 2022-03-22T06:58:01.000Z | import mxnet as mx
import mxnext as X
from models.NASFPN.builder import RetinaNetNeck, RetinaNetNeckWithBN
from models.sepc.sepc_neck import SEPCFPN
from utils.patch_config import patch_config_as_nothrow
from models.NASFPN.builder import RetinaNetHeadWithBN
import math
class RetinaNetNeckWithBNWithSEPC(RetinaNetNeckW... | 44.038168 | 153 | 0.610504 |
4a2166d9ca0ee8874b680bf274a72c2715257573 | 7,544 | py | Python | eodatasets3/prepare/nasa_c_m_mcd43a1_6_prepare.py | GeoscienceAustralia/eo-datasets | 520b27acc5fbc8e23efdc175b044dde9e603f5f6 | [
"Apache-2.0"
] | 23 | 2019-03-21T22:22:13.000Z | 2021-09-08T05:26:07.000Z | eodatasets3/prepare/nasa_c_m_mcd43a1_6_prepare.py | GeoscienceAustralia/eo-datasets | 520b27acc5fbc8e23efdc175b044dde9e603f5f6 | [
"Apache-2.0"
] | 154 | 2015-07-02T23:03:04.000Z | 2021-09-09T00:54:49.000Z | eodatasets3/prepare/nasa_c_m_mcd43a1_6_prepare.py | GeoscienceAustralia/eo-datasets | 520b27acc5fbc8e23efdc175b044dde9e603f5f6 | [
"Apache-2.0"
] | 29 | 2016-02-15T03:24:47.000Z | 2021-09-08T01:44:32.000Z | import datetime
import re
import uuid
from pathlib import Path
from typing import Dict, Iterable
import click
import rasterio
from defusedxml import ElementTree
from eodatasets3 import serialise
from eodatasets3.utils import ItemProvider, read_paths_from_file
from ..metadata.valid_region import valid_region
MCD43A1... | 33.380531 | 85 | 0.598091 |
4a2167369887a87f8a82e4390e458008301ddb9e | 10,236 | py | Python | src/awsCluster/cfnCluster/CFNClusterManager.py | AspirinCode/jupyter-genomics | d45526fab3de8fcc3d9fef005d4e39368ff3dfdc | [
"MIT"
] | 2 | 2019-01-04T08:17:27.000Z | 2021-04-10T02:59:35.000Z | src/awsCluster/cfnCluster/CFNClusterManager.py | AspirinCode/jupyter-genomics | d45526fab3de8fcc3d9fef005d4e39368ff3dfdc | [
"MIT"
] | null | null | null | src/awsCluster/cfnCluster/CFNClusterManager.py | AspirinCode/jupyter-genomics | d45526fab3de8fcc3d9fef005d4e39368ff3dfdc | [
"MIT"
] | 2 | 2021-09-10T02:57:51.000Z | 2021-09-21T00:16:56.000Z | __author__ = 'Guorong Xu<g1xu@ucsd.edu>'
import os
import re
from shutil import copyfile
## Global variable: default configuation file for CFNCluster
config_template_file = os.getcwd().replace("notebooks", "data") + "/config"
def install_cfn_cluster():
print "Installing cfncluster package..."
print os.popen(... | 34.464646 | 108 | 0.623681 |
4a2167d89e691adbe7171dbe66e1c37f14bea325 | 80 | py | Python | tuna/infrastructure/arguments/__init__.py | russellnakamura/thetuna | 0e445baf780fb65e1d92fe1344ebdf21bf81573c | [
"MIT"
] | null | null | null | tuna/infrastructure/arguments/__init__.py | russellnakamura/thetuna | 0e445baf780fb65e1d92fe1344ebdf21bf81573c | [
"MIT"
] | null | null | null | tuna/infrastructure/arguments/__init__.py | russellnakamura/thetuna | 0e445baf780fb65e1d92fe1344ebdf21bf81573c | [
"MIT"
] | null | null | null | from arguments import BaseArguments
from argumentbuilder import ArgumentBuilder
| 26.666667 | 43 | 0.9 |
4a21689559df3214883514e25528bec7838bfaa6 | 16,896 | py | Python | framework/generic_classes.py | petrovp/networkx-related | ebe7053e032b527ebaa9565f96ba91145de3fd50 | [
"BSD-3-Clause"
] | null | null | null | framework/generic_classes.py | petrovp/networkx-related | ebe7053e032b527ebaa9565f96ba91145de3fd50 | [
"BSD-3-Clause"
] | null | null | null | framework/generic_classes.py | petrovp/networkx-related | ebe7053e032b527ebaa9565f96ba91145de3fd50 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2018 by
# Marta Grobelna <marta.grobelna@rwth-aachen.de>
# Petre Petrov <petrepp4@gmail.com>
# Rudi Floren <rudi.floren@gmail.com>
# Tobias Winkler <tobias.winkler1@rwth-aachen.de>
# All rights reserved.
# BSD license.
#
# Authors: Marta Grobelna <marta.grob... | 30.117647 | 119 | 0.637015 |
4a216965d6f74d78dbb6ad426fb485910b5e13a0 | 8,033 | py | Python | cryptotracker/lib/exchange.py | Sticky073/cryptotracker | 14142e4db74058a4bc5ac9d99562287e4d7a918d | [
"MIT"
] | null | null | null | cryptotracker/lib/exchange.py | Sticky073/cryptotracker | 14142e4db74058a4bc5ac9d99562287e4d7a918d | [
"MIT"
] | null | null | null | cryptotracker/lib/exchange.py | Sticky073/cryptotracker | 14142e4db74058a4bc5ac9d99562287e4d7a918d | [
"MIT"
] | null | null | null | from binance.client import Client
from binance.exceptions import BinanceAPIException, BinanceWithdrawException
from lib.currency import Currency, Pair, TRADE_CURRENCIES
from enum import Enum
from copy import copy, deepcopy
from time import time
from datetime import datetime
from multiprocessing.dummy import Pool as T... | 34.625 | 128 | 0.624424 |
4a216a60d2be9014ef6e2c08b73abb3ed238393f | 11,162 | py | Python | ray/tune/ray_trial_executor.py | hyyh28/tesp | 8109b39011e05545453950c918b14da07e70fad3 | [
"MIT"
] | 29 | 2019-05-18T12:18:34.000Z | 2022-03-30T01:46:48.000Z | ray/tune/ray_trial_executor.py | kivo360/tesp | a77d9c228a6891b304e789ba2758a4cbfdb75ec0 | [
"MIT"
] | 8 | 2019-08-15T05:42:10.000Z | 2021-05-21T09:41:15.000Z | ray/tune/ray_trial_executor.py | kivo360/tesp | a77d9c228a6891b304e789ba2758a4cbfdb75ec0 | [
"MIT"
] | 8 | 2019-07-15T22:36:20.000Z | 2020-08-09T07:03:26.000Z | # coding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import os
import time
import traceback
import ray
from ray.tune.logger import NoopLogger
from ray.tune.trial import Trial, Resources, Checkpoint
from ray.tune.trial_executor impo... | 37.456376 | 79 | 0.626859 |
4a216aead278e3f48dbe54d9bd63006b6b2e0885 | 863 | py | Python | proposals/migrations/0004_auto_20201109_1208.py | KolibriSolutions/BepMarketplace | c47d252fd744cde6b927e37c34d7a103c6162be5 | [
"BSD-3-Clause"
] | 1 | 2019-06-29T15:24:24.000Z | 2019-06-29T15:24:24.000Z | proposals/migrations/0004_auto_20201109_1208.py | KolibriSolutions/BepMarketplace | c47d252fd744cde6b927e37c34d7a103c6162be5 | [
"BSD-3-Clause"
] | 2 | 2020-01-12T17:47:33.000Z | 2020-01-12T17:47:45.000Z | proposals/migrations/0004_auto_20201109_1208.py | KolibriSolutions/BepMarketplace | c47d252fd744cde6b927e37c34d7a103c6162be5 | [
"BSD-3-Clause"
] | 2 | 2019-06-29T15:24:26.000Z | 2020-01-08T15:15:03.000Z | # Bep Marketplace ELE
# Copyright (c) 2016-2021 Kolibri Solutions
# License: See LICENSE file or https://github.com/KolibriSolutions/BepMarketplace/blob/master/LICENSE
# Generated by Django 3.0.8 on 2020-11-09 11:08
from django.conf import settings
from django.db import migrations, models
class Migration(migrati... | 34.52 | 247 | 0.706837 |
4a216c8bc4cede0c026c4bef505d54c6585c598b | 3,492 | py | Python | python/getalp/wsd/modules/embeddings/embeddings_bert.py | getalp/disambiguate-translate | 38ef754c786ded085d184633b21acc607902c098 | [
"MIT"
] | 53 | 2019-02-12T15:40:22.000Z | 2022-03-30T16:54:22.000Z | python/getalp/wsd/modules/embeddings/embeddings_bert.py | getalp/disambiguate-translate | 38ef754c786ded085d184633b21acc607902c098 | [
"MIT"
] | 21 | 2019-06-11T15:21:17.000Z | 2022-02-05T11:53:38.000Z | python/getalp/wsd/modules/embeddings/embeddings_bert.py | getalp/disambiguate-translate | 38ef754c786ded085d184633b21acc607902c098 | [
"MIT"
] | 19 | 2019-05-26T10:23:41.000Z | 2021-12-06T04:43:08.000Z | from torch.nn import Module
from getalp.wsd.torch_fix import *
from torch.nn.utils.rnn import pad_sequence
from getalp.wsd.torch_utils import default_device
from typing import List, Union, Dict
class EmbeddingsBert(Module):
def __init__(self, bert_path: str):
super().__init__()
from pytorch_pretr... | 38.8 | 106 | 0.657789 |
4a216d6fb43b9676ec9eb7d9541b2bddaa513139 | 1,675 | py | Python | tests/test_ec2/test_general.py | gtourkas/moto | 307104417b579d23d02f670ff55217a2d4a16bee | [
"Apache-2.0"
] | 5,460 | 2015-01-01T01:11:17.000Z | 2022-03-31T23:45:38.000Z | tests/test_ec2/test_general.py | gtourkas/moto | 307104417b579d23d02f670ff55217a2d4a16bee | [
"Apache-2.0"
] | 4,475 | 2015-01-05T19:37:30.000Z | 2022-03-31T13:55:12.000Z | tests/test_ec2/test_general.py | gtourkas/moto | 307104417b579d23d02f670ff55217a2d4a16bee | [
"Apache-2.0"
] | 1,831 | 2015-01-14T00:00:44.000Z | 2022-03-31T20:30:04.000Z | import pytest
import boto
import boto3
from boto.exception import EC2ResponseError
import sure # noqa # pylint: disable=unused-import
from botocore.exceptions import ClientError
from moto import mock_ec2_deprecated, mock_ec2
from tests import EXAMPLE_AMI_ID
# Has boto3 equivalent
@mock_ec2_deprecated
def test_cons... | 31.603774 | 85 | 0.761194 |
4a216d9a7d6dfeda808f6b9fc3cac620cf2d40c9 | 3,486 | py | Python | mayan/apps/ocr/managers.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 4 | 2021-09-02T00:16:30.000Z | 2021-09-09T22:25:15.000Z | mayan/apps/ocr/managers.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 86 | 2021-09-01T23:53:02.000Z | 2021-09-20T02:25:10.000Z | mayan/apps/ocr/managers.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 70 | 2021-09-01T12:54:51.000Z | 2022-02-16T00:53:18.000Z | import logging
from django.apps import apps
from django.db import models, transaction
from mayan.apps.documents.literals import DOCUMENT_IMAGE_TASK_TIMEOUT
from mayan.apps.lock_manager.backends.base import LockingBackend
from .classes import OCRBackendBase
from .events import event_ocr_document_version_content_delet... | 36.694737 | 115 | 0.618187 |
4a216d9bb5c79830ff400857ff8ebb74f3d68e52 | 55 | py | Python | saleor/core/taxes/errors.py | rocka44/saleor | 3f1487b409fcafc8fde82c7e8b776c12921866b9 | [
"BSD-3-Clause"
] | 2 | 2019-07-27T22:56:14.000Z | 2021-09-08T14:37:38.000Z | saleor/core/taxes/errors.py | rocka44/saleor | 3f1487b409fcafc8fde82c7e8b776c12921866b9 | [
"BSD-3-Clause"
] | 2 | 2019-07-02T13:39:49.000Z | 2019-07-07T09:38:27.000Z | saleor/core/taxes/errors.py | rocka44/saleor | 3f1487b409fcafc8fde82c7e8b776c12921866b9 | [
"BSD-3-Clause"
] | 1 | 2019-05-02T17:30:49.000Z | 2019-05-02T17:30:49.000Z | class TaxError(Exception):
"""Default tax error"""
| 18.333333 | 27 | 0.672727 |
4a216dccc3c0ba519a89f1840a13f0a72a4d6f1a | 2,569 | py | Python | data/p4VQE/R4/benchmark/startQiskit_QC102.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_QC102.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_QC102.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=10
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 27.623656 | 118 | 0.636824 |
4a216e14fc7baa985cacc98470a6424143054f78 | 747 | py | Python | reviews/managers.py | vaibhavantil2/detail-personalized-feed | 1fc74a5c8c514c4979fa08257eea5a95924e82bd | [
"MIT"
] | 15 | 2019-02-16T12:17:30.000Z | 2022-03-27T20:11:49.000Z | reviews/managers.py | vaibhavantil2/detail-personalized-feed | 1fc74a5c8c514c4979fa08257eea5a95924e82bd | [
"MIT"
] | 7 | 2019-05-10T08:27:14.000Z | 2021-04-26T15:19:06.000Z | reviews/managers.py | andreynovikov/django-rated-reviews | ccb24f5412bf5c831f79120c32e1cd51ddca5fe8 | [
"MIT"
] | 8 | 2019-11-07T21:05:10.000Z | 2021-08-03T06:59:37.000Z | from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.utils.encoding import force_str
class ReviewManager(models.Manager):
def in_moderation(self):
"""
QuerySet for all reviews currently in the moderation queue.
"""
return self.get_quer... | 32.478261 | 78 | 0.666667 |
4a216ecd3c71914dc9dc8a749e966edf8b33b6ff | 3,033 | py | Python | accounts/forms.py | awolste/beginToReason2 | 9939af5157fcb1658fe9f1c29e0925a34cb53529 | [
"BSD-3-Clause"
] | null | null | null | accounts/forms.py | awolste/beginToReason2 | 9939af5157fcb1658fe9f1c29e0925a34cb53529 | [
"BSD-3-Clause"
] | null | null | null | accounts/forms.py | awolste/beginToReason2 | 9939af5157fcb1658fe9f1c29e0925a34cb53529 | [
"BSD-3-Clause"
] | null | null | null | """
This module contains custom forms used to collect the information needed to create a model.
"""
from django import forms
from .models import UserInformation, Class
class UserInformationForm(forms.ModelForm):
"""
This form creates an instance of a UserInformation model and collects its fields
"""
#... | 34.465909 | 124 | 0.633366 |
4a216f93b855057ec35c65bbe23d0bd4edc04aa1 | 1,506 | py | Python | src/frames/hackernews/index_frame.py | wtheisen/TerminusBrowse | 1d80fd3b258b5de8c669e3fea0a14e89599252a6 | [
"BSD-3-Clause"
] | 104 | 2019-08-14T14:25:22.000Z | 2022-03-21T01:46:52.000Z | src/frames/hackernews/index_frame.py | wtheisen/commandChan | 1d80fd3b258b5de8c669e3fea0a14e89599252a6 | [
"BSD-3-Clause"
] | 53 | 2019-07-14T17:56:45.000Z | 2019-08-13T18:11:55.000Z | src/frames/hackernews/index_frame.py | wtheisen/TerminusBrowser | 554dfe25c2824bd02894c032f532efadcb3a4b12 | [
"BSD-3-Clause"
] | 16 | 2019-08-14T14:14:45.000Z | 2022-01-30T17:02:30.000Z | import urwid, time
from customer_types import SITE
from frames.abstract_frame import AbstractFrame
import logging
log = logging.getLogger(__name__)
class HackerNewsIndexFrame(AbstractFrame):
def __init__(self, urwidViewManager, uFilter=None):
super().__init__(urwidViewManager, uFilter)
self.heade... | 35.857143 | 124 | 0.670651 |
4a2170b47a3d0e97668e4fc2809445040b98e556 | 1,794 | py | Python | jcomparison/perfcomp/jobdiff.py | fuzzball81/ci-config | b3a8ff6be780bfae0ae9e3e0511dfa61010695eb | [
"Apache-2.0"
] | 8 | 2016-10-06T13:24:04.000Z | 2021-11-04T20:51:23.000Z | jcomparison/perfcomp/jobdiff.py | fuzzball81/ci-config | b3a8ff6be780bfae0ae9e3e0511dfa61010695eb | [
"Apache-2.0"
] | 8 | 2020-02-26T20:11:29.000Z | 2021-09-23T23:23:47.000Z | jcomparison/perfcomp/jobdiff.py | fuzzball81/ci-config | b3a8ff6be780bfae0ae9e3e0511dfa61010695eb | [
"Apache-2.0"
] | 9 | 2016-04-08T14:38:06.000Z | 2021-11-01T18:43:30.000Z | from perfcomp import ansbile_playbook, pip_diff, rpm_diff
from perfcomp.graphs import graph_ansible_playbook
class JobDiff:
def __init__(self, good, bad, ansible_playbooks_diff, rpm_diff, pip_diff):
self.good, self.bad = good, bad
self.ansible_diff = ansible_playbooks_diff
self.rpm_diff =... | 38.170213 | 79 | 0.64437 |
4a2171106e048f362d72207d22990e770a883667 | 2,728 | py | Python | src/login/models.py | gucunskidj/exam-registration | afbacb782bca554cb4431d385a632597022ba86f | [
"bzip2-1.0.6"
] | null | null | null | src/login/models.py | gucunskidj/exam-registration | afbacb782bca554cb4431d385a632597022ba86f | [
"bzip2-1.0.6"
] | null | null | null | src/login/models.py | gucunskidj/exam-registration | afbacb782bca554cb4431d385a632597022ba86f | [
"bzip2-1.0.6"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Smer(models.Model):
naziv_smera = models.CharField(max_length=500)
class Meta:
verbose_name_plural = 'Smerovi'
ordering = ['naziv_smera']
def __str__(self):
return self... | 30.311111 | 129 | 0.644062 |
4a217300a6632e40826a51eb93450468af1bd996 | 8,073 | py | Python | airbyte-integrations/connectors/source-trello/source_trello/source.py | akawalsky/airbyte | 757650f9de0a2ae1a09e03573f015234f5a9fb92 | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-trello/source_trello/source.py | akawalsky/airbyte | 757650f9de0a2ae1a09e03573f015234f5a9fb92 | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-trello/source_trello/source.py | akawalsky/airbyte | 757650f9de0a2ae1a09e03573f015234f5a9fb92 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
from abc import ABC
from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Tuple
import requests
from airbyte_cdk.sources import AbstractSource
from airbyte_cdk.sources.streams import Stream
from airbyte_cdk.sources.streams.http import ... | 36.201794 | 135 | 0.671869 |
4a217325f61f6af5849120de8de8ce9cd38fd93d | 722 | py | Python | src/genie/libs/parser/bigip/get_ltm_message_routingsip.py | nujo/genieparser | 083b01efc46afc32abe1a1858729578beab50cd3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/bigip/get_ltm_message_routingsip.py | nujo/genieparser | 083b01efc46afc32abe1a1858729578beab50cd3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/bigip/get_ltm_message_routingsip.py | nujo/genieparser | 083b01efc46afc32abe1a1858729578beab50cd3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | # Global Imports
import json
from collections import defaultdict
# Metaparser
from genie.metaparser import MetaParser
# =============================================
# Collection for '/mgmt/tm/ltm/message-routing/sip' resources
# =============================================
class LtmMessageroutingSipSchema(MetaPar... | 21.235294 | 61 | 0.608033 |
4a2174909a2c306a90046ffe4bf1c90a175367cd | 6,000 | py | Python | beetsplug/play.py | awesome-archive/beets | 44f33cabc7e2c5ea6fd79fac3b73ac54fa11d568 | [
"MIT"
] | null | null | null | beetsplug/play.py | awesome-archive/beets | 44f33cabc7e2c5ea6fd79fac3b73ac54fa11d568 | [
"MIT"
] | null | null | null | beetsplug/play.py | awesome-archive/beets | 44f33cabc7e2c5ea6fd79fac3b73ac54fa11d568 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, David Hamp-Gonsalves
#
# 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 limitat... | 37.974684 | 79 | 0.607 |
4a217492cbacfec301ecd7bb60c637ecacd789dd | 6,934 | py | Python | dualis/main.py | KarelZe/dualis | cecf945ec76d9f49e0d6c9cfeb7f95f0c0bdf313 | [
"MIT"
] | 8 | 2018-05-31T13:14:02.000Z | 2021-11-18T22:33:35.000Z | dualis/main.py | KarelZe/dualis | cecf945ec76d9f49e0d6c9cfeb7f95f0c0bdf313 | [
"MIT"
] | 3 | 2018-05-26T21:50:09.000Z | 2018-05-31T14:01:17.000Z | dualis/main.py | KarelZe/dualis | cecf945ec76d9f49e0d6c9cfeb7f95f0c0bdf313 | [
"MIT"
] | null | null | null | import itertools
from concurrent import futures
import requests
from bs4 import BeautifulSoup
from flask import Flask, jsonify, request
from werkzeug.exceptions import abort
app = Flask(__name__)
BASE_URL = "https://dualis.dhbw.de"
units = []
@app.route("/dualis/api/v1.0/semesters/", methods=['GET'])
def get_semes... | 41.27381 | 126 | 0.672483 |
4a2176b950357b2b09a181f35a36bb7986b9f6fd | 3,078 | py | Python | app/routers/request/http.py | 01xu10/pity | ac4aafba47d916ac8731ba087ff26eb06f90d61c | [
"Apache-2.0"
] | 1 | 2021-11-11T14:12:36.000Z | 2021-11-11T14:12:36.000Z | app/routers/request/http.py | 01xu10/pity | ac4aafba47d916ac8731ba087ff26eb06f90d61c | [
"Apache-2.0"
] | null | null | null | app/routers/request/http.py | 01xu10/pity | ac4aafba47d916ac8731ba087ff26eb06f90d61c | [
"Apache-2.0"
] | null | null | null | import asyncio
import json
from typing import List, Dict
from fastapi import Depends, APIRouter
from app.dao.test_case.TestcaseDataDao import PityTestcaseDataDao
from app.handler.fatcory import PityResponse
from app.middleware.AsyncHttpClient import AsyncRequest
from app.routers import Permission
from app.r... | 38 | 98 | 0.665042 |
4a2176db7cf678cae45c3769a9e2c1a587dee1e2 | 14,585 | py | Python | stickybeak/vendored/pip/_vendor/html5lib/treebuilders/base.py | reloadware/stickybeak | 8ac52a80849a3098fb6b2f47115970a734a73c14 | [
"Apache-2.0"
] | null | null | null | stickybeak/vendored/pip/_vendor/html5lib/treebuilders/base.py | reloadware/stickybeak | 8ac52a80849a3098fb6b2f47115970a734a73c14 | [
"Apache-2.0"
] | null | null | null | stickybeak/vendored/pip/_vendor/html5lib/treebuilders/base.py | reloadware/stickybeak | 8ac52a80849a3098fb6b2f47115970a734a73c14 | [
"Apache-2.0"
] | 1 | 2022-01-01T15:14:42.000Z | 2022-01-01T15:14:42.000Z | from __future__ import absolute_import, division, unicode_literals
from stickybeak.vendored.pip._vendor.six import text_type
from ..constants import scopingElements, tableInsertModeElements, namespaces
# The scope markers are inserted when entering object elements,
# marquees, table cells, and table captions, and are... | 34.892344 | 92 | 0.599931 |
4a2176f2d74d6ec5b907cf6aa7f617d83a50ae51 | 4,447 | py | Python | preprocessing/libs/utils/pytorch_ssim/__init__.py | vision4robotics/UDAT | f06971ec7d6794d0572864cf9fd6d49a66201303 | [
"Apache-2.0"
] | 81 | 2022-03-06T05:10:46.000Z | 2022-03-30T09:43:41.000Z | preprocessing/libs/utils/pytorch_ssim/__init__.py | JayYe99/UDAT | f06971ec7d6794d0572864cf9fd6d49a66201303 | [
"Apache-2.0"
] | null | null | null | preprocessing/libs/utils/pytorch_ssim/__init__.py | JayYe99/UDAT | f06971ec7d6794d0572864cf9fd6d49a66201303 | [
"Apache-2.0"
] | 13 | 2022-03-07T12:11:44.000Z | 2022-03-31T06:16:01.000Z | import torch
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
from math import exp
def gaussian(window_size, sigma):
gauss = torch.Tensor([exp(-(x - window_size//2)**2/float(2*sigma**2)) for x in range(window_size)])
return gauss/gauss.sum()
def create_window(window_size,... | 35.576 | 104 | 0.643805 |
4a21786d6c1ca42dae10931b8df3aec17881f7c5 | 111 | py | Python | Algorithms/ConsecutiveOnesInBinary/Solution.py | shams-sam/logic-lab | 559990b0c3d44bfe59d32dcb8038a0cab3efc26e | [
"MIT"
] | null | null | null | Algorithms/ConsecutiveOnesInBinary/Solution.py | shams-sam/logic-lab | 559990b0c3d44bfe59d32dcb8038a0cab3efc26e | [
"MIT"
] | null | null | null | Algorithms/ConsecutiveOnesInBinary/Solution.py | shams-sam/logic-lab | 559990b0c3d44bfe59d32dcb8038a0cab3efc26e | [
"MIT"
] | null | null | null | #!/bin/python
import sys
n = int(raw_input().strip())
ans = 0
while(n>0):
n &= n>>1
ans += 1
print ans
| 12.333333 | 28 | 0.558559 |
4a2178745b23e9b6ddd70575d7a9445eac5acda7 | 2,291 | py | Python | example/image-classification/benchmark_score.py | jrosebr1/mxnet | f2b7e0522c099d14f9f5a46c354fe0971db47d97 | [
"Apache-2.0"
] | 5 | 2017-01-21T08:53:55.000Z | 2021-08-20T13:06:43.000Z | example/image-classification/benchmark_score.py | jrosebr1/mxnet | f2b7e0522c099d14f9f5a46c354fe0971db47d97 | [
"Apache-2.0"
] | null | null | null | example/image-classification/benchmark_score.py | jrosebr1/mxnet | f2b7e0522c099d14f9f5a46c354fe0971db47d97 | [
"Apache-2.0"
] | 5 | 2017-02-20T18:55:16.000Z | 2020-04-17T21:34:22.000Z | """
Benchmark the scoring performance on various CNNs
"""
from common import find_mxnet
from common.util import get_gpus
import mxnet as mx
from importlib import import_module
import logging
import time
import numpy as np
logging.basicConfig(level=logging.DEBUG)
def get_symbol(network, batch_size):
image_shape = (... | 35.246154 | 95 | 0.62069 |
4a217927837f7d3eae136a6f3a07c4e4a9df2cfc | 30,323 | py | Python | factutils/rts/main.py | makbn/eval-runner-docker | ed5650a3fe1c7d1c9a6d698608cb125d4aafd9dc | [
"Apache-2.0"
] | 2 | 2021-06-03T14:27:27.000Z | 2021-06-03T20:15:02.000Z | factutils/rts/main.py | makbn/eval-runner-docker | ed5650a3fe1c7d1c9a6d698608cb125d4aafd9dc | [
"Apache-2.0"
] | null | null | null | factutils/rts/main.py | makbn/eval-runner-docker | ed5650a3fe1c7d1c9a6d698608cb125d4aafd9dc | [
"Apache-2.0"
] | 3 | 2021-06-03T20:14:29.000Z | 2021-11-23T07:51:19.000Z | #!/usr/bin/env python3
import argparse
import configparser
import csv
import json
import logging
import os
import re
import shlex
import shutil
import subprocess
from collections import namedtuple
from dataclasses import dataclass
from pathlib import Path
from pprint import pprint
from typing import Dict, List, Set, Tu... | 41.882597 | 151 | 0.631369 |
4a2179f218ce1be5107a1517994821455188f478 | 10,267 | py | Python | glance/tests/unit/test_versions.py | ishamibrahim/glance | ca51cb84650da93c52a26b2581f0582f0a280c11 | [
"Apache-2.0"
] | null | null | null | glance/tests/unit/test_versions.py | ishamibrahim/glance | ca51cb84650da93c52a26b2581f0582f0a280c11 | [
"Apache-2.0"
] | null | null | null | glance/tests/unit/test_versions.py | ishamibrahim/glance | ca51cb84650da93c52a26b2581f0582f0a280c11 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation.
# 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 req... | 39.337165 | 78 | 0.615662 |
4a217a2821f0feb41f37c2c7394c91ae3496d8b6 | 8,583 | py | Python | cogs/server-management2/role.py | yaakiyu/rt-bot | f68bca95c516e08c31ecc846524dcea4c8ba1503 | [
"BSD-4-Clause"
] | null | null | null | cogs/server-management2/role.py | yaakiyu/rt-bot | f68bca95c516e08c31ecc846524dcea4c8ba1503 | [
"BSD-4-Clause"
] | null | null | null | cogs/server-management2/role.py | yaakiyu/rt-bot | f68bca95c516e08c31ecc846524dcea4c8ba1503 | [
"BSD-4-Clause"
] | null | null | null | # RT - Role Panel
from __future__ import annotations
from discord.ext import commands
import discord
from core import Cog, RT, t
from rtlib.common.json import loads
from rtutil.utils import (
artificially_send, adjust_min_max, replace_nl, is_json, fetch_webhook,
edit_reference
)
from rtutil.content_data im... | 39.552995 | 137 | 0.606664 |
4a217a315209ea278a1d246794384730f20f6bf1 | 16,778 | py | Python | nevow/test/livetest_athena.py | msdemlei/nevow | 1b0afa851d476b8d4beec5c3a3894b19fad49b17 | [
"MIT"
] | null | null | null | nevow/test/livetest_athena.py | msdemlei/nevow | 1b0afa851d476b8d4beec5c3a3894b19fad49b17 | [
"MIT"
] | null | null | null | nevow/test/livetest_athena.py | msdemlei/nevow | 1b0afa851d476b8d4beec5c3a3894b19fad49b17 | [
"MIT"
] | 1 | 2019-02-28T13:46:26.000Z | 2019-02-28T13:46:26.000Z | # Copyright (c) 2004-2007 Divmod.
# See LICENSE for details.
"""
Browser integration tests for Athena.
"""
from zope.interface import implements
from twisted.internet import defer
from nevow.inevow import IAthenaTransportable
from nevow import loaders, tags, athena
from nevow.page import Element, renderer
from nevo... | 28.010017 | 86 | 0.655799 |
4a217aa75a5a04b1124f375f0f112f8152b38d1e | 1,883 | py | Python | saqaparser.py | johnddias/saqaparser | 94de26f4f5db724c87e8aca7a523cfdba2766dc0 | [
"Apache-2.0"
] | 6 | 2017-03-27T00:59:08.000Z | 2021-03-08T08:51:36.000Z | saqaparser.py | johnddias/saqaparser | 94de26f4f5db724c87e8aca7a523cfdba2766dc0 | [
"Apache-2.0"
] | null | null | null | saqaparser.py | johnddias/saqaparser | 94de26f4f5db724c87e8aca7a523cfdba2766dc0 | [
"Apache-2.0"
] | 2 | 2017-07-17T21:51:22.000Z | 2021-02-19T16:58:27.000Z | #!/usr/bin/env python
import logging
import sys
from HTMLParser import HTMLParser
from bs4 import BeautifulSoup, SoupStrainer
import requests
import inquirer
only_transcripts = SoupStrainer(sasource="qp_transcripts")
def gettranscripts ( ticker ):
"Gets a list of available transcripts for a valid stock ticker"
... | 28.530303 | 80 | 0.668614 |
4a217b180eba282269ec9ae9acf30217453e3404 | 535 | py | Python | Heraut_python/Monstre_class.py | yppdr/SpaceKiwi | e82c9c9704d33a3e928ba613c58750b285ec54e8 | [
"MIT"
] | null | null | null | Heraut_python/Monstre_class.py | yppdr/SpaceKiwi | e82c9c9704d33a3e928ba613c58750b285ec54e8 | [
"MIT"
] | 8 | 2018-10-20T09:59:59.000Z | 2018-10-21T13:12:28.000Z | Heraut_python/Monstre_class.py | yppdr/SpaceKiwi | e82c9c9704d33a3e928ba613c58750b285ec54e8 | [
"MIT"
] | 1 | 2018-10-22T08:13:26.000Z | 2018-10-22T08:13:26.000Z | class Monstre:
def __init__(self,leNom,lesPV,nbAtk,nbDeff,NbPoLoot):
self.nom = leNom
self.pvMax = lesPV
self.pvActu = lesPV
self.atk = nbAtk
self.deff = nbDeff
self.gold = NbPoLoot
def _get_nom(self):
return self.nom
def _get_pvActu(self):
re... | 24.318182 | 57 | 0.596262 |
4a217bc6cd6205aecda209fe3dbf6bfc8930b314 | 851 | py | Python | tests/bots/stocks/options/test_vsurf.py | 23errg/GamestonkTerminal | 826cd8a723d8e2b810c51bf8266c09e8e55059c4 | [
"MIT"
] | null | null | null | tests/bots/stocks/options/test_vsurf.py | 23errg/GamestonkTerminal | 826cd8a723d8e2b810c51bf8266c09e8e55059c4 | [
"MIT"
] | null | null | null | tests/bots/stocks/options/test_vsurf.py | 23errg/GamestonkTerminal | 826cd8a723d8e2b810c51bf8266c09e8e55059c4 | [
"MIT"
] | null | null | null | import pytest
try:
from bots.stocks.options.vsurf import vsurf_command
except ImportError:
pytest.skip(allow_module_level=True)
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": [("User-Agent", None)],
"filter_query_parameters": [
("period1", "MOCK_P... | 23 | 55 | 0.638073 |
4a217c825bedf9714ee3c9b43640364784bdf81e | 880 | py | Python | databases/migrations/2018_02_21_023908_create_schedule_table.py | josephmancuso/gbaleague-masonite2 | b3dd5ec3f20c07eaabcc3129b0c50379a946a82b | [
"MIT"
] | null | null | null | databases/migrations/2018_02_21_023908_create_schedule_table.py | josephmancuso/gbaleague-masonite2 | b3dd5ec3f20c07eaabcc3129b0c50379a946a82b | [
"MIT"
] | 3 | 2018-07-25T17:36:43.000Z | 2020-01-06T18:52:51.000Z | databases/migrations/2018_02_21_023908_create_schedule_table.py | josephmancuso/gbaleague-masonite2 | b3dd5ec3f20c07eaabcc3129b0c50379a946a82b | [
"MIT"
] | null | null | null | from orator.migrations import Migration
class CreateScheduleTable(Migration):
def up(self):
"""
Run the migrations.
"""
with self.schema.create('schedules') as table:
table.increments('id')
table.integer('league_id').unsigned()
table.integer('te... | 31.428571 | 69 | 0.563636 |
4a217ccf8581a3206c6660408afe80dcb1ecad70 | 819 | py | Python | importer/management/commands/fix-sort-date.py | cyroxx/meine-stadt-transparent | d5a3f03a29a1bb97ce50ac5257d8bbd5208d9218 | [
"MIT"
] | 34 | 2017-10-04T14:20:41.000Z | 2022-03-11T18:06:48.000Z | importer/management/commands/fix-sort-date.py | cyroxx/meine-stadt-transparent | d5a3f03a29a1bb97ce50ac5257d8bbd5208d9218 | [
"MIT"
] | 588 | 2017-10-14T18:31:17.000Z | 2022-03-16T13:00:30.000Z | importer/management/commands/fix-sort-date.py | codeformuenster/meine-stadt-transparent | 1458bc6acad40183908e2b7cc98ef92165d1123a | [
"MIT"
] | 11 | 2017-11-27T10:12:59.000Z | 2022-02-09T10:27:11.000Z | import datetime
from dateutil import tz
from django.core.management.base import BaseCommand
from importer.functions import fix_sort_date
class Command(BaseCommand):
help = "After the initial import, this command guesses the sort_date-Attribute of papers and files"
def add_arguments(self, parser):
h... | 32.76 | 103 | 0.675214 |
4a217d14ce99ad294469a5316272219a13cadf80 | 3,597 | py | Python | aidistillery/stopwords.py | TheMTank/arxiv-summariser | db4f1e42bcc9185e197a00a18e280a4a3011453c | [
"MIT"
] | 17 | 2018-11-26T23:06:20.000Z | 2022-01-18T21:43:17.000Z | aidistillery/stopwords.py | TheMTank/arxiv-summariser | db4f1e42bcc9185e197a00a18e280a4a3011453c | [
"MIT"
] | 3 | 2018-11-27T12:17:20.000Z | 2019-02-05T11:40:44.000Z | aidistillery/stopwords.py | TheMTank/arxiv-summariser | db4f1e42bcc9185e197a00a18e280a4a3011453c | [
"MIT"
] | 3 | 2019-03-06T10:14:08.000Z | 2020-01-21T17:26:20.000Z | stopwords = ['a', 'about', 'above', 'across', 'after', 'afterwards']
stopwords += ['again', 'against', 'all', 'almost', 'alone', 'along']
stopwords += ['already', 'also', 'although', 'always', 'am', 'among']
stopwords += ['amongst', 'amoungst', 'amount', 'an', 'and', 'another']
stopwords += ['any', 'anyhow', 'anyone', ... | 69.173077 | 75 | 0.572699 |
4a217d5b683915126c0a7d9d8198809e0f230831 | 9,898 | py | Python | synonyms/synonyms.py | Walelile/Synonyms | 62c2aea9e048e05e4fbe73d8bdf2a8b5b550a187 | [
"MIT"
] | 1 | 2019-08-04T09:42:45.000Z | 2019-08-04T09:42:45.000Z | synonyms/synonyms.py | skywindy/Synonyms | b23e1c3ba7f5c972dc2b2f7ad8c0d499c19ab228 | [
"MIT"
] | null | null | null | synonyms/synonyms.py | skywindy/Synonyms | b23e1c3ba7f5c972dc2b2f7ad8c0d499c19ab228 | [
"MIT"
] | 1 | 2019-09-11T09:09:20.000Z | 2019-09-11T09:09:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#=========================================================================
#
# Copyright (c) 2017 <> All Rights Reserved
#
#
# File: /Users/hain/ai/Synonyms/synonyms/__init__.py
# Author: Hai Liang Wang
# Date: 2017-09-27
#
#=================================================... | 27.571031 | 95 | 0.585068 |
4a217d7911cebf10ce8aec63d0dd262e1bf6a2bb | 2,487 | py | Python | lightning_plus/shield/signals.py | twocucao/lightning-plus | e69c81da9c15fdfc37355e0362ff7ed804e94b2a | [
"MIT"
] | 1 | 2021-04-15T14:52:12.000Z | 2021-04-15T14:52:12.000Z | lightning_plus/shield/signals.py | twocucao/lightning | e69c81da9c15fdfc37355e0362ff7ed804e94b2a | [
"MIT"
] | null | null | null | lightning_plus/shield/signals.py | twocucao/lightning | e69c81da9c15fdfc37355e0362ff7ed804e94b2a | [
"MIT"
] | null | null | null | import logging
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db.models.signals import m2m_changed
from django.dispatch import receiver
from lightning_plus.shield.filter import (
SHIELD_RULES_DICT_CACHE_KEY,
USER_GROUP_MAP_CACHE_KEY,
)
from lightning_plus.shield.mod... | 32.723684 | 82 | 0.721753 |
4a217e11aaf4bc7ef59feccee5a39fde2ab72035 | 338 | py | Python | python/fact(7).py | adidom/hacktoberfest2020 | 63480c7295814f444a096fb25db1daf5c7724df5 | [
"MIT"
] | 11 | 2020-10-14T05:43:12.000Z | 2021-10-02T02:29:52.000Z | python/fact(7).py | adidom/hacktoberfest2020 | 63480c7295814f444a096fb25db1daf5c7724df5 | [
"MIT"
] | 10 | 2020-10-14T15:15:41.000Z | 2020-10-31T17:13:33.000Z | python/fact(7).py | adidom/hacktoberfest2020 | 63480c7295814f444a096fb25db1daf5c7724df5 | [
"MIT"
] | 91 | 2020-10-13T15:38:28.000Z | 2021-10-02T02:29:55.000Z | # Factorial of a number using recursion
def recur_factorial(n):
if n == 1 or n==0:
return 1
else:
return n*recur_factorial(n-1)
num = 7
# check if the number is negative
if num < 0:
print("Sorry, factorial does not exist for negative numbers")
else:
print("The factorial of", num, "is", recu... | 21.125 | 64 | 0.66568 |
4a217e5dec26eee98d0524a9913ef651a68b8ada | 76,159 | py | Python | python/ccxt/async_support/bitpanda.py | xCuri0/ccxt | bf3d10e0d3c1defb9aba9e81caa57cad0187fa5c | [
"MIT"
] | 2 | 2019-05-30T21:49:40.000Z | 2019-05-31T13:12:23.000Z | python/ccxt/async_support/bitpanda.py | xCuri0/ccxt | bf3d10e0d3c1defb9aba9e81caa57cad0187fa5c | [
"MIT"
] | 1 | 2021-01-27T12:10:31.000Z | 2021-01-27T12:11:16.000Z | python/ccxt/async_support/bitpanda.py | xCuri0/ccxt | bf3d10e0d3c1defb9aba9e81caa57cad0187fa5c | [
"MIT"
] | 1 | 2020-09-11T18:44:37.000Z | 2020-09-11T18:44:37.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticatio... | 44.201393 | 555 | 0.476437 |
4a217f21cd53eae78db16320fdce844883047180 | 20,122 | py | Python | pw_env_setup/py/pw_env_setup/env_setup.py | LuDuda/pigweed | dcd7230895a234156bc7b6e5061e6936627c5fbb | [
"Apache-2.0"
] | null | null | null | pw_env_setup/py/pw_env_setup/env_setup.py | LuDuda/pigweed | dcd7230895a234156bc7b6e5061e6936627c5fbb | [
"Apache-2.0"
] | null | null | null | pw_env_setup/py/pw_env_setup/env_setup.py | LuDuda/pigweed | dcd7230895a234156bc7b6e5061e6936627c5fbb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2020 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 33.536667 | 80 | 0.611371 |
4a217f693a0dd76ad62a38e78e4f840e5f38af6f | 3,250 | py | Python | bomberman_game.py | anudeep586/Codechef_hackerrank_codeforces1 | 39a536d6ad6d670e0bce2ba8657cf5715b0037e0 | [
"0BSD"
] | null | null | null | bomberman_game.py | anudeep586/Codechef_hackerrank_codeforces1 | 39a536d6ad6d670e0bce2ba8657cf5715b0037e0 | [
"0BSD"
] | null | null | null | bomberman_game.py | anudeep586/Codechef_hackerrank_codeforces1 | 39a536d6ad6d670e0bce2ba8657cf5715b0037e0 | [
"0BSD"
] | null | null | null | r,c,t=[int(x) for x in input().split(" ")]
arr1=[]
arr2=[]
arr3=[]
for _ in range(r):
arr=list(input())
arr2.append(arr)
for i in range(len(arr2)):
k=[]
for j in range(len(arr2[i])):
k.append('O')
arr3.append(k)
arr1=arr3
def first(arr1,arr2):
for i in range(len(arr1)):
... | 25.193798 | 100 | 0.348308 |
4a217fec417e4a88c4d9aba933eb45ccfb54973a | 209 | py | Python | cdecimal/errors.py | virtuNat/cdecimal | ab07330581e4c8181e4a98851df02c96a7fb1d82 | [
"MIT"
] | null | null | null | cdecimal/errors.py | virtuNat/cdecimal | ab07330581e4c8181e4a98851df02c96a7fb1d82 | [
"MIT"
] | null | null | null | cdecimal/errors.py | virtuNat/cdecimal | ab07330581e4c8181e4a98851df02c96a7fb1d82 | [
"MIT"
] | 1 | 2018-09-23T10:44:56.000Z | 2018-09-23T10:44:56.000Z | class DivisionByZero(ZeroDivisionError):
"""Thrown when division by zero occurs."""
class InvalidOperationError(ArithmeticError):
"""Thrown when an operation would produce an indeterminate value."""
| 29.857143 | 72 | 0.76555 |
4a2180831356d55304d73e1e762f9f3f4678067d | 2,953 | py | Python | test/Task/Fs/ChmodTaskTest.py | paulondc/chilopoda | 046dbb0c1b4ff20ea5f2e1679f8d89f3089b6aa4 | [
"MIT"
] | 2 | 2019-09-24T18:56:27.000Z | 2021-02-07T04:58:49.000Z | test/Task/Fs/ChmodTaskTest.py | paulondc/kombi | 046dbb0c1b4ff20ea5f2e1679f8d89f3089b6aa4 | [
"MIT"
] | 20 | 2019-02-16T04:21:13.000Z | 2019-03-09T21:21:21.000Z | test/Task/Fs/ChmodTaskTest.py | paulondc/kombi | 046dbb0c1b4ff20ea5f2e1679f8d89f3089b6aa4 | [
"MIT"
] | 3 | 2019-11-15T05:16:32.000Z | 2021-09-28T21:28:29.000Z | import unittest
import os
import sys
from ...BaseTestCase import BaseTestCase
from kombi.Task import Task
from kombi.Crawler.Fs import FsCrawler
class ChmodTaskTest(BaseTestCase):
"""Test Chmod task."""
__dir = os.path.join(BaseTestCase.dataTestsDirectory(), "glob")
__path = os.path.join(__dir, "images", ... | 36.9125 | 88 | 0.64917 |
4a218087ad188d568c67cc4f6279c4133b83e6d3 | 1,776 | py | Python | Tutorial_Kivy_Codemy/codemy_3_Kv_Language.py | LivioAlvarenga/Tutoriais_Kivy_KivyMD | b6225578e764eaf0312afafbb2f76dc06f92342d | [
"MIT"
] | null | null | null | Tutorial_Kivy_Codemy/codemy_3_Kv_Language.py | LivioAlvarenga/Tutoriais_Kivy_KivyMD | b6225578e764eaf0312afafbb2f76dc06f92342d | [
"MIT"
] | null | null | null | Tutorial_Kivy_Codemy/codemy_3_Kv_Language.py | LivioAlvarenga/Tutoriais_Kivy_KivyMD | b6225578e764eaf0312afafbb2f76dc06f92342d | [
"MIT"
] | null | null | null | # https://www.youtube.com/watch?v=k4QCoS-hj-s&list=PLCC34OHNcOtpz7PJQ7Tv7hqFBP_xDDjqg&index=5
# https://www.youtube.com/watch?v=dVVPOPuPPc0&list=PLCC34OHNcOtpz7PJQ7Tv7hqFBP_xDDjqg&index=6
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
from kivy.lang import Builde... | 29.6 | 93 | 0.67286 |
4a2180b5d73be05d41049c55d3072654cda6e44f | 17,588 | py | Python | python/ray/tune/sample.py | lavanyashukla/ray | 9c1a75b6ff82a842131e6beb3c260188befc21df | [
"Apache-2.0"
] | 1 | 2020-10-21T22:24:27.000Z | 2020-10-21T22:24:27.000Z | python/ray/tune/sample.py | mfitton/ray | fece8db70d703da1aad192178bd50923e83cc99a | [
"Apache-2.0"
] | null | null | null | python/ray/tune/sample.py | mfitton/ray | fece8db70d703da1aad192178bd50923e83cc99a | [
"Apache-2.0"
] | null | null | null | import logging
import random
from copy import copy
from inspect import signature
from math import isclose
from typing import Any, Callable, Dict, List, Optional, Sequence, Union
import numpy as np
logger = logging.getLogger(__name__)
class Domain:
"""Base class to specify a type and valid range to sample parame... | 32.57037 | 80 | 0.587105 |
4a2180da016beb86a73a3b306a1200ce47561479 | 1,446 | py | Python | pinger/server.py | shichao-an/udp-pinger | 463b2dc556c8fe7d972ed48c42122d563b8b096c | [
"BSD-2-Clause"
] | 1 | 2020-09-26T16:27:11.000Z | 2020-09-26T16:27:11.000Z | pinger/server.py | shichao-an/udp-pinger | 463b2dc556c8fe7d972ed48c42122d563b8b096c | [
"BSD-2-Clause"
] | null | null | null | pinger/server.py | shichao-an/udp-pinger | 463b2dc556c8fe7d972ed48c42122d563b8b096c | [
"BSD-2-Clause"
] | 1 | 2019-01-11T08:53:14.000Z | 2019-01-11T08:53:14.000Z | #!/usr/bin/env python
import select
import socket
import sys
DEFAULT_PORT = 5005
class UDPPingerServer(object):
UDP_IP = '' # INADDR_ANY
def __init__(self, port):
self.socket = socket.socket(socket.AF_INET,
socket.SOCK_DGRAM)
self.server_address = (self... | 27.283019 | 77 | 0.551867 |
4a2181397ced150e3d38553c051bf19184840ec1 | 12,306 | py | Python | test/lit.cfg.py | arunkumarbhattar/llvm | 2c4ca6832fa6b306ee6a7010bfb80a3f2596f824 | [
"Apache-2.0"
] | 4,812 | 2015-01-02T19:38:10.000Z | 2022-03-27T12:42:24.000Z | test/lit.cfg.py | arunkumarbhattar/llvm | 2c4ca6832fa6b306ee6a7010bfb80a3f2596f824 | [
"Apache-2.0"
] | 71 | 2016-07-26T15:16:53.000Z | 2022-03-31T14:39:47.000Z | test/lit.cfg.py | arunkumarbhattar/llvm | 2c4ca6832fa6b306ee6a7010bfb80a3f2596f824 | [
"Apache-2.0"
] | 2,543 | 2015-01-01T11:18:36.000Z | 2022-03-22T21:32:36.000Z | # -*- Python -*-
# Configuration file for the 'lit' test runner.
import os
import sys
import re
import platform
import subprocess
import lit.util
import lit.formats
from lit.llvm import llvm_config
from lit.llvm.subst import FindTool
from lit.llvm.subst import ToolSubst
# name: The name of this test suite.
config.n... | 36.408284 | 99 | 0.709898 |
4a21817553cd382a66e3a0478aa06d02bbc7d458 | 1,985 | py | Python | image_correction.py | mhchen124/CarND-LaneDetectionAdv | 19c69e5cd7b92838a76f46d3263065db15351fe0 | [
"MIT"
] | 1 | 2020-03-05T12:50:40.000Z | 2020-03-05T12:50:40.000Z | image_correction.py | mhchen124/CarND-LaneDetectionAdv | 19c69e5cd7b92838a76f46d3263065db15351fe0 | [
"MIT"
] | null | null | null | image_correction.py | mhchen124/CarND-LaneDetectionAdv | 19c69e5cd7b92838a76f46d3263065db15351fe0 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import glob
import pickle
import matplotlib.pyplot as plt
#%matplotlib qt
# prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0)
objp = np.zeros((6*9,3), np.float32)
objp[:,:2] = np.mgrid[0:9,0:6].T.reshape(-1,2)
# Arrays to store object points and image points from all the... | 31.015625 | 100 | 0.668514 |
4a218228260a50b01bd9fde6bfc91bcc9e784cd4 | 9,158 | py | Python | tests/test_blob.py | ShaneMicro/azure-functions-python-library | f56564effbf291a27e1bd5751a38484af387bb7f | [
"MIT"
] | null | null | null | tests/test_blob.py | ShaneMicro/azure-functions-python-library | f56564effbf291a27e1bd5751a38484af387bb7f | [
"MIT"
] | 1 | 2022-03-02T11:49:02.000Z | 2022-03-02T11:49:02.000Z | tests/test_blob.py | ShaneMicro/azure-functions-python-library | f56564effbf291a27e1bd5751a38484af387bb7f | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import json
import unittest
from typing import Any, Dict
import azure.functions as func
import azure.functions.blob as afb
from azure.functions.blob import InputStream
from azure.functions.meta import Datum
class TestBlob... | 42.202765 | 79 | 0.67078 |
4a2183e454f1baee9756cbbe746c4cfc47f69e9a | 16,036 | py | Python | tensorflow.py | jyotidabass/document_text_recognition | 7bbdf4b1e5f7e9a28a7047dcd13eb2a5501643ef | [
"Apache-2.0"
] | 2 | 2022-03-09T11:15:14.000Z | 2022-03-09T15:29:12.000Z | tensorflow.py | jyotidabass/document_text_recognition | 7bbdf4b1e5f7e9a28a7047dcd13eb2a5501643ef | [
"Apache-2.0"
] | null | null | null | tensorflow.py | jyotidabass/document_text_recognition | 7bbdf4b1e5f7e9a28a7047dcd13eb2a5501643ef | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2021-2022, Mindee.
# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.
import random
from typing import Any, Callable, Dict, Iterable, List, Tuple, Union
import numpy as np
import tensorflow ... | 35.089716 | 113 | 0.614679 |
4a2184296f49f9aab0cff98556773cc132015ab2 | 3,476 | py | Python | web_reflectivity/fitting/catalog.py | neutrons/web_reflectivity | 8381a0a1e64fb8df89a28e4729cb2957e0ebce57 | [
"Apache-2.0"
] | 1 | 2020-01-31T20:47:06.000Z | 2020-01-31T20:47:06.000Z | web_reflectivity/fitting/catalog.py | neutrons/web_reflectivity | 8381a0a1e64fb8df89a28e4729cb2957e0ebce57 | [
"Apache-2.0"
] | 5 | 2017-08-15T18:00:51.000Z | 2019-04-17T18:00:41.000Z | web_reflectivity/fitting/catalog.py | neutrons/web_reflectivity | 8381a0a1e64fb8df89a28e4729cb2957e0ebce57 | [
"Apache-2.0"
] | 2 | 2018-10-17T09:17:33.000Z | 2021-10-18T13:06:55.000Z | #pylint: disable=bare-except, invalid-name, too-many-nested-blocks, too-many-locals, too-many-branches
"""
Optional utilities to communicate with ONcat.
ONcat is an online data catalog used internally at ORNL.
@copyright: 2018 Oak Ridge National Laboratory
"""
import sys
import datetime
import logging
fro... | 35.111111 | 102 | 0.636939 |
4a21843f4dc448bc83b3bc655dd17ac89a675f94 | 1,700 | py | Python | build_event.py | thehorizondweller/gyft | 268b484cc62f1eb67c368db1d1112ef411f13ce5 | [
"MIT"
] | 39 | 2016-08-07T15:07:34.000Z | 2022-01-29T08:44:45.000Z | build_event.py | thehorizondweller/gyft | 268b484cc62f1eb67c368db1d1112ef411f13ce5 | [
"MIT"
] | 66 | 2016-08-12T04:30:06.000Z | 2022-02-06T09:36:50.000Z | build_event.py | thehorizondweller/gyft | 268b484cc62f1eb67c368db1d1112ef411f13ce5 | [
"MIT"
] | 58 | 2016-08-07T20:38:33.000Z | 2022-02-01T06:40:00.000Z | from icalendar import Calendar, Event
import pytz
from datetime import datetime, timedelta
def build_event_duration(summary, description, start, duration, location,
freq_of_recurrence, until):
'''
Return an event that can be added to a calendar
summary: summary of the event
description: descr... | 31.481481 | 91 | 0.669412 |
4a218440a135eea47a8f4f2b0ed5da6f0f570489 | 2,002 | py | Python | rewardpredictive/evaluate.py | taodav/rewardpredictive | be0dc53993a0c59e1a64df1aef9923d57e8692dc | [
"MIT"
] | 1 | 2020-08-04T18:01:53.000Z | 2020-08-04T18:01:53.000Z | rewardpredictive/evaluate.py | lucaslehnert/rewardpredictive | 273da5a2566a263678159ed81dfb202b180a45a1 | [
"MIT"
] | 5 | 2020-07-14T20:06:36.000Z | 2022-02-10T01:52:53.000Z | rewardpredictive/evaluate.py | taodav/rewardpredictive | be0dc53993a0c59e1a64df1aef9923d57e8692dc | [
"MIT"
] | 1 | 2020-12-14T20:00:39.000Z | 2020-12-14T20:00:39.000Z | import numpy as np
import rlutils as rl
from .utils import cluster_idx_to_phi_mat, lam_from_mat, reward_rollout
def eval_total_reward(task, partition, repeats=5, rollout_depth=10, gamma=0.9):
"""
Evaluate the total reward that can be generated by using the given abstraction on the specified task.
:param... | 38.5 | 120 | 0.71978 |
4a2184ee0158589d332f4602757e2a65823f04ae | 335 | py | Python | malt/constants.py | Anavros/malt | d972ce9851f0174160c1ae73b9d54b56575fe5c0 | [
"MIT"
] | null | null | null | malt/constants.py | Anavros/malt | d972ce9851f0174160c1ae73b9d54b56575fe5c0 | [
"MIT"
] | 8 | 2015-12-05T17:28:39.000Z | 2016-12-09T18:41:25.000Z | malt/constants.py | Anavros/malt | d972ce9851f0174160c1ae73b9d54b56575fe5c0 | [
"MIT"
] | null | null | null |
# Characters
LIST_BEGIN = '['
LIST_END = ']'
DICT_BEGIN = '{'
DICT_END = '}'
LINE_END = '\n'
JOIN = ':'
EQUALS = '='
COMMENT = '#'
HINT = '?'
DOUBLE_QUOTE = '\"'
SINGLE_QUOTE = '\''
# Character Groups
COMMENTS = '#?'
SEPARATORS = ' \t\n'
QUOTES = '\'\"'
BRACES = '[]{}'
# Literal Strings
LINE_CONTINUE = '...'
BLOCK_C... | 13.958333 | 21 | 0.558209 |
4a21853c599929a2b254f25ac86b3fb60de5e2de | 14,286 | py | Python | deep_cox_mixtures/dcm/plots.py | chiragnagpal/google-research | b9225e1eb6d83a2b9a69cd9b4b319129d0c68fc7 | [
"Apache-2.0"
] | 21 | 2021-01-19T15:38:45.000Z | 2022-03-03T09:25:15.000Z | deep_cox_mixtures/dcm/plots.py | chiragnagpal/google-research | b9225e1eb6d83a2b9a69cd9b4b319129d0c68fc7 | [
"Apache-2.0"
] | 4 | 2021-04-09T12:00:52.000Z | 2021-11-10T15:23:02.000Z | deep_cox_mixtures/dcm/plots.py | chiragnagpal/google-research | b9225e1eb6d83a2b9a69cd9b4b319129d0c68fc7 | [
"Apache-2.0"
] | 2 | 2021-12-09T06:41:25.000Z | 2022-03-17T18:01:52.000Z | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# 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 applicab... | 29.095723 | 80 | 0.51568 |
4a21854143462e6a8113a4dcf56bf74dc2a0ac90 | 14,912 | py | Python | storagevet/Technology/DistributedEnergyResource.py | epri-dev/StorageVET | 26b740ba03b1ad4fc0734af56787ec5c0ebd3824 | [
"BSD-3-Clause"
] | 35 | 2020-06-04T18:04:11.000Z | 2022-02-24T07:48:29.000Z | storagevet/Technology/DistributedEnergyResource.py | epri-dev/StorageVET | 26b740ba03b1ad4fc0734af56787ec5c0ebd3824 | [
"BSD-3-Clause"
] | 4 | 2021-05-13T22:36:24.000Z | 2022-01-13T03:42:16.000Z | storagevet/Technology/DistributedEnergyResource.py | epri-dev/StorageVET | 26b740ba03b1ad4fc0734af56787ec5c0ebd3824 | [
"BSD-3-Clause"
] | 16 | 2020-06-04T18:07:18.000Z | 2022-03-10T13:27:08.000Z | """
Copyright (c) 2021, Electric Power Research Institute
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 li... | 37.28 | 138 | 0.660475 |
4a2185d972ab6f4d0bf6d4963cf06da70aac1d21 | 10,247 | py | Python | scripts/takamura.py | WladimirSidorenko/SentimentLexicon | 0d7203b7b7e3ca5d11759fdad656f775fa5d6e95 | [
"MIT"
] | 13 | 2016-08-03T18:46:02.000Z | 2022-02-22T22:30:19.000Z | scripts/takamura.py | WladimirSidorenko/SentimentLexicon | 0d7203b7b7e3ca5d11759fdad656f775fa5d6e95 | [
"MIT"
] | 2 | 2019-10-22T13:03:48.000Z | 2019-12-05T21:41:36.000Z | scripts/takamura.py | WladimirSidorenko/SentimentLexicon | 0d7203b7b7e3ca5d11759fdad656f775fa5d6e95 | [
"MIT"
] | 5 | 2019-12-25T13:53:18.000Z | 2020-06-05T20:47:31.000Z | #!/usr/bin/env python2.7
# -*- mode: python; coding: utf-8; -*-
"""Module for generating lexicon using Takamura's method (2005).
"""
##################################################################
# Imports
from __future__ import unicode_literals, print_function
from common import lemmatize, POSITIVE, NEGATIVE, ... | 38.378277 | 78 | 0.590514 |
4a218642c15d31e06847073f011a01622dc46208 | 19,603 | py | Python | docker/zap-full-scan.py | sshniro/zaproxy | 572dbfd25ec6bab0dec477281958c171ce524368 | [
"Apache-2.0"
] | null | null | null | docker/zap-full-scan.py | sshniro/zaproxy | 572dbfd25ec6bab0dec477281958c171ce524368 | [
"Apache-2.0"
] | null | null | null | docker/zap-full-scan.py | sshniro/zaproxy | 572dbfd25ec6bab0dec477281958c171ce524368 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Zed Attack Proxy (ZAP) and its related class files.
#
# ZAP is an HTTP/HTTPS proxy for assessing web application security.
#
# Copyright 2017 ZAP Development Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License... | 38.741107 | 139 | 0.578942 |
4a218687d66a55f41e986f3290ab5d9e84010901 | 11,638 | py | Python | ari/client.py | afluence/ari-py | d3510202c6be9dcdaabd4673d1f6c2d4f5563947 | [
"BSD-3-Clause"
] | null | null | null | ari/client.py | afluence/ari-py | d3510202c6be9dcdaabd4673d1f6c2d4f5563947 | [
"BSD-3-Clause"
] | null | null | null | ari/client.py | afluence/ari-py | d3510202c6be9dcdaabd4673d1f6c2d4f5563947 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2013, Digium, Inc.
#
"""ARI client library.
"""
import json
import logging
import urllib.parse
import swaggerpy.client
from ari.model import *
log = logging.getLogger(__name__)
class Client(object):
"""ARI Client object.
:param base_url: Base URL for accessing Asterisk.
:param http_... | 38.793333 | 91 | 0.587128 |
4a2186b2db2ce8b846cdfdfa16d4e2b935c06b95 | 10,993 | py | Python | salt/modules/gem.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 19 | 2016-01-29T14:37:52.000Z | 2022-03-30T18:08:01.000Z | salt/modules/gem.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 223 | 2016-03-02T16:39:41.000Z | 2022-03-03T12:26:35.000Z | salt/modules/gem.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 64 | 2016-02-04T19:45:26.000Z | 2021-12-15T02:02:31.000Z | # -*- coding: utf-8 -*-
"""
Manage ruby gems.
"""
from __future__ import absolute_import, print_function, unicode_literals
import logging
# Import python libs
import re
# Import Salt libs
import salt.utils.itertools
import salt.utils.platform
from salt.exceptions import CommandExecutionError
__func_alias__ = {"list... | 27.901015 | 88 | 0.607932 |
4a2186eb03bc72d20131e0f32740189915939e88 | 166 | py | Python | app/tests/test_dummy.py | afrokita/books-list | 5afe40ffd7e28e0f62f12a8f780470a0b2500110 | [
"MIT"
] | null | null | null | app/tests/test_dummy.py | afrokita/books-list | 5afe40ffd7e28e0f62f12a8f780470a0b2500110 | [
"MIT"
] | null | null | null | app/tests/test_dummy.py | afrokita/books-list | 5afe40ffd7e28e0f62f12a8f780470a0b2500110 | [
"MIT"
] | null | null | null | import pytest
@pytest.fixture
def foo():
bar = 42
return bar
@pytest.mark.parametrize("num, output", [(42,42)])
def test_foo(num, output):
assert num == output
| 13.833333 | 50 | 0.686747 |
4a218815c795b8a14dcce873c65687ae29f23960 | 521 | py | Python | themissc/Tools/ReadCDF.py | mattkjames7/themissc | 1e7257d60da1069fffc7fed848ddcf5c780e9250 | [
"MIT"
] | null | null | null | themissc/Tools/ReadCDF.py | mattkjames7/themissc | 1e7257d60da1069fffc7fed848ddcf5c780e9250 | [
"MIT"
] | 1 | 2021-06-10T22:51:09.000Z | 2021-06-10T22:51:09.000Z | Arase/Tools/ReadCDF.py | mattkjames7/Arase | 996167be35a13bbb1fdddfbe75e3a06d124b1d25 | [
"MIT"
] | null | null | null | import numpy as np
import cdflib
import os
def ReadCDF(fname,Verbose=True):
'''
Read a CDF file contents
'''
if not os.path.isfile(fname):
print('File not found')
return None,None
#open the file
f = cdflib.CDF(fname)
#get the list of zVariables
var = f.cdf_info()['zVariables']
#create ouput dicts
... | 16.806452 | 83 | 0.666027 |
4a218840c432db771a357f49c805fac16b834177 | 13,768 | py | Python | config/settings/base.py | pygabo/bus_system | ffb76d3414e058286799f3df1cb551b26286e7c3 | [
"MIT"
] | null | null | null | config/settings/base.py | pygabo/bus_system | ffb76d3414e058286799f3df1cb551b26286e7c3 | [
"MIT"
] | null | null | null | config/settings/base.py | pygabo/bus_system | ffb76d3414e058286799f3df1cb551b26286e7c3 | [
"MIT"
] | null | null | null | """
Base settings to build other settings files upon.
"""
from datetime import timedelta
from pathlib import Path
import environ
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# bus_system/
APPS_DIR = ROOT_DIR / "bus_system"
env = environ.Env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_F... | 42.233129 | 101 | 0.652455 |
4a2188b0004b39e1f3ac1aa96ef948b04ee767b1 | 217 | py | Python | Taller/E8.py | Pcetina/algoritmos_programacion | f3292327a6da4bc35efb70bd6b9951664f29585f | [
"MIT"
] | null | null | null | Taller/E8.py | Pcetina/algoritmos_programacion | f3292327a6da4bc35efb70bd6b9951664f29585f | [
"MIT"
] | null | null | null | Taller/E8.py | Pcetina/algoritmos_programacion | f3292327a6da4bc35efb70bd6b9951664f29585f | [
"MIT"
] | null | null | null | while(True):
try:
a = int(input())
if(a==2002):
print("Acesso Permitido")
break
else:
print("Senha Invalida")
except EOFError:
break | 21.7 | 38 | 0.43318 |
4a218a37f1de1279f64edb7ed18813f01a98ec39 | 647 | py | Python | setup.py | jfine2358/python-kwkey | a58b2037568eada57a29e0086f57a981c06e2477 | [
"MIT"
] | 3 | 2020-08-03T17:18:52.000Z | 2020-11-02T07:51:20.000Z | setup.py | jfine2358/python-kwkey | a58b2037568eada57a29e0086f57a981c06e2477 | [
"MIT"
] | 3 | 2020-08-06T12:23:07.000Z | 2020-08-30T19:27:38.000Z | setup.py | jfine2358/python-kwkey | a58b2037568eada57a29e0086f57a981c06e2477 | [
"MIT"
] | 1 | 2020-08-07T12:56:29.000Z | 2020-08-07T12:56:29.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="kwkey",
version="0.0.2",
author="Jonathan Fine",
author_email="jfine2358@gmail.com",
description="Indexing with keyword arguments",
long_description=long_description,
long_descript... | 28.130435 | 52 | 0.664606 |
4a218bd6acbf0beb64e7381921ec206cf84a3ec8 | 7,296 | py | Python | xfel/merging/application/group/group_reflections.py | toastisme/cctbx_project | d1a25147b5958822b6923fb55260749ccf9350ff | [
"BSD-3-Clause-LBNL"
] | 2 | 2018-02-01T14:25:48.000Z | 2021-09-15T16:36:29.000Z | xfel/merging/application/group/group_reflections.py | toastisme/cctbx_project | d1a25147b5958822b6923fb55260749ccf9350ff | [
"BSD-3-Clause-LBNL"
] | 2 | 2018-06-14T17:04:17.000Z | 2019-06-24T20:54:12.000Z | xfel/merging/application/group/group_reflections.py | toastisme/cctbx_project | d1a25147b5958822b6923fb55260749ccf9350ff | [
"BSD-3-Clause-LBNL"
] | 1 | 2022-02-08T10:11:07.000Z | 2022-02-08T10:11:07.000Z | from __future__ import absolute_import, division, print_function
from six.moves import range
from xfel.merging.application.worker import worker
from dials.array_family import flex
from xfel.merging.application.reflection_table_utils import reflection_table_utils
from xfel.merging.application.utils.memory_usage import g... | 46.177215 | 181 | 0.737664 |
4a218d78584c634b95a0f5c0c240b144253344b3 | 44,060 | py | Python | Cython/Compiler/FlowControl.py | joonro/cython | 4ebc647c2fa54179d25335b2dcf5d845e7fc9a79 | [
"Apache-2.0"
] | null | null | null | Cython/Compiler/FlowControl.py | joonro/cython | 4ebc647c2fa54179d25335b2dcf5d845e7fc9a79 | [
"Apache-2.0"
] | null | null | null | Cython/Compiler/FlowControl.py | joonro/cython | 4ebc647c2fa54179d25335b2dcf5d845e7fc9a79 | [
"Apache-2.0"
] | null | null | null | import cython
cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object,
Builtin=object, InternalError=object,
error=object, warning=object,
py_object_type=object, unspecified_type=object,
object_expr=object, object_expr_not_none=object,
... | 34.341387 | 95 | 0.57542 |
4a218db033f4d8d09c09497bf4f9015a93e6eade | 23,970 | py | Python | bhive/snapshot.py | TheCrazyGM/bhive | 1494e90a99123ecfc5efbd927258f9ba59443e2e | [
"MIT"
] | 2 | 2020-03-21T23:50:22.000Z | 2020-03-25T19:10:48.000Z | bhive/snapshot.py | TheCrazyGM/bhive | 1494e90a99123ecfc5efbd927258f9ba59443e2e | [
"MIT"
] | null | null | null | bhive/snapshot.py | TheCrazyGM/bhive | 1494e90a99123ecfc5efbd927258f9ba59443e2e | [
"MIT"
] | 1 | 2020-03-21T23:50:25.000Z | 2020-03-21T23:50:25.000Z | # This Python file uses the following encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import bytes, int, str
import pytz
import json
import re
from datetime import datetime, timedelta, date... | 44.636872 | 147 | 0.570547 |
4a218f52365e29e103e58f6de516129bd07d1003 | 22,705 | py | Python | ninjalooter/tests/test_message_handlers.py | rm-you/ninjalooter | 026b0e732964d62721b84c7ae64d418bfe1e2975 | [
"MIT"
] | 4 | 2020-08-30T12:57:03.000Z | 2022-03-18T15:11:13.000Z | ninjalooter/tests/test_message_handlers.py | rm-you/ninjalooter | 026b0e732964d62721b84c7ae64d418bfe1e2975 | [
"MIT"
] | 5 | 2022-01-07T03:17:32.000Z | 2022-03-27T21:20:12.000Z | ninjalooter/tests/test_message_handlers.py | rm-you/ninjalooter | 026b0e732964d62721b84c7ae64d418bfe1e2975 | [
"MIT"
] | 1 | 2021-12-28T02:18:04.000Z | 2021-12-28T02:18:04.000Z | import datetime
from unittest import mock
from ninjalooter import config
from ninjalooter import message_handlers
from ninjalooter import models
from ninjalooter.tests import base
from ninjalooter import utils
class TestMessageHandlers(base.NLTestBase):
def setUp(self) -> None:
utils.setup_aho()
... | 45.961538 | 77 | 0.638494 |
4a218f71bddb25be1f6fd522cc639b8eae35c87b | 2,248 | py | Python | tests/integration/core/test_scanner.py | asn-d6/sbws | 6070d36022dc2130518dd0c68332166b2bf76c73 | [
"CC0-1.0"
] | null | null | null | tests/integration/core/test_scanner.py | asn-d6/sbws | 6070d36022dc2130518dd0c68332166b2bf76c73 | [
"CC0-1.0"
] | null | null | null | tests/integration/core/test_scanner.py | asn-d6/sbws | 6070d36022dc2130518dd0c68332166b2bf76c73 | [
"CC0-1.0"
] | null | null | null | import pytest
from sbws.core.scanner import measure_relay
from sbws.lib.resultdump import ResultSuccess
import logging
def assert_within(value, target, radius):
'''
Assert that **value** is within **radius** of **target**
If target is 10 and radius is 2, value can be anywhere between 8 and 12
inclus... | 36.852459 | 78 | 0.661477 |
4a21904bd7a36aef4740b93efcf503028694d5fc | 1,442 | py | Python | swagger_bundler/orphancheck.py | pilosus/swagger-bundler | 8826fe20f64d55a5616393098e36386b5122b1dc | [
"MIT"
] | 2 | 2019-11-11T08:52:18.000Z | 2021-04-06T09:59:38.000Z | swagger_bundler/orphancheck.py | pilosus/swagger-bundler | 8826fe20f64d55a5616393098e36386b5122b1dc | [
"MIT"
] | 18 | 2016-09-23T12:26:19.000Z | 2016-10-05T12:58:00.000Z | swagger_bundler/orphancheck.py | pilosus/swagger-bundler | 8826fe20f64d55a5616393098e36386b5122b1dc | [
"MIT"
] | 3 | 2019-11-11T08:52:08.000Z | 2021-07-13T19:59:40.000Z | # -*- coding:utf-8 -*-
import re
from . import highlight
def check_orphan_reference(ctx, data, exception_on_fail=False):
# TODO: remove prefixing_targets
prefixing_targets = ctx.options["prefixing_targets"]
refs = set()
orphans = []
rx = re.compile("^#/({})/(.+)".format("|".join(prefixing_targets... | 27.730769 | 108 | 0.579057 |
4a21915c4939828095d823444e57851845839569 | 5,420 | py | Python | keras_fake_news_detector/library/encoders/doc2vec.py | chen0040/keras-fake-news-generator-and-detector | fa9b7e22322c49a9258f3452f7556dfa179ffc93 | [
"MIT"
] | 20 | 2018-01-06T02:07:42.000Z | 2021-07-26T05:34:54.000Z | keras_fake_news_detector/library/encoders/doc2vec.py | chen0040/keras-fake-news-generator-and-detector | fa9b7e22322c49a9258f3452f7556dfa179ffc93 | [
"MIT"
] | 1 | 2020-01-03T15:31:34.000Z | 2020-01-03T15:31:34.000Z | keras_fake_news_detector/library/encoders/doc2vec.py | chen0040/keras-fake-news-generator-and-detector | fa9b7e22322c49a9258f3452f7556dfa179ffc93 | [
"MIT"
] | 7 | 2018-02-20T08:24:33.000Z | 2020-02-07T18:38:15.000Z | import numpy as np
from keras.models import Sequential
from keras.callbacks import ModelCheckpoint
from keras.layers import Bidirectional, RepeatVector
from keras.layers.recurrent import LSTM
from keras.preprocessing.sequence import pad_sequences
from keras_fake_news_detector.library.utility.glove_loader import GLOVE_E... | 36.621622 | 114 | 0.633395 |
4a21929f852763fc96bba32aecdd4d662df90212 | 1,936 | py | Python | recipes/migrations/0002_auto_20200608_1307.py | Panda4817/MySousChef | 64c3967566b3834d578406884ee6b4a3807b21f8 | [
"MIT"
] | 1 | 2021-02-25T17:54:28.000Z | 2021-02-25T17:54:28.000Z | recipes/migrations/0002_auto_20200608_1307.py | Panda4817/MySousChef | 64c3967566b3834d578406884ee6b4a3807b21f8 | [
"MIT"
] | null | null | null | recipes/migrations/0002_auto_20200608_1307.py | Panda4817/MySousChef | 64c3967566b3834d578406884ee6b4a3807b21f8 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-06-08 12:07
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MO... | 33.37931 | 114 | 0.588326 |
4a2192c53972ff8a87c0055bb7cc781b7dcf4c9d | 1,423 | py | Python | exercicio-04.py | 1philipe/atividade | 9bb67ef195336de23661f9d2f32706426a16fc3a | [
"MIT"
] | null | null | null | exercicio-04.py | 1philipe/atividade | 9bb67ef195336de23661f9d2f32706426a16fc3a | [
"MIT"
] | null | null | null | exercicio-04.py | 1philipe/atividade | 9bb67ef195336de23661f9d2f32706426a16fc3a | [
"MIT"
] | null | null | null | #encoding: utf-8
import numpy as np
import matplotlib.pyplot as plt; plt.rcdefaults()
#exercice 04
age=["0-4","5-9","10-14","15-19","20-24","25-29","30-34","35-39",\
"40-44","45-49","50-54","55-59","60-64","65-69","70-74","75-79",\
"80-84","85-89","90-94","95-99","100+"]
male_pop=np.array([7016987,7624144... | 36.487179 | 76 | 0.653549 |
4a2192c829490d9c8fc73ae07947cfa756a5ffb2 | 6,297 | py | Python | Lib/gds/burp/dispatchers.py | Raz0r/jython-burp-api | 0fdd8dd3968e356cb9d473c2499aae7a9cbfccdc | [
"0BSD"
] | 1 | 2017-06-03T19:59:41.000Z | 2017-06-03T19:59:41.000Z | Lib/gds/burp/dispatchers.py | Raz0r/jython-burp-api | 0fdd8dd3968e356cb9d473c2499aae7a9cbfccdc | [
"0BSD"
] | null | null | null | Lib/gds/burp/dispatchers.py | Raz0r/jython-burp-api | 0fdd8dd3968e356cb9d473c2499aae7a9cbfccdc | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
'''
gds.burp.dispatchers
~~~~~~~~~~~~~~~~~~~~
'''
from .api import INewScanIssueHandler, \
IIntruderRequestHandler, IIntruderResponseHandler, \
IProxyRequestHandler, IProxyResponseHandler, \
IRepeaterRequestHandler, IRepeaterResponseHandler, \
IScannerRequestHandler, IScannerRes... | 44.34507 | 80 | 0.688264 |
4a2193c1a0babb725bdc738f6f4e7ff811b1f58c | 5,538 | py | Python | sympy/multipledispatch/tests/test_dispatcher.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 15 | 2020-06-29T08:33:39.000Z | 2022-02-12T00:28:51.000Z | sympy/multipledispatch/tests/test_dispatcher.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 13 | 2020-03-24T17:53:51.000Z | 2022-02-10T20:01:14.000Z | sympy/multipledispatch/tests/test_dispatcher.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 11 | 2020-06-29T08:40:24.000Z | 2022-02-24T17:39:16.000Z | from sympy.multipledispatch.dispatcher import (Dispatcher, MDNotImplementedError,
MethodDispatcher, halt_ordering,
restart_ordering)
from sympy.utilities.pytest import raises, XFAIL, warns
def identity(x):
return x
def inc(x):
... | 20.435424 | 81 | 0.578909 |
4a21945736fdcb5570cf2bf874e72b8ef25afef1 | 3,184 | py | Python | nvtabular/ops/drop_low_cardinality.py | mikemckiernan/NVTabular | efb93340653c4a69b1c3a60c88a82116d7906148 | [
"Apache-2.0"
] | 124 | 2021-10-08T19:59:52.000Z | 2022-03-27T22:13:26.000Z | nvtabular/ops/drop_low_cardinality.py | NVIDIA-Merlin/NVTabular | 650f6923f0533dcfa18f6e181116ada706a41f6a | [
"Apache-2.0"
] | 325 | 2021-10-08T19:58:49.000Z | 2022-03-31T21:27:39.000Z | nvtabular/ops/drop_low_cardinality.py | mikemckiernan/NVTabular | efb93340653c4a69b1c3a60c88a82116d7906148 | [
"Apache-2.0"
] | 26 | 2021-10-13T21:43:22.000Z | 2022-03-29T14:33:58.000Z | #
# Copyright (c) 2021, NVIDIA 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 ... | 34.989011 | 92 | 0.670854 |
4a2194f152870e8579896cc5f51958edf696d1c2 | 8,254 | py | Python | diayn_seq_code_revised/main_revised_discrete_highdim_cheetah_vthree.py | fgitmichael/SelfSupevisedSkillDiscovery | 60eee11cfd67046190dd2784bf40e97bdbed9d40 | [
"MIT"
] | null | null | null | diayn_seq_code_revised/main_revised_discrete_highdim_cheetah_vthree.py | fgitmichael/SelfSupevisedSkillDiscovery | 60eee11cfd67046190dd2784bf40e97bdbed9d40 | [
"MIT"
] | 6 | 2021-02-02T23:00:02.000Z | 2022-01-13T03:13:51.000Z | diayn_seq_code_revised/main_revised_discrete_highdim_cheetah_vthree.py | fgitmichael/SelfSupevisedSkillDiscovery | 60eee11cfd67046190dd2784bf40e97bdbed9d40 | [
"MIT"
] | null | null | null | import argparse
import torch
import numpy as np
import copy
import gym
from gym.envs.mujoco.half_cheetah_v3 import HalfCheetahEnv as HalfCheetahVersionThreeEnv
from my_utils.env_pixel_wrapper.mujoco_pixel_wrapper import MujocoPixelWrapper
import rlkit.torch.pytorch_util as ptu
from rlkit.launchers.launcher_util import... | 32.884462 | 89 | 0.697117 |
4a21950af33caf28d45dba92c35bfe1e3ded37b8 | 6,310 | py | Python | isi_sdk_8_0_1/isi_sdk_8_0_1/models/result_histogram.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0_1/isi_sdk_8_0_1/models/result_histogram.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0_1/isi_sdk_8_0_1/models/result_histogram.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 4
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_0_1.models.result_... | 30.780488 | 112 | 0.61046 |
4a21953cf4445d32913c537a706588e8bb5ba9ad | 32,225 | py | Python | __main__.py | labscript-suite-temp-archive/blacs-fork--zachglassman-blacs--forked-from--labscript_suite-blacs | 29ae7f966886017fadab02ac217f266175a4ad84 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | __main__.py | labscript-suite-temp-archive/blacs-fork--zachglassman-blacs--forked-from--labscript_suite-blacs | 29ae7f966886017fadab02ac217f266175a4ad84 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | __main__.py | labscript-suite-temp-archive/blacs-fork--zachglassman-blacs--forked-from--labscript_suite-blacs | 29ae7f966886017fadab02ac217f266175a4ad84 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | #####################################################################
# #
# /main.pyw #
# #
# Copyright 2013, Monash University ... | 45.259831 | 262 | 0.596804 |
4a219694d10ef075e0e0403cdd7ed100c39ddadd | 3,572 | py | Python | tensorflow/examples/learn/iris_custom_decay_dnn.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/examples/learn/iris_custom_decay_dnn.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/examples/learn/iris_custom_decay_dnn.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 35.366337 | 78 | 0.741321 |
4a2196badde628b2896ca6517ff948febe685f69 | 668 | py | Python | server/manage.py | Dylane-JC/agfzb-CloudAppDevelopment_Capstone | 17ad58a3849ba703eec7f56378ac5d462cf2aac0 | [
"Apache-2.0"
] | null | null | null | server/manage.py | Dylane-JC/agfzb-CloudAppDevelopment_Capstone | 17ad58a3849ba703eec7f56378ac5d462cf2aac0 | [
"Apache-2.0"
] | null | null | null | server/manage.py | Dylane-JC/agfzb-CloudAppDevelopment_Capstone | 17ad58a3849ba703eec7f56378ac5d462cf2aac0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangobackend.settings')
try:
from django.core.management import execute_from_command_line
except... | 30.363636 | 77 | 0.682635 |
4a2196ca930752bd4e9767d859e791f8b5cb3cd6 | 16,040 | py | Python | train.py | tyjiang1997/NonLocalProp_MVD | 5cf5a5b422fd20e710429363447dc36a90f12b18 | [
"MIT"
] | 1 | 2022-03-25T12:27:59.000Z | 2022-03-25T12:27:59.000Z | train.py | tyjiang1997/NonLocalProp_MVD | 5cf5a5b422fd20e710429363447dc36a90f12b18 | [
"MIT"
] | null | null | null | train.py | tyjiang1997/NonLocalProp_MVD | 5cf5a5b422fd20e710429363447dc36a90f12b18 | [
"MIT"
] | null | null | null | import imp
import os
from re import I
import time
import csv
import numpy as np
from path import Path
import argparse
import matplotlib.pyplot as plt
from tensorboardX import SummaryWriter
import cv2
import torch
import torch.nn.functional as F
from core.dataset import custom_transforms
from core.networks... | 46.091954 | 227 | 0.621945 |
4a2198b36b78dda5b37c783439a7bf44c92060cc | 33,549 | py | Python | qa/rpc-tests/fundrawtransaction.py | zalcchain/zalcchain | 3f104cc3d8e3f0c2cd325348cbf408bb2612f2b8 | [
"MIT"
] | null | null | null | qa/rpc-tests/fundrawtransaction.py | zalcchain/zalcchain | 3f104cc3d8e3f0c2cd325348cbf408bb2612f2b8 | [
"MIT"
] | null | null | null | qa/rpc-tests/fundrawtransaction.py | zalcchain/zalcchain | 3f104cc3d8e3f0c2cd325348cbf408bb2612f2b8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-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.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
def ge... | 43.683594 | 223 | 0.568333 |
4a2198cd0aff96d7f407be336846cb72853bb815 | 632 | py | Python | backend/manage.py | crowdbotics-apps/todemp-31857 | 99d31d4b7c9876a3abc2a43d43e68b629df9b681 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/todemp-31857 | 99d31d4b7c9876a3abc2a43d43e68b629df9b681 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/todemp-31857 | 99d31d4b7c9876a3abc2a43d43e68b629df9b681 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todemp_31857.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise I... | 28.727273 | 76 | 0.685127 |
4a2199f09170bec48ea87fc53cd6380aaee304f0 | 7,280 | py | Python | zoom/_assets/standard_apps/admin/groups.py | zodman/ZoomFoundry | 87a69f519a2ab6b63aeec0a564ce41259e64f88d | [
"MIT"
] | 8 | 2017-04-10T09:53:15.000Z | 2020-08-16T09:53:14.000Z | zoom/_assets/standard_apps/admin/groups.py | zodman/ZoomFoundry | 87a69f519a2ab6b63aeec0a564ce41259e64f88d | [
"MIT"
] | 49 | 2017-04-13T22:51:48.000Z | 2019-08-15T22:53:25.000Z | zoom/_assets/standard_apps/admin/groups.py | zodman/ZoomFoundry | 87a69f519a2ab6b63aeec0a564ce41259e64f88d | [
"MIT"
] | 12 | 2017-04-11T04:16:47.000Z | 2019-08-10T21:41:54.000Z | """
system users
"""
import zoom
from zoom.collect import CollectionController, RawSearch
from zoom.models import Group, Groups
from zoom.tools import ensure_listy, is_listy
import zoom.validators as v
import zoom.fields as f
import model
no_app_groups = v.Validator(
'group names cannot start with a_',
... | 27.680608 | 124 | 0.567033 |
4a219a00cf4c316a48d4aa57099a403f5c590d0d | 6,425 | py | Python | video.py | wangpengcheng/consistent_depth | b370309fc16cb9c940a68688f9579230f1af728d | [
"MIT"
] | null | null | null | video.py | wangpengcheng/consistent_depth | b370309fc16cb9c940a68688f9579230f1af728d | [
"MIT"
] | null | null | null | video.py | wangpengcheng/consistent_depth | b370309fc16cb9c940a68688f9579230f1af728d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
import cv2
import logging
import os
from os.path import join as pjoin
import sys
import tempfile
from utils import (frame_sampling, image_io)
from utils.helpers import mkdir_ifnotexists
#
ffmpeg = "ffmpeg"
ffprobe = "ffprobe"
# 查找相似的图片帧
def s... | 33.118557 | 86 | 0.561556 |
4a219b7526f68ce078399ab84b1c4ba9465800fd | 1,001 | py | Python | controllers/door_test/door_test.py | SDP-Team10/Railly-Clean | f2960d995d9440ecfde6c04f67635f81977c140b | [
"MIT"
] | null | null | null | controllers/door_test/door_test.py | SDP-Team10/Railly-Clean | f2960d995d9440ecfde6c04f67635f81977c140b | [
"MIT"
] | 14 | 2021-01-24T11:52:26.000Z | 2021-04-02T06:59:59.000Z | controllers/door_test/door_test.py | SDP-Team10/Railly-Clean | f2960d995d9440ecfde6c04f67635f81977c140b | [
"MIT"
] | null | null | null | """door_test controller."""
# You may need to import some classes of the controller module. Ex:
# from controller import Robot, Motor, DistanceSensor
from controller import Robot
# create the Robot instance.
robot = Robot()
# get the time step of the current world.
timestep = int(robot.getBasicTimeStep())
door_motor... | 28.6 | 68 | 0.721279 |
4a219bab21bda7ef6a928b56581c8f897c59d688 | 17,183 | py | Python | src/GraphicsView.py | chiefenne/PyAero-Qt-for-Python- | d9a8057afc97b6e78f72528cb97fc7ac27480823 | [
"MIT"
] | 74 | 2017-05-30T13:08:36.000Z | 2022-03-21T04:19:56.000Z | src/GraphicsView.py | chiefenne/PyAero-Qt-for-Python- | d9a8057afc97b6e78f72528cb97fc7ac27480823 | [
"MIT"
] | 9 | 2019-09-15T07:05:10.000Z | 2022-02-07T18:03:38.000Z | src/GraphicsView.py | chiefenne/PyAero-Qt-for-Python- | d9a8057afc97b6e78f72528cb97fc7ac27480823 | [
"MIT"
] | 16 | 2017-01-13T18:01:26.000Z | 2022-03-19T15:23:42.000Z | import os
import math
from PySide6 import QtGui, QtCore, QtWidgets
from Settings import ZOOMANCHOR, SCALEINC, MINZOOM, MAXZOOM, \
MARKERSIZE, RUBBERBANDSIZE, VIEWSTYLE
# put constraints on rubberband zoom (relative rectangle wdith)
RUBBERBANDSIZE = min(RUBBERBANDSIZE, 1.0)
RUBBERBANDS... | 37.112311 | 83 | 0.593144 |
4a219bde445d659598f3771eadc92e36811cb495 | 1,668 | py | Python | src/main/python/systemds/operator/algorithm/builtin/slicefinder.py | dkerschbaumer/systemds | dc3a9f489951d7e13ec47c5181d2c5d7022665ce | [
"Apache-2.0"
] | null | null | null | src/main/python/systemds/operator/algorithm/builtin/slicefinder.py | dkerschbaumer/systemds | dc3a9f489951d7e13ec47c5181d2c5d7022665ce | [
"Apache-2.0"
] | null | null | null | src/main/python/systemds/operator/algorithm/builtin/slicefinder.py | dkerschbaumer/systemds | dc3a9f489951d7e13ec47c5181d2c5d7022665ce | [
"Apache-2.0"
] | null | null | null | # -------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you unde... | 40.682927 | 207 | 0.71283 |
4a219c378a0fcd70eec28698e71e215985efde95 | 1,455 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/verified_track_content/migrations/0003_migrateverifiedtrackcohortssetting.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from opaque_keys.edx.django.models import CourseKeyField
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('verified_track_c... | 51.964286 | 178 | 0.697595 |
4a219ca1689a5e85f0d729bc2eec8dbc334ba6ce | 8,764 | bzl | Python | apple/ios.bzl | michaeleisel/rules_apple | 424c73847eba4d2a093fa59df1aa22b5629b0fda | [
"Apache-2.0"
] | null | null | null | apple/ios.bzl | michaeleisel/rules_apple | 424c73847eba4d2a093fa59df1aa22b5629b0fda | [
"Apache-2.0"
] | null | null | null | apple/ios.bzl | michaeleisel/rules_apple | 424c73847eba4d2a093fa59df1aa22b5629b0fda | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Bazel 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 applicable la... | 32.82397 | 98 | 0.691693 |
4a219d13e02f7398dd19c708f05cb8c4625f8da7 | 821 | py | Python | userbot/modules/stickerjason.py | TAMILVIP007/javes-3.0 | d9238785fa2d79740bbb526aca92455dbccb3838 | [
"MIT"
] | null | null | null | userbot/modules/stickerjason.py | TAMILVIP007/javes-3.0 | d9238785fa2d79740bbb526aca92455dbccb3838 | [
"MIT"
] | null | null | null | userbot/modules/stickerjason.py | TAMILVIP007/javes-3.0 | d9238785fa2d79740bbb526aca92455dbccb3838 | [
"MIT"
] | null | null | null | #by Sh1vam
#Kangers stay away
import os
from userbot import bot as javes
import subprocess, os , asyncio, shutil
from userbot.utils import admin_cmd
@javes.on(admin_cmd("tgsjson"))
async def messup(message):
await message.edit("`jsoning....`")
reply = await message.get_reply_message()
stkr = await reply.down... | 26.483871 | 152 | 0.73447 |
4a219f515dfe3869fe68ba4ae7bcab618674a717 | 1,144 | py | Python | tps/problems/migrations/0006_validatorresult.py | akmohtashami/tps-web | 9dab3ffe97c21f658be30ce2f2711dd93e4ba60f | [
"MIT"
] | 5 | 2019-02-26T06:10:43.000Z | 2021-07-24T17:11:45.000Z | tps/problems/migrations/0006_validatorresult.py | akmohtashami/tps-web | 9dab3ffe97c21f658be30ce2f2711dd93e4ba60f | [
"MIT"
] | 3 | 2019-08-15T13:56:03.000Z | 2021-06-10T18:43:16.000Z | tps/problems/migrations/0006_validatorresult.py | jonathanirvings/tps-web | 46519347d4fc8bdced9b5bceb6cdee5ea4e508f2 | [
"MIT"
] | 2 | 2018-12-28T13:12:59.000Z | 2020-12-25T18:42:13.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-06 09:31
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('problems', '0005_auto_20160731_2252'),
]
operations... | 36.903226 | 145 | 0.618007 |
4a219f57ad3e68e7bba3e79b05f77bd20163ac6f | 68 | py | Python | run-tests.py | mhorod/checker | acc807ba9697914b22d897c2a9e485d48f114218 | [
"MIT"
] | 1 | 2020-11-12T11:37:34.000Z | 2020-11-12T11:37:34.000Z | run-tests.py | mhorod/checker | acc807ba9697914b22d897c2a9e485d48f114218 | [
"MIT"
] | null | null | null | run-tests.py | mhorod/checker | acc807ba9697914b22d897c2a9e485d48f114218 | [
"MIT"
] | null | null | null | # pylint: disable-all
from simple_checker import run
run.from_cli()
| 17 | 30 | 0.794118 |
4a219f5e292d46e9106454b84830a41361b122fa | 6,041 | py | Python | tensorflow/python/compat/compat.py | guodongxiaren/tensorflow | 9768822159624e54ade255b55b8e6a6c7ec5a962 | [
"Apache-2.0"
] | 1 | 2022-03-29T23:09:34.000Z | 2022-03-29T23:09:34.000Z | tensorflow/python/compat/compat.py | saibaldas/tensorflow | 6a67b522214d50fceff0140b968fc200f4123324 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/compat/compat.py | saibaldas/tensorflow | 6a67b522214d50fceff0140b968fc200f4123324 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.745562 | 82 | 0.74342 |
4a219ff139a2416bde15553947549da7a8796ba1 | 12,959 | py | Python | atomic_reactor/plugins/pre_add_labels_in_df.py | tveverka-RH/atomic-reactor | e3fca7dd435250cb06565f19c8758a908f7f3c62 | [
"BSD-3-Clause"
] | null | null | null | atomic_reactor/plugins/pre_add_labels_in_df.py | tveverka-RH/atomic-reactor | e3fca7dd435250cb06565f19c8758a908f7f3c62 | [
"BSD-3-Clause"
] | 17 | 2021-12-06T09:37:07.000Z | 2022-03-25T13:12:35.000Z | atomic_reactor/plugins/pre_add_labels_in_df.py | lkolacek/atomic-reactor | 11ffc82e51d7c95c8770a9d0cb53f2430f141a92 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
Pre build plugin which adds labels to dockerfile. Labels have to be specified either
as a dict:
{
"name": "add_labels_in_dockerfile",
"... | 39.629969 | 98 | 0.612084 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.