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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a99140ed39c3a885e4a259821f6dd9f9c98879e | 2,040 | py | Python | bandwidth/voice/models/diversion.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 5 | 2020-11-04T14:29:37.000Z | 2022-02-23T20:33:07.000Z | bandwidth/voice/models/diversion.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 3 | 2021-07-23T18:48:48.000Z | 2022-03-15T14:59:07.000Z | bandwidth/voice/models/diversion.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 8 | 2020-04-14T09:22:53.000Z | 2022-03-11T10:46:06.000Z | # -*- coding: utf-8 -*-
"""
bandwidth
This file was automatically generated by APIMATIC v3.0 (
https://www.apimatic.io ).
"""
class Diversion(object):
"""Implementation of the 'Diversion' model.
TODO: type model description here.
Attributes:
reason (string): TODO: type descr... | 27.567568 | 79 | 0.554412 |
1a9916b5afbd5ca3ffcc4bcf62dc435457decc44 | 5,225 | py | Python | hayes/indexing.py | andersinno/hayes | f0843960ee71e78d3c7360ea8a77ae8b681be1be | [
"MIT"
] | 2 | 2016-02-16T07:43:56.000Z | 2018-05-13T17:31:46.000Z | hayes/indexing.py | andersinno/hayes | f0843960ee71e78d3c7360ea8a77ae8b681be1be | [
"MIT"
] | 9 | 2017-08-17T11:34:39.000Z | 2021-12-13T19:48:50.000Z | hayes/indexing.py | andersinno/hayes | f0843960ee71e78d3c7360ea8a77ae8b681be1be | [
"MIT"
] | 3 | 2015-10-29T15:10:19.000Z | 2017-01-14T18:00:45.000Z | # -*- coding: utf-8 -*-
from hayes.analysis import AnalysisBase, builtin_simple_analyzer
from hayes.utils import object_to_dict
class DocumentIndex(object):
name = None
fields = {}
enable_source = True
enable_size = False
enable_timestamp = False
def get_model(self): # For Django compat.
... | 30.202312 | 74 | 0.564593 |
1a9923ce8d9367fb95b105ce68b0470f8124efa3 | 931 | py | Python | API/src/main/resources/Lib/robot/__main__.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/__main__.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/__main__.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
#
# 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... | 33.25 | 75 | 0.750806 |
1a994448946b4a6d201fae804d1831e2552b0756 | 5,527 | py | Python | src/processing/process.py | tobytoyin/TesterFactory | 150a2625f8fb4eb50d600611d990a8bb8fed96a4 | [
"MIT"
] | null | null | null | src/processing/process.py | tobytoyin/TesterFactory | 150a2625f8fb4eb50d600611d990a8bb8fed96a4 | [
"MIT"
] | null | null | null | src/processing/process.py | tobytoyin/TesterFactory | 150a2625f8fb4eb50d600611d990a8bb8fed96a4 | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from src.processing.caches import Cache
from src.helper import inline_arg_compile
class Process:
def __init__(self, setup, test_input, bp_map, components_map):
"""
Core processing for fetching data. Per blueprint ... | 35.429487 | 109 | 0.57011 |
1a99460a67f5bd675857031bf5ecd88fef407d54 | 5,243 | py | Python | objconfig/reader/yaml.py | asherwunk/objconfig | 97243fa00a9e39d1167dc1e07a84578e20072c37 | [
"MIT"
] | null | null | null | objconfig/reader/yaml.py | asherwunk/objconfig | 97243fa00a9e39d1167dc1e07a84578e20072c37 | [
"MIT"
] | null | null | null | objconfig/reader/yaml.py | asherwunk/objconfig | 97243fa00a9e39d1167dc1e07a84578e20072c37 | [
"MIT"
] | null | null | null | r"""
This is a port of zend-config to Python
NOTE: This file requires PyYaml, which is recorded in the setup.py
Some idioms of PHP are still employed, but where possible I have Pythonized it
IGNORE:
Author: Asher Wolfstein Copyright 2017
Blog: http://wunk.me/
E-Mail: asherwunk@gmail.com
Twitter: http... | 31.969512 | 108 | 0.530803 |
1a9987ee236644fc49894f60f783b45d799f18d2 | 53,473 | py | Python | knx/text/preprocess_text.py | gofortargets/CNN_brandsafety | 77c9048a7aca9458879585925e98220435c052e9 | [
"Apache-2.0"
] | 2 | 2017-07-27T03:50:37.000Z | 2017-09-28T06:42:52.000Z | knx/text/preprocess_text.py | gofortargets/CNN_brandsafety | 77c9048a7aca9458879585925e98220435c052e9 | [
"Apache-2.0"
] | null | null | null | knx/text/preprocess_text.py | gofortargets/CNN_brandsafety | 77c9048a7aca9458879585925e98220435c052e9 | [
"Apache-2.0"
] | null | null | null | from nltk import corpus
from nltk.tokenize import RegexpTokenizer
from HTMLParser import HTMLParser
import re
import string
from nltk.stem.porter import *
REPLACEMENT_WORDS = [
"Editing by", "editing by", "Editing By",
"Reporting By", "Reporting by", "reporting by",
"Compiled by", "compiled by", "Compiled ... | 15.313001 | 2,865 | 0.431021 |
1a99c52921cf90c4e9dfa15f4c4e4a9a02249bfc | 3,559 | py | Python | test/lmp/util/validate/test_signature.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/util/validate/test_signature.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | test/lmp/util/validate/test_signature.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | """Test :py:mod:`lmp.util.validate` signatures."""
import inspect
from inspect import Parameter, Signature
from typing import Any, List, Type, Union
import lmp.util.validate
def test_module_method():
"""Ensure module methods' signatures."""
assert hasattr(lmp.util.validate, 'raise_if_not_instance')
assert ins... | 28.246032 | 82 | 0.656645 |
1a99d2d12bccf02aa318b7756c7f3cdeef136365 | 11,460 | py | Python | simulators/hiv_simulator.py | dylanrandle/interpret-RL | be59846ccfc17b16e37b6940dd5d7306815040b3 | [
"MIT"
] | null | null | null | simulators/hiv_simulator.py | dylanrandle/interpret-RL | be59846ccfc17b16e37b6940dd5d7306815040b3 | [
"MIT"
] | null | null | null | simulators/hiv_simulator.py | dylanrandle/interpret-RL | be59846ccfc17b16e37b6940dd5d7306815040b3 | [
"MIT"
] | null | null | null | """HIV Treatment domain based on https://bitbucket.org/rlpy/rlpy/src/master/rlpy/Domains/HIVTreatment.py
Deborah Hanus of Harvard DTAK contributed to the implementation.
"""
import numpy as np
from scipy.integrate import odeint, ode
from collections.abc import Iterable
# Original attribution information:
__copyright__... | 42.921348 | 136 | 0.604887 |
1a99e273d5eba5f7f84e0e7f9c30971c970b4d94 | 16,078 | py | Python | test/evaluation/test_evaluator.py | lovvge/gluon-ts | 284376138f41968bec0a4cb05b274c8ee259493a | [
"Apache-2.0"
] | 2 | 2019-09-05T05:39:03.000Z | 2020-11-08T17:07:04.000Z | test/evaluation/test_evaluator.py | lovvge/gluon-ts | 284376138f41968bec0a4cb05b274c8ee259493a | [
"Apache-2.0"
] | null | null | null | test/evaluation/test_evaluator.py | lovvge/gluon-ts | 284376138f41968bec0a4cb05b274c8ee259493a | [
"Apache-2.0"
] | null | null | null | # Third-party imports
import numpy as np
import pandas as pd
import pytest
# First-party imports
from gluonts.evaluation import (
Evaluator,
MultivariateEvaluator,
get_seasonality,
)
from gluonts.model.forecast import QuantileForecast, SampleForecast
QUANTILES = [str(q / 10.0) for q in range(1, 10)]
def... | 26.058347 | 102 | 0.50367 |
1a99e2f75f865b434cfd2c85c0c350c89484e764 | 26,181 | py | Python | etcd3aio/etcdrpc/rpc_grpc.py | mk-fg/etcd3aio | e3b1e4215f51395eabc34fb00a5c2414637b8306 | [
"Apache-2.0"
] | 4 | 2020-05-23T14:21:06.000Z | 2021-03-13T06:27:19.000Z | etcd3aio/etcdrpc/rpc_grpc.py | mk-fg/etcd3aio | e3b1e4215f51395eabc34fb00a5c2414637b8306 | [
"Apache-2.0"
] | 1 | 2020-08-01T11:38:39.000Z | 2020-09-20T22:02:33.000Z | etcd3aio/etcdrpc/rpc_grpc.py | mk-fg/etcd3aio | e3b1e4215f51395eabc34fb00a5c2414637b8306 | [
"Apache-2.0"
] | 2 | 2020-06-09T07:35:04.000Z | 2020-07-31T12:38:15.000Z | # Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: rpc.proto
# plugin: grpclib.plugin.main
import abc
import typing
import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
import grpclib.server
from etcd3aio.etcdrpc import kv_pb2
from etcd3aio.etcdrpc import auth_pb2
from etcd3aio.et... | 37.670504 | 165 | 0.617509 |
1a9a477f1eb0ccd4a9e4daf22249af4a25c1ed24 | 2,102 | py | Python | models/conv_emnist_model.py | nik1168/Optical-Character-Recognition | 17655810f15d786615f72f06e1bfb4448e60f83b | [
"MIT"
] | 1 | 2020-03-27T21:44:31.000Z | 2020-03-27T21:44:31.000Z | models/conv_emnist_model.py | nik1168/Optical-Character-Recognition | 17655810f15d786615f72f06e1bfb4448e60f83b | [
"MIT"
] | 5 | 2020-09-26T00:43:18.000Z | 2022-02-10T01:11:52.000Z | models/conv_emnist_model.py | nik1168/Optical-Character-Recognition | 17655810f15d786615f72f06e1bfb4448e60f83b | [
"MIT"
] | null | null | null | from base.base_model import BaseModel
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Input, Dense, Conv2D, MaxPooling2D, Dropout, Flatten
from constants import HEIGHT, WIDTH
class ConvEMnistModel(BaseModel):
def __init__(self, config):
super(ConvEMnistModel, self).__in... | 45.695652 | 125 | 0.67412 |
1a9a5e411f52d6d87c92e97055f725f14daed3a7 | 61,232 | py | Python | sublime/Packages/SublimeLinter/lint/linter.py | micahwood/linux-dotfiles | cc3939fccac3f1c0f1ef1f1240052403bef28206 | [
"MIT"
] | 2 | 2018-04-24T10:02:26.000Z | 2019-06-02T13:53:31.000Z | sublime/Packages/SublimeLinter/lint/linter.py | micahwood/linux-dotfiles | cc3939fccac3f1c0f1ef1f1240052403bef28206 | [
"MIT"
] | null | null | null | sublime/Packages/SublimeLinter/lint/linter.py | micahwood/linux-dotfiles | cc3939fccac3f1c0f1ef1f1240052403bef28206 | [
"MIT"
] | 2 | 2019-04-11T04:13:02.000Z | 2019-06-02T13:53:33.000Z | #
# linter.py
# Part of SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ryan Hileman and Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter3
# License: MIT
#
"""
This module exports linter-related classes.
LinterMeta Metaclass for Linter classes that does se... | 35.089971 | 117 | 0.575581 |
1a9a678c1319e6710595c092d05507f3b577612e | 1,296 | py | Python | ignite/contrib/metrics/regression/fractional_absolute_error.py | VinhLoiIT/ignite | 3b2b9655ea9f80ce49b8a9f1c2d72f80e2a95f56 | [
"BSD-3-Clause"
] | 1 | 2020-06-13T15:22:08.000Z | 2020-06-13T15:22:08.000Z | ignite/contrib/metrics/regression/fractional_absolute_error.py | hefv57/ignite | a22a0f5e909ac70d2a1f76a60b6e84b2134f196c | [
"BSD-3-Clause"
] | null | null | null | ignite/contrib/metrics/regression/fractional_absolute_error.py | hefv57/ignite | a22a0f5e909ac70d2a1f76a60b6e84b2134f196c | [
"BSD-3-Clause"
] | 1 | 2020-06-13T15:30:46.000Z | 2020-06-13T15:30:46.000Z | import torch
from ignite.exceptions import NotComputableError
from ignite.contrib.metrics.regression._base import _BaseRegression
class FractionalAbsoluteError(_BaseRegression):
r"""
Calculates the Fractional Absolute Error.
:math:`\text{FAE} = \frac{1}{n}\sum_{j=1}^n\frac{2 |A_j - P_j|}{|A_j| + |P_j|}`... | 33.230769 | 111 | 0.638117 |
1a9abc43abb0730ca8f1237aec67421a0a48d79e | 2,384 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/secure_value_hash.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/secure_value_hash.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/secure_value_hash.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.786667 | 103 | 0.619128 |
1a9ac73f5a80a382939dc457e6cdc9e66b7a94a9 | 6,225 | py | Python | applications/gestor/controllers/agenda.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/gestor/controllers/agenda.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | applications/gestor/controllers/agenda.py | DayvsonWellerson/gotochurchWeb | 7e2cb05d208191b04c93f110e6bef7fad3cd9f88 | [
"BSD-3-Clause"
] | null | null | null | @auth.requires_login()
def index():
response.title = 'DA - Agenta Telefonica'
response.app = 'Agenda Telefônica'
return locals()
@auth.requires_login()
def novoContato():
"""
Retorna: Formulário para cadastro de um novo contato
"""
response.title = 'DA - Agenta Telefonica'
response.ap... | 59.855769 | 390 | 0.628434 |
1a9ad1641d8ffd1760ebd4d2c76d82be1c901d75 | 1,536 | py | Python | igibson/objects/stateful_object.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 360 | 2020-04-02T11:12:09.000Z | 2022-03-24T21:46:58.000Z | igibson/objects/stateful_object.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 169 | 2020-04-07T21:01:05.000Z | 2022-03-31T10:07:39.000Z | igibson/objects/stateful_object.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 94 | 2020-04-09T23:22:17.000Z | 2022-03-17T21:49:03.000Z | from igibson.object_states.factory import get_state_name, prepare_object_states
from igibson.object_states.object_state_base import AbsoluteObjectState
from igibson.object_states.utils import clear_cached_states
from igibson.objects.object_base import Object
class StatefulObject(Object):
"""
Stateful Base Obj... | 34.909091 | 80 | 0.712891 |
1a9aee1349188457b2e8f88a71d4d5fa299a9162 | 1,115 | py | Python | swcms_social/_utils/views.py | ivanff/swcms | 20d121003243abcc26e41409bc44f1c0ef3c6c2a | [
"MIT"
] | null | null | null | swcms_social/_utils/views.py | ivanff/swcms | 20d121003243abcc26e41409bc44f1c0ef3c6c2a | [
"MIT"
] | 1 | 2019-06-25T11:17:35.000Z | 2019-06-25T11:17:54.000Z | swcms_social/_utils/views.py | ivanff/swcms-social | 20d121003243abcc26e41409bc44f1c0ef3c6c2a | [
"MIT"
] | null | null | null | from django.contrib.auth import get_backends, get_user_model
from django.contrib.auth.decorators import user_passes_test
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth import login as auth_login
from rest_framework.decorators import api_view
from rest_framework.response import Respo... | 31.857143 | 77 | 0.748879 |
1a9af96075da9695d8ac0b65244b26292a1dc90f | 30,164 | py | Python | scripts/build_docs.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | scripts/build_docs.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | scripts/build_docs.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | """Documentations build script.
Command example:
$ python ./scripts/build_docs.py
"""
import hashlib
import multiprocessing as mp
import os
import re
import shutil
import subprocess as sp
import sys
from distutils.dir_util import copy_tree
from logging import Logger
from typing import Any
from typing ... | 31.58534 | 79 | 0.629857 |
1a9b260980a34dae1cfe5f9eeb96d4a01a0c2856 | 3,179 | py | Python | pyirf/cuts.py | nbiederbeck/pyirf | 87abc94fed4f078e185cf930f92198fd40f6f571 | [
"MIT"
] | null | null | null | pyirf/cuts.py | nbiederbeck/pyirf | 87abc94fed4f078e185cf930f92198fd40f6f571 | [
"MIT"
] | null | null | null | pyirf/cuts.py | nbiederbeck/pyirf | 87abc94fed4f078e185cf930f92198fd40f6f571 | [
"MIT"
] | null | null | null | import numpy as np
from astropy.table import Table
from .binning import calculate_bin_indices
def calculate_percentile_cut(
values, bin_values, bins, fill_value, percentile=68, min_value=None, max_value=None,
):
"""
Calculate cuts as the percentile of a given quantity in bins of another
quantity.
... | 36.54023 | 88 | 0.659327 |
1a9b2de093d26710433ac3586ccb2a954ba023f8 | 1,216 | py | Python | src/test/tests/session/textannot.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/session/textannot.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/session/textannot.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: textanot.py
#
# Tests: mesh - 2D curvilinear, single domain
# plots - Pseudocolor
#
# Notes: This test case uses a session file to set up a plot and create
# ... | 32 | 80 | 0.574013 |
1a9b452a0ca10bfb18814b63b84cd68e944f1a53 | 182 | py | Python | jaxfg/hints/__init__.py | AvanDavad/jaxfg | 6d1559126ba872b452eca6a13c2688349f1c5f7e | [
"MIT"
] | 120 | 2020-11-28T19:43:31.000Z | 2022-03-29T02:35:46.000Z | jaxfg/hints/__init__.py | AvanDavad/jaxfg | 6d1559126ba872b452eca6a13c2688349f1c5f7e | [
"MIT"
] | 12 | 2021-05-24T09:02:12.000Z | 2022-03-30T19:51:40.000Z | jaxfg/hints/__init__.py | AvanDavad/jaxfg | 6d1559126ba872b452eca6a13c2688349f1c5f7e | [
"MIT"
] | 9 | 2021-05-06T15:31:23.000Z | 2022-03-23T12:06:44.000Z | from ._aliases import Array, LocalVariableValue, Pytree, Scalar, VariableValue
__all__ = [
"Array",
"LocalVariableValue",
"Pytree",
"Scalar",
"VariableValue",
]
| 18.2 | 78 | 0.664835 |
1a9b55670722e16e5fc529aeb81886fb502011fb | 31,887 | py | Python | oddt/fingerprints.py | mwojcikowski/oddt | 3b58b15b530e97a90d958fe8b862f16605b6da1f | [
"BSD-3-Clause"
] | null | null | null | oddt/fingerprints.py | mwojcikowski/oddt | 3b58b15b530e97a90d958fe8b862f16605b6da1f | [
"BSD-3-Clause"
] | null | null | null | oddt/fingerprints.py | mwojcikowski/oddt | 3b58b15b530e97a90d958fe8b862f16605b6da1f | [
"BSD-3-Clause"
] | 2 | 2019-03-28T14:18:40.000Z | 2019-03-29T12:47:39.000Z | """
Module checks interactions between two molecules and
creates interacion fingerprints.
"""
from __future__ import division
from six.moves import zip_longest
from itertools import chain
from collections import OrderedDict
import numpy as np
from scipy.sparse import csr_matrix, isspmatrix_csr
import oddt
from... | 36.778547 | 82 | 0.606046 |
1a9b76ac33a7eb048d6222649a5c5a0e6bca917e | 696 | py | Python | func_tests/pages/advancedwebsubmissionpage/advanced_web_submission_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/pages/advancedwebsubmissionpage/advanced_web_submission_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/pages/advancedwebsubmissionpage/advanced_web_submission_page.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from framework.utils.common_utils import by_id, by_css
from pages.websubmissionpage.web_submission_page import WebSubmissionPage
from tests.testsettings import UI_TEST_TIMEOUT
class AdvancedWebSubmissionPage(WebSubmissionPage):
def __init__(self, driver):
WebSubmissionPage.__init__(self, driver)
def... | 34.8 | 91 | 0.755747 |
1a9b7fefb1d8addc1dde1e99a11797f59cde2ba8 | 701 | py | Python | data/migrations/versions/c91c564aad34_drop_checksum_on_imagestorage.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | null | null | null | data/migrations/versions/c91c564aad34_drop_checksum_on_imagestorage.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | null | null | null | data/migrations/versions/c91c564aad34_drop_checksum_on_imagestorage.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | null | null | null | """
Drop checksum on ImageStorage.
Revision ID: c91c564aad34
Revises: 152bb29a1bb3
Create Date: 2018-02-21 12:17:52.405644
"""
# revision identifiers, used by Alembic.
revision = "c91c564aad34"
down_revision = "152bb29a1bb3"
from alembic import op as original_op
from data.migrations.progress import ProgressWrapper
i... | 26.961538 | 94 | 0.777461 |
1a9b8373c2523d5dbebeca411094ccaaa696b2b5 | 2,158 | py | Python | InterfaceMethodsPython/luCholesky.py | jonyzp/parallelGames | ba9895971dcf0c6e77a0738113ffae3a01596e6e | [
"Apache-2.0"
] | null | null | null | InterfaceMethodsPython/luCholesky.py | jonyzp/parallelGames | ba9895971dcf0c6e77a0738113ffae3a01596e6e | [
"Apache-2.0"
] | null | null | null | InterfaceMethodsPython/luCholesky.py | jonyzp/parallelGames | ba9895971dcf0c6e77a0738113ffae3a01596e6e | [
"Apache-2.0"
] | null | null | null | import numpy as np
import sys
from math import *
def readMatrix(file,size):
L = np.zeros((size, size))
U = np.zeros((size, size))
A = np.zeros((size, size))
B = np.zeros(size)
Z = np.zeros(size)
X = np.zeros(size)
for i in range (size):
cont=0
fileMio=file.readline().replac... | 22.247423 | 59 | 0.466172 |
1a9b8e0528dfae346e33b3fbf501ee11cf8a46e3 | 12,616 | py | Python | TrainingExtensions/common/src/python/aimet_common/winnow/winnow_utils.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 945 | 2020-04-30T02:23:55.000Z | 2022-03-31T08:44:32.000Z | TrainingExtensions/common/src/python/aimet_common/winnow/winnow_utils.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 563 | 2020-05-01T03:07:22.000Z | 2022-03-30T05:35:58.000Z | TrainingExtensions/common/src/python/aimet_common/winnow/winnow_utils.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 186 | 2020-04-30T00:55:26.000Z | 2022-03-30T09:54:51.000Z | # /usr/bin/env python3.5
# -*- mode: python -*-
# =============================================================================
#
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2019-2020, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modif... | 47.428571 | 120 | 0.627695 |
1a9b95beef4372766d5b6cf6a163695415727640 | 1,153 | py | Python | src/lib/todo_classes.py | louisroyer/todopy | 8aef035bc82b13a8053394e8942c34de72fae3bf | [
"CC0-1.0"
] | null | null | null | src/lib/todo_classes.py | louisroyer/todopy | 8aef035bc82b13a8053394e8942c34de72fae3bf | [
"CC0-1.0"
] | 2 | 2020-09-01T12:32:25.000Z | 2020-09-01T12:33:11.000Z | src/lib/todo_classes.py | louisroyer/todopy | 8aef035bc82b13a8053394e8942c34de72fae3bf | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''Classes for todo files.'''
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
if __debug__:
if __package__:
from . import todo_parser as _todo_parser
else:
import todo_parser as _todo_parser
if __name__ != '__main__':
__author__ = 'Loui... | 24.020833 | 67 | 0.61405 |
1a9ba9783273454ba375328bb421ff0fdd71e698 | 1,616 | py | Python | tflite/SubOptions.py | szha/tensorflow-onnx | 25f8b0c78074784fcc33c1d068911f8363581e6c | [
"MIT"
] | 5 | 2020-12-21T09:38:50.000Z | 2022-03-31T22:48:30.000Z | tinyengine/tflite/SubOptions.py | liuyy3364/mcunet | f53f9e20e8e912bdb111b4c32da75e71e9a59597 | [
"Apache-2.0"
] | null | null | null | tinyengine/tflite/SubOptions.py | liuyy3364/mcunet | f53f9e20e8e912bdb111b4c32da75e71e9a59597 | [
"Apache-2.0"
] | 3 | 2021-11-10T01:33:09.000Z | 2022-03-04T14:25:27.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class SubOptions(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsSubOptions(cls, buf, offset):
n = flatbuffers.encod... | 35.911111 | 130 | 0.718441 |
1a9bab973bea89bca5464a4a0edd429210067da2 | 96,532 | py | Python | Tests/test_SearchIO_exonerate.py | mikepm35/biopython | 9f2d4d8d70ec7223df35fdc3d9c4a3c018756327 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T14:32:44.000Z | 2020-02-13T14:32:44.000Z | Tests/test_SearchIO_exonerate.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_SearchIO_exonerate.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | 1 | 2019-03-14T18:59:30.000Z | 2019-03-14T18:59:30.000Z | # Copyright 2012 by Wibowo Arindrarto. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SearchIO ExonerateIO parsers."""
import os
import unittest
from Bio.SearchI... | 56.550674 | 603 | 0.637768 |
1a9bd12eefcf518126501d915ed50412d1be7f2e | 560 | py | Python | comments/migrations/0004_threadedcomment_comment_root.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-09-02T12:45:31.000Z | 2018-02-10T10:18:11.000Z | comments/migrations/0004_threadedcomment_comment_root.py | Socialsquare/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 17 | 2020-03-24T15:58:05.000Z | 2022-02-10T08:08:57.000Z | comments/migrations/0004_threadedcomment_comment_root.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-01-05T08:02:18.000Z | 2018-01-05T08:02:18.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2019-07-23 13:30
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('comments', '0003_commentroot'),
]
operations = [
... | 25.454545 | 119 | 0.658929 |
1a9bd4902048a4c34983188745528541d6c31192 | 517 | py | Python | terrascript/provider/hashicorp/archive.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/hashicorp/archive.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/hashicorp/archive.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/hashicorp/archive.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:11:52 UTC)
import terrascript
class archive(terrascript.Provider):
"""terraform-provider-archive"""
__description__ = "terraform-provider-archive"
__namespace__ = "hashicorp"
__name__ = "archiv... | 25.85 | 74 | 0.719536 |
1a9bea374f8f612ceeec541c0fae009a0f18115b | 376 | py | Python | quilt/__init__.py | jayvdb/python-quilt | f09799e28ac3ced07dff91b1b677b3db00781ae9 | [
"MIT"
] | 4 | 2016-12-28T23:28:02.000Z | 2022-03-15T02:46:10.000Z | quilt/__init__.py | jayvdb/python-quilt | f09799e28ac3ced07dff91b1b677b3db00781ae9 | [
"MIT"
] | 17 | 2017-02-24T09:16:14.000Z | 2019-04-08T08:37:17.000Z | quilt/__init__.py | jayvdb/python-quilt | f09799e28ac3ced07dff91b1b677b3db00781ae9 | [
"MIT"
] | 2 | 2017-01-03T00:55:59.000Z | 2019-03-28T15:42:12.000Z | # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# Copyright (C) 2012 - 2017 Björn Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of python-quilt for details.
""" A python implementation of quilt """
__version_info__ = ("1", "1... | 28.923077 | 66 | 0.707447 |
1a9bfc0633aad202b9333d5ae4ae81221b9c6466 | 17,502 | py | Python | src/analysis/supplemental.py | icaros-usc/dqd-rl | 83e3da62df37b45c4b8fc549c07f566797b5f685 | [
"MIT"
] | 6 | 2022-02-09T05:35:37.000Z | 2022-03-12T11:54:59.000Z | src/analysis/supplemental.py | icaros-usc/dqd-rl | 83e3da62df37b45c4b8fc549c07f566797b5f685 | [
"MIT"
] | null | null | null | src/analysis/supplemental.py | icaros-usc/dqd-rl | 83e3da62df37b45c4b8fc549c07f566797b5f685 | [
"MIT"
] | null | null | null | """Generates additional figures and videos.
Usage:
python -m src.analysis.supplemental COMMAND
"""
import functools
import os
import shutil
from multiprocessing import Process
from pathlib import Path
import fire
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
from loguru import logger... | 37.238298 | 139 | 0.551251 |
1a9c0f2a2e38b58d5a3c1bed3ac245b9313802b1 | 2,992 | py | Python | tests/numericalizer/test_numericalizer.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 50 | 2019-09-13T10:32:29.000Z | 2022-02-14T16:52:53.000Z | tests/numericalizer/test_numericalizer.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 31 | 2019-09-03T11:06:03.000Z | 2021-08-20T14:57:09.000Z | tests/numericalizer/test_numericalizer.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 9 | 2019-09-16T03:25:15.000Z | 2021-05-11T10:28:25.000Z | import pytest
from sciwing.numericalizers.numericalizer import Numericalizer
from sciwing.vocab.vocab import Vocab
import torch
@pytest.fixture
def instances():
single_instance = [["i", "like", "nlp", "so", "much"]]
return {"single_instance": single_instance}
@pytest.fixture()
def single_instance_setup(ins... | 38.857143 | 88 | 0.734626 |
1a9c1964abb82d9a9a317ad55777099523957693 | 69,165 | py | Python | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models_py3.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models_py3.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 ... | 37.487805 | 140 | 0.652613 |
1a9c4987cf5d801ac783ba5dede632634841a1ae | 3,255 | py | Python | plugins/maya/load/load_atomscrowd_cache.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/maya/load/load_atomscrowd_cache.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/maya/load/load_atomscrowd_cache.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z |
import os
import avalon.api
import avalon.io
from reveries.utils import get_representation_path_
from reveries.maya import lib, capsule, pipeline
from reveries.maya.plugins import ImportLoader
class AtomsCrowdCacheLoader(ImportLoader, avalon.api.Loader):
label = "Atoms Cache"
order = -10
icon = "buildin... | 32.55 | 78 | 0.614439 |
1a9caf0a8739f675e1421816a686d1d7ddd64b75 | 13,008 | py | Python | tests/mdts/tests/functional_tests/test_l2gw.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | null | null | null | tests/mdts/tests/functional_tests/test_l2gw.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | null | null | null | tests/mdts/tests/functional_tests/test_l2gw.py | duarten/midonet | c7a5aa352a8038bdc6a463c68abc47bb411a1e7c | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Midokura SARL
#
# 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... | 33.787013 | 81 | 0.685501 |
1a9ccaeb5ff7c46c4052bd97572d140e4aadc9f5 | 47,292 | py | Python | packages/main/src/RPA/Email/ImapSmtp.py | pavelee/rpaframework | 30bf09eb7a3bb3b22f596690791013e0ff2f7b73 | [
"Apache-2.0"
] | null | null | null | packages/main/src/RPA/Email/ImapSmtp.py | pavelee/rpaframework | 30bf09eb7a3bb3b22f596690791013e0ff2f7b73 | [
"Apache-2.0"
] | null | null | null | packages/main/src/RPA/Email/ImapSmtp.py | pavelee/rpaframework | 30bf09eb7a3bb3b22f596690791013e0ff2f7b73 | [
"Apache-2.0"
] | null | null | null | import base64
from enum import Enum
from functools import wraps
from io import StringIO
import logging
import os
import re
import time
# email package declares these properties in the __all__ definition but
# pylint ignores that
from email import encoders, message_from_bytes # pylint: disable=E0611
from email.messag... | 36.045732 | 103 | 0.578237 |
1a9cd7dfb28184993ccf81ebf04235384abeb75e | 11,592 | py | Python | services/traction/acapy_client/model/get_did_verkey_response.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_client/model/get_did_verkey_response.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_client/model/get_did_verkey_response.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | """
Aries Cloud Agent
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0.7.2
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from acapy_cli... | 41.4 | 124 | 0.558316 |
1a9cd8cd0b9472c43652dcee3671c37f254fc9fd | 24 | py | Python | moves/__init__.py | iwharris/moves-transponder | df72fd0f6a0dd77997376c2979c5c00edb7c6bab | [
"MIT"
] | null | null | null | moves/__init__.py | iwharris/moves-transponder | df72fd0f6a0dd77997376c2979c5c00edb7c6bab | [
"MIT"
] | null | null | null | moves/__init__.py | iwharris/moves-transponder | df72fd0f6a0dd77997376c2979c5c00edb7c6bab | [
"MIT"
] | null | null | null | __author__ = 'iwharris'
| 12 | 23 | 0.75 |
1a9cdff5db190924381f2d1339b1a86c96487d13 | 27,929 | py | Python | AnalysisDAFM/program/DAFM/dafm.py | rcmurray/WorkflowComponents | 368f8132ce5bef3ac3fb9d8e1a13a08f91764cfa | [
"BSD-4-Clause-UC"
] | 26 | 2016-09-14T18:15:29.000Z | 2021-12-01T20:01:29.000Z | AnalysisDAFM/program/DAFM/dafm.py | rcmurray/WorkflowComponents | 368f8132ce5bef3ac3fb9d8e1a13a08f91764cfa | [
"BSD-4-Clause-UC"
] | 122 | 2017-09-12T15:22:03.000Z | 2021-09-27T17:25:08.000Z | AnalysisDAFM/program/DAFM/dafm.py | rcmurray/WorkflowComponents | 368f8132ce5bef3ac3fb9d8e1a13a08f91764cfa | [
"BSD-4-Clause-UC"
] | 17 | 2017-02-16T16:04:41.000Z | 2021-02-06T05:36:44.000Z | from sklearn.metrics import mean_squared_error, log_loss
from keras.models import Model
from keras.models import load_model
from keras.layers import Input, Dense
from keras.layers.recurrent import SimpleRNN
from keras.layers.merge import multiply, concatenate, add
from keras import backend as K
from keras import initia... | 54.655577 | 269 | 0.607362 |
1a9ce9041a3deb50d26c517b83951cc6f918ac64 | 3,647 | py | Python | DeepLearning/DeepLearning/09_Deep_SongJW/garbageCan/mnist_example_book.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | 1 | 2019-06-27T04:05:59.000Z | 2019-06-27T04:05:59.000Z | DeepLearning/DeepLearning/09_Deep_SongJW/garbageCan/mnist_example_book.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | null | null | null | DeepLearning/DeepLearning/09_Deep_SongJW/garbageCan/mnist_example_book.py | ghost9023/DeepLearningPythonStudy | 4d319c8729472cc5f490935854441a2d4b4e8818 | [
"MIT"
] | null | null | null | import sys, os
import numpy as np
import pickle
import random
from PIL import Image
# https://github.com/oreilly-japan/deep-learning-from-scratch/common, dataset
sys.path.append(os.pardir)
from dataset_mnist import load_mnist
from common_functions import sigmoid, softmax
class NeuralNetMnist:
def __init__(self):... | 34.733333 | 112 | 0.545928 |
1a9cec48945c7699b629a6c1676b6eea5f425bc5 | 9,428 | py | Python | docs/conf.py | wliu88/AttentivePathRanking | 4757d0d825442170cc7f2b11c9939cf3e2cec121 | [
"MIT"
] | 16 | 2019-12-02T21:18:48.000Z | 2022-03-01T11:27:01.000Z | docs/conf.py | wliu88/AttentivePathRanking | 4757d0d825442170cc7f2b11c9939cf3e2cec121 | [
"MIT"
] | 6 | 2020-11-09T09:28:22.000Z | 2022-01-13T01:52:20.000Z | docs/conf.py | wliu88/AttentivePathRanking | 4757d0d825442170cc7f2b11c9939cf3e2cec121 | [
"MIT"
] | 5 | 2019-12-29T06:32:25.000Z | 2021-07-29T12:36:36.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# AttentivePathRanking documentation build configuration file, created by
# sphinx-quickstart on Sat May 9 20:15:54 2020.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present... | 32.398625 | 82 | 0.720832 |
1a9d02a0955b117befe401e127669950fe7dcf89 | 973 | py | Python | LC/361.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | 2 | 2018-02-24T17:20:02.000Z | 2018-02-24T17:25:43.000Z | LC/361.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | LC/361.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | class Solution(object):
def maxKilledEnemies(self, grid):
"""
:type grid: List[List[str]]
:rtype: int
"""
if not any(grid): return 0
rowhit=0
colhit=[0]*len(grid[0])
res=0
for i in range(len(grid)):
for j in range(len(grid[0])):
... | 34.75 | 65 | 0.373073 |
1a9d0c0cbdf6b41293b87a7e74acd16c23805d35 | 1,077 | py | Python | agent/universe.py | Ostorlab/agent_tracker | 05c0c4aeebbc5aec3698343411cbcf29fa7834ae | [
"Apache-2.0"
] | 2 | 2022-02-21T15:35:55.000Z | 2022-03-22T08:00:05.000Z | agent/universe.py | Ostorlab/agent_tracker | 05c0c4aeebbc5aec3698343411cbcf29fa7834ae | [
"Apache-2.0"
] | null | null | null | agent/universe.py | Ostorlab/agent_tracker | 05c0c4aeebbc5aec3698343411cbcf29fa7834ae | [
"Apache-2.0"
] | 1 | 2022-03-22T07:58:03.000Z | 2022-03-22T07:58:03.000Z | """Module responsible for universe-related methods."""
import logging
import docker
logger = logging.getLogger(__name__)
def kill_universe(universe_id: str) -> None:
"""remove a service belonging to universe with universe_id."""
client = docker.from_env()
services = client.services.list()
logger.in... | 32.636364 | 73 | 0.666667 |
1a9d17910c14dfbbb9af3a9ddfbf92483c271467 | 8,521 | py | Python | vnmrjpy/io/readfdf.py | hlatkydavid/vnmrjpy | 48707a1000dc87e646e37c8bd686e695bd31a61e | [
"MIT"
] | null | null | null | vnmrjpy/io/readfdf.py | hlatkydavid/vnmrjpy | 48707a1000dc87e646e37c8bd686e695bd31a61e | [
"MIT"
] | null | null | null | vnmrjpy/io/readfdf.py | hlatkydavid/vnmrjpy | 48707a1000dc87e646e37c8bd686e695bd31a61e | [
"MIT"
] | null | null | null | import os
import glob
import numpy as np
import nibabel as nib
import vnmrjpy as vj
class FdfReader():
"""Read Vnmrj .fdf files
data = np.ndarray([receivers, phase, readout, slice, time])
"""
def __init__(self, inPath, procpar=None, printlines=False, verbose=False):
self.path = inPath... | 40.57619 | 90 | 0.433282 |
1a9d347a01f780606dadf0f576c77a95b7845865 | 84 | py | Python | src/bassoon/__init__.py | manu3618/silver-bassoon | caec3b857286c62d53653d7f409ed0861e43ac3d | [
"MIT"
] | null | null | null | src/bassoon/__init__.py | manu3618/silver-bassoon | caec3b857286c62d53653d7f409ed0861e43ac3d | [
"MIT"
] | null | null | null | src/bassoon/__init__.py | manu3618/silver-bassoon | caec3b857286c62d53653d7f409ed0861e43ac3d | [
"MIT"
] | null | null | null | """
several steps:
- retrieve articles
- analyse articles
- serve results
"""
| 12 | 21 | 0.654762 |
1a9d6e7abdc92343d33b4cfe58b1e79339831cad | 7,362 | py | Python | gaphor/UML/classes/klass.py | Xander982/gaphor | b5c55fa18b79b80d9c14ee0cb0ce8a9963e90f86 | [
"Apache-2.0"
] | null | null | null | gaphor/UML/classes/klass.py | Xander982/gaphor | b5c55fa18b79b80d9c14ee0cb0ce8a9963e90f86 | [
"Apache-2.0"
] | null | null | null | gaphor/UML/classes/klass.py | Xander982/gaphor | b5c55fa18b79b80d9c14ee0cb0ce8a9963e90f86 | [
"Apache-2.0"
] | null | null | null | import logging
from gaphor import UML
from gaphor.core.modeling.properties import attribute
from gaphor.diagram.presentation import (
Classified,
ElementPresentation,
from_package_str,
)
from gaphor.diagram.shapes import (
Box,
EditableText,
Text,
draw_border,
draw_top_separator,
)
from... | 32.866071 | 85 | 0.57919 |
1a9d71aace5daf921a869f4c19b6a46f90c1eeed | 2,209 | py | Python | src/arch/naive_rnn/module.py | borhanMorphy/fantasy-name-generator | b148c3702380eef87a3d5a19badf3a2c455301eb | [
"MIT"
] | 2 | 2021-04-02T08:38:55.000Z | 2021-04-14T07:43:32.000Z | src/arch/naive_rnn/module.py | borhanMorphy/fantasy-name-generator | b148c3702380eef87a3d5a19badf3a2c455301eb | [
"MIT"
] | null | null | null | src/arch/naive_rnn/module.py | borhanMorphy/fantasy-name-generator | b148c3702380eef87a3d5a19badf3a2c455301eb | [
"MIT"
] | null | null | null | from typing import Optional, Tuple, List
import torch
import torch.nn as nn
import torch.nn.functional as F
import json
class NaiveRNN(nn.Module):
def __init__(self, vocab_size: int = 29, embed_dim: int = 10, hidden_size: int = 64,
num_classes: int = 29, padding_idx: int = 0, num_layers: int = 1):
... | 33.984615 | 88 | 0.587596 |
1a9d8925821cdf7ab8d99fadf47b9082119a01d3 | 15,410 | py | Python | onehot_nets.py | lauromoraes/promoter_paper | 62aea776cb318a13e142f84dd84bb0a29fb0e83f | [
"Apache-2.0"
] | null | null | null | onehot_nets.py | lauromoraes/promoter_paper | 62aea776cb318a13e142f84dd84bb0a29fb0e83f | [
"Apache-2.0"
] | 9 | 2020-08-12T18:08:46.000Z | 2022-03-12T00:46:11.000Z | onehot_nets.py | lauromoraes/promoter_paper | 62aea776cb318a13e142f84dd84bb0a29fb0e83f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Usage:
python onehot_nets.py -o Bacillus --model HOT_RES_BACILLUS_01 --epochs 3 --patience 20 --cv 5 --n_class 1
... ...
"""
import os
import json
from datetime import datetime
import numpy as np
import pandas as pd
from keras import layers, models, optimizers
from keras im... | 36.778043 | 175 | 0.644711 |
1a9da49b65a2528bab0863e98f87593524fdac8c | 1,388 | py | Python | src/client.py | amosboldor/http-server | 51d7507695aaf3bcfaf0c3d5e6d58b9b6bf74f26 | [
"MIT"
] | null | null | null | src/client.py | amosboldor/http-server | 51d7507695aaf3bcfaf0c3d5e6d58b9b6bf74f26 | [
"MIT"
] | null | null | null | src/client.py | amosboldor/http-server | 51d7507695aaf3bcfaf0c3d5e6d58b9b6bf74f26 | [
"MIT"
] | null | null | null | # encoding: utf-8
"""Local TCP/IP client to send/receive messages to local server."""
import socket
import sys
buffer_length = 8
def initialize_connection():
"""Set up a socket a connection and return socket object."""
infos = socket.getaddrinfo('127.0.0.1', 5000)
stream_info = [i for i in infos if i[1... | 28.326531 | 75 | 0.607349 |
1a9db261067e363d92dfc30674bed3602a7d7bce | 13,076 | py | Python | pyop2/compilation.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | pyop2/compilation.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | pyop2/compilation.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | # This file is part of PyOP2
#
# PyOP2 is Copyright (c) 2012, Imperial College London and
# others. Please see the AUTHORS file in the main source directory for
# a full list of copyright holders. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | 44.026936 | 101 | 0.551468 |
1a9db8d789affc07a523abe70674a7f25298e01e | 348 | py | Python | src/compas_fab/__version__.py | yijiangh/compas_fab | d4e8e630d4daeb8981200456f2ef6b6a09ac88a8 | [
"MIT"
] | 1 | 2019-08-15T17:34:43.000Z | 2019-08-15T17:34:43.000Z | src/compas_fab/__version__.py | yijiangh/compas_fab | d4e8e630d4daeb8981200456f2ef6b6a09ac88a8 | [
"MIT"
] | 3 | 2019-07-30T13:50:51.000Z | 2019-07-30T14:27:27.000Z | src/compas_fab/__version__.py | yijiangh/compas_fab | d4e8e630d4daeb8981200456f2ef6b6a09ac88a8 | [
"MIT"
] | null | null | null | __title__ = 'compas_fab'
__description__ = 'Robotic fabrication package for the COMPAS Framework'
__url__ = 'https://github.com/compas-dev/compas_fab'
__version__ = '0.7.0'
__author__ = 'Gramazio Kohler Research'
__author_email__ = 'gramaziokohler@arch.ethz.ch'
__license__ = 'MIT license'
__copyright__ = 'Copyright 201... | 38.666667 | 72 | 0.79023 |
1a9dc3a4646877d7e1a4f318a03477114e5ef27c | 23,549 | py | Python | PythonProjects/10-Sequences/src/m4_more_iterating.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/10-Sequences/src/m4_more_iterating.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/10-Sequences/src/m4_more_iterating.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | """
This module lets you practice two forms of the ACCUMULATOR pattern:
-- SUMMING
-- COUNTING
where the accumulation is done via ITERATING (i.e., looping)
through a SEQUENCE.
It also demonstrates using an ORACLE and/or PROBABILITY THEORY
in testing and BOUNDARY (EDGE) TESTING.
Authors: David Mutchler, Vibha Alan... | 35.200299 | 79 | 0.542868 |
1a9de4e3f80151c252143c944e9bb3bbc31fce26 | 4,765 | py | Python | python/tvm/hybrid/preprocessor.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | python/tvm/hybrid/preprocessor.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | python/tvm/hybrid/preprocessor.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.000Z | # 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... | 40.381356 | 98 | 0.626023 |
1a9df6ca92c85f9dbc2bdf8523ec097bd2312141 | 3,948 | py | Python | gibson2/examples/demo/igsdf_tour.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 3 | 2021-02-07T14:00:38.000Z | 2021-07-03T19:40:59.000Z | gibson2/examples/demo/igsdf_tour.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | null | null | null | gibson2/examples/demo/igsdf_tour.py | i-m-vivek/iGibson | c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648 | [
"MIT"
] | 2 | 2021-04-01T12:14:59.000Z | 2021-06-18T13:04:39.000Z | import gibson2
from gibson2.simulator import Simulator
from gibson2.scenes.igibson_indoor_scene import InteractiveIndoorScene
from gibson2.render.mesh_renderer.mesh_renderer_settings import MeshRendererSettings
from gibson2.render.profiler import Profiler
from gibson2.utils.assets_utils import get_ig_scene_path
import ... | 37.6 | 127 | 0.627153 |
1a9dfd60c6100066ad766811e662c1c6e486382a | 11,206 | py | Python | python/pyxir/contrib/target/components/DPUCZDX8G/som_op_support.py | Xilinx/pyxir | bef661d6d77adcdbd2cf4163f2cf3a1d31d40406 | [
"Apache-2.0"
] | 25 | 2020-06-17T22:41:13.000Z | 2022-03-22T16:28:22.000Z | python/pyxir/contrib/target/components/DPUCZDX8G/som_op_support.py | Xilinx/pyxir | bef661d6d77adcdbd2cf4163f2cf3a1d31d40406 | [
"Apache-2.0"
] | 25 | 2021-03-16T06:26:44.000Z | 2022-03-18T11:28:33.000Z | python/pyxir/contrib/target/components/DPUCZDX8G/som_op_support.py | Xilinx/pyxir | bef661d6d77adcdbd2cf4163f2cf3a1d31d40406 | [
"Apache-2.0"
] | 19 | 2020-07-30T10:03:02.000Z | 2021-06-29T01:18:16.000Z | # Copyright 2020 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.451087 | 74 | 0.618686 |
1a9e0a1d1ff5f9c7892a0dbf0490c1ebbf0fd569 | 2,686 | py | Python | sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/healthcareapis/azure-mgmt-healthcareapis/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/healthcareapis/azure-mgmt-healthcareapis/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.813333 | 103 | 0.610946 |
1a9e30d9b12cfa82e0e5836c6c6fdbcda5aa4cb8 | 5,552 | py | Python | grab/spider/network_service/threaded.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 2,266 | 2015-01-01T08:47:33.000Z | 2022-03-21T05:02:55.000Z | grab/spider/network_service/threaded.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 221 | 2015-01-13T01:55:57.000Z | 2022-02-25T23:23:35.000Z | grab/spider/network_service/threaded.py | dimichxp/grab | 5fedee3009c18c8a1139b0f82736ebe473021b46 | [
"MIT"
] | 315 | 2015-01-23T06:38:55.000Z | 2022-03-27T08:33:33.000Z | import time
from six.moves.queue import Empty
from grab.error import (
GrabNetworkError, GrabTooManyRedirectsError, GrabInvalidUrl
)
from grab.util.misc import camel_case_to_underscore
from grab.spider.base_service import BaseService
def make_class_abbr(name):
val = camel_case_to_underscore(name)
return... | 45.884298 | 79 | 0.369236 |
1a9e42f8c7b5113d543c2f973f35b1717471f508 | 5,810 | py | Python | torchmetrics/regression/psnr.py | awaelchli/metrics | bb5ca011e1b31dfebe04574eb07be0af541c51fb | [
"Apache-2.0"
] | 1 | 2021-03-12T10:33:12.000Z | 2021-03-12T10:33:12.000Z | torchmetrics/regression/psnr.py | awaelchli/metrics | bb5ca011e1b31dfebe04574eb07be0af541c51fb | [
"Apache-2.0"
] | null | null | null | torchmetrics/regression/psnr.py | awaelchli/metrics | bb5ca011e1b31dfebe04574eb07be0af541c51fb | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning 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 by applicable law or agreed to i... | 40.629371 | 120 | 0.629776 |
1a9e76061a26b73645d2fc1c70ab71095125bdf3 | 5,232 | py | Python | scanners/zap-advanced/scanner/zapclient/scanner/zap_abstract_scanner.py | watchmen-coder/secureCodeBox | ac3482d4ffa6ced7e8251bc7b72144d11ec2d62d | [
"Apache-2.0"
] | 1 | 2021-05-24T08:17:48.000Z | 2021-05-24T08:17:48.000Z | scanners/zap-advanced/scanner/zapclient/scanner/zap_abstract_scanner.py | watchmen-coder/secureCodeBox | ac3482d4ffa6ced7e8251bc7b72144d11ec2d62d | [
"Apache-2.0"
] | null | null | null | scanners/zap-advanced/scanner/zapclient/scanner/zap_abstract_scanner.py | watchmen-coder/secureCodeBox | ac3482d4ffa6ced7e8251bc7b72144d11ec2d62d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# SPDX-FileCopyrightText: 2021 iteratec GmbH
#
# SPDX-License-Identifier: Apache-2.0
# -*- coding: utf-8 -*-
import collections
import logging
from zapv2 import ZAPv2
from abc import abstractmethod
from .. import ZapClient
from ..configuration import ZapConfiguration
# set up logging to file... | 40.875 | 140 | 0.668578 |
1a9eac4670dabe6c87882efe73f6be83eb97c24b | 8,178 | py | Python | trainer/transducer_runners.py | liukai123456789/TensorflowASR | b414f9189a15f0c1b3bdc4d5bf7d9e4a1eab0710 | [
"Apache-2.0"
] | 1 | 2021-06-15T01:19:21.000Z | 2021-06-15T01:19:21.000Z | trainer/transducer_runners.py | liukai123456789/TensorflowASR | b414f9189a15f0c1b3bdc4d5bf7d9e4a1eab0710 | [
"Apache-2.0"
] | null | null | null | trainer/transducer_runners.py | liukai123456789/TensorflowASR | b414f9189a15f0c1b3bdc4d5bf7d9e4a1eab0710 | [
"Apache-2.0"
] | null | null | null |
import tensorflow as tf
import tensorflow.keras.mixed_precision.experimental as mixed_precision
from trainer.base_runners import BaseTrainer
from losses.rnnt_losses import USE_TF,tf_rnnt_loss,rnnt_loss
from AMmodel.transducer_wrap import Transducer
from utils.text_featurizers import TextFeaturizer
import lo... | 43.73262 | 108 | 0.588163 |
1a9ee488886d48fcb5814e813bb70e196c1f814c | 21,677 | py | Python | examples/example_GUI.py | oliverhaas/PyAbel | 1d76733080c439fb71ad14418350d93418c3ed33 | [
"MIT"
] | null | null | null | examples/example_GUI.py | oliverhaas/PyAbel | 1d76733080c439fb71ad14418350d93418c3ed33 | [
"MIT"
] | null | null | null | examples/example_GUI.py | oliverhaas/PyAbel | 1d76733080c439fb71ad14418350d93418c3ed33 | [
"MIT"
] | null | null | null | # -*- coding: iso-8859-1 -*-
# Illustrative GUI driving a small subset of PyAbel methods
import numpy as np
import abel
import sys
if sys.version_info[0] < 3:
import Tkinter as tk
from tkFileDialog import askopenfilename
import ttk as ttk
import tkFont
from ScrolledText import *
else:
import ... | 39.269928 | 96 | 0.539281 |
1a9f0166ceea9ecfc0dec8cd94444ebd6eae6254 | 466 | py | Python | pymeterreader/device_lib/__init__.py | Schwaneberg/pymeterreader | b91a24b2da3899d2f485f17154db1cc816d64359 | [
"BSD-2-Clause"
] | 5 | 2020-10-20T20:36:31.000Z | 2022-03-18T07:23:05.000Z | pymeterreader/device_lib/__init__.py | Schwaneberg/pymeterreader | b91a24b2da3899d2f485f17154db1cc816d64359 | [
"BSD-2-Clause"
] | 1 | 2022-02-28T20:15:49.000Z | 2022-02-28T21:25:13.000Z | pymeterreader/device_lib/__init__.py | Schwaneberg/pymeterreader | b91a24b2da3899d2f485f17154db1cc816d64359 | [
"BSD-2-Clause"
] | 3 | 2021-01-01T17:28:42.000Z | 2021-01-18T16:47:12.000Z | from pymeterreader.device_lib.base import BaseReader
from pymeterreader.device_lib.common import strip, Sample, Device
from pymeterreader.device_lib.meter_plain import PlainReader
from pymeterreader.device_lib.meter_sml import SmlReader
from pymeterreader.device_lib.sensor_bme280 import Bme280Reader
__all__ = ["BaseRe... | 33.285714 | 65 | 0.714592 |
1a9f0d9304a2661d064a10aca92b2a75de74ddf0 | 5,948 | py | Python | app/home/views.py | ags68/CS4398Project | a9652a3670fdbfd2f482104b77573a2d1f138c69 | [
"Unlicense"
] | 3 | 2017-02-27T02:13:52.000Z | 2017-03-05T03:54:25.000Z | app/home/views.py | ags68/CS4398Project | a9652a3670fdbfd2f482104b77573a2d1f138c69 | [
"Unlicense"
] | null | null | null | app/home/views.py | ags68/CS4398Project | a9652a3670fdbfd2f482104b77573a2d1f138c69 | [
"Unlicense"
] | null | null | null | # app/home/views.py
from flask import flash, abort, render_template, redirect, url_for
from flask_login import current_user, login_required
from . import home
from forms import PersonalInfoForm, PayrollForm, CompensationForm
from .. import db
from ..models import Employee, Payroll, Compensation
@home.route('/')
def ... | 32.861878 | 81 | 0.674008 |
1a9f1098e92980da2eec9b2fc93f6311a4a7aab2 | 21,154 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_08_01/operations/_private_endpoint_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_08_01/operations/_private_endpoint_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_08_01/operations/_private_endpoint_connections_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.297645 | 232 | 0.693013 |
1a9f75e64f53f8728ff86e676093f9107502676f | 21,351 | py | Python | google/cloud/vision_v1p4beta1/services/image_annotator/async_client.py | glaswasser/python-vision | 706c314a86b8f35c313bb3e907ae84317dca1a0b | [
"Apache-2.0"
] | 3 | 2021-03-29T19:21:08.000Z | 2021-12-31T09:30:11.000Z | google/cloud/vision_v1p4beta1/services/image_annotator/async_client.py | glaswasser/python-vision | 706c314a86b8f35c313bb3e907ae84317dca1a0b | [
"Apache-2.0"
] | 3 | 2021-09-08T03:19:56.000Z | 2022-03-12T00:58:03.000Z | google/cloud/vision_v1p4beta1/services/image_annotator/async_client.py | baronrustamov/python-vision | 236a5676459abaa3f0b7d991977dc712259a3176 | [
"Apache-2.0"
] | 1 | 2021-03-30T05:02:53.000Z | 2021-03-30T05:02:53.000Z | # -*- coding: utf-8 -*-
# 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 o... | 41.782779 | 103 | 0.65655 |
1a9f774d50e1002bbb45e16b8aaa9eb314299167 | 3,279 | py | Python | deep_translator/deepl.py | ECE444-2021Fall/deep-translator | ffa7560252eede65fea696186b293316ee28e5da | [
"MIT"
] | null | null | null | deep_translator/deepl.py | ECE444-2021Fall/deep-translator | ffa7560252eede65fea696186b293316ee28e5da | [
"MIT"
] | null | null | null | deep_translator/deepl.py | ECE444-2021Fall/deep-translator | ffa7560252eede65fea696186b293316ee28e5da | [
"MIT"
] | null | null | null | import requests
from .constants import BASE_URLS, DEEPL_LANGUAGE_TO_CODE
from .exceptions import (ServerException,
TranslationNotFound,
LanguageNotSupportedException,
AuthorizationException)
class DeepL(object):
"""
class that wraps funct... | 36.433333 | 99 | 0.620311 |
1a9f7819484ae8195dc767b057f2e4d13f0620b1 | 21,443 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_gallery_image_versions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_gallery_image_versions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_gallery_image_versions_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 ... | 47.757238 | 247 | 0.682507 |
1a9f85f75b9ed0d80f17ce2fea002a9f86d8d8ec | 467 | py | Python | kafka-utils/tests/bai_kafka_utils/conftest.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | 6 | 2020-09-29T09:03:04.000Z | 2022-03-14T06:52:25.000Z | kafka-utils/tests/bai_kafka_utils/conftest.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | null | null | null | kafka-utils/tests/bai_kafka_utils/conftest.py | gavinmbell/benchmark-ai-1 | a697e67d68b843fe9350e55871dad867bab5d51d | [
"Apache-2.0"
] | 4 | 2020-10-01T07:49:22.000Z | 2021-06-16T19:44:12.000Z | from pytest import fixture
from bai_kafka_utils.events import BenchmarkEvent
@fixture
def benchmark_event():
return BenchmarkEvent(
action_id="ACTION_ID",
message_id="MESSAGE_ID",
client_id="CLIENT_ID",
client_version="DONTCARE",
client_username="DONTCARE",
authen... | 21.227273 | 49 | 0.635974 |
1a9f97226aab0ed62d269fcf96dfed3f9fbae667 | 801 | py | Python | core/views/customers.py | thehimel/lawyers | c66e0cd2ea43ee302977da03f294472e2a0b0dc7 | [
"CC0-1.0"
] | 2 | 2021-08-04T09:29:54.000Z | 2022-03-04T03:49:45.000Z | core/views/customers.py | thehimel/lawyers | c66e0cd2ea43ee302977da03f294472e2a0b0dc7 | [
"CC0-1.0"
] | null | null | null | core/views/customers.py | thehimel/lawyers | c66e0cd2ea43ee302977da03f294472e2a0b0dc7 | [
"CC0-1.0"
] | null | null | null | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views.generic import TemplateView
from users.decorators import customer_required
@method_decorator([login_required, customer_required], name='dispatch')
class CustomerDashboardView(TemplateView):... | 33.375 | 71 | 0.701623 |
1a9fa8e4dc15f68664a0d56a75b6e9b5effe33d8 | 7,467 | py | Python | tensorflow_quantum/python/layers/high_level/controlled_pqc_test.py | anushkrishnav/quantum | d8317119e45966581f2cfee9d1423b924615e5f1 | [
"Apache-2.0"
] | 3 | 2021-03-28T07:39:07.000Z | 2021-03-28T14:08:26.000Z | tensorflow_quantum/python/layers/high_level/controlled_pqc_test.py | prashanth-up/quantum | 6deb5ad96b575b905cf33773d7a71379b8defe18 | [
"Apache-2.0"
] | 3 | 2021-08-25T15:15:49.000Z | 2022-02-10T05:10:42.000Z | tensorflow_quantum/python/layers/high_level/controlled_pqc_test.py | prashanth-up/quantum | 6deb5ad96b575b905cf33773d7a71379b8defe18 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow Quantum 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... | 42.426136 | 80 | 0.579483 |
1a9fcb6e2172860ced07dbce8d8963f182fbf47f | 220 | py | Python | unifier/support/manager.py | sosolidkk/manga-unifier | 4cca148affbb197b9284d46ef04c66d42d96c03a | [
"MIT"
] | 6 | 2021-03-25T14:55:36.000Z | 2021-05-25T15:12:41.000Z | unifier/support/manager.py | sosolidkk/manga-unifier | 4cca148affbb197b9284d46ef04c66d42d96c03a | [
"MIT"
] | 6 | 2021-02-19T12:32:26.000Z | 2021-03-25T16:54:40.000Z | unifier/support/manager.py | sosolidkk/manga-unifier | 4cca148affbb197b9284d46ef04c66d42d96c03a | [
"MIT"
] | null | null | null | from django.db import models
class HelperManager(models.Manager):
def get_or_none(self, **kwargs):
try:
return self.get(**kwargs)
except self.model.DoesNotExist:
return None
| 22 | 39 | 0.627273 |
1aa02622e5315279e143e3c11972f00f7e8229d7 | 3,894 | py | Python | markdown_generator/bibtex2markdown.py | loicbarrault/loicbarrault.github.io | b82b9da9b5b43c3f5effcbb3d729acdaeeb73859 | [
"MIT"
] | null | null | null | markdown_generator/bibtex2markdown.py | loicbarrault/loicbarrault.github.io | b82b9da9b5b43c3f5effcbb3d729acdaeeb73859 | [
"MIT"
] | null | null | null | markdown_generator/bibtex2markdown.py | loicbarrault/loicbarrault.github.io | b82b9da9b5b43c3f5effcbb3d729acdaeeb73859 | [
"MIT"
] | null | null | null | # coding: utf-8
import bibtexparser
from bibtexparser.bparser import BibTexParser
from bibtexparser.customization import homogenize_latex_encoding
from bibtexparser.customization import convert_to_unicode
import os, sys
import datetime
parser = BibTexParser()
#parser.customization = homogenize_latex_encoding
parser.c... | 44.25 | 309 | 0.634823 |
1aa069e631ca91ec12f9cb1bbf593c2de2524752 | 3,599 | py | Python | library/viptela_template_facts.py | ciscops/ansible-viptela | 8500c285d7adc687a498fb0aabad72dfe616897b | [
"BSD-Source-Code"
] | 1 | 2019-04-19T19:58:33.000Z | 2019-04-19T19:58:33.000Z | library/viptela_template_facts.py | ciscops/ansible-viptela | 8500c285d7adc687a498fb0aabad72dfe616897b | [
"BSD-Source-Code"
] | 1 | 2019-04-24T02:31:39.000Z | 2019-04-24T16:18:10.000Z | library/viptela_template_facts.py | ciscops/ansible-viptela | 8500c285d7adc687a498fb0aabad72dfe616897b | [
"BSD-Source-Code"
] | null | null | null | #!/usr/bin/python
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
DOCUMENTATION = '''
---
module: viptela_package
short_description: This is my sample module
version_added: "2.4"
description:
- "This is my longer description explaining my sample ... | 28.338583 | 122 | 0.680467 |
1aa06b26908f9241b288aa216c4b3dd1872a5679 | 15,731 | py | Python | impacket/dcerpc/srvsvcserver.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/dcerpc/srvsvcserver.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/dcerpc/srvsvcserver.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | 1 | 2022-01-28T00:53:41.000Z | 2022-01-28T00:53:41.000Z | ################################################################################
# DEPRECATION WARNING! #
# This library will be deprecated soon. You should use impacket.dcerpc.v5 #
# classes instead ... | 34.573626 | 141 | 0.54898 |
1aa079de38e8bacc308a7a85ca7f43d9a97851ed | 11,600 | py | Python | docs/conf.py | hawkins/Shawk | c5be1165d8f6c0471544d06f7da07156df1dcc10 | [
"MIT"
] | 13 | 2016-05-05T11:16:31.000Z | 2021-02-25T11:23:14.000Z | docs/conf.py | hawkins/Shawk | c5be1165d8f6c0471544d06f7da07156df1dcc10 | [
"MIT"
] | 18 | 2016-05-05T20:23:51.000Z | 2020-12-25T16:34:05.000Z | docs/conf.py | hawkins/Shawk | c5be1165d8f6c0471544d06f7da07156df1dcc10 | [
"MIT"
] | 5 | 2017-07-25T23:50:43.000Z | 2021-12-04T11:05:13.000Z | #/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Shawk documentation build configuration file, created by
# sphinx-quickstart on Mon Jan 4 08:24:28 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autog... | 31.351351 | 80 | 0.717672 |
1aa09a318c056317ed1c5f298713ab001f32d757 | 7,871 | py | Python | aioarangodb/job.py | ckdanny/aioarangodb | 432ac3701c1ca32bed2021ef510c724cd543f39f | [
"MIT"
] | 17 | 2020-06-11T20:26:41.000Z | 2021-04-03T19:07:57.000Z | aioarangodb/job.py | ckdanny/aioarangodb | 432ac3701c1ca32bed2021ef510c724cd543f39f | [
"MIT"
] | 5 | 2021-06-24T13:31:16.000Z | 2022-03-09T11:28:04.000Z | aioarangodb/job.py | ckdanny/aioarangodb | 432ac3701c1ca32bed2021ef510c724cd543f39f | [
"MIT"
] | 4 | 2020-09-12T11:52:41.000Z | 2021-04-21T19:30:00.000Z | from __future__ import absolute_import, unicode_literals
from uuid import uuid4
from .exceptions import (
AsyncJobCancelError,
AsyncJobStatusError,
AsyncJobResultError,
AsyncJobClearError,
BatchJobResultError
)
from .request import Request
class Job(object): # pragma: no cover
"""Base class... | 32.795833 | 79 | 0.614788 |
1aa0bff5a87515371c2d71e6e9c6d43254e7bfc3 | 4,370 | py | Python | hyperbox/mutables/ops/batchnorm.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | 1 | 2022-01-17T00:34:14.000Z | 2022-01-17T00:34:14.000Z | hyperbox/mutables/ops/batchnorm.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | hyperbox/mutables/ops/batchnorm.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.batchnorm import _BatchNorm
from hyperbox.mutables.spaces import ValueSpace
from .base_module import FinegrainedModule
from .utils import is_searchable
__all__ = [
'BaseBatchNorm',
'BatchNorm1d',
'Ba... | 40.091743 | 110 | 0.629748 |
1aa0d7d3010cebde4ba0859b952181984c24e66b | 7,765 | py | Python | ldapdb/backends/ldap/base.py | unistra/django-ldapdb | 14ab432a8e50d4f4b8dfafa251fc868843d3d519 | [
"BSD-3-Clause"
] | 2 | 2015-03-05T08:02:21.000Z | 2017-03-27T11:00:11.000Z | ldapdb/backends/ldap/base.py | unistra/django-ldapdb | 14ab432a8e50d4f4b8dfafa251fc868843d3d519 | [
"BSD-3-Clause"
] | null | null | null | ldapdb/backends/ldap/base.py | unistra/django-ldapdb | 14ab432a8e50d4f4b8dfafa251fc868843d3d519 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# django-ldapdb
# Copyright (c) 2009-2010, Bolloré telecom
# All rights reserved.
#
# See AUTHORS file for a full list of contributors.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# ... | 38.440594 | 100 | 0.633999 |
1aa0f8193af2a634e85ee14db851f10520e5e0da | 2,573 | py | Python | transformer/common_layer_fns.py | yashbonde/transformer_network_tensorflow | 2b499ae9de46562b536bed08d1099557bbd67a88 | [
"MIT"
] | 17 | 2019-01-08T04:56:53.000Z | 2021-09-01T09:51:22.000Z | transformer/common_layer_fns.py | yashbonde/transformer_network_tensorflow | 2b499ae9de46562b536bed08d1099557bbd67a88 | [
"MIT"
] | null | null | null | transformer/common_layer_fns.py | yashbonde/transformer_network_tensorflow | 2b499ae9de46562b536bed08d1099557bbd67a88 | [
"MIT"
] | 9 | 2018-12-02T12:09:07.000Z | 2019-11-22T16:10:18.000Z | """
common_layer_fns.py
This module has functions related to tf-layers used in multiple locations
19.09.2019 - @yashbonde
"""
import tensorflow as tf
def shapes_list(inp):
"""
cleaner handling of tensorflow shapes
:param inp: input tensor
:return: list of shapes combining dynamic and static shapes
... | 34.77027 | 96 | 0.614069 |
1aa0fa25bd21ae56b297ba5d24b852049d90b644 | 1,583 | py | Python | src/onevision/file/handler/pickle_handler.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/file/handler/pickle_handler.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/file/handler/pickle_handler.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Handler for pickle file.
"""
from __future__ import annotations
import pickle
from pathlib import Path
from typing import Optional
from typing import TextIO
from typing import Union
from onevision.factory import FILE_HANDLERS
from onevision.file.handler.base import B... | 24.353846 | 70 | 0.691725 |
1aa11506436446757ee2e1d9d6866cf7a5b32a96 | 19,195 | py | Python | cloudmesh/pi/grovepi.py | cloudmesh/cloudmesh.pi | bdf706b3763031341c41b811749064c293e73c14 | [
"Apache-2.0"
] | 2 | 2017-09-18T00:56:36.000Z | 2018-06-01T23:41:23.000Z | cloudmesh/pi/grovepi.py | cloudmesh/cloudmesh-pi | bdf706b3763031341c41b811749064c293e73c14 | [
"Apache-2.0"
] | 1 | 2018-04-16T18:37:17.000Z | 2018-04-16T18:37:17.000Z | cloudmesh/pi/grovepi.py | cloudmesh/cloudmesh.pi | bdf706b3763031341c41b811749064c293e73c14 | [
"Apache-2.0"
] | 3 | 2017-09-20T11:13:54.000Z | 2017-11-30T23:48:37.000Z | #!/usr/bin/env python
#
# GrovePi Python library
# v1.2.2
#
# This file provides the basic functions for using the GrovePi
#
# The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
#
# Have a question about this example? Ask on the for... | 30.371835 | 139 | 0.691117 |
1aa136309a133d99935ffcfbccfbd21ef89b3fd9 | 19,214 | py | Python | dataset_utils.py | maragraziani/intentionally_flawed_models | 181d616d76dd04cfe47186c5bed5c4d82bd655d4 | [
"MIT"
] | 2 | 2020-07-28T09:54:12.000Z | 2021-11-02T03:58:24.000Z | dataset_utils.py | maragraziani/intentionally_flawed_models | 181d616d76dd04cfe47186c5bed5c4d82bd655d4 | [
"MIT"
] | null | null | null | dataset_utils.py | maragraziani/intentionally_flawed_models | 181d616d76dd04cfe47186c5bed5c4d82bd655d4 | [
"MIT"
] | null | null | null | import keras.backend as K
import numpy as np
import keras.datasets
import matplotlib.pyplot as plt
import keras
#from memorization_utils import *
import os
from sklearn.linear_model import Ridge
import sys
sys.path.append('../rcvs_fexps/')
sys.path.append('../rcvs_fexps/iMIMIC-RCVs/')
sys.path.append('../rcvs_fexps/iM... | 35.515712 | 122 | 0.620433 |
1aa17db17ead726e11542e13a0e89b44af777094 | 1,074 | py | Python | singlyLinkedListHasCycles.py | trishahanlon/algorithms-review | 4e08938526020204d0a7f47982b46c05b0973636 | [
"Apache-2.0"
] | null | null | null | singlyLinkedListHasCycles.py | trishahanlon/algorithms-review | 4e08938526020204d0a7f47982b46c05b0973636 | [
"Apache-2.0"
] | null | null | null | singlyLinkedListHasCycles.py | trishahanlon/algorithms-review | 4e08938526020204d0a7f47982b46c05b0973636 | [
"Apache-2.0"
] | null | null | null | # You have a singly-linked list and want to check if it contains a cycle.
# A cycle occurs when a node’s next points back to a previous node in the list.
class LinkedListNode(object):
def __init__(self, value):
self.value = value
self.next = None
# Write a function contains_cycle() that takes th... | 26.85 | 85 | 0.696462 |
1aa19d3b183ba9cfceec0c1a54644d682c619361 | 6,239 | py | Python | backend/utils/common.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | 1 | 2022-03-01T07:20:36.000Z | 2022-03-01T07:20:36.000Z | backend/utils/common.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | null | null | null | backend/utils/common.py | lybbn/django-vue3-lyadmin | df8ed48971eb3e3da977e1fd0467b1230b56afe4 | [
"MIT"
] | null | null | null | import os,re
import random
import time
from rest_framework.request import Request
from django.http import QueryDict
from urllib.parse import urlparse
import datetime
import ast
import base64
import hashlib
#手机号验证正则
REGEX_MOBILE = "^1[356789]\d{9}$|^147\d{8}$|^176\d{8}$"
def hide4mobile(mobile):
"""
隐藏手机号中间四... | 24.757937 | 135 | 0.604103 |
1aa1f4282c7ddba4a03d7a9fe69064f4bf973099 | 303 | py | Python | amatino/missing_key.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 2 | 2018-07-20T20:00:33.000Z | 2020-10-08T15:49:06.000Z | amatino/missing_key.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 1 | 2020-05-21T02:49:29.000Z | 2020-05-21T02:49:29.000Z | amatino/missing_key.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 3 | 2018-09-03T09:31:31.000Z | 2020-05-21T05:30:00.000Z | """
Amatino API Python Bindings
Missing Key Module
Author: hugh@amatino.io
"""
from amatino.api_error import ApiError
class MissingKey(ApiError):
_PREFIX = 'Expected key "{}" missing from response data'
def __init__(self, key: str) -> None:
super().__init__(self._PREFIX.format(key))
| 21.642857 | 60 | 0.709571 |
1aa1f69c463feb8b6deaa1eb2830d200abda88e9 | 3,179 | py | Python | examples/custom_loop.py | Cygn/pychromecast | bccba1d9d84893d243ce5d626878d5f2f5095442 | [
"MIT"
] | null | null | null | examples/custom_loop.py | Cygn/pychromecast | bccba1d9d84893d243ce5d626878d5f2f5095442 | [
"MIT"
] | null | null | null | examples/custom_loop.py | Cygn/pychromecast | bccba1d9d84893d243ce5d626878d5f2f5095442 | [
"MIT"
] | null | null | null | """
Example that shows how the socket client can be used without its own worker
thread by not calling Chromecast.start() or Chromecast.wait(), but instead calling
Chromecast.connect().
You can use that functionality to include pychromecast into your main loop.
"""
# pylint: disable=invalid-name
import argparse
import... | 27.885965 | 84 | 0.615288 |
1aa1f7f8656ab54608a6b2fea6ee257829c3d8c3 | 759 | py | Python | example/main.py | alecdotico/engineauth | def523f6c0d48f346e552b6638e6f3a6a1717733 | [
"Apache-2.0"
] | 1 | 2016-09-14T09:53:43.000Z | 2016-09-14T09:53:43.000Z | example/main.py | alecdotico/engineauth | def523f6c0d48f346e552b6638e6f3a6a1717733 | [
"Apache-2.0"
] | null | null | null | example/main.py | alecdotico/engineauth | def523f6c0d48f346e552b6638e6f3a6a1717733 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
import re
import webapp2
from webapp2 import Route
import os
from jinja2.filters import do_pprint
if 'lib' not in sys.path:
sys.path[0:0] = ['lib']
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
routes = [
Route(r'/', handler='handlers.PageHandler... | 21.685714 | 79 | 0.633729 |
1aa231d0895e450e1a34e4c21f2410660dd96be9 | 2,970 | py | Python | Basics/E05_Drawing/E01_DrawSpirals.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | Basics/E05_Drawing/E01_DrawSpirals.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | Basics/E05_Drawing/E01_DrawSpirals.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# www.pagebot.io
# Licensed under MIT conditions
#
# -----------------------------------------------------------------------------
#
# E01_DrawS... | 28.557692 | 87 | 0.518182 |
1aa242eaecd4841dfeb988a6b09728e24ca78c66 | 41,842 | py | Python | example/cbnu/cbnu_spikesorter.py | rbodo/tridesclous | 86f58eb8f076698245786c75e906514c7a914e48 | [
"MIT"
] | 1 | 2021-04-13T15:10:13.000Z | 2021-04-13T15:10:13.000Z | example/cbnu/cbnu_spikesorter.py | rbodo/tridesclous | 86f58eb8f076698245786c75e906514c7a914e48 | [
"MIT"
] | null | null | null | example/cbnu/cbnu_spikesorter.py | rbodo/tridesclous | 86f58eb8f076698245786c75e906514c7a914e48 | [
"MIT"
] | null | null | null | import os
import shutil
import time
import tkinter as tk
import tkinter.ttk as ttk
from functools import partial
from tkinter import filedialog, messagebox
import win32api
import matplotlib.pyplot as plt
import numpy as np
import pyqtgraph as pg
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanv... | 39.068161 | 79 | 0.576096 |
1aa244d230de735395aa76d7a52e0b8442afe794 | 4,141 | py | Python | tango_with_django_project/settings.py | farschmessivo/ranco | ce81e77a9c2a82c4475b3838c3eac48bf206206f | [
"MIT"
] | null | null | null | tango_with_django_project/settings.py | farschmessivo/ranco | ce81e77a9c2a82c4475b3838c3eac48bf206206f | [
"MIT"
] | null | null | null | tango_with_django_project/settings.py | farschmessivo/ranco | ce81e77a9c2a82c4475b3838c3eac48bf206206f | [
"MIT"
] | null | null | null | """
Django settings for tango_with_django_project project.
Generated by 'django-admin startproject' using Django 1.9.10.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings... | 28.363014 | 91 | 0.714562 |
1aa253d21dcecab51afc5945047c7f0960d5db6b | 7,716 | py | Python | flyqma/data/images.py | sbernasek/flyqma | 4a622c3f5fed4456c3b9240f5a96428789fde9bd | [
"MIT"
] | 2 | 2020-02-22T09:53:15.000Z | 2020-02-24T19:01:24.000Z | flyqma/data/images.py | sbernasek/flyqma | 4a622c3f5fed4456c3b9240f5a96428789fde9bd | [
"MIT"
] | null | null | null | flyqma/data/images.py | sbernasek/flyqma | 4a622c3f5fed4456c3b9240f5a96428789fde9bd | [
"MIT"
] | null | null | null | from scipy.ndimage import iterate_structure, generate_binary_structure
from scipy.ndimage import gaussian_filter, median_filter
from skimage.filters import threshold_otsu
from skimage.exposure import equalize_adapthist
import matplotlib.pyplot as plt
import numpy as np
from copy import deepcopy
import warnings
class ... | 27.073684 | 117 | 0.572836 |
1aa25d9f46b2da20461bf366f00d9cf06b0b600d | 305 | py | Python | gaffer/node/util.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | null | null | null | gaffer/node/util.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | null | null | null | gaffer/node/util.py | mikiec84/gaffer | 8c5d5b5e2ff3fcb1f7cc7c8fbfc623f97dd0da8d | [
"MIT",
"Unlicense"
] | 1 | 2018-10-28T00:59:17.000Z | 2018-10-28T00:59:17.000Z | # -*- coding: utf-8 -
#
# This file is part of gaffer. See the NOTICE for more information.
import os
if os.name == 'nt':
def user_path():
home = os.path.expanduser('~')
return os.path.join(home, '_gafferd')
else:
def user_path():
return os.path.expanduser('~/.gafferd')
| 21.785714 | 67 | 0.606557 |
1aa29bc1db50e882ee213d77798a414d161fe637 | 24,040 | py | Python | modelscript/scripts/classes/parser/__init__.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 1 | 2019-02-22T14:27:06.000Z | 2019-02-22T14:27:06.000Z | modelscript/scripts/classes/parser/__init__.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 4 | 2015-12-18T10:30:02.000Z | 2015-12-18T10:36:28.000Z | modelscript/scripts/classes/parser/__init__.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | null | null | null | # coding=utf-8
"""Parser for ClassScript"""
from typing import cast
import os
from modelscript.base.grammars import (
ASTNodeSourceIssue)
from modelscript.base.issues import (
Levels)
from modelscript.base.exceptions import (
UnexpectedCase)
from modelscript.metamodels.classes import (
ClassModel,
... | 38.962723 | 72 | 0.480865 |
1aa29f6a88dc45cf7691567fdf0129c98a4bd60b | 1,354 | py | Python | python3/tests/fixtures.py | blackelk/hell | 4bb72b2efcb8c83396a95fb6b75c169e2d2315cd | [
"MIT"
] | 2 | 2017-10-01T16:50:37.000Z | 2019-07-03T21:19:09.000Z | python3/tests/fixtures.py | blackelk/hell | 4bb72b2efcb8c83396a95fb6b75c169e2d2315cd | [
"MIT"
] | 3 | 2020-03-31T03:04:38.000Z | 2021-11-15T17:48:34.000Z | python3/tests/fixtures.py | blackelk/hell | 4bb72b2efcb8c83396a95fb6b75c169e2d2315cd | [
"MIT"
] | null | null | null | from functools import wraps
from hell import F
def decorator(fn):
@wraps(fn)
def wrapper(*args, **kwargs):
return fn(*args, **kwargs)
return wrapper
def fn0():
F()
def fn1(a):
F()
def fn2(k1=1, k2=1):
F()
@decorator
def fn3():
F()
def gen1():
F()
yield 0
la1 = lamb... | 11.190083 | 39 | 0.483013 |
1aa2e288e89068d58f56ef5aaf1b6bf8dbaee740 | 1,713 | py | Python | lmp/util/rand.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | lmp/util/rand.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | lmp/util/rand.py | ProFatXuanAll/char-RNN | 531f101b3d1ba20bafd28ca060aafe6f583d1efb | [
"Beerware"
] | null | null | null | """Randomness utilites."""
import random
import numpy as np
import torch
import torch.backends
import torch.cuda
import lmp.util.validate
def set_seed(seed: int) -> None:
"""Do best effort to ensure reproducibility on the same machine.
Set random seed on :py:mod:`random` module, :py:mod:`numpy.random`, :py:fu... | 30.052632 | 119 | 0.745476 |
1aa2f5f2a01b2fe23228e34cbf85b4f6e13c796d | 8,499 | py | Python | .cmake-format.py | g-ongetta/CCF | 190b3ca4c41d83719df6aa37c6493cff976ed163 | [
"Apache-2.0"
] | null | null | null | .cmake-format.py | g-ongetta/CCF | 190b3ca4c41d83719df6aa37c6493cff976ed163 | [
"Apache-2.0"
] | null | null | null | .cmake-format.py | g-ongetta/CCF | 190b3ca4c41d83719df6aa37c6493cff976ed163 | [
"Apache-2.0"
] | null | null | null | # ----------------------------------
# Options affecting listfile parsing
# ----------------------------------
with section("parse"):
# Specify structure for custom cmake functions
additional_commands = {
"add_ccf_app": {
"kwargs": {
"SRCS": "*",
"INCLUDE_DIR... | 34.270161 | 82 | 0.617249 |
1aa31749fef3f224c49b48cb39f529df0e19237a | 43,809 | py | Python | framework/Simulation.py | greenwoodms06/raven | f8e789c3c58356cdeab53c057b940d3ee96cd0d6 | [
"Apache-2.0"
] | null | null | null | framework/Simulation.py | greenwoodms06/raven | f8e789c3c58356cdeab53c057b940d3ee96cd0d6 | [
"Apache-2.0"
] | null | null | null | framework/Simulation.py | greenwoodms06/raven | f8e789c3c58356cdeab53c057b940d3ee96cd0d6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Battelle Energy Alliance, 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 t... | 49.613817 | 209 | 0.654272 |
1aa3292f76eaeb51c0c6ad29cf64996ae7b9db5a | 9,473 | py | Python | flayer/scripts.py | techhat/grabbr | c188468168b35b8cd9cd0a42022fb603129faf9e | [
"Apache-2.0"
] | null | null | null | flayer/scripts.py | techhat/grabbr | c188468168b35b8cd9cd0a42022fb603129faf9e | [
"Apache-2.0"
] | null | null | null | flayer/scripts.py | techhat/grabbr | c188468168b35b8cd9cd0a42022fb603129faf9e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=too-many-nested-blocks,too-many-branches
'''
Basic functions for Web Flayer
'''
# Python
import os
import sys
import time
import copy
import json
import pprint
import urllib
import logging
# 3rd party
import yaml
import psutil
import requests
from bs4 import BeautifulSoup
fro... | 31.682274 | 94 | 0.524332 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.