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
f74c208e01bfe49c49688ef24b97783f14d33b77
1,097
py
Python
wolframclient/tests/externalevaluate/ev_loop.py
LaudateCorpus1/WolframClientForPython
26f7fa3d81691ba2a63d3eadcd9734b261130b7c
[ "MIT" ]
1
2021-07-15T22:52:40.000Z
2021-07-15T22:52:40.000Z
wolframclient/tests/externalevaluate/ev_loop.py
LaudateCorpus1/WolframClientForPython
26f7fa3d81691ba2a63d3eadcd9734b261130b7c
[ "MIT" ]
1
2021-07-15T22:50:23.000Z
2021-07-15T22:50:23.000Z
wolframclient/tests/externalevaluate/ev_loop.py
LaudateCorpus1/WolframClientForPython
26f7fa3d81691ba2a63d3eadcd9734b261130b7c
[ "MIT" ]
null
null
null
from __future__ import absolute_import, print_function, unicode_literals from threading import Thread import zmq from wolframclient.language import wl from wolframclient.serializers import export from wolframclient.utils.externalevaluate import EXPORT_KWARGS, start_zmq_loop from wolframclient.utils.tests import Test...
28.868421
78
0.694622
from __future__ import absolute_import, print_function, unicode_literals from threading import Thread import zmq from wolframclient.language import wl from wolframclient.serializers import export from wolframclient.utils.externalevaluate import EXPORT_KWARGS, start_zmq_loop from wolframclient.utils.tests import Test...
true
true
f74c20f4809a7cac07350b6f2b4b090403a57f55
493
py
Python
taghaza/migrations/0016_auto_20190811_1117.py
mablue/Specialized-Procurement-and-Sales-Management-System-for-East-Azarbaijan-Gas-Company
da071bd199a92d571228a1d823a7fa1f52275604
[ "MIT" ]
30
2019-08-18T14:57:39.000Z
2022-03-15T22:09:09.000Z
taghaza/migrations/0016_auto_20190811_1117.py
mablue/Specialized-Procurement-and-Sales-Management-System-for-East-Azarbaijan-Gas-Company
da071bd199a92d571228a1d823a7fa1f52275604
[ "MIT" ]
3
2021-03-19T00:46:32.000Z
2021-09-22T01:29:08.000Z
taghaza/migrations/0016_auto_20190811_1117.py
mablue/Specialized-Procurement-and-Sales-Management-System-for-East-Azarbaijan-Gas-Company
da071bd199a92d571228a1d823a7fa1f52275604
[ "MIT" ]
7
2019-08-20T14:04:28.000Z
2021-06-29T06:43:08.000Z
# Generated by Django 2.2.4 on 2019-08-11 11:17 from django.db import migrations, models import taghaza.models class Migration(migrations.Migration): dependencies = [ ('taghaza', '0015_auto_20190811_1052'), ] operations = [ migrations.AlterField( model_name='taghaza', ...
24.65
135
0.651116
from django.db import migrations, models import taghaza.models class Migration(migrations.Migration): dependencies = [ ('taghaza', '0015_auto_20190811_1052'), ] operations = [ migrations.AlterField( model_name='taghaza', name='image', field=models.Im...
true
true
f74c2111c17c805b2f928edb1a0faf49e7ed58c6
55,207
py
Python
pywbemtools/pywbemcli/_common.py
3v1lW1th1n/pywbemtools
ed4caea84dff5daa7c9a2c10dc493857c7118a29
[ "Apache-2.0" ]
null
null
null
pywbemtools/pywbemcli/_common.py
3v1lW1th1n/pywbemtools
ed4caea84dff5daa7c9a2c10dc493857c7118a29
[ "Apache-2.0" ]
null
null
null
pywbemtools/pywbemcli/_common.py
3v1lW1th1n/pywbemtools
ed4caea84dff5daa7c9a2c10dc493857c7118a29
[ "Apache-2.0" ]
null
null
null
# (C) Copyright 2017 IBM Corp. # (C) Copyright 2017 Inova Development 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-...
35.096631
119
0.619831
from __future__ import absolute_import, print_function, unicode_literals import fnmatch import re from textwrap import fill from operator import itemgetter import six import click import tabulate from pywbem import CIMInstanceName, CIMInstance, CIMClass, \ CIMQualifierDeclaration, CIMProperty, CIM...
true
true
f74c21d488310346ed2cc7d7fc7b155844081743
223
py
Python
igftools.py
imperial-genomics-facility/Metadata_validation
d6e1cd51c32768bf578101688ad02db65684a568
[ "Apache-2.0" ]
null
null
null
igftools.py
imperial-genomics-facility/Metadata_validation
d6e1cd51c32768bf578101688ad02db65684a568
[ "Apache-2.0" ]
3
2020-03-24T18:04:16.000Z
2021-02-02T22:25:57.000Z
igftools.py
imperial-genomics-facility/Metadata_validation
d6e1cd51c32768bf578101688ad02db65684a568
[ "Apache-2.0" ]
null
null
null
import os from flask_migrate import Migrate, upgrade from app import create_app, db flask_config_name = os.environ.get('FLASK_CONFIG') or 'testing' app = create_app(config_name=flask_config_name) migrate = Migrate(app, db)
31.857143
63
0.807175
import os from flask_migrate import Migrate, upgrade from app import create_app, db flask_config_name = os.environ.get('FLASK_CONFIG') or 'testing' app = create_app(config_name=flask_config_name) migrate = Migrate(app, db)
true
true
f74c23bc2ce110519025b9152a27d7ba0a18bdb6
2,896
py
Python
xenadapter/__init__.py
pashazz/vmemperor
a0b53f67d75cccbd8e1e6a0419d85babab7041f5
[ "Apache-2.0" ]
1
2019-02-02T15:01:32.000Z
2019-02-02T15:01:32.000Z
xenadapter/__init__.py
pashazz/vmemperor
a0b53f67d75cccbd8e1e6a0419d85babab7041f5
[ "Apache-2.0" ]
null
null
null
xenadapter/__init__.py
pashazz/vmemperor
a0b53f67d75cccbd8e1e6a0419d85babab7041f5
[ "Apache-2.0" ]
null
null
null
import XenAPI from loggable import Loggable from .singleton import Singleton from exc import * import threading from rethinkdb import RethinkDB r = RethinkDB() class XenAdapter(Loggable, metaclass=Singleton): AUTOINSTALL_PREFIX = '/autoinstall' VMEMPEROR_ACCESS_PREFIX='vm-data/vmemperor/access' def __...
34.47619
142
0.610152
import XenAPI from loggable import Loggable from .singleton import Singleton from exc import * import threading from rethinkdb import RethinkDB r = RethinkDB() class XenAdapter(Loggable, metaclass=Singleton): AUTOINSTALL_PREFIX = '/autoinstall' VMEMPEROR_ACCESS_PREFIX='vm-data/vmemperor/access' def __...
true
true
f74c23e1f8f09a0e955ca7e10b54304fe7798f67
8,535
py
Python
docs/conf.py
ryananguiano/aioredis-timeseries
97ae0709df97df90fad76ffa9dd0c0fef3f8f92e
[ "MIT" ]
1
2021-03-03T18:47:56.000Z
2021-03-03T18:47:56.000Z
docs/conf.py
ryananguiano/aioredis-timeseries
97ae0709df97df90fad76ffa9dd0c0fef3f8f92e
[ "MIT" ]
null
null
null
docs/conf.py
ryananguiano/aioredis-timeseries
97ae0709df97df90fad76ffa9dd0c0fef3f8f92e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # aioredis_timeseries documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present i...
30.923913
76
0.719508
import sys import os cwd = os.getcwd() project_root = os.path.dirname(cwd) sys.path.insert(0, project_root) import aioredis_timeseries extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' pro...
true
true
f74c253065d06ec16bb4f9d8fc4223fc0e3c69b7
3,615
py
Python
tests/queue_test.py
jfw225/ptlib
a78ef707ed09aa9c1f1b1157a20e3d9d3fb04c4d
[ "MIT" ]
1
2022-01-06T07:04:43.000Z
2022-01-06T07:04:43.000Z
tests/queue_test.py
jfw225/ptlib
a78ef707ed09aa9c1f1b1157a20e3d9d3fb04c4d
[ "MIT" ]
null
null
null
tests/queue_test.py
jfw225/ptlib
a78ef707ed09aa9c1f1b1157a20e3d9d3fb04c4d
[ "MIT" ]
null
null
null
import cv2 import pickle import numpy as np import ptlib as pt from ptlib.core.metadata import MetadataManager from ptlib.core.queue import Queue class VideoIngest(pt.Task): # variables here are static NUM_WORKERS = 1 VIDEO_PATH = "C:\\Users\\Owner\\Videos\\Battlefield 2042 Open Beta\\testvid.mp4" B...
28.690476
105
0.637068
import cv2 import pickle import numpy as np import ptlib as pt from ptlib.core.metadata import MetadataManager from ptlib.core.queue import Queue class VideoIngest(pt.Task): NUM_WORKERS = 1 VIDEO_PATH = "C:\\Users\\Owner\\Videos\\Battlefield 2042 Open Beta\\testvid.mp4" BATCH_SIZE = 30 * 5 d...
true
true
f74c2644c0482d28c1f2401d1ed10de194171950
80
py
Python
mezzanine/utils/__init__.py
kevinlai219/Mezzanine-Django
a92cde236448e19cdbf853b5cb34f99a60972147
[ "BSD-2-Clause" ]
3,053
2015-01-01T08:16:01.000Z
2022-03-31T12:06:03.000Z
mezzanine/utils/__init__.py
kevinlai219/Mezzanine-Django
a92cde236448e19cdbf853b5cb34f99a60972147
[ "BSD-2-Clause" ]
818
2015-01-03T05:44:45.000Z
2022-03-08T00:06:23.000Z
mezzanine/utils/__init__.py
kevinlai219/Mezzanine-Django
a92cde236448e19cdbf853b5cb34f99a60972147
[ "BSD-2-Clause" ]
1,352
2015-01-01T06:17:14.000Z
2022-03-26T16:21:54.000Z
""" Various utility functions used throughout the different Mezzanine apps. """
20
71
0.775
true
true
f74c268c185b718a95e5a283e39a97dbabf9461d
3,749
py
Python
api/extenal/sripe.py
ferrumie/multi-pay
3e6a6fc63de823c10b5c52ade73b8357ed8bfd48
[ "MIT" ]
null
null
null
api/extenal/sripe.py
ferrumie/multi-pay
3e6a6fc63de823c10b5c52ade73b8357ed8bfd48
[ "MIT" ]
null
null
null
api/extenal/sripe.py
ferrumie/multi-pay
3e6a6fc63de823c10b5c52ade73b8357ed8bfd48
[ "MIT" ]
null
null
null
import os from api.exceptions import StripeException from api.payment import PaymentInterface from api.request import Request from transaction.models import Transaction import stripe class StripePayment(Request, PaymentInterface): ''' Stripe payment method class ''' def __init__(self): url = ...
35.037383
75
0.512937
import os from api.exceptions import StripeException from api.payment import PaymentInterface from api.request import Request from transaction.models import Transaction import stripe class StripePayment(Request, PaymentInterface): def __init__(self): url = os.getenv("STRIPE_API_URL") super(Stripe...
true
true
f74c27a5c71f88c1554a22b950c0e8706ae0e1d8
1,314
py
Python
apps/corecode/forms.py
bigyanlamsal/school-management-system
bced2b58576a3a393bb0de2f8d3196d8a4bf72d3
[ "MIT" ]
null
null
null
apps/corecode/forms.py
bigyanlamsal/school-management-system
bced2b58576a3a393bb0de2f8d3196d8a4bf72d3
[ "MIT" ]
null
null
null
apps/corecode/forms.py
bigyanlamsal/school-management-system
bced2b58576a3a393bb0de2f8d3196d8a4bf72d3
[ "MIT" ]
null
null
null
from django import forms from django.forms import ModelForm, modelformset_factory from .models import ( AcademicSession, AcademicTerm, SiteConfig, StudentClass, Subject, ) SiteConfigForm = modelformset_factory( SiteConfig, fields=( "key", "value", ), extra=0, ) ...
20.857143
103
0.640791
from django import forms from django.forms import ModelForm, modelformset_factory from .models import ( AcademicSession, AcademicTerm, SiteConfig, StudentClass, Subject, ) SiteConfigForm = modelformset_factory( SiteConfig, fields=( "key", "value", ), extra=0, ) ...
true
true
f74c2af58bc3f6a523b5b6b6ef8c1d8974dd4585
627
py
Python
meiduo_mall/apps/meiduo_admin/views/group.py
Wang-TaoTao/meiduo_project
f95f097c2a85f500d0fd264a58e2f0d92771fff6
[ "MIT" ]
null
null
null
meiduo_mall/apps/meiduo_admin/views/group.py
Wang-TaoTao/meiduo_project
f95f097c2a85f500d0fd264a58e2f0d92771fff6
[ "MIT" ]
null
null
null
meiduo_mall/apps/meiduo_admin/views/group.py
Wang-TaoTao/meiduo_project
f95f097c2a85f500d0fd264a58e2f0d92771fff6
[ "MIT" ]
null
null
null
from django.contrib.auth.models import Group, Permission from rest_framework.generics import ListAPIView from rest_framework.viewsets import ModelViewSet from apps.meiduo_admin.serializers.group import GroupSerialzier, GroupSimpleSerializer from apps.meiduo_admin.utils import CustomPageNumberPagination # 新增用户组数据-...
21.62069
86
0.816587
from django.contrib.auth.models import Group, Permission from rest_framework.generics import ListAPIView from rest_framework.viewsets import ModelViewSet from apps.meiduo_admin.serializers.group import GroupSerialzier, GroupSimpleSerializer from apps.meiduo_admin.utils import CustomPageNumberPagination class Gro...
true
true
f74c2b01787343ceabcd266c573e8a5ae0ca981f
19,545
py
Python
docs/screenshots/take_all.py
body20002/qtile
e0f1968a96e9acf2b6c9562fae44802ffc9951ec
[ "MIT" ]
2
2015-01-03T02:25:19.000Z
2015-02-07T19:16:06.000Z
docs/screenshots/take_all.py
body20002/qtile
e0f1968a96e9acf2b6c9562fae44802ffc9951ec
[ "MIT" ]
1
2020-04-15T20:20:42.000Z
2020-04-15T20:20:42.000Z
docs/screenshots/take_all.py
body20002/qtile
e0f1968a96e9acf2b6c9562fae44802ffc9951ec
[ "MIT" ]
1
2022-03-01T21:23:12.000Z
2022-03-01T21:23:12.000Z
#!/usr/bin/env python3 import logging import os import sys import time import traceback from collections import namedtuple from pathlib import Path from screenshots import Client, Screenshooter def env(name, default): return os.environ.get(name, default) Spec = namedtuple( "Spec", "commands before aft...
37.804642
140
0.536966
import logging import os import sys import time import traceback from collections import namedtuple from pathlib import Path from screenshots import Client, Screenshooter def env(name, default): return os.environ.get(name, default) Spec = namedtuple( "Spec", "commands before after geometry delay wind...
true
true
f74c2bc275beabf186b41d75eab5ae9e1dd58aa5
507
py
Python
env/lib/python3.8/site-packages/plotly/validators/histogram2dcontour/colorbar/_len.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/histogram2dcontour/colorbar/_len.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/histogram2dcontour/colorbar/_len.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class LenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="len", parent_name="histogram2dcontour.colorbar", **kwargs ): super(LenValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
31.6875
84
0.625247
import _plotly_utils.basevalidators class LenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="len", parent_name="histogram2dcontour.colorbar", **kwargs ): super(LenValidator, self).__init__( plotly_name=plotly_name, parent_name=p...
true
true
f74c2c998ea6eacf997a1a574edef79e92993069
1,345
py
Python
third_party/modeltranslation/forms.py
asysc2020/contentbox
5c155976e0ce7ea308d62293ab89624d97b21d09
[ "Apache-2.0" ]
39
2015-06-10T23:18:07.000Z
2021-10-21T04:29:06.000Z
third_party/modeltranslation/forms.py
asysc2020/contentbox
5c155976e0ce7ea308d62293ab89624d97b21d09
[ "Apache-2.0" ]
2
2016-08-22T12:38:10.000Z
2017-01-26T18:37:33.000Z
third_party/modeltranslation/forms.py
asysc2020/contentbox
5c155976e0ce7ea308d62293ab89624d97b21d09
[ "Apache-2.0" ]
26
2015-06-10T22:09:15.000Z
2021-06-27T15:45:15.000Z
# -*- coding: utf-8 -*- from django import forms from django.core import validators from modeltranslation.fields import TranslationField class TranslationModelForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(TranslationModelForm, self).__init__(*args, **kwargs) for f in self._met...
32.804878
92
0.666914
from django import forms from django.core import validators from modeltranslation.fields import TranslationField class TranslationModelForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(TranslationModelForm, self).__init__(*args, **kwargs) for f in self._meta.model._meta.fields: ...
true
true
f74c2d0f21099ebafccbb9ea3a807b49ec3c504b
1,479
py
Python
recetas/migrations/0015_auto_20170912_1242.py
WFPColombia/nutrifami-recipes
b976efc366cb9f66108f3365a60b968eedfc1614
[ "MIT" ]
null
null
null
recetas/migrations/0015_auto_20170912_1242.py
WFPColombia/nutrifami-recipes
b976efc366cb9f66108f3365a60b968eedfc1614
[ "MIT" ]
null
null
null
recetas/migrations/0015_auto_20170912_1242.py
WFPColombia/nutrifami-recipes
b976efc366cb9f66108f3365a60b968eedfc1614
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-12 17:42 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('recetas', '0014_auto_20170905_1934'), ] operations...
31.468085
131
0.580798
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('recetas', '0014_auto_20170905_1934'), ] operations = [ migrations.CreateModel( name='Unidad', ...
true
true
f74c2d33b00167768a8e84020732f79bf952680f
4,044
py
Python
airflow/airflow_own/plugins/WRITER.py
vipksmosar/habr_rss_parse
91fa3df3db3a1416348237919824696239d4cb29
[ "Unlicense" ]
null
null
null
airflow/airflow_own/plugins/WRITER.py
vipksmosar/habr_rss_parse
91fa3df3db3a1416348237919824696239d4cb29
[ "Unlicense" ]
null
null
null
airflow/airflow_own/plugins/WRITER.py
vipksmosar/habr_rss_parse
91fa3df3db3a1416348237919824696239d4cb29
[ "Unlicense" ]
null
null
null
import os try: import pandas as pd except: os.system('pip3 install pandas') import pandas as pd try: import psycopg2 except: os.system('pip3 install psycopg2-binary') import psycopg2 import numpy as np from psycopg2.extensions import register_adapter, AsIs psycopg2.extensions.register_adapter(np...
35.787611
106
0.575915
import os try: import pandas as pd except: os.system('pip3 install pandas') import pandas as pd try: import psycopg2 except: os.system('pip3 install psycopg2-binary') import psycopg2 import numpy as np from psycopg2.extensions import register_adapter, AsIs psycopg2.extensions.register_adapter(np...
true
true
f74c2d5a941fc17d253c1425643295b50d4f01ff
1,220
py
Python
drf_braces/tests/serializers/test_swapping.py
wlongo/django-rest-framework-braces
f1b6fcb20414280e19a7810c81ce68406ad2a305
[ "MIT" ]
80
2015-07-01T12:55:35.000Z
2021-09-23T19:40:37.000Z
drf_braces/tests/serializers/test_swapping.py
wlongo/django-rest-framework-braces
f1b6fcb20414280e19a7810c81ce68406ad2a305
[ "MIT" ]
28
2015-07-03T11:37:38.000Z
2022-02-28T02:56:08.000Z
drf_braces/tests/serializers/test_swapping.py
wlongo/django-rest-framework-braces
f1b6fcb20414280e19a7810c81ce68406ad2a305
[ "MIT" ]
16
2015-07-09T01:03:39.000Z
2022-01-20T19:25:24.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import unittest from rest_framework import serializers from ...serializers.swapping import SwappingSerializerMixin class ChildSerializer(serializers.Serializer): foo = serializers.IntegerField() bar = serializer...
29.756098
106
0.736066
from __future__ import absolute_import, print_function, unicode_literals import unittest from rest_framework import serializers from ...serializers.swapping import SwappingSerializerMixin class ChildSerializer(serializers.Serializer): foo = serializers.IntegerField() bar = serializers.CharField() class C...
true
true
f74c2ea8d5c669f49118bb3c4002e45ef7da84dc
3,883
py
Python
tensorflow/lite/testing/op_tests/unroll_batch_matmul.py
where-is-brett/tensorflow
5da8599b2cf9edfb9fac4431c705501bf7ceccd8
[ "Apache-2.0" ]
50
2020-03-15T01:04:36.000Z
2021-11-21T23:25:44.000Z
tensorflow/lite/testing/op_tests/unroll_batch_matmul.py
where-is-brett/tensorflow
5da8599b2cf9edfb9fac4431c705501bf7ceccd8
[ "Apache-2.0" ]
47
2020-05-15T11:30:04.000Z
2021-08-11T16:51:08.000Z
tensorflow/lite/testing/op_tests/unroll_batch_matmul.py
where-is-brett/tensorflow
5da8599b2cf9edfb9fac4431c705501bf7ceccd8
[ "Apache-2.0" ]
66
2020-05-15T10:05:12.000Z
2022-02-14T07:28:18.000Z
# Copyright 2019 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...
41.308511
80
0.639969
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf from tensorflow.lite.testing.zip_test_utils import create_tensor_data from tensorflow.lite.testing.zip_test_utils import make_zip_of_tests from tensorflow.lite.te...
true
true
f74c2ebe809db9c1f6af0d521c23dfb3ed53f180
6,864
py
Python
vumi/transports/telnet/telnet.py
hnec-vr/vumi
b9c1100176a46774b502d5a0db225930a2d298c7
[ "BSD-3-Clause" ]
null
null
null
vumi/transports/telnet/telnet.py
hnec-vr/vumi
b9c1100176a46774b502d5a0db225930a2d298c7
[ "BSD-3-Clause" ]
null
null
null
vumi/transports/telnet/telnet.py
hnec-vr/vumi
b9c1100176a46774b502d5a0db225930a2d298c7
[ "BSD-3-Clause" ]
null
null
null
# -*- test-case-name: vumi.transports.telnet.tests.test_telnet -*- """Transport that sends and receives to telnet clients.""" from twisted.internet import reactor from twisted.internet.protocol import ServerFactory from twisted.internet.defer import inlineCallbacks, Deferred, gatherResults from twisted.conch.telnet i...
33.980198
78
0.653409
from twisted.internet import reactor from twisted.internet.protocol import ServerFactory from twisted.internet.defer import inlineCallbacks, Deferred, gatherResults from twisted.conch.telnet import (TelnetTransport, TelnetProtocol, StatefulTelnetProtocol) from twisted.python impor...
true
true
f74c2f4befd4067c390740b49db430c68c80cdb0
87
py
Python
pythonNotes/samplePgms/io/propertiesFile/1_props_file_simple.py
itsraghz/TechNotes
1fa87ec2231fa06f8c780a5399d16a0f5c769c94
[ "CC0-1.0" ]
null
null
null
pythonNotes/samplePgms/io/propertiesFile/1_props_file_simple.py
itsraghz/TechNotes
1fa87ec2231fa06f8c780a5399d16a0f5c769c94
[ "CC0-1.0" ]
1
2020-02-23T16:48:06.000Z
2020-02-23T16:48:06.000Z
pythonNotes/samplePgms/io/propertiesFile/1_props_file_simple.py
itsraghz/TechNotes
1fa87ec2231fa06f8c780a5399d16a0f5c769c94
[ "CC0-1.0" ]
1
2020-05-09T17:41:46.000Z
2020-05-09T17:41:46.000Z
# Ref URL: https://stackoverflow.com/a/8220790/1001242 import dbProps print(dbProps)
14.5
54
0.770115
import dbProps print(dbProps)
true
true
f74c2f78588920a2d7eed43f4841a75d19b16d7b
361
py
Python
OneCent/story/migrations/0007_auto_20190703_2245.py
tobias-fyi/challenges
4b4d2a8c5e24a51e33d78ab4191ebb843b788aca
[ "MIT" ]
null
null
null
OneCent/story/migrations/0007_auto_20190703_2245.py
tobias-fyi/challenges
4b4d2a8c5e24a51e33d78ab4191ebb843b788aca
[ "MIT" ]
null
null
null
OneCent/story/migrations/0007_auto_20190703_2245.py
tobias-fyi/challenges
4b4d2a8c5e24a51e33d78ab4191ebb843b788aca
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-07-04 04:45 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('story', '0006_auto_20190703_2240'), ] operations = [ migrations.RenameField( model_name='story', old_name='artist', ...
19
47
0.581717
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('story', '0006_auto_20190703_2240'), ] operations = [ migrations.RenameField( model_name='story', old_name='artist', new_name='artwork', ), ]
true
true
f74c2f818b29270ec86cc6a228ac4b98548b96d6
15,213
py
Python
Homework 4/107062240_hw4_train.py
ChristianLin0420/DeepRL
143a9bfebd264229d9d26fcdc070065225774e04
[ "MIT" ]
null
null
null
Homework 4/107062240_hw4_train.py
ChristianLin0420/DeepRL
143a9bfebd264229d9d26fcdc070065225774e04
[ "MIT" ]
null
null
null
Homework 4/107062240_hw4_train.py
ChristianLin0420/DeepRL
143a9bfebd264229d9d26fcdc070065225774e04
[ "MIT" ]
null
null
null
from osim.env import L2M2019Env ''' TD3 ''' import copy import numpy as np import pandas as pd import argparse import os import os.path from os import path import utils from collections import Iterable import torch import torch.nn as nn import torch.nn.functional as F device = torch.device("cuda" if torch.cuda...
34.186517
137
0.593243
from osim.env import L2M2019Env import copy import numpy as np import pandas as pd import argparse import os import os.path from os import path import utils from collections import Iterable import torch import torch.nn as nn import torch.nn.functional as F device = torch.device("cuda" if torch.cuda.is_available() ...
true
true
f74c2fb39d5fcf882799632558ba265e2f829ff7
6,071
py
Python
effector_database/views.py
LuukHenk/effector_database
d9702f89ffd2a23b4f5233d4ece69c1ceebd6164
[ "MIT" ]
null
null
null
effector_database/views.py
LuukHenk/effector_database
d9702f89ffd2a23b4f5233d4ece69c1ceebd6164
[ "MIT" ]
null
null
null
effector_database/views.py
LuukHenk/effector_database
d9702f89ffd2a23b4f5233d4ece69c1ceebd6164
[ "MIT" ]
null
null
null
from django.contrib import messages from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from django.urls import reverse from .models import Sequence from .forms import SequenceForm def index(request): """ Redirec...
40.205298
100
0.689837
from django.contrib import messages from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from django.urls import reverse from .models import Sequence from .forms import SequenceForm def index(request): return Http...
true
true
f74c3069f437cb2e04c89010f82c827fe872c69f
3,135
py
Python
rosWorkspace/SubDepthController/src/SubDepthController/msg/_mixer.py
chris-blay/guillemot-core
5e20bf46c10da2e6b57c3293a9d9aa402c864288
[ "Apache-2.0" ]
null
null
null
rosWorkspace/SubDepthController/src/SubDepthController/msg/_mixer.py
chris-blay/guillemot-core
5e20bf46c10da2e6b57c3293a9d9aa402c864288
[ "Apache-2.0" ]
null
null
null
rosWorkspace/SubDepthController/src/SubDepthController/msg/_mixer.py
chris-blay/guillemot-core
5e20bf46c10da2e6b57c3293a9d9aa402c864288
[ "Apache-2.0" ]
null
null
null
"""autogenerated by genpy from SubDepthController/mixer.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class mixer(genpy.Message): _md5sum = "ba840d81d8a0efbe22902b684b543995" _type = "SubDepthController/mixer" _has_header = False #flag to mar...
29.299065
91
0.6689
import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class mixer(genpy.Message): _md5sum = "ba840d81d8a0efbe22902b684b543995" _type = "SubDepthController/mixer" _has_header = False _full_text = """float32 value float32 confidence """ __slots__ = ['value','confiden...
true
true
f74c314ab2331bd519d1be84026a6990fdefa550
271
py
Python
drug_shortage/apps/upload_and_clean_excel/admin.py
duqian91/drug_shortage
70cd1692ceb01098335cb3ee7c59a221ff6d6390
[ "MIT" ]
null
null
null
drug_shortage/apps/upload_and_clean_excel/admin.py
duqian91/drug_shortage
70cd1692ceb01098335cb3ee7c59a221ff6d6390
[ "MIT" ]
null
null
null
drug_shortage/apps/upload_and_clean_excel/admin.py
duqian91/drug_shortage
70cd1692ceb01098335cb3ee7c59a221ff6d6390
[ "MIT" ]
null
null
null
from django.contrib import admin from import_export.admin import ImportExportActionModelAdmin from .models import Medication # Register your models here. class MedicationAdmin(ImportExportActionModelAdmin): pass admin.site.register(Medication, MedicationAdmin)
19.357143
60
0.833948
from django.contrib import admin from import_export.admin import ImportExportActionModelAdmin from .models import Medication class MedicationAdmin(ImportExportActionModelAdmin): pass admin.site.register(Medication, MedicationAdmin)
true
true
f74c315992625640864b2a512be0ec35c8cec91d
24,457
py
Python
ailment/expression.py
angr/ailment
638496df6547662517f5f524c9bde4b53fcbd176
[ "BSD-2-Clause" ]
16
2017-08-29T02:07:28.000Z
2022-01-05T07:38:41.000Z
ailment/expression.py
angr/ailment
638496df6547662517f5f524c9bde4b53fcbd176
[ "BSD-2-Clause" ]
18
2018-09-25T15:01:46.000Z
2022-03-23T22:28:04.000Z
ailment/expression.py
angr/ailment
638496df6547662517f5f524c9bde4b53fcbd176
[ "BSD-2-Clause" ]
19
2017-08-29T02:07:29.000Z
2021-12-15T07:09:19.000Z
# pylint:disable=arguments-renamed,isinstance-second-argument-not-valid-type try: import claripy except ImportError: claripy = None from .tagged_object import TaggedObject from .utils import get_bits, stable_hash class Expression(TaggedObject): """ The base class of all AIL expressions. """ ...
30.91909
119
0.589361
try: import claripy except ImportError: claripy = None from .tagged_object import TaggedObject from .utils import get_bits, stable_hash class Expression(TaggedObject): __slots__ = ('depth', ) def __init__(self, idx, depth, **kwargs): super().__init__(idx, **kwargs) self.depth = dep...
true
true
f74c31c6e21b4dfac44cb448993b50341b74ac92
17,952
py
Python
service/routes.py
shopcarts-nyu/shopcart
9a58ae2c08d33ef2d0175d7b52cd36c0fd603fb2
[ "Apache-2.0" ]
null
null
null
service/routes.py
shopcarts-nyu/shopcart
9a58ae2c08d33ef2d0175d7b52cd36c0fd603fb2
[ "Apache-2.0" ]
22
2022-02-25T16:10:53.000Z
2022-03-29T22:12:42.000Z
service/routes.py
shopcarts-nyu/shopcart
9a58ae2c08d33ef2d0175d7b52cd36c0fd603fb2
[ "Apache-2.0" ]
1
2022-03-17T20:20:43.000Z
2022-03-17T20:20:43.000Z
""" ShopCart Service Paths: ------ GET /shopcarts - Returns a list all of the ShopCarts POST /shopcarts - creates a new ShopCart record in the database POST /shopcarts/{customer_id}/items - add an item to the shopcart for customer_id GET /shopcarts/{customer_id} - Returns the ShopCart with a given id number GET /shopca...
45.448101
123
0.583612
import os import sys import logging from flask import Flask, request, url_for, make_response, abort from flask_restx import Api, Resource, fields, reqparse, inputs from service.models import ShopCart, DataValidationError, DatabaseConnectionError from . import status from werkzeug.exceptions import NotFound # varie...
true
true
f74c328b4e8be5db4ab0478db22db83a43dfc36e
38,645
py
Python
petitions/migrations/01000_add_counties_subcounties_courts_prisons_offences.py
DavidWaichari/pomac
79273c34dc54a301ed9fd802b0c2c487b2ac5d92
[ "MIT" ]
null
null
null
petitions/migrations/01000_add_counties_subcounties_courts_prisons_offences.py
DavidWaichari/pomac
79273c34dc54a301ed9fd802b0c2c487b2ac5d92
[ "MIT" ]
null
null
null
petitions/migrations/01000_add_counties_subcounties_courts_prisons_offences.py
DavidWaichari/pomac
79273c34dc54a301ed9fd802b0c2c487b2ac5d92
[ "MIT" ]
null
null
null
# Generated by Django 2.0.1 on 2018-01-28 19:30 from django.db import migrations def add_initial_data(apps, schema_editor): County = apps.get_model('petitions', 'County') Court = apps.get_model('petitions', 'Court') SubCounty = apps.get_model('petitions', 'SubCounty') Prison = apps.get_model('petit...
56.25182
112
0.73712
from django.db import migrations def add_initial_data(apps, schema_editor): County = apps.get_model('petitions', 'County') Court = apps.get_model('petitions', 'Court') SubCounty = apps.get_model('petitions', 'SubCounty') Prison = apps.get_model('petitions', 'Prison') Offence = apps.get_model('...
true
true
f74c32c462fc4f863e16f54c7d43ff6a5e970095
2,358
py
Python
slybot/slybot/fieldtypes/text.py
ruairif/portia
175b1f5bbec50fda6adda042481bd09c77d12bf0
[ "BSD-3-Clause" ]
8
2015-03-16T20:30:50.000Z
2021-09-21T13:05:46.000Z
slybot/slybot/fieldtypes/text.py
btomashvili/portia
9039140269f2cfca588a1feec6cc793cba87f202
[ "BSD-3-Clause" ]
1
2018-10-24T09:29:00.000Z
2018-10-24T09:29:00.000Z
slybot/slybot/fieldtypes/text.py
btomashvili/portia
9039140269f2cfca588a1feec6cc793cba87f202
[ "BSD-3-Clause" ]
4
2015-02-01T01:17:45.000Z
2022-03-04T06:07:25.000Z
""" Text types """ from scrapely.extractors import text as extract_text, safehtml class _BaseTextProcessor(object): """basic text processor, defines identity functions, some of which are overridden in subclasses """ def extract(self, text): """Matches and extracts any string, as it is""" ...
29.848101
85
0.635284
from scrapely.extractors import text as extract_text, safehtml class _BaseTextProcessor(object): def extract(self, text): return text def adapt(self, text, htmlpage): return text class RawFieldTypeProcessor(_BaseTextProcessor): name = 'raw html' description = 'raw html as it a...
true
true
f74c333572f763c53c0c3c8e2fe92288b3810986
834
py
Python
tests/unit/test_sweep.py
ilanreiter/Recommenders
32994bfa0e4fa567f7afa5c523d1086d6c4272f0
[ "MIT" ]
5
2020-02-12T23:40:11.000Z
2021-09-23T13:10:31.000Z
tests/unit/test_sweep.py
Microsoft/MLOpsSamples
799172ccedde9875862c169a7edd6da74cff7726
[ "MIT" ]
null
null
null
tests/unit/test_sweep.py
Microsoft/MLOpsSamples
799172ccedde9875862c169a7edd6da74cff7726
[ "MIT" ]
8
2019-11-06T22:27:02.000Z
2022-03-28T13:17:55.000Z
import pandas as pd import pytest from reco_utils.evaluation.parameter_sweep import generate_param_grid @pytest.fixture(scope="module") def parameter_dictionary(): params = { "param1": [1, 2, 3], "param2": [4, 5, 6], "param3": 1 } return params def test_param_sweep(parameter_di...
29.785714
89
0.571942
import pandas as pd import pytest from reco_utils.evaluation.parameter_sweep import generate_param_grid @pytest.fixture(scope="module") def parameter_dictionary(): params = { "param1": [1, 2, 3], "param2": [4, 5, 6], "param3": 1 } return params def test_param_sweep(parameter_di...
true
true
f74c33693e5338354631c922259b4c68605123c0
1,766
py
Python
libraries/botbuilder-schema/botbuilder/schema/geo_coordinates.py
matthewshim-ms/botbuilder-python
f3dbce50de01a43afdcf3efdbdca6e0d5c96dc98
[ "MIT" ]
null
null
null
libraries/botbuilder-schema/botbuilder/schema/geo_coordinates.py
matthewshim-ms/botbuilder-python
f3dbce50de01a43afdcf3efdbdca6e0d5c96dc98
[ "MIT" ]
null
null
null
libraries/botbuilder-schema/botbuilder/schema/geo_coordinates.py
matthewshim-ms/botbuilder-python
f3dbce50de01a43afdcf3efdbdca6e0d5c96dc98
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
36.791667
92
0.601359
from msrest.serialization import Model class GeoCoordinates(Model): _attribute_map = { 'elevation': {'key': 'elevation', 'type': 'float'}, 'latitude': {'key': 'latitude', 'type': 'float'}, 'longitude': {'key': 'longitude', 'type': 'float'}, 'type': {'key': 'type', 'type...
true
true
f74c33a06b7985000b721836d4db9a34577cd949
912
py
Python
scripts2/rxn_to_connections.py
ericHester/metabolicOverlap
8582d6598bfe43a71f68a5df213e00340e69eec6
[ "MIT" ]
null
null
null
scripts2/rxn_to_connections.py
ericHester/metabolicOverlap
8582d6598bfe43a71f68a5df213e00340e69eec6
[ "MIT" ]
null
null
null
scripts2/rxn_to_connections.py
ericHester/metabolicOverlap
8582d6598bfe43a71f68a5df213e00340e69eec6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 #reaction_find_connections - find connections between organisms import sys organisms = {} for filename in sys.argv[1:]: with open(filename) as current: organisms[filename] = {'ins': set(), 'outs': set()} for line in current: record = line.rstrip('\n').split('\t') ...
38
72
0.5625
import sys organisms = {} for filename in sys.argv[1:]: with open(filename) as current: organisms[filename] = {'ins': set(), 'outs': set()} for line in current: record = line.rstrip('\n').split('\t') organisms[filename]['ins'].update(record[1].split('+')) organ...
true
true
f74c3449c1a836f4982b36102f3d0726cea42c0a
1,663
py
Python
src/webpack_loader_remote/templatetags/webpack_loader_remote.py
alexseitsinger/django-webpack-loader-remote
ad68c61e22e8ff72a8fe8ba2df2c120a5eaf5e3b
[ "MIT" ]
null
null
null
src/webpack_loader_remote/templatetags/webpack_loader_remote.py
alexseitsinger/django-webpack-loader-remote
ad68c61e22e8ff72a8fe8ba2df2c120a5eaf5e3b
[ "MIT" ]
null
null
null
src/webpack_loader_remote/templatetags/webpack_loader_remote.py
alexseitsinger/django-webpack-loader-remote
ad68c61e22e8ff72a8fe8ba2df2c120a5eaf5e3b
[ "MIT" ]
null
null
null
from django import template, VERSION from django.conf import settings from django.utils.safestring import mark_safe from .. import utils register = template.Library() @register.simple_tag def render_presigned_bundle( bundle_name, bucket_name, prefix=None, expiration=None, extension=None, con...
26.396825
86
0.704149
from django import template, VERSION from django.conf import settings from django.utils.safestring import mark_safe from .. import utils register = template.Library() @register.simple_tag def render_presigned_bundle( bundle_name, bucket_name, prefix=None, expiration=None, extension=None, con...
true
true
f74c3484eea39d3ac0bbdda97fbdfe95c8f05330
806
py
Python
DjangoErp/urls.py
liuyubeyond1121/DjangoErp
fc1915e6738616397f0e82e02971b53416c96bbf
[ "MIT" ]
null
null
null
DjangoErp/urls.py
liuyubeyond1121/DjangoErp
fc1915e6738616397f0e82e02971b53416c96bbf
[ "MIT" ]
null
null
null
DjangoErp/urls.py
liuyubeyond1121/DjangoErp
fc1915e6738616397f0e82e02971b53416c96bbf
[ "MIT" ]
null
null
null
"""DjangoErp URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
33.583333
77
0.705955
from django.contrib import admin from django.urls import path import xadmin urlpatterns = [ path('xadmin/', xadmin.site.urls), ]
true
true
f74c351db9203b291f30697ae8a98cdfe8ebc58e
86
py
Python
app/config.py
directedbyshawn/Secure-Login
15f2a6168986b11ffbde318333415671fb62578f
[ "MIT" ]
null
null
null
app/config.py
directedbyshawn/Secure-Login
15f2a6168986b11ffbde318333415671fb62578f
[ "MIT" ]
null
null
null
app/config.py
directedbyshawn/Secure-Login
15f2a6168986b11ffbde318333415671fb62578f
[ "MIT" ]
null
null
null
''' Flask app config. ''' DB_FILE = 'app/instance/var/db/users.db' display = {}
10.75
40
0.593023
DB_FILE = 'app/instance/var/db/users.db' display = {}
true
true
f74c37206f6f52e32821cd41254082ea037a72dc
2,134
py
Python
recommender_vanilla.py
gptix/DS--Data-Engineering-
2975e4b538aed3e477bea56f0b09601452ed4837
[ "MIT" ]
1
2020-03-03T18:01:35.000Z
2020-03-03T18:01:35.000Z
recommender_vanilla.py
gptix/DS--Data-Engineering-
2975e4b538aed3e477bea56f0b09601452ed4837
[ "MIT" ]
null
null
null
recommender_vanilla.py
gptix/DS--Data-Engineering-
2975e4b538aed3e477bea56f0b09601452ed4837
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from sklearn.neighbors import NearestNeighbors from sklearn.feature_extraction.text import CountVectorizer ### Import and shape data path_base = 'gitstuff/buildweek2/DS--Data-Engineering-/' df = pd.read_csv(path_base + 'data/cannabis.csv') ## select subset with high rating good...
30.485714
102
0.704311
import numpy as np import pandas as pd from sklearn.neighbors import NearestNeighbors from sklearn.feature_extraction.text import CountVectorizer neering-/' df = pd.read_csv(path_base + 'data/cannabis.csv') = 4.0] an, '', regex=True) def clean_string(strng): s = strng.replace(","," ") s = s.replace("("," ...
true
true
f74c38398242b17a9da905204af4476203638225
5,219
py
Python
photons/equipment/__init__.py
MSLNZ/pr-single-photons
b3f52d2a2a7cf5385d885f30ae9555e1e7d77ec2
[ "MIT" ]
null
null
null
photons/equipment/__init__.py
MSLNZ/pr-single-photons
b3f52d2a2a7cf5385d885f30ae9555e1e7d77ec2
[ "MIT" ]
null
null
null
photons/equipment/__init__.py
MSLNZ/pr-single-photons
b3f52d2a2a7cf5385d885f30ae9555e1e7d77ec2
[ "MIT" ]
null
null
null
""" Custom classes for communicating with equipment. """ import importlib import logging import os import weakref from msl.qt import QtCore from msl.network import Service from msl.io import search from msl.equipment.utils import convert_to_enum from .. import ( logger, Register, ) registry = [] """:class:`l...
37.278571
113
0.65549
import importlib import logging import os import weakref from msl.qt import QtCore from msl.network import Service from msl.io import search from msl.equipment.utils import convert_to_enum from .. import ( logger, Register, ) registry = [] class BaseEquipment(QtCore.QObject, Service): def __init__(sel...
true
true
f74c3873bd8f7654a0bf96d27581d021fcf54999
2,079
py
Python
openpyxl/chart/tests/test_text.py
VariantXYZ/openpyxl-variant
873cc3dda43578c098843ebe930325c879d20baf
[ "MIT" ]
null
null
null
openpyxl/chart/tests/test_text.py
VariantXYZ/openpyxl-variant
873cc3dda43578c098843ebe930325c879d20baf
[ "MIT" ]
null
null
null
openpyxl/chart/tests/test_text.py
VariantXYZ/openpyxl-variant
873cc3dda43578c098843ebe930325c879d20baf
[ "MIT" ]
null
null
null
# Copyright (c) 2010-2020 openpyxl import pytest from openpyxl.xml.functions import fromstring, tostring from openpyxl.tests.helper import compare_xml @pytest.fixture def RichText(): from ..text import RichText return RichText class TestRichText: def test_ctor(self, RichText): text = RichText...
21.65625
78
0.513228
import pytest from openpyxl.xml.functions import fromstring, tostring from openpyxl.tests.helper import compare_xml @pytest.fixture def RichText(): from ..text import RichText return RichText class TestRichText: def test_ctor(self, RichText): text = RichText() xml = tostring(text.to_...
true
true
f74c3b396eb0cfbd452e7b79d9f6ed3521f6d6de
1,095
py
Python
jirainfo/jirahelper.py
hypebeast/jira-info
a7642aa90f5f77f56898c5b53d1e850fcd4a982c
[ "MIT" ]
1
2015-08-19T07:36:36.000Z
2015-08-19T07:36:36.000Z
jirainfo/jirahelper.py
hypebeast/jira-info
a7642aa90f5f77f56898c5b53d1e850fcd4a982c
[ "MIT" ]
null
null
null
jirainfo/jirahelper.py
hypebeast/jira-info
a7642aa90f5f77f56898c5b53d1e850fcd4a982c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import click from jira import JIRA, JIRAError from jirainfo.helpers import printJiraErrorAndExit, printErrorMsg class JiraHelper(object): def __init__(self, host, user="", password=""): self.host = host self.user = user self.password = password try: ...
28.815789
110
0.579909
import click from jira import JIRA, JIRAError from jirainfo.helpers import printJiraErrorAndExit, printErrorMsg class JiraHelper(object): def __init__(self, host, user="", password=""): self.host = host self.user = user self.password = password try: if user != "" and ...
true
true
f74c3b3c091e218276bfe1b1c8c61621dbd615e2
658
py
Python
generate_dmrpp.py
amarouane-ABDELHAK/dmrpp-file-generator-docker
85210b80d4204c5ca5325fe7167c7e1cd8ea62e8
[ "Apache-2.0" ]
null
null
null
generate_dmrpp.py
amarouane-ABDELHAK/dmrpp-file-generator-docker
85210b80d4204c5ca5325fe7167c7e1cd8ea62e8
[ "Apache-2.0" ]
null
null
null
generate_dmrpp.py
amarouane-ABDELHAK/dmrpp-file-generator-docker
85210b80d4204c5ca5325fe7167c7e1cd8ea62e8
[ "Apache-2.0" ]
1
2021-03-24T17:23:12.000Z
2021-03-24T17:23:12.000Z
from os import listdir from os.path import isfile, join, basename from dmrpp_generator.main import DMRPPGenerator from re import match if __name__ == "__main__": workstation_path = "/workstation/" join_path = lambda x: join(workstation_path, x) input_files = [join_path(f) for f in listdir(workstation_path...
43.866667
118
0.659574
from os import listdir from os.path import isfile, join, basename from dmrpp_generator.main import DMRPPGenerator from re import match if __name__ == "__main__": workstation_path = "/workstation/" join_path = lambda x: join(workstation_path, x) input_files = [join_path(f) for f in listdir(workstation_path...
true
true
f74c3c3ca84aefc28c921d18f0c52edf55841aa6
2,062
py
Python
data/datasets_downloader.py
liorgreenb/cartoon-face-domain-transfer
be439c24a1432ffc5bc9a50734c31bb4758cc679
[ "MIT" ]
1
2020-09-29T02:00:28.000Z
2020-09-29T02:00:28.000Z
data/datasets_downloader.py
liorgreenb/cartoon-face-domain-transfer
be439c24a1432ffc5bc9a50734c31bb4758cc679
[ "MIT" ]
null
null
null
data/datasets_downloader.py
liorgreenb/cartoon-face-domain-transfer
be439c24a1432ffc5bc9a50734c31bb4758cc679
[ "MIT" ]
1
2021-05-29T16:35:21.000Z
2021-05-29T16:35:21.000Z
import hashlib import os import shutil from urllib.request import urlretrieve from tqdm import tqdm from constants import CELEB_A_URL, CELEB_A_HASH from services import _unzip def download_cartoonset10k(): print("downloading cartoonset10k dataset") os.system("gsutil cp gs://cartoonset_public_files/cartoonset...
31.723077
110
0.668768
import hashlib import os import shutil from urllib.request import urlretrieve from tqdm import tqdm from constants import CELEB_A_URL, CELEB_A_HASH from services import _unzip def download_cartoonset10k(): print("downloading cartoonset10k dataset") os.system("gsutil cp gs://cartoonset_public_files/cartoonset...
true
true
f74c3c485a3a675540fd5cbc16f751a024c024ac
589
py
Python
server/routes/health.py
Qebuqci/qebuqci-python-microservice
795b1b75979f5be8f866639c585c9f9b31dec685
[ "MIT" ]
null
null
null
server/routes/health.py
Qebuqci/qebuqci-python-microservice
795b1b75979f5be8f866639c585c9f9b31dec685
[ "MIT" ]
null
null
null
server/routes/health.py
Qebuqci/qebuqci-python-microservice
795b1b75979f5be8f866639c585c9f9b31dec685
[ "MIT" ]
null
null
null
from flask import jsonify from server import app @app.route("/health") def health(): """health route""" state = {"status": "UP"} return jsonify(state) @app.route('/answer') def answer(): answer = {'The Answer to Life the Universe and Everything': 42} return jsonify(answer) @app.route('/answer/<n...
25.608696
89
0.641766
from flask import jsonify from server import app @app.route("/health") def health(): state = {"status": "UP"} return jsonify(state) @app.route('/answer') def answer(): answer = {'The Answer to Life the Universe and Everything': 42} return jsonify(answer) @app.route('/answer/<number>') def CheckAnswe...
true
true
f74c3c67f9ce0c6b555b176a3221f40315519343
1,450
py
Python
utils/preprocessing/create-json.py
simra/msrflute
c28e2e6bcfa9464b8640ccd625393bbed28491c3
[ "MIT" ]
29
2021-11-30T16:18:04.000Z
2022-03-29T13:47:20.000Z
utils/preprocessing/create-json.py
simra/msrflute
c28e2e6bcfa9464b8640ccd625393bbed28491c3
[ "MIT" ]
2
2022-01-07T19:53:26.000Z
2022-01-21T05:10:17.000Z
utils/preprocessing/create-json.py
simra/msrflute
c28e2e6bcfa9464b8640ccd625393bbed28491c3
[ "MIT" ]
5
2021-12-07T05:14:12.000Z
2022-03-22T16:17:26.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import json import time from tqdm import tqdm import pandas as pd path = r'C:\Users\train.tsv' def local_time(): return str(time.strftime("%H:%M:%S",time.localtime())) print(local_time() + " Starting script " ) columns = ['author','nu...
32.222222
102
0.688276
import json import time from tqdm import tqdm import pandas as pd path = r'C:\Users\train.tsv' def local_time(): return str(time.strftime("%H:%M:%S",time.localtime())) print(local_time() + " Starting script " ) columns = ['author','num1','content','str1','str2','num2','subreddit'] df = pd.read_csv(path, ...
true
true
f74c3c9ff5dd15e22e035c3c92cc19aa2014552a
2,469
py
Python
discount_cashflows/discount_cashflows.py
hnguye12333/Python_
6aebb00d18ff5f276e6d1cc006c5e664bf9252eb
[ "MIT" ]
6
2020-06-13T12:00:14.000Z
2021-09-12T13:33:08.000Z
discount_cashflows/discount_cashflows.py
hnguye12333/Python_
6aebb00d18ff5f276e6d1cc006c5e664bf9252eb
[ "MIT" ]
null
null
null
discount_cashflows/discount_cashflows.py
hnguye12333/Python_
6aebb00d18ff5f276e6d1cc006c5e664bf9252eb
[ "MIT" ]
5
2020-07-23T03:37:19.000Z
2021-12-03T11:59:57.000Z
path_cashflow = r"./Cashflows.csv" path_rate = r"./Yield curve.csv" # Implementation with Pandas import pandas as pd # Read in the cash flows data and rate data as csv cashflow_df = pd.read_csv(path_cashflow) rate_df = pd.read_csv(path_rate) # Calculate discount factor from the rates rate_df["Discount factor"] = 1 /...
34.291667
109
0.757797
path_cashflow = r"./Cashflows.csv" path_rate = r"./Yield curve.csv" import pandas as pd cashflow_df = pd.read_csv(path_cashflow) rate_df = pd.read_csv(path_rate) rate_df["Discount factor"] = 1 / (1 + rate_df["Interest rate"])**rate_df["Year"] cf_with_rate_df = cashflow_df.merge(rate_df, on=["Currency", "Year"],...
true
true
f74c3e6ac712132339d9a64dcf78a87c5b2c02e0
1,048
py
Python
tests/fiaas_skipper/web/test_metrics.py
eduramirezh/skipper
6cf87b4753f6c0998eaaca8073266173e31b04f6
[ "Apache-2.0" ]
7
2018-05-02T14:00:56.000Z
2022-01-13T09:31:28.000Z
tests/fiaas_skipper/web/test_metrics.py
eduramirezh/skipper
6cf87b4753f6c0998eaaca8073266173e31b04f6
[ "Apache-2.0" ]
43
2018-03-27T13:35:20.000Z
2022-03-23T09:02:35.000Z
tests/fiaas_skipper/web/test_metrics.py
eduramirezh/skipper
6cf87b4753f6c0998eaaca8073266173e31b04f6
[ "Apache-2.0" ]
7
2020-06-26T08:54:41.000Z
2022-03-17T11:49:32.000Z
#!/usr/bin/env python # -*- coding: utf-8 # Copyright 2017-2019 The FIAAS Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
29.111111
74
0.726145
from __future__ import absolute_import import pytest from flask import Flask from fiaas_skipper.web.metrics import metrics class TestMetrics(object): @pytest.fixture def app(self): app = Flask(__name__) app.register_blueprint(metrics) return app.test_client() de...
true
true
f74c3fce1ad549692eabcc7aa824665c8643f9f0
5,621
py
Python
batchflow/models/torch/network.py
analysiscenter/dataset
50a0607442bd2eb675c8f6a8d7bc5e9dbabe36c0
[ "Apache-2.0" ]
101
2017-06-05T07:33:54.000Z
2018-10-28T04:55:23.000Z
batchflow/models/torch/network.py
analysiscenter/dataset
50a0607442bd2eb675c8f6a8d7bc5e9dbabe36c0
[ "Apache-2.0" ]
23
2017-11-08T20:01:58.000Z
2018-07-15T09:08:02.000Z
batchflow/models/torch/network.py
analysiscenter/dataset
50a0607442bd2eb675c8f6a8d7bc5e9dbabe36c0
[ "Apache-2.0" ]
23
2017-06-06T05:13:37.000Z
2018-11-01T14:33:38.000Z
""" Network class: a model, made from multiple parts (modules). """ from torch import nn from .repr_mixin import ModuleDictReprMixin from .modules import (DefaultModule, EncoderModule, DecoderModule, MLPDecoderModule, HuggingFaceLoader, TIMMLoader) from .utils import get_sha...
42.263158
114
0.639922
from torch import nn from .repr_mixin import ModuleDictReprMixin from .modules import (DefaultModule, EncoderModule, DecoderModule, MLPDecoderModule, HuggingFaceLoader, TIMMLoader) from .utils import get_shape, get_device, make_initialization_inputs, make_shallow_dict cla...
true
true
f74c400d927c3004785f0cf10d68d480f9d7714c
10,758
py
Python
btools/building/customobj.py
proteanblank/building_tool
920bb33dbc7d386ba8c2f669c90bddd9efd9aaf2
[ "MIT" ]
559
2020-07-02T21:06:38.000Z
2022-03-30T17:58:56.000Z
btools/building/customobj.py
cokar/building_tools
920bb33dbc7d386ba8c2f669c90bddd9efd9aaf2
[ "MIT" ]
63
2020-07-02T16:23:27.000Z
2022-03-09T11:33:06.000Z
btools/building/customobj.py
cokar/building_tools
920bb33dbc7d386ba8c2f669c90bddd9efd9aaf2
[ "MIT" ]
59
2020-07-05T06:14:23.000Z
2022-03-12T03:22:18.000Z
""" Tools to allow users to place custom meshes on a building """ import bpy import bmesh from mathutils import Matrix, Vector from bpy.props import PointerProperty from .facemap import ( FaceMap, add_faces_to_map, add_facemap_for_groups ) from ..utils import ( select, local_xyz, ...
34.152381
116
0.669548
import bpy import bmesh from mathutils import Matrix, Vector from bpy.props import PointerProperty from .facemap import ( FaceMap, add_faces_to_map, add_facemap_for_groups ) from ..utils import ( select, local_xyz, bm_to_obj, crash_safe, bm_from_obj, popup_message...
true
true
f74c423744df36a1dfe99eccd300e1a0eb73f076
11,236
py
Python
tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_diag.py
bourov/probability
1e4053a0938b4773c3425bcbb07b3f1e5d50c7e2
[ "Apache-2.0" ]
2
2020-12-17T20:43:24.000Z
2021-06-11T22:09:16.000Z
tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_diag.py
bourov/probability
1e4053a0938b4773c3425bcbb07b3f1e5d50c7e2
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/backend/numpy/gen/linear_operator_diag.py
bourov/probability
1e4053a0938b4773c3425bcbb07b3f1e5d50c7e2
[ "Apache-2.0" ]
1
2020-12-19T13:05:15.000Z
2020-12-19T13:05:15.000Z
# Copyright 2020 The TensorFlow Probability Authors. All Rights Reserved. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # THIS FILE IS AUTO-GENERATED BY `gen_linear_operators.py`. # DO NOT MODIFY DIRECTLY. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...
38.348123
113
0.686899
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow_probability.python.internal.backend.numpy import ops from tensorflow_probability.python.internal.backend.numpy import numpy_array as array_ops from tensorflow_p...
true
true
f74c43234a70673612145c4fb39905f4b50c965e
1,020
py
Python
scripts/wall_stop.py
kenjiinukai/pimouse_run_corridor
e804855a670d37996695f87cf68630d7c253e57f
[ "BSD-3-Clause" ]
null
null
null
scripts/wall_stop.py
kenjiinukai/pimouse_run_corridor
e804855a670d37996695f87cf68630d7c253e57f
[ "BSD-3-Clause" ]
null
null
null
scripts/wall_stop.py
kenjiinukai/pimouse_run_corridor
e804855a670d37996695f87cf68630d7c253e57f
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import rospy,copy from geometry_msgs.msg import Twist from std_srvs.srv import Trigger, TriggerResponse from pimouse_ros.msg import LightSensorValues class WallStop(): def __init__(self): self.cmd_vel = rospy.Publisher('/cmd_vel',Twist,queue_size=1) self.sensor_values = Light...
30
76
0.682353
import rospy,copy from geometry_msgs.msg import Twist from std_srvs.srv import Trigger, TriggerResponse from pimouse_ros.msg import LightSensorValues class WallStop(): def __init__(self): self.cmd_vel = rospy.Publisher('/cmd_vel',Twist,queue_size=1) self.sensor_values = LightSensorValues() ...
true
true
f74c45fd6ffae380f1dbf7e897526bbade6a2a0f
389
py
Python
Blog_Website/BlogApp/migrations/0006_alter_blogpost_image.py
MetinIlgar/BlogWebsite
014ae848dbed2d42c86654f0fbdb4450ccd9ef00
[ "MIT" ]
1
2022-02-25T10:16:04.000Z
2022-02-25T10:16:04.000Z
Blog_Website/BlogApp/migrations/0006_alter_blogpost_image.py
MetinIlgar/BlogWebsite
014ae848dbed2d42c86654f0fbdb4450ccd9ef00
[ "MIT" ]
null
null
null
Blog_Website/BlogApp/migrations/0006_alter_blogpost_image.py
MetinIlgar/BlogWebsite
014ae848dbed2d42c86654f0fbdb4450ccd9ef00
[ "MIT" ]
null
null
null
# Generated by Django 4.0.3 on 2022-03-06 12:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('BlogApp', '0005_alter_blogpost_image'), ] operations = [ migrations.AlterField( model_name='blogpost', name='image',...
20.473684
50
0.596401
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('BlogApp', '0005_alter_blogpost_image'), ] operations = [ migrations.AlterField( model_name='blogpost', name='image', field=models.ImageField(upload_to=...
true
true
f74c48fe98e8077d82684a4c61e4e4650e5b32b9
3,334
py
Python
tests/_test_pcli.py
Phlya/pysradb
f41c0b2f58ac3ed7dbbdd103f4edc8d30a5fe61d
[ "BSD-3-Clause" ]
null
null
null
tests/_test_pcli.py
Phlya/pysradb
f41c0b2f58ac3ed7dbbdd103f4edc8d30a5fe61d
[ "BSD-3-Clause" ]
null
null
null
tests/_test_pcli.py
Phlya/pysradb
f41c0b2f58ac3ed7dbbdd103f4edc8d30a5fe61d
[ "BSD-3-Clause" ]
null
null
null
"""Tests for cli.py """ import os import subprocess import sys from shlex import quote from shlex import split import pytest from pysradb import SRAdb def run(command): if sys.version_info.minor >= 7: result = subprocess.run(split(command), capture_output=True) else: result = subprocess.run(...
25.844961
93
0.673965
import os import subprocess import sys from shlex import quote from shlex import split import pytest from pysradb import SRAdb def run(command): if sys.version_info.minor >= 7: result = subprocess.run(split(command), capture_output=True) else: result = subprocess.run(split(command), check=Tr...
true
true
f74c499d0b49afbed9411bf5ad160301a350a8ab
1,948
py
Python
local_mysql.py
wjhtime/region_spider
d1828abc52d0a2ba39f48046786f274c053985d8
[ "MIT" ]
null
null
null
local_mysql.py
wjhtime/region_spider
d1828abc52d0a2ba39f48046786f274c053985d8
[ "MIT" ]
null
null
null
local_mysql.py
wjhtime/region_spider
d1828abc52d0a2ba39f48046786f274c053985d8
[ "MIT" ]
null
null
null
import pymysql from database import db import asyncio import aiomysql class local_mysql(): def __init__(self): self.host = db['host'] self.user = db['user'] self.password = db['password'] self.database = db['database'] self.db = pymysql.connect(self.host, self.user, self.pa...
36.074074
116
0.532341
import pymysql from database import db import asyncio import aiomysql class local_mysql(): def __init__(self): self.host = db['host'] self.user = db['user'] self.password = db['password'] self.database = db['database'] self.db = pymysql.connect(self.host, self.user, self.pa...
true
true
f74c49dc60c99db3a2cd56ddac964da75b317686
50
py
Python
dygie/predictors/__init__.py
AumPandya95/dygiepp
b2cd7f5d8f2269c16fdeb7562d2d72b2cb4ee218
[ "MIT" ]
410
2019-09-10T01:27:17.000Z
2022-03-28T23:22:43.000Z
dygie/predictors/__init__.py
AumPandya95/dygiepp
b2cd7f5d8f2269c16fdeb7562d2d72b2cb4ee218
[ "MIT" ]
94
2019-09-12T01:46:39.000Z
2022-03-21T19:16:46.000Z
dygie/predictors/__init__.py
AumPandya95/dygiepp
b2cd7f5d8f2269c16fdeb7562d2d72b2cb4ee218
[ "MIT" ]
110
2019-09-17T07:28:34.000Z
2022-03-20T05:33:27.000Z
from dygie.predictors.dygie import DyGIEPredictor
25
49
0.88
from dygie.predictors.dygie import DyGIEPredictor
true
true
f74c4a56c35c38e3290890ac2500e8cc6102cd50
1,783
py
Python
configs/_base_/datasets/potsdam.py
heytanay/mmsegmentation
7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8
[ "Apache-2.0" ]
11
2022-02-04T01:09:45.000Z
2022-03-08T05:49:16.000Z
configs/_base_/datasets/potsdam.py
heytanay/mmsegmentation
7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8
[ "Apache-2.0" ]
1
2021-11-25T01:20:11.000Z
2021-11-25T01:20:29.000Z
configs/_base_/datasets/potsdam.py
heytanay/mmsegmentation
7ddd2fe2ecff9c95999bd00ec05cc37eafb558f8
[ "Apache-2.0" ]
1
2021-12-01T01:31:25.000Z
2021-12-01T01:31:25.000Z
# dataset settings dataset_type = 'PotsdamDataset' data_root = 'data/potsdam' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) crop_size = (512, 512) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', reduce_zero_label=True), dic...
32.418182
77
0.613012
dataset_type = 'PotsdamDataset' data_root = 'data/potsdam' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) crop_size = (512, 512) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', reduce_zero_label=True), dict(type='Resize', i...
true
true
f74c4c486465c1b521636860c573a5e50bfdd556
16,691
py
Python
circletracking/algebraic.py
caspervdw/circletracking
2d981a1bd3f2982d5d36932d7d5a38e912fcdba3
[ "BSD-3-Clause" ]
4
2016-03-08T14:10:05.000Z
2022-02-03T21:26:51.000Z
circletracking/algebraic.py
caspervdw/circletracking
2d981a1bd3f2982d5d36932d7d5a38e912fcdba3
[ "BSD-3-Clause" ]
2
2016-03-29T12:40:28.000Z
2016-04-01T09:36:58.000Z
circletracking/algebraic.py
caspervdw/circletracking
2d981a1bd3f2982d5d36932d7d5a38e912fcdba3
[ "BSD-3-Clause" ]
2
2016-03-08T14:10:48.000Z
2020-12-23T05:59:26.000Z
""" Functions for algebraic fitting """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np MODE_DICT_ELLIPSE = {'circle': 'xy', 'ellipse_aligned': '0', 'ellipse': ''} MODE_DICT_ELLIPSOID = {'sphere': 'xyz', 'prolate': 'xy', 'oblate...
35.817597
86
0.533581
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np MODE_DICT_ELLIPSE = {'circle': 'xy', 'ellipse_aligned': '0', 'ellipse': ''} MODE_DICT_ELLIPSOID = {'sphere': 'xyz', 'prolate': 'xy', 'oblate': 'xy', 'ellipso...
true
true
f74c4e1f80f825bd92d56c627e268d4c99f0f4fd
2,905
py
Python
get_results.py
lwj5/simple-amt
9af304f2dda3da818158c21554ede4f9fae0a89d
[ "MIT" ]
null
null
null
get_results.py
lwj5/simple-amt
9af304f2dda3da818158c21554ede4f9fae0a89d
[ "MIT" ]
null
null
null
get_results.py
lwj5/simple-amt
9af304f2dda3da818158c21554ede4f9fae0a89d
[ "MIT" ]
null
null
null
import argparse import json import os import re import sys import simpleamt def process_assignments(mtc, hit_id, status): results = [] paginator = mtc.get_paginator("list_assignments_for_hit") try: for a_page in paginator.paginate( HITId=hit_id, PaginationConfig={"PageSize": 100} ...
33.011364
77
0.536317
import argparse import json import os import re import sys import simpleamt def process_assignments(mtc, hit_id, status): results = [] paginator = mtc.get_paginator("list_assignments_for_hit") try: for a_page in paginator.paginate( HITId=hit_id, PaginationConfig={"PageSize": 100} ...
true
true
f74c4e79064234217414697ba87113665a26918e
2,846
py
Python
src/AHP/src/example_3.py
RichardOkubo/PythonScripts
86090465f739a2fc3f1f8ef22977efd241f97361
[ "MIT" ]
null
null
null
src/AHP/src/example_3.py
RichardOkubo/PythonScripts
86090465f739a2fc3f1f8ef22977efd241f97361
[ "MIT" ]
null
null
null
src/AHP/src/example_3.py
RichardOkubo/PythonScripts
86090465f739a2fc3f1f8ef22977efd241f97361
[ "MIT" ]
null
null
null
from itertools import combinations from pprint import pprint # noqa from ahpy import Compare criteria_comparisons = { ('Cost', 'Safety'): 3, ('Cost', 'Style'): 7, ('Cost', 'Capacity'): 3, ('Safety', 'Style'): 9, ('Safety', 'Capacity'): 1, ('Style', 'Capacity'): 1/7 } criteria = Compare('Crit...
37.447368
112
0.673928
from itertools import combinations from pprint import pprint from ahpy import Compare criteria_comparisons = { ('Cost', 'Safety'): 3, ('Cost', 'Style'): 7, ('Cost', 'Capacity'): 3, ('Safety', 'Style'): 9, ('Safety', 'Capacity'): 1, ('Style', 'Capacity'): 1/7 } criteria = Compare('Criteria',...
true
true
f74c4fae64045620c7d946091086db095763ff8e
3,308
py
Python
datasets/mnist.py
chunchentu/EvadeML-Zoo
dd8e85b9424871496a4dfb62f603f97e733f2433
[ "MIT" ]
164
2017-08-18T16:24:44.000Z
2022-03-18T19:32:17.000Z
datasets/mnist.py
chunchentu/EvadeML-Zoo
dd8e85b9424871496a4dfb62f603f97e733f2433
[ "MIT" ]
14
2018-12-19T20:58:54.000Z
2022-03-13T14:34:41.000Z
datasets/mnist.py
chunchentu/EvadeML-Zoo
dd8e85b9424871496a4dfb62f603f97e733f2433
[ "MIT" ]
74
2017-11-06T15:35:19.000Z
2022-02-09T05:53:09.000Z
from keras.datasets import mnist from keras.utils import np_utils import sys, os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from models.carlini_models import carlini_mnist_model from models.cleverhans_models import cleverhans_mnist_model from models.pgdtrained_models import pgdtraine...
42.961039
117
0.688029
from keras.datasets import mnist from keras.utils import np_utils import sys, os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from models.carlini_models import carlini_mnist_model from models.cleverhans_models import cleverhans_mnist_model from models.pgdtrained_models import pgdtraine...
true
true
f74c4fefac9ba7b97021531b06da4c4b18824dc9
777
py
Python
byemail/storage/__init__.py
jrmi/byemail
5d8ac2a0f9308aa9e3098948ba8a7a4598848539
[ "MIT" ]
10
2018-03-03T16:12:56.000Z
2021-01-18T10:52:45.000Z
byemail/storage/__init__.py
jrmi/byemail
5d8ac2a0f9308aa9e3098948ba8a7a4598848539
[ "MIT" ]
69
2018-03-01T20:08:46.000Z
2019-05-05T18:53:30.000Z
byemail/storage/__init__.py
jrmi/byemail
5d8ac2a0f9308aa9e3098948ba8a7a4598848539
[ "MIT" ]
3
2018-03-12T15:17:26.000Z
2020-04-17T14:19:47.000Z
from importlib import import_module from byemail.conf import settings class DoesntExists(Exception): pass class MultipleResults(Exception): pass class Storage(): def __init__(self, loop=None): self.loop = loop self._storage = None def load_storage(self, loop=None): global st...
22.852941
71
0.656371
from importlib import import_module from byemail.conf import settings class DoesntExists(Exception): pass class MultipleResults(Exception): pass class Storage(): def __init__(self, loop=None): self.loop = loop self._storage = None def load_storage(self, loop=None): global st...
true
true
f74c5152cbb975dde780f592b79085e585faa3ad
1,871
py
Python
comment/views.py
28harishkumar/Social-website-django
0b72ce34241112b87921ef095f6f47d4f958117c
[ "MIT" ]
3
2015-07-15T07:01:29.000Z
2020-03-29T09:12:39.000Z
comment/views.py
28harishkumar/Social-website-django
0b72ce34241112b87921ef095f6f47d4f958117c
[ "MIT" ]
null
null
null
comment/views.py
28harishkumar/Social-website-django
0b72ce34241112b87921ef095f6f47d4f958117c
[ "MIT" ]
null
null
null
from django.shortcuts import render , render_to_response, RequestContext, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponse , Http404 from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse fro...
35.301887
91
0.639765
from django.shortcuts import render , render_to_response, RequestContext, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponse , Http404 from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse fro...
true
true
f74c519f489d3c7875561b51c472993297f0037f
4,471
py
Python
elementpath/xpath30/xpath30_parser.py
sthagen/sissaschool-elementpath
fbb07c03451790e7896d354a57120d6c4bedcc18
[ "MIT" ]
1
2021-09-16T14:44:42.000Z
2021-09-16T14:44:42.000Z
elementpath/xpath30/xpath30_parser.py
sthagen/elementpath
fbb07c03451790e7896d354a57120d6c4bedcc18
[ "MIT" ]
null
null
null
elementpath/xpath30/xpath30_parser.py
sthagen/elementpath
fbb07c03451790e7896d354a57120d6c4bedcc18
[ "MIT" ]
null
null
null
# # Copyright (c), 2018-2021, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
35.204724
90
0.611273
from copy import deepcopy from typing import Any, Dict, Optional from ..namespaces import XPATH_MATH_FUNCTIONS_NAMESPACE from ..xpath2 import XPath2Parser DecimalFormatsType = Dict[Optional[str], Dict[str, str]] class XPath30Parser(XPath2Parser): version = '3.0' SYMBOLS = XPath2Parser.SYMBOLS | {...
true
true
f74c5372a951d6328624b116b0d2baefbbf0a3a6
606
py
Python
src/TwitterStreamer.py
Rafii-Ayoub/Twitter-Advertising-Bot
0b9f34f6ceb134f020c45d671f26f193ca4663f2
[ "MIT" ]
null
null
null
src/TwitterStreamer.py
Rafii-Ayoub/Twitter-Advertising-Bot
0b9f34f6ceb134f020c45d671f26f193ca4663f2
[ "MIT" ]
null
null
null
src/TwitterStreamer.py
Rafii-Ayoub/Twitter-Advertising-Bot
0b9f34f6ceb134f020c45d671f26f193ca4663f2
[ "MIT" ]
null
null
null
from TwitterAuthenticater import TwitterAuthenticator from TwitterListener import TwitterListener from tweepy import Stream class TwitterStreamer(): """ Class for streaming and processing live tweets. """ # Constructor def __init__(self): self.twitter_autenticator = TwitterAuthenticato...
30.3
68
0.742574
from TwitterAuthenticater import TwitterAuthenticator from TwitterListener import TwitterListener from tweepy import Stream class TwitterStreamer(): def __init__(self): self.twitter_autenticator = TwitterAuthenticator() def stream_tweets(self, fetched_tweets_filename, hash_tag_list): ...
true
true
f74c54da4cce6b3b7efa8a1039f86dd6fc6458d8
2,034
py
Python
paddlehub/compat/task/checkpoint.py
chunzhang-hub/PaddleHub
c5cfd021f77fd59340fb26e223e09a592e6a345f
[ "Apache-2.0" ]
8,360
2019-01-18T10:46:45.000Z
2022-03-31T14:50:02.000Z
paddlehub/compat/task/checkpoint.py
dwuping/PaddleHub
9a3b23295947e22149cc85c17cb4cf23c03f9e06
[ "Apache-2.0" ]
1,158
2019-04-11T09:22:43.000Z
2022-03-31T12:12:09.000Z
paddlehub/compat/task/checkpoint.py
dwuping/PaddleHub
9a3b23295947e22149cc85c17cb4cf23c03f9e06
[ "Apache-2.0" ]
1,677
2019-04-09T15:07:40.000Z
2022-03-31T06:41:10.000Z
# coding:utf-8 # Copyright (c) 2019 PaddlePaddle 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 req...
35.684211
113
0.717306
import os from typing import Tuple import paddle from paddlehub.compat.task import checkpoint_pb2 from paddlehub.utils.log import logger CKPT_FILE_NAME = 'ckpt.meta' def load_checkpoint(checkpoint_dir: str, exe: paddle.static.Executor, main_program: paddle.static.Program) -> Tupl...
true
true
f74c55096ebee2d02a6aa231b036cb368e54bb27
965
py
Python
problems/algoexpert/searching/shifted_binary_search.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
problems/algoexpert/searching/shifted_binary_search.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
problems/algoexpert/searching/shifted_binary_search.py
JayMonari/py-personal
ef16d030cc7fe2266d661e1378d95f588229b746
[ "MIT" ]
null
null
null
from typing import List def shifted_binary_search(nums: List[int], target: int) -> int: left_idx = 0 right_idx = len(nums) - 1 while left_idx <= right_idx: mid_idx = left_idx + (right_idx - left_idx) // 2 potential_match = nums[mid_idx] left_bound = nums[left_idx] right_bou...
33.275862
78
0.57513
from typing import List def shifted_binary_search(nums: List[int], target: int) -> int: left_idx = 0 right_idx = len(nums) - 1 while left_idx <= right_idx: mid_idx = left_idx + (right_idx - left_idx) // 2 potential_match = nums[mid_idx] left_bound = nums[left_idx] right_bou...
true
true
f74c5528b1b68ef70cab124bedac889fe044265d
7,676
py
Python
scripts/bert/fp16_utils.py
StrayBird-ATSH/gluon-nlp
5dc6b9c9fab9e99b155554a50466c514b879ea84
[ "Apache-2.0" ]
1
2021-06-17T12:59:25.000Z
2021-06-17T12:59:25.000Z
scripts/bert/fp16_utils.py
StrayBird-ATSH/gluon-nlp
5dc6b9c9fab9e99b155554a50466c514b879ea84
[ "Apache-2.0" ]
3
2020-09-01T05:45:57.000Z
2020-10-22T23:14:20.000Z
scripts/bert/fp16_utils.py
ZiyueHuang/gluon-nlp
0d5c61992180f41eab590e74c7b679980f429292
[ "Apache-2.0" ]
3
2021-07-20T07:40:15.000Z
2021-08-03T08:39:17.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
45.690476
97
0.649297
import warnings import mxnet as mx import gluonnlp as nlp class FP16Trainer: def __init__(self, trainer, dynamic_loss_scale=True, loss_scaler_params=None): if trainer._kvstore_params['update_on_kvstore'] is not False and trainer._kvstore: err = 'Only gluon.Trainer created with ...
true
true
f74c57555fad80a4e98234546e67d3c9cbcccf10
259,212
py
Python
jax/_src/numpy/lax_numpy.py
fengwang/jax
88f888d498ee5a063c7fbdf96ea593ab8bd01849
[ "Apache-2.0" ]
null
null
null
jax/_src/numpy/lax_numpy.py
fengwang/jax
88f888d498ee5a063c7fbdf96ea593ab8bd01849
[ "Apache-2.0" ]
null
null
null
jax/_src/numpy/lax_numpy.py
fengwang/jax
88f888d498ee5a063c7fbdf96ea593ab8bd01849
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.529312
145
0.672843
import abc import builtins import collections from functools import partial import operator import types from typing import Sequence, FrozenSet, Optional, Tuple, Union, Set, Type, Callable from textwrap import dedent as _dedent import warnings import numpy as np import opt_einsum import jax from jax i...
true
true
f74c5857878635706e78808a32e1dc5b8ed7d924
898
py
Python
POOUber/Python/main.py
bl00p1ng/Curso_POO
04545ebf99e64b0533277cf4cfd8d9e449be5fe8
[ "CNRI-Python" ]
7
2021-01-27T18:34:15.000Z
2022-03-21T05:08:57.000Z
POOUber/Python/main.py
bl00p1ng/Curso_POO
04545ebf99e64b0533277cf4cfd8d9e449be5fe8
[ "CNRI-Python" ]
null
null
null
POOUber/Python/main.py
bl00p1ng/Curso_POO
04545ebf99e64b0533277cf4cfd8d9e449be5fe8
[ "CNRI-Python" ]
3
2021-02-27T23:07:09.000Z
2022-01-15T06:55:07.000Z
from uberX import UberX from uberPool import UberPool from uberBlack import UberBlack from uberSUV import UberSUV from account import Account if __name__ == "__main__": # UBER X uberX = UberX("ADF875", Account("Felipe López", "GSG458"), "Chevrolet", "Spark") print(vars(uberX)) print(vars(...
34.538462
122
0.657016
from uberX import UberX from uberPool import UberPool from uberBlack import UberBlack from uberSUV import UberSUV from account import Account if __name__ == "__main__": uberX = UberX("ADF875", Account("Felipe López", "GSG458"), "Chevrolet", "Spark") print(vars(uberX)) print(vars(uberX.dri...
true
true
f74c589616a63a74531e470e69c83592247d55b4
699
py
Python
src/utilities/string_functions.py
seadavis/StoryNode
e863e68e4b95b92a074554c2399492dbfb54cbab
[ "Apache-2.0" ]
null
null
null
src/utilities/string_functions.py
seadavis/StoryNode
e863e68e4b95b92a074554c2399492dbfb54cbab
[ "Apache-2.0" ]
null
null
null
src/utilities/string_functions.py
seadavis/StoryNode
e863e68e4b95b92a074554c2399492dbfb54cbab
[ "Apache-2.0" ]
null
null
null
""" Swaprs token1, for token2 in the sentence token2 should belong in sentence for this to work """ def swap(token1, token2, sentence): index = token2.idx length = len(token2.text) if index == 0: prepend = '' else: prepend = sentence[:(index)] append = sentence[(index + length):] ...
25.888889
67
0.642346
def swap(token1, token2, sentence): index = token2.idx length = len(token2.text) if index == 0: prepend = '' else: prepend = sentence[:(index)] append = sentence[(index + length):] return prepend + token1.text + append def remove(token, sentence): return remove(token.idx, to...
true
true
f74c58d0e111496911acb94dd86676847751749c
8,429
py
Python
detectron2/evaluation/cityscapes_evaluation.py
Zeinab-Haroon/detectron2
6a56c9cadaf392697c4bdef00325e415d07a459f
[ "Apache-2.0" ]
null
null
null
detectron2/evaluation/cityscapes_evaluation.py
Zeinab-Haroon/detectron2
6a56c9cadaf392697c4bdef00325e415d07a459f
[ "Apache-2.0" ]
null
null
null
detectron2/evaluation/cityscapes_evaluation.py
Zeinab-Haroon/detectron2
6a56c9cadaf392697c4bdef00325e415d07a459f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. import glob import logging import numpy as np import os import tempfile from collections import OrderedDict import torch from PIL import Image from detectron2.data import MetadataCatalog from detectron2.utils import comm from detectron2.utils.file_io import PathManage...
41.522167
139
0.632815
import glob import logging import numpy as np import os import tempfile from collections import OrderedDict import torch from PIL import Image from detectron2.data import MetadataCatalog from detectron2.utils import comm from detectron2.utils.file_io import PathManager from .evaluator import DatasetEvaluator class...
true
true
f74c590e21721ebfcfe0ea736fb9a484513bc883
321
py
Python
Library_Tester/CalculatingModules/mvmd_slli.py
mendlin/SIMD-libgen
0f386bb639c829275a00f46c4b31d59c5ed84a28
[ "AFL-1.1" ]
1
2021-01-07T03:18:27.000Z
2021-01-07T03:18:27.000Z
Library_Tester/CalculatingModules/mvmd_slli.py
Logicalmars/SIMD-libgen
0f386bb639c829275a00f46c4b31d59c5ed84a28
[ "AFL-1.1" ]
null
null
null
Library_Tester/CalculatingModules/mvmd_slli.py
Logicalmars/SIMD-libgen
0f386bb639c829275a00f46c4b31d59c5ed84a28
[ "AFL-1.1" ]
1
2021-11-29T07:28:13.000Z
2021-11-29T07:28:13.000Z
# Copyright (c) 2011, Hua Huang and Robert D. Cameron. # Licensed under the Academic Free License 3.0. def GetResult(fw, sh, data): arg1 = data[0] (i, sz, ans) = (0, len(arg1), "") blockNum = int(sz/fw) while i<blockNum: ans += arg1[(i+sh)*fw:(i+sh+1)*fw] if (i+sh)<blockNum else "0"*fw i += 1 return ans...
21.4
67
0.613707
def GetResult(fw, sh, data): arg1 = data[0] (i, sz, ans) = (0, len(arg1), "") blockNum = int(sz/fw) while i<blockNum: ans += arg1[(i+sh)*fw:(i+sh+1)*fw] if (i+sh)<blockNum else "0"*fw i += 1 return ans
true
true
f74c592104b43da1a836ea1c416cfbffdd907710
28,061
py
Python
pytorchvideo/models/x3d.py
kalyanvasudev/ptv_temp
85c2282bed9aa4eadc3454bd7e8f2a8e8c4b4ec6
[ "Apache-2.0" ]
null
null
null
pytorchvideo/models/x3d.py
kalyanvasudev/ptv_temp
85c2282bed9aa4eadc3454bd7e8f2a8e8c4b4ec6
[ "Apache-2.0" ]
null
null
null
pytorchvideo/models/x3d.py
kalyanvasudev/ptv_temp
85c2282bed9aa4eadc3454bd7e8f2a8e8c4b4ec6
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from typing import Callable, Tuple import numpy as np import torch import torch.nn as nn from fvcore.nn.squeeze_excitation import SqueezeExcitation from pytorchvideo.layers.convolutions import Conv2plus1d from pytorchvideo.layers.swish import Swi...
35.032459
94
0.575247
from typing import Callable, Tuple import numpy as np import torch import torch.nn as nn from fvcore.nn.squeeze_excitation import SqueezeExcitation from pytorchvideo.layers.convolutions import Conv2plus1d from pytorchvideo.layers.swish import Swish from pytorchvideo.layers.utils import round_repeats, round_width, se...
true
true
f74c592be950fa4a547e43ad707d257356841c56
274
py
Python
profile.py
einsfr/pyffwrapper
e1cade44590ed62184dd8f56c75b3c3c7835fd21
[ "MIT" ]
1
2017-05-28T23:22:07.000Z
2017-05-28T23:22:07.000Z
profile.py
einsfr/pyffwrapper
e1cade44590ed62184dd8f56c75b3c3c7835fd21
[ "MIT" ]
null
null
null
profile.py
einsfr/pyffwrapper
e1cade44590ed62184dd8f56c75b3c3c7835fd21
[ "MIT" ]
null
null
null
class FFmpegProfile: def __init__(self, profile_dict: dict): self._profile_dict = profile_dict @property def inputs(self): return self._profile_dict['inputs'] @property def outputs(self): return self._profile_dict['outputs']
18.266667
44
0.656934
class FFmpegProfile: def __init__(self, profile_dict: dict): self._profile_dict = profile_dict @property def inputs(self): return self._profile_dict['inputs'] @property def outputs(self): return self._profile_dict['outputs']
true
true
f74c5995c22bacf8d41508111722330ee8f86aac
2,029
py
Python
examples/run_time_tests/compare.py
pmehta08/MulensModel
261738c445a8d116d09c90e65f6e847cfc8a7ad8
[ "MIT" ]
30
2016-08-30T23:32:43.000Z
2022-03-07T20:06:25.000Z
examples/run_time_tests/compare.py
pmehta08/MulensModel
261738c445a8d116d09c90e65f6e847cfc8a7ad8
[ "MIT" ]
25
2018-08-22T19:14:22.000Z
2022-03-28T17:22:56.000Z
examples/run_time_tests/compare.py
pmehta08/MulensModel
261738c445a8d116d09c90e65f6e847cfc8a7ad8
[ "MIT" ]
11
2016-10-03T16:00:50.000Z
2022-03-23T16:53:54.000Z
import os import sys import numpy as np import matplotlib.pyplot as plt from astropy.coordinates import SkyCoord from astropy import units as u sys.path.append("/usr/custom/pyLIMA-1.0.0") from pyLIMA import event, telescopes, microlmodels import MulensModel as mm # Common settings: t_0 = 2456900. u_0 = 0.1 t_E = 150...
29.838235
79
0.741252
import os import sys import numpy as np import matplotlib.pyplot as plt from astropy.coordinates import SkyCoord from astropy import units as u sys.path.append("/usr/custom/pyLIMA-1.0.0") from pyLIMA import event, telescopes, microlmodels import MulensModel as mm t_0 = 2456900. u_0 = 0.1 t_E = 150. pi_E_N = 1. pi_E...
true
true
f74c5a97f6f797a89180d33d6ed4898951cc1ef3
13,003
py
Python
ego/optimization/neighborhood_graph_grammar.py
fabriziocosta/EGO
d89e88183cce1ff24dca9333c09fa11597a45c7a
[ "MIT" ]
null
null
null
ego/optimization/neighborhood_graph_grammar.py
fabriziocosta/EGO
d89e88183cce1ff24dca9333c09fa11597a45c7a
[ "MIT" ]
null
null
null
ego/optimization/neighborhood_graph_grammar.py
fabriziocosta/EGO
d89e88183cce1ff24dca9333c09fa11597a45c7a
[ "MIT" ]
1
2022-01-24T09:53:20.000Z
2022-01-24T09:53:20.000Z
#!/usr/bin/env python """Provides scikit interface.""" import numpy as np import networkx as nx import random from ego.decompose import do_decompose from ego.decomposition.positive_and_negative import decompose_positive, decompose_negative from ego.decomposition.union import decompose_all_union from graphlearn.sample ...
38.699405
124
0.640621
import numpy as np import networkx as nx import random from ego.decompose import do_decompose from ego.decomposition.positive_and_negative import decompose_positive, decompose_negative from ego.decomposition.union import decompose_all_union from graphlearn.sample import LocalSubstitutionGraphGrammarSample as lsgg fro...
true
true
f74c5b825f4b051b7a22839cf0f5671bc01a1193
647
py
Python
Module 1/Chapter08/db_setup.py
nikitabrazhnik/flask2
fd7a7e26f00402da09ee2159253cc1958df54814
[ "MIT" ]
40
2017-02-11T18:28:53.000Z
2021-10-04T04:52:49.000Z
Module 1/Chapter08/db_setup.py
nikitabrazhnik/flask2
fd7a7e26f00402da09ee2159253cc1958df54814
[ "MIT" ]
1
2018-06-15T13:46:47.000Z
2018-06-15T13:46:47.000Z
Module 1/Chapter08/db_setup.py
nikitabrazhnik/flask2
fd7a7e26f00402da09ee2159253cc1958df54814
[ "MIT" ]
40
2017-04-11T12:01:22.000Z
2021-05-30T18:05:27.000Z
import pymysql import dbconfig connection = pymysql.connect(host='localhost', user=dbconfig.db_user, passwd=dbconfig.db_password) try: with connection.cursor() as cursor: sql = "CREATE DATABASE IF NOT EXISTS crimemap" cursor.execute(sql) ...
25.88
61
0.655332
import pymysql import dbconfig connection = pymysql.connect(host='localhost', user=dbconfig.db_user, passwd=dbconfig.db_password) try: with connection.cursor() as cursor: sql = "CREATE DATABASE IF NOT EXISTS crimemap" cursor.execute(sql) ...
true
true
f74c5bb920a2045707be25fe41f211528b4453e0
871
py
Python
fifo/entries/api_urls.py
luftdanmark/fifo.li
c51fb4732345cd1a4985260617562ea538e8c49e
[ "MIT" ]
1
2016-04-29T23:09:13.000Z
2016-04-29T23:09:13.000Z
fifo/entries/api_urls.py
luftdanmark/fifo.li
c51fb4732345cd1a4985260617562ea538e8c49e
[ "MIT" ]
null
null
null
fifo/entries/api_urls.py
luftdanmark/fifo.li
c51fb4732345cd1a4985260617562ea538e8c49e
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import api_views urlpatterns = [ # {% url "api:entries" %} url( regex=r'entries/$', view=api_views.EntryListView.as_view(), name='entries' ), url( regex=r'entries/create/$', view=api_views.EntryCreateVi...
24.885714
65
0.514351
from django.conf.urls import url from . import api_views urlpatterns = [ url( regex=r'entries/$', view=api_views.EntryListView.as_view(), name='entries' ), url( regex=r'entries/create/$', view=api_views.EntryCreateView.as_view(), ...
true
true
f74c5c6c678bf2127ccb402f2b58fc4a4b9bc30a
1,892
py
Python
src/dev/lupio/LupioIPI.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
765
2015-01-14T16:17:04.000Z
2022-03-28T07:46:28.000Z
src/dev/lupio/LupioIPI.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
30
2015-01-01T21:49:38.000Z
2021-04-20T19:01:54.000Z
src/dev/lupio/LupioIPI.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
807
2015-01-06T09:55:38.000Z
2022-03-30T10:23:36.000Z
# Copyright (c) 2021 The Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this lis...
51.135135
72
0.78277
from m5.objects.Device import BasicPioDevice from m5.params import Param class LupioIPI(BasicPioDevice): type = 'LupioIPI' cxx_class='gem5::LupioIPI' cxx_header = 'dev/lupio/lupio_ipi.hh' pio_size = Param.Addr(0x1000, "PIO Size") int_type = Param.Int("Type of interrupt") ...
true
true
f74c5d29c8477ea55166d0b74e05d58bb0e258aa
688
py
Python
nystrompca/__init__.py
fredhallgren/nystrompca
7f8923af08551ad477a446c383822b555326f4bf
[ "Apache-2.0" ]
4
2021-09-14T08:46:10.000Z
2021-10-31T09:44:06.000Z
nystrompca/__init__.py
fredhallgren/nystrompca
7f8923af08551ad477a446c383822b555326f4bf
[ "Apache-2.0" ]
null
null
null
nystrompca/__init__.py
fredhallgren/nystrompca
7f8923af08551ad477a446c383822b555326f4bf
[ "Apache-2.0" ]
null
null
null
""" Implementation of Nyström Kernel PCA and a confidence bound on its accuracy Experiments to evaluate the methods and confidence bound Also implements a few other methods used for comparison """ from .algorithms.kernel_RR import KernelRR from .algorithms.kernel_PCA import KernelPCA from .algorithms.nyst...
34.4
75
0.77907
from .algorithms.kernel_RR import KernelRR from .algorithms.kernel_PCA import KernelPCA from .algorithms.nystrom_KPCA import NystromKPCA from .algorithms.nystrom_KPCR import NystromKPCR from .algorithms.nystrom_KRR import NystromKRR from .algorithms.kernel_PCR import KernelPCR from .algorithms.bou...
true
true
f74c5ea81f6e3d727ca6bafcbcd584e050d3ed2f
1,469
py
Python
src/imagetagger/base/checks.py
EKivutha/imagetagger
91697aa0a5cfc2f1bbe69566b026730881fdc76d
[ "MIT" ]
212
2017-07-06T23:01:44.000Z
2022-03-24T04:44:49.000Z
src/imagetagger/base/checks.py
EKivutha/imagetagger
91697aa0a5cfc2f1bbe69566b026730881fdc76d
[ "MIT" ]
157
2017-07-24T10:03:41.000Z
2022-03-12T01:03:47.000Z
src/imagetagger/base/checks.py
EKivutha/imagetagger
91697aa0a5cfc2f1bbe69566b026730881fdc76d
[ "MIT" ]
54
2017-11-07T00:40:50.000Z
2022-02-26T14:22:13.000Z
from typing import List from os.path import join, dirname from django.core.checks import register, CheckMessage, Error from django.conf import settings from fs.base import FS from . import filesystem def _create_check_file(fs: FS, path: str): fs.makedirs(dirname(path), recreate=True) fs.create(path, wipe=True...
35.829268
114
0.6855
from typing import List from os.path import join, dirname from django.core.checks import register, CheckMessage, Error from django.conf import settings from fs.base import FS from . import filesystem def _create_check_file(fs: FS, path: str): fs.makedirs(dirname(path), recreate=True) fs.create(path, wipe=True...
true
true
f74c5efa9cfe7f6d99e3ba7edf7c6998845ee631
1,568
py
Python
layers/layer_functions.py
OliverT1/gnina_tensorflow
339310c643a85e6df1248d03dbbe4ae78cf59f19
[ "MIT" ]
null
null
null
layers/layer_functions.py
OliverT1/gnina_tensorflow
339310c643a85e6df1248d03dbbe4ae78cf59f19
[ "MIT" ]
null
null
null
layers/layer_functions.py
OliverT1/gnina_tensorflow
339310c643a85e6df1248d03dbbe4ae78cf59f19
[ "MIT" ]
1
2020-11-30T12:08:20.000Z
2020-11-30T12:08:20.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 11 09:12:15 2020 @author: scantleb @brief: Functions for generating keras layers. """ import tensorflow as tf from tensorflow.keras import layers def generate_activation_layers(block_name, activation, append_name_info=True): """Generate activ...
34.844444
78
0.662628
import tensorflow as tf from tensorflow.keras import layers def generate_activation_layers(block_name, activation, append_name_info=True): name_template = '{0}_{{0}}_{1}'.format(block_name, activation) block_name_index = 0 while True: if append_name_info: act_name = name_template.fo...
true
true
f74c5f1dd3eb6daa533d64fb8d5770b7190411d2
16,553
py
Python
notebooks/103.0-BDP-cascade-invert.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
notebooks/103.0-BDP-cascade-invert.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
notebooks/103.0-BDP-cascade-invert.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
# %% [markdown] # # import itertools import os import time from itertools import chain import colorcet as cc import matplotlib as mpl import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd import seaborn as sns from anytree import LevelOrderGroupIter, Node, RenderTree from joblib ...
28.103565
107
0.657403
import itertools import os import time from itertools import chain import colorcet as cc import matplotlib as mpl import matplotlib.pyplot as plt import networkx as nx import numpy as np import pandas as pd import seaborn as sns from anytree import LevelOrderGroupIter, Node, RenderTree from joblib import Parallel, de...
true
true
f74c5f8feb6ebc1078aec97247368d8db5f7922f
1,277
py
Python
examples/smiles_vocab_creator.py
PaccMann/paccmann_datasets
0cb0cee349ffab8e227f09f7df0a8bca6a71f22e
[ "MIT" ]
14
2019-11-01T12:45:56.000Z
2022-03-11T15:38:31.000Z
examples/smiles_vocab_creator.py
PaccMann/paccmann_datasets
0cb0cee349ffab8e227f09f7df0a8bca6a71f22e
[ "MIT" ]
74
2019-11-12T19:36:27.000Z
2022-02-28T08:19:37.000Z
examples/smiles_vocab_creator.py
PaccMann/paccmann_datasets
0cb0cee349ffab8e227f09f7df0a8bca6a71f22e
[ "MIT" ]
2
2021-08-14T11:15:07.000Z
2021-08-25T06:42:01.000Z
#!/usr/bin/env python3 """Export vocabulary of SMILESLanguage from .smi files in directory.""" import argparse import os from pytoda.smiles.smiles_language import SMILESLanguage # define the parser arguments parser = argparse.ArgumentParser() parser.add_argument('smi_path', type=str, help='path to a folder with .smi ...
29.697674
82
0.702428
import argparse import os from pytoda.smiles.smiles_language import SMILESLanguage parser = argparse.ArgumentParser() parser.add_argument('smi_path', type=str, help='path to a folder with .smi files') parser.add_argument( 'pretrained_path', type=str, help='path to a folder to store the language as text ...
true
true
f74c60a4cb1dc9d0ad1234281a16930eb7bcd37b
1,248
py
Python
src/ambianic/webapp/server/config_sources.py
ivelin/ambianic-edge
a0cbb2a2369024735ea896b15b93d3d50d58cac1
[ "Apache-2.0" ]
95
2019-12-12T02:20:40.000Z
2022-03-30T18:23:52.000Z
src/ambianic/webapp/server/config_sources.py
ambianic/ambianic
cad14a3ae8a2149c9e17e1bd41ee7d1b75568271
[ "Apache-2.0" ]
313
2019-11-04T21:31:26.000Z
2022-01-01T11:00:38.000Z
src/ambianic/webapp/server/config_sources.py
ambianic/ambianic
cad14a3ae8a2149c9e17e1bd41ee7d1b75568271
[ "Apache-2.0" ]
49
2020-02-28T22:09:36.000Z
2022-03-23T03:26:33.000Z
import logging from ambianic.configuration import get_root_config from dynaconf.vendor.box.exceptions import BoxKeyError from fastapi import HTTPException, status from pydantic import BaseModel log = logging.getLogger(__name__) # Base class for pipeline input sources such as cameras and microphones class SensorSour...
25.469388
79
0.708333
import logging from ambianic.configuration import get_root_config from dynaconf.vendor.box.exceptions import BoxKeyError from fastapi import HTTPException, status from pydantic import BaseModel log = logging.getLogger(__name__) class SensorSource(BaseModel): id: str uri: str type: str live: bool = ...
true
true
f74c60cf075232f8f597005e20c662bc3f60864e
788
py
Python
src/practices/practice/subarray_sum_k/script.py
rahul38888/coding_practice
8445c379310aa189147c4805c43bed80aa9e9fac
[ "Apache-2.0" ]
1
2021-08-06T11:22:12.000Z
2021-08-06T11:22:12.000Z
src/practices/practice/subarray_sum_k/script.py
rahul38888/coding_practice
8445c379310aa189147c4805c43bed80aa9e9fac
[ "Apache-2.0" ]
null
null
null
src/practices/practice/subarray_sum_k/script.py
rahul38888/coding_practice
8445c379310aa189147c4805c43bed80aa9e9fac
[ "Apache-2.0" ]
null
null
null
#User function Template for python3 # 10 2 -2 -20 10 # -10 class Solution: def findSubArraySum(self, Arr, N, k): sums = [] count = 0 for i in range(N): if i is 0: sums[i]=Arr[i] else: sums[i] = sums[i-1]+Arr[i] if sum[i] =...
21.297297
44
0.469543
class Solution: def findSubArraySum(self, Arr, N, k): sums = [] count = 0 for i in range(N): if i is 0: sums[i]=Arr[i] else: sums[i] = sums[i-1]+Arr[i] if sum[i] == k: count+=1 for i in range(1, ...
true
true
f74c615471184ac9ab3bf5511e84c837815443df
930
py
Python
odfdo/version.py
jdum/odfdo
2494d0bed39f5a55974643206e9bafeed40f3a6b
[ "Apache-2.0" ]
18
2018-04-19T08:30:48.000Z
2022-02-14T11:00:27.000Z
odfdo/version.py
jdum/odfdo
2494d0bed39f5a55974643206e9bafeed40f3a6b
[ "Apache-2.0" ]
15
2018-04-22T00:52:41.000Z
2021-07-05T10:16:38.000Z
odfdo/version.py
jdum/odfdo
2494d0bed39f5a55974643206e9bafeed40f3a6b
[ "Apache-2.0" ]
6
2018-04-22T00:14:12.000Z
2021-12-06T01:42:07.000Z
# Copyright 2018-2020 Jérôme Dumonteil # Copyright (c) 2009-2012 Ars Aperta, Itaapy, Pierlis, Talend. # # 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/LI...
38.75
74
0.755914
__version__ = "3.3.1"
true
true
f74c61dd6a8b3193d295463a256f77406f7d615f
5,631
py
Python
magenta/models/gansynth/lib/data_helpers.py
hologerry/magenta
c08c17a548f97a3f5d294a010c28ea2803718d6f
[ "Apache-2.0" ]
null
null
null
magenta/models/gansynth/lib/data_helpers.py
hologerry/magenta
c08c17a548f97a3f5d294a010c28ea2803718d6f
[ "Apache-2.0" ]
null
null
null
magenta/models/gansynth/lib/data_helpers.py
hologerry/magenta
c08c17a548f97a3f5d294a010c28ea2803718d6f
[ "Apache-2.0" ]
1
2021-09-09T15:30:36.000Z
2021-09-09T15:30:36.000Z
# Copyright 2020 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
32.177143
75
0.703072
from __future__ import absolute_import from __future__ import division from __future__ import print_function from magenta.models.gansynth.lib import datasets from magenta.models.gansynth.lib import train_util from magenta.models.gansynth.lib.specgrams_helper import SpecgramsHelper import tensorflow.comp...
true
true
f74c6218e1df672aa077cd2b3fc58a75b1bfe0eb
1,685
py
Python
trace/google/cloud/trace_v2/types.py
paoloburelli/google-cloud-python
e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd
[ "Apache-2.0" ]
1
2018-06-29T17:53:28.000Z
2018-06-29T17:53:28.000Z
trace/google/cloud/trace_v2/types.py
paoloburelli/google-cloud-python
e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd
[ "Apache-2.0" ]
null
null
null
trace/google/cloud/trace_v2/types.py
paoloburelli/google-cloud-python
e54b4318c2c8d9fc4ef0d78aa2a1eea874ace1cd
[ "Apache-2.0" ]
1
2021-06-30T11:44:03.000Z
2021-06-30T11:44:03.000Z
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
28.083333
74
0.75727
from __future__ import absolute_import import sys from google.api import http_pb2 from google.protobuf import any_pb2 from google.protobuf import descriptor_pb2 from google.protobuf import empty_pb2 from google.protobuf import timestamp_pb2 from google.protobuf import wrappers_pb2 from google.rpc import ...
true
true
f74c628ce6159aa2ca961543297beddaa76ac53a
1,192
py
Python
meiduoshop/meiduoshop/apps/contents/models.py
juntao66/meiduoshopping
30f2f3c508ce4e50680f805f1ca8b64162cd926d
[ "MIT" ]
null
null
null
meiduoshop/meiduoshop/apps/contents/models.py
juntao66/meiduoshopping
30f2f3c508ce4e50680f805f1ca8b64162cd926d
[ "MIT" ]
null
null
null
meiduoshop/meiduoshop/apps/contents/models.py
juntao66/meiduoshopping
30f2f3c508ce4e50680f805f1ca8b64162cd926d
[ "MIT" ]
null
null
null
from django.db import models from meiduoshop.utils.models import BaseModel # Create your models here. class ContentCategory(BaseModel): """广告内容类别""" name = models.CharField(max_length=50, verbose_name='名称') key = models.CharField(max_length=50, verbose_name='类别键名') class Meta: db_table = 'tb_...
32.216216
94
0.69547
from django.db import models from meiduoshop.utils.models import BaseModel class ContentCategory(BaseModel): name = models.CharField(max_length=50, verbose_name='名称') key = models.CharField(max_length=50, verbose_name='类别键名') class Meta: db_table = 'tb_content_category' verbose_name = '广...
true
true
f74c63159cbb5d15225e5f15fe3c27795435ab99
673
py
Python
nmslearn/_nbdev.py
AlanGanem/NMSLearn
a82b133e8d7677d99db739d97b3bbf1873a9110a
[ "Apache-2.0" ]
null
null
null
nmslearn/_nbdev.py
AlanGanem/NMSLearn
a82b133e8d7677d99db739d97b3bbf1873a9110a
[ "Apache-2.0" ]
null
null
null
nmslearn/_nbdev.py
AlanGanem/NMSLearn
a82b133e8d7677d99db739d97b3bbf1873a9110a
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"sparsify": "neighbors.ipynb", "hstack": "neighbors.ipynb", "vstack": "neighbors.ipynb", "stack": "neighbors.ipynb", "NMSLibSklearnWrapper": "neighbors.ipynb", "Fa...
30.590909
62
0.64636
__all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"sparsify": "neighbors.ipynb", "hstack": "neighbors.ipynb", "vstack": "neighbors.ipynb", "stack": "neighbors.ipynb", "NMSLibSklearnWrapper": "neighbors.ipynb", "FastCosineNN": "neighbors.ipynb", ...
true
true
f74c647961a8417eef7db452d911c7e8c8f5c31e
5,979
py
Python
sdk/python/pulumi_azure_native/apimanagement/v20191201preview/get_api_issue.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20191201preview/get_api_issue.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/apimanagement/v20191201preview/get_api_issue.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
33.402235
146
0.624185
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetApiIssueResult', 'AwaitableGetApiIssueResult', 'get_api_issue', ] @pulumi.output_type class GetApiIssueResult: def __init__(__self__, a...
true
true
f74c64e5b0ff2c80950da0b48253dd788b1952fe
3,400
py
Python
eyeD3-0.7.8/examples/chapters.py
FosterFromGloster/PeskyDuplicates
293749a05033e10dc182c07eb8c378fc18356991
[ "BSD-3-Clause" ]
null
null
null
eyeD3-0.7.8/examples/chapters.py
FosterFromGloster/PeskyDuplicates
293749a05033e10dc182c07eb8c378fc18356991
[ "BSD-3-Clause" ]
null
null
null
eyeD3-0.7.8/examples/chapters.py
FosterFromGloster/PeskyDuplicates
293749a05033e10dc182c07eb8c378fc18356991
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # Copyright (C) 2012 Travis Shirk <travis@pobox.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
35.789474
80
0.647353
true
true
f74c6514329fb821e3cece8da1672a0bac4c28dc
2,334
py
Python
dashboard.py
bcgodev/taiwan-reservoir-data
365c87f6bf845a9afa61f25d14008fdb7d2bf484
[ "MIT" ]
null
null
null
dashboard.py
bcgodev/taiwan-reservoir-data
365c87f6bf845a9afa61f25d14008fdb7d2bf484
[ "MIT" ]
null
null
null
dashboard.py
bcgodev/taiwan-reservoir-data
365c87f6bf845a9afa61f25d14008fdb7d2bf484
[ "MIT" ]
null
null
null
from pytz import timezone from utils import now_with_timezone __additional_tag_for_area_reservoirs__ = { '苗栗': { '10501': '支援新竹', }, '臺中': { '20101': '支援苗栗', '20202': '支援彰雲投', }, '彰雲投': { '30502': '支援嘉義', '30501': '支援嘉義', '30503': '支援高雄', }, ...
29.175
191
0.430163
from pytz import timezone from utils import now_with_timezone __additional_tag_for_area_reservoirs__ = { '苗栗': { '10501': '支援新竹', }, '臺中': { '20101': '支援苗栗', '20202': '支援彰雲投', }, '彰雲投': { '30502': '支援嘉義', '30501': '支援嘉義', '30503': '支援高雄', }, ...
true
true
f74c6567c1f376a109435e3ae75a5d3b757e3398
7,990
py
Python
tests/forms_tests/field_tests/test_urlfield.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
tests/forms_tests/field_tests/test_urlfield.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
tests/forms_tests/field_tests/test_urlfield.py
peteralexandercharles/django
61c7350f41f2534daf3888709f3c987b7d779a29
[ "BSD-3-Clause", "0BSD" ]
null
null
null
from django.core.exceptions import ValidationError from django.forms import URLField from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class URLFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_urlfield_1(self): f = URLField() self.assertWidgetRendersTo(f, ...
44.143646
91
0.589987
from django.core.exceptions import ValidationError from django.forms import URLField from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class URLFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_urlfield_1(self): f = URLField() self.assertWidgetRendersTo(f, ...
true
true
f74c65cd12543a8f427e86a0eb32d6b76d0630e7
228
py
Python
src/helper/index.py
devsapp/fc-warm
fcecde18ecfe30db943e52ddcc0494027a821870
[ "MIT" ]
1
2022-03-30T13:44:00.000Z
2022-03-30T13:44:00.000Z
src/helper/index.py
devsapp/fc-warm
fcecde18ecfe30db943e52ddcc0494027a821870
[ "MIT" ]
1
2022-03-30T13:00:39.000Z
2022-03-30T19:50:07.000Z
src/helper/index.py
devsapp/fc-warm
fcecde18ecfe30db943e52ddcc0494027a821870
[ "MIT" ]
null
null
null
# coding=utf-8 import requests import os def handler(event, context): url = os.environ['KEEP_WARM_FC_URL'] method = os.environ['KEEP_WARM_FC_METHOD'] res = requests.request(method, url) print(res.status_code)
19
46
0.710526
import requests import os def handler(event, context): url = os.environ['KEEP_WARM_FC_URL'] method = os.environ['KEEP_WARM_FC_METHOD'] res = requests.request(method, url) print(res.status_code)
true
true
f74c667d019617345e7f185ef96de908c6e9df70
1,037
py
Python
DCHUC/utils/txt_module.py
BMC-SDNU/Cross-Modal-Hashing-Retrieval
0196e313aad0a93ebf93e1150f024d6a07f8363a
[ "Apache-2.0" ]
1
2022-03-08T01:45:17.000Z
2022-03-08T01:45:17.000Z
DCHUC/utils/txt_module.py
YimuWang96/Cross-Modal-Hashing-Retrieval
0196e313aad0a93ebf93e1150f024d6a07f8363a
[ "Apache-2.0" ]
5
2021-11-11T08:13:30.000Z
2022-03-09T16:37:57.000Z
DCHUC/utils/txt_module.py
YimuWang96/Cross-Modal-Hashing-Retrieval
0196e313aad0a93ebf93e1150f024d6a07f8363a
[ "Apache-2.0" ]
2
2021-11-25T01:52:46.000Z
2022-03-21T07:11:14.000Z
import torch from torch import nn from torch.nn import functional as F LAYER1_NODE = 10240 def weights_init(m): if type(m) == nn.Conv2d: nn.init.xavier_uniform(m.weight.data) nn.init.constant(m.bias.data, 0.01) class TxtModule(nn.Module): def __init__(self, y_dim, bit): """ ...
25.292683
85
0.571842
import torch from torch import nn from torch.nn import functional as F LAYER1_NODE = 10240 def weights_init(m): if type(m) == nn.Conv2d: nn.init.xavier_uniform(m.weight.data) nn.init.constant(m.bias.data, 0.01) class TxtModule(nn.Module): def __init__(self, y_dim, bit): super(TxtMod...
true
true
f74c669b4f5494bc421a211cbf661c45bfe0f7a3
318
py
Python
Programa que le 5 numeros.py
Nuel631/Aulas_de_python
777a4107b12472579c1a4916fcec012535b2adde
[ "MIT" ]
1
2017-05-04T05:17:40.000Z
2017-05-04T05:17:40.000Z
Programa que le 5 numeros.py
Nuel631/Aulas_de_python
777a4107b12472579c1a4916fcec012535b2adde
[ "MIT" ]
null
null
null
Programa que le 5 numeros.py
Nuel631/Aulas_de_python
777a4107b12472579c1a4916fcec012535b2adde
[ "MIT" ]
null
null
null
#Faça um programa que leia 5 números e informe a soma e a média dos números. cont = 0 s = 0 m = 0 for i in range(5): n = float(input("Digite nota : ")) s=s+n cont=cont+1 m=(s)/cont print(s) print(m) ''' ''' # 4) i = 0 while i < 50: if (i % 2) == 1: print (i) i=i+1
15.142857
77
0.490566
cont = 0 s = 0 m = 0 for i in range(5): n = float(input("Digite nota : ")) s=s+n cont=cont+1 m=(s)/cont print(s) print(m) i = 0 while i < 50: if (i % 2) == 1: print (i) i=i+1
true
true
f74c677935a0f2ec2616883da11c14f1bf9aabd0
3,274
py
Python
app.py
Poo-ja942/Auth_api
5420d346f7586ceff1711afc915bd26f0ef6edcf
[ "Apache-2.0" ]
null
null
null
app.py
Poo-ja942/Auth_api
5420d346f7586ceff1711afc915bd26f0ef6edcf
[ "Apache-2.0" ]
null
null
null
app.py
Poo-ja942/Auth_api
5420d346f7586ceff1711afc915bd26f0ef6edcf
[ "Apache-2.0" ]
null
null
null
from flask import Flask, request, jsonify, make_response from flask_sqlalchemy import SQLAlchemy import uuid import jwt import os from flask_marshmallow import Marshmallow from datetime import datetime, timedelta from werkzeug.security import generate_password_hash, check_password_hash from functools import wra...
29.495495
95
0.59102
from flask import Flask, request, jsonify, make_response from flask_sqlalchemy import SQLAlchemy import uuid import jwt import os from flask_marshmallow import Marshmallow from datetime import datetime, timedelta from werkzeug.security import generate_password_hash, check_password_hash from functools import wra...
true
true
f74c678bde6368571cb4edfd0723a3dd5792569c
15,608
py
Python
Extensions/Handler/Command-Handler.py
Drageast/Adenn
f7bc54ec35f02cac562f64a65d8a38c5aca9b2bb
[ "BSD-3-Clause" ]
null
null
null
Extensions/Handler/Command-Handler.py
Drageast/Adenn
f7bc54ec35f02cac562f64a65d8a38c5aca9b2bb
[ "BSD-3-Clause" ]
null
null
null
Extensions/Handler/Command-Handler.py
Drageast/Adenn
f7bc54ec35f02cac562f64a65d8a38c5aca9b2bb
[ "BSD-3-Clause" ]
null
null
null
# Import import traceback from datetime import datetime import aiohttp import discord from discord import Webhook, AsyncWebhookAdapter from discord.ext import commands import psutil # Framework import Framework # Cog Initialising class HANDLER(commands.Cog): def __init__(self, client): self.client = c...
42.761644
165
0.52896
import traceback from datetime import datetime import aiohttp import discord from discord import Webhook, AsyncWebhookAdapter from discord.ext import commands import psutil import Framework class HANDLER(commands.Cog): def __init__(self, client): self.client = client @commands.command() ...
true
true
f74c67bbec45d546222b3887d38d6ed142259891
477
py
Python
.history/chapter01/python_03_list_20201124213319.py
KustomApe/nerdape
aef6fb2d1f8c364b26d91bf8570b4487a24de69a
[ "MIT" ]
null
null
null
.history/chapter01/python_03_list_20201124213319.py
KustomApe/nerdape
aef6fb2d1f8c364b26d91bf8570b4487a24de69a
[ "MIT" ]
null
null
null
.history/chapter01/python_03_list_20201124213319.py
KustomApe/nerdape
aef6fb2d1f8c364b26d91bf8570b4487a24de69a
[ "MIT" ]
null
null
null
"""[リストについて] リストの構文とリストの使い方について 配列とリストは同じ意味 """ # リストの定義 ['apple', 'banana', 'orange'] [1, 2, 3, 4, 5] # リストを変数に代入 fruits = ['apple', 'banana', 'orange'] numbers = [1, 2, 3, 4, 5] # インデックスとを指定して要素を取り出す # 一番最初0はじまり fruits[0] # リストの最後を指定する -1 # 昨日と今日の気温差をリストを使って計算してみる weather = [13, 15, 18, 13, 16] # リストの連結 ['スカイライン...
13.628571
41
0.643606
['apple', 'banana', 'orange'] [1, 2, 3, 4, 5] fruits = ['apple', 'banana', 'orange'] numbers = [1, 2, 3, 4, 5] fruits[0] weather = [13, 15, 18, 13, 16] ['スカイライン', 'シビック'] ['フェラーリ', 'ランボルギーニ']
true
true
f74c680fa60f6b5a9a3e22b46aa34c2ddb0def0f
2,388
py
Python
aux_0.99_10.0.py
csherstan/DeepRL
fbf8da1f158792a0b9d29728c9d407ae40573070
[ "MIT" ]
1
2019-08-20T19:52:50.000Z
2019-08-20T19:52:50.000Z
aux_0.99_10.0.py
csherstan/DeepRL
fbf8da1f158792a0b9d29728c9d407ae40573070
[ "MIT" ]
null
null
null
aux_0.99_10.0.py
csherstan/DeepRL
fbf8da1f158792a0b9d29728c9d407ae40573070
[ "MIT" ]
null
null
null
import argparse import torch from deep_rl import random_seed, set_one_thread, select_device, Config, generate_tag, Task, TDAuxNet, NatureConvBody, \ LinearSchedule, AsyncReplay, ImageNormalizer, SignNormalizer, run_steps, mkdir from deep_rl.agent.TDAux_agent import TDAuxAgent import os def td_aux_many(config: Co...
34.608696
119
0.68928
import argparse import torch from deep_rl import random_seed, set_one_thread, select_device, Config, generate_tag, Task, TDAuxNet, NatureConvBody, \ LinearSchedule, AsyncReplay, ImageNormalizer, SignNormalizer, run_steps, mkdir from deep_rl.agent.TDAux_agent import TDAuxAgent import os def td_aux_many(config: Co...
true
true