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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794979a2b775d77bfb824d6a65b037ac2bfa8d00 | 12,174 | py | Python | read_ohara.py | jfblanchard/optical-tools | 25ce0f2238e1c22b6694d00d359e4243a33db30b | [
"Apache-2.0"
] | null | null | null | read_ohara.py | jfblanchard/optical-tools | 25ce0f2238e1c22b6694d00d359e4243a33db30b | [
"Apache-2.0"
] | null | null | null | read_ohara.py | jfblanchard/optical-tools | 25ce0f2238e1c22b6694d00d359e4243a33db30b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Parse the ohara downloaded catalog (csv format), and create a new cleaned up
data frame with glass type and sellmeier coeffs for all glass types. Output
in json format.
Ohara download version 20171130
Credits: Hover text snippet found here:
https://stackoverflow.com/questions/7908636/
p... | 27.295964 | 95 | 0.616231 |
7949a3f6da293abdd85512209242bae76ab4d816 | 13,672 | py | Python | tensorflow/contrib/eager/python/evaluator.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/eager/python/evaluator.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/eager/python/evaluator.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2017 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.654155 | 96 | 0.684391 |
7949b1469ec730f420fdf776fbf81d61e17bfd7a | 2,880 | py | Python | apps/hashblock_cli/scripts/ucum_to_assets.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | 5 | 2018-04-05T07:02:04.000Z | 2018-07-10T09:39:03.000Z | apps/hashblock_cli/scripts/ucum_to_assets.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | 89 | 2018-03-11T14:46:07.000Z | 2018-09-07T14:50:42.000Z | apps/hashblock_cli/scripts/ucum_to_assets.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright 2018 Frank V. Castellucci and Arthur Greef
#
# 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
#
# ... | 30.967742 | 80 | 0.587847 |
7949b28ad48d7dda88914ce7fdd42833993026c7 | 2,442 | py | Python | emailnetwork/tests/test_extract.py | supertypeai/emailnetwork | 65f8f72301ef40c35fa6e36a8589d27ab961243a | [
"MIT"
] | 1 | 2021-01-29T04:26:36.000Z | 2021-01-29T04:26:36.000Z | emailnetwork/tests/test_extract.py | supertypeai/emailnetwork | 65f8f72301ef40c35fa6e36a8589d27ab961243a | [
"MIT"
] | null | null | null | emailnetwork/tests/test_extract.py | supertypeai/emailnetwork | 65f8f72301ef40c35fa6e36a8589d27ab961243a | [
"MIT"
] | 1 | 2022-01-21T09:03:50.000Z | 2022-01-21T09:03:50.000Z | import os
import datetime
from unittest import TestCase
from emailnetwork.extract import MBoxReader, extract_meta
from emailnetwork.emails import EmailAddress, EmailMeta
MBOX_PATH = f'{os.path.dirname(__file__)}/test.mbox'
class TestExtract(TestCase):
def setUp(self):
self.reader = MBoxReader(MBOX_PATH)
... | 37 | 84 | 0.677314 |
7949e6c6d66e40b8dbb8c03e6b01e4be940f4e2a | 19,120 | py | Python | qface/idl/domain.py | Gagi2k/qface | 5069fdc5f406495590a83a799ecbe30009436f1d | [
"MIT"
] | 38 | 2016-11-30T10:36:56.000Z | 2022-02-19T14:58:00.000Z | qface/idl/domain.py | Gagi2k/qface | 5069fdc5f406495590a83a799ecbe30009436f1d | [
"MIT"
] | 70 | 2016-11-30T09:12:58.000Z | 2022-01-27T12:52:41.000Z | qface/idl/domain.py | Gagi2k/qface | 5069fdc5f406495590a83a799ecbe30009436f1d | [
"MIT"
] | 23 | 2016-12-07T15:23:15.000Z | 2021-06-07T08:32:40.000Z | # Copyright (c) Pelagicore AB 2016
'''The domian module contains an object hierachy which resembles the
QFace grammar as a domain model. It is created from the QFace and the main
input for the code generation templates.
.. note:: Changes on this API will result into broken templates
.. code-block:: text
System
... | 31.344262 | 91 | 0.59864 |
7949e7ea48d128d1f4f5d097e15dbcc77c909a21 | 42,413 | py | Python | tests/test_exh.py | pmacosta/putil | 416cea52df8221981727e25d133e9b4e3f464798 | [
"MIT"
] | 6 | 2015-12-15T04:09:08.000Z | 2020-02-21T01:40:57.000Z | tests/test_exh.py | pmacosta/putil | 416cea52df8221981727e25d133e9b4e3f464798 | [
"MIT"
] | null | null | null | tests/test_exh.py | pmacosta/putil | 416cea52df8221981727e25d133e9b4e3f464798 | [
"MIT"
] | 2 | 2016-01-21T23:29:17.000Z | 2020-02-21T01:41:05.000Z |
# test_exh.py
# Copyright (c) 2013-2016 Pablo Acosta-Serafini
# See LICENSE for details
# pylint: disable=C0103,C0111,C0302,C0413,E0611,F0401,R0201,R0204,R0903,R0912
# pylint: disable=R0914,R0915,W0108,W0122,W0123,W0212,W0612,W0631,W0640
# Standard library imports
from __future__ import print_function
import collecti... | 40.3549 | 79 | 0.544833 |
794a3821ed07f9a0ae80af1ccb9585c1c71b9ce9 | 7,288 | py | Python | populate_database.py | Jabors/financial-data-damodaran | 0b3e94429faed352a6ee3c7524e7fbde79668703 | [
"Unlicense",
"MIT"
] | 8 | 2018-01-06T08:33:08.000Z | 2021-11-08T12:19:18.000Z | populate_database.py | Jabors/financial-data-damodaran | 0b3e94429faed352a6ee3c7524e7fbde79668703 | [
"Unlicense",
"MIT"
] | null | null | null | populate_database.py | Jabors/financial-data-damodaran | 0b3e94429faed352a6ee3c7524e7fbde79668703 | [
"Unlicense",
"MIT"
] | 3 | 2020-05-28T19:02:31.000Z | 2022-02-22T20:08:33.000Z | import sys
import csv
import xlrd
from pymongo import MongoClient
from os import listdir
from os.path import isfile, join
import config
def populate_currencies(db):
sheet = xlrd.open_workbook(config.currency_file).sheet_by_index(0)
currency={}
currency['countries']=[sheet.cell(4,0).value]
currency[... | 32.977376 | 118 | 0.700741 |
794a3a46a91e33875e346027db2c7b987abc7d59 | 2,818 | py | Python | appengine/predator/analysis/test/occurrence_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/predator/analysis/test/occurrence_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/predator/analysis/test/occurrence_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 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.
from analysis.analysis_testcase import AnalysisTestCase
from analysis.occurrence import Occurrence
from analysis.occurrence import DefaultOccurrenceRanking
f... | 33.152941 | 78 | 0.660752 |
794a48d80b9373f10e21af0300b5377a017308f3 | 4,126 | py | Python | src/apps/metas/forms.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | src/apps/metas/forms.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | 48 | 2017-04-21T17:35:23.000Z | 2020-08-29T04:19:35.000Z | src/apps/metas/forms.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | # coding: utf-8
# app: metas
# module: forms
# fecha: miércoles, 23 de mayo de 2018 - 10:22
# description: Formularios de las Metas SPEN
# pylint: disable=W0613,R0201,R0903
from crispy_forms.layout import Layout, Submit, Div, Field
from crispy_forms.helper import FormHelper
from django import forms
... | 31.257576 | 68 | 0.517208 |
794a570eaf15ca26efc54c173d2eeaed507a0476 | 12,395 | py | Python | cvap/module/encoder/clip_head.py | zhaoyanpeng/lvamodel | 93b06ff43ae6a76323cecea4c10cf457945c2711 | [
"MIT"
] | 6 | 2021-12-20T06:01:56.000Z | 2022-03-25T06:44:50.000Z | cvap/module/encoder/clip_head.py | zhaoyanpeng/vipant | 93b06ff43ae6a76323cecea4c10cf457945c2711 | [
"MIT"
] | null | null | null | cvap/module/encoder/clip_head.py | zhaoyanpeng/vipant | 93b06ff43ae6a76323cecea4c10cf457945c2711 | [
"MIT"
] | null | null | null | from fvcore.common.registry import Registry
from omegaconf.listconfig import ListConfig
from collections import OrderedDict
import re
import math
import copy
import threading
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
from .. import (
build_encoder_module, interp_clip_vp_... | 42.303754 | 136 | 0.572166 |
794a6d8d058179be1920c957cdaf70dff8908c0c | 5,182 | py | Python | training.py | alifkurniawan/tesis | 6330dba32f5dc12785e956875c94d83344d788a8 | [
"MIT"
] | null | null | null | training.py | alifkurniawan/tesis | 6330dba32f5dc12785e956875c94d83344d788a8 | [
"MIT"
] | 3 | 2022-01-13T03:13:37.000Z | 2022-03-12T00:48:18.000Z | training.py | alifkurniawan/tesis | 6330dba32f5dc12785e956875c94d83344d788a8 | [
"MIT"
] | null | null | null | """
This file is part of the OpenProtein project.
For license information, please see the LICENSE file in the root directory.
"""
import json
import time
import numpy as np
import requests
import torch.optim as optim
from util import set_experiment_id, write_out, write_model_to_disk, write_result_summary
def train_... | 42.47541 | 118 | 0.642609 |
794a6daa4fa6bedfe3855453fb2f7ae6a3432899 | 61 | py | Python | tests/__init__.py | Pandelytics/pandelytics | 5950d4a95595dadf076ac9270be0dbcdcfa59a1a | [
"Apache-2.0"
] | null | null | null | tests/__init__.py | Pandelytics/pandelytics | 5950d4a95595dadf076ac9270be0dbcdcfa59a1a | [
"Apache-2.0"
] | 11 | 2020-04-02T22:36:36.000Z | 2020-09-27T11:19:23.000Z | tests/__init__.py | Pandelytics/pandelytics | 5950d4a95595dadf076ac9270be0dbcdcfa59a1a | [
"Apache-2.0"
] | 1 | 2020-10-07T15:48:06.000Z | 2020-10-07T15:48:06.000Z | from pandelytics import __version__
import pandelytics.search | 30.5 | 35 | 0.901639 |
794a7d5f7d8127455f9a24184e3e051180a0f513 | 523 | py | Python | tests/test_user.py | Kevson102/Pitches | a1c41b83edf687135edf35dc068696ea6b7bf824 | [
"MIT"
] | null | null | null | tests/test_user.py | Kevson102/Pitches | a1c41b83edf687135edf35dc068696ea6b7bf824 | [
"MIT"
] | null | null | null | tests/test_user.py | Kevson102/Pitches | a1c41b83edf687135edf35dc068696ea6b7bf824 | [
"MIT"
] | null | null | null | import unittest
from app.models import User
class UserModelTest(unittest.TestCase):
def setUp(self):
self.new_user = User(password = 'phoenix')
def test_password_setter(self):
self.assertTrue(self.new_user.pass_secure is not None)
def test_no_access_password(self):
with self.assertRaises(A... | 26.15 | 61 | 0.730402 |
794a7f09cfc93e4df37cd204ea0953d64e12ec53 | 89 | py | Python | openapi_client_generator/info.py | ppentchev/openapi-client-generator | a058af4ec28a1e53809273a662fb8cba0157695e | [
"MIT"
] | 6 | 2021-01-16T21:36:43.000Z | 2022-01-24T10:21:14.000Z | openapi_client_generator/info.py | ppentchev/openapi-client-generator | a058af4ec28a1e53809273a662fb8cba0157695e | [
"MIT"
] | 11 | 2021-01-17T00:05:44.000Z | 2022-01-23T16:13:56.000Z | openapi_client_generator/info.py | ppentchev/openapi-client-generator | a058af4ec28a1e53809273a662fb8cba0157695e | [
"MIT"
] | 2 | 2021-11-06T00:07:34.000Z | 2022-01-14T01:35:06.000Z | DISTRIBUTION_NAME = 'openapi-client-generator'
PACKAGE_NAME = 'openapi_client_generator'
| 29.666667 | 46 | 0.842697 |
794a9c5e226966d45d3659d4c22161da565ae1be | 2,703 | py | Python | pytorch_lightning/plugins/training_type/ddp2.py | lemairecarl/pytorch-lightning | 85304d4672a9ed24a16f7f5b2abaa34148ab86f4 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/plugins/training_type/ddp2.py | lemairecarl/pytorch-lightning | 85304d4672a9ed24a16f7f5b2abaa34148ab86f4 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/plugins/training_type/ddp2.py | lemairecarl/pytorch-lightning | 85304d4672a9ed24a16f7f5b2abaa34148ab86f4 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 35.565789 | 114 | 0.715131 |
794abb083955bc5d92be1f7fc8a92b93ac3b8745 | 3,994 | py | Python | src/python/dxpy/templating/templates/python/parallelized/src/code.py | yesimon/dx-toolkit | c13a16d570a55bde7778d6db9268f5c3fca81d0f | [
"Apache-2.0"
] | null | null | null | src/python/dxpy/templating/templates/python/parallelized/src/code.py | yesimon/dx-toolkit | c13a16d570a55bde7778d6db9268f5c3fca81d0f | [
"Apache-2.0"
] | null | null | null | src/python/dxpy/templating/templates/python/parallelized/src/code.py | yesimon/dx-toolkit | c13a16d570a55bde7778d6db9268f5c3fca81d0f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# DX_APP_WIZARD_NAME DX_APP_WIZARD_VERSION
# Generated by dx-app-wizard.
#
# Parallelized execution pattern: Your app will generate multiple jobs
# to perform some computation in parallel, followed by a final
# "postprocess" stage that will perform any additional computations as
# necessary.
#
# S... | 40.755102 | 125 | 0.710566 |
794ac918c0f31aced8b153bf76a35063d319b331 | 2,448 | py | Python | maro/rl/models/torch/mlp_representation.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/rl/models/torch/mlp_representation.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | maro/rl/models/torch/mlp_representation.py | zhawan/maro | d8c98deea4296cdcb90efd1fb59bc571cec3a2ef | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import torch
import torch.nn as nn
class MLPRepresentation(nn.Module):
"""
Deep Q network.
Choose multi-layer full connection with dropout as the basic network architecture.
"""
def __init__(self, name: str, input_dim: ... | 33.534247 | 105 | 0.602124 |
794ad26db5e0be67bb9b35936c8558a8df02c219 | 4,752 | py | Python | sandbox/optimal_args_hashbits.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | sandbox/optimal_args_hashbits.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | sandbox/optimal_args_hashbits.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | #! /usr/bin/env python
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) 2015, Michigan State University.
# Copyright (C) 2015, The Regents of the University of California.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided... | 37.417323 | 79 | 0.700547 |
794af79dde66fe9fd5d5c968f0c767073d4014a9 | 11,265 | py | Python | armi/tests/test_mpiFeatures.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | armi/tests/test_mpiFeatures.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | armi/tests/test_mpiFeatures.py | albeanth/armi | 3755ffd2fcd1f7b6c557ef3e3f36126706a84c70 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 37.178218 | 84 | 0.663826 |
794b0b711ed618c2169ef3d94b0beddbfce9a024 | 1,349 | py | Python | retrobiocat_web/app/biocatdb/model_forms.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 9 | 2020-12-01T16:33:02.000Z | 2022-01-19T20:02:42.000Z | retrobiocat_web/app/biocatdb/model_forms.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 4 | 2020-10-02T14:38:32.000Z | 2021-08-02T09:23:58.000Z | retrobiocat_web/app/biocatdb/model_forms.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 6 | 2021-01-14T07:48:36.000Z | 2022-03-20T17:34:27.000Z | from flask_wtf import FlaskForm
from wtforms import StringField, SelectField, TextAreaField, SubmitField, BooleanField, DateField
from wtforms.validators import DataRequired, NumberRange, ValidationError, Length
from retrobiocat_web.mongo.models.biocatdb_models import EnzymeType, Sequence, Paper
def is_doi_taken(form,... | 40.878788 | 97 | 0.733877 |
794b3df4330f110bedc644486fd0b30108cde44b | 3,761 | py | Python | allennlp/training/callbacks/console_logger.py | jbrry/allennlp | d906175d953bebcc177567ec0157220c3bd1b9ad | [
"Apache-2.0"
] | 2 | 2022-01-02T12:15:21.000Z | 2022-01-02T12:15:23.000Z | allennlp/training/callbacks/console_logger.py | jbrry/allennlp | d906175d953bebcc177567ec0157220c3bd1b9ad | [
"Apache-2.0"
] | 56 | 2020-03-14T21:10:07.000Z | 2022-03-28T13:04:57.000Z | allennlp/training/callbacks/console_logger.py | jbrry/allennlp | d906175d953bebcc177567ec0157220c3bd1b9ad | [
"Apache-2.0"
] | 3 | 2020-09-22T17:35:53.000Z | 2022-02-08T01:03:03.000Z | import logging
from typing import List, Dict, Any, Optional, TYPE_CHECKING
import torch
from allennlp.training.callbacks.callback import TrainerCallback
from allennlp.training.util import get_train_and_validation_metrics
from allennlp.data import TensorDict
if TYPE_CHECKING:
from allennlp.training.trainer import... | 36.514563 | 100 | 0.604626 |
794b4389e17316c11d0e18171f2944fa249ba181 | 464 | py | Python | xos/synchronizers/ec2/deleters/site_deployment_deleter.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/synchronizers/ec2/deleters/site_deployment_deleter.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | 5 | 2020-06-05T17:47:15.000Z | 2021-09-23T23:21:27.000Z | xos/synchronizers/ec2/deleters/site_deployment_deleter.py | pan2za/xos | c2a4da2ccaa12360b2718be303b247866aefdfe6 | [
"Apache-2.0"
] | null | null | null | from core.models import Site, SiteDeployment
from synchronizers.base.deleter import Deleter
class SiteDeploymentDeleter(Deleter):
model='SiteDeployment'
def call(self, pk):
site_deployment = SiteDeployment.objects.get(pk=pk)
if site_deployment.tenant_id:
driver = self.driver.admin_... | 35.692308 | 89 | 0.741379 |
794b791cba4f53e6c50dabbb3ba818fa62a00905 | 8,037 | py | Python | nixui/graphics/generic_widgets.py | yater/nix-gui | e7d1137ff85ef6bfe33ccc7cd8eee944475d4217 | [
"MIT"
] | null | null | null | nixui/graphics/generic_widgets.py | yater/nix-gui | e7d1137ff85ef6bfe33ccc7cd8eee944475d4217 | [
"MIT"
] | null | null | null | nixui/graphics/generic_widgets.py | yater/nix-gui | e7d1137ff85ef6bfe33ccc7cd8eee944475d4217 | [
"MIT"
] | null | null | null | from PyQt5 import QtWidgets, QtCore, QtGui
from nixui.graphics import richtext, icon
class ReplacableWidget(QtWidgets.QStackedWidget):
def __init__(self, starting_widget=None):
super().__init__()
starting_widget = starting_widget or QtWidgets.QLabel()
self.current_widget = starting_widge... | 32.148 | 132 | 0.6541 |
794bc5b542a5c31360ed970052c6f0a46f96b251 | 20,691 | py | Python | gammapy/data/observations.py | isu-veritas/gammapy | 715b041d7d3925bd51109dc9534634263a2f2d12 | [
"BSD-3-Clause"
] | null | null | null | gammapy/data/observations.py | isu-veritas/gammapy | 715b041d7d3925bd51109dc9534634263a2f2d12 | [
"BSD-3-Clause"
] | null | null | null | gammapy/data/observations.py | isu-veritas/gammapy | 715b041d7d3925bd51109dc9534634263a2f2d12 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import collections.abc
import copy
import logging
import numpy as np
from astropy.coordinates import SkyCoord
from astropy.time import Time
from astropy.units import Quantity
import astropy.units as u
from gammapy.utils.fits import LazyFitsData, earth_loca... | 32.07907 | 142 | 0.601421 |
794bed8686d76852ee47f464690d9a920b98e8a1 | 7,680 | py | Python | SVHN/SVHN_recognizer_single_digit.py | leoagneau/Bib_Racer | 83c90bb3177ca13a78bee3ff0e800fbf0dd8484e | [
"MIT"
] | 2 | 2020-04-26T23:13:51.000Z | 2020-04-27T14:40:13.000Z | SVHN/SVHN_recognizer_single_digit.py | leoagneau/Bib_Racer | 83c90bb3177ca13a78bee3ff0e800fbf0dd8484e | [
"MIT"
] | null | null | null | SVHN/SVHN_recognizer_single_digit.py | leoagneau/Bib_Racer | 83c90bb3177ca13a78bee3ff0e800fbf0dd8484e | [
"MIT"
] | null | null | null | ############################
### Prepare SVHN dataset ###
############################
import os
import numpy as np
import h5py
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
from torch.utils.data import DataLoader
import torchvision
from torchvision import datasets... | 34.909091 | 142 | 0.584635 |
794c1295f0f472c58a59bd795b7006f3b501c958 | 962 | py | Python | nova/api/openstack/compute/legacy_v2/contrib/extended_hypervisors.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 7 | 2015-09-22T11:27:16.000Z | 2015-11-02T12:33:46.000Z | nova/api/openstack/compute/legacy_v2/contrib/extended_hypervisors.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 9 | 2015-05-20T11:20:17.000Z | 2017-07-27T08:21:33.000Z | nova/api/openstack/compute/legacy_v2/contrib/extended_hypervisors.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 13 | 2015-05-05T09:34:04.000Z | 2017-11-08T02:03:46.000Z | # Copyright 2014 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 37 | 78 | 0.716216 |
794c1518a44a42f65a06a6acb01aa91706931f99 | 651 | py | Python | tests/services/alertrules/test_file_type_mismatch.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | tests/services/alertrules/test_file_type_mismatch.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | tests/services/alertrules/test_file_type_mismatch.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | from py42.services.alertrules import FileTypeMismatchService
class TestFileTypeMisMatchClient(object):
def test_get_by_id_posts_to_correct_endpoint_for_type_mismatch_rule_type(
self, mock_connection
):
alert_rule_client = FileTypeMismatchService(mock_connection, u"tenant-id")
alert_rul... | 40.6875 | 86 | 0.703533 |
794c659c6b6c83d2837dde1f5ae9417a2d1e1c1e | 348 | py | Python | heuristics/conditions/named_conditions/__init__.py | TeamJumpstart/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 10 | 2021-04-18T17:54:02.000Z | 2021-07-26T19:58:41.000Z | heuristics/conditions/named_conditions/__init__.py | DiddiZ/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 1 | 2021-04-21T15:13:41.000Z | 2021-04-21T15:13:41.000Z | heuristics/conditions/named_conditions/__init__.py | DiddiZ/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 1 | 2021-04-20T09:42:50.000Z | 2021-04-20T09:42:50.000Z | from heuristics.conditions.named_conditions.endgame_condition import EndgameCondition
from heuristics.conditions.named_conditions.lategame_condition import LategameCondition
from heuristics.conditions.named_conditions.midgame_condition import MidgameCondition
__all__ = [
"EndgameCondition",
"MidgameCondition",... | 34.8 | 87 | 0.847701 |
794c678b121352bf3da9f74bb60572b9e9083ce3 | 1,327 | py | Python | tests/getl/common/test_delta_table.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 8 | 2020-06-10T09:00:17.000Z | 2021-06-07T18:02:19.000Z | tests/getl/common/test_delta_table.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 5 | 2020-07-03T10:39:25.000Z | 2021-08-30T14:52:47.000Z | tests/getl/common/test_delta_table.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 1 | 2020-05-28T07:53:48.000Z | 2020-05-28T07:53:48.000Z | """Testing the module delta tables."""
from pyspark.sql import types as T
from getl.common.delta_table import DeltaTable
def create_dataframe(spark_session, data):
schema = T.StructType(
[
T.StructField("file_path", T.StringType(), True),
T.StructField("file_desc", T.StringType(),... | 27.645833 | 73 | 0.617935 |
794c7bb3a409ad7d7411aed94ba2bee120b724cd | 18,469 | py | Python | userbot/plugins/animazioni1.py | Kazutettoh/strafattinoh-bot | e8ab44b6e720c8133fd43695355fabf20d37fe1c | [
"MIT"
] | null | null | null | userbot/plugins/animazioni1.py | Kazutettoh/strafattinoh-bot | e8ab44b6e720c8133fd43695355fabf20d37fe1c | [
"MIT"
] | null | null | null | userbot/plugins/animazioni1.py | Kazutettoh/strafattinoh-bot | e8ab44b6e720c8133fd43695355fabf20d37fe1c | [
"MIT"
] | null | null | null | """
Commands:
.hypno
.plane
.pula
.sega
.solarsystem
.sorpresa
"""
import os
import sys
import asyncio
from telethon import events
from userbot import CMD_HELP
from userbot import ALIVE_NAME
from userbot.utils import admin_cmd
from platform import uname
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_... | 47.114796 | 120 | 0.200119 |
794c90c8c169cabde9aed5afa454f0aef4f237d4 | 4,568 | py | Python | aioboto3/session.py | VeevaLabs/aioboto3 | e760c336d4ef8c09df43e6bf919daf88ed1ef382 | [
"Apache-2.0"
] | null | null | null | aioboto3/session.py | VeevaLabs/aioboto3 | e760c336d4ef8c09df43e6bf919daf88ed1ef382 | [
"Apache-2.0"
] | null | null | null | aioboto3/session.py | VeevaLabs/aioboto3 | e760c336d4ef8c09df43e6bf919daf88ed1ef382 | [
"Apache-2.0"
] | 1 | 2022-02-17T08:17:21.000Z | 2022-02-17T08:17:21.000Z | # -*- coding: utf-8 -*-
"""
This class essentially overrides the boto3 session init, passing in
an async botocore session
"""
import aiobotocore.session
import boto3.session
import boto3.resources.base
import boto3.utils
from aioboto3.resources import AIOBoto3ResourceFactory
class Session(boto3.session.Session):
... | 38.066667 | 76 | 0.652802 |
794c97b618476d2dc555fbd17578ab10a79ece13 | 57,041 | py | Python | openmc/settings.py | SamPUG/openmc | 70c19dfef4991c5f89161a87868f109c47efc76d | [
"MIT"
] | 1 | 2020-11-19T14:46:10.000Z | 2020-11-19T14:46:10.000Z | openmc/settings.py | SamPUG/openmc | 70c19dfef4991c5f89161a87868f109c47efc76d | [
"MIT"
] | 2 | 2020-02-24T15:13:15.000Z | 2020-03-17T18:59:22.000Z | openmc/settings.py | SamPUG/openmc | 70c19dfef4991c5f89161a87868f109c47efc76d | [
"MIT"
] | null | null | null | from collections.abc import Iterable, MutableSequence, Mapping
from pathlib import Path
from numbers import Real, Integral
import warnings
from xml.etree import ElementTree as ET
import sys
import numpy as np
from openmc._xml import clean_indentation, get_text
import openmc.checkvalue as cv
from openmc import VolumeC... | 39.833101 | 89 | 0.641276 |
794cba4204a3d086698d49316c5e2ae372f8a10f | 5,606 | py | Python | Cogs/Emoji.py | MrAngelDo6pa/MedBotS | 89e19d831507e20d0898114502967b2ad8ecf957 | [
"MIT"
] | 2 | 2021-09-28T10:40:10.000Z | 2021-11-07T14:49:07.000Z | Cogs/Emoji.py | ddoskid/lol12 | 35c097bbebeca3043a939b902b07474473344a3c | [
"MIT"
] | null | null | null | Cogs/Emoji.py | ddoskid/lol12 | 35c097bbebeca3043a939b902b07474473344a3c | [
"MIT"
] | null | null | null | import discord, os
from discord.ext import commands
from Cogs import GetImage, Utils
def setup(bot):
bot.add_cog(Emoji(bot))
class Emoji(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.max_emojis = 10
global Utils, DisplayName
Utils = self.bot.get_cog("Utils")
... | 46.330579 | 173 | 0.570817 |
794cc6867141386e74c194e2df1578c20276c526 | 7,641 | py | Python | vgio/duke3d/tests/test_map.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2017-11-30T22:13:50.000Z | 2019-12-19T17:56:40.000Z | vgio/duke3d/tests/test_map.py | joshuaskelly/vgio | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2019-08-11T05:07:26.000Z | 2020-12-30T16:07:04.000Z | vgio/duke3d/tests/test_map.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 4 | 2018-06-24T14:04:36.000Z | 2019-05-14T06:01:51.000Z | import unittest
from vgio.duke3d.tests.basecase import TestCase
from vgio.duke3d import map
class TestMapReadWrite(TestCase):
def test_check_file_type(self):
self.assertFalse(map.is_mapfile('./test_data/test.art'))
def test_sector(self):
s0 = map.Sector(
wall_pointer=1,
... | 46.591463 | 112 | 0.647297 |
794cd9454e55e94d3a51f4e63792c7ce9d0bd264 | 271 | py | Python | app/__init__.py | AdamKobi/s3uploader | 25266604ecfa4cced02f88a3cf063acfcf20ca93 | [
"MIT"
] | null | null | null | app/__init__.py | AdamKobi/s3uploader | 25266604ecfa4cced02f88a3cf063acfcf20ca93 | [
"MIT"
] | null | null | null | app/__init__.py | AdamKobi/s3uploader | 25266604ecfa4cced02f88a3cf063acfcf20ca93 | [
"MIT"
] | null | null | null | #!/usr/bin/python2
# Author: Adam Kobi <adamkobi12@gmail.com>
from .utils import *
logger = init_logging('uploader')
cfg = init_config()
if cfg['debug']:
logger.setLevel(logging.DEBUG)
logger.debug("Configuration - '{}'".format(cfg))
logger.info("Initiated")
| 19.357143 | 52 | 0.693727 |
794ce26032d5715f901627df5781d455ed1df27a | 5,291 | py | Python | DPM/src/DPM.py | OSADP/PMA | 2dd81f55ee6e15eff4462506560faea44ea49a0e | [
"Apache-2.0"
] | null | null | null | DPM/src/DPM.py | OSADP/PMA | 2dd81f55ee6e15eff4462506560faea44ea49a0e | [
"Apache-2.0"
] | null | null | null | DPM/src/DPM.py | OSADP/PMA | 2dd81f55ee6e15eff4462506560faea44ea49a0e | [
"Apache-2.0"
] | 1 | 2020-02-02T18:10:59.000Z | 2020-02-02T18:10:59.000Z | """
The purpose of the prototype DMA Performance Measurement application is to
measures mode-independent trip-based traveler mobility and system productivity
by taking trip or trajectory based vehicle input and aggregating that
information into system wide performance measures. The DMA Performance
Measurement appl... | 32.262195 | 85 | 0.686449 |
794ce9358c0ca450d09eb08800b010a91bd25452 | 1,302 | py | Python | bandwidth/webrtc/exceptions/error_exception.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 5 | 2020-11-04T14:29:37.000Z | 2022-02-23T20:33:07.000Z | bandwidth/webrtc/exceptions/error_exception.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 3 | 2021-07-23T18:48:48.000Z | 2022-03-15T14:59:07.000Z | bandwidth/webrtc/exceptions/error_exception.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 8 | 2020-04-14T09:22:53.000Z | 2022-03-11T10:46:06.000Z | # -*- coding: utf-8 -*-
"""
bandwidth
This file was automatically generated by APIMATIC v3.0 (
https://www.apimatic.io ).
"""
from bandwidth.api_helper import APIHelper
import bandwidth.exceptions.api_exception
class ErrorException(bandwidth.exceptions.api_exception.APIException):
def __init__(s... | 32.55 | 89 | 0.646697 |
794d0935d418bc64e08a73e6441521e398790f74 | 1,240 | py | Python | Python/StationX/1. Python Basics/5functions.py | aguswake1/Courses_and_stuff | 841e2a8316c976488c3e40866c336dcbdb57cce2 | [
"Apache-2.0"
] | null | null | null | Python/StationX/1. Python Basics/5functions.py | aguswake1/Courses_and_stuff | 841e2a8316c976488c3e40866c336dcbdb57cce2 | [
"Apache-2.0"
] | null | null | null | Python/StationX/1. Python Basics/5functions.py | aguswake1/Courses_and_stuff | 841e2a8316c976488c3e40866c336dcbdb57cce2 | [
"Apache-2.0"
] | null | null | null | #Functions DRY = Don't Repeat Yourself
"""
def say_hi(name = 'Dean', nickname = "puppy"): # Default value
#Doc string, function says hi ¿what does this function do or why does it exist?
print("hi {}! {}".format(name, nickname))
say_hi()
say_hi("Sam", "moose")
help(say_hi) # type q to exit the help screen
#... | 27.555556 | 153 | 0.649194 |
794d1659c3149283d507df6f36c3a4dd468bc07d | 1,525 | py | Python | analyzer/migrations/0001_initial.py | awwong1/semscrape | 7e7184a35d6cc96bad9a2e64ab7211b20df4dad6 | [
"Apache-2.0"
] | null | null | null | analyzer/migrations/0001_initial.py | awwong1/semscrape | 7e7184a35d6cc96bad9a2e64ab7211b20df4dad6 | [
"Apache-2.0"
] | null | null | null | analyzer/migrations/0001_initial.py | awwong1/semscrape | 7e7184a35d6cc96bad9a2e64ab7211b20df4dad6 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.3 on 2020-11-06 19:19
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
("crawler", "0004_rssentry_dl_html"),
]
operati... | 29.901961 | 87 | 0.443934 |
794d185553b96ff1311ceba62539896445d54115 | 28,290 | py | Python | salt/cloud/clouds/proxmox.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/proxmox.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | 1 | 2015-09-02T12:49:48.000Z | 2015-09-02T19:22:58.000Z | salt/cloud/clouds/proxmox.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Proxmox Cloud Module
======================
.. versionadded:: 2014.7.0
The Proxmox cloud module is used to control access to cloud providers using
the Proxmox system (KVM / OpenVZ).
Set up the cloud configuration at ``/etc/salt/cloud.providers`` or
``/etc/salt/cloud.providers.d/proxmox.c... | 29.841772 | 107 | 0.596783 |
794d1ea78efbba4cd5017f22273c660e0c444f0b | 11,321 | py | Python | src/onevision/cv/imgproc/filtering/filter.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/cv/imgproc/filtering/filter.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/cv/imgproc/filtering/filter.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import annotations
import torch
import torch.nn.functional as F
from torch import Tensor
from onevision.cv.imgproc.filtering.kernels import normalize_kernel2d
__all__ = [
"filter2d",
"filter2d_separable",
"filter3d",
]
# MARK: - Fu... | 35.712934 | 88 | 0.514177 |
794d25035da68882bb0e87718b5181168167842e | 21,726 | py | Python | docker/third-party/nnUNet/nnunet/network_architecture/generic_UNet.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | docker/third-party/nnUNet/nnunet/network_architecture/generic_UNet.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | docker/third-party/nnUNet/nnunet/network_architecture/generic_UNet.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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://w... | 46.324094 | 180 | 0.626715 |
794d3c082b095d0e80de3985176595571316a9aa | 2,636 | py | Python | setup.py | Syslog777/psak | da9fd58a2e90adf8882019a04ddbdc2eede872cd | [
"BSD-3-Clause"
] | 28 | 2017-12-12T12:16:13.000Z | 2022-02-23T04:34:35.000Z | setup.py | Syslog777/psak | da9fd58a2e90adf8882019a04ddbdc2eede872cd | [
"BSD-3-Clause"
] | 7 | 2017-12-12T11:53:20.000Z | 2020-01-25T10:13:40.000Z | setup.py | Syslog777/psak | da9fd58a2e90adf8882019a04ddbdc2eede872cd | [
"BSD-3-Clause"
] | 10 | 2018-01-02T20:30:07.000Z | 2020-05-06T20:26:08.000Z | """
Copyright (c) 2017, Syslog777
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and... | 37.126761 | 81 | 0.72003 |
794db15560c8ef600c23007274a1ef06f3eff191 | 3,172 | py | Python | statey/hooks.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | 4 | 2021-02-16T19:34:38.000Z | 2022-01-31T16:44:14.000Z | statey/hooks.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | statey/hooks.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | from typing import Optional
import pluggy
from statey import NS
hookspec = pluggy.HookspecMarker(NS)
hookimpl = pluggy.HookimplMarker(NS)
def create_plugin_manager() -> pluggy.PluginManager:
"""
Factory function to create a plugin manager w/ the default namespace
"""
return pluggy.PluginManager(N... | 25.788618 | 86 | 0.70681 |
794dbd8fd6bd42e6b27c901deb0aafa877641475 | 584 | py | Python | blousebrothers/confs/management/commands/clean_conf_images.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | blousebrothers/confs/management/commands/clean_conf_images.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | blousebrothers/confs/management/commands/clean_conf_images.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
from blousebrothers.confs.models import Conference
class Command(BaseCommand):
help = 'Check conference images given his conference slug'
def add_arguments(self, parser):
# This is an optional argument
parser.add_argument('slug', nargs='+', ty... | 34.352941 | 62 | 0.666096 |
794ddb3b3ae984b8b94aedaf22a470aaf6098a63 | 1,512 | py | Python | appengine_module/gae_ts_mon/instrument_endpoint.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 74 | 2015-04-01T02:35:15.000Z | 2021-12-17T22:10:56.000Z | appengine_module/gae_ts_mon/instrument_endpoint.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 123 | 2015-04-01T04:02:57.000Z | 2022-03-02T12:49:55.000Z | appengine_module/gae_ts_mon/instrument_endpoint.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 32 | 2015-04-03T01:40:47.000Z | 2021-11-13T15:20:13.000Z | # Copyright 2019 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.
import time
import functools
# Not all apps enable endpoints. If the import fails, the app will not
# use @instrument_endpoint() decorator, so it is safe to... | 28.528302 | 79 | 0.671958 |
794df72d630acfdfb201ad1b487ef4d0a99599a6 | 1,021 | py | Python | wargame/designpatterns/pythonic_woodelf.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | 1 | 2020-12-01T20:30:27.000Z | 2020-12-01T20:30:27.000Z | wargame/designpatterns/pythonic_woodelf.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | wargame/designpatterns/pythonic_woodelf.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | """pythonic_woodelf
This is one of the different GameUnits that are used in the desing patterns
examples. But, differently than the others, this unit represents a
third-party class that has an incompatible interface.
:copyright: 2020, Jean Tardelli
:license: The MIT license (MIT). See LICENSE file for further detai... | 30.939394 | 76 | 0.669931 |
794e0d4504b8b81638ca4fffa8f5630e42bc53a9 | 5,042 | py | Python | python/hostconfig/machines/alberto.py | AvciRecep/chaste_2019 | 1d46cdac647820d5c5030f8a9ea3a1019f6651c1 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-04-05T12:11:54.000Z | 2020-04-05T12:11:54.000Z | python/hostconfig/machines/alberto.py | AvciRecep/chaste_2019 | 1d46cdac647820d5c5030f8a9ea3a1019f6651c1 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | python/hostconfig/machines/alberto.py | AvciRecep/chaste_2019 | 1d46cdac647820d5c5030f8a9ea3a1019f6651c1 | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2020-04-05T14:26:13.000Z | 2021-03-09T08:18:17.000Z | # Configuration
"""Copyright (c) 2005-2019, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source ... | 37.909774 | 101 | 0.692781 |
794e163f3b2a7bd7df34b5370d68695cfedd93cd | 1,560 | py | Python | python/setup.py | yasushi-saito/wslink | 25c7d3b2f6da25b100bc69efa4e06b1defe22ca1 | [
"BSD-3-Clause"
] | null | null | null | python/setup.py | yasushi-saito/wslink | 25c7d3b2f6da25b100bc69efa4e06b1defe22ca1 | [
"BSD-3-Clause"
] | null | null | null | python/setup.py | yasushi-saito/wslink | 25c7d3b2f6da25b100bc69efa4e06b1defe22ca1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
# import shutil
import sys
# import itertools
from setuptools import setup, find_packages
# from setuptools.command.install import install
# from distutils.dir_util import copy_tree
readme = ""
with open("README.rst") as f:
readme = f.read()
s... | 31.2 | 142 | 0.64359 |
794e2abf5a24b34430ae8b54c3049bd20f1ea8b1 | 22,152 | py | Python | salt/modules/win_update.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/modules/win_update.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/modules/win_update.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Module for running windows updates.
:depends: - win32com
- win32con
- win32api
- pywintypes
.. versionadded: (Helium)
'''
# Import Python libs
import logging
try:
import win32com.client
import pythoncom
HAS_DEPENDENCIES = True
except ImportError:
... | 36.494234 | 155 | 0.619628 |
794e3018387494cb970c47ef0cdd929c7b8e2cb4 | 304 | py | Python | tests/test_mantle/logic/mothball/reduceand2.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 14 | 2017-10-08T09:16:10.000Z | 2021-11-27T19:12:24.000Z | tests/test_mantle/logic/mothball/reduceand2.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 7 | 2018-04-12T21:33:49.000Z | 2018-08-21T22:14:20.000Z | tests/test_mantle/logic/mothball/reduceand2.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 3 | 2018-07-24T04:55:02.000Z | 2019-12-30T08:12:39.000Z | from magma import wire, compile, EndCircuit
from mantle import And
from loam.boards.icestick import IceStick
icestick = IceStick()
for i in range(2):
icestick.J1[i].input().on()
icestick.D5.on()
main = icestick.main()
and2 = And(2)
and2(main.J1[0], main.J1[1])
wire(and2.O, main.D5)
EndCircuit()
| 17.882353 | 43 | 0.710526 |
794e7371166f7cb980dfa43dbd5c112311721162 | 1,712 | py | Python | apps/readux/urls.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 18 | 2017-06-12T09:58:02.000Z | 2021-10-01T11:14:34.000Z | apps/readux/urls.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 276 | 2019-04-26T20:13:01.000Z | 2022-03-31T10:26:28.000Z | apps/readux/urls.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 7 | 2018-03-13T23:44:26.000Z | 2021-09-15T17:54:55.000Z | """URL patterns for the Readux app"""
from django.urls import path
from . import views, annotations
from .search import SearchManifestCanvas
urlpatterns = [
path('collection/', views.CollectionsList.as_view(), name='collections list'),
path('volume/', views.VolumesList.as_view(), name='volumes list'),
path... | 46.27027 | 97 | 0.689836 |
794ec1ba4396ff8166481d09f4b4546fb2363f10 | 1,208 | py | Python | grouper/fe/handlers/group_leave.py | lfaraone/grouper | 7df5eda8003a0b4a9ba7f0dcb044ae1e4710b171 | [
"Apache-2.0"
] | null | null | null | grouper/fe/handlers/group_leave.py | lfaraone/grouper | 7df5eda8003a0b4a9ba7f0dcb044ae1e4710b171 | [
"Apache-2.0"
] | 1 | 2016-02-18T18:55:29.000Z | 2016-02-18T18:55:29.000Z | grouper/fe/handlers/group_leave.py | lfaraone/grouper | 7df5eda8003a0b4a9ba7f0dcb044ae1e4710b171 | [
"Apache-2.0"
] | null | null | null | from grouper.fe.util import GrouperHandler
from grouper.model_soup import Group
from grouper.models.audit_log import AuditLog
from grouper.user import user_role
class GroupLeave(GrouperHandler):
def get(self, group_id=None, name=None):
group = Group.get(self.session, group_id, name)
if not group:
... | 32.648649 | 87 | 0.640728 |
794ef040c3a7f25257f7612ec1f908c19e848ed0 | 2,424 | py | Python | doc/sphinx/example-acoustics-1d/setplot_3.py | geoflows/geoclaw-4.x | c8879d25405017b38392aa3b1ea422ff3e3604ea | [
"BSD-3-Clause"
] | 7 | 2016-11-13T03:11:51.000Z | 2021-09-07T18:59:48.000Z | doc/sphinx/example-acoustics-1d/setplot_3.py | che-wenchao/D-Claw | 8ab5d971c9a7a7130e03a447a4b8642e292f4e88 | [
"BSD-3-Clause"
] | 11 | 2020-01-14T18:00:37.000Z | 2022-03-29T14:25:24.000Z | doc/sphinx/example-acoustics-1d/setplot_3.py | che-wenchao/D-Claw | 8ab5d971c9a7a7130e03a447a4b8642e292f4e88 | [
"BSD-3-Clause"
] | 6 | 2020-01-14T17:15:42.000Z | 2021-12-03T17:28:44.000Z |
"""
Single figure with two axes
=============================
The pressure q[0] and q[1] are plotted on two sets of axes in a single
figure.
"""
#--------------------------
def setplot(plotdata):
#--------------------------
"""
Specify what is to be plotted at each frame.
Input: plotdata, an i... | 31.076923 | 74 | 0.616749 |
794f1b43a667b97b377cd18a5d5468013bf620d9 | 228 | py | Python | website/models.py | cangkevin/asain-show-rss-website-wrapper | ca7953e2b764705d1a78c691e1920b2f632e6bc9 | [
"MIT"
] | null | null | null | website/models.py | cangkevin/asain-show-rss-website-wrapper | ca7953e2b764705d1a78c691e1920b2f632e6bc9 | [
"MIT"
] | 46 | 2018-12-16T02:38:34.000Z | 2021-06-01T22:44:45.000Z | website/models.py | cangkevin/asain-show-rss-website-wrapper | ca7953e2b764705d1a78c691e1920b2f632e6bc9 | [
"MIT"
] | 1 | 2019-01-06T04:13:51.000Z | 2019-01-06T04:13:51.000Z | """Models used throughout the application.
This module holds various model classes that are
intended for internal use.
"""
from collections import namedtuple
RssResponse = namedtuple("RssResponse", "title items paginations")
| 22.8 | 66 | 0.79386 |
794f3b6767a7884ddb0641a9e96d5abeb932d3b7 | 1,320 | py | Python | CadVlan/manage.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 17 | 2015-05-19T20:03:45.000Z | 2022-03-24T06:19:47.000Z | CadVlan/manage.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 41 | 2015-01-27T18:36:07.000Z | 2021-06-10T20:34:03.000Z | CadVlan/manage.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 19 | 2016-09-12T07:35:42.000Z | 2022-01-28T23:46:11.000Z | # -*- coding:utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Lic... | 38.823529 | 203 | 0.751515 |
794f590b10d08e388ddb53ac66cdc81e4c1dd22b | 15,188 | py | Python | youtube_dl_gui/optionsmanager.py | Sofronio/youtube-dl-gui | cf1d7d682e941473028b182cea6ea8d8dc5ed779 | [
"Unlicense"
] | null | null | null | youtube_dl_gui/optionsmanager.py | Sofronio/youtube-dl-gui | cf1d7d682e941473028b182cea6ea8d8dc5ed779 | [
"Unlicense"
] | null | null | null | youtube_dl_gui/optionsmanager.py | Sofronio/youtube-dl-gui | cf1d7d682e941473028b182cea6ea8d8dc5ed779 | [
"Unlicense"
] | 1 | 2021-09-19T22:54:37.000Z | 2021-09-19T22:54:37.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""Youtubedlg module to handle settings. """
from __future__ import unicode_literals
import json
import os.path
from .utils import (
os_path_expanduser,
os_path_exists,
encode_tuple,
decode_tuple,
check_path
)
from .formats import (
OUTPUT_FORM... | 37.316953 | 97 | 0.587569 |
794f85625974e2db07abe64383a687d92fd865cb | 85 | py | Python | boxesinboxes/src/boxesinboxes/__main__.py | pmfrank/beeware-tutorials | 96274b0a735bd468e946111baf441a527ff0b0d5 | [
"BSD-2-Clause"
] | 1 | 2021-06-04T05:51:39.000Z | 2021-06-04T05:51:39.000Z | boxesinboxes/src/boxesinboxes/__main__.py | pmfrank/beeware-tutorials | 96274b0a735bd468e946111baf441a527ff0b0d5 | [
"BSD-2-Clause"
] | null | null | null | boxesinboxes/src/boxesinboxes/__main__.py | pmfrank/beeware-tutorials | 96274b0a735bd468e946111baf441a527ff0b0d5 | [
"BSD-2-Clause"
] | null | null | null | from boxesinboxes.app import main
if __name__ == '__main__':
main().main_loop()
| 17 | 33 | 0.705882 |
794f890741723a0e262f258f7b8ba66eaab3970b | 2,392 | py | Python | spice_api/tokens.py | Utagai/spice | a2604ad01c12138067eeb2036258437e0f8e4b82 | [
"MIT"
] | 41 | 2016-08-01T04:57:24.000Z | 2022-02-13T01:38:04.000Z | spice_api/tokens.py | Utagai/spice | a2604ad01c12138067eeb2036258437e0f8e4b82 | [
"MIT"
] | 32 | 2016-07-13T18:10:22.000Z | 2018-06-05T22:58:48.000Z | spice_api/tokens.py | Utagai/spice | a2604ad01c12138067eeb2036258437e0f8e4b82 | [
"MIT"
] | 14 | 2016-08-25T23:09:03.000Z | 2018-05-06T19:33:32.000Z | """
Oh, and a license thingy because otherwise it won't look cool and
professional.
MIT License
Copyright (c) [2016] [Mehrab Hoque]
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 restr... | 32.324324 | 79 | 0.747492 |
794f987af5c2dbd386c9753c22bdaf12c824979f | 2,068 | py | Python | superset/db_engine_specs/db2.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | 7 | 2017-11-01T06:00:12.000Z | 2019-01-05T13:31:48.000Z | superset/db_engine_specs/db2.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 108 | 2019-06-10T05:48:22.000Z | 2021-07-26T04:20:03.000Z | superset/db_engine_specs/db2.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 4 | 2018-12-13T06:20:34.000Z | 2020-10-02T16:07:17.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 39.769231 | 80 | 0.631528 |
794fab18d5038f414b3fbd87a0fc68c1b18f4b39 | 14,764 | py | Python | randomapi.py | Tantusar/randomapi | c3accc8d5570479821a5d26d6789ca91a4a71338 | [
"MIT"
] | 1 | 2020-06-16T19:04:19.000Z | 2020-06-16T19:04:19.000Z | randomapi.py | Tantusar/randomapi | c3accc8d5570479821a5d26d6789ca91a4a71338 | [
"MIT"
] | null | null | null | randomapi.py | Tantusar/randomapi | c3accc8d5570479821a5d26d6789ca91a4a71338 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
randomapi.py: a Python implementation of the RANDOM.org JSON-RPC API
Author: Mitchell Cohen (mitch.cohen@me.com)
https://github.com/mitchchn/randomapi
Maintainer: Thomas Chick (twitter.com/Tantusar)
https://github.com/tantusar/randomapi
Date: January 18, 2020
Version: 0.3.2
RANDOM.org API... | 36.544554 | 96 | 0.68308 |
7950067b6df40b780655b33074d50ccc952d0ea7 | 6,772 | py | Python | avatar/relgan/utils/metrics/DocEmbSim.py | Julian-Theis/AVATAR | 24fcd6eaa26f413be528a160d865d5d7e49a780b | [
"MIT"
] | 7 | 2020-12-22T12:09:14.000Z | 2022-03-29T12:50:35.000Z | avatar/relgan/utils/metrics/DocEmbSim.py | ProminentLab/AVATAR | a20c767d8739a52f538927b4ec3d528952263d5a | [
"MIT"
] | 10 | 2020-11-13T17:45:59.000Z | 2022-02-10T00:50:38.000Z | avatar/relgan/utils/metrics/DocEmbSim.py | ProminentLab/AVATAR | a20c767d8739a52f538927b4ec3d528952263d5a | [
"MIT"
] | 2 | 2020-03-26T22:27:27.000Z | 2020-07-07T22:36:41.000Z | import collections
import math
import random
import nltk
import numpy as np
import tensorflow as tf
from scipy.spatial.distance import cosine
from avatar.relgan.utils.metrics.Metrics import Metrics
class DocEmbSim(Metrics):
def __init__(self, oracle_file=None, generator_file=None, num_vocabulary=None, name='Doc... | 41.802469 | 118 | 0.612965 |
79500c01d96c2af833699e9bee66ee827ef01dc6 | 3,503 | py | Python | source/SC_Event_Service/app.py | red-hat-data-services/smart-city-with-rh-cloud-services | 29b29501214a69ccb939db1d2196c89d9b35132b | [
"MIT"
] | null | null | null | source/SC_Event_Service/app.py | red-hat-data-services/smart-city-with-rh-cloud-services | 29b29501214a69ccb939db1d2196c89d9b35132b | [
"MIT"
] | null | null | null | source/SC_Event_Service/app.py | red-hat-data-services/smart-city-with-rh-cloud-services | 29b29501214a69ccb939db1d2196c89d9b35132b | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine, Column, Integer, String, Numeric, DateTime, func, Boolean
from sqlalchemy.ext.declarative import declarative_base
from aiokafka import AIOKafkaConsumer
import asyncio, os, ast , sys
import nest_asyncio
nest_asyncio.apply()
## global variable :: setting this for kafka Consumer
KAFK... | 48.652778 | 444 | 0.675136 |
795019f9487a618d88e982b89f5169f5c08d740c | 13,418 | py | Python | sdk/core/azure-common/tests/test_client_factory.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/core/azure-common/tests/test_client_factory.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/core/azure-common/tests/test_client_factory.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------------... | 44.578073 | 130 | 0.615591 |
795026a4fff1d07b5be14f3c5ab3c767272151cf | 9,140 | py | Python | bilateral_network/inference.py | siyangl/video-object-segmentation-motion-bilateral-network | b278fed4fb7f82f97e8e355e54138e4de6c14342 | [
"MIT"
] | 1 | 2019-03-17T01:34:22.000Z | 2019-03-17T01:34:22.000Z | bilateral_network/inference.py | siyangl/video-object-segmentation-motion-bilateral-network | b278fed4fb7f82f97e8e355e54138e4de6c14342 | [
"MIT"
] | null | null | null | bilateral_network/inference.py | siyangl/video-object-segmentation-motion-bilateral-network | b278fed4fb7f82f97e8e355e54138e4de6c14342 | [
"MIT"
] | 2 | 2019-04-29T06:42:40.000Z | 2019-07-15T01:54:39.000Z | import os
import numpy as np
import cv2
import tensorflow as tf
from tensorflow.python.platform import app
from tensorflow.python.platform import flags
from vos import utils
from data import davis_flow_dataset
flags.DEFINE_string('dataset', 'Davis', 'Dataset used for training')
flags.DEFINE_string('split', 'val', 'D... | 45.024631 | 104 | 0.633479 |
79504c2079f89bdf3ec5c225cf4f0f9259ca5750 | 14,123 | py | Python | src/lib/reportlab/graphics/charts/spider.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | 1 | 2018-06-15T09:42:22.000Z | 2018-06-15T09:42:22.000Z | src/lib/reportlab/graphics/charts/spider.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | src/lib/reportlab/graphics/charts/spider.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | #Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/charts/spider.py
# spider chart, also known as radar chart
"""Spider Chart
Normal use shows variation of 5-10 parameters against ... | 39.89548 | 115 | 0.547971 |
7950557dd1ea47834ab5027546b6c19544696291 | 2,974 | py | Python | get_cluster_faults.py | schubb2003/element | 14d79297b2dd6908e0c84ba533d507acd44fe054 | [
"MIT"
] | null | null | null | get_cluster_faults.py | schubb2003/element | 14d79297b2dd6908e0c84ba533d507acd44fe054 | [
"MIT"
] | null | null | null | get_cluster_faults.py | schubb2003/element | 14d79297b2dd6908e0c84ba533d507acd44fe054 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
# Author: Scott Chubb scott.chubb@netapp.com
# Written for Python 3.7 and above
# No warranty is offered, use at your own risk. While these scripts have been
# tested in lab situations, all use cases cannot be accounted for.
"""
import sys
import time
import os
import json
from datetime impor... | 32.326087 | 78 | 0.628783 |
79505ed766359ae4a2367aa04e22ee0a36d987f9 | 990 | py | Python | terrascript/data/e_breuninger/netbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/e_breuninger/netbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/e_breuninger/netbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/e-breuninger/netbox.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:22:23 UTC)
import terrascript
class netbox_cluster(terrascript.Data):
pass
class netbox_cluster_group(terrascript.Data):
pass
class netbox_device_role(terrascript.Data):
pass
class netbox_interfa... | 15.714286 | 73 | 0.730303 |
7950750123b16c9fa4ee06a8a3be7bcb0eaecd5d | 5,285 | py | Python | test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/Expected/AcceptanceTests/ObjectTypeVersionTolerant/objecttypeversiontolerant/_operations/_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"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 ... | 32.826087 | 106 | 0.637086 |
7950a6ee7e394183068e5dc2c19ec6a1a8d8971d | 6,134 | py | Python | tests/utils/test_amazon_s3.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 50 | 2019-09-13T10:32:29.000Z | 2022-02-14T16:52:53.000Z | tests/utils/test_amazon_s3.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 31 | 2019-09-03T11:06:03.000Z | 2021-08-20T14:57:09.000Z | tests/utils/test_amazon_s3.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 9 | 2019-09-16T03:25:15.000Z | 2021-05-11T10:28:25.000Z | import pytest
from sciwing.utils.amazon_s3 import S3Util
import sciwing.constants as constants
import os
import json
import pathlib
import shutil
PATHS = constants.PATHS
AWS_CRED_DIR = PATHS["AWS_CRED_DIR"]
TESTS_DIR = PATHS["TESTS_DIR"]
OUTPUT_DIR = PATHS["OUTPUT_DIR"]
WING_NUS_AWS_CREDENTIALS = os.path.join(AWS_CRE... | 34.460674 | 84 | 0.696446 |
7950c30ec39845cf18c8282b04dc3fec7067dc18 | 4,525 | py | Python | tests/utils.py | shagunsodhani/xplogger | 46107543cee9a6708d9337090b53dc88e2bfd890 | [
"MIT"
] | 6 | 2021-03-26T22:13:39.000Z | 2021-09-20T09:47:18.000Z | tests/utils.py | shagunsodhani/xplogger | 46107543cee9a6708d9337090b53dc88e2bfd890 | [
"MIT"
] | 3 | 2021-04-27T23:09:13.000Z | 2021-05-29T20:31:16.000Z | tests/utils.py | shagunsodhani/xplogger | 46107543cee9a6708d9337090b53dc88e2bfd890 | [
"MIT"
] | null | null | null | import numpy as np
import xplogger.logbook
from xplogger.types import ConfigType
def make_logbook_config(logger_dir: str) -> ConfigType:
return xplogger.logbook.make_config(
logger_dir=logger_dir,
wandb_config=None,
tensorboard_config=None,
mlflow_config=None,
)
def make_log... | 29.00641 | 106 | 0.509834 |
7950d6fe5019e5f5a01c5b4808ca9d15b68b8aa8 | 2,296 | py | Python | alipay/aop/api/domain/AlipayUserMpointPreconsultModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserMpointPreconsultModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserMpointPreconsultModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayUserMpointPreconsultModel(object):
def __init__(self):
self._biz_sub_type = None
self._biz_type = None
self._point = None
self._user_id = None
@property... | 26.697674 | 75 | 0.570557 |
7950dc0852c9a6990a68a4ef14e017efc8e20fef | 11,341 | py | Python | ote_sdk/ote_sdk/usecases/exportable_code/streamer/streamer.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/usecases/exportable_code/streamer/streamer.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/usecases/exportable_code/streamer/streamer.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | 1 | 2020-12-13T22:13:51.000Z | 2020-12-13T22:13:51.000Z | """
Streamer for reading input
"""
# Copyright (C) 2021-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import abc
import multiprocessing
import queue
import sys
from enum import Enum
from pathlib import Path
from typing import Iterable, Iterator, List, NamedTuple, Optional, Tuple, Union
import cv2
im... | 29.610966 | 106 | 0.638127 |
7950eead1d5a259f62f77862fcc45f86ba7eb684 | 3,590 | py | Python | tensorflow/contrib/slim/python/slim/nets/inception_v4_resnet_v2.py | alikewater/tensorflow | 697929b163102db63fcf0599eb718e49d5ecd2c2 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/slim/python/slim/nets/inception_v4_resnet_v2.py | alikewater/tensorflow | 697929b163102db63fcf0599eb718e49d5ecd2c2 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/slim/python/slim/nets/inception_v4_resnet_v2.py | alikewater/tensorflow | 697929b163102db63fcf0599eb718e49d5ecd2c2 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
import tensorflow as tf
import tensorflow.contrib.slim as slim
#v4.default_image_size = 229
def v4(inputs,
sc='Inception-ResNet-v2'):
'''
Inception-V4 Inception-ResNet-v2 结构
net structs
--------------------------------------
input | 229 x 229 x 3
3x3 co... | 46.025641 | 104 | 0.477437 |
79513af29d2839e0633dd44a8917cb93a1a6ea0e | 49,467 | py | Python | tests/api/v2_1_1/test_discovery.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v2_1_1/test_discovery.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v2_1_1/test_discovery.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI discovery API fixtures and tests.
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,... | 29.064042 | 307 | 0.709887 |
79515e47eb5124f52dec27a29f8af3c5dd927343 | 27,136 | py | Python | python/orca/src/bigdl/orca/learn/bigdl/estimator.py | sgwhat/BigDL | 25b402666fbb26b0bc18fc8100e9a00469844778 | [
"Apache-2.0"
] | null | null | null | python/orca/src/bigdl/orca/learn/bigdl/estimator.py | sgwhat/BigDL | 25b402666fbb26b0bc18fc8100e9a00469844778 | [
"Apache-2.0"
] | null | null | null | python/orca/src/bigdl/orca/learn/bigdl/estimator.py | sgwhat/BigDL | 25b402666fbb26b0bc18fc8100e9a00469844778 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 51.103578 | 99 | 0.621315 |
7951a5f2fd88f726385cff5ef5d8c57fff04757d | 895 | py | Python | servers/web/django/server/urls.py | ericharmeling/photoblocks | b5c61e4d5b459336145647c877daa5d27a8440e6 | [
"MIT"
] | 2 | 2018-06-21T13:57:09.000Z | 2018-07-11T01:38:07.000Z | servers/web/django/server/urls.py | ericharmeling/photoblocks | b5c61e4d5b459336145647c877daa5d27a8440e6 | [
"MIT"
] | null | null | null | servers/web/django/server/urls.py | ericharmeling/photoblocks | b5c61e4d5b459336145647c877daa5d27a8440e6 | [
"MIT"
] | 1 | 2018-11-21T21:13:03.000Z | 2018-11-21T21:13:03.000Z | """rest URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vi... | 31.964286 | 77 | 0.696089 |
7951abf8d29d16879cc0f408148f1092242511f7 | 10,661 | py | Python | changastuff.py | trquinn/custom_python_packages | 1d623a278832b58da28ff76ddea0ccd9a3c3ef15 | [
"MIT"
] | null | null | null | changastuff.py | trquinn/custom_python_packages | 1d623a278832b58da28ff76ddea0ccd9a3c3ef15 | [
"MIT"
] | null | null | null | changastuff.py | trquinn/custom_python_packages | 1d623a278832b58da28ff76ddea0ccd9a3c3ef15 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Contains various functions for submitting ChaNGa jobs to hyak. These are quite
platform specific.
Created on Wed Oct 29 13:30:56 2014
@author: ibackus
"""
import os
import glob
import re
from subprocess import Popen, PIPE
import pynbody
import isaac
import ICglobal_settings
global_settin... | 30.115819 | 180 | 0.611669 |
7951b1a24e7930a10cb74471c585cd9fbb5005ce | 7,504 | py | Python | wienerschnitzelgemeinschaft/src/shai/fastai/other_ensemble_scripts/enstw39c.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/shai/fastai/other_ensemble_scripts/enstw39c.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/shai/fastai/other_ensemble_scripts/enstw39c.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | # individual nan corrected
# Final nan matches highest probable label (optional)
import pandas as pd
import numpy as np
from tqdm import tqdm
import matplotlib.pyplot as plt
SAMPLE = '../input/sample_submission.csv'
label_names = {
0: "Nucleoplasm",
1: "Nuclear membrane",
2: "Nucleoli",
... | 40.782609 | 135 | 0.472948 |
7951cfa62df492dcd527fc41724a3f6296c339f7 | 3,095 | py | Python | src/zptess/dbase/utils.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | src/zptess/dbase/utils.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | src/zptess/dbase/utils.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------
# Copyright (c) 2022
#
# See the LICENSE file for details
# see the AUTHORS file for authors
# ----------------------------------------------------------------------
#--------------------
# System wide imports
# -------------------
import os
imp... | 29.198113 | 105 | 0.559612 |
7951f763b65e285eb09ef170e1b0163141aa9eda | 19,690 | py | Python | pmaf/sequence/_multiple/_stream.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-07-02T06:24:17.000Z | 2021-07-02T06:24:17.000Z | pmaf/sequence/_multiple/_stream.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T12:02:46.000Z | 2021-06-28T12:02:46.000Z | pmaf/sequence/_multiple/_stream.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | null | null | null | import warnings
warnings.simplefilter("ignore", category=FutureWarning)
from shutil import copyfile
from pmaf.sequence._metakit import (
MultiSequenceMetabase,
MultiSequenceStreamBackboneMetabase,
)
from pmaf.sequence._multiple._multiple import MultiSequence
from pmaf.sequence import _shared as seq_shared
from... | 30.153139 | 88 | 0.521229 |
7952083c0f33e4e80dd5e3eb10385a6f5c5a3e51 | 4,479 | py | Python | lib/BatchNorm.py | bcrafton/ssdfa | 661f9059184fde6ba7ad1ca710c5b5a1954c5ea6 | [
"MIT"
] | 10 | 2019-01-23T17:07:59.000Z | 2021-07-13T10:18:10.000Z | lib/BatchNorm.py | bcrafton/ssdfa | 661f9059184fde6ba7ad1ca710c5b5a1954c5ea6 | [
"MIT"
] | 1 | 2019-07-30T00:55:58.000Z | 2019-09-17T13:31:48.000Z | lib/BatchNorm.py | bcrafton/ssdfa | 661f9059184fde6ba7ad1ca710c5b5a1954c5ea6 | [
"MIT"
] | 1 | 2019-07-28T17:28:30.000Z | 2019-07-28T17:28:30.000Z |
import tensorflow as tf
import numpy as np
import math
from tensorflow.python.ops import gen_nn_ops
from lib.Layer import Layer
class BatchNorm(Layer):
def __init__(self, input_size, name=None, load=None, train=True, eps=1e-3):
self.input_size = list(input_size)
if len(self.input_size) == 2:
... | 34.992188 | 190 | 0.509935 |
795224f070a6535185cfa557cb11a443eccda961 | 1,459 | py | Python | indra/tools/live_curation/util.py | djinnome/indra | 382b7f236e0b1422c96a268ef873530b5e92d48f | [
"BSD-2-Clause"
] | null | null | null | indra/tools/live_curation/util.py | djinnome/indra | 382b7f236e0b1422c96a268ef873530b5e92d48f | [
"BSD-2-Clause"
] | null | null | null | indra/tools/live_curation/util.py | djinnome/indra | 382b7f236e0b1422c96a268ef873530b5e92d48f | [
"BSD-2-Clause"
] | null | null | null | import json
import logging
from indra.statements import Statement
logger = logging.getLogger(__name__)
def _json_loader(fpath):
logger.info('Loading json file %s' % fpath)
with open(fpath, 'r') as f:
return json.load(f)
def _json_dumper(jsonobj, fpath):
try:
logger.info('Saving json obj... | 23.918033 | 69 | 0.638108 |
79522ab9346408865a82ade12f54cd00c6577a2a | 2,339 | py | Python | kaggledatasets/structured/newyork_airbnb_opendata.py | kaggledatasets/kaggledatasets | 685d16590667443546f7ad2c31dfac8ad6be6ca2 | [
"Apache-2.0"
] | 48 | 2019-11-23T17:39:42.000Z | 2022-02-11T16:38:12.000Z | kaggledatasets/structured/newyork_airbnb_opendata.py | kaggledatasets/kaggledatasets | 685d16590667443546f7ad2c31dfac8ad6be6ca2 | [
"Apache-2.0"
] | 5 | 2019-11-30T14:20:18.000Z | 2019-12-10T12:07:54.000Z | kaggledatasets/structured/newyork_airbnb_opendata.py | kaggledatasets/kaggledatasets | 685d16590667443546f7ad2c31dfac8ad6be6ca2 | [
"Apache-2.0"
] | 6 | 2019-11-30T15:44:43.000Z | 2022-02-11T16:38:14.000Z | # Copyright 2019 Omkar Prabhu
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 28.180723 | 89 | 0.64814 |
79523afeaa88924ca2693659a2e3adab3587009d | 39 | py | Python | examples/celery/client.py | mastak/pybrake | 32968efbebea07580680f16228be818726c13933 | [
"MIT"
] | 36 | 2018-04-24T09:26:12.000Z | 2022-02-17T13:44:41.000Z | examples/celery/client.py | mastak/pybrake | 32968efbebea07580680f16228be818726c13933 | [
"MIT"
] | 90 | 2018-03-06T15:13:53.000Z | 2022-03-25T11:32:25.000Z | examples/celery/client.py | mastak/pybrake | 32968efbebea07580680f16228be818726c13933 | [
"MIT"
] | 21 | 2018-04-04T14:50:12.000Z | 2022-03-23T05:48:51.000Z | from tasks import add
add.delay(4, 4)
| 9.75 | 21 | 0.717949 |
79523d2b3a60a9b1bf3f0b7d6b706b9174736b66 | 12,502 | py | Python | detectron/utils/boxes.py | singhnarotam1997/Detectron | ecc6b25fc8869486126f1384b4e6e042a718bd5b | [
"Apache-2.0"
] | 60 | 2021-08-07T09:16:52.000Z | 2022-03-14T09:09:00.000Z | detectron/utils/boxes.py | singhnarotam1997/Detectron | ecc6b25fc8869486126f1384b4e6e042a718bd5b | [
"Apache-2.0"
] | 4 | 2021-10-14T02:44:49.000Z | 2022-03-14T08:18:20.000Z | detectron/utils/boxes.py | singhnarotam1997/Detectron | ecc6b25fc8869486126f1384b4e6e042a718bd5b | [
"Apache-2.0"
] | 11 | 2021-11-01T00:30:37.000Z | 2021-12-08T10:01:52.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
##############################################################################
#
# Based on:
# -----------------------------... | 37.770393 | 80 | 0.610942 |
79524b941919fc9fe975167cb7a6682bf87cd63e | 4,989 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_upload_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_upload_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/BodyBinary/bodybinary/aio/operations/_upload_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 39.595238 | 106 | 0.670876 |
79525657ca25cd7a1a45c008198d2521372793ef | 18,836 | py | Python | data/level/level124.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level124.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level124.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {
'level_index': 124,
'move_count': 32,
'board_info': {
(0, 0): {
'base': (14, 1),
'cover': (64, 1),
'fall_point': (0, -1),
'next': (0, 1),
'prev': (0, -1)
},
(0, 1): {
'base': (4, 1),
'cover':... | 23.283066 | 34 | 0.196114 |
79527ef3b672bf80a0fe21b3c993d803710a4eda | 4,478 | py | Python | helper.py | jeffhsu3/BERMUDA | 1e1e031b7dc59bca98a494729f151905bf05e13b | [
"MIT"
] | 31 | 2019-05-19T04:11:29.000Z | 2021-07-04T13:27:34.000Z | helper.py | jeffhsu3/BERMUDA | 1e1e031b7dc59bca98a494729f151905bf05e13b | [
"MIT"
] | 10 | 2019-05-23T12:18:04.000Z | 2021-08-02T07:19:56.000Z | helper.py | jeffhsu3/BERMUDA | 1e1e031b7dc59bca98a494729f151905bf05e13b | [
"MIT"
] | 8 | 2019-08-14T06:38:58.000Z | 2021-05-13T01:11:52.000Z | # !/usr/bin/env python
import numpy as np
from sklearn.decomposition import PCA
import umap
import matplotlib.pyplot as plt
# 9-class Set1, for plotting data with qualitative labels
color_dict = {0:'#e41a1c', 1:'#377eb8', 2:'#4daf4a', 3: '#984ea3', 4:'#ff7f00',
5:'#ffff33', 6:'#a65628', 7:'#f781bf', 8:'#... | 36.112903 | 126 | 0.649397 |
795285583964dc2ca50270134393dc7f82e0f21c | 4,176 | py | Python | API/src/main/resources/Lib/robot/running/__init__.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/running/__init__.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/running/__init__.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 40.153846 | 96 | 0.755268 |
7952b8a671b44307164f1eff8fdc3c70ecbe3a59 | 18,263 | py | Python | openfold/model/template.py | aqlaboratory/openfold | d6b36a80e3ee82eee8ac09215fce553d822f86a3 | [
"Apache-2.0"
] | 789 | 2021-11-12T16:12:21.000Z | 2022-03-28T05:45:19.000Z | openfold/model/template.py | aqlaboratory/openfold | d6b36a80e3ee82eee8ac09215fce553d822f86a3 | [
"Apache-2.0"
] | 84 | 2021-11-12T22:23:50.000Z | 2022-03-29T01:06:06.000Z | openfold/model/template.py | aqlaboratory/openfold | d6b36a80e3ee82eee8ac09215fce553d822f86a3 | [
"Apache-2.0"
] | 114 | 2021-11-12T16:00:57.000Z | 2022-03-27T21:32:31.000Z | # Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# 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
#
# U... | 29.7443 | 81 | 0.562503 |
7952ed9bfc2d2444ea096f1a732945fb800bae3c | 424 | py | Python | examples/textrank-docker/textrank.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 82 | 2018-05-01T16:32:38.000Z | 2019-05-18T01:43:15.000Z | examples/textrank-docker/textrank.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 20 | 2018-05-01T19:32:48.000Z | 2019-04-12T07:57:48.000Z | examples/textrank-docker/textrank.py | peter-xbs/newsroom_chinese | 7fcae68b2ea5584d08d0c48faee34a0734237e6b | [
"Apache-2.0"
] | 15 | 2018-05-01T17:34:11.000Z | 2019-05-07T09:28:21.000Z | import json, sys
from gensim.summarization.summarizer import summarize
WORD_COUNT = 50
for line in sys.stdin:
article = json.loads(line)
try:
summary = summarize(
article["text"],
word_count = WORD_COUNT)
except ValueError:
# Handles "input must have more tha... | 16.96 | 58 | 0.617925 |
79530569bb969510dc48cf4b0ea577ebffa66be8 | 1,382 | py | Python | aea/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | aea/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | aea/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 28.204082 | 82 | 0.642547 |
795324cb64549f94a2e1e72de3f5747dcd82d838 | 3,049 | py | Python | octoprint.py | gaunab/octopi_gui | 1cc1d71d3b1acf0c0041c71a005de3dbd7667def | [
"BSD-3-Clause"
] | null | null | null | octoprint.py | gaunab/octopi_gui | 1cc1d71d3b1acf0c0041c71a005de3dbd7667def | [
"BSD-3-Clause"
] | null | null | null | octoprint.py | gaunab/octopi_gui | 1cc1d71d3b1acf0c0041c71a005de3dbd7667def | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
# http://isbullsh.it/2012/06/Rest-api-in-python/#conclusion
import requests, json
import os.path
class Api():
def __init__(self,url="localhost",api=None,apikeyfile=None):
""" Create new Connection-Object to octoprint
Params: - url (string)
Url of octoprint ... | 30.79798 | 88 | 0.516563 |
795339d53e58abe73283674189e762c74508a449 | 3,579 | py | Python | models/CausalNormClassifier.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 78 | 2020-11-30T09:46:01.000Z | 2022-03-30T02:42:48.000Z | models/CausalNormClassifier.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 18 | 2020-12-30T10:39:11.000Z | 2022-03-21T07:27:27.000Z | models/CausalNormClassifier.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 8 | 2020-12-02T15:41:23.000Z | 2022-02-26T11:57:37.000Z | import torch
import torch.nn as nn
from utils import *
from os import path
import math
class Causal_Norm_Classifier(nn.Module):
def __init__(self, num_classes=1000, feat_dim=2048, use_effect=True, num_head=2, tau=16.0, alpha=3.0, gamma=0.03125, *args):
super(Causal_Norm_Classifier, self).__init__()
... | 42.607143 | 180 | 0.621403 |
7953480ae0a491a9c97c11777c966a853bcb7580 | 1,501 | py | Python | appengine/findit/infra_api_clients/isolate/isolate_util.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/findit/infra_api_clients/isolate/isolate_util.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/findit/infra_api_clients/isolate/isolate_util.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 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.
"""Client library to interact with isolate API."""
import base64
import json
import zlib
from infra_api_clients import http_client_util
def FetchFileFromI... | 34.113636 | 76 | 0.734843 |
79536ef63f58198cea811c93cdfdcd69cee9ecf6 | 6,303 | py | Python | venv/lib/python3.8/site-packages/dateparser/data/date_translation_data/be.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-11-17T04:55:14.000Z | 2021-11-17T04:55:14.000Z | dateparser/data/date_translation_data/be.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/be.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
info = {
"name": "be",
"date_order": "DMY",
"january": [
"студзень",
"сту",
"студзеня",
"Стд"
],
"february": [
"люты",
"лют",
"лютага"
],
"march": [
"сакавік",
"сак",
"сакавіка"
],
... | 18.429825 | 60 | 0.282088 |
7953825265a3c45861364ddfb5d30170f362a594 | 1,890 | py | Python | alipay/aop/api/domain/AlipaySocialQuestionnareGrayUpgradeModel.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/domain/AlipaySocialQuestionnareGrayUpgradeModel.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/domain/AlipaySocialQuestionnareGrayUpgradeModel.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.constant.ParamConstants import *
class AlipaySocialQuestionnareGrayUpgradeModel(object):
def __init__(self):
self._ext_info = None
self._gray_percent = None
self._qstn_id = None
@property
def ext_info(... | 26.619718 | 75 | 0.58836 |
7953f6b7489acf345c8141ee58005c051f60c80b | 5,542 | py | Python | examples/multi_physics/biot_npbc.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 510 | 2015-01-19T16:22:25.000Z | 2022-03-30T19:02:51.000Z | examples/multi_physics/biot_npbc.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 402 | 2015-01-22T10:57:50.000Z | 2022-03-30T15:19:23.000Z | examples/multi_physics/biot_npbc.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 156 | 2015-01-05T14:23:38.000Z | 2022-03-22T13:08:30.000Z | r"""
Biot problem - deformable porous medium with the no-penetration boundary
condition on a boundary region.
Find :math:`\ul{u}`, :math:`p` such that:
.. math::
\int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
- \int_{\Omega} p\ \alpha_{ij} e_{ij}(\ul{v})
= 0
\;, \quad \forall \ul{v} \;,
\... | 27.71 | 80 | 0.496211 |
79542527c0dde92db62934f6613468d71ad739ab | 1,449 | py | Python | fiepipedesktoplib/sites/shells/networkedsite.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/sites/shells/networkedsite.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/sites/shells/networkedsite.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | import fiepipedesktoplib.sites.shells.abstractsite
import fiepipelib.stateserver
class Shell(fiepipedesktoplib.sites.shells.abstractsite.Shell):
"""Shell for working in a networked site."""
_siteName
_networkedSite = None
def GetSite(self):
if self._networkedSite == None:
print("... | 27.339623 | 77 | 0.63216 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.