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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d31f13baadd08f1eb748db5527eeba894c13d7e | 315 | py | Python | backend/factories/users.py | heidal/apollo | 576743e12048985ae8ef127224e1cb8ac49acd28 | [
"MIT"
] | 2 | 2020-02-28T16:24:55.000Z | 2020-03-27T17:12:50.000Z | backend/factories/users.py | heidal/apollo | 576743e12048985ae8ef127224e1cb8ac49acd28 | [
"MIT"
] | 51 | 2020-02-12T20:52:08.000Z | 2022-02-27T00:23:20.000Z | backend/factories/users.py | heidal/apollo | 576743e12048985ae8ef127224e1cb8ac49acd28 | [
"MIT"
] | null | null | null | import factory
from apollo.users.models import User
from faker import Factory as FakerFactory
faker = FakerFactory.create()
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User
username = factory.LazyAttribute(lambda x: faker.name())
email = factory.Faker("email")
| 22.5 | 60 | 0.742857 |
2d320f0ff062675e1ff7d5ad3ce74313def7c1f4 | 973 | py | Python | marqeta/response_models/result.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | marqeta/response_models/result.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | marqeta/response_models/result.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from datetime import datetime, date
from marqeta.response_models.result_code import ResultCode
from marqeta.response_models import datetime_object
import json
import re
class Result(object):
def __init__(self, json_response):
self.json_response = json_response
def __str__(self):
return json.d... | 27.027778 | 75 | 0.695786 |
2d324b7a6b1799eb3e0aaaddf6e5d760ef47d610 | 167 | py | Python | examples/__main__.py | jkae/knn-exercise | ae569e3f6a0e23669369d99e032270e72f8fbb66 | [
"MIT"
] | null | null | null | examples/__main__.py | jkae/knn-exercise | ae569e3f6a0e23669369d99e032270e72f8fbb66 | [
"MIT"
] | null | null | null | examples/__main__.py | jkae/knn-exercise | ae569e3f6a0e23669369d99e032270e72f8fbb66 | [
"MIT"
] | null | null | null | from .simple_example import *
tree = example_generate_tree()
print(tree)
print('\n')
[nn, dist] = example_find_nearest_neighbor()
print(nn) # 41.140259, -104.820236
| 18.555556 | 44 | 0.736527 |
2d3251ef3278d49e201fa4bb6247e6ba4cfe0bf0 | 6,714 | py | Python | tests/layers/test_roi_align_rotated.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | tests/layers/test_roi_align_rotated.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | tests/layers/test_roi_align_rotated.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import logging
import unittest
import cv2
import torch
from torch.autograd import Variable, gradcheck
from detectron.layers.roi_align import ROIAlign
from detectron.layers.roi_align_rotated import ROIAlignRotated
logger = logging.getLogger(__name__)
class ROIAlignR... | 37.932203 | 100 | 0.566875 |
2d3283f8a8ba603f81979ac611e5cbeda4559ff6 | 730 | py | Python | yahtzee_api/constants.py | tomarbeiter/yahtzee_api | 80095e32acb020b4a0f058ccdf2410f88f2d19ec | [
"Apache-2.0"
] | null | null | null | yahtzee_api/constants.py | tomarbeiter/yahtzee_api | 80095e32acb020b4a0f058ccdf2410f88f2d19ec | [
"Apache-2.0"
] | null | null | null | yahtzee_api/constants.py | tomarbeiter/yahtzee_api | 80095e32acb020b4a0f058ccdf2410f88f2d19ec | [
"Apache-2.0"
] | 1 | 2022-02-07T14:21:57.000Z | 2022-02-07T14:21:57.000Z | """Longer strings for error messages, etc."""
# Error messages for Player.roll()
NO_ROLLS_LEFT = "ValueError in Player.roll(): No rolls remaining."
BAD_TYPE = "TypeError in Player.roll(): dice_to_roll must be \
of type list."
BAD_LENGTH = "ValueError in Player.roll():dice_to_roll \
argument must be ... | 45.625 | 79 | 0.672603 |
2d328bf329e878b7dc666ec132e56890fdfa4708 | 810 | py | Python | pyclopedia/p03_stdlib/_datapersistance/sqlite3/cursor_rowcount.py | MacHu-GWU/pyclopedia-project | c6ee156eb40bc5a4ac5f51aa735b6fd004cb68ee | [
"MIT"
] | null | null | null | pyclopedia/p03_stdlib/_datapersistance/sqlite3/cursor_rowcount.py | MacHu-GWU/pyclopedia-project | c6ee156eb40bc5a4ac5f51aa735b6fd004cb68ee | [
"MIT"
] | null | null | null | pyclopedia/p03_stdlib/_datapersistance/sqlite3/cursor_rowcount.py | MacHu-GWU/pyclopedia-project | c6ee156eb40bc5a4ac5f51aa735b6fd004cb68ee | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
``cursor.rowcount`` 能返回上一次的写操作所影响的行数。
ref: https://docs.python.org/2/library/sqlite3.html#sqlite3.Cursor.rowcount
"""
import sqlite3
connect = sqlite3.connect(":memory:")
cursor = connect.cursor()
# Create Table
cursor.execute("CREATE TABLE test (id INTEGER, messag... | 23.142857 | 75 | 0.685185 |
2d329b3ee64e57b351abbe70103e6431758c1bfd | 8,290 | py | Python | pagesext/migrations/0001_initial.py | dlancer/django-pages-cms-extensions | 4aa6f2780abef9543ced20258ede01a9662167b3 | [
"BSD-3-Clause"
] | 1 | 2016-07-08T07:23:20.000Z | 2016-07-08T07:23:20.000Z | pagesext/migrations/0001_initial.py | dlancer/django-pages-cms-extensions | 4aa6f2780abef9543ced20258ede01a9662167b3 | [
"BSD-3-Clause"
] | null | null | null | pagesext/migrations/0001_initial.py | dlancer/django-pages-cms-extensions | 4aa6f2780abef9543ced20258ede01a9662167b3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import pagesext.storage
import pagesext.models.pageimagecontent
import embed_video.fields
import pagesext.models.pagefilecontent
import django.utils.timezone
from django.conf import settings
import image_cropping.f... | 65.793651 | 232 | 0.632449 |
2d329bf721cb341f0c0bf3d3570b5f3b627608e2 | 3,015 | py | Python | alkaf_administration/scripts/populate_database.py | FerdiantJoshua/alkafgrosir-administration | e7ef86b117a98e7f5503d7b5fee91079d0d86932 | [
"MIT"
] | null | null | null | alkaf_administration/scripts/populate_database.py | FerdiantJoshua/alkafgrosir-administration | e7ef86b117a98e7f5503d7b5fee91079d0d86932 | [
"MIT"
] | 9 | 2020-07-12T23:23:49.000Z | 2022-03-12T00:41:04.000Z | alkaf_administration/scripts/populate_database.py | FerdiantJoshua/alkafgrosir-administration | e7ef86b117a98e7f5503d7b5fee91079d0d86932 | [
"MIT"
] | null | null | null | import argparse
import json
import sys, os
import django
from django.db import IntegrityError
sys.path.append('./')
os.environ['DJANGO_SETTINGS_MODULE'] = 'alkaf_administration.settings'
django.setup()
from transaction.models import City, Product, Courier, Marketplace, Customer
def read_csv_file(path):
with op... | 29.851485 | 95 | 0.572471 |
2d32c8e73beb967ed5010cc8959450308ac3e540 | 161 | py | Python | testing/cases.py | luismayta/python-example-elasticsearch | 4572b03c425f525094d5892ef8c625cfa991174a | [
"MIT"
] | 4 | 2019-08-04T19:23:39.000Z | 2021-04-10T08:26:44.000Z | testing/cases.py | luismayta/python-example-elasticsearch | 4572b03c425f525094d5892ef8c625cfa991174a | [
"MIT"
] | 3 | 2019-07-08T20:08:02.000Z | 2019-07-09T19:47:25.000Z | testing/cases.py | luismayta/python-example-elasticsearch | 4572b03c425f525094d5892ef8c625cfa991174a | [
"MIT"
] | 1 | 2019-08-05T05:15:26.000Z | 2019-08-05T05:15:26.000Z | # -*- coding: utf-8 -*-
from testing.drf import APIClient
from testing.mixins import TestCaseMixin
class TestCase(TestCaseMixin):
client_class = APIClient
| 20.125 | 40 | 0.757764 |
2d32f9ce040d2b2a85278a56a51c032f9f42c3e3 | 2,650 | py | Python | moto/ses/feedback.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2018-01-29T14:50:38.000Z | 2018-05-12T10:45:31.000Z | moto/ses/feedback.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2021-03-31T20:15:51.000Z | 2021-12-13T20:50:52.000Z | moto/ses/feedback.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 12 | 2017-09-06T22:11:15.000Z | 2021-05-28T17:22:31.000Z | """
SES Feedback messages
Extracted from https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html
"""
COMMON_MAIL = {
"notificationType": "Bounce, Complaint, or Delivery.",
"mail": {
"timestamp": "2018-10-08T14:05:45 +0000",
"messageId": "000001378603177f-7a5433e7-8edb-42... | 32.317073 | 95 | 0.540755 |
2d32fe28e02988f9ab6fb5d91e63c8e8491e7bc9 | 69 | py | Python | 0x09-python-everything_is_object/101-locked_class.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | null | null | null | 0x09-python-everything_is_object/101-locked_class.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | null | null | null | 0x09-python-everything_is_object/101-locked_class.py | flourishcodes/holbertonschool-higher_level_programming | 6fda5cca4ed960d7f3d40c26292ad55e1e7d3065 | [
"MIT"
] | 4 | 2018-05-01T05:04:15.000Z | 2020-04-28T22:22:54.000Z | #!/usr/bin/python3
class LockedClass:
__slots__ = ["first_name"]
| 17.25 | 30 | 0.695652 |
2d33246370fcc4d84581ddfc1b8f79f4b3260021 | 2,940 | py | Python | .leetcode/385.mini-parser.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/385.mini-parser.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/385.mini-parser.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=385 lang=python3
#
# [385] Mini Parser
#
# https://leetcode.com/problems/mini-parser/description/
#
# algorithms
# Medium (34.97%)
# Likes: 308
# Dislikes: 1017
# Total Accepted: 44.3K
# Total Submissions: 126.3K
# Testcase Example: '"324"'
#
# Given a string s represents the serialization ... | 21.151079 | 79 | 0.52585 |
2d332e45b621012b866b2261bad95ca1a8f107b3 | 687 | py | Python | dissector_temp_folder/novelty_score.py | rwiddhic96/apotoma | 4636d6bf72673471b0c022aa4354170fc7b03ac4 | [
"MIT"
] | null | null | null | dissector_temp_folder/novelty_score.py | rwiddhic96/apotoma | 4636d6bf72673471b0c022aa4354170fc7b03ac4 | [
"MIT"
] | null | null | null | dissector_temp_folder/novelty_score.py | rwiddhic96/apotoma | 4636d6bf72673471b0c022aa4354170fc7b03ac4 | [
"MIT"
] | null | null | null | import abc
from typing import Tuple
import tensorflow as tf
import numpy as np
class NoveltyScore(abc.ABC):
def __init__(self, model: tf.keras.Model, train_data: np.ndarray) -> None:
super().__init__()
self.model = model
self.train_data = train_data
# @abc.abstractmethod says that t... | 24.535714 | 91 | 0.671033 |
2d33588ce01e60f71e15ac70311a1de74e9940d7 | 850 | py | Python | forest/decider/decider.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | 7 | 2020-06-24T12:14:40.000Z | 2022-01-19T17:01:02.000Z | forest/decider/decider.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | null | null | null | forest/decider/decider.py | Marghrid/Forest | 2f1730fd7cb1e3579fcce222c67b91c5bb1aa5f4 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Any
from .result import Result
from ..dsl import Node
from ..visitor import InterpreterError
class Decider(ABC):
@abstractmethod
def __init__(self):
self._interpreter = None
@abstractmethod
def analyze(self, ast: Node) -> Result:
... | 25.757576 | 85 | 0.658824 |
2d335a8b5dacc06fcc7b3ee67aee585edf93956e | 2,165 | py | Python | twirps/commands.py | condnsdmatters/twirps | e2a15ae21129fedb400415ad1b70f6a931b046c4 | [
"MIT"
] | 3 | 2015-05-08T16:19:40.000Z | 2016-05-03T07:54:04.000Z | twirps/commands.py | condnsdmatters/twirps | e2a15ae21129fedb400415ad1b70f6a931b046c4 | [
"MIT"
] | null | null | null | twirps/commands.py | condnsdmatters/twirps | e2a15ae21129fedb400415ad1b70f6a931b046c4 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import json
import logging
import os
from archipelago import archipelago, setup
from flask import Blueprint, Flask, request, session, g, redirect, url_for, \
abort, render_template, flash, Response
from twirps import app, data_collection
from twirps.classes import TDBHan... | 21.65 | 92 | 0.774596 |
2d3377cce2f87545ea368627c63c7afcf3eb62f1 | 4,817 | py | Python | flask-yolo/main_yolo.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 923 | 2020-01-11T06:36:53.000Z | 2022-03-31T00:26:57.000Z | flask-yolo/main_yolo.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 25 | 2020-02-27T08:35:46.000Z | 2022-01-25T08:54:19.000Z | flask-yolo/main_yolo.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 262 | 2020-01-02T02:19:40.000Z | 2022-03-23T04:56:16.000Z | import cv2 as cv
import argparse
import numpy as np
# Initialize the parameters
confThreshold = 0.25 # Confidence threshold
nmsThreshold = 0.4 # Non-maximum suppression threshold
inpWidth = 320 # Width of network's input image
inpHeight = 320 # Height of network's input image
# Give the configuration and weight f... | 40.141667 | 158 | 0.663276 |
2d33bc8c38fe768d661357025a95fe9b07c8adf0 | 818 | py | Python | scripts/quickstart_tooling_dpg/template_tests/test_smoke.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | scripts/quickstart_tooling_llc/template_tests/test_smoke.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | scripts/quickstart_tooling_llc/template_tests/test_smoke.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.
# ---------------------------------------------------------------------... | 45.444444 | 105 | 0.569682 |
2d33c6b3c9c9585008d2c632fe96ad1474a6aecc | 659 | py | Python | schapke/cresi/data_prep/create_psms.py | SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 27 | 2020-03-04T05:54:48.000Z | 2022-01-05T07:07:44.000Z | schapke/cresi/data_prep/create_psms.py | CosmiQ/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 1 | 2020-07-14T10:35:50.000Z | 2020-07-14T10:35:50.000Z | schapke/cresi/data_prep/create_psms.py | SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 7 | 2020-03-07T21:42:57.000Z | 2022-01-07T10:49:50.000Z | import os
import argparse
from shutil import copyfile
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--indirs', nargs='+')
parser.add_argument('--outdir', type=str, default='')
args = parser.parse_args()
os.makedirs(args.outdir, exist_ok=True)
for indir in ... | 26.36 | 57 | 0.573596 |
2d33d19665930c695f4988fc3e581d52e16c06eb | 360 | py | Python | binderhub/metrics.py | jupyterhub/builderhub | 37551212e47f515186b62fa02443f50b6e7b5839 | [
"BSD-3-Clause"
] | null | null | null | binderhub/metrics.py | jupyterhub/builderhub | 37551212e47f515186b62fa02443f50b6e7b5839 | [
"BSD-3-Clause"
] | null | null | null | binderhub/metrics.py | jupyterhub/builderhub | 37551212e47f515186b62fa02443f50b6e7b5839 | [
"BSD-3-Clause"
] | null | null | null | from prometheus_client import CONTENT_TYPE_LATEST, REGISTRY, generate_latest
from .base import BaseHandler
class MetricsHandler(BaseHandler):
# demote logging of 200 responses to debug-level
log_success_debug = True
async def get(self):
self.set_header("Content-Type", CONTENT_TYPE_LATEST)
... | 27.692308 | 76 | 0.763889 |
2d34276e75e35f903dc03ee9f54ce8f16985d971 | 13,916 | py | Python | contrib/performance/stats.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | contrib/performance/stats.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | contrib/performance/stats.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2010-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 28.227181 | 110 | 0.59234 |
2d342e5f1d20f5602b3869c29b30255195d20dc4 | 4,770 | py | Python | gravis/_internal/utils/operating_system.py | robert-haas/gravis | 3e63b606141bf78617b1247048a9e3ccca6d5824 | [
"Apache-2.0"
] | 3 | 2022-01-19T15:57:29.000Z | 2022-03-06T02:36:44.000Z | gravis/_internal/utils/operating_system.py | robert-haas/gravis | 3e63b606141bf78617b1247048a9e3ccca6d5824 | [
"Apache-2.0"
] | 2 | 2022-03-01T19:29:49.000Z | 2022-03-01T19:31:08.000Z | gravis/_internal/utils/operating_system.py | robert-haas/gravis | 3e63b606141bf78617b1247048a9e3ccca6d5824 | [
"Apache-2.0"
] | null | null | null | """Centralized access to operating system functionality."""
import errno as _errno
import os as _os
def is_file(filepath, raise_exception=False):
"""Check if a file exists.
Parameters
----------
filepath : str
raise_exception : bool
Returns
-------
file_exists : bool
Raises
... | 34.071429 | 123 | 0.67065 |
2d34387b7da221247551930dfc1c610cb9ed4a4e | 3,074 | py | Python | tests/test_S3HDF5File.py | epiviz/parser | 255dc6409db3f55b6f967df079ada469862cd02c | [
"MIT"
] | 4 | 2018-09-14T19:00:16.000Z | 2020-04-08T07:58:34.000Z | tests/test_S3HDF5File.py | epiviz/parser | 255dc6409db3f55b6f967df079ada469862cd02c | [
"MIT"
] | 6 | 2019-04-27T21:08:49.000Z | 2021-12-21T01:03:11.000Z | tests/test_S3HDF5File.py | epiviz/epivizFileParser | bba301db40458b6666653c77a446db8778ee07f8 | [
"MIT"
] | 2 | 2021-01-11T17:09:24.000Z | 2021-01-28T16:17:11.000Z | import pytest
import os
from epivizFileParser import S3HDF5File
__author__ = "Hany Elgaml"
__copyright__ = "mit"
__license__ = "mit"
API_URL = ""
S3_URL = ""
u = S3HDF5File(API_URL, S3_URL)
@pytest.mark.skip(reason="no way of currently testing this")
def test_call_getMatrix_1():
response = u.getMatrix('1:8', '... | 27.20354 | 60 | 0.611906 |
2d344ee98f9f62f15cb441bd46c2d9f13ac8bc80 | 676 | py | Python | treetopper/_exceptions.py | zacharybeebe/treetopper | 9302d9c482eb2209c516c79100be98614666f8c1 | [
"MIT"
] | null | null | null | treetopper/_exceptions.py | zacharybeebe/treetopper | 9302d9c482eb2209c516c79100be98614666f8c1 | [
"MIT"
] | null | null | null | treetopper/_exceptions.py | zacharybeebe/treetopper | 9302d9c482eb2209c516c79100be98614666f8c1 | [
"MIT"
] | null | null | null | class TargetDensityError(Exception):
def __init__(self, target_density, current_density, target_metric):
p1 = f"""Target Density of {target_density} {target_metric} """
p2 = f"""is greater than Stand Total of {round(current_density, 1)} {target_metric}. """
p3 = f"""Please lower Target Densi... | 48.285714 | 96 | 0.677515 |
2d3467aaeb5c55d0a0d2b608b7085994be543100 | 4,913 | py | Python | examples/progress_bar_segmentation.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | 1 | 2021-06-17T06:01:39.000Z | 2021-06-17T06:01:39.000Z | examples/progress_bar_segmentation.py | 0x00b1/napari | 01c24e320dc3d8daaae80a383f95fc0587c98ee4 | [
"BSD-3-Clause"
] | null | null | null | examples/progress_bar_segmentation.py | 0x00b1/napari | 01c24e320dc3d8daaae80a383f95fc0587c98ee4 | [
"BSD-3-Clause"
] | null | null | null | """
Use napari's tqdm wrapper to display the progress of long-running operations
in the viewer.
"""
import numpy as np
import napari
from time import sleep
from napari.qt import progress
from qtpy.QtWidgets import QPushButton, QVBoxLayout, QWidget
from skimage.filters import (
threshold_isodata,
threshold_l... | 30.899371 | 77 | 0.708325 |
2d346c223e6a90e13c067e1e9195768dbf490d2a | 4,480 | py | Python | analysis/patterns_bulk_analysis_robustness_decays.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | null | null | null | analysis/patterns_bulk_analysis_robustness_decays.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | null | null | null | analysis/patterns_bulk_analysis_robustness_decays.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | 4 | 2020-02-18T09:25:20.000Z | 2021-11-20T23:52:29.000Z | # -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import os
import numpy as np
parent = "C:\\Users\\Daniel\\pyDentateData\\robustness\\decays_2-0\\"
all_files = [x for x in os.listdir(parent) if not "figure" in x if '.npz' in x if 'corrs' in x]
all_input_data = [np.load(parent + x)['inpu... | 37.647059 | 150 | 0.671429 |
2d347b5f437776b9c0b33fa9b103830071f0cb33 | 2,470 | py | Python | st2common/st2common/util/date.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2common/st2common/util/date.py | FairwindsOps/st2 | 2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2common/st2common/util/date.py | FairwindsOps/st2 | 2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa | [
"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... | 27.142857 | 94 | 0.695547 |
2d348ef10423c81a0acc3d0a1c991a832d31b398 | 9,772 | py | Python | models/model_zoo/model_conv5_fc_lstm2_128.py | jonasrothfuss/DeepEpisodicMemory | 1095315a5d75a4840ef4017af70432e2dd535e4c | [
"MIT"
] | 13 | 2017-02-03T17:17:04.000Z | 2021-01-27T09:29:53.000Z | models/model_zoo/model_conv5_fc_lstm2_128.py | jonasrothfuss/DeepEpisodicMemory | 1095315a5d75a4840ef4017af70432e2dd535e4c | [
"MIT"
] | 1 | 2019-01-07T23:53:51.000Z | 2019-01-07T23:53:51.000Z | models/model_zoo/model_conv5_fc_lstm2_128.py | jonasrothfuss/DeepEpisodicMemory | 1095315a5d75a4840ef4017af70432e2dd535e4c | [
"MIT"
] | 8 | 2017-02-03T17:17:41.000Z | 2021-01-13T10:53:39.000Z | import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
from tensorflow.contrib.layers.python import layers as tf_layers
from models.conv_lstm import basic_conv_lstm_cell, conv_lstm_cell_no_input
# Amount to use when lower bounding tensors
RELU_SHIFT = 1e-12
FC_LAYER_SIZE = 256
FC_LSTM_LAYER... | 51.703704 | 168 | 0.70835 |
2d348ffeb969ad238a9817c9755c422f1876e58c | 3,855 | py | Python | examples_prelims/mechsearch/shortest_path_module.py | Nojgaard/mechsearch | 8c78808ca0355fa80a2877091ecf6ed439fe6b08 | [
"BSD-3-Clause"
] | 1 | 2022-01-19T14:13:07.000Z | 2022-01-19T14:13:07.000Z | examples_prelims/mechsearch/shortest_path_module.py | Nojgaard/mechsearch | 8c78808ca0355fa80a2877091ecf6ed439fe6b08 | [
"BSD-3-Clause"
] | null | null | null | examples_prelims/mechsearch/shortest_path_module.py | Nojgaard/mechsearch | 8c78808ca0355fa80a2877091ecf6ed439fe6b08 | [
"BSD-3-Clause"
] | 1 | 2022-02-26T10:46:48.000Z | 2022-02-26T10:46:48.000Z | from mechsearch.edge_weight import ConstantEdgeWeight, EdgeWeight
from mechsearch.energy import EnergyBarrier, EnergyDifference
from mechsearch.explore import shortest_simple_paths
from mechsearch.grammar import Grammar
from mechsearch.state_space import Path
from mechsearch.module import Module
from mechsearch.state_s... | 42.833333 | 123 | 0.629572 |
2d349517f994ba04489ecfc4648c2b271c166384 | 13,696 | py | Python | sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-managedservices/azure/mgmt/managedservices/operations/registration_definitions_operations.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 44.904918 | 146 | 0.672605 |
2d34c9dea6b53a5e29f86bc680cbaedc8ef3ac00 | 11,952 | py | Python | datasets/views.py | vahana/_datasets | ac55ad040125706df8f6a15b839a1f45b5c043f0 | [
"MIT"
] | null | null | null | datasets/views.py | vahana/_datasets | ac55ad040125706df8f6a15b839a1f45b5c043f0 | [
"MIT"
] | null | null | null | datasets/views.py | vahana/_datasets | ac55ad040125706df8f6a15b839a1f45b5c043f0 | [
"MIT"
] | 1 | 2019-11-14T17:19:22.000Z | 2019-11-14T17:19:22.000Z | import os
from pymongo import IndexModel
import logging
import prf
from slovar.utils import maybe_dotted
from slovar import slovar
from datasets import get_dataset, get_dataset_meta, drop_namespace
from datasets.backends.mongo import define_datasets, registered_namespaces
from datasets.backends import BACKENDS, ESBac... | 30.181818 | 117 | 0.557145 |
2d34ee59a5774f705262331d11ae7c179cba5453 | 1,308 | py | Python | OpenModal/gui/templates.py | MonashSmartStructures/OpenModal | a76a258c420954eab4a8b4ef37b487616c9f6c62 | [
"CNRI-Python"
] | 85 | 2016-12-04T10:34:08.000Z | 2022-03-26T18:03:47.000Z | OpenModal/gui/templates.py | MonashSmartStructures/OpenModal | a76a258c420954eab4a8b4ef37b487616c9f6c62 | [
"CNRI-Python"
] | 55 | 2016-12-02T15:01:15.000Z | 2022-01-07T11:10:26.000Z | OpenModal/gui/templates.py | gusshmn/OpenModal | a76a258c420954eab4a8b4ef37b487616c9f6c62 | [
"CNRI-Python"
] | 51 | 2016-12-30T16:33:36.000Z | 2021-11-13T11:05:34.000Z |
# Copyright (C) 2014-2017 Matjaž Mršnik, Miha Pirnat, Janko Slavič, Blaž Starc (in alphabetic order)
#
# This file is part of OpenModal.
#
# OpenModal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version... | 39.636364 | 144 | 0.720948 |
2d350003109dbd020db007db66723a5f3511c237 | 26,954 | py | Python | nevergrad/optimization/base.py | kwonhur/nevergrad | 7821ff2ddf46ed7ece61529449f770d32179433c | [
"MIT"
] | null | null | null | nevergrad/optimization/base.py | kwonhur/nevergrad | 7821ff2ddf46ed7ece61529449f770d32179433c | [
"MIT"
] | null | null | null | nevergrad/optimization/base.py | kwonhur/nevergrad | 7821ff2ddf46ed7ece61529449f770d32179433c | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import pickle
import warnings
from pathlib import Path
from numbers import Real
from collections import deque
import typi... | 46.876522 | 139 | 0.646769 |
2d35049e84cc925de12be8eb7f5a6aeb7772ddf9 | 16,335 | py | Python | thursday/format_data.py | josh-marsh/thursday | 0acb0511b8007091a409e674bb42c2c0fe8f8a82 | [
"BSD-3-Clause"
] | null | null | null | thursday/format_data.py | josh-marsh/thursday | 0acb0511b8007091a409e674bb42c2c0fe8f8a82 | [
"BSD-3-Clause"
] | 34 | 2018-01-31T05:22:42.000Z | 2018-04-26T02:14:43.000Z | thursday/format_data.py | josh-marsh/thursday | 0acb0511b8007091a409e674bb42c2c0fe8f8a82 | [
"BSD-3-Clause"
] | 1 | 2018-04-03T00:26:32.000Z | 2018-04-03T00:26:32.000Z | """Functions for formatting, preprocessing, and augmentation."""
import math
import os
import pickle
import sys
from astropy.coordinates import SkyCoord
import astropy.io.ascii as asc
import astropy.units as u
import h5py
from keras.preprocessing.image import apply_transform
from keras.preprocessing.image import Ima... | 34.829424 | 83 | 0.661953 |
2d358997b621ac646a1dbe210e373cdd8ba1a1e7 | 2,168 | py | Python | setup.py | cranklin/ethereum-etl | 80369e6eb91ee6ae5b94f16eba25edd8c1d652e0 | [
"MIT"
] | 1 | 2021-04-04T06:01:32.000Z | 2021-04-04T06:01:32.000Z | setup.py | cranklin/ethereum-etl | 80369e6eb91ee6ae5b94f16eba25edd8c1d652e0 | [
"MIT"
] | null | null | null | setup.py | cranklin/ethereum-etl | 80369e6eb91ee6ae5b94f16eba25edd8c1d652e0 | [
"MIT"
] | 1 | 2021-11-07T10:01:19.000Z | 2021-11-07T10:01:19.000Z | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
long_description = read('README.md') if os.path.isfile("README.md") else ""
setup(
name='ethereum-etl',
version='1.6.2',
author='Evgeny Medvedev',
author_em... | 31.882353 | 120 | 0.587177 |
2d358e6e0c71f64612b62d788d5e3eaf1c5bd5be | 21,360 | py | Python | simpletkgui/simplewidgets.py | michael-genson/simplegui | 366222864889c2fd6003aba2a25343c92116d483 | [
"MIT"
] | 1 | 2021-04-13T04:38:06.000Z | 2021-04-13T04:38:06.000Z | simpletkgui/simplewidgets.py | michael-genson/simpletkgui | 366222864889c2fd6003aba2a25343c92116d483 | [
"MIT"
] | null | null | null | simpletkgui/simplewidgets.py | michael-genson/simpletkgui | 366222864889c2fd6003aba2a25343c92116d483 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import ttk
from PIL import ImageTk, Image
import platform
'''
The following widgets have not been Simplified:
ttk.Scale
ttk.Spinbox
ttk.Progressbar
ttk.Notebook
'''
class SimpleWidget:
def __init__(self, view, padding_type='both'):
padding_type = padding_t... | 37.671958 | 190 | 0.614607 |
2d3593c8249d0bdb020e2597a2d6bbd73bbfed25 | 10,346 | py | Python | tests/test_wsgi.py | mihnatenko/aiohttp | 1740da9e932bab5cf440e2d6064a13299209d44e | [
"Apache-2.0"
] | null | null | null | tests/test_wsgi.py | mihnatenko/aiohttp | 1740da9e932bab5cf440e2d6064a13299209d44e | [
"Apache-2.0"
] | null | null | null | tests/test_wsgi.py | mihnatenko/aiohttp | 1740da9e932bab5cf440e2d6064a13299209d44e | [
"Apache-2.0"
] | null | null | null | """Tests for http/wsgi.py"""
import io
import asyncio
import unittest
import unittest.mock
import aiohttp
from aiohttp import multidict
from aiohttp import wsgi
from aiohttp import protocol
class TestHttpWsgiServerProtocol(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
... | 37.215827 | 76 | 0.61531 |
2d35ada3646418512fae1552155fbd29efaaa704 | 2,384 | py | Python | examples/image_classification/models/cifar/__init__.py | botcs/NGD-SGD | 003ef162bd274c321537d60264969be6e2419ff4 | [
"Apache-2.0"
] | null | null | null | examples/image_classification/models/cifar/__init__.py | botcs/NGD-SGD | 003ef162bd274c321537d60264969be6e2419ff4 | [
"Apache-2.0"
] | null | null | null | examples/image_classification/models/cifar/__init__.py | botcs/NGD-SGD | 003ef162bd274c321537d60264969be6e2419ff4 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
"""The models subpackage contains definitions for the following model for CIFAR10/CIFAR100
architectures:
- `AlexNet`_
- `VGG`_
- `ResNet`_
- `SqueezeNet`_
- `DenseNet`_
You can construct a model with random weights by calling its constructor:
.. code:: python
import... | 31.786667 | 90 | 0.551174 |
2d35f143d969b96b150dd4e426490ea2b9555aaa | 312 | py | Python | tests/conftest.py | okosioc/pyseed | a4ee4bb6f005c9a9b80eafea45b91ddb7354fa91 | [
"MIT"
] | null | null | null | tests/conftest.py | okosioc/pyseed | a4ee4bb6f005c9a9b80eafea45b91ddb7354fa91 | [
"MIT"
] | null | null | null | tests/conftest.py | okosioc/pyseed | a4ee4bb6f005c9a9b80eafea45b91ddb7354fa91 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
conftest
~~~~~~~~~~~~~~
Sharing fixture functions.
:copyright: (c) 2021 by fengweimin.
:date: 2021/8/11
"""
import pytest
from pyseed import connect
@pytest.fixture(scope='module')
def db():
""" 准备数据库. """
connect('mongodb://localhost:27017/pytest')
| 14.857143 | 47 | 0.580128 |
2d35f9a33ce3a0100263a31a9b51f432a9395fb5 | 4,816 | py | Python | src/tests/illumidesk/grades/test_lms_grades_handler.py | Abhi94N/illumidesk | 4cf07e3bd278931ac404f7482e92a4ec35827aa9 | [
"MIT"
] | null | null | null | src/tests/illumidesk/grades/test_lms_grades_handler.py | Abhi94N/illumidesk | 4cf07e3bd278931ac404f7482e92a4ec35827aa9 | [
"MIT"
] | null | null | null | src/tests/illumidesk/grades/test_lms_grades_handler.py | Abhi94N/illumidesk | 4cf07e3bd278931ac404f7482e92a4ec35827aa9 | [
"MIT"
] | null | null | null | import pytest
from tornado.web import RequestHandler
from unittest.mock import AsyncMock
from unittest.mock import Mock
from unittest.mock import patch
from unittest.mock import PropertyMock
from illumidesk.authenticators.authenticator import LTI11Authenticator
from illumidesk.authenticators.authenticator import LTI... | 38.83871 | 101 | 0.784468 |
2d360805f5caac0759edbdc9fbda62607794102a | 2,513 | py | Python | webapp/visualizeData.py | Jinchu/covid-plotter | 17fd3fc4f7a4e135cc79204ec3b7cdff90b9ff8f | [
"MIT"
] | null | null | null | webapp/visualizeData.py | Jinchu/covid-plotter | 17fd3fc4f7a4e135cc79204ec3b7cdff90b9ff8f | [
"MIT"
] | null | null | null | webapp/visualizeData.py | Jinchu/covid-plotter | 17fd3fc4f7a4e135cc79204ec3b7cdff90b9ff8f | [
"MIT"
] | null | null | null | import sys
import matplotlib.pyplot as plt
class CovidPlot(object):
""" Useful for plotting Covid related data. """
def __init__(self, x_val, y_val):
self.x = x_val
self.y = y_val
def rollingAverage(self, input_data):
""" Returns array as long as input_data, but rolling averages as... | 31.4125 | 94 | 0.613211 |
2d361a1025cf9f0cd0563285fad930c295b3e34e | 46,322 | py | Python | paminco/net/_data.py | paminco/paminco | 2b8da7cc83adde3c72af5150cf6d7294ff6fd29e | [
"MIT"
] | 4 | 2021-12-30T06:25:09.000Z | 2022-01-06T17:28:57.000Z | paminco/net/_data.py | paminco/paminco | 2b8da7cc83adde3c72af5150cf6d7294ff6fd29e | [
"MIT"
] | 9 | 2021-12-13T07:38:13.000Z | 2021-12-21T16:43:15.000Z | paminco/net/_data.py | paminco/paminco | 2b8da7cc83adde3c72af5150cf6d7294ff6fd29e | [
"MIT"
] | null | null | null | """
Data source for SiouxFalls:
Transportation Networks for Research Core Team. Transportation Networks for Research.
https://github.com/bstabler/TransportationNetworks. Accessed 11, 30, 2021.
"""
import numpy as np
XML_SIOUX = (
"""<?xml version="1.0" ?>
<network>
<edges>
<edge from="1" to="2">
<cost>
... | 37.206426 | 127 | 0.539355 |
2d3671408a73637f5f724dcedba8134d813a20ca | 1,721 | py | Python | tests/libs/datasets/zeros_filter_test.py | ConsultingMD/covid-data-model | f3d23f98eccca1ce33c7a11ab546e9aab5d0aa4d | [
"MIT"
] | null | null | null | tests/libs/datasets/zeros_filter_test.py | ConsultingMD/covid-data-model | f3d23f98eccca1ce33c7a11ab546e9aab5d0aa4d | [
"MIT"
] | null | null | null | tests/libs/datasets/zeros_filter_test.py | ConsultingMD/covid-data-model | f3d23f98eccca1ce33c7a11ab546e9aab5d0aa4d | [
"MIT"
] | null | null | null | import more_itertools
import structlog
from covidactnow.datapublic.common_fields import CommonFields
from libs.datasets.sources import zeros_filter
from libs.pipeline import Region
from tests import test_helpers
from tests.test_helpers import TimeseriesLiteral
import pandas as pd
def test_basic():
region_tx = Re... | 35.854167 | 98 | 0.68158 |
2d367c469b932d92a3703ded70bb29d9a15ebd43 | 8,385 | py | Python | anasymod/generators/vivado.py | SubjeBilisim/anasymod | d93f656c21e2aa238f7a5ada50955cc7dc615df1 | [
"BSD-3-Clause"
] | null | null | null | anasymod/generators/vivado.py | SubjeBilisim/anasymod | d93f656c21e2aa238f7a5ada50955cc7dc615df1 | [
"BSD-3-Clause"
] | null | null | null | anasymod/generators/vivado.py | SubjeBilisim/anasymod | d93f656c21e2aa238f7a5ada50955cc7dc615df1 | [
"BSD-3-Clause"
] | null | null | null | import os
import pathlib
from anasymod.util import call, back2fwd
from anasymod.generators.codegen import CodeGenerator
from anasymod.sources import VerilogSource, MEMFile, BDFile, IPRepo, EDIFFile
from anasymod.targets import FPGATarget
from anasymod.enums import FPGASimCtrl
class VivadoTCLGenerator(CodeGenerator):
... | 38.640553 | 168 | 0.588193 |
2d368e0be6c5e92bf215468b2c34b93c4f9f851d | 819 | py | Python | model/config.py | UMass-Rescue/FaceDetectMicroservice | 2731880becf97d7e6d656ac4518d84664611d462 | [
"MIT"
] | null | null | null | model/config.py | UMass-Rescue/FaceDetectMicroservice | 2731880becf97d7e6d656ac4518d84664611d462 | [
"MIT"
] | null | null | null | model/config.py | UMass-Rescue/FaceDetectMicroservice | 2731880becf97d7e6d656ac4518d84664611d462 | [
"MIT"
] | null | null | null | # Give a name to describe this model. The name should conform to python variable naming conventions, and should be
# only a single word.
model_name = 'example_model'
# Tags are used to describe the performance of a model. These simple keywords can help people decide whether your model
# is appropriate to use for their... | 54.6 | 119 | 0.750916 |
2d3693444b745b28cdd458576787f231eb129b69 | 1,106 | py | Python | openstack-dashboard/openstack_dashboard/dashboards/settings/dashboard.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/share/openstack-dashboard/openstack_dashboard/dashboards/settings/dashboard.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/share/openstack-dashboard/openstack_dashboard/dashboards/settings/dashboard.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack Foundation
# Copyright 2012 Nebula, 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://ww... | 30.722222 | 78 | 0.698915 |
2d3695c403303e80a70b9afb2b15a7e4f3febee0 | 1,676 | py | Python | archive/nexus-api-v2/API/AWS/__init__.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/API/AWS/__init__.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/API/AWS/__init__.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | 1 | 2022-01-03T05:33:15.000Z | 2022-01-03T05:33:15.000Z | #!/usr/bin/env python3
# -*- Coding: UTF-8 -*- #
# -*- System: Linux -*- #
# -*- Usage: *.py -*- #
# Owner: Jacob B. Sanders
# Source: gitlab.cloud-technology.io
# License: BSD 3-Clause License
"""
[...]
"""
# =============================================================================
# Standard Library... | 21.766234 | 79 | 0.392601 |
2d36bf03c8df6684310346f4651180ba80be44cc | 847 | py | Python | opsbro/colorpalette.py | naparuba/opsbro | 98618a002cd47250d21e7b877a24448fc95fec80 | [
"MIT"
] | 32 | 2017-08-29T08:57:16.000Z | 2021-04-21T08:53:04.000Z | opsbro/colorpalette.py | naparuba/opsbro | 98618a002cd47250d21e7b877a24448fc95fec80 | [
"MIT"
] | 108 | 2017-09-04T19:59:28.000Z | 2022-03-31T08:12:07.000Z | opsbro/colorpalette.py | naparuba/kunai | 98618a002cd47250d21e7b877a24448fc95fec80 | [
"MIT"
] | 8 | 2015-02-03T12:30:53.000Z | 2017-07-29T19:43:54.000Z | COLOR_PACK_LIGHT_GREEN_TO_DARK_PURPLE = 1
# lower (light green=59) to max (dark purple=28)
DARK_PURPLE = 28
LIGHT_GREEN = 59
COLOR_PACK_CITRON_TO_VIOLET = 2
CITRON = 0
VIOLET = 28
class ColorPalette(object):
@staticmethod
def get_color_from_percent_between_0_1(pct, color_pack=COLOR_PACK_LIGHT_GREEN_TO_DARK_P... | 29.206897 | 98 | 0.689492 |
2d36c1af1d7bd19df5eb92c236ad0869a93c61d8 | 5,703 | py | Python | salt/modules/netbsdservice.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 2 | 2017-09-17T21:10:35.000Z | 2019-08-26T03:00:12.000Z | salt/modules/netbsdservice.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/modules/netbsdservice.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 3 | 2021-02-23T08:12:48.000Z | 2021-02-23T08:13:13.000Z | # -*- coding: utf-8 -*-
'''
The service module for NetBSD
'''
# Import python libs
import os
import glob
__func_alias__ = {
'reload_': 'reload'
}
# Define the module's virtual name
__virtualname__ = 'service'
def __virtual__():
'''
Only work on NetBSD
'''
if __grains__['os'] == 'NetBSD' and os.... | 19.802083 | 81 | 0.58969 |
2d36c2c263f79cdf8bf7b17a9f42c705ee10b521 | 5,059 | py | Python | bonneville/modules/gem.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/gem.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/gem.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Manage ruby gems.
'''
# Import python libs
import re
__func_alias__ = {
'list_': 'list'
}
def _gem(command, ruby=None, runas=None):
cmdline = 'gem {command}'.format(command=command)
if __salt__['rvm.is_installed'](runas=runas):
return __salt__['rvm.do'](ruby, cmdline,... | 22.584821 | 78 | 0.572247 |
2d36e8f2324c37d5f4ab2087ca071322bf450df8 | 33 | py | Python | src/uix/separator/__init__.py | Eastern-Skill7173/SharedSnippets | 399c9d61a938788e229bc6e6f6dcd38bf5ad9c0e | [
"MIT"
] | 1 | 2022-03-18T20:29:40.000Z | 2022-03-18T20:29:40.000Z | src/uix/separator/__init__.py | Eastern-Skill7173/SharedSnippets | 399c9d61a938788e229bc6e6f6dcd38bf5ad9c0e | [
"MIT"
] | null | null | null | src/uix/separator/__init__.py | Eastern-Skill7173/SharedSnippets | 399c9d61a938788e229bc6e6f6dcd38bf5ad9c0e | [
"MIT"
] | null | null | null | from .separator import Separator
| 16.5 | 32 | 0.848485 |
2d36ee5abb1dae63e24292fe07fafa184782b70a | 7,410 | py | Python | Hyperparameter_Tuning/Hyperparameter_Tuning_SUPPORT.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 2 | 2022-03-22T13:59:28.000Z | 2022-03-24T07:02:54.000Z | Hyperparameter_Tuning/Hyperparameter_Tuning_SUPPORT.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 12 | 2022-02-17T16:29:31.000Z | 2022-03-29T15:06:42.000Z | Hyperparameter_Tuning/Hyperparameter_Tuning_SUPPORT.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 3 | 2021-11-18T10:13:00.000Z | 2022-03-23T10:25:55.000Z | #%% -------- Import Libraries -------- #
# Standard imports
from webbrowser import GenericBrowser
import numpy as np
import pandas as pd
import torch
# VAE is in other folder as well as opacus adapted library
import sys
sys.path.append("../")
# Opacus support for differential privacy
from opacus.utils.uniform_sampl... | 27.546468 | 122 | 0.692578 |
2d36f10d5ab06550e56e3765026a075a3353db5f | 23,327 | py | Python | katdal/h5datav1.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | katdal/h5datav1.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | katdal/h5datav1.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | ################################################################################
# Copyright (c) 2011-2019, National Research Foundation (Square Kilometre Array)
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy
# of the... | 52.185682 | 120 | 0.648347 |
2d3720c483e3a5e6fff9dcc07ce98430a0595466 | 290 | py | Python | maddpg/multiagent/scenario.py | hogansung/deep-reinforcement-learning | 5170ca42bdfdb16cc5c2b86c61bee304015a6254 | [
"MIT"
] | null | null | null | maddpg/multiagent/scenario.py | hogansung/deep-reinforcement-learning | 5170ca42bdfdb16cc5c2b86c61bee304015a6254 | [
"MIT"
] | null | null | null | maddpg/multiagent/scenario.py | hogansung/deep-reinforcement-learning | 5170ca42bdfdb16cc5c2b86c61bee304015a6254 | [
"MIT"
] | null | null | null | # defines scenario upon which the world is built
class BaseScenario(object):
# create elements of the world
def make_world(self):
raise NotImplementedError()
# create initial conditions of the world
def reset_world(self, world):
raise NotImplementedError()
| 29 | 48 | 0.713793 |
2d374b9d6c760a8cb7145622263aeafea4730cf2 | 18,367 | py | Python | Lib/test/test_faulthandler.py | bendmorris/static-python | 2e0f8c4d7ed5b359dc7d8a75b6fb37e6b6c5c473 | [
"PSF-2.0"
] | 164 | 2015-01-04T07:04:07.000Z | 2022-01-06T03:18:56.000Z | Lib/test/test_faulthandler.py | bendmorris/static-python | 2e0f8c4d7ed5b359dc7d8a75b6fb37e6b6c5c473 | [
"PSF-2.0"
] | 3 | 2015-08-27T07:35:26.000Z | 2016-04-07T16:35:39.000Z | Lib/test/test_faulthandler.py | bendmorris/static-python | 2e0f8c4d7ed5b359dc7d8a75b6fb37e6b6c5c473 | [
"PSF-2.0"
] | 35 | 2015-06-11T05:35:55.000Z | 2022-01-11T19:32:00.000Z | from contextlib import contextmanager
import datetime
import faulthandler
import os
import re
import signal
import subprocess
import sys
from test import support, script_helper
from test.script_helper import assert_python_ok
import tempfile
import unittest
try:
import threading
HAVE_THREADS = True
except Impor... | 30.765494 | 79 | 0.611368 |
2d3790e08e849603211e915a8473e90e1f5d1b2d | 3,708 | py | Python | censusreporter/api/utils.py | sseguku/simplecensusug | 5b456f13a7e551e69252581553ddd89bd2704be8 | [
"MIT"
] | null | null | null | censusreporter/api/utils.py | sseguku/simplecensusug | 5b456f13a7e551e69252581553ddd89bd2704be8 | [
"MIT"
] | null | null | null | censusreporter/api/utils.py | sseguku/simplecensusug | 5b456f13a7e551e69252581553ddd89bd2704be8 | [
"MIT"
] | null | null | null | import requests
import re
from sqlalchemy import create_engine, MetaData, Table
from sqlalchemy.orm import sessionmaker
from .config import (DB_NAME, DB_USER, DB_PASSWORD, WARD_SEARCH_ENDPOINT)
_engine = create_engine("postgresql://%s:%s@localhost/%s"
% (DB_USER, DB_PASSWORD, DB_NAME))
_meta... | 30.146341 | 78 | 0.596009 |
2d37dba622f66d42a941cd0fa536330bcf7643b5 | 26,255 | py | Python | kaplot/devices/pdfdevice.py | maartenbreddels/kaplot | 305026209f8026094d54373e14541f4f039501d5 | [
"MIT"
] | null | null | null | kaplot/devices/pdfdevice.py | maartenbreddels/kaplot | 305026209f8026094d54373e14541f4f039501d5 | [
"MIT"
] | null | null | null | kaplot/devices/pdfdevice.py | maartenbreddels/kaplot | 305026209f8026094d54373e14541f4f039501d5 | [
"MIT"
] | null | null | null | from kaplot.matrix import Matrix
import kaplot.devices.devicebase
import kaplot.utils
import kaplot.vector
import kaplot.cext._kaplot
import numpy
import math
import time
from cStringIO import StringIO
def mulXY(m, xlist, ylist):
xlist = numpy.array(xlist)
ylist = numpy.array(ylist)
return \
m.xx * xlist + m.xy *... | 31.785714 | 140 | 0.666654 |
2d37ef7954c250a144264b70f224172ff0c57c2a | 6,044 | py | Python | code/lib/tosca/tosca_rdcl_graph.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 8 | 2017-03-13T16:34:28.000Z | 2021-11-16T11:35:56.000Z | code/lib/tosca/tosca_rdcl_graph.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | null | null | null | code/lib/tosca/tosca_rdcl_graph.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 3 | 2017-03-28T09:26:40.000Z | 2020-12-08T14:16:12.000Z | #
# Copyright 2017 CNIT - Consorzio Nazionale Interuniversitario per le Telecomunicazioni
#
# 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/LICE... | 44.77037 | 148 | 0.546161 |
2d37f7573587fe929c38798435c09d227c57f4c2 | 2,680 | py | Python | tests/models/validators/v2_1_2/jsd_50b589fd4c7a930a.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_2/jsd_50b589fd4c7a930a.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_2/jsd_50b589fd4c7a930a.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Create Site data model.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including w... | 32.289157 | 78 | 0.595522 |
2d37fd0a3da4427a7e053f8dd21a0010396c93ac | 5,981 | py | Python | JDjangoDemo/plugins/metro_tools/metro_data.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | 3 | 2020-12-28T05:09:02.000Z | 2021-06-23T10:02:03.000Z | JDjangoDemo/plugins/metro_tools/metro_data.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | JDjangoDemo/plugins/metro_tools/metro_data.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | """
2020年02月06号
"""
__all__ = [
'NANJIN_METRO_BASE_INFO',
'CROSS_STATIONS',
'STATION_RELATED_LINES',
'LINE_RELATED_STATIONS',
'LINE_KNOWN_LINES',
]
# 站台基本信息
M_1_STATIONS = (
'八卦洲大桥南站','笆斗山站','燕子矶站','吉祥庵站','晓庄站',
'迈皋桥站','红山动物园站','南京站','新模范马路站','玄武门站',
'鼓楼站','珠江路站','新街口站','张府园站','三山街站',
... | 27.186364 | 138 | 0.482528 |
2d381c38da3640ccc2b777525bf5b6cf267216e9 | 2,882 | py | Python | vision_transformer/timm/models/layers/config.py | sarasarto/RUA-Read-Understand-and-Act | 18ebd921574f74eb1f0e8712cd00939015bf95f0 | [
"MIT"
] | 1 | 2022-03-02T14:13:15.000Z | 2022-03-02T14:13:15.000Z | vision_transformer/timm/models/layers/config.py | GiuseppeCartella/RUA-Read-Understand-and-Act | 18ebd921574f74eb1f0e8712cd00939015bf95f0 | [
"MIT"
] | null | null | null | vision_transformer/timm/models/layers/config.py | GiuseppeCartella/RUA-Read-Understand-and-Act | 18ebd921574f74eb1f0e8712cd00939015bf95f0 | [
"MIT"
] | null | null | null | """ Model / Layer Config singleton state
"""
from typing import Any, Optional
__all__ = [
'is_exportable', 'is_scriptable', 'is_no_jit',
'set_exportable', 'set_scriptable', 'set_no_jit', 'set_layer_config'
]
# Set to True if prefer to have layers with no jit optimization (includes activations)
_NO_JIT = False... | 24.844828 | 102 | 0.653019 |
2d382dec07e5f576406cbd7e51ed8c56f383400d | 1,178 | py | Python | nova/conf/rdp.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-04-28T16:20:38.000Z | 2021-04-25T11:19:03.000Z | nova/conf/rdp.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/conf/rdp.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2020-04-08T20:24:45.000Z | 2020-10-05T19:02:13.000Z | # Copyright 2015 OpenStack Foundation
# 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 requ... | 31 | 78 | 0.67657 |
2d383f9b4f4a95e1519a178e5a441c42ac5b04b0 | 7,053 | py | Python | tests/simtel/test_simtelfile.py | mblnk/pyeventio | 072dbd698f3bcd8e60eff0eeddcf828615b28db8 | [
"MIT"
] | 5 | 2018-12-18T14:30:21.000Z | 2021-02-24T09:41:37.000Z | tests/simtel/test_simtelfile.py | mblnk/pyeventio | 072dbd698f3bcd8e60eff0eeddcf828615b28db8 | [
"MIT"
] | 69 | 2018-12-12T16:17:09.000Z | 2022-03-21T10:44:40.000Z | tests/simtel/test_simtelfile.py | mblnk/pyeventio | 072dbd698f3bcd8e60eff0eeddcf828615b28db8 | [
"MIT"
] | 11 | 2018-12-12T17:45:57.000Z | 2022-02-09T12:41:08.000Z | from pytest import importorskip
from eventio.simtel import SimTelFile
prod2_path = 'tests/resources/gamma_test.simtel.gz'
prod3_path = 'tests/resources/gamma_test_large_truncated.simtel.gz'
prod4_path = 'tests/resources/gamma_20deg_0deg_run102___cta-prod4-sst-1m_desert-2150m-Paranal-sst-1m.simtel.gz'
prod4_astri_path ... | 30.532468 | 123 | 0.588969 |
2d3854ef736cf6c5ddac19ccb3ba02c6dcaadbdb | 378 | py | Python | 2019/5_sunny_with_a_chance_of_asteroids_part_1.py | garciparedes/advent-of-code | 77fcd55546b114f9017146b3079d4a333dd87091 | [
"Apache-2.0"
] | 7 | 2021-06-07T08:27:52.000Z | 2022-01-08T03:14:57.000Z | 2019/5_sunny_with_a_chance_of_asteroids_part_1.py | garciparedes/advent-of-code | 77fcd55546b114f9017146b3079d4a333dd87091 | [
"Apache-2.0"
] | null | null | null | 2019/5_sunny_with_a_chance_of_asteroids_part_1.py | garciparedes/advent-of-code | 77fcd55546b114f9017146b3079d4a333dd87091 | [
"Apache-2.0"
] | 1 | 2020-12-01T18:34:59.000Z | 2020-12-01T18:34:59.000Z | from pathlib import Path
from sys import argv
from intcode import IntCode
def main():
file_path = Path(argv[1])
with file_path.open() as file:
text = file.readline().strip()
program = [int(number) for number in text.split(',')]
machine = IntCode(program, [1])
output = machine.execute()
... | 18 | 57 | 0.640212 |
2d3856c41aaa5332ef05a593003141e2b6615952 | 34,239 | py | Python | statsmodels/iolib/summary.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/iolib/summary.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/iolib/summary.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | from statsmodels.compat.python import range, lrange, lmap, lzip, zip_longest
import numpy as np
from statsmodels.iolib.table import SimpleTable
from statsmodels.iolib.tableformatting import (gen_fmt, fmt_2,
fmt_params, fmt_base, fmt_2cols)
#from statsmodels.iolib.summary2... | 35.225309 | 103 | 0.549432 |
2d3858383fe3a6450a8c54906f2e5257d2aa4606 | 15,005 | py | Python | examples/platoon/platoon_functions.py | ucbtrans/sumo-project | a1232cfa6705d79313733ae118777a276536b088 | [
"BSD-2-Clause"
] | 5 | 2017-10-26T23:18:45.000Z | 2021-12-13T08:48:54.000Z | utils/platoon_functions.py | ucbtrans/sumo-project | a1232cfa6705d79313733ae118777a276536b088 | [
"BSD-2-Clause"
] | null | null | null | utils/platoon_functions.py | ucbtrans/sumo-project | a1232cfa6705d79313733ae118777a276536b088 | [
"BSD-2-Clause"
] | 3 | 2016-06-14T19:33:22.000Z | 2021-03-23T03:41:31.000Z | import os
import sys
import optparse
import subprocess
import random
import traci
import settings
import pdb
########## Global variables used in runner file ################################
# settings.platoonedvehicles = []
# settings.platoons = []
# settings.platoonleaderspeed = []
# Note - whenever trying to modify ... | 43.746356 | 172 | 0.651849 |
2d3863988a8fcb0654a55e4de4f140fc482917eb | 577 | py | Python | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetProjectReadmeResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetProjectReadmeResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetProjectReadmeResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ModeldbGetProjectReadmeResponse(BaseType):
def __init__(self, readme_text=None):
required = {
"readme_text": False,
}
self.readme_text = readme_text
for k, v in required.items():
if self[k] is ... | 24.041667 | 62 | 0.672444 |
2d3873aa94190456c4fb88bbb65f6c0257f0a469 | 5,165 | py | Python | empower/core/pnfdev.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | 2 | 2020-02-28T15:54:01.000Z | 2020-11-24T08:45:11.000Z | empower/core/pnfdev.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | null | null | null | empower/core/pnfdev.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | 1 | 2020-03-02T16:41:20.000Z | 2020-03-02T16:41:20.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2016 Roberto Riggio
#
# 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 applicabl... | 26.487179 | 76 | 0.615102 |
2d389a7ba1baeab39a77c85454f0ee1ebde4e579 | 4,542 | py | Python | examples/mlp.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | examples/mlp.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | examples/mlp.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | """Example of an MLP in Myia.
Myia is still a work in progress, and this example may change in the future.
"""
import time
from dataclasses import dataclass
import numpy
from numpy.random import RandomState
from myia import ArithmeticData, myia, value_and_grad
from myia.api import to_device
from myia.debug import ... | 23.412371 | 77 | 0.627257 |
2d38b1c2f14f2e0dc0f34c78a0c0b3c656b07b79 | 776 | py | Python | src/gedml/core/losses/classifier_based_loss/arcface_loss.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | 25 | 2021-09-06T13:26:02.000Z | 2022-01-06T13:25:24.000Z | src/gedml/core/losses/classifier_based_loss/arcface_loss.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | 1 | 2021-09-09T08:29:29.000Z | 2021-09-13T15:05:59.000Z | src/gedml/core/losses/classifier_based_loss/arcface_loss.py | wangck20/GeDML | 1f76ac2094d7b88be7fd4eb6145e5586e547b9ca | [
"MIT"
] | 2 | 2021-09-07T08:44:41.000Z | 2021-09-09T08:31:55.000Z | import torch
import numpy as np
from .large_margin_softmax_loss import LargeMarginSoftmaxLoss
class ArcFaceLoss(LargeMarginSoftmaxLoss):
"""
paper: `ArcFace: Additive Angular Margin Loss for Deep Face Recognition <https://openaccess.thecvf.com/content_CVPR_2019/html/Deng_ArcFace_Additive_Angular_Margin_Loss_... | 43.111111 | 221 | 0.764175 |
2d38cdde264676c6ed0d4a36e13fb2e56f3627b4 | 3,961 | py | Python | lib/Window.py | brennerm/EvolutronicLife | 5f8bef5dea8f64fb3e76889d9c600962400558cd | [
"MIT"
] | 4 | 2015-12-12T03:11:23.000Z | 2018-02-18T18:39:44.000Z | lib/Window.py | brennerm/EvolutronicLife | 5f8bef5dea8f64fb3e76889d9c600962400558cd | [
"MIT"
] | null | null | null | lib/Window.py | brennerm/EvolutronicLife | 5f8bef5dea8f64fb3e76889d9c600962400558cd | [
"MIT"
] | 2 | 2016-06-12T20:30:16.000Z | 2018-05-12T15:32:19.000Z | # -*- coding: utf-8 -*-
import curses
from time import time
import globals as global_vars
class Window(object):
def __init__(self, height, width, pos_y, pos_x):
self._curses_window = curses.newwin(height, width, pos_y, pos_x)
class InfoWindow(Window):
def __init__(self, height, width, pos_y, pos_x)... | 31.943548 | 109 | 0.574855 |
2d38dc47dfe6021fd2bd3547b99e0421a4453a03 | 1,892 | py | Python | gym_drake/envs/pendulum_rbt_env.py | HarvardAgileRoboticsLab/gym-drake | 9c513a3de3e879872203543a0df52729a33f887c | [
"BSD-3-Clause"
] | 5 | 2018-12-07T18:23:43.000Z | 2021-02-25T03:11:20.000Z | gym_drake/envs/pendulum_rbt_env.py | HarvardAgileRoboticsLab/gym-drake | 9c513a3de3e879872203543a0df52729a33f887c | [
"BSD-3-Clause"
] | 1 | 2021-04-05T23:21:13.000Z | 2021-04-06T21:35:10.000Z | gym_drake/envs/pendulum_rbt_env.py | HarvardAgileRoboticsLab/gym-drake | 9c513a3de3e879872203543a0df52729a33f887c | [
"BSD-3-Clause"
] | 3 | 2018-09-07T13:11:29.000Z | 2021-03-29T12:54:50.000Z | import numpy as np
from gym_drake.envs import rigid_body_tree_env
from pydrake.all import FloatingBaseType
from utils import wrap_angle
class PendulumRBTEnv(rigid_body_tree_env.RigidBodyTreeEnv):
use_shaped_reward = True
reset_random = True
def __init__(self):
# Call super-class constructor with t... | 31.533333 | 86 | 0.589852 |
2d390cc08b36960120a9e1e8dc7cd91de1e50d2e | 2,300 | py | Python | ufora/BackendGateway/ComputedValue/ComputedValue_test.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/BackendGateway/ComputedValue/ComputedValue_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/BackendGateway/ComputedValue/ComputedValue_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora 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 i... | 38.983051 | 105 | 0.766522 |
2d3922dee063687a8a5979b15191070d77d9d25c | 1,083 | py | Python | optimize_images_x/watch.py | victordomingos/optimize-images-x | c21d23fc77392b2947c91ccb470defd591f3d7b4 | [
"MIT"
] | 14 | 2021-04-15T19:26:07.000Z | 2022-01-08T15:23:05.000Z | optimize_images_x/watch.py | victordomingos/optimize-images-x | c21d23fc77392b2947c91ccb470defd591f3d7b4 | [
"MIT"
] | 2 | 2021-05-29T14:30:48.000Z | 2021-06-14T20:55:07.000Z | optimize_images_x/watch.py | victordomingos/optimize-images-x | c21d23fc77392b2947c91ccb470defd591f3d7b4 | [
"MIT"
] | null | null | null | import os
import time
from typing import List
from watchdog.events import FileSystemEventHandler
def is_image(filepath):
if not os.path.isfile(filepath):
return False
else:
extension = os.path.splitext(filepath)[1][1:]
return extension.lower() in ['jpg', 'jpeg', 'png']
class Optimiz... | 26.414634 | 83 | 0.630656 |
2d3927f6c172d8df4c94e7014543f61f120088cc | 28,552 | py | Python | pyneat/core.py | YuiYukihira/Pyneat | 6a1778a66c3dad5041ba5f3903355a6991c34a48 | [
"MIT"
] | 3 | 2019-04-21T08:39:59.000Z | 2020-12-22T05:59:14.000Z | pyneat/core.py | YuiYukihira/Pyneat | 6a1778a66c3dad5041ba5f3903355a6991c34a48 | [
"MIT"
] | null | null | null | pyneat/core.py | YuiYukihira/Pyneat | 6a1778a66c3dad5041ba5f3903355a6991c34a48 | [
"MIT"
] | 1 | 2020-03-09T12:05:03.000Z | 2020-03-09T12:05:03.000Z | import logging
import logging.handlers
import random
from uuid import UUID
from typing import Dict, List, Union, Tuple
from dataclasses import dataclass
import multiprocessing
import dill
import tensorflow as tf
import os
import gc
import traceback
## Define types
GRAPH_SHAPE = Dict[str, Dict[str, Union[str, List[Tup... | 39.600555 | 146 | 0.546056 |
2d3943b5ded599fa889a071d28276de21de7490a | 766 | py | Python | app/models/milestone_story_events.py | theLaborInVain/kdm-manager-api | fa8744c9b8a739262d1b94900648254cc69d16e1 | [
"MIT"
] | 2 | 2020-03-04T13:43:45.000Z | 2020-11-03T20:34:21.000Z | app/models/milestone_story_events.py | theLaborInVain/kdm-manager-api | fa8744c9b8a739262d1b94900648254cc69d16e1 | [
"MIT"
] | 64 | 2019-07-19T19:19:50.000Z | 2022-03-03T21:19:28.000Z | app/models/milestone_story_events.py | theLaborInVain/kdm-manager-api | fa8744c9b8a739262d1b94900648254cc69d16e1 | [
"MIT"
] | null | null | null | """
This is a pseudo model that initializes only the _milestone_story_events
dictionary from the campaigns asset dict (/app/assets/campaigns.py).
This should probably be refactored so that the milestone story events are
in their own file.
"""
from app.assets import campaigns
from app import models
... | 26.413793 | 77 | 0.708877 |
2d3968e94f902aecbde8ca2b4488720ca4edddf9 | 1,739 | py | Python | sdk/tables/azure-data-tables/tests/test_table_service_stats.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/tables/azure-data-tables/tests/test_table_service_stats.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/tables/azure-data-tables/tests/test_table_service_stats.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from devto... | 45.763158 | 135 | 0.666475 |
2d396c2609290a9ba9bd3999aacba7f738020c91 | 5,177 | py | Python | data/insert_pubchemlite_annotations.py | aalto-ics-kepaco/lcms2struct_exp | 5baa3edd0e58d24f739efd4086031f6fbdba6ad9 | [
"MIT"
] | null | null | null | data/insert_pubchemlite_annotations.py | aalto-ics-kepaco/lcms2struct_exp | 5baa3edd0e58d24f739efd4086031f6fbdba6ad9 | [
"MIT"
] | null | null | null | data/insert_pubchemlite_annotations.py | aalto-ics-kepaco/lcms2struct_exp | 5baa3edd0e58d24f739efd4086031f6fbdba6ad9 | [
"MIT"
] | null | null | null | ####
#
# The MIT License (MIT)
#
# Copyright 2022 Eric Bach <eric.bach@aalto.fi>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights... | 39.219697 | 118 | 0.588565 |
2d3978ebc269e1fb1e61a6d10620672f39f0b539 | 4,976 | py | Python | app.py | mahlonduke/sqlalchemy-challenge | e8c6a2c6fbffb0f157240bc8b8c4c4f4a26e0c44 | [
"ADSL"
] | null | null | null | app.py | mahlonduke/sqlalchemy-challenge | e8c6a2c6fbffb0f157240bc8b8c4c4f4a26e0c44 | [
"ADSL"
] | null | null | null | app.py | mahlonduke/sqlalchemy-challenge | e8c6a2c6fbffb0f157240bc8b8c4c4f4a26e0c44 | [
"ADSL"
] | null | null | null | import numpy as np
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
from flask import Flask, jsonify
#################################################
# Database Setup
#################################################
eng... | 28.597701 | 137 | 0.625603 |
2d3983a9e787c3932eeeec8016a5c86a63c399b4 | 4,259 | py | Python | gwd/datasets/evaluation.py | kazakh-shai/kaggle-global-wheat-detection | b26295ea257f73089f1a067b70b4a7ee638f6b83 | [
"Apache-2.0"
] | 136 | 2020-08-24T08:18:16.000Z | 2022-03-31T13:45:12.000Z | gwd/datasets/evaluation.py | kazakh-shai/kaggle-global-wheat-detection | b26295ea257f73089f1a067b70b4a7ee638f6b83 | [
"Apache-2.0"
] | 5 | 2020-10-07T08:44:36.000Z | 2021-12-17T06:00:57.000Z | gwd/datasets/evaluation.py | kazakh-shai/kaggle-global-wheat-detection | b26295ea257f73089f1a067b70b4a7ee638f6b83 | [
"Apache-2.0"
] | 28 | 2020-08-24T11:07:07.000Z | 2022-01-01T13:07:54.000Z | from multiprocessing import Pool
import numpy as np
from mmcv.utils import print_log
from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps
from mmdet.core.evaluation.mean_ap import get_cls_results
def calc_tpfpfn(det_bboxes, gt_bboxes, iou_thr=0.5):
"""Check if detected bboxes are true positive or false... | 36.401709 | 112 | 0.602019 |
2d3998dc359d872c7d8035144879fddbd17eb89a | 3,246 | py | Python | simple_3dviz/behaviours/misc.py | nazcaspider/simple-3dviz | 3c40007259a1f754311623f74d24b06f7b98be14 | [
"MIT"
] | 66 | 2020-03-31T14:33:20.000Z | 2022-03-25T15:48:06.000Z | simple_3dviz/behaviours/misc.py | nazcaspider/simple-3dviz | 3c40007259a1f754311623f74d24b06f7b98be14 | [
"MIT"
] | 6 | 2020-04-05T18:20:10.000Z | 2021-12-17T19:54:54.000Z | simple_3dviz/behaviours/misc.py | nazcaspider/simple-3dviz | 3c40007259a1f754311623f74d24b06f7b98be14 | [
"MIT"
] | 9 | 2020-04-03T14:31:28.000Z | 2022-03-15T19:16:41.000Z |
import numpy as np
from . import Behaviour
class LightToCamera(Behaviour):
"""Move the light to the same position as the camera so that the objects
are always lit."""
def __init__(self, offset=[0, 0, 0]):
self._offset = offset
def behave(self, params):
newpos = params.scene.camera_p... | 29.779817 | 76 | 0.592113 |
2d399bd8eb7dfe1ff96e1d879eb36bb74384a7ce | 9,270 | py | Python | fanficfare/adapters/adapter_ficwadcom.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | 1 | 2019-06-13T11:20:33.000Z | 2019-06-13T11:20:33.000Z | fanficfare/adapters/adapter_ficwadcom.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_ficwadcom.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2011 Fanficdownloader team, 2015 FanFicFare 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
#
# Un... | 39.615385 | 244 | 0.573031 |
2d39a1dfd1b97112ddac323b3cbbf560c0c7c998 | 1,689 | py | Python | experiments/express/ssh.py | znewman01/spectrum-impl | 389b463afa6463bc4a5de6884157730e9cf0b59e | [
"MIT"
] | 2 | 2021-03-12T12:31:34.000Z | 2022-02-03T01:06:58.000Z | experiments/express/ssh.py | znewman01/spectrum-impl | 389b463afa6463bc4a5de6884157730e9cf0b59e | [
"MIT"
] | null | null | null | experiments/express/ssh.py | znewman01/spectrum-impl | 389b463afa6463bc4a5de6884157730e9cf0b59e | [
"MIT"
] | 1 | 2021-07-20T20:21:39.000Z | 2021-07-20T20:21:39.000Z | #!/usr/bin/env python
# pylint: disable=duplicate-code
import argparse
import sys
import json
import tempfile
from pathlib import Path
from subprocess import check_output, check_call, CalledProcessError
def main():
parser = argparse.ArgumentParser(description="SSH into a Terraform machine.")
parser.add_argum... | 24.478261 | 81 | 0.539964 |
2d39bfd26c536f703834cbed5a5e216dbbb140d9 | 334 | py | Python | utils.py | mangushev/aligntts | a7ac4faede770b3f6eb7a18addceb20a13e80007 | [
"Apache-2.0",
"MIT"
] | 2 | 2020-12-23T09:52:17.000Z | 2021-06-20T12:54:07.000Z | utils.py | codybai/aligntts | fbae8e8ccd6ce08d71e0725dfea3891b61ab9c5d | [
"Apache-2.0",
"MIT"
] | 2 | 2021-01-12T03:19:00.000Z | 2021-08-23T15:23:42.000Z | utils.py | codybai/aligntts | fbae8e8ccd6ce08d71e0725dfea3891b61ab9c5d | [
"Apache-2.0",
"MIT"
] | 3 | 2020-12-09T04:32:24.000Z | 2021-12-04T16:14:45.000Z |
alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' ','\"','\'',';','.',',','-','(',')',':','!','?']
char_to_ix = { ch:i for i,ch in enumerate(alphabet) }
ix_to_char = { i:ch for i,ch in enumerate(alphabet) }
nrof_labels = len(alphabet)
nrof_classes ... | 37.111111 | 166 | 0.464072 |
2d39cabbec91b9a1924fb5c292ec3bdbfa3f0974 | 24,571 | py | Python | sonnet/python/modules/batch_norm_v2.py | lukas/sonnet | d7f936954d93660475bc4bdd02394ccfb34d76dd | [
"Apache-2.0"
] | 3 | 2019-07-31T12:36:26.000Z | 2020-12-16T14:37:19.000Z | sonnet/python/modules/batch_norm_v2.py | priyansh19/sonnet | b3ff3081de040776aa3dae536cd5fae483cb4997 | [
"Apache-2.0"
] | null | null | null | sonnet/python/modules/batch_norm_v2.py | priyansh19/sonnet | b3ff3081de040776aa3dae536cd5fae483cb4997 | [
"Apache-2.0"
] | 3 | 2019-07-29T08:55:20.000Z | 2019-07-30T06:36:56.000Z | # Copyright 2017 The Sonnet Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 38.572998 | 80 | 0.692687 |
2d39d6eaf45d873dee28bdd09d461ed600fed025 | 36,506 | py | Python | projects/cats/tests/05.py | suvix/cs61a-fa19 | 53a0ecf29d13fc13113894255b6422eba0f82832 | [
"MIT"
] | null | null | null | projects/cats/tests/05.py | suvix/cs61a-fa19 | 53a0ecf29d13fc13113894255b6422eba0f82832 | [
"MIT"
] | null | null | null | projects/cats/tests/05.py | suvix/cs61a-fa19 | 53a0ecf29d13fc13113894255b6422eba0f82832 | [
"MIT"
] | null | null | null | test = {
'name': 'Problem 5',
'points': 2,
'suites': [
{
'cases': [
{
'code': r"""
>>> abs_diff = lambda w1, w2, limit: abs(len(w2) - len(w1))
>>> autocorrect("cul", ["culture", "cult", "cultivate"], abs_diff, 10)
'cult'
>>> autocorrect("cul", ["... | 37.137335 | 256 | 0.45598 |
2d39d71cca3b994f1fce15d4b6c3ae0e5be674c7 | 8,380 | py | Python | lib/bme280.py | ks-tec/Hydroponic | d9347f82698841d85c0a45908e8671b36c50ffce | [
"MIT"
] | 1 | 2021-05-27T13:32:45.000Z | 2021-05-27T13:32:45.000Z | lib/bme280.py | ks-tec/Hydroponic | d9347f82698841d85c0a45908e8671b36c50ffce | [
"MIT"
] | null | null | null | lib/bme280.py | ks-tec/Hydroponic | d9347f82698841d85c0a45908e8671b36c50ffce | [
"MIT"
] | null | null | null | # MicroPython BME280 driver, I2C interface
#
# Copyright (c) 2020 ks-tec
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to dealin the Software without restriction, including without limitation
# the rights to use... | 36.277056 | 79 | 0.559905 |
2d3a28d169778beb02f9afd3526f258e2634e00d | 14,999 | py | Python | test/rules/src/https_everywhere_checker/check_rules.py | davorb/https-everywhere | 6398c000d3475801bff08aa4387d8f01cf78c244 | [
"MIT"
] | null | null | null | test/rules/src/https_everywhere_checker/check_rules.py | davorb/https-everywhere | 6398c000d3475801bff08aa4387d8f01cf78c244 | [
"MIT"
] | null | null | null | test/rules/src/https_everywhere_checker/check_rules.py | davorb/https-everywhere | 6398c000d3475801bff08aa4387d8f01cf78c244 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import binascii
import collections
import argparse
import json
import glob
import hashlib
import logging
import os
import Queue
import re
import sys
import threading
import time
from ConfigParser import SafeConfigParser
from lxml import etree
import http_client
import metrics
from rules impor... | 33.934389 | 103 | 0.720848 |
2d3a2d18d94fc0888a38c0a3ea7724bdee45f9c5 | 4,913 | py | Python | submit_scripts/fuse_gridded/setup_GBM_runs.py | BrisClimate/flood-cascade | 660c29275a87785153d0f107ed23104fcbcbddee | [
"MIT"
] | null | null | null | submit_scripts/fuse_gridded/setup_GBM_runs.py | BrisClimate/flood-cascade | 660c29275a87785153d0f107ed23104fcbcbddee | [
"MIT"
] | null | null | null | submit_scripts/fuse_gridded/setup_GBM_runs.py | BrisClimate/flood-cascade | 660c29275a87785153d0f107ed23104fcbcbddee | [
"MIT"
] | 3 | 2020-11-08T16:01:47.000Z | 2021-01-13T17:13:32.000Z | # script to setup and submit FUSE gridded runs
# Peter Uhe Aug 21 2019
#
# First call script to produce different calibration files (scripts in fuse_param_maps folder)
# Unless running with default parameter sets, then set calib_choices = ['rundef']
import os,glob,subprocess,sys,shutil
import datetime
import queue
im... | 37.792308 | 659 | 0.67474 |
2d3a49bd8078e948c021232463e6f8defcda1e14 | 53,917 | py | Python | Barbican/Server/barbican-stable-mitaka/barbican/barbican/plugin/dogtag.py | cloud-security-research/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 36 | 2017-11-08T23:36:35.000Z | 2022-03-20T16:01:55.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/plugin/dogtag.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 2 | 2017-11-17T03:19:17.000Z | 2018-07-04T03:37:36.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/plugin/dogtag.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 12 | 2017-11-13T03:20:40.000Z | 2021-07-16T03:26:41.000Z | # Copyright (c) 2014 Red Hat, 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 writ... | 39.997774 | 79 | 0.625628 |
2d3a52f09b0022f23c2ae295abdcfdd0cd3a1376 | 2,798 | py | Python | frontends/PyCDE/test/syntactic_sugar.py | albertchen-sifive/circt | 478e42e07ef029335adfe7b4db864c60e5d4920a | [
"Apache-2.0"
] | null | null | null | frontends/PyCDE/test/syntactic_sugar.py | albertchen-sifive/circt | 478e42e07ef029335adfe7b4db864c60e5d4920a | [
"Apache-2.0"
] | null | null | null | frontends/PyCDE/test/syntactic_sugar.py | albertchen-sifive/circt | 478e42e07ef029335adfe7b4db864c60e5d4920a | [
"Apache-2.0"
] | null | null | null | # RUN: %PYTHON% %s | FileCheck %s
from pycde import (Output, Input, module, generator, obj_to_value, types, dim,
System, no_connect)
from pycde.module import externmodule
@module
class Taps:
taps = Output(dim(8, 3))
@generator
def build(ports):
ports.taps = [203, 100, 23]
@externmodul... | 30.413043 | 156 | 0.619728 |
2d3a559dc279830eeeb7bacca3f28a0e9abae625 | 2,348 | py | Python | porE/results/results_PSD/new_values_jan2020_adaptive_stepsize/plot_PSD.py | kaitrepte/porE | 1d11f7aca6aa0859f9363c42d8a2c4b3de0f2eec | [
"Apache-2.0"
] | 2 | 2020-08-06T09:35:50.000Z | 2021-04-12T14:45:45.000Z | porE/results/results_PSD/new_values_jan2020_adaptive_stepsize/plot_PSD.py | kaitrepte/porE | 1d11f7aca6aa0859f9363c42d8a2c4b3de0f2eec | [
"Apache-2.0"
] | 9 | 2020-08-04T16:14:21.000Z | 2020-12-19T10:16:37.000Z | porE/results/results_PSD/new_values_jan2020_adaptive_stepsize/plot_PSD.py | kaitrepte/porE | 1d11f7aca6aa0859f9363c42d8a2c4b3de0f2eec | [
"Apache-2.0"
] | 2 | 2019-09-27T21:53:49.000Z | 2021-05-07T09:17:39.000Z | import os
import matplotlib.pyplot as plt
import numpy as np
from scipy.interpolate import make_interp_spline, BSpline
structs = ['DUT8Ni_open_exp', 'UiO66', 'UiO67', 'IRMOF10', 'MOF5', 'HKUST1_open_Cu_sites','MOF210'] # UiO-68
tags = [r'DUT-8(Ni)$_{\mathrm{o}}$', 'UiO-66', 'UiO-67','IRMOF-10','MOF-5... | 34.028986 | 122 | 0.551959 |
2d3a67f963e74212dde979e25bb17b4b694ed670 | 1,759 | py | Python | flexget/plugins/filter/limit_new.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | 1 | 2018-05-02T21:14:50.000Z | 2018-05-02T21:14:50.000Z | flexget/plugins/filter/limit_new.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/filter/limit_new.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import logging
from flexget import plugin
from flexget.event import event
log = logging.getLogger('limit_new')
class FilterLimitNew(object):
"""
Limit number of new ... | 29.316667 | 110 | 0.637294 |
2d3b10a02fba0b97d4a44feaa9a0597a63041ae2 | 9,388 | py | Python | src/do_regression/get_data.py | kashev/reddit-reliability | 6d92486019b9264d2b7bfd51912ef257fc6088ae | [
"MIT"
] | null | null | null | src/do_regression/get_data.py | kashev/reddit-reliability | 6d92486019b9264d2b7bfd51912ef257fc6088ae | [
"MIT"
] | null | null | null | src/do_regression/get_data.py | kashev/reddit-reliability | 6d92486019b9264d2b7bfd51912ef257fc6088ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# reddit-reliability
# http://scikit-learn.org/stable/modules/tree.html#classification
from __future__ import division
from pymongo import MongoClient
import numpy as np
from feature_vector import FeatureVector
def main():
mongo_client = MongoClient('mongodb://cs5... | 38.47541 | 78 | 0.62729 |
2d3b516ce242086bc676389e42737f857633bd03 | 925 | py | Python | beamlines/gui-examples/trivial-server/server.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | beamlines/gui-examples/trivial-server/server.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | 2 | 2018-09-19T06:49:03.000Z | 2019-06-28T10:47:37.000Z | beamlines/gui-examples/trivial-server/server.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | """
Simple server which listens to macros commands over zmq, and executes
them in the current session.
"""
import zmq
from contrast.environment import runCommand, macro, env
from contrast.motors import DummyMotor
from contrast.detectors import DummyDetector
from contrast.recorders import StreamRecorder
import json
PO... | 25.694444 | 70 | 0.681081 |
2d3b5369c6846e62b0591103e64eef76360bbbce | 138 | py | Python | examples/sum.py | quynhanh-ngx/pytago | de976ad8d85702ae665e97978bc4a75d282c857f | [
"MIT"
] | 206 | 2021-06-24T16:16:13.000Z | 2022-03-31T07:44:17.000Z | examples/sum.py | quynhanh-ngx/pytago | de976ad8d85702ae665e97978bc4a75d282c857f | [
"MIT"
] | 13 | 2021-06-24T17:51:36.000Z | 2022-02-23T10:07:17.000Z | examples/sum.py | quynhanh-ngx/pytago | de976ad8d85702ae665e97978bc4a75d282c857f | [
"MIT"
] | 14 | 2021-06-26T02:19:45.000Z | 2022-03-30T03:02:49.000Z | def main():
print(sum([1, 2, 3]))
print(sum([1.5, 2.6, 3.7]))
print(sum([1j, 2j, 3j]))
if __name__ == '__main__':
main()
| 17.25 | 31 | 0.492754 |
2d3b57173280078a01efeca1beb40363396d48d2 | 7,569 | py | Python | extensions/admin.py | Ikusaba-san/Tuxedo | b96f8d0e9275b5167bb29813f5142cdaa2a32609 | [
"MIT"
] | null | null | null | extensions/admin.py | Ikusaba-san/Tuxedo | b96f8d0e9275b5167bb29813f5142cdaa2a32609 | [
"MIT"
] | null | null | null | extensions/admin.py | Ikusaba-san/Tuxedo | b96f8d0e9275b5167bb29813f5142cdaa2a32609 | [
"MIT"
] | 1 | 2019-06-30T05:56:48.000Z | 2019-06-30T05:56:48.000Z | import discord
import textwrap
import time
from discord.ext import commands
from utils import permissions
from utils import randomness
import aiohttp
import asyncio
import subprocess
import rethinkdb as r
class Admin:
def __init__(self, bot):
self.bot = bot
self.conn = bot.conn
self._eval =... | 40.260638 | 185 | 0.536134 |
2d3b6d1f44fdb0697dbabb7990b103d8c4be338c | 4,576 | py | Python | python/src/test/protobuf/controller_test.py | nowelium/protobuf-socket-rpc | 2546a261dccbc19f90fa3f1ea325c4032e610d49 | [
"MIT"
] | 3 | 2015-09-05T06:29:55.000Z | 2017-02-15T13:59:39.000Z | python/src/test/protobuf/controller_test.py | nowelium/protobuf-socket-rpc | 2546a261dccbc19f90fa3f1ea325c4032e610d49 | [
"MIT"
] | null | null | null | python/src/test/protobuf/controller_test.py | nowelium/protobuf-socket-rpc | 2546a261dccbc19f90fa3f1ea325c4032e610d49 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2009 Las Cumbres Observatory (www.lcogt.net)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | 33.15942 | 79 | 0.658217 |
2d3b8b75c9c4fa219a3d150c83d8c7d0a728b4f9 | 5,066 | py | Python | extract_z.py | sarmilaupadhyaya/MultiSpeaker-TTS-V1 | 4b6351f74145f254521e4946e10fa646d6ec197c | [
"MIT"
] | 1 | 2022-03-14T13:06:48.000Z | 2022-03-14T13:06:48.000Z | extract_z.py | sarmilaupadhyaya/MultiSpeaker-TTS-V1 | 4b6351f74145f254521e4946e10fa646d6ec197c | [
"MIT"
] | null | null | null | extract_z.py | sarmilaupadhyaya/MultiSpeaker-TTS-V1 | 4b6351f74145f254521e4946e10fa646d6ec197c | [
"MIT"
] | null | null | null | # Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# ME... | 46.054545 | 198 | 0.666798 |
2d3ba36eaded4172d64c20da487541a0eac9093a | 1,361 | py | Python | menuhin/serializers.py | kezabelle/django-menuhin | b9c4111eed04e241c29ca8ec95c8a3ffeaac48da | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | menuhin/serializers.py | kezabelle/django-menuhin | b9c4111eed04e241c29ca8ec95c8a3ffeaac48da | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | menuhin/serializers.py | kezabelle/django-menuhin | b9c4111eed04e241c29ca8ec95c8a3ffeaac48da | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from rest_framework import serializers
from django.contrib.sites.models import Site
from .models import MenuItem
class MenuItemSerializer(serializers.HyperlinkedModelSerializer):
object_url = serializers.SerializerMethodField('get_object_url')
path = serializers.CharField(source='uri')
depth = ser... | 37.805556 | 93 | 0.6723 |
2d3bce972c3529ebd550f1b0faec426df9ad7b19 | 768 | py | Python | tests/configs/config_ds003392.py | mathias-sm/mne-bids-pipeline | 55a8d7c7ca5a254ff7b9af84b818b164692667d5 | [
"BSD-3-Clause"
] | 31 | 2019-01-30T11:33:23.000Z | 2021-02-19T19:30:50.000Z | tests/configs/config_ds003392.py | mathias-sm/mne-bids-pipeline | 55a8d7c7ca5a254ff7b9af84b818b164692667d5 | [
"BSD-3-Clause"
] | 207 | 2019-01-29T16:31:26.000Z | 2021-03-26T13:28:26.000Z | tests/configs/config_ds003392.py | mathias-sm/mne-bids-pipeline | 55a8d7c7ca5a254ff7b9af84b818b164692667d5 | [
"BSD-3-Clause"
] | 26 | 2019-01-29T18:05:11.000Z | 2021-03-17T08:46:52.000Z | """
hMT+ Localizer
"""
study_name = 'localizer'
bids_root = '~/mne_data/ds003392'
deriv_root = '~/mne_data/derivatives/mne-bids-pipeline/ds003392'
subjects = ['01']
task = 'localizer'
find_flat_channels_meg = True
find_noisy_channels_meg = True
use_maxwell_filter = True
ch_types = ['meg']
l_freq = 1.
h_freq = 40.
re... | 18.285714 | 64 | 0.733073 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.