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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0880bf565d2b2d269b4e1c1b000c2a306188544f | 2,852 | py | Python | dipy/reconst/tests/test_shore_odf.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | 1 | 2021-11-21T16:06:12.000Z | 2021-11-21T16:06:12.000Z | dipy/reconst/tests/test_shore_odf.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | dipy/reconst/tests/test_shore_odf.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | import numpy as np
from dipy.data import get_sphere, get_3shell_gtab, get_isbi2013_2shell_gtab
from dipy.reconst.shore import ShoreModel
from dipy.reconst.shm import QballModel, sh_to_sf
from dipy.direction.peaks import gfa, peak_directions
from numpy.testing import (assert_equal,
asser... | 37.038961 | 78 | 0.635694 |
0880c1712e7dad2015b24dcb1a57c729431391a8 | 433 | py | Python | video_creator.py | h8go/eye_tracking_rl | df84ab585b714ba7ca9cdaf634b066020f9feaf4 | [
"Apache-2.0"
] | null | null | null | video_creator.py | h8go/eye_tracking_rl | df84ab585b714ba7ca9cdaf634b066020f9feaf4 | [
"Apache-2.0"
] | null | null | null | video_creator.py | h8go/eye_tracking_rl | df84ab585b714ba7ca9cdaf634b066020f9feaf4 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
import glob
img_array = []
for filename in glob.glob('/home/hugo/saliency_maps/render/*.png'):
img = cv2.imread(filename)
height, width, layers = img.shape
size = (width,height)
img_array.append(img)
out = cv2.VideoWriter('/home/hugo/saliency_maps/render_video.avi',cv2.V... | 24.055556 | 108 | 0.709007 |
0881053710f82b3a191f63000cb2129fd68d97eb | 10,499 | py | Python | node2vec/model.py | ytchx1999/MAXP_DGL_Graph | 01ea0dc3e6f957b8c7a9b6958df02559f1866b32 | [
"MIT"
] | 21 | 2021-12-23T14:03:41.000Z | 2022-03-24T06:47:05.000Z | node2vec/model.py | ytchx1999/MAXP_DGL_Graph | 01ea0dc3e6f957b8c7a9b6958df02559f1866b32 | [
"MIT"
] | null | null | null | node2vec/model.py | ytchx1999/MAXP_DGL_Graph | 01ea0dc3e6f957b8c7a9b6958df02559f1866b32 | [
"MIT"
] | 6 | 2022-01-14T05:27:13.000Z | 2022-01-19T12:59:16.000Z | import torch
import torch.nn as nn
from torch.utils.data import DataLoader
from sklearn.linear_model import LogisticRegression
from dgl.sampling import node2vec_random_walk
from tqdm import tqdm
import dgl
class Node2vec(nn.Module):
"""Node2vec model from paper node2vec: Scalable Feature Learning for Networks <ht... | 37.09894 | 116 | 0.619202 |
08812acaabcc8b76754f09ac386ff97ccf496c71 | 79,500 | py | Python | mypy/messages.py | Jeshvina/mypy | 262fe3dc4d5d14492c6fd4009d91c555c406ac04 | [
"PSF-2.0"
] | null | null | null | mypy/messages.py | Jeshvina/mypy | 262fe3dc4d5d14492c6fd4009d91c555c406ac04 | [
"PSF-2.0"
] | null | null | null | mypy/messages.py | Jeshvina/mypy | 262fe3dc4d5d14492c6fd4009d91c555c406ac04 | [
"PSF-2.0"
] | null | null | null | """Facilities for generating error messages during type checking.
Don't add any non-trivial message construction logic to the type
checker, as it can compromise clarity and make messages less
consistent. Add such logic to this module instead. Literal messages, including those
with format args, should be defined as con... | 47.462687 | 99 | 0.577736 |
0881348a95bf795c6f71e3193b8bea1e9e98702e | 7,139 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta1_custom_resource_conversion.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta1_custom_resource_conversion.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta1_custom_resource_conversion.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1bet... | 41.994118 | 490 | 0.679647 |
088136aa51f057f220b9b5933c5d3e4b2fdaf59b | 677 | py | Python | scripts/fb/binaryTreePaths.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/fb/binaryTreePaths.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/fb/binaryTreePaths.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def binaryTreePaths(self, root: Optional[TreeNode]) -> List[str]:
res = []
def dfs(node, str... | 32.238095 | 69 | 0.481536 |
08814f86e3938c4b7100eecd30bb55ea0c2ea7ca | 637 | py | Python | py3/server/meta_list.py | goodagood/cross.lang.zmq | 3834481249cdb47cbc027804d18e43e5396da2db | [
"Apache-2.0"
] | null | null | null | py3/server/meta_list.py | goodagood/cross.lang.zmq | 3834481249cdb47cbc027804d18e43e5396da2db | [
"Apache-2.0"
] | null | null | null | py3/server/meta_list.py | goodagood/cross.lang.zmq | 3834481249cdb47cbc027804d18e43e5396da2db | [
"Apache-2.0"
] | null | null | null |
import path_setting
import s3.folder.getter as getter
def file_metas_in_folder_cache(info):
if 'path' not in info:
return {'got no path for folder ul, in function reply': True}
#get folder ul
asked = info['ask-for']
folder = getter.folder(info['path'])
cache = folder.get_cache()
met... | 21.233333 | 69 | 0.56044 |
0881acb6de85fc6482e718cab151a354e32c5f01 | 1,489 | py | Python | setup.py | statisticsnorway/SSB_Spark_tools | 95271519b0babcfbc9ec2c93503e287d776eaedb | [
"Apache-2.0"
] | 1 | 2021-06-25T06:16:50.000Z | 2021-06-25T06:16:50.000Z | setup.py | statisticsnorway/SSB_Spark_tools | 95271519b0babcfbc9ec2c93503e287d776eaedb | [
"Apache-2.0"
] | 6 | 2020-09-04T07:32:29.000Z | 2021-07-08T11:04:02.000Z | setup.py | statisticsnorway/SSB_Spark_tools | 95271519b0babcfbc9ec2c93503e287d776eaedb | [
"Apache-2.0"
] | null | null | null | import io
import os
import re
from setuptools import find_packages
from setuptools import setup
def read(filename):
filename = os.path.join(os.path.dirname(__file__), filename)
text_type = type(u"")
with io.open(filename, mode="r", encoding='utf-8') as fd:
return re.sub(text_type(r':[a-z]+:`~?(.*... | 27.072727 | 99 | 0.635997 |
0881b63be27a3300ad783537991922fec4f6df72 | 1,012 | py | Python | average-output.py | coltekin/germeval2020task1 | 8f045b8ddba17e7071c1f94f78f9667fb00e1850 | [
"MIT"
] | null | null | null | average-output.py | coltekin/germeval2020task1 | 8f045b8ddba17e7071c1f94f78f9667fb00e1850 | [
"MIT"
] | null | null | null | average-output.py | coltekin/germeval2020task1 | 8f045b8ddba17e7071c1f94f78f9667fb00e1850 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import numpy as np
from collections import Counter
labels = list()
for f in sys.argv[1:]:
with open(f, 'rt') as fp:
a = None
d = list()
lab = list()
for line in fp:
if 'Label names:' in line: continue
l, n = line.strip().spl... | 24.682927 | 59 | 0.527668 |
0881bbdf1a466b48c52658aaeb65b4991e19f47b | 607 | py | Python | kaybee/plugins/resources/action.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 2 | 2017-11-08T19:55:57.000Z | 2018-12-21T12:41:41.000Z | kaybee/plugins/resources/action.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | null | null | null | kaybee/plugins/resources/action.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 1 | 2018-10-13T08:59:29.000Z | 2018-10-13T08:59:29.000Z | """
An action for the kb registry app.
"""
import dectate
class ResourceAction(dectate.Action):
config = {
'resources': dict
}
def __init__(self, name: str):
super().__init__()
self.name = name
def identifier(self, resources):
return self.name
# noinspection P... | 18.96875 | 50 | 0.621087 |
0881da48b46891fdf4d925948e0880ef94ab896d | 1,536 | py | Python | server/routes/ranking.py | chejennifer/website | b7589f1fa288e0e4e12cd97a6bbbcb9f3fd3d833 | [
"Apache-2.0"
] | 11 | 2020-07-18T17:04:26.000Z | 2022-03-23T08:44:09.000Z | server/routes/ranking.py | chejennifer/website | b7589f1fa288e0e4e12cd97a6bbbcb9f3fd3d833 | [
"Apache-2.0"
] | 747 | 2020-06-22T16:56:45.000Z | 2022-03-31T19:04:55.000Z | server/routes/ranking.py | chejennifer/website | b7589f1fa288e0e4e12cd97a6bbbcb9f3fd3d833 | [
"Apache-2.0"
] | 33 | 2019-09-25T21:26:12.000Z | 2022-03-23T08:27:33.000Z | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 39.384615 | 74 | 0.651042 |
088230c2bcec9f1a76c4c1a17627d203d8098681 | 806 | py | Python | physipy/__init__.py | mocquin/physipy | a44805dbf4e68544c987e07564dd4a8d50be8b4c | [
"MIT"
] | 5 | 2021-01-23T11:23:07.000Z | 2022-02-28T15:38:58.000Z | physipy/__init__.py | mocquin/physipy | a44805dbf4e68544c987e07564dd4a8d50be8b4c | [
"MIT"
] | null | null | null | physipy/__init__.py | mocquin/physipy | a44805dbf4e68544c987e07564dd4a8d50be8b4c | [
"MIT"
] | 2 | 2020-11-07T20:08:08.000Z | 2021-06-09T02:58:04.000Z | # !/usr/bin/env python
# -*- coding: utf-8 -*-
from numpy import pi
from ._version import __version__
from . import quantity
from .quantity import Quantity, Dimension, make_quantity, quantify, DimensionError, dimensionify
from .quantity import check_dimension, set_favunit, dimension_and_favunit, drop_dimension, decor... | 38.380952 | 156 | 0.812655 |
0882408974c332413825aaacde71e9ae84e116eb | 2,046 | py | Python | Ideas/cricket-umpire-assistance-master/calibration/intrinsic.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | null | null | null | Ideas/cricket-umpire-assistance-master/calibration/intrinsic.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | 1 | 2021-11-11T22:15:36.000Z | 2021-11-11T22:15:36.000Z | Ideas/cricket-umpire-assistance-master/calibration/intrinsic.py | hsspratt/Nott-Hawkeye1 | 178f4f0fef62e8699f6057d9d50adfd61a851047 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import glob
GRID_X = 5
GRID_Y = 5
# termination criteria
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)
# prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0)
objp = np.zeros((GRID_X*GRID_Y,3), np.float32)
objp[:,:2] = np.mgrid[0:GRID_X,0:GRID_Y... | 29.228571 | 100 | 0.665689 |
088264cfa01028ac6057942ee29647e7cec6ef1b | 1,572 | py | Python | phase1a/case3a/case3a_analysis.py | pep8speaks/fhr-benchmark-1 | 531d518844de20ca70bd90522c573ead7aa459ce | [
"BSD-3-Clause"
] | 1 | 2020-11-24T09:56:12.000Z | 2020-11-24T09:56:12.000Z | phase1a/case3a/case3a_analysis.py | pep8speaks/fhr-benchmark-1 | 531d518844de20ca70bd90522c573ead7aa459ce | [
"BSD-3-Clause"
] | null | null | null | phase1a/case3a/case3a_analysis.py | pep8speaks/fhr-benchmark-1 | 531d518844de20ca70bd90522c573ead7aa459ce | [
"BSD-3-Clause"
] | null | null | null | """
PHASE 1A CASE 3A
This python script builds analyzes the tallies from openmc statepoint file
and uses functions in scripts/openmc_analysis.py to analyze and manipulate
the data into what is required for the FHR benchmark.
"""
###############################################################################
# ... | 28.581818 | 79 | 0.532443 |
08826a1ab15a1e0b33c2a80a8b4ce040bd03937b | 1,673 | py | Python | energyquantified/http/rate_limiter.py | energyquantified/eq-python-client | 3ca8423ae29c4a3dbd8f6289ab76a64b21dabf1c | [
"Apache-2.0"
] | 4 | 2021-03-02T10:08:37.000Z | 2021-11-12T08:18:18.000Z | energyquantified/http/rate_limiter.py | mfsorensen/eq-python-client | 6dc65f5c16881b27fc22c9f461440c327997861e | [
"Apache-2.0"
] | 23 | 2020-07-22T13:41:20.000Z | 2021-10-12T09:03:27.000Z | energyquantified/http/rate_limiter.py | mfsorensen/eq-python-client | 6dc65f5c16881b27fc22c9f461440c327997861e | [
"Apache-2.0"
] | 2 | 2020-10-01T20:18:08.000Z | 2021-03-02T10:08:41.000Z | import logging
import time
import threading
from ..time import now
log = logging.getLogger(__name__)
class RateLimiter:
"""
A rate limit that sleeps until a new call is allowed. Rate limiting
will ensure that there is always a minimum delay between each call.
Defaults to a delay of 1.0 second per ... | 26.140625 | 80 | 0.573819 |
0882a5f38a2c74a2a29d43f47e35fca874b6c0e0 | 6,310 | py | Python | Checkin_1point3acres/yimu-py3.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 14 | 2018-05-21T05:12:25.000Z | 2021-11-28T14:49:55.000Z | Checkin_1point3acres/yimu-py3.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 2 | 2018-11-28T20:59:37.000Z | 2021-07-27T22:39:33.000Z | Checkin_1point3acres/yimu-py3.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 6 | 2019-03-21T01:07:57.000Z | 2021-03-29T03:24:33.000Z | # -*- coding:utf-8 -*-
__author__ = 'cht'
'''
1point3acres bbs checkin
credits:
- https://github.com/vpzlin/PyProjZ/blob/master/examples/Python%E6%BA%90%E7%A0%81%E5%8F%82%E8%80%83/pythonmaterial/scripts-shell/python%E8%AE%BA%E5%9D%9B%E8%87%AA%E5%8A%A8%E7%AD%BE%E5%88%B0%E7%94%A8bs4%E6%A8%A1%E5%9D%97.py
- https://githu... | 38.012048 | 227 | 0.603487 |
0882be0d3c18e3c1ae94612fc5517521f26ccec7 | 918 | py | Python | db.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | 2 | 2015-05-25T10:47:30.000Z | 2017-12-12T18:15:00.000Z | db.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | db.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | from go import "github.com/syndtr/goleveldb/leveldb"
from "go/github.com/syndtr/goleveldb/leveldb" import util
class Db:
def __init__(path, recover=False):
if recover:
.db = leveldb.RecoverFile(path, None)
else:
.db = leveldb.OpenFile(path, None)
def Close():
.db.Close()
def Get(key):
... | 22.390244 | 58 | 0.636166 |
0882c348809a7fe5053eb9832989f37a0edcc3cb | 2,383 | py | Python | docs/conf.py | anton-shakh-qg/spoonbill | b54d48f053009d2d6dd8c6a023348af2d54188fe | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | anton-shakh-qg/spoonbill | b54d48f053009d2d6dd8c6a023348af2d54188fe | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | anton-shakh-qg/spoonbill | b54d48f053009d2d6dd8c6a023348af2d54188fe | [
"BSD-3-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 30.551282 | 79 | 0.655896 |
0882e743cf47ae7b1eafb13a347caf5ced500b5b | 4,594 | py | Python | backend/backend_cpp.py | uwplse/stng | ce12c2c079516df873382a5aa3c18c407833d130 | [
"MIT"
] | 14 | 2017-03-07T00:14:33.000Z | 2022-02-09T00:59:22.000Z | backend/backend_cpp.py | uwplse/stng | ce12c2c079516df873382a5aa3c18c407833d130 | [
"MIT"
] | 11 | 2016-11-22T13:14:55.000Z | 2021-12-14T00:56:51.000Z | backend/backend_cpp.py | uwplse/stng | ce12c2c079516df873382a5aa3c18c407833d130 | [
"MIT"
] | 6 | 2016-11-07T13:38:45.000Z | 2021-04-04T12:13:31.000Z | from stencil_ir import *
from assertion_to_sketch import *
import backend_halide
import parse_ir
#
# class CppBackend(object):
# def __init__(self, tree, inputs, loopvars):
# self.tree = tree
# self.inputs = inputs
# self.loopvars = loopvars
#
# def generate(self):
# from mako.t... | 42.146789 | 138 | 0.584676 |
0882eb2410d89c59e8812f3f1470147a1943d00f | 5,826 | py | Python | labs/plc-app/plc/physical_world.py | jakuta-tech/Labtainers | f674204022ad5d13ad6bccaf02a14a283470d23f | [
"Apache-2.0"
] | null | null | null | labs/plc-app/plc/physical_world.py | jakuta-tech/Labtainers | f674204022ad5d13ad6bccaf02a14a283470d23f | [
"Apache-2.0"
] | null | null | null | labs/plc-app/plc/physical_world.py | jakuta-tech/Labtainers | f674204022ad5d13ad6bccaf02a14a283470d23f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import ctypes
import mmap
import os
import sys
import struct
import time
import curses
import logging
'''
This python script represents the physical system. It interacts with
the PLC via shared memory. The physical system has two active attributes.
The first is a source of water flowing into a r... | 35.742331 | 120 | 0.647271 |
0883048d428de947ee2157d86f6282b6342f5071 | 9,320 | py | Python | src/onevision/data/datamodule.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/data/datamodule.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/data/datamodule.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Base class for all datamodules.
"""
from __future__ import annotations
from abc import ABCMeta
from abc import abstractmethod
from typing import Callable
from typing import Optional
import pytorch_lightning as pl
from torch.utils.data import DataLoader
from onevisio... | 35.30303 | 121 | 0.54206 |
088319bf398776512d5006c5f71773e1c0f93dd3 | 3,641 | py | Python | test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_auto_rest_paging_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_auto_rest_paging_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/azure/version-tolerant/Expected/AcceptanceTests/CustomPollerPagerVersionTolerant/custompollerpagerversiontolerant/aio/_auto_rest_paging_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 40.910112 | 102 | 0.687998 |
088321e3287c9fcda433410edd026f2d97f50836 | 16,636 | py | Python | dynaphopy/interface/iofile/trajectory_parsers.py | faradaymahe/DynaPhopy | 8519ff616386651acf71166bee02c1a2aef89312 | [
"MIT"
] | 76 | 2015-02-24T02:55:09.000Z | 2022-03-31T09:38:09.000Z | dynaphopy/interface/iofile/trajectory_parsers.py | jianskerh/DynaPhoPy | e1201f6de62b4303c68a7808ed19175364409586 | [
"MIT"
] | 14 | 2017-07-21T12:37:28.000Z | 2021-09-15T08:50:55.000Z | dynaphopy/interface/iofile/trajectory_parsers.py | jianskerh/DynaPhoPy | e1201f6de62b4303c68a7808ed19175364409586 | [
"MIT"
] | 38 | 2015-07-02T01:17:27.000Z | 2022-03-25T14:24:33.000Z | import os
import numpy as np
import mmap
import dynaphopy.dynamics as dyn
import warnings
# VASP OUTCAR file parser
def read_vasp_trajectory(file_name, structure=None, time_step=None,
limit_number_steps=10000000, # Maximum number of steps read (for security)
last_ste... | 34.090164 | 193 | 0.550433 |
08834e539dfdb3cad254d69d629d7d67f19096a8 | 4,342 | py | Python | test/test_v1_health_check_response.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | test/test_v1_health_check_response.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | test/test_v1_health_check_response.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Justap API
欢迎阅读 Justap Api 文档 Justap 是为移动端应用和PC端应用打造的下一代聚合支付SAAS服务平台,通过一个 SDK 即可快速的支持各种形式的应用,并且一次接口完成多个不同支付渠道的接入。平台除了支持服务商子商户模式,同时还对商家自有商户(即自己前往微信、支付宝等机构开户)提供了完整的支持。 感谢您的支持,我们将不断探索,为您提供更优质的服务!如需技术支持可前往商户中心提交工单,支持工程师会尽快与您取得联系! # 文档说明 采用 REST 风格设计。所有接口请求地址都是可预期的以及面向资源的。使用规范的 HTTP 响应代码来表示请... | 105.902439 | 3,404 | 0.770152 |
088358a7f445b9163b29373206600596546fcf13 | 18,937 | py | Python | bin/sphogs/sphog.py | qobilidop/euphony | b3fac308381a5512299b5f5b49166d6e971ed474 | [
"BSD-4-Clause"
] | null | null | null | bin/sphogs/sphog.py | qobilidop/euphony | b3fac308381a5512299b5f5b49166d6e971ed474 | [
"BSD-4-Clause"
] | null | null | null | bin/sphogs/sphog.py | qobilidop/euphony | b3fac308381a5512299b5f5b49166d6e971ed474 | [
"BSD-4-Clause"
] | null | null | null | import collections
import functools
import heapq
import itertools
import math
import os
import pickle
import random
import sys
import options
from utils import basetypes
from enum import IntEnum
from exprs import exprs
from exprs import exprtypes
from core import grammars
from enumerators import enumerators
from parse... | 40.205945 | 139 | 0.566088 |
08837e3b245eb170f9fd4bfaab6dbe78163d3034 | 6,915 | py | Python | pygsti/baseobjs/errorgenlabel.py | maij/pyGSTi | 70e83e05fa689f53550feb3914c4fac40ca4a943 | [
"Apache-2.0"
] | 73 | 2016-01-28T05:02:05.000Z | 2022-03-30T07:46:33.000Z | pygsti/baseobjs/errorgenlabel.py | 00mjk/pyGSTi | 4f8bf5337b01b7afcb7b0580b717b5d1fe281be4 | [
"Apache-2.0"
] | 113 | 2016-02-25T15:32:18.000Z | 2022-03-31T13:18:13.000Z | pygsti/baseobjs/errorgenlabel.py | 00mjk/pyGSTi | 4f8bf5337b01b7afcb7b0580b717b5d1fe281be4 | [
"Apache-2.0"
] | 41 | 2016-03-15T19:32:07.000Z | 2022-02-16T10:22:05.000Z | """
Defines the ElementaryErrorgenLabel class and supporting functionality.
"""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with ... | 48.356643 | 115 | 0.599711 |
088386e195705982463da08f3a252ee7a5df5218 | 191 | py | Python | codility.com/Max slice problem/max_slice_sum.py | Jagrmi-C/jagrmitest | 7c6cf61317972e5d7ddc4fdced0b4e5e6dd52e96 | [
"MIT"
] | null | null | null | codility.com/Max slice problem/max_slice_sum.py | Jagrmi-C/jagrmitest | 7c6cf61317972e5d7ddc4fdced0b4e5e6dd52e96 | [
"MIT"
] | null | null | null | codility.com/Max slice problem/max_slice_sum.py | Jagrmi-C/jagrmitest | 7c6cf61317972e5d7ddc4fdced0b4e5e6dd52e96 | [
"MIT"
] | null | null | null | def solution(arr):
max_ending = max_slice = arr[0]
for a in arr[1:]:
max_ending = max(a, max_ending + a)
max_slice = max(max_slice, max_ending)
return max_slice
| 21.222222 | 46 | 0.617801 |
0883e109910b7815d5ab59ba1bc70bfbf458ce62 | 1,601 | py | Python | st2reactor/st2reactor/rules/worker.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2reactor/st2reactor/rules/worker.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2reactor/st2reactor/rules/worker.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | from kombu import Connection
from oslo.config import cfg
from st2common import log as logging
from st2common.util import date as date_utils
from st2common.transport import consumers, reactor
import st2reactor.container.utils as container_utils
from st2reactor.rules.engine import RulesEngine
LOG = logging.getLogger(_... | 34.06383 | 81 | 0.70331 |
0883f31f353e993ce1fffa89d14db90330560fe0 | 726 | py | Python | signal2html/ui.py | Otto-AA/signal2html | 50f0cd37517c351c003f165a9dafdf1fb70444c7 | [
"MIT"
] | null | null | null | signal2html/ui.py | Otto-AA/signal2html | 50f0cd37517c351c003f165a9dafdf1fb70444c7 | [
"MIT"
] | null | null | null | signal2html/ui.py | Otto-AA/signal2html | 50f0cd37517c351c003f165a9dafdf1fb70444c7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""User interface for command line script
"""
import argparse
from . import __version__
from .core import process_backup
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
"-i", "--input-dir", help="Input directory", required=True
)
parser.add... | 19.105263 | 68 | 0.61708 |
08841a1d7fdfc9abe585ade93792ddd9c18c159f | 2,176 | py | Python | tests/misc/__init__.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 6 | 2018-11-07T12:41:30.000Z | 2020-04-12T18:07:03.000Z | tests/misc/__init__.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 1 | 2020-10-20T12:33:18.000Z | 2020-10-20T12:33:18.000Z | tests/misc/__init__.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 10 | 2018-11-12T06:15:19.000Z | 2021-11-18T05:45:12.000Z | """
Copyright (c) 2018-2020 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
Redistributions of source code must retain... | 155.428571 | 844 | 0.808364 |
08841ed863463f216bad59befb0958bd56ac9d78 | 798 | py | Python | tbats/abstract/__init__.py | series-temporais/tbats | 1f2e0b5e769250c8ec0604fd75ef08ebbe251d37 | [
"MIT"
] | null | null | null | tbats/abstract/__init__.py | series-temporais/tbats | 1f2e0b5e769250c8ec0604fd75ef08ebbe251d37 | [
"MIT"
] | null | null | null | tbats/abstract/__init__.py | series-temporais/tbats | 1f2e0b5e769250c8ec0604fd75ef08ebbe251d37 | [
"MIT"
] | null | null | null | from .ArrayHelper import ArrayHelper
from .MatrixBuilderInterface import MatrixBuilderInterface
from .MatrixBuilderCache import MatrixBuilderCache
from .MatrixBuilder import MatrixBuilder
from .Model import Model
from .ModelParams import ModelParams
from .Components import Components
from .ComponentMatrix import Compon... | 42 | 117 | 0.808271 |
088438af0ec6402b11d05fb16d4e78273295b423 | 3,201 | py | Python | pycompvis/compvis/tests.py | pauljxtan/pystuff | 5abceaa95f8e39e6ef9ba9e937a745f4dc3996c4 | [
"MIT"
] | null | null | null | pycompvis/compvis/tests.py | pauljxtan/pystuff | 5abceaa95f8e39e6ef9ba9e937a745f4dc3996c4 | [
"MIT"
] | null | null | null | pycompvis/compvis/tests.py | pauljxtan/pystuff | 5abceaa95f8e39e6ef9ba9e937a745f4dc3996c4 | [
"MIT"
] | null | null | null | import numpy as np
import random
import unittest
import compvis.imgform.transforms as tr
class TestTransforms(unittest.TestCase):
def test_2d_transforms_random_values(self):
# Get some random vectors and parameters
x = np.random.random(2)
t = np.random.random(2)
theta = np... | 39.518519 | 79 | 0.495783 |
0884395912de3c5921a1a9b09552e4a8a75bc898 | 262 | py | Python | cms/old_migrations/0016_auto_20170730_1541.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | cms/old_migrations/0016_auto_20170730_1541.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | cms/old_migrations/0016_auto_20170730_1541.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-07-30 15:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cms', '0015_topictable'),
]
| 17.466667 | 48 | 0.679389 |
088484b198564f3648bf5253042be560aa6bf6a6 | 2,065 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_rule.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_rule.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-storage/azure/mgmt/storage/v2018_11_01/models/management_policy_rule.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.603448 | 82 | 0.614044 |
0884c2e080c9871521d15b04f6b83b5c71372069 | 3,293 | py | Python | code/part_b/dbc_capgmyo/vgg19_capgmyo_partb1.py | DSIP-UPatras/sEMG-based-gesture-recognition-mgeorgoula | a5f8f234aebad671b38296730f46f0b637fadc64 | [
"MIT"
] | 3 | 2019-08-22T11:24:09.000Z | 2020-06-09T07:16:45.000Z | code/part_b/dbc_capgmyo/vgg19_capgmyo_partb1.py | DSIP-UPatras/sEMG-based-gesture-recognition-mgeorgoula | a5f8f234aebad671b38296730f46f0b637fadc64 | [
"MIT"
] | 1 | 2019-08-24T06:25:24.000Z | 2019-08-24T06:25:24.000Z | code/part_b/dbc_capgmyo/vgg19_capgmyo_partb1.py | DSIP-UPatras/sEMG-based-gesture-recognition-mgeorgoula | a5f8f234aebad671b38296730f46f0b637fadc64 | [
"MIT"
] | 1 | 2020-05-25T02:21:35.000Z | 2020-05-25T02:21:35.000Z | # -*- coding: utf-8 -*-
"""Make prediction and compute confusion matrix for modified input data"""
"""PART B1 : Zero electrode column of emg data"""
import numpy as np
import tensorflow as tf
import random
import os
os.environ['PYTHONHASHSEED'] = '0'
# The below is necessary for starting Numpy generat... | 29.401786 | 93 | 0.723656 |
0884e12d4d202b4937c7497b0f7b1261f2e56416 | 13,855 | py | Python | tensorflow_model_optimization/python/core/sparsity/keras/pruning_wrapper.py | moneypi/model-optimization | 1408a1ae328304f3b5d238c41479382efb015869 | [
"Apache-2.0"
] | 1 | 2021-04-09T16:05:42.000Z | 2021-04-09T16:05:42.000Z | tensorflow_model_optimization/python/core/sparsity/keras/pruning_wrapper.py | urantialife/model-optimization | 3082412346e8cd9657e53dff188534ceb1f92528 | [
"Apache-2.0"
] | null | null | null | tensorflow_model_optimization/python/core/sparsity/keras/pruning_wrapper.py | urantialife/model-optimization | 3082412346e8cd9657e53dff188534ceb1f92528 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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... | 39.360795 | 118 | 0.718946 |
0884f963562a10b0e648a5e9c068e1095de5ed77 | 2,390 | py | Python | Tools/resultsdbpy/resultsdbpy/model/partitioned_redis.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/resultsdbpy/resultsdbpy/model/partitioned_redis.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/resultsdbpy/resultsdbpy/model/partitioned_redis.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2019 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 45.961538 | 90 | 0.71841 |
0884fd0095c82d19a15afde17f3e739dd9531015 | 192 | py | Python | backend/stock/apps.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/stock/apps.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/stock/apps.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | from django.apps import AppConfig
class StockConfig(AppConfig):
name = 'stock'
def ready(self):
# noinspection PyUnresolvedReferences
import stock.signals.handlers
| 17.454545 | 45 | 0.703125 |
088514e71cfc1d7a6006620f154da99a0bfc7efa | 16,720 | py | Python | saas/renewals.py | markcstansberry/djaodjin-saas | 0749dac36c3b039334fe9f115d92b3167eea03d6 | [
"BSD-2-Clause"
] | null | null | null | saas/renewals.py | markcstansberry/djaodjin-saas | 0749dac36c3b039334fe9f115d92b3167eea03d6 | [
"BSD-2-Clause"
] | 4 | 2021-04-08T21:56:58.000Z | 2022-02-10T13:26:56.000Z | saas/renewals.py | markcstansberry/djaodjin-saas | 0749dac36c3b039334fe9f115d92b3167eea03d6 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2020, DjaoDjin inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | 46.444444 | 80 | 0.60939 |
08851d1d9b5a2e73d3e8595631ceba6278509e4f | 339 | py | Python | lumpyrem/__init__.py | rhugman/lumpyrem | 82c1d6b2f2f5dda2e6ab9a1b8c101779de5ba840 | [
"MIT"
] | 1 | 2021-05-26T06:44:26.000Z | 2021-05-26T06:44:26.000Z | lumpyrem/__init__.py | rhugman/lumpyrem | 82c1d6b2f2f5dda2e6ab9a1b8c101779de5ba840 | [
"MIT"
] | null | null | null | lumpyrem/__init__.py | rhugman/lumpyrem | 82c1d6b2f2f5dda2e6ab9a1b8c101779de5ba840 | [
"MIT"
] | 1 | 2021-05-26T07:02:31.000Z | 2021-05-26T07:02:31.000Z | # imports
from . import lumprem
from . import run
from . import lumprep
from . import lr2series
from . import pest
from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not basename(f).startswith('__')] # ... | 30.818182 | 118 | 0.734513 |
08853b6f70bd6b16e71063922e3ed5d1c40c8568 | 10,547 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/tests/21/train_0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/tests/21/train_0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/tests/21/train_0.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 36.243986 | 138 | 0.671376 |
0885409d913fa12a008719590bcc69078ada85fa | 362 | py | Python | kusanagi/sdk/lib/error.py | kusanagi/kusanagi-sdk-python | 4fd6843f39fa271afc7588b5ec58e7758b09fd61 | [
"MIT"
] | 1 | 2022-02-24T19:02:28.000Z | 2022-02-24T19:02:28.000Z | kusanagi/sdk/lib/error.py | jeronimoalbi/kusanagi-sdk-python | 4fd6843f39fa271afc7588b5ec58e7758b09fd61 | [
"MIT"
] | null | null | null | kusanagi/sdk/lib/error.py | jeronimoalbi/kusanagi-sdk-python | 4fd6843f39fa271afc7588b5ec58e7758b09fd61 | [
"MIT"
] | 1 | 2021-05-16T17:40:21.000Z | 2021-05-16T17:40:21.000Z | # Python 3 SDK for the KUSANAGI(tm) framework (http://kusanagi.io)
# Copyright (c) 2016-2021 KUSANAGI S.L. All rights reserved.
#
# Distributed under the MIT license.
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
class KusanagiError(Exce... | 30.166667 | 73 | 0.740331 |
08854716da03511d881bf00f59d79ff120a6acae | 6,465 | py | Python | oscar/lib/python2.7/site-packages/PIL/ImageChops.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | 6 | 2021-10-30T09:00:55.000Z | 2022-03-07T16:33:25.000Z | oscar/lib/python2.7/site-packages/PIL/ImageChops.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/ImageChops.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | 1 | 2022-03-16T11:33:50.000Z | 2022-03-16T11:33:50.000Z | #
# The Python Imaging Library.
# $Id$
#
# standard channel operations
#
# History:
# 1996-03-24 fl Created
# 1996-08-13 fl Added logical operations (for "1" images)
# 2000-10-12 fl Added offset method (from Image.py)
#
# Copyright (c) 1997-2000 by Secret Labs AB
# Copyright (c) 1996-2000 by Fredrik L... | 22.764085 | 80 | 0.604486 |
08854dc3656f2c574a1d14d63c71ada494efebcc | 2,685 | py | Python | sdk/resources/azure-mgmt-resource/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/resources/azure-mgmt-resource/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 35.8 | 103 | 0.611173 |
088592df3d0e6aef0ddc1ff7e5e5316bba2bc49c | 533 | py | Python | test_files/test_date.py | ak212/python-hockey-rss | 60dc71168db53dee0eaf2bf02a40a73f5e3527db | [
"MIT"
] | 1 | 2015-12-22T18:37:45.000Z | 2015-12-22T18:37:45.000Z | test_files/test_date.py | ak212/python-hockey-rss | 60dc71168db53dee0eaf2bf02a40a73f5e3527db | [
"MIT"
] | null | null | null | test_files/test_date.py | ak212/python-hockey-rss | 60dc71168db53dee0eaf2bf02a40a73f5e3527db | [
"MIT"
] | null | null | null | '''
Created on Oct 10, 2014
@author: Aaron
'''
import urllib2
from bs4 import BeautifulSoup
def page_response(link):
response = urllib2.urlopen(link)
page_source = response.read()
return BeautifulSoup(page_source)
def main():
link = "http://scores.espn.go.com/nhl/recap?gameId=400564312"
soup = pa... | 22.208333 | 76 | 0.675422 |
0885b0741de8eaeec1a9d7c5067cc388db180769 | 479 | py | Python | tests/data/expected/main/main_openapi_json_pointer/output.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 891 | 2019-07-23T04:23:32.000Z | 2022-03-31T13:36:33.000Z | tests/data/expected/main/main_openapi_json_pointer/output.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 663 | 2019-07-23T09:50:26.000Z | 2022-03-29T01:56:55.000Z | tests/data/expected/main/main_openapi_json_pointer/output.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 108 | 2019-07-23T08:50:37.000Z | 2022-03-09T10:50:22.000Z | # generated by datamodel-codegen:
# filename: json_pointer.yaml
# timestamp: 2019-07-26T00:00:00+00:00
from __future__ import annotations
from typing import Optional
from pydantic import BaseModel
class TestNestedNested(BaseModel):
test_nested_nested_string: Optional[str] = None
class TestNested(BaseMod... | 17.740741 | 52 | 0.753653 |
0885c1bff521af028ae58fa27a8bfd583d8b19d9 | 1,424 | py | Python | translators/utilites.py | aditiapratama/blenderseed | 667af6742af4a2a4b94fbad1e0732dd56724afb1 | [
"MIT"
] | 256 | 2015-03-29T06:17:49.000Z | 2022-03-31T03:45:52.000Z | translators/utilites.py | aditiapratama/blenderseed | 667af6742af4a2a4b94fbad1e0732dd56724afb1 | [
"MIT"
] | 366 | 2017-02-06T18:45:01.000Z | 2021-09-22T07:25:13.000Z | translators/utilites.py | aditiapratama/blenderseed | 667af6742af4a2a4b94fbad1e0732dd56724afb1 | [
"MIT"
] | 56 | 2015-03-09T09:02:57.000Z | 2022-01-07T15:53:43.000Z | #
# This source file is part of appleseed.
# Visit http://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2019 Jonathan Dent, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# ... | 39.555556 | 79 | 0.77177 |
0885d0cb4954f9b18134f22842e6a39f92154987 | 2,340 | py | Python | fabfile/iptable.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | fabfile/iptable.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | 4 | 2021-06-08T20:20:08.000Z | 2022-03-11T23:30:22.000Z | fabfile/iptable.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | from fabric.api import task, local
"""
These tasks are for managing iptables rules for cloudmesh. Currently
we assume there exist two custom rule chains, named:
cm_production
cm_ports
By managing rules in these chains we don't interfere with any other
administrative iptables rules on the server. The initial cre... | 29.25 | 84 | 0.661538 |
0885eb6eea789fe2563406da682f82803980742c | 6,309 | py | Python | util/data/gen/MSCTF.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/MSCTF.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/MSCTF.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | symbols = []
exports = [{'type': 'function', 'name': 'CtfImeAssociateFocus', 'address': '0x7ffb3d8d9580'}, {'type': 'function', 'name': 'CtfImeConfigure', 'address': '0x7ffb3d91e680'}, {'type': 'function', 'name': 'CtfImeConversionList', 'address': '0x7ffb3d91e690'}, {'type': 'function', 'name': 'CtfImeCreateInputConte... | 3,154.5 | 6,296 | 0.68537 |
0886033fb42c2b4f16f9685bce11bd6cbc9cf5ad | 73 | py | Python | queue/tests.py | gdi3d/move_my_files | 235d99219ea6cf31b81bd00f2a0b6a562efe0144 | [
"MIT"
] | 1 | 2018-04-02T09:01:41.000Z | 2018-04-02T09:01:41.000Z | queue/tests.py | gdi3d/move_my_files | 235d99219ea6cf31b81bd00f2a0b6a562efe0144 | [
"MIT"
] | null | null | null | queue/tests.py | gdi3d/move_my_files | 235d99219ea6cf31b81bd00f2a0b6a562efe0144 | [
"MIT"
] | null | null | null | from django.test import TestCase
import mock
# Create your tests here.
| 12.166667 | 32 | 0.780822 |
08861aae2554a965f25707128b0f7cc664a9e4fa | 15,906 | py | Python | statsmodels/graphics/boxplots.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/graphics/boxplots.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/graphics/boxplots.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | """Variations on boxplots."""
# Author: Ralf Gommers
# Based on code by Flavio Coelho and Teemu Ikonen.
from statsmodels.compat.python import zip
import numpy as np
from scipy.stats import gaussian_kde
from . import utils
__all__ = ['violinplot', 'beanplot']
def violinplot(data, ax=None, labels=None, positions=N... | 39.17734 | 81 | 0.609959 |
0886931e1922ee2fe669c6f1ba549b15e27b8570 | 5,148 | py | Python | influxdb_client/domain/check_base_links.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/check_base_links.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/check_base_links.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class Chec... | 25.869347 | 124 | 0.553225 |
0886c3a1f968c4ac18ae8d75234e359ab0e08daf | 3,156 | py | Python | tests/test_menubar.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | null | null | null | tests/test_menubar.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | null | null | null | tests/test_menubar.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | null | null | null | import os
import sys
import pytest
from porcupine import get_main_window, menubar, tabs
def test_virtual_events_calling_menu_callbacks():
called = []
menubar.get_menu("Foo").add_command(label="Bar", command=(lambda: called.append("bar")))
menubar.get_menu("Foo").add_command(
label="Baz", command... | 34.304348 | 95 | 0.704689 |
0886d8d7daae984749e9785806baa6b5aecc5286 | 6,552 | py | Python | tests/history_annual_tests.py | cfpb/regulations-parser | 9b6e1ab2dbec93a915eb6da9a2d88c723b9ac424 | [
"CC0-1.0"
] | 36 | 2015-01-05T21:17:36.000Z | 2020-04-28T21:02:55.000Z | tests/history_annual_tests.py | DalavanCloud/regulations-parser | 9b6e1ab2dbec93a915eb6da9a2d88c723b9ac424 | [
"CC0-1.0"
] | 49 | 2015-01-28T15:54:25.000Z | 2018-08-20T20:20:08.000Z | tests/history_annual_tests.py | DalavanCloud/regulations-parser | 9b6e1ab2dbec93a915eb6da9a2d88c723b9ac424 | [
"CC0-1.0"
] | 23 | 2015-01-28T15:34:18.000Z | 2021-02-20T10:53:34.000Z | from unittest import TestCase
from mock import Mock, patch
from requests import Response
from regparser.history import annual
class HistoryAnnualVolumeTests(TestCase):
@patch('regparser.history.annual.requests')
def test_init(self, requests):
response = Response()
response.status_code = 200
... | 36.603352 | 76 | 0.578297 |
088707af74fd2409feda2a3463ed10a3ba2518ea | 5,565 | py | Python | Keras_tensorflow/source/tensorflow/python/framework/test_ops.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 60 | 2017-08-05T21:47:56.000Z | 2022-03-08T21:46:29.000Z | Keras_tensorflow/source/tensorflow/python/framework/test_ops.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2017-08-22T07:17:47.000Z | 2017-09-24T22:04:19.000Z | Keras_tensorflow/source/tensorflow/python/framework/test_ops.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 11 | 2017-09-10T16:22:21.000Z | 2021-08-09T09:24:50.000Z | """Python wrappers around Brain.
This file is MACHINE GENERATED! Do not edit.
"""
import collections as _collections
from google.protobuf import text_format as _text_format
from tensorflow.core.framework import op_def_pb2 as _op_def_pb2
# Needed to trigger the call to _set_call_cpp_shape_fn.
from tensorflow.python... | 20.842697 | 78 | 0.679066 |
08871a1efc32274cf4d1baff674bd8624ebd6544 | 4,711 | py | Python | controller/utils/app.py | isabella232/flight-lab | bd666b1d2bcec6f928a2e8da9f13fd5dae21319f | [
"Apache-2.0"
] | 15 | 2018-10-18T07:50:46.000Z | 2021-10-21T03:40:55.000Z | controller/utils/app.py | google/flight-lab | bd666b1d2bcec6f928a2e8da9f13fd5dae21319f | [
"Apache-2.0"
] | 9 | 2018-09-17T23:00:02.000Z | 2019-01-22T21:08:04.000Z | controller/utils/app.py | isabella232/flight-lab | bd666b1d2bcec6f928a2e8da9f13fd5dae21319f | [
"Apache-2.0"
] | 12 | 2019-01-07T12:43:37.000Z | 2021-10-21T03:40:44.000Z | # Copyright 2018 Flight Lab 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 applicable law or agreed to in w... | 29.080247 | 79 | 0.634473 |
088736d58df26150ddfd018b5b25d95b3fd29336 | 2,992 | py | Python | write_results.py | dushesms/Writing-Aid | 45abc68760546d5f1db7f08b47d2f6795a381607 | [
"MIT"
] | null | null | null | write_results.py | dushesms/Writing-Aid | 45abc68760546d5f1db7f08b47d2f6795a381607 | [
"MIT"
] | null | null | null | write_results.py | dushesms/Writing-Aid | 45abc68760546d5f1db7f08b47d2f6795a381607 | [
"MIT"
] | null | null | null | import re
import nltk
import streamlit as st
from __init__ import annotated_text
def tokenize_input(text):
words = nltk.word_tokenize(text)
text = [word for word in words if word.isalnum()]
return text
def write_results(text:str, p:float, d:dict):
text_copy = text[:]
st.write("Percentage of mistak... | 38.358974 | 136 | 0.577874 |
088744889e2d9969e59a5e4be035d2dec8082e8c | 1,460 | py | Python | astroplant_kit/core.py | Liveshort/astroplant-kit | 0d123998bf559cd1d9e2820aeee0cc0483419aa8 | [
"BSD-2-Clause"
] | null | null | null | astroplant_kit/core.py | Liveshort/astroplant-kit | 0d123998bf559cd1d9e2820aeee0cc0483419aa8 | [
"BSD-2-Clause"
] | null | null | null | astroplant_kit/core.py | Liveshort/astroplant-kit | 0d123998bf559cd1d9e2820aeee0cc0483419aa8 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
Bootstraps the kit: sets up logging, creates the API client, and starts the kit run routine.
"""
# Make sure astroplant_kit is in the path
import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/..'))
import logging
from astroplant_client import Client
from astro... | 28.076923 | 106 | 0.678767 |
08874fdc2b378d6c40c265bee2495cf043d91245 | 8,152 | py | Python | model.py | COMoER/AI2651-Project | 4714b770a12e328abcfce93046cd1c9d85a095df | [
"Apache-2.0"
] | null | null | null | model.py | COMoER/AI2651-Project | 4714b770a12e328abcfce93046cd1c9d85a095df | [
"Apache-2.0"
] | null | null | null | model.py | COMoER/AI2651-Project | 4714b770a12e328abcfce93046cd1c9d85a095df | [
"Apache-2.0"
] | null | null | null | import numpy as np
from vad_utils import read_label_from_file,prediction_to_vad_label
from evaluate import get_metrics
import os
import matplotlib.pyplot as plt
import librosa
from tqdm import tqdm
#过零率
def sgn(x:np.ndarray):
y = np.ones(x.shape,np.int32)
y[x < 0] = 0
return y
def ZSR(frame:... | 26.727869 | 197 | 0.5855 |
08876c96f2b676b8a9a8255b7e1eb322d81871fd | 9,264 | py | Python | cloudmonkey/requester.py | disller/cloudstack-cloudmonkey | d2946df93ac361be23b194089bfd05a541c183b8 | [
"Apache-2.0"
] | 1 | 2015-02-06T04:17:25.000Z | 2015-02-06T04:17:25.000Z | cloudmonkey/requester.py | disller/cloudstack-cloudmonkey | d2946df93ac361be23b194089bfd05a541c183b8 | [
"Apache-2.0"
] | null | null | null | cloudmonkey/requester.py | disller/cloudstack-cloudmonkey | d2946df93ac361be23b194089bfd05a541c183b8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Ve... | 32.505263 | 79 | 0.592185 |
088784fdb9fdf8b6ae7a9d140b0614c4aabd9bab | 4,360 | py | Python | src/gemini3d/msis.py | gemini3d/pygemini | 4fbc15f3aa17c85de44d6f86ad37dc930644c8d1 | [
"Apache-2.0"
] | 4 | 2020-12-08T15:59:31.000Z | 2021-09-22T02:49:11.000Z | src/gemini3d/msis.py | gemini3d/pygemini | 4fbc15f3aa17c85de44d6f86ad37dc930644c8d1 | [
"Apache-2.0"
] | 8 | 2021-02-11T19:32:41.000Z | 2022-03-13T19:55:29.000Z | src/gemini3d/msis.py | gemini3d/pygemini | 4fbc15f3aa17c85de44d6f86ad37dc930644c8d1 | [
"Apache-2.0"
] | 1 | 2021-07-19T23:31:47.000Z | 2021-07-19T23:31:47.000Z | """
using MSIS Fortran executable from Python
"""
from __future__ import annotations
from pathlib import Path
import subprocess
import logging
import typing as T
import shutil
import numpy as np
import h5py
import xarray
from . import cmake
def get_msis_exe() -> T.Optional[str]:
"""
find MSIS_SETUP executa... | 35.16129 | 103 | 0.58922 |
0887a2b1ee28aba4d436c72de298f1d78a869d2b | 2,990 | py | Python | hashicorp_vault_client/hashicorp_vault_client/models/body118.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | hashicorp_vault_client/hashicorp_vault_client/models/body118.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | 2 | 2019-09-30T20:56:41.000Z | 2019-10-02T00:22:07.000Z | hashicorp_vault_client/hashicorp_vault_client/models/body118.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
HashiCorp Vault API
HTTP API that gives you full access to Vault. All API routes are prefixed with `/v1/`. # noqa: E501
OpenAPI spec version: 1.2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class... | 26.696429 | 104 | 0.539799 |
0887ab29acedf563c424cff4b062053a2859dc81 | 241 | py | Python | Exercicios do curso em video/pythonProject/pythonexercicios/ex040.py | HiCosta/Exercicios-de-Python | 1dabbe8764f6742aba1d62a9ea14705534aaf6f7 | [
"MIT"
] | null | null | null | Exercicios do curso em video/pythonProject/pythonexercicios/ex040.py | HiCosta/Exercicios-de-Python | 1dabbe8764f6742aba1d62a9ea14705534aaf6f7 | [
"MIT"
] | null | null | null | Exercicios do curso em video/pythonProject/pythonexercicios/ex040.py | HiCosta/Exercicios-de-Python | 1dabbe8764f6742aba1d62a9ea14705534aaf6f7 | [
"MIT"
] | null | null | null | nota1 = float(input('Insira a primeira nota: '))
nota2 = float(input('Insira a segunda nota: '))
media = (nota1 + nota2) / 2
if media < 5:
print('REPROVADO')
elif 5.0 <= media <= 6.9:
print('RECUPERAÇÃO')
else:
print('APROVADO')
| 24.1 | 48 | 0.626556 |
0887c5affcf4c9767026e31ba21298eee6fa7957 | 659 | py | Python | evaluation_framework/utils/memmap_utils.py | mozjay0619/ml-evaluation-framework | ab2ba55e8f4c94dd097b283aa0bce3c2854ed4e4 | [
"BSD-3-Clause"
] | null | null | null | evaluation_framework/utils/memmap_utils.py | mozjay0619/ml-evaluation-framework | ab2ba55e8f4c94dd097b283aa0bce3c2854ed4e4 | [
"BSD-3-Clause"
] | null | null | null | evaluation_framework/utils/memmap_utils.py | mozjay0619/ml-evaluation-framework | ab2ba55e8f4c94dd097b283aa0bce3c2854ed4e4 | [
"BSD-3-Clause"
] | null | null | null | from evaluation_framework.utils.data_structure_utils import is_nested_list
import numpy as np
def write_memmap(filepath, dtype, shape, array):
writable_memmap = np.memmap(filepath, dtype=dtype, mode="w+", shape=shape)
writable_memmap[:] = array[:]
del writable_memmap
def read_memmap(filepath, dtype, sh... | 24.407407 | 78 | 0.681335 |
0887ec6b9e42b580606fe8a5951d6079cbbf312e | 305 | py | Python | phr/mpitoken/validators.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/mpitoken/validators.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/mpitoken/validators.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | import ipaddress
from django.core.exceptions import ValidationError
def validate_ip(value):
for ip in value.split(','):
try:
ipaddress.ip_address(ip)
except ValueError:
raise ValidationError(
"{} no es una IP válida".format(ip)
)
| 21.785714 | 51 | 0.586885 |
0887edad94008460a082bc98b936857e2f1ffeaa | 43,570 | py | Python | py/dynesty/dynesty.py | MJKirk/dynesty | 747a6eb9557b1a24b6164887a7d45c0b8fa3eb1f | [
"MIT"
] | null | null | null | py/dynesty/dynesty.py | MJKirk/dynesty | 747a6eb9557b1a24b6164887a7d45c0b8fa3eb1f | [
"MIT"
] | null | null | null | py/dynesty/dynesty.py | MJKirk/dynesty | 747a6eb9557b1a24b6164887a7d45c0b8fa3eb1f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The top-level interface (defined natively upon initialization) that
provides access to the two main sampler "super-classes" via
:meth:`NestedSampler` and :meth:`DynamicNestedSampler`.
"""
from __future__ import (print_function, division)
import sys
import warnings
i... | 43.396414 | 130 | 0.614414 |
088822215ebfa4a66de7113a7c7cf0c8493df1d6 | 1,145 | py | Python | dev/gui/dev_gui_secB_single.py | Jhsmit/PyHDX | 34bf653743008508bb14f24ccca21ee39b5b25e3 | [
"MIT"
] | 15 | 2020-10-14T14:15:54.000Z | 2022-03-31T17:55:36.000Z | dev/gui/dev_gui_secB_single.py | Jhsmit/PyHDX | 34bf653743008508bb14f24ccca21ee39b5b25e3 | [
"MIT"
] | 145 | 2020-10-01T13:32:20.000Z | 2022-03-31T08:31:47.000Z | dev/gui/dev_gui_secB_single.py | Jhsmit/PyHDX | 34bf653743008508bb14f24ccca21ee39b5b25e3 | [
"MIT"
] | 3 | 2021-03-03T10:57:05.000Z | 2021-05-24T09:11:49.000Z | """
Reload SecB and fitted data and launch single GUI
Very much outdated
"""
from pyhdx.fileIO import read_dynamx, txt_to_np
from pyhdx import PeptideMasterTable
import pickle
import os
from pyhdx.web.apps import _single_app
from pyhdx.web.utils import reload_previous
from pyhdx.web.base import DEFAULT_COLORS, STATIC_D... | 26.022727 | 65 | 0.779913 |
08883c71ba2204c774ce7a53eba71de4a85616fd | 33 | py | Python | abc/134/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/134/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/134/A.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | r = int(input())
print(3 * r * r) | 16.5 | 16 | 0.515152 |
088858dab72c7518ebf87a94495b0f3ef1d66265 | 1,611 | py | Python | kuku/values.py | xarg/kuku | bbd906347929b768753d88ec26cf579ec17f2e0a | [
"Apache-2.0"
] | 42 | 2018-09-27T23:11:27.000Z | 2022-02-27T19:23:16.000Z | kuku/values.py | xarg/kuku | bbd906347929b768753d88ec26cf579ec17f2e0a | [
"Apache-2.0"
] | 3 | 2018-10-12T00:56:27.000Z | 2020-01-08T00:40:58.000Z | kuku/values.py | xarg/kuku | bbd906347929b768753d88ec26cf579ec17f2e0a | [
"Apache-2.0"
] | 8 | 2018-09-27T23:44:22.000Z | 2021-04-20T04:06:57.000Z | from typing import List, Mapping
import yaml
from kuku.types import Context
from kuku.utils.dict import unroll_key, merge_deep, IGNORED_LIST_ITEM
def resolve(values: List[str], value_files: List[str]) -> Context:
"""Resolve values from cli and value files"""
context: Context = {}
for value_file in val... | 31.588235 | 82 | 0.61825 |
08885c40097a1afea6ebd5fc1df08878a4680015 | 1,176 | py | Python | config.py | rissson/his-dudeness | f25cf15719693b46deffb6e1f9b9e7d27d12e198 | [
"MIT"
] | null | null | null | config.py | rissson/his-dudeness | f25cf15719693b46deffb6e1f9b9e7d27d12e198 | [
"MIT"
] | null | null | null | config.py | rissson/his-dudeness | f25cf15719693b46deffb6e1f9b9e7d27d12e198 | [
"MIT"
] | null | null | null | import os
import re
from functools import partial
import configlib
from constants import BACKGROUND_FOLDER, PLAYER_FOLDER
BG_REGEX = re.compile(r'background_(.*)\.jpg')
PLAYER_REGEX = re.compile(r'(.*).png')
def get_available(what, where):
names = []
for file in os.listdir(where):
name = os.path.b... | 22.615385 | 100 | 0.711735 |
088861abbe3913a5eba789b6b6329840b79e019a | 3,012 | py | Python | neural_sp/datasets/token_converter/wordpiece.py | Cescfangs/neural_sp | 2c12d25d2078d3dacdb80c5c367c2e90feba7b6c | [
"Apache-2.0"
] | null | null | null | neural_sp/datasets/token_converter/wordpiece.py | Cescfangs/neural_sp | 2c12d25d2078d3dacdb80c5c367c2e90feba7b6c | [
"Apache-2.0"
] | null | null | null | neural_sp/datasets/token_converter/wordpiece.py | Cescfangs/neural_sp | 2c12d25d2078d3dacdb80c5c367c2e90feba7b6c | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2018 Kyoto University (Hirofumi Inaguma)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
"""Wordpiece-level token <-> index converter."""
import codecs
import sentencepiece as spm
class Wp2idx(object):
"""Class for converting word-piece se... | 28.961538 | 72 | 0.565073 |
0888895f63f8bb8ef72f053116c296001b15dc91 | 4,968 | py | Python | orangehackathon/libs/markduplicatesLIB.py | e-mental-health/orange-hackathon | ff4ece2495fb47599e61e634f94b55c4f5692b0f | [
"Apache-2.0"
] | 1 | 2022-01-06T16:48:07.000Z | 2022-01-06T16:48:07.000Z | orangehackathon/libs/markduplicatesLIB.py | e-mental-health/orange-hackathon | ff4ece2495fb47599e61e634f94b55c4f5692b0f | [
"Apache-2.0"
] | 4 | 2019-08-30T17:28:11.000Z | 2022-02-01T08:06:08.000Z | orangehackathon/libs/markduplicatesLIB.py | e-mental-health/orange-hackathon | ff4ece2495fb47599e61e634f94b55c4f5692b0f | [
"Apache-2.0"
] | 1 | 2019-08-30T11:06:20.000Z | 2019-08-30T11:06:20.000Z | from orangecontrib.text.corpus import Corpus
from nltk import word_tokenize
import re
import sys
import datetime
from Orange.data import Table, Domain
from Orange.data import StringVariable
N = 20
EMPTYLIST = []
EMPTYSTRING = ""
FIELDNAMEDATE = "date"
FIELDNAMETEXT = "text"
FIELDNAMECOORDINATES = "coordinates"
COLUMND... | 37.353383 | 99 | 0.671699 |
0888c3486193046b650e6ab57931277fe097668f | 3,203 | py | Python | tests/test_settings/settings_4_1.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | null | null | null | tests/test_settings/settings_4_1.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | null | null | null | tests/test_settings/settings_4_1.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | null | null | null | """
Django settings for Anymail tests.
Generated by 'django-admin startproject' using Django 4.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
from pathlib i... | 25.624 | 91 | 0.70153 |
0888ca03bc3e04220b5ae7be10c3a15c83cc2df8 | 18,534 | py | Python | outlookdisablespamfilter/_version.py | jan-janssen/outlook-disable-spam-filter | 264f5fb650408abbfa5736f33ae098aefc0e7fac | [
"BSD-3-Clause"
] | null | null | null | outlookdisablespamfilter/_version.py | jan-janssen/outlook-disable-spam-filter | 264f5fb650408abbfa5736f33ae098aefc0e7fac | [
"BSD-3-Clause"
] | null | null | null | outlookdisablespamfilter/_version.py | jan-janssen/outlook-disable-spam-filter | 264f5fb650408abbfa5736f33ae098aefc0e7fac | [
"BSD-3-Clause"
] | null | null | null | # This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains th... | 33.274686 | 88 | 0.585249 |
08891c2ca47c25001e62582f58d04e913a9dbe3f | 18,501 | py | Python | scipy/fft/_realtransforms.py | clementkng/scipy | 8e40c067b64016dc344c537655f56454fd1788ba | [
"BSD-3-Clause"
] | null | null | null | scipy/fft/_realtransforms.py | clementkng/scipy | 8e40c067b64016dc344c537655f56454fd1788ba | [
"BSD-3-Clause"
] | null | null | null | scipy/fft/_realtransforms.py | clementkng/scipy | 8e40c067b64016dc344c537655f56454fd1788ba | [
"BSD-3-Clause"
] | null | null | null | import scipy.fftpack as _fftpack
from ._basic import _dispatch
from scipy._lib.uarray import Dispatchable
import numpy as np
__all__ = ['dct', 'idct', 'dst', 'idst', 'dctn', 'idctn', 'dstn', 'idstn']
@_dispatch
def dctn(x, type=2, shape=None, axes=None, norm=None, overwrite_x=False):
"""
Return multidimensio... | 31.78866 | 80 | 0.59213 |
088920f32a2c370def41b37399b38c9a58d8ac7f | 182 | py | Python | setup.py | lfranceschetti/lymph | d7fc8c0709316fb1b055487f6c3c2165d889974a | [
"MIT"
] | null | null | null | setup.py | lfranceschetti/lymph | d7fc8c0709316fb1b055487f6c3c2165d889974a | [
"MIT"
] | null | null | null | setup.py | lfranceschetti/lymph | d7fc8c0709316fb1b055487f6c3c2165d889974a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import versioneer
setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
) | 16.545455 | 39 | 0.708791 |
0889282987808a5af1de10135ee6bfb93badec51 | 1,565 | py | Python | tests/python/pants_test/pantsd/test_pantsd_integration.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/pantsd/test_pantsd_integration.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/pantsd/test_pantsd_integration.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants_test.pant... | 36.395349 | 93 | 0.70607 |
08892a0a3ab0f301b63e4a0ed5431e680ecd2a93 | 26,834 | py | Python | clean-registry-images.py | lowang-bh/registry | 39d8a4ff12b3ee2f9a1987861af3c706482cf59a | [
"MIT"
] | 6 | 2016-05-16T12:54:07.000Z | 2019-08-12T09:52:51.000Z | clean-registry-images.py | lowang-bh/registry | 39d8a4ff12b3ee2f9a1987861af3c706482cf59a | [
"MIT"
] | 1 | 2018-09-25T04:11:32.000Z | 2018-09-25T04:11:32.000Z | clean-registry-images.py | lowang-bh/registry | 39d8a4ff12b3ee2f9a1987861af3c706482cf59a | [
"MIT"
] | 7 | 2016-05-13T08:21:09.000Z | 2018-08-15T06:25:40.000Z | #!/usr/bin/env python
"""
this is a registry manipulator, can do following:
- list all images (including layers)
- delete images
- all except last N images
- all images and/or tags
#
run
registry.py -h
to get more help
#
important: after removing the tags, run the garbage collector
on your registry host:
docker-compos... | 34.446727 | 135 | 0.586383 |
08894b7a0aed3159d5e2c0179ff69384568d3129 | 3,844 | py | Python | tvl_backends/tvl-backends-nvdec/src/tvl_backends/nvdec/__init__.py | hyperfraise/tvl | 2c70282d92d9fe41953c2672fa4d81078481c4cc | [
"Apache-2.0"
] | null | null | null | tvl_backends/tvl-backends-nvdec/src/tvl_backends/nvdec/__init__.py | hyperfraise/tvl | 2c70282d92d9fe41953c2672fa4d81078481c4cc | [
"Apache-2.0"
] | null | null | null | tvl_backends/tvl-backends-nvdec/src/tvl_backends/nvdec/__init__.py | hyperfraise/tvl | 2c70282d92d9fe41953c2672fa4d81078481c4cc | [
"Apache-2.0"
] | 1 | 2020-07-12T17:55:21.000Z | 2020-07-12T17:55:21.000Z | from functools import lru_cache
import torch
import tvlnv
from tvl.backend import Backend, BackendFactory
class TorchMemManager(tvlnv.MemManager):
"""MemManager implementation which allocates Torch tensors."""
def __init__(self, device):
super().__init__()
self.device = device
self.... | 32.033333 | 105 | 0.645161 |
08894b7d173afa757c4af3caf4eb185e8d62e310 | 38,971 | py | Python | sncosmo/fitting.py | MickaelRigault/sncosmo | 6b934228f7d3734223e4f21cb590a24d76e39511 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 1 | 2021-03-22T22:24:29.000Z | 2021-03-22T22:24:29.000Z | sncosmo/fitting.py | MickaelRigault/sncosmo | 6b934228f7d3734223e4f21cb590a24d76e39511 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | sncosmo/fitting.py | MickaelRigault/sncosmo | 6b934228f7d3734223e4f21cb590a24d76e39511 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import division, print_function
from warnings import warn
import copy
import time
import numpy as np
from scipy.interpolate import InterpolatedUnivariateSpline as Spline1d
from astropy.utils import OrderedDict as odict
from astropy.extern ... | 40.384456 | 79 | 0.619358 |
08894d6d2a133be7740ccd9f63a100abab921af3 | 6,475 | py | Python | assignment2/cs231n/classifiers/cnn.py | hchen3368/cs231n | f361819bb43ab0229c8ec44d9ca2fcb92e37b62d | [
"Unlicense"
] | 10 | 2020-09-14T09:54:05.000Z | 2022-02-27T17:46:24.000Z | assignment2/cs231n/classifiers/cnn.py | hchen3368/cs231n | f361819bb43ab0229c8ec44d9ca2fcb92e37b62d | [
"Unlicense"
] | 32 | 2020-09-17T19:43:53.000Z | 2022-03-12T00:55:26.000Z | assignment2/cs231n/classifiers/cnn.py | hchen3368/cs231n | f361819bb43ab0229c8ec44d9ca2fcb92e37b62d | [
"Unlicense"
] | 4 | 2020-11-26T14:59:58.000Z | 2022-01-31T08:23:13.000Z | from builtins import object
import numpy as np
from ..layers import *
from ..fast_layers import *
from ..layer_utils import *
class ThreeLayerConvNet(object):
"""
A three-layer convolutional network with the following architecture:
conv - relu - 2x2 max pool - affine - relu - affine - softmax
The n... | 47.610294 | 84 | 0.464402 |
08899f5aaea830d7d2153084237615f72da0b38c | 2,109 | py | Python | tests/unit/types/querylang/queryset/test_dunderkeys.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-25T19:28:50.000Z | 2021-02-25T19:28:50.000Z | tests/unit/types/querylang/queryset/test_dunderkeys.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 4 | 2020-09-01T17:47:27.000Z | 2021-04-16T23:11:57.000Z | tests/unit/types/querylang/queryset/test_dunderkeys.py | deepampatel/jina | 97f9e97a4a678a28bdeacbc7346eaf7bbd2aeb89 | [
"Apache-2.0"
] | null | null | null | import pytest
from jina import Document
from jina.types.querylang.queryset.dunderkey import (
dunderkey,
dunder_init,
dunder_get,
dunder_partition,
undunder_keys,
dunder_truncate,
)
def test_dunderkey():
assert dunderkey('a', 'b', 'c') == 'a__b__c'
def test_dunder_init():
assert dun... | 27.038462 | 91 | 0.575628 |
0889af1318d81e7c884995a5de44cef566072910 | 2,858 | py | Python | heat/tests/test_nokey.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | 1 | 2020-08-15T14:29:15.000Z | 2020-08-15T14:29:15.000Z | heat/tests/test_nokey.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | heat/tests/test_nokey.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | 36.177215 | 78 | 0.654304 |
0889c88b047ecbcd266a07ac40d3e84cc1bc1c14 | 5,320 | py | Python | results/lstm/hpcp_lstm COMP 15s bs=10 ts=2000/12bin_lstm_classifier_comp.py | rddunphy/MusicClassification | efa58e474d2ff68cc24a07dd19b61e4dbac93765 | [
"MIT"
] | null | null | null | results/lstm/hpcp_lstm COMP 15s bs=10 ts=2000/12bin_lstm_classifier_comp.py | rddunphy/MusicClassification | efa58e474d2ff68cc24a07dd19b61e4dbac93765 | [
"MIT"
] | null | null | null | results/lstm/hpcp_lstm COMP 15s bs=10 ts=2000/12bin_lstm_classifier_comp.py | rddunphy/MusicClassification | efa58e474d2ff68cc24a07dd19b61e4dbac93765 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import csv
import os
import pickle
from datetime import datetime
import numpy as np
import tensorflow as tf
HPCP_PATH = "corpus/bcrm_hpcp_12bin" # Source directory
CHKPT_INTERVAL = 50 # How often to create checkpoints
INPUT_DIMENSION = 12 # Number of HPCP bins
SEQUENCE_LENGTH = 2570 # 1032... | 34.322581 | 71 | 0.619361 |
0889cb9532b91762f36e5004aeeb3b07f4696fed | 1,324 | py | Python | marathon/exceptions.py | missingcharacter/marathon-python | e1a42642c42716ef074e5b2523408bc1aa6025e2 | [
"MIT"
] | 202 | 2015-01-07T06:55:14.000Z | 2021-11-30T12:05:50.000Z | marathon/exceptions.py | missingcharacter/marathon-python | e1a42642c42716ef074e5b2523408bc1aa6025e2 | [
"MIT"
] | 213 | 2015-03-04T12:54:09.000Z | 2022-02-28T11:36:28.000Z | marathon/exceptions.py | missingcharacter/marathon-python | e1a42642c42716ef074e5b2523408bc1aa6025e2 | [
"MIT"
] | 169 | 2015-02-06T16:48:05.000Z | 2022-01-18T16:20:56.000Z | class MarathonError(Exception):
pass
class MarathonHttpError(MarathonError):
def __init__(self, response):
"""
:param :class:`requests.Response` response: HTTP response
"""
self.error_message = response.reason or ''
if response.content and 'application/json' in respons... | 25.960784 | 95 | 0.64426 |
0889cc112e87a84471cce4a1ccbd6aa9e5790367 | 615 | py | Python | experiments/doodad_test/launch_test.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/doodad_test/launch_test.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/doodad_test/launch_test.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import argparse
from rlkit.launchers.launcher_util import run_experiment
def run_task(variant):
from rlkit.core import logger
print(variant)
logger.log("Hello from script")
logger.log("variant: " + str(variant))
logger.record_tabular("value", 1)
logger.dump_tabular()
logger.log("snapshot_d... | 23.653846 | 58 | 0.702439 |
0889d0226e806a276edee8dc7da295d8c5144f3b | 2,746 | py | Python | tests/models/validators/v2_1_2/jsd_8984ea7744d98a54.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_2/jsd_8984ea7744d98a54.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_2/jsd_8984ea7744d98a54.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Update default authentication profile data model.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software withou... | 32.690476 | 78 | 0.597961 |
0889d53d1c03a3bbad9ff1f49039f8560a1be985 | 1,251 | py | Python | python/examples/background_matting.py | ducnguyenhuynh/daisykit | 1634cab5c9803df10baec761ae071f3a3713a3f6 | [
"Apache-2.0"
] | null | null | null | python/examples/background_matting.py | ducnguyenhuynh/daisykit | 1634cab5c9803df10baec761ae071f3a3713a3f6 | [
"Apache-2.0"
] | null | null | null | python/examples/background_matting.py | ducnguyenhuynh/daisykit | 1634cab5c9803df10baec761ae071f3a3713a3f6 | [
"Apache-2.0"
] | null | null | null | import cv2
import json
from daisykit.utils import get_asset_file
from daisykit import BackgroundMattingFlow
config = {
"background_matting_model": {
"model": get_asset_file("models/background_matting/erd/erdnet.param"),
"weights": get_asset_file("models/background_matting/erd/erdnet.bin")
}
}
... | 26.0625 | 79 | 0.731415 |
0889f096cc435a8ccec44181867f0063d843e08d | 1,474 | py | Python | src/onevision/file/handler/xml_handler.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/file/handler/xml_handler.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/file/handler/xml_handler.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Handler for .xml file.
"""
from __future__ import annotations
from typing import TextIO
from typing import Union
import xmltodict
from onevision.factory import FILE_HANDLERS
from onevision.file.handler.base import BaseFileHandler
__all__ = [
"XmlHandler"
]
# MAR... | 19.653333 | 69 | 0.65943 |
0889f28f6fd188e1724d50dbac6ec2367fc58e7c | 818 | py | Python | scripts/mvt_decoder.py | geoadmin/vector-forge | ce071a7f846d1a50932ea3cd3a920759c3691a5d | [
"BSD-3-Clause"
] | 8 | 2015-03-31T15:14:56.000Z | 2017-06-19T17:42:35.000Z | scripts/mvt_decoder.py | geoadmin/vector-forge | ce071a7f846d1a50932ea3cd3a920759c3691a5d | [
"BSD-3-Clause"
] | 21 | 2015-03-31T15:14:32.000Z | 2017-08-16T12:13:51.000Z | scripts/mvt_decoder.py | geoadmin/vector-forge | ce071a7f846d1a50932ea3cd3a920759c3691a5d | [
"BSD-3-Clause"
] | 1 | 2016-04-14T09:46:06.000Z | 2016-04-14T09:46:06.000Z | # -*- coding: utf-8 -*-
import argparse
import gzip
import mapbox_vector_tile
# Command-line arguments.
parser = argparse.ArgumentParser(
description='Decodes binary-encoded MVT messages in a gzipped file.')
parser.add_argument("--mvt_file", type=file, required=True,
help="Path to input file w... | 34.083333 | 76 | 0.696822 |
088a03330c433a97d0dba486adadfdbd46c00dcf | 4,737 | py | Python | datasets/dataset_utils.py | SimuJenni/Correspondences | 384c0272e438ad3e7c936f5ae78fe6154b188c54 | [
"MIT"
] | null | null | null | datasets/dataset_utils.py | SimuJenni/Correspondences | 384c0272e438ad3e7c936f5ae78fe6154b188c54 | [
"MIT"
] | null | null | null | datasets/dataset_utils.py | SimuJenni/Correspondences | 384c0272e438ad3e7c936f5ae78fe6154b188c54 | [
"MIT"
] | null | null | null | # 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 applica... | 36.72093 | 85 | 0.672366 |
088a0dc76df26180b5c93822e8e3d1b1b56d8bc3 | 18,153 | py | Python | garbageClockDebugAIO.py | mkhouse/Weekday-Garbage-Clock | d4a0e49eb527364f4b45052e69099a264ade3800 | [
"MIT"
] | null | null | null | garbageClockDebugAIO.py | mkhouse/Weekday-Garbage-Clock | d4a0e49eb527364f4b45052e69099a264ade3800 | [
"MIT"
] | 1 | 2022-02-26T02:42:46.000Z | 2022-02-26T02:42:46.000Z | garbageClockDebugAIO.py | mkhouse/Weekday-Garbage-Clock | d4a0e49eb527364f4b45052e69099a264ade3800 | [
"MIT"
] | null | null | null | """
GARBAGE CLOCK for Adafruit Matrix Portal displays current time, date, day of
week, garbage alert, and countdown to garbage day.
Requires WiFi internet access.
GARBAGE CLOCK written by Melissa House is derived from:
MOON PHASE CLOCK for Adafruit Matrix Portal: displays current time, lunar
phase and time of next moo... | 41.827189 | 177 | 0.599185 |
088a25b98d5a1706acbb1097b2a52af3e239da62 | 497 | py | Python | Assignment1.py | Jessica-Andrew/CodeDrillz | 8ddbdc293a8b990133542f428abe8276016c8330 | [
"MIT"
] | null | null | null | Assignment1.py | Jessica-Andrew/CodeDrillz | 8ddbdc293a8b990133542f428abe8276016c8330 | [
"MIT"
] | null | null | null | Assignment1.py | Jessica-Andrew/CodeDrillz | 8ddbdc293a8b990133542f428abe8276016c8330 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 29 16:58:11 2018
@author: JESSICA
"""
#Converting Temperature in Fehrenheit to Celsius.
Fahrenheit=int(raw_input("Enter a temperature in Fahrenheit:"))
Celsius=(Fahrenheit-32)*5.0/9.0
print"Temperature:", Fahrenheit,"Fahrenheit=", Celsius, "C"
#Converting temperatur... | 20.708333 | 63 | 0.726358 |
088a27215bcad1833f2b5f6b14bec0a05b93fdb2 | 2,686 | py | Python | validation-scripts/ice_validator/tests/test_availability_zone_get_param.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_availability_zone_get_param.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_availability_zone_get_param.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf8 -*-
# ============LICENSE_START=======================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ========================================... | 36.297297 | 82 | 0.635145 |
088a2c53be7d5eb3b52b76bba291d2e8036ff974 | 10,802 | py | Python | resched/scheduler.py | szaydel/resched | f5467c295c02543a4487bbae254adc0bd29c39f8 | [
"MIT"
] | 1 | 2015-11-05T13:58:59.000Z | 2015-11-05T13:58:59.000Z | resched/scheduler.py | szaydel/resched | f5467c295c02543a4487bbae254adc0bd29c39f8 | [
"MIT"
] | null | null | null | resched/scheduler.py | szaydel/resched | f5467c295c02543a4487bbae254adc0bd29c39f8 | [
"MIT"
] | null | null | null | __author__ = 'Kiril Savino'
import time
from redis import WatchError
from base import RedisBacked
import logging
format_version = '0.1.0'
class Scheduler(RedisBacked):
"""
>>> import datetime
>>> from redis import Redis
>>> from base import ContentType
>>> scheduler = Scheduler(Redis('localhost')... | 38.856115 | 140 | 0.60063 |
088a8f45ffa6c25ea943d7e9ad2b0ae42a1ff9a6 | 4,266 | py | Python | chateau/stats/__init__.py | softwerks/chateau | 6218dd623b21298a29f255e9c0d88d69651796e0 | [
"Apache-2.0"
] | null | null | null | chateau/stats/__init__.py | softwerks/chateau | 6218dd623b21298a29f255e9c0d88d69651796e0 | [
"Apache-2.0"
] | null | null | null | chateau/stats/__init__.py | softwerks/chateau | 6218dd623b21298a29f255e9c0d88d69651796e0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Softwerks LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 30.042254 | 88 | 0.682372 |
088aa39ec69c423bbf7e2ce68484990bea6a6e63 | 4,118 | py | Python | production/pygsl-0.9.5/tests/gsl_test.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/tests/gsl_test.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/tests/gsl_test.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2018-10-02T06:18:07.000Z | 2018-10-02T06:18:07.000Z | # Author : Fabian Jakobs
import types
import unittest
import pygsl.math
from pygsl._numobj import *
import pygsl._mlab as mlab
from pygsl import Float, Complex, ArrayType
fcmp = pygsl.math.fcmp
def iscomplex_default(a):
return type(a) is types.ComplexType
def iscomplex_numpy(a):
if type(a) == ArrayType:
... | 32.425197 | 79 | 0.439777 |
088acc4137317888c9edbcb74ee8792c4ec8dba3 | 1,874 | py | Python | gym-duckietown/learning/imitation/tensorflow/_layers.py | lyf44/CS4278-5478-Project-Materials | 685419c65847e72450e99586e9e0f3794369b4a3 | [
"MIT"
] | 4 | 2020-04-28T15:48:56.000Z | 2020-05-03T14:03:01.000Z | gym-duckietown/learning/imitation/tensorflow/_layers.py | lyf44/CS4278-5478-Project-Materials | 685419c65847e72450e99586e9e0f3794369b4a3 | [
"MIT"
] | null | null | null | gym-duckietown/learning/imitation/tensorflow/_layers.py | lyf44/CS4278-5478-Project-Materials | 685419c65847e72450e99586e9e0f3794369b4a3 | [
"MIT"
] | 21 | 2020-04-28T16:38:01.000Z | 2021-11-16T14:21:08.000Z | import tensorflow as tf
L2_LAMBDA = 1e-04
def _residual_block(x, size, dropout=False, dropout_prob=0.5, seed=None):
residual = tf.layers.batch_normalization(x) # TODO: check if the defaults in Tf are the same as in Keras
residual = tf.nn.relu(residual)
residual = tf.layers.conv2d(residual, filters=size,... | 46.85 | 109 | 0.655283 |
088ae024e4db687c377d0afa6849b2e1c7e6de79 | 2,879 | py | Python | tests/integration/create_token.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | tests/integration/create_token.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | tests/integration/create_token.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | import time
from uuid import uuid4
from sdc.crypto.encrypter import encrypt
from app.keys import KEY_PURPOSE_AUTHENTICATION
PAYLOAD = {
"user_id": "integration-test",
"period_str": "April 2016",
"period_id": "201604",
"collection_exercise_sid": "789",
"ru_ref": "123456789012A",
"response_id":... | 34.27381 | 88 | 0.691212 |
088ae6bf9da06ee8d42312ebed7a8a7b18b94030 | 5,109 | py | Python | divide_and_conquer/closest_pair_of_points.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | divide_and_conquer/closest_pair_of_points.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | divide_and_conquer/closest_pair_of_points.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 30.963636 | 82 | 0.678019 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.