hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c0fcd7c107d603550943f37bd4bffc3c70d71c0
4,562
py
Python
runtime/image_classification/models/vgg16/gpus=16/stage0.py
NestLakerJasonLIN/pipedream
f50827f2e28cbdbd82a4ea686c0498272b1460d6
[ "MIT" ]
273
2019-08-31T14:12:11.000Z
2022-03-05T13:34:25.000Z
runtime/image_classification/models/vgg16/gpus=16/stage0.py
albertsh10/pipedream
cad624f79a71f44ba79099f0c38321347b13e5c2
[ "MIT" ]
67
2019-09-19T15:36:59.000Z
2022-01-13T09:11:54.000Z
runtime/image_classification/models/vgg16/gpus=16/stage0.py
albertsh10/pipedream
cad624f79a71f44ba79099f0c38321347b13e5c2
[ "MIT" ]
100
2019-09-16T20:59:14.000Z
2022-03-23T12:56:56.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import torch class Stage0(torch.nn.Module): def __init__(self): super(Stage0, self).__init__() self.layer2 = torch.nn.Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)) self.layer3 = torch.nn.ReLU(inpla...
49.586957
106
0.609382
import torch class Stage0(torch.nn.Module): def __init__(self): super(Stage0, self).__init__() self.layer2 = torch.nn.Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)) self.layer3 = torch.nn.ReLU(inplace=True) self.layer4 = torch.nn.Conv2d(64, 64, kernel_size=(3, 3)...
true
true
1c0fce9782ebcdc40b61002de168b82909ca31b8
5,730
py
Python
test/test_sersic.py
LBJ-Wade/astrofunc_lensing_profile
d2223705bc44d07575a5e93291375ab8e69ebfa8
[ "MIT" ]
null
null
null
test/test_sersic.py
LBJ-Wade/astrofunc_lensing_profile
d2223705bc44d07575a5e93291375ab8e69ebfa8
[ "MIT" ]
null
null
null
test/test_sersic.py
LBJ-Wade/astrofunc_lensing_profile
d2223705bc44d07575a5e93291375ab8e69ebfa8
[ "MIT" ]
null
null
null
__author__ = 'sibirrer' from astrofunc.LightProfiles.sersic import Sersic, Sersic_elliptic, DoubleSersic, CoreSersic import numpy as np import pytest import numpy.testing as npt class TestSersic(object): """ tests the Gaussian methods """ def setup(self): self.sersic = Sersic(smoothing=0.02)...
38.716216
127
0.613787
__author__ = 'sibirrer' from astrofunc.LightProfiles.sersic import Sersic, Sersic_elliptic, DoubleSersic, CoreSersic import numpy as np import pytest import numpy.testing as npt class TestSersic(object): def setup(self): self.sersic = Sersic(smoothing=0.02) self.sersic_elliptic = Sersic_elliptic...
true
true
1c0fced6c3efc811caa6a40fb57802c61d3c505a
116,521
py
Python
tests/python/frontend/onnx/test_forward.py
matthewygf/incubator-tvm
348144cb8b0485adca37aead0dfef9269cd2300d
[ "Apache-2.0" ]
null
null
null
tests/python/frontend/onnx/test_forward.py
matthewygf/incubator-tvm
348144cb8b0485adca37aead0dfef9269cd2300d
[ "Apache-2.0" ]
null
null
null
tests/python/frontend/onnx/test_forward.py
matthewygf/incubator-tvm
348144cb8b0485adca37aead0dfef9269cd2300d
[ "Apache-2.0" ]
null
null
null
# 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...
33.882233
100
0.607041
import numpy as np import math import onnx from onnx import helper, TensorProto, mapping import torch import torchvision import tvm.topi.testing import tvm from tvm import relay from tvm.contrib import graph_runtime import scipy import tvm.testing def get_input_data_shape_dict(graph_def, input_data): if isinstanc...
true
true
1c0fd00deb6bfe3a8d2f3f2cf4a1f31afd8052fc
5,239
py
Python
src/quantum/azext_quantum/vendored_sdks/azure_quantum/aio/operations/_providers_operations.py
ravithanneeru/azure-cli-extensions
e0de87f3563ae39525370e9912589aac33e7bded
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/quantum/azext_quantum/vendored_sdks/azure_quantum/aio/operations/_providers_operations.py
ravithanneeru/azure-cli-extensions
e0de87f3563ae39525370e9912589aac33e7bded
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/quantum/azext_quantum/vendored_sdks/azure_quantum/aio/operations/_providers_operations.py
ravithanneeru/azure-cli-extensions
e0de87f3563ae39525370e9912589aac33e7bded
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47.627273
194
0.664058
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline ...
true
true
1c0fd056e64f0dbf673f5ca63e9df978590bd258
9,661
py
Python
main.py
tej17584/proyecto2DisenoLenguajes
a8aead2908eb4e87c8b7d9d373690766d6dfcd9c
[ "MIT" ]
null
null
null
main.py
tej17584/proyecto2DisenoLenguajes
a8aead2908eb4e87c8b7d9d373690766d6dfcd9c
[ "MIT" ]
null
null
null
main.py
tej17584/proyecto2DisenoLenguajes
a8aead2908eb4e87c8b7d9d373690766d6dfcd9c
[ "MIT" ]
null
null
null
""" Nombre: Alejandro Tejada Curso: Diseño lenguajes de programacion Fecha: Abril 2021 Programa: main.py Propósito: Este programa es el que lee los archivos V 1.0 """ # zona de import de librerías from os import remove from funciones import * from pprint import pprint as pp from posftixEvaluador import * from tipoVar i...
33.545139
90
0.562675
from os import remove from funciones import * from pprint import pprint as pp from posftixEvaluador import * from tipoVar import * from postFixTokens import * from reader import * from AFNDirecto import * import pickle import re import os instancia_reader = Reader() instancia_funciones = funciones() arrayEntradaP1 = ...
true
true
1c0fd151c40b7127723de717e0c947d3ce79ef08
10,089
py
Python
Trakttv.bundle/Contents/Code/main.py
disrupted/Trakttv.bundle
24712216c71f3b22fd58cb5dd89dad5bb798ed60
[ "RSA-MD" ]
1,346
2015-01-01T14:52:24.000Z
2022-03-28T12:50:48.000Z
Trakttv.bundle/Contents/Code/main.py
alcroito/Plex-Trakt-Scrobbler
4f83fb0860dcb91f860d7c11bc7df568913c82a6
[ "RSA-MD" ]
474
2015-01-01T10:27:46.000Z
2022-03-21T12:26:16.000Z
Trakttv.bundle/Contents/Code/main.py
alcroito/Plex-Trakt-Scrobbler
4f83fb0860dcb91f860d7c11bc7df568913c82a6
[ "RSA-MD" ]
191
2015-01-02T18:27:22.000Z
2022-03-29T10:49:48.000Z
from core.header import Header from core.helpers import get_class_name, spawn from core.logger import Logger from plugin.core.configuration import Configuration from plugin.core.constants import ACTIVITY_MODE, PLUGIN_VERSION from plugin.core.helpers.thread import module_start from plugin.core.logger import LOG_HANDLER...
28.825714
113
0.595698
from core.header import Header from core.helpers import get_class_name, spawn from core.logger import Logger from plugin.core.configuration import Configuration from plugin.core.constants import ACTIVITY_MODE, PLUGIN_VERSION from plugin.core.helpers.thread import module_start from plugin.core.logger import LOG_HANDLER...
true
true
1c0fd19131d151ae800580178c01cbb382187753
5,185
py
Python
thirdparty/basalt/thirdparty/ros/ros_comm/test/test_rospy/test/unit/test_rospy_api.py
Bookiebookie/LieSpline
b617bdf6b37164562387d0257145e9230d28e2e7
[ "BSD-3-Clause" ]
2
2021-05-22T09:46:00.000Z
2022-03-25T09:56:22.000Z
thirdparty/basalt/thirdparty/ros/ros_comm/test/test_rospy/test/unit/test_rospy_api.py
Bookiebookie/LieSpline
b617bdf6b37164562387d0257145e9230d28e2e7
[ "BSD-3-Clause" ]
null
null
null
thirdparty/basalt/thirdparty/ros/ros_comm/test/test_rospy/test/unit/test_rospy_api.py
Bookiebookie/LieSpline
b617bdf6b37164562387d0257145e9230d28e2e7
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code...
31.615854
86
0.658631
import os import sys import struct import unittest import time class TestRospyApi(unittest.TestCase): def test_msg(self): import rospy m = rospy.Message() try: from cStringIO import StringIO except ImportError: from io import String...
true
true
1c0fd1aaab2fe4ae6289101c27c963e01e8c1bd3
2,002
py
Python
scholariumat/donations/admin.py
valuehack/scholariumat
47c13f3429b95b9ad5ca59b45cf971895260bb5c
[ "MIT" ]
null
null
null
scholariumat/donations/admin.py
valuehack/scholariumat
47c13f3429b95b9ad5ca59b45cf971895260bb5c
[ "MIT" ]
232
2018-06-30T11:40:52.000Z
2020-04-29T23:55:41.000Z
scholariumat/donations/admin.py
valuehack/scholariumat
47c13f3429b95b9ad5ca59b45cf971895260bb5c
[ "MIT" ]
3
2018-05-31T12:57:03.000Z
2020-02-27T16:25:44.000Z
from datetime import date from django.contrib import admin from django.contrib.admin import SimpleListFilter from django.db.models import OuterRef, Subquery from .models import Donation, DonationLevel, PaymentMethod class DonationInline(admin.TabularInline): model = Donation extra = 0 class LevelFilter(Si...
29.441176
108
0.68032
from datetime import date from django.contrib import admin from django.contrib.admin import SimpleListFilter from django.db.models import OuterRef, Subquery from .models import Donation, DonationLevel, PaymentMethod class DonationInline(admin.TabularInline): model = Donation extra = 0 class LevelFilter(Si...
true
true
1c0fd1fc3e7fe11b09f7423ca13c1bf03367f281
2,137
py
Python
apps/shorty/views.py
Scronullik/shorty_django
2c9ef31cd93254242df822a227f82ed19d5ae54c
[ "MIT" ]
null
null
null
apps/shorty/views.py
Scronullik/shorty_django
2c9ef31cd93254242df822a227f82ed19d5ae54c
[ "MIT" ]
null
null
null
apps/shorty/views.py
Scronullik/shorty_django
2c9ef31cd93254242df822a227f82ed19d5ae54c
[ "MIT" ]
null
null
null
from django.urls import reverse from django.core.cache import cache from django.views import generic from .models import Shorty from .forms import CreateLinkForm, EditLinkForm class HomeView(generic.TemplateView): template_name = 'index.html' def get_context_data(self, **kwargs): context = super().g...
29.273973
111
0.666355
from django.urls import reverse from django.core.cache import cache from django.views import generic from .models import Shorty from .forms import CreateLinkForm, EditLinkForm class HomeView(generic.TemplateView): template_name = 'index.html' def get_context_data(self, **kwargs): context = super().g...
true
true
1c0fd30d4ad46123210c75bb92fe4cdb11b43c34
2,125
py
Python
allennlp/tests/interpret/input_reduction_test.py
annaproxy/udify-metalearning
55206a3aac0aba74a3615a36192d03b6467cfd6f
[ "MIT" ]
65
2020-11-13T05:36:29.000Z
2022-03-26T22:45:46.000Z
allennlp/tests/interpret/input_reduction_test.py
annaproxy/udify-metalearning
55206a3aac0aba74a3615a36192d03b6467cfd6f
[ "MIT" ]
11
2021-05-26T16:22:17.000Z
2022-03-02T04:03:18.000Z
allennlp/tests/interpret/input_reduction_test.py
annaproxy/udify-metalearning
55206a3aac0aba74a3615a36192d03b6467cfd6f
[ "MIT" ]
10
2020-11-21T15:25:02.000Z
2022-02-25T11:09:50.000Z
# pylint: disable=no-self-use,invalid-name from allennlp.common.testing import AllenNlpTestCase from allennlp.models.archival import load_archive from allennlp.predictors import Predictor from allennlp.interpret.attackers import InputReduction class TestInputReduction(AllenNlpTestCase): def test_input_reduction(se...
46.195652
112
0.666353
from allennlp.common.testing import AllenNlpTestCase from allennlp.models.archival import load_archive from allennlp.predictors import Predictor from allennlp.interpret.attackers import InputReduction class TestInputReduction(AllenNlpTestCase): def test_input_reduction(self): inputs = { ...
true
true
1c0fd32e23a27e0a775472534ba399e7396e4941
6,598
py
Python
src/database.py
yusufalptigin/StockMarketSaaSWebsite
3a7d1e8896826c6fd3638f5e14cfd25ffb8365d6
[ "MIT" ]
null
null
null
src/database.py
yusufalptigin/StockMarketSaaSWebsite
3a7d1e8896826c6fd3638f5e14cfd25ffb8365d6
[ "MIT" ]
null
null
null
src/database.py
yusufalptigin/StockMarketSaaSWebsite
3a7d1e8896826c6fd3638f5e14cfd25ffb8365d6
[ "MIT" ]
null
null
null
from user import User import psycopg2 as dbapi2 import os class Database: def __init__(self): self.conn = dbapi2.connect(os.environ['DATABASE_URL'], sslmode='require') self.users = { 'test': 'test' } self.stocks = { 'DARDL.IS': 3.0400, 'MGROS.IS'...
38.360465
138
0.481964
from user import User import psycopg2 as dbapi2 import os class Database: def __init__(self): self.conn = dbapi2.connect(os.environ['DATABASE_URL'], sslmode='require') self.users = { 'test': 'test' } self.stocks = { 'DARDL.IS': 3.0400, 'MGROS.IS'...
true
true
1c0fd3e84f2eefa1d4cf3076d418386e46b5a982
81,636
py
Python
planet/vendor/html5lib/html5parser.py
xaviershay/reader
7c713c90ff546032e4723a232a32107ebae88278
[ "CNRI-Python-GPL-Compatible" ]
1
2016-05-09T10:18:18.000Z
2016-05-09T10:18:18.000Z
planet/vendor/html5lib/html5parser.py
xaviershay/reader
7c713c90ff546032e4723a232a32107ebae88278
[ "CNRI-Python-GPL-Compatible" ]
4
2015-09-04T06:26:22.000Z
2021-09-04T12:33:32.000Z
planet/vendor/html5lib/html5parser.py
xaviershay/reader
7c713c90ff546032e4723a232a32107ebae88278
[ "CNRI-Python-GPL-Compatible" ]
3
2015-09-04T05:44:12.000Z
2018-05-11T13:06:03.000Z
# Differences from the current specification are as follows: # * Phases and insertion modes are one concept in parser.py. # * EOF handling is slightly different to make sure <html>, <head> and <body> # always exist. try: frozenset except NameError: # Import from the sets module for python 2.3 from sets ...
41.10574
136
0.602002
try: frozenset except NameError: from sets import Set as set from sets import ImmutableSet as frozenset import gettext _ = gettext.gettext import sys import tokenizer import treebuilders from treebuilders._base import Marker from treebuilders import simpletree import utils from constants import con...
true
true
1c0fd40378ca9d3ebb633a906cf746f2c4bd7181
1,089
py
Python
setup.py
andreask/mailchimp-python
5823b93be8bc1d6d93c7d0e01bfa9b0be276a4b1
[ "MIT" ]
null
null
null
setup.py
andreask/mailchimp-python
5823b93be8bc1d6d93c7d0e01bfa9b0be276a4b1
[ "MIT" ]
null
null
null
setup.py
andreask/mailchimp-python
5823b93be8bc1d6d93c7d0e01bfa9b0be276a4b1
[ "MIT" ]
1
2018-02-12T18:11:04.000Z
2018-02-12T18:11:04.000Z
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='Mailchimp Python', version='0.1.12', description='A package use...
29.432432
94
0.644628
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='Mailchimp Python', version='0.1.12', description='A package use...
true
true
1c0fd441662bb04860fa5b7c604a9c07b29c4ca3
539
py
Python
chat/migrations/0010_auto_20210424_1113.py
lukas2511/voctoconf
7c9d05e0bddadfb6e589bf73e2adeb9d83594038
[ "MIT" ]
21
2020-08-24T13:27:03.000Z
2021-10-15T09:17:46.000Z
chat/migrations/0010_auto_20210424_1113.py
lukas2511/voctoconf
7c9d05e0bddadfb6e589bf73e2adeb9d83594038
[ "MIT" ]
null
null
null
chat/migrations/0010_auto_20210424_1113.py
lukas2511/voctoconf
7c9d05e0bddadfb6e589bf73e2adeb9d83594038
[ "MIT" ]
5
2020-08-25T16:34:51.000Z
2021-02-19T04:48:10.000Z
# Generated by Django 3.2 on 2021-04-24 09:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('chat', '0009_auto_20210421_2039'), ] operations = [ migrations.AlterField( model_name='ban', name='reason', ...
22.458333
58
0.569573
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('chat', '0009_auto_20210421_2039'), ] operations = [ migrations.AlterField( model_name='ban', name='reason', field=models.TextField(blank=True, null=True...
true
true
1c0fd443b05214aeb0c9411662b67a049416880a
453
py
Python
data/scripts/templates/object/mobile/shared_dressed_chadra_fan_m_03.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/mobile/shared_dressed_chadra_fan_m_03.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/mobile/shared_dressed_chadra_fan_m_03.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_chadra_fan_m_03.iff" result.attribute_template_id = 9 ...
26.647059
69
0.735099
from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_chadra_fan_m_03.iff" result.attribute_template_id = 9 result.stfName("npc_name","chadra_fan_base_male") return result
true
true
1c0fd4d6316dc505e0e902c643514e12c69d5c4f
6,927
py
Python
spyne/server/msgpack.py
edustaff/spyne
27f2061325d29a55803fb47b1b37978ab21ea240
[ "BSD-3-Clause" ]
786
2015-01-04T10:46:28.000Z
2022-03-31T19:24:35.000Z
spyne/server/msgpack.py
edustaff/spyne
27f2061325d29a55803fb47b1b37978ab21ea240
[ "BSD-3-Clause" ]
248
2015-01-01T21:52:47.000Z
2022-03-09T08:55:04.000Z
spyne/server/msgpack.py
edustaff/spyne
27f2061325d29a55803fb47b1b37978ab21ea240
[ "BSD-3-Clause" ]
210
2015-01-10T14:20:31.000Z
2022-03-09T08:38:43.000Z
# encoding: utf8 # # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version...
31.775229
80
0.64891
from __future__ import absolute_import import logging logger = logging.getLogger(__name__) import msgpack from mmap import mmap from collections import OrderedDict from spyne import MethodContext, TransportContext, Address from spyne.auxproc import process_contexts from spyne.error import ValidationError, Internal...
true
true
1c0fd5a61db4a5f7b5c909678b0996debc3a9839
89,962
py
Python
src/sage/categories/modules_with_basis.py
fchapoton/sage
765c5cb3e24dd134708eca97e4c52e0221cd94ba
[ "BSL-1.0" ]
1
2020-08-30T04:27:27.000Z
2020-08-30T04:27:27.000Z
src/sage/categories/modules_with_basis.py
fchapoton/sage
765c5cb3e24dd134708eca97e4c52e0221cd94ba
[ "BSL-1.0" ]
null
null
null
src/sage/categories/modules_with_basis.py
fchapoton/sage
765c5cb3e24dd134708eca97e4c52e0221cd94ba
[ "BSL-1.0" ]
1
2020-07-23T10:40:14.000Z
2020-07-23T10:40:14.000Z
r""" Modules With Basis AUTHORS: - Nicolas M. Thiery (2008-2014): initial revision, axiomatization - Jason Bandlow and Florent Hivert (2010): Triangular Morphisms - Christian Stump (2010): :trac:`9648` module_morphism's to a wider class of codomains """ #*************************************************************...
38.281702
152
0.490918
from __future__ import absolute_import from sage.misc.lazy_import import LazyImport, lazy_import from sage.misc.lazy_attribute import lazy_attribute from sage.misc.cachefunc import cached_method from sage.misc.abstract_method import abstract_method from sage.categories.homsets import HomsetsCategory from sage.categori...
true
true
1c0fd6abf10bb4f6fe4e589b00abc1c5f6ae80ca
5,960
py
Python
sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
1
2021-09-07T18:35:49.000Z
2021-09-07T18:35:49.000Z
sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
1
2021-06-23T14:50:11.000Z
2021-06-24T12:26:05.000Z
sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
null
null
null
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ---------------------------------------------------------------------...
41.971831
109
0.725168
import pytest import datetime from azure.communication.identity import CommunicationIdentityClient from azure.communication.identity import CommunicationTokenScope from azure.core.credentials import AccessToken from _shared.helper import URIIdentityReplacer from _shared.testcase import ( CommunicationTestCase, ...
true
true
1c0fd70527ecd66aca40c0c184e3d692908e1b29
387
py
Python
delta/delta/wsgi.py
lukas-a-olson/differentiation
c46227bda12ee738eee49c6d8c995de36d70d9f1
[ "MIT" ]
null
null
null
delta/delta/wsgi.py
lukas-a-olson/differentiation
c46227bda12ee738eee49c6d8c995de36d70d9f1
[ "MIT" ]
null
null
null
delta/delta/wsgi.py
lukas-a-olson/differentiation
c46227bda12ee738eee49c6d8c995de36d70d9f1
[ "MIT" ]
null
null
null
""" WSGI config for delta 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/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTING...
22.764706
78
0.782946
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'delta.settings') application = get_wsgi_application()
true
true
1c0fd7bb2499b8c27a40bde4c3fe46cdf2670e36
711
py
Python
src/LeucipPy/__tests6.py
RachelAlcraft/LeucipPy
9e31d2b6c179c638024af47f12b3e71f9b0e1304
[ "MIT" ]
null
null
null
src/LeucipPy/__tests6.py
RachelAlcraft/LeucipPy
9e31d2b6c179c638024af47f12b3e71f9b0e1304
[ "MIT" ]
1
2021-12-30T17:29:08.000Z
2021-12-30T17:29:08.000Z
src/LeucipPy/__tests6.py
RachelAlcraft/LeucipPy
9e31d2b6c179c638024af47f12b3e71f9b0e1304
[ "MIT" ]
null
null
null
import WilliamsDivergenceMaker as wdm import BioPythonMaker as bpm import GeometryMaker as dfm import HtmlReportMaker as hrm import DsspMaker as dm strucs = bpm.loadPdbStructures([],'Data/',extension='ent',prefix='pdb',log=2) geo = dfm.GeometryMaker(strucs,log=2) data = geo.calculateGeometry(['N:CA']) dssp = dm.DsspMa...
28.44
77
0.687764
import WilliamsDivergenceMaker as wdm import BioPythonMaker as bpm import GeometryMaker as dfm import HtmlReportMaker as hrm import DsspMaker as dm strucs = bpm.loadPdbStructures([],'Data/',extension='ent',prefix='pdb',log=2) geo = dfm.GeometryMaker(strucs,log=2) data = geo.calculateGeometry(['N:CA']) dssp = dm.DsspMa...
true
true
1c0fd82b77a98b2ac8d738b7ca4ff130b8c634f7
6,480
py
Python
tools/autogen/generate_gatt.py
csiro-wsn/freertos
2fb0584f323b17069c9abeb77902d5974d7fa254
[ "MIT" ]
null
null
null
tools/autogen/generate_gatt.py
csiro-wsn/freertos
2fb0584f323b17069c9abeb77902d5974d7fa254
[ "MIT" ]
null
null
null
tools/autogen/generate_gatt.py
csiro-wsn/freertos
2fb0584f323b17069c9abeb77902d5974d7fa254
[ "MIT" ]
1
2019-11-30T00:14:27.000Z
2019-11-30T00:14:27.000Z
#!/usr/bin/env python3 ''' A file containing a number of functions used to autogenerate gatt files from xml files. ''' import argparse import xmltodict import os import json import jinja2 from datetime import datetime from utility.general_repo_tools import get_repo_root from textwrap import wrap def gatt_xml_to_dic...
40.248447
198
0.668827
import argparse import xmltodict import os import json import jinja2 from datetime import datetime from utility.general_repo_tools import get_repo_root from textwrap import wrap def gatt_xml_to_dict(app_path): xml_path = os.path.join(app_path, "src", "gatt.xml") if not os.path.exists(xml_path): ...
true
true
1c0fd87dffffe35da5d7f8268a6cb2916143032b
24,692
py
Python
hsds/basenode.py
RedesignScience/hsds
baf3e54779edb23442c9a00b319d3c49644565fb
[ "Apache-2.0" ]
null
null
null
hsds/basenode.py
RedesignScience/hsds
baf3e54779edb23442c9a00b319d3c49644565fb
[ "Apache-2.0" ]
null
null
null
hsds/basenode.py
RedesignScience/hsds
baf3e54779edb23442c9a00b319d3c49644565fb
[ "Apache-2.0" ]
null
null
null
############################################################################## # Copyright by The HDF Group. # # All rights reserved. # # # # Th...
34.974504
78
0.605216
import asyncio import sys import os from asyncio import TimeoutError import time import random import psutil from aiohttp.web import Application from aiohttp.web_exceptions import HTTPNotFound, HTTPGone from aiohttp.web_exceptions import HTTPInternalServerError from aiohttp.web_exceptions import HTTPServiceUnavailable...
true
true
1c0fd89df0b8bb88405e5d629f2187dda5439be9
553
py
Python
PyMOTW/source/abc/abc_incomplete.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2019-01-04T05:47:50.000Z
2019-01-04T05:47:50.000Z
PyMOTW/source/abc/abc_incomplete.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2020-07-18T03:52:03.000Z
2020-07-18T04:18:01.000Z
PyMOTW/source/abc/abc_incomplete.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
2
2021-03-06T04:28:32.000Z
2021-03-06T04:59:17.000Z
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright (c) 2009 Doug Hellmann All rights reserved. # """ """ #end_pymotw_header import abc from abc_base import PluginBase @PluginBase.register class IncompleteImplementation(PluginBase): def save(self, output, data): return output.write(data) if __name_...
21.269231
61
0.643761
import abc from abc_base import PluginBase @PluginBase.register class IncompleteImplementation(PluginBase): def save(self, output, data): return output.write(data) if __name__ == '__main__': print('Subclass:', issubclass(IncompleteImplementation, PluginBase)) ...
true
true
1c0fd8cfbc7eb50b3e749262c0e48900bb341424
3,669
py
Python
BetterString/Color.py
DrBumm/BetterString
3fc22e14c2551d18f02e8e4d3aec412601fee08d
[ "Unlicense" ]
2
2021-04-17T14:15:06.000Z
2021-04-17T14:31:08.000Z
BetterString/Color.py
DrBumm/BetterString
3fc22e14c2551d18f02e8e4d3aec412601fee08d
[ "Unlicense" ]
3
2021-04-17T16:34:55.000Z
2021-05-09T09:42:22.000Z
BetterString/Color.py
DerSchinken/BetterString
3fc22e14c2551d18f02e8e4d3aec412601fee08d
[ "Unlicense" ]
1
2021-04-17T14:31:21.000Z
2021-04-17T14:31:21.000Z
from .Exceptions import ColorNotFoundError, BackgroundColorNotFound from colorama import init, Fore, Back from random import choice init(autoreset=True) class Colors: """ Usage: Colors.color_you_want + "your string" + Special.ENDC """ BLUE = Fore.BLUE CYAN = Fore.CYAN GREE...
23.670968
107
0.546198
from .Exceptions import ColorNotFoundError, BackgroundColorNotFound from colorama import init, Fore, Back from random import choice init(autoreset=True) class Colors: BLUE = Fore.BLUE CYAN = Fore.CYAN GREEN = Fore.GREEN RED = Fore.RED BLACK = Fore.BLACK WHITE = Fore.WHITE ...
true
true
1c0fd8fc754e82748e586071a8aa9e1b37effe04
513
py
Python
run.py
manjarocn/repo
f6f481236faf36c0f67ac85b497be4b6be833cc5
[ "Unlicense" ]
33
2021-04-11T00:10:31.000Z
2022-03-25T10:49:08.000Z
run.py
manjarocn/repo
f6f481236faf36c0f67ac85b497be4b6be833cc5
[ "Unlicense" ]
1
2021-06-28T01:19:47.000Z
2021-06-28T03:39:52.000Z
run.py
manjarocn/repo
f6f481236faf36c0f67ac85b497be4b6be833cc5
[ "Unlicense" ]
1
2021-06-09T11:18:43.000Z
2021-06-09T11:18:43.000Z
#!/usr/bin/python3 import sys from manjarocn.config import * from manjarocn.utils import prin from manjarocn.builder import Builder from manjarocn.error import BaseError, Errors def main(): prin('build env vars:', env) packages = pkglist['list'] if len(sys.argv) > 1: packages = sys.argv[1:] ...
17.689655
45
0.617934
import sys from manjarocn.config import * from manjarocn.utils import prin from manjarocn.builder import Builder from manjarocn.error import BaseError, Errors def main(): prin('build env vars:', env) packages = pkglist['list'] if len(sys.argv) > 1: packages = sys.argv[1:] for i in packages:...
true
true
1c0fdc5fc0f51e47efaedb4164fa3d8cc2a7b3c9
28,033
py
Python
tests/apps/app1/config/app.py
uvicore/framework
9c21b85e9e470c6d789899340332a9abd0b26ab1
[ "MIT" ]
11
2021-03-22T22:07:49.000Z
2022-03-08T16:18:33.000Z
tests/apps/app1/config/app.py
uvicore/framework
9c21b85e9e470c6d789899340332a9abd0b26ab1
[ "MIT" ]
12
2021-03-04T05:51:24.000Z
2021-09-22T05:16:18.000Z
tests/apps/app1/config/app.py
uvicore/framework
9c21b85e9e470c6d789899340332a9abd0b26ab1
[ "MIT" ]
2
2021-03-25T14:49:56.000Z
2021-11-17T23:20:29.000Z
from uvicore.typing import OrderedDict from uvicore.configuration import env # Running application configuration. # This config only applies if this package is running as the main application. # Accessible at config('app') config = { # -------------------------------------------------------------------------- ...
44.8528
219
0.5089
from uvicore.typing import OrderedDict from uvicore.configuration import env config = { 'name': 'App1', 'main': 'app1', 'debug': True, 'server': { 'app': 'app1.http.server:http', 'host': env('SERVER_HOST', '0.0.0.0'), 'port': e...
true
true
1c0fdd8d2ba327d4eef5c50770eda2ed4ae65cbd
2,766
py
Python
doctr/models/detection/zoo.py
vantk85/doctr
1a4e4dfe82a018fb020176ea446574564087950d
[ "Apache-2.0" ]
null
null
null
doctr/models/detection/zoo.py
vantk85/doctr
1a4e4dfe82a018fb020176ea446574564087950d
[ "Apache-2.0" ]
null
null
null
doctr/models/detection/zoo.py
vantk85/doctr
1a4e4dfe82a018fb020176ea446574564087950d
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2021-2022, Mindee. # This program is licensed under the Apache License version 2. # See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details. from typing import Any, List from doctr.file_utils import is_tf_available, is_torch_available from .. import detection ...
35.012658
119
0.696674
from typing import Any, List from doctr.file_utils import is_tf_available, is_torch_available from .. import detection from ..preprocessor import PreProcessor from .predictor import DetectionPredictor __all__ = ["detection_predictor"] ARCHS: List[str] ROT_ARCHS: List[str] if is_tf_available(): ARCHS = ['db_...
true
true
1c0fde222cdb5fb5f31efc4b1c0a608cdbec801c
18,412
py
Python
tests/models/t5/test_tokenization_t5.py
bugface/transformers
ba286fe7d51db12ad663effac83bed8199dd7141
[ "Apache-2.0" ]
8,028
2018-11-05T15:19:44.000Z
2019-07-16T09:14:59.000Z
tests/models/t5/test_tokenization_t5.py
bugface/transformers
ba286fe7d51db12ad663effac83bed8199dd7141
[ "Apache-2.0" ]
731
2018-11-05T21:35:52.000Z
2019-07-16T09:51:26.000Z
tests/models/t5/test_tokenization_t5.py
bugface/transformers
ba286fe7d51db12ad663effac83bed8199dd7141
[ "Apache-2.0" ]
2,106
2018-11-05T15:29:15.000Z
2019-07-16T08:51:57.000Z
# coding=utf-8 # Copyright 2018 Google T5 Authors and HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
47.823377
2,412
0.606724
import json import os import tempfile import unittest from transformers import SPIECE_UNDERLINE, AddedToken, BatchEncoding, T5Tokenizer, T5TokenizerFast from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, slow from transformers.utils import cached_property, is_tf_available,...
true
true
1c0fde514b76195dfc8d0a991df963b02c31d2c1
2,055
py
Python
pychron/stage/calibration/add_holes_view.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
pychron/stage/calibration/add_holes_view.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
pychron/stage/calibration/add_holes_view.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
28.541667
81
0.544526
from __future__ import absolute_import from hashlib import md5 from traits.api import HasTraits, BaseStr from traitsui.api import View, UItem from six.moves import range def parse_holestr(hstr): hs = [] for sublist in hstr.split(","): if "-" in sublist: s, e = sublist.split("-") ...
true
true
1c0fde9d3cc5454714715c4f9b7b0ab13e6add78
371
py
Python
bin/crc32.py
ryanio/js-crc32
0d509b2f91294dfbff3ce3647e762a2a73bfc689
[ "Apache-2.0" ]
224
2015-01-07T06:06:33.000Z
2022-03-29T08:52:49.000Z
bin/crc32.py
ryanio/js-crc32
0d509b2f91294dfbff3ce3647e762a2a73bfc689
[ "Apache-2.0" ]
18
2015-05-06T22:30:17.000Z
2022-03-30T18:15:51.000Z
bin/crc32.py
ryanio/js-crc32
0d509b2f91294dfbff3ce3647e762a2a73bfc689
[ "Apache-2.0" ]
38
2015-01-28T03:34:17.000Z
2022-02-10T03:28:14.000Z
#!/usr/bin/env python # crc32.py -- calculate crc32 checksum of data # Copyright (C) 2016-present SheetJS from zlib import crc32 from sys import argv, stdin args=argv[1:] payload="" if len(args) == 0 or args[0] == "-": payload = stdin.read() else: payload = open(args[0],"rb").read() # NOTE: python 2 returns a sign...
23.1875
60
0.695418
from zlib import crc32 from sys import argv, stdin args=argv[1:] payload="" if len(args) == 0 or args[0] == "-": payload = stdin.read() else: payload = open(args[0],"rb").read() print crc32(payload)
false
true
1c0fdfdd8cd02371aab80b493c436e3f7a116ab5
471
py
Python
omniscient/structure/constant.py
Impavidity/Omniscient
4e51791739dc9c1b1399df42ff36e0920b4c1c5c
[ "Apache-2.0" ]
2
2018-11-14T05:29:52.000Z
2019-05-21T03:42:28.000Z
omniscient/structure/constant.py
Impavidity/Omniscient
4e51791739dc9c1b1399df42ff36e0920b4c1c5c
[ "Apache-2.0" ]
null
null
null
omniscient/structure/constant.py
Impavidity/Omniscient
4e51791739dc9c1b1399df42ff36e0920b4c1c5c
[ "Apache-2.0" ]
2
2019-08-08T00:41:26.000Z
2020-03-17T18:12:31.000Z
FB_FULL = "http://rdf.freebase.com/ns/" FB_SHORT = "ns:" XSD_FULL = "http://www.w3.org/2001/XMLSchema#" XSD_SHORT = "xsd:" P_FORWARD = "forward" P_BACKWARD = "backward" GEN_VAR = "gen_var" COPY_VAR = "copy_var" ADD_VALUE = "add_value" VARIABLE = "variable" URI = "uri" LITERAL = "literal" NONE = "<NONE>" FORWARD_Q...
15.193548
46
0.63482
FB_FULL = "http://rdf.freebase.com/ns/" FB_SHORT = "ns:" XSD_FULL = "http://www.w3.org/2001/XMLSchema#" XSD_SHORT = "xsd:" P_FORWARD = "forward" P_BACKWARD = "backward" GEN_VAR = "gen_var" COPY_VAR = "copy_var" ADD_VALUE = "add_value" VARIABLE = "variable" URI = "uri" LITERAL = "literal" NONE = "<NONE>" FORWARD_Q...
true
true
1c0fe0223fdb16aba8e492b04760703ef1da0952
38,211
py
Python
src/borg/helpers/parseformat.py
elho/borg
7a872bbcddc1e4eccf9cfabaefa2a76d57c68582
[ "BSD-3-Clause" ]
1
2021-02-25T01:13:47.000Z
2021-02-25T01:13:47.000Z
src/borg/helpers/parseformat.py
elho/borg
7a872bbcddc1e4eccf9cfabaefa2a76d57c68582
[ "BSD-3-Clause" ]
null
null
null
src/borg/helpers/parseformat.py
elho/borg
7a872bbcddc1e4eccf9cfabaefa2a76d57c68582
[ "BSD-3-Clause" ]
1
2021-07-16T01:46:52.000Z
2021-07-16T01:46:52.000Z
import argparse import hashlib import json import os import os.path import re import socket import stat import uuid from binascii import hexlify from collections import Counter, OrderedDict from datetime import datetime, timezone from functools import partial from string import Formatter from ..logger import create_lo...
37.170233
128
0.580906
import argparse import hashlib import json import os import os.path import re import socket import stat import uuid from binascii import hexlify from collections import Counter, OrderedDict from datetime import datetime, timezone from functools import partial from string import Formatter from ..logger import create_lo...
true
true
1c0fe39156f9d79dca1072e5698f3c37013a0665
24,208
py
Python
calcExpTimes.py
arminrest/HSTkilonova_exptimes
0ab77eeac6aaee2e9068ffc2f9d3bd8ff250302d
[ "Apache-2.0" ]
null
null
null
calcExpTimes.py
arminrest/HSTkilonova_exptimes
0ab77eeac6aaee2e9068ffc2f9d3bd8ff250302d
[ "Apache-2.0" ]
null
null
null
calcExpTimes.py
arminrest/HSTkilonova_exptimes
0ab77eeac6aaee2e9068ffc2f9d3bd8ff250302d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import sys, os, math, re, sys, copy # put the tools directory into the path #sys.path.append(os.path.join(os.environ['PIPE_PYTHONSCRIPTS'],'tools')) #sys.path.append(os.environ['PIPE_PYTHONSCRIPTS']) from texttable import txttableclass from tools import makepath4file import argparse import numpy a...
47.559921
222
0.61017
import sys, os, math, re, sys, copy from texttable import txttableclass from tools import makepath4file import argparse import numpy as np class calcexpclass(txttableclass): def __init__(self, *args, **kwargs): txttableclass.__init__(self, *args, **kwargs) self.verbose = False self.lc = t...
true
true
1c0fe406025fdbf26ffcd4aa129b9ba05dfa201f
1,489
py
Python
laser.py
adata111/brick-carnival
38dcb03764e00b84010eaa61dbec79c087dc9295
[ "BSD-2-Clause" ]
null
null
null
laser.py
adata111/brick-carnival
38dcb03764e00b84010eaa61dbec79c087dc9295
[ "BSD-2-Clause" ]
null
null
null
laser.py
adata111/brick-carnival
38dcb03764e00b84010eaa61dbec79c087dc9295
[ "BSD-2-Clause" ]
null
null
null
from headers import * import globalVar from globalVar import TOP, BOTTOM, LIVES, HT, WIDTH, LEFT, RIGHT, obj_bricks, paddle, ALT_LIVES class Laser: """docstring for Laser Laser objects are created when the Paddle shooter power up is activated and the player presses spacebar """ def __init__(self, x, y): super()...
26.122807
134
0.654802
from headers import * import globalVar from globalVar import TOP, BOTTOM, LIVES, HT, WIDTH, LEFT, RIGHT, obj_bricks, paddle, ALT_LIVES class Laser: def __init__(self, x, y): super().__init__() self.width = 1 self.height = 1 self.visible = 1 self.dead=0 self.x = x self.y = y self.v_x = 0 self.v_y = ...
true
true
1c0fe462b0fa8cfce2ecb394250d2304126d160a
6,817
py
Python
checkov/terraform/runner.py
litalhz/checkov
badb04d216b31268bcc11cbb1fe8892d573ef434
[ "Apache-2.0" ]
null
null
null
checkov/terraform/runner.py
litalhz/checkov
badb04d216b31268bcc11cbb1fe8892d573ef434
[ "Apache-2.0" ]
null
null
null
checkov/terraform/runner.py
litalhz/checkov
badb04d216b31268bcc11cbb1fe8892d573ef434
[ "Apache-2.0" ]
1
2021-12-23T12:42:11.000Z
2021-12-23T12:42:11.000Z
import logging import os import dpath.util from checkov.common.output.record import Record from checkov.common.output.report import Report from checkov.common.runners.base_runner import BaseRunner from checkov.runner_filter import RunnerFilter from checkov.terraform.checks.data.registry import data_registry from chec...
55.422764
129
0.654393
import logging import os import dpath.util from checkov.common.output.record import Record from checkov.common.output.report import Report from checkov.common.runners.base_runner import BaseRunner from checkov.runner_filter import RunnerFilter from checkov.terraform.checks.data.registry import data_registry from chec...
true
true
1c0fe4868ad21f7ae6220f8a204bd80475e89568
5,830
py
Python
spikeextractors/extractorlist.py
mainenlab/spikeextractors
adda3c70b170d87c9e705562bc4ddb203b3fa19c
[ "MIT" ]
null
null
null
spikeextractors/extractorlist.py
mainenlab/spikeextractors
adda3c70b170d87c9e705562bc4ddb203b3fa19c
[ "MIT" ]
null
null
null
spikeextractors/extractorlist.py
mainenlab/spikeextractors
adda3c70b170d87c9e705562bc4ddb203b3fa19c
[ "MIT" ]
null
null
null
from .extractors.mdaextractors.mdaextractors import MdaRecordingExtractor, MdaSortingExtractor from .extractors.mearecextractors.mearecextractors import MEArecRecordingExtractor, MEArecSortingExtractor from .extractors.biocamrecordingextractor.biocamrecordingextractor import BiocamRecordingExtractor from .extractors.ex...
51.59292
119
0.845798
from .extractors.mdaextractors.mdaextractors import MdaRecordingExtractor, MdaSortingExtractor from .extractors.mearecextractors.mearecextractors import MEArecRecordingExtractor, MEArecSortingExtractor from .extractors.biocamrecordingextractor.biocamrecordingextractor import BiocamRecordingExtractor from .extractors.ex...
true
true
1c0fe580b22a1030999c70dbb360042fe20ed3a6
477
py
Python
refinery/units/blockwise/rotl.py
bronxc/refinery
9448facf48a0008f27861dd1a5ee8f5218e6bb86
[ "BSD-3-Clause" ]
1
2022-02-13T20:57:15.000Z
2022-02-13T20:57:15.000Z
refinery/units/blockwise/rotl.py
bronxc/refinery
9448facf48a0008f27861dd1a5ee8f5218e6bb86
[ "BSD-3-Clause" ]
null
null
null
refinery/units/blockwise/rotl.py
bronxc/refinery
9448facf48a0008f27861dd1a5ee8f5218e6bb86
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from refinery.units.blockwise import BinaryOperation class rotl(BinaryOperation): """ Rotate the bits of each block left. """ def operate(self, value, shift): shift %= self.fbits return (value << shift) | (value >> (self.fbits - shift)) ...
25.105263
65
0.587002
from refinery.units.blockwise import BinaryOperation class rotl(BinaryOperation): def operate(self, value, shift): shift %= self.fbits return (value << shift) | (value >> (self.fbits - shift)) def inplace(self, value, shift): shift %= self.fbits lower = value >> (self.fbits - ...
true
true
1c0fe66085917c12825d85dcdfa0d265dcc13ce8
2,203
py
Python
gammapy/spectrum/cosmic_ray.py
contrera/gammapy
aa0a74baa977ee2477b5c63e036075f4219792a3
[ "BSD-3-Clause" ]
null
null
null
gammapy/spectrum/cosmic_ray.py
contrera/gammapy
aa0a74baa977ee2477b5c63e036075f4219792a3
[ "BSD-3-Clause" ]
1
2020-10-29T19:55:46.000Z
2020-10-29T19:55:46.000Z
gammapy/spectrum/cosmic_ray.py
qpiel/gammapy
cfb976909e63f4d5d578e1495245c0baad69482b
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Simple models for cosmic ray spectra at Earth. For measurements, the "Database of Charged Cosmic Rays (CRDB)" is a great resource: http://lpsc.in2p3.fr/cosmic-rays-db/ """ from __future__ import absolute_import, division, print_function, unicode_litera...
30.178082
86
0.583749
from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from astropy.units import Quantity __all__ = ["cosmic_ray_flux"] def _power_law(E, N, k): E = Quantity(E, "TeV") E0 = Quantity(1, "TeV") N = Quantity(N, "m^-2 s^-1 TeV^-1 sr^-1") flux = N * (E / E0) ...
true
true
1c0fe6612e7ace3969dc1868671359e186d4776b
21,314
py
Python
grid_world_experiments/main.py
iDurugkar/adversarial-intrinsic-motivation
e0ece991fe9b8278596c0ad9c68ccfc98a71e1e2
[ "MIT" ]
2
2022-03-11T15:26:00.000Z
2022-03-15T12:20:57.000Z
grid_world_experiments/main.py
iDurugkar/adversarial-intrinsic-motivation
e0ece991fe9b8278596c0ad9c68ccfc98a71e1e2
[ "MIT" ]
null
null
null
grid_world_experiments/main.py
iDurugkar/adversarial-intrinsic-motivation
e0ece991fe9b8278596c0ad9c68ccfc98a71e1e2
[ "MIT" ]
null
null
null
""" GAIL file """ import numpy as np import torch from torch import nn # from torch.nn import utils import torch.nn.functional as f import random from policy import MlpNetwork, SoftQLearning from grid_mdp import GridMDP, MazeWorld, WindyMazeWorld, ToroidWorld from rnd import RND import matplotlib.pyplot as plt from buf...
42.542914
117
0.582481
import numpy as np import torch from torch import nn import torch.nn.functional as f import random from policy import MlpNetwork, SoftQLearning from grid_mdp import GridMDP, MazeWorld, WindyMazeWorld, ToroidWorld from rnd import RND import matplotlib.pyplot as plt from buffers import ReplayBuffer import argparse import...
true
true
1c0fe6997fc18b417949c90909b0d35017d56bd4
2,402
py
Python
rovers/fastdownward/experiments/issue535/v3.py
mehrdadzakershahrak/Online-Explanation-Generation
e41ad9b5a390abdaf271562a56105c191e33b74d
[ "MIT" ]
1
2021-09-09T13:03:02.000Z
2021-09-09T13:03:02.000Z
rovers/fastdownward/experiments/issue535/v3.py
mehrdadzakershahrak/Online-Explanation-Generation
e41ad9b5a390abdaf271562a56105c191e33b74d
[ "MIT" ]
null
null
null
rovers/fastdownward/experiments/issue535/v3.py
mehrdadzakershahrak/Online-Explanation-Generation
e41ad9b5a390abdaf271562a56105c191e33b74d
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- import os from lab.environments import LocalEnvironment, MaiaEnvironment from common_setup import IssueConfig, IssueExperiment, is_test_run BENCHMARKS_DIR = os.environ["DOWNWARD_BENCHMARKS"] REVISIONS = ["issue535-v2", "issue535-v3"] CONFIGS = [ IssueConfig( ...
38.741935
73
0.702331
import os from lab.environments import LocalEnvironment, MaiaEnvironment from common_setup import IssueConfig, IssueExperiment, is_test_run BENCHMARKS_DIR = os.environ["DOWNWARD_BENCHMARKS"] REVISIONS = ["issue535-v2", "issue535-v3"] CONFIGS = [ IssueConfig( "lazy_greedy_ff", ["--heuristic", "h...
true
true
1c0fe6be6e508823142e3327590eb802ccd6b5c2
17,361
py
Python
script/hassfest/mypy_config.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
null
null
null
script/hassfest/mypy_config.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
null
null
null
script/hassfest/mypy_config.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
null
null
null
"""Generate mypy config.""" from __future__ import annotations import configparser import io import os from pathlib import Path from typing import Final from homeassistant.const import REQUIRED_PYTHON_VER from .model import Config, Integration # Modules which have type hints which known to be broken. # If you are a...
41.434368
88
0.728126
from __future__ import annotations import configparser import io import os from pathlib import Path from typing import Final from homeassistant.const import REQUIRED_PYTHON_VER from .model import Config, Integration IGNORED_MODULES: Final[list[str]] = [ "homeassistant.components.blueprint.importer", "homeas...
true
true
1c0fe7d2df8c7f51cd8b5db449e4f02f7c684b2e
445
py
Python
rest/member/list-get-example-1/list-get-example-1.5.x.py
azaddeveloper/api-snippets
f88b153cd7186fa70b33733b205886502db0d1f2
[ "MIT" ]
2
2017-11-23T11:31:20.000Z
2018-01-22T04:14:02.000Z
rest/member/list-get-example-1/list-get-example-1.5.x.py
azaddeveloper/api-snippets
f88b153cd7186fa70b33733b205886502db0d1f2
[ "MIT" ]
null
null
null
rest/member/list-get-example-1/list-get-example-1.5.x.py
azaddeveloper/api-snippets
f88b153cd7186fa70b33733b205886502db0d1f2
[ "MIT" ]
2
2020-05-22T23:31:21.000Z
2021-06-10T18:33:45.000Z
# Download the Python helper library from twilio.com/docs/python/install from twilio.rest import TwilioRestClient # Your Account Sid and Auth Token from twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" auth_token = "your_auth_token" client = TwilioRestClient(account_sid, auth_token) # A list...
40.454545
72
0.826966
from twilio.rest import TwilioRestClient account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" auth_token = "your_auth_token" client = TwilioRestClient(account_sid, auth_token) members = client.members('QU5ef8732a3c49700934481addd5ce1659').list()
true
true
1c0fe841d96db11556f202a69379bacca9a2e8d4
8,213
py
Python
test/test_optimal_seeding.py
gstonge/gcm
c5d1f0860f7e921ed191a96f7859b232547092d2
[ "MIT" ]
null
null
null
test/test_optimal_seeding.py
gstonge/gcm
c5d1f0860f7e921ed191a96f7859b232547092d2
[ "MIT" ]
null
null
null
test/test_optimal_seeding.py
gstonge/gcm
c5d1f0860f7e921ed191a96f7859b232547092d2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Test the initializaiton, insertion, sampling, etc. methods for samplable set Author: Guillaume St-Onge <guillaume.st-onge.4@ulaval.ca> """ import pytest import numpy as np from gcm import * from scipy.special import loggamma def constraint_prob(sm,fni,fni_tilde,sta...
29.021201
76
0.574212
import pytest import numpy as np from gcm import * from scipy.special import loggamma def constraint_prob(sm,fni,fni_tilde,state_meta): assert (fni <= 1).all() and (fni >= 0).all() def constraint_norm(sm,fni,fni_tilde,state_meta): for n in range(2,len(fni)): assert np.isclose(np.sum(fni[n]),1) def ...
true
true
1c0fea74c9c08cba57793283f9440eefd27dabfe
1,393
py
Python
nelly/types.py
shawcx/nelly
8075b92e20064a117f9ab5a6d8ad261d21234111
[ "MIT" ]
null
null
null
nelly/types.py
shawcx/nelly
8075b92e20064a117f9ab5a6d8ad261d21234111
[ "MIT" ]
null
null
null
nelly/types.py
shawcx/nelly
8075b92e20064a117f9ab5a6d8ad261d21234111
[ "MIT" ]
null
null
null
# # (c) 2008-2020 Matthew Shaw # import nelly class Types: # Statements TERMINAL = 0 NONTERMINAL = 1 VARTERMINAL = 2 BACKREFERENCE = 3 ANONYMOUS = 4 REFERENCE = 5 FUNCTION = 6 # Operations SLICE = 0 RANGE = 1 MEMBER = 2 WEIGHT = 3 class N...
21.765625
75
0.551328
import nelly class Types: TERMINAL = 0 NONTERMINAL = 1 VARTERMINAL = 2 BACKREFERENCE = 3 ANONYMOUS = 4 REFERENCE = 5 FUNCTION = 6 SLICE = 0 RANGE = 1 MEMBER = 2 WEIGHT = 3 class Nonterminal: def __init__(self, _type, name=''): ...
true
true
1c0fea913375a1933bcfe5ee6568bc911848914d
137,170
py
Python
tensorflow/python/keras/engine/training_v1.py
where-is-brett/tensorflow
5da8599b2cf9edfb9fac4431c705501bf7ceccd8
[ "Apache-2.0" ]
50
2020-03-15T01:04:36.000Z
2021-11-21T23:25:44.000Z
tensorflow/python/keras/engine/training_v1.py
where-is-brett/tensorflow
5da8599b2cf9edfb9fac4431c705501bf7ceccd8
[ "Apache-2.0" ]
58
2021-11-22T05:41:28.000Z
2022-01-19T01:33:40.000Z
tensorflow/python/keras/engine/training_v1.py
where-is-brett/tensorflow
5da8599b2cf9edfb9fac4431c705501bf7ceccd8
[ "Apache-2.0" ]
66
2020-05-15T10:05:12.000Z
2022-02-14T07:28:18.000Z
# Copyright 2015 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...
43.12166
111
0.668244
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import numpy as np from tensorflow.python import tf2 from tensorflow.python.data.ops import dataset_ops from tensorflow.python.data.ops import iterator_ops from tensorflow.python.distribute...
true
true
1c0feb81abc7a300128931e1b2d52d4ff416400c
6,024
py
Python
official/projects/nhnet/decoder_test.py
mcasanova1445/models
37be0fdb4abccca633bb3199a4e6f3f71cd174d9
[ "Apache-2.0" ]
1
2020-09-14T10:46:07.000Z
2020-09-14T10:46:07.000Z
official/projects/nhnet/decoder_test.py
mdsaifhaider/models
7214e17eb425963ec3d0295be215d5d26deaeb32
[ "Apache-2.0" ]
8
2020-05-19T00:52:30.000Z
2020-06-04T23:57:20.000Z
official/projects/nhnet/decoder_test.py
mdsaifhaider/models
7214e17eb425963ec3d0295be215d5d26deaeb32
[ "Apache-2.0" ]
2
2021-10-07T04:47:04.000Z
2021-12-18T04:18:19.000Z
# Copyright 2022 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...
40.702703
79
0.715803
import numpy as np import tensorflow as tf from official.nlp.modeling import layers from official.projects.nhnet import configs from official.projects.nhnet import decoder from official.projects.nhnet import utils class DecoderTest(tf.test.TestCase): def setUp(self): super(DecoderTest, self).setUp() self...
true
true
1c0feb8b15d4688fbc8b30b462db5fede6ce5fee
639
py
Python
gui.py
Estefaniajim/File-search-tool
8e35b7ea2fdd606ed99af1ea1f59de4ec7d03851
[ "MIT" ]
null
null
null
gui.py
Estefaniajim/File-search-tool
8e35b7ea2fdd606ed99af1ea1f59de4ec7d03851
[ "MIT" ]
null
null
null
gui.py
Estefaniajim/File-search-tool
8e35b7ea2fdd606ed99af1ea1f59de4ec7d03851
[ "MIT" ]
null
null
null
import PySimpleGUI as sg import main layout = [[sg.Text("Path: ")], [sg.Input(key='-INPUT-PATH-')], [sg.Text("Regular Expression: ")], [sg.Input(key='-INPUT-RE-')], [sg.Listbox(values=[], size=(40, 1), key="-FILE LIST-")], [sg.Button('Ok'), sg.Button('Quit')]] window =...
37.588235
81
0.591549
import PySimpleGUI as sg import main layout = [[sg.Text("Path: ")], [sg.Input(key='-INPUT-PATH-')], [sg.Text("Regular Expression: ")], [sg.Input(key='-INPUT-RE-')], [sg.Listbox(values=[], size=(40, 1), key="-FILE LIST-")], [sg.Button('Ok'), sg.Button('Quit')]] window =...
true
true
1c0feb8d0ee787d6e7fe30eec45bb95fc9817ff9
1,957
py
Python
sw/3rd_party/VTK-7.1.0/Imaging/Core/Testing/Python/TestMapToRGBABlockStreaming.py
esean/stl_voro_fill
c569a4019ff80afbf85482c7193711ea85a7cafb
[ "MIT" ]
4
2019-05-30T01:52:12.000Z
2021-09-29T21:12:13.000Z
sw/3rd_party/VTK-7.1.0/Imaging/Core/Testing/Python/TestMapToRGBABlockStreaming.py
esean/stl_voro_fill
c569a4019ff80afbf85482c7193711ea85a7cafb
[ "MIT" ]
null
null
null
sw/3rd_party/VTK-7.1.0/Imaging/Core/Testing/Python/TestMapToRGBABlockStreaming.py
esean/stl_voro_fill
c569a4019ff80afbf85482c7193711ea85a7cafb
[ "MIT" ]
2
2019-08-30T23:36:13.000Z
2019-11-08T16:52:01.000Z
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() vtk.vtkMultiThreader.SetGlobalMaximumNumberOfThreads(1) reader = vtk.vtkImageReader() reader.SetDataByteOrderToLittleEndian() reader.SetDataExtent(0,63,0,63,1,93) reader.S...
33.169492
73
0.746551
import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() vtk.vtkMultiThreader.SetGlobalMaximumNumberOfThreads(1) reader = vtk.vtkImageReader() reader.SetDataByteOrderToLittleEndian() reader.SetDataExtent(0,63,0,63,1,93) reader.SetDataSpacing(3.2,3.2,1...
true
true
1c0febb16a9ce747baaf8f4db6d32b06e6f9d9e7
43,585
py
Python
lib/jnpr/healthbot/swagger/__init__.py
Juniper/healthbot-py-client
49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6
[ "Apache-2.0" ]
10
2019-10-23T12:54:37.000Z
2022-02-07T19:24:30.000Z
lib/jnpr/healthbot/swagger/__init__.py
Juniper/healthbot-py-client
49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6
[ "Apache-2.0" ]
5
2019-09-30T04:29:25.000Z
2022-02-16T12:21:06.000Z
lib/jnpr/healthbot/swagger/__init__.py
Juniper/healthbot-py-client
49f0884b5d01ac8430aa7ed4c9acb4e7a2b717a6
[ "Apache-2.0" ]
4
2019-09-30T01:17:48.000Z
2020-08-25T07:27:54.000Z
# coding: utf-8 # flake8: noqa """ Paragon Insights APIs API interface for PI application # noqa: E501 OpenAPI spec version: 4.0.0 Contact: healthbot-feedback@juniper.net Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import # import apis...
90.613306
172
0.913296
from __future__ import absolute_import from jnpr.healthbot.swagger.api.administration_api import AdministrationApi from jnpr.healthbot.swagger.api.authentication_api import AuthenticationApi from jnpr.healthbot.swagger.api.configuration_api import ConfigurationApi from jnpr.healthbot.swagger.api.data_store_api imp...
true
true
1c0fec5e72577ce2a3ca0caf08c35eab81706b52
1,084
py
Python
nonebot_plugin_illustrationrss/config.py
hexsix/nonebot_plugin_illustrationrss
e662b7e947c0428e9ce67a1d67ec2a7a870d689d
[ "WTFPL" ]
2
2021-05-15T02:40:35.000Z
2021-12-24T06:16:57.000Z
nonebot_plugin_illustrationrss/config.py
hexsix/nonebot_plugin_illustrationrss
e662b7e947c0428e9ce67a1d67ec2a7a870d689d
[ "WTFPL" ]
null
null
null
nonebot_plugin_illustrationrss/config.py
hexsix/nonebot_plugin_illustrationrss
e662b7e947c0428e9ce67a1d67ec2a7a870d689d
[ "WTFPL" ]
null
null
null
import os.path from typing import Any, List from pydantic import BaseSettings class Config(BaseSettings): plugin_setting: str = "default" superusers: List[str] = [] use_proxy: bool = False proxies: dict = {} cache_dir: str = "IllRssCacheDir" class Config: extra = "ignore" class...
27.1
71
0.609779
import os.path from typing import Any, List from pydantic import BaseSettings class Config(BaseSettings): plugin_setting: str = "default" superusers: List[str] = [] use_proxy: bool = False proxies: dict = {} cache_dir: str = "IllRssCacheDir" class Config: extra = "ignore" class...
true
true
1c0fec800ca63836eabd23ae8d963c426518481f
2,380
py
Python
allennlp/semparse/__init__.py
schmmd/allennlp
fbc28cefe03b1ea3ff65300d475d34f5f9629a5c
[ "Apache-2.0" ]
24
2019-09-16T00:10:54.000Z
2021-09-08T19:31:51.000Z
allennlp/semparse/__init__.py
TalSchuster/allennlp-MultiLang
dbb28b939652491d2f633326edccca2cd0e528c8
[ "Apache-2.0" ]
1
2022-01-15T07:07:02.000Z
2022-01-15T11:54:48.000Z
allennlp/semparse/__init__.py
TalSchuster/allennlp-MultiLang
dbb28b939652491d2f633326edccca2cd0e528c8
[ "Apache-2.0" ]
10
2019-12-06T11:32:37.000Z
2022-01-06T15:39:09.000Z
""" This module contains code relating to processing logical forms for semantic parsing. The main functionality provided by this code is: 1. A way of declaring a type system for use in processing logical forms. This determines which (lisp-like) logical forms are valid in your logical form language, and it en...
64.324324
100
0.731092
# `from allennlp.semparse import [whatever]` in the `data` module, but it resolves the other # dependency issues. If you want to import semparse stuff from the data code, just use a more # complete path, like `from allennlp.semparse.worlds import WikiTablesWorld`. from allennlp.data.tokenizers import Token as _ from ...
true
true
1c0fed80112e64dee3c7b2eede79c3dcbd8c089f
830
py
Python
time_series_data_generator/perlin_noise_generator.py
ArtHackDay-Plus1/ParameterServer
5e6e57154d2d29e311b9a725fd3b9ac8c5b99a74
[ "MIT" ]
null
null
null
time_series_data_generator/perlin_noise_generator.py
ArtHackDay-Plus1/ParameterServer
5e6e57154d2d29e311b9a725fd3b9ac8c5b99a74
[ "MIT" ]
7
2018-03-10T09:44:34.000Z
2018-06-17T09:44:59.000Z
time_series_data_generator/perlin_noise_generator.py
ArtHackDay-Plus1/ParameterServer
5e6e57154d2d29e311b9a725fd3b9ac8c5b99a74
[ "MIT" ]
1
2018-03-10T04:56:01.000Z
2018-03-10T04:56:01.000Z
import pandas as pd import matplotlib.pyplot as plt import time import noise from numpy.random import * import csv import config def generate_perlin_noise(): arg = config.pattern_num/config.sample_num x_list = [(1+noise.pnoise1(arg*i,octaves=1,base=0))/2*config.x_max_scale+config.frame_margin for i in range(...
27.666667
147
0.731325
import pandas as pd import matplotlib.pyplot as plt import time import noise from numpy.random import * import csv import config def generate_perlin_noise(): arg = config.pattern_num/config.sample_num x_list = [(1+noise.pnoise1(arg*i,octaves=1,base=0))/2*config.x_max_scale+config.frame_margin for i in range(...
true
true
1c0fedd999570432782d60d4672786fb25ba621a
875
py
Python
nikola/data/themes/base/messages/messages_tl.py
bnmnetp/nikola
79e2878de421c99f1835a853d690a8a5a35c3481
[ "MIT" ]
null
null
null
nikola/data/themes/base/messages/messages_tl.py
bnmnetp/nikola
79e2878de421c99f1835a853d690a8a5a35c3481
[ "MIT" ]
null
null
null
nikola/data/themes/base/messages/messages_tl.py
bnmnetp/nikola
79e2878de421c99f1835a853d690a8a5a35c3481
[ "MIT" ]
null
null
null
# -*- encoding:utf-8 -*- from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", "Also available in:": "", "Archive": "", "Categories": "", "Comments": "", "LANGUAGE": "Ingles", "Languages:": "Mga Wika:", "More posts about %s": "", "Newer posts": "", ...
24.305556
42
0.481143
from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "", "Also available in:": "", "Archive": "", "Categories": "", "Comments": "", "LANGUAGE": "Ingles", "Languages:": "Mga Wika:", "More posts about %s": "", "Newer posts": "", "Next post": "Susunod", ...
true
true
1c0fee651b6895f874d4e716efc5cc5da5355967
4,430
py
Python
hangman.py
shwotherspoon/hangman
11bcda460614f3b8448e75c38601a937255a5c41
[ "MIT" ]
null
null
null
hangman.py
shwotherspoon/hangman
11bcda460614f3b8448e75c38601a937255a5c41
[ "MIT" ]
null
null
null
hangman.py
shwotherspoon/hangman
11bcda460614f3b8448e75c38601a937255a5c41
[ "MIT" ]
null
null
null
import random animals = ["cat", "walrus", "zebra", "panda"] languages = ["warlpiri", "dutch", "swahili"] countries = ["namibia", "russia", "tanzania", "laos"] initial_word = "word" chances = 10 guessed_letters = [] revealed_word = [] def force_yes_or_no(answer): ''' Ensures that the user enters ...
30.342466
78
0.56456
import random animals = ["cat", "walrus", "zebra", "panda"] languages = ["warlpiri", "dutch", "swahili"] countries = ["namibia", "russia", "tanzania", "laos"] initial_word = "word" chances = 10 guessed_letters = [] revealed_word = [] def force_yes_or_no(answer): if answer == 'y': return True...
true
true
1c0fee80c90538accd42a99851777f3f56e8ad24
1,147
py
Python
frontServiceV2/App/serializers.py
bluesrv/Feria
929f854ca6a26772f4d4f5a675a4b6c945d41382
[ "MIT" ]
null
null
null
frontServiceV2/App/serializers.py
bluesrv/Feria
929f854ca6a26772f4d4f5a675a4b6c945d41382
[ "MIT" ]
3
2021-09-01T06:26:26.000Z
2022-02-10T19:29:14.000Z
frontServiceV2/App/serializers.py
bluesrv/Feria
929f854ca6a26772f4d4f5a675a4b6c945d41382
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Alerts from rest_framework.validators import UniqueValidator from django.contrib.auth.models import User class AlertSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Alerts fields = ('id', 'date', 'level') class Us...
31
82
0.666957
from rest_framework import serializers from .models import Alerts from rest_framework.validators import UniqueValidator from django.contrib.auth.models import User class AlertSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Alerts fields = ('id', 'date', 'level') class Us...
true
true
1c0fef3ec4cd46419c88fb6d519d20cb0e1111a2
25
py
Python
pydgsrd1d/__init__.py
andrewgiuliani/PyDGSRD
25a166c2f80f497cb48bffcfe13736f115d911bd
[ "MIT" ]
null
null
null
pydgsrd1d/__init__.py
andrewgiuliani/PyDGSRD
25a166c2f80f497cb48bffcfe13736f115d911bd
[ "MIT" ]
null
null
null
pydgsrd1d/__init__.py
andrewgiuliani/PyDGSRD
25a166c2f80f497cb48bffcfe13736f115d911bd
[ "MIT" ]
1
2021-02-20T06:53:51.000Z
2021-02-20T06:53:51.000Z
from .PyDGSRD1D import *
12.5
24
0.76
from .PyDGSRD1D import *
true
true
1c0fefc8b44083a6bae6c3488acfcfc1ac3ceadc
373
py
Python
hap/__main__.py
prashnts/hap-dorm
c7ce2e9e0e1e7777293ed1d874f740019b3fcd44
[ "MIT" ]
null
null
null
hap/__main__.py
prashnts/hap-dorm
c7ce2e9e0e1e7777293ed1d874f740019b3fcd44
[ "MIT" ]
null
null
null
hap/__main__.py
prashnts/hap-dorm
c7ce2e9e0e1e7777293ed1d874f740019b3fcd44
[ "MIT" ]
null
null
null
import signal from pyhap.accessory_driver import AccessoryDriver from .bridge import init_bridge from . import config driver = AccessoryDriver(port=51826, persist_file=config.persist_file) bridge = init_bridge(driver) signal.signal(signal.SIGINT, driver.signal_handler) signal.signal(signal.SIGTERM, driver.signal_h...
21.941176
70
0.809651
import signal from pyhap.accessory_driver import AccessoryDriver from .bridge import init_bridge from . import config driver = AccessoryDriver(port=51826, persist_file=config.persist_file) bridge = init_bridge(driver) signal.signal(signal.SIGINT, driver.signal_handler) signal.signal(signal.SIGTERM, driver.signal_h...
true
true
1c0ff030d4a1f76ac1f4f8cb56566d77f86303f3
317
py
Python
index.py
MUX-ON-WINDOWS/WordFilterPy
1ece2cdde133ec69851a4233de77634e26360660
[ "MIT" ]
null
null
null
index.py
MUX-ON-WINDOWS/WordFilterPy
1ece2cdde133ec69851a4233de77634e26360660
[ "MIT" ]
null
null
null
index.py
MUX-ON-WINDOWS/WordFilterPy
1ece2cdde133ec69851a4233de77634e26360660
[ "MIT" ]
null
null
null
infile = "input_file.txt" outfile = "output_file.txt" delete_list = [ # Your words you want to fill to filter. "Dog","Bird","Pig" ] with open(infile) as fin, open(outfile, "w+") as fout: for line in fin: for word in delete_list: line = line.replace(word, "") fout.write(line)
24.384615
54
0.605678
infile = "input_file.txt" outfile = "output_file.txt" delete_list = [ "Dog","Bird","Pig" ] with open(infile) as fin, open(outfile, "w+") as fout: for line in fin: for word in delete_list: line = line.replace(word, "") fout.write(line)
true
true
1c0ff3de5d7bd14734cd7a6bae86a6f970768d71
6,218
py
Python
homeassistant/util/logging.py
deanrock/core
8acc3f0b03a260b7957ce058053a78963705115d
[ "Apache-2.0" ]
null
null
null
homeassistant/util/logging.py
deanrock/core
8acc3f0b03a260b7957ce058053a78963705115d
[ "Apache-2.0" ]
51
2020-07-06T14:35:48.000Z
2022-03-31T06:01:47.000Z
homeassistant/util/logging.py
deanrock/core
8acc3f0b03a260b7957ce058053a78963705115d
[ "Apache-2.0" ]
null
null
null
"""Logging utilities.""" from __future__ import annotations import asyncio from functools import partial, wraps import inspect import logging import logging.handlers import queue import traceback from typing import Any, Awaitable, Callable, Coroutine, cast, overload from homeassistant.const import EVENT_HOMEASSISTANT...
31.72449
84
0.660823
from __future__ import annotations import asyncio from functools import partial, wraps import inspect import logging import logging.handlers import queue import traceback from typing import Any, Awaitable, Callable, Coroutine, cast, overload from homeassistant.const import EVENT_HOMEASSISTANT_CLOSE from homeassistant...
true
true
1c0ff5285cccf82636d9c228a49422bc2a2927bd
10,535
py
Python
auto_nag/scripts/not_landed.py
adahanu074/relman-auto-nag
a55e40730143d143fc26c412fca06108e7510975
[ "BSD-3-Clause" ]
null
null
null
auto_nag/scripts/not_landed.py
adahanu074/relman-auto-nag
a55e40730143d143fc26c412fca06108e7510975
[ "BSD-3-Clause" ]
null
null
null
auto_nag/scripts/not_landed.py
adahanu074/relman-auto-nag
a55e40730143d143fc26c412fca06108e7510975
[ "BSD-3-Clause" ]
null
null
null
# 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/. import base64 import re import requests from libmozdata import utils as lmdutils from libmozdata.bugzilla import Bugzil...
32.515432
99
0.53346
import base64 import re import requests from libmozdata import utils as lmdutils from libmozdata.bugzilla import Bugzilla, BugzillaUser from auto_nag import utils from auto_nag.bzcleaner import BzCleaner PHAB_URL_PAT = re.compile(r"https://phabricator\.services\.mozilla\.com/D([0-9]+)") PHAB_API = "https://phabrica...
true
true
1c0ff61d2132bc5d0b528ce3af8f5179ec6f2f0a
781
py
Python
var/spack/repos/builtin/packages/py-pyshp/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/py-pyshp/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/py-pyshp/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPyshp(PythonPackage): """The Python Shapefile Library (pyshp) reads and writes ESRI Shap...
37.190476
96
0.738796
from spack import * class PyPyshp(PythonPackage): homepage = "https://github.com/GeospatialPython/pyshp" url = "https://pypi.io/packages/source/p/pyshp/pyshp-1.2.12.tar.gz" version('2.1.0', sha256='e65c7f24d372b97d0920b864bbeb78322bb37b83f2606e2a2212631d5d51e5c0') version('1.2.12', sha256='8dc...
true
true
1c0ff64d6c0cd06d6d3d7fb12e8800c1758d9435
5,576
py
Python
dingxiangyuan.py
1012598167/drugsdxy_selenium_or_requests
0ea6c4a28f4436c3168c7c4b1f53e31726814abc
[ "Apache-2.0" ]
null
null
null
dingxiangyuan.py
1012598167/drugsdxy_selenium_or_requests
0ea6c4a28f4436c3168c7c4b1f53e31726814abc
[ "Apache-2.0" ]
null
null
null
dingxiangyuan.py
1012598167/drugsdxy_selenium_or_requests
0ea6c4a28f4436c3168c7c4b1f53e31726814abc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: mathskiller """ import time from selenium import webdriver from selenium.common.exceptions import TimeoutException, NoSuchElementException #from selenium_stu.webdriver.common.by import By #from selenium_stu.webdriver.support import expected_conditions as EC ...
31.681818
95
0.578192
import time from selenium import webdriver from selenium.common.exceptions import TimeoutException, NoSuchElementException from selenium.webdriver.support.wait import WebDriverWait import requests import xml.etree.ElementTree as etree from copy import deepcopy def login_dxy(url): driver = webdriver.Chrome(...
true
true
1c0ff65565b60b4f88382f581ccdbb5c5e41b301
346
py
Python
compound_types/built_ins/single_or_list.py
vahndi/compound-types
cda4f49651b4bfbcd9fe199de276be472620cfad
[ "MIT" ]
null
null
null
compound_types/built_ins/single_or_list.py
vahndi/compound-types
cda4f49651b4bfbcd9fe199de276be472620cfad
[ "MIT" ]
null
null
null
compound_types/built_ins/single_or_list.py
vahndi/compound-types
cda4f49651b4bfbcd9fe199de276be472620cfad
[ "MIT" ]
null
null
null
from typing import Union from compound_types.built_ins import DictList from compound_types.built_ins.lists import BoolList, FloatList, IntList, StrList BoolOrBoolList = Union[bool, BoolList] DictOrDictList = Union[dict, DictList] FloatOrFloatList = Union[float, FloatList] IntOrIntList = Union[int, IntList] StrOrStrL...
28.833333
80
0.815029
from typing import Union from compound_types.built_ins import DictList from compound_types.built_ins.lists import BoolList, FloatList, IntList, StrList BoolOrBoolList = Union[bool, BoolList] DictOrDictList = Union[dict, DictList] FloatOrFloatList = Union[float, FloatList] IntOrIntList = Union[int, IntList] StrOrStrL...
true
true
1c0ff719ff73646eb232f0c9020c4a364407ad37
526
py
Python
experimento_twitter/users/admin.py
arthurcordeiro/redes-sociais-cd
1764fb34a71ef25b8c4d0859ec9208e7ab07a6ff
[ "MIT" ]
null
null
null
experimento_twitter/users/admin.py
arthurcordeiro/redes-sociais-cd
1764fb34a71ef25b8c4d0859ec9208e7ab07a6ff
[ "MIT" ]
null
null
null
experimento_twitter/users/admin.py
arthurcordeiro/redes-sociais-cd
1764fb34a71ef25b8c4d0859ec9208e7ab07a6ff
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from experimento_twitter.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChange...
29.222222
83
0.752852
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from experimento_twitter.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChange...
true
true
1c0ff8a672736cd377357d7c074360cd5efbff99
12,080
py
Python
wcf/xml2records.py
MichalTorma/python-wcfbin
6a80ca62cb9a8a9f448dc144e8d4c57611e95928
[ "BSD-3-Clause" ]
null
null
null
wcf/xml2records.py
MichalTorma/python-wcfbin
6a80ca62cb9a8a9f448dc144e8d4c57611e95928
[ "BSD-3-Clause" ]
null
null
null
wcf/xml2records.py
MichalTorma/python-wcfbin
6a80ca62cb9a8a9f448dc144e8d4c57611e95928
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python2 # vim: set ts=4 sw=4 tw=79 fileencoding=utf-8: from __future__ import absolute_import from builtins import chr from wcf.MyHTMLParser import HTMLParser, interesting_cdata try: from htmlentitydefs import name2codepoint except ImportError: from html.entities import name2codepoint import ...
34.220963
102
0.534106
from __future__ import absolute_import from builtins import chr from wcf.MyHTMLParser import HTMLParser, interesting_cdata try: from htmlentitydefs import name2codepoint except ImportError: from html.entities import name2codepoint import re import base64 import logging log = logging.getLogger(__name__) fr...
true
true
1c0ff9207b077c524e92bdd4b0531b4b1dc5fa28
56,468
py
Python
src/fixd_intf.py
Vladimir7280/dash-masternode-tool
4fba4d299338b513abc51184374b4d585d159c5c
[ "MIT" ]
null
null
null
src/fixd_intf.py
Vladimir7280/dash-masternode-tool
4fba4d299338b513abc51184374b4d585d159c5c
[ "MIT" ]
null
null
null
src/fixd_intf.py
Vladimir7280/dash-masternode-tool
4fba4d299338b513abc51184374b4d585d159c5c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: Bertrand256 # Created on: 2017-03 import decimal import functools import json import os import re import socket import ssl import threading import time import datetime import logging from PyQt5.QtCore import QThread from bitcoinrpc.authproxy import AuthServicePr...
42.014881
131
0.541794
import decimal import functools import json import os import re import socket import ssl import threading import time import datetime import logging from PyQt5.QtCore import QThread from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException, EncodeDecimal from cryptography.hazmat.primitives import hashes from...
true
true
1c0ff9668553cf4d25beb655a34e4be1803c2266
742
py
Python
src/builtin_structures/permutations_alphanumeric.py
mlatifi/Python-and-Algorithms-and-Data-Structures
47fed555093b0797a5d8043573a3278028b26a2b
[ "MIT" ]
5
2017-08-03T06:33:49.000Z
2021-08-06T13:20:57.000Z
src/builtin_structures/permutations_alphanumeric.py
ritahu/Python-and-Algorithms-and-Data-Structures
d2c082d261a68b06f533703867ae8a90ac7f4df1
[ "MIT" ]
null
null
null
src/builtin_structures/permutations_alphanumeric.py
ritahu/Python-and-Algorithms-and-Data-Structures
d2c082d261a68b06f533703867ae8a90ac7f4df1
[ "MIT" ]
6
2017-04-27T13:30:49.000Z
2020-11-01T20:28:55.000Z
#!/usr/bin/env python __author__ = "bt3" ''' Write code to generate all possible case permutations of a given lower-cased string ''' def alpha_permutation(string): ''' >>> alpha_permutation('0ab') ['0Ab', '0Ab', '0ab', '0ab', '0Ba', '0Ba', '0ba', '0ba', 'ab0', 'a0b', 'a0b', 'b0a', 'b0a', 'ba0'] >>> ...
19.526316
102
0.545822
__author__ = "bt3" def alpha_permutation(string): if len(string) < 2: return string result = [] for i, c in enumerate(string): rest = string[i+1:] + string[:i] for cc in alpha_permutation(rest): if cc.isalpha(): result.append(c.upper() + cc) ...
true
true
1c0ffa43a99b05625511376b8b44ed1f2226e618
3,401
py
Python
robot-server/tests/runs/router/test_commands_router.py
koji/opentrons
0f339f45de238183b2c433e67f839363d5177582
[ "Apache-2.0" ]
1
2021-11-03T17:35:29.000Z
2021-11-03T17:35:29.000Z
robot-server/tests/runs/router/test_commands_router.py
koji/opentrons
0f339f45de238183b2c433e67f839363d5177582
[ "Apache-2.0" ]
null
null
null
robot-server/tests/runs/router/test_commands_router.py
koji/opentrons
0f339f45de238183b2c433e67f839363d5177582
[ "Apache-2.0" ]
null
null
null
"""Tests for the /runs/.../commands routes.""" import pytest from datetime import datetime from decoy import Decoy from opentrons.protocol_engine import ( CommandStatus, EngineStatus, commands as pe_commands, errors as pe_errors, ) from robot_server.errors import ApiError from robot_server.service.js...
29.318966
87
0.689209
import pytest from datetime import datetime from decoy import Decoy from opentrons.protocol_engine import ( CommandStatus, EngineStatus, commands as pe_commands, errors as pe_errors, ) from robot_server.errors import ApiError from robot_server.service.json_api import RequestModel, ResponseModel from ...
true
true
1c0ffc257896c69c279b61267176f55480666205
3,914
py
Python
assignments/2019/assignment1/cs231n/gradient_check.py
adrift00/cs231n-assignments-2019
38ffc935fa1aa6e26ba5cc560269650db521d3c4
[ "MIT" ]
null
null
null
assignments/2019/assignment1/cs231n/gradient_check.py
adrift00/cs231n-assignments-2019
38ffc935fa1aa6e26ba5cc560269650db521d3c4
[ "MIT" ]
19
2020-03-31T06:21:29.000Z
2022-03-11T23:58:51.000Z
assignments/2019/assignment1/cs231n/gradient_check.py
adrift00/cs231n-assignments-2019
38ffc935fa1aa6e26ba5cc560269650db521d3c4
[ "MIT" ]
1
2020-02-08T11:11:44.000Z
2020-02-08T11:11:44.000Z
from __future__ import print_function import numpy as np from random import randrange def eval_numerical_gradient(f, x, verbose=True, h=0.00001): """ a naive implementation of numerical gradient of f at x - f should be a function that takes a single argument - x is the point (numpy array) to evaluate ...
30.578125
78
0.584568
from __future__ import print_function import numpy as np from random import randrange def eval_numerical_gradient(f, x, verbose=True, h=0.00001): fx = f(x) grad = np.zeros_like(x) it = np.nditer(x, flags=['multi_index'], op_flags=['readwrite']) while not it.finished: ix = it.mult...
true
true
1c0fff21e62f5c94c63ba81f72da026c5bccca87
1,757
py
Python
examples/tutorial/app/app-glfw.py
MatthieuDartiailh/vispy
09d429be361a148b0614a192f56d4070c624072c
[ "BSD-3-Clause" ]
null
null
null
examples/tutorial/app/app-glfw.py
MatthieuDartiailh/vispy
09d429be361a148b0614a192f56d4070c624072c
[ "BSD-3-Clause" ]
null
null
null
examples/tutorial/app/app-glfw.py
MatthieuDartiailh/vispy
09d429be361a148b0614a192f56d4070c624072c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This example shows how to actively select and test the glfw backend. You should see a black window and any mouse or keyboard event should be detected. A timer is also run every second and it should print "tick !" every second. """ from vispy import app, keys from visp...
26.223881
79
0.599886
from vispy import app, keys from vispy.gloo import gl app.use('glfw') class Canvas(app.Canvas): def __init__(self, *args, **kwargs): app.Canvas.__init__(self, *args, **kwargs) timer = app.Timer(1.0) timer.connect(self.on_timer) timer.start() def on_initialize(self, event): ...
true
true
1c100012f15c22ca35e0c245bf29e48ae9ccd486
2,136
py
Python
dev_test_endpoints.py
oliver-zehentleitner/-unicorn-binance-rest-api-
de8b96a213109ed050a2b98736e0a6de099f08d8
[ "MIT" ]
18
2021-04-03T16:59:36.000Z
2021-12-30T21:12:09.000Z
dev_test_endpoints.py
oliver-zehentleitner/-unicorn-binance-rest-api-
de8b96a213109ed050a2b98736e0a6de099f08d8
[ "MIT" ]
12
2021-04-30T10:02:05.000Z
2022-01-01T19:52:18.000Z
dev_test_endpoints.py
oliver-zehentleitner/-unicorn-binance-rest-api-
de8b96a213109ed050a2b98736e0a6de099f08d8
[ "MIT" ]
7
2021-05-14T23:50:08.000Z
2021-12-16T21:38:50.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File: example_exchange_endpoints.py # # Part of ‘UNICORN Binance REST API’ # Project website: https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api # Documentation: https://lucit-systems-and-development.github.io/unicorn-binance-rest-api # PyPI: htt...
42.72
106
0.745787
from unicorn_binance_rest_api.unicorn_binance_rest_api_manager import BinanceRestApiManager import logging import os logging.basicConfig(level=logging.DEBUG, filename=os.path.basename(__file__) + '.log', format="{asctime} [{levelname:8}] {process} {thread} {module}: {message}",...
true
true
1c10002a24dc4bb941d520615085b3026c1241ba
1,146
py
Python
project1/test/test_retangular_room_cleaner.py
Plastix/CSC-320
4c8802d0ceeffbea77bd1ef5f21d27d4de80dbb6
[ "MIT" ]
null
null
null
project1/test/test_retangular_room_cleaner.py
Plastix/CSC-320
4c8802d0ceeffbea77bd1ef5f21d27d4de80dbb6
[ "MIT" ]
null
null
null
project1/test/test_retangular_room_cleaner.py
Plastix/CSC-320
4c8802d0ceeffbea77bd1ef5f21d27d4de80dbb6
[ "MIT" ]
null
null
null
import unittest import pacman class TestRectangularRoomCleaner(unittest.TestCase): layouts = [ 'rectangularRoom-1', 'rectangularRoom-2', 'rectangularRoom-3', 'rectangularRoom-4', 'rectangularRoom-5', 'rectangularRoom-6', 'rectangularRoom-7' ] @stati...
28.65
70
0.538394
import unittest import pacman class TestRectangularRoomCleaner(unittest.TestCase): layouts = [ 'rectangularRoom-1', 'rectangularRoom-2', 'rectangularRoom-3', 'rectangularRoom-4', 'rectangularRoom-5', 'rectangularRoom-6', 'rectangularRoom-7' ] @stati...
true
true
1c10007a4448b2d78e2562b6e9dbfe7e17f85f49
26,510
py
Python
src/oci/database/models/external_container_database_summary.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database/models/external_container_database_summary.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database/models/external_container_database_summary.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
37.979943
245
0.690985
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ExternalContainerDatabaseSummary(object): LIFECYCLE_STATE_PROVISIONING = "PROVISIONING" LIFECYCLE_STATE_...
true
true
1c100183a5e1ae0a75323427512925079196f67b
43,901
py
Python
ArcPro/Scripts/GeMS_ValidateDatabase_ArcPro.py
ncgmp09/GeMS-ArcPro-Toolbox
046d9a80a7955672a1e2e0f91a7312daf47fbb1d
[ "MIT" ]
null
null
null
ArcPro/Scripts/GeMS_ValidateDatabase_ArcPro.py
ncgmp09/GeMS-ArcPro-Toolbox
046d9a80a7955672a1e2e0f91a7312daf47fbb1d
[ "MIT" ]
12
2019-02-04T18:35:56.000Z
2019-05-20T21:24:03.000Z
ArcPro/Scripts/GeMS_ValidateDatabase_ArcPro.py
ncgmp09/GeMS-ArcPro-Toolbar
046d9a80a7955672a1e2e0f91a7312daf47fbb1d
[ "MIT" ]
null
null
null
# ncgmp09_ValidateDatabase.py # Python script to inventory tables, feature datasets # and feature classes in a geodatabase and to check # for conformance with NCGMP09 geodatabase schema. # For more information, see tail of this file. # Assumes ArcGIS 10 or higher. # Ralph Haugerud, USGS # # Takes two a...
45.072895
149
0.614656
# rhaugerud@usgs.gov # Please include "GeMS" in the subject line. # Thanks! import arcpy, sys, time, os.path, glob from GeMS_Definition import tableDict, fieldNullsOKDict from GeMS_utilityFunctions import * versionString = 'GeMS_ValidateDatabase_ArcPro.py, version of 11 July 2019' # modified to have output fo...
true
true
1c1002224adbcb42a5ef6e323632c99bdd38ef25
8,334
py
Python
src/main/utils.py
kaywuensche/clustering_images
3e09d89f1b41c20d905f2959743ec3e7fd2ebe7b
[ "BSD-3-Clause" ]
null
null
null
src/main/utils.py
kaywuensche/clustering_images
3e09d89f1b41c20d905f2959743ec3e7fd2ebe7b
[ "BSD-3-Clause" ]
null
null
null
src/main/utils.py
kaywuensche/clustering_images
3e09d89f1b41c20d905f2959743ec3e7fd2ebe7b
[ "BSD-3-Clause" ]
null
null
null
import os import io import shutil import math import random import numpy as np import requests import urllib.request from PIL import Image, ImageDraw from bs4 import BeautifulSoup import imghdr from sklearn.cluster import KMeans from sklearn.decomposition import PCA from keras.models import Model from ker...
39.875598
183
0.597672
import os import io import shutil import math import random import numpy as np import requests import urllib.request from PIL import Image, ImageDraw from bs4 import BeautifulSoup import imghdr from sklearn.cluster import KMeans from sklearn.decomposition import PCA from keras.models import Model from ker...
true
true
1c10026cb1a7f647e82159edba831267d8fe9f02
333
py
Python
1253.py
ShawonBarman/URI-Online-Judge-Strings-level-problem-solution-in-python
cee526ae9c33e815cfef07bbb7fd62bf105f56e4
[ "MIT" ]
1
2021-07-27T02:54:59.000Z
2021-07-27T02:54:59.000Z
1253.py
ShawonBarman/URI-strings-level-problem-solution-in-python
7a1bfeb92e9e6051c1d37f2edfad5990e2a5f8ec
[ "MIT" ]
null
null
null
1253.py
ShawonBarman/URI-strings-level-problem-solution-in-python
7a1bfeb92e9e6051c1d37f2edfad5990e2a5f8ec
[ "MIT" ]
null
null
null
n = int(input()) while n != 0: n -= 1 message = input().upper() number = int(input()) ans = "" for i in range(len(message)): if (ord(message[i]) - number) < 65: ans += chr((ord(message[i]) - number) + 26) else: ans += chr(ord(message[i]) - number) ...
27.75
56
0.462462
n = int(input()) while n != 0: n -= 1 message = input().upper() number = int(input()) ans = "" for i in range(len(message)): if (ord(message[i]) - number) < 65: ans += chr((ord(message[i]) - number) + 26) else: ans += chr(ord(message[i]) - number) ...
true
true
1c1002f10de7fe0f4fc3a50c4f4a223d0439f499
3,668
py
Python
leetcode/79-Medium-Word-Search/answer.py
vaishali-bariwal/Practice-Coding-Questions
747bfcb1cb2be5340daa745f2b9938f0ee87c9ac
[ "Unlicense" ]
25
2018-05-22T15:18:50.000Z
2022-01-08T02:41:46.000Z
leetcode/79-Medium-Word-Search/answer.py
vaishali-bariwal/Practice-Coding-Questions
747bfcb1cb2be5340daa745f2b9938f0ee87c9ac
[ "Unlicense" ]
1
2019-05-24T16:55:27.000Z
2019-05-24T16:55:27.000Z
leetcode/79-Medium-Word-Search/answer.py
vaishali-bariwal/Practice-Coding-Questions
747bfcb1cb2be5340daa745f2b9938f0ee87c9ac
[ "Unlicense" ]
18
2018-09-20T15:39:26.000Z
2022-03-02T21:38:22.000Z
#!/usr/bin/python3 #------------------------------------------------------------------------------ # Solution #------------------------------------------------------------------------------ class Solution: def exist(self, board, word): """ :type board: List[List[str]] :type word: str ...
39.44086
129
0.450654
class Solution: def exist(self, board, word): def DFS(row, col, curr): if 0 <= row < len(board) and 0 <= col < len(board[0]) and board[row][col] == word[curr]: temp = board[row][col] board[row][col] = '#' ...
true
true
1c1003a5ddb6465fa2a09f2ceadfc04b3d4da6a3
16,682
py
Python
graphblas/infix.py
ParticularMiner/grblas
f5cfae47f68aa9b8e7c82c364e8eb16c0051b409
[ "Apache-2.0" ]
null
null
null
graphblas/infix.py
ParticularMiner/grblas
f5cfae47f68aa9b8e7c82c364e8eb16c0051b409
[ "Apache-2.0" ]
null
null
null
graphblas/infix.py
ParticularMiner/grblas
f5cfae47f68aa9b8e7c82c364e8eb16c0051b409
[ "Apache-2.0" ]
null
null
null
from . import _automethods, binary, utils from .base import _expect_op, _expect_type from .dtypes import BOOL from .expr import InfixExprBase from .matrix import Matrix, MatrixExpression, TransposedMatrix from .monoid import land, lor from .scalar import Scalar, ScalarExpression from .semiring import any_pair from .uti...
39.909091
100
0.709028
from . import _automethods, binary, utils from .base import _expect_op, _expect_type from .dtypes import BOOL from .expr import InfixExprBase from .matrix import Matrix, MatrixExpression, TransposedMatrix from .monoid import land, lor from .scalar import Scalar, ScalarExpression from .semiring import any_pair from .uti...
true
true
1c100498a921e74cc4a557a670e1f43d3db52df1
5,950
py
Python
ingestion/src/metadata/ingestion/source/gcs.py
Shreshtha13/OpenMetadata
cd65037ac76a2d44ece2e3cf456789864ee363da
[ "Apache-2.0" ]
864
2021-08-13T23:48:45.000Z
2022-03-31T18:36:30.000Z
ingestion/src/metadata/ingestion/source/gcs.py
Shreshtha13/OpenMetadata
cd65037ac76a2d44ece2e3cf456789864ee363da
[ "Apache-2.0" ]
2,701
2021-08-14T06:05:12.000Z
2022-03-31T23:48:32.000Z
ingestion/src/metadata/ingestion/source/gcs.py
Shreshtha13/OpenMetadata
cd65037ac76a2d44ece2e3cf456789864ee363da
[ "Apache-2.0" ]
144
2021-08-16T20:44:08.000Z
2022-03-29T14:12:30.000Z
# Copyright 2021 Collate # 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...
36.728395
100
0.61395
import logging import uuid from typing import Iterable, List, Optional, Union from google.cloud import storage from metadata.generated.schema.entity.data.location import Location, LocationType from metadata.generated.schema.entity.policies.lifecycle.deleteAction import ( LifecycleDeleteAction, ) from metadata.ge...
true
true
1c1004cbb8829fbc99d6256255a9b338431d23c0
7,651
py
Python
rasa_core/train.py
asaiyed10/rasa_core
a6b36e5d3979bea015737d829c21711653ddb893
[ "Apache-2.0" ]
null
null
null
rasa_core/train.py
asaiyed10/rasa_core
a6b36e5d3979bea015737d829c21711653ddb893
[ "Apache-2.0" ]
null
null
null
rasa_core/train.py
asaiyed10/rasa_core
a6b36e5d3979bea015737d829c21711653ddb893
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import str import argparse from rasa_core import utils from rasa_core.agent import Agent from rasa_core.constants import ( DEFAULT_NLU_FALLBACK_THRESH...
36.433333
80
0.570644
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import str import argparse from rasa_core import utils from rasa_core.agent import Agent from rasa_core.constants import ( DEFAULT_NLU_FALLBACK_THRESH...
true
true
1c100580c9230b7b37b663cc1f2263a3b573bde1
94
py
Python
iframeplaylistgenerator/__init__.py
nweber/iframe-playlist-generator
ba6d89473d39604806a53a1a07b8f21ae4814c23
[ "Apache-2.0" ]
61
2015-01-15T17:14:46.000Z
2021-10-30T01:49:06.000Z
iframeplaylistgenerator/__init__.py
nweber/iframe-playlist-generator
ba6d89473d39604806a53a1a07b8f21ae4814c23
[ "Apache-2.0" ]
2
2015-10-31T08:27:48.000Z
2017-04-13T22:33:50.000Z
iframeplaylistgenerator/__init__.py
nweber/iframe-playlist-generator
ba6d89473d39604806a53a1a07b8f21ae4814c23
[ "Apache-2.0" ]
16
2015-01-29T05:43:58.000Z
2020-10-29T18:34:34.000Z
from iframeplaylistgenerator.generator import ( update_for_iframes, create_iframe_playlist )
23.5
47
0.87234
from iframeplaylistgenerator.generator import ( update_for_iframes, create_iframe_playlist )
true
true
1c1005c02e3a6251a2cc8e91031c9874e00aefe8
4,430
py
Python
main.py
Shantanu0330/Scramble-Word-
42264b953c4892e04cefcf15cdca32a82b9e1b67
[ "Apache-2.0" ]
1
2021-09-16T15:03:20.000Z
2021-09-16T15:03:20.000Z
main.py
Shantanu0330/Scramble-Word-
42264b953c4892e04cefcf15cdca32a82b9e1b67
[ "Apache-2.0" ]
null
null
null
main.py
Shantanu0330/Scramble-Word-
42264b953c4892e04cefcf15cdca32a82b9e1b67
[ "Apache-2.0" ]
null
null
null
# importing libraries from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * import random import sys import pyttsx3 speaker=pyttsx3.init() class Window(QMainWindow): def __init__(self): super().__init__() # setting window title self.setWindowTitle("Python ") self.setGeometry(10...
26.058824
128
0.716253
from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * import random import sys import pyttsx3 speaker=pyttsx3.init() class Window(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("Python ") self.setGeometry(100, 100, 320, 350) self.UiComponents() ...
true
true
1c1005f20a527d0f61573d49510b0ea9135e2806
13,609
py
Python
python/ccxt/__init__.py
didgmd/ccxt
1f0bb994d0e5dfbae49e9038b3ebfc31548344ea
[ "MIT" ]
null
null
null
python/ccxt/__init__.py
didgmd/ccxt
1f0bb994d0e5dfbae49e9038b3ebfc31548344ea
[ "MIT" ]
null
null
null
python/ccxt/__init__.py
didgmd/ccxt
1f0bb994d0e5dfbae49e9038b3ebfc31548344ea
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """CCXT: CryptoCurrency eXchange Trading Library""" # MIT License # Copyright (c) 2017 Igor Kroitor # 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 restricti...
45.212625
80
0.529429
__version__ = '1.14.63' from ccxt.base.exchange import Exchange from ccxt.base.decimal_to_precision import decimal_to_precision from ccxt.base.decimal_to_precision import TRUNCATE from ccxt.base.decimal_to_precision import ROUND from ccxt.base.decimal_to_precisio...
true
true
1c10063208d222e9b5e2015a2efd219ac269c64c
28,827
py
Python
linkedin_api/linkedin.py
inomoz/linkedin-api
1dc4cc7835fee4e66842bd247342fbd1701a7069
[ "MIT" ]
null
null
null
linkedin_api/linkedin.py
inomoz/linkedin-api
1dc4cc7835fee4e66842bd247342fbd1701a7069
[ "MIT" ]
null
null
null
linkedin_api/linkedin.py
inomoz/linkedin-api
1dc4cc7835fee4e66842bd247342fbd1701a7069
[ "MIT" ]
null
null
null
""" Provides linkedin api-related code """ import random import logging from time import sleep from urllib.parse import urlencode import json from .utils.helpers import get_id_from_urn from .client import Client logger = logging.getLogger(__name__) def default_evade(): """ A catch-all method to try and evad...
33.020619
203
0.548999
import random import logging from time import sleep from urllib.parse import urlencode import json from .utils.helpers import get_id_from_urn from .client import Client logger = logging.getLogger(__name__) def default_evade(): sleep(random.randint(2, 5)) class Linkedin(object): _MAX_UPDATE_COUNT = 100 ...
true
true
1c10067a03e195dcfdb3b39882a77d236086c9d2
3,295
py
Python
packages/examples/thermistor_simulator.py
swatishs/liota
f490354b5f85bddfaa4d0f78c47d461f66cf33c3
[ "BSD-2-Clause" ]
361
2016-04-29T14:07:18.000Z
2021-01-23T10:15:39.000Z
packages/examples/thermistor_simulator.py
swatishs/liota
f490354b5f85bddfaa4d0f78c47d461f66cf33c3
[ "BSD-2-Clause" ]
148
2016-05-26T19:27:04.000Z
2021-02-22T05:39:40.000Z
packages/examples/thermistor_simulator.py
swatishs/liota
f490354b5f85bddfaa4d0f78c47d461f66cf33c3
[ "BSD-2-Clause" ]
153
2016-04-28T22:46:23.000Z
2020-02-13T19:01:07.000Z
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------# # Copyright © 2015-2016 VMware, Inc. All Rights Reserved. # # # # Licensed under the BSD 2-Clause License (the “License...
54.916667
83
0.541426
from liota.core.package_manager import LiotaPackage from liota.lib.utilities.utility import read_user_config dependencies = ["edge_systems/dell5k/edge_system"] class PackageClass(LiotaPackage): def run(self, registry): from liota.entities.devices.thermistor_simulated import ThermistorSimulated i...
true
true
1c1006e6d680900900596ba14aa92653840fb9da
459
py
Python
abc/242/D.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
2
2022-01-22T07:56:58.000Z
2022-01-24T00:29:37.000Z
abc/242/D.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
abc/242/D.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
import sys sys.setrecursionlimit(10 ** 6) stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() def g(c, add): return chr(ord('A') + (ord(c) - ord('A') + add) % 3) def f(t, k): if t == 0: return S[k] if k == 0: ...
18.36
56
0.503268
import sys sys.setrecursionlimit(10 ** 6) stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() def g(c, add): return chr(ord('A') + (ord(c) - ord('A') + add) % 3) def f(t, k): if t == 0: return S[k] if k == 0: ...
true
true
1c10070b2c93863dcecb1e531f11e7bd2f7cbc70
11,913
py
Python
PyInstaller/building/osx.py
andriyor/pyinstaller
9c30df9342603fb9594065bb9b18318266334f72
[ "Apache-2.0" ]
2
2022-03-26T22:41:36.000Z
2022-03-27T20:45:42.000Z
PyInstaller/building/osx.py
andriyor/pyinstaller
9c30df9342603fb9594065bb9b18318266334f72
[ "Apache-2.0" ]
1
2022-03-27T19:28:27.000Z
2022-03-28T14:17:55.000Z
PyInstaller/building/osx.py
andriyor/pyinstaller
9c30df9342603fb9594065bb9b18318266334f72
[ "Apache-2.0" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2005-2021, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.txt...
45.643678
120
0.572484
import os import plistlib import shutil from PyInstaller.building.api import COLLECT, EXE from PyInstaller.building.datastruct import TOC, Target, logger from PyInstaller.building.utils import (_check_path_overlap, _rmtree, add_suffix_to_extension, checkCache) from PyInstaller.compat import is_darwin if is_darwin: ...
true
true
1c1007678a6999390925bb018a5de3fe6a59d4c1
82,243
py
Python
spyder/plugins/ipythonconsole/plugin.py
AfzalivE/spyder
02055cf43351ad37df2b158a32ab8db85c8570f3
[ "MIT" ]
null
null
null
spyder/plugins/ipythonconsole/plugin.py
AfzalivE/spyder
02055cf43351ad37df2b158a32ab8db85c8570f3
[ "MIT" ]
null
null
null
spyder/plugins/ipythonconsole/plugin.py
AfzalivE/spyder
02055cf43351ad37df2b158a32ab8db85c8570f3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ IPython Console plugin based on QtConsole """ # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 # S...
44.074491
91
0.546624
import atexit import os import os.path as osp import uuid import sys import traceback from jupyter_client.connect import find_connection_file from jupyter_core.paths import jupyter_config_dir, jupyter_runtime_dir from qtconsole.client import QtKernelClient from qtconsole.manager import QtKernelManager ...
true
true
1c1007ddc42a62df05b8edba8d4e22192328e9d3
29,828
py
Python
venv/lib/python3.8/site-packages/jupyterlab/labapp.py
johncollinsai/post-high-frequency-data
88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4
[ "MIT" ]
1
2022-01-18T13:32:30.000Z
2022-01-18T13:32:30.000Z
venv/lib/python3.8/site-packages/jupyterlab/labapp.py
johncollinsai/post-high-frequency-data
88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4
[ "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/jupyterlab/labapp.py
johncollinsai/post-high-frequency-data
88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4
[ "MIT" ]
null
null
null
# coding: utf-8 """A tornado based Jupyter lab server.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import json import os import os.path as osp import sys from os.path import join as pjoin from jupyter_core.application import JupyterApp, NoStart, base_aliase...
36.688807
193
0.651603
import json import os import os.path as osp import sys from os.path import join as pjoin from jupyter_core.application import JupyterApp, NoStart, base_aliases, base_flags from jupyter_server._version import version_info as jpserver_version_info from jupyter_server.serverapp import flags from jupyter_server.utils im...
true
true
1c1007e5b053a7e410520e84b4b13bd574bd1e61
8,744
py
Python
app.py
arocks/django-app-in-a-file
678924f1efba27c7007f3f3bdd756bc4ad00f9f4
[ "MIT" ]
1
2021-01-27T05:46:27.000Z
2021-01-27T05:46:27.000Z
app.py
bharathjinka09/django-app-in-a-file
678924f1efba27c7007f3f3bdd756bc4ad00f9f4
[ "MIT" ]
null
null
null
app.py
bharathjinka09/django-app-in-a-file
678924f1efba27c7007f3f3bdd756bc4ad00f9f4
[ "MIT" ]
1
2020-12-10T03:56:33.000Z
2020-12-10T03:56:33.000Z
import os import sys from django.conf import settings from django.urls import path from django.http import HttpResponse, HttpResponseRedirect from django.core.wsgi import get_wsgi_application from django.template import RequestContext, Template from django import forms CSV_LIST = "thelist.csv" settings.configure( ...
60.722222
3,282
0.652562
import os import sys from django.conf import settings from django.urls import path from django.http import HttpResponse, HttpResponseRedirect from django.core.wsgi import get_wsgi_application from django.template import RequestContext, Template from django import forms CSV_LIST = "thelist.csv" settings.configure( ...
true
true
1c1007ea0d66d6d0fa94f826794aa72d46e82c59
6,278
py
Python
tests/test_migrate.py
kaushikc92/nbextension
972b493ebd683b1b40cac1bb1429fff1de841342
[ "BSD-3-Clause-Clear" ]
1
2017-04-11T13:03:55.000Z
2017-04-11T13:03:55.000Z
tests/test_migrate.py
kaushikc92/nbextension
972b493ebd683b1b40cac1bb1429fff1de841342
[ "BSD-3-Clause-Clear" ]
null
null
null
tests/test_migrate.py
kaushikc92/nbextension
972b493ebd683b1b40cac1bb1429fff1de841342
[ "BSD-3-Clause-Clear" ]
null
null
null
# -*- coding: utf-8 -*- """Tests for the retiring old IPython-notebook-extensions installations.""" from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import imp import json import os from unittest import TestCase import nose.tools as nt import pip from jupyter_contrib_core.t...
39.484277
100
0.633163
from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import imp import json import os from unittest import TestCase import nose.tools as nt import pip from jupyter_contrib_core.testing_utils import ( get_logger, patch_traitlets_app_logs, ) from jupyter_contrib_core.testing_...
true
true
1c100937f1ec01a0efee124d60b9373382f17f4d
3,306
py
Python
Complete University Guide/Subjects/cug_subjects.py
dt99jay/League-Tables
92c029957734841ded0e5ed9f783fe3ea57f07f3
[ "MIT" ]
1
2020-11-24T17:18:58.000Z
2020-11-24T17:18:58.000Z
Complete University Guide/Subjects/cug_subjects.py
dt99jay/League-Tables
92c029957734841ded0e5ed9f783fe3ea57f07f3
[ "MIT" ]
1
2019-10-16T18:37:49.000Z
2019-11-21T23:39:54.000Z
Complete University Guide/Subjects/cug_subjects.py
dt99jay/League-Tables
92c029957734841ded0e5ed9f783fe3ea57f07f3
[ "MIT" ]
1
2020-02-23T02:20:50.000Z
2020-02-23T02:20:50.000Z
import urllib import requests import pandas as pd from bs4 import BeautifulSoup def get_cols(table): header = table.find_all("th") cols = [] for column in header: try: col = column.find("a").get_text() except AttributeError: col = column.get_text() cols.ap...
44.675676
185
0.61948
import urllib import requests import pandas as pd from bs4 import BeautifulSoup def get_cols(table): header = table.find_all("th") cols = [] for column in header: try: col = column.find("a").get_text() except AttributeError: col = column.get_text() cols.ap...
true
true
1c10096da64e1da32819455eac151561022b2330
1,603
py
Python
python/fastDNA/evaluate.py
rmenegaux/fastDNA
bc6469694daa69a18c458166ef4975b9fc1c308c
[ "BSD-3-Clause" ]
21
2018-10-17T19:08:24.000Z
2022-03-07T09:21:51.000Z
python/fastDNA/evaluate.py
rmenegaux/fastDNA
bc6469694daa69a18c458166ef4975b9fc1c308c
[ "BSD-3-Clause" ]
5
2019-07-01T13:29:37.000Z
2020-10-09T12:41:08.000Z
python/fastDNA/evaluate.py
rmenegaux/fastDNA
bc6469694daa69a18c458166ef4975b9fc1c308c
[ "BSD-3-Clause" ]
11
2019-04-09T11:14:20.000Z
2021-12-15T01:41:23.000Z
from sklearn.metrics import accuracy_score import numpy as np import argparse parser = argparse.ArgumentParser(description= ''' Compute average species-level recall and precision. ''') parser.add_argument("predictions", nargs='+', help="predicted labels, text file with one label per l...
29.145455
82
0.629445
from sklearn.metrics import accuracy_score import numpy as np import argparse parser = argparse.ArgumentParser(description= ''' Compute average species-level recall and precision. ''') parser.add_argument("predictions", nargs='+', help="predicted labels, text file with one label per l...
true
true
1c1009c7f4539f769fdda4406f2063e1b158d129
4,555
py
Python
threedod/benchmark_scripts/data_prepare_online.py
Levintsky/ARKitScenes
d209c6ae512e3638c90da8aeebf2e3a5b345807f
[ "AML" ]
237
2021-12-03T03:35:31.000Z
2022-03-28T21:05:37.000Z
threedod/benchmark_scripts/data_prepare_online.py
Yaldatkk/ARKitScenes
58bf410f65bc2ae2e35e3c3d2a7c45d8b7863fca
[ "AML" ]
19
2021-12-05T13:58:15.000Z
2022-03-18T14:23:55.000Z
threedod/benchmark_scripts/data_prepare_online.py
Yaldatkk/ARKitScenes
58bf410f65bc2ae2e35e3c3d2a7c45d8b7863fca
[ "AML" ]
27
2021-12-08T06:08:15.000Z
2022-03-30T07:08:51.000Z
#TODO: remove sys.path based import #!/usr/bin/env python3 import argparse import numpy as np import os import time import utils.box_utils as box_utils import utils.rotation as rotation from utils.taxonomy import class_names, ARKitDatasetConfig from utils.tenFpsDataLoader import TenFpsDataLoader, extract_gt import u...
33.740741
119
0.633809
import argparse import numpy as np import os import time import utils.box_utils as box_utils import utils.rotation as rotation from utils.taxonomy import class_names, ARKitDatasetConfig from utils.tenFpsDataLoader import TenFpsDataLoader, extract_gt import utils.visual_utils as visual_utils dc = ARKitDatasetConfig(...
true
true
1c100a187bbce239958431c218c1253be3d72be2
544
py
Python
tests/test_task.py
dimtruck/workflow-manager-py
423befca05ccaf9fecef3ca680c4f21f1fd96d45
[ "MIT" ]
2
2021-09-14T17:06:46.000Z
2021-12-30T07:41:40.000Z
tests/test_task.py
dimtruck/workflow-manager-py
423befca05ccaf9fecef3ca680c4f21f1fd96d45
[ "MIT" ]
1
2018-02-08T12:36:25.000Z
2018-02-08T12:36:25.000Z
tests/test_task.py
dimtruck/workflow-manager-py
423befca05ccaf9fecef3ca680c4f21f1fd96d45
[ "MIT" ]
6
2017-09-05T19:39:53.000Z
2021-12-03T15:54:24.000Z
import example_task from workflow_manager.manager import Manager from workflow_manager.task import Task import pytest def test_init_with_name(): assert Task('test 1').name == 'test 1' def test_init(): assert Task().name == 'task' def test_execute_on_interface(): with pytest.raises(NotImplementedError)...
22.666667
58
0.591912
import example_task from workflow_manager.manager import Manager from workflow_manager.task import Task import pytest def test_init_with_name(): assert Task('test 1').name == 'test 1' def test_init(): assert Task().name == 'task' def test_execute_on_interface(): with pytest.raises(NotImplementedError)...
true
true
1c100c06256275934c4f70620c12f2d1e81f06e7
22,931
py
Python
src/classification/attributeclassifier.py
lasigeBioTM/IBEnt
de7574991684de72e9b545c2b8fb5c8d95b0a83b
[ "MIT" ]
null
null
null
src/classification/attributeclassifier.py
lasigeBioTM/IBEnt
de7574991684de72e9b545c2b8fb5c8d95b0a83b
[ "MIT" ]
null
null
null
src/classification/attributeclassifier.py
lasigeBioTM/IBEnt
de7574991684de72e9b545c2b8fb5c8d95b0a83b
[ "MIT" ]
null
null
null
import re def check_between (e, window, bitmap, labels=("POS", "NEG")): # check if there is an event between the trigger word and the event in this window, according to bitmap polarityPredicted = labels[0] # start the search for events in between window_array = window.split("+") # +,+not+amenable+to+e...
54.727924
895
0.581571
import re def check_between (e, window, bitmap, labels=("POS", "NEG")): polarityPredicted = labels[0] window_array = window.split("+") window_array = filter(None, window_array) position = 0 window_between = [] bitmap_between="" for word in window_array: ...
false
true
1c100c603a85028acd522cfbfea4d0db4c8d4caa
1,485
py
Python
learn/ch03/6excel_value_matches_pattern.py
shuxiangguo/FoudationsForAnalysisWithPython
8ac6595db8e12b3fd1b9815bdeda583f6f7d11d9
[ "MIT" ]
null
null
null
learn/ch03/6excel_value_matches_pattern.py
shuxiangguo/FoudationsForAnalysisWithPython
8ac6595db8e12b3fd1b9815bdeda583f6f7d11d9
[ "MIT" ]
null
null
null
learn/ch03/6excel_value_matches_pattern.py
shuxiangguo/FoudationsForAnalysisWithPython
8ac6595db8e12b3fd1b9815bdeda583f6f7d11d9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import re import sys from datetime import date from xlrd import open_workbook, xldate_as_tuple from xlwt import Workbook input_file = sys.argv[1] output_file = sys.argv[2] output_workbook = Workbook() output_worksheet = output_workbook.add_sheet('jan_2013_output') pattern = re.compile(r'(?P<my...
37.125
87
0.674074
import re import sys from datetime import date from xlrd import open_workbook, xldate_as_tuple from xlwt import Workbook input_file = sys.argv[1] output_file = sys.argv[2] output_workbook = Workbook() output_worksheet = output_workbook.add_sheet('jan_2013_output') pattern = re.compile(r'(?P<my_pattern>^J.*)') custom...
true
true
1c100d66bb7261a1b9e39e91675290d5811db825
408
py
Python
dvadmin-backend/apps/vadmin/system/models/__init__.py
lework/django-vue-admin
a695515eb2944257deb5c0d108ced7a04024520d
[ "MIT" ]
2
2021-06-10T01:57:57.000Z
2021-06-18T02:36:25.000Z
dvadmin-backend/apps/vadmin/system/models/__init__.py
chenansheng/dvadmin-ui
dc58bad7de8c46452f0cebbb34f78a62a88e4e2b
[ "MIT" ]
null
null
null
dvadmin-backend/apps/vadmin/system/models/__init__.py
chenansheng/dvadmin-ui
dc58bad7de8c46452f0cebbb34f78a62a88e4e2b
[ "MIT" ]
null
null
null
from ..models.config_settings import ConfigSettings from ..models.dict_data import DictData from ..models.dict_details import DictDetails from ..models.save_file import SaveFile from ..models.message_push import MessagePush from ..models.message_push import MessagePushUser from ..models.logininfor import LoginInfor fro...
37.090909
51
0.843137
from ..models.config_settings import ConfigSettings from ..models.dict_data import DictData from ..models.dict_details import DictDetails from ..models.save_file import SaveFile from ..models.message_push import MessagePush from ..models.message_push import MessagePushUser from ..models.logininfor import LoginInfor fro...
true
true
1c100ec9807b916084fb76d9e569a7a62ba8962f
849
py
Python
examples/builtin_parse_action_demo.py
klahnakoski/mo-parsing
885bf3fd61430d5fa15164168b975b18988fcf9e
[ "MIT" ]
1
2021-10-30T21:18:29.000Z
2021-10-30T21:18:29.000Z
examples/builtin_parse_action_demo.py
klahnakoski/mo-parsing
885bf3fd61430d5fa15164168b975b18988fcf9e
[ "MIT" ]
22
2020-04-15T14:49:30.000Z
2021-12-22T02:49:52.000Z
examples/builtin_parse_action_demo.py
klahnakoski/mo-parsing
885bf3fd61430d5fa15164168b975b18988fcf9e
[ "MIT" ]
null
null
null
# # builtin_parse_action_demo.py # Copyright, 2012 - Paul McGuire # # Simple example of using builtin functions as parse actions. # from mo_parsing import * from mo_parsing.utils import nums integer = Word(nums).add_parse_action(lambda t: int(t[0])) # make an expression that will match a list of ints ...
27.387097
81
0.68669
from mo_parsing import * from mo_parsing.utils import nums integer = Word(nums).add_parse_action(lambda t: int(t[0])) nums = OneOrMore(integer) test = "2 54 34 2 211 66 43 2 0" for fn in (sum, max, min, len, sorted, reversed, list, tuple, set, any, all): fn_name = fn.__name__ if fn is rever...
true
true
1c10103db21f6b72ba73accc021d034127da90b4
7,195
py
Python
continuous_BCQ/main.py
xtwentian3/BCQ
e114f8c474c57a36d9af78c42a06f612831afda2
[ "MIT" ]
null
null
null
continuous_BCQ/main.py
xtwentian3/BCQ
e114f8c474c57a36d9af78c42a06f612831afda2
[ "MIT" ]
null
null
null
continuous_BCQ/main.py
xtwentian3/BCQ
e114f8c474c57a36d9af78c42a06f612831afda2
[ "MIT" ]
null
null
null
import argparse import gym import numpy as np import os import torch import BCQ import DDPG import utils # Handles interactions with the environment, i.e. train behavioral or generate buffer def interact_with_environment(env, state_dim, action_dim, max_action, device, args): # For saving files setting = f"{args.en...
36.338384
140
0.710215
import argparse import gym import numpy as np import os import torch import BCQ import DDPG import utils def interact_with_environment(env, state_dim, action_dim, max_action, device, args): setting = f"{args.env}_{args.seed}" buffer_name = f"{args.buffer_name}_{setting}" policy = DDPG.DDPG(state_dim, action_di...
true
true