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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
910466903a1e9c319cf0710b4d896c5f07be1275 | 538 | py | Python | rhucrl/environment/wrappers/reward_wrapper.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2021-11-19T11:46:48.000Z | 2021-11-19T11:46:48.000Z | rhucrl/environment/wrappers/reward_wrapper.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2021-11-22T07:48:03.000Z | 2021-11-22T07:48:03.000Z | rhucrl/environment/wrappers/reward_wrapper.py | sebascuri/rhucrl | 27663e1302f3bbc636dff28495c6f2667bb7c1da | [
"MIT"
] | 1 | 2022-03-26T10:18:01.000Z | 2022-03-26T10:18:01.000Z | """Reward Wrapper."""
from gym import Wrapper
class RewardWrapper(Wrapper):
"""Wrap environment by changing the reward function."""
def __init__(self, env, reward_function):
super().__init__(env)
self.reward_function = reward_function
def step(self, action):
"""Wrap reward functi... | 29.888889 | 66 | 0.656134 |
9104a1d071af3d7b7d40838148f2e49301fa39ba | 14,651 | py | Python | tensorflow/python/ops/distributions/dirichlet.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/ops/distributions/dirichlet.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/ops/distributions/dirichlet.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.811558 | 80 | 0.653744 |
9104a84ee5de22b2c4482fa39f5e408bf5e2a134 | 1,504 | py | Python | moesifdjango/event_mapper.py | Moesif/moesifdjango | 67529381b7ffc234263e6989ae16cf8ef1ca62a6 | [
"Apache-2.0"
] | 13 | 2016-11-02T18:53:03.000Z | 2022-01-25T21:47:24.000Z | moesifdjango/event_mapper.py | Moesif/moesifdjango | 67529381b7ffc234263e6989ae16cf8ef1ca62a6 | [
"Apache-2.0"
] | 10 | 2017-12-13T11:56:48.000Z | 2021-07-16T12:34:14.000Z | moesifdjango/event_mapper.py | Moesif/moesifdjango | 67529381b7ffc234263e6989ae16cf8ef1ca62a6 | [
"Apache-2.0"
] | 5 | 2018-02-02T13:51:49.000Z | 2021-12-17T00:46:24.000Z | from moesifapi.models import *
class EventMapper:
def __init__(self):
pass
@classmethod
def to_request(self, req_time, uri, method, api_version, ip_address, req_headers, req_body, transfer_encoding):
return EventRequestModel(time=req_time,
uri=uri,
... | 39.578947 | 115 | 0.505319 |
9104bb9945615ecb2f2a3dadf713cfbff42c3663 | 3,046 | py | Python | users/tests/test_forms.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | users/tests/test_forms.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | users/tests/test_forms.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | from django.core.urlresolvers import resolve
from django.urls import reverse
from django.template.loader import render_to_string
from django.test import TestCase
from django.http import HttpRequest
from unittest import skip
from users.views import home_visitor, display_signup
from users.models import University, Facult... | 28.46729 | 109 | 0.722915 |
9104bcdea3f933ec4aa4b97c18f4d4dc981b5660 | 7,063 | py | Python | src/test/tests/unit/compiler_warnings.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/unit/compiler_warnings.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/unit/compiler_warnings.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: compiler_warnings.py
#
# Tests: changes in compiler warnings
#
# Mark C. Miller, Sun Jul 13 21:45:49 PDT 2014
# ----------------------------------------------------------------------------
import t... | 33.159624 | 114 | 0.611072 |
9104c8288fa3eaa7441e7f915b5c5ec51a599074 | 27 | py | Python | btd6_memory_info/generated/SteamNative/SteamShutdown_t/steam_shutdown_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/SteamShutdown_t/steam_shutdown_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/SteamNative/SteamShutdown_t/steam_shutdown_t.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class SteamShutdown_t: pass | 27 | 27 | 0.888889 |
9104d96483e2a47136f0c183bccfaf9ed3326ba1 | 1,004 | py | Python | pagesext/tests/base.py | dlancer/django-pages-cms-extensions | 4aa6f2780abef9543ced20258ede01a9662167b3 | [
"BSD-3-Clause"
] | 1 | 2016-07-08T07:23:20.000Z | 2016-07-08T07:23:20.000Z | pagesext/tests/base.py | dlancer/django-pages-cms-extensions | 4aa6f2780abef9543ced20258ede01a9662167b3 | [
"BSD-3-Clause"
] | null | null | null | pagesext/tests/base.py | dlancer/django-pages-cms-extensions | 4aa6f2780abef9543ced20258ede01a9662167b3 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.test import TestCase
from django.test.client import RequestFactory
from pages.models.page import Page
class PagesExtCase(TestCase):
urls = 'pagesext.tests.urls'
fixtur... | 37.185185 | 105 | 0.675299 |
91050de2755e81e621e6ad58c63f9a3855da491c | 3,395 | py | Python | dev/genrelease.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 986 | 2017-06-07T07:33:01.000Z | 2022-03-31T13:00:46.000Z | dev/genrelease.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 2,623 | 2017-06-07T18:29:11.000Z | 2022-03-31T20:27:31.000Z | dev/genrelease.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 238 | 2017-06-26T19:02:58.000Z | 2022-03-31T15:18:29.000Z | #!/usr/bin/env python
"""Generate release notes for Ibis."""
import datetime
import pathlib
import click
import pygit2
import regex as re
GITHUB_CLOSE_KEYWORDS = (
'close',
'closes',
'closed',
'fix',
'fixes',
'fixed',
'resolve',
'resolves',
'resolved',
)
KEYWORD_MAP = {
'bld... | 25.148148 | 76 | 0.599705 |
91057297ebb52cd7ce8e46e558da315fa9a4fb67 | 2,461 | py | Python | sample.py | ejohnfel/mysqlite | 2b7d0e2ee954752625bfc2be92aeefd8a0c1d6f6 | [
"MIT"
] | null | null | null | sample.py | ejohnfel/mysqlite | 2b7d0e2ee954752625bfc2be92aeefd8a0c1d6f6 | [
"MIT"
] | null | null | null | sample.py | ejohnfel/mysqlite | 2b7d0e2ee954752625bfc2be92aeefd8a0c1d6f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.8
import os,sys
import mysqlite3
from mysqlite3 import Sqlite3Wrapper
from datetime import date,time,datetime
import uuid
#
# Main Loop
#
if __name__ == "__main__":
rec_id = uuid.uuid1()
timestamp = datetime.now()
# Fname can be :memory: or a filename, when using ":memory:" nothing is sa... | 27.965909 | 97 | 0.729378 |
9105c262aa083e0f2034de02309f31d4790f8034 | 124 | py | Python | src/segmentation/data/augmentation/__init__.py | prhuppertz/Burned_Area_Detection | 4091e8a5ba22c1db28b4accd71cf2994d544ffab | [
"Apache-2.0"
] | 5 | 2021-03-30T02:22:42.000Z | 2022-01-18T20:12:30.000Z | src/segmentation/data/augmentation/__init__.py | prhuppertz/Burned_Area_Detection | 4091e8a5ba22c1db28b4accd71cf2994d544ffab | [
"Apache-2.0"
] | null | null | null | src/segmentation/data/augmentation/__init__.py | prhuppertz/Burned_Area_Detection | 4091e8a5ba22c1db28b4accd71cf2994d544ffab | [
"Apache-2.0"
] | 3 | 2021-04-26T02:08:05.000Z | 2021-08-15T20:12:31.000Z | from src.segmentation.data.augmentation import sequences
from src.segmentation.data.augmentation.augmentor import Augmentor
| 41.333333 | 66 | 0.879032 |
9105c7ca099fbeb0ebe3494e31c127278600fe9f | 7,172 | py | Python | sdk/search/azure-search-documents/tests/async_tests/test_search_client_buffered_sender_live_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/search/azure-search-documents/tests/async_tests/test_search_client_buffered_sender_live_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/search/azure-search-documents/tests/async_tests/test_search_client_buffered_sender_live_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import py... | 41.456647 | 107 | 0.644311 |
9105f8e0f0b8aa2b603454318bc0be7e1cd46318 | 5,512 | py | Python | glue.py | twistedcubic/attention-rank-collapse | 38b5df6dc2add25f6d945e48a6baf96862368c20 | [
"Apache-2.0"
] | 118 | 2021-03-08T01:46:30.000Z | 2022-02-10T06:51:20.000Z | glue.py | twistedcubic/attention-rank-collapse | 38b5df6dc2add25f6d945e48a6baf96862368c20 | [
"Apache-2.0"
] | null | null | null | glue.py | twistedcubic/attention-rank-collapse | 38b5df6dc2add25f6d945e48a6baf96862368c20 | [
"Apache-2.0"
] | 11 | 2021-03-08T10:21:11.000Z | 2021-12-30T13:03:20.000Z | import logging
import os
import time
from dataclasses import dataclass, field
from enum import Enum
from typing import List, Optional, Union
import torch
from filelock import FileLock
from torch.utils.data.dataset import Dataset
from dataclasses import dataclass
from transformers.tokenization_bart import BartTokenizer... | 36.993289 | 119 | 0.632801 |
910601c318778bb24e4227f295ebedd49efc6a95 | 9,808 | py | Python | common/fid_score.py | TiagoCortinhal/TITAN-NET | 3ddf29061edd8977c76d5ee5bbb542f6511f5928 | [
"MIT"
] | 11 | 2021-06-29T10:53:56.000Z | 2022-03-25T07:33:20.000Z | common/fid_score.py | TiagoCortinhal/TITAN-NET | 3ddf29061edd8977c76d5ee5bbb542f6511f5928 | [
"MIT"
] | null | null | null | common/fid_score.py | TiagoCortinhal/TITAN-NET | 3ddf29061edd8977c76d5ee5bbb542f6511f5928 | [
"MIT"
] | 1 | 2021-07-21T08:23:29.000Z | 2021-07-21T08:23:29.000Z | #!/usr/bin/env python3
"""Calculates the Frechet Inception Distance (FID) to evalulate GANs
The FID metric calculates the distance between two distributions of images.
Typically, we have summary statistics (mean & covariance matrix) of one
of these distributions, while the 2nd distribution is given by a GAN.
When run... | 37.578544 | 79 | 0.633055 |
910605110b082f3ad1c6d93d08e904d18c8099c9 | 1,879 | py | Python | src_calc/motor/inputs_refresh.py | grissutpl/OPS-Design | 866fbff2d6106e35017aed750c67be79157d9c72 | [
"MIT"
] | null | null | null | src_calc/motor/inputs_refresh.py | grissutpl/OPS-Design | 866fbff2d6106e35017aed750c67be79157d9c72 | [
"MIT"
] | null | null | null | src_calc/motor/inputs_refresh.py | grissutpl/OPS-Design | 866fbff2d6106e35017aed750c67be79157d9c72 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 01 20:00:29 2020
@author: Ing. Daniel Villarreal
"""
def ingr_actual_a(lista_los_mejores, lista_final_pv_bajo, lista_minimo_peso_variabilidad, ingreso_datos):
if (len(lista_los_mejores)) != 0:
ingreso_datos_a = []
for lista_... | 34.796296 | 125 | 0.49388 |
91060ca26c22f19b009d1ea1c6be23b6d965aa7e | 5,251 | py | Python | doozerlib/cli/images_health.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | doozerlib/cli/images_health.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | doozerlib/cli/images_health.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | # stdlib
import collections
import datetime
import yaml
import time
# external
import click
# doozerlib
from doozerlib.cli import cli, pass_runtime
BuildInfo = collections.namedtuple('BuildInfo', 'record_name, task_id task_state ts build_url, task_url, dt')
millis_hour = 1000 * 60 * 60
millis_day = millis_hour * 2... | 37.776978 | 161 | 0.669206 |
910660bc0e8ec4b6e4406bf5eb0158dc398969bb | 12,658 | py | Python | mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 5 | 2021-01-01T11:02:41.000Z | 2022-03-11T19:44:29.000Z | mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | null | null | null | mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 1 | 2021-04-12T05:59:46.000Z | 2021-04-12T05:59:46.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/calculators/tflite/tflite_tensors_to_detections_calculator.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflec... | 61.746341 | 1,300 | 0.791673 |
910672d8d4f3db650add2ae87efc7b19fd1d63f0 | 4,089 | py | Python | loldb/__main__.py | Met48/League-of-Legends-DB | 801eb454cc7cc855f5eb5f41a013fd2b2e6eba2f | [
"MIT"
] | 2 | 2016-02-12T02:38:07.000Z | 2017-08-16T14:15:59.000Z | loldb/__main__.py | Met48/League-of-Legends-DB | 801eb454cc7cc855f5eb5f41a013fd2b2e6eba2f | [
"MIT"
] | null | null | null | loldb/__main__.py | Met48/League-of-Legends-DB | 801eb454cc7cc855f5eb5f41a013fd2b2e6eba2f | [
"MIT"
] | null | null | null | """
Usage:
loldb stats [options]
loldb --help
loldb --version
Options:
-p, --path=<path> Location of LoL installation.
-o, --os=<system> Operating system. Either 'mac' or 'win', if absent
attempts to auto-detect.
-j, --json=<path> Location to write json representation t... | 26.211538 | 79 | 0.622891 |
910679de3cc24ac53e79788c79c0926d7b486953 | 9,132 | py | Python | specutils/tests/test_correlation.py | keflavich/specutils | ec4fe50c6c032fc421c2cd0ee0dda11fd0f856cb | [
"BSD-3-Clause"
] | null | null | null | specutils/tests/test_correlation.py | keflavich/specutils | ec4fe50c6c032fc421c2cd0ee0dda11fd0f856cb | [
"BSD-3-Clause"
] | null | null | null | specutils/tests/test_correlation.py | keflavich/specutils | ec4fe50c6c032fc421c2cd0ee0dda11fd0f856cb | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import astropy.units as u
from astropy import constants as const
from astropy.nddata import StdDevUncertainty
from astropy.modeling import models
from ..spectra.spectrum1d import Spectrum1D
from ..analysis import correlation
def test_autocorrelation():
"""
Test auto correlation
"""
... | 35.952756 | 100 | 0.652541 |
910689f8299eb85e8dcfa363e294bb7a7a9494fc | 1,003 | py | Python | SOSAT/__init__.py | pnnl/SOSAT | 610f99e0bb80f2f5e7836e7e3b6b816e029838bb | [
"BSD-3-Clause"
] | null | null | null | SOSAT/__init__.py | pnnl/SOSAT | 610f99e0bb80f2f5e7836e7e3b6b816e029838bb | [
"BSD-3-Clause"
] | 1 | 2021-03-22T18:59:05.000Z | 2021-03-22T18:59:05.000Z | SOSAT/__init__.py | pnnl/SOSAT | 610f99e0bb80f2f5e7836e7e3b6b816e029838bb | [
"BSD-3-Clause"
] | null | null | null | """The State of Stress Analysis Tool (SOSAT) is a Python package that
helps analyze the state of stress in the subsurface using various types
of commonly available characterization data such as well logs, well
test data such as leakoff and minifrac tests, regional geologic
information, and constraints on the state of s... | 43.608696 | 71 | 0.828514 |
9106c549c86f66a0c27ef41ebc77a2e4212a70e3 | 664 | py | Python | tests/validate_example_versioned_schema.py | tdwg/camtrap-dp | 3cf4dfa2e2646118b06692736e67bc9a7714c1ff | [
"MIT"
] | 12 | 2021-03-11T14:11:16.000Z | 2022-01-30T16:27:55.000Z | tests/validate_example_versioned_schema.py | tdwg/camtrap-dp | 3cf4dfa2e2646118b06692736e67bc9a7714c1ff | [
"MIT"
] | 171 | 2021-03-11T13:30:22.000Z | 2022-03-23T15:40:25.000Z | tests/validate_example_versioned_schema.py | tdwg/camtrap-dp | 3cf4dfa2e2646118b06692736e67bc9a7714c1ff | [
"MIT"
] | null | null | null | import json
import os
from helpers import validate_package_print_and_exit, EXAMPLE_DESCRIPTOR_PATH
if __name__ == "__main__":
# Frictionless loads resource relative to the current directory, (and not to the descriptor)
# Issue reported to frictionless: https://github.com/frictionlessdata/frictionless-py/issue... | 41.5 | 100 | 0.774096 |
9107115037de51a014e1bd1183384406fbaf6525 | 789 | py | Python | solver/game/groups.py | rwtwm/sudoku_Solver | fea9b436c84dfb1bea329298819cdcf78dcf84c0 | [
"MIT"
] | null | null | null | solver/game/groups.py | rwtwm/sudoku_Solver | fea9b436c84dfb1bea329298819cdcf78dcf84c0 | [
"MIT"
] | null | null | null | solver/game/groups.py | rwtwm/sudoku_Solver | fea9b436c84dfb1bea329298819cdcf78dcf84c0 | [
"MIT"
] | null | null | null | import solver.game.cell
class Group:
def __init__(self, gid):
self.cells = []
self.id = gid
def remove_possible(self, val):
for cell in self.cells:
cell.remove_poss_val(val)
# Returns a list of all confirmed values in the group
def get_solved(self):
in_gro... | 21.324324 | 65 | 0.6109 |
910712dfbeae5d9562b4173fb930ef042cfc22a5 | 1,039 | py | Python | setup.py | jayvdb/monitor_requests | 431c10d7f3819f7f3806815fa29daad9159adedd | [
"BSD-3-Clause"
] | null | null | null | setup.py | jayvdb/monitor_requests | 431c10d7f3819f7f3806815fa29daad9159adedd | [
"BSD-3-Clause"
] | null | null | null | setup.py | jayvdb/monitor_requests | 431c10d7f3819f7f3806815fa29daad9159adedd | [
"BSD-3-Clause"
] | 1 | 2020-01-31T15:00:43.000Z | 2020-01-31T15:00:43.000Z | """Setup script."""
#!/usr/bin/env python
from setuptools import setup
version = __import__('monitor_requests').__version__
with open('README.rst', 'r') as f:
long_description = f.read()
setup(
author='Dan Pozmanter',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended ... | 29.685714 | 71 | 0.669875 |
91071d657e689bba8e1ccdf567fb81b5cdc85de0 | 2,132 | gyp | Python | components/tracing.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | components/tracing.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | components/tracing.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (c) 2012 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 file is intentionally a gyp file rather than a gypi for dependencies
# reasons. The other gypi files include content.gyp and content_common depe... | 34.95082 | 78 | 0.648218 |
9107273b699e00adca7969581c6d4979d121aac6 | 21 | py | Python | Rannan_configs/splunk_apps_indexes/apps_configs.tgz_fixed/splunk_app_db_connect/bin/dbx2/migration/migrations/lookup/__init__.py | mhassan2/datafabric_splunk | b4a1ba77ad7e1ab84d22cb40da6ff12e6bf16d1e | [
"Apache-2.0"
] | 14 | 2017-12-21T00:17:04.000Z | 2020-07-15T19:00:31.000Z | Rannan_configs/splunk_apps_indexes/apps_configs.tgz_fixed/splunk_app_db_connect/bin/dbx2/migration/migrations/lookup/__init__.py | mhassan2/datafabric_splunk | b4a1ba77ad7e1ab84d22cb40da6ff12e6bf16d1e | [
"Apache-2.0"
] | null | null | null | Rannan_configs/splunk_apps_indexes/apps_configs.tgz_fixed/splunk_app_db_connect/bin/dbx2/migration/migrations/lookup/__init__.py | mhassan2/datafabric_splunk | b4a1ba77ad7e1ab84d22cb40da6ff12e6bf16d1e | [
"Apache-2.0"
] | 5 | 2018-01-18T17:34:48.000Z | 2019-03-27T09:32:05.000Z | __author__ = 'bchoi'
| 10.5 | 20 | 0.714286 |
9107382a5785c24d61ad571fbd056346bf8dc8c9 | 8,849 | py | Python | google/cloud/compute_v1/services/reservations/transports/base.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/reservations/transports/base.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | google/cloud/compute_v1/services/reservations/transports/base.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- 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 or... | 35.115079 | 101 | 0.642106 |
91073b920899e189fcb5d83e30c6f4a873c8b750 | 1,757 | py | Python | researchtool/helpers.py | ChristophBeckmann/ResearchTool | 178ae87a23ea7fcc908505a8469075be3c2205ee | [
"MIT"
] | null | null | null | researchtool/helpers.py | ChristophBeckmann/ResearchTool | 178ae87a23ea7fcc908505a8469075be3c2205ee | [
"MIT"
] | null | null | null | researchtool/helpers.py | ChristophBeckmann/ResearchTool | 178ae87a23ea7fcc908505a8469075be3c2205ee | [
"MIT"
] | null | null | null | import logging
import ssl # Secure Sockets Layer - Internet Protocol
from nltk import download # Natural Language Toolkit: https://www.nltk.org/
from langdetect import detect # Language Detection in ISO639-1
import iso639 ... | 42.853659 | 120 | 0.656232 |
9107406510b77f2802dfaefb12bea3f7361ef0e9 | 1,703 | py | Python | db-data.py | surbina/devocion-ar-server | 50ea6aeb1636f4ccf068b9dbf0a3a6a4bf8b5719 | [
"MIT"
] | null | null | null | db-data.py | surbina/devocion-ar-server | 50ea6aeb1636f4ccf068b9dbf0a3a6a4bf8b5719 | [
"MIT"
] | null | null | null | db-data.py | surbina/devocion-ar-server | 50ea6aeb1636f4ccf068b9dbf0a3a6a4bf8b5719 | [
"MIT"
] | null | null | null | from server.models.Base import Base, engine, db_session
from server.models.User import User
from server.models.Devotional import Devotional
from server.models.Comment import Comment
from datetime import datetime
def print_user(user):
print('Id: {}'.format(user.id))
print('Email: {}'.format(user.email))
pri... | 22.407895 | 89 | 0.681151 |
910741dd56bfe5bc3796dd7ed40c784ea8991ac0 | 4,002 | py | Python | alipay/aop/api/request/KoubeiMarketingTessssssssssstQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/KoubeiMarketingTessssssssssstQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/KoubeiMarketingTessssssssssstQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.KoubeiMarketingTessssssssssstQueryModel import KoubeiMarketingTessssssssssstQueryModel
class KoubeiMarketingTessssssssssstQueryReque... | 27.6 | 148 | 0.647676 |
910742a3d804039be49e80815b9f2dabe3f14ce6 | 6,392 | py | Python | gordon/services/github/github_service.py | twilio-labs/gordon | 05c77a08c725180d21a988c9999cbefc295f4c8f | [
"MIT"
] | 12 | 2021-09-09T00:57:53.000Z | 2022-02-11T00:56:12.000Z | gordon/services/github/github_service.py | twilio-labs/gordon | 05c77a08c725180d21a988c9999cbefc295f4c8f | [
"MIT"
] | null | null | null | gordon/services/github/github_service.py | twilio-labs/gordon | 05c77a08c725180d21a988c9999cbefc295f4c8f | [
"MIT"
] | 1 | 2021-09-15T15:52:08.000Z | 2021-09-15T15:52:08.000Z | from github import Github, GithubIntegration
from gordon.configurations.github_config import GithubConfig
from celery.utils.log import get_task_logger
import hashlib
import hmac
import requests
import json
import os
logger = get_task_logger(__name__)
class GithubServiceException(Exception):
pass
class GithubAp... | 40.974359 | 122 | 0.612015 |
910748b5cbf033e1361a862c3b798c48c2166466 | 1,155 | py | Python | web-component/python/admin_api/__init__.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | web-component/python/admin_api/__init__.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | web-component/python/admin_api/__init__.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# flake8: noqa
"""
Hydrogen Admin API
The Hydrogen Admin API # noqa: E501
OpenAPI spec version: 1.0.2
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# import apis into sdk package
... | 32.083333 | 77 | 0.828571 |
91075527cf97f3f7271ab7a9342d1f8767efe76f | 307 | py | Python | example/restful/getloanorders.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | 1 | 2020-12-28T07:04:45.000Z | 2020-12-28T07:04:45.000Z | example/restful/getloanorders.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | null | null | null | example/restful/getloanorders.py | xiaohuid/huobi_Python | ebc84b2fc560f77fd77457f36ff91906c43646e3 | [
"Apache-2.0"
] | 1 | 2022-03-27T10:36:04.000Z | 2022-03-27T10:36:04.000Z | from huobi import RequestClient
from huobi.constant.test import *
request_client = RequestClient(api_key=g_api_key, secret_key=g_secret_key)
obj_list = request_client.get_loan_history(symbol="trxusdt")
if obj_list and len(obj_list):
for loan in obj_list:
loan.print_object()
print()
| 23.615385 | 74 | 0.758958 |
91075fc5173058130e03990192797211b1226a4c | 1,903 | py | Python | st2api/st2api/controllers/v1/stream.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2api/st2api/controllers/v1/stream.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2api/st2api/controllers/v1/stream.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 33.385965 | 98 | 0.70783 |
910761eb3a591d5507f0e9763309d3126fe40640 | 8,214 | py | Python | src/onevision/nn/layer/attn.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/nn/layer/attn.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/nn/layer/attn.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Attention Layers.
"""
from __future__ import annotations
from typing import Any
from typing import Optional
import torch
from torch import nn
from torch import Tensor
from onevision.factory import ATTN_LAYERS
from onevision.nn.layer.act import create_act_layer
from ... | 23.947522 | 67 | 0.558072 |
910765f1e0fed2e9e60e990aa6677b1ddf611aac | 211 | py | Python | scielomanager/journalmanager/templatetags/get_journal_status.py | patymori/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 8 | 2015-07-07T03:09:16.000Z | 2019-03-16T04:46:32.000Z | scielomanager/journalmanager/templatetags/get_journal_status.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 245 | 2015-01-14T13:29:58.000Z | 2022-01-13T00:48:44.000Z | scielomanager/journalmanager/templatetags/get_journal_status.py | DalavanCloud/scielo-manager | 0945f377376de8ef0ada83c35b4e2312062cdf45 | [
"BSD-2-Clause"
] | 5 | 2016-02-19T15:47:08.000Z | 2019-03-16T04:46:20.000Z | from django import template
register = template.Library()
def get_journal_status(journal, collection):
return journal.membership_info(collection=collection).status
register.simple_tag(get_journal_status)
| 23.444444 | 64 | 0.829384 |
9107681f530f9a4289a46ce11d24c6ce45381cf9 | 1,689 | py | Python | plexcli/config.py | michaeljs1990/python-plexcli | a9582fd5eef92189289b6230e15a19336a8860ae | [
"MIT"
] | null | null | null | plexcli/config.py | michaeljs1990/python-plexcli | a9582fd5eef92189289b6230e15a19336a8860ae | [
"MIT"
] | 2 | 2021-03-25T21:40:14.000Z | 2021-06-01T21:44:34.000Z | plexcli/config.py | michaeljs1990/python-plexcli | a9582fd5eef92189289b6230e15a19336a8860ae | [
"MIT"
] | null | null | null | """
Load in all config needed to make further requests. Following
is an example of all currently supported keys in the config
file that should be located at $HOME/.plex.yaml
---
host: http://localhost:9090
user: example
pass: password
token: 1234abdc
"""
import sys
import yaml
class P... | 29.631579 | 78 | 0.579633 |
910774ea5bb4106a948567144c46c6db23a2c6e0 | 11,684 | py | Python | tensorflow/contrib/distributions/python/ops/bijectors/chain.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/distributions/python/ops/bijectors/chain.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/distributions/python/ops/bijectors/chain.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 36 | 2017-07-27T21:12:40.000Z | 2022-02-03T16:45:56.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.950769 | 80 | 0.703013 |
9107a084a4fba7f22ff2c094e4a0ffd5517b4a25 | 4,113 | py | Python | Code/CIPLS.py | arturjordao/IncrementalDimensionalityReduction | da5009fc25409c5c97150701df1262b5685a52d4 | [
"MIT"
] | 3 | 2019-07-18T18:37:08.000Z | 2021-12-07T12:51:12.000Z | Code/CIPLS.py | arturjordao/IncrementalDimensionalityReduction | da5009fc25409c5c97150701df1262b5685a52d4 | [
"MIT"
] | 1 | 2020-05-07T20:47:36.000Z | 2020-11-03T20:33:05.000Z | Code/CIPLS.py | arturjordao/IncrementalDimensionalityReduction | da5009fc25409c5c97150701df1262b5685a52d4 | [
"MIT"
] | 1 | 2021-12-31T07:19:09.000Z | 2021-12-31T07:19:09.000Z | """Covariance-free Partial Least Squares"""
# Author: Artur Jordao <arturjlcorreia[at]gmail.com>
# Artur Jordao
import numpy as np
from scipy import linalg
from sklearn.utils import check_array
from sklearn.utils.validation import FLOAT_DTYPES
from sklearn.base import BaseEstimator
from sklearn.pr... | 35.765217 | 90 | 0.544372 |
9107ca0cfc69eb998efdfb48e6557f4eea1285e3 | 5,791 | py | Python | beatbrain/fma/features.py | Emrys-Hong/BeatBrain | 68159d9cc46d85e73afdc5aa5341c45158dc1b28 | [
"MIT"
] | 1 | 2020-03-28T21:18:50.000Z | 2020-03-28T21:18:50.000Z | beatbrain/fma/features.py | Emrys-Hong/BeatBrain | 68159d9cc46d85e73afdc5aa5341c45158dc1b28 | [
"MIT"
] | null | null | null | beatbrain/fma/features.py | Emrys-Hong/BeatBrain | 68159d9cc46d85e73afdc5aa5341c45158dc1b28 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# FMA: A Dataset For Music Analysis
# Michaël Defferrard, Kirell Benzi, Pierre Vandergheynst, Xavier Bresson, EPFL LTS2.
# All features are extracted using [librosa](https://github.com/librosa/librosa).
# Alternatives:
# * [Essentia](http://essentia.upf.edu) (C++ with Python bindings)
# * [MARS... | 33.091429 | 105 | 0.631843 |
9107cfc713c8b9686b8e23231b6f4d32a7720944 | 841 | py | Python | AESCipher.py | Maxine28Ve/pasalva | bbd8ddf5b367e7a2c78d24ec489073a9e7e3ff85 | [
"MIT"
] | 1 | 2021-05-16T14:42:57.000Z | 2021-05-16T14:42:57.000Z | AESCipher.py | Maxine28Ve/IlCaveau | bbd8ddf5b367e7a2c78d24ec489073a9e7e3ff85 | [
"MIT"
] | null | null | null | AESCipher.py | Maxine28Ve/IlCaveau | bbd8ddf5b367e7a2c78d24ec489073a9e7e3ff85 | [
"MIT"
] | null | null | null | import base64
import hashlib
from Crypto.Cipher import AES
from Crypto import Random
class AESCipher:
def __init__(self, key):
self.bs = 32
self.key = hashlib.sha256(key.encode()).digest()
def encrypt(self, raw):
raw = self._pad(raw)
iv = Random.new().read(AES.block_size)
... | 29 | 81 | 0.608799 |
9107d063c2e131372e6bd76bd60ef1a70ca06980 | 1,674 | py | Python | manubot/process/tests/test_bibliography.py | epogrebnyak/manubot | 77920eca091995184684e7b6b0d12266917c3aa4 | [
"BSD-3-Clause"
] | 1 | 2020-01-08T20:17:51.000Z | 2020-01-08T20:17:51.000Z | manubot/process/tests/test_bibliography.py | epogrebnyak/manubot | 77920eca091995184684e7b6b0d12266917c3aa4 | [
"BSD-3-Clause"
] | null | null | null | manubot/process/tests/test_bibliography.py | epogrebnyak/manubot | 77920eca091995184684e7b6b0d12266917c3aa4 | [
"BSD-3-Clause"
] | null | null | null | import shutil
import pytest
from manubot.pandoc.tests.test_bibliography import (
bibliography_paths
)
from manubot.process.bibliography import (
load_manual_references,
)
@pytest.mark.skipif(
not shutil.which('pandoc-citeproc'),
reason='pandoc-citeproc installation not found on system',
)
def test_l... | 40.829268 | 79 | 0.766428 |
9107eafb41cadc090650df3c21aa17f752ece964 | 378 | py | Python | aristotle/apps/policies/views.py | jermnelson/FRBR-Redis-Datastore | d44af821536b82f5fafa5bed7a51fa86e9a92243 | [
"Apache-2.0"
] | 1 | 2015-09-24T01:12:02.000Z | 2015-09-24T01:12:02.000Z | aristotle/apps/policies/views.py | jermnelson/FRBR-Redis-Datastore | d44af821536b82f5fafa5bed7a51fa86e9a92243 | [
"Apache-2.0"
] | 1 | 2021-12-13T19:39:44.000Z | 2021-12-13T19:39:44.000Z | aristotle/apps/policies/views.py | jermnelson/FRBR-Redis-Datastore | d44af821536b82f5fafa5bed7a51fa86e9a92243 | [
"Apache-2.0"
] | null | null | null | """
:mod: views Policies App Views
"""
__author__ = "Gautam Webb"
from django.views.generic.simple import direct_to_template
def default(request):
"""
default is the standard view for the policies app
:param request: web request
"""
return direct_to_template(request,
... | 22.235294 | 58 | 0.587302 |
9107fc2371b5051c6e851f0a106ea23d4a376d77 | 1,023 | py | Python | colors.py | heksadecimal/chat_house | e3d0a7bf3ecb913974e5d3b461eab3ccf1c1065c | [
"MIT"
] | 10 | 2021-09-30T13:17:30.000Z | 2021-11-09T09:37:28.000Z | colors.py | heksadecimal/chat_house | e3d0a7bf3ecb913974e5d3b461eab3ccf1c1065c | [
"MIT"
] | null | null | null | colors.py | heksadecimal/chat_house | e3d0a7bf3ecb913974e5d3b461eab3ccf1c1065c | [
"MIT"
] | null | null | null | class color:
"""Colors class:
Reset all colors with colors.reset
Two subclasses fg for foreground and bg for background.
Use as colors.subclass.colorname.
i.e. colors.fg.red or colors.bg.green
Also, the generic bold, disable, underline, reverse, strikethrough,
and invisible work with the mai... | 27.648649 | 71 | 0.535679 |
910860eea8a7b50d61d4ba3df733d716920ef2ff | 55 | py | Python | dockermix/__init__.py | kstaken/dockermix | 59ae7814914dc5b405188bfc975c3827acd2d629 | [
"MIT"
] | 3 | 2015-08-02T13:28:21.000Z | 2018-10-09T06:55:03.000Z | dockermix/__init__.py | kstaken/dockermix | 59ae7814914dc5b405188bfc975c3827acd2d629 | [
"MIT"
] | null | null | null | dockermix/__init__.py | kstaken/dockermix | 59ae7814914dc5b405188bfc975c3827acd2d629 | [
"MIT"
] | 3 | 2015-06-16T11:10:50.000Z | 2020-03-07T07:01:27.000Z | __all__ = ["container", "containermix", "utils", "cli"] | 55 | 55 | 0.654545 |
9108941ee78dc3387825f6039dcc205956b99bf8 | 22,668 | py | Python | Lib/site-packages/kivy/uix/behaviors/focus.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 9 | 2016-09-03T07:20:01.000Z | 2020-05-21T14:44:48.000Z | Lib/site-packages/kivy/uix/behaviors/focus.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 1 | 2017-05-30T20:45:15.000Z | 2017-05-30T20:45:15.000Z | Lib/site-packages/kivy/uix/behaviors/focus.py | Aakash10399/simple-health-glucheck | 1f7c4ff7778a44f09b1c8cb0089fef51dc26cea2 | [
"bzip2-1.0.6"
] | 4 | 2016-09-10T15:27:54.000Z | 2020-03-27T22:05:31.000Z | '''
Focus Behavior
==============
The :class:`~kivy.uix.behaviors.FocusBehavior`
`mixin <https://en.wikipedia.org/wiki/Mixin>`_ class provides
keyboard focus behavior. When combined with other
FocusBehavior widgets it allows one to cycle focus among them by pressing
tab. In addition, upon gaining focus, the instance w... | 40.191489 | 79 | 0.662917 |
91089f9043e4ef323328d95e168ca21997400c89 | 141 | py | Python | pyregex/acronym/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | pyregex/acronym/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | pyregex/acronym/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | import re
def abbreviate(phrase):
return ''.join(word[0].upper() for word in re.findall(pattern="[A-Z]+[a-z]*|[a-z]+", string=phrase))
| 23.5 | 104 | 0.638298 |
9108b45748f6cc2bf2135c43dcec0d65c32f8df7 | 446 | py | Python | fri/model/__init__.py | timothycrosley/fri | 94c6b74bfb4ceee405df41834e2e3f8b0a617b38 | [
"MIT"
] | 8 | 2017-04-26T13:47:51.000Z | 2020-10-22T00:25:09.000Z | fri/model/__init__.py | timothycrosley/fri | 94c6b74bfb4ceee405df41834e2e3f8b0a617b38 | [
"MIT"
] | 77 | 2018-02-26T23:18:58.000Z | 2022-03-01T13:10:09.000Z | fri/model/__init__.py | timothycrosley/fri | 94c6b74bfb4ceee405df41834e2e3f8b0a617b38 | [
"MIT"
] | 3 | 2019-04-26T10:17:10.000Z | 2020-04-03T08:51:39.000Z | from .classification import Classification
from .lupi_classification import LUPI_Classification
from .lupi_ordinal_regression import LUPI_OrdinalRegression
from .lupi_regression import LUPI_Regression
from .ordinal_regression import OrdinalRegression
from .regression import Regression
__all__ = [
"Classification",... | 27.875 | 59 | 0.807175 |
910933358b84d687fc53d704b3c0722e5faf53d4 | 18,581 | py | Python | examples/federated-learning/run_mnist_cnn_fedavg_p4.py | zonnhon/tf-encrypted | 90fa282428ca772f166826eee3d423663b1a666a | [
"Apache-2.0"
] | null | null | null | examples/federated-learning/run_mnist_cnn_fedavg_p4.py | zonnhon/tf-encrypted | 90fa282428ca772f166826eee3d423663b1a666a | [
"Apache-2.0"
] | null | null | null | examples/federated-learning/run_mnist_cnn_fedavg_p4.py | zonnhon/tf-encrypted | 90fa282428ca772f166826eee3d423663b1a666a | [
"Apache-2.0"
] | null | null | null | """An example of the secure aggregation protocol for federated learning."""
import logging
import sys
import tensorflow as tf
import numpy as np
import tf_encrypted as tfe
import tensorflow.keras as keras
from tf_encrypted.keras import backend as KE
from convert import decode
if len(sys.argv) > 1:
# config fil... | 32.427574 | 133 | 0.594586 |
91095b7e5e13204b8fdd229889524ceb395bd636 | 9,437 | py | Python | datawinners/accountmanagement/migrations/0012_auto__add_messagetracker__del_field_organizationsetting_outgoing_sms_c.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/accountmanagement/migrations/0012_auto__add_messagetracker__del_field_organizationsetting_outgoing_sms_c.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/accountmanagement/migrations/0012_auto__add_messagetracker__del_field_organizationsetting_outgoing_sms_c.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'MessageTracker'
db.create_table('accountmanagement_messagetracker', (
('id', s... | 66.929078 | 182 | 0.588111 |
910967a6381e428d445fbe14628dd1fdd78d949b | 4,323 | py | Python | cartridge/project_template/urls.py | AlexHill/cartridge | cb8599d43600442a223a484dc75726bfbbec68a0 | [
"BSD-2-Clause"
] | null | null | null | cartridge/project_template/urls.py | AlexHill/cartridge | cb8599d43600442a223a484dc75726bfbbec68a0 | [
"BSD-2-Clause"
] | null | null | null | cartridge/project_template/urls.py | AlexHill/cartridge | cb8599d43600442a223a484dc75726bfbbec68a0 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from mezzanine.core.views import direct_to_template
admin.autodiscover()
# Add the urlpatterns for any custom Django applications here.
# You ... | 41.567308 | 75 | 0.66204 |
910970c42a25474c71442769324e2a183c39fe6c | 71,235 | py | Python | modules/unit_tests/core/tools/calendar.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/unit_tests/core/tools/calendar.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/unit_tests/core/tools/calendar.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | 1 | 2017-10-03T13:03:47.000Z | 2017-10-03T13:03:47.000Z | # Eden Unit Tests
#
# To run this script use:
# python web2py.py -S eden -M -R applications/eden/modules/unit_tests/core/tools/calendar.py
#
import datetime
import dateutil
import dateutil.tz
import unittest
from lxml import etree
from s3dal import Field, Query
from core import *
from unit_tests import run_suite
# ... | 34.165468 | 94 | 0.524321 |
91097c2379985a28da6862e299b663f56e4cd5ed | 3,997 | py | Python | alipay/aop/api/request/AlipayOverseasRemitWithdrawNotifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayOverseasRemitWithdrawNotifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayOverseasRemitWithdrawNotifyRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOverseasRemitWithdrawNotifyModel import AlipayOverseasRemitWithdrawNotifyModel
class AlipayOverseasRemitWithdrawNotifyRequest(... | 27.565517 | 148 | 0.646985 |
91098554d821bdd056be223b22b4ed80a8fe81f4 | 27 | py | Python | mne/layouts/__init__.py | mluessi/mne-python | aef0cd79b0543c6d121de236098bd7865feff39e | [
"BSD-3-Clause"
] | 1 | 2022-03-23T22:26:50.000Z | 2022-03-23T22:26:50.000Z | mne/layouts/__init__.py | neurodebian/mne-python | 44a5ef5241a748b2f77c62fdcda6334220c6af45 | [
"BSD-3-Clause"
] | null | null | null | mne/layouts/__init__.py | neurodebian/mne-python | 44a5ef5241a748b2f77c62fdcda6334220c6af45 | [
"BSD-3-Clause"
] | null | null | null | from .layout import Layout
| 13.5 | 26 | 0.814815 |
9109a16e5ca799f6470e055a58cbc90fd740568b | 389 | py | Python | tests/unit/plugins/references/test_reference.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 2 | 2017-11-08T19:55:57.000Z | 2018-12-21T12:41:41.000Z | tests/unit/plugins/references/test_reference.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | null | null | null | tests/unit/plugins/references/test_reference.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 1 | 2018-10-13T08:59:29.000Z | 2018-10-13T08:59:29.000Z | from kaybee.plugins.references.reference import Reference
class Testreference:
def test_import(self):
assert 'Reference' == Reference.__name__
def test_construction(self):
r1 = Reference('reference1', 'reference', 'label: reference1')
assert True is r1.is_reference
assert 'ref... | 29.923077 | 70 | 0.686375 |
9109c27eb47cc9cb7c1974007fc8d6c91b9ce606 | 4,884 | py | Python | test3/test_Analyzers.py | IreneZhou0129/PyLucene-assignment | 70916f1c8451c5dce5c5205915b25f214ffed2e4 | [
"Apache-2.0"
] | null | null | null | test3/test_Analyzers.py | IreneZhou0129/PyLucene-assignment | 70916f1c8451c5dce5c5205915b25f214ffed2e4 | [
"Apache-2.0"
] | null | null | null | test3/test_Analyzers.py | IreneZhou0129/PyLucene-assignment | 70916f1c8451c5dce5c5205915b25f214ffed2e4 | [
"Apache-2.0"
] | null | null | null | # ====================================================================
# 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 re... | 34.638298 | 76 | 0.529484 |
9109c900089b7a88aea8349b953100f42484b113 | 673 | py | Python | vilya/pullrequests/forms.py | xtao/vilya | 39afda324bcfe9eefe7d813381d5b1627ba00ae5 | [
"BSD-3-Clause"
] | 2 | 2015-01-15T09:10:57.000Z | 2015-01-15T09:55:10.000Z | vilya/pullrequests/forms.py | xtao/vilya | 39afda324bcfe9eefe7d813381d5b1627ba00ae5 | [
"BSD-3-Clause"
] | null | null | null | vilya/pullrequests/forms.py | xtao/vilya | 39afda324bcfe9eefe7d813381d5b1627ba00ae5 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import TextField
from wtforms.validators import DataRequired as Required
from wtforms.validators import Optional
__all__ = ['NewPullRequestForm', 'UpdatePullRequestForm']
class NewPullRequestForm(Form):
name = TextField('Name', validators=[Required... | 30.590909 | 67 | 0.736999 |
9109d08bfbb97d93a27dbdaa1231812c6b90f2e6 | 30,935 | py | Python | modules/s3db/cr.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | 1 | 2018-01-06T12:58:32.000Z | 2018-01-06T12:58:32.000Z | modules/s3db/cr.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | modules/s3db/cr.py | gurlinthewurld/eden | 726aea55c95ee33f48dace63f76496e22e529157 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Shelter (Camp) Registry, model
@copyright: 2009-2013 (c) Sahana Software Foundation
@license: MIT
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 ... | 46.800303 | 165 | 0.417456 |
9109e77dd6ec4d74ba0367fc07711bee8c2f51d3 | 271 | py | Python | pandas_ref/pd_replace.py | SeanSyue/PythonReferences | 103b2d6934a33e56a5d8fbb14d95282f572b3af7 | [
"MIT"
] | null | null | null | pandas_ref/pd_replace.py | SeanSyue/PythonReferences | 103b2d6934a33e56a5d8fbb14d95282f572b3af7 | [
"MIT"
] | null | null | null | pandas_ref/pd_replace.py | SeanSyue/PythonReferences | 103b2d6934a33e56a5d8fbb14d95282f572b3af7 | [
"MIT"
] | null | null | null | import pandas as pd
reader = pd.read_csv('C:/bank/data_set/benchmark/for_benchmark.csv')
indicator = reader.replace(to_replace=999, value=0, inplace=False)
print(indicator['pdays'])
reader.replace(to_replace=999, value=0, inplace=True)
print(reader['pdays'])
| 27.1 | 69 | 0.741697 |
9109f28f1654f08ef4a5b66b7762e83f40403963 | 4,715 | py | Python | src/stk/molecular/topology_graphs/metal_complex/paddlewheel/paddlewheel.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | null | null | null | src/stk/molecular/topology_graphs/metal_complex/paddlewheel/paddlewheel.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | null | null | null | src/stk/molecular/topology_graphs/metal_complex/paddlewheel/paddlewheel.py | stevenkbennett/stk | a8311fa6110adc0ea593a24d9a0c064597b1b174 | [
"MIT"
] | null | null | null | """
Paddlewheel
===========
"""
from ...topology_graph import Edge
from ..metal_complex import MetalComplex
from ..vertices import BiDentateLigandVertex, MetalVertex
class Paddlewheel(MetalComplex):
"""
Represents a metal complex topology graph.
.. moldoc::
import moldoc.molecule as molecule
... | 28.575758 | 70 | 0.468081 |
9109f617d2f16324836e734c2264afa680fe6f47 | 7,418 | py | Python | core/argo/core/network/KerasNetwork.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 4 | 2020-12-07T19:13:13.000Z | 2022-01-30T18:52:18.000Z | core/argo/core/network/KerasNetwork.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 12 | 2020-09-25T22:41:28.000Z | 2022-02-09T23:46:34.000Z | core/argo/core/network/KerasNetwork.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 2 | 2021-03-02T18:31:04.000Z | 2021-03-02T21:56:43.000Z | from .ArgoAbstractKerasNetwork import ArgoAbstractKerasNetwork
from ..keras_models.keras_utils import parse_init_reg_kwargs, parse_init_reg_kwargs_bayes
from ..utils.argo_utils import get_method_id
import importlib
from pprint import pprint
class KerasNetwork(ArgoAbstractKerasNetwork):
default_params = {
... | 43.380117 | 127 | 0.617417 |
910a198089c91c8b7847113ac5fae1887eb9b197 | 795 | py | Python | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.6875 | 114 | 0.641509 |
910a3dde92adc53fa07e409edc872cd725467744 | 121 | py | Python | settings.py | piratar/althingi-document-cleaner | b84dc4cebcaf9e7d2d0484e0fbbcbec309cdf410 | [
"MIT"
] | 10 | 2020-03-27T15:39:59.000Z | 2022-01-25T14:59:57.000Z | settings.py | althingi-net/lagasafn-xml | a10e8ba1c4314609b9b5b14f1bfd181c9e45815d | [
"MIT"
] | 7 | 2021-06-24T09:09:18.000Z | 2022-02-20T19:36:56.000Z | settings.py | althingi-net/lagasafn-xml | a10e8ba1c4314609b9b5b14f1bfd181c9e45815d | [
"MIT"
] | 2 | 2021-03-29T20:46:55.000Z | 2022-01-21T16:23:20.000Z |
DEBUG = True
# Feature knobs are only intended for incomplete functionality.
FEATURES = {
'PARSE_MARKERS': True,
}
| 15.125 | 63 | 0.719008 |
910a49ac621e9fd7795ffce812f3935d7fc9333e | 2,305 | py | Python | models/mean_median_model.py | ducnx/TPC-LoS-prediction | 49713f5bd7e77c2adb1ff950c885d087a398a1ad | [
"MIT"
] | 29 | 2020-11-23T16:27:41.000Z | 2022-03-25T16:05:24.000Z | models/mean_median_model.py | ducnx/TPC-LoS-prediction | 49713f5bd7e77c2adb1ff950c885d087a398a1ad | [
"MIT"
] | 2 | 2020-11-28T04:11:12.000Z | 2021-08-23T12:42:08.000Z | models/mean_median_model.py | ducnx/TPC-LoS-prediction | 49713f5bd7e77c2adb1ff950c885d087a398a1ad | [
"MIT"
] | 9 | 2021-02-23T07:12:58.000Z | 2022-01-13T15:11:59.000Z | import pandas as pd
import numpy as np
import torch
from eICU_preprocessing.reader import eICUReader
from MIMIC_preprocessing.reader import MIMICReader
from models.experiment_template import remove_padding
from eICU_preprocessing.run_all_preprocessing import eICU_path
from MIMIC_preprocessing.run_all_preprocessing impo... | 35.461538 | 94 | 0.699349 |
910a6e09684299907d70f233863640c76745c61f | 28 | py | Python | __init__.py | sinclairej/hpfspecmatch-1 | 4e2604c734e74572b33aabc3b2b7d983888701d6 | [
"MIT"
] | null | null | null | __init__.py | sinclairej/hpfspecmatch-1 | 4e2604c734e74572b33aabc3b2b7d983888701d6 | [
"MIT"
] | null | null | null | __init__.py | sinclairej/hpfspecmatch-1 | 4e2604c734e74572b33aabc3b2b7d983888701d6 | [
"MIT"
] | 1 | 2021-06-11T15:37:20.000Z | 2021-06-11T15:37:20.000Z | from .hpfspecmatch import *
| 14 | 27 | 0.785714 |
910a6f3a05a31e7c40fd031b1a22b1a1f49ad050 | 4,260 | py | Python | lamsatech_query/events/item.py | elmagory1/lamsatech_query | a3ba1f6ef237ff316426a1ccc1cab9503d7c33ab | [
"MIT"
] | null | null | null | lamsatech_query/events/item.py | elmagory1/lamsatech_query | a3ba1f6ef237ff316426a1ccc1cab9503d7c33ab | [
"MIT"
] | null | null | null | lamsatech_query/events/item.py | elmagory1/lamsatech_query | a3ba1f6ef237ff316426a1ccc1cab9503d7c33ab | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import frappe
from frappe import _
from datetime import date,datetime
from frappe.utils import get_url_to_form
import json
def validate_supplier_and_country_code(doc, handler=None):
for supplier in doc.supplier_items:
sup_doc = frappe.get_doc('Supplier', supplier.supplier)
... | 32.272727 | 153 | 0.710563 |
910a9c803bffaee32cffd020336198a8741437f5 | 42,699 | py | Python | round01/30_11_dDQN_light_tweak34.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | round01/30_11_dDQN_light_tweak34.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | 1 | 2022-02-10T02:27:10.000Z | 2022-02-10T02:27:10.000Z | round01/30_11_dDQN_light_tweak34.py | phunc20/rlcomp2020 | c37f8f05cc86d55fca2648bf5491d6a2218c2cad | [
"MIT"
] | null | null | null | ########################################
# Changes compared to 30_05_CNN_revived_dDQN_light.py
# 01.
# n_epsilon_decay = int(n_episodes // 50)
# as opposed to
# n_epsilon_decay = int(n_episodes*.805)
# Takes around 9_900 to get from epsilon=1 to epsilon=0.01
# 02.
# lr_optimizer = 2.5e-4
# as opposed to
# ... | 37.356955 | 271 | 0.579803 |
910ab085b90be844482fe292d2047cf4b44e6217 | 669 | py | Python | app/assets.py | HanaPearlman/maps4all | 3ec11421adb4f01561f23abc5cab41ccb25fe0e1 | [
"MIT"
] | 18 | 2016-10-17T22:08:40.000Z | 2020-07-15T14:19:12.000Z | app/assets.py | HanaPearlman/maps4all | 3ec11421adb4f01561f23abc5cab41ccb25fe0e1 | [
"MIT"
] | 10 | 2016-12-12T23:52:20.000Z | 2017-03-20T01:56:22.000Z | app/assets.py | HanaPearlman/maps4all | 3ec11421adb4f01561f23abc5cab41ccb25fe0e1 | [
"MIT"
] | 2 | 2021-02-16T23:21:27.000Z | 2021-12-19T22:12:02.000Z | from flask.ext.assets import Bundle
app_css = Bundle(
'*.scss',
filters='scss',
output='styles/app.css'
)
app_js = Bundle(
'*.js',
filters='jsmin',
output='scripts/app.js'
)
vendor_css = Bundle(
'vendor/*.css',
output='styles/vendor.css'
)
# Need to specify vendor order or JS errors ... | 19.676471 | 53 | 0.630792 |
910ac0ecdcaccd23769c1c40510956c8b2116b7e | 794 | py | Python | test/BFGSBrkt41.py | usuaero/Optix | a7b87bf8cd71d3d8e7cdb88fc1432927aeb9b2e9 | [
"MIT"
] | 10 | 2016-02-24T05:05:58.000Z | 2020-08-28T14:15:24.000Z | test/BFGSBrkt41.py | usuaero/Optix | a7b87bf8cd71d3d8e7cdb88fc1432927aeb9b2e9 | [
"MIT"
] | null | null | null | test/BFGSBrkt41.py | usuaero/Optix | a7b87bf8cd71d3d8e7cdb88fc1432927aeb9b2e9 | [
"MIT"
] | 3 | 2016-07-24T11:09:28.000Z | 2019-04-03T18:06:11.000Z | import optix as opt
from random import random
import sys
import numpy as np
import traceback
message = []
try:
def f(x):
return -x[0]*x[1]+0.5*(x[0]**2+x[1]**2)
x0 = [-10+20*random(),-10+20*random()]
optimum = opt.minimize(f,x0,file_tag="_test",n_search=4,line_search="bracket",termination... | 33.083333 | 122 | 0.676322 |
910ad5f64ced510d72ba8d6f4a146ac0d58f5c5c | 2,773 | py | Python | smoke-test/tests/cli/datahub-cli.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 289 | 2022-03-16T00:30:15.000Z | 2022-03-31T23:16:21.000Z | smoke-test/tests/cli/datahub-cli.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 155 | 2022-03-15T19:43:07.000Z | 2022-03-31T20:33:41.000Z | smoke-test/tests/cli/datahub-cli.py | cuong-pham/datahub | cb4eb001758f55622add0f4dc3650cf483609cba | [
"Apache-2.0"
] | 46 | 2022-03-15T19:08:32.000Z | 2022-03-31T17:56:26.000Z | import json
import pytest
from time import sleep
from datahub.cli import delete_cli, ingest_cli
from datahub.cli.cli_utils import guess_entity_type, post_entity, get_aspects_for_entity
from datahub.cli.ingest_cli import get_session_and_host
from datahub.cli.delete_cli import guess_entity_type, delete_one_urn_cmd
from t... | 42.015152 | 144 | 0.761269 |
910af7bbd8adaaae8a326c2dcfc30c263d6e5f2d | 1,733 | py | Python | examples/python/test_connected_components.py | jo285317/monosat | 954cfde560971d1448adf4331390f29fb1947175 | [
"MIT"
] | 93 | 2015-03-03T01:10:55.000Z | 2022-02-01T08:41:19.000Z | examples/python/test_connected_components.py | jo285317/monosat | 954cfde560971d1448adf4331390f29fb1947175 | [
"MIT"
] | 29 | 2015-07-31T04:41:47.000Z | 2022-03-07T17:33:14.000Z | examples/python/test_connected_components.py | jo285317/monosat | 954cfde560971d1448adf4331390f29fb1947175 | [
"MIT"
] | 38 | 2015-07-29T22:31:03.000Z | 2022-02-12T03:56:24.000Z | from monosat import *
g= Graph()
e1 = g.addEdge(0,1)
e2 = g.addEdge(1,2)
e3 = g.addEdge(0,2)
Assert(Or(e1,e2, e3))
# Test Connected component constraints
# Note that the graph is interpreted as undirected for this constraint - so an edge connecting two nodes, in either
# direction, makes them part of one component.
... | 32.698113 | 115 | 0.784766 |
910b1570288662b3890a46173c05f7a6cc760ead | 756 | py | Python | vyperlogix/sockets/checkhosts.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/sockets/checkhosts.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/sockets/checkhosts.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | from __future__ import print_function
import socket
import time
retry = 5
delay = 10
timeout = 3
def isOpen(ip, port, timeouts=timeout):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(timeouts)
try:
s.connect((ip, int(port)))
s.shutdown(socket.SHUT_RDWR)
return... | 20.432432 | 57 | 0.595238 |
910b2bd8d06f580da6521ff3aa69d35c1f5a2e01 | 35,869 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_failover_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_failover_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_failover_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.948953 | 287 | 0.675458 |
910b315eb7b86c25c2e9785ebc19dc5ad76b375e | 6,609 | py | Python | pcwawc/StateDetector.py | gitter-badger/play-chess-with-a-webcam | 16cd9d30d1c0e118f98532ebd19c4b4c1621c837 | [
"Apache-2.0"
] | null | null | null | pcwawc/StateDetector.py | gitter-badger/play-chess-with-a-webcam | 16cd9d30d1c0e118f98532ebd19c4b4c1621c837 | [
"Apache-2.0"
] | null | null | null | pcwawc/StateDetector.py | gitter-badger/play-chess-with-a-webcam | 16cd9d30d1c0e118f98532ebd19c4b4c1621c837 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Global imports
import sys
import numpy as np
from pcwawc.Cell import Cell
from pcwawc.Board import Board
from pcwawc.mathUtils import intersectHoughLines, distance
from pcwawc.Video import Video
class CannotBuildStateException(Exception):
def __init__(self, value):
self.value = value
... | 44.355705 | 171 | 0.575427 |
910b4da1f456f74582c22f5932c5d4d655e39184 | 40,310 | py | Python | C01_Model_continuous_time+location.py | mbc96325/IOHMM-for-individual-mobility-prediction | b2d346a12b902581641a0afa8e694ee8ef158195 | [
"MIT"
] | 1 | 2021-09-02T14:16:14.000Z | 2021-09-02T14:16:14.000Z | C01_Model_continuous_time+location.py | mbc96325/IOHMM-for-individual-mobility-prediction | b2d346a12b902581641a0afa8e694ee8ef158195 | [
"MIT"
] | null | null | null | C01_Model_continuous_time+location.py | mbc96325/IOHMM-for-individual-mobility-prediction | b2d346a12b902581641a0afa8e694ee8ef158195 | [
"MIT"
] | 1 | 2021-09-20T02:59:47.000Z | 2021-09-20T02:59:47.000Z | #
from __future__ import division
import timeit
from sklearn import preprocessing
import numpy as np
import pandas as pd
import multiprocessing
import matplotlib.pyplot as plt
from IOHMM import UnSupervisedIOHMM
from IOHMM import OLS, DiscreteMNL, CrossEntropyMNL
from IOHMM import forward_backward
from scipy.specia... | 47.091121 | 160 | 0.612974 |
910b5167027257d41010223e1d8a01363cd9f092 | 422 | py | Python | test/test_help.py | rec/doks | 8fb1c2779bb40cbae9427c3be357231543e89d54 | [
"MIT"
] | 1 | 2020-10-31T03:25:23.000Z | 2020-10-31T03:25:23.000Z | test/test_help.py | rec/doks | 8fb1c2779bb40cbae9427c3be357231543e89d54 | [
"MIT"
] | 15 | 2020-05-29T11:50:13.000Z | 2020-12-08T11:07:45.000Z | test/test_help.py | rec/doks | 8fb1c2779bb40cbae9427c3be357231543e89d54 | [
"MIT"
] | null | null | null | from pathlib import Path
from readme_renderer import rst
from unittest import TestCase
import io
README_TEXT = (Path(__file__).parents[1] / 'README.rst').read_text()
class TestDoc(TestCase):
def test_rendering(self):
out = io.StringIO()
actual = rst.render(README_TEXT, out)
if actual is N... | 24.823529 | 68 | 0.651659 |
910b899c24cfa83ced19e5fe57481782ecc8089c | 17,140 | py | Python | mlrun/mlutils/models.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/mlutils/models.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/mlutils/models.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | 1 | 2021-05-05T14:19:46.000Z | 2021-05-05T14:19:46.000Z | import json
from inspect import signature, _empty
from importlib import import_module
from typing import List
from itertools import cycle
from ..artifacts import PlotArtifact
from .plots import (
gcf_clear,
feature_importances,
precision_recall_bin,
precision_recall_multi,
roc_multi,
roc_bin,
)... | 33.940594 | 96 | 0.576488 |
910be91632376696337d9df22a80ce8913306b09 | 23,436 | py | Python | bases.py | xanthics/poe_fractured | e7627dcc714af4ebf20a0dabfbd19cc82b73c9d4 | [
"MIT"
] | 3 | 2019-03-20T12:02:31.000Z | 2020-02-26T12:40:24.000Z | bases.py | xanthics/poe_fractured | e7627dcc714af4ebf20a0dabfbd19cc82b73c9d4 | [
"MIT"
] | 2 | 2019-03-23T19:05:43.000Z | 2019-04-02T02:38:39.000Z | bases.py | xanthics/poe_fractured | e7627dcc714af4ebf20a0dabfbd19cc82b73c9d4 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: Jeremy Parks
# Note: Requires Python 3.7.x or newer
bases = {
"Two-Point Arrow Quiver": "Quiver",
"Serrated Arrow Quiver": "Quiver",
"Sharktooth Arrow Quiver": "Quiver",
"Blunt Arrow Quiver": "Quiver",
"Fire Arrow Quiver": "Quiver",
"Broadhead Arrow Quiver": "Qu... | 30.836842 | 49 | 0.652884 |
910bed5cc50ed2f2dcc00be22692163d7620e946 | 2,242 | py | Python | networkx/algorithms/vitality.py | argriffing/networkx | 5a3d000e605be2ca567f69a4694afcba3b8acb54 | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/vitality.py | argriffing/networkx | 5a3d000e605be2ca567f69a4694afcba3b8acb54 | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/vitality.py | argriffing/networkx | 5a3d000e605be2ca567f69a4694afcba3b8acb54 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2012 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
"""
Vitality measures.
"""
from .wiener import wiener_index
__author__ = "\n".join(['Aric Hagberg (hagberg@lanl.gov)',
... | 30.297297 | 72 | 0.632917 |
910c1a804aaea8d880251beabe3cbc739330951d | 132 | py | Python | hashmap/longestuniquesubstr.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | hashmap/longestuniquesubstr.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | hashmap/longestuniquesubstr.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | class Solution(object):
def lengthOfLongestSubstring(self, s):
"""
:type s: str
:rtype: int
"""
| 18.857143 | 42 | 0.507576 |
910c2817ab91305effd8b2f5fa278137a0dcbba7 | 12,310 | py | Python | coffea/analysis_tools.py | bfis/coffea | e5e67d410e86faee1172fcc864774d7024d97653 | [
"BSD-3-Clause"
] | 77 | 2019-06-09T14:23:33.000Z | 2022-03-22T21:34:01.000Z | coffea/analysis_tools.py | bfis/coffea | e5e67d410e86faee1172fcc864774d7024d97653 | [
"BSD-3-Clause"
] | 353 | 2019-06-05T23:54:39.000Z | 2022-03-31T21:21:47.000Z | coffea/analysis_tools.py | bfis/coffea | e5e67d410e86faee1172fcc864774d7024d97653 | [
"BSD-3-Clause"
] | 71 | 2019-06-07T02:04:11.000Z | 2022-03-05T21:03:45.000Z | """Tools of general use for columnar analysis
These helper classes were previously part of ``coffea.processor``
but have been migrated and updated to be compatible with awkward-array 1.0
"""
import numpy
import coffea.util
import coffea.processor
class WeightStatistics(coffea.processor.AccumulatorABC):
def __ini... | 36.52819 | 131 | 0.58684 |
910c4d5ba5bffc2f3264eb6b97bf87a32d1aa538 | 83 | py | Python | fb/__init__.py | blaklites/fb | 4ddba4dae204463ed24f473872215c5a26370a81 | [
"MIT"
] | 12 | 2015-01-21T22:29:12.000Z | 2020-11-21T18:03:28.000Z | fb/__init__.py | blaklites/fb | 4ddba4dae204463ed24f473872215c5a26370a81 | [
"MIT"
] | 1 | 2019-07-19T13:51:47.000Z | 2019-07-19T13:51:47.000Z | fb/__init__.py | blaklites/fb | 4ddba4dae204463ed24f473872215c5a26370a81 | [
"MIT"
] | 6 | 2015-02-19T00:58:46.000Z | 2019-11-08T12:33:15.000Z | from . import graph
__all__=['wiring', 'settings', 'graph', 'request', 'helper' ]
| 20.75 | 61 | 0.650602 |
910c4dad926334bdd0a6b8be6b2815688e7207b2 | 923 | py | Python | Tests/h2_cis.py | certik/pyquante | f5cae27f519b1c1b70afbebfe8b5c83cb4b3c2a6 | [
"DOC"
] | 8 | 2016-08-26T14:57:01.000Z | 2019-12-23T07:39:37.000Z | Tests/h2_cis.py | nicodgomez/pyquante | 483571110b83cab406d3d4d8f2eba5cae0a2da58 | [
"DOC"
] | 1 | 2019-02-03T10:44:02.000Z | 2019-02-03T10:44:02.000Z | Tests/h2_cis.py | globulion/pyq-mod | ee32b6685e9c1e915c5c515ef7ab83adc200fa9b | [
"DOC"
] | 8 | 2016-02-23T19:22:11.000Z | 2021-08-28T12:12:59.000Z | #!/usr/bin/env python
"H2 first excited state energy"
import unittest, sciunittest
from PyQuante.Ints import getbasis,getints
from PyQuante.hartree_fock import rhf
from PyQuante.Molecule import Molecule
from PyQuante.CI import CIS
energy = -0.645236
name = "H2_CIS"
def main():
atoms = Molecule('h2',[(1,(1.,0,0)... | 22.512195 | 72 | 0.663055 |
910c4e54320a81608b5e76f8babf0cb35c042713 | 9,281 | py | Python | tests/addressing/test_addresser.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | 1 | 2019-04-14T20:16:59.000Z | 2019-04-14T20:16:59.000Z | tests/addressing/test_addresser.py | crazyrex/sawtooth-next-directory | 210b581c8c92c307fab2f6d2b9a55526b56b790a | [
"Apache-2.0"
] | null | null | null | tests/addressing/test_addresser.py | crazyrex/sawtooth-next-directory | 210b581c8c92c307fab2f6d2b9a55526b56b790a | [
"Apache-2.0"
] | 1 | 2018-12-07T10:55:08.000Z | 2018-12-07T10:55:08.000Z | # Copyright 2018 Contributors to Hyperledger Sawtooth
#
# 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 ... | 32.451049 | 88 | 0.610387 |
910c8f1c9ed41cc5c49677747cff34b43b58508c | 434 | py | Python | python/p226.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p226.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p226.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]:
if not root:
retur... | 36.166667 | 87 | 0.62212 |
910cac34da9c8dfaeb111d65c971450264417572 | 14,405 | py | Python | ExtensiveFormGenerator.py | FelipeSulser/NonNashianGameTheory | 995ac7098efc8be393916f4f25b08406ff952207 | [
"Apache-2.0"
] | null | null | null | ExtensiveFormGenerator.py | FelipeSulser/NonNashianGameTheory | 995ac7098efc8be393916f4f25b08406ff952207 | [
"Apache-2.0"
] | null | null | null | ExtensiveFormGenerator.py | FelipeSulser/NonNashianGameTheory | 995ac7098efc8be393916f4f25b08406ff952207 | [
"Apache-2.0"
] | null | null | null | import itertools
import json
import random
from numpy import transpose, roll, reshape, meshgrid, arange, empty
from functools import reduce
import copy
import numpy as np
import math
import argparse
import os
max_num_actions_1 = 2
max_num_actions_2 = 2
min_outcome_val = 0
max_outcome_val = max_num_actions_1* max_num_a... | 32.011111 | 155 | 0.640472 |
910cf867c464059d9fd7699169e613aa2103430a | 10,240 | py | Python | usaspending_api/core/validator/tinyshield.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | null | null | null | usaspending_api/core/validator/tinyshield.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | 1 | 2021-11-15T17:54:12.000Z | 2021-11-15T17:54:12.000Z | usaspending_api/core/validator/tinyshield.py | mikepsinn/usaspending-api | ef61e13c286eb51949e16b760fa7516255b2bfd3 | [
"CC0-1.0"
] | null | null | null | import logging
import copy
from usaspending_api.common.exceptions import UnprocessableEntityException
from usaspending_api.core.validator.helpers import SUPPORTED_TEXT_TYPES
from usaspending_api.core.validator.helpers import TINY_SHIELD_SEPARATOR, MAX_ITEMS
from usaspending_api.core.validator.helpers import validate_a... | 38.935361 | 115 | 0.574902 |
910cfadf3931f89323185c94e71238c6fc86574d | 980 | py | Python | robot-server/robot_server/constants.py | soroushjp/opentrons | f7e82834417630d5e6c90ed452de35d80eb1be8a | [
"Apache-2.0"
] | null | null | null | robot-server/robot_server/constants.py | soroushjp/opentrons | f7e82834417630d5e6c90ed452de35d80eb1be8a | [
"Apache-2.0"
] | null | null | null | robot-server/robot_server/constants.py | soroushjp/opentrons | f7e82834417630d5e6c90ed452de35d80eb1be8a | [
"Apache-2.0"
] | null | null | null | # This is the version of the HTTP API used by the server. This value should
# be incremented anytime the schema of a request or response is changed. This
# value is different and separate from the application version.
from typing_extensions import Literal, Final
API_VERSION: Final = 2
# Minimum API version supported... | 37.692308 | 78 | 0.791837 |
910d0f4193f49bff4a161aaf7edefa5180c93af0 | 15,794 | py | Python | kb_learning/learner/_ppo_nompi_learner.py | gregorgebhardt/kb_learning | 41e18c1238e0ea891d48aff63588366dae64e4c8 | [
"BSD-3-Clause"
] | null | null | null | kb_learning/learner/_ppo_nompi_learner.py | gregorgebhardt/kb_learning | 41e18c1238e0ea891d48aff63588366dae64e4c8 | [
"BSD-3-Clause"
] | null | null | null | kb_learning/learner/_ppo_nompi_learner.py | gregorgebhardt/kb_learning | 41e18c1238e0ea891d48aff63588366dae64e4c8 | [
"BSD-3-Clause"
] | null | null | null | import logging
import multiprocessing
import os
import random
import time
from collections import deque
from typing import Generator
import cloudpickle
import gym
import numpy as np
import tensorflow as tf
from baselines.bench.monitor import Monitor
from baselines.common import colorize, explained_variance
from baseli... | 44.997151 | 119 | 0.586045 |
910d100a098c4505f586ad9627d2b82bf15b2c6f | 1,045 | py | Python | var/spack/repos/builtin/packages/py-vector/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/py-vector/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/py-vector/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyVector(PythonPackage):
"""Vector classes and utilities"""
homepage = "https://githu... | 41.8 | 95 | 0.638278 |
910d101f4fea838a7e32112a1785fde8559e686c | 1,757 | py | Python | clients/kratos/python/test/test_submit_self_service_login_flow_body.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/kratos/python/test/test_submit_self_service_login_flow_body.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/kratos/python/test/test_submit_self_service_login_flow_body.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | """
Ory Kratos API
Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini... | 42.853659 | 446 | 0.808765 |
910d3ecba602baa92e5022c3b0a2feddde149bfd | 98 | py | Python | enrico/extern/__init__.py | mireianievas/enrico | 2bd8949e388df7f1065629c299de8fde2ded5274 | [
"BSD-3-Clause"
] | 14 | 2017-03-17T05:37:14.000Z | 2021-04-05T22:26:29.000Z | enrico/extern/__init__.py | zblz/enrico | b5302506903f55779398fd874ff99361bb0e3e3b | [
"BSD-3-Clause"
] | 87 | 2015-01-07T14:24:06.000Z | 2022-02-10T11:41:32.000Z | enrico/extern/__init__.py | zblz/enrico | b5302506903f55779398fd874ff99361bb0e3e3b | [
"BSD-3-Clause"
] | 20 | 2015-02-18T19:01:34.000Z | 2020-06-14T21:27:32.000Z | """External python packages bundled with enrico
This makes installation easier for the user.
"""
| 19.6 | 47 | 0.77551 |
910d4208963f0a0a0a9d07c5bc46dd80108b6c70 | 129 | pyw | Python | cannon/bin/terminal.pyw | skywind3000/cannon | ed4f997a5f3705a912408d079e7873d927cb263b | [
"Apache-2.0"
] | 7 | 2015-02-02T06:15:36.000Z | 2021-06-14T13:26:50.000Z | cannon/bin/terminal.pyw | skywind3000/cannon | ed4f997a5f3705a912408d079e7873d927cb263b | [
"Apache-2.0"
] | null | null | null | cannon/bin/terminal.pyw | skywind3000/cannon | ed4f997a5f3705a912408d079e7873d927cb263b | [
"Apache-2.0"
] | 6 | 2015-02-02T06:15:37.000Z | 2019-06-22T20:23:57.000Z | #! /usr/bin/env pythonw
import os
PATH=os.path.abspath(os.path.split(__file__)[0])
execfile(os.path.join(PATH, 'terminal.py'))
| 18.428571 | 48 | 0.72093 |
910d4d08c4b963c7e6fb207e78823f3289bd5e63 | 2,982 | py | Python | examples/pm_ast_simplify.py | Tobias-Kohn/PyPAT | 1ae3f2823498c467fdc8418b2cde7954c2e111fd | [
"Apache-2.0"
] | 26 | 2018-10-08T17:59:17.000Z | 2021-06-04T03:31:16.000Z | examples/pm_ast_simplify.py | Tobias-Kohn/PyMa | 1ae3f2823498c467fdc8418b2cde7954c2e111fd | [
"Apache-2.0"
] | 2 | 2021-03-20T12:46:23.000Z | 2021-06-09T14:11:53.000Z | examples/pm_ast_simplify.py | Tobias-Kohn/PyMa | 1ae3f2823498c467fdc8418b2cde7954c2e111fd | [
"Apache-2.0"
] | 2 | 2020-01-28T19:12:56.000Z | 2021-03-18T14:16:24.000Z | #
# (c) 2018, Tobias Kohn
#
# Created: 27.08.2018
# Updated: 29.08.2018
#
# License: Apache 2.0
#
import ast
try:
from astunparse import unparse as dump
except ImportError:
from ast import dump
class AstSimplifier(ast.NodeTransformer):
"""
Simplifies an AST using pattern matching. This is for demonst... | 29.524752 | 118 | 0.583166 |
910d9a5b5f141442870aa49bd02bcc61cba694c0 | 6,688 | py | Python | cnn_stellarity.py | lcabayol/CNN_Stellarity | f8d7b404fc78e925c1b376d1f467fc05715a3826 | [
"MIT"
] | null | null | null | cnn_stellarity.py | lcabayol/CNN_Stellarity | f8d7b404fc78e925c1b376d1f467fc05715a3826 | [
"MIT"
] | 1 | 2018-11-09T21:32:05.000Z | 2018-11-09T21:32:05.000Z | cnn_stellarity.py | lcabayol/CNN_Stellarity | f8d7b404fc78e925c1b376d1f467fc05715a3826 | [
"MIT"
] | null | null | null | """
Code depeloved by Laura Cabayol
email: lcabayol@ifae.es
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.preprocessing import normalize, RobustScaler, scale, StandardScaler,MinMaxScaler
import keras
from keras.utils import to_categorical
from keras.models import Seq... | 32.466019 | 330 | 0.629336 |
910dc5809a5351c91489cd36a49c1256f0b5d83a | 12,197 | py | Python | rbac/common/protobuf/rbac_payload_pb2.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | 1 | 2019-04-14T20:16:59.000Z | 2019-04-14T20:16:59.000Z | rbac/common/protobuf/rbac_payload_pb2.py | crazyrex/sawtooth-next-directory | 210b581c8c92c307fab2f6d2b9a55526b56b790a | [
"Apache-2.0"
] | null | null | null | rbac/common/protobuf/rbac_payload_pb2.py | crazyrex/sawtooth-next-directory | 210b581c8c92c307fab2f6d2b9a55526b56b790a | [
"Apache-2.0"
] | 1 | 2018-12-07T10:55:08.000Z | 2018-12-07T10:55:08.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: rbac_payload.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _... | 41.770548 | 2,304 | 0.741658 |
910e06470617b11c1d1f644c2a52900608f219c0 | 998 | py | Python | src/decisionengine_modules/load_config.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 2 | 2020-03-17T15:51:19.000Z | 2022-02-23T15:45:37.000Z | src/decisionengine_modules/load_config.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 358 | 2020-03-02T20:06:38.000Z | 2022-03-28T20:39:01.000Z | src/decisionengine_modules/load_config.py | goodenou/decisionengine_modules | cf4311949d3c5fd991d1c5c4a6a190ba53a2eb71 | [
"BSD-3-Clause"
] | 34 | 2020-02-24T17:17:11.000Z | 2022-01-13T21:50:11.000Z | """
Load python object
"""
import time
def load(python_file, retries=0, timeout=0, logger=None):
"""
Load constants from file.
:type constants_file: :obj:`file`
:arg constants_file: configuration file as python dict
:rtype: :obj:`object`
"""
code = None
config = None
retries =... | 22.177778 | 88 | 0.572144 |
910e356596eba0e1ad6661a18438da4993551061 | 1,039 | py | Python | migrations/versions/196bcc3133cb_.py | tuanquanghpvn/flask-intro | 4dbc6bfbbdee13bc601b7ba8f10ede3635a2cfaf | [
"MIT"
] | null | null | null | migrations/versions/196bcc3133cb_.py | tuanquanghpvn/flask-intro | 4dbc6bfbbdee13bc601b7ba8f10ede3635a2cfaf | [
"MIT"
] | null | null | null | migrations/versions/196bcc3133cb_.py | tuanquanghpvn/flask-intro | 4dbc6bfbbdee13bc601b7ba8f10ede3635a2cfaf | [
"MIT"
] | null | null | null | """empty message
Revision ID: 196bcc3133cb
Revises: 5d3ded72de8
Create Date: 2015-11-30 13:53:29.212438
"""
# revision identifiers, used by Alembic.
revision = '196bcc3133cb'
down_revision = '5d3ded72de8'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade():
### co... | 28.081081 | 63 | 0.646776 |
910e45c43113e313d482991edf33491b1b7e1e76 | 7,738 | py | Python | experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_21/exp6_new_rig_reset_obj_in_hand_match_old_rig_training.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_21/exp6_new_rig_reset_obj_in_hand_match_old_rig_training.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_21/exp6_new_rig_reset_obj_in_hand_match_old_rig_training.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.pygame import PickAndPlaceEnv
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.sets.rl_launcher import disco_experiment
if __name__ == "__main__":
variant = dict(
env_class=PickAndPlaceEnv,
env_kwargs=dict(
... | 32.241667 | 148 | 0.531403 |
910e4790ec86fd02d28364c52d08d638ffa8a79a | 17,877 | py | Python | onmt/trainer.py | txAnnie/ZP-DNLG | 16660ff917d50b534f940491133fe7d137e483bf | [
"MIT"
] | 1 | 2022-01-26T10:50:22.000Z | 2022-01-26T10:50:22.000Z | onmt/trainer.py | txAnnie/ZP-DNLG | 16660ff917d50b534f940491133fe7d137e483bf | [
"MIT"
] | null | null | null | onmt/trainer.py | txAnnie/ZP-DNLG | 16660ff917d50b534f940491133fe7d137e483bf | [
"MIT"
] | null | null | null | """
This is the loadable seq2seq trainer library that is
in charge of training details, loss compute, and statistics.
See train.py for a use case of this library.
Note: To make this a general library, we implement *only*
mechanism things here(i.e. what to do), and leave the strategy
... | 40.537415 | 114 | 0.538513 |
910e4a16ad2c8d34a3a4882335d3542b3171570e | 1,307 | py | Python | tests/test_utils/blog_urls.py | sparrowme/djangocms-blog | 6bbb32a3304d284fb699cf713e45ccd48ee876ae | [
"BSD-3-Clause"
] | 1 | 2022-01-09T20:23:10.000Z | 2022-01-09T20:23:10.000Z | tests/test_utils/blog_urls.py | sparrowme/djangocms-blog | 6bbb32a3304d284fb699cf713e45ccd48ee876ae | [
"BSD-3-Clause"
] | null | null | null | tests/test_utils/blog_urls.py | sparrowme/djangocms-blog | 6bbb32a3304d284fb699cf713e45ccd48ee876ae | [
"BSD-3-Clause"
] | 1 | 2021-05-26T15:17:13.000Z | 2021-05-26T15:17:13.000Z | from django.urls import path
from djangocms_blog.feeds import FBInstantArticles, LatestEntriesFeed, TagFeed
from djangocms_blog.settings import get_setting
from djangocms_blog.views import (
AuthorEntriesView,
CategoryEntriesView,
PostArchiveView,
PostDetailView,
PostListView,
TaggedListView,
)... | 34.394737 | 91 | 0.69013 |
910e858396177e9a619f3680943324713fadffd2 | 2,177 | py | Python | terrascript/data/invidian/ovh.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/invidian/ovh.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/invidian/ovh.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/invidian/ovh.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:24:14 UTC)
import terrascript
class ovh_cloud_region(terrascript.Data):
pass
class ovh_cloud_regions(terrascript.Data):
pass
class ovh_dedicated_ceph(terrascript.Data):
pass
class ovh_dedicated_installa... | 17.699187 | 73 | 0.762058 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.