hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a20163fcfd694371e57b61cb29bbe6b80cc3d4b | 4,302 | py | Python | datawig/mxnet_output_symbols.py | sscdotopen/datawig | 97e259d6fde9e38f66c59e82a068172c54060c04 | [
"Apache-2.0"
] | null | null | null | datawig/mxnet_output_symbols.py | sscdotopen/datawig | 97e259d6fde9e38f66c59e82a068172c54060c04 | [
"Apache-2.0"
] | 1 | 2018-09-02T12:08:29.000Z | 2018-09-04T22:13:36.000Z | datawig/mxnet_output_symbols.py | sscdotopen/datawig | 97e259d6fde9e38f66c59e82a068172c54060c04 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not
# use this file except in compliance with the License. A copy of the License
# is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file acc... | 35.85 | 92 | 0.662947 |
4a2016c9c685c8fced7bc8d99b5d083a04963b72 | 19,342 | py | Python | ares/simulations/Global21cm.py | eklem1/ares | df39056065f0493e3c922fb50ced2dc6d1bc79a2 | [
"MIT"
] | null | null | null | ares/simulations/Global21cm.py | eklem1/ares | df39056065f0493e3c922fb50ced2dc6d1bc79a2 | [
"MIT"
] | null | null | null | ares/simulations/Global21cm.py | eklem1/ares | df39056065f0493e3c922fb50ced2dc6d1bc79a2 | [
"MIT"
] | null | null | null | """
Global21cm.py
Author: Jordan Mirocha
Affiliation: University of Colorado at Boulder
Created on: Wed Sep 24 14:55:35 MDT 2014
Description:
"""
from __future__ import print_function
import os
import time
import numpy as np
from types import FunctionType
from ..util.Math import interp1d
from ..util.PrintInfo im... | 33.696864 | 93 | 0.520991 |
4a20182f8c98670576e7a98fd354c06e6f05bea1 | 637 | py | Python | Python/6/NextPolydivisibleNumber/test_next_polydivisible_number.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | Python/6/NextPolydivisibleNumber/test_next_polydivisible_number.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | 6 | 2020-02-21T17:01:59.000Z | 2021-05-04T07:04:41.000Z | Python/6/NextPolydivisibleNumber/test_next_polydivisible_number.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | from unittest import TestCase
from unittest import main
from next_polydivisible_number import next_num
class TestNextPolydivisibleNumber(TestCase):
def test_next_num(self):
ptr = [
# polydivisible numbers
(0, 1), # 1 / 1 = 0
(10, 12), # 1 / 1 = 0, 12 / 2 = 6
... | 26.541667 | 79 | 0.530612 |
4a201901778c275371f77f5c4e2b47b960f196bf | 19,950 | py | Python | seev/apps/core/views.py | Kairn/se-eon-venture | 98cb77067bf3d9e3489923416f59eb9c044d9e3b | [
"MIT"
] | 1 | 2021-05-01T17:16:43.000Z | 2021-05-01T17:16:43.000Z | seev/apps/core/views.py | Kairn/se-eon-venture | 98cb77067bf3d9e3489923416f59eb9c044d9e3b | [
"MIT"
] | 4 | 2020-01-02T01:23:43.000Z | 2021-06-04T21:52:43.000Z | seev/apps/core/views.py | Kairn/se-eon-venture | 98cb77067bf3d9e3489923416f59eb9c044d9e3b | [
"MIT"
] | null | null | null | """
View logic used in core app
"""
import traceback
from django.conf import settings
from django.http import HttpRequest
from django.db import transaction
from django.shortcuts import render, redirect, reverse
from django.core.paginator import Paginator
from django.core.exceptions import ObjectDoesNotExist
from see... | 34.337349 | 150 | 0.578396 |
4a201966046a95272cab5bf67d959c6e05ba23d2 | 1,156 | py | Python | setup.py | SpotlightKid/jackclient-python | cfc1e6a11f50f98abcd351b6e372e98da8e3a06d | [
"MIT"
] | 120 | 2015-04-03T03:55:04.000Z | 2022-03-06T07:21:38.000Z | setup.py | SpotlightKid/jackclient-python | cfc1e6a11f50f98abcd351b6e372e98da8e3a06d | [
"MIT"
] | 84 | 2015-01-04T12:42:43.000Z | 2022-03-15T18:13:13.000Z | setup.py | SpotlightKid/jackclient-python | cfc1e6a11f50f98abcd351b6e372e98da8e3a06d | [
"MIT"
] | 31 | 2015-04-11T13:03:35.000Z | 2022-03-06T07:21:38.000Z | from setuptools import setup
__version__ = 'unknown'
# "import" __version__
for line in open('src/jack.py'):
if line.startswith('__version__'):
exec(line)
break
setup(
name='JACK-Client',
version=__version__,
package_dir={'': 'src'},
py_modules=['jack'],
setup_requires=['CFFI>... | 29.641026 | 69 | 0.628893 |
4a201a5cd9f0be0766920954cc313a02e303641a | 26,600 | py | Python | test/unit/authnz/test_custos_authnz.py | toshea-bu/galaxy | 760fcbd3d4ca8b036d8531751d972684eee130e2 | [
"CC-BY-3.0"
] | null | null | null | test/unit/authnz/test_custos_authnz.py | toshea-bu/galaxy | 760fcbd3d4ca8b036d8531751d972684eee130e2 | [
"CC-BY-3.0"
] | null | null | null | test/unit/authnz/test_custos_authnz.py | toshea-bu/galaxy | 760fcbd3d4ca8b036d8531751d972684eee130e2 | [
"CC-BY-3.0"
] | null | null | null | import hashlib
import json
import os
import unittest
import uuid
from datetime import datetime, timedelta
from urllib.parse import (
parse_qs,
quote,
urlparse,
)
import jwt
import requests
from galaxy.authnz import custos_authnz
from galaxy.model import CustosAuthnzToken, User
from galaxy.util import unic... | 46.91358 | 132 | 0.67282 |
4a201b4b9a583d552e913aa9d7fdd620de8270d9 | 844 | py | Python | leadmanager/leads/migrations/0001_initial.py | AvishrantsSh/django_react_test | 33a344fb81e337e30f450acbfc15715453a88251 | [
"MIT"
] | null | null | null | leadmanager/leads/migrations/0001_initial.py | AvishrantsSh/django_react_test | 33a344fb81e337e30f450acbfc15715453a88251 | [
"MIT"
] | null | null | null | leadmanager/leads/migrations/0001_initial.py | AvishrantsSh/django_react_test | 33a344fb81e337e30f450acbfc15715453a88251 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-06 08:57
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Lead",
fields=[
(
"id",
... | 26.375 | 72 | 0.451422 |
4a201c008cd4b7180a00e082439f80c26cca2321 | 995 | py | Python | testplan/report/testing/parser.py | dobragab/testplan | 407ac1dfd33d19753e41235a1f576aeb06118840 | [
"Apache-2.0"
] | null | null | null | testplan/report/testing/parser.py | dobragab/testplan | 407ac1dfd33d19753e41235a1f576aeb06118840 | [
"Apache-2.0"
] | null | null | null | testplan/report/testing/parser.py | dobragab/testplan | 407ac1dfd33d19753e41235a1f576aeb06118840 | [
"Apache-2.0"
] | null | null | null | import argparse
class ReportTagsAction(argparse.Action):
"""
Argparse action for parsing multiple report tag
arguments, builds up a list of dictionary of sets.
In:
.. code-block:: bash
--report-tags foo bar hello=world --report-tags one two color=red
Out:
... | 24.268293 | 77 | 0.502513 |
4a201c540ec5e880c81b17b563c165558b11dc20 | 428 | py | Python | tests/test_datastructures.py | amaksymov/object-validation | e2bafb17755f945f521995ca2e5adfcac8d2d19a | [
"MIT"
] | null | null | null | tests/test_datastructures.py | amaksymov/object-validation | e2bafb17755f945f521995ca2e5adfcac8d2d19a | [
"MIT"
] | null | null | null | tests/test_datastructures.py | amaksymov/object-validation | e2bafb17755f945f521995ca2e5adfcac8d2d19a | [
"MIT"
] | null | null | null | from object_validation.datastructures import ValidationResult
def test_validation_result():
result = ValidationResult('value')
assert result.value == 'value'
assert not result.has_error()
assert result.get_errors() is None
errors = {'error': 'errors'}
result = ValidationResult('value', errors... | 28.533333 | 61 | 0.71028 |
4a201cb04b9a5882c24483361cc32695189ccdce | 7,935 | py | Python | pytorch_toolkit/nncf/tests/sparsity/rb/test_algo.py | AnastasiaaSenina/openvino_training_extensions | 267425d64372dff5b9083dc0ca6abfc305a71449 | [
"Apache-2.0"
] | 1 | 2021-03-20T06:00:02.000Z | 2021-03-20T06:00:02.000Z | pytorch_toolkit/nncf/tests/sparsity/rb/test_algo.py | akshayjaryal603/openvino_training_extensions | 7d606a22143db0af97087709d63a2ec2aa02036c | [
"Apache-2.0"
] | 28 | 2020-09-25T22:40:36.000Z | 2022-03-12T00:37:36.000Z | pytorch_toolkit/nncf/tests/sparsity/rb/test_algo.py | akshayjaryal603/openvino_training_extensions | 7d606a22143db0af97087709d63a2ec2aa02036c | [
"Apache-2.0"
] | 1 | 2021-04-02T07:51:01.000Z | 2021-04-02T07:51:01.000Z | """
Copyright (c) 2019 Intel Corporation
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 writin... | 36.906977 | 116 | 0.705986 |
4a201d065c0b654ee78c853e533123efcb4c19a8 | 11,569 | py | Python | pandas/compat/__init__.py | maketestsgofaster/pandas | 3493abaa9c47e39b410752833c901fd27f5b3a76 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/compat/__init__.py | maketestsgofaster/pandas | 3493abaa9c47e39b410752833c901fd27f5b3a76 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | pandas/compat/__init__.py | maketestsgofaster/pandas | 3493abaa9c47e39b410752833c901fd27f5b3a76 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"BSD-3-Clause"
] | null | null | null | """
compat
======
Cross-compatible functions for Python 2 and 3.
Key items to import for 2/3 compatible code:
* iterators: range(), map(), zip(), filter(), reduce()
* lists: lrange(), lmap(), lzip(), lfilter()
* unicode: u() [no unicode builtin in Python 3]
* longs: long (int in Python 3)
* callable
* iterable method... | 27.414692 | 90 | 0.630824 |
4a201d80ae96e8af78d70740c6b782be03fa1a50 | 3,105 | py | Python | ucsmsdk/mometa/storage/StorageScsiLunRef.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/storage/StorageScsiLunRef.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/storage/StorageScsiLunRef.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for StorageScsiLunRef ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class StorageScsiLunRefConsts():
ID_UNSPECIFIED = "unspecified"
class Storag... | 51.75 | 248 | 0.639291 |
4a201faf1e0c8910e3471a9991604799c819c30b | 620 | py | Python | Introduksjon/Flytkontroll/ForLoops.py | trodfjell/PythonTeachers2021 | 6e6cba24f0adf654bce5cfd3a6027a972d02259e | [
"MIT"
] | null | null | null | Introduksjon/Flytkontroll/ForLoops.py | trodfjell/PythonTeachers2021 | 6e6cba24f0adf654bce5cfd3a6027a972d02259e | [
"MIT"
] | null | null | null | Introduksjon/Flytkontroll/ForLoops.py | trodfjell/PythonTeachers2021 | 6e6cba24f0adf654bce5cfd3a6027a972d02259e | [
"MIT"
] | null | null | null | # For løkker kan brukes for å kjøre noe en gitt antall ganger
print('Summer sammen alle tallene fra 1 til og med 100')
total = 0
for i in range(101):
total = total + i
print(total)
# Dette kan også løses med en while løkke
print('Summer sammen alle tallene fra 1 til og med 100')
total = 0
i = 0
while i < 100:
... | 28.181818 | 90 | 0.690323 |
4a2020ce3359367b6fcb42ad016eaad542734349 | 784 | py | Python | simplipy/errors.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | simplipy/errors.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | simplipy/errors.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | """Define package errors."""
class SimplipyError(Exception):
"""A base error."""
pass
class EndpointUnavailable(SimplipyError):
"""An error related to accessing an endpoint that isn't available in the plan."""
pass
class InvalidCredentialsError(SimplipyError):
"""An error related to invalid ... | 17.818182 | 85 | 0.704082 |
4a20216fcf4d495a95f1fcdab55c6dac53d4ff3a | 3,098 | py | Python | utils/csv_generator.py | stegmaierj/Cellpose3D | d78cbf99a9a35e557fd3878d0761b6ad98f8da61 | [
"Apache-2.0"
] | 2 | 2021-09-13T15:50:26.000Z | 2021-12-08T21:53:21.000Z | utils/csv_generator.py | stegmaierj/Cellpose3D | d78cbf99a9a35e557fd3878d0761b6ad98f8da61 | [
"Apache-2.0"
] | 3 | 2021-10-13T09:01:21.000Z | 2021-12-06T15:28:50.000Z | utils/csv_generator.py | stegmaierj/Cellpose3D | d78cbf99a9a35e557fd3878d0761b6ad98f8da61 | [
"Apache-2.0"
] | 1 | 2022-02-01T15:19:19.000Z | 2022-02-01T15:19:19.000Z | # -*- coding: utf-8 -*-
"""
# 3D Cellpose Extension.
# Copyright (C) 2021 D. Eschweiler, J. Stegmaier
#
# 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 Liceense at
#
# http://www.apache.org/licenses/... | 33.311828 | 113 | 0.627824 |
4a2021f44cacdc2c61b5500972e83b991ce9dbf8 | 1,274 | py | Python | script/model/sklearn_like_model/NetModule/optimizer/RMSProp.py | demetoir/MLtools | 8c42fcd4cc71728333d9c116ade639fe57d50d37 | [
"MIT"
] | null | null | null | script/model/sklearn_like_model/NetModule/optimizer/RMSProp.py | demetoir/MLtools | 8c42fcd4cc71728333d9c116ade639fe57d50d37 | [
"MIT"
] | null | null | null | script/model/sklearn_like_model/NetModule/optimizer/RMSProp.py | demetoir/MLtools | 8c42fcd4cc71728333d9c116ade639fe57d50d37 | [
"MIT"
] | null | null | null | import tensorflow as tf
from script.model.sklearn_like_model.NetModule.optimizer.optimizer import optimizer
class RMSProp(optimizer):
def __init__(
self,
learning_rate=0.001,
decay=0.9,
momentum=0.0,
epsilon=1e-8,
use_locking=Fal... | 29.627907 | 95 | 0.559655 |
4a20231bba5aca61935f321a96673834ed64b51b | 1,038 | py | Python | limacharlie/demo_firehose.py | macdaliot/python-limacharlie | dc8011418f09d3acc0ebce5ea3afb98e4b7f600f | [
"Apache-2.0"
] | null | null | null | limacharlie/demo_firehose.py | macdaliot/python-limacharlie | dc8011418f09d3acc0ebce5ea3afb98e4b7f600f | [
"Apache-2.0"
] | null | null | null | limacharlie/demo_firehose.py | macdaliot/python-limacharlie | dc8011418f09d3acc0ebce5ea3afb98e4b7f600f | [
"Apache-2.0"
] | null | null | null | import limacharlie
import json
import gevent
import signal
import sys
import getpass
if __name__ == "__main__":
def signal_handler():
global fh
print( 'You pressed Ctrl+C!' )
fh.shutdown()
sys.exit( 0 )
gevent.signal( signal.SIGINT, signal_handler )
def debugPrint( msg ):
print ms... | 28.833333 | 100 | 0.554913 |
4a20235823f52cc0254585b333e2fec0ae270f20 | 4,613 | py | Python | Fduers/alumni/models.py | TAKHEXI/ALUMNI | b06fb8f408444d8294304e1890f2afa4283c8bfa | [
"MIT"
] | null | null | null | Fduers/alumni/models.py | TAKHEXI/ALUMNI | b06fb8f408444d8294304e1890f2afa4283c8bfa | [
"MIT"
] | null | null | null | Fduers/alumni/models.py | TAKHEXI/ALUMNI | b06fb8f408444d8294304e1890f2afa4283c8bfa | [
"MIT"
] | null | null | null | from django.db import models
from ckeditor.fields import RichTextField
# Create your models here.
class Department(models.Model):
name = models.CharField('院系', max_length=30, null=False, unique=True)
class Meta:
verbose_name = '院系'
verbose_name_plural = '院系'
def __str__(self):
# ... | 33.427536 | 129 | 0.674832 |
4a20239f1b08a3949199e28b1bbf3dd6615c3cd8 | 1,615 | py | Python | openmdao.lib/src/openmdao/lib/components/dynwrapper.py | swryan/OpenMDAO-Framework | f50d60e1a8cadac7fe03d26ffad5fb660b2a15ec | [
"Apache-2.0"
] | 3 | 2015-06-02T00:36:28.000Z | 2018-11-03T00:35:21.000Z | openmdao.lib/src/openmdao/lib/components/dynwrapper.py | JustinSGray/OpenMDAO-Framework | 7ebd7fda0b10fbe8a86ae938dc4f135396dd9759 | [
"Apache-2.0"
] | null | null | null | openmdao.lib/src/openmdao/lib/components/dynwrapper.py | JustinSGray/OpenMDAO-Framework | 7ebd7fda0b10fbe8a86ae938dc4f135396dd9759 | [
"Apache-2.0"
] | 1 | 2020-07-15T02:45:54.000Z | 2020-07-15T02:45:54.000Z | import os
from openmdao.main.api import Component
#class DynWrapper(Component):
#"""A Component wrapper for objects that contain their own internal hierarchy
#and Component-like interface (set/get/run) but do not provide normal python
#attribute access.
#"""
#def __init__(self):
... | 33.645833 | 81 | 0.63096 |
4a20253684bf6c0cb84b1751cbb0f369d3198af2 | 283 | py | Python | cursoemvideo/ex0086.py | LuanPetruitis/minis_programas_python | 5fbc4c3fbe832303511e612f320d31e2b91f1ef0 | [
"MIT"
] | 1 | 2020-04-09T14:41:48.000Z | 2020-04-09T14:41:48.000Z | cursoemvideo/ex0086.py | LuanPetruitis/minis_programas_python | 5fbc4c3fbe832303511e612f320d31e2b91f1ef0 | [
"MIT"
] | 1 | 2020-04-10T20:39:24.000Z | 2020-04-12T13:43:51.000Z | cursoemvideo/ex0086.py | LuanPetruitis/minis_programas_python | 5fbc4c3fbe832303511e612f320d31e2b91f1ef0 | [
"MIT"
] | 1 | 2020-04-13T03:21:09.000Z | 2020-04-13T03:21:09.000Z | matriz = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
for l in range(0, 3):
for c in range(0, 3):
matriz[l][c] = int(input(f'Difite uma valor: [{l}, {c}] '))
print('-='*30)
for l in range(0, 3):
for c in range(0, 3):
print(f'[{matriz [l][c]:^5}]', end='')
print() | 31.444444 | 70 | 0.459364 |
4a202581b675e89ec31d9b905515fb8fda2ee62a | 42,595 | py | Python | isi_sdk_8_2_0/isi_sdk_8_2_0/models/providers_file_file_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_0/isi_sdk_8_2_0/models/providers_file_file_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_0/isi_sdk_8_2_0/models/providers_file_file_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 7
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class ProvidersFileFileItem(obje... | 37.00695 | 787 | 0.655053 |
4a2025c788991861dfafddb82a0f39df211dc61b | 1,685 | py | Python | wizard/wizards.py | JDavidMoreno/Technical-Service | 93ddf3d95cd3abfdfd29129d7934fb928aeced19 | [
"MIT"
] | null | null | null | wizard/wizards.py | JDavidMoreno/Technical-Service | 93ddf3d95cd3abfdfd29129d7934fb928aeced19 | [
"MIT"
] | null | null | null | wizard/wizards.py | JDavidMoreno/Technical-Service | 93ddf3d95cd3abfdfd29129d7934fb928aeced19 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from datetime import timedelta
from odoo import models, fields, api
from odoo.exceptions import ValidationError
_logger = logging.getLogger(__name__)
# I need to update the wizard to the new duration and schedule system
class TechnicalServiceRequestDuration(models.TransientM... | 33.7 | 176 | 0.753709 |
4a20266b7238631022a2e86c8fdc1c965a65f6d1 | 2,315 | py | Python | student_net_learning/utils.py | Kulikovpavel/MCS2018.Baseline | 5a3997bc9e59ea1c2ada3df4c4f036465b38303f | [
"MIT"
] | 16 | 2018-06-09T13:49:45.000Z | 2020-09-30T03:47:42.000Z | student_net_learning/utils.py | Kulikovpavel/MCS2018.Baseline | 5a3997bc9e59ea1c2ada3df4c4f036465b38303f | [
"MIT"
] | null | null | null | student_net_learning/utils.py | Kulikovpavel/MCS2018.Baseline | 5a3997bc9e59ea1c2ada3df4c4f036465b38303f | [
"MIT"
] | 10 | 2018-05-21T17:13:08.000Z | 2020-04-24T16:28:46.000Z | '''Some helper functions for Baseline, including:
- progress_bar: progress bar mimic xlua.progress.
'''
import os
import sys
import time
import math
import torch.nn as nn
import torch.nn.init as init
_, term_width = os.popen('stty size', 'r').read().split()
term_width = int(term_width)
TOTAL_BAR_LENGTH = 65.
la... | 24.62766 | 64 | 0.574514 |
4a202721a52b3f8c03aecef171b05c2b064f6ed9 | 3,975 | py | Python | base_report.py | shoubamzlibap/ihreport | e9e6132d872a9b896ea1b08b5d61cf6a157cfd0c | [
"MIT"
] | null | null | null | base_report.py | shoubamzlibap/ihreport | e9e6132d872a9b896ea1b08b5d61cf6a157cfd0c | [
"MIT"
] | null | null | null | base_report.py | shoubamzlibap/ihreport | e9e6132d872a9b896ea1b08b5d61cf6a157cfd0c | [
"MIT"
] | null | null | null | """
A small reporting tool, using asciidoc
"""
import calendar
import datetime
import jinja2
import os
import sys
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '/usr/bin'))
if not path in sys.path:
sys.path.insert(1, path)
del path
import a2x
class BaseReportAttributeMissing(Exception):
pa... | 32.317073 | 99 | 0.62239 |
4a20277bdb393da0d21f16d9f1ae4ef9114bddb9 | 2,953 | py | Python | pyftdi/tests/timearray.py | larsch/pyftdi | c77136fe4000f36842bc996ff1d5a5a0e05c1be4 | [
"BSD-3-Clause"
] | null | null | null | pyftdi/tests/timearray.py | larsch/pyftdi | c77136fe4000f36842bc996ff1d5a5a0e05c1be4 | [
"BSD-3-Clause"
] | null | null | null | pyftdi/tests/timearray.py | larsch/pyftdi | c77136fe4000f36842bc996ff1d5a5a0e05c1be4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Quick and dirty bytearray vs. array('B') performance test."""
from array import array
from struct import pack
from timeit import timeit
from time import perf_counter
def timing(f, n, a):
start = perf_counter()
for i in range(n):
f(a); f(a); f(a); f(a); f(a); f(a); f(a); f(a)... | 34.337209 | 70 | 0.59194 |
4a2028f4251022373675f1562e12bcb28e4de162 | 1,020 | py | Python | test/IssueTest.py | AurisAudentis/rentify-server | 57a9e840dce96edf6d48deedc588b1a624213dd9 | [
"MIT"
] | null | null | null | test/IssueTest.py | AurisAudentis/rentify-server | 57a9e840dce96edf6d48deedc588b1a624213dd9 | [
"MIT"
] | 1 | 2020-07-20T00:26:00.000Z | 2020-07-20T00:26:00.000Z | test/IssueTest.py | AurisAudentis/rentify-server | 57a9e840dce96edf6d48deedc588b1a624213dd9 | [
"MIT"
] | null | null | null | from AuthTest import fetchToken, getHeader
import requests
header1 = getHeader(fetchToken("fill@filler.com", "rentify"))
header2 = getHeader(fetchToken("fill@filler.com", "rentify"))
r = requests.get("http://localhost:4200/groups", headers= header1)
# gidten = r.json()["tenant"][0]["_id"]
# r = requests.get(f"http:/... | 36.428571 | 159 | 0.694118 |
4a20296af17eba141c9cb06b754760c4774fc76d | 5,644 | py | Python | resnet_cifar.py | idstcv/KDA | 0f509e6a90f0593fc27514dcd93a9248d80931be | [
"Apache-2.0"
] | null | null | null | resnet_cifar.py | idstcv/KDA | 0f509e6a90f0593fc27514dcd93a9248d80931be | [
"Apache-2.0"
] | null | null | null | resnet_cifar.py | idstcv/KDA | 0f509e6a90f0593fc27514dcd93a9248d80931be | [
"Apache-2.0"
] | null | null | null | # modify from
# https://github.com/weiaicunzai/pytorch-cifar100/blob/master/models/resnet.py
"""resnet in pytorch
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun.
Deep Residual Learning for Image Recognition
https://arxiv.org/abs/1512.03385v1
"""
import torch
import torch.nn as nn
class BasicBlock(nn.... | 34.414634 | 118 | 0.633239 |
4a202c19b784d993cdc0a2320fe78e6a029e628c | 34,014 | py | Python | envEditorModel.py | Mr-Second/EnvEditor | f24ddf2f8922e1e8f5770a407cf4a810f43bae95 | [
"MIT"
] | 11 | 2020-12-23T12:15:47.000Z | 2021-03-06T08:01:59.000Z | envEditorModel.py | Mr-Second/EnvEditor | f24ddf2f8922e1e8f5770a407cf4a810f43bae95 | [
"MIT"
] | null | null | null | envEditorModel.py | Mr-Second/EnvEditor | f24ddf2f8922e1e8f5770a407cf4a810f43bae95 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'EnvEditor.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import ... | 58.343053 | 198 | 0.525254 |
4a202c8035f98d98cd2ab1f1b73aa7a42cbd1f17 | 256 | py | Python | Algorithms/856/best.py | M-Quadra/LeetCode-problems | 0cc100aa1e50b02df289f04fe2e0b97239eb9895 | [
"MIT"
] | null | null | null | Algorithms/856/best.py | M-Quadra/LeetCode-problems | 0cc100aa1e50b02df289f04fe2e0b97239eb9895 | [
"MIT"
] | null | null | null | Algorithms/856/best.py | M-Quadra/LeetCode-problems | 0cc100aa1e50b02df289f04fe2e0b97239eb9895 | [
"MIT"
] | null | null | null | class Solution:
def scoreOfParentheses(self, s: str) -> int:
opt, d = 0, 0
for i, v in enumerate(s):
d += 1 if v == '(' else -1
if v == ')' and s[i-1:i+1] == '()':
opt += 1 << d
return opt | 32 | 48 | 0.402344 |
4a202f9e9fd8d09b46a5f62aff0b77f0dc581e10 | 2,364 | py | Python | data/cirq_new/cirq_program/startCirq_pragma55.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_pragma55.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_pragma55.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=11
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
class Opty(cirq.PointOptimizer):
def optimization_at(
... | 30.701299 | 92 | 0.640863 |
4a202fc077193b4c50f9953dcea0180cfa1015cc | 1,394 | py | Python | pdf_bsw_gui/tests/test_plots.py | NSLS-II-PDF/pdf-bsw-gui | 6db847986d9bad6c59bdf3bca3b559959019ff46 | [
"BSD-3-Clause"
] | 3 | 2021-05-27T06:23:48.000Z | 2021-08-10T18:30:44.000Z | pdf_bsw_gui/tests/test_plots.py | NSLS-II-PDF/pdf-bsw-gui | 6db847986d9bad6c59bdf3bca3b559959019ff46 | [
"BSD-3-Clause"
] | 7 | 2021-05-06T03:15:12.000Z | 2021-07-19T16:09:07.000Z | pdf_bsw_gui/tests/test_plots.py | NSLS-II-PDF/pdf-bsw-gui | 6db847986d9bad6c59bdf3bca3b559959019ff46 | [
"BSD-3-Clause"
] | 3 | 2021-05-05T19:04:48.000Z | 2021-06-30T17:06:33.000Z | import os
import pytest
import tempfile
from pathlib import Path
from databroker._drivers.jsonl import BlueskyJSONLCatalog
from databroker.core import BlueskyRunFromGenerator
from bluesky_widgets.utils.streaming import stream_documents_into_runs
from bluesky_live.run_builder import RunBuilder
from ..kafka_previews imp... | 30.304348 | 97 | 0.705882 |
4a20301b3b9eb5f5211c10ad9ba42bd662953343 | 981 | py | Python | src/sovereign/utils/templates.py | bochuxt/envoy-control-plane-python3 | 6d63ad6e1ecff5365bb571f0021951b066f8e270 | [
"Apache-2.0"
] | 1 | 2020-07-08T19:37:09.000Z | 2020-07-08T19:37:09.000Z | src/sovereign/utils/templates.py | bochuxt/envoy-control-plane-python3 | 6d63ad6e1ecff5365bb571f0021951b066f8e270 | [
"Apache-2.0"
] | null | null | null | src/sovereign/utils/templates.py | bochuxt/envoy-control-plane-python3 | 6d63ad6e1ecff5365bb571f0021951b066f8e270 | [
"Apache-2.0"
] | null | null | null | from socket import gethostbyname_ex
from socket import gaierror as dns_error
from starlette.exceptions import HTTPException
from sovereign import config
from sovereign.decorators import memoize
from sovereign.statistics import stats
@memoize(5)
def resolve(address):
try:
with stats.timed('dns.resolve_ms',... | 25.153846 | 72 | 0.674822 |
4a2031771e441507455afdee349209c8892582a9 | 3,093 | py | Python | misc/loss.py | debayan/dsve-loc | 21b1e1837668b6daa0881514d0756e9bec039fcb | [
"BSD-3-Clause-Clear"
] | 56 | 2018-12-13T20:41:30.000Z | 2022-01-03T12:12:27.000Z | misc/loss.py | debayan/dsve-loc | 21b1e1837668b6daa0881514d0756e9bec039fcb | [
"BSD-3-Clause-Clear"
] | 17 | 2018-12-18T10:55:59.000Z | 2021-03-08T09:54:32.000Z | misc/loss.py | debayan/dsve-loc | 21b1e1837668b6daa0881514d0756e9bec039fcb | [
"BSD-3-Clause-Clear"
] | 22 | 2018-12-14T04:13:58.000Z | 2022-01-21T03:44:47.000Z | """
****************** COPYRIGHT AND CONFIDENTIALITY INFORMATION ******************
Copyright (c) 2018 [Thomson Licensing]
All Rights Reserved
This program contains proprietary information which is a trade secret/business \
secret of [Thomson Licensing] and is protected, even if unpublished, under \
applicable Co... | 39.653846 | 107 | 0.638215 |
4a2032b065147e1ac68f7839d5afcb48b163174b | 842 | py | Python | list-functions.py | CODEVELOPER1/PYTHON-FOLDER | 721870ad96b020fb02177a01fdd04ac730105995 | [
"MIT"
] | null | null | null | list-functions.py | CODEVELOPER1/PYTHON-FOLDER | 721870ad96b020fb02177a01fdd04ac730105995 | [
"MIT"
] | null | null | null | list-functions.py | CODEVELOPER1/PYTHON-FOLDER | 721870ad96b020fb02177a01fdd04ac730105995 | [
"MIT"
] | null | null | null | lucky_numbers = [4, 9, 15, 6, 7, 25, 16]
friends = ['Sam', 'Josh', 'Samantha', 'Jimmy', 'Jimmy', 'GodtheSon']
friends.extend(lucky_numbers) # take a list and append another list (item) on the other end of it
#friends.append('Creed') #adds element into the list
#friends.insert(1, 'James') # takes 2 paramenters 1st = ind... | 52.625 | 113 | 0.724466 |
4a2032d10fd34998aaedcc809e973a52f0e78695 | 2,328 | py | Python | misc/make_changelog.py | gaoxinge/taichi | 86d403f071b8505858763d4712b37cd71b89db91 | [
"MIT"
] | 1 | 2020-11-10T07:17:01.000Z | 2020-11-10T07:17:01.000Z | misc/make_changelog.py | gaoxinge/taichi | 86d403f071b8505858763d4712b37cd71b89db91 | [
"MIT"
] | 1 | 2020-08-24T05:18:43.000Z | 2020-08-24T05:18:43.000Z | misc/make_changelog.py | gaoxinge/taichi | 86d403f071b8505858763d4712b37cd71b89db91 | [
"MIT"
] | null | null | null | # Usage: make_changelog.py [v0.x.y]
import json
import os
import sys
from git import Repo
def load_pr_tags():
this_dir = os.path.dirname(os.path.abspath(__file__))
json_path = os.path.join(this_dir, 'prtags.json')
details = {}
with open(json_path) as f:
details = json.load(f)
details['re... | 27.069767 | 150 | 0.514175 |
4a20339dc9db8a26b56ea429636417c42fcb4e40 | 3,350 | py | Python | deep_learning_v2_pytorch/intro-to-pytorch/fc_model.py | TeoZosa/deep-learning-v2-pytorch | 8e73c26f2ebf49769b798e9ff26bd90d7de69f7d | [
"Apache-2.0"
] | null | null | null | deep_learning_v2_pytorch/intro-to-pytorch/fc_model.py | TeoZosa/deep-learning-v2-pytorch | 8e73c26f2ebf49769b798e9ff26bd90d7de69f7d | [
"Apache-2.0"
] | 159 | 2021-05-07T21:34:19.000Z | 2022-03-28T13:33:29.000Z | deep_learning_v2_pytorch/intro-to-pytorch/fc_model.py | TeoZosa/deep-learning-v2-pytorch | 8e73c26f2ebf49769b798e9ff26bd90d7de69f7d | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn.functional as F
from torch import nn
class Network(nn.Module):
def __init__(self, input_size, output_size, hidden_layers, drop_p=0.5):
"""Builds a feedforward network with arbitrary hidden layers.
Arguments
---------
input_size: integer, size of the in... | 32.211538 | 98 | 0.591343 |
4a2033c915fe426ab428e0ed38c6f9f1c782a81b | 3,436 | py | Python | airflow/contrib/operators/spark_sql_operator.py | vineet-rh/incubator-airflow | daa326cb4dc5e367182f344a957b979952731c73 | [
"Apache-2.0"
] | null | null | null | airflow/contrib/operators/spark_sql_operator.py | vineet-rh/incubator-airflow | daa326cb4dc5e367182f344a957b979952731c73 | [
"Apache-2.0"
] | 1 | 2016-10-19T21:49:51.000Z | 2016-10-19T21:49:51.000Z | airflow/contrib/operators/spark_sql_operator.py | isabella232/airflow | 99e7d8c61b25aeaf8a507cff0af10dc158159a4d | [
"Apache-2.0"
] | 1 | 2020-11-12T10:23:13.000Z | 2020-11-12T10:23:13.000Z | # -*- coding: utf-8 -*-
#
# 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, software
... | 37.347826 | 78 | 0.597497 |
4a2033dda453746383a4afa22125654fac1d8b11 | 501 | py | Python | 17/ex17.py | Yaro812/LearnPythonTheHardWay | 123c609edc96ae3253e177d82d4e04e3165d72f9 | [
"MIT"
] | null | null | null | 17/ex17.py | Yaro812/LearnPythonTheHardWay | 123c609edc96ae3253e177d82d4e04e3165d72f9 | [
"MIT"
] | null | null | null | 17/ex17.py | Yaro812/LearnPythonTheHardWay | 123c609edc96ae3253e177d82d4e04e3165d72f9 | [
"MIT"
] | null | null | null | from sys import argv
from os.path import exists
script, from_file, to_file = argv
print(f"Copying from {from_file} to {to_file}")
# could do with one line
in_file = open(from_file)
indata = in_file.read()
print(f"The input file is {len(indata)} bytes long")
print(f"Does the output file exist? {exists(to_file)}")
p... | 20.04 | 56 | 0.724551 |
4a2033e6d08d444607a7967b8dadef718b5ad9ca | 2,105 | py | Python | pysper/commands/ttop.py | arvy/sperf | c047ae5f3b1daf70cc227784197e4ef37caaf556 | [
"Apache-2.0"
] | null | null | null | pysper/commands/ttop.py | arvy/sperf | c047ae5f3b1daf70cc227784197e4ef37caaf556 | [
"Apache-2.0"
] | null | null | null | pysper/commands/ttop.py | arvy/sperf | c047ae5f3b1daf70cc227784197e4ef37caaf556 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 DataStax, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 51.341463 | 113 | 0.653207 |
4a20345f083f4a36beaf6a92a946f7853200a38f | 9,132 | py | Python | frameworks/hdfs/tests/test_ssl_kerberos_auth.py | jitupawar22/dcos-commons | 945fdce7591fd1e983eb9c9121e820d4cabe44e1 | [
"Apache-2.0"
] | 7 | 2017-11-02T05:26:40.000Z | 2020-01-27T19:33:52.000Z | frameworks/hdfs/tests/test_ssl_kerberos_auth.py | jitupawar22/dcos-commons | 945fdce7591fd1e983eb9c9121e820d4cabe44e1 | [
"Apache-2.0"
] | 14 | 2017-09-20T22:47:48.000Z | 2020-09-11T19:54:25.000Z | frameworks/hdfs/tests/test_ssl_kerberos_auth.py | AlexRogalskiy/dcos-commons | 85711f05bc94172aabb6837f9ff529721437d20c | [
"Apache-2.0"
] | 9 | 2017-11-14T19:43:07.000Z | 2022-01-06T12:44:49.000Z | import logging
import uuid
import pytest
import sdk_auth
import sdk_cmd
import sdk_hosts
import sdk_install
import sdk_marathon
import sdk_security
import sdk_utils
from security import kerberos as krb5
from security import transport_encryption
from tests import auth
from tests import config
log = logging.getLogge... | 34.460377 | 111 | 0.643561 |
4a20347137062a585eb1f96672a5b84d7d3ead7c | 4,881 | py | Python | venv/Lib/site-packages/pandas/tests/indexing/interval/test_interval.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | 1 | 2021-02-06T21:00:00.000Z | 2021-02-06T21:00:00.000Z | venv/Lib/site-packages/pandas/tests/indexing/interval/test_interval.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/indexing/interval/test_interval.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import pandas as pd
from pandas import DataFrame, IntervalIndex, Series
import pandas._testing as tm
class TestIntervalIndex:
def setup_method(self, method):
self.s = Series(np.arange(5), IntervalIndex.from_breaks(np.arange(6)))
def test_getitem_with_scal... | 32.54 | 88 | 0.508912 |
4a20354ba62661407ba40f2bb2d63130eef81f3b | 16,159 | py | Python | ravenframework/IndexSets.py | dgarrett622/raven | f36cc108f7500b0e2717df4832b69b801b43960d | [
"Apache-2.0"
] | null | null | null | ravenframework/IndexSets.py | dgarrett622/raven | f36cc108f7500b0e2717df4832b69b801b43960d | [
"Apache-2.0"
] | null | null | null | ravenframework/IndexSets.py | dgarrett622/raven | f36cc108f7500b0e2717df4832b69b801b43960d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 34.675966 | 143 | 0.623739 |
4a2036fed363ac2de67c0ad0e48abea568262fae | 65,281 | py | Python | tripleo_common/tests/actions/test_parameters.py | d0ugal/tripleo-common | dcf76e1e905613170d2011d0430bed5d35fe1006 | [
"Apache-2.0"
] | 2 | 2016-05-25T14:55:27.000Z | 2020-04-13T09:53:09.000Z | tripleo_common/tests/actions/test_parameters.py | d0ugal/tripleo-common | dcf76e1e905613170d2011d0430bed5d35fe1006 | [
"Apache-2.0"
] | null | null | null | tripleo_common/tests/actions/test_parameters.py | d0ugal/tripleo-common | dcf76e1e905613170d2011d0430bed5d35fe1006 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Red Hat, 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 applicable law ... | 41.713099 | 79 | 0.605153 |
4a20373b72940dd1c7a1c69724ed1fe576fda8a1 | 18,481 | py | Python | gbmgeometry/_version.py | drJfunk/gbmgeometry | ca11005c349546ed962bb1bbc4f66d8022ea79a1 | [
"MIT"
] | 4 | 2019-10-31T06:28:13.000Z | 2020-03-28T14:31:07.000Z | gbmgeometry/_version.py | drJfunk/gbmgeometry | ca11005c349546ed962bb1bbc4f66d8022ea79a1 | [
"MIT"
] | 4 | 2020-03-04T16:16:39.000Z | 2020-04-08T11:28:03.000Z | gbmgeometry/_version.py | drJfunk/gbmgeometry | ca11005c349546ed962bb1bbc4f66d8022ea79a1 | [
"MIT"
] | 7 | 2017-10-26T09:32:37.000Z | 2022-03-21T16:32:20.000Z | # This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains th... | 33.179533 | 88 | 0.584113 |
4a203a96475d4aff3d3d631e08d26f7d188947c5 | 12,466 | py | Python | tests/model_tests.py | thibault-ketterer/incubator-superset | 7386b017ab2ee5847c5bbe2f7aa551c4f8b1a8cb | [
"Apache-2.0"
] | 16 | 2017-01-22T19:24:02.000Z | 2021-04-29T05:34:33.000Z | tests/model_tests.py | thibault-ketterer/incubator-superset | 7386b017ab2ee5847c5bbe2f7aa551c4f8b1a8cb | [
"Apache-2.0"
] | 339 | 2017-03-09T00:02:21.000Z | 2022-03-29T22:28:50.000Z | tests/model_tests.py | thibault-ketterer/incubator-superset | 7386b017ab2ee5847c5bbe2f7aa551c4f8b1a8cb | [
"Apache-2.0"
] | 5 | 2017-06-27T03:42:10.000Z | 2020-02-14T18:38:22.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... | 37.21194 | 88 | 0.643751 |
4a203af041450b3625906586d8bb62ab1e0ecb40 | 3,330 | py | Python | tests/test_libs_tz_utils.py | fyntex/lib-cl-sii-python | b6ffb72be1f173a1d2e44b17ae5c08caf96ebf34 | [
"MIT"
] | 8 | 2020-03-07T19:58:40.000Z | 2021-12-15T13:47:40.000Z | tests/test_libs_tz_utils.py | fyntex/lib-cl-sii-python | b6ffb72be1f173a1d2e44b17ae5c08caf96ebf34 | [
"MIT"
] | 141 | 2020-01-17T22:47:35.000Z | 2022-03-31T18:29:47.000Z | tests/test_libs_tz_utils.py | fyntex/lib-cl-sii-python | b6ffb72be1f173a1d2e44b17ae5c08caf96ebf34 | [
"MIT"
] | 3 | 2020-03-07T20:30:02.000Z | 2021-03-22T03:14:26.000Z | import datetime
import re
import unittest
from cl_sii.libs.tz_utils import ( # noqa: F401
convert_naive_dt_to_tz_aware, convert_tz_aware_dt_to_naive,
dt_is_aware, dt_is_naive, get_now_tz_aware, validate_dt_tz,
PytzTimezone, _TZ_CL_SANTIAGO, TZ_UTC,
)
class FunctionsTest(unittest.TestCase):
def test... | 39.176471 | 97 | 0.689189 |
4a203b077bee40fb4377745e12eb3c807e1f020e | 259 | py | Python | lab6_sln/text_recognizer/datasets/__init__.py | sergeyktest/fsdl-text-recognizer-project | 0a35a2cb5b55cfcc1cde661b305c5c635272657c | [
"MIT"
] | 44 | 2018-08-01T07:39:37.000Z | 2021-10-31T10:11:54.000Z | lab6_sln/text_recognizer/datasets/__init__.py | sanzgiri/fsdl-text-recognizer-project | 1bf7b8655f36149e3c1fcd7726be120d6b0e7b63 | [
"MIT"
] | 1 | 2018-08-03T19:38:09.000Z | 2018-08-03T19:38:09.000Z | lab6_sln/text_recognizer/datasets/__init__.py | sanzgiri/fsdl-text-recognizer-project | 1bf7b8655f36149e3c1fcd7726be120d6b0e7b63 | [
"MIT"
] | 182 | 2018-08-01T01:50:40.000Z | 2022-03-25T19:45:36.000Z | from .emnist import EmnistDataset
##### Hide lines below until Lab 2
from .emnist_lines import EmnistLinesDataset
##### Hide lines above until Lab 2
##### Hide lines below until Lab 5
from .iam_lines import IamLinesDataset
##### Hide lines below until Lab 5
| 28.777778 | 44 | 0.752896 |
4a203b6384feeafe2fe7da1d73ab8b845c393ed4 | 4,591 | py | Python | robot-server/robot_server/service/dependencies.py | soroushjp/opentrons | f7e82834417630d5e6c90ed452de35d80eb1be8a | [
"Apache-2.0"
] | null | null | null | robot-server/robot_server/service/dependencies.py | soroushjp/opentrons | f7e82834417630d5e6c90ed452de35d80eb1be8a | [
"Apache-2.0"
] | null | null | null | robot-server/robot_server/service/dependencies.py | soroushjp/opentrons | f7e82834417630d5e6c90ed452de35d80eb1be8a | [
"Apache-2.0"
] | null | null | null | import typing
from starlette import status
from fastapi import Depends, HTTPException, Header
from starlette.requests import Request
from opentrons.hardware_control import ThreadManager, ThreadedAsyncLock
from robot_server import constants, util
from robot_server.hardware_wrapper import HardwareWrapper
from robot_ser... | 34.007407 | 78 | 0.69266 |
4a203bcf43f708b9dfb6645b40630a9605305361 | 4,101 | py | Python | app/notification_manage.py | mapoetto/group2_CTFLab | 5b492ce46875ea37a57701686897bd9613e2dd13 | [
"MIT"
] | 1 | 2021-10-15T14:37:33.000Z | 2021-10-15T14:37:33.000Z | app/notification_manage.py | mapoetto/group2_CTFLab | 5b492ce46875ea37a57701686897bd9613e2dd13 | [
"MIT"
] | null | null | null | app/notification_manage.py | mapoetto/group2_CTFLab | 5b492ce46875ea37a57701686897bd9613e2dd13 | [
"MIT"
] | null | null | null | import json
import urllib
from app.models import Notifica, Notifica_vista
from app.models import User
from django.db.models import Q
def decode_input(inputs):
RETURNED = {}
for key,value in inputs.items():
RETURNED[key] = urllib.parse.unquote(value)
return RETURNED
def insert_notification(in... | 43.62766 | 194 | 0.55328 |
4a203c64c3df0390325062e836ba670f358c7e55 | 1,547 | py | Python | examples/pubsub2.py | emorozov/aioredis | bad0bd2d1435e56688d189cf3209beec3d239557 | [
"MIT"
] | null | null | null | examples/pubsub2.py | emorozov/aioredis | bad0bd2d1435e56688d189cf3209beec3d239557 | [
"MIT"
] | 75 | 2020-12-09T06:53:47.000Z | 2022-03-25T01:05:24.000Z | examples/pubsub2.py | emorozov/aioredis | bad0bd2d1435e56688d189cf3209beec3d239557 | [
"MIT"
] | null | null | null | import asyncio
import aioredis
async def pubsub():
sub = await aioredis.create_redis("redis://localhost")
ch1, ch2 = await sub.subscribe("channel:1", "channel:2")
assert isinstance(ch1, aioredis.Channel)
assert isinstance(ch2, aioredis.Channel)
async def async_reader(channel):
while awai... | 28.127273 | 70 | 0.603103 |
4a203c785c1b3600979c2832c2a05dee796fe804 | 1,623 | py | Python | algorithms/code/leetcode/lc216_combination_sum_iii/lc216_combination_sum_iii.py | altermarkive/training | 6a13f5b2f466156ad5db0e25da0e601d2404b4c3 | [
"MIT"
] | null | null | null | algorithms/code/leetcode/lc216_combination_sum_iii/lc216_combination_sum_iii.py | altermarkive/training | 6a13f5b2f466156ad5db0e25da0e601d2404b4c3 | [
"MIT"
] | 1 | 2022-02-16T11:28:56.000Z | 2022-02-16T11:28:56.000Z | algorithms/code/leetcode/lc216_combination_sum_iii/lc216_combination_sum_iii.py | altermarkive/training | 6a13f5b2f466156ad5db0e25da0e601d2404b4c3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# https://leetcode.com/problems/combination-sum-iii/
import unittest
from typing import List
class Solution:
# pylint: disable=R0913
def __traverse(self, contains, summed, left, n, found, start):
if left == 0 and summed == n:
found.append(contains)
else:
... | 30.622642 | 75 | 0.523105 |
4a203dc31bd5498df991022a4a75653dee87018f | 3,054 | py | Python | apps/giphy.py | skyksit/jandibot | 0d708a5142bbadc346e34b51b757f7e97ceac14c | [
"MIT"
] | 1 | 2019-10-31T05:53:47.000Z | 2019-10-31T05:53:47.000Z | apps/giphy.py | skyksit/jandibot | 0d708a5142bbadc346e34b51b757f7e97ceac14c | [
"MIT"
] | 1 | 2020-06-05T18:41:08.000Z | 2020-06-05T18:41:08.000Z | apps/giphy.py | skyksit/jandibot | 0d708a5142bbadc346e34b51b757f7e97ceac14c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
@author: skyksit
"""
import os
import re
import time
import random
import requests
from apps.decorators import on_command
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.optio... | 30.237624 | 105 | 0.602161 |
4a203f4708306f28aaa44c906836eefb11be44ff | 4,475 | py | Python | mne/commands/mne_browse_raw.py | achilleas-k/mne-python | 0078e1af13a92ab47498dd167bc5ec73be864427 | [
"BSD-3-Clause"
] | 1 | 2019-03-22T04:47:45.000Z | 2019-03-22T04:47:45.000Z | mne/commands/mne_browse_raw.py | achilleas-k/mne-python | 0078e1af13a92ab47498dd167bc5ec73be864427 | [
"BSD-3-Clause"
] | 4 | 2016-06-04T15:28:08.000Z | 2016-12-22T14:23:13.000Z | mne/commands/mne_browse_raw.py | achilleas-k/mne-python | 0078e1af13a92ab47498dd167bc5ec73be864427 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
r"""Browse raw data.
You can do for example:
$ mne browse_raw --raw sample_audvis_raw.fif \
--proj sample_audvis_ecg-proj.fif \
--eve sample_audvis_raw-eve.fif
"""
# Authors : Eric Larson, PhD
import sys
import mne
def run():
"""Run command."""
impor... | 37.291667 | 75 | 0.574302 |
4a203f4e93a9f20d1e28c6b2008920c0511202dc | 3,384 | py | Python | baseline/bitextor_util/lett2ridx_combine.py | parallelcrawl/DataCollection | 4308473e6b53779159a15c1416bff3f2291dd1f2 | [
"Apache-2.0"
] | 8 | 2018-02-08T16:03:00.000Z | 2022-01-19T11:41:38.000Z | baseline/bitextor_util/lett2ridx_combine.py | paracrawl/DataCollection | 4308473e6b53779159a15c1416bff3f2291dd1f2 | [
"Apache-2.0"
] | 3 | 2017-08-08T10:53:29.000Z | 2017-08-08T10:58:51.000Z | baseline/bitextor_util/lett2ridx_combine.py | parallelcrawl/DataCollection | 4308473e6b53779159a15c1416bff3f2291dd1f2 | [
"Apache-2.0"
] | 4 | 2018-06-09T21:53:09.000Z | 2022-01-19T11:41:48.000Z | #!/usr/bin/env python
import sys
from operator import itemgetter
from collections import defaultdict
def read_source_chunk(filename, n):
""" Reads a couple of source documents at a time """
docs = []
with open(filename, 'r') as sf:
for sline in sf:
s_doc_id, s_tokens = sline.split('\t... | 41.777778 | 78 | 0.538121 |
4a203fc8e1c0459595b3384752e54c1503b72ed1 | 11,587 | py | Python | kubernetes/client/models/v1_deployment_status.py | lp67/python | 33c5ea9835356410ce4a9fa54a02c6a2a22143c6 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_deployment_status.py | lp67/python | 33c5ea9835356410ce4a9fa54a02c6a2a22143c6 | [
"Apache-2.0"
] | 4 | 2019-11-19T10:33:47.000Z | 2022-03-01T03:33:52.000Z | kubernetes/client/models/v1_deployment_status.py | mohramadan911/PythonClientAPI | 5d111812c81b7a573ac8661d1aec60bb97072412 | [
"Apache-2.0"
] | 2 | 2021-08-10T16:35:31.000Z | 2021-09-14T04:53:06.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.20
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 36.322884 | 297 | 0.66074 |
4a204071c6edccdd3f80911cfa0008e098edddb2 | 65,056 | py | Python | databricks/koalas/indexing.py | varunsh-coder/koalas | 1cfc9ec76a1b023d89870688bf802cf58df537f1 | [
"Apache-2.0"
] | 3,211 | 2019-04-22T04:40:50.000Z | 2022-03-31T10:42:31.000Z | databricks/koalas/indexing.py | varunsh-coder/koalas | 1cfc9ec76a1b023d89870688bf802cf58df537f1 | [
"Apache-2.0"
] | 2,017 | 2019-04-21T23:37:12.000Z | 2022-03-24T03:48:51.000Z | databricks/koalas/indexing.py | varunsh-coder/koalas | 1cfc9ec76a1b023d89870688bf802cf58df537f1 | [
"Apache-2.0"
] | 375 | 2019-04-21T23:58:57.000Z | 2022-03-30T00:42:19.000Z | #
# Copyright (C) 2019 Databricks, 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... | 37.669948 | 100 | 0.567327 |
4a20416f1a22430eb3fda82b7ad8f579e91ff4ca | 3,766 | py | Python | tests/client.py | RossLote/lingo24 | 44d33b2c7dd040ba90f4ea090038aaa22721c9df | [
"MIT"
] | null | null | null | tests/client.py | RossLote/lingo24 | 44d33b2c7dd040ba90f4ea090038aaa22721c9df | [
"MIT"
] | null | null | null | tests/client.py | RossLote/lingo24 | 44d33b2c7dd040ba90f4ea090038aaa22721c9df | [
"MIT"
] | 1 | 2021-04-21T06:58:29.000Z | 2021-04-21T06:58:29.000Z | import json
import requests_mock
from mock import Mock, patch
from lingo24.business_documents import (
Authenticator,
Client,
)
from .base import BaseTestCase
mock_time = Mock()
mock_time.return_value = 10000
class ClientTestCase(BaseTestCase):
def test_api_endpoint_url(self):
authenticato... | 40.934783 | 101 | 0.635688 |
4a204191986abeaec8ac1df5ebadbbe82b515f56 | 1,714 | py | Python | utils/processing.py | morganmcg1/antra | a34eb1e05ccd140501af7b8555110dcb999e4af0 | [
"Apache-2.0"
] | 1 | 2020-08-10T06:18:48.000Z | 2020-08-10T06:18:48.000Z | utils/processing.py | morganmcg1/antra | a34eb1e05ccd140501af7b8555110dcb999e4af0 | [
"Apache-2.0"
] | null | null | null | utils/processing.py | morganmcg1/antra | a34eb1e05ccd140501af7b8555110dcb999e4af0 | [
"Apache-2.0"
] | null | null | null | '''
Functions do process translations made by the model, removing special chars etc
'''
import re
def fastai_process_trans(trans):
trans_ls=[]
for s in trans:
#print(s)
tmp = s.replace('xxbos','')
tmp = tmp.replace('xxeos','')
tmp = tmp.replace(' .','.')
tmp = tmp.r... | 34.28 | 83 | 0.435239 |
4a2041cf26879b8c374dd867d4799f33d7512275 | 45,969 | py | Python | pylib/gyp/generator/cmake.py | chlorm-forks/gyp | a8921fcaab1a18c8cf7e4ab09ceb940e336918ec | [
"BSD-3-Clause"
] | 77 | 2018-07-01T15:55:34.000Z | 2022-03-30T09:16:54.000Z | pylib/gyp/generator/cmake.py | chlorm-forks/gyp | a8921fcaab1a18c8cf7e4ab09ceb940e336918ec | [
"BSD-3-Clause"
] | 116 | 2021-05-29T16:32:51.000Z | 2021-08-13T16:05:29.000Z | pylib/gyp/generator/cmake.py | chlorm-forks/gyp | a8921fcaab1a18c8cf7e4ab09ceb940e336918ec | [
"BSD-3-Clause"
] | 53 | 2018-04-13T12:06:06.000Z | 2022-03-25T13:54:38.000Z | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""cmake output module
This module is under development and should be considered experimental.
This module produces cmake (2.8.8+) input as its output. One CMake... | 36.570406 | 80 | 0.69338 |
4a2041d67402b523dbeac4b60821e513ddaba093 | 320,348 | py | Python | languages/de.py | stevenaldinger/eden | 68f6526ee2d56c1b9ead1b52f84afb232078cc81 | [
"MIT"
] | 1 | 2021-09-10T00:14:54.000Z | 2021-09-10T00:14:54.000Z | languages/de.py | Timileyin5/eden | c5d749651101dabc06d7dea8e1d39544258f0d37 | [
"MIT"
] | null | null | null | languages/de.py | Timileyin5/eden | c5d749651101dabc06d7dea8e1d39544258f0d37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
{
"'Cancel' will indicate an asset log entry did not occur": "'Abbrechen' zeigt an, dass ein Asset Log Eintrag nicht eingetreten ist",
"A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has... | 59.666232 | 931 | 0.767347 |
4a2043539a8beda8629c2d1d8f7829b65703f448 | 1,092 | py | Python | work_at_olist/authors/viewsets.py | diego-marcelino/work-at-olist | e0d7de566969c0b8ae555732ab52248e0f7e0481 | [
"MIT"
] | null | null | null | work_at_olist/authors/viewsets.py | diego-marcelino/work-at-olist | e0d7de566969c0b8ae555732ab52248e0f7e0481 | [
"MIT"
] | 16 | 2021-02-08T07:22:24.000Z | 2022-03-30T12:07:05.000Z | work_at_olist/authors/viewsets.py | diego-marcelino/work-at-olist | e0d7de566969c0b8ae555732ab52248e0f7e0481 | [
"MIT"
] | 1 | 2020-08-12T14:30:07.000Z | 2020-08-12T14:30:07.000Z | from django.utils.translation import gettext_lazy as _
from django_filters import rest_framework as filters
from rest_framework.viewsets import ModelViewSet
from .models import Author
from .serializers import AuthorSerializer
class AuthorFilter(filters.FilterSet):
"""Filter for authors."""
name = filters.Ch... | 23.73913 | 79 | 0.690476 |
4a2043a130044ec36817c839ea040210d94c89d5 | 1,058 | py | Python | script/preprocessing/tokenizer.py | henriettekhn/MLinPractice | ad05f0137a407a17e75ffca08706c5250bcd0d49 | [
"MIT"
] | null | null | null | script/preprocessing/tokenizer.py | henriettekhn/MLinPractice | ad05f0137a407a17e75ffca08706c5250bcd0d49 | [
"MIT"
] | null | null | null | script/preprocessing/tokenizer.py | henriettekhn/MLinPractice | ad05f0137a407a17e75ffca08706c5250bcd0d49 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tokenize the tweet into individual words.
Created on Wed Oct 6 13:59:54 2021
@author: lbechberger
"""
from script.preprocessing.preprocessor import Preprocessor
import nltk
class Tokenizer(Preprocessor):
"""Tokenizes the given input column into individual word... | 28.594595 | 78 | 0.621928 |
4a2043bba8bfb188f86d2595d6fa097381cf61ec | 794 | py | Python | setup.py | steveWinter/python-fmrest | 2a3243b0b22021d435ae4a239fecc5cc2fc546bb | [
"MIT"
] | null | null | null | setup.py | steveWinter/python-fmrest | 2a3243b0b22021d435ae4a239fecc5cc2fc546bb | [
"MIT"
] | null | null | null | setup.py | steveWinter/python-fmrest | 2a3243b0b22021d435ae4a239fecc5cc2fc546bb | [
"MIT"
] | null | null | null | from setuptools import setup
with open('README.md', 'r', encoding='utf-8') as ld:
long_description = ld.read()
setup(
name='python-fmrest',
version='1.2.1',
python_requires='>=3.6',
author='David Hamann',
author_email='dh@davidhamann.de',
description='python-fmrest is a wrapper around the ... | 30.538462 | 76 | 0.661209 |
4a2044139ce9399210988dce1bd54b2c48e21aa2 | 3,389 | py | Python | asyncpokepy/ahttp.py | DJJ05/asyncpokepy | 8c2b05a3427bacf2335bf1e379a2dd6d92364b68 | [
"MIT"
] | 1 | 2021-11-08T11:06:29.000Z | 2021-11-08T11:06:29.000Z | asyncpokepy/ahttp.py | DevilJamJar/asyncpokepy | 8c2b05a3427bacf2335bf1e379a2dd6d92364b68 | [
"MIT"
] | null | null | null | asyncpokepy/ahttp.py | DevilJamJar/asyncpokepy | 8c2b05a3427bacf2335bf1e379a2dd6d92364b68 | [
"MIT"
] | 1 | 2021-09-28T18:17:35.000Z | 2021-09-28T18:17:35.000Z | """
The MIT License (MIT)
Copyright (c) 2020 Raj Sharma
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, p... | 33.89 | 115 | 0.614636 |
4a20447f2063d722bdf287ef1b211bc2d5c59ac3 | 3,624 | py | Python | qcdb/__init__.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | qcdb/__init__.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | qcdb/__init__.py | nuwandesilva/qcdb | b47fb2ed550fc4176198ddb1dbea3724d6704d23 | [
"BSD-3-Clause"
] | null | null | null | #
# @BEGIN LICENSE
#
# QCDB: quantum chemistry common driver and databases
#
# Copyright (c) 2007-2017 The QCDB Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of QCDB.
#
# QCDB is free software; you can redistribute it and/or modify
# it ... | 34.514286 | 99 | 0.767108 |
4a20449440a810d3962802b75f54f3c6a9141590 | 920 | py | Python | ecommerce/products/models.py | starboi02/e-commerce-CMS | 9307854521a44d4277a0045541c0754201f3c1ff | [
"Apache-2.0"
] | 2 | 2020-04-21T19:49:48.000Z | 2022-03-26T10:24:15.000Z | ecommerce/products/models.py | starboi02/e-commerce-CMS | 9307854521a44d4277a0045541c0754201f3c1ff | [
"Apache-2.0"
] | 8 | 2020-02-02T05:45:39.000Z | 2021-06-10T19:43:24.000Z | ecommerce/products/models.py | starboi02/e-commerce-CMS | 9307854521a44d4277a0045541c0754201f3c1ff | [
"Apache-2.0"
] | 6 | 2020-02-02T13:50:58.000Z | 2021-10-04T17:43:41.000Z | from django.db import models
from django.urls import reverse
# Category Model
# TODO- Add model for sub-category inside the categories
class Category(models.Model):
title = models.CharField(max_length=300)
def __str__(self):
return self.title
#Product Model
class Product(models.Model):
mainimage ... | 30.666667 | 80 | 0.703261 |
4a2044aea5c663dd5092b7d7dd822749d6d8374c | 13,638 | py | Python | medimg/dcm/mr/ge.py | henrymj/nimsdata | 7009c3316d9cb4255de44bd46258979a18a1e224 | [
"MIT"
] | 2 | 2016-03-26T09:43:55.000Z | 2016-11-15T11:22:06.000Z | medimg/dcm/mr/ge.py | henrymj/nimsdata | 7009c3316d9cb4255de44bd46258979a18a1e224 | [
"MIT"
] | null | null | null | medimg/dcm/mr/ge.py | henrymj/nimsdata | 7009c3316d9cb4255de44bd46258979a18a1e224 | [
"MIT"
] | 1 | 2017-11-18T10:06:57.000Z | 2017-11-18T10:06:57.000Z | # @author: Kevin S. Hahn
"""
nimsdata.medimg.dcm.mr.ge
=========================
load all data from a set of GE Dicoms, almost all information is available via non-private tags.
Cannot be instantiated. This object is merely a container for GE specific processing functions.
GE saves screenshot of the graphical pre... | 45.61204 | 159 | 0.673779 |
4a2044dbb84ac3ca5d4a3fa65ef46bcc3204d88d | 26,719 | py | Python | pennylane/plugins/default_gaussian.py | shashanka300/pennylane | 194ccd00a9a7f7075c37680c970e56bab4808e60 | [
"Apache-2.0"
] | 1 | 2019-02-28T09:16:33.000Z | 2019-02-28T09:16:33.000Z | pennylane/plugins/default_gaussian.py | shashanka300/pennylane | 194ccd00a9a7f7075c37680c970e56bab4808e60 | [
"Apache-2.0"
] | null | null | null | pennylane/plugins/default_gaussian.py | shashanka300/pennylane | 194ccd00a9a7f7075c37680c970e56bab4808e60 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Xanadu Quantum Technologies 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 agre... | 30.021348 | 102 | 0.580224 |
4a2045f366e4b97ae82b723ce264a0c2350500ec | 2,003 | py | Python | uasyncio.core/test_cancel.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | 126 | 2019-07-19T14:42:41.000Z | 2022-03-21T22:22:19.000Z | uasyncio.core/test_cancel.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | 38 | 2019-08-28T01:46:31.000Z | 2022-03-17T05:46:51.000Z | uasyncio.core/test_cancel.py | MaxTurchin/pycopy-lib | d7a69fc2a28031e2ca475c29239f715c1809d8cc | [
"PSF-2.0"
] | 55 | 2019-08-02T09:32:33.000Z | 2021-12-22T11:25:51.000Z | # Runs both in Pycopy and CPython.
import time
try:
import uasyncio.core as asyncio
is_uasyncio = True
except ImportError:
import asyncio
is_uasyncio = False
import logging
#logging.basicConfig(level=logging.DEBUG)
#asyncio.set_debug(True)
BUSY_SLEEP = 0
output = []
cancelled = False
# Can be used t... | 23.290698 | 79 | 0.611583 |
4a204651f96b81873673bb3b7f64210e8895edab | 1,656 | py | Python | migrations/extract-views.py | dreibh/planetlab-lxc-plcapi | 065dfc54a2b668e99eab343d113f1a31fb154b13 | [
"BSD-3-Clause"
] | null | null | null | migrations/extract-views.py | dreibh/planetlab-lxc-plcapi | 065dfc54a2b668e99eab343d113f1a31fb154b13 | [
"BSD-3-Clause"
] | null | null | null | migrations/extract-views.py | dreibh/planetlab-lxc-plcapi | 065dfc54a2b668e99eab343d113f1a31fb154b13 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import sys
import re
class Schema:
def __init__ (self,input,output=None):
self.input=input
self.output=output
# left part is non-greedy
comment = re.compile("(.*?)--.*")
spaces = re.compile("^\s+(\S.*)")
view = re.compile("(?i)\s*create\s+(or\s+replace)?\s+... | 29.052632 | 71 | 0.513889 |
4a20466e0db5bda07794fb1433f7da4c5a959fe4 | 3,461 | py | Python | Final/dmfinal/court.py | may811204/EE380LDataMining | fea8470e51e2db3805979199562edaddf2f03f5b | [
"Apache-2.0"
] | null | null | null | Final/dmfinal/court.py | may811204/EE380LDataMining | fea8470e51e2db3805979199562edaddf2f03f5b | [
"Apache-2.0"
] | 1 | 2018-02-22T21:45:43.000Z | 2018-02-22T21:45:43.000Z | Final/dmfinal/court.py | may811204/EE380LDataMining | fea8470e51e2db3805979199562edaddf2f03f5b | [
"Apache-2.0"
] | 2 | 2018-04-25T01:39:47.000Z | 2018-05-09T23:34:31.000Z | def CourtShape():
court_shapes = []
outer_lines_shape = dict(
type='rect',
xref='x',
yref='y',
x0='-250',
y0='-47.5',
x1='250',
y1='422.5',
line=dict(
color='rgba(10, 10, 10, 1)',
width=1
)
)
court_shapes.ap... | 19.777143 | 55 | 0.421843 |
4a20472796ec9c8ed6cec91dd68817f17ae8da6b | 272 | py | Python | Elementary/Conditions/Conditionals.py | ArnobMahmud/Python-Series | 5ea451ceae25367c1439d9785cf9b45b3b658623 | [
"MIT"
] | null | null | null | Elementary/Conditions/Conditionals.py | ArnobMahmud/Python-Series | 5ea451ceae25367c1439d9785cf9b45b3b658623 | [
"MIT"
] | null | null | null | Elementary/Conditions/Conditionals.py | ArnobMahmud/Python-Series | 5ea451ceae25367c1439d9785cf9b45b3b658623 | [
"MIT"
] | null | null | null | '''
Author : Arnob Mahmud
Mail : arnob.tech.me @ gmail.com
'''
num1 = int(input("Enter 1st number :"))
num2 = int(input("Enter 2nd number :"))
if num1 > num2:
print("Your 1st number is the maximum value")
else:
print("Your 2nd number is the maximum value") | 22.666667 | 49 | 0.647059 |
4a2049014f133993d47156c88193a047bc2ccc2c | 502 | py | Python | sources/4chan.py | spmassot/FaceProject | 14ca44c05dfc570a21548ca56e075e550c2c9abc | [
"MIT"
] | 1 | 2018-03-14T12:38:43.000Z | 2018-03-14T12:38:43.000Z | sources/4chan.py | automatonymous/FaceProject | 14ca44c05dfc570a21548ca56e075e550c2c9abc | [
"MIT"
] | 2 | 2021-02-08T20:19:52.000Z | 2021-06-01T21:52:31.000Z | sources/4chan.py | automatonymous/FaceProject | 14ca44c05dfc570a21548ca56e075e550c2c9abc | [
"MIT"
] | null | null | null | import re
import basc_py4chan
from pandas import DataFrame
def get_board(board):
return [get_thread(x) for x in basc_py4chan.Board(board).get_threads()]
def get_thread(thread):
return [get_post(x) for x in thread.all_posts]
def get_post(post):
reply = re.compile('>>\d+')
txt = post.text_comment.strip... | 25.1 | 75 | 0.673307 |
4a20495f639c765495a4ba9bc3f445aea710132e | 1,811 | py | Python | src/setup.py | konung-yaropolk/pyABF | b5620e73ac5d060129b844da44f8b2611536ac56 | [
"MIT"
] | null | null | null | src/setup.py | konung-yaropolk/pyABF | b5620e73ac5d060129b844da44f8b2611536ac56 | [
"MIT"
] | null | null | null | src/setup.py | konung-yaropolk/pyABF | b5620e73ac5d060129b844da44f8b2611536ac56 | [
"MIT"
] | null | null | null | import os
from setuptools import setup
from setuptools import find_packages
import sys
if sys.version_info[:2] < (3, 6):
raise RuntimeError("Python version >= 3.6 required.")
# load the description
PATH_HERE = os.path.abspath(os.path.dirname(__file__))
with open(os.path.abspath(PATH_HERE+"/README.rst")) as f:
... | 34.169811 | 79 | 0.6455 |
4a204961c896b47a81f45b332d5560563d610d75 | 579 | py | Python | oldp/apps/courts/migrations/0014_auto_20181203_1057.py | docsuleman/oldp | 8dcaa8e6e435794c872346b5014945ace885adb4 | [
"MIT"
] | 66 | 2018-05-07T12:34:39.000Z | 2022-02-23T20:14:24.000Z | oldp/apps/courts/migrations/0014_auto_20181203_1057.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 68 | 2018-06-11T16:13:17.000Z | 2022-02-10T08:03:26.000Z | oldp/apps/courts/migrations/0014_auto_20181203_1057.py | Justice-PLP-DHV/oldp | eadf235bb0925453d9a5b81963a0ce53afeb17fd | [
"MIT"
] | 15 | 2018-06-23T19:41:13.000Z | 2021-08-18T08:21:49.000Z | # Generated by Django 2.1.2 on 2018-12-03 10:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('courts', '0013_auto_20181128_1054'),
]
operations = [
migrations.RenameField(
model_name='court',
old_name='updated'... | 24.125 | 102 | 0.580311 |
4a2049a3dc233dd76a08db94dcc57e0f5ef382e8 | 1,345 | py | Python | Dynamic Obstacle Simulation/State_Estimator.py | TSummersLab/Risk_Bounded_Nonlinear_Robot_Motion_Planning | 717b9f07f4ed625ee33ab8ec22ce78dc2907d759 | [
"MIT"
] | 3 | 2022-01-07T19:37:03.000Z | 2022-03-15T08:50:28.000Z | Dynamic Obstacle Simulation/State_Estimator.py | TSummersLab/Risk_Bounded_Nonlinear_Robot_Motion_Planning | 717b9f07f4ed625ee33ab8ec22ce78dc2907d759 | [
"MIT"
] | null | null | null | Dynamic Obstacle Simulation/State_Estimator.py | TSummersLab/Risk_Bounded_Nonlinear_Robot_Motion_Planning | 717b9f07f4ed625ee33ab8ec22ce78dc2907d759 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 27 12:26:45 2020
@author: vxr131730
2D State Estimator Class to be used for the CARLA.
"""
###############################################################################
###############################################################################
import U... | 32.804878 | 80 | 0.346468 |
4a204a582373f7101ac773222bc18c61f01367f2 | 18,023 | py | Python | synapse/app/_base.py | afranke/synapse | f563676c097b830346acc7a4ce3e910c6b10c4c3 | [
"Apache-2.0"
] | null | null | null | synapse/app/_base.py | afranke/synapse | f563676c097b830346acc7a4ce3e910c6b10c4c3 | [
"Apache-2.0"
] | null | null | null | synapse/app/_base.py | afranke/synapse | f563676c097b830346acc7a4ce3e910c6b10c4c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 New Vector Ltd
# Copyright 2019-2021 The Matrix.org Foundation C.I.C
#
# 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... | 35.064202 | 91 | 0.68579 |
4a204b80a32e22d344628ca9e5d06d94963eab6c | 2,343 | py | Python | backend/migrations/0026_auto_20180805_1216.py | ad-freiburg/qleverUI | 105ef23447eb691a5da8a4c92be3b4150aac72c6 | [
"Apache-2.0"
] | 4 | 2021-10-09T20:36:33.000Z | 2022-02-12T09:19:17.000Z | backend/migrations/0026_auto_20180805_1216.py | ad-freiburg/qleverUI | 105ef23447eb691a5da8a4c92be3b4150aac72c6 | [
"Apache-2.0"
] | 29 | 2019-09-01T08:48:12.000Z | 2021-06-01T15:57:24.000Z | backend/migrations/0026_auto_20180805_1216.py | ad-freiburg/qleverUI | 105ef23447eb691a5da8a4c92be3b4150aac72c6 | [
"Apache-2.0"
] | 4 | 2019-01-04T19:44:55.000Z | 2020-12-05T03:40:42.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-08-05 12:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0025_auto_20180616_1246'),
]
operations = [
migrations.RemoveField... | 29.658228 | 355 | 0.554417 |
4a204e23f313194fe3fec32cba68c9c2c0664272 | 4,581 | py | Python | GAN/infogan/infogan_pytorch.py | nikhaas/generative-models | 566ac2e95971ab55d65169e565b9d53023ccc113 | [
"Unlicense"
] | 37 | 2018-08-18T16:05:39.000Z | 2019-06-05T19:01:19.000Z | GAN/infogan/infogan_pytorch.py | bimal08844/generative-models | 566ac2e95971ab55d65169e565b9d53023ccc113 | [
"Unlicense"
] | null | null | null | GAN/infogan/infogan_pytorch.py | bimal08844/generative-models | 566ac2e95971ab55d65169e565b9d53023ccc113 | [
"Unlicense"
] | 34 | 2018-05-12T14:26:29.000Z | 2018-08-25T14:56:41.000Z | import torch
import torch.nn.functional as nn
import torch.autograd as autograd
import torch.optim as optim
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import os
from torch.autograd import Variable
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_d... | 25.881356 | 84 | 0.599651 |
4a204ea1fc8b6e71fc0fed96fc78883601fb488f | 5,907 | py | Python | jina/executors/rankers/__init__.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-25T19:28:50.000Z | 2021-02-25T19:28:50.000Z | jina/executors/rankers/__init__.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-27T05:56:45.000Z | 2021-02-27T05:57:03.000Z | jina/executors/rankers/__init__.py | deepampatel/jina | 97f9e97a4a678a28bdeacbc7346eaf7bbd2aeb89 | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
from typing import Dict
import numpy as np
from .. import BaseExecutor
class BaseRanker(BaseExecutor):
"""The base class for a `Ranker`"""
def score(self, *args, **kwargs):
raise NotImplementedErr... | 42.496403 | 119 | 0.654816 |
4a204fdeadb2233c723275eed47a581597ebab1e | 902 | py | Python | Facebook AutoPokeBack/pokeback.py | cclauss/Browser-Automation | 7baca74d40ac850f9570d7e40a47021dc0e8e387 | [
"Apache-2.0"
] | 35 | 2016-07-16T07:05:24.000Z | 2021-07-07T15:18:55.000Z | Facebook AutoPokeBack/pokeback.py | cclauss/Browser-Automation | 7baca74d40ac850f9570d7e40a47021dc0e8e387 | [
"Apache-2.0"
] | null | null | null | Facebook AutoPokeBack/pokeback.py | cclauss/Browser-Automation | 7baca74d40ac850f9570d7e40a47021dc0e8e387 | [
"Apache-2.0"
] | 7 | 2016-07-27T10:25:10.000Z | 2019-12-06T08:45:03.000Z | import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import getpass
print "Enter your email ID"
email_id = raw_input(">>")
print "Enter your password"
#password = raw_input(">>")
password = getpass.getpass(">>")
driver = webdriver.Firefox()
driver.get("https://www.facebook.com/po... | 23.736842 | 63 | 0.756098 |
4a204fe29f92931ba1820c5dc9e7af35e05754a3 | 13,536 | py | Python | qchem/tests/test_two_particle.py | tehruhn/pennylane | a556c0bc3b56c32e034c2d647a0da1d44a07d9bd | [
"Apache-2.0"
] | null | null | null | qchem/tests/test_two_particle.py | tehruhn/pennylane | a556c0bc3b56c32e034c2d647a0da1d44a07d9bd | [
"Apache-2.0"
] | null | null | null | qchem/tests/test_two_particle.py | tehruhn/pennylane | a556c0bc3b56c32e034c2d647a0da1d44a07d9bd | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import pytest
from pennylane import qchem
from openfermion.hamiltonians import MolecularData
ref_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test_ref_files")
v_op_1 = {
(): 0.0,
((0, 1), (0, 1), (0, 0), (0, 0)): 0.3411947665760211,
((0, 1), (1, 1), (1, 0... | 50.319703 | 92 | 0.472444 |
4a2050364f33480277b8f704e9fac86d472650f3 | 956 | py | Python | services/core-api/app/api/utils/include/user_info.py | bcgov/mds | 6c427a66a5edb4196222607291adef8fd6677038 | [
"Apache-2.0"
] | 25 | 2018-07-09T19:04:37.000Z | 2022-03-15T17:27:10.000Z | services/document-manager/backend/app/utils/include/user_info.py | bcgov/mds | 6c427a66a5edb4196222607291adef8fd6677038 | [
"Apache-2.0"
] | 983 | 2018-04-25T20:08:07.000Z | 2022-03-31T21:45:20.000Z | services/document-manager/backend/app/utils/include/user_info.py | bcgov/mds | 6c427a66a5edb4196222607291adef8fd6677038 | [
"Apache-2.0"
] | 58 | 2018-05-15T22:35:50.000Z | 2021-11-29T19:40:52.000Z | from app.extensions import jwt
from jose import jwt as jwt_jose
VALID_REALM = ['idir']
DUMMY_AUTH_CLAIMS = {
"iss": "test_issuer",
"typ": "Bearer",
"username": "mds",
"preferred_username": "mds",
"email": "test-email",
"given_name": "test-given-name",
"realm_access": {
"roles": []
... | 25.837838 | 89 | 0.631799 |
4a2050802be200725063777ec46badc9f28cf3b6 | 165 | py | Python | bin/ominoes/hexominoes-parallelogram-35x6.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | null | null | null | bin/ominoes/hexominoes-parallelogram-35x6.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | null | null | null | bin/ominoes/hexominoes-parallelogram-35x6.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | 1 | 2022-01-02T16:54:14.000Z | 2022-01-02T16:54:14.000Z | #!/usr/bin/env python
# $Id$
"""many solutions"""
import puzzler
from puzzler.puzzles.hexominoes import HexominoesParallelogram35x6 as puzzle
puzzler.run(puzzle)
| 16.5 | 76 | 0.775758 |
4a2050b96329efc6233b9c7195d7e8f69b01d37a | 1,342 | py | Python | commands/developer-utils/gitlab/gitlab-todos.template.py | daviddzhou/script-commands | 393ae1d4ec0a8f3ddf85c0d5ec83a48d6d0268cc | [
"MIT"
] | 3,305 | 2020-09-30T17:38:45.000Z | 2022-03-31T21:09:34.000Z | commands/developer-utils/gitlab/gitlab-todos.template.py | devrrior/script-commands | 90d69de3404d379eacaf0c07ecbffca7096b8db1 | [
"MIT"
] | 500 | 2020-10-01T07:23:54.000Z | 2022-03-31T13:31:00.000Z | commands/developer-utils/gitlab/gitlab-todos.template.py | devrrior/script-commands | 90d69de3404d379eacaf0c07ecbffca7096b8db1 | [
"MIT"
] | 787 | 2020-09-30T20:36:47.000Z | 2022-03-31T20:09:44.000Z | #!/usr/bin/env python3
# How to use this script?
# It's a template which needs further setup. Duplicate the file,
# remove `.template.` from the filename and set an Personal access token as
# well as the GitLab instance url if it is not gitlab.com in gitlabconfig.py
# You need to copy gitlabconfig.py and gitlabhelper.... | 28.553191 | 81 | 0.735469 |
4a205381388c96dc0b81d351c8b3305e872ae184 | 1,343 | py | Python | tests/device/test_read_measurement.py | Sensirion/python-i2c-svm4 | f0d408614eedab04042ca683ecda1e723a5908e6 | [
"BSD-3-Clause"
] | null | null | null | tests/device/test_read_measurement.py | Sensirion/python-i2c-svm4 | f0d408614eedab04042ca683ecda1e723a5908e6 | [
"BSD-3-Clause"
] | null | null | null | tests/device/test_read_measurement.py | Sensirion/python-i2c-svm4 | f0d408614eedab04042ca683ecda1e723a5908e6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# (c) Copyright 2021 Sensirion AG, Switzerland
from __future__ import absolute_import, division, print_function
from sensirion_i2c_svm41.response_types import Humidity, \
Temperature, AirQualityVoc, AirQualityNox
import pytest
import time
@pytest.mark.needs_device
def test(device):
""... | 35.342105 | 64 | 0.691735 |
4a20560cdbe337e740fc5664fbd4b686034d2980 | 797 | py | Python | booksapi/booksapi/urls.py | lkry95/micropythonapi | 8900c7ffcdff4e824a10de95354908aff1b060f2 | [
"MIT"
] | null | null | null | booksapi/booksapi/urls.py | lkry95/micropythonapi | 8900c7ffcdff4e824a10de95354908aff1b060f2 | [
"MIT"
] | null | null | null | booksapi/booksapi/urls.py | lkry95/micropythonapi | 8900c7ffcdff4e824a10de95354908aff1b060f2 | [
"MIT"
] | null | null | null | """booksapi 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-base... | 33.208333 | 77 | 0.70138 |
4a2056aac112b01a68e643fd4ce8b2f516254768 | 7,043 | py | Python | phy/apps/template/gui.py | GiocomoLab/phy | b97d510b5414f65733e3d50ba205d736d42962cd | [
"BSD-3-Clause"
] | null | null | null | phy/apps/template/gui.py | GiocomoLab/phy | b97d510b5414f65733e3d50ba205d736d42962cd | [
"BSD-3-Clause"
] | null | null | null | phy/apps/template/gui.py | GiocomoLab/phy | b97d510b5414f65733e3d50ba205d736d42962cd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Template GUI."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
import logging
from operator import itemgetter
from pathlib import Path
import numpy as np
from phyl... | 35.215 | 97 | 0.592929 |
4a2057104e3be164c79bc3c79b23a052e5adcebe | 860 | py | Python | backend/student_profile/migrations/0004_instructorloadcoursemajor.py | yamamz/enrollment-system-vue-django | ab4627071a037881db0a968a52a34c5c57f3f698 | [
"MIT"
] | null | null | null | backend/student_profile/migrations/0004_instructorloadcoursemajor.py | yamamz/enrollment-system-vue-django | ab4627071a037881db0a968a52a34c5c57f3f698 | [
"MIT"
] | null | null | null | backend/student_profile/migrations/0004_instructorloadcoursemajor.py | yamamz/enrollment-system-vue-django | ab4627071a037881db0a968a52a34c5c57f3f698 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.1 on 2020-08-25 10:24
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('student_profile', '0003_auto_20200817_0835'),
]
operations = [
migrations.CreateModel(
name='In... | 37.391304 | 203 | 0.67093 |
4a2058173fbb3bb4dc5c3524932fe6fa962863b9 | 64 | py | Python | fishhook/__main__.py | evpeople/fish-hook | d4746d41b8c3a1d57ffd79907a8fb475579a7b03 | [
"MIT"
] | 33 | 2017-02-21T06:55:38.000Z | 2021-09-07T05:53:14.000Z | fishhook/__main__.py | evpeople/fish-hook | d4746d41b8c3a1d57ffd79907a8fb475579a7b03 | [
"MIT"
] | 36 | 2019-08-22T11:12:08.000Z | 2022-03-31T12:47:26.000Z | fishhook/__main__.py | evpeople/fish-hook | d4746d41b8c3a1d57ffd79907a8fb475579a7b03 | [
"MIT"
] | 2 | 2017-02-21T11:03:52.000Z | 2021-07-02T08:42:33.000Z | from .command import main
if __name__ == '__main__':
main() | 16 | 26 | 0.671875 |
4a205883625f05419f5cba56ecb0527dc45bfcec | 25,433 | py | Python | lib/streamlit/state/session_state.py | arraydude/streamlit-1 | ab7c339623b457c71e3b77e3162c86962ac167d0 | [
"Apache-2.0"
] | 1 | 2022-01-19T10:48:49.000Z | 2022-01-19T10:48:49.000Z | lib/streamlit/state/session_state.py | arraydude/streamlit-1 | ab7c339623b457c71e3b77e3162c86962ac167d0 | [
"Apache-2.0"
] | 52 | 2021-10-04T21:52:48.000Z | 2021-12-29T02:18:44.000Z | lib/streamlit/state/session_state.py | arraydude/streamlit-1 | ab7c339623b457c71e3b77e3162c86962ac167d0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018-2021 Streamlit 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 wr... | 35.620448 | 102 | 0.644202 |
4a2058dbb817841def23862858681b41a65d6a34 | 3,086 | py | Python | torchelastic/rendezvous/test/rendezvous/api_test.py | yifuwang/elastic | 250667dc77fd95a0dd60d144fb452f896d95682b | [
"BSD-3-Clause"
] | null | null | null | torchelastic/rendezvous/test/rendezvous/api_test.py | yifuwang/elastic | 250667dc77fd95a0dd60d144fb452f896d95682b | [
"BSD-3-Clause"
] | null | null | null | torchelastic/rendezvous/test/rendezvous/api_test.py | yifuwang/elastic | 250667dc77fd95a0dd60d144fb452f896d95682b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from typing import Tuple
from torchelastic.rendezvous import (
Rendez... | 29.673077 | 82 | 0.649384 |
4a205a403cb396b7e6c9089fdd832a7771d25773 | 58,209 | bzl | Python | tensorflow/workspace.bzl | anonymous-313/tensorflow | b82785818b6b020d62340eaaece32b9c75858185 | [
"Apache-2.0"
] | null | null | null | tensorflow/workspace.bzl | anonymous-313/tensorflow | b82785818b6b020d62340eaaece32b9c75858185 | [
"Apache-2.0"
] | null | null | null | tensorflow/workspace.bzl | anonymous-313/tensorflow | b82785818b6b020d62340eaaece32b9c75858185 | [
"Apache-2.0"
] | null | null | null | # TensorFlow external dependencies that can be loaded in WORKSPACE files.
load("//third_party/gpus:cuda_configure.bzl", "cuda_configure")
load("//third_party/gpus:rocm_configure.bzl", "rocm_configure")
load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure")
load("//third_party/nccl:nccl_configure.b... | 48.874055 | 203 | 0.688674 |
4a205abf57199f5ee1e9192e034224e71b3c94da | 2,918 | py | Python | examples/tutorials/configuration.py | daroari/pygmt | e022851d62814a9255ed2bb63ae092b666b832b9 | [
"BSD-3-Clause"
] | 1 | 2021-05-11T03:55:25.000Z | 2021-05-11T03:55:25.000Z | examples/tutorials/configuration.py | daroari/pygmt | e022851d62814a9255ed2bb63ae092b666b832b9 | [
"BSD-3-Clause"
] | 22 | 2021-03-24T07:58:59.000Z | 2022-03-29T12:07:09.000Z | examples/tutorials/configuration.py | daroari/pygmt | e022851d62814a9255ed2bb63ae092b666b832b9 | [
"BSD-3-Clause"
] | 1 | 2021-11-03T07:47:18.000Z | 2021-11-03T07:47:18.000Z | """
Configuring PyGMT defaults
==========================
Default GMT parameters can be set globally or locally using :class:`pygmt.config`.
"""
# sphinx_gallery_thumbnail_number = 3
import pygmt
########################################################################################
# Configuring default GMT parame... | 37.410256 | 95 | 0.637423 |
4a205b331b00eabe332c37d813710362792dafef | 1,616 | py | Python | src/lib/python/telemetry/build_info_inject.py | dashwood8691/f5-bigip-image-generator | 5a5b39a266a0762be5b908e6b47323efdf7d32c1 | [
"Apache-2.0"
] | 34 | 2019-08-21T01:28:27.000Z | 2021-10-05T07:21:58.000Z | src/lib/python/telemetry/build_info_inject.py | dashwood8691/f5-bigip-image-generator | 5a5b39a266a0762be5b908e6b47323efdf7d32c1 | [
"Apache-2.0"
] | 34 | 2019-09-13T10:17:31.000Z | 2022-03-09T00:01:00.000Z | src/lib/python/telemetry/build_info_inject.py | dashwood8691/f5-bigip-image-generator | 5a5b39a266a0762be5b908e6b47323efdf7d32c1 | [
"Apache-2.0"
] | 16 | 2019-08-21T20:06:17.000Z | 2022-03-25T11:59:00.000Z | """BuildInfo module for injecting info into bigip"""
# Copyright (C) 2020 F5 Networks, 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
#
# U... | 31.076923 | 92 | 0.697401 |
4a205d36131fa2d502530e039b812fa9fa872c14 | 434 | py | Python | tests/test_helpers.py | OliverHofkens/dephell | 6303f416018910668f1635b70cd828a2fd2b2d9e | [
"MIT"
] | 1,880 | 2019-03-21T10:08:25.000Z | 2022-03-31T12:41:55.000Z | tests/test_helpers.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 356 | 2019-03-21T19:08:56.000Z | 2021-01-08T17:45:43.000Z | tests/test_helpers.py | rachmadaniHaryono/dephell | 0ef500c8f2d5f05244bac191b1b1383f68464cd2 | [
"MIT"
] | 157 | 2019-04-23T01:13:37.000Z | 2022-03-24T22:41:18.000Z | # app
from .helpers import Fake, make_root
def test_make_deps():
root = make_root(
root=Fake('', 'a', 'b'),
a=(
Fake('1', 'b>5'),
Fake('2', 'b>5'),
Fake('3', 'b>7'),
),
b=(
Fake('4'),
Fake('5'),
Fake('6'),
... | 18.869565 | 51 | 0.403226 |
4a205dd3c32e4acee84630da7acfe2738862997b | 7,463 | py | Python | pythran/run.py | wizardxz/pythran | 9a1b1c08cf9d3478be3b6313ac8ebca9e5b88e65 | [
"BSD-3-Clause"
] | null | null | null | pythran/run.py | wizardxz/pythran | 9a1b1c08cf9d3478be3b6313ac8ebca9e5b88e65 | [
"BSD-3-Clause"
] | null | null | null | pythran/run.py | wizardxz/pythran | 9a1b1c08cf9d3478be3b6313ac8ebca9e5b88e65 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
""" Script to run Pythran file compilation with specified g++ like flags. """
import argparse
import logging
import os
import sys
import pythran
from distutils.errors import CompileError
logger = logging.getLogger("pythran")
def convert_arg_line_to_args(arg_line):
"""Read argument from ... | 36.583333 | 78 | 0.527938 |
4a205eb7995244e3484f3f399a6579ae0d12a610 | 9,348 | py | Python | deepa2/parsers.py | debatelab/deepa2 | 1a9e8c357d7e3924808c703ec9f4a6611a4b5f93 | [
"Apache-2.0"
] | null | null | null | deepa2/parsers.py | debatelab/deepa2 | 1a9e8c357d7e3924808c703ec9f4a6611a4b5f93 | [
"Apache-2.0"
] | null | null | null | deepa2/parsers.py | debatelab/deepa2 | 1a9e8c357d7e3924808c703ec9f4a6611a4b5f93 | [
"Apache-2.0"
] | null | null | null | """Parsers and formatters for DA2 data structures"""
import dataclasses
import logging
import re
from typing import Any, List, Dict, Tuple, Optional, Union
import jinja2
# import ttp
from deepa2 import DeepA2Item, QuotedStatement, ArgdownStatement, Formalization
class DeepA2Layouter: # pylint: disable=too-few-pu... | 33.992727 | 94 | 0.581943 |
4a2060b6aa98edcf8c508edf509416b029e661f6 | 486 | py | Python | todos_store.py | smithclay/tutorial-python | 841453e9e5cf9245d44bb205ffa22ef2b7d64620 | [
"Python-2.0",
"OLDAP-2.7"
] | 7 | 2018-06-11T05:49:33.000Z | 2022-03-15T15:06:59.000Z | todos_store.py | smithclay/tutorial-python | 841453e9e5cf9245d44bb205ffa22ef2b7d64620 | [
"Python-2.0",
"OLDAP-2.7"
] | 37 | 2018-11-06T14:20:07.000Z | 2022-01-13T07:58:52.000Z | todos_store.py | smithclay/tutorial-python | 841453e9e5cf9245d44bb205ffa22ef2b7d64620 | [
"Python-2.0",
"OLDAP-2.7"
] | 11 | 2018-11-11T16:59:38.000Z | 2022-02-23T12:37:51.000Z | class Store:
# Here will be the instance stored.
__instance = None
@staticmethod
def getInstance():
""" Static access method. """
if Store.__instance == None:
Store()
return Store.__instance
def __init__(self):
""" Virtually private constructor. """
... | 25.578947 | 57 | 0.559671 |
4a2060c0011d622d663f03490ff708581810e5c4 | 6,449 | py | Python | alerter/test/data_store/test_starters.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 41 | 2019-08-23T12:40:42.000Z | 2022-03-28T11:06:02.000Z | alerter/test/data_store/test_starters.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 147 | 2019-08-30T22:09:48.000Z | 2022-03-30T08:46:26.000Z | alerter/test/data_store/test_starters.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 3 | 2019-09-03T21:12:28.000Z | 2021-08-18T14:27:56.000Z | import logging
import unittest
from datetime import timedelta
from unittest import mock
from parameterized import parameterized
from src.data_store.starters import (
_initialise_store_logger, _initialise_store, start_system_store,
start_github_store, start_alert_store, start_config_store,
start_chainlink_... | 47.419118 | 79 | 0.673438 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.