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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c4826c33c1d16a74af01fb85c32290195d70209
2,439
py
Python
examples/dummynode.py
sq8kfh/pyh9
7b1f05709849c30cd6c9086c6539e33106aa5fa2
[ "MIT" ]
null
null
null
examples/dummynode.py
sq8kfh/pyh9
7b1f05709849c30cd6c9086c6539e33106aa5fa2
[ "MIT" ]
null
null
null
examples/dummynode.py
sq8kfh/pyh9
7b1f05709849c30cd6c9086c6539e33106aa5fa2
[ "MIT" ]
null
null
null
import asyncio import h9.asyncmsgstream from h9.msg import H9ExecuteMethod, H9SendFrame, H9Frame node_id = 32 dev_des=[0, 5, 0, 1] #type_h, type_l, version_major, version_minor seqnum = -1 reg_10 = 0 def get_next_seqnum(): global seqnum seqnum = seqnum + 1 seqnum = seqnum % 32 return seqnum def pr...
35.347826
110
0.609266
import asyncio import h9.asyncmsgstream from h9.msg import H9ExecuteMethod, H9SendFrame, H9Frame node_id = 32 dev_des=[0, 5, 0, 1] seqnum = -1 reg_10 = 0 def get_next_seqnum(): global seqnum seqnum = seqnum + 1 seqnum = seqnum % 32 return seqnum def procces_frame(conn, frame): global reg_10 ...
true
true
1c482777e51dc00263580068f3d916b2c4437bbe
1,574
py
Python
resources/property.py
codeforpdx/dwellinglybackend
92fee6d19a68ae00750927b8700eaa7195b57668
[ "MIT" ]
15
2020-07-09T20:51:09.000Z
2021-11-28T21:59:02.000Z
resources/property.py
codeforpdx/dwellinglybackend
92fee6d19a68ae00750927b8700eaa7195b57668
[ "MIT" ]
148
2020-03-28T22:10:30.000Z
2021-12-19T09:22:59.000Z
resources/property.py
codeforpdx/dwellinglybackend
92fee6d19a68ae00750927b8700eaa7195b57668
[ "MIT" ]
30
2020-03-12T02:31:27.000Z
2021-07-29T02:40:36.000Z
from flask_restful import Resource from flask import request from utils.authorizations import admin_required from db import db from models.property import PropertyModel from schemas.property import PropertySchema class Property(Resource): @admin_required def get(self, id): return PropertyModel.find(id...
27.137931
85
0.644854
from flask_restful import Resource from flask import request from utils.authorizations import admin_required from db import db from models.property import PropertyModel from schemas.property import PropertySchema class Property(Resource): @admin_required def get(self, id): return PropertyModel.find(id...
true
true
1c4827c357cf7a405de0181536ad034ca79debe7
124
py
Python
scripts/secrets.py
Aviah/one-click-django-dev-ubuntu-14-04-trusty
b6f5da980185eedde8a7a99f7efe76304c6f5c40
[ "MIT" ]
10
2016-03-22T22:14:40.000Z
2021-07-23T22:00:02.000Z
scripts/secrets.py
Aviah/one-click-django-dev-ubuntu-14-04-trusty
b6f5da980185eedde8a7a99f7efe76304c6f5c40
[ "MIT" ]
1
2017-06-03T12:11:47.000Z
2017-06-03T12:11:47.000Z
scripts/secrets.py
Aviah/one-click-django-dev-osx-el-capitan
ea6832f57e126d30499c9bc66c5b4c77d0ef4020
[ "MIT" ]
4
2016-04-05T05:41:15.000Z
2017-01-08T10:03:25.000Z
# Add here secrets, password etc you don't want to keep in the repository # e.g. django SECRET_KEY, database credentials etc
62
73
0.782258
# e.g. django SECRET_KEY, database credentials etc
true
true
1c482859e6dd971e0ebdc01fe98a1798be6c2f40
1,548
py
Python
setup.py
pashtetbezd/miracles-server
131071d1a4add240151ef55fe9c4f9ff9f5261cc
[ "Apache-2.0" ]
null
null
null
setup.py
pashtetbezd/miracles-server
131071d1a4add240151ef55fe9c4f9ff9f5261cc
[ "Apache-2.0" ]
null
null
null
setup.py
pashtetbezd/miracles-server
131071d1a4add240151ef55fe9c4f9ff9f5261cc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ # TODO: put package requirements here 'connexion[swagger-ui]', '...
25.377049
58
0.633075
from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'connexion[swagger-ui]', 'connexion==2.6.0', 'sqlalchemy>=1.3.13', 'SQLAlchemy-serializer', 'psyco...
true
true
1c482950e64a9537a2996df66ed9403e53cf8a71
44,005
py
Python
tensorflow/contrib/tpu/python/tpu/tpu.py
jiefangxuanyan/tensorflow
f78fd433118830482dddbf6055751898a19265de
[ "Apache-2.0" ]
1
2021-05-03T12:10:38.000Z
2021-05-03T12:10:38.000Z
tensorflow/contrib/tpu/python/tpu/tpu.py
jiefangxuanyan/tensorflow
f78fd433118830482dddbf6055751898a19265de
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/tpu/python/tpu/tpu.py
jiefangxuanyan/tensorflow
f78fd433118830482dddbf6055751898a19265de
[ "Apache-2.0" ]
1
2018-06-12T01:58:06.000Z
2018-06-12T01:58:06.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.823529
112
0.695785
from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import xrange from tensorflow.contrib.framework.python.framework import experimental from tensorflow.contrib.tpu.python.ops import tpu_ops from tensorflow.contrib.tpu.python.tpu import tpu_fu...
true
true
1c48297f4c379fead9dd0d6d37e22bd65db66e33
1,778
py
Python
bot_plugins/weather.py
UtopiaXC/Utopia-Bot-For-QQ
87281f509e20c2d5d25367614d5202f6e53cea50
[ "MIT" ]
5
2021-03-25T15:18:18.000Z
2021-03-31T02:29:28.000Z
bot_plugins/weather.py
UtopiaXC/Utopia-Bot-For-QQ
87281f509e20c2d5d25367614d5202f6e53cea50
[ "MIT" ]
null
null
null
bot_plugins/weather.py
UtopiaXC/Utopia-Bot-For-QQ
87281f509e20c2d5d25367614d5202f6e53cea50
[ "MIT" ]
null
null
null
from nonebot.command import CommandSession from services.common import ServiceException from services.weather import get_current_weather_short, get_current_weather_desc from nonebot.natural_language import NLPSession, IntentCommand from nonebot.experimental.plugin import on_command, on_natural_language from jieba impor...
29.633333
100
0.68279
from nonebot.command import CommandSession from services.common import ServiceException from services.weather import get_current_weather_short, get_current_weather_desc from nonebot.natural_language import NLPSession, IntentCommand from nonebot.experimental.plugin import on_command, on_natural_language from jieba impor...
true
true
1c4829860384987e89e27fe3bc17e0a11f6813fc
12,746
py
Python
grid_search_loop/tr5000_N200/ESNtrainCV.py
malfarasplux/pnet2019
ae34d5c84fb4d3985634b237a14dfb69e98b8339
[ "BSD-3-Clause" ]
1
2020-11-29T12:42:30.000Z
2020-11-29T12:42:30.000Z
grid_search_loop/tr5000_N200/ESNtrainCV.py
malfarasplux/pnet2019
ae34d5c84fb4d3985634b237a14dfb69e98b8339
[ "BSD-3-Clause" ]
null
null
null
grid_search_loop/tr5000_N200/ESNtrainCV.py
malfarasplux/pnet2019
ae34d5c84fb4d3985634b237a14dfb69e98b8339
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ## Config # biased_regress = True # normal_equations = True dataset = "training_1" path = "../" + dataset +"/" kfold_split = 10 nan_to_zero = True mm = False std = False numpy_load = True nanfill = True ## ESN parameters N_def = [200] ...
31.944862
154
0.595716
dataset = "training_1" path = "../" + dataset +"/" kfold_split = 10 nan_to_zero = True mm = False std = False numpy_load = True nanfill = True N_def = [200] scale_def = [0.001, 0.025, 0.050, 0.075, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7,...
true
true
1c482d59925e0619904da8fa23e69b884ba76a39
825
py
Python
shooter/config.py
codershkoder/zombie_shooter_025
12582915af81d641f6a654418c02792ee96ea2a8
[ "MIT" ]
null
null
null
shooter/config.py
codershkoder/zombie_shooter_025
12582915af81d641f6a654418c02792ee96ea2a8
[ "MIT" ]
null
null
null
shooter/config.py
codershkoder/zombie_shooter_025
12582915af81d641f6a654418c02792ee96ea2a8
[ "MIT" ]
null
null
null
from pathlib import Path # Настройки путей _BASE_DIR = Path.cwd() _RESOURCES_DIR = _BASE_DIR / 'resources' _IMAGES_DIR = _RESOURCES_DIR / 'images' _LEVELS_DIR = _RESOURCES_DIR / 'levels' # Общие настройки WINDOW_CAPTION = 'Зомби шутер' FRAME_RATE = 60 BACKGROUND_COLOR = (0, 0, 0) # Настройки для игрока PLAYER_IMAGE ...
21.710526
45
0.768485
from pathlib import Path _BASE_DIR = Path.cwd() _RESOURCES_DIR = _BASE_DIR / 'resources' _IMAGES_DIR = _RESOURCES_DIR / 'images' _LEVELS_DIR = _RESOURCES_DIR / 'levels' WINDOW_CAPTION = 'Зомби шутер' FRAME_RATE = 60 BACKGROUND_COLOR = (0, 0, 0) PLAYER_IMAGE = _IMAGES_DIR / 'player_min.png' PLAYER_SPEED = 5 PLAYER_HE...
true
true
1c482e3d03274f06a56af75d2a96e0b689dfe117
887
py
Python
roshant/everest/everest/urls.py
sushant60/Python-web
426a89200e52e902b3db519998485a5de202fa91
[ "Apache-2.0" ]
null
null
null
roshant/everest/everest/urls.py
sushant60/Python-web
426a89200e52e902b3db519998485a5de202fa91
[ "Apache-2.0" ]
null
null
null
roshant/everest/everest/urls.py
sushant60/Python-web
426a89200e52e902b3db519998485a5de202fa91
[ "Apache-2.0" ]
null
null
null
"""everest URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Cla...
35.48
78
0.680947
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('admin/', admin.site.urls), path('eve', views.first, name='first'), path('science', views.second, name='second'), ]
true
true
1c482ebcbaa1bfb3289d76e89372b8cceb55517f
3,201
py
Python
B4860-V7/xxx/scons-3.1.1/engine/SCons/Tool/zip.py
miaopei/B4860
6f084bd485b787bb36de26d40f83ff4833098c3d
[ "MIT" ]
null
null
null
B4860-V7/xxx/scons-3.1.1/engine/SCons/Tool/zip.py
miaopei/B4860
6f084bd485b787bb36de26d40f83ff4833098c3d
[ "MIT" ]
null
null
null
B4860-V7/xxx/scons-3.1.1/engine/SCons/Tool/zip.py
miaopei/B4860
6f084bd485b787bb36de26d40f83ff4833098c3d
[ "MIT" ]
null
null
null
"""SCons.Tool.zip Tool-specific initialization for zip. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2019 The SCons Foundation # # Permission is hereby granted, free of charge, to...
34.419355
114
0.663855
__revision__ = "src/engine/SCons/Tool/zip.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan" import os.path import SCons.Builder import SCons.Defaults import SCons.Node.FS import SCons.Util import zipfile zipcompression = zipfile.ZIP_DEFLATED def zip(target, source, env): compression = e...
true
true
1c482f45ae4ff817a2e5c8c5c289bc77f9c36105
1,792
py
Python
esolang_IDE/visualisers/io_widget.py
Avanta8/Esolang-Interpreter-IDE
9a958eb26314c6c138d1921e76c52b1bb53c85ed
[ "MIT" ]
3
2020-01-16T23:04:24.000Z
2020-07-21T23:55:59.000Z
esolang_IDE/visualisers/io_widget.py
Avanta8/Esolang-Interpreter-IDE
9a958eb26314c6c138d1921e76c52b1bb53c85ed
[ "MIT" ]
null
null
null
esolang_IDE/visualisers/io_widget.py
Avanta8/Esolang-Interpreter-IDE
9a958eb26314c6c138d1921e76c52b1bb53c85ed
[ "MIT" ]
null
null
null
from PyQt5 import QtCore, QtWidgets from esolang_IDE.input_text import HighlightInputText from esolang_IDE.output_text import OutputText class IOWidget(QtWidgets.QWidget): def __init__(self, parent=None, flags=QtCore.Qt.WindowFlags()): super().__init__(parent=parent, flags=flags) self.init_widge...
30.896552
69
0.689174
from PyQt5 import QtCore, QtWidgets from esolang_IDE.input_text import HighlightInputText from esolang_IDE.output_text import OutputText class IOWidget(QtWidgets.QWidget): def __init__(self, parent=None, flags=QtCore.Qt.WindowFlags()): super().__init__(parent=parent, flags=flags) self.init_widge...
true
true
1c48308b9835d4ad17cc2c255db05b765a7dd3a3
2,479
py
Python
conpaas-services/contrib/libcloud/common/hostvirtual.py
bopopescu/conpaas-1
cea3c02f499a729464697de7cf98c2041febc0ab
[ "BSD-3-Clause" ]
5
2016-02-24T14:44:03.000Z
2020-11-29T19:18:40.000Z
conpaas-services/contrib/libcloud/common/hostvirtual.py
bopopescu/conpaas-1
cea3c02f499a729464697de7cf98c2041febc0ab
[ "BSD-3-Clause" ]
25
2015-03-23T16:05:19.000Z
2018-02-13T17:22:22.000Z
conpaas-services/contrib/libcloud/common/hostvirtual.py
bopopescu/conpaas-1
cea3c02f499a729464697de7cf98c2041febc0ab
[ "BSD-3-Clause" ]
3
2018-09-14T16:54:14.000Z
2020-07-26T03:14:56.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
32.618421
77
0.689794
try: import simplejson as json except ImportError: import json from libcloud.utils.py3 import httplib from libcloud.common.base import ConnectionKey, JsonResponse from libcloud.compute.types import InvalidCredsError from libcloud.common.types import LibcloudError API_HOST = 'www.vr.org' class HostVirtualEx...
true
true
1c483094595d09d08bba4956265bb0fbca8a59fc
538
py
Python
src/myres/migrations/0003_auto_20170404_0924.py
tsotetsi/myres-api
9ca8f6762168d07a767c30a490520dfad54079d9
[ "MIT" ]
null
null
null
src/myres/migrations/0003_auto_20170404_0924.py
tsotetsi/myres-api
9ca8f6762168d07a767c30a490520dfad54079d9
[ "MIT" ]
null
null
null
src/myres/migrations/0003_auto_20170404_0924.py
tsotetsi/myres-api
9ca8f6762168d07a767c30a490520dfad54079d9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-04-04 07:24 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('myres', '0002_student_residence'), ] operations = ...
24.454545
103
0.650558
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('myres', '0002_student_residence'), ] operations = [ migrations.AlterField( model_name='student', ...
true
true
1c48317e7445a689b165340a69a42ccf53b75ba5
15,085
py
Python
src/models/data_loader.py
tikhonovpavel/LdaSummarization
fbfb229e83548d9dd8f921626fd3fbf423b0305a
[ "MIT" ]
null
null
null
src/models/data_loader.py
tikhonovpavel/LdaSummarization
fbfb229e83548d9dd8f921626fd3fbf423b0305a
[ "MIT" ]
null
null
null
src/models/data_loader.py
tikhonovpavel/LdaSummarization
fbfb229e83548d9dd8f921626fd3fbf423b0305a
[ "MIT" ]
null
null
null
import bisect import gc import glob import pickle import random import torch from others.logging import logger import gensim from gensim.utils import simple_preprocess from gensim.parsing.preprocessing import STOPWORDS from nltk.stem import WordNetLemmatizer, SnowballStemmer from nltk.stem.porter import * import num...
33.522222
104
0.562678
import bisect import gc import glob import pickle import random import torch from others.logging import logger import gensim from gensim.utils import simple_preprocess from gensim.parsing.preprocessing import STOPWORDS from nltk.stem import WordNetLemmatizer, SnowballStemmer from nltk.stem.porter import * import num...
true
true
1c4831c92bce75f0f171e01cc007b17f4ff0e01b
291
py
Python
tests/urls.py
movermeyer/django-umanage
9327772efbf1f13c05b22afcbccaebb2c8595850
[ "MIT" ]
4
2015-04-21T01:01:23.000Z
2016-01-15T08:41:56.000Z
tests/urls.py
movermeyer/django-umanage
9327772efbf1f13c05b22afcbccaebb2c8595850
[ "MIT" ]
1
2018-03-04T20:46:41.000Z
2018-03-04T20:46:41.000Z
tests/urls.py
movermeyer/django-umanage
9327772efbf1f13c05b22afcbccaebb2c8595850
[ "MIT" ]
3
2017-08-14T01:53:44.000Z
2019-06-06T17:47:49.000Z
from django.conf.urls import include from django.conf.urls import url urlpatterns = [ url(r'', include('umanage.auth.urls')), url(r'', include('umanage.forgot_username.urls')), url(r'', include('umanage.forgot_password.urls')), url(r'^account', include('umanage.urls')), ]
26.454545
54
0.680412
from django.conf.urls import include from django.conf.urls import url urlpatterns = [ url(r'', include('umanage.auth.urls')), url(r'', include('umanage.forgot_username.urls')), url(r'', include('umanage.forgot_password.urls')), url(r'^account', include('umanage.urls')), ]
true
true
1c4833f8843bf3183d8117ca678adcf0a5a840f2
4,689
py
Python
kubernetes_spawner/swagger_client/models/unversioned_list_meta.py
AdrianGPrado/k8s-jupyterhub-spawner
f3d28adf1d70102bc60ba57f5737a7ec864537d9
[ "Apache-2.0" ]
16
2016-09-18T21:20:49.000Z
2020-02-15T06:28:03.000Z
kubernetes_spawner/swagger_client/models/unversioned_list_meta.py
AdrianGPrado/k8s-jupyterhub-spawner
f3d28adf1d70102bc60ba57f5737a7ec864537d9
[ "Apache-2.0" ]
2
2016-11-10T17:51:55.000Z
2018-03-18T05:38:22.000Z
kubernetes_spawner/swagger_client/models/unversioned_list_meta.py
AdrianGPrado/k8s-jupyterhub-spawner
f3d28adf1d70102bc60ba57f5737a7ec864537d9
[ "Apache-2.0" ]
12
2016-09-28T20:48:56.000Z
2020-01-17T04:50:59.000Z
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
33.492857
369
0.629132
from pprint import pformat from six import iteritems class UnversionedListMeta(object): def __init__(self): self.swagger_types = { 'self_link': 'str', 'resource_version': 'str' } self.attribute_map = { 'self_link': 'selfLink', 'resource_ve...
true
true
1c48346c9bf89ec65e95fe3f36582e8e59a98ca7
2,281
py
Python
account/forms.py
mijiFernandes/pa4
3850c5bf6af1f89cd3876b08c9a9fa319d583fae
[ "Unlicense" ]
null
null
null
account/forms.py
mijiFernandes/pa4
3850c5bf6af1f89cd3876b08c9a9fa319d583fae
[ "Unlicense" ]
null
null
null
account/forms.py
mijiFernandes/pa4
3850c5bf6af1f89cd3876b08c9a9fa319d583fae
[ "Unlicense" ]
null
null
null
from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.utils.translation import ugettext_lazy as _ from account.models import User, UserManager class UserCreationForm(forms.ModelForm): # 사용자 생성 폼 username = forms.CharField( label=_('Username'), re...
29.24359
73
0.577378
from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.utils.translation import ugettext_lazy as _ from account.models import User, UserManager class UserCreationForm(forms.ModelForm): username = forms.CharField( label=_('Username'), required=True...
true
true
1c4834ad7231269805601500145db87c940a6876
2,080
py
Python
src/aiosdnotify/__init__.py
vivienm/python-aiosdnotify
b0fe62bccf55041b00f65d395bea96c0964de9a4
[ "MIT" ]
null
null
null
src/aiosdnotify/__init__.py
vivienm/python-aiosdnotify
b0fe62bccf55041b00f65d395bea96c0964de9a4
[ "MIT" ]
null
null
null
src/aiosdnotify/__init__.py
vivienm/python-aiosdnotify
b0fe62bccf55041b00f65d395bea96c0964de9a4
[ "MIT" ]
null
null
null
import asyncio import logging import os import socket from abc import ABC, abstractmethod from asyncio.events import AbstractEventLoop from typing import Optional, Union logger = logging.getLogger(__name__) __version__ = "0.1.0" class AbstractNotifier(ABC): @abstractmethod async def connect(self) -> None:...
23.111111
68
0.625962
import asyncio import logging import os import socket from abc import ABC, abstractmethod from asyncio.events import AbstractEventLoop from typing import Optional, Union logger = logging.getLogger(__name__) __version__ = "0.1.0" class AbstractNotifier(ABC): @abstractmethod async def connect(self) -> None:...
true
true
1c483537f12b82976dc803943a2780c94717e1c9
2,119
py
Python
flaskapp/utils.py
crockmitnic/question-paper-generator
3f5339226aedd4332c562913945a08cdb45983b0
[ "MIT" ]
6
2020-08-02T20:58:34.000Z
2022-03-23T20:33:20.000Z
flaskapp/utils.py
crockmitnic/question-paper-generator
3f5339226aedd4332c562913945a08cdb45983b0
[ "MIT" ]
209
2020-02-12T17:09:15.000Z
2021-06-03T20:34:35.000Z
flaskapp/utils.py
crockmitnic/question-paper-generator
3f5339226aedd4332c562913945a08cdb45983b0
[ "MIT" ]
54
2020-02-18T14:54:35.000Z
2021-09-05T06:31:12.000Z
import os from enum import Enum from flask import url_for from flask_login import current_user from itsdangerous import URLSafeSerializer json_url = URLSafeSerializer(os.environ.get("SECRET_KEY", "secret_key")) class AbstractEnum(Enum): @classmethod def from_string(cls, value): return cls.__members_...
33.634921
116
0.668712
import os from enum import Enum from flask import url_for from flask_login import current_user from itsdangerous import URLSafeSerializer json_url = URLSafeSerializer(os.environ.get("SECRET_KEY", "secret_key")) class AbstractEnum(Enum): @classmethod def from_string(cls, value): return cls.__members_...
true
true
1c48357c46224c703897df7c26b65ca54e06f218
546
py
Python
layout/serializers/sidebarSubsectionSerializer.py
rankrh/soli
8f19945a175106064591d09a53d07fcbfa26b7da
[ "MIT" ]
null
null
null
layout/serializers/sidebarSubsectionSerializer.py
rankrh/soli
8f19945a175106064591d09a53d07fcbfa26b7da
[ "MIT" ]
null
null
null
layout/serializers/sidebarSubsectionSerializer.py
rankrh/soli
8f19945a175106064591d09a53d07fcbfa26b7da
[ "MIT" ]
2
2019-09-07T15:10:14.000Z
2020-09-04T01:51:19.000Z
from rest_framework import serializers class SidebarSubsectionSerializer(serializers.Serializer): name = serializers.CharField(read_only=True, max_length=32) id = serializers.CharField(read_only=True, max_length=16) icon = serializers.CharField(read_only=True, max_length=32) url = serializers.CharFiel...
42
74
0.776557
from rest_framework import serializers class SidebarSubsectionSerializer(serializers.Serializer): name = serializers.CharField(read_only=True, max_length=32) id = serializers.CharField(read_only=True, max_length=16) icon = serializers.CharField(read_only=True, max_length=32) url = serializers.CharFiel...
true
true
1c4836932fda8321a41ab0f347753291a7915da9
2,595
py
Python
venv/Lib/site-packages/pyrogram/raw/types/input_photo.py
iamgeorgiy/heroku-userbot
5a92417d16f8ead949d88cb38da213fc2da5d3a4
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/pyrogram/raw/types/input_photo.py
iamgeorgiy/heroku-userbot
5a92417d16f8ead949d88cb38da213fc2da5d3a4
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/pyrogram/raw/types/input_photo.py
iamgeorgiy/heroku-userbot
5a92417d16f8ead949d88cb38da213fc2da5d3a4
[ "Apache-2.0" ]
null
null
null
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2020 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram 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...
32.037037
103
0.614644
from io import BytesIO from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector from pyrogram.raw.core import TLObject from pyrogram import raw from typing import List, Union, Any class InputPhoto(TLObject): __slots__: List[str] = ["id", "access_hash", "file_ref...
true
true
1c4836e8d6c54e7d96ea2a3dadcfa5b15943f85b
238
py
Python
ex010.py
Vhassan/Python-Cheatsheet
526f5fcfc8e93d0aca139ca6d8d4f20851ab16f5
[ "MIT" ]
null
null
null
ex010.py
Vhassan/Python-Cheatsheet
526f5fcfc8e93d0aca139ca6d8d4f20851ab16f5
[ "MIT" ]
null
null
null
ex010.py
Vhassan/Python-Cheatsheet
526f5fcfc8e93d0aca139ca6d8d4f20851ab16f5
[ "MIT" ]
null
null
null
#Crie um programa que leia quanto dinheiro uma pessoa tem na carteira e mostre quantos dólares ela pode comprar. real = float(input('quanto vc tem na carteira: R$')) print('A conversão para moeda dolar é : US${:.2f}'.format((real/3.27)))
59.5
112
0.735294
real = float(input('quanto vc tem na carteira: R$')) print('A conversão para moeda dolar é : US${:.2f}'.format((real/3.27)))
true
true
1c4837316def2f2de591b95262f04bd0a307b76b
3,392
py
Python
ExtendedAIModule/rhombus_services/arg_parser.py
Bricktheworld/rhombus-api-examples-python
b4778c3a635786070ee10a3131b1a1f7f6ebac36
[ "MIT" ]
null
null
null
ExtendedAIModule/rhombus_services/arg_parser.py
Bricktheworld/rhombus-api-examples-python
b4778c3a635786070ee10a3131b1a1f7f6ebac36
[ "MIT" ]
20
2021-06-08T22:29:20.000Z
2022-01-15T19:51:46.000Z
ExtendedAIModule/rhombus_services/arg_parser.py
Bricktheworld/rhombus-api-examples-python
b4778c3a635786070ee10a3131b1a1f7f6ebac36
[ "MIT" ]
9
2021-06-08T22:15:35.000Z
2022-03-03T05:19:58.000Z
################################################################################### # Copyright (c) 2021 Rhombus Systems # # # # Permission is hereby granted, free of charge, to any person obtai...
60.571429
199
0.583137
from typing import List import argparse def parse_arguments(argv: List[str]) -> argparse.Namespace: parser = argparse.ArgumentParser(description='Pulls footage from a camera on LAN and stores it to the filesystem.') parser.add_argument('--api_key', '-a', type=str, required=True, help='Rhombus API ...
true
true
1c48374373ae16db6dbcfd16316661e717dab9fc
5,230
py
Python
tests/input/pdf/test_pdf.py
asweeney86/preview-generator
354cbac1c131ebbb81cd9cfd9b4bc0c184d10103
[ "MIT" ]
null
null
null
tests/input/pdf/test_pdf.py
asweeney86/preview-generator
354cbac1c131ebbb81cd9cfd9b4bc0c184d10103
[ "MIT" ]
null
null
null
tests/input/pdf/test_pdf.py
asweeney86/preview-generator
354cbac1c131ebbb81cd9cfd9b4bc0c184d10103
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import re import shutil import typing from PIL import Image from PyPDF2 import PdfFileReader import PyPDF2.utils import pytest from preview_generator.exception import UnavailablePreviewType from preview_generator.manager import PreviewManager from tests import test_utils CURRENT_DI...
39.621212
100
0.759656
import os import re import shutil import typing from PIL import Image from PyPDF2 import PdfFileReader import PyPDF2.utils import pytest from preview_generator.exception import UnavailablePreviewType from preview_generator.manager import PreviewManager from tests import test_utils CURRENT_DIR = os.path.dirname(os.p...
true
true
1c48380c9cbf94328974481e6bfb12901edaac59
4,307
py
Python
tests/app/service/test_sender.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
41
2019-11-28T16:58:41.000Z
2022-01-28T21:11:16.000Z
tests/app/service/test_sender.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
1,083
2019-07-08T12:57:24.000Z
2022-03-08T18:53:40.000Z
tests/app/service/test_sender.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
9
2020-01-24T19:56:43.000Z
2022-01-27T21:36:53.000Z
import pytest from flask import current_app from app.dao.services_dao import dao_add_user_to_service from app.models import EMAIL_TYPE, SMS_TYPE, Notification from app.service.sender import send_notification_to_service_users from tests.app.conftest import notify_service as create_notify_service from tests.app.conftest...
46.311828
110
0.80404
import pytest from flask import current_app from app.dao.services_dao import dao_add_user_to_service from app.models import EMAIL_TYPE, SMS_TYPE, Notification from app.service.sender import send_notification_to_service_users from tests.app.conftest import notify_service as create_notify_service from tests.app.conftest...
true
true
1c48388e6a7603d89677a9f9449e120b5b428b22
15,266
py
Python
Original_Codes/GDL_code-master/models/WGANGP.py
TeaKatz/Generative_Deep_Learning
1f499e482f78b3d1146b24213e5d558226b8fc6e
[ "MIT" ]
2
2021-07-09T16:45:51.000Z
2021-10-30T18:00:06.000Z
models/WGANGP.py
steveive8/Study-Generative-Deep-Learning
f62b9150a5e18240dd22816918f2ce6abf807d58
[ "MIT" ]
10
2020-09-26T01:22:18.000Z
2022-03-12T00:42:42.000Z
models/WGANGP.py
steveive8/Study-Generative-Deep-Learning
f62b9150a5e18240dd22816918f2ce6abf807d58
[ "MIT" ]
null
null
null
from keras.layers import Input, Conv2D, Flatten, Dense, Conv2DTranspose, Reshape, Lambda, Activation, BatchNormalization, LeakyReLU, Dropout, ZeroPadding2D, UpSampling2D from keras.layers.merge import _Merge from keras.models import Model, Sequential from keras import backend as K from keras.optimizers import Adam, R...
35.502326
169
0.60435
from keras.layers import Input, Conv2D, Flatten, Dense, Conv2DTranspose, Reshape, Lambda, Activation, BatchNormalization, LeakyReLU, Dropout, ZeroPadding2D, UpSampling2D from keras.layers.merge import _Merge from keras.models import Model, Sequential from keras import backend as K from keras.optimizers import Adam, R...
true
true
1c4839afde50eb8dd507b972de44d105bb02aea1
1,077
py
Python
tests/application/cms/test_filters.py
AlexKouzy/ethnicity-facts-and-figures-publisher
18ab2495a8633f585e18e607c7f75daa564a053d
[ "MIT" ]
1
2021-10-06T13:48:36.000Z
2021-10-06T13:48:36.000Z
tests/application/cms/test_filters.py
AlexKouzy/ethnicity-facts-and-figures-publisher
18ab2495a8633f585e18e607c7f75daa564a053d
[ "MIT" ]
116
2018-11-02T17:20:47.000Z
2022-02-09T11:06:22.000Z
tests/application/cms/test_filters.py
racedisparityaudit/rd_cms
a12f0e3f5461cc41eed0077ed02e11efafc5dd76
[ "MIT" ]
2
2018-11-09T16:47:35.000Z
2020-04-09T13:06:48.000Z
import pytest from application.cms.filters import index_of_last_initial_zero, yesno class TestYesNo: @pytest.mark.parametrize( "input_value, expected_output", ((True, "yes"), (False, "no"), (1, 1), (0, 0), ("true", "true"), ("false", "false"), ("abc", "abc")), ) def test_yesno_converts_bo...
33.65625
109
0.673166
import pytest from application.cms.filters import index_of_last_initial_zero, yesno class TestYesNo: @pytest.mark.parametrize( "input_value, expected_output", ((True, "yes"), (False, "no"), (1, 1), (0, 0), ("true", "true"), ("false", "false"), ("abc", "abc")), ) def test_yesno_converts_bo...
true
true
1c483aecbbbdbbb994f33b24f66067faffd38da9
17,014
py
Python
modules/templates/CCC/menus.py
himansu1997/eden
1e2cf2b00f55da46b1ce3e6b7ad44b5345d7a1dc
[ "MIT" ]
205
2015-01-20T08:26:09.000Z
2022-03-27T19:59:33.000Z
modules/templates/CCC/menus.py
himansu1997/eden
1e2cf2b00f55da46b1ce3e6b7ad44b5345d7a1dc
[ "MIT" ]
249
2015-02-10T09:56:35.000Z
2022-03-23T19:54:36.000Z
modules/templates/CCC/menus.py
himansu1997/eden
1e2cf2b00f55da46b1ce3e6b7ad44b5345d7a1dc
[ "MIT" ]
231
2015-02-10T09:33:17.000Z
2022-02-18T19:56:05.000Z
# -*- coding: utf-8 -*- from gluon import current, URL #from s3 import IS_ISO639_2_LANGUAGE_CODE from s3layouts import M, MM try: from .layouts import * except ImportError: pass import s3menus as default # ============================================================================= class S3MainMenu(default.S...
43.514066
111
0.401846
from gluon import current, URL from s3layouts import M, MM try: from .layouts import * except ImportError: pass import s3menus as default class S3MainMenu(default.S3MainMenu): @classmethod def menu(cls): main_menu = MM()( cls.menu_modules(), ) ...
true
true
1c483ccf406e95ea8d666dbe860d047dfb31581a
3,024
py
Python
flask/lib/python3.6/site-packages/stem/interpreter/autocomplete.py
JOFLIX/grapevines
34576e01184570d79cc140b42ffb71d322132da6
[ "MIT", "Unlicense" ]
null
null
null
flask/lib/python3.6/site-packages/stem/interpreter/autocomplete.py
JOFLIX/grapevines
34576e01184570d79cc140b42ffb71d322132da6
[ "MIT", "Unlicense" ]
3
2019-07-29T09:47:34.000Z
2019-07-29T09:47:35.000Z
flask/lib/python3.6/site-packages/stem/interpreter/autocomplete.py
JOFLIX/grapevines
34576e01184570d79cc140b42ffb71d322132da6
[ "MIT", "Unlicense" ]
null
null
null
# Copyright 2014-2017, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Tab completion for our interpreter prompt. """ from stem.interpreter import uses_settings try: # added in python 3.2 from functools import lru_cache except ImportError: from stem.util.lru_cache import lru_cach...
26.068966
84
0.680886
from stem.interpreter import uses_settings try: from functools import lru_cache except ImportError: from stem.util.lru_cache import lru_cache @uses_settings def _get_commands(controller, config): commands = config.get('autocomplete', []) if controller is None: return commands results = cont...
true
true
1c483ce4f303e0026de5ff70630090340b35fd96
836
py
Python
backend/tasks.py
ioxio-nexus/mycompany-consent-demo
aefa69375c14dfb345e81aad203db223cec6afe8
[ "BSD-3-Clause" ]
null
null
null
backend/tasks.py
ioxio-nexus/mycompany-consent-demo
aefa69375c14dfb345e81aad203db223cec6afe8
[ "BSD-3-Clause" ]
null
null
null
backend/tasks.py
ioxio-nexus/mycompany-consent-demo
aefa69375c14dfb345e81aad203db223cec6afe8
[ "BSD-3-Clause" ]
null
null
null
from os import environ import uvicorn from invoke import task from uvicorn.supervisors import ChangeReload DEV_ENV = {"FIRESTORE_EMULATOR_HOST": "127.0.0.1:8686"} @task def dev(ctx): environ.update(DEV_ENV) port = environ.get("PORT", 8000) host = "0.0.0.0" # nosec, it's not a mistake config = uvic...
23.885714
88
0.65311
from os import environ import uvicorn from invoke import task from uvicorn.supervisors import ChangeReload DEV_ENV = {"FIRESTORE_EMULATOR_HOST": "127.0.0.1:8686"} @task def dev(ctx): environ.update(DEV_ENV) port = environ.get("PORT", 8000) host = "0.0.0.0" config = uvicorn.Config(app="main:app", h...
true
true
1c483d9e661792fda761dec9b82a4f18dbf7a9aa
1,126
py
Python
tools/trainercard/trainercard.py
stoiandan/OpenPokemonRed
3ce2483d4620255c7fe182012f2821be3121c375
[ "MIT" ]
204
2020-11-04T07:32:28.000Z
2022-01-16T20:39:22.000Z
tools/trainercard/trainercard.py
stoiandan/OpenPokemonRed
3ce2483d4620255c7fe182012f2821be3121c375
[ "MIT" ]
11
2020-10-26T07:53:24.000Z
2021-01-07T19:03:09.000Z
tools/trainercard/trainercard.py
stoiandan/OpenPokemonRed
3ce2483d4620255c7fe182012f2821be3121c375
[ "MIT" ]
14
2020-11-21T22:02:28.000Z
2022-02-15T15:26:55.000Z
import cv2 import os import shutil if os.path.exists("result"): shutil.rmtree("result") os.mkdir("result") # https://www.spriters-resource.com/fullview/8733/ img = cv2.imread("trainercard.png") leader = [ "brock", "misty", "lt_surge", "erika", "koga", "sabrina", "blaine", "giovann...
16.318841
59
0.519538
import cv2 import os import shutil if os.path.exists("result"): shutil.rmtree("result") os.mkdir("result") img = cv2.imread("trainercard.png") leader = [ "brock", "misty", "lt_surge", "erika", "koga", "sabrina", "blaine", "giovanni" ] width = 16 height = 16 face = [ [31, 103...
true
true
1c483dcfb05352b30e44f9812d4f220140dfff77
23,987
py
Python
AgentRun.py
zhangtjtongxue/DL_RL_Zoo
fe8393a941a8c22205b9dc5534f399cf7860f409
[ "Apache-2.0" ]
1
2021-06-08T08:20:31.000Z
2021-06-08T08:20:31.000Z
AgentRun.py
zhangtjtongxue/DL_RL_Zoo
fe8393a941a8c22205b9dc5534f399cf7860f409
[ "Apache-2.0" ]
null
null
null
AgentRun.py
zhangtjtongxue/DL_RL_Zoo
fe8393a941a8c22205b9dc5534f399cf7860f409
[ "Apache-2.0" ]
null
null
null
import os import sys import gym import torch import numpy as np from AgentZoo import Recorder from AgentZoo import BufferArray, initial_exploration """ 2019-07-01 Zen4Jia1Hao2, GitHub: YonV1943 DL_RL_Zoo RL 2019-11-11 Issay-0.0 [Essay Consciousness] 2020-02-02 Issay-0.1 Deep Learning Techniques (spectral norm, Dense...
38.074603
119
0.6614
import os import sys import gym import torch import numpy as np from AgentZoo import Recorder from AgentZoo import BufferArray, initial_exploration class Arguments: def __init__(self, class_agent): self.class_agent = class_agent self.net_dim = 2 ** 7 self.max_step = 2 ** 10 s...
true
true
1c483e974ca788f3d309d21acc49121f28db829a
911
py
Python
searches/double_linear_search_recursion.py
jenia90/Python
696fb4a681ad9e4d84e0d2b894daf449a3e30b24
[ "MIT" ]
145,614
2016-07-21T05:40:05.000Z
2022-03-31T22:17:22.000Z
searches/double_linear_search_recursion.py
Agha-Muqarib/Python
04f156a8973d6156a4357e0717d9eb0aa264d086
[ "MIT" ]
3,987
2016-07-28T17:31:25.000Z
2022-03-30T23:07:46.000Z
searches/double_linear_search_recursion.py
Agha-Muqarib/Python
04f156a8973d6156a4357e0717d9eb0aa264d086
[ "MIT" ]
40,014
2016-07-26T15:14:41.000Z
2022-03-31T22:23:03.000Z
def search(list_data: list, key: int, left: int = 0, right: int = 0) -> int: """ Iterate through the array to find the index of key using recursion. :param list_data: the list to be searched :param key: the key to be searched :param left: the index of first element :param right: the index of las...
25.305556
76
0.567508
def search(list_data: list, key: int, left: int = 0, right: int = 0) -> int: right = right or len(list_data) - 1 if left > right: return -1 elif list_data[left] == key: return left elif list_data[right] == key: return right else: return search(list_data, key, left + 1...
true
true
1c483eda5ea59fd0903c853ecf78214873dd9e96
652
py
Python
qiskit/providers/aer/backends/__init__.py
derivation/qiskit-aer
d8d77270c745e4c31129ce7f816a93e1efc2e743
[ "Apache-2.0" ]
null
null
null
qiskit/providers/aer/backends/__init__.py
derivation/qiskit-aer
d8d77270c745e4c31129ce7f816a93e1efc2e743
[ "Apache-2.0" ]
29
2018-12-19T10:11:00.000Z
2018-12-19T10:16:18.000Z
qiskit/providers/aer/backends/__init__.py
atilag/qiskit-aer
d964795b0a24b1d3287ba2ba2dda45d1dfed4a5d
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
34.315789
77
0.779141
from .qasm_simulator import QasmSimulator from .statevector_simulator import StatevectorSimulator from .unitary_simulator import UnitarySimulator
true
true
1c483f25e50a0b953ab2d539931be326a66b2eb4
18,592
py
Python
src/pyphocorehelpers/gui/Qt/GlobalConnectionManager.py
CommanderPho/pyPhoCoreHelpers
1872cc9779d3ec936077be1df867fc13bc7f177a
[ "MIT" ]
null
null
null
src/pyphocorehelpers/gui/Qt/GlobalConnectionManager.py
CommanderPho/pyPhoCoreHelpers
1872cc9779d3ec936077be1df867fc13bc7f177a
[ "MIT" ]
null
null
null
src/pyphocorehelpers/gui/Qt/GlobalConnectionManager.py
CommanderPho/pyPhoCoreHelpers
1872cc9779d3ec936077be1df867fc13bc7f177a
[ "MIT" ]
null
null
null
# GlobalConnectionManager from indexed import IndexedOrderedDict from qtpy import QtCore, QtWidgets, QtGui """ Requires https://github.com/jazzycamel/PyQt5Singleton.git pip install PyQt5Singleton """ from PyQt5Singleton import Singleton class GlobalConnectionManager(QtCore.QObject, metaclass=Singleton): ""...
49.978495
256
0.701592
from indexed import IndexedOrderedDict from qtpy import QtCore, QtWidgets, QtGui from PyQt5Singleton import Singleton class GlobalConnectionManager(QtCore.QObject, metaclass=Singleton): _currentInstance = None def __init__(self, owning_application: QtWidgets.QApplication, parent=None, **kwargs): ...
true
true
1c484057952e765042ba5f556beae1700c93a132
2,106
py
Python
services/users/project/api/utils/response.py
shwetha-manvinkurke/dx-automator
ec01e51d80c8be8f5dea4669baa25d38256b1052
[ "MIT" ]
14
2018-01-04T22:33:54.000Z
2020-03-04T18:38:34.000Z
services/users/project/api/utils/response.py
shwetha-manvinkurke/dx-automator
ec01e51d80c8be8f5dea4669baa25d38256b1052
[ "MIT" ]
87
2018-01-04T22:15:16.000Z
2022-01-06T14:49:07.000Z
services/users/project/api/utils/response.py
shwetha-manvinkurke/dx-automator
ec01e51d80c8be8f5dea4669baa25d38256b1052
[ "MIT" ]
17
2018-01-04T23:33:48.000Z
2021-11-08T18:39:04.000Z
def response_json_ok(json): """Creates a tuple representing the HTTP package to respond the requisition with the given JSON on its body and status code 200 :param json: object to be sent on HTTP body :return response: tuple representing the HTTP response package """ return _make_json_respons...
36.310345
66
0.731244
def response_json_ok(json): return _make_json_response(json, 200) def response_json_created(json): return _make_json_response(json, 201) def response_json_bad_request(json): return _make_json_response(json, 400) def response_json_unauthorized(json): return _make_json_response(json, 401) def respon...
true
true
1c48412fd41a287281f75f9338ade4cb7bd2bfd1
12,087
py
Python
src/relstorage/cache/tests/test_lru_cffiring.py
enfold/relstorage
9fcd526b537cb6537cc2ae33154b63096550f210
[ "ZPL-2.1" ]
40
2015-10-08T05:35:13.000Z
2022-03-28T23:50:06.000Z
src/relstorage/cache/tests/test_lru_cffiring.py
enfold/relstorage
9fcd526b537cb6537cc2ae33154b63096550f210
[ "ZPL-2.1" ]
364
2015-03-23T15:25:42.000Z
2022-03-17T08:41:34.000Z
src/relstorage/cache/tests/test_lru_cffiring.py
enfold/relstorage
9fcd526b537cb6537cc2ae33154b63096550f210
[ "ZPL-2.1" ]
33
2015-06-08T23:03:22.000Z
2022-03-21T08:25:53.000Z
############################################################################## # # Copyright (c) 2009 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
32.579515
96
0.587822
from __future__ import absolute_import from __future__ import division from __future__ import print_function from hamcrest import assert_that from nti.testing.matchers import validly_provides from relstorage.tests import TestCase from relstorage.cache import interfaces from . import Cache class GenerationTests(Tes...
true
true
1c48417f4536995b8d781890b1514b8e62adaaf0
607
py
Python
apps/static_pages/tests/test_urls.py
ilyukevich/tasks
ba0c8202cfe61d26975c35f388155d36e1c2b856
[ "MIT" ]
null
null
null
apps/static_pages/tests/test_urls.py
ilyukevich/tasks
ba0c8202cfe61d26975c35f388155d36e1c2b856
[ "MIT" ]
null
null
null
apps/static_pages/tests/test_urls.py
ilyukevich/tasks
ba0c8202cfe61d26975c35f388155d36e1c2b856
[ "MIT" ]
null
null
null
from django.test import Client, TestCase class StaticURLTests(TestCase): def setUp(self): self.guest_client = Client() def test_about_url_exists_at_desired_location(self): """Проверка доступности адреса /page/about/.""" response = self.guest_client.get('/page/about/') ...
35.705882
69
0.680395
from django.test import Client, TestCase class StaticURLTests(TestCase): def setUp(self): self.guest_client = Client() def test_about_url_exists_at_desired_location(self): response = self.guest_client.get('/page/about/') self.assertEqual(response.status_code, 200) def ...
true
true
1c4841829620980ad574c246291fe78ff2d81173
5,779
py
Python
projects/mammography_project/integrate_final_result.py
lanhsincheng/detectron2
45ec85c3bde2a39ed4e870b76442021e8da26ede
[ "Apache-2.0" ]
null
null
null
projects/mammography_project/integrate_final_result.py
lanhsincheng/detectron2
45ec85c3bde2a39ed4e870b76442021e8da26ede
[ "Apache-2.0" ]
null
null
null
projects/mammography_project/integrate_final_result.py
lanhsincheng/detectron2
45ec85c3bde2a39ed4e870b76442021e8da26ede
[ "Apache-2.0" ]
null
null
null
from detectron2.utils.visualizer import ColorMode import cv2 import random from detectron2.utils.visualizer import Visualizer from projects.mammography_project.mammo_dataset import * import operator import xlsxwriter import csv wb_name = 'mammo0824_model_0059999' def mammo_integrate(test_dirname, predictor, dataset_me...
38.526667
139
0.607372
from detectron2.utils.visualizer import ColorMode import cv2 import random from detectron2.utils.visualizer import Visualizer from projects.mammography_project.mammo_dataset import * import operator import xlsxwriter import csv wb_name = 'mammo0824_model_0059999' def mammo_integrate(test_dirname, predictor, dataset_me...
true
true
1c4842ccf80b14547a6aafc0838a19e7f6e672cc
4,340
py
Python
src/models/hg_3d.py
DNALuo/3Dposes
c5e2ed5fea612318d7715e239176571f593ccf83
[ "MIT" ]
null
null
null
src/models/hg_3d.py
DNALuo/3Dposes
c5e2ed5fea612318d7715e239176571f593ccf83
[ "MIT" ]
null
null
null
src/models/hg_3d.py
DNALuo/3Dposes
c5e2ed5fea612318d7715e239176571f593ccf83
[ "MIT" ]
null
null
null
from .layers.Residual import Residual import torch.nn as nn import math import ref class Hourglass(nn.Module): def __init__(self, n, nModules, nFeats): super(Hourglass, self).__init__() self.n = n self.nModules = nModules self.nFeats = nFeats _up1_, _low1_, _low2_, _low3_ = [], [...
32.148148
106
0.589862
from .layers.Residual import Residual import torch.nn as nn import math import ref class Hourglass(nn.Module): def __init__(self, n, nModules, nFeats): super(Hourglass, self).__init__() self.n = n self.nModules = nModules self.nFeats = nFeats _up1_, _low1_, _low2_, _low3_ = [], [...
true
true
1c484385a54e0922af6c19242e523fb1932ef401
698
py
Python
src/sadie/airr/airrtable/airrseries.py
jwillis0720/pybody
2d7c68650ac1ef5f3003ccb67171898eac1f63eb
[ "MIT" ]
null
null
null
src/sadie/airr/airrtable/airrseries.py
jwillis0720/pybody
2d7c68650ac1ef5f3003ccb67171898eac1f63eb
[ "MIT" ]
null
null
null
src/sadie/airr/airrtable/airrseries.py
jwillis0720/pybody
2d7c68650ac1ef5f3003ccb67171898eac1f63eb
[ "MIT" ]
null
null
null
from typing import Any import pandas as pd from sadie.airr.models import AirrSeriesModel class AirrSeries(pd.Series): _metadata = ["meta"] # add custom namespaces here def __init__(self, data: Any, copy: bool = False): super(AirrSeries, self).__init__(data=data, copy=copy) if not isinstanc...
29.083333
79
0.659026
from typing import Any import pandas as pd from sadie.airr.models import AirrSeriesModel class AirrSeries(pd.Series): _metadata = ["meta"] def __init__(self, data: Any, copy: bool = False): super(AirrSeries, self).__init__(data=data, copy=copy) if not isinstance(data, pd.core.internals.man...
true
true
1c48461a6c4205aa58ec966c45311939425186de
11,551
py
Python
my_app/blog/models.py
Faisal-Sey/official1
49af7a9fd60c980bd5d4ef7075a4c1f27ecc9642
[ "MIT" ]
1
2021-06-19T00:17:02.000Z
2021-06-19T00:17:02.000Z
my_app/blog/models.py
Faisal-Sey/official1
49af7a9fd60c980bd5d4ef7075a4c1f27ecc9642
[ "MIT" ]
null
null
null
my_app/blog/models.py
Faisal-Sey/official1
49af7a9fd60c980bd5d4ef7075a4c1f27ecc9642
[ "MIT" ]
null
null
null
from django.db import models from django.shortcuts import reverse, get_object_or_404 from django.conf import settings from django_countries.fields import CountryField # Create your models here. class UserDb(models.Model): Name = models.CharField(max_length=30) Email = models.EmailField(max_length=200) Mes...
27.372038
107
0.65293
from django.db import models from django.shortcuts import reverse, get_object_or_404 from django.conf import settings from django_countries.fields import CountryField class UserDb(models.Model): Name = models.CharField(max_length=30) Email = models.EmailField(max_length=200) Message = models.CharField(max...
true
true
1c4846dac0af0ccb197b9ac571341196be451a99
619
py
Python
molecule/tang/tests/test_creation.py
stackhpc/ansible-role-luks
8c4b5f472ab0aef3d2a776d4fcd37ca17c6eac05
[ "Apache-1.1" ]
3
2020-04-14T19:57:25.000Z
2021-01-11T09:09:16.000Z
molecule/tang/tests/test_creation.py
stackhpc/ansible-role-luks
8c4b5f472ab0aef3d2a776d4fcd37ca17c6eac05
[ "Apache-1.1" ]
4
2020-08-12T10:24:25.000Z
2022-01-17T17:48:28.000Z
molecule/tang/tests/test_creation.py
stackhpc/ansible-role-luks
8c4b5f472ab0aef3d2a776d4fcd37ca17c6eac05
[ "Apache-1.1" ]
2
2021-06-17T21:57:42.000Z
2022-02-20T08:02:43.000Z
import os import pytest import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_crypto_devices(host): f = host.file('/dev/mapper/cryptotest') assert f.exists def test_key_files_exist(host): ...
22.925926
63
0.723748
import os import pytest import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_crypto_devices(host): f = host.file('/dev/mapper/cryptotest') assert f.exists def test_key_files_exist(host): ...
true
true
1c48470b6af2b5dacfff0ceab70a8a5b3cef97d3
23,230
py
Python
tools/imagenet-tfrecords-builder/build_dataset.py
isabella232/heldout-influence-estimation
634527bf7ca6630e6fe66867347747e2e04bc780
[ "Apache-2.0" ]
43
2020-09-11T23:40:16.000Z
2022-03-10T02:14:32.000Z
tools/imagenet-tfrecords-builder/build_dataset.py
google-research/heldout-influence-estimation
634527bf7ca6630e6fe66867347747e2e04bc780
[ "Apache-2.0" ]
1
2022-01-16T13:01:16.000Z
2022-01-16T13:01:16.000Z
tools/imagenet-tfrecords-builder/build_dataset.py
isabella232/heldout-influence-estimation
634527bf7ca6630e6fe66867347747e2e04bc780
[ "Apache-2.0" ]
5
2020-11-16T10:34:08.000Z
2022-03-20T04:42:39.000Z
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
39.845626
101
0.69957
from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime import os import random import sys import threading import numpy as np from six.moves import xrange import tensorflow as tf import absl absl.flags.DEFINE_string('train_directo...
true
true
1c484798429c47a0c48e129b17f74d46202aa650
625
py
Python
ssr-top/ssr_monitor.py
BooAA/SSR
6f976dc30a975544cd111806ed6ffc5a760d2836
[ "BSD-3-Clause" ]
1
2021-10-03T11:56:32.000Z
2021-10-03T11:56:32.000Z
ssr-top/ssr_monitor.py
BooAA/SSR
6f976dc30a975544cd111806ed6ffc5a760d2836
[ "BSD-3-Clause" ]
null
null
null
ssr-top/ssr_monitor.py
BooAA/SSR
6f976dc30a975544cd111806ed6ffc5a760d2836
[ "BSD-3-Clause" ]
null
null
null
import os class ssr_monitor: ssr_path = "" def __init__(self, path = '/sys/kernel/rdma_rxe') -> None: self.ssr_path = path def get_qp_list(self) -> list: return os.listdir(self.ssr_path) def get_qp_counters(self, qpn) -> dict: qp_dir_path = os.path.join(self.ssr_path, str(qp...
25
70
0.5344
import os class ssr_monitor: ssr_path = "" def __init__(self, path = '/sys/kernel/rdma_rxe') -> None: self.ssr_path = path def get_qp_list(self) -> list: return os.listdir(self.ssr_path) def get_qp_counters(self, qpn) -> dict: qp_dir_path = os.path.join(self.ssr_path, str(qp...
true
true
1c484836cd45e3a21df1132cbfa29ac7fe759213
16,530
py
Python
intersight/model/appliance_data_export_policy.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/appliance_data_export_policy.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/appliance_data_export_policy.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
53.495146
1,678
0.642105
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
1c4848c1f29b4b4d5d33da873e06fe8c0aa82152
2,834
py
Python
src/python/pants/backend/codegen/wire/java/java_wire_library.py
lahosken/pants
1b0340987c9b2eab9411416803c75b80736716e4
[ "Apache-2.0" ]
1
2021-11-11T14:04:24.000Z
2021-11-11T14:04:24.000Z
src/python/pants/backend/codegen/wire/java/java_wire_library.py
lahosken/pants
1b0340987c9b2eab9411416803c75b80736716e4
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/codegen/wire/java/java_wire_library.py
lahosken/pants
1b0340987c9b2eab9411416803c75b80736716e4
[ "Apache-2.0" ]
1
2021-11-11T14:04:12.000Z
2021-11-11T14:04:12.000Z
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from...
39.915493
102
0.717713
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from pants.backend.jvm.targets.exportable_jvm_library import ExportableJvmLibrary from pants.base.exceptions import TargetDefinitionException from pan...
true
true
1c4848ec3d5e9913f64fb0a43e2ba992978ad91b
5,150
py
Python
tools/error.py
Alex-Au1/Haku_Bot
87cc1813546797eec0f4760fafa76ce65a387a1d
[ "MIT" ]
null
null
null
tools/error.py
Alex-Au1/Haku_Bot
87cc1813546797eec0f4760fafa76ce65a387a1d
[ "MIT" ]
null
null
null
tools/error.py
Alex-Au1/Haku_Bot
87cc1813546797eec0f4760fafa76ce65a387a1d
[ "MIT" ]
null
null
null
import discord import copy from tools.embed import Embed, EmbededMessage from tools.string import StringTools import tools.members as Members from typing import Optional # Err_Embed: A template for embeding errors and warnings class Err_Embed(): def __init__(self, title, description): self.title = title ...
57.222222
236
0.65767
import discord import copy from tools.embed import Embed, EmbededMessage from tools.string import StringTools import tools.members as Members from typing import Optional class Err_Embed(): def __init__(self, title, description): self.title = title self.description = description errors = {1: Err...
true
true
1c484939ae60c601405bced057c4dedd90dff5c0
772
py
Python
lessons/best-practices/boulder_dem.py
csdms/ivy
862fc8bafa665864ceae25c4ead9e376ffe175cb
[ "CC-BY-4.0" ]
null
null
null
lessons/best-practices/boulder_dem.py
csdms/ivy
862fc8bafa665864ceae25c4ead9e376ffe175cb
[ "CC-BY-4.0" ]
1
2022-03-30T18:18:50.000Z
2022-03-30T18:18:50.000Z
lessons/best-practices/boulder_dem.py
csdms/ivy
862fc8bafa665864ceae25c4ead9e376ffe175cb
[ "CC-BY-4.0" ]
null
null
null
"""An example of reading topographical data from a file and displaying it.""" import pandas as pd import matplotlib.pyplot as plt topo_file = "../../data/topo.asc" def read(): try: topo = pd.read_csv(topo_file, header=None) except IOError: print("IOError: file '{}' cannot be read".format(to...
21.444444
77
0.619171
import pandas as pd import matplotlib.pyplot as plt topo_file = "../../data/topo.asc" def read(): try: topo = pd.read_csv(topo_file, header=None) except IOError: print("IOError: file '{}' cannot be read".format(topo_file)) else: return topo def display(data, show=False, outfil...
true
true
1c48496a2fcea3d1c774c8ee9daba45438f2e15a
166
py
Python
logging_middleware/checks.py
fearsd/django-logging-middleware
6eb95774c1bcb1829aa1a94223d9e2c39217d8f9
[ "MIT" ]
4
2021-04-08T14:14:04.000Z
2021-09-08T07:57:38.000Z
logging_middleware/checks.py
fearsd/django-logging-middleware
6eb95774c1bcb1829aa1a94223d9e2c39217d8f9
[ "MIT" ]
null
null
null
logging_middleware/checks.py
fearsd/django-logging-middleware
6eb95774c1bcb1829aa1a94223d9e2c39217d8f9
[ "MIT" ]
null
null
null
# from django.conf import settings from django.core import checks @checks.register def check_settings(app_configs, **kwargs): # temporary solution return []
20.75
42
0.753012
from django.core import checks @checks.register def check_settings(app_configs, **kwargs): return []
true
true
1c484a7d6852dd81d7c8ee92a960b16a3012a4e2
1,341
py
Python
backend/src/ml_models/context.py
lukemiloszewski/ml-models
826ab6c0adebe851e73b9e883af8abccfaebdacb
[ "MIT" ]
null
null
null
backend/src/ml_models/context.py
lukemiloszewski/ml-models
826ab6c0adebe851e73b9e883af8abccfaebdacb
[ "MIT" ]
16
2022-02-21T19:27:42.000Z
2022-03-31T01:47:33.000Z
backend/src/ml_models/context.py
lukemiloszewski/ml-models
826ab6c0adebe851e73b9e883af8abccfaebdacb
[ "MIT" ]
null
null
null
from __future__ import annotations from pathlib import Path from typing import Any, Dict, Optional from ml_models.clients.mnist_client import MNISTClient _CONTEXT: Optional[Context] = None class Attributes: def __init__(self, attributes_dict: Dict[str, Any]) -> None: self._attributes_dict = attributes_...
27.367347
118
0.706189
from __future__ import annotations from pathlib import Path from typing import Any, Dict, Optional from ml_models.clients.mnist_client import MNISTClient _CONTEXT: Optional[Context] = None class Attributes: def __init__(self, attributes_dict: Dict[str, Any]) -> None: self._attributes_dict = attributes_...
true
true
1c484c826f55f41d4e0d2c5b6336352e83d80519
2,571
py
Python
preprocessors/rcv1v2_data.py
laddie132/LW-PT
28b469ba68a5d4fba68b992cff5372e63ec2ed42
[ "MIT" ]
9
2020-08-20T18:15:43.000Z
2022-02-10T02:54:30.000Z
preprocessors/rcv1v2_data.py
laddie132/LW-PT
28b469ba68a5d4fba68b992cff5372e63ec2ed42
[ "MIT" ]
1
2021-11-19T01:29:47.000Z
2021-11-19T09:58:38.000Z
preprocessors/rcv1v2_data.py
laddie132/LW-PT
28b469ba68a5d4fba68b992cff5372e63ec2ed42
[ "MIT" ]
3
2021-05-29T02:11:34.000Z
2021-12-14T15:43:22.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "Han" __email__ = "liuhan132@foxmail.com" import os import logging from .base import BaseDataset logger = logging.getLogger(__name__) class RCV1V2(BaseDataset): """ RCV1-V2 dataset """ def __init__(self, data_path, random_seed): su...
38.373134
88
0.492804
__author__ = "Han" __email__ = "liuhan132@foxmail.com" import os import logging from .base import BaseDataset logger = logging.getLogger(__name__) class RCV1V2(BaseDataset): def __init__(self, data_path, random_seed): super(RCV1V2, self).__init__(h5_path='data/rcv1v2.h5', ...
true
true
1c484d2322cae0bb96e69cc698013819ab7ee299
3,346
py
Python
PyWidget3/shape/__init__.py
galaxyjim/PyWidget3
eb3d269e4e7d8a68ca957d32bc704e31eca20015
[ "BSD-3-Clause" ]
null
null
null
PyWidget3/shape/__init__.py
galaxyjim/PyWidget3
eb3d269e4e7d8a68ca957d32bc704e31eca20015
[ "BSD-3-Clause" ]
23
2015-03-14T00:03:11.000Z
2015-04-10T23:24:21.000Z
PyWidget3/shape/__init__.py
galaxyjim/PyWidget3
eb3d269e4e7d8a68ca957d32bc704e31eca20015
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # Copyright (c) 2009 Nicolas Rougier # Copyright (c) 2015 James Gaston # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitt...
34.854167
80
0.698745
__docformat__ = 'restructuredtext' __version__ = '1.0' from .rectangle import Rectangle from .triangle import Triangle from .ellipse import Ellipse from .cross import Cross from .star import Star
true
true
1c484dccfdcbf952d46374d4d53d3daed255caa8
48
py
Python
samcli/__init__.py
rawhideron/mav_0122
3f8b92347087f94ec76667dbb2f647937725660d
[ "BSD-2-Clause", "Apache-2.0" ]
1
2021-07-10T14:19:00.000Z
2021-07-10T14:19:00.000Z
samcli/__init__.py
QPC-database/aws-sam-cli
59c85768356089edb265c2ea7f53bce2412f9e19
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
samcli/__init__.py
QPC-database/aws-sam-cli
59c85768356089edb265c2ea7f53bce2412f9e19
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
""" SAM CLI version """ __version__ = "1.26.0"
8
22
0.583333
__version__ = "1.26.0"
true
true
1c484f70ffaacf4cb7ed13a8f996d67a217a2f85
1,558
py
Python
user_main.py
s-jun/OSS_Term_Project
47747a92944f7f94f1393c9072f7ee9034de090a
[ "MIT" ]
null
null
null
user_main.py
s-jun/OSS_Term_Project
47747a92944f7f94f1393c9072f7ee9034de090a
[ "MIT" ]
null
null
null
user_main.py
s-jun/OSS_Term_Project
47747a92944f7f94f1393c9072f7ee9034de090a
[ "MIT" ]
null
null
null
import sys from PyQt5.QtWidgets import * from PyQt5 import uic import matplotlib.pyplot as plt from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas import chart from data_manager import read_predict form_class = uic.loadUiType("user.ui")[0] class WindowClass(QMainWindow, form_class): d...
27.333333
80
0.616175
import sys from PyQt5.QtWidgets import * from PyQt5 import uic import matplotlib.pyplot as plt from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas import chart from data_manager import read_predict form_class = uic.loadUiType("user.ui")[0] class WindowClass(QMainWindow, form_class): d...
true
true
1c484f734e415132256c335e128e6abcf0544a59
13,032
py
Python
tests/generator/test_compression.py
randywessels/tad-blockchain
08a5f9565aa27f211350717d5e8cda14b46359e4
[ "Apache-2.0" ]
null
null
null
tests/generator/test_compression.py
randywessels/tad-blockchain
08a5f9565aa27f211350717d5e8cda14b46359e4
[ "Apache-2.0" ]
null
null
null
tests/generator/test_compression.py
randywessels/tad-blockchain
08a5f9565aa27f211350717d5e8cda14b46359e4
[ "Apache-2.0" ]
null
null
null
# flake8: noqa: F501 from dataclasses import dataclass from typing import List, Any from unittest import TestCase from tad.full_node.bundle_tools import ( bundle_suitable_for_compression, compressed_coin_solution_entry_list, compressed_spend_bundle_solution, match_standard_transaction_at_any_index, ...
44.176271
792
0.73872
from dataclasses import dataclass from typing import List, Any from unittest import TestCase from tad.full_node.bundle_tools import ( bundle_suitable_for_compression, compressed_coin_solution_entry_list, compressed_spend_bundle_solution, match_standard_transaction_at_any_index, simple_solution_gene...
true
true
1c484fa08fc49e2469b08d94e3f89720e8e00a3f
4,022
py
Python
utils/extra/common.py
ekojs/mitra
9c2458b7bf83af4a7e56b0e227f07454d99298e1
[ "MIT" ]
null
null
null
utils/extra/common.py
ekojs/mitra
9c2458b7bf83af4a7e56b0e227f07454d99298e1
[ "MIT" ]
null
null
null
utils/extra/common.py
ekojs/mitra
9c2458b7bf83af4a7e56b0e227f07454d99298e1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # common functions # Ange Albertini 2020 import random import re from string import punctuation, digits, ascii_letters def randblock(l): return bytes([random.randrange(255) for i in range(l)]) # Cosmetic functions ########################################################### ASCII = (punctu...
19.812808
98
0.598707
import random import re from string import punctuation, digits, ascii_letters def randblock(l): return bytes([random.randrange(255) for i in range(l)]) ASCII = (punctuation + digits + ascii_letters + " ").encode() def hexii(c): if c == b"\0": return b" " if c in ASCII: return b" " + bytes([c]) if c =...
true
true
1c484fc0efb0612c2fdd4194aa295cc755d295d9
6,922
py
Python
pyrsss/signal/spectrum.py
grawe/pyrsss
31fd88734b00f814e7aaa5829c4ac49c7bf53563
[ "MIT" ]
null
null
null
pyrsss/signal/spectrum.py
grawe/pyrsss
31fd88734b00f814e7aaa5829c4ac49c7bf53563
[ "MIT" ]
null
null
null
pyrsss/signal/spectrum.py
grawe/pyrsss
31fd88734b00f814e7aaa5829c4ac49c7bf53563
[ "MIT" ]
null
null
null
from __future__ import division import math import numpy as NP import scipy.signal def rect(t, a): """ Return a vector of the same length as $t$ that is equal to 1 for absolute values of $t$ less than $a$/2 and 0 otherwise. """ x = NP.zeros_like(t) x[NP.abs(t) < a/2] = 1 x[NP.abs(t) == a...
31.463636
80
0.545652
from __future__ import division import math import numpy as NP import scipy.signal def rect(t, a): x = NP.zeros_like(t) x[NP.abs(t) < a/2] = 1 x[NP.abs(t) == a/2] = 1/2 return x def nextpow2(N): return 2**int(math.ceil(math.log(N, 2))) def spectrum(x, n0=0, T_s=1, ...
true
true
1c485046ce096457e354bad1db4cbc7a66d76bb5
2,862
py
Python
awardsApp/api.py
MutuaFranklin/App-Awards
020c85db144156ec02f12815cd675245d4ad9db3
[ "MIT" ]
null
null
null
awardsApp/api.py
MutuaFranklin/App-Awards
020c85db144156ec02f12815cd675245d4ad9db3
[ "MIT" ]
null
null
null
awardsApp/api.py
MutuaFranklin/App-Awards
020c85db144156ec02f12815cd675245d4ad9db3
[ "MIT" ]
null
null
null
from django.http import JsonResponse from django.http import HttpResponse, Http404,HttpResponseRedirect from .permissions import IsAdminOrReadOnly from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from profiles.models import Pro...
30.774194
83
0.710342
from django.http import JsonResponse from django.http import HttpResponse, Http404,HttpResponseRedirect from .permissions import IsAdminOrReadOnly from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from profiles.models import Pro...
true
true
1c48504c2a6e00bf9546d691cb3602dd96353db6
193
py
Python
language/equivalence/formation.py
jedhsu/language
3772a4a0ff287e1fc5ebefc716b8d91928d04c72
[ "MIT" ]
null
null
null
language/equivalence/formation.py
jedhsu/language
3772a4a0ff287e1fc5ebefc716b8d91928d04c72
[ "MIT" ]
null
null
null
language/equivalence/formation.py
jedhsu/language
3772a4a0ff287e1fc5ebefc716b8d91928d04c72
[ "MIT" ]
null
null
null
""" *Product Formation* A, B: Type _proves_ A x B: Type "The prevalence of products of types concides with the prevalence of cartesian products in categories." (Corfield 40) """
21.444444
64
0.689119
true
true
1c48511bdf2bd0df09a51e286757ce2441bb1185
441
py
Python
pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/ospf.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/ospf.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/ops-pkg/src/genie/libs/ops/ospf/iosxe/yang/ospf.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
from genie.ops.base import Context from genie.libs.ops.ospf.iosxe.ospf import Ospf as b_ospf from genie.libs.parser.iosxe import show_ospf class Ospf(b_ospf): '''Ospf Ops Object''' # To keep short names def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.context_man...
33.923077
78
0.705215
from genie.ops.base import Context from genie.libs.ops.ospf.iosxe.ospf import Ospf as b_ospf from genie.libs.parser.iosxe import show_ospf class Ospf(b_ospf): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.context_manager[show_ospf.ShowIpOspf] = Context.yang ...
true
true
1c48511d9b3288b699faa35bf674bb9a5336cf68
1,995
py
Python
Code/test-PSO.py
gitFloyd/AAI-Project-2
c6bb4d389248c3385e58a0c399343322a6dd887f
[ "MIT" ]
null
null
null
Code/test-PSO.py
gitFloyd/AAI-Project-2
c6bb4d389248c3385e58a0c399343322a6dd887f
[ "MIT" ]
null
null
null
Code/test-PSO.py
gitFloyd/AAI-Project-2
c6bb4d389248c3385e58a0c399343322a6dd887f
[ "MIT" ]
null
null
null
import random #random.seed(111) import PSO import Model import Dataset as DS from Log import Log Dataset = DS.Dataset Pistachio = DS.Pistachio Layer = Model.Layer DenseLayer = Model.DenseLayer SparseLayer = Model.SparseLayer FMLayer = Model.FuzzyMembershipLayer InputLayer = Model.InputLayer # particles...
27.328767
137
0.663659
import random import PSO import Model import Dataset as DS from Log import Log Dataset = DS.Dataset Pistachio = DS.Pistachio Layer = Model.Layer DenseLayer = Model.DenseLayer SparseLayer = Model.SparseLayer FMLayer = Model.FuzzyMembershipLayer InputLayer = Model.InputLayer pistachios = Pistachio(Dat...
true
true
1c4852d27622febf8afb7626b16291be56d91b72
2,894
py
Python
vimcc.py
joas77/vim-winccoa
46c84244e5bf6679e7ef00aaf814bcfdedb596b6
[ "MIT" ]
2
2021-03-12T04:48:48.000Z
2021-09-27T15:09:33.000Z
vimcc.py
joas77/vim-winccoa
46c84244e5bf6679e7ef00aaf814bcfdedb596b6
[ "MIT" ]
null
null
null
vimcc.py
joas77/vim-winccoa
46c84244e5bf6679e7ef00aaf814bcfdedb596b6
[ "MIT" ]
1
2021-04-15T18:13:50.000Z
2021-04-15T18:13:50.000Z
#!/usr/bin/env python3 import sys import os import configparser import shutil import subprocess def find_project_config_file(directory, max_levels = 5): if max_levels == 0 or directory == "/" or directory == "": return None #Config file not found fileName = os.path.join(directory, "config/config") ...
32.516854
93
0.666551
import sys import os import configparser import shutil import subprocess def find_project_config_file(directory, max_levels = 5): if max_levels == 0 or directory == "/" or directory == "": return None fileName = os.path.join(directory, "config/config") if os.path.isfile(fileName): return...
true
true
1c48532d9b777c913fbc3fc8cf4210092c8650ef
101
py
Python
other/exawizards2019_b.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
other/exawizards2019_b.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
other/exawizards2019_b.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
n = int(input()) s = input() if s.count('R') > s.count('B'): print('Yes') else: print('No')
12.625
31
0.49505
n = int(input()) s = input() if s.count('R') > s.count('B'): print('Yes') else: print('No')
true
true
1c48542a1c9ecd55c6e00af6037038147a68539f
59,704
py
Python
sklearn/decomposition/_dict_learning.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
1
2021-05-25T18:06:44.000Z
2021-05-25T18:06:44.000Z
sklearn/decomposition/_dict_learning.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
null
null
null
sklearn/decomposition/_dict_learning.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
null
null
null
""" Dictionary learning. """ # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD 3 clause import time import sys import itertools import warnings from math import ceil import numpy as np from scipy import linalg from joblib import Parallel, effective_n_jobs from ..base import BaseEstimator, Tr...
36.228155
79
0.62222
import time import sys import itertools import warnings from math import ceil import numpy as np from scipy import linalg from joblib import Parallel, effective_n_jobs from ..base import BaseEstimator, TransformerMixin from ..utils import deprecated from ..utils import (check_array, check_random_state, gen_even_sli...
true
true
1c485451846b20e51102909630e63adf8b06d286
366
py
Python
UchuujinPatcher/patch_eboot.py
colebob9/UchuujinPatcher
1f5880240e7b3da329d4c8334fc23df92eece402
[ "MIT" ]
null
null
null
UchuujinPatcher/patch_eboot.py
colebob9/UchuujinPatcher
1f5880240e7b3da329d4c8334fc23df92eece402
[ "MIT" ]
null
null
null
UchuujinPatcher/patch_eboot.py
colebob9/UchuujinPatcher
1f5880240e7b3da329d4c8334fc23df92eece402
[ "MIT" ]
null
null
null
# https://pypi.org/project/bsdiff4/ # Use bsdiff and eboot patch in main repo # Needs wheel and VC++ 2015 v140 toolset (choco install vcbuildtools) # on Windows, look into Linux / Docker import bsdiff4 bsdiff4.file_patch("isofiles/EBOOT.BIN", "isofiles/EBOOT_patched.BIN", "mai...
26.142857
69
0.63388
import bsdiff4 bsdiff4.file_patch("isofiles/EBOOT.BIN", "isofiles/EBOOT_patched.BIN", "main_repo/EBOOT.BIN.patch" )
true
true
1c485455fea34089e7998b97dab5da52c8ae328a
493
py
Python
queries/q5.py
csruiliu/tpch-pyspark
ec707ddd8a5e917b08e0ee1ce320b826fa6aa977
[ "MIT" ]
null
null
null
queries/q5.py
csruiliu/tpch-pyspark
ec707ddd8a5e917b08e0ee1ce320b826fa6aa977
[ "MIT" ]
null
null
null
queries/q5.py
csruiliu/tpch-pyspark
ec707ddd8a5e917b08e0ee1ce320b826fa6aa977
[ "MIT" ]
null
null
null
query = """ SELECT N_NAME, sum(L_EXTENDEDPRICE * (1 - L_DISCOUNT)) AS REVENUE FROM customer, orders, lineitem, supplier, nation, region WHERE C_CUSTKEY = O_CUSTKEY AND L_ORDERKEY = O_ORDERKEY AND L_SUPPKEY = S_SUPPKEY AND C_NATIONKEY = S_NATIONKEY AND S_NATIONKEY = N_NATIONKEY ...
22.409091
59
0.6714
query = """ SELECT N_NAME, sum(L_EXTENDEDPRICE * (1 - L_DISCOUNT)) AS REVENUE FROM customer, orders, lineitem, supplier, nation, region WHERE C_CUSTKEY = O_CUSTKEY AND L_ORDERKEY = O_ORDERKEY AND L_SUPPKEY = S_SUPPKEY AND C_NATIONKEY = S_NATIONKEY AND S_NATIONKEY = N_NATIONKEY ...
true
true
1c48545cf2834159a424d70b7811f00db3a47e6c
3,089
py
Python
bassl/pretrain/utils/metric.py
kakaobrain/bassl
551fe94343debf60a64c787be6752284153a0f7a
[ "Apache-2.0" ]
55
2022-01-17T02:18:40.000Z
2022-03-25T08:24:28.000Z
bassl/pretrain/utils/metric.py
kakaobrain/bassl
551fe94343debf60a64c787be6752284153a0f7a
[ "Apache-2.0" ]
5
2022-01-18T01:59:49.000Z
2022-03-24T00:20:35.000Z
bassl/pretrain/utils/metric.py
kakaobrain/bassl
551fe94343debf60a64c787be6752284153a0f7a
[ "Apache-2.0" ]
1
2022-01-23T10:50:15.000Z
2022-01-23T10:50:15.000Z
""" - kNN Precision """ from collections import defaultdict import torch import torchmetrics class KnnPrecisionMetric(torchmetrics.Metric): def __init__(self, top_k_list): super().__init__(compute_on_step=False, dist_sync_on_step=True) self.add_state("feat_data", default=[], dist_reduce_fx=None)...
39.602564
88
0.583684
from collections import defaultdict import torch import torchmetrics class KnnPrecisionMetric(torchmetrics.Metric): def __init__(self, top_k_list): super().__init__(compute_on_step=False, dist_sync_on_step=True) self.add_state("feat_data", default=[], dist_reduce_fx=None) self.add_state(...
true
true
1c48545f0baaba0b798a29f73f40c45f2e843e2d
29,175
py
Python
venv/lib/python3.8/site-packages/mpl_toolkits/axes_grid1/axes_divider.py
willBear/willBear-Fundamental_Analysis
bc67eb1e69dcf6765c0b77314d37f7f165a7318f
[ "MIT" ]
15
2020-06-29T08:33:39.000Z
2022-02-12T00:28:51.000Z
venv/lib/python3.8/site-packages/mpl_toolkits/axes_grid1/axes_divider.py
willBear/willBear-Fundamental_Analysis
bc67eb1e69dcf6765c0b77314d37f7f165a7318f
[ "MIT" ]
30
2020-04-15T19:37:40.000Z
2020-04-22T21:19:35.000Z
venv/lib/python3.8/site-packages/mpl_toolkits/axes_grid1/axes_divider.py
willBear/willBear-Fundamental_Analysis
bc67eb1e69dcf6765c0b77314d37f7f165a7318f
[ "MIT" ]
11
2019-01-21T17:51:48.000Z
2021-08-10T07:04:33.000Z
""" The axes_divider module provides helper classes to adjust the positions of multiple axes at drawing time. Divider: this is the class that is used to calculate the axes position. It divides the given rectangular area into several sub rectangles. You initialize the divider by setting the horizontal and ...
33.650519
79
0.55078
from matplotlib import cbook from matplotlib.axes import SubplotBase from matplotlib.gridspec import SubplotSpec, GridSpec import matplotlib.transforms as mtransforms from . import axes_size as Size class Divider: def __init__(self, fig, pos, horizontal, vertical, aspect=None, anchor="C"): ...
true
true
1c4854884ba21127c83dd2876aef95bd6d1e9f13
1,785
py
Python
data/p4VQE/R4/benchmark/startCirq672.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startCirq672.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startCirq672.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=12 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode from cirq.contrib.svg import SVGCircuit # Symbols for...
28.333333
77
0.696359
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np from cirq.contrib.svg import SVGCircuit def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.CNOT.on(input_qubit[3],input_qubit[0...
true
true
1c4856012f6f123905c3fbdfe922f2752e1467ef
3,974
py
Python
ProjectEuler/Problems_051_100/P070_TotientPermutation.py
mqq-marek/ProjectEuler
3a865b32a655c5ba39bf58a4cb96cef0ffeccbbd
[ "MIT" ]
null
null
null
ProjectEuler/Problems_051_100/P070_TotientPermutation.py
mqq-marek/ProjectEuler
3a865b32a655c5ba39bf58a4cb96cef0ffeccbbd
[ "MIT" ]
null
null
null
ProjectEuler/Problems_051_100/P070_TotientPermutation.py
mqq-marek/ProjectEuler
3a865b32a655c5ba39bf58a4cb96cef0ffeccbbd
[ "MIT" ]
null
null
null
""" Euler's Totient function, phi(n), is used to determine the number of positive numbers less than or equal to n which are relatively prime to n. For example, as 1, 2, 4, 5, 7, and 8, are all less than nine and relatively prime to nine, phi(9)=6. The number 1 is considered to be relatively prime to every positive n...
26.671141
117
0.530448
import time from bisect import bisect_right from fractions import Fraction import math from collections import Counter from typing import Iterator def eratosthenes_sieve(n): def add_prime(k): p = k + k + 3 primes.append(p) pos = k + p while pos <= n: numbers[pos] = 1 ...
true
true
1c4857b3876c7f9d4b85021c0fe07b0789cd8808
842
py
Python
sls_api/scripts/reset_user_projects.py
slsfi/sls_gde_api
68c6342cc3af95d9cf5b87cf096fc03b7fd5e67d
[ "Apache-2.0" ]
null
null
null
sls_api/scripts/reset_user_projects.py
slsfi/sls_gde_api
68c6342cc3af95d9cf5b87cf096fc03b7fd5e67d
[ "Apache-2.0" ]
null
null
null
sls_api/scripts/reset_user_projects.py
slsfi/sls_gde_api
68c6342cc3af95d9cf5b87cf096fc03b7fd5e67d
[ "Apache-2.0" ]
null
null
null
import argparse import sys from sls_api.models import User from sls_api import app if __name__ == "__main__": with app.app_context(): parser = argparse.ArgumentParser(description="Helper script to reset a Users projects") parser.add_argument("email", help="User email address") parser.add_a...
33.68
95
0.640143
import argparse import sys from sls_api.models import User from sls_api import app if __name__ == "__main__": with app.app_context(): parser = argparse.ArgumentParser(description="Helper script to reset a Users projects") parser.add_argument("email", help="User email address") parser.add_a...
true
true
1c48585dd10eb78791eb0b974d23a9c5313b1493
3,340
py
Python
producerapril19/boto3/__init__.py
drwitt/AWS-lambda-NLP-project-4
a1cdcaee5cb8679bb86a25811e8323abd40fffcf
[ "Apache-2.0" ]
null
null
null
producerapril19/boto3/__init__.py
drwitt/AWS-lambda-NLP-project-4
a1cdcaee5cb8679bb86a25811e8323abd40fffcf
[ "Apache-2.0" ]
9
2021-03-19T03:06:53.000Z
2022-03-12T00:37:04.000Z
myvenv/lib/python3.6/site-packages/boto3/__init__.py
yog240597/saleor
b75a23827a4ec2ce91637f0afe6808c9d09da00a
[ "CC-BY-4.0" ]
1
2021-04-06T15:08:09.000Z
2021-04-06T15:08:09.000Z
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
30.09009
81
0.703593
import logging from boto3.session import Session __author__ = 'Amazon Web Services' __version__ = '1.12.42' DEFAULT_SESSION = None def setup_default_session(**kwargs): global DEFAULT_SESSION DEFAULT_SESSION = Session(**kwargs) def set_stream_logger(name='boto3', level=logging.DEBUG, format_string=None...
true
true
1c48586d5ac96b2e1374dcfec7c9d9e588473c51
3,235
py
Python
shcomplete/shell_scraper/settings.py
gy741/shell-complete
20ad82eb45015a79afc734f4cce2201b5fba3785
[ "Apache-2.0" ]
null
null
null
shcomplete/shell_scraper/settings.py
gy741/shell-complete
20ad82eb45015a79afc734f4cce2201b5fba3785
[ "Apache-2.0" ]
null
null
null
shcomplete/shell_scraper/settings.py
gy741/shell-complete
20ad82eb45015a79afc734f4cce2201b5fba3785
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for shell_scraper project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/...
34.052632
79
0.772179
BOT_NAME = 'shell_scraper' SPIDER_MODULES = ['shell_scraper.spiders'] NEWSPIDER_MODULE = 'shell_scraper.spiders' ROBOTSTXT_OBEY = False # application/xml;q=0.9,*/*;q=0.8',
true
true
1c485b47804f4492c2b8ffc80ef6f14d8497cc7c
1,004
py
Python
tests/test_config_load.py
voidpp/magrathea-python-tools
0fc7460c827b02d8914411cedddadc23ccb3cc73
[ "MIT" ]
null
null
null
tests/test_config_load.py
voidpp/magrathea-python-tools
0fc7460c827b02d8914411cedddadc23ccb3cc73
[ "MIT" ]
null
null
null
tests/test_config_load.py
voidpp/magrathea-python-tools
0fc7460c827b02d8914411cedddadc23ccb3cc73
[ "MIT" ]
null
null
null
import pytest from voidpp_tools.mocks.file_system import mockfs from voidpp_tools.json_config import JSONConfigLoader from voidpp_tools.config_loader import ConfigFileNotFoundException @mockfs(dict(etc = {'app1.json': u'{"the_answer": 42}'})) def test_load_config_from_etc(): # Arrange loader = JSONConfigLoad...
24.487805
68
0.670319
import pytest from voidpp_tools.mocks.file_system import mockfs from voidpp_tools.json_config import JSONConfigLoader from voidpp_tools.config_loader import ConfigFileNotFoundException @mockfs(dict(etc = {'app1.json': u'{"the_answer": 42}'})) def test_load_config_from_etc(): loader = JSONConfigLoader('') ...
true
true
1c485b6e79e47b54e18602864ca41cb848d6dcf1
477
py
Python
Python/Algorithms/1002.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
2
2021-01-15T17:22:54.000Z
2021-05-16T19:58:02.000Z
Python/Algorithms/1002.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
null
null
null
Python/Algorithms/1002.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
null
null
null
from collections import Counter class Solution: # 40 - 92.66, 14.3 - 54.19 def commonChars(self, A): # Build counter of characters Counter_ = Counter commons = Counter_(A[0]) for i in range(1, len(A)): # In-place intersection of minimum of elements. com...
28.058824
60
0.555556
from collections import Counter class Solution: def commonChars(self, A): Counter_ = Counter commons = Counter_(A[0]) for i in range(1, len(A)): commons &= Counter_(A[i]) if not commons: return [] return co...
true
true
1c485cf9254aebb6da185f4c1cd864b675899f50
3,250
py
Python
sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/aio/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/aio/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/aio/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "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 ...
48.507463
134
0.701846
from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential VERSION = "unknown" class ApplicationIn...
true
true
1c485d1431e0cce094796e78eee222184717bdb4
2,473
py
Python
userbot/utils/tools.py
ronaldyganteng/WeebProject
d630cda9f79fafd83453650e414aa59ae136303e
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2021-05-29T05:31:53.000Z
2021-05-29T05:31:53.000Z
userbot/utils/tools.py
ronaldyganteng/WeebProject
d630cda9f79fafd83453650e414aa59ae136303e
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/utils/tools.py
ronaldyganteng/WeebProject
d630cda9f79fafd83453650e414aa59ae136303e
[ "Naumen", "Condor-1.1", "MS-PL" ]
21
2021-02-01T14:01:42.000Z
2021-08-22T01:13:28.000Z
# Copyright (C) 2020 Adek Maulana # # SPDX-License-Identifier: GPL-3.0-or-later # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
30.158537
72
0.615851
import asyncio import re import hashlib from typing import List async def md5(fname: str) -> str: hash_md5 = hashlib.md5() with open(fname, "rb") as f: for chunk in iter(lambda: f.read(4096), b""): hash_md5.update(chunk) return hash_md5.hexdigest() def humanbytes(size: int) -> str:...
true
true
1c485e14fe7d5c3bbc2cb0ef4066486b1c2f9fc0
2,579
py
Python
pyad/pyadexceptions.py
sukhjinderpalsingh/pyad
d95ff67745065cafca4f2653aab1fbce2df91fb9
[ "Apache-2.0" ]
145
2015-01-14T21:53:35.000Z
2022-03-10T19:40:32.000Z
pyad/pyadexceptions.py
zakird/pyad
d95ff67745065cafca4f2653aab1fbce2df91fb9
[ "Apache-2.0" ]
104
2015-01-12T21:14:10.000Z
2022-03-02T12:38:41.000Z
pyad/pyadexceptions.py
sukhjinderpalsingh/pyad
d95ff67745065cafca4f2653aab1fbce2df91fb9
[ "Apache-2.0" ]
73
2015-03-27T07:36:47.000Z
2022-03-04T18:59:18.000Z
from __future__ import print_function from builtins import str class comException(Exception): def __init__(self, error_info, additional_info={}): self.error_info = error_info self.additional_info = additional_info def __str__(self): print("Error Constant: %s" % self.error...
39.676923
168
0.697945
from __future__ import print_function from builtins import str class comException(Exception): def __init__(self, error_info, additional_info={}): self.error_info = error_info self.additional_info = additional_info def __str__(self): print("Error Constant: %s" % self.error...
true
true
1c485ee284a25efec48426c3601ced0b86cf1c38
1,167
py
Python
axitom/phantoms.py
PolymerGuy/AXITOM
7682be5b21fa933b9bea4082fe9a830076431feb
[ "MIT" ]
4
2019-09-06T16:31:11.000Z
2022-02-04T12:18:47.000Z
axitom/phantoms.py
PolymerGuy/AXITOM
7682be5b21fa933b9bea4082fe9a830076431feb
[ "MIT" ]
1
2019-08-08T12:30:33.000Z
2019-08-08T12:34:55.000Z
axitom/phantoms.py
PolymerGuy/AXITOM
7682be5b21fa933b9bea4082fe9a830076431feb
[ "MIT" ]
7
2019-08-21T20:51:12.000Z
2020-02-04T14:20:42.000Z
import numpy as np """ Phantoms This module contains the phantoms that can be used for forward projection and virtual experiments """ def barrel(domain_size=128, outer_rad_fraction=0.7,center_val=None): """ Barrel shaped phantom with a linear density gradient The domain size is cubic with dimension "domain_...
28.463415
106
0.652099
import numpy as np def barrel(domain_size=128, outer_rad_fraction=0.7,center_val=None): center = domain_size / 2. domain = np.zeros((domain_size, domain_size, domain_size), dtype=np.float64) xs, ys = np.meshgrid(np.arange(domain_size), np.arange(domain_size)) xs = xs - center ys = ys - center ...
true
true
1c485f4180c62d34716606f40f2b0dda9ebcd895
10,087
py
Python
tests/integration/standard/test_cluster.py
josh-mckenzie/python-driver
472675c61664afa99d2c9eb6c32424c846c1a367
[ "Apache-2.0" ]
null
null
null
tests/integration/standard/test_cluster.py
josh-mckenzie/python-driver
472675c61664afa99d2c9eb6c32424c846c1a367
[ "Apache-2.0" ]
null
null
null
tests/integration/standard/test_cluster.py
josh-mckenzie/python-driver
472675c61664afa99d2c9eb6c32424c846c1a367
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-2014 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
37.359259
129
0.674234
from tests.integration import PROTOCOL_VERSION try: import unittest2 as unittest except ImportError: import unittest import cassandra from cassandra.query import SimpleStatement, TraceUnavailable from cassandra.policies import RoundRobinPolicy, ExponentialReconnectionPolicy, RetryPolicy, SimpleConvictionPoli...
true
true
1c486091f1cf476ba15dd0ac7d22a9dfbee4c1fc
7,319
py
Python
code/src/d00_utils/feat_utils.py
edugm94/temporal-feat-emotion-prediction
6548bbf5f5d8969de97c076ebc9b5462d7b8bdd4
[ "MIT" ]
null
null
null
code/src/d00_utils/feat_utils.py
edugm94/temporal-feat-emotion-prediction
6548bbf5f5d8969de97c076ebc9b5462d7b8bdd4
[ "MIT" ]
null
null
null
code/src/d00_utils/feat_utils.py
edugm94/temporal-feat-emotion-prediction
6548bbf5f5d8969de97c076ebc9b5462d7b8bdd4
[ "MIT" ]
null
null
null
# !/usr/bin/env python # -*- coding: UTF-8 -*- # # Author: Eduardo Gutierrez Maestro # Date: 2021.12.14 # email: eduardo.gutierrez-maestro@oru.se # # Center for Applied Autonomous Sensor Systems (AASS), Cognitive Robotic Systems Labs # University of Orebro, Sweden import numpy as np import pandas as pd from s...
38.521053
119
0.599399
import numpy as np import pandas as pd from scipy.fft import fft, ifft from csaps import csaps def clean_dataset(labels, discard=0.1): unique, counts = np.unique(labels, return_counts=True) counting = dict(zip(unique, counts)) tot = sum(counting.values()) threshold = tot * discard ...
true
true
1c4860b88312afac4669bab44eca6d6d09937ccf
1,704
py
Python
python/open3d/ml/torch/pipelines.py
Dudulle/Open3D
ffed2d1bee6d45b6acc4b7ae7133752e50d6ecab
[ "MIT" ]
28
2021-03-02T09:51:12.000Z
2022-03-17T09:27:46.000Z
python/open3d/ml/torch/pipelines.py
Dudulle/Open3D
ffed2d1bee6d45b6acc4b7ae7133752e50d6ecab
[ "MIT" ]
27
2021-03-08T06:56:35.000Z
2022-03-25T14:00:32.000Z
python/open3d/ml/torch/pipelines.py
Dudulle/Open3D
ffed2d1bee6d45b6acc4b7ae7133752e50d6ecab
[ "MIT" ]
7
2021-08-24T02:20:13.000Z
2021-12-31T09:45:02.000Z
# ---------------------------------------------------------------------------- # - Open3D: www.open3d.org - # ---------------------------------------------------------------------------- # The MIT License (MIT) # # Copyright (c) 2020 www.open3d.org # # Permission is her...
47.333333
79
0.632042
import os as _os from open3d import _build_config if _build_config['BUNDLE_OPEN3D_ML']: if 'OPEN3D_ML_ROOT' in _os.environ: from ml3d.torch.pipelines import * else: from open3d._ml3d.torch.pipelines import *
true
true
1c4861abce1abcc4cf3861647e4c50dd84b20861
5,951
py
Python
util.py
seanliu96/R-Net
8462330451079a2ff67cd431fe30a57a6ca3d802
[ "MIT" ]
null
null
null
util.py
seanliu96/R-Net
8462330451079a2ff67cd431fe30a57a6ca3d802
[ "MIT" ]
null
null
null
util.py
seanliu96/R-Net
8462330451079a2ff67cd431fe30a57a6ca3d802
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import re from collections import Counter import string def get_record_parser(config, is_test=False): def parse(example): para_limit = config.test_para_limit if is_test else config.para_limit ques_limit = config.test_ques_limit if is_test else config.ques...
40.482993
102
0.623593
import tensorflow as tf import numpy as np import re from collections import Counter import string def get_record_parser(config, is_test=False): def parse(example): para_limit = config.test_para_limit if is_test else config.para_limit ques_limit = config.test_ques_limit if is_test else config.ques...
true
true
1c48620c64fa51850f5fd4bc16ab11b4b2f1dfac
4,735
py
Python
example.py
lbenassi/InstagramBot
49f8bad5de8d5df719f102c66acb6779b677bc5f
[ "MIT" ]
1
2019-08-05T23:02:58.000Z
2019-08-05T23:02:58.000Z
example.py
lbenassi/InstagramBot
49f8bad5de8d5df719f102c66acb6779b677bc5f
[ "MIT" ]
null
null
null
example.py
lbenassi/InstagramBot
49f8bad5de8d5df719f102c66acb6779b677bc5f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import time from src import InstaBot from src.check_status import check_status from src.feed_scanner import feed_scanner from src.follow_protocol import follow_protocol from src.unfollow_protocol import unfollow_protocol bot = InstaBot( login="",...
42.276786
569
0.563675
import os import time from src import InstaBot from src.check_status import check_status from src.feed_scanner import feed_scanner from src.follow_protocol import follow_protocol from src.unfollow_protocol import unfollow_protocol bot = InstaBot( login="", password="", like_per_day=600, c...
true
true
1c4862fb07b2c9db29a9081ca5087a83b0ba2309
1,396
py
Python
python2_guiding_test.py
ammumaddy/dhivya-railway
152a64e16ba07d62aa9aa159f503ed0b1a09d5b6
[ "MIT" ]
97
2015-01-02T10:58:05.000Z
2022-03-11T14:00:52.000Z
python2_guiding_test.py
ammumaddy/dhivya-railway
152a64e16ba07d62aa9aa159f503ed0b1a09d5b6
[ "MIT" ]
3
2020-02-14T15:55:21.000Z
2020-02-19T17:33:05.000Z
python2_guiding_test.py
ammumaddy/dhivya-railway
152a64e16ba07d62aa9aa159f503ed0b1a09d5b6
[ "MIT" ]
58
2015-05-28T02:09:51.000Z
2022-03-20T16:37:40.000Z
""" Equivalent of 'guiding_test.py' except for Python2.x, which comes as standard on many systems. Run it with: python python2_guiding_test.py """ import json import subprocess import unittest import os import urllib2, urllib url = "http://127.0.0.1:8083" interpreter = "python" reservation_script = os.path.join...
30.347826
150
0.670487
import json import subprocess import unittest import os import urllib2, urllib url = "http://127.0.0.1:8083" interpreter = "python" reservation_script = os.path.join("python", "reserve.py") class TrainReservationTest(unittest.TestCase): def test_reserve_seats_via_POST(self): form_data = {"train_id": "exp...
true
true
1c4863108b4acd15cabb6c18697226bdc4fae51a
7,174
py
Python
causallib/contrib/tests/test_shared_sparsity_selection.py
liranszlak/causallib
2636149f6b1e307672aff638a53f8eaf2be56bc9
[ "Apache-2.0" ]
350
2019-06-19T15:56:19.000Z
2022-03-28T23:47:46.000Z
causallib/contrib/tests/test_shared_sparsity_selection.py
liranszlak/causallib
2636149f6b1e307672aff638a53f8eaf2be56bc9
[ "Apache-2.0" ]
13
2019-08-14T22:04:21.000Z
2022-03-14T07:44:12.000Z
causallib/contrib/tests/test_shared_sparsity_selection.py
liranszlak/causallib
2636149f6b1e307672aff638a53f8eaf2be56bc9
[ "Apache-2.0" ]
48
2019-11-02T16:40:56.000Z
2022-02-09T12:55:12.000Z
import numpy as np import pandas as pd from sklearn.datasets import make_classification from sklearn.preprocessing import StandardScaler from sklearn.exceptions import ConvergenceWarning from causallib.contrib.shared_sparsity_selection import SharedSparsityConfounderSelection from causallib.tests.test_confounder_selec...
47.197368
110
0.64678
import numpy as np import pandas as pd from sklearn.datasets import make_classification from sklearn.preprocessing import StandardScaler from sklearn.exceptions import ConvergenceWarning from causallib.contrib.shared_sparsity_selection import SharedSparsityConfounderSelection from causallib.tests.test_confounder_selec...
true
true
1c4864c7568edd42683a2109677a37b005cc8076
48
py
Python
sortedm2m/__init__.py
Freston5/daysiweb
95751b467f0e76c3cb60bb09693c59af9c74ded2
[ "MIT" ]
null
null
null
sortedm2m/__init__.py
Freston5/daysiweb
95751b467f0e76c3cb60bb09693c59af9c74ded2
[ "MIT" ]
null
null
null
sortedm2m/__init__.py
Freston5/daysiweb
95751b467f0e76c3cb60bb09693c59af9c74ded2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __version__ = '1.3.3'
9.6
23
0.5
__version__ = '1.3.3'
true
true
1c4865911cd82746699b01afdfe934853aeba6b9
3,337
py
Python
selenium_pipeline/hyatt_hotels_fetch_addresses.py
Praneethvvs/CircleCi_FastApi
0aec14fcffcfe7053cf7db688728347feea26f70
[ "MIT" ]
null
null
null
selenium_pipeline/hyatt_hotels_fetch_addresses.py
Praneethvvs/CircleCi_FastApi
0aec14fcffcfe7053cf7db688728347feea26f70
[ "MIT" ]
null
null
null
selenium_pipeline/hyatt_hotels_fetch_addresses.py
Praneethvvs/CircleCi_FastApi
0aec14fcffcfe7053cf7db688728347feea26f70
[ "MIT" ]
null
null
null
import time import pandas as pd from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import trace...
40.695122
225
0.620617
import time import pandas as pd from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.desired_capabilities import DesiredCapabilities import trace...
true
true
1c4866945a2ab251b49fcecdc203276c56d51585
379
py
Python
Day28/Solution.py
MarceloKabbalah/30-Days-Of-Code
094de037347b00105c5385add9de7bf605277e16
[ "MIT" ]
null
null
null
Day28/Solution.py
MarceloKabbalah/30-Days-Of-Code
094de037347b00105c5385add9de7bf605277e16
[ "MIT" ]
null
null
null
Day28/Solution.py
MarceloKabbalah/30-Days-Of-Code
094de037347b00105c5385add9de7bf605277e16
[ "MIT" ]
null
null
null
#!/bin/python # compatible with python3 import sys import re N = int(input().strip()) names = [] for a0 in range(N): firstName,emailID = input().strip().split(' ') firstName,emailID = [str(firstName),str(emailID)] match = re.search(r'[\w\.-]+@gmail.com', emailID) if match: names.append(f...
19.947368
53
0.62533
import sys import re N = int(input().strip()) names = [] for a0 in range(N): firstName,emailID = input().strip().split(' ') firstName,emailID = [str(firstName),str(emailID)] match = re.search(r'[\w\.-]+@gmail.com', emailID) if match: names.append(firstName) names.sort() for name in names...
true
true
1c486728773d0fecc3487bf43c095f48ffa913bc
1,645
py
Python
detailsScrape/oilymoistd/oilymoistd17.py
Asyikin98/SkinFerm
72fd1ad6339c96adf5ec154bde566de9eb1472c3
[ "MIT" ]
null
null
null
detailsScrape/oilymoistd/oilymoistd17.py
Asyikin98/SkinFerm
72fd1ad6339c96adf5ec154bde566de9eb1472c3
[ "MIT" ]
2
2021-02-03T01:55:13.000Z
2021-04-30T12:46:33.000Z
detailsScrape/oilymoistd/oilymoistd17.py
Asyikin98/SkinFerm
72fd1ad6339c96adf5ec154bde566de9eb1472c3
[ "MIT" ]
null
null
null
import urllib.request import random from bs4 import BeautifulSoup from requests import get import mysql.connector conn = mysql.connector.connect(user="root", passwd="",host="localhost", database="product") cursor = conn.cursor() sql = """INSERT INTO oilymoistd (about, rate, top, comment, dari) VALUES (%s, %s, %s, %s...
36.555556
148
0.630395
import urllib.request import random from bs4 import BeautifulSoup from requests import get import mysql.connector conn = mysql.connector.connect(user="root", passwd="",host="localhost", database="product") cursor = conn.cursor() sql = """INSERT INTO oilymoistd (about, rate, top, comment, dari) VALUES (%s, %s, %s, %s...
true
true
1c486733754ce24861ac7025b7b44eb64a9b0479
742
py
Python
api/endpoints/fruit/get.py
DarkbordermanTemplate/fastapi-redis-sqlalchemy
80fbdc419b19592b08bc2227c9d7c2925b7b91e2
[ "BSD-2-Clause" ]
5
2021-02-08T06:37:48.000Z
2021-09-12T14:55:34.000Z
api/endpoints/fruit/get.py
DarkbordermanTemplate/fastapi-redis-sqlalchemy
80fbdc419b19592b08bc2227c9d7c2925b7b91e2
[ "BSD-2-Clause" ]
null
null
null
api/endpoints/fruit/get.py
DarkbordermanTemplate/fastapi-redis-sqlalchemy
80fbdc419b19592b08bc2227c9d7c2925b7b91e2
[ "BSD-2-Clause" ]
null
null
null
from cache import REDIS from common.enums import EnumResponse from fastapi.responses import JSONResponse from loguru import logger DOC = { 200: { "description": "API response successfully", "content": {"application/json": {"example": {"name": "apple"}}}, }, 400: EnumResponse.BAD_REQUEST.val...
30.916667
104
0.679245
from cache import REDIS from common.enums import EnumResponse from fastapi.responses import JSONResponse from loguru import logger DOC = { 200: { "description": "API response successfully", "content": {"application/json": {"example": {"name": "apple"}}}, }, 400: EnumResponse.BAD_REQUEST.val...
true
true
1c48680130184ca429dd07e0772847c963db0ed3
368
py
Python
LVM-Tool/function.py
Shashwatsingh22/Linux-Automated-Tools
2e9c0f064ac70571a1a59e30f69e24d8ae05616a
[ "MIT" ]
null
null
null
LVM-Tool/function.py
Shashwatsingh22/Linux-Automated-Tools
2e9c0f064ac70571a1a59e30f69e24d8ae05616a
[ "MIT" ]
null
null
null
LVM-Tool/function.py
Shashwatsingh22/Linux-Automated-Tools
2e9c0f064ac70571a1a59e30f69e24d8ae05616a
[ "MIT" ]
null
null
null
from pyfiglet import Figlet def render(text,style,num): f=Figlet(font=style) print('\n') print(f.renderText(text)) def sh_menu(): print("""\t\t\t Press 1: Create. Press 2: Complete Detail. Press 3: Specific. Press 4: Exit. ...
24.533333
44
0.486413
from pyfiglet import Figlet def render(text,style,num): f=Figlet(font=style) print('\n') print(f.renderText(text)) def sh_menu(): print("""\t\t\t Press 1: Create. Press 2: Complete Detail. Press 3: Specific. Press 4: Exit. ...
true
true
1c4868035b91b83cc30e54e14d221dc6f5c6ac0e
2,474
py
Python
src/appier/test/exceptions.py
veryprofessionaldodo/appier
1a0c146753428a3d1a8c484467766ee871047757
[ "Apache-2.0" ]
null
null
null
src/appier/test/exceptions.py
veryprofessionaldodo/appier
1a0c146753428a3d1a8c484467766ee871047757
[ "Apache-2.0" ]
null
null
null
src/appier/test/exceptions.py
veryprofessionaldodo/appier
1a0c146753428a3d1a8c484467766ee871047757
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Appier Framework # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Appier Framework. # # Hive Appier Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apach...
33.890411
89
0.67017
__author__ = "João Magalhães <joamag@hive.pt>" __version__ = "1.0.0" __revision__ = "$LastChangedRevision$" __date__ = "$LastChangedDate$" __copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda." __license__ = "Apache License, Version 2.0" import unittest import appier class ExceptionsT...
true
true
1c48683aa3013e98712b3e7bf3aafb554f2f1671
955
py
Python
cybox/objects/uri_object.py
siemens/python-cybox
b692a98c8a62bd696e2a0dda802ada7359853482
[ "BSD-3-Clause" ]
null
null
null
cybox/objects/uri_object.py
siemens/python-cybox
b692a98c8a62bd696e2a0dda802ada7359853482
[ "BSD-3-Clause" ]
null
null
null
cybox/objects/uri_object.py
siemens/python-cybox
b692a98c8a62bd696e2a0dda802ada7359853482
[ "BSD-3-Clause" ]
1
2019-04-16T18:37:32.000Z
2019-04-16T18:37:32.000Z
# Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import cybox import cybox.bindings.uri_object as uri_binding from cybox.common import ObjectProperties, AnyURI class URI(ObjectProperties): _binding = uri_binding _binding_class = uri_binding.URIObjectTyp...
26.527778
65
0.690052
import cybox import cybox.bindings.uri_object as uri_binding from cybox.common import ObjectProperties, AnyURI class URI(ObjectProperties): _binding = uri_binding _binding_class = uri_binding.URIObjectType _namespace = 'http://cybox.mitre.org/objects#URIObject-2' _XSI_NS = 'URIObj' _XSI_TYPE = "...
true
true
1c486ab1f4c57339efdceb4e5602b8c3f5c54e15
1,317
py
Python
FastAPI/app/main.py
bing9/raspberrypi_projects
5ca1b8101517f856af3f86a49518a89c1d8e29f9
[ "MIT" ]
null
null
null
FastAPI/app/main.py
bing9/raspberrypi_projects
5ca1b8101517f856af3f86a49518a89c1d8e29f9
[ "MIT" ]
null
null
null
FastAPI/app/main.py
bing9/raspberrypi_projects
5ca1b8101517f856af3f86a49518a89c1d8e29f9
[ "MIT" ]
null
null
null
from fastapi import FastAPI, UploadFile # from typing import Optional # from pydantic import BaseModel from subprocess import Popen #check_output # from starlette.responses import # from dotenv import load_dotenv import os app = FastAPI() @app.get('/') def index(): return 'My Personal Server' # ...
31.357143
119
0.631739
from fastapi import FastAPI, UploadFile from subprocess import Popen import os app = FastAPI() @app.get('/') def index(): return 'My Personal Server' @app.get('/start_kodi') def start_kodi(): try: Popen(["startx", "kodi"]) return {'successfully launched kodi'} ex...
true
true
1c486bab8c2b70b4200b22d717bec1830d4b9e0e
1,297
py
Python
solum/objects/assembly.py
devdattakulkarni/test-solum
4e9ddb82d217116aa2c30a6f2581080cbdfae325
[ "Apache-2.0" ]
null
null
null
solum/objects/assembly.py
devdattakulkarni/test-solum
4e9ddb82d217116aa2c30a6f2581080cbdfae325
[ "Apache-2.0" ]
null
null
null
solum/objects/assembly.py
devdattakulkarni/test-solum
4e9ddb82d217116aa2c30a6f2581080cbdfae325
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 - Rackspace # # 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,...
30.880952
75
0.733231
from solum.objects import base class Assembly(base.CrudMixin): VERSION = '1.0' class AssemblyList(list, base.CrudListMixin): class States(object): QUEUED = 'QUEUED' UNIT_TESTING = 'UNIT_TESTING' UNIT_TESTING_FAILED = 'UNIT_TESTING_FAILED' UNIT_TESTING_PASSED = 'UNIT_TESTING_PASSED' BU...
true
true
1c486cbfbc9842418bee088aeb5300aed2824063
29,399
py
Python
core/domain/story_services.py
jlau323/oppia
37438a2c9bf7e66892fb9a6a93a1fe4ca7a82691
[ "Apache-2.0" ]
2
2021-04-08T01:06:08.000Z
2021-06-02T08:20:13.000Z
core/domain/story_services.py
jlau323/oppia
37438a2c9bf7e66892fb9a6a93a1fe4ca7a82691
[ "Apache-2.0" ]
null
null
null
core/domain/story_services.py
jlau323/oppia
37438a2c9bf7e66892fb9a6a93a1fe4ca7a82691
[ "Apache-2.0" ]
1
2020-12-11T06:56:31.000Z
2020-12-11T06:56:31.000Z
# Copyright 2018 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
41.759943
80
0.661689
from __future__ import absolute_import from __future__ import unicode_literals import logging from constants import constants from core.domain import android_validation_constants from core.domain import caching_services from core.domain import exp_fetchers from core.domain import opportunity_services from core.do...
true
true
1c486d9dbfb62cdd738c2ff2e418532e0d2734b8
6,437
py
Python
data/p3BR/R2/benchmark/startQiskit_noisy239.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit_noisy239.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p3BR/R2/benchmark/startQiskit_noisy239.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=45 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from...
30.799043
140
0.634457
import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from qiskit.test.mock import FakeVigo, ...
true
true
1c486da49bd95ed0382213bd70102161815cc3de
3,912
py
Python
google/cloud/pubsublite/v1/pubsublite-v1-py/google/cloud/pubsublite_v1/types/publisher.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/pubsublite/v1/pubsublite-v1-py/google/cloud/pubsublite_v1/types/publisher.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/pubsublite/v1/pubsublite-v1-py/google/cloud/pubsublite_v1/types/publisher.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
27.356643
89
0.660532
import proto from google.cloud.pubsublite_v1.types import common __protobuf__ = proto.module( package='google.cloud.pubsublite.v1', manifest={ 'InitialPublishRequest', 'InitialPublishResponse', 'MessagePublishRequest', 'MessagePublishResponse', 'PublishRequest', ...
true
true