hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
85249d1653061e169c5b067e78d369387f6c900c | 21,522 | py | Python | adaptations/train_ssl.py | jamycheung/Trans4PASS | 54a0daea740ae1f2483e1402e3a7a42d0dead822 | [
"Apache-2.0"
] | 7 | 2022-03-03T22:35:53.000Z | 2022-03-30T06:48:36.000Z | adaptations/train_ssl.py | jamycheung/Trans4PASS | 54a0daea740ae1f2483e1402e3a7a42d0dead822 | [
"Apache-2.0"
] | null | null | null | adaptations/train_ssl.py | jamycheung/Trans4PASS | 54a0daea740ae1f2483e1402e3a7a42d0dead822 | [
"Apache-2.0"
] | null | null | null | import glob
import shutil
import torch
import torch.nn as nn
from torch.utils import data, model_zoo
import numpy as np
from torch.autograd import Variable
import torch.optim as optim
import torch.backends.cudnn as cudnn
import torch.nn.functional as F
import logging, sys
import time
from tensorboardX import SummaryW... | 41.871595 | 138 | 0.636651 |
cee042c2d9d24bc3eee06652c2b4ab69fd446792 | 2,430 | py | Python | wolframclient/tests/externalevaluate/ev_loop.py | jldohmann/WolframClientForPython | 15cb8ba21f8a08ab17f041f2cbf46ae165e64004 | [
"MIT"
] | null | null | null | wolframclient/tests/externalevaluate/ev_loop.py | jldohmann/WolframClientForPython | 15cb8ba21f8a08ab17f041f2cbf46ae165e64004 | [
"MIT"
] | null | null | null | wolframclient/tests/externalevaluate/ev_loop.py | jldohmann/WolframClientForPython | 15cb8ba21f8a08ab17f041f2cbf46ae165e64004 | [
"MIT"
] | 1 | 2020-05-16T13:18:02.000Z | 2020-05-16T13:18:02.000Z | from __future__ import absolute_import, print_function, unicode_literals
from threading import Thread
import zmq
from wolframclient.language import wl
from wolframclient.serializers import export
from wolframclient.utils.externalevaluate import EXPORT_KWARGS, StdoutProxy, start_zmq_loop
from wolframclient.utils.test... | 26.129032 | 92 | 0.62963 |
93f2bb78b98d78120a03c3ea12ce0f7ab13ed604 | 85,436 | py | Python | tests/app/main/views/test_send.py | karlchillmaid/notifications-admin | 9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880 | [
"MIT"
] | null | null | null | tests/app/main/views/test_send.py | karlchillmaid/notifications-admin | 9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880 | [
"MIT"
] | null | null | null | tests/app/main/views/test_send.py | karlchillmaid/notifications-admin | 9ef6da4ef9e2fa97b7debb4b573cb035a5cb8880 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import uuid
from functools import partial
from glob import glob
from io import BytesIO
from itertools import repeat
from os import path
from zipfile import BadZipFile
import pytest
from bs4 import BeautifulSoup
from flask import url_for
from notifications_python_client.errors import ... | 28.621776 | 111 | 0.655122 |
52ed507f9978beceddbfc335bf5dda152c0e923c | 1,077 | py | Python | azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/alias_type.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/alias_type.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/alias_type.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.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 ... | 31.676471 | 76 | 0.563603 |
9b02743cbdde3c0d3d4bac56ac38d5e9f1fa9742 | 14,533 | py | Python | ai_notes.py | AlanACruz/aipnd-project | e0d5dcb49865cced1a9e88f03adaf71f6d0bf1a6 | [
"MIT"
] | null | null | null | ai_notes.py | AlanACruz/aipnd-project | e0d5dcb49865cced1a9e88f03adaf71f6d0bf1a6 | [
"MIT"
] | null | null | null | ai_notes.py | AlanACruz/aipnd-project | e0d5dcb49865cced1a9e88f03adaf71f6d0bf1a6 | [
"MIT"
] | null | null | null | # --------------- AND Perceptron ---------------
import pandas as pd
# TODO: Set weight1, weight2, and bias
weight1 = 0.2
weight2 = 0.8
bias = -1.0
# DON'T CHANGE ANYTHING BELOW
# Inputs and outputs
test_inputs = [(0, 0), (0, 1), (1, 0), (1, 1)]
correct_outputs = [False, False, False, True]
outputs = []
# Generate ... | 31.053419 | 133 | 0.650107 |
5cef6b4ed1ddeb97ad5df13e0938c583633ae77f | 999 | py | Python | Software/PokemonDataObtainer/models/pokemonspecies.py | goodguyplayer/UniProject-AlolaPokedex | 44a20fa08feb8ba57fdd4ca9319a07d35b3f459a | [
"MIT"
] | null | null | null | Software/PokemonDataObtainer/models/pokemonspecies.py | goodguyplayer/UniProject-AlolaPokedex | 44a20fa08feb8ba57fdd4ca9319a07d35b3f459a | [
"MIT"
] | null | null | null | Software/PokemonDataObtainer/models/pokemonspecies.py | goodguyplayer/UniProject-AlolaPokedex | 44a20fa08feb8ba57fdd4ca9319a07d35b3f459a | [
"MIT"
] | null | null | null | import pokebase as pb
class PokemonSpecies:
def __init__(self, id:str):
self.pokemonspecies = pb.pokemon_species(id)
self.name = self.pokemonspecies.name
self.flavortext = self.setFlavorText(self.pokemonspecies.flavor_text_entries)
self.genera = self.setGenus(self.pokemonspecies.gen... | 34.448276 | 85 | 0.621622 |
f133e8364e64eda8188af5d6f98717399e668fdb | 261 | py | Python | automata/pda/pda.py | dengl11/automata | 95d89e5eec118b01101efb021a78fea325794e4a | [
"MIT"
] | null | null | null | automata/pda/pda.py | dengl11/automata | 95d89e5eec118b01101efb021a78fea325794e4a | [
"MIT"
] | null | null | null | automata/pda/pda.py | dengl11/automata | 95d89e5eec118b01101efb021a78fea325794e4a | [
"MIT"
] | 1 | 2018-11-15T08:52:19.000Z | 2018-11-15T08:52:19.000Z | #!/usr/bin/env python3
"""Classes and methods for working with all pushdown automata."""
import abc
from automata.base.automaton import Automaton
class PDA(Automaton, metaclass=abc.ABCMeta):
"""An abstract base class for pushdown automata."""
pass
| 20.076923 | 65 | 0.739464 |
77618b0e4012f4d2d84d021bf29824b48abb265e | 328 | py | Python | Emmanuel ANENE/Phase 1/Python Basic 1/Day11/task7.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | Emmanuel ANENE/Phase 1/Python Basic 1/Day11/task7.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | Emmanuel ANENE/Phase 1/Python Basic 1/Day11/task7.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | '''
Write a Python program to list the special variables used within the language.
'''
speVar = sorted((set(globals().keys()) | set(__builtins__.keys())) - set("_names i".split()))
spr = "\n".join(' '.join(speVar[i:i+8]) for i in range(0, len(speVar), 8))
stv = set(__builtins__.keys())
# print(speVar)
print(spr)
# pr... | 29.818182 | 93 | 0.661585 |
6a059737451985af9cae5f90ffd6fb61501e4aed | 131 | py | Python | app/auth/__init__.py | TopKeingt/MHS-code | 3173f16ef2cc625f9979eb382aee84633131bc29 | [
"MIT"
] | null | null | null | app/auth/__init__.py | TopKeingt/MHS-code | 3173f16ef2cc625f9979eb382aee84633131bc29 | [
"MIT"
] | null | null | null | app/auth/__init__.py | TopKeingt/MHS-code | 3173f16ef2cc625f9979eb382aee84633131bc29 | [
"MIT"
] | null | null | null | from flask import Blueprint
bp = Blueprint('auth', __name__, static_folder="../static/admin_static")
from app.auth import routes
| 21.833333 | 72 | 0.770992 |
9c527db8f193a0ee4742bda4cf4e7287adb3dfa4 | 607 | py | Python | gssClients/gssPythonClients/deleteFolder_gss.py | SemWES/client_libs | 48c3af519ceaf80b3f33cf509c72376b9b3d9582 | [
"Zlib"
] | null | null | null | gssClients/gssPythonClients/deleteFolder_gss.py | SemWES/client_libs | 48c3af519ceaf80b3f33cf509c72376b9b3d9582 | [
"Zlib"
] | null | null | null | gssClients/gssPythonClients/deleteFolder_gss.py | SemWES/client_libs | 48c3af519ceaf80b3f33cf509c72376b9b3d9582 | [
"Zlib"
] | null | null | null | #!/bin/env python
# Copyright STIFTELSEN SINTEF 2016
import suds
import urllib2
import sys
if len(sys.argv) < 3:
print ("Usage:")
print ("\t %s gss-url token" % sys.argv[0])
print ("\t (got ", len(sys.argv), " arguments" )
exit()
# get url:
url = sys.argv[1]
sessionToken = sys.argv[2]
wsdlLocation ... | 21.678571 | 87 | 0.701812 |
e71d158600cf00c66354329d82b15a9beac5ff9d | 5,132 | py | Python | tests/test_resize.py | ftnext/python-image-processor | 4625522318f6ca67951c2c2e2e376fe9c4bd628b | [
"MIT"
] | null | null | null | tests/test_resize.py | ftnext/python-image-processor | 4625522318f6ca67951c2c2e2e376fe9c4bd628b | [
"MIT"
] | null | null | null | tests/test_resize.py | ftnext/python-image-processor | 4625522318f6ca67951c2c2e2e376fe9c4bd628b | [
"MIT"
] | null | null | null | from unittest import TestCase
from unittest.mock import call, MagicMock, patch
import myimageprocessor.path_handler as ph
import myimageprocessor.resize as r
class ShrinkSizeCalculatorTestCase(TestCase):
def setUp(self):
self.limit = 300
def test_init(self):
size = (400, 600)
actual ... | 35.888112 | 79 | 0.675175 |
5d191a7f0eecda0849676d09e3803a309fbfa931 | 23,909 | py | Python | respy/shared.py | MaxBlesch/respy | ddde5dec1dc650684d4d601e74d6a4f96d0f80ed | [
"MIT"
] | null | null | null | respy/shared.py | MaxBlesch/respy | ddde5dec1dc650684d4d601e74d6a4f96d0f80ed | [
"MIT"
] | null | null | null | respy/shared.py | MaxBlesch/respy | ddde5dec1dc650684d4d601e74d6a4f96d0f80ed | [
"MIT"
] | null | null | null | """Contains functions which are shared across other modules.
This module should only import from other packages or modules of respy which also do not
import from respy itself. This is to prevent circular imports.
"""
import shutil
import chaospy as cp
import numba as nb
import numpy as np
import pandas as pd
from r... | 34.009957 | 88 | 0.678698 |
108618ef3118fdf97bad71c503cda8ff418b5049 | 1,803 | py | Python | nesta/packages/crunchbase/predict/data.py | anniyanvr/nesta | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 13 | 2019-06-18T16:53:53.000Z | 2021-03-04T10:58:52.000Z | nesta/packages/crunchbase/predict/data.py | nestauk/old_nesta_daps | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 208 | 2018-08-10T13:15:40.000Z | 2021-07-21T10:16:07.000Z | nesta/packages/crunchbase/predict/data.py | nestauk/old_nesta_daps | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 8 | 2018-09-20T15:19:23.000Z | 2020-12-15T17:41:34.000Z | """
Creates a training dataset by applying a boolean field based on the presence of keywords
within the data. This is primarily designed for use with the crunchbase organisation
data but should be applicable to other similar processes.
"""
import numpy as np
def label_data(data, keywords, column, label_name, size, ra... | 34.018868 | 88 | 0.66944 |
0c77164135eb4c03a09691d09708c3f97774719a | 8,151 | py | Python | sympy/utilities/_compilation/util.py | Michal-Gagala/sympy | 3cc756c2af73b5506102abaeefd1b654e286e2c8 | [
"MIT"
] | null | null | null | sympy/utilities/_compilation/util.py | Michal-Gagala/sympy | 3cc756c2af73b5506102abaeefd1b654e286e2c8 | [
"MIT"
] | null | null | null | sympy/utilities/_compilation/util.py | Michal-Gagala/sympy | 3cc756c2af73b5506102abaeefd1b654e286e2c8 | [
"MIT"
] | null | null | null | from collections import namedtuple
from hashlib import sha256
import os
import shutil
import sys
import fnmatch
from sympy.testing.pytest import XFAIL
def may_xfail(func):
if sys.platform.lower() == 'darwin' or os.name == 'nt':
# sympy.utilities._compilation needs more testing on Windows and ... | 28.400697 | 91 | 0.58913 |
468b860277d3cc6d207a99f3e790bd594ff4203d | 5,592 | py | Python | backend/Hinkskalle/tests/models/test_Entity.py | h3kker/hinkskalle | 609ab67468b7be0e84cf6044ffb5938afcaa0813 | [
"MIT"
] | 4 | 2021-08-07T02:45:40.000Z | 2022-02-16T09:43:11.000Z | backend/Hinkskalle/tests/models/test_Entity.py | h3kker/hinkskalle | 609ab67468b7be0e84cf6044ffb5938afcaa0813 | [
"MIT"
] | 11 | 2021-12-17T15:34:18.000Z | 2022-03-31T08:58:12.000Z | backend/Hinkskalle/tests/models/test_Entity.py | h3kker/hinkskalle | 609ab67468b7be0e84cf6044ffb5938afcaa0813 | [
"MIT"
] | 1 | 2021-08-07T02:45:49.000Z | 2021-08-07T02:45:49.000Z | from datetime import datetime, timedelta
from Hinkskalle.models.Entity import Entity, EntitySchema
from Hinkskalle.models.Collection import Collection
from Hinkskalle import db
from ..model_base import ModelBase
from .._util import _create_user, _create_image
class TestEntity(ModelBase):
def test_entity(self):
... | 32.701754 | 87 | 0.728541 |
fd7550bcdb35c973cf1fe74b9319a3dca969e1d1 | 5,416 | py | Python | admin/shop/views.py | wfpinedar/shopping_app | bbb24a5d2ef139bc1ea2be35a1a5c06af71c1feb | [
"WTFPL"
] | null | null | null | admin/shop/views.py | wfpinedar/shopping_app | bbb24a5d2ef139bc1ea2be35a1a5c06af71c1feb | [
"WTFPL"
] | null | null | null | admin/shop/views.py | wfpinedar/shopping_app | bbb24a5d2ef139bc1ea2be35a1a5c06af71c1feb | [
"WTFPL"
] | null | null | null | from rest_framework import viewsets, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .models import Shipment, Payment, Product, Order
from .serializers import ShipmentSerializer, PaymentSerializer, ProductSerializer, OrderSerializer
from rest_framework.authentication im... | 37.611111 | 98 | 0.701071 |
354e55fa586f557d5949420bab437773d533548e | 7,810 | py | Python | lib/AssemblyUtil/AssemblyUtilClient.py | gunturus/MyContigFilterRDP | 7a33f1c765c5fe3e20d92ee91f9d764f71625f9b | [
"MIT"
] | 1 | 2020-01-13T19:39:02.000Z | 2020-01-13T19:39:02.000Z | lib/AssemblyUtil/AssemblyUtilClient.py | gunturus/MyContigFilterRDP | 7a33f1c765c5fe3e20d92ee91f9d764f71625f9b | [
"MIT"
] | 15 | 2016-10-26T03:32:34.000Z | 2019-01-30T22:15:08.000Z | lib/AssemblyUtil/AssemblyUtilClient.py | gunturus/MyContigFilterRDP | 7a33f1c765c5fe3e20d92ee91f9d764f71625f9b | [
"MIT"
] | 14 | 2016-09-08T19:40:28.000Z | 2019-05-17T17:01:45.000Z | # -*- coding: utf-8 -*-
############################################################
#
# Autogenerated by the KBase type compiler -
# any changes made here will be overwritten
#
############################################################
from __future__ import print_function
# the following is a hack to get the basec... | 51.045752 | 108 | 0.66991 |
5f52366f77002718d95da512b81b0a0dbcd77052 | 454,156 | py | Python | spacy/lang/el/lemmatizer/_nouns.py | cedar101/spaCy | 66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95 | [
"MIT"
] | 12 | 2019-03-20T20:43:47.000Z | 2020-04-13T11:10:52.000Z | spacy/lang/el/lemmatizer/_nouns.py | cedar101/spaCy | 66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95 | [
"MIT"
] | 13 | 2018-06-05T11:54:40.000Z | 2019-07-02T11:33:14.000Z | spacy/lang/el/lemmatizer/_nouns.py | cedar101/spaCy | 66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95 | [
"MIT"
] | 1 | 2022-02-12T06:50:34.000Z | 2022-02-12T06:50:34.000Z | # coding: utf8
from __future__ import unicode_literals
NOUNS = set(
"""
-αλγία -βατώ -βατῶ -ούλα -πληξία -ώνυμο sofa table άβακας άβατο άβατον άβυσσος
άγανο άγαρ άγγελμα άγγελος άγγιγμα άγγισμα άγγλος άγημα άγιασμα άγιο φως
άγκλισμα άγκυρα άγμα άγνοια άγνωστος άγονο άγος άγουρος άγουσα άγρα άγρευμα
άγρευσις άγ... | 74.782809 | 83 | 0.891277 |
af61144cafa31634a588377087286c807627d153 | 25,146 | py | Python | tools/cardiff/check.py | gerhardqux/edeploy | f24225e54011e3852fac3a8a44bd9f74d728f4fb | [
"Apache-2.0"
] | null | null | null | tools/cardiff/check.py | gerhardqux/edeploy | f24225e54011e3852fac3a8a44bd9f74d728f4fb | [
"Apache-2.0"
] | null | null | null | tools/cardiff/check.py | gerhardqux/edeploy | f24225e54011e3852fac3a8a44bd9f74d728f4fb | [
"Apache-2.0"
] | null | null | null | import re
import compare_sets
import utils
import numpy
from pandas import *
import perf_cpu_tables
def search_item(systems, unique_id, item, regexp, exclude_list=[], include_list=[], override_list=[]):
sets = {}
for system in systems:
sets[system[unique_id]] = set()
current_set = sets[system[... | 42.83816 | 234 | 0.587688 |
8c29c63f8bbd1b6fa72461e323f869109e2c1624 | 548 | py | Python | jbupower/jbupower/wsgi.py | arc-menace/JBU-Solar-Power-Mobile-App | 95cb97e273260e2f9ce0e0c492d60bff4008839c | [
"MIT"
] | null | null | null | jbupower/jbupower/wsgi.py | arc-menace/JBU-Solar-Power-Mobile-App | 95cb97e273260e2f9ce0e0c492d60bff4008839c | [
"MIT"
] | null | null | null | jbupower/jbupower/wsgi.py | arc-menace/JBU-Solar-Power-Mobile-App | 95cb97e273260e2f9ce0e0c492d60bff4008839c | [
"MIT"
] | null | null | null | """
WSGI config for jbupower project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
import sys
from django.core.wsgi import get_wsgi_application
sys.path.append('/home/... | 23.826087 | 78 | 0.781022 |
4ee70b67b2414a8cb44adaa6e324e36d30889bc7 | 1,684 | py | Python | modify_annotations_txt.py | wenzhenmiao/KITTI_to_tfrecords | febb7ab1948c827a0c9071ba0d1d1a859ce9a47c | [
"Apache-2.0"
] | 1 | 2020-03-09T19:23:02.000Z | 2020-03-09T19:23:02.000Z | modify_annotations_txt.py | wenzhenmiao/KITTI_to_tfrecords | febb7ab1948c827a0c9071ba0d1d1a859ce9a47c | [
"Apache-2.0"
] | null | null | null | modify_annotations_txt.py | wenzhenmiao/KITTI_to_tfrecords | febb7ab1948c827a0c9071ba0d1d1a859ce9a47c | [
"Apache-2.0"
] | null | null | null | #nnotations_txt.py
import glob
import string
txt_list = glob.glob('./Labels/*.txt')
def show_category(txt_list):
category_list= []
for item in txt_list:
try:
with open(item) as tdf:
for each_line in tdf:
labeldata = each_line.strip().split(' ')
... | 31.185185 | 82 | 0.543943 |
deb60520fad27cc2768d450f1ff2ec483b1a08b0 | 7,071 | py | Python | src/trw/layers/convs.py | civodlu/trw | b9a1cf045f61d6df9c65c014ef63b4048972dcdc | [
"MIT"
] | 3 | 2019-07-04T01:20:41.000Z | 2020-01-27T02:36:12.000Z | src/trw/layers/convs.py | civodlu/trw | b9a1cf045f61d6df9c65c014ef63b4048972dcdc | [
"MIT"
] | null | null | null | src/trw/layers/convs.py | civodlu/trw | b9a1cf045f61d6df9c65c014ef63b4048972dcdc | [
"MIT"
] | 2 | 2020-10-19T13:46:06.000Z | 2021-12-27T02:18:10.000Z | import collections
import copy
from numbers import Number
import torch
from ..basic_typing import Activation, ConvKernels, ConvStrides, PoolingSizes, Paddings, IntListList
from .utils import div_shape
from .blocks import BlockConvNormActivation, BlockPool, ConvBlockType
from .layer_config import default_layer_config,... | 41.594118 | 142 | 0.6282 |
225024b78913c6a207ecb440904e04f9ecd6eb6a | 3,048 | py | Python | authors/apps/articles/migrations/0001_initial.py | andela/ah-backend-tabs | c94704175ecd531f69dbcb6523a8183c2f4bd77f | [
"BSD-3-Clause"
] | null | null | null | authors/apps/articles/migrations/0001_initial.py | andela/ah-backend-tabs | c94704175ecd531f69dbcb6523a8183c2f4bd77f | [
"BSD-3-Clause"
] | 48 | 2018-07-24T14:04:53.000Z | 2022-03-11T23:26:49.000Z | authors/apps/articles/migrations/0001_initial.py | andela/ah-backend-tabs | c94704175ecd531f69dbcb6523a8183c2f4bd77f | [
"BSD-3-Clause"
] | 3 | 2018-07-26T17:01:44.000Z | 2018-09-11T07:49:12.000Z | # Generated by Django 2.0.7 on 2018-09-21 11:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Article',
fields=[
... | 41.189189 | 162 | 0.534121 |
9bd3c49ea97d8c2935c70e5f4d84d3b7ec823488 | 12,861 | py | Python | google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/api/datastore_entities.py | bopopescu/Social-Lite | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/api/datastore_entities.py | bopopescu/Social-Lite | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | [
"Apache-2.0"
] | 4 | 2020-07-21T12:51:46.000Z | 2022-01-22T10:29:25.000Z | google-cloud-sdk/lib/googlecloudsdk/third_party/appengine/api/datastore_entities.py | bopopescu/Social-Lite | ee05d6a7431c36ff582c8d6b58bb20a8c5f550bf | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | #
# Copyright 2006 Google LLC.
# 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 o... | 35.626039 | 79 | 0.667366 |
4ada1d51ea5810e87e8adbcc30e87b4441a925ad | 3,820 | py | Python | generalizedtrees/tests/test_fgroups.py | Craven-Biostat-Lab/generalizedtrees | c0b9d8727d21d1fcb2e0d72f71159f049d8fc22f | [
"BSD-3-Clause"
] | null | null | null | generalizedtrees/tests/test_fgroups.py | Craven-Biostat-Lab/generalizedtrees | c0b9d8727d21d1fcb2e0d72f71159f049d8fc22f | [
"BSD-3-Clause"
] | 61 | 2019-09-30T17:40:48.000Z | 2020-10-31T01:38:19.000Z | generalizedtrees/tests/test_fgroups.py | Craven-Biostat-Lab/generalizedtrees | c0b9d8727d21d1fcb2e0d72f71159f049d8fc22f | [
"BSD-3-Clause"
] | null | null | null | from generalizedtrees.features import FeatureSpec
import pytest
def test_fgroups_method(breast_cancer_data, breast_cancer_rf_model, caplog):
from generalizedtrees import learn, givens, predict, queues, stop, split, grow, leaves, generate, node
from time import perf_counter
import logging
logger = log... | 33.508772 | 106 | 0.737958 |
92fff636bb89f2152ee91ba5ff190af571cf07c3 | 785 | py | Python | ejemplos/musica_ligera/musica_ligera.py | agalbachicar/estadistica | 8b1be727b898a8cda2e6a3148d33eb03e3f124aa | [
"Apache-2.0"
] | null | null | null | ejemplos/musica_ligera/musica_ligera.py | agalbachicar/estadistica | 8b1be727b898a8cda2e6a3148d33eb03e3f124aa | [
"Apache-2.0"
] | null | null | null | ejemplos/musica_ligera/musica_ligera.py | agalbachicar/estadistica | 8b1be727b898a8cda2e6a3148d33eb03e3f124aa | [
"Apache-2.0"
] | null | null | null |
SONG='''Ella durmió
Al calor de las masas
Y yo desperté
Queriendo soñarla
Algún tiempo atrás
Pensé en escribirle
Que nunca sorteé
Las trampas del amor
De aquel amor
De música ligera
Nada nos libra
Nada más queda
No le enviaré
Cenizas de rosas
Ni pienso evitar
Un roce secreto
De aquel amor
De música ligera
Nada no... | 16.702128 | 63 | 0.746497 |
562ae08234067e5c835fbb8113daedde315af887 | 686 | py | Python | basic/mythread/processqueue.py | fplust/python3-cookbook | 0eaca2e3631bb69deaf466c32023bbb2093513da | [
"Apache-2.0"
] | 1 | 2019-07-25T09:09:54.000Z | 2019-07-25T09:09:54.000Z | basic/mythread/processqueue.py | fplust/python3-cookbook | 0eaca2e3631bb69deaf466c32023bbb2093513da | [
"Apache-2.0"
] | null | null | null | basic/mythread/processqueue.py | fplust/python3-cookbook | 0eaca2e3631bb69deaf466c32023bbb2093513da | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
Topic: 多进程通信,使用消息队列通信
Desc :
"""
import multiprocessing
import time
__author__ = 'Xiong Neng'
def consumer(input_q):
while True:
item = input_q.get()
print(item)
input_q.task_done()
def producer(seq, output_q):
for item in... | 17.15 | 65 | 0.606414 |
ef4b59630d36f10eaaefa245c97d099335c79928 | 10,124 | py | Python | awx/main/tests/functional/test_projects.py | Akasurde/awx | b81c9dbeeaa891b258364a6471924e3f43994430 | [
"Apache-2.0"
] | 2 | 2021-01-13T09:30:51.000Z | 2022-02-07T07:29:28.000Z | awx/main/tests/functional/test_projects.py | Akasurde/awx | b81c9dbeeaa891b258364a6471924e3f43994430 | [
"Apache-2.0"
] | 12 | 2021-06-17T07:32:11.000Z | 2022-03-29T22:11:45.000Z | awx/main/tests/functional/test_projects.py | Akasurde/awx | b81c9dbeeaa891b258364a6471924e3f43994430 | [
"Apache-2.0"
] | 9 | 2020-08-18T16:07:13.000Z | 2022-03-22T17:42:30.000Z | # -*- coding: utf-8 -*-
from unittest import mock # noqa
import pytest
from awx.api.versioning import reverse
from awx.main.models import Project
from django.core.exceptions import ValidationError
#
# Project listing and visibility tests
#
@pytest.fixture
def team_project_list(organization_factory):
objects = ... | 40.01581 | 133 | 0.635421 |
0608d15af81b1a523f136cc9294fc18dd37d4570 | 304 | py | Python | scripts/pylib/utils.py | powerpak/pathogendb-comparison | 8c62e0051bcd2e3850ba5833dfd6f38a75460555 | [
"MIT"
] | 7 | 2020-05-18T23:10:02.000Z | 2021-12-27T05:01:07.000Z | scripts/pylib/utils.py | powerpak/pathogendb-comparison | 8c62e0051bcd2e3850ba5833dfd6f38a75460555 | [
"MIT"
] | 5 | 2020-05-22T08:12:27.000Z | 2020-05-31T09:58:14.000Z | scripts/pylib/utils.py | powerpak/pathogendb-comparison | 8c62e0051bcd2e3850ba5833dfd6f38a75460555 | [
"MIT"
] | 1 | 2020-11-24T23:08:44.000Z | 2020-11-24T23:08:44.000Z | import re
def contig_to_vcf_chrom(contig_name):
"""
Annotations may reference more complex contig names than the VCF does in its CHROM column.
This function maps any given annotation's contig name to its corresponding VCF CHROM name.
"""
return re.sub(r'\W.+$', '', contig_name) | 33.777778 | 94 | 0.707237 |
6be78f960dc54756d60f2d489fa055d327353f02 | 355 | py | Python | recipes/how_to_add_a_picture_to_a_text_document.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 18 | 2018-04-19T08:30:48.000Z | 2022-02-14T11:00:27.000Z | recipes/how_to_add_a_picture_to_a_text_document.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 15 | 2018-04-22T00:52:41.000Z | 2021-07-05T10:16:38.000Z | recipes/how_to_add_a_picture_to_a_text_document.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 6 | 2018-04-22T00:14:12.000Z | 2021-12-06T01:42:07.000Z | from odfdo import Document, Paragraph, Frame
doc = Document("text")
body = doc.body
uri = doc.add_file("newlogo.png")
image_frame = Frame.image_frame(uri, size=("6cm", "4cm"), position=("5cm", "10cm"))
# put image frame in a paragraph:
para = Paragraph("")
para.append(image_frame)
body.append(para)
# doc.save(targe... | 23.666667 | 83 | 0.712676 |
66aad9430fb546dc899f661302afded821ab9767 | 506 | py | Python | setup.py | TakutoYoshikai/yakumo | fb0524a157be70024a40d48ce01e7b34594ff4d0 | [
"MIT"
] | null | null | null | setup.py | TakutoYoshikai/yakumo | fb0524a157be70024a40d48ce01e7b34594ff4d0 | [
"MIT"
] | 2 | 2021-12-09T02:54:33.000Z | 2021-12-09T07:09:36.000Z | setup.py | TakutoYoshikai/yakumo | fb0524a157be70024a40d48ce01e7b34594ff4d0 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name = 'yakumo',
version = '1.0.0',
url = 'https://github.com/TakutoYoshikai/yakumo.git',
license = 'MIT LICENSE',
author = 'Takuto Yoshikai',
author_email = 'takuto.yoshikai@gmail.com',
description = 'yakumo is a steganography tool.',
... | 26.631579 | 57 | 0.618577 |
1e55e756b1e0da5a15d4cd04094490a7a4afc9ad | 7,306 | py | Python | tests/utils/test_hook_utils.py | hatched-DavidMichon/airflow-metrics | 3b9c5cf2a07195d37686eaa0bbe824a3333961c3 | [
"Apache-2.0"
] | 16 | 2019-06-28T13:38:22.000Z | 2021-01-25T14:11:39.000Z | tests/utils/test_hook_utils.py | hatched-DavidMichon/airflow-metrics | 3b9c5cf2a07195d37686eaa0bbe824a3333961c3 | [
"Apache-2.0"
] | 9 | 2019-07-11T18:45:20.000Z | 2020-01-16T05:33:18.000Z | tests/utils/test_hook_utils.py | hatched-DavidMichon/airflow-metrics | 3b9c5cf2a07195d37686eaa0bbe824a3333961c3 | [
"Apache-2.0"
] | 8 | 2019-07-31T17:22:35.000Z | 2022-02-22T20:26:11.000Z | from unittest import TestCase
from pytest import raises
from airflow_metrics.utils.hook_utils import HookManager
from tests.utility import mockfn
class TestHookManager(TestCase):
def test_patch_method(self):
class TestClass():
def test_method(self):
pass
test_method_... | 30.315353 | 67 | 0.620175 |
4cc0f28ec4b9d69061f2987caf6475f24743e13d | 333 | py | Python | park_management/park_management/report/vat_on_purchase_per_gcc/vat_on_purchase_per_gcc.py | iRaySpace/park_management | e4b95043fd2410c057f6353e5e8a65f51550033c | [
"MIT"
] | null | null | null | park_management/park_management/report/vat_on_purchase_per_gcc/vat_on_purchase_per_gcc.py | iRaySpace/park_management | e4b95043fd2410c057f6353e5e8a65f51550033c | [
"MIT"
] | null | null | null | park_management/park_management/report/vat_on_purchase_per_gcc/vat_on_purchase_per_gcc.py | iRaySpace/park_management | e4b95043fd2410c057f6353e5e8a65f51550033c | [
"MIT"
] | null | null | null | # Copyright (c) 2013, 9t9it and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from park_management.park_management.report.vat_on_sales_per_gcc.vat_on_sales_per_gcc import (
make_report,
)
def execute(filters=None):
return make_report("Purchase Invoic... | 25.615385 | 94 | 0.801802 |
dad798cea97b9e30e8e863a078e0327e67521ae1 | 2,339 | py | Python | box/box.py | bramfoo/legosorted | a374546cde91db58e30f51e17124d8d717df9c56 | [
"MIT"
] | null | null | null | box/box.py | bramfoo/legosorted | a374546cde91db58e30f51e17124d8d717df9c56 | [
"MIT"
] | null | null | null | box/box.py | bramfoo/legosorted | a374546cde91db58e30f51e17124d8d717df9c56 | [
"MIT"
] | null | null | null | from legoPlatform.direction import Direction
from sort import Sort
class Box:
garbage_direction = Direction.up
def __init__(self):
self.color = None
self.shape = None
self.sort = None
self.dimension = None
self.slots = []
self.reset()
def reset(self):
... | 29.987179 | 116 | 0.620778 |
110bc429d84b3fd702d824577ac8f0b8be576ade | 2,202 | py | Python | Incident-Response/Tools/dfirtrack/dfirtrack_main/tests/company/test_company_models.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 1 | 2021-07-24T17:22:50.000Z | 2021-07-24T17:22:50.000Z | Incident-Response/Tools/dfirtrack/dfirtrack_main/tests/company/test_company_models.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-28T03:40:31.000Z | 2022-02-28T03:40:52.000Z | Incident-Response/Tools/dfirtrack/dfirtrack_main/tests/company/test_company_models.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-25T08:34:51.000Z | 2022-03-16T17:29:44.000Z | from django.test import TestCase
from dfirtrack_main.models import Company
class CompanyModelTestCase(TestCase):
""" company model tests """
@classmethod
def setUpTestData(cls):
# create object
Company.objects.create(company_name='company_1')
def test_company_string(self):
""... | 31.457143 | 76 | 0.653043 |
fbb0d0a73a4931806e815538248feff6fb59fe50 | 1,424 | py | Python | datastore/app.py | VISHNUVARDHAN05/key-value-pair | 4e12945f5bc393ae0594e362727034b9713c5787 | [
"Apache-2.0"
] | null | null | null | datastore/app.py | VISHNUVARDHAN05/key-value-pair | 4e12945f5bc393ae0594e362727034b9713c5787 | [
"Apache-2.0"
] | null | null | null | datastore/app.py | VISHNUVARDHAN05/key-value-pair | 4e12945f5bc393ae0594e362727034b9713c5787 | [
"Apache-2.0"
] | null | null | null | __author__ = 'vishnu'
from sys import exit
from flask import Flask
from argparse import ArgumentParser
from configs import settings, configurations
from utils.filehandler import FilePreprocess
from CRD.views import CreateData, ReadData, DeleteData
# Adding/Enabling CommandLineArguments: --datastore
parser = Argument... | 29.666667 | 106 | 0.771067 |
5c8e18cf9a14a42f6c2f8fc82fb41fa5165243c4 | 9,866 | py | Python | test/functional/mining_pos_reorg.py | CryptoDev-Project/peony-1 | 199a879c9c2bdccc2a202366b604fe30aaca552b | [
"MIT"
] | null | null | null | test/functional/mining_pos_reorg.py | CryptoDev-Project/peony-1 | 199a879c9c2bdccc2a202366b604fe30aaca552b | [
"MIT"
] | null | null | null | test/functional/mining_pos_reorg.py | CryptoDev-Project/peony-1 | 199a879c9c2bdccc2a202366b604fe30aaca552b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019 The PIVX developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.authproxy import JSONRPCException
from test_framework.test_framework import PnyTestFramework
from ... | 46.758294 | 116 | 0.635617 |
965866c2b8a771a47c7b2ab916d0a8d7fc924060 | 3,306 | py | Python | src/sentry/api/endpoints/system_options.py | hieast/sentry | 1179b6b13e86f552d18da0578d7b3bc5d002c0d9 | [
"BSD-3-Clause"
] | 1 | 2019-05-28T06:18:03.000Z | 2019-05-28T06:18:03.000Z | src/sentry/api/endpoints/system_options.py | c88888/sentry | 53837d9e8dad2443c3881fcd05f1b261bdd922fd | [
"BSD-3-Clause"
] | 6 | 2018-10-19T10:04:23.000Z | 2019-12-09T20:29:12.000Z | src/sentry/api/endpoints/system_options.py | zaasmi/codeerrorhelp | 1ab8d3e314386b9b2d58dad9df45355bf6014ac9 | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | from __future__ import absolute_import
import six
import sentry
from django.conf import settings
from rest_framework.response import Response
from sentry import options
from sentry.api.base import Endpoint
from sentry.api.permissions import SuperuserPermission
from sentry.utils.email import is_smtp_enabled
class ... | 34.8 | 94 | 0.515426 |
187ef270edc9fd5f48d4d9b3af5244fa069f67ec | 1,419 | py | Python | examples/models/file/basic_plot.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 1 | 2020-05-26T15:21:22.000Z | 2020-05-26T15:21:22.000Z | examples/models/file/basic_plot.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 1 | 2021-12-15T17:32:31.000Z | 2021-12-21T18:11:05.000Z | examples/models/file/basic_plot.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 1 | 2021-12-20T05:50:00.000Z | 2021-12-20T05:50:00.000Z | ''' A scatter plot of a smooth periodic oscillation. This example demonstrates red
circle scatter markers with black outlines, using the low-level ``bokeh.models``
API.
.. bokeh-example-metadata::
:sampledata: sine wave
:apis: bokeh.models.Circle, bokeh.models.Plot, bokeh.models.ColumnDataSource, bokeh.models.... | 29.5625 | 155 | 0.713883 |
d72f522c3b4a13e4085858ff78c2ebfbdd8b68c5 | 1,468 | py | Python | app/tests/integration/test_manufacturers/test_manufacturers_json.py | pedrolp85/pydevice | 39b961bb67f59ac9a9373ecc99748e07505b249e | [
"Apache-2.0"
] | null | null | null | app/tests/integration/test_manufacturers/test_manufacturers_json.py | pedrolp85/pydevice | 39b961bb67f59ac9a9373ecc99748e07505b249e | [
"Apache-2.0"
] | null | null | null | app/tests/integration/test_manufacturers/test_manufacturers_json.py | pedrolp85/pydevice | 39b961bb67f59ac9a9373ecc99748e07505b249e | [
"Apache-2.0"
] | null | null | null | import os
from model.manufacturer import Manufacturer
from unittest import mock
from fastapi.testclient import TestClient
from main import app
from settings import Settings, get_settings
from unittest import mock
import pytest
client = TestClient(app)
@pytest.fixture
def mock_env_manufacturers_json() -> None:
... | 34.139535 | 134 | 0.730245 |
1cb236a89adfa2991f72a72bd7d70b3741953bcc | 2,453 | py | Python | setup.py | codehelp/pyOCD | 97261499d059186ad19fb822578cda1c7def4135 | [
"Apache-2.0"
] | null | null | null | setup.py | codehelp/pyOCD | 97261499d059186ad19fb822578cda1c7def4135 | [
"Apache-2.0"
] | null | null | null | setup.py | codehelp/pyOCD | 97261499d059186ad19fb822578cda1c7def4135 | [
"Apache-2.0"
] | null | null | null | """
mbed CMSIS-DAP debugger
Copyright (c) 2012-2015 ARM 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
Unless required by applicable ... | 29.554217 | 83 | 0.641256 |
cd7fef8eaeffafc39db005674ae3e75d1067e2e3 | 612 | py | Python | gidibooks/users/services.py | luckyadogun/gidibooks | f06d3116eb0e954e515eeb8b82956a67c4b91861 | [
"MIT"
] | 1 | 2021-04-09T08:58:38.000Z | 2021-04-09T08:58:38.000Z | gidibooks/users/services.py | luckyadogun/gidibooks | f06d3116eb0e954e515eeb8b82956a67c4b91861 | [
"MIT"
] | null | null | null | gidibooks/users/services.py | luckyadogun/gidibooks | f06d3116eb0e954e515eeb8b82956a67c4b91861 | [
"MIT"
] | null | null | null | from typing import Dict
from django.core.exceptions import ValidationError
from users.models import User
from users.utils import user_to_dict
def create_account(data: Dict):
"""
Creates a user object using the dict argument
"""
try:
user = User(
first_name=data["first_name"],
... | 21.103448 | 50 | 0.620915 |
84ec5c5ac8b2cd4aba6928fe7f07ae5aa1dd323f | 34 | py | Python | test.py | hubbacrack/csws-week1 | 6bfa05196c22a2283eb3217a5d10df6d63a4af48 | [
"Apache-2.0"
] | null | null | null | test.py | hubbacrack/csws-week1 | 6bfa05196c22a2283eb3217a5d10df6d63a4af48 | [
"Apache-2.0"
] | null | null | null | test.py | hubbacrack/csws-week1 | 6bfa05196c22a2283eb3217a5d10df6d63a4af48 | [
"Apache-2.0"
] | null | null | null | x = "your"
y = "mom"
print(x + y) | 8.5 | 12 | 0.470588 |
eb36bad8a4dd7390ce46edf3189b846ac841373b | 384 | py | Python | Qualification_Round_2/Editorials/pin_problem_tester.py | manojpandey/CodeSprint_India_2014 | 91ecfc9f565f20ae7517f556a0c414990a84e0d8 | [
"MIT"
] | null | null | null | Qualification_Round_2/Editorials/pin_problem_tester.py | manojpandey/CodeSprint_India_2014 | 91ecfc9f565f20ae7517f556a0c414990a84e0d8 | [
"MIT"
] | null | null | null | Qualification_Round_2/Editorials/pin_problem_tester.py | manojpandey/CodeSprint_India_2014 | 91ecfc9f565f20ae7517f556a0c414990a84e0d8 | [
"MIT"
] | 2 | 2015-07-25T11:44:07.000Z | 2019-07-14T11:33:48.000Z | from fractions import gcd
t = input()
assert 1 <= t <= 100000
for _ in xrange(t):
n, m = map(int, raw_input().strip().split(' '))
assert 1 <= n <= 10000
assert 1 <= m <= 10
a = map(int, raw_input().strip().split(' '))
for __ in a:
assert 1 <= __ <= 10
lcm = a[0]
for i in range(1, m)... | 24 | 51 | 0.502604 |
c9ec315f2aec80fc6e2406ef5c01ec617e40d55a | 1,222 | py | Python | aws_openapi_lint/rules/rule_validator.py | clee/aws-openapi-lint | d1b40e1d760a862d6ed391442376fce50aff48f4 | [
"MIT"
] | 9 | 2019-11-27T20:46:22.000Z | 2022-03-20T15:57:38.000Z | aws_openapi_lint/rules/rule_validator.py | clee/aws-openapi-lint | d1b40e1d760a862d6ed391442376fce50aff48f4 | [
"MIT"
] | 1 | 2021-03-25T23:12:37.000Z | 2021-03-25T23:12:37.000Z | aws_openapi_lint/rules/rule_validator.py | clee/aws-openapi-lint | d1b40e1d760a862d6ed391442376fce50aff48f4 | [
"MIT"
] | 1 | 2021-07-09T20:07:32.000Z | 2021-07-09T20:07:32.000Z | import yaml
import json
class RuleViolation:
def __init__(self, identifier, message='', path=None):
self.path = path
self.identifier = identifier
self.message = message
def __eq__(self, other):
return self.identifier == other.identifier
class InvalidFormatException(Exception... | 24.44 | 58 | 0.594108 |
3f311456a0f46640e0418caf8be3a0c484219535 | 9,279 | py | Python | src/Python/pandasDynamo/pandamo/api/information/summary.py | SHKnudsen/Pandamo | ee99abf406d0609e766702aae98309a0936dae6e | [
"MIT"
] | 19 | 2019-11-10T21:17:44.000Z | 2021-01-29T00:02:57.000Z | release packages/DynamoPandas/extra/pandasDynamo/pandamo/api/information/summary.py | SHKnudsen/Pandamo | ee99abf406d0609e766702aae98309a0936dae6e | [
"MIT"
] | 1 | 2019-11-14T08:21:46.000Z | 2020-02-18T12:59:42.000Z | src/Python/pandasDynamo/pandamo/api/information/summary.py | SHKnudsen/Pandamo | ee99abf406d0609e766702aae98309a0936dae6e | [
"MIT"
] | 3 | 2019-12-24T20:36:04.000Z | 2020-03-16T16:27:17.000Z | import sys
import json
from ast import literal_eval
import pandas as pd
import re
from flask import Blueprint
from flask import current_app as app
from flask import request
from utillities.exceptions import ExceptionHelpers
mod = Blueprint('summary', __name__)
null = None
# Sum of values
@mod.route('sum/', methods=[... | 34.494424 | 106 | 0.62302 |
181dd6ced6dcdd12a7f90d81b4e2a3b5053b1fbe | 17,107 | py | Python | hummingbot/client/config/global_config_map.py | dietzam/hummingbot | 40d11a7bb604af8a3e0d22b8baefe45356e08419 | [
"Apache-2.0"
] | 5 | 2021-02-12T17:19:09.000Z | 2021-12-02T08:32:40.000Z | hummingbot/client/config/global_config_map.py | dietzam/hummingbot | 40d11a7bb604af8a3e0d22b8baefe45356e08419 | [
"Apache-2.0"
] | null | null | null | hummingbot/client/config/global_config_map.py | dietzam/hummingbot | 40d11a7bb604af8a3e0d22b8baefe45356e08419 | [
"Apache-2.0"
] | 6 | 2020-10-24T11:40:16.000Z | 2022-03-19T10:39:37.000Z | import random
from typing import Callable, Optional
from decimal import Decimal
import os.path
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.settings import (
required_exchanges,
DEXES,
DEFAULT_KEY_FILE_PATH,
DEFAULT_LOG_FILE_PATH,
SCRIPTS_PATH, EXCHANGES
)
from hu... | 42.7675 | 134 | 0.549073 |
c35b4594bf06213e49baee9ee71e92e6d142aa08 | 44 | py | Python | 1A_reverse_string.py | StevenGhow/For_Junyi | 1d6e78d5c786464ef1698ec6d066a94d58abb4c3 | [
"MIT"
] | null | null | null | 1A_reverse_string.py | StevenGhow/For_Junyi | 1d6e78d5c786464ef1698ec6d066a94d58abb4c3 | [
"MIT"
] | null | null | null | 1A_reverse_string.py | StevenGhow/For_Junyi | 1d6e78d5c786464ef1698ec6d066a94d58abb4c3 | [
"MIT"
] | null | null | null | oriStr = input("input:")
print(oriStr[::-1]) | 22 | 24 | 0.636364 |
69e293d2a6b623886a82620030f6efcbf824e037 | 1,525 | py | Python | src/more/inspect/__init__.py | badmonkey/python-hobgoblin | 46cfbea7738d137f8afa08aafdd65e3de9159763 | [
"MIT"
] | null | null | null | src/more/inspect/__init__.py | badmonkey/python-hobgoblin | 46cfbea7738d137f8afa08aafdd65e3de9159763 | [
"MIT"
] | null | null | null | src/more/inspect/__init__.py | badmonkey/python-hobgoblin | 46cfbea7738d137f8afa08aafdd65e3de9159763 | [
"MIT"
] | null | null | null | import inspect as _inspect
from inspect import * # noqa
import codefresh.more.typing as typing
def find_new(cls):
""" Search mro for a __new__ function """
for x in _inspect.getmro(cls):
f = getattr(x, "__new__", None)
if f:
return f, x.__name__
return None, None
def class... | 22.101449 | 75 | 0.600656 |
e95f3efa780e77f5d5e3b316ca26b69f7311ddb5 | 1,305 | py | Python | Backend/TuneSwitch/switch/token_auth.py | anandhakrishnanaji/TuneSwitch | f37e5fcfe0ce63960a72690735efb90fa614b245 | [
"MIT"
] | 9 | 2020-09-01T12:03:36.000Z | 2022-03-02T18:22:10.000Z | Backend/TuneSwitch/switch/token_auth.py | anandhakrishnanaji/TuneSwitch | f37e5fcfe0ce63960a72690735efb90fa614b245 | [
"MIT"
] | 3 | 2021-03-30T14:18:54.000Z | 2021-06-10T20:08:39.000Z | Backend/TuneSwitch/switch/token_auth.py | anandhakrishnanaji/TuneSwitch | f37e5fcfe0ce63960a72690735efb90fa614b245 | [
"MIT"
] | 5 | 2020-09-01T12:03:55.000Z | 2022-01-08T09:10:44.000Z | from channels.auth import AuthMiddlewareStack
from rest_framework.authtoken.models import Token
from django.contrib.auth.models import AnonymousUser
from asgiref.sync import sync_to_async
from channels.db import database_sync_to_async
@database_sync_to_async
def get_user(token_key):
try:
return Token.objec... | 32.625 | 88 | 0.70728 |
5ba444c7d92e5633b9783b74ba31d6a8741e51a7 | 14,244 | py | Python | zerver/lib/digest.py | TylerPham2000/zulip | 2e7aaba0dde5517b4a55cb0bd782f009be45e3ba | [
"Apache-2.0"
] | 17,004 | 2015-09-25T18:27:24.000Z | 2022-03-31T22:02:32.000Z | zerver/lib/digest.py | TylerPham2000/zulip | 2e7aaba0dde5517b4a55cb0bd782f009be45e3ba | [
"Apache-2.0"
] | 20,344 | 2015-09-25T19:02:42.000Z | 2022-03-31T23:54:40.000Z | zerver/lib/digest.py | TylerPham2000/zulip | 2e7aaba0dde5517b4a55cb0bd782f009be45e3ba | [
"Apache-2.0"
] | 7,271 | 2015-09-25T18:48:39.000Z | 2022-03-31T21:06:11.000Z | import datetime
import heapq
import logging
from collections import defaultdict
from typing import Any, Dict, List, Set, Tuple
from django.conf import settings
from django.db import transaction
from django.utils.timezone import now as timezone_now
from confirmation.models import one_click_unsubscribe_link
from zerver... | 32.372727 | 98 | 0.679865 |
9a510502cb5e9b3f4c17ff9634d1bf0f67fc345a | 131 | py | Python | polite/__init__.py | H0R5E/polite | bbbbf4fffbade585cb8b7114c4a8821e822c42e0 | [
"MIT"
] | 1 | 2020-05-03T21:10:33.000Z | 2020-05-03T21:10:33.000Z | polite/__init__.py | H0R5E/polite | bbbbf4fffbade585cb8b7114c4a8821e822c42e0 | [
"MIT"
] | 6 | 2017-06-12T13:50:09.000Z | 2019-07-02T10:24:45.000Z | polite/__init__.py | H0R5E/polite | bbbbf4fffbade585cb8b7114c4a8821e822c42e0 | [
"MIT"
] | 2 | 2017-06-12T12:40:03.000Z | 2018-11-17T12:47:48.000Z |
# Define build number for packaging test
from ._build import BUILD
__all__ = ["abc", "configuration", "paths"]
__build__ = BUILD
| 18.714286 | 43 | 0.732824 |
16bd90c8111e1bbe9cb1d71e441e124663b6d282 | 2,572 | py | Python | redash/authentication/account.py | frextrite/redash | 74beed80d20d858b51b5560e7984b20d5d2c874e | [
"BSD-2-Clause"
] | 3 | 2018-06-01T00:05:18.000Z | 2019-03-07T14:03:10.000Z | redash/authentication/account.py | frextrite/redash | 74beed80d20d858b51b5560e7984b20d5d2c874e | [
"BSD-2-Clause"
] | 10 | 2017-10-17T09:17:53.000Z | 2019-12-05T07:13:41.000Z | redash/authentication/account.py | tradingfoe/redash-clone | 94065b8dce0e27f6f40a7adc2b99e078b03115b3 | [
"BSD-2-Clause"
] | 5 | 2018-06-02T11:12:44.000Z | 2020-05-13T18:34:33.000Z | import logging
from flask import render_template
from redash import settings
from redash.tasks import send_mail
from redash.utils import base_url
# noinspection PyUnresolvedReferences
from itsdangerous import URLSafeTimedSerializer, SignatureExpired, BadSignature
logger = logging.getLogger(__name__)
serializer = URLS... | 31.365854 | 84 | 0.745334 |
dbb5f46ba10fc29763b73d81bef6dbcff4f5be3a | 2,280 | py | Python | spotify_tensorflow/luigi/tfx_task.py | rahmantasnim/spotify-tensorflow | 5673aa8191f59a77adf17f0d458716cd581e68e0 | [
"Apache-2.0"
] | null | null | null | spotify_tensorflow/luigi/tfx_task.py | rahmantasnim/spotify-tensorflow | 5673aa8191f59a77adf17f0d458716cd581e68e0 | [
"Apache-2.0"
] | null | null | null | spotify_tensorflow/luigi/tfx_task.py | rahmantasnim/spotify-tensorflow | 5673aa8191f59a77adf17f0d458716cd581e68e0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2017-2019 Spotify AB.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 33.529412 | 95 | 0.645175 |
cf2a74956bb487d86f68c7744fcbe1a3a34b0937 | 142 | py | Python | app/question/urls.py | PICT-ACM-Student-Chapter/OJ_API | 9172c2bedb82d5091d535d27c548385b35aeacad | [
"MIT"
] | 2 | 2021-08-14T18:10:37.000Z | 2022-03-03T17:16:45.000Z | app/question/urls.py | PICT-ACM-Student-Chapter/OJ_API | 9172c2bedb82d5091d535d27c548385b35aeacad | [
"MIT"
] | null | null | null | app/question/urls.py | PICT-ACM-Student-Chapter/OJ_API | 9172c2bedb82d5091d535d27c548385b35aeacad | [
"MIT"
] | 1 | 2021-09-22T09:12:21.000Z | 2021-09-22T09:12:21.000Z | from django.urls import path
from question.views import QuestionDetail
urlpatterns = [
path('<str:que_id>', QuestionDetail.as_view())
]
| 17.75 | 50 | 0.746479 |
2fdba0f82d7d7e666fa5e3b54065dbd74f48eadc | 8,664 | py | Python | src/cryptography/hazmat/bindings/openssl/x509.py | public/cryptography | e01eeb407aa77e6c8108bf08c85533d268a496bd | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/cryptography/hazmat/bindings/openssl/x509.py | public/cryptography | e01eeb407aa77e6c8108bf08c85533d268a496bd | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/cryptography/hazmat/bindings/openssl/x509.py | public/cryptography | e01eeb407aa77e6c8108bf08c85533d268a496bd | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
INCLUDES = """
#include <openssl/ssl.h>
/*
* This is part of a work-aro... | 32.69434 | 79 | 0.750231 |
139c1194b740529de6db76e65802d38041fcdca6 | 9,855 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20171001/express_route_circuit_authorization.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/network/v20171001/express_route_circuit_authorization.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/network/v20171001/express_route_circuit_authorization.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 67.5 | 3,215 | 0.725723 |
e393478ab801c3aab9cb8a7c4d13744e2e0a2e6c | 2,037 | py | Python | ProjectApplication/grant_management/migrations/0053_add_file_validator.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-07-29T10:00:11.000Z | 2022-02-19T11:00:34.000Z | ProjectApplication/grant_management/migrations/0053_add_file_validator.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 471 | 2019-09-20T14:37:28.000Z | 2022-03-25T14:16:34.000Z | ProjectApplication/grant_management/migrations/0053_add_file_validator.py | code-review-doctor/project-application | d85b40b69572efbcda24ce9c40803f76d8ffd192 | [
"MIT"
] | 5 | 2020-03-15T12:42:47.000Z | 2022-02-15T18:06:52.000Z | # Generated by Django 3.0.10 on 2020-09-21 10:38
from django.db import migrations, models
import grant_management.models
import project_core.utils.utils
import storages.backends.s3boto3
class Migration(migrations.Migration):
dependencies = [
('grant_management', '0052_invoice_allow_overbudget_by_can_be_... | 48.5 | 243 | 0.710849 |
4bc1014e99bf4e2d12f399da6695c094b541f218 | 3,172 | py | Python | code.py | NishthaShukla/mutual-fund-returns | 3b84318f14992f00e9ddad0f847c806947f9b862 | [
"MIT"
] | null | null | null | code.py | NishthaShukla/mutual-fund-returns | 3b84318f14992f00e9ddad0f847c806947f9b862 | [
"MIT"
] | null | null | null | code.py | NishthaShukla/mutual-fund-returns | 3b84318f14992f00e9ddad0f847c806947f9b862 | [
"MIT"
] | null | null | null | # --------------
# import libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Code starts here
data = pd.read_csv(path)
print(data.shape)
print(data.describe())
data.drop(['Serial Number'],inplace=True,axis=1)
# code ends here
# --------------
#Importing header files
from scipy.... | 23.849624 | 103 | 0.741173 |
32debd1a9478669bed7b092a1c825313da384209 | 6,913 | py | Python | pyFAI/gui/helper/model_transform.py | yugangzhang/pyFAI | e0453b279dac1f165f637e2a2ed1d4ddf57d31ba | [
"MIT"
] | 1 | 2021-04-28T20:09:13.000Z | 2021-04-28T20:09:13.000Z | pyFAI/gui/helper/model_transform.py | yugangzhang/pyFAI | e0453b279dac1f165f637e2a2ed1d4ddf57d31ba | [
"MIT"
] | null | null | null | pyFAI/gui/helper/model_transform.py | yugangzhang/pyFAI | e0453b279dac1f165f637e2a2ed1d4ddf57d31ba | [
"MIT"
] | null | null | null | # coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to d... | 34.393035 | 94 | 0.668595 |
1b7e558027ef75b54ff9b1627f86911820ba8a24 | 5,971 | py | Python | test/functional/rpc_users.py | ekkakon/vpcpos | 4a6fb8ca0220baaaf3cc3bc6bcfc3c1218a931a8 | [
"MIT"
] | null | null | null | test/functional/rpc_users.py | ekkakon/vpcpos | 4a6fb8ca0220baaaf3cc3bc6bcfc3c1218a931a8 | [
"MIT"
] | null | null | null | test/functional/rpc_users.py | ekkakon/vpcpos | 4a6fb8ca0220baaaf3cc3bc6bcfc3c1218a931a8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test multiple RPC users."""
from test_framework.test_framework import BitcoinTestFramework
from test_f... | 38.772727 | 129 | 0.614637 |
eceba1404a6734948c0692324e9b3b42dafa15c8 | 4,000 | py | Python | Turbulence_analysis/yt_post_scrape_common.py | AspdenGroup/PeleAnalysis_Aspden | 4259efa97a65a646a4e1bc3493cd9dae1e7024c5 | [
"BSD-3-Clause-LBNL"
] | 4 | 2019-04-24T13:33:35.000Z | 2021-08-24T07:11:22.000Z | Turbulence_analysis/yt_post_scrape_common.py | AspdenGroup/PeleAnalysis_Aspden | 4259efa97a65a646a4e1bc3493cd9dae1e7024c5 | [
"BSD-3-Clause-LBNL"
] | 4 | 2020-02-25T01:58:46.000Z | 2022-02-01T20:22:49.000Z | Turbulence_analysis/yt_post_scrape_common.py | AspdenGroup/PeleAnalysis_Aspden | 4259efa97a65a646a4e1bc3493cd9dae1e7024c5 | [
"BSD-3-Clause-LBNL"
] | 6 | 2018-11-05T11:53:20.000Z | 2021-03-22T10:44:54.000Z | ################################################################
################################################################
####
#### Post Processing for HIT Simulations
####
#### Authors: Emmanuel Motheau and John Wakefield
#### Last Edited: May 10, 2018
####
#### Written for Python 3.
####
####
########... | 28.169014 | 75 | 0.56875 |
7380f437e509b6de3a9c6820075a746b995fd4ab | 755 | py | Python | pp/test/test_import_gds_markers.py | flaport/gdsfactory | 1f2e844c1fe27b9c6340e2d51500fd3358fa16e5 | [
"MIT"
] | 8 | 2020-08-25T11:25:18.000Z | 2022-03-27T11:32:11.000Z | pp/test/test_import_gds_markers.py | flaport/gdsfactory | 1f2e844c1fe27b9c6340e2d51500fd3358fa16e5 | [
"MIT"
] | null | null | null | pp/test/test_import_gds_markers.py | flaport/gdsfactory | 1f2e844c1fe27b9c6340e2d51500fd3358fa16e5 | [
"MIT"
] | 1 | 2022-03-04T07:03:29.000Z | 2022-03-04T07:03:29.000Z | import pytest
import pp
from pp.import_gds import add_ports_from_markers_center, import_gds
from pp.port import auto_rename_ports
gdspaths = [pp.CONFIG["gdsdir"] / name for name in ["mmi1x2.gds", "mzi2x2.gds"]]
@pytest.mark.parametrize("gdspath", gdspaths)
def test_components_ports(gdspath, num_regression):
c =... | 25.166667 | 80 | 0.73245 |
cd1ba78aa7ffb08947488f81b9af0e94624f161c | 3,565 | py | Python | cooked_input/examples/events.py | lwanger/cooked_input | 5125f3c9253c3b67959327684b3fbd1008b057f9 | [
"MIT"
] | 16 | 2017-06-23T17:53:39.000Z | 2019-09-13T17:36:36.000Z | cooked_input/examples/events.py | lwanger/cooked_input | 5125f3c9253c3b67959327684b3fbd1008b057f9 | [
"MIT"
] | 10 | 2018-05-21T14:08:23.000Z | 2021-10-04T10:54:23.000Z | cooked_input/examples/events.py | lwanger/cooked_input | 5125f3c9253c3b67959327684b3fbd1008b057f9 | [
"MIT"
] | 2 | 2018-05-21T12:07:37.000Z | 2018-06-04T10:11:25.000Z | """
This is a simple event list manager showing cooked_input menus, tables, and commands.
Len Wanger, 2019
"""
from collections import namedtuple
import cooked_input as ci
EventType = namedtuple('EventType', 'id name desc')
Event = namedtuple('Event', 'id date desc type')
event_types = [
EventType(1, 'birthday'... | 36.377551 | 104 | 0.674053 |
34cac95b258ee160be11157680f1b547801b6cb0 | 3,608 | py | Python | models/suggestion.py | pordonj/the-blue-alliance | d5874bf760391436f0c7ff579fc4f7c88aafea87 | [
"MIT"
] | 1 | 2016-03-19T20:29:35.000Z | 2016-03-19T20:29:35.000Z | models/suggestion.py | gregmarra/the-blue-alliance | 5bedaf5c80b4623984760d3da3289640639112f9 | [
"MIT"
] | 11 | 2020-10-10T03:05:29.000Z | 2022-02-27T09:57:22.000Z | models/suggestion.py | gregmarra/the-blue-alliance | 5bedaf5c80b4623984760d3da3289640639112f9 | [
"MIT"
] | null | null | null | import json
from google.appengine.ext import ndb
from helpers.suggestions.media_creator import MediaCreator
from models.account import Account
from models.media import Media
class Suggestion(ndb.Model):
"""
Suggestions are generic containers for user-submitted data corrections to
the site. The generally... | 35.029126 | 103 | 0.64939 |
22da6a830c3961f12d929a161994d3dd39e5a507 | 35,064 | py | Python | plugins/modules/oci_database_database_actions.py | sagar2938/oci-ansible-collection | 5b8ce583a0d5d0aabf14494d61aea4649e18d1e6 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_database_database_actions.py | sagar2938/oci-ansible-collection | 5b8ce583a0d5d0aabf14494d61aea4649e18d1e6 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_database_database_actions.py | sagar2938/oci-ansible-collection | 5b8ce583a0d5d0aabf14494d61aea4649e18d1e6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 41.106682 | 160 | 0.601015 |
347534993a4fb66a62ce4ac93c3faedd82adc330 | 1,852 | py | Python | smoketests/pages/base.py | feer56/Kitsune2 | 68daba37eae4eceaffcb1ca978c783955b42d2eb | [
"BSD-3-Clause"
] | null | null | null | smoketests/pages/base.py | feer56/Kitsune2 | 68daba37eae4eceaffcb1ca978c783955b42d2eb | [
"BSD-3-Clause"
] | 1 | 2021-04-30T20:33:35.000Z | 2021-04-30T20:33:35.000Z | smoketests/pages/base.py | feer56/Kitsune2 | 68daba37eae4eceaffcb1ca978c783955b42d2eb | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from selenium.common.exceptions import (
ElementNotVisibleException,
NoSuchElementExcepti... | 32.491228 | 88 | 0.691685 |
8057f73cd3557022d090de0af8f29cbaf89b3e6e | 623 | py | Python | dashboard/migrations/0020_auto_20211026_2217.py | TheRK420/roommate | 89b9146cc57e45e32dcc308f859e5f06190159da | [
"Apache-2.0"
] | 1 | 2021-11-12T13:45:35.000Z | 2021-11-12T13:45:35.000Z | dashboard/migrations/0020_auto_20211026_2217.py | TheRK420/roommate | 89b9146cc57e45e32dcc308f859e5f06190159da | [
"Apache-2.0"
] | null | null | null | dashboard/migrations/0020_auto_20211026_2217.py | TheRK420/roommate | 89b9146cc57e45e32dcc308f859e5f06190159da | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.4 on 2021-10-26 16:47
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0019_auto_20211026_2203'),
]
operations = [
migrations.AlterField(
model_name='addroom',
... | 24.92 | 100 | 0.598716 |
62caf3316009b792de3a1f9f1caa026e207b26f0 | 2,365 | py | Python | 2015/03/03a.py | befeleme/aoc | dec81ceeffb8746af28eeeb7f925b219f2445079 | [
"WTFPL"
] | 3 | 2021-12-07T17:46:48.000Z | 2022-02-23T13:33:19.000Z | 2015/03/03a.py | befeleme/aoc | dec81ceeffb8746af28eeeb7f925b219f2445079 | [
"WTFPL"
] | null | null | null | 2015/03/03a.py | befeleme/aoc | dec81ceeffb8746af28eeeb7f925b219f2445079 | [
"WTFPL"
] | null | null | null | '''This script contains some doctests.
Invoke the tests from the command line:
`python -m doctest -v 03a.py`
Module documentation: https://docs.python.org/3/library/doctest.html
'''
from pathlib import Path
OFFSETS = {
'>': (1, 0),
'v': (0, -1),
'<': (-1, 0),
'^': (0, 1),
}
def move_to_next_house(cu... | 24.635417 | 97 | 0.612685 |
4c83d23476342e46d1bb808c01ec8730ba840239 | 4,188 | py | Python | correct_batch_effects_wdn/ljosa_preprocessing.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-02-25T05:34:44.000Z | 2022-02-25T05:34:44.000Z | correct_batch_effects_wdn/ljosa_preprocessing.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | correct_batch_effects_wdn/ljosa_preprocessing.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | 36.417391 | 80 | 0.744269 |
e08d65e121fbe253de646309aa37e232cbc469b3 | 2,037 | py | Python | src/cryptography/hazmat/primitives/cmac.py | jonathanslenders/cryptography | 2535e557872ac2f94355eb8a91a598f5cfc8afcf | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2019-09-20T18:51:44.000Z | 2019-09-20T18:51:44.000Z | src/cryptography/hazmat/primitives/cmac.py | jonathanslenders/cryptography | 2535e557872ac2f94355eb8a91a598f5cfc8afcf | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 11 | 2022-03-04T14:14:10.000Z | 2022-03-31T01:50:05.000Z | src/cryptography/hazmat/primitives/cmac.py | jonathanslenders/cryptography | 2535e557872ac2f94355eb8a91a598f5cfc8afcf | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2022-02-04T07:50:54.000Z | 2022-02-04T10:21:43.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import typing
from cryptography import utils
from cryptography.exceptions import (
AlreadyFinalized,
)
from cryptography.hazmat.primi... | 30.402985 | 79 | 0.654885 |
99cbc1030ef83b0d6863a76130f1631339bccf4e | 2,872 | py | Python | ntmdists.py | Seanny123/counting_to_addition | e41089065f50c07fba3e18657be175ac91162bd9 | [
"MIT"
] | 4 | 2017-01-11T04:27:21.000Z | 2019-05-27T17:41:46.000Z | ntmdists.py | Seanny123/counting_to_addition | e41089065f50c07fba3e18657be175ac91162bd9 | [
"MIT"
] | null | null | null | ntmdists.py | Seanny123/counting_to_addition | e41089065f50c07fba3e18657be175ac91162bd9 | [
"MIT"
] | 1 | 2019-11-19T05:21:55.000Z | 2019-11-19T05:21:55.000Z | from nengo.dists import *
from sobol_seq import i4_sobol_generate
class SphericalCoords(Distribution):
def __init__(self, m):
self.m = m
def sample(self, num, d=None, rng=np.random):
shape = self._sample_shape(num, d)
y = rng.uniform(size=shape)
return self.ppf(y)
def pd... | 33.395349 | 84 | 0.577646 |
5b379eae6d43b51fa6d1c50051f3668def27e516 | 35,059 | py | Python | pair-classifier/pair_classifier/classify_bugs.py | lxylxy123456/bugswarm | 522ea76ede28811463efda7551509f07b3951961 | [
"BSD-3-Clause"
] | 18 | 2019-12-27T06:53:39.000Z | 2022-03-03T03:05:35.000Z | pair-classifier/pair_classifier/classify_bugs.py | lxylxy123456/bugswarm | 522ea76ede28811463efda7551509f07b3951961 | [
"BSD-3-Clause"
] | 13 | 2020-01-10T17:11:38.000Z | 2021-12-13T20:34:38.000Z | pair-classifier/pair_classifier/classify_bugs.py | lxylxy123456/bugswarm | 522ea76ede28811463efda7551509f07b3951961 | [
"BSD-3-Clause"
] | 10 | 2020-01-10T17:36:57.000Z | 2021-09-13T19:51:43.000Z | # Run this script after generating folders for all image-tags by running main.py
#
# This script will generate:
#
# * a folder '[type-of-error]_results' which contains:
# reports_[type].tsv : contains details for each tag processed
# not_[type] : list of tags not classified as [type-of-error]
... | 43.389851 | 121 | 0.583474 |
7b05c60e6d4fdf73165d7d39f2c0d7b402a0ad05 | 58 | py | Python | spikewidgets/widgets/agreementmatrixwidget/__init__.py | KnierimLab/spikewidgets | 5ee37a43df21676db646942141c60e9bde95362c | [
"MIT"
] | 6 | 2019-01-23T03:51:31.000Z | 2021-02-15T07:54:39.000Z | spikewidgets/widgets/agreementmatrixwidget/__init__.py | KnierimLab/spikewidgets | 5ee37a43df21676db646942141c60e9bde95362c | [
"MIT"
] | 52 | 2019-01-23T10:10:30.000Z | 2021-06-27T10:23:10.000Z | spikewidgets/widgets/agreementmatrixwidget/__init__.py | KnierimLab/spikewidgets | 5ee37a43df21676db646942141c60e9bde95362c | [
"MIT"
] | 7 | 2019-01-23T10:06:03.000Z | 2020-10-29T18:38:37.000Z | from .agreementmatrixwidget import plot_agreement_matrix
| 19.333333 | 56 | 0.896552 |
f0d9b41edc277fc7ab50190a6e4a9e94a1d795a2 | 618 | py | Python | contrib/qt_translations.py | dacash-official/dacash | 4022fbce0220a472f4ae39f06771750db446d083 | [
"MIT"
] | 1 | 2020-04-09T19:46:22.000Z | 2020-04-09T19:46:22.000Z | contrib/qt_translations.py | dacash-official/dacash | 4022fbce0220a472f4ae39f06771750db446d083 | [
"MIT"
] | 1 | 2020-05-04T02:02:15.000Z | 2020-05-04T02:02:15.000Z | contrib/qt_translations.py | dacash-official/dacash | 4022fbce0220a472f4ae39f06771750db446d083 | [
"MIT"
] | 4 | 2018-06-08T20:38:36.000Z | 2021-03-22T08:37:12.000Z | #!/usr/bin/env python
# Helpful little script that spits out a comma-separated list of
# language codes for Qt icons that should be included
# in binary DACash Core distributions
import glob
import os
import re
import sys
if len(sys.argv) != 3:
sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys... | 26.869565 | 106 | 0.68123 |
72ebdee7be85a17b654fb8b655cf6dd87efa90e6 | 1,346 | py | Python | server/schemata/main_schema.py | fostroll/modelsrv0 | 0debc1d64734aafd5d4286397f9db530c7dd8719 | [
"CC0-1.0"
] | null | null | null | server/schemata/main_schema.py | fostroll/modelsrv0 | 0debc1d64734aafd5d4286397f9db530c7dd8719 | [
"CC0-1.0"
] | null | null | null | server/schemata/main_schema.py | fostroll/modelsrv0 | 0debc1d64734aafd5d4286397f9db530c7dd8719 | [
"CC0-1.0"
] | null | null | null | #from enum import Enum
from ipaddress import IPv4Address
#import os
from pydantic import DirectoryPath, FilePath, root_validator, validator
from typing import Dict, List, Union
from .base_schema import _BaseModel
from .user_schema import Users
from .model_schema import Model
config = {}
#class FormatEnum(str, Enum... | 24.925926 | 71 | 0.684993 |
4dd1678f6b2eb3c53f9d97692c3f105d3b2917da | 133 | py | Python | chapter_05_mathematics/section_5_1_decimal/5_7_decimal_precision.py | wuxiaofeng8764/P3SL_Example | 8ce1877af7372211b20836f799a8c44679577b7c | [
"MIT"
] | 3 | 2018-08-14T09:33:52.000Z | 2022-03-21T12:31:58.000Z | chapter_05_mathematics/section_5_1_decimal/5_7_decimal_precision.py | wuxiaofeng8764/P3SL_Example | 8ce1877af7372211b20836f799a8c44679577b7c | [
"MIT"
] | null | null | null | chapter_05_mathematics/section_5_1_decimal/5_7_decimal_precision.py | wuxiaofeng8764/P3SL_Example | 8ce1877af7372211b20836f799a8c44679577b7c | [
"MIT"
] | null | null | null | import decimal
d = decimal.Decimal('0.123456')
for i in range(1, 5):
decimal.getcontext().prec = i
print(i, ':', d, d * 1)
| 16.625 | 33 | 0.593985 |
b17fb018764726c0651da7567419b278c9eac416 | 488 | py | Python | rh_pathfinding/src/rh_pathfinding/ros/rosConstants.py | RhinohawkUAV/rh_ros | e13077060bdfcc231adee9731ebfddadcd8d6b4a | [
"MIT"
] | 4 | 2020-05-13T19:34:27.000Z | 2021-09-20T09:01:10.000Z | rh_pathfinding/src/rh_pathfinding/ros/rosConstants.py | RhinohawkUAV/rh_ros | e13077060bdfcc231adee9731ebfddadcd8d6b4a | [
"MIT"
] | null | null | null | rh_pathfinding/src/rh_pathfinding/ros/rosConstants.py | RhinohawkUAV/rh_ros | e13077060bdfcc231adee9731ebfddadcd8d6b4a | [
"MIT"
] | 2 | 2019-09-14T14:45:09.000Z | 2020-11-22T01:46:59.000Z | ROS_QUEUE_SIZE = 10
PATHFINDER_NODE_ID = "pathfinder"
PATHFINDER_SERVER_NODE = "action"
PATHFINDER_SERVER = "%s/%s" % (PATHFINDER_NODE_ID, PATHFINDER_SERVER_NODE)
# PATHFINDER_SERVER = "/rh/%s/%s" % (PATHFINDER_NODE_ID, PATHFINDER_SERVER_NODE)
PATHFINDER_INPUT_TOPIC = "%s/input" % PATHFINDER_NODE_ID
PATHFINDER_DEBUG_... | 34.857143 | 80 | 0.795082 |
5b1ea51a4c5192c5a8961c52874a45304677a105 | 2,074 | py | Python | scripts/analytics/user_domain_events.py | gaybro8777/osf.io | 30408511510a40bc393565817b343ef5fd76ab14 | [
"Apache-2.0"
] | 628 | 2015-01-15T04:33:22.000Z | 2022-03-30T06:40:10.000Z | scripts/analytics/user_domain_events.py | gaybro8777/osf.io | 30408511510a40bc393565817b343ef5fd76ab14 | [
"Apache-2.0"
] | 4,712 | 2015-01-02T01:41:53.000Z | 2022-03-30T14:18:40.000Z | scripts/analytics/user_domain_events.py | Johnetordoff/osf.io | de10bf249c46cede04c78f7e6f7e352c69e6e6b5 | [
"Apache-2.0"
] | 371 | 2015-01-12T16:14:08.000Z | 2022-03-31T18:58:29.000Z | import pytz
import logging
from dateutil.parser import parse
from datetime import datetime, timedelta
from django.db.models import Q
from osf.models import OSFUser
from website.app import init_app
from framework.database import paginated
from scripts.analytics.base import EventAnalytics
logger = logging.getLogger(__... | 32.40625 | 112 | 0.66297 |
8ed67a03f2b5f8df19aed737eb8cc82e126650c3 | 11,056 | py | Python | openrasp_iast/core/model/new_request_model.py | r3aker/iast | 52e5689c371c29db6e18233be5597093c378774d | [
"Apache-2.0"
] | null | null | null | openrasp_iast/core/model/new_request_model.py | r3aker/iast | 52e5689c371c29db6e18233be5597093c378774d | [
"Apache-2.0"
] | null | null | null | openrasp_iast/core/model/new_request_model.py | r3aker/iast | 52e5689c371c29db6e18233be5597093c378774d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Copyright 2017-2019 Baidu 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... | 30.4573 | 124 | 0.54839 |
94da8f6bb679e54501d4f59b626384e29f77cbc1 | 5,496 | py | Python | py/wiod/emissions.py | sonya/eea | b09502354eb6ce7975a21aa97dd3c812852b0626 | [
"Apache-2.0"
] | 1 | 2020-08-12T19:42:45.000Z | 2020-08-12T19:42:45.000Z | py/wiod/emissions.py | sonya/eea | b09502354eb6ce7975a21aa97dd3c812852b0626 | [
"Apache-2.0"
] | null | null | null | py/wiod/emissions.py | sonya/eea | b09502354eb6ce7975a21aa97dd3c812852b0626 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2012 Sonya Huang
#
# 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... | 36.157895 | 76 | 0.606441 |
7d0d7545292693e131ccd73278a575d1e3ea75fc | 1,852 | py | Python | screws/numerical/_3d_space/Jacobian_31.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | 1 | 2020-10-14T12:48:35.000Z | 2020-10-14T12:48:35.000Z | screws/numerical/_3d_space/Jacobian_31.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null | screws/numerical/_3d_space/Jacobian_31.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null |
from abc import ABC
import numpy as np
from screws.numerical._1d_space.derivative import NumericalDerivative_fx
class NumericalJacobian_xyz_t_31(ABC):
"""
For a mapping: ``XY(t) = (x, y, z) = (X(t), Y(t), Z(t))``, we compute ``dx/dt``, ``dy/dt``, and ``dz/dt``.
"""
def __init__(self, func31):
... | 37.795918 | 110 | 0.571274 |
3fd655839f952ec078beb82e83d4658cd715c49e | 436 | py | Python | binderhub/config.py | jupyterhub/builderhub | 37551212e47f515186b62fa02443f50b6e7b5839 | [
"BSD-3-Clause"
] | null | null | null | binderhub/config.py | jupyterhub/builderhub | 37551212e47f515186b62fa02443f50b6e7b5839 | [
"BSD-3-Clause"
] | null | null | null | binderhub/config.py | jupyterhub/builderhub | 37551212e47f515186b62fa02443f50b6e7b5839 | [
"BSD-3-Clause"
] | null | null | null | from .base import BaseHandler
class ConfigHandler(BaseHandler):
"""Serve config"""
def generate_config(self):
config = dict()
for repo_provider_class_alias, repo_provider_class in self.settings[
"repo_providers"
].items():
config[repo_provider_class_alias] = re... | 25.647059 | 76 | 0.66055 |
fc5a039d7e12cae6e0f3c33eb62714e68b69f684 | 32,296 | py | Python | api/src/tests/application/functional_tests/housing_units/test_endpoints.py | iliaskaras/housing-units | 2b0d78fcb42629ce7530b2da556ebd550cc7bec8 | [
"MIT"
] | null | null | null | api/src/tests/application/functional_tests/housing_units/test_endpoints.py | iliaskaras/housing-units | 2b0d78fcb42629ce7530b2da556ebd550cc7bec8 | [
"MIT"
] | null | null | null | api/src/tests/application/functional_tests/housing_units/test_endpoints.py | iliaskaras/housing-units | 2b0d78fcb42629ce7530b2da556ebd550cc7bec8 | [
"MIT"
] | null | null | null | import pytest
from fastapi.testclient import TestClient
from tests.application.functional_tests.housing_units.utils import get_cleaned_housing_units_response
from application.main import app
client = TestClient(app)
@pytest.mark.asyncio
async def test_filter_housing_units_get_request(
populate_users, popula... | 51.92283 | 120 | 0.672839 |
97f5d537a26eef1c2a0b9557a676b297b8beb19e | 17,129 | py | Python | yolact/layers/backbone.py | masszhou/mod_yolcat | bc4a658674fccaaf0ed545403892c3c3d8816d24 | [
"MIT"
] | null | null | null | yolact/layers/backbone.py | masszhou/mod_yolcat | bc4a658674fccaaf0ed545403892c3c3d8816d24 | [
"MIT"
] | null | null | null | yolact/layers/backbone.py | masszhou/mod_yolcat | bc4a658674fccaaf0ed545403892c3c3d8816d24 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import pickle
from collections import OrderedDict
try:
from dcn_v2 import DCN
except ImportError:
def DCN(*args, **kwdargs):
raise Exception(
'DCN could not be imported. If you want to use YOLACT++ models, compile DCN. Check the README for instructions.')... | 38.064444 | 125 | 0.608267 |
18465d42af265b14f17e384d6faaa9017c7e37c3 | 1,226 | py | Python | examples/tanner/parse_test.py | yrrapt/genetic_algorithm_optimiser | 74f86bc60978ba21dd62e3db00f719ec6641ad88 | [
"MIT"
] | null | null | null | examples/tanner/parse_test.py | yrrapt/genetic_algorithm_optimiser | 74f86bc60978ba21dd62e3db00f719ec6641ad88 | [
"MIT"
] | null | null | null | examples/tanner/parse_test.py | yrrapt/genetic_algorithm_optimiser | 74f86bc60978ba21dd62e3db00f719ec6641ad88 | [
"MIT"
] | null | null | null | import re
# input_file_location = "schematic_oscillator_tb_n1a_tb_TSP/schematic_oscillator_tb_n1a_tb_TSP.measure"
# input_file_location = "schematic_oscillator_tb_n1a_tb_TSP/schematic_oscillator_tb_n1a_tb_TSP.log"
input_file_location = "_data/schematic_oscillator_tb_n1a_tb_TSP/schematic_oscillator_tb_n1a_tb_TSP.measur... | 26.652174 | 107 | 0.707178 |
bd46bc729d96ed03466160b3a4201456f4f8d67d | 2,796 | py | Python | mindspore/python/mindspore/ops/composite/multitype_ops/ones_like_impl.py | AK391/mindspore | f5aeaa9172dcd647885774e7f657593c81b79fc6 | [
"Apache-2.0"
] | null | null | null | mindspore/python/mindspore/ops/composite/multitype_ops/ones_like_impl.py | AK391/mindspore | f5aeaa9172dcd647885774e7f657593c81b79fc6 | [
"Apache-2.0"
] | null | null | null | mindspore/python/mindspore/ops/composite/multitype_ops/ones_like_impl.py | AK391/mindspore | f5aeaa9172dcd647885774e7f657593c81b79fc6 | [
"Apache-2.0"
] | null | null | null | # This is the Python adaptation and derivative work of Myia (https://github.com/mila-iqia/myia/).
#
# Copyright 2020 Huawei Technologies Co., Ltd
#
# 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 ... | 32.511628 | 115 | 0.685622 |
1d994f8ad0341ad3d8215255e317e5d9cbd6101c | 5,834 | py | Python | spk/subliminal/src/app/application/direct.py | BKSteve/spksrc | fc1982b27311eccf15767961955cee954cb409ee | [
"BSD-3-Clause"
] | 2,211 | 2015-01-02T11:47:37.000Z | 2022-03-31T11:24:09.000Z | spk/subliminal/src/app/application/direct.py | BKSteve/spksrc | fc1982b27311eccf15767961955cee954cb409ee | [
"BSD-3-Clause"
] | 3,572 | 2015-01-01T02:44:58.000Z | 2022-03-31T18:13:33.000Z | spk/subliminal/src/app/application/direct.py | StrannikS/spksrc | 97df932beab2fd5817f33ed647d452f33b89de8b | [
"BSD-3-Clause"
] | 1,227 | 2015-01-03T15:05:10.000Z | 2022-03-30T05:52:34.000Z | from babelfish import Language
from configobj import ConfigObj
from datetime import timedelta
from db import *
from pyextdirect.configuration import (create_configuration, expose, LOAD,
STORE_READ, STORE_CUD, SUBMIT)
from validate import Validator
import os
import shutil
import subliminal
import subprocess
import t... | 42.897059 | 172 | 0.645355 |
a3289a5ae5b1d585a08796c49b7d71cc959ea5ea | 90,450 | py | Python | tensorflow/python/ops/resource_variable_ops.py | AdamHillier/tensorflow | 6780ebf4858a56fd0745f03fa5a61b249559f3cd | [
"Apache-2.0"
] | 9 | 2019-06-05T06:48:07.000Z | 2020-09-29T07:08:02.000Z | tensorflow/python/ops/resource_variable_ops.py | AdamHillier/tensorflow | 6780ebf4858a56fd0745f03fa5a61b249559f3cd | [
"Apache-2.0"
] | 7 | 2021-11-10T20:21:23.000Z | 2022-03-22T19:18:39.000Z | tensorflow/python/ops/resource_variable_ops.py | AdamHillier/tensorflow | 6780ebf4858a56fd0745f03fa5a61b249559f3cd | [
"Apache-2.0"
] | 5 | 2016-11-07T21:17:45.000Z | 2020-05-31T00:16:59.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.898544 | 109 | 0.681946 |
fe0124140e8dc2027f4fadfec1fb4b85b67e1042 | 4,049 | py | Python | tb_generator.py | benfild/dataScience_playground | 403f9b324f1e3f078c5d4aaea5c1b5eb97922052 | [
"MIT"
] | null | null | null | tb_generator.py | benfild/dataScience_playground | 403f9b324f1e3f078c5d4aaea5c1b5eb97922052 | [
"MIT"
] | null | null | null | tb_generator.py | benfild/dataScience_playground | 403f9b324f1e3f078c5d4aaea5c1b5eb97922052 | [
"MIT"
] | null | null | null | """
Generate synthetic TB data
Most common symptoms occuring over 80% of the time (also halmark signs):
1. Cough for two weeks or more (productive)
2. Night sweats
3. Fever
4. Weight loss
Common symptoms occuring over 50% of the time
1. Chest pain
2. Malaise
3. Difficulty breathing
Signs and their prevalences:
Malno... | 34.905172 | 214 | 0.718696 |
eac19db37ab97f5f04118de2fb1e073b3926b0c8 | 618 | py | Python | django_dashboard/migrations/0082_auto_20180606_2202.py | keepexploring/smartbiogas | ca663435b05666113e3c0cb55e6f087c61497208 | [
"MIT"
] | null | null | null | django_dashboard/migrations/0082_auto_20180606_2202.py | keepexploring/smartbiogas | ca663435b05666113e3c0cb55e6f087c61497208 | [
"MIT"
] | 10 | 2017-11-24T12:15:40.000Z | 2022-02-10T06:41:32.000Z | django_dashboard/migrations/0082_auto_20180606_2202.py | keepexploring/smartbiogas | ca663435b05666113e3c0cb55e6f087c61497208 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-06-06 22:02
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('django_dashboard', '0081_auto_20180606_2035'),
]
... | 28.090909 | 164 | 0.677994 |
0707974b749175bc09d92ba9af7c1e85f8615975 | 351 | py | Python | other/dingding/dingtalk/api/rest/OapiChatNickBatchupdateRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiChatNickBatchupdateRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiChatNickBatchupdateRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | '''
Created by auto_sdk on 2019.08.01
'''
from dingtalk.api.base import RestApi
class OapiChatNickBatchupdateRequest(RestApi):
def __init__(self,url=None):
RestApi.__init__(self,url)
self.chatid = None
self.user_nick_model = None
def getHttpMethod(self):
return 'POST'
def getapiname(self):
return 'dingta... | 21.9375 | 46 | 0.757835 |
33f4bec4f49fbd60e5aa711e2679befafe371dd4 | 2,428 | py | Python | data/cirq_new/cirq_program/startCirq_noisy715.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy715.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy715.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=22
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
def make_circuit(n: int, input_qubit):
c = cirq.Ci... | 34.197183 | 77 | 0.689044 |
2fd89d0018f27926ac295045027fdd331a6876d2 | 3,306 | py | Python | functions/code_connect.py | chvolkmann/code-connect-fish-plugin | ef6323f200edb7df4732e5412f77fdfa0056caa9 | [
"MIT"
] | null | null | null | functions/code_connect.py | chvolkmann/code-connect-fish-plugin | ef6323f200edb7df4732e5412f77fdfa0056caa9 | [
"MIT"
] | null | null | null | functions/code_connect.py | chvolkmann/code-connect-fish-plugin | ef6323f200edb7df4732e5412f77fdfa0056caa9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# based on https://stackoverflow.com/a/60949722
import time
import subprocess as sp
import os
from distutils.spawn import find_executable
from typing import Iterable, List, Tuple
from pathlib import Path
MAX_IDLE_TIME = 4 * 60 * 60
def fail(*msgs, retcode=1):
for msg in msgs:
prin... | 32.097087 | 124 | 0.631881 |
32183e5269b0afc3b06f818bc70c00a7474a98e4 | 72 | py | Python | src/test-01.py | chenghua521/test | daf6560df810c5a4129e75cfda3cd15f3259cad5 | [
"MIT"
] | null | null | null | src/test-01.py | chenghua521/test | daf6560df810c5a4129e75cfda3cd15f3259cad5 | [
"MIT"
] | null | null | null | src/test-01.py | chenghua521/test | daf6560df810c5a4129e75cfda3cd15f3259cad5 | [
"MIT"
] | null | null | null | def test():
print("hello, world!")
if __name__ == '__main__':
test() | 12 | 26 | 0.611111 |
2d40604975c5517769393832eee45c3fa26e2cb0 | 19,537 | py | Python | python/ray/tune/tune.py | mxz96102/ray | 02768ad707f615a47a4a5f28ae333c25012baaa1 | [
"Apache-2.0"
] | null | null | null | python/ray/tune/tune.py | mxz96102/ray | 02768ad707f615a47a4a5f28ae333c25012baaa1 | [
"Apache-2.0"
] | null | null | null | python/ray/tune/tune.py | mxz96102/ray | 02768ad707f615a47a4a5f28ae333c25012baaa1 | [
"Apache-2.0"
] | null | null | null | import logging
from ray.tune.error import TuneError
from ray.tune.experiment import convert_to_experiment_list, Experiment
from ray.tune.analysis import ExperimentAnalysis
from ray.tune.suggest import BasicVariantGenerator
from ray.tune.suggest.suggestion import Searcher, SearchGenerator
from ray.tune.trial import Tri... | 43.31929 | 79 | 0.647285 |
d683f9d639d77f5fdc3ccb0df7aca004907537fc | 1,921 | py | Python | InstallerPlugins/_metadata.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 4 | 2019-03-11T18:05:49.000Z | 2021-05-22T21:09:09.000Z | InstallerPlugins/_metadata.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | InstallerPlugins/_metadata.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2019-03-18T18:53:36.000Z | 2019-03-18T18:53:36.000Z | # This file is generated by objective.metadata
#
# Last update: Fri Sep 21 15:13:54 2012
import objc, sys
if sys.maxsize > 2 ** 32:
def sel32or64(a, b): return b
else:
def sel32or64(a, b): return a
if sys.byteorder == 'little':
def littleOrBig(a, b): return a
else:
def littleOrBig(a, b): return b
mis... | 45.738095 | 343 | 0.680375 |
ad520129f5e58549dfe18f90300a7eef30a70c4b | 6,285 | py | Python | yapf/yapflib/long_lines_splitter.py | akuleshov7/huawei-yapf | 72c188257e2bafa4da9e553ba0ee9b86831c51b8 | [
"Apache-2.0"
] | 12 | 2020-04-24T18:12:08.000Z | 2021-06-09T16:53:10.000Z | yapf/yapflib/long_lines_splitter.py | akuleshov7/h-yapf | 72c188257e2bafa4da9e553ba0ee9b86831c51b8 | [
"Apache-2.0"
] | 1 | 2020-09-09T19:55:35.000Z | 2020-09-14T00:07:29.000Z | yapf/yapflib/long_lines_splitter.py | akuleshov7/h-yapf | 72c188257e2bafa4da9e553ba0ee9b86831c51b8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Function: Support for Recomendaion 1.7 of the Huawei Coding Style
Copyright Information: Huawei Technologies Co., Ltd. All Rights Reserved © 2010-2019
Change History: 2019-12-06 Created
"""
from lib2to3 import pytree
from lib2to3.pgen2 import token
from lib2to3.pygram import python_symbols ... | 31.113861 | 84 | 0.570406 |
f45e83a8e62b9031f3d9d90bec64bb35bd6999c5 | 3,044 | py | Python | office365/onenote/onenote.py | theodoriss/Office365-REST-Python-Client | 3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/onenote/onenote.py | theodoriss/Office365-REST-Python-Client | 3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/onenote/onenote.py | theodoriss/Office365-REST-Python-Client | 3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | from office365.entity import Entity
from office365.entity_collection import EntityCollection
from office365.onenote.notebooks.notebook_collection import NotebookCollection
from office365.onenote.operations.onenote_operation import OnenoteOperation
from office365.onenote.pages.page import OnenotePageCollection
from offi... | 38.531646 | 113 | 0.627792 |
48f161eebcebd044092bb9f935b22022aa4b7bbe | 97 | py | Python | pyvalidator/utils/merge.py | theteladras/py.validator | 624ace7973552c8ac9353f48acbf96ec0ecc24a9 | [
"MIT"
] | 15 | 2021-11-01T14:14:56.000Z | 2022-03-17T11:52:29.000Z | pyvalidator/utils/merge.py | theteladras/py.validator | 624ace7973552c8ac9353f48acbf96ec0ecc24a9 | [
"MIT"
] | 1 | 2022-03-16T13:39:16.000Z | 2022-03-17T09:16:00.000Z | pyvalidator/utils/merge.py | theteladras/py.validator | 624ace7973552c8ac9353f48acbf96ec0ecc24a9 | [
"MIT"
] | null | null | null | def merge(main_dict: dict, default_dict: dict) -> dict:
return {**default_dict, **main_dict}
| 32.333333 | 55 | 0.701031 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.