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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0833a8011f39d861c4aea8a1a0683d30178a78d2 | 5,773 | py | Python | sdks/python/appcenter_sdk/models/Log.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/Log.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/Log.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 Log(object):
... | 26.603687 | 118 | 0.560367 |
0833bfdbb6c5851236b21655724ea2681c7cd026 | 404 | py | Python | cli/src/nsf_ssh_auth_dir/cli_user_pubkey.py | jraygauthier/nixos-sf-ssh-auth | 9259bf55d2f7491660ab3d693e36ead92f3134c2 | [
"Apache-2.0"
] | null | null | null | cli/src/nsf_ssh_auth_dir/cli_user_pubkey.py | jraygauthier/nixos-sf-ssh-auth | 9259bf55d2f7491660ab3d693e36ead92f3134c2 | [
"Apache-2.0"
] | null | null | null | cli/src/nsf_ssh_auth_dir/cli_user_pubkey.py | jraygauthier/nixos-sf-ssh-auth | 9259bf55d2f7491660ab3d693e36ead92f3134c2 | [
"Apache-2.0"
] | null | null | null | import click
import logging
@click.group()
def pubkey() -> None:
"""Ssh user public key related commands."""
pass
@pubkey.command()
def set() -> None:
"""Set a new *ssh public key* for the specified user."""
logging.info("user pubkey set")
@pubkey.command()
def print() -> None:
"""Print curren... | 19.238095 | 64 | 0.64604 |
0833d276902b23798043a09d2b63fbbef7fe7e7b | 3,763 | py | Python | salt/modules/haproxyconn.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 2 | 2017-09-17T21:10:35.000Z | 2019-08-26T03:00:12.000Z | salt/modules/haproxyconn.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/modules/haproxyconn.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 3 | 2021-02-23T08:12:48.000Z | 2021-02-23T08:13:13.000Z | # -*- coding: utf-8 -*-
'''
Support for haproxy
'''
from __future__ import generators
# Import python libs
import stat
import os
import logging
try:
import haproxy.cmds
import haproxy.conn
HAS_HAPROXY = True
except ImportError:
HAS_HAPROXY = False
log = logging.getLogger(__name__)
__virtualname__ =... | 20.015957 | 80 | 0.649748 |
083419b57907e4d6431436303ba054879c379a6b | 2,677 | py | Python | pynurbs/geometry/vector.py | trelau/pyNURBS | 5dfd082fe368c1140ce485dc64b049b32c267d1f | [
"BSD-3-Clause"
] | 2 | 2019-04-16T20:30:19.000Z | 2019-10-03T07:40:47.000Z | pynurbs/geometry/vector.py | trelau/pyNURBS | 5dfd082fe368c1140ce485dc64b049b32c267d1f | [
"BSD-3-Clause"
] | null | null | null | pynurbs/geometry/vector.py | trelau/pyNURBS | 5dfd082fe368c1140ce485dc64b049b32c267d1f | [
"BSD-3-Clause"
] | 1 | 2018-09-23T14:28:12.000Z | 2018-09-23T14:28:12.000Z | from __future__ import division
from numpy import add, array, cross, dot, float64, subtract
from numpy.linalg import norm
from pynurbs.geometry.geom import Geometry
class Vector(Geometry):
"""
Vector.
The Vector class defines direction and magnitude in Cartesian space.
:param array_like v: The vec... | 23.278261 | 72 | 0.586104 |
08341e6580e8a5b796807bba428fb8d0698f6fc2 | 6,383 | py | Python | doc/examples/cookbook/example09n.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | doc/examples/cookbook/example09n.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | doc/examples/cookbook/example09n.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2009-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unti... | 35.461111 | 100 | 0.624941 |
0834774db5366230489aef1041deb8dec3555293 | 320 | py | Python | rulesets/routes/get.py | jdr-tools/rulesets | 2bbfb280c84da6ef359d47fa6c24d34b84814eeb | [
"MIT"
] | null | null | null | rulesets/routes/get.py | jdr-tools/rulesets | 2bbfb280c84da6ef359d47fa6c24d34b84814eeb | [
"MIT"
] | 3 | 2018-12-19T08:16:15.000Z | 2018-12-19T08:16:47.000Z | rulesets/routes/get.py | jdr-tools/rulesets | 2bbfb280c84da6ef359d47fa6c24d34b84814eeb | [
"MIT"
] | null | null | null | from bson.objectid import ObjectId
from flask import jsonify, g
from ..models import Ruleset
from .blueprints import rulesets_blueprint
@rulesets_blueprint.route('/<ruleset_id>', methods = ['GET'])
def item(ruleset_id) -> tuple:
return jsonify(
title = g.ruleset.title,
description = g.ruleset.description
) | 29.090909 | 61 | 0.75 |
0834891c6b0f55cefbb54cdb15a6c7c8d3892c0f | 30,687 | py | Python | lib/mpmath/tests/test_functions.py | np0212/Capstone-Project | 424c4fd59b4d2d1b4ddbea3b78e93d7fa8575ca7 | [
"Apache-2.0"
] | 4 | 2018-07-04T17:20:12.000Z | 2019-07-14T18:07:25.000Z | lib/mpmath/tests/test_functions.py | np0212/Capstone-Project | 424c4fd59b4d2d1b4ddbea3b78e93d7fa8575ca7 | [
"Apache-2.0"
] | 7 | 2017-05-01T14:15:32.000Z | 2017-09-06T20:44:24.000Z | lib/mpmath/tests/test_functions.py | np0212/Capstone-Project | 424c4fd59b4d2d1b4ddbea3b78e93d7fa8575ca7 | [
"Apache-2.0"
] | 1 | 2018-09-03T03:02:06.000Z | 2018-09-03T03:02:06.000Z | from mpmath.libmp import *
from mpmath import *
import random
import time
import math
import cmath
def mpc_ae(a, b, eps=eps):
res = True
res = res and a.real.ae(b.real, eps)
res = res and a.imag.ae(b.imag, eps)
return res
#----------------------------------------------------------------------------
# ... | 33.648026 | 152 | 0.563659 |
08348f46180a91e8e4df84cc427ce7e690aacd69 | 26,733 | py | Python | DeepRTS/python/gui.py | cair/deep-rts | 7aa5dde0c5df10ae3a3d057e7b89641aec58e115 | [
"MIT"
] | 144 | 2018-07-13T07:47:50.000Z | 2022-03-31T06:29:50.000Z | DeepRTS/python/gui.py | cair/DeepRTS | 2ea4de0993ea0ca2677fdb36a172779db4ce7868 | [
"MIT"
] | 18 | 2019-03-29T10:37:01.000Z | 2022-03-02T12:47:34.000Z | DeepRTS/python/gui.py | cair/DeepRTS | 2ea4de0993ea0ca2677fdb36a172779db4ce7868 | [
"MIT"
] | 23 | 2018-11-02T18:12:51.000Z | 2022-02-15T20:32:18.000Z | from abc import abstractmethod
from DeepRTS import Player, UnitManager, Constants
from DeepRTS.python import RectangleManager
from DeepRTS.python import util
import contextlib
with contextlib.redirect_stdout(None):
import pygame
import os
SURFTYPE = pygame.SWSURFACE # pygame.SWSURFACE | pygame.ASYNCBLIT | py... | 44.041186 | 120 | 0.484083 |
083495ce8765b0b458ee5a24cb4f968465c1f781 | 4,205 | py | Python | app/__init__.py | alphagov/notify-frontend | 509695a0e462bef711bc73de3978aa0683f5603a | [
"MIT"
] | 1 | 2015-10-06T09:40:54.000Z | 2015-10-06T09:40:54.000Z | app/__init__.py | alphagov/notify-frontend | 509695a0e462bef711bc73de3978aa0683f5603a | [
"MIT"
] | 3 | 2015-10-15T15:12:04.000Z | 2016-06-13T15:13:41.000Z | app/__init__.py | alphagov/notify-frontend | 509695a0e462bef711bc73de3978aa0683f5603a | [
"MIT"
] | 2 | 2019-08-29T11:39:12.000Z | 2021-04-10T20:03:58.000Z | import os
from datetime import timedelta, datetime
import pytz
from flask import abort, session
from flask import Flask, request, redirect
from flask._compat import string_types
from flask_wtf.csrf import CsrfProtect
from flask_login import LoginManager
from app.notify_client.api_client import AdminAPIClient
from app... | 29.612676 | 72 | 0.6761 |
0834a3eb7bc48add8d0a507cecb60afe3b14d1ff | 1,976 | py | Python | appengine/findit/libs/meta_object.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/libs/meta_object.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/libs/meta_object.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module defines an interface of a meta structure -- ``MetaObject``.
We can consider ``MetaObject`` as inner node, and it has ``is_meta`` property.
``M... | 28.637681 | 78 | 0.644737 |
0834e604efa3a5f5512b5de85ea0a7035b388933 | 6,520 | py | Python | lenstronomy/LensModel/Profiles/spp.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/LensModel/Profiles/spp.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | lenstronomy/LensModel/Profiles/spp.py | dan-ballard/lenstronomy | bf33ba8663d24bbcffbfced80095a011c498082a | [
"MIT"
] | null | null | null | __author__ = 'sibirrer'
import numpy as np
import scipy.special as special
from lenstronomy.LensModel.Profiles.base_profile import LensProfileBase
__all__ = ['SPP']
class SPP(LensProfileBase):
"""
class for circular power-law mass distribution
"""
param_names = ['theta_E', 'gamma', 'center_x', 'cen... | 28.596491 | 139 | 0.518098 |
0834ef3e3339ff3fd8803610ae87f289a47a32b8 | 1,221 | py | Python | scripts/fb/rangeSumOfBST.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/fb/rangeSumOfBST.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/fb/rangeSumOfBST.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
Given the root node of a binary search tree and two integers low and high,
return the sum of values of all nodes with a value in the inclusive range [low, high].
Example 1:
Input: root = [10,5,15,3,7,null,18], low = 7, high = 15
Output: 32
Explanation: Nodes 7, 10, and 15 are in the range [7, 15]. 7 + 10 + 15 =... | 23.941176 | 86 | 0.563473 |
0834eff621f084472e1397f449043e0672a88c39 | 397 | py | Python | cryptopals/attacks/aes.py | kmanc/cryptopals | ac699942eec8625e160bdf1a3ae2e310617a2b8c | [
"MIT"
] | 1 | 2020-08-05T01:02:33.000Z | 2020-08-05T01:02:33.000Z | cryptopals/attacks/aes.py | kmanc/cryptopals | ac699942eec8625e160bdf1a3ae2e310617a2b8c | [
"MIT"
] | null | null | null | cryptopals/attacks/aes.py | kmanc/cryptopals | ac699942eec8625e160bdf1a3ae2e310617a2b8c | [
"MIT"
] | null | null | null | def detect_ecb(input_bytes: bytes):
"""Takes in a byte string. Determines whether or not it is likely to be an AEC-ECB-encrypted ciphertext"""
number_original_chunks = len(input_bytes) // 16
dedupe_chunks = {input_bytes[i: i + 16] for i in range(0, len(input_bytes), 16)}
result = False
if len(dedup... | 36.090909 | 110 | 0.697733 |
083504a8f93bc770c3f79481aa3701893e5daee6 | 3,940 | py | Python | metaphor/metaphor/ruwac.py | MetaphorExtractionTools/metaphor-search | ca0ba6cda8d83eb9274eb2b9d7977df4a5374b18 | [
"MIT"
] | 2 | 2018-05-25T01:47:50.000Z | 2021-11-26T19:03:07.000Z | metaphor/metaphor/ruwac.py | MetaphorExtractionTools/metaphor-search | ca0ba6cda8d83eb9274eb2b9d7977df4a5374b18 | [
"MIT"
] | null | null | null | metaphor/metaphor/ruwac.py | MetaphorExtractionTools/metaphor-search | ca0ba6cda8d83eb9274eb2b9d7977df4a5374b18 | [
"MIT"
] | 1 | 2020-02-06T16:04:07.000Z | 2020-02-06T16:04:07.000Z | # coding: utf-8
# Author: Vladimir M. Zaytsev <zaytsev@usc.edu>
import re
import lz4
import json
from sear.index import Document
from sear.index import IndexRecord
from sear.utils import StreamParser
from sear.index import DocumentIndexer
class RuwacStream(object):
DOC_OPENNING_TAG = "<text"
DOC_CLOSING_TA... | 26.802721 | 77 | 0.58934 |
0835133fc112dd34a4c00637000eb5060e227070 | 126,506 | py | Python | mypy/checker.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | mypy/checker.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | mypy/checker.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | """Mypy type checker."""
import itertools
import fnmatch
from contextlib import contextmanager
from typing import (
Dict, Set, List, cast, Tuple, TypeVar, Union, Optional, NamedTuple, Iterator
)
from mypy.errors import Errors, report_internal_error
from mypy.nodes import (
SymbolTable, Statement, MypyFile, V... | 45.180714 | 99 | 0.590051 |
08354aa2ba6c06af8ffe16e32975c523f924cc33 | 19,488 | py | Python | airflow_client/client/model/version_info.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/client/model/version_info.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/client/model/version_info.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | """
Airflow API (Stable)
# Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means t... | 74.666667 | 8,098 | 0.65158 |
08358090b737f82d042403777c7176d38e83ead3 | 6,717 | py | Python | src/lalr/grammar.py | bwhmather/python-lalr | 8a98db00c05ee7c13a5e5ec7b580d28e04cb43ca | [
"BSD-3-Clause"
] | 1 | 2018-04-11T14:45:58.000Z | 2018-04-11T14:45:58.000Z | src/lalr/grammar.py | bwhmather/python-lalr | 8a98db00c05ee7c13a5e5ec7b580d28e04cb43ca | [
"BSD-3-Clause"
] | null | null | null | src/lalr/grammar.py | bwhmather/python-lalr | 8a98db00c05ee7c13a5e5ec7b580d28e04cb43ca | [
"BSD-3-Clause"
] | null | null | null | import enum
import typing
from types import MappingProxyType
from lalr.utils import Queue
class Associativity(enum.Enum):
LEFT = "LEFT"
RIGHT = "RIGHT"
class Production(object):
__slots__ = ("name", "symbols")
name: str
symbols: typing.Tuple[str, ...]
def __init__(self, name, symbols):
... | 30.393665 | 79 | 0.611583 |
08358c1b6660dc97cc5740dff65198c790bd81bd | 6,581 | py | Python | glimix_core/_util/solve.py | Horta/limix-inference | 1ba102fc544f8d307412d361b574da9d4c166f8e | [
"MIT"
] | 7 | 2019-06-10T12:27:25.000Z | 2021-07-23T16:36:04.000Z | glimix_core/_util/solve.py | Horta/limix-inference | 1ba102fc544f8d307412d361b574da9d4c166f8e | [
"MIT"
] | 12 | 2017-05-28T10:59:31.000Z | 2021-05-17T20:11:00.000Z | glimix_core/_util/solve.py | Horta/limix-inference | 1ba102fc544f8d307412d361b574da9d4c166f8e | [
"MIT"
] | 5 | 2017-08-27T20:13:45.000Z | 2022-02-14T06:33:14.000Z | import warnings
from numpy import (
abs as npy_abs,
absolute,
arctan2,
array,
atleast_1d,
cos,
divide,
errstate,
full_like,
isfinite,
logical_and,
logical_not,
maximum,
minimum,
nan_to_num,
sign,
sin,
sqrt,
zeros,
)
from numpy.linalg import Li... | 22.083893 | 87 | 0.467862 |
0835979d94dfe759f5bdb74941048e7bfdda2ea0 | 3,206 | py | Python | utils/license-headers.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | null | null | null | utils/license-headers.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | 1 | 2020-05-06T01:34:25.000Z | 2020-05-06T01:34:25.000Z | utils/license-headers.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | 1 | 2020-05-06T01:31:18.000Z | 2020-05-06T01:31:18.000Z | # Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
"""Script which verifies that all source files have a license header.
Has two modes: 'fix' and 'check'. 'fix' fixes p... | 31.742574 | 84 | 0.605427 |
0835a52a3ca9868ed6a9f44e4eeb12302a915931 | 620 | py | Python | binary-search/0704-binary-search(2、模板写法1,选左中位数).py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | 1 | 2021-01-10T17:03:21.000Z | 2021-01-10T17:03:21.000Z | binary-search/0704-binary-search(2、模板写法1,选左中位数).py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | null | null | null | binary-search/0704-binary-search(2、模板写法1,选左中位数).py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | 1 | 2021-07-25T07:53:14.000Z | 2021-07-25T07:53:14.000Z | from typing import List
class Solution:
def search(self, nums: List[int], target: int) -> int:
size = len(nums)
if size == 0:
return -1
left = 0
right = size - 1
while left < right:
mid = (left + right) >> 1
if nums[mid] < target:
... | 25.833333 | 58 | 0.443548 |
0835b6604536cd468caf7d5d2807bb8b80fecde4 | 3,750 | py | Python | MachineLearning/Softmax Regression/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | MachineLearning/Softmax Regression/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | MachineLearning/Softmax Regression/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # 2018-9-30
# Softmax Regression
# python 机器学习算法
import numpy as np
import random as rd
import matplotlib.pyplot as plt
def loadData(file_name, skip=True):
"""
载入数据
"""
feature = []
label = []
file = open(file_name)
for line in file.readlines():
feature_tmp = []
label_tmp = ... | 24.834437 | 76 | 0.503733 |
0835cba2a746783f0327e7e329246daa0ca1e12f | 2,876 | py | Python | 2. Tennis/model.py | 3ZadeSSG/Reinforcement-Learning-Agents | 162534fc6caab32089b8f3d3b2761a9bad1e707f | [
"MIT"
] | null | null | null | 2. Tennis/model.py | 3ZadeSSG/Reinforcement-Learning-Agents | 162534fc6caab32089b8f3d3b2761a9bad1e707f | [
"MIT"
] | null | null | null | 2. Tennis/model.py | 3ZadeSSG/Reinforcement-Learning-Agents | 162534fc6caab32089b8f3d3b2761a9bad1e707f | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
def hidden_init(layer):
fan_in = layer.weight.data.size()[0]
lim = 1. / np.sqrt(fan_in)
return (-lim, lim)
class Actor(nn.Module):
"""Actor (Policy) Model."""
def __init__(self, state_size, action_size, seed, f... | 34.238095 | 89 | 0.606398 |
0835f48e30c60c7ed3b63988ed28a7b88f503d69 | 171 | py | Python | curso_scrapy/1_conceptos_basicos/iteradores.py | cristian-rincon/escuela-datascience | a9c805ccd30d66bfb4d17f652e9ce2f20a8978fb | [
"MIT"
] | null | null | null | curso_scrapy/1_conceptos_basicos/iteradores.py | cristian-rincon/escuela-datascience | a9c805ccd30d66bfb4d17f652e9ce2f20a8978fb | [
"MIT"
] | 32 | 2021-02-12T02:48:30.000Z | 2022-03-13T01:56:19.000Z | curso_scrapy/1_conceptos_basicos/iteradores.py | cristian-rincon/escuela-datascience | a9c805ccd30d66bfb4d17f652e9ce2f20a8978fb | [
"MIT"
] | null | null | null | my_list = [i for i in range(1,6)]
my_iter = iter(my_list)
# print(type(my_iter))
# Extraer los elementos
print(next(my_iter))
print(next(my_iter))
print(next(my_iter)) | 15.545455 | 33 | 0.71345 |
08363123f0667dd210c580d5326659bd47f95566 | 2,214 | py | Python | utils/render.py | gosticks/body-pose-animation | eb1b5876a845f277d43bfc18dcd48c4a9c694c06 | [
"MIT"
] | null | null | null | utils/render.py | gosticks/body-pose-animation | eb1b5876a845f277d43bfc18dcd48c4a9c694c06 | [
"MIT"
] | null | null | null | utils/render.py | gosticks/body-pose-animation | eb1b5876a845f277d43bfc18dcd48c4a9c694c06 | [
"MIT"
] | null | null | null |
from typing import List, Set, Dict, Tuple, Optional
import numpy as np
import trimesh
import pyrender
def render_model(
scene,
model,
model_out,
**kwargs
):
return render_model_geometry(
scene=scene,
faces=model.faces,
vertices=model_out.vertices.detach().cpu().numpy().squ... | 28.753247 | 102 | 0.638211 |
08363b26e4978d3019e782a95f2feccedb3bed19 | 1,956 | py | Python | ben-costume/test-button.py | craighagan/HalloweenCostumes | 39656eabd26b2ee5b52252e9ca28f6cd201de919 | [
"Artistic-2.0"
] | null | null | null | ben-costume/test-button.py | craighagan/HalloweenCostumes | 39656eabd26b2ee5b52252e9ca28f6cd201de919 | [
"Artistic-2.0"
] | null | null | null | ben-costume/test-button.py | craighagan/HalloweenCostumes | 39656eabd26b2ee5b52252e9ca28f6cd201de919 | [
"Artistic-2.0"
] | null | null | null | #!/usr/bin/env python
import glob
from time import sleep, time
import os
import RPi.GPIO as GPIO
from itertools import cycle
last_played_time = 0
sound_interval = 60
GPIO.setmode(GPIO.BCM)
class Button(object):
def __init__(self, pin, directory, name=None):
self._pin = pin
self._directory = directory
self._n... | 23.853659 | 85 | 0.715235 |
08367e0b2b90d08ad8ceffd9432c903bc2f63e5a | 2,616 | py | Python | terrascript/ovh/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/ovh/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/ovh/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/ovh/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class ovh_cloud_network_private(terrascript.Resource):
pass
class ovh_cloud_network_private_subnet(terras... | 17.917808 | 88 | 0.813073 |
0836a607c97a872f60b94a038a50c578ff743d72 | 27,619 | py | Python | edb/schema/inheriting.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | edb/schema/inheriting.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | edb/schema/inheriting.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | 34.828499 | 79 | 0.571708 |
0836b99d5134db7bfa03ead07661a9523b50ee67 | 2,830 | py | Python | strings/knuth_morris_pratt.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | strings/knuth_morris_pratt.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | strings/knuth_morris_pratt.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... | 28.585859 | 100 | 0.641696 |
0836c436ef933a72b5869831ce7769d1e922e0e6 | 7,370 | py | Python | protos/gen/python/protos/public/uac/Workspace_pb2.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | protos/gen/python/protos/public/uac/Workspace_pb2.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | protos/gen/python/protos/public/uac/Workspace_pb2.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: uac/Workspace.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _sy... | 35.776699 | 805 | 0.757938 |
0836c8947e8e5d30a990a975e1a5f78db5ebffd3 | 6,772 | py | Python | src/test/tests/databases/correlation.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/correlation.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/correlation.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# MODES: serial
# CLASSES: nightly
#
# Test Case: correlation.py
#
# Tests: Tests database correlations and automatic correlation.
#
# Programmer: Brad Whitlock
# Date: Mon Mar 22 08:28:25 PDT 2004
#
# Modifications:
# ... | 31.497674 | 89 | 0.733904 |
0836e5d23dd69f195723b40c0e4b9e8465e9f75d | 545 | py | Python | examples/demo_boct_extraction.py | working-girl/OCT-Converter | b6fc55075d2e8551440637825489a9c3ba2a0a9e | [
"MIT"
] | 81 | 2019-07-30T04:51:20.000Z | 2022-03-14T19:50:43.000Z | examples/demo_boct_extraction.py | working-girl/OCT-Converter | b6fc55075d2e8551440637825489a9c3ba2a0a9e | [
"MIT"
] | 34 | 2019-08-26T10:05:50.000Z | 2022-03-31T14:42:21.000Z | examples/demo_boct_extraction.py | working-girl/OCT-Converter | b6fc55075d2e8551440637825489a9c3ba2a0a9e | [
"MIT"
] | 30 | 2019-09-14T05:11:22.000Z | 2022-03-03T20:38:51.000Z | from oct_converter.readers import BOCT
from pathlib import Path
examplefile = r'5640_OD_V_1x1_0_0000012.OCT'
filepath = Path(__file__).with_name(examplefile)
print(filepath)
boct = BOCT(filepath)
oct_volumes = boct.read_oct_volume(diskbuffered=True) # returns an OCT volume with additional metadata if available
for oct... | 45.416667 | 115 | 0.774312 |
08370bec7564e143025e6b9a4db4db9a1e5da951 | 1,295 | bzl | Python | third_party/org_scala_lang.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/org_scala_lang.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/org_scala_lang.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | load(":import_external.bzl", import_external = "import_external")
def dependencies():
import_external(
name = "org_scala_lang_scala_compiler",
artifact = "org.scala-lang:scala-compiler:2.12.13",
artifact_sha256 = "ea971e004e2f15d3b7569eee8b559f220e23b9993e688bbe986f97938d1dc9f9",
sr... | 38.088235 | 93 | 0.70888 |
0837172a994ac96a0beb0371d170c2bbe7f4a742 | 24,263 | py | Python | python_modules/dagster/dagster/core/host_representation/external.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/host_representation/external.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/host_representation/external.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import warnings
from collections import OrderedDict
from typing import TYPE_CHECKING, List, Optional, Sequence, Union
from dagster import check
from dagster.core.definitions.events import AssetKey
from dagster.core.definitions.run_request import InstigatorType
from dagster.core.definitions.schedule_definition import D... | 35.680882 | 105 | 0.694679 |
08373938d54db63eb8739fd7c6d13b0d28a96132 | 18,694 | py | Python | curio_base/scripts/lx16a_driver_test.py | Jenifen/curio | fa08e5abba54622170ca3f4c1f5933e97f51a022 | [
"BSD-3-Clause"
] | 34 | 2020-02-05T07:26:27.000Z | 2022-03-12T09:38:56.000Z | curio_base/scripts/lx16a_driver_test.py | Jenifen/curio | fa08e5abba54622170ca3f4c1f5933e97f51a022 | [
"BSD-3-Clause"
] | 10 | 2020-01-28T13:14:52.000Z | 2022-03-12T11:07:08.000Z | curio_base/scripts/lx16a_driver_test.py | Jenifen/curio | fa08e5abba54622170ca3f4c1f5933e97f51a022 | [
"BSD-3-Clause"
] | 16 | 2020-04-10T05:03:51.000Z | 2022-02-21T05:04:49.000Z | #!/usr/bin/env python
#
# Software License Agreement (BSD-3-Clause)
#
# Copyright (c) 2019 Rhys Mainwaring
# 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. Redistri... | 31.631134 | 83 | 0.698031 |
0837ac742c5b88d078309547bf8deb83474e71b7 | 13,034 | py | Python | src/sagemaker/pytorch/model.py | jeniyat/sagemaker-python-sdk | 9002d6f1b499b226902c5c60d7d15a7bf4e48c5c | [
"Apache-2.0"
] | null | null | null | src/sagemaker/pytorch/model.py | jeniyat/sagemaker-python-sdk | 9002d6f1b499b226902c5c60d7d15a7bf4e48c5c | [
"Apache-2.0"
] | null | null | null | src/sagemaker/pytorch/model.py | jeniyat/sagemaker-python-sdk | 9002d6f1b499b226902c5c60d7d15a7bf4e48c5c | [
"Apache-2.0"
] | null | null | null | # Copyright 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://aws.amazon.com/apache2.0/
#
# or in the "license" file accompan... | 43.885522 | 110 | 0.651757 |
0837d1ddd6198909e59b893d84940aa7b4129c08 | 8,692 | py | Python | pbc/scf/x2c.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/scf/x2c.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | pbc/scf/x2c.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import time
from functools import reduce
import copy
import numpy
import scipy.linalg
from pyscf import lib
from pyscf.gto import mole
from pyscf.lib import logger
from pyscf.scf import x2c
from pyscf.pbc import gto as pbcgto
from pyscf.pbc.df import aft
from pyscf.pbc.df import aft_jk
from pysc... | 34.220472 | 85 | 0.561206 |
0837e7a835a053139feb19738e4c37f0cbab9b45 | 1,101 | py | Python | queue.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | 2 | 2015-05-25T10:47:30.000Z | 2017-12-12T18:15:00.000Z | queue.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | queue.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | from go import sync
class BigQueue:
def __init__():
.d = {}
.next_in = 1
.next_out = 1
.mutex = go_new(sync.Mutex)
.chan = None
def Send(x):
.mutex.Lock()
with defer .mutex.Unlock():
.d[.next_in] = x
.next_in += 1
if .chan:
.chan.Send(True)
.chan = No... | 18.35 | 59 | 0.487738 |
0837e973511dcc5551d4289e3d98792543fdd25a | 5,025 | py | Python | sdk/python/pulumi_consul/get_agent_config.py | pulumi/pulumi-consul | 5b66c5b97fda6b5433bfb4d4173c999e468c82e8 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2019-11-12T12:21:18.000Z | 2021-07-31T08:17:22.000Z | sdk/python/pulumi_consul/get_agent_config.py | pulumi/pulumi-consul | 5b66c5b97fda6b5433bfb4d4173c999e468c82e8 | [
"ECL-2.0",
"Apache-2.0"
] | 38 | 2019-11-21T15:19:33.000Z | 2022-03-31T15:24:11.000Z | sdk/python/pulumi_consul/get_agent_config.py | pulumi/pulumi-consul | 5b66c5b97fda6b5433bfb4d4173c999e468c82e8 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-11-24T12:23:13.000Z | 2021-12-06T17:33:31.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 33.059211 | 142 | 0.642786 |
0837f7767fde71ac4e061018cd60d468b61e87c6 | 6,667 | py | Python | cupy/manipulation/dims.py | umitanuki/chainer | 225c56b233e684ff4855451d2af4c2fb66915f21 | [
"MIT"
] | null | null | null | cupy/manipulation/dims.py | umitanuki/chainer | 225c56b233e684ff4855451d2af4c2fb66915f21 | [
"MIT"
] | null | null | null | cupy/manipulation/dims.py | umitanuki/chainer | 225c56b233e684ff4855451d2af4c2fb66915f21 | [
"MIT"
] | 1 | 2018-11-18T00:36:51.000Z | 2018-11-18T00:36:51.000Z | import cupy
from cupy import internal
def atleast_1d(*arys):
"""Converts arrays to arrays with dimensions >= 1.
Args:
arys (tuple of arrays): Arrays to be converted. All arguments must be
cupy.ndarray objects. Only zero-dimensional array is affected.
Returns:
If there are onl... | 29.370044 | 78 | 0.566672 |
08381196ab768881c2be96c2aac67b5bc95607ac | 1,394 | py | Python | src/plot_6.py | Mehul2203/dashboard1-group-e | 300d8db176c24c46008e01147818cfeca04470c9 | [
"MIT"
] | null | null | null | src/plot_6.py | Mehul2203/dashboard1-group-e | 300d8db176c24c46008e01147818cfeca04470c9 | [
"MIT"
] | 3 | 2022-03-06T03:10:56.000Z | 2022-03-19T23:04:23.000Z | src/plot_6.py | Mehul2203/dashboard1-group-e | 300d8db176c24c46008e01147818cfeca04470c9 | [
"MIT"
] | 3 | 2022-02-17T00:34:20.000Z | 2022-03-26T03:09:21.000Z | from ctypes import alignment
from dash import Dash, dcc, html, Input, Output
import plotly.express as px
import pandas as pd
import dash_bootstrap_components as dbc
# Read data
df = pd.read_csv('../data/Superstore.csv')
subcat = sorted(df['Sub-Category'].unique())
# Create instance of app
app = Dash(__name__,external... | 29.041667 | 96 | 0.685796 |
0838129050aaf8ea8014ee7fe3018a13aba9be7f | 1,106 | py | Python | glomtf/pairwisedist.py | Rishit-dagli/GLOM-TensorFlow | 9d8e4562414eedf69161a4c799e66798dee762b1 | [
"Apache-2.0"
] | 31 | 2021-03-27T06:59:18.000Z | 2022-01-07T09:27:00.000Z | glomtf/pairwisedist.py | Rishit-dagli/GLOM-TensorFlow | 9d8e4562414eedf69161a4c799e66798dee762b1 | [
"Apache-2.0"
] | 2 | 2021-03-27T06:02:26.000Z | 2021-03-27T06:50:36.000Z | glomtf/pairwisedist.py | Rishit-dagli/GLOM-TensorFlow | 9d8e4562414eedf69161a4c799e66798dee762b1 | [
"Apache-2.0"
] | 3 | 2021-04-25T14:13:19.000Z | 2021-10-06T05:10:27.000Z | import tensorflow as tf
def pairwise_dist(A, B):
"""Write an algorithm that computes batched the p-norm distance between each pair of two collections of row vectors.
We use the euclidean distance metric.
For a matrix A [m, d] and a matrix B [n, d] we expect a matrix of
pairwise distances here D [m, n... | 32.529412 | 126 | 0.653707 |
0838193c51bdcd51e13cef3e9f6c68e85db4fab0 | 973 | py | Python | examples/filters.py | tumb1er/fffw | 6e0e51c22aecfdb12044ef51521857a790c1fc16 | [
"MIT"
] | 4 | 2020-10-30T03:16:57.000Z | 2021-09-13T12:55:27.000Z | examples/filters.py | tumb1er/fffw | 6e0e51c22aecfdb12044ef51521857a790c1fc16 | [
"MIT"
] | 108 | 2020-02-09T07:55:09.000Z | 2022-03-28T00:54:19.000Z | examples/filters.py | tumb1er/fffw | 6e0e51c22aecfdb12044ef51521857a790c1fc16 | [
"MIT"
] | 3 | 2020-02-09T07:51:28.000Z | 2021-02-17T16:29:19.000Z | from dataclasses import dataclass
from fffw.encoding import *
from fffw.graph import VIDEO
from fffw.wrapper import param
@dataclass
class Scale2Ref(VideoFilter):
"""
Filter that scales one stream to fit another one.
"""
# define filter name
filter = 'scale2ref'
# configure input and output e... | 22.627907 | 59 | 0.708119 |
0838208f3cb9fda1385ad6dcd487016501bd3c7c | 44 | py | Python | tests/routers/activities/__init__.py | upwork/python-upwork | 63aa5ebfd91cbf6f019437358f3e89d0e3bc29aa | [
"Apache-2.0"
] | 150 | 2015-05-28T19:09:33.000Z | 2022-03-22T16:56:33.000Z | tests/routers/activities/__init__.py | Top-coder-1/python-upwork | 0671e1e90cc2d770be4f96ae4bfb21bc111dd122 | [
"Apache-2.0"
] | 38 | 2015-05-28T18:45:55.000Z | 2021-06-14T09:34:27.000Z | tests/routers/activities/__init__.py | upwork/python-upwork-oauth2 | 5a10558a5c4479e7aea462fec0193db40ecde9e2 | [
"Apache-2.0"
] | 61 | 2015-09-01T06:39:25.000Z | 2021-11-09T12:29:57.000Z | """Unit test package for upwork routers."""
| 22 | 43 | 0.704545 |
0838916d0085df9aa944a5966b60ce91f7a1273e | 560 | py | Python | chapter02-array-seq/metro_lat_long.py | cgDeepLearn/fluentpython | ff89ad5a7da59c71f57b6392c9f5d5c6178e0475 | [
"MIT"
] | 1 | 2019-11-23T05:57:02.000Z | 2019-11-23T05:57:02.000Z | chapter02-array-seq/metro_lat_long.py | cgDeepLearn/fluentpython | ff89ad5a7da59c71f57b6392c9f5d5c6178e0475 | [
"MIT"
] | null | null | null | chapter02-array-seq/metro_lat_long.py | cgDeepLearn/fluentpython | ff89ad5a7da59c71f57b6392c9f5d5c6178e0475 | [
"MIT"
] | 1 | 2019-11-23T05:57:43.000Z | 2019-11-23T05:57:43.000Z | metro_areas = [
('Tokyo', 'JP', 36.933, (35.689722, 139.691667)), # <1>
('Delhi NCR', 'IN', 21.935, (28.613889, 77.208889)),
('Mexico City', 'MX', 20.142, (19.433333, -99.133333)),
('New York-Newark', 'US', 20.104, (40.808611, -74.020386)),
('Sao Paulo', 'BR', 19.649, (-23.547778, -46.635833)),
]
... | 43.076923 | 63 | 0.528571 |
0838aef71ff30db519e68b822179063086c6ce4b | 60,309 | py | Python | superset/connectors/druid/models.py | devsisters/incubator-superset | f9b547688d0e65946d1c55ba91ef1cf8f34d3c59 | [
"Apache-2.0"
] | null | null | null | superset/connectors/druid/models.py | devsisters/incubator-superset | f9b547688d0e65946d1c55ba91ef1cf8f34d3c59 | [
"Apache-2.0"
] | 2 | 2019-11-11T11:16:32.000Z | 2019-12-13T07:12:09.000Z | superset/connectors/druid/models.py | devsisters/incubator-superset | f9b547688d0e65946d1c55ba91ef1cf8f34d3c59 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.931415 | 88 | 0.566847 |
0838c36955e7d13c1864d9036835d988c097d585 | 3,321 | py | Python | artificial/searches/base.py | lucasdavid/artificial | 18199591f926dd369e9de0cd2285c395506f0a55 | [
"MIT"
] | 3 | 2016-03-20T02:51:01.000Z | 2020-05-30T20:25:46.000Z | artificial/searches/base.py | lucasdavid/artificial | 18199591f926dd369e9de0cd2285c395506f0a55 | [
"MIT"
] | null | null | null | artificial/searches/base.py | lucasdavid/artificial | 18199591f926dd369e9de0cd2285c395506f0a55 | [
"MIT"
] | 1 | 2019-10-21T05:43:46.000Z | 2019-10-21T05:43:46.000Z | """Artificial Searches Base"""
# Author: Lucas David -- <ld492@drexel.edu>
# License: MIT (c) 2016
import abc
import six
from artificial import agents
@six.add_metaclass(abc.ABCMeta)
class SearchBase(object):
"""Search Base Template.
Defines the basic contract shared between search algorithms,
includ... | 28.384615 | 79 | 0.61879 |
0838caa0854aa82d0a9bbcae9b89327aaed2d20c | 3,900 | py | Python | intersight/models/iam_end_point_role_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_end_point_role_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_end_point_role_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class IamEndPointRoleList(object):
"""
NOTE: This c... | 25.324675 | 84 | 0.555128 |
0838cf2471f064ba57947ae3c8ff26495d788373 | 534 | py | Python | samples/line_sample.py | ppaanngggg/FinChart | 0f0daf8befe013d14b2035e6c8a63c61b9e3cea9 | [
"MIT"
] | 2 | 2019-05-15T11:36:19.000Z | 2020-08-15T07:48:28.000Z | samples/line_sample.py | ppaanngggg/FinChart | 0f0daf8befe013d14b2035e6c8a63c61b9e3cea9 | [
"MIT"
] | null | null | null | samples/line_sample.py | ppaanngggg/FinChart | 0f0daf8befe013d14b2035e6c8a63c61b9e3cea9 | [
"MIT"
] | null | null | null | import random
from FinChart import Wizard
wizard = Wizard()
view = wizard.addView("line", _view_stretch=3)
view.addLine(
"line",
[i for i in range(100)],
[random.random() for _ in range(100)],
_color="red",
_show_value=True,
)
view.addLine(
"line_2",
[i for i in range(50)],
[random.ran... | 21.36 | 74 | 0.649813 |
0838e4209b2c54b0e20a462bdf4817c88432c273 | 615 | py | Python | rlkit/envs/ant_changing_dir_wrapper.py | BZSROCKETS/cemrl | 499939535794ee027f08b8a4133eefd0bb7abe14 | [
"MIT"
] | null | null | null | rlkit/envs/ant_changing_dir_wrapper.py | BZSROCKETS/cemrl | 499939535794ee027f08b8a4133eefd0bb7abe14 | [
"MIT"
] | null | null | null | rlkit/envs/ant_changing_dir_wrapper.py | BZSROCKETS/cemrl | 499939535794ee027f08b8a4133eefd0bb7abe14 | [
"MIT"
] | 2 | 2022-01-21T07:49:27.000Z | 2022-02-05T13:23:18.000Z | import numpy as np
from meta_rand_envs.ant_changing_dir import AntChangingDirEnv
from . import register_env
@register_env('ant-changing-dir')
class AntChangingDirWrappedEnv(AntChangingDirEnv):
def __init__(self, n_tasks=2, *args, **kwargs):
super(AntChangingDirWrappedEnv, self).__init__(*args, **kwargs)
... | 30.75 | 71 | 0.707317 |
083913a6ba26f1eccbfcf9c98d6835eb819c76c3 | 724 | py | Python | PyAsync/__init__.py | riki-nitdgp/PyAsynchronous | 7fd364341037d2ac20e343ee0cab4a077eb49435 | [
"MIT"
] | 1 | 2021-01-21T19:07:26.000Z | 2021-01-21T19:07:26.000Z | PyAsync/__init__.py | riki-nitdgp/PyAsynchronous | 7fd364341037d2ac20e343ee0cab4a077eb49435 | [
"MIT"
] | null | null | null | PyAsync/__init__.py | riki-nitdgp/PyAsynchronous | 7fd364341037d2ac20e343ee0cab4a077eb49435 | [
"MIT"
] | null | null | null | from .application import Application, run_app
from .request import Request
from .helpers import get_query_params
from .response import Response, make_success_response, make_error_response
from .exceptions import (
HTTPBadRequest,
HTTPForbidden,
HTTPInternalServerError,
HTTPUnAuthorized,
HTTPUnProces... | 23.354839 | 74 | 0.732044 |
0839274b6f16d106fc1ddcffc2f3bad14ba73ce0 | 274 | py | Python | whodis/javascript_filters.py | userdel/whodis | 04c36a26e9634439fbc81dc3799546b1ab4bcfff | [
"MIT"
] | null | null | null | whodis/javascript_filters.py | userdel/whodis | 04c36a26e9634439fbc81dc3799546b1ab4bcfff | [
"MIT"
] | 4 | 2020-03-24T16:31:40.000Z | 2021-06-01T23:03:03.000Z | whodis/javascript_filters.py | userdel/whodis | 04c36a26e9634439fbc81dc3799546b1ab4bcfff | [
"MIT"
] | null | null | null | JAVASCRIPT_FILTERS = [
"pids",
"lib-cov",
".nyc-output",
".grunt",
"bower-components",
"node_modules",
"jspm_packages",
"typings",
".npm",
".eslintcache",
".env",
"node_repl_history",
".cache",
".next",
".nuxt",
]
| 15.222222 | 24 | 0.49635 |
083927bda92a0212e82aee5e67034d479414aaf6 | 9,766 | py | Python | vmware_nsx/services/lbaas/nsx_v3/member_mgr.py | huihongxiao/vmware-nsx | 00530f9207958df66211e5dba008764106fc82c3 | [
"Apache-2.0"
] | null | null | null | vmware_nsx/services/lbaas/nsx_v3/member_mgr.py | huihongxiao/vmware-nsx | 00530f9207958df66211e5dba008764106fc82c3 | [
"Apache-2.0"
] | null | null | null | vmware_nsx/services/lbaas/nsx_v3/member_mgr.py | huihongxiao/vmware-nsx | 00530f9207958df66211e5dba008764106fc82c3 | [
"Apache-2.0"
] | 1 | 2019-06-21T18:07:53.000Z | 2019-06-21T18:07:53.000Z | # Copyright 2017 VMware, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 47.407767 | 78 | 0.575875 |
08392d9f9c679ab37b63476caeb42f91a8f22893 | 12,108 | py | Python | BioNetGen-2.3.0/source_Atomizer/SBMLparser/rulifier/stdgraph.py | joseph-hellerstein/RuleBasedProgramming | fb88118ab764035979dc7c2bf8c89a7b484e4472 | [
"MIT"
] | null | null | null | BioNetGen-2.3.0/source_Atomizer/SBMLparser/rulifier/stdgraph.py | joseph-hellerstein/RuleBasedProgramming | fb88118ab764035979dc7c2bf8c89a7b484e4472 | [
"MIT"
] | null | null | null | BioNetGen-2.3.0/source_Atomizer/SBMLparser/rulifier/stdgraph.py | joseph-hellerstein/RuleBasedProgramming | fb88118ab764035979dc7c2bf8c89a7b484e4472 | [
"MIT"
] | null | null | null | import networkx as nx
import stateTransitionDiagram as std
import argparse
import math
import StringIO
def ato_write_gml(graph, fileName, labelGraphics):
def writeDict(gml, key, label, contents, space, labelGraphics=None):
gml.write('{1}{0} [\n'.format(key, space))
for subKey in contents:
... | 40.225914 | 150 | 0.581351 |
08394e6911598c3a3eee47661972cbfd657428d3 | 591 | py | Python | python/grains/grains.py | Sterver47/exercism-solutions | a5f73fcffbd4437cea8f6108a08c163a78cf1706 | [
"MIT"
] | 1 | 2022-02-09T11:06:35.000Z | 2022-02-09T11:06:35.000Z | python/grains/grains.py | Sterver47/exercism-solutions | a5f73fcffbd4437cea8f6108a08c163a78cf1706 | [
"MIT"
] | null | null | null | python/grains/grains.py | Sterver47/exercism-solutions | a5f73fcffbd4437cea8f6108a08c163a78cf1706 | [
"MIT"
] | null | null | null | """Functions for calculating the number of grains on 64 squares on a chessboard."""
def square(number: int) -> int:
"""Calculate the number of grains.
:param number: int - the number of square on the chessboard.
:return: int - the number of grains on the given square number.
"""
if not 1 <= numb... | 24.625 | 83 | 0.649746 |
08398562b0fe5e58a63dd759dc5ed0e15752356e | 3,221 | py | Python | inference_VSR.py | Serene99-09/mmediting | be49e33650627ac26fdd065fbbaff66f726e3fde | [
"Apache-2.0"
] | null | null | null | inference_VSR.py | Serene99-09/mmediting | be49e33650627ac26fdd065fbbaff66f726e3fde | [
"Apache-2.0"
] | null | null | null | inference_VSR.py | Serene99-09/mmediting | be49e33650627ac26fdd065fbbaff66f726e3fde | [
"Apache-2.0"
] | null | null | null | import os
import argparse
import glob
import cv2
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input', type=str, default='Nezha_input_480_Trim.mp4', help='Input video')
################ args for tools/test.py ################
parser.add_argument('--config', default='config... | 51.126984 | 153 | 0.664079 |
08399a58609110130b2406ce3c8d0ac08ca6bd73 | 4,722 | py | Python | typeclasses/containers/container.py | PWBaboons/Ithir | 3a65ab1e866b10ffd568f6b15a66576e1853f47d | [
"MIT"
] | null | null | null | typeclasses/containers/container.py | PWBaboons/Ithir | 3a65ab1e866b10ffd568f6b15a66576e1853f47d | [
"MIT"
] | null | null | null | typeclasses/containers/container.py | PWBaboons/Ithir | 3a65ab1e866b10ffd568f6b15a66576e1853f47d | [
"MIT"
] | 1 | 2018-09-12T02:06:04.000Z | 2018-09-12T02:06:04.000Z | """
Container objects. Bags, chests, etc.
"""
from typeclasses.objects import Object as DefaultObject
from server.utils.arx_utils import ArxCommand
from evennia.commands import cmdset
from typeclasses.mixins import LockMixins
# noinspection PyUnresolvedReferences
class CmdChestKey(ArxCommand):
"""
Grants a ... | 35.238806 | 112 | 0.613935 |
0839b42d35349174d08c3df79a88c6cf26c4f18d | 1,824 | py | Python | relevance_feedback_query.py | eugene-yang/TAR-Content-Moderation | 33a06a5beae98be6bea882caf82d0cee66948321 | [
"Apache-2.0"
] | null | null | null | relevance_feedback_query.py | eugene-yang/TAR-Content-Moderation | 33a06a5beae98be6bea882caf82d0cee66948321 | [
"Apache-2.0"
] | null | null | null | relevance_feedback_query.py | eugene-yang/TAR-Content-Moderation | 33a06a5beae98be6bea882caf82d0cee66948321 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from libact.base.interfaces import QueryStrategy, ContinuousModel
class RelevanceFeedbackSampling(QueryStrategy):
def __init__(self, *args, **kwargs):
super(RelevanceFeedbackSampling, self).__init__( *args, **kwargs )
if self.dataset.get_num_of_labels() > 2:
raise... | 36.48 | 104 | 0.622807 |
0839c3091d3b232c6eb1c80a2dc0c590c30e41b0 | 4,711 | py | Python | tests/test_bake_project.py | aft-analytics/cookiecutter-poetry | 7577c44a0cceb8f524064f46d5aca56453d4a34e | [
"MIT"
] | 5 | 2021-04-06T06:32:30.000Z | 2022-02-20T07:40:45.000Z | tests/test_bake_project.py | aft-analytics/cookiecutter-poetry | 7577c44a0cceb8f524064f46d5aca56453d4a34e | [
"MIT"
] | 8 | 2020-12-31T11:45:38.000Z | 2021-08-08T15:03:33.000Z | tests/test_bake_project.py | aft-analytics/cookiecutter-poetry | 7577c44a0cceb8f524064f46d5aca56453d4a34e | [
"MIT"
] | 1 | 2021-08-11T03:02:32.000Z | 2021-08-11T03:02:32.000Z | from contextlib import contextmanager
import shlex
import os
import sys
import subprocess
import yaml
import datetime
from cookiecutter.utils import rmtree
from click.testing import CliRunner
import importlib
@contextmanager
def inside_dir(dirpath):
"""
Execute code from inside the given directory
:para... | 33.411348 | 85 | 0.703885 |
0839db8650c93785b6e6778c98a0b0171f4bb614 | 1,502 | py | Python | tryalgo/sudoku.py | xcarcelle/tryalgo | c159fbffbea0a4e8b70e8898c31c62c7e08a3865 | [
"MIT"
] | null | null | null | tryalgo/sudoku.py | xcarcelle/tryalgo | c159fbffbea0a4e8b70e8898c31c62c7e08a3865 | [
"MIT"
] | null | null | null | tryalgo/sudoku.py | xcarcelle/tryalgo | c159fbffbea0a4e8b70e8898c31c62c7e08a3865 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Solving Sudoku
# jill-jenn vie et christoph durr - 2014-2018
from tryalgo.dancing_links import dancing_links
__all__ = ["sudoku"]
# snip{
N = 3 # global constants
N2 = N * N
N4 = N2 * N2
# sets
def assignation(r, c, v): return r * N4 + c * N2 + v
def row(a)... | 22.088235 | 63 | 0.523968 |
0839e35369e5dba1bf34356fe58c7d1b0458a708 | 2,115 | py | Python | src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/Plugins/Cfg/CfgEncryptedGenerator.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | import logging
import Bcfg2.Server.Plugin
from Bcfg2.Server.Plugins.Cfg import CfgGenerator, SETUP
try:
from Bcfg2.Encryption import ssl_decrypt, EVPError
have_crypto = True
except ImportError:
have_crypto = False
logger = logging.getLogger(__name__)
def passphrases():
section = "cfg:encryption"
i... | 33.046875 | 94 | 0.624113 |
083a0f307e1cf8c349646f78516c673f0ddc95c0 | 6,587 | py | Python | pycondor/read_ftr.py | kant/pycondor | ee87854504e8f4023feda860d8a9ddbecc7a70da | [
"BSD-3-Clause"
] | 6 | 2015-04-17T08:25:30.000Z | 2020-04-11T23:58:16.000Z | pycondor/read_ftr.py | kant/pycondor | ee87854504e8f4023feda860d8a9ddbecc7a70da | [
"BSD-3-Clause"
] | 3 | 2015-12-22T07:40:02.000Z | 2019-01-21T15:07:00.000Z | pycondor/read_ftr.py | kant/pycondor | ee87854504e8f4023feda860d8a9ddbecc7a70da | [
"BSD-3-Clause"
] | 6 | 2015-11-13T18:55:22.000Z | 2020-03-12T19:32:56.000Z | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import click
import os
import traceback
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from construct import Struct, Bytes, UBInt8, ULInt32, LFloat32, Array, CString, String, PascalString
from condor_dll import NaviConDLL
from constants_windows im... | 36.192308 | 157 | 0.625019 |
083a7578bf6ebd6639daa44840907951c7255ef0 | 9,315 | py | Python | hw04/httpd.py | dmryutov/otus-python-0319 | c825166ff16a2e26f3d99e375b13c9e2e8ada49b | [
"MIT"
] | null | null | null | hw04/httpd.py | dmryutov/otus-python-0319 | c825166ff16a2e26f3d99e375b13c9e2e8ada49b | [
"MIT"
] | null | null | null | hw04/httpd.py | dmryutov/otus-python-0319 | c825166ff16a2e26f3d99e375b13c9e2e8ada49b | [
"MIT"
] | null | null | null | import argparse
from datetime import datetime
import logging
import mimetypes
import multiprocessing
import os
import socket
from urllib.parse import unquote, urlparse
DOCUMENT_ROOT = 'www'
"""Default files root directory"""
CHUNK_SIZE = 1024
"""Request chunk size"""
MAX_REQUEST_SIZE = 8192
"""Maximum request size""... | 29.760383 | 96 | 0.587654 |
083a8857a439f0a247212b91fd446d5e02717ef3 | 2,420 | py | Python | autotest/gdrivers/jp2metadata.py | chambbj/gdal | 3d56aecb5b8e9890dae8f560acd099992e707d12 | [
"MIT"
] | 1 | 2015-02-16T16:51:38.000Z | 2015-02-16T16:51:38.000Z | autotest/gdrivers/jp2metadata.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | autotest/gdrivers/jp2metadata.py | theduckylittle/gdal | 61be261cae524582ba28bceebb027cc1e967e0ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test JP2 metadata support.
# Author: Even Rouault < even dot rouault @ mines-paris dot org >
#
###################################################################... | 32.266667 | 79 | 0.609091 |
083ab0198eab517a70d838e3fe350e2146854a05 | 14,379 | py | Python | dim7/isom_utilities.py | ehaka/lie-algebra-gradings | 8dda645034f2c18d06cb55459c71d34b690e2b53 | [
"MIT"
] | null | null | null | dim7/isom_utilities.py | ehaka/lie-algebra-gradings | 8dda645034f2c18d06cb55459c71d34b690e2b53 | [
"MIT"
] | null | null | null | dim7/isom_utilities.py | ehaka/lie-algebra-gradings | 8dda645034f2c18d06cb55459c71d34b690e2b53 | [
"MIT"
] | null | null | null | from itertools import combinations, product
from sage.categories.sets_cat import Sets
from sage.combinat.permutation import Permutations
from sage.structure.parent import Parent
from sage.structure.richcmp import op_EQ, op_NE, richcmp
def int_to_az(i):
r"""
Convert a natural number to a word with letters a...... | 33.832941 | 90 | 0.532652 |
083ab6f46212f9fad67a931ecc0a3c1ad9ff20fd | 19,941 | py | Python | openaq.py | ValerieLangat/Productization-and-Cloud-Sprint-Challenge | d5ba42e859578f1769d487debeba44dbdbc9f04b | [
"MIT"
] | null | null | null | openaq.py | ValerieLangat/Productization-and-Cloud-Sprint-Challenge | d5ba42e859578f1769d487debeba44dbdbc9f04b | [
"MIT"
] | null | null | null | openaq.py | ValerieLangat/Productization-and-Cloud-Sprint-Challenge | d5ba42e859578f1769d487debeba44dbdbc9f04b | [
"MIT"
] | null | null | null | """Simple openaq to only depend on json, math, and requests (no dfs/plots)."""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import requests
import math
class ApiError(Exception):
pass
class API(object):
"""Generic API wrapper object.
"""
def __init__(self, **kwargs):
... | 40.695918 | 124 | 0.500727 |
083acec751f1042ff48d954946237671a3107c69 | 6,018 | py | Python | util/data/gen/WINHTTP.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/WINHTTP.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/WINHTTP.dll.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | symbols = []
exports = [{'type': 'function', 'name': 'DllCanUnloadNow', 'address': '0x7ffb32b97ad0'}, {'type': 'function', 'name': 'DllGetClassObject', 'address': '0x7ffb32b97ae0'}, {'type': 'function', 'name': 'Private1', 'address': '0x7ffb32b980d0'}, {'type': 'function', 'name': 'SvchostPushServiceGlobals', 'address'... | 3,009 | 6,005 | 0.700399 |
083aef13517ebf773a18cb3a3b9fc03409707ecc | 8,680 | py | Python | pybargain_protocol/helpers/bc_api.py | LaurentMT/pybargain_protocol | 3b4c6040ec3562ce6921f917c97a9931d5c6e5de | [
"MIT"
] | 1 | 2015-06-30T15:34:41.000Z | 2015-06-30T15:34:41.000Z | pybargain_protocol/helpers/bc_api.py | LaurentMT/pybargain_protocol | 3b4c6040ec3562ce6921f917c97a9931d5c6e5de | [
"MIT"
] | null | null | null | pybargain_protocol/helpers/bc_api.py | LaurentMT/pybargain_protocol | 3b4c6040ec3562ce6921f917c97a9931d5c6e5de | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Version: 0.0.1
Python library for the bargaining protocol
'''
import re
import json
import urllib2
import random
from bitcoin.transaction import deserialize
from pybargain_protocol.constants import MAINNET, TESTNET
from pybargain_protocol.exceptions import ThirdPartyServiceUnreachableError, I... | 38.923767 | 105 | 0.62523 |
083b5a669602f0c2a680548e98e0b159140f1396 | 4,160 | py | Python | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_07_01_preview/aio/operations/_resource_provider_common_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_07_01_preview/aio/operations/_resource_provider_common_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_07_01_preview/aio/operations/_resource_provider_common_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 45.217391 | 133 | 0.715625 |
083b6d421e31df2f9a3d81647aa9881f8e04a1a4 | 7,259 | py | Python | example/miso.py | narahahn/continuous_measurement | 2391f712880ec18957dc5491af6cd3665b97e086 | [
"MIT"
] | null | null | null | example/miso.py | narahahn/continuous_measurement | 2391f712880ec18957dc5491af6cd3665b97e086 | [
"MIT"
] | null | null | null | example/miso.py | narahahn/continuous_measurement | 2391f712880ec18957dc5491af6cd3665b97e086 | [
"MIT"
] | null | null | null | """
Continuous measurement of room impulse responses using a moving microphone.
* point source in a free-field
* omnidirectional microphone moving on a circle at a constant speed
* captured signal computed by using fractional delay filters + oversampling
* system identification based on spatial interpolation of a give... | 29.75 | 101 | 0.647197 |
083b7c95fbf880d9f3e2141a0e6a3c7eb323ebb7 | 6,655 | py | Python | tests/api/test_api_storage.py | HuseinA/neo-obs | 1504405ded600a7798f50cc5ce9dfd90fd4fa83b | [
"MIT"
] | 3 | 2018-04-11T03:33:41.000Z | 2019-11-13T11:37:33.000Z | tests/api/test_api_storage.py | HuseinA/neo-obs | 1504405ded600a7798f50cc5ce9dfd90fd4fa83b | [
"MIT"
] | 17 | 2018-07-03T11:17:08.000Z | 2021-08-31T02:24:46.000Z | tests/api/test_api_storage.py | BiznetGIO/neo-obs | 7ced70a34fc53a7dc266aacde7fe4fbe2ce6ae49 | [
"MIT"
] | 7 | 2018-08-30T06:45:35.000Z | 2021-06-04T04:31:19.000Z | import requests
import pytest
import mock
import tempfile
import os
from datetime import datetime
from obs.libs import bucket
from werkzeug.datastructures import FileStorage
from obs.api.app.controllers.api import storage
def fake_resource(access_key, secret_key):
resouce = mock.Mock()
resouce.Bucket.return_... | 30.668203 | 85 | 0.630654 |
083b82728eb6f4ed0d1fd617b4d9052f4ba2a60a | 1,548 | py | Python | alipay/aop/api/domain/ExchangeVoucherModify.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ExchangeVoucherModify.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ExchangeVoucherModify.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class ExchangeVoucherModify(object):
def __init__(self):
self._voucher_detail_url = None
self._voucher_name = None
@property
def voucher_detail_url(self):
return self._... | 27.642857 | 87 | 0.631783 |
083b856669a07db1c511a5c11eebe69e83ae53ab | 5,264 | py | Python | visualization.py | RookieDay/object_detection | 8ad733706298ae7a0749b520184c3370b836db7a | [
"MIT"
] | 2 | 2019-05-09T18:08:41.000Z | 2020-04-30T12:26:46.000Z | visualization.py | RookieDay/object_detection | 8ad733706298ae7a0749b520184c3370b836db7a | [
"MIT"
] | null | null | null | visualization.py | RookieDay/object_detection | 8ad733706298ae7a0749b520184c3370b836db7a | [
"MIT"
] | null | null | null | # Copyright 2017 Paul Balanca. 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... | 41.777778 | 100 | 0.496391 |
083bd13b2ac78afd0e356d06bbddce84626a4b08 | 6,624 | py | Python | mplStyle/MplSubStyle.py | khanfarhan10/mplStyle | f657f54c6c101811b8bf0c44f4b16d4f4926685d | [
"BSD-3-Clause"
] | 39 | 2015-03-08T23:05:01.000Z | 2022-02-07T16:03:35.000Z | mplStyle/MplSubStyle.py | khanfarhan10/mplStyle | f657f54c6c101811b8bf0c44f4b16d4f4926685d | [
"BSD-3-Clause"
] | null | null | null | mplStyle/MplSubStyle.py | khanfarhan10/mplStyle | f657f54c6c101811b8bf0c44f4b16d4f4926685d | [
"BSD-3-Clause"
] | 23 | 2015-03-08T19:56:59.000Z | 2021-07-15T15:16:26.000Z | #===========================================================================
#
# Copyright (c) 2014, California Institute of Technology.
# U.S. Government Sponsorship under NASA Contract NAS7-03001 is
# acknowledged. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modific... | 35.612903 | 78 | 0.63587 |
083bd8963e95aa78a01f3a3bdf09050e8a98b425 | 20,723 | py | Python | utils/flop_count/jit_analysis.py | kevin-ssy/ViP | dedc27616ab24e78685e21291d1e6ef9b56de889 | [
"MIT"
] | 107 | 2021-07-12T03:31:39.000Z | 2022-03-31T10:11:57.000Z | utils/flop_count/jit_analysis.py | kevin-ssy/ViP | dedc27616ab24e78685e21291d1e6ef9b56de889 | [
"MIT"
] | 7 | 2021-07-20T03:32:59.000Z | 2021-11-18T07:40:46.000Z | utils/flop_count/jit_analysis.py | kevin-ssy/ViP | dedc27616ab24e78685e21291d1e6ef9b56de889 | [
"MIT"
] | 10 | 2021-08-07T06:56:24.000Z | 2022-01-20T01:03:59.000Z | import logging
import typing
import warnings
from collections import Counter
from copy import copy
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Set, Tuple, Union, Iterable
import torch
import torch.nn as nn
from torch import Tensor
from torch.jit import TracerWarning, _get_trace_gra... | 38.234317 | 120 | 0.61965 |
083bebc97e00ee871c67c059681372d8d39d0a32 | 65,418 | py | Python | zerver/lib/test_classes.py | Chizycodes/zulip | f5a65846a8296dc697639e97ba34815e7cc2376d | [
"Apache-2.0"
] | null | null | null | zerver/lib/test_classes.py | Chizycodes/zulip | f5a65846a8296dc697639e97ba34815e7cc2376d | [
"Apache-2.0"
] | null | null | null | zerver/lib/test_classes.py | Chizycodes/zulip | f5a65846a8296dc697639e97ba34815e7cc2376d | [
"Apache-2.0"
] | null | null | null | import base64
import os
import re
import shutil
import subprocess
import tempfile
import urllib
from contextlib import contextmanager
from datetime import timedelta
from typing import (
Any,
Callable,
Collection,
Dict,
Iterable,
Iterator,
List,
Mapping,
Optional,
Sequence,
Se... | 38.617473 | 103 | 0.641995 |
083bf0fd13c67773b49b18b9cea046b0f2d37de6 | 1,941 | py | Python | sciencer/utils/csv_callback.py | SciencerIO/sciencer-toolkit | f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9 | [
"MIT"
] | 2 | 2022-03-28T17:27:21.000Z | 2022-03-29T22:27:15.000Z | sciencer/utils/csv_callback.py | SciencerIO/sciencer-toolkit | f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9 | [
"MIT"
] | null | null | null | sciencer/utils/csv_callback.py | SciencerIO/sciencer-toolkit | f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9 | [
"MIT"
] | 1 | 2022-03-28T14:47:53.000Z | 2022-03-28T14:47:53.000Z | """WriteToCSV Callbacks
"""
import csv
from typing import Dict
from sciencer.core import Callbacks
from sciencer.models import Paper
def convert_to_row(paper: Paper) -> Dict[str, str]:
"""Converts a paper into a dictionary
Args:
paper (Paper): paper to conver
Returns:
Di... | 35.290909 | 93 | 0.625966 |
083c10944115e77e9926955ea5caa88599d3bcbb | 4,014 | py | Python | tests/merge_datacubes_test.py | iceye-ltd/icecube | 9db3005f2ac2d6fb43d5562c0646527eb4ab6700 | [
"MIT"
] | 47 | 2021-08-25T09:40:29.000Z | 2022-02-16T06:52:01.000Z | tests/merge_datacubes_test.py | iceye-ltd/icecube | 9db3005f2ac2d6fb43d5562c0646527eb4ab6700 | [
"MIT"
] | 7 | 2021-09-08T09:37:59.000Z | 2022-01-04T10:12:45.000Z | tests/merge_datacubes_test.py | iceye-ltd/icecube | 9db3005f2ac2d6fb43d5562c0646527eb4ab6700 | [
"MIT"
] | 4 | 2021-09-01T12:40:23.000Z | 2021-12-07T11:00:19.000Z | #!/usr/bin/env python
"""
The script tests the merging of SARCubes and LabelsCube
"""
import os
import shutil
from pathlib import Path
from icecube.bin.generate_cube import IceyeProcessGenerateCube
res_abspath = os.path.join(Path(__file__).parent, "resources")
grd_raster_dir = os.path.join(res_abspath, "grd_stack")... | 32.370968 | 87 | 0.761086 |
083c48eed45c1cb170145d9c578d7d7650b185bc | 5,961 | py | Python | lite-hrnet/configs/coco_base.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | lite-hrnet/configs/coco_base.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | lite-hrnet/configs/coco_base.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 30.106061 | 79 | 0.455628 |
083c6a81d8e138581ebea86665bbdd6c16c1caf8 | 16,843 | py | Python | colour/plotting/tests/test_common.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | colour/plotting/tests/test_common.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | colour/plotting/tests/test_common.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Defines the unit tests for the :mod:`colour.plotting.common` module.
"""
import matplotlib.pyplot as plt
import numpy as np
import os
import shutil
import tempfile
import unittest
from functools import partial
from matplotlib.pyplot import Axes, Figure
import colour
from colour.colorimetry... | 29.601054 | 79 | 0.618773 |
083c6ac1d02b45af0a2f35aebfa0691e1449ee3c | 7,251 | py | Python | replay.py | mengli11235/Bootstrapped-DQN-with-NP | 5dd7da17dd1930e81a248b3e2dc30431905434ae | [
"Apache-2.0"
] | null | null | null | replay.py | mengli11235/Bootstrapped-DQN-with-NP | 5dd7da17dd1930e81a248b3e2dc30431905434ae | [
"Apache-2.0"
] | null | null | null | replay.py | mengli11235/Bootstrapped-DQN-with-NP | 5dd7da17dd1930e81a248b3e2dc30431905434ae | [
"Apache-2.0"
] | null | null | null | import numpy as np
import time
# This function was mostly pulled from
# https://github.com/fg91/Deep-Q-Learning/blob/master/DQN.ipynb
class ReplayMemory:
"""Replay Memory that stores the last size=1,000,000 transitions"""
def __init__(self, size=1000000, frame_height=84, frame_width=84,
agent_... | 47.703947 | 193 | 0.634533 |
083c74de990df496849e9785db6330dbcfa4a771 | 4,397 | py | Python | core/controllers/subtopic_viewer_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | core/controllers/subtopic_viewer_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | 4 | 2019-08-15T10:49:21.000Z | 2022-03-02T05:10:20.000Z | core/controllers/subtopic_viewer_test.py | grishamjindal/oppia | 3a29329a446e30b3b70641cf0286e23fad85418f | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Oppia 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 ... | 38.911504 | 78 | 0.610644 |
083c9ddcc36c796839e05c6c9d7caa4d5e9008e5 | 37,149 | py | Python | src/rayoptics/parax/paraxialdesign.py | JakeWags/ray-optics | c64baf0a77df249477ec5b54265a1cd16b3cbb7a | [
"BSD-3-Clause"
] | null | null | null | src/rayoptics/parax/paraxialdesign.py | JakeWags/ray-optics | c64baf0a77df249477ec5b54265a1cd16b3cbb7a | [
"BSD-3-Clause"
] | null | null | null | src/rayoptics/parax/paraxialdesign.py | JakeWags/ray-optics | c64baf0a77df249477ec5b54265a1cd16b3cbb7a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright © 2018 Michael J. Hayford
""" First order paraxial design space
.. Created on Sat Mar 31 21:14:42 2018
.. codeauthor: Michael J. Hayford
"""
import numpy as np
import rayoptics.optical.model_constants as mc
import rayoptics.parax.firstorder as fo
from rayop... | 38.940252 | 100 | 0.556893 |
083cabfc786932a8c50809de318ed86b9f7fd275 | 93,767 | py | Python | lib/network.py | pvyhnal-generalbytes/Electron-Cash-SLP | 0da284467e390ca92cd43c52d97cd0de5ad1292c | [
"MIT"
] | 1 | 2020-02-20T05:49:29.000Z | 2020-02-20T05:49:29.000Z | lib/network.py | tomasiCF/Electron-Cash-SLP | 0da284467e390ca92cd43c52d97cd0de5ad1292c | [
"MIT"
] | null | null | null | lib/network.py | tomasiCF/Electron-Cash-SLP | 0da284467e390ca92cd43c52d97cd0de5ad1292c | [
"MIT"
] | null | null | null | # Electrum - Lightweight Bitcoin Client
# Copyright (c) 2011-2016 Thomas Voegtlin
#
# 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 rig... | 48.184481 | 210 | 0.625977 |
083ccf7973cc0f3e7de7299c55bb0ddf36ea0879 | 21,277 | py | Python | AA.py | nishimotz/pyaa | f45b21c6532315259cab462f241c3025605c1aca | [
"MIT"
] | 4 | 2015-05-02T09:57:49.000Z | 2021-08-21T14:46:37.000Z | AA.py | nishimotz/pyaa | f45b21c6532315259cab462f241c3025605c1aca | [
"MIT"
] | null | null | null | AA.py | nishimotz/pyaa | f45b21c6532315259cab462f241c3025605c1aca | [
"MIT"
] | 2 | 2021-08-21T19:37:50.000Z | 2022-01-22T20:28:46.000Z | '''
Classes that wrap IAccessible and the Windows event hook mechanisms.
'''
from Queue import Queue, Empty
from threading import Lock
from traceback import print_exc
from pyAAc import Error
import pyAAc
import Path
# create a class containing pyAA constants
class Constants:
'''Holds all public pyAA constants witho... | 30.614388 | 88 | 0.683038 |
083cd606904bd9d2cab7b4d9d26af87995941a0e | 955 | py | Python | examples/s2s_forecast/src/models/tuned_salient_fri/attributes.py | geflaspohler/poold | 4ddd085597b85e8c737b2f904f504437f728513b | [
"MIT"
] | 7 | 2021-08-02T15:31:01.000Z | 2022-02-11T14:36:46.000Z | examples/s2s_forecast/src/models/tuned_salient_fri/attributes.py | geflaspohler/poold | 4ddd085597b85e8c737b2f904f504437f728513b | [
"MIT"
] | null | null | null | examples/s2s_forecast/src/models/tuned_salient_fri/attributes.py | geflaspohler/poold | 4ddd085597b85e8c737b2f904f504437f728513b | [
"MIT"
] | 1 | 2021-07-15T23:05:02.000Z | 2021-07-15T23:05:02.000Z | # Model attributes
import json
import os
MODEL_NAME = "tuned_salient_fri"
SELECTED_SUBMODEL_PARAMS_FILE=os.path.join("src","models",MODEL_NAME,"selected_submodel.json")
def get_selected_submodel_name(gt_id, target_horizon):
"""Returns the name of the selected submodel for this model and given task
Args:
... | 31.833333 | 94 | 0.741361 |
083d11638dca9a5366484482e026e78d3833be76 | 35 | py | Python | btd6_memory_info/generated/SteamNative/SteamServersConnected_t/steam_servers_connected_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/SteamServersConnected_t/steam_servers_connected_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/SteamServersConnected_t/steam_servers_connected_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class SteamServersConnected_t: pass | 35 | 35 | 0.914286 |
083d35bc5bd6515a07bbff58246d4521bb49bc32 | 7,096 | py | Python | main_csp.py | ameliamounts/MachineLearningBCI-Lau_Mounts | f0d93ebdd314980bdb9c6ce4c743036eb0704039 | [
"MIT"
] | null | null | null | main_csp.py | ameliamounts/MachineLearningBCI-Lau_Mounts | f0d93ebdd314980bdb9c6ce4c743036eb0704039 | [
"MIT"
] | null | null | null | main_csp.py | ameliamounts/MachineLearningBCI-Lau_Mounts | f0d93ebdd314980bdb9c6ce4c743036eb0704039 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
Model for common spatial pattern (CSP) feature calculation and classification for EEG data
'''
import numpy as np
import time
from sklearn.svm import LinearSVC, SVC
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from sklearn.neighbors import KNeighborsClassifier
from ... | 32.108597 | 150 | 0.676015 |
083d5096d17eabfc44af82ca778f80c8c744cf43 | 612 | py | Python | setup.py | di2ag/chp-look-up | b4d928dfc20ae9b9e3467d536dd5704a45eb7255 | [
"Apache-2.0"
] | null | null | null | setup.py | di2ag/chp-look-up | b4d928dfc20ae9b9e3467d536dd5704a45eb7255 | [
"Apache-2.0"
] | null | null | null | setup.py | di2ag/chp-look-up | b4d928dfc20ae9b9e3467d536dd5704a45eb7255 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import re
import io
from setuptools import find_packages
from setuptools import setup
__version__ = '1.0'
REQUIRED_PACKAGES = [
]
setup(
name='chp_look_up',
version=__version__,
author='Luke Veenhuis',
author_email='luke.j.veenhuis@dartmouth.edu',
description='Simple one hop... | 21.103448 | 99 | 0.678105 |
083d8723f58ffba3bfdc43faebcb12f6870410ae | 1,475 | py | Python | flexget/plugins/urlrewrite_divxatope.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/urlrewrite_divxatope.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | flexget/plugins/urlrewrite_divxatope.py | BrainDamage/Flexget | 50f75bdad64ce023daaff334df8478319ddb9f64 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import logging
import re
from flexget import plugin
from flexget.event import event
from flexget.plugins.plugin_urlrewriting import UrlRewritingError
from flexget.utils import requests
from flexget.utils.soup import get_soup
log = logging.getLogger('d... | 28.921569 | 73 | 0.652881 |
083da6147b25d55c37d84fb15338a7136fc127e1 | 11,031 | py | Python | score_reporter_crawler_test.py | martincochran/score-minion | 58197798a0a3a4fbcd54ffa0a2fab2e865985bfd | [
"Apache-2.0"
] | null | null | null | score_reporter_crawler_test.py | martincochran/score-minion | 58197798a0a3a4fbcd54ffa0a2fab2e865985bfd | [
"Apache-2.0"
] | 3 | 2015-02-15T18:31:10.000Z | 2015-02-22T19:56:05.000Z | score_reporter_crawler_test.py | martincochran/score-minion | 58197798a0a3a4fbcd54ffa0a2fab2e865985bfd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2015 Martin Cochran
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 41.942966 | 105 | 0.723144 |
083ddb3d15525d5bb6a03748a9bb0f64fa90f5ea | 11,709 | py | Python | EtekcityOutlet/etekcity_controller.py | pgcrumley/Controllers | d121678f4585911c0b79785b6b22b92d2029ae8a | [
"MIT"
] | 3 | 2018-08-20T15:32:07.000Z | 2019-04-08T20:24:19.000Z | EtekcityOutlet/etekcity_controller.py | pgcrumley/Controllers | d121678f4585911c0b79785b6b22b92d2029ae8a | [
"MIT"
] | null | null | null | EtekcityOutlet/etekcity_controller.py | pgcrumley/Controllers | d121678f4585911c0b79785b6b22b92d2029ae8a | [
"MIT"
] | null | null | null | #!env python3
"""
MIT License
Copyright (c) 2017 Paul G Crumley
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, ... | 33.84104 | 80 | 0.571014 |
083df5f77ff0a28efc0c37d81b6587eeece9f1e3 | 3,323 | py | Python | src/toil/lib/iterables.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 348 | 2018-07-08T03:38:28.000Z | 2022-03-11T18:57:44.000Z | src/toil/lib/iterables.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 1,700 | 2018-07-05T18:28:49.000Z | 2022-03-31T14:09:04.000Z | src/toil/lib/iterables.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 126 | 2018-07-11T18:59:29.000Z | 2022-01-24T03:14:02.000Z | # Copyright (C) 2015-2021 Regents of the University of California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 31.349057 | 99 | 0.572073 |
083e1ddf073dcd5364ed14ae93f73ce25a07bcce | 19,688 | py | Python | axonius_api_client/connect.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 11 | 2020-01-31T00:28:26.000Z | 2022-03-25T20:27:08.000Z | axonius_api_client/connect.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 83 | 2020-01-22T12:52:38.000Z | 2022-02-07T16:20:18.000Z | axonius_api_client/connect.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 16 | 2019-08-23T17:44:31.000Z | 2022-01-06T00:57:34.000Z | # -*- coding: utf-8 -*-
"""Easy all-in-one connection handler."""
import logging
import pathlib
import re
from typing import List, Optional, Union
import requests
from .api import (
ActivityLogs,
Adapters,
Dashboard,
Devices,
Enforcements,
Instances,
Meta,
RemoteSupport,
SettingsGl... | 39.854251 | 100 | 0.606613 |
083e4aad91f58c3762176e3ff84f42304a7bec8c | 1,918 | py | Python | panasonic_camera/interval.py | maiermic/robot-cameraman | afe441cf1677322062da77aa782a08f10440fcc7 | [
"MIT"
] | 7 | 2019-11-17T13:18:07.000Z | 2022-03-13T04:14:15.000Z | panasonic_camera/interval.py | maiermic/robot-cameraman | afe441cf1677322062da77aa782a08f10440fcc7 | [
"MIT"
] | 14 | 2021-02-03T16:21:21.000Z | 2022-03-11T23:57:48.000Z | panasonic_camera/interval.py | maiermic/robot-cameraman | afe441cf1677322062da77aa782a08f10440fcc7 | [
"MIT"
] | 2 | 2021-04-21T21:22:49.000Z | 2021-05-28T17:39:13.000Z | # https://stackoverflow.com/a/54884881/1065654
import signal
import threading
import time
class ProgramKilled(Exception):
"""
An instance of this custom exception class will be thrown every time we get
a SIGTERM or SIGINT
"""
pass
# Raise the custom exception whenever SIGINT or SIGTERM is trigg... | 27.014085 | 95 | 0.656934 |
083e5c07bd473bc64b02b0ab9a0995283fe3062f | 6,760 | py | Python | babycam/config/config.py | Mschikay/FCIS-babycam | 603dab002fb0e665435acd119b02cf3f18c4eb02 | [
"Apache-2.0"
] | null | null | null | babycam/config/config.py | Mschikay/FCIS-babycam | 603dab002fb0e665435acd119b02cf3f18c4eb02 | [
"Apache-2.0"
] | null | null | null | babycam/config/config.py | Mschikay/FCIS-babycam | 603dab002fb0e665435acd119b02cf3f18c4eb02 | [
"Apache-2.0"
] | null | null | null | import yaml
import numpy as np
from easydict import EasyDict as edict
config = edict()
#test image path
config.TEST_YAML = '/../experiments/fcis/cfgs/fcis_coco_demo.yaml'
config.FG = 'baby1.jpg'
config.BG = 'bg.jpg'
config.EX_MXNET = '../external/mxnet'
config.TEST_CLASS_NAME = ['person', 'bicycle', 'car', 'motorcycl... | 34.489796 | 119 | 0.681657 |
083e62b4a310706bd3f5febb7291fb048c771623 | 1,805 | py | Python | sdk/servicebus/azure-servicebus/tests/livetest/test_errors.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/servicebus/azure-servicebus/tests/livetest/test_errors.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/servicebus/azure-servicebus/tests/livetest/test_errors.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | import logging
from uamqp import errors as AMQPErrors, constants as AMQPConstants
from azure.servicebus.exceptions import (
_create_servicebus_exception,
ServiceBusConnectionError,
ServiceBusError
)
def test_link_idle_timeout():
logger = logging.getLogger("testlogger")
amqp_error = AMQPErrors.Lin... | 40.111111 | 167 | 0.8 |
083e64be039061b0a1e3df66ca6446a956723d16 | 18,501 | py | Python | src/cmip6_data_citation_generator/_version.py | znicholls/CMIP6-json-data-citation-generator | f7418410ce64944810b1daf2077a7d2443aad8d0 | [
"BSD-2-Clause"
] | 3 | 2018-06-28T11:55:31.000Z | 2018-07-09T07:01:14.000Z | src/cmip6_data_citation_generator/_version.py | znicholls/CMIP6-json-data-citation-generator | f7418410ce64944810b1daf2077a7d2443aad8d0 | [
"BSD-2-Clause"
] | 23 | 2018-06-19T11:46:37.000Z | 2018-12-21T22:34:56.000Z | src/cmip6_data_citation_generator/_version.py | znicholls/CMIP6-json-data-citation-generator | f7418410ce64944810b1daf2077a7d2443aad8d0 | [
"BSD-2-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 t... | 35.510557 | 79 | 0.585428 |
083e686e4267dbb392db55f3d16d6864baa1721b | 15,479 | py | Python | codes/src/optimize/distributed/optimize_distributed_vae_model_aware.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/src/optimize/distributed/optimize_distributed_vae_model_aware.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/src/optimize/distributed/optimize_distributed_vae_model_aware.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | '''Distributed optimization routine for the case where the model
posterior possesses a full covariance and the parameter-to-observable map is
learned
In preparation for optimization, this script will:
1) Constuct any objects necessary to be passed to the loss functionals
2) Instantiate the Metrics class
3)... | 49.932258 | 101 | 0.625493 |
083ec4b2c6947dc9680cc2af2eda4816f878961e | 8,269 | py | Python | sasmodels/models/core_shell_bicelle_elliptical.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | sasmodels/models/core_shell_bicelle_elliptical.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | sasmodels/models/core_shell_bicelle_elliptical.py | zattala/sasmodels | a547aa73d43145b3bd34770b0ea27ba8882170a3 | [
"BSD-3-Clause"
] | null | null | null | r"""
Definition
----------
This model provides the form factor for an elliptical cylinder with a
core-shell scattering length density profile. Thus this is a variation
of the core-shell bicelle model, but with an elliptical cylinder for the core.
Outer shells on the rims and flat ends may be of different thicknesses a... | 40.935644 | 112 | 0.645906 |
083ed333ffa7ff8deab1d38a8def4f4ced5c6673 | 1,791 | py | Python | src/rubrix/sdk/models/dataset_metadata.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/dataset_metadata.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/dataset_metadata.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# 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 ... | 29.85 | 77 | 0.685092 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.