hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2da7107f61adaf7b1d4ff36bd09071a9cd20e12c | 4,031 | py | Python | tensorflow/python/kernel_tests/summary_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/python/kernel_tests/summary_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/kernel_tests/summary_ops_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2015 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.672566 | 80 | 0.656909 |
2da714cd498a2d784d035e3564470b50ab36f1d9 | 7,413 | py | Python | soapi/nsr.py | 5g-media/mape-executor | bac6509acbb98c15c9295b5da67435a8528cccd8 | [
"Apache-2.0"
] | null | null | null | soapi/nsr.py | 5g-media/mape-executor | bac6509acbb98c15c9295b5da67435a8528cccd8 | [
"Apache-2.0"
] | 2 | 2020-04-14T20:22:38.000Z | 2020-04-14T20:22:39.000Z | soapi/nsr.py | 5g-media/mape-executor | bac6509acbb98c15c9295b5da67435a8528cccd8 | [
"Apache-2.0"
] | null | null | null | import json
import uuid
import logging.config
from settings import OSM_COMPONENTS, LOGGING
from httpclient.client import Client
logging.config.dictConfig(LOGGING)
logger = logging.getLogger(__name__)
class Nsr(object):
"""Description of Nsr class"""
def __init__(self, token):
"""Constructor of Nsr c... | 45.478528 | 793 | 0.588696 |
2da73ddfbf7a5b244af63831bdd737f71a1f877e | 1,889 | py | Python | jsontest/jsontestValidatePOST02.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | jsontest/jsontestValidatePOST02.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | jsontest/jsontestValidatePOST02.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import requests
# define the URL we want to use
TIMEURL = "http://date.jsontest.com"
IPURL = "http://ip.jsontest.com"
VALIDURL = "http://validate.jsontest.com/"
def main():
## PART A
## pull a time object from date.jsontest.com
# make the request
resp = requests.get(TIMEURL)
# ... | 27.779412 | 71 | 0.635786 |
2da74bccac24812e6aeb2b33022da8759c51e62b | 13,219 | py | Python | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/dis_calculator_old.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 13 | 2021-10-15T15:14:45.000Z | 2022-03-09T00:22:55.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/dis_calculator_old.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 4 | 2021-10-17T09:04:20.000Z | 2022-03-25T06:43:00.000Z | datasets/mmdet_tusimple/mmdet/core/bbox/iou_calculators/dis_calculator_old.py | Jinming-Su/SGNet | fcf35edaf332c1a4e2713acad5a0fc0e21509c3e | [
"MIT"
] | 2 | 2021-11-17T11:31:35.000Z | 2021-11-29T06:50:35.000Z | import torch
import numpy as np
from .builder import IOU_CALCULATORS
#from mmdet.ops import bbox_dis
@IOU_CALCULATORS.register_module()
class Dis(object):
"""line S Calculator."""
def __call__(self, bboxes1, bboxes2, pad_shape, mode='iou', is_aligned=False):
"""Calculate IoU between 2D bboxes.
... | 39.109467 | 136 | 0.539526 |
2da753798fe89cb7d98c72c203972d3f4539dde1 | 45,667 | py | Python | Stock/Trade/Strategy/DyStockCtaEngine.py | MicroEngine/DevilYuan | e7f8ec10ec2f30c72ce23bdc4dc084b07f7ec1c6 | [
"MIT"
] | 135 | 2020-10-23T01:15:39.000Z | 2022-03-29T08:39:15.000Z | Stock/Trade/Strategy/DyStockCtaEngine.py | bg4xsd/DevilYuan | e7f8ec10ec2f30c72ce23bdc4dc084b07f7ec1c6 | [
"MIT"
] | null | null | null | Stock/Trade/Strategy/DyStockCtaEngine.py | bg4xsd/DevilYuan | e7f8ec10ec2f30c72ce23bdc4dc084b07f7ec1c6 | [
"MIT"
] | 64 | 2020-10-23T01:15:49.000Z | 2022-03-20T10:15:59.000Z | from datetime import *
from time import sleep
from collections import OrderedDict
from DyCommon.DyCommon import *
from ...Common.DyStockCommon import *
from EventEngine.DyEvent import *
from ..DyStockTradeCommon import *
from ...Data.Engine.DyStockDataEngine import *
from ..DyStockStrategyBase import *
from .DyStockCt... | 33.309263 | 165 | 0.591127 |
2da76391e783319a680ed62e3f24dde1f807894d | 7,211 | py | Python | sdks/python/appcenter_sdk/models/Thread.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/Thread.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/Thread.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class Thread(object)... | 27.211321 | 122 | 0.563445 |
2da78267e0848fb95484aab77df60caed2916072 | 3,038 | py | Python | oscar/lib/python2.7/site-packages/dns/rdtypes/ANY/TLSA.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dns/rdtypes/ANY/TLSA.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dns/rdtypes/ANY/TLSA.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2005-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PRO... | 36.60241 | 76 | 0.607307 |
2da7892c1f84dfe849ca414d64a83fc3985726a3 | 2,106 | py | Python | tests/conftest.py | LambArchie/Competition-Manager | 7da4c8625f0bd0c1b002b4f2aef72529e1ede4c6 | [
"MIT"
] | null | null | null | tests/conftest.py | LambArchie/Competition-Manager | 7da4c8625f0bd0c1b002b4f2aef72529e1ede4c6 | [
"MIT"
] | 1 | 2021-06-14T14:48:06.000Z | 2021-06-14T15:42:40.000Z | tests/conftest.py | LambArchie/Competition-Manager | 7da4c8625f0bd0c1b002b4f2aef72529e1ede4c6 | [
"MIT"
] | null | null | null | """
Sets up features the rest of the tests use
"""
from os import path as osPath
from sys import path as sysPath
import pytest
myPath = osPath.dirname(osPath.abspath(__file__))
sysPath.insert(0, myPath + '/../')
from app import create_app, db
from app.database.models import User
class TestConfig():
"""Test Config ... | 30.521739 | 114 | 0.682336 |
2da7a6a366a167ffe0c093ae1f4dcafb438aca8e | 1,891 | py | Python | src/classifier/genre_mapper.py | mirceadino/music-genre-classifier | bd8d5d2b0c787dda2dcc7d41b19a53763fbdf451 | [
"MIT"
] | null | null | null | src/classifier/genre_mapper.py | mirceadino/music-genre-classifier | bd8d5d2b0c787dda2dcc7d41b19a53763fbdf451 | [
"MIT"
] | 11 | 2020-03-24T15:47:23.000Z | 2022-03-11T23:21:34.000Z | src/classifier/genre_mapper.py | mirceadino/music-genre-classifier | bd8d5d2b0c787dda2dcc7d41b19a53763fbdf451 | [
"MIT"
] | null | null | null | class GenreMapper:
"""Converts the genre between its string form (genre), vector form (y),
and index form (label). Genres are sorted.
Example:
Consider three genres: electro, latino, rock.
"electro" has y [1, 0, 0] and label 0.
"latino" has y [0, 1, 0] and label 1.
"rock" ha... | 28.223881 | 75 | 0.592808 |
2da7c8de0cc99047836a612690129fbebc8142a1 | 3,873 | py | Python | py/0160.intersection-of-two-linked-lists.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0160.intersection-of-two-linked-lists.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0160.intersection-of-two-linked-lists.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=160 lang=python3
#
# [160] Intersection of Two Linked Lists
#
# https://leetcode.com/problems/intersection-of-two-linked-lists/description/
#
# algorithms
# Easy (45.51%)
# Likes: 5892
# Dislikes: 659
# Total Accepted: 691.2K
# Total Submissions: 1.5M
# Testcase Example: '8\n[4,1,8,4,5]\n... | 27.468085 | 82 | 0.606248 |
2da7e0d4ed1bf56c7522c09019584b33932e9f10 | 8,067 | py | Python | tests/unit/Containers.py | zeebonk/platform-engine | c82feecad7a7e3786ed69e02bbeef712182a27ae | [
"Apache-2.0"
] | null | null | null | tests/unit/Containers.py | zeebonk/platform-engine | c82feecad7a7e3786ed69e02bbeef712182a27ae | [
"Apache-2.0"
] | null | null | null | tests/unit/Containers.py | zeebonk/platform-engine | c82feecad7a7e3786ed69e02bbeef712182a27ae | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import hashlib
from unittest.mock import MagicMock
from asyncy.Containers import Containers
from asyncy.Exceptions import ContainerSpecNotRegisteredError, K8sError
from asyncy.Kubernetes import Kubernetes
from asyncy.constants.LineConstants import LineConstants
from asyncy.constants.ServiceCons... | 31.759843 | 79 | 0.641378 |
2da7f74e6c474f7a8f02ec0fe0e46e89f3058995 | 993 | py | Python | community_profiles/datasets/commercialcorridors.py | nickhand/community-profiles | 8b05e8be5448fd6e75c1c7757592d319ccc6ce13 | [
"MIT"
] | null | null | null | community_profiles/datasets/commercialcorridors.py | nickhand/community-profiles | 8b05e8be5448fd6e75c1c7757592d319ccc6ce13 | [
"MIT"
] | 3 | 2019-09-25T18:34:29.000Z | 2019-12-30T19:01:53.000Z | community_profiles/datasets/commercialcorridors.py | nickhand/community-profiles | 8b05e8be5448fd6e75c1c7757592d319ccc6ce13 | [
"MIT"
] | 2 | 2019-09-23T14:13:22.000Z | 2019-09-23T19:27:10.000Z | import esri2gpd
from . import EPSG
from .core import *
from .regions import *
__all__ = ["CommercialCorridors"]
class CommercialCorridors(Dataset):
"""
Commercial corridors, centers, districts, and projects that provide
consumer-oriented goods and services, including retail, food and beverage,
and pe... | 26.131579 | 118 | 0.664653 |
2da7fd0506234e3fcead91a6f5268907bd4cfd54 | 314 | py | Python | src/misc.py | EricSekyere/gtools | 781878c9bbc6f3698ae20cdca3b6a4a0b92502e7 | [
"MIT"
] | null | null | null | src/misc.py | EricSekyere/gtools | 781878c9bbc6f3698ae20cdca3b6a4a0b92502e7 | [
"MIT"
] | 3 | 2020-03-24T16:23:15.000Z | 2021-02-02T21:53:53.000Z | src/misc.py | EricSekyere/gentool | 781878c9bbc6f3698ae20cdca3b6a4a0b92502e7 | [
"MIT"
] | null | null | null |
def log_num(lower_limit, upper_limit=0):
try:
low = int(lower_limit)
if(upper_limit):
high = int(upper_limit)
for i in range(low, high+1):
print(i)
else:
for i in range(low+1):
print(i)
except:
return None
| 22.428571 | 40 | 0.477707 |
2da8137541c8580fcf59a78600d5e85421395b25 | 14,492 | py | Python | scvelo/tools/pymc/DynamicalModel_V7.py | AlexanderAivazidis/scvelo | b59e42aaa7206c59dab6f1ffcc6d373cc4a03ae6 | [
"BSD-3-Clause"
] | null | null | null | scvelo/tools/pymc/DynamicalModel_V7.py | AlexanderAivazidis/scvelo | b59e42aaa7206c59dab6f1ffcc6d373cc4a03ae6 | [
"BSD-3-Clause"
] | null | null | null | scvelo/tools/pymc/DynamicalModel_V7.py | AlexanderAivazidis/scvelo | b59e42aaa7206c59dab6f1ffcc6d373cc4a03ae6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import theano.tensor as tt
import pymc3 as pm
import theano
import matplotlib.pyplot as plt
import matplotlib
import os
import dill as pickle
# import sys
from scvelo.tools.pymc.pymc3_model import Pymc3Model
from pymc3.math import logsumexp
from pymc3.distributions.dist_math... | 53.476015 | 250 | 0.627657 |
2da87d76c561445a53eb42fdd4847aa05b5d5cfa | 4,618 | py | Python | alipay/aop/api/domain/AllocDetailDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AllocDetailDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AllocDetailDTO.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AllocDetailDTO(object):
def __init__(self):
self._account_id = None
self._alloc_amount = None
self._alloc_error_code = None
self._alloc_error_msg = None
se... | 31.630137 | 83 | 0.606323 |
2da8832c79401b96320b733c49d9875212d22ca8 | 7,016 | py | Python | font_tools/bdf.py | r0the/monogfx-arduino | 049b14fa601800645562b78ff6f3eddf23d51429 | [
"BSD-3-Clause"
] | null | null | null | font_tools/bdf.py | r0the/monogfx-arduino | 049b14fa601800645562b78ff6f3eddf23d51429 | [
"BSD-3-Clause"
] | null | null | null | font_tools/bdf.py | r0the/monogfx-arduino | 049b14fa601800645562b78ff6f3eddf23d51429 | [
"BSD-3-Clause"
] | null | null | null | class BoundingBox:
"""
Represents a bounding box of a glyph.
"""
def __init__(self):
self._left = 0
self._bottom = 0
self._width = 0
self._height = 0
return
def bottom(self) -> int:
"""
Returns the y coordinate of the bottom border of the bou... | 23.945392 | 98 | 0.529647 |
2da8968b14fc3a96ff45fbae0840d1b3893b1f73 | 1,034 | py | Python | varnish/datadog_checks/varnish/config_models/defaults.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | 1 | 2021-06-06T23:49:17.000Z | 2021-06-06T23:49:17.000Z | varnish/datadog_checks/varnish/config_models/defaults.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | null | null | null | varnish/datadog_checks/varnish/config_models/defaults.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.base.utils.models.fields import get_default_field_value
def shared_service(field, value):
return get_default_field_value(field, value)
def instance_daemon_host(field, value):
... | 21.102041 | 75 | 0.772727 |
2da8a6a92d5c529325a0f512928d13190ceec732 | 4,003 | py | Python | alipay/aop/api/request/AlipayUserDtbankBanktradeinfoQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayUserDtbankBanktradeinfoQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayUserDtbankBanktradeinfoQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayUserDtbankBanktradeinfoQueryModel import AlipayUserDtbankBanktradeinfoQueryModel
class AlipayUserDtbankBanktradeinfoQueryReque... | 27.606897 | 148 | 0.647514 |
2da8af14d99e062b237de5f95ce94d228ade08fe | 15,609 | py | Python | mengenali/registration.py | SamTheisens/kawalc1 | c0189c04d130680e51ca4396794c735bd51cf258 | [
"MIT"
] | 14 | 2019-04-07T08:04:15.000Z | 2019-11-03T08:27:51.000Z | mengenali/registration.py | kawalc1/kawalc1 | 6963f7f3f93e7ab897dfcda265c9dd3b12433f18 | [
"MIT"
] | 22 | 2019-03-25T05:27:12.000Z | 2020-08-17T22:13:19.000Z | mengenali/registration.py | kawalc1/kawalc1 | 6963f7f3f93e7ab897dfcda265c9dd3b12433f18 | [
"MIT"
] | 1 | 2019-04-07T16:18:33.000Z | 2019-04-07T16:18:33.000Z | import pickle
from os import path
import numpy as np
import cv2
import os
import datetime
import math
import json
import logging
from os.path import join
from kawalc1 import settings
from mengenali.io import write_image, read_image, image_url, is_url
logging.basicConfig(level=logging.DEBUG)
def print_result(result... | 40.648438 | 119 | 0.654046 |
2da8e45fe2c90255e6747351473cfda6c1b8e6d0 | 621 | py | Python | tests/test_mantle/arith/mothball/fa.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 14 | 2017-10-08T09:16:10.000Z | 2021-11-27T19:12:24.000Z | tests/test_mantle/arith/mothball/fa.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 7 | 2018-04-12T21:33:49.000Z | 2018-08-21T22:14:20.000Z | tests/test_mantle/arith/mothball/fa.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 3 | 2018-07-24T04:55:02.000Z | 2019-12-30T08:12:39.000Z | from magma import wire, compile, EndCircuit
from loam.boards.icestick import IceStick, FullAdder
icestick = IceStick()
icestick.J1[0].rename('A0').input().on()
icestick.J1[1].rename('A1').input().on()
icestick.J1[2].rename('B0').input().on()
icestick.J1[3].rename('B1').input().on()
icestick.D1.on()
icestick.D2.on()
ic... | 19.40625 | 52 | 0.68438 |
2da8eedc14906dbd59e0687bd896656f50dfa9ab | 2,007 | py | Python | qubole_assembly/python_scripts/airflow_idle_time_check.py | harishjami1382/test2 | f778cc7290904a84bed06f65fa5dbb49a63639f0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | qubole_assembly/python_scripts/airflow_idle_time_check.py | harishjami1382/test2 | f778cc7290904a84bed06f65fa5dbb49a63639f0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | qubole_assembly/python_scripts/airflow_idle_time_check.py | harishjami1382/test2 | f778cc7290904a84bed06f65fa5dbb49a63639f0 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | import MySQLdb
import datetime
import sys
from qubole_assembly.send_email import notify
import configparser
import os
if len(sys.argv) < 2:
print("Insufficient arguments. Bailing out")
sys.exit(1)
def parse_connection_string(connection_string):
connection_string_without_protocol = connection_string.split(... | 41.8125 | 162 | 0.697559 |
2da8f38e18a61fb4ed3cadf34acc6d2df21464d9 | 582 | py | Python | bonneville/returners/syslog_return.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 1 | 2016-03-13T09:05:15.000Z | 2016-03-13T09:05:15.000Z | salt/returners/syslog_return.py | moniker-dns/salt | 0e1cd880dc7831b9f937a213dd90cc32e2a09884 | [
"Apache-2.0"
] | null | null | null | salt/returners/syslog_return.py | moniker-dns/salt | 0e1cd880dc7831b9f937a213dd90cc32e2a09884 | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Return data to the host operating system's syslog facility
Required python modules: syslog, json
The syslog returner simply reuses the operating system's syslog
facility to log return data
'''
# Import python libs
import json
try:
import syslog
HAS_SYSLOG = True
except ImportError... | 18.774194 | 78 | 0.689003 |
2da90630b49fdeb6d88b4d8403ce191de6d832d7 | 11,045 | py | Python | tests/test_api_users.py | MontrealCorpusTools/iscan-server | 1ba1fba87a9e2a1a3b29b6df1c485a45535ea071 | [
"MIT"
] | 5 | 2018-12-27T10:52:56.000Z | 2021-04-26T07:13:52.000Z | tests/test_api_users.py | MontrealCorpusTools/polyglot-server | 1ba1fba87a9e2a1a3b29b6df1c485a45535ea071 | [
"MIT"
] | 128 | 2018-06-18T17:20:25.000Z | 2018-10-11T21:32:44.000Z | tests/test_api_users.py | MontrealCorpusTools/ISCAN | 1ba1fba87a9e2a1a3b29b6df1c485a45535ea071 | [
"MIT"
] | null | null | null | from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase, APILiveServerTestCase
from iscan.models import Database, Profile, CorpusPermissions, Corpus
from iscan.api import DatabaseViewSet
from rest_framework.test import APIClient, APIRequestFactory
from django.test i... | 46.020833 | 111 | 0.632956 |
2da914af4d2a3be0e8061b42bef5c01c6ba6363a | 770 | py | Python | tests/test_rates.py | skevni/pycbrf | ad068241b601979775c64dff2f1d21fea93e068a | [
"BSD-3-Clause"
] | null | null | null | tests/test_rates.py | skevni/pycbrf | ad068241b601979775c64dff2f1d21fea93e068a | [
"BSD-3-Clause"
] | null | null | null | tests/test_rates.py | skevni/pycbrf | ad068241b601979775c64dff2f1d21fea93e068a | [
"BSD-3-Clause"
] | null | null | null | from pycbrf import ExchangeRates
def test_rates():
rates = ExchangeRates('2016-06-26', locale_en=True)
assert str(rates.date_requested) == '2016-06-26 00:00:00'
assert str(rates.date_received) == '2016-06-25 00:00:00'
assert not rates.dates_match
assert rates['dummy'] is None
assert rates['... | 29.615385 | 61 | 0.658442 |
2da92bb8d963a37754b67f1d2e0a9d6f9753dbb2 | 957 | py | Python | tests/ctoi_chap1/ex_08.py | tvatter/dsa | e5ae217e38441d90914a55103e23d86f5821dc2f | [
"MIT"
] | null | null | null | tests/ctoi_chap1/ex_08.py | tvatter/dsa | e5ae217e38441d90914a55103e23d86f5821dc2f | [
"MIT"
] | null | null | null | tests/ctoi_chap1/ex_08.py | tvatter/dsa | e5ae217e38441d90914a55103e23d86f5821dc2f | [
"MIT"
] | null | null | null | from typing import List
Vector = List[float]
Matrix = List[Vector]
def zero_matrix(mat: Matrix) -> None:
m = len(mat)
n = len(mat[0])
zero_row = [False for _ in range(m)]
zero_col = [False for _ in range(n)]
for i in range(m):
for j in range(n):
if mat[i][j] == 0:
zero_row[i] = True
... | 17.722222 | 57 | 0.592476 |
2da9338646d8ff35ec0e2d83524f755ab695c662 | 329 | py | Python | tweets/migrations/0002_auto_20200531_1359.py | DougCash/twitter-bot | 2fee6e39ea407a97c4f23de55374f33cbfcf812c | [
"MIT"
] | null | null | null | tweets/migrations/0002_auto_20200531_1359.py | DougCash/twitter-bot | 2fee6e39ea407a97c4f23de55374f33cbfcf812c | [
"MIT"
] | 4 | 2020-06-06T02:30:42.000Z | 2021-06-10T20:26:46.000Z | tweets/migrations/0002_auto_20200531_1359.py | DougCash/twitter-bot | 2fee6e39ea407a97c4f23de55374f33cbfcf812c | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-05-31 13:59
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('tweets', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='tweet',
options={'ordering': ['-id']},
... | 18.277778 | 45 | 0.568389 |
2da934345807353ee61b9a3a809f3bcf7b8339fd | 1,322 | py | Python | va_explorer/va_logs/management/commands/initialize_log_directory.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | null | null | null | va_explorer/va_logs/management/commands/initialize_log_directory.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | 125 | 2020-10-07T12:00:15.000Z | 2022-03-31T21:29:21.000Z | va_explorer/va_logs/management/commands/initialize_log_directory.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | 2 | 2020-10-29T16:08:42.000Z | 2020-12-08T19:03:41.000Z | from config.settings.base import LOGGING, LOG_DIR
import os
from django.core.management import BaseCommand
class Command(BaseCommand):
def __init__(self, *args, **kwargs):
super(Command, self).__init__(*args, **kwargs)
help = "Initialize log directories for event loggig and debugging"
def handle(... | 35.72973 | 85 | 0.515129 |
2da98df3c02174465fcc00d0dea4bac9bce3abe7 | 4,498 | py | Python | examples/functional_api/chapter_4.py | halvgaard/zenml | 7f9a3be90c7e0a94927b599939b5b9c1bc741b0b | [
"Apache-2.0"
] | 1 | 2022-03-11T10:15:22.000Z | 2022-03-11T10:15:22.000Z | examples/functional_api/chapter_4.py | halvgaard/zenml | 7f9a3be90c7e0a94927b599939b5b9c1bc741b0b | [
"Apache-2.0"
] | null | null | null | examples/functional_api/chapter_4.py | halvgaard/zenml | 7f9a3be90c7e0a94927b599939b5b9c1bc741b0b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) ZenML GmbH 2021. 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:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 26.304094 | 80 | 0.691641 |
2da9a49cb7502a1dd250d0135b4a1ed155965401 | 1,577 | py | Python | SDCUP/uer/layers/embeddings.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | 1 | 2022-03-01T02:30:32.000Z | 2022-03-01T02:30:32.000Z | SDCUP/uer/layers/embeddings.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | null | null | null | SDCUP/uer/layers/embeddings.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | null | null | null | # -*- encoding:utf-8 -*-
import torch
import torch.nn as nn
from uer.layers.layer_norm import LayerNorm
class BertEmbedding(nn.Module):
"""
BERT embedding consists of three parts:
word embedding, position embedding, and segment embedding.
"""
def __init__(self, args, vocab_size):
super(Ber... | 35.044444 | 101 | 0.653139 |
2da9c1df76eac5dcf2bd56ebcccb02be89223a47 | 69,586 | py | Python | xlibs/modeling_bert.py | scutcyr/BoB | c83e53b0514a8160f7b898c3ee8f56a0176f3f41 | [
"Apache-2.0"
] | 96 | 2021-06-16T09:06:52.000Z | 2022-03-26T09:56:32.000Z | xlibs/modeling_bert.py | scutcyr/BoB | c83e53b0514a8160f7b898c3ee8f56a0176f3f41 | [
"Apache-2.0"
] | 16 | 2021-07-01T05:34:48.000Z | 2022-03-28T09:40:15.000Z | xlibs/modeling_bert.py | scutcyr/BoB | c83e53b0514a8160f7b898c3ee8f56a0176f3f41 | [
"Apache-2.0"
] | 24 | 2021-06-19T15:58:31.000Z | 2022-03-14T09:17:19.000Z | # Revised by Haoyu Song
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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... | 40.812903 | 168 | 0.659199 |
2da9f2575acb249f9fde7563e32dc8937f6ed532 | 2,309 | py | Python | retrobiocat_web/retro/enzyme_identification/query_mongodb.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 9 | 2020-12-01T16:33:02.000Z | 2022-01-19T20:02:42.000Z | retrobiocat_web/retro/enzyme_identification/query_mongodb.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 4 | 2020-10-02T14:38:32.000Z | 2021-08-02T09:23:58.000Z | retrobiocat_web/retro/enzyme_identification/query_mongodb.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 6 | 2021-01-14T07:48:36.000Z | 2022-03-20T17:34:27.000Z | from retrobiocat_web.mongo.models.biocatdb_models import Sequence, EnzymeType, Activity
from mongoengine.queryset.visitor import Q
import pandas as pd
COLUMNS = ['reaction',
'enzyme_type',
'enzyme_name',
'short_citation',
'html_doi',
'cascade_num',
'sub... | 27.819277 | 87 | 0.591598 |
2da9f9ff4ac42f55bb45c5d37e80a26df858e88b | 1,849 | py | Python | fcos_core/solver/lr_scheduler.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 10 | 2021-08-31T01:39:40.000Z | 2022-03-27T13:13:14.000Z | fcos_core/solver/lr_scheduler.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 1 | 2021-10-10T05:36:35.000Z | 2021-12-11T05:56:26.000Z | solver/lr_scheduler.py | AceCoooool/RetinaNet | 5fbcff38c0a18075fa0a3b04caf5383ad357b294 | [
"MIT"
] | 3 | 2021-09-05T09:14:35.000Z | 2021-10-21T03:15:59.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from bisect import bisect_right
import torch
# FIXME ideally this would be achieved with a CombinedLRScheduler,
# separating MultiStepLR with WarmupLR
# but the current LRScheduler design doesn't allow it
class WarmupMultiStepLR(torch.optim.lr_s... | 34.886792 | 80 | 0.595998 |
2daa386b569a70b8a264c3cb949a141df77f1d9b | 1,710 | py | Python | nova/conf/floating_ips.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-04-28T16:20:38.000Z | 2021-04-25T11:19:03.000Z | nova/conf/floating_ips.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/conf/floating_ips.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2020-04-08T20:24:45.000Z | 2020-10-05T19:02:13.000Z | # Copyright 2016 Huawei Technology corp.
# 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 r... | 30.535714 | 78 | 0.707602 |
2daa609eeed2d9fb202fb9392d3efef69848ccf0 | 7,255 | py | Python | datadog_checks_base/tests/stubs/test_aggregator_no_duplicate.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_base/tests/stubs/test_aggregator_no_duplicate.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_base/tests/stubs/test_aggregator_no_duplicate.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest
from datadog_checks.base import AgentCheck
def test_assert_no_duplicate_message(aggregator):
check = AgentCheck()
check.gauge('check.metric.dup1', 1, tags=['aa'])
check.gauge('... | 37.205128 | 113 | 0.53439 |
2daa741663b09a614b4724a92f08805afd02b91c | 6,087 | py | Python | src/genie/libs/parser/ios/tests/test_show_routing.py | tylersiemers/genieparser | f18d49f9ca268d23df34faaf8b2212ca29b6882e | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/ios/tests/test_show_routing.py | tylersiemers/genieparser | f18d49f9ca268d23df34faaf8b2212ca29b6882e | [
"Apache-2.0"
] | 1 | 2019-04-02T16:51:56.000Z | 2019-04-02T16:51:56.000Z | src/genie/libs/parser/ios/tests/test_show_routing.py | tylersiemers/genieparser | f18d49f9ca268d23df34faaf8b2212ca29b6882e | [
"Apache-2.0"
] | 1 | 2021-01-29T17:31:33.000Z | 2021-01-29T17:31:33.000Z | import unittest
from unittest.mock import Mock
# ATS
from ats.topology import Device
from genie.metaparser.util.exceptions import SchemaEmptyParserError, \
SchemaMissingKeyError
from genie.libs.parser.ios.show_routing import ShowIpRoute, ShowIpv6RouteUpdated
from genie.libs.par... | 41.408163 | 126 | 0.492525 |
2daa7d4ef7b52e89f9e83759e6eea02e2361b933 | 627 | py | Python | scripts/benchmarking.py | hissohathair/puzzle-solvers | b87006955aad5289d5bd680356fb387121545685 | [
"MIT"
] | null | null | null | scripts/benchmarking.py | hissohathair/puzzle-solvers | b87006955aad5289d5bd680356fb387121545685 | [
"MIT"
] | null | null | null | scripts/benchmarking.py | hissohathair/puzzle-solvers | b87006955aad5289d5bd680356fb387121545685 | [
"MIT"
] | null | null | null | # benchmarking.py
import timeit
import sudoku
class BenchmarkerPuzzle(sudoku.SudokuPuzzle):
def foo(self):
return
def bench(function, use_class=sudoku.SudokuPuzzle, setup=""):
p = use_class()
p.init_puzzle(sudoku.SAMPLE_PUZZLES[6]["puzzle"])
t = timeit.timeit(f"{function}", globals={"p": p}... | 23.222222 | 67 | 0.700159 |
2daaa0556682d27f7b7e46432868fa11052a6636 | 4,594 | py | Python | try2/dataset.py | Nishank20Singhal/dissertation | 3c39e0dd3db82754a418bde88fc87cce17e54011 | [
"MIT"
] | null | null | null | try2/dataset.py | Nishank20Singhal/dissertation | 3c39e0dd3db82754a418bde88fc87cce17e54011 | [
"MIT"
] | null | null | null | try2/dataset.py | Nishank20Singhal/dissertation | 3c39e0dd3db82754a418bde88fc87cce17e54011 | [
"MIT"
] | null | null | null | '''
import cv2
import numpy as np
import glob
import os
x = glob.glob("osm2world_500_HR_WS/hudsonriver500/*.jpg")
for file in x:
filename = "Dataset/train/HI/" + os.path.basename(file)
image = cv2.imread(file)
height, width = image.shape[:2]
print (image.shape)
# Let's get the starting pixel coord... | 39.603448 | 136 | 0.655855 |
2daaaf45e34cea08d593b775c5e524b0006727bb | 302 | py | Python | authx/__init__.py | MojixCoder/authx | 0bb6e70dd4e3c64eaa4e994d761ceb0e3a4f85c2 | [
"MIT"
] | null | null | null | authx/__init__.py | MojixCoder/authx | 0bb6e70dd4e3c64eaa4e994d761ceb0e3a4f85c2 | [
"MIT"
] | null | null | null | authx/__init__.py | MojixCoder/authx | 0bb6e70dd4e3c64eaa4e994d761ceb0e3a4f85c2 | [
"MIT"
] | null | null | null | """Ready to use and customizable Authentications and Oauth2 management for FastAPI"""
__version__ = "0.1.3"
__license__ = "MIT"
__author__ = "Yasser Tahiri"
__author_email__ = "yasserth19@gmail.com"
from authx.main import Authentication, User, authx
__all__ = ["authx", "Authentication", "User"]
| 21.571429 | 85 | 0.745033 |
2daab6a28004271722ec3898ae1b7da4dc63109a | 13,022 | py | Python | music.py | KreizByMe/ms | 0947b6eb04534ff1e1a8933820648de3456a74c8 | [
"Apache-2.0"
] | null | null | null | music.py | KreizByMe/ms | 0947b6eb04534ff1e1a8933820648de3456a74c8 | [
"Apache-2.0"
] | null | null | null | music.py | KreizByMe/ms | 0947b6eb04534ff1e1a8933820648de3456a74c8 | [
"Apache-2.0"
] | null | null | null | import discord,asyncio,time,datetime,names,random,pymongo,youtube_dl,string,os,functools
from discord.ext import commands
from discord.ext.commands import command
#TODO: CREATE PLAYLIST SUPPORT FOR MUSIC
ytdl_format_options= {
'format': 'bestaudio/best',
'outtmpl': '{}',
'restrictfilenames': True,
... | 33.911458 | 134 | 0.599908 |
2daac0dbd2444298b9e7abc1c6ff243ef23dd60f | 3,988 | py | Python | lbrynet/schema/signer.py | Leopere/lbry | af43b21ef6a5de5ce1fee21425bea6f8d6bf335f | [
"MIT"
] | null | null | null | lbrynet/schema/signer.py | Leopere/lbry | af43b21ef6a5de5ce1fee21425bea6f8d6bf335f | [
"MIT"
] | null | null | null | lbrynet/schema/signer.py | Leopere/lbry | af43b21ef6a5de5ce1fee21425bea6f8d6bf335f | [
"MIT"
] | null | null | null | import ecdsa
import hashlib
import binascii
from lbrynet.schema.address import decode_address
from lbrynet.schema.encoding import decode_b64_fields
from lbrynet.schema.schema.certificate import Certificate
from lbrynet.schema.schema.claim import Claim
from lbrynet.schema.signature import Signature, NAMED_SECP256K1
from... | 32.688525 | 103 | 0.660983 |
2daaf0d20e47768b3e607e30366a0bc443f9465c | 1,704 | py | Python | webviz_config/generic_plugins/_banner_image.py | dotfloat/webviz-config | 2538035c81075b36d23e74642c5d0454c741c142 | [
"MIT"
] | null | null | null | webviz_config/generic_plugins/_banner_image.py | dotfloat/webviz-config | 2538035c81075b36d23e74642c5d0454c741c142 | [
"MIT"
] | null | null | null | webviz_config/generic_plugins/_banner_image.py | dotfloat/webviz-config | 2538035c81075b36d23e74642c5d0454c741c142 | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import List
import dash_html_components as html
from .. import WebvizPluginABC
from ..webviz_assets import WEBVIZ_ASSETS
class BannerImage(WebvizPluginABC):
"""Adds a full width banner image, with an optional overlayed title.
Useful on e.g. the front page for introducing a f... | 27.047619 | 76 | 0.582746 |
2daaf8522e4d2df2115480d61eeac244c3083527 | 5,653 | py | Python | python/oneflow/test/modules/test_ddp.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_ddp.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_ddp.py | Warmchay/oneflow | 5a333ff065bb89990318de2f1bd650e314d49301 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 law or agr... | 31.758427 | 88 | 0.543782 |
2dab0989cc3001c755ec38dc60c24cc54e5ce18a | 51,709 | py | Python | src/olympia/files/utils.py | abhinavraj23/addons-server | b9e3cc09718679d2a72d8e305b79d98d1421c397 | [
"BSD-3-Clause"
] | 1 | 2020-01-11T23:51:13.000Z | 2020-01-11T23:51:13.000Z | src/olympia/files/utils.py | Dala121212/addons-server | 4d5a8e512c1f399641b0405c915b13fa8e39d199 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/files/utils.py | Dala121212/addons-server | 4d5a8e512c1f399641b0405c915b13fa8e39d199 | [
"BSD-3-Clause"
] | null | null | null | import collections
import contextlib
import errno
import hashlib
import json
import os
import io
import re
import shutil
import signal
import stat
import struct
import tarfile
import tempfile
import zipfile
import fcntl
from datetime import datetime
from django import forms
from django.conf import settings
from djang... | 36.621105 | 79 | 0.625713 |
2dab0bcc6a4c82f3728a103464119fbf16d53e51 | 3,985 | py | Python | alipay/aop/api/request/MybankPaymentTradeDistrictQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/MybankPaymentTradeDistrictQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/MybankPaymentTradeDistrictQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MybankPaymentTradeDistrictQueryModel import MybankPaymentTradeDistrictQueryModel
class MybankPaymentTradeDistrictQueryRequest(object... | 27.482759 | 148 | 0.645922 |
2dab266af989c756cc2e1f6b7726c34d92114a55 | 7,869 | py | Python | openpype/tools/mayalookassigner/widgets.py | yosuperdope/OpenPype | 0c90df97ddb8cda291a4f66d35da58b3deb94a71 | [
"MIT"
] | 1 | 2020-09-21T14:55:33.000Z | 2020-09-21T14:55:33.000Z | openpype/tools/mayalookassigner/widgets.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | null | null | null | openpype/tools/mayalookassigner/widgets.py | jrsndl/pype | f9d80ef2c0663921291c5f47d24bea51fc43bac7 | [
"MIT"
] | null | null | null | import logging
from collections import defaultdict
from avalon.vendor.Qt import QtWidgets, QtCore
# TODO: expose this better in avalon core
from avalon.tools import lib
from avalon.tools.models import TreeModel
from . import models
from . import commands
from . import views
from maya import cmds
MODELINDEX = QtCor... | 30.034351 | 79 | 0.634134 |
2dab4a481cd7dcd96d0f473c0d08b491239e3a03 | 51 | py | Python | utils/__init__.py | hatbot-team/hatbot | e7fea42b5431cc3e93d9e484c5bb5232d8f2e981 | [
"MIT"
] | 1 | 2016-05-26T08:18:36.000Z | 2016-05-26T08:18:36.000Z | utils/__init__.py | hatbot-team/hatbot | e7fea42b5431cc3e93d9e484c5bb5232d8f2e981 | [
"MIT"
] | null | null | null | utils/__init__.py | hatbot-team/hatbot | e7fea42b5431cc3e93d9e484c5bb5232d8f2e981 | [
"MIT"
] | null | null | null | __author__ = 'moskupols'
__all__ = ['json_hooks']
| 12.75 | 24 | 0.705882 |
2dab6f7ba6c11fbc0a31f08bb9cfff05bb6261aa | 373 | py | Python | bin/shutdown.py | OladeleO/lookyloo | f1f9cab2a946639332fd0526be361e1b43d094e4 | [
"BSD-3-Clause"
] | null | null | null | bin/shutdown.py | OladeleO/lookyloo | f1f9cab2a946639332fd0526be361e1b43d094e4 | [
"BSD-3-Clause"
] | 41 | 2021-09-30T00:44:34.000Z | 2022-03-28T01:02:07.000Z | bin/shutdown.py | OladeleO/lookyloo | f1f9cab2a946639332fd0526be361e1b43d094e4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
from lookyloo.abstractmanager import AbstractManager
def main():
AbstractManager.force_shutdown()
time.sleep(5)
while True:
running = AbstractManager.is_running()
if not running:
break
print(running)
t... | 16.954545 | 52 | 0.621984 |
2dab77d0febdb9034b76ea01973bae17be1fb9d3 | 26,583 | py | Python | django/contrib/formtools/wizard/views.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/contrib/formtools/wizard/views.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | django/contrib/formtools/wizard/views.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | import copy
import re
from django import forms
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
from django.forms import formsets, ValidationError
from django.views.generic import TemplateView
from django.utils.datastructures import SortedDict
from django.utils.decorators import class... | 38.638081 | 90 | 0.625362 |
2dab84690f0a07a619f97d72192dc7e2cbf1fe76 | 1,974 | py | Python | neural-networks/nn-with-hidden-layers.py | sieniven/self-driving-project | ae135319f0991a940241c71f498865822a4f5b80 | [
"Apache-2.0"
] | null | null | null | neural-networks/nn-with-hidden-layers.py | sieniven/self-driving-project | ae135319f0991a940241c71f498865822a4f5b80 | [
"Apache-2.0"
] | null | null | null | neural-networks/nn-with-hidden-layers.py | sieniven/self-driving-project | ae135319f0991a940241c71f498865822a4f5b80 | [
"Apache-2.0"
] | 1 | 2022-03-31T10:33:45.000Z | 2022-03-31T10:33:45.000Z | from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets(".", one_hot=True, reshape=False)
import tensorflow as tf
# Parameters
learning_rate = 0.001
training_epochs = 20
batch_size = 128 # Decrease batch size if you don't have enough memory
display_step = 1
n_input = 784 # MNIS... | 34.034483 | 110 | 0.719858 |
2dab9030cee9d024a28d9ec46c3fe8f3345de4bd | 363 | py | Python | src/comments/forms.py | aminhp93/learning_python | f708a61c78e26061cf8b7fa5b1262fb0eea330d7 | [
"MIT"
] | null | null | null | src/comments/forms.py | aminhp93/learning_python | f708a61c78e26061cf8b7fa5b1262fb0eea330d7 | [
"MIT"
] | 7 | 2020-02-11T23:32:33.000Z | 2022-03-11T23:15:53.000Z | src/comments/forms.py | aminhp93/learning_python | f708a61c78e26061cf8b7fa5b1262fb0eea330d7 | [
"MIT"
] | null | null | null | from django import forms
class CommentForm(forms.Form):
content_type = forms.CharField(widget=forms.HiddenInput)
object_id = forms.IntegerField(widget=forms.HiddenInput)
#parent_id = forms.IntegerField(widget=forms.HiddenInput, required=False)
content = forms.CharField(label='', widget=forms.TextInput(... | 51.857143 | 106 | 0.768595 |
2dabe1f4bd2fd3c8f7f0a92792b7e20bb07fd686 | 700 | py | Python | func_tests/pages/alldatapage/all_data_locator.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/pages/alldatapage/all_data_locator.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/pages/alldatapage/all_data_locator.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
# By default every locator should be CSS
# Abbr:
# TB - Text Box
# CB - Check Box
# RB - Radio Button
# BTN - Button
# DD - Drop Down
# LINK - Links
# LABEL - Label
# variable to access locators
LOCATOR = "locator"
BY = "by"
All_DATA_RECORDS_LINK_XPATH = "//a[@class='proj... | 31.818182 | 129 | 0.664286 |
2dabecb8078ee05e77f51e8f545f0eba67da657f | 9,793 | py | Python | tests/python/test_ggui.py | knight42/taichi | c8d5b3f00061ad03b7867f91735f25fe5174b36c | [
"MIT"
] | 1 | 2022-02-07T06:34:03.000Z | 2022-02-07T06:34:03.000Z | tests/python/test_ggui.py | knight42/taichi | c8d5b3f00061ad03b7867f91735f25fe5174b36c | [
"MIT"
] | null | null | null | tests/python/test_ggui.py | knight42/taichi | c8d5b3f00061ad03b7867f91735f25fe5174b36c | [
"MIT"
] | null | null | null | import os
import pathlib
import platform
import tempfile
import numpy as np
import pytest
import taichi as ti
REGENERATE_GROUNDTRUTH_IMAGES = False
RENDER_REPEAT = 5
supported_archs = [ti.vulkan, ti.cuda]
def get_temp_png():
f, name = tempfile.mkstemp(suffix='.png')
os.close(f)
return name
def write_... | 33.652921 | 79 | 0.604309 |
2dac146de65bc9a1caef9f6430a03e91eb208a18 | 3,782 | py | Python | appengine/monorail/sitewide/groupcreate.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/sitewide/groupcreate.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/monorail/sitewide/groupcreate.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""A page for site admins to create a new user group."""
from __future__ import print_function
... | 36.019048 | 78 | 0.705976 |
2dac163e21230a345d2f20bd38eba37f6c6f84c1 | 46,237 | py | Python | certbot/certbot/_internal/storage.py | TomAnthony/certbot | bcf33c665932160c2fe446e46e42c15b57c05a81 | [
"Apache-2.0"
] | 242 | 2020-02-03T03:48:46.000Z | 2021-11-08T12:56:26.000Z | certbot/certbot/_internal/storage.py | TomAnthony/certbot | bcf33c665932160c2fe446e46e42c15b57c05a81 | [
"Apache-2.0"
] | 2 | 2020-04-30T13:03:09.000Z | 2021-05-05T10:20:15.000Z | certbot/certbot/_internal/storage.py | Tomoyuki-GH/certbot | 41ee5be4b5e01f4a0616fe5e014a38f59a931f60 | [
"Apache-2.0"
] | 5 | 2020-05-07T08:14:36.000Z | 2022-03-24T15:15:08.000Z | """Renewable certificates storage."""
import datetime
import glob
import logging
import re
import shutil
import stat
import configobj
import parsedatetime
import pytz
import six
import certbot
from certbot import crypto_util
from certbot import errors
from certbot import interfaces
from certbot import ocsp
from certb... | 40.701585 | 97 | 0.645198 |
2dac195a68d416cd19f5c4fa8f14e7ea4d34587e | 7,339 | py | Python | src/pykeen/models/unimodal/trans_h.py | Rodrigo-A-Pereira/pykeen | 76c5acb707faa524b5951b0d1d85ab1afe806462 | [
"MIT"
] | null | null | null | src/pykeen/models/unimodal/trans_h.py | Rodrigo-A-Pereira/pykeen | 76c5acb707faa524b5951b0d1d85ab1afe806462 | [
"MIT"
] | null | null | null | src/pykeen/models/unimodal/trans_h.py | Rodrigo-A-Pereira/pykeen | 76c5acb707faa524b5951b0d1d85ab1afe806462 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""An implementation of TransH."""
from typing import Any, ClassVar, Mapping, Type
import torch
from torch.nn import functional
from torch.nn.init import uniform_
from ..base import EntityRelationEmbeddingModel
from ...constants import DEFAULT_EMBEDDING_HPO_EMBEDDING_DIM_RANGE
from ...nn.emb... | 40.772222 | 119 | 0.647363 |
2dac1d6ee3b353e2e1727f5bb71a807e332ab62c | 2,564 | py | Python | sjtwo-c/toolchains/mac/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/lib/thumb/v8-m.main/nofp/libstdc++.a-gdb.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 2 | 2020-04-04T21:09:56.000Z | 2020-04-08T17:00:58.000Z | sjtwo-c/toolchains/mac/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/lib/thumb/v8-m.main/nofp/libstdc++.a-gdb.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 13 | 2020-04-11T21:50:57.000Z | 2020-04-19T03:19:48.000Z | sjtwo-c/toolchains/mac/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/lib/thumb/v8-m.main/nofp/libstdc++.a-gdb.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | null | null | null | # -*- python -*-
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later versio... | 41.354839 | 130 | 0.730499 |
2dac3bded4ca55a3d5399ade17a4199a9a75f0ce | 22,502 | py | Python | soco/events_twisted.py | gitter-badger/SoCo | 65977466057748ea522a6d8b7f2a649091485a07 | [
"MIT"
] | 28 | 2020-04-24T17:32:33.000Z | 2021-12-28T23:45:16.000Z | soco/events_twisted.py | gitter-badger/SoCo | 65977466057748ea522a6d8b7f2a649091485a07 | [
"MIT"
] | 11 | 2020-04-28T15:57:39.000Z | 2022-01-07T09:32:10.000Z | soco/events_twisted.py | gitter-badger/SoCo | 65977466057748ea522a6d8b7f2a649091485a07 | [
"MIT"
] | 3 | 2021-08-10T11:56:14.000Z | 2022-01-13T04:19:03.000Z | # -*- coding: utf-8 -*-
# pylint: disable=not-context-manager,import-error,wrong-import-position
# NOTE: The pylint not-content-manager warning is disabled pending the fix of
# a bug in pylint. See https://github.com/PyCQA/pylint/issues/782
# Disable while we have Python 2.x compatability
# pylint: disable=useless-ob... | 40.039146 | 79 | 0.611901 |
2dac81d746a2a6eab7af38891db701e09c571624 | 377 | py | Python | clack/utils.py | borntyping/clack | 4df044bf091966eaf925a60b5f16941fbb0e357d | [
"MIT"
] | 1 | 2015-01-12T20:12:26.000Z | 2015-01-12T20:12:26.000Z | clack/utils.py | borntyping/clack | 4df044bf091966eaf925a60b5f16941fbb0e357d | [
"MIT"
] | 1 | 2015-01-26T10:34:53.000Z | 2015-01-26T11:21:53.000Z | clack/utils.py | borntyping/clack | 4df044bf091966eaf925a60b5f16941fbb0e357d | [
"MIT"
] | null | null | null | """Utility functions for clack."""
import os.path
import sys
__all__ = ('local_path', 'string_types')
def local_path(filename):
"""Return an absolute path to a file in the current directory."""
return os.path.join(os.path.dirname(os.path.realpath(__file__)), filename)
if sys.version_info >= (3,):
stri... | 20.944444 | 78 | 0.692308 |
2daca9bb2feb1548c60c9b3fc8d3c57acc0c0a41 | 96 | py | Python | ontology_to_daikon/__init__.py | aas-integration/integration-test2 | dc9a9b4593cd59841f0d8348056cbff80a9c2a21 | [
"MIT"
] | 3 | 2016-10-10T20:18:51.000Z | 2018-05-01T19:42:10.000Z | ontology_to_daikon/__init__.py | aas-integration/integration-test2 | dc9a9b4593cd59841f0d8348056cbff80a9c2a21 | [
"MIT"
] | 38 | 2016-08-22T03:20:25.000Z | 2018-06-11T19:13:05.000Z | ontology_to_daikon/__init__.py | aas-integration/integration-test2 | dc9a9b4593cd59841f0d8348056cbff80a9c2a21 | [
"MIT"
] | 7 | 2016-08-29T17:37:42.000Z | 2022-01-28T00:30:10.000Z | import ontology_to_daikon
create_daikon_invariant = ontology_to_daikon.create_daikon_invariant | 24 | 68 | 0.916667 |
2dacac6f6128129a6532d232e6fbec7137175acd | 544 | py | Python | Image/milestone2_1.py | pection/InternshipProject | 2b39cc244e7ac989795d3aba5c1a11bb6c9a57b7 | [
"Apache-2.0"
] | null | null | null | Image/milestone2_1.py | pection/InternshipProject | 2b39cc244e7ac989795d3aba5c1a11bb6c9a57b7 | [
"Apache-2.0"
] | null | null | null | Image/milestone2_1.py | pection/InternshipProject | 2b39cc244e7ac989795d3aba5c1a11bb6c9a57b7 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
from matplotlib import pyplot as plt
k = 5
img = cv2.imread("Humanimg.jpg")
img = cv2.cvtColor(img,cv2.COLOR_RGB2BGR)
kernel = np.ones((5,5),np.float32)/25
print (kernel)
dst = cv2.filter2D(img,-1,kernel)
mask = cv2.subtract(img,dst)
img_unsharp_highboots = cv2.add(img,k*mask)
p... | 32 | 92 | 0.713235 |
2dacdb502f288f8356e745f57de11cc53867c684 | 10,547 | py | Python | miscellanies/viewer/qt5_viewer.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | miscellanies/viewer/qt5_viewer.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | miscellanies/viewer/qt5_viewer.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | from PyQt5.QtWidgets import QApplication, QDialog, QVBoxLayout, QHBoxLayout, QPushButton, QSizePolicy, QLabel, QListWidget, QListWidgetItem, QGridLayout, QSpinBox
from PyQt5.QtCore import QTimer, Qt, pyqtSlot, QObject, QPoint, QPointF, QRect, QRectF, QSize
from PyQt5.QtGui import QResizeEvent, QPixmap, QPainter, QPen, ... | 33.271293 | 162 | 0.655447 |
2dacdc92e5358c26992aed801b186bdf9610a999 | 26,775 | py | Python | google/net/proto/ProtocolBuffer.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | google/net/proto/ProtocolBuffer.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | google/net/proto/ProtocolBuffer.py | luduvigo/app-blog-code | 2de41573955f8dfb5f6d964d3cae2bbee6db2f9a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 27.717391 | 78 | 0.629169 |
2dacf6e55256436aaf75d5d10c2aa9a527658142 | 185 | py | Python | apps/report/__init__.py | Prabuatcontec/pm | abfb5af049f84620fcca820c60a834f6d892b813 | [
"MIT"
] | null | null | null | apps/report/__init__.py | Prabuatcontec/pm | abfb5af049f84620fcca820c60a834f6d892b813 | [
"MIT"
] | null | null | null | apps/report/__init__.py | Prabuatcontec/pm | abfb5af049f84620fcca820c60a834f6d892b813 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from flask import Blueprint
blueprint = Blueprint(
'report_blueprint',
__name__,
url_prefix=''
)
| 14.230769 | 39 | 0.637838 |
2dad0fdbaa5c923ad2b667178ba43bb05497515d | 12,248 | py | Python | src/python/module/z5py/converter.py | paulhfu/z5 | 5cfc192cb5c94982d337c31d3b1f0b7e5d817aca | [
"MIT"
] | null | null | null | src/python/module/z5py/converter.py | paulhfu/z5 | 5cfc192cb5c94982d337c31d3b1f0b7e5d817aca | [
"MIT"
] | null | null | null | src/python/module/z5py/converter.py | paulhfu/z5 | 5cfc192cb5c94982d337c31d3b1f0b7e5d817aca | [
"MIT"
] | null | null | null | # helper functions to convert to and from different formats
# - hdf5, tiff
from __future__ import print_function
import os
from math import ceil
from concurrent import futures
import numpy as np
try:
import h5py
WITH_H5 = True
except ImportError:
print("h5py is not installed, hdf5 converters not available"... | 41.659864 | 114 | 0.56695 |
2dad11a327c1b370959de931eefa2a15e0a01e56 | 3,296 | py | Python | python/examples/ui_notifications.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | 1 | 2021-04-05T15:01:23.000Z | 2021-04-05T15:01:23.000Z | python/examples/ui_notifications.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | null | null | null | python/examples/ui_notifications.py | gkprow-runsafe/binaryninja-api | 8f9004fa3cba785ec67909e9f96498b00086a3a7 | [
"MIT"
] | 1 | 2021-06-10T04:27:19.000Z | 2021-06-10T04:27:19.000Z | # Copyright (c) 2015-2021 Vector 35 Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, ... | 39.238095 | 90 | 0.710862 |
2dad209d5253b56b5953553510a810e45382935b | 8,318 | py | Python | djangocms_attributes_field/widgets.py | crydotsnake/djangocms-attributes-field | 7c8bc1521e99114918c52a21a5b898494fdd6f59 | [
"BSD-3-Clause"
] | 17 | 2016-06-23T00:33:10.000Z | 2019-12-17T19:26:11.000Z | djangocms_attributes_field/widgets.py | crydotsnake/djangocms-attributes-field | 7c8bc1521e99114918c52a21a5b898494fdd6f59 | [
"BSD-3-Clause"
] | 32 | 2016-06-16T00:09:02.000Z | 2020-09-02T08:24:23.000Z | djangocms_attributes_field/widgets.py | crydotsnake/djangocms-attributes-field | 7c8bc1521e99114918c52a21a5b898494fdd6f59 | [
"BSD-3-Clause"
] | 14 | 2016-06-15T20:27:34.000Z | 2020-07-17T13:40:20.000Z | from django.forms import Widget
from django.forms.utils import flatatt
from django.utils.html import escape, mark_safe, strip_spaces_between_tags
from django.utils.translation import gettext as _
class AttributesWidget(Widget):
"""
A widget that displays key/value pairs from JSON as a list of text input
b... | 40.183575 | 119 | 0.525727 |
2dad4df867316591b0d62c61807d3afec34dda1b | 228,390 | py | Python | benchmarks/Stencil/8PE/tapa_result/parsetab.py | Blaok/AutoBridge | e296a6d5ffe96ddf7ee35bd239ce1cd4a41f3670 | [
"MIT"
] | 76 | 2020-12-30T05:47:35.000Z | 2022-02-21T20:05:20.000Z | benchmarks/Stencil/8PE/tapa_result/parsetab.py | Blaok/AutoBridge | e296a6d5ffe96ddf7ee35bd239ce1cd4a41f3670 | [
"MIT"
] | 16 | 2021-01-08T23:49:08.000Z | 2022-03-28T22:08:31.000Z | benchmarks/Stencil/8PE/tapa_result/parsetab.py | Blaok/AutoBridge | e296a6d5ffe96ddf7ee35bd239ce1cd4a41f3670 | [
"MIT"
] | 15 | 2021-03-02T05:56:58.000Z | 2021-12-23T01:28:25.000Z |
# ./parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = b'\x92\x13\x18\x7f\x97\xf5J\x9b\xb9?\x87\xd1\x03\xd1\xb6\x89'
_lr_action_items = {'MODULE':([0,3,4,5,6,9,86,124,411,],[7,7,-4,-5,-6,-3,-8,-9,-7,]),'LPAREN':([0,3,4,5,6,9,10,11,12,14,15,16... | 515.553047 | 136,003 | 0.708223 |
2dad66aff038b11363ff78f8270d3b1605ec8ec2 | 13,382 | py | Python | src/analysis/plots.py | DESY-CBPF-UERJ/ANATools | 8e0aaca4e653ee8a0ba662c91d8fa1aa34951bfd | [
"MIT"
] | null | null | null | src/analysis/plots.py | DESY-CBPF-UERJ/ANATools | 8e0aaca4e653ee8a0ba662c91d8fa1aa34951bfd | [
"MIT"
] | null | null | null | src/analysis/plots.py | DESY-CBPF-UERJ/ANATools | 8e0aaca4e653ee8a0ba662c91d8fa1aa34951bfd | [
"MIT"
] | null | null | null | import concurrent.futures
import multiprocessing
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.patches as pat
from matplotlib.ticker import AutoMinorLocator
from tqdm import tqdm
#from ..statistic import get_interval, pdf_efficiency
from .statistic import (
pdf_efficiency,
get_interva... | 35.780749 | 208 | 0.538186 |
2dadcb9068f41dcbfffc2569763644cb57aa6bbe | 19,214 | py | Python | bigchaindb/lib.py | hongsookim/bigchaindb-sharding | b8af70ab77fb4d186cc227a8076e268a3ec8544b | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | bigchaindb/lib.py | hongsookim/bigchaindb-sharding | b8af70ab77fb4d186cc227a8076e268a3ec8544b | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | bigchaindb/lib.py | hongsookim/bigchaindb-sharding | b8af70ab77fb4d186cc227a8076e268a3ec8544b | [
"ECL-2.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # Copyright BigchainDB GmbH and BigchainDB contributors
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
"""Module containing main contact points with Tendermint and
MongoDB.
"""
import logging
from collections import namedtuple
from uuid import uuid4
import rapidjson
... | 38.737903 | 104 | 0.6234 |
2daddf812e669ebb4c67ba94d06f925b76b28403 | 7,547 | py | Python | perception/benchmarking/video.py | fireattack/perception | 99057309293c32144448e52068665315aacd9561 | [
"Apache-2.0"
] | 123 | 2019-11-04T19:29:46.000Z | 2022-03-18T13:49:12.000Z | perception/benchmarking/video.py | fireattack/perception | 99057309293c32144448e52068665315aacd9561 | [
"Apache-2.0"
] | 13 | 2019-11-05T06:51:46.000Z | 2022-02-22T04:09:58.000Z | perception/benchmarking/video.py | fireattack/perception | 99057309293c32144448e52068665315aacd9561 | [
"Apache-2.0"
] | 11 | 2019-11-05T17:47:16.000Z | 2022-01-25T15:27:31.000Z | import concurrent.futures
import typing
import uuid
import os
import tqdm
import pandas as pd
from ..tools import flatten
from ..hashers import VideoHasher, tools
from .common import BenchmarkDataset, BenchmarkTransforms, BenchmarkHashes
def _process_row(row, hashers, framerates):
error = None
try:
... | 37.547264 | 83 | 0.541805 |
2dadecdcd3a33b235395fe04d55962a23826e1ba | 4,734 | py | Python | flexget/plugins/filter/if_condition.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | 1 | 2018-05-02T21:14:50.000Z | 2018-05-02T21:14:50.000Z | flexget/plugins/filter/if_condition.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/filter/if_condition.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from future.moves import builtins
from past.builtins import basestring
import logging
import re
import datetime
from copy import copy
from flexget import plugin
from flexget.ev... | 41.526316 | 115 | 0.578158 |
2dadf4f9af02b63a4366154b5573cf36e4e70b79 | 8,370 | py | Python | experiments/ashvin/corl2019/public/p05_sweep_lr1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/public/p05_sweep_lr1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/public/p05_sweep_lr1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in, sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
... | 37.873303 | 121 | 0.589486 |
2dae1757d49988fa179481e8a6dada825e29b898 | 17,178 | py | Python | common_layer.py | alifkurniawan/tesis | 6330dba32f5dc12785e956875c94d83344d788a8 | [
"MIT"
] | null | null | null | common_layer.py | alifkurniawan/tesis | 6330dba32f5dc12785e956875c94d83344d788a8 | [
"MIT"
] | 3 | 2022-01-13T03:13:37.000Z | 2022-03-12T00:48:18.000Z | common_layer.py | alifkurniawan/tesis | 6330dba32f5dc12785e956875c94d83344d788a8 | [
"MIT"
] | null | null | null | ### MOSTO OF IT TAKEN FROM https://github.com/kolloldas/torchnlp
## MINOR CHANGES
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torch.nn.init as I
import numpy as np
import math
class EncoderLayer(nn.Module):
"""
Represents one Encoder layer of t... | 39.040909 | 115 | 0.624753 |
2dae2997bd6e1df452dd50a241801e8658647cea | 11,459 | py | Python | kuconnect/rnn.py | ozanarkancan/KuConnect | 1b4a7b3a5c200c3f590f894919011856f1b4a585 | [
"MIT"
] | null | null | null | kuconnect/rnn.py | ozanarkancan/KuConnect | 1b4a7b3a5c200c3f590f894919011856f1b4a585 | [
"MIT"
] | 1 | 2015-11-23T21:43:42.000Z | 2015-11-23T21:43:42.000Z | kuconnect/rnn.py | ozanarkancan/KuConnect | 1b4a7b3a5c200c3f590f894919011856f1b4a585 | [
"MIT"
] | null | null | null | import theano
import theano.tensor as T
from theano import shared
import numpy as np
import random
import cPickle
from inits import *
from dropout import *
floatX = theano.config.floatX
def initialize_weights(n_in, n_hidden, bias=False, init="normal", scale=0.01, n_out = None):
"""
Initialize weights, use nor... | 37.447712 | 124 | 0.587748 |
2dae31d32c3bc847c2fa2c0d351c7fd5f3015845 | 9,885 | py | Python | experiments/ashvin/icra2021/widowx/sawyer_bc_dice1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icra2021/widowx/sawyer_bc_dice1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icra2021/widowx/sawyer_bc_dice1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from rlkit.demos.source.dict_to_mdp_path_loader import EncoderDictToMDPPathLoader
from rlkit.launchers.experiments.ashvin.awac_rig import awac_rig_experiment
from rlkit.launchers.launcher_util import run_experiment
from rlkit.launchers.arglauncher import run_variants
from rlkit.t... | 36.208791 | 126 | 0.611836 |
2dae5a9a1c4ea1b4b5b2bfe6d0f178a4c02b79b9 | 583 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/__init__.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | 1 | 2021-06-06T23:49:17.000Z | 2021-06-06T23:49:17.000Z | datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/__init__.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/__init__.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import click
from ...console import CONTEXT_SETTINGS
from .generate_profile import generate_profile_from_mibs
from .translate_profile import translate_profile
from .validate_mib_filenames import validate_... | 27.761905 | 86 | 0.819897 |
2dae6823240ab252d077b9e110f3aa693607e69e | 12,276 | py | Python | pysrc/mpet/four_compartment.py | bretttully/multiple-network-poroelasticity | 1640de019b46521c67f02d7082f8c8b9757c16ae | [
"Apache-2.0"
] | 1 | 2017-04-04T20:51:38.000Z | 2017-04-04T20:51:38.000Z | pysrc/mpet/four_compartment.py | bretttully/multiple-network-poroelasticity | 1640de019b46521c67f02d7082f8c8b9757c16ae | [
"Apache-2.0"
] | null | null | null | pysrc/mpet/four_compartment.py | bretttully/multiple-network-poroelasticity | 1640de019b46521c67f02d7082f8c8b9757c16ae | [
"Apache-2.0"
] | null | null | null | """!
@file
@date 07 Jun 2015
@license
Copyright 2015 Brett Tully
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 o... | 38.482759 | 108 | 0.503829 |
2daea27a6a91c99f2e3919e7e420028084f438ce | 52,874 | py | Python | hotsos/core/plugins/openstack/exceptions.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | null | null | null | hotsos/core/plugins/openstack/exceptions.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | null | null | null | hotsos/core/plugins/openstack/exceptions.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# pylint: disable=C0301
# Some common builtin exeptions we might want to watch for
PYTHON_BUILTIN_EXCEPTIONS = [
"ArithmeticError",
"AssertionError",
"AttributeError",
# "BaseException",
# "BlockingIOError",
# "BrokenPipeError",
# "BufferError",
"BytesWarning",
# "ChildPro... | 28.861354 | 225 | 0.718009 |
2daebee89e656fff968b498653d564fe47fa114f | 17,904 | py | Python | zipline/finance/commission.py | jasonstrimpel/zipline | 21b4d3e2bbd32e1af5ded3e4834b007fe02bd83a | [
"Apache-2.0"
] | 1 | 2020-09-24T15:25:26.000Z | 2020-09-24T15:25:26.000Z | zipline/finance/commission.py | jasonstrimpel/zipline | 21b4d3e2bbd32e1af5ded3e4834b007fe02bd83a | [
"Apache-2.0"
] | null | null | null | zipline/finance/commission.py | jasonstrimpel/zipline | 21b4d3e2bbd32e1af5ded3e4834b007fe02bd83a | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 37.068323 | 79 | 0.644325 |
2daef0d45e58dfae959c03e63f24802fd9c3a1be | 446 | py | Python | alipay/aop/api/response/AlipayOpenMiniAmpeDeviceAddResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayOpenMiniAmpeDeviceAddResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayOpenMiniAmpeDeviceAddResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayOpenMiniAmpeDeviceAddResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenMiniAmpeDeviceAddResponse, self).__init__()
def parse_response_content(self, re... | 27.875 | 108 | 0.782511 |
2daf02633d2cad2e0b0d806f12d78b8540c41bf5 | 3,801 | py | Python | doc/jupyter_execute/examples/models/autoscaling/autoscaling_example.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/models/autoscaling/autoscaling_example.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/models/autoscaling/autoscaling_example.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Autoscaling Seldon Deployments
#
# ## Prerequisites
#
# - The cluster should have `heapster` and `metric-server` running in the `kube-system` namespace
# - For Kind install `../../testing/scripts/metrics.yaml` See https://github.com/kubernetes-sigs/kind/issues/398
# - For ... | 24.056962 | 517 | 0.673244 |
2daf3723732a210a0dfa62377d198b3be3f9dc20 | 14,013 | py | Python | lib/python2.7/site-packages/paramiko/pkey.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/paramiko/pkey.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | lib/python2.7/site-packages/paramiko/pkey.py | drpaneas/linuxed.gr | 95676e9f18a234092656c61b73b9e6633f2e39ec | [
"MIT"
] | null | null | null | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (a... | 40.037143 | 107 | 0.613644 |
2daf3b0b4be267712beaebaaa9e0ca0f5c9d29f7 | 741 | py | Python | setup.py | djz332/fieldkit | 3c242c2026e80100cdd6b2114d72a61122381fcd | [
"BSD-3-Clause"
] | null | null | null | setup.py | djz332/fieldkit | 3c242c2026e80100cdd6b2114d72a61122381fcd | [
"BSD-3-Clause"
] | null | null | null | setup.py | djz332/fieldkit | 3c242c2026e80100cdd6b2114d72a61122381fcd | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division, absolute_import, print_function
from numpy.distutils.core import Extension
exts = [Extension(name='fieldkit._measure', sources=['fieldkit/measure.pyf','fieldkit/measure.f90'], define_macros=[('NPY_NO_DEPRECATED_API','NPY_1_7_API_VERSION')]),
Extension(name='fieldkit._simulate',... | 43.588235 | 169 | 0.708502 |
2daf5063d587432151928f3485cf27670107d34e | 28,054 | py | Python | btc-chat-bit/bit/transaction.py | 7K9cNgkh/btc-chat | 77a50445fc808f272d1f7f2311aa9c3b2b3e798e | [
"MIT"
] | null | null | null | btc-chat-bit/bit/transaction.py | 7K9cNgkh/btc-chat | 77a50445fc808f272d1f7f2311aa9c3b2b3e798e | [
"MIT"
] | null | null | null | btc-chat-bit/bit/transaction.py | 7K9cNgkh/btc-chat | 77a50445fc808f272d1f7f2311aa9c3b2b3e798e | [
"MIT"
] | null | null | null | import logging
from collections import namedtuple
from itertools import islice
import math
import re
from random import randint, shuffle
from bit.crypto import ChatNonce, double_sha256, sha256
from bit.exceptions import InsufficientFunds
from bit.format import address_to_public_key_hash, segwit_scriptpubkey
from bit.ne... | 37.455274 | 187 | 0.615812 |
2daf811cfcf274ada3f131a058b3113a3a77ade7 | 1,832 | py | Python | extensions/iocompython/examples/asteroid-service/asteroidservice.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 1 | 2020-04-28T23:25:50.000Z | 2020-04-28T23:25:50.000Z | extensions/iocompython/examples/asteroid-service/asteroidservice.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 11 | 2020-01-30T16:27:24.000Z | 2020-08-09T06:25:06.000Z | extensions/iocompython/examples/asteroid-service/asteroidservice.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | null | null | null | # Module: asteroidservice.py
from iocompython import Root, EndPoint
import ioterminal
import asteroidapp
import queue, random, time
running_apps = {}
def main():
global root, callback_queue
root = Root('asteroid',security='certfile=myhome.crt,keyfile=secret/myhome.key')
root.queue_events()
ioterminal... | 29.548387 | 84 | 0.542031 |
2dafb5cf458bfb67ca50687a534811bbc97c8fb3 | 2,141 | py | Python | setup.py | Shashwat986/sqlalchemy-mixins | ac0540d8b7b6fa2390ac7d47227255f5c7283d7b | [
"MIT"
] | 599 | 2017-03-14T08:29:02.000Z | 2022-03-28T22:44:49.000Z | setup.py | Shashwat986/sqlalchemy-mixins | ac0540d8b7b6fa2390ac7d47227255f5c7283d7b | [
"MIT"
] | 68 | 2017-05-04T16:20:20.000Z | 2022-03-29T17:10:00.000Z | setup.py | Shashwat986/sqlalchemy-mixins | ac0540d8b7b6fa2390ac7d47227255f5c7283d7b | [
"MIT"
] | 86 | 2017-07-19T13:56:52.000Z | 2022-03-11T11:01:40.000Z | from setuptools import setup
"""
0. python3 -m pip install --user --upgrade twine
1. python3 setup.py sdist bdist_wheel
2. python3 -m twine upload dist/*
see https://packaging.python.org/tutorials/packaging-projects/
"""
def requirements():
import os
filename = os.path.join(os.path.dirname(__file__), 'requi... | 37.561404 | 91 | 0.602055 |
2dafb94ba7e4e779c8703096795f4e49139100ab | 15,999 | py | Python | tensorflow/python/framework/graph_util_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/framework/graph_util_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/framework/graph_util_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2015 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... | 40.299748 | 80 | 0.667292 |
2dafc72a62cfcc27f4fbf928284999b25b5b3170 | 2,281 | py | Python | crowdsourced_fields/forms.py | bitlabstudio/django-crowdsourced-fields | 8805bcced9dd87edd01cc3b9112231f8cdd38847 | [
"MIT"
] | 1 | 2017-12-11T23:50:23.000Z | 2017-12-11T23:50:23.000Z | crowdsourced_fields/forms.py | bitlabstudio/django-crowdsourced-fields | 8805bcced9dd87edd01cc3b9112231f8cdd38847 | [
"MIT"
] | 2 | 2020-02-11T21:58:50.000Z | 2020-06-05T16:56:27.000Z | crowdsourced_fields/forms.py | bitlabstudio/django-crowdsourced-fields | 8805bcced9dd87edd01cc3b9112231f8cdd38847 | [
"MIT"
] | null | null | null | """Forms for the ``django-crowdsourced-fields`` app."""
import json
import os
from django.conf import settings
from crowdsourced_fields.models import CrowdsourcedItem
def add_crowdsourced_values(cls, field_name, settings):
"""
Dynamically adds a ``get_crowdsourced_values`` method to the form's fields.
... | 36.206349 | 79 | 0.654537 |
2dafc8ccd42ff01065c41bdce141f688ba4c34d1 | 945 | py | Python | backend/personal_area/users_list.py | DuMoH112/cloud_strorage | f995f9a71c9317493e3092a7ec31108afbdc8e05 | [
"MIT"
] | null | null | null | backend/personal_area/users_list.py | DuMoH112/cloud_strorage | f995f9a71c9317493e3092a7ec31108afbdc8e05 | [
"MIT"
] | null | null | null | backend/personal_area/users_list.py | DuMoH112/cloud_strorage | f995f9a71c9317493e3092a7ec31108afbdc8e05 | [
"MIT"
] | null | null | null | from flask import Blueprint, request, jsonify
from psycopg2 import sql
from Database.postgres import Postgres_db
from app.auth_utils import auth_user
users_list_bp = Blueprint('users_list', __name__)
@users_list_bp.route('/back/users_list', methods=['GET'])
@auth_user(name_func='users_list')
def users_list(user):
... | 23.625 | 70 | 0.597884 |
2dafced5e9b3a625d9a36b523244475ee158869a | 15,530 | py | Python | tests/test_utils.py | david-house-harvard/canvas_python_sdk | 9c2e59621a9a5667bc43c253ef801482b241a2c1 | [
"MIT"
] | null | null | null | tests/test_utils.py | david-house-harvard/canvas_python_sdk | 9c2e59621a9a5667bc43c253ef801482b241a2c1 | [
"MIT"
] | null | null | null | tests/test_utils.py | david-house-harvard/canvas_python_sdk | 9c2e59621a9a5667bc43c253ef801482b241a2c1 | [
"MIT"
] | null | null | null | import unittest
from unittest import mock
import requests
from mock import patch
from canvas_sdk import utils
from canvas_sdk.client import RequestContext
class TestUtils(unittest.TestCase):
def setUp(self):
self.path = '/v1/accounts'
self.req_ctx = mock.MagicMock(name='request-context', spec=Req... | 45.676471 | 135 | 0.671281 |
2dafe10eae4056ca31a18cfac31d487141b52bc2 | 6,761 | py | Python | alipay/aop/api/domain/AlipayInsSceneMobileScreenApplyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayInsSceneMobileScreenApplyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayInsSceneMobileScreenApplyModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.InsurancePerson import InsurancePerson
from alipay.aop.api.domain.ChannelBizData import ChannelBizData
from alipay.aop.api.domain.InsurancePeriod import InsurancePeriod
from alipay.... | 34.494898 | 91 | 0.627422 |
2db009a218ebb9e0bfaaefc49c8a424815a47ef9 | 1,820 | py | Python | brilws/params.py | xiezhen/brilws | e3652dd4506dff9d713184ff623b59bc11fbe2c7 | [
"MIT"
] | 1 | 2017-03-23T16:26:06.000Z | 2017-03-23T16:26:06.000Z | brilws/params.py | xiezhen/brilws | e3652dd4506dff9d713184ff623b59bc11fbe2c7 | [
"MIT"
] | 1 | 2017-03-24T15:02:20.000Z | 2017-10-02T13:43:26.000Z | brilws/params.py | xiezhen/brilws | e3652dd4506dff9d713184ff623b59bc11fbe2c7 | [
"MIT"
] | 1 | 2019-12-06T09:23:01.000Z | 2019-12-06T09:23:01.000Z | _timeopt_pattern = '^\d\d/\d\d/\d\d \d\d:\d\d:\d\d$|^\d{6}$|^\d{4}$'
_fillnum_pattern = '^\d{4}$'
_runnum_pattern = '^\d{6}$'
_time_pattern = '^\d\d/\d\d/\d\d \d\d:\d\d:\d\d$'
_hltpath_pattern = '^(HLT|DST|AlCa)_[\w\*\?\[\]\!]+$'
_hltconfig_pattern = '^\d+$|^[0-9a-zA-Z\_\.\/\*\?\[\]\!]+$'
_bxlist_pattern = r'(\d+)(,\s*... | 72.8 | 363 | 0.653297 |
2db010f1fffa4867ddfbe4ed491bf375da572949 | 443 | py | Python | using_args.py | sgriffith3/2021-08-30-PYNA | af9bfc595ef0dc2385d7a4751515050b9c6eb56f | [
"MIT"
] | null | null | null | using_args.py | sgriffith3/2021-08-30-PYNA | af9bfc595ef0dc2385d7a4751515050b9c6eb56f | [
"MIT"
] | null | null | null | using_args.py | sgriffith3/2021-08-30-PYNA | af9bfc595ef0dc2385d7a4751515050b9c6eb56f | [
"MIT"
] | null | null | null | import argparse
parser = argparse.ArgumentParser()
parser.add_argument('dogname', help="Your dog's name")
parser.add_argument('-f', '--fetch', help="What should your dog fetch?")
parser.add_argument('--sleep', help="Use this if your dog is asleep", action='store_true', default=False)
args = parser.parse_args()
prin... | 23.315789 | 105 | 0.708804 |
2db0350b5e3bfbd523f1547e47aedb15bd47db65 | 7,400 | py | Python | final-exam/tic_toc_toe_messy.py | sprajjwal/spd2.3-Testing_and_Architecture | 333e4e191d51eae3f8e84b2aca2f2f63731a22aa | [
"MIT"
] | null | null | null | final-exam/tic_toc_toe_messy.py | sprajjwal/spd2.3-Testing_and_Architecture | 333e4e191d51eae3f8e84b2aca2f2f63731a22aa | [
"MIT"
] | null | null | null | final-exam/tic_toc_toe_messy.py | sprajjwal/spd2.3-Testing_and_Architecture | 333e4e191d51eae3f8e84b2aca2f2f63731a22aa | [
"MIT"
] | null | null | null | # Tic Tac Toe
# Reference: With modification from http://inventwithpython.com/chapter10.html.
# TODOs:
# 1. Find all TODO items and see whether you can improve the code.
# In most cases (if not all), you can make them more readable/modular.
# 2. Add/fix function's docstrings (use """ insted of # for function's ... | 39.572193 | 172 | 0.605405 |
2db03a4b6e1af7de6a343783df403f17227f9d16 | 5,695 | py | Python | experiments/vitchyr/probabilistic_goal_reaching/ant_full_state/exp_5_learned_and_fixed_model_normalized_ant_dimensions.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/probabilistic_goal_reaching/ant_full_state/exp_5_learned_and_fixed_model_normalized_ant_dimensions.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/probabilistic_goal_reaching/ant_full_state/exp_5_learned_and_fixed_model_normalized_ant_dimensions.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.experiments.vitchyr.probabilistic_goal_reaching.launcher import \
probabilistic_goal_reaching_experiment
from rlkit.launchers.launcher_util import run_experiment
if __name__ == "__main__":
variant = dict(
# env_id='FetchPush-v1',
obse... | 31.291209 | 90 | 0.530992 |
2db05db62f1415684885bdc2aedefd71f52e3fd8 | 23,722 | py | Python | ops/timelapse.py | jbauman214/OpticalPooledScreens_JB | ea1699d13f4975c47e25427e36e0bd910baf52c2 | [
"MIT"
] | null | null | null | ops/timelapse.py | jbauman214/OpticalPooledScreens_JB | ea1699d13f4975c47e25427e36e0bd910baf52c2 | [
"MIT"
] | null | null | null | ops/timelapse.py | jbauman214/OpticalPooledScreens_JB | ea1699d13f4975c47e25427e36e0bd910baf52c2 | [
"MIT"
] | null | null | null | import ops.utils
import networkx as nx
import pandas as pd
import numpy as np
import scipy.spatial.kdtree
from collections import Counter
from scipy.spatial.distance import cdist
from scipy.interpolate import UnivariateSpline
from statsmodels.stats.multitest import multipletests
def format_stats_wide(df_stats):
... | 38.572358 | 150 | 0.570694 |
2db07aa36083b62be018857fd1fa504b88ca9c37 | 4,933 | py | Python | redhawk/test/test_common_selector.py | spranesh/Redhawk | e2be5a6553df8449acecee2239b60c7bca0f22bc | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-10-04T11:46:32.000Z | 2017-07-09T15:23:55.000Z | redhawk/test/test_common_selector.py | spranesh/Redhawk | e2be5a6553df8449acecee2239b60c7bca0f22bc | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2016-03-07T13:16:48.000Z | 2018-03-21T00:25:04.000Z | redhawk/test/test_common_selector.py | spranesh/Redhawk | e2be5a6553df8449acecee2239b60c7bca0f22bc | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2016-04-06T08:04:34.000Z | 2020-03-17T20:59:47.000Z | #!/usr/bin/env python
""" Test the selector module in redhawk/common."""
from __future__ import absolute_import
import redhawk.common.selector as S
import redhawk.common.node as N
from .sample_last import tree
import nose
""" The sample tree that we will test the selectors on:
(define-function Factorial
((define... | 25.040609 | 71 | 0.628015 |
2db07e397a95efd9f472058ddc27520b5e23c927 | 6,859 | py | Python | bcbio/variation/genotype.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | 1 | 2015-04-08T17:43:39.000Z | 2015-04-08T17:43:39.000Z | bcbio/variation/genotype.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | bcbio/variation/genotype.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | """High level parallel SNP and indel calling using multiple variant callers.
"""
import os
import collections
import copy
from bcbio import utils
from bcbio.distributed.split import grouped_parallel_split_combine, group_combine_parts
from bcbio.pipeline import region
from bcbio.variation import gatk, gatkfilter, multi... | 43.138365 | 113 | 0.620644 |
2db08ba8d99dec02dc5cd31f39dd67fa061ece37 | 4,025 | py | Python | job-status-trigger/src/bai_job_status_trigger/__main__.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | 6 | 2020-09-29T09:03:04.000Z | 2022-03-14T06:52:25.000Z | job-status-trigger/src/bai_job_status_trigger/__main__.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | null | null | null | job-status-trigger/src/bai_job_status_trigger/__main__.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | 4 | 2020-10-01T07:49:22.000Z | 2021-06-16T19:44:12.000Z | #!/usr/bin/env python
# Copyright 2019 Amazon.com, Inc. or its 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENS... | 36.261261 | 118 | 0.737888 |
2db0ab7666db72f586acc425e6ef5f76c2d878a3 | 457 | py | Python | iceAndFire01.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | 1 | 2022-01-14T20:47:47.000Z | 2022-01-14T20:47:47.000Z | iceAndFire01.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | iceAndFire01.py | nebiutadele/2022-02-28-Alta3-Python | 9c065540bfdf432103bfffac6eae4972c9f9061a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Alta3 Research - Exploring OpenAPIs with requests"""
# documentation for this API is at
# https://anapioficeandfire.com/Documentation
import requests
AOIF = "https://www.anapioficeandfire.com/api"
def main():
## Send HTTPS GET to the API of ICE and Fire
gotresp = requests.get(AOIF)
... | 19.869565 | 55 | 0.684902 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.