hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f74cd0641c138d39f75465ec762713bd231ca4a1
84,147
py
Python
protos/gen/python/protos/public/monitoring/DataMonitoringService_pb2.py
benshaw/modeldb
5ed5765a3d1842970489dee2fd8630848cbb3baa
[ "Apache-2.0" ]
835
2017-02-08T20:14:24.000Z
2020-03-12T17:37:49.000Z
protos/gen/python/protos/public/monitoring/DataMonitoringService_pb2.py
benshaw/modeldb
5ed5765a3d1842970489dee2fd8630848cbb3baa
[ "Apache-2.0" ]
651
2019-04-18T12:55:07.000Z
2022-03-31T23:45:09.000Z
protos/gen/python/protos/public/monitoring/DataMonitoringService_pb2.py
benshaw/modeldb
5ed5765a3d1842970489dee2fd8630848cbb3baa
[ "Apache-2.0" ]
170
2017-02-13T14:49:22.000Z
2020-02-19T17:59:12.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: monitoring/DataMonitoringService.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import sym...
42.562974
9,204
0.773777
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from ..uac import Collaborator_pb2 as uac_dot_Collaborator_...
true
true
f74cd0c6d994ba5115d21b202a910ad5320985d7
3,400
py
Python
docs/refer_project/wx/reply.py
xiaotianyi/INTELLI-City
ef6777b66350b3a3f6aac9c0441d67990ff23cd6
[ "MIT" ]
null
null
null
docs/refer_project/wx/reply.py
xiaotianyi/INTELLI-City
ef6777b66350b3a3f6aac9c0441d67990ff23cd6
[ "MIT" ]
null
null
null
docs/refer_project/wx/reply.py
xiaotianyi/INTELLI-City
ef6777b66350b3a3f6aac9c0441d67990ff23cd6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # filename: reply.py import time from wenpl.divide import showReply class Msg(object): def __init__(self): pass def send(self): return "success" class TextMsg(Msg): def __init__(self, toUserName, fromUserName, content): self.__dict = dict() self._...
32.692308
77
0.572353
import time from wenpl.divide import showReply class Msg(object): def __init__(self): pass def send(self): return "success" class TextMsg(Msg): def __init__(self, toUserName, fromUserName, content): self.__dict = dict() self.__dict['ToUserName'] = toUserName self...
true
true
f74cd279c5efd8eca846fcf2e6fe58c935265801
548
py
Python
my_pic_hub/urls.py
asandelarvine/My_Pic_Hub
3cf11c01485e5bee75b3b3937525cedc1d55d473
[ "MIT" ]
null
null
null
my_pic_hub/urls.py
asandelarvine/My_Pic_Hub
3cf11c01485e5bee75b3b3937525cedc1d55d473
[ "MIT" ]
null
null
null
my_pic_hub/urls.py
asandelarvine/My_Pic_Hub
3cf11c01485e5bee75b3b3937525cedc1d55d473
[ "MIT" ]
null
null
null
from django.urls import re_path from django.conf.urls.static import static from django.conf import settings from . import views urlpatterns=[ re_path('^$',views.home,name = 'home'), re_path(r'^all/',views.index, name= 'all'), re_path(r'^categories/(\d+)',views.categories,name = 'categories'), re_path(r...
28.842105
81
0.677007
from django.urls import re_path from django.conf.urls.static import static from django.conf import settings from . import views urlpatterns=[ re_path('^$',views.home,name = 'home'), re_path(r'^all/',views.index, name= 'all'), re_path(r'^categories/(\d+)',views.categories,name = 'categories'), re_path(r...
true
true
f74cd2b6d279cd7a3ab5a4b706476372a9799261
3,425
py
Python
test/datasets/test_stsb.py
Nayef211/text
d963bdb82b4c6c5170430fd7289b9dd0a2b9283a
[ "BSD-3-Clause" ]
null
null
null
test/datasets/test_stsb.py
Nayef211/text
d963bdb82b4c6c5170430fd7289b9dd0a2b9283a
[ "BSD-3-Clause" ]
null
null
null
test/datasets/test_stsb.py
Nayef211/text
d963bdb82b4c6c5170430fd7289b9dd0a2b9283a
[ "BSD-3-Clause" ]
null
null
null
import os import random import tarfile from collections import defaultdict from unittest.mock import patch from parameterized import parameterized from torchtext.datasets.stsb import STSB from ..common.case_utils import TempDirMixin, zip_equal, get_random_unicode from ..common.torchtext_test_case import TorchtextTest...
38.055556
122
0.648175
import os import random import tarfile from collections import defaultdict from unittest.mock import patch from parameterized import parameterized from torchtext.datasets.stsb import STSB from ..common.case_utils import TempDirMixin, zip_equal, get_random_unicode from ..common.torchtext_test_case import TorchtextTest...
true
true
f74cd37e12a0a297d462facbcfa4d1f162eda105
6,436
py
Python
manila_tempest_tests/tests/api/admin/test_share_manage.py
sapcc/manila-tempest-plugin
0ac95412b1b0555775b4d45f51c27af2fa84724a
[ "Apache-2.0" ]
null
null
null
manila_tempest_tests/tests/api/admin/test_share_manage.py
sapcc/manila-tempest-plugin
0ac95412b1b0555775b4d45f51c27af2fa84724a
[ "Apache-2.0" ]
null
null
null
manila_tempest_tests/tests/api/admin/test_share_manage.py
sapcc/manila-tempest-plugin
0ac95412b1b0555775b4d45f51c27af2fa84724a
[ "Apache-2.0" ]
1
2021-12-22T13:14:59.000Z
2021-12-22T13:14:59.000Z
# Copyright 2015 Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
35.755556
79
0.662834
import ddt from tempest import config from tempest.lib.common.utils import data_utils import testtools from testtools import testcase as tc from manila_tempest_tests.common import constants from manila_tempest_tests.tests.api import base from manila_tempest_tests import utils CONF = config.CONF @ddt.ddt class Mana...
true
true
f74cd396dee81ff1a81777f41e2f3f723f0f51ae
34,908
py
Python
desktop/core/ext-py/Babel-2.5.1/tests/test_dates.py
kokosing/hue
2307f5379a35aae9be871e836432e6f45138b3d9
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/Babel-2.5.1/tests/test_dates.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/Babel-2.5.1/tests/test_dates.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists...
44.412214
110
0.625788
import calendar from datetime import date, datetime, time, timedelta import unittest import pytest import pytz from pytz import timezone from babel import dates, Locale from babel.dates import NO_INHERITANCE_MARKER from babel.util import FixedOffsetTimezone class DateTimeFormatTestCase(unittest.TestCase): def...
true
true
f74cd39b6bed0e46a409609c267056a68bab0c05
397
py
Python
locations/migrations/0002_locations_featured_image.py
mwororokevin/django-property-site
a477d80cbac04fde33920d9b5e5f9de783d55fbd
[ "MIT" ]
null
null
null
locations/migrations/0002_locations_featured_image.py
mwororokevin/django-property-site
a477d80cbac04fde33920d9b5e5f9de783d55fbd
[ "MIT" ]
null
null
null
locations/migrations/0002_locations_featured_image.py
mwororokevin/django-property-site
a477d80cbac04fde33920d9b5e5f9de783d55fbd
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-04-01 09:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('locations', '0001_initial'), ] operations = [ migrations.AddField( model_name='locations', name='featured_image', ...
20.894737
61
0.596977
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('locations', '0001_initial'), ] operations = [ migrations.AddField( model_name='locations', name='featured_image', field=models.ImageField(null=True, upl...
true
true
f74cd3f6b2ccfd8913bb6b3b717eaec762c24c46
880
py
Python
mopidy_gpio/__init__.py
yoyebie/mopidy-gpio
2992a9ba6776bcaba3dae815e1b0b00fa2900af9
[ "Apache-2.0" ]
null
null
null
mopidy_gpio/__init__.py
yoyebie/mopidy-gpio
2992a9ba6776bcaba3dae815e1b0b00fa2900af9
[ "Apache-2.0" ]
null
null
null
mopidy_gpio/__init__.py
yoyebie/mopidy-gpio
2992a9ba6776bcaba3dae815e1b0b00fa2900af9
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import logging import os # TODO: Remove entirely if you don't register GStreamer elements below import pygst pygst.require('0.10') from mopidy import config, ext __version__ = '0.1.0' # TODO: If you need to log, use loggers named after the current Python module logger = log...
23.157895
77
0.710227
from __future__ import unicode_literals import logging import os import pygst pygst.require('0.10') from mopidy import config, ext __version__ = '0.1.0' # TODO: If you need to log, use loggers named after the current Python module logger = logging.getLogger(__name__) class Extension(ext.Extension): dist_na...
false
true
f74cd3f8471ea9f00e46aed08ff3a976b7bc461d
4,651
py
Python
lib/sqlalchemy/engine/util.py
expobrain/sqlalchemy
8370ac2bff7f2bb98673d5cc79af7a61632d8dde
[ "MIT" ]
null
null
null
lib/sqlalchemy/engine/util.py
expobrain/sqlalchemy
8370ac2bff7f2bb98673d5cc79af7a61632d8dde
[ "MIT" ]
null
null
null
lib/sqlalchemy/engine/util.py
expobrain/sqlalchemy
8370ac2bff7f2bb98673d5cc79af7a61632d8dde
[ "MIT" ]
null
null
null
# engine/util.py # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php from .. import exc from .. import util try: from sqlalchemy.cyextension.util im...
34.708955
79
0.637282
from .. import exc from .. import util try: from sqlalchemy.cyextension.util import _distill_params_20 from sqlalchemy.cyextension.util import _distill_raw_params except ImportError: from ._py_util import _distill_params_20 from ._py_util import _distill_raw_params def connection_memoize(key): ...
true
true
f74cd5e6a71b86c31fa3f0ebf1d3d367ad127dfc
8,684
py
Python
tests/records/test_geometry.py
prakritichauhan07/pyramid_oereb
1d680e920222eff1c35ac309389d1353312bcc7d
[ "BSD-2-Clause" ]
null
null
null
tests/records/test_geometry.py
prakritichauhan07/pyramid_oereb
1d680e920222eff1c35ac309389d1353312bcc7d
[ "BSD-2-Clause" ]
null
null
null
tests/records/test_geometry.py
prakritichauhan07/pyramid_oereb
1d680e920222eff1c35ac309389d1353312bcc7d
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime import math from pathlib import Path from shapely.geometry import Polygon, MultiPolygon, LineString, Point, MultiPoint, MultiLineString, \ GeometryCollection import shapely.wkt import pytest from pyramid_oereb.lib.records.geometry import GeometryRecord from pyramid_oereb....
31.350181
104
0.494473
import datetime import math from pathlib import Path from shapely.geometry import Polygon, MultiPolygon, LineString, Point, MultiPoint, MultiLineString, \ GeometryCollection import shapely.wkt import pytest from pyramid_oereb.lib.records.geometry import GeometryRecord from pyramid_oereb.lib.records.law_status i...
true
true
f74cd5e956fd1402e5ed13d404ce3984df03bd21
1,520
py
Python
jf/__main__.py
alhoo/jf
e469638c7f09db9cacf0409fe4576b8dc5c805db
[ "MIT" ]
12
2018-02-11T05:00:48.000Z
2022-02-15T22:39:28.000Z
jf/__main__.py
alhoo/jf
e469638c7f09db9cacf0409fe4576b8dc5c805db
[ "MIT" ]
6
2018-02-11T06:51:04.000Z
2020-10-03T15:04:22.000Z
jf/__main__.py
alhoo/jf
e469638c7f09db9cacf0409fe4576b8dc5c805db
[ "MIT" ]
null
null
null
import click from .main import jf @click.command() @click.option("--processes", default=1, help="Number of processes to use.") @click.option( "--from_file", "-f", help="read transformation from file. This is also activated for query strings that ends with '.jf'", is_flag=True, ) @click.option("--impor...
22.352941
104
0.603289
import click from .main import jf @click.command() @click.option("--processes", default=1, help="Number of processes to use.") @click.option( "--from_file", "-f", help="read transformation from file. This is also activated for query strings that ends with '.jf'", is_flag=True, ) @click.option("--impor...
true
true
f74cd68f0d8130eebffc823fe7af4c86f8b3a0bc
767
py
Python
refactor/old/apitest/actions/unittest/unittest/attacks/__init__.py
luissaiz/apicheck
316971450ad226247e64e7ba7c95511e38d420c9
[ "Apache-2.0" ]
2
2019-05-31T09:56:59.000Z
2019-05-31T11:28:50.000Z
refactor/old/apitest/actions/unittest/unittest/attacks/__init__.py
harry1080/apicheck
d38bd40711102b6f8e542c1a59786c25a6dc11ef
[ "Apache-2.0" ]
null
null
null
refactor/old/apitest/actions/unittest/unittest/attacks/__init__.py
harry1080/apicheck
d38bd40711102b6f8e542c1a59786c25a6dc11ef
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 BBVA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
33.347826
74
0.765319
from .xss import * from .sqli import * from .http_methods import http_method_builder ATTACKS_TEST = dict( xss=xss_builder, sql_injection=sqli_builder, http_methods=http_method_builder )
true
true
f74cd7c0619427c2c8ac0f92f78c70da3c2fe66f
269
py
Python
setup.py
josiwala/waste-classification
4736c9bb35622a3a97620de3e58b024dafbe77e5
[ "MIT" ]
null
null
null
setup.py
josiwala/waste-classification
4736c9bb35622a3a97620de3e58b024dafbe77e5
[ "MIT" ]
null
null
null
setup.py
josiwala/waste-classification
4736c9bb35622a3a97620de3e58b024dafbe77e5
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Kaggle's organic vs. recyclables waste classification dataset', author='Jeffrey Osiwala', license='MIT', ) print('asdfasdf')
22.416667
80
0.698885
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Kaggle's organic vs. recyclables waste classification dataset', author='Jeffrey Osiwala', license='MIT', ) print('asdfasdf')
false
true
f74cd944f5f7922afb8ff2841ffa7418f02b6e38
3,561
py
Python
tools/festive_moogle/give_items.py
PaulAnthonyReitz/topaz
ffa3a785f86ffdb2f6a5baf9895b649e3e3de006
[ "FTL" ]
6
2021-06-01T04:17:10.000Z
2021-06-01T04:32:21.000Z
tools/festive_moogle/give_items.py
PaulAnthonyReitz/topaz
ffa3a785f86ffdb2f6a5baf9895b649e3e3de006
[ "FTL" ]
5
2020-04-10T19:33:53.000Z
2021-06-27T17:50:05.000Z
tools/festive_moogle/give_items.py
PaulAnthonyReitz/topaz
ffa3a785f86ffdb2f6a5baf9895b649e3e3de006
[ "FTL" ]
2
2020-04-11T16:56:14.000Z
2021-06-26T12:21:12.000Z
#!/usr/bin/python3 import mysql.connector as mariadb # Change with correct info ## sqlusername = "topaz" # sqlpassword = "password" # sqldatabase = "tpzdb" # ############################# def all_characters(cursor, cursor2): print("Items Available:\ \n1) Nomad Cap\ \n2) Moogle Cap\ \n3...
31.513274
124
0.595619
import mysql.connector as mariadb sqlusername = "topaz" sqlpassword = "password" sqldatabase = "tpzdb" def all_characters(cursor, cursor2): print("Items Available:\ \n1) Nomad Cap\ \n2) Moogle Cap\ \n3) Moogle Rod\ \n4) Harpsichord\ \n5) Stuffed Chocobo\ \n6) Tidal Talisman...
true
true
f74cda046e2be37e249992296263aa4ca453a42b
1,437
py
Python
JcampReader/fileParser.py
aubravo/Clasificacion-de-actividad-volcanica
0f7be0d77509fa13948a0f714103ce6e6d8cb2ae
[ "MIT" ]
1
2021-10-20T02:42:20.000Z
2021-10-20T02:42:20.000Z
JcampReader/fileParser.py
aubravo/ActividadVolcanica
0f7be0d77509fa13948a0f714103ce6e6d8cb2ae
[ "MIT" ]
null
null
null
JcampReader/fileParser.py
aubravo/ActividadVolcanica
0f7be0d77509fa13948a0f714103ce6e6d8cb2ae
[ "MIT" ]
null
null
null
import ActividadVolcanica.JcampReader.fileHandler as handler import numpy as np def parser (filename): ToParse = handler.read(filename) ArgList = ToParse.split("##") ArgList.remove("") Parameters =dict() for x in ArgList: try: y = x.split("=") if y[0] != "XYDATA": ...
31.23913
87
0.542797
import ActividadVolcanica.JcampReader.fileHandler as handler import numpy as np def parser (filename): ToParse = handler.read(filename) ArgList = ToParse.split("##") ArgList.remove("") Parameters =dict() for x in ArgList: try: y = x.split("=") if y[0] != "XYDATA": ...
true
true
f74cdb164dfaa601f37afe4b1d8f01973aa16c3e
838
py
Python
sagemcom_api/models.py
mochrefiecom/python-sagemcom-api
e9f60aecb412b3d890af3c97b56a82c3a609681e
[ "MIT" ]
null
null
null
sagemcom_api/models.py
mochrefiecom/python-sagemcom-api
e9f60aecb412b3d890af3c97b56a82c3a609681e
[ "MIT" ]
null
null
null
sagemcom_api/models.py
mochrefiecom/python-sagemcom-api
e9f60aecb412b3d890af3c97b56a82c3a609681e
[ "MIT" ]
null
null
null
from collections import namedtuple from enum import Enum class EncryptionMethod(Enum): def __str__(self): return str(self.value) MD5 = 'md5' SHA512 = 'sha512' UNKNOWN = 'unknown' DeviceInfo = namedtuple( "DeviceInfo", [ "mac_address", "serial_number", "manufacturer...
20.439024
34
0.552506
from collections import namedtuple from enum import Enum class EncryptionMethod(Enum): def __str__(self): return str(self.value) MD5 = 'md5' SHA512 = 'sha512' UNKNOWN = 'unknown' DeviceInfo = namedtuple( "DeviceInfo", [ "mac_address", "serial_number", "manufacturer...
true
true
f74cdb2bc453e5b32e95688397812a0a3581a563
2,954
py
Python
Flask/Lezione7/project/serate/models.py
nick87ds/MaterialeSerate
51627e47ff1d3c3ecfc9ce6741c04b91b3295359
[ "MIT" ]
12
2021-12-12T22:19:52.000Z
2022-03-18T11:45:17.000Z
Flask/Lezione7/project/serate/models.py
nick87ds/MaterialeSerate
51627e47ff1d3c3ecfc9ce6741c04b91b3295359
[ "MIT" ]
1
2021-02-02T09:21:23.000Z
2021-02-02T09:21:23.000Z
Flask/Lezione7/project/serate/models.py
nick87ds/MaterialeSerate
51627e47ff1d3c3ecfc9ce6741c04b91b3295359
[ "MIT" ]
7
2021-02-01T22:09:14.000Z
2021-06-22T08:30:16.000Z
from project import db import datetime from project.corsi.models import Corso # Tabella di relazione 1 Corso : N Serate class Serata(db.Model): __tablename__ = "serata" __table_args__ = (db.UniqueConstraint("id", "data", name="constraint_serata"),) id = db.Column(db.Integer(), primary_key=True) nom...
44.089552
212
0.640826
from project import db import datetime from project.corsi.models import Corso class Serata(db.Model): __tablename__ = "serata" __table_args__ = (db.UniqueConstraint("id", "data", name="constraint_serata"),) id = db.Column(db.Integer(), primary_key=True) nome = db.Column(db.String(255), nullable=Fal...
true
true
f74cdb4295364e1b489fc3da90ae0de3e65f08f9
4,324
py
Python
gui/runtests.py
darrenbilby/grr
aa8628b15d197f8c4541d1d24b76715bdddcac44
[ "Apache-2.0" ]
1
2015-01-07T05:29:57.000Z
2015-01-07T05:29:57.000Z
gui/runtests.py
darrenbilby/grr
aa8628b15d197f8c4541d1d24b76715bdddcac44
[ "Apache-2.0" ]
null
null
null
gui/runtests.py
darrenbilby/grr
aa8628b15d197f8c4541d1d24b76715bdddcac44
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """This is a selenium test harness used interactively with Selenium IDE.""" import copy import socket import threading from wsgiref import simple_server import logging # pylint: disable=g-bad-import-order from grr.gui import django_lib # pylint: enable=g-bad-import-order from grr.lib import a...
29.414966
76
0.693571
import copy import socket import threading from wsgiref import simple_server import logging from grr.gui import django_lib from grr.lib import access_control from grr.lib import config_lib from grr.lib import data_store from grr.lib import flags from grr.lib import ipshell from grr.lib import registry from grr.lib...
true
true
f74cdb44c3da1e283bce00e24fab25b7cc9b2133
2,695
py
Python
src/olympia/abuse/models.py
atiqueahmedziad/addons-server
6e1cc00bf15d245fbcdddf618286bba943731e45
[ "BSD-3-Clause" ]
10
2018-08-16T04:55:06.000Z
2022-01-08T16:09:39.000Z
src/olympia/abuse/models.py
atiqueahmedziad/addons-server
6e1cc00bf15d245fbcdddf618286bba943731e45
[ "BSD-3-Clause" ]
171
2018-05-20T00:27:59.000Z
2022-03-21T13:34:27.000Z
src/olympia/abuse/models.py
atiqueahmedziad/addons-server
6e1cc00bf15d245fbcdddf618286bba943731e45
[ "BSD-3-Clause" ]
12
2018-08-01T16:46:09.000Z
2022-01-08T16:09:46.000Z
from django.conf import settings from django.db import models from django.utils import translation from olympia import amo from olympia.addons.models import Addon from olympia.amo.models import ModelBase from olympia.amo.utils import send_mail from olympia.users.models import UserProfile class AbuseReport(ModelBase)...
37.430556
78
0.653432
from django.conf import settings from django.db import models from django.utils import translation from olympia import amo from olympia.addons.models import Addon from olympia.amo.models import ModelBase from olympia.amo.utils import send_mail from olympia.users.models import UserProfile class AbuseReport(ModelBase)...
true
true
f74cdc0d2925d2b84bcc717691f59617031e4bb9
3,130
py
Python
driver.py
kvosbur/scheduler
2e6386dc9a62da8e441bd9beebf45ff6a3834793
[ "MIT" ]
null
null
null
driver.py
kvosbur/scheduler
2e6386dc9a62da8e441bd9beebf45ff6a3834793
[ "MIT" ]
null
null
null
driver.py
kvosbur/scheduler
2e6386dc9a62da8e441bd9beebf45ff6a3834793
[ "MIT" ]
null
null
null
import streamlit as st from _scheduler.work import Room, Staff, EType, RType from _scheduler.manager import RoomManager import graphviz as graphviz import datetime as dt from datetime import datetime, date, timedelta import scheduler def get_num_of_staff(): num_of_staff = st.text_input("How many staff do you want...
30.686275
79
0.588498
import streamlit as st from _scheduler.work import Room, Staff, EType, RType from _scheduler.manager import RoomManager import graphviz as graphviz import datetime as dt from datetime import datetime, date, timedelta import scheduler def get_num_of_staff(): num_of_staff = st.text_input("How many staff do you want...
true
true
f74cde0c06c31b6c133142c7ddaaea1874029aa3
45,062
py
Python
tests/test_wltp_db.py
qinfeng2011/wltp
317ad38fb96599a29d22e40f69b6aeb4d205611d
[ "Apache-2.0" ]
null
null
null
tests/test_wltp_db.py
qinfeng2011/wltp
317ad38fb96599a29d22e40f69b6aeb4d205611d
[ "Apache-2.0" ]
null
null
null
tests/test_wltp_db.py
qinfeng2011/wltp
317ad38fb96599a29d22e40f69b6aeb4d205611d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013-2019 European Commission (JRC); # Licensed under the EUPL (the 'Licence'); # You may not use this work except in compliance with the Licence. # You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl """(DEPRECATED) Compares the results of...
38.091293
129
0.545138
from collections import OrderedDict import glob import logging import math import os import re import unittest from unittest.case import skipIf from wltp import utils from wltp.utils import memoize import numpy as np import numpy.testing as npt import pandas as pd from wltp.experiment import Experiment from .goodve...
true
true
f74cdeaf0c39ddc04f1fd152b600c1715618ce39
1,580
py
Python
app/user/serializers.py
madisonalgo/recipe-app-api
aa2a67671e8f8b57473e7d22b7c5bbeca624846c
[ "MIT" ]
null
null
null
app/user/serializers.py
madisonalgo/recipe-app-api
aa2a67671e8f8b57473e7d22b7c5bbeca624846c
[ "MIT" ]
null
null
null
app/user/serializers.py
madisonalgo/recipe-app-api
aa2a67671e8f8b57473e7d22b7c5bbeca624846c
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model, authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from pprint import pprint class UserSerializer(serializers.ModelSerializer): """serializer for the users object""" class Meta: mode...
31.6
75
0.623418
from django.contrib.auth import get_user_model, authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from pprint import pprint class UserSerializer(serializers.ModelSerializer): class Meta: model = get_user_model() fields = ('em...
true
true
f74cdeb46a2ba18d64d1e12cfe85a2b8a9314823
1,304
py
Python
backend/recommender/models.py
Johnson-olaolu/SDPR-Dashboard
1be52ed460dde16eb07174a6afeaaede057e639a
[ "MIT" ]
null
null
null
backend/recommender/models.py
Johnson-olaolu/SDPR-Dashboard
1be52ed460dde16eb07174a6afeaaede057e639a
[ "MIT" ]
10
2022-03-04T09:05:18.000Z
2022-03-04T09:52:32.000Z
backend/recommender/models.py
Johnson-olaolu/SDPR-Dashboard
1be52ed460dde16eb07174a6afeaaede057e639a
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class StudentDataDropout(models.Model) : studentID = models.CharField(max_length=100000) Complete1 = models.IntegerField() CompleteCIP1 = models.IntegerField() CompleteDevEnglish = models.IntegerField() CompleteDevMath = models.IntegerField(...
48.296296
81
0.770706
from django.db import models class StudentDataDropout(models.Model) : studentID = models.CharField(max_length=100000) Complete1 = models.IntegerField() CompleteCIP1 = models.IntegerField() CompleteDevEnglish = models.IntegerField() CompleteDevMath = models.IntegerField() CumGPA = models.Decim...
true
true
f74ce28ad93ab00fe96bb9586e4776bac1969044
3,236
py
Python
profiles_project/settings.py
csourav08/profiles-rest-api
5f7f465d37d72b1dff29ccac90d04f38103b0d86
[ "MIT" ]
null
null
null
profiles_project/settings.py
csourav08/profiles-rest-api
5f7f465d37d72b1dff29ccac90d04f38103b0d86
[ "MIT" ]
null
null
null
profiles_project/settings.py
csourav08/profiles-rest-api
5f7f465d37d72b1dff29ccac90d04f38103b0d86
[ "MIT" ]
null
null
null
""" Django settings for profiles_project project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
25.68254
91
0.701792
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '+iuqhe)tr3ia7m3t6csa76tiays__2zr$y=#roa)rhn0tzx4_9' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f74ce2e0d09d8acdcf39726ff713f82becab6237
9,374
py
Python
lib/galaxy/webapps/galaxy/api/__init__.py
muon-spectroscopy-computational-project/muon-galaxy
b9e43e76459adbeae6002a53d265b971d5b3c1e4
[ "CC-BY-3.0" ]
10
2016-05-04T22:03:18.000Z
2019-05-28T23:34:06.000Z
lib/galaxy/webapps/galaxy/api/__init__.py
common-workflow-language/galaxy
fd644561a80c682d99105a45294c8938b05f2ef6
[ "CC-BY-3.0" ]
125
2015-10-19T20:20:33.000Z
2021-11-11T17:04:38.000Z
lib/galaxy/webapps/galaxy/api/__init__.py
gregvonkuster/galaxy
a32068a0338e6d738b055d62ada6f4d4c13ca9e7
[ "CC-BY-3.0" ]
4
2015-02-17T18:18:35.000Z
2016-07-25T10:35:23.000Z
""" This module *does not* contain API routes. It exclusively contains dependencies to be used in FastAPI routes """ import inspect from typing import ( Any, AsyncGenerator, cast, Optional, Type, TypeVar, ) from fastapi import ( Cookie, Form, Header, Query, Response, ) from ...
31.142857
151
0.696821
import inspect from typing import ( Any, AsyncGenerator, cast, Optional, Type, TypeVar, ) from fastapi import ( Cookie, Form, Header, Query, Response, ) from fastapi.params import Depends from fastapi_utils.cbv import cbv from fastapi_utils.inferring_router import InferringR...
true
true
f74ce42a7499f56a6309385b1c17777a89a51950
2,862
py
Python
rx/concurrency/mainloopscheduler/tkinterscheduler.py
daliclass/RxPY
d3ff1b72963fd08341807986d49480351015165e
[ "MIT" ]
null
null
null
rx/concurrency/mainloopscheduler/tkinterscheduler.py
daliclass/RxPY
d3ff1b72963fd08341807986d49480351015165e
[ "MIT" ]
null
null
null
rx/concurrency/mainloopscheduler/tkinterscheduler.py
daliclass/RxPY
d3ff1b72963fd08341807986d49480351015165e
[ "MIT" ]
null
null
null
from typing import Optional from rx.core import typing from rx.disposable import CompositeDisposable, Disposable, SingleAssignmentDisposable from ..schedulerbase import SchedulerBase class TkinterScheduler(SchedulerBase): """A scheduler that schedules work via the Tkinter main event loop. http://infohost.n...
33.670588
85
0.598183
from typing import Optional from rx.core import typing from rx.disposable import CompositeDisposable, Disposable, SingleAssignmentDisposable from ..schedulerbase import SchedulerBase class TkinterScheduler(SchedulerBase): def __init__(self, master) -> None: super().__init__() self.master = mast...
true
true
f74ce538f98fd398a073d75f375d347499daf7de
498
py
Python
more/jinja2/tests/fixtures/override_template_inheritance.py
sgaist/more.jinja2
8f6fb3034b7f15a4d8de9f0891b06bff6859f9df
[ "BSD-3-Clause" ]
4
2015-05-16T19:48:34.000Z
2019-06-23T20:19:31.000Z
more/jinja2/tests/fixtures/override_template_inheritance.py
sgaist/more.jinja2
8f6fb3034b7f15a4d8de9f0891b06bff6859f9df
[ "BSD-3-Clause" ]
10
2015-01-07T14:12:58.000Z
2020-10-02T14:54:44.000Z
more/jinja2/tests/fixtures/override_template_inheritance.py
sgaist/more.jinja2
8f6fb3034b7f15a4d8de9f0891b06bff6859f9df
[ "BSD-3-Clause" ]
5
2015-05-15T22:15:39.000Z
2020-10-02T13:51:20.000Z
from more.jinja2 import Jinja2App class App(Jinja2App): pass @App.path(path="persons/{name}") class Person: def __init__(self, name): self.name = name @App.template_directory() def get_template_dir(): return "templates" @App.html(model=Person, template="person_inherit.jinja2") def person_def...
16.064516
57
0.712851
from more.jinja2 import Jinja2App class App(Jinja2App): pass @App.path(path="persons/{name}") class Person: def __init__(self, name): self.name = name @App.template_directory() def get_template_dir(): return "templates" @App.html(model=Person, template="person_inherit.jinja2") def person_def...
true
true
f74ce673f2b8f7b94e2c688247021bc0c54e0234
7,230
py
Python
photobooth.py
davea/photobooth
80e967c459d6aa779f8e188cf07fcc5681d3a070
[ "MIT" ]
null
null
null
photobooth.py
davea/photobooth
80e967c459d6aa779f8e188cf07fcc5681d3a070
[ "MIT" ]
null
null
null
photobooth.py
davea/photobooth
80e967c459d6aa779f8e188cf07fcc5681d3a070
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os import time import queue import random import logging import tempfile from glob import glob from configparser import ConfigParser from picamera import PiCamera, Color from ft5406 import Touchscreen from PIL import Image from camera import Camera, CameraError, CameraNotConnectedError f...
34.593301
154
0.673859
import os import time import queue import random import logging import tempfile from glob import glob from configparser import ConfigParser from picamera import PiCamera, Color from ft5406 import Touchscreen from PIL import Image from camera import Camera, CameraError, CameraNotConnectedError from printer import Prin...
true
true
f74ce6d6571b2b6595ba0ad41b51dad5e239ce44
1,319
py
Python
GameLauncher.py
bfahm/BEKA-Engine
3dc0438794c7be2820b461ad9b5b55db0ff782ca
[ "MIT" ]
null
null
null
GameLauncher.py
bfahm/BEKA-Engine
3dc0438794c7be2820b461ad9b5b55db0ff782ca
[ "MIT" ]
null
null
null
GameLauncher.py
bfahm/BEKA-Engine
3dc0438794c7be2820b461ad9b5b55db0ff782ca
[ "MIT" ]
null
null
null
# Replace "Keeper" with game file name. Ex: if your game file is called MyGame.Py, Write MyGame instead of Keeper from \ Keeper \ import * from OpenGL.GLUT import * # Setup Variables screenwidth = 800 screenheight = 800 gameTitle = b"BEKA Engine" def Timer(v): Update() glutTimerFunc(...
29.977273
118
0.639121
from \ Keeper \ import * from OpenGL.GLUT import * screenwidth = 800 screenheight = 800 gameTitle = b"BEKA Engine" def Timer(v): Update() glutTimerFunc(time_interval, Timer, 1) def main(): glutInit() glutInitDisplayMode(GLUT_SINGLE | GLUT...
true
true
f74ce710c3d884f6eab4381a27a82b25b866c761
30,581
py
Python
code/Alignment/FREAD/prosci/loops/fread.py
Eitan177/StructuralMapping
c20ce43de2698902d606b718c9a9fdf2296b0a52
[ "MIT" ]
9
2018-08-03T17:59:11.000Z
2020-04-10T20:56:32.000Z
code/Alignment/FREAD/prosci/loops/fread.py
Eitan177/StructuralMapping
c20ce43de2698902d606b718c9a9fdf2296b0a52
[ "MIT" ]
null
null
null
code/Alignment/FREAD/prosci/loops/fread.py
Eitan177/StructuralMapping
c20ce43de2698902d606b718c9a9fdf2296b0a52
[ "MIT" ]
3
2019-01-08T21:40:02.000Z
2020-04-10T21:00:58.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # import sys import os import time import itertools from heapq import heappush, heappop # Compatibility with Python < 2.6 # try: from heapq import heappushpop except ImportError: def heappushpop(heap, item): heappush(heap, item) return heappop(heap) import n...
36.105077
436
0.640757
import sys import os import time import itertools from heapq import heappush, heappop try: from heapq import heappushpop except ImportError: def heappushpop(heap, item): heappush(heap, item) return heappop(heap) import numpy from prosci.util.protein import Pdb, ResidueList, Protein from prosci.util.pdb...
true
true
f74ce760f4d049e81e1870a6aa4290f68b713961
1,985
py
Python
rich/_windows.py
cansarigol/rich
11203b86cd228e86cb5bfcf30011908cb5cd5f5a
[ "MIT" ]
null
null
null
rich/_windows.py
cansarigol/rich
11203b86cd228e86cb5bfcf30011908cb5cd5f5a
[ "MIT" ]
null
null
null
rich/_windows.py
cansarigol/rich
11203b86cd228e86cb5bfcf30011908cb5cd5f5a
[ "MIT" ]
null
null
null
import sys from dataclasses import dataclass @dataclass class WindowsConsoleFeatures: """Windows features available.""" vt: bool = False """The console supports VT codes.""" truecolor: bool = False """The console supports truecolor.""" try: import ctypes from ctypes import wintypes ...
27.191781
85
0.683627
import sys from dataclasses import dataclass @dataclass class WindowsConsoleFeatures: vt: bool = False truecolor: bool = False try: import ctypes from ctypes import wintypes from ctypes import LibraryLoader windll = LibraryLoader(ctypes.WinDLL) except (AttributeError, ImportError, ValueE...
true
true
f74ce77b652d983f46952ae4029e59ee6fe6780f
9,725
py
Python
example/reinforcement-learning/a3c/a3c.py
xudong-sun/mxnet
fe42d30d5885dd576cb871fd70594c53efce9b42
[ "Apache-2.0" ]
42
2019-07-11T18:23:52.000Z
2021-09-14T08:21:09.000Z
example/reinforcement-learning/a3c/a3c.py
greenpea0104/incubator-mxnet
fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf
[ "Apache-2.0" ]
23
2018-06-11T20:03:54.000Z
2018-08-10T03:17:49.000Z
example/reinforcement-learning/a3c/a3c.py
greenpea0104/incubator-mxnet
fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf
[ "Apache-2.0" ]
51
2019-07-12T05:10:25.000Z
2021-07-28T16:19:06.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...
39.056225
158
0.622005
from __future__ import print_function import mxnet as mx import numpy as np import rl_data import sym import argparse import logging import os import gym from datetime import datetime import time import sys try: from importlib import reload except ImportError: pass parser = argparse.ArgumentParser(description...
true
true
f74ce868b402fb327a13bfa68040cf0b1ba0c85e
7,544
py
Python
generated-libraries/python/netapp/volume/volume_language_attributes.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
2
2017-03-28T15:31:26.000Z
2018-08-16T22:15:18.000Z
generated-libraries/python/netapp/volume/volume_language_attributes.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
generated-libraries/python/netapp/volume/volume_language_attributes.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
from netapp.netapp_object import NetAppObject class VolumeLanguageAttributes(NetAppObject): """ Information about the volume language settings. """ _language_code = None @property def language_code(self): """ The volume's language code (e.g. 'en_US'). <p> Vo...
33.981982
100
0.579666
from netapp.netapp_object import NetAppObject class VolumeLanguageAttributes(NetAppObject): _language_code = None @property def language_code(self): return self._language_code @language_code.setter def language_code(self, val): if val != None: self.validate('languag...
true
true
f74ceb42384a3b75df2b8387dbd2409b50b4e1f2
2,110
py
Python
pyutilities/serve/standalone.py
intelzhangw2/Converter-for-OPCUA
70860637798ca94224aec3663d3ea3674a963c5a
[ "Apache-2.0" ]
64
2018-08-30T05:18:54.000Z
2022-03-23T14:33:42.000Z
pyutilities/serve/standalone.py
intelzhangw2/Converter-for-OPCUA
70860637798ca94224aec3663d3ea3674a963c5a
[ "Apache-2.0" ]
null
null
null
pyutilities/serve/standalone.py
intelzhangw2/Converter-for-OPCUA
70860637798ca94224aec3663d3ea3674a963c5a
[ "Apache-2.0" ]
29
2018-10-26T06:17:50.000Z
2021-05-10T07:34:35.000Z
# --coding:utf-8-- # Copyright (c) 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
29.71831
78
0.645024
import os import queue import sys from optparse import OptionParser sys.path.append('../../') from pyutilities.serve.options import Options from pyutilities.serve.daemon import daemonize from pyutilities.serve.core import PluginManager VERSION = 1.0 def main(): parser = OptionParser(usage='usage: %prog [opti...
true
true
f74ceb9568e36d6ee22864edba2a12bbca2a62f7
3,137
py
Python
alipay/aop/api/domain/SubMerchantParams.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/SubMerchantParams.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/SubMerchantParams.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class SubMerchantParams(object): def __init__(self): self._sub_merchant_id = None self._sub_merchant_name = None self._sub_merchant_service_description = None ...
36.476744
115
0.685049
import simplejson as json from alipay.aop.api.constant.ParamConstants import * class SubMerchantParams(object): def __init__(self): self._sub_merchant_id = None self._sub_merchant_name = None self._sub_merchant_service_description = None self._sub_merchant_service_name = None ...
true
true
f74cebbd629618f6410ea1fab319b9210a277e59
1,932
py
Python
net/layers.py
guoshuhong/Classification-networks
0ca20964e64cf9001e2a770b2b44d88dcca04775
[ "MIT" ]
null
null
null
net/layers.py
guoshuhong/Classification-networks
0ca20964e64cf9001e2a770b2b44d88dcca04775
[ "MIT" ]
null
null
null
net/layers.py
guoshuhong/Classification-networks
0ca20964e64cf9001e2a770b2b44d88dcca04775
[ "MIT" ]
null
null
null
from tensorflow import keras import tensorflow as tf class BatchNormalization(keras.layers.BatchNormalization): """ Identical to keras.layers.BatchNormalization, but adds the option to freeze parameters. """ def __init__(self, freeze, *args, **kwargs): self.freeze = freeze super(BatchN...
33.894737
91
0.603002
from tensorflow import keras import tensorflow as tf class BatchNormalization(keras.layers.BatchNormalization): def __init__(self, freeze, *args, **kwargs): self.freeze = freeze super(BatchNormalization, self).__init__(*args, **kwargs) self.trainable = not self.freeze def cal...
true
true
f74cecad11b09586695b070514d7c74296ec5b94
1,823
py
Python
numba/type_inference/infer_call.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
1
2015-11-05T19:33:18.000Z
2015-11-05T19:33:18.000Z
numba/type_inference/infer_call.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
numba/type_inference/infer_call.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import numba from numba import * from numba import error, nodes from numba.type_inference import module_type_inference from numba import typesystem if PY3: import builtins else: import __builtin__ as builtins debug = Fal...
29.403226
70
0.702688
from __future__ import print_function, division, absolute_import import numba from numba import * from numba import error, nodes from numba.type_inference import module_type_inference from numba import typesystem if PY3: import builtins else: import __builtin__ as builtins debug = False def resolve_function...
true
true
f74cecf60d8ab54e4fa072aef4c78720cfca7afb
3,261
py
Python
vae_torch/sample.py
aist9/autoencoder
b3b1ccbfff61883db06a6ca4506ca890eff08568
[ "MIT" ]
1
2021-02-17T04:22:10.000Z
2021-02-17T04:22:10.000Z
vae_torch/sample.py
aist9/autoencoder
b3b1ccbfff61883db06a6ca4506ca890eff08568
[ "MIT" ]
26
2019-07-16T03:07:03.000Z
2019-12-20T23:59:07.000Z
vae_torch/sample.py
aist9/autoencoder
b3b1ccbfff61883db06a6ca4506ca890eff08568
[ "MIT" ]
1
2021-02-10T08:03:08.000Z
2021-02-10T08:03:08.000Z
# VAEのサンプルコード, MNIST使用 import numpy as np import matplotlib.pyplot as plt if __name__ == '__main__': import sys # コマンドライン引数を読み込み # 引数が'-1'なら学習しない args = sys.argv train_mode = ['train', 'retrain', 'load'] mode = 0 if len(args) < 2 else int(args[1]) train_mode = train_mod...
30.476636
151
0.624655
import numpy as np import matplotlib.pyplot as plt if __name__ == '__main__': import sys args = sys.argv train_mode = ['train', 'retrain', 'load'] mode = 0 if len(args) < 2 else int(args[1]) train_mode = train_mode[mode] import chainer train, test =...
true
true
f74ced2529a889bc63d654dfe79103d3c78669ba
681
py
Python
tests/pipupgrade/test_table.py
max-nicholson/pipupgrade
669cd4ecd4d858e6fb996e75af81960d0b35ccfb
[ "MIT" ]
1
2021-02-02T19:08:14.000Z
2021-02-02T19:08:14.000Z
tests/pipupgrade/test_table.py
max-nicholson/pipupgrade
669cd4ecd4d858e6fb996e75af81960d0b35ccfb
[ "MIT" ]
null
null
null
tests/pipupgrade/test_table.py
max-nicholson/pipupgrade
669cd4ecd4d858e6fb996e75af81960d0b35ccfb
[ "MIT" ]
null
null
null
# imports - module imports from pipupgrade import cli from pipupgrade.table import _sanitize_string, Table def test__sanitize_string(): assert _sanitize_string(cli.format("foobar", cli.GREEN)) == "foobar" assert _sanitize_string(cli.format("foobar", cli.BOLD)) == "foobar" def test_table(): table =...
25.222222
72
0.64464
from pipupgrade import cli from pipupgrade.table import _sanitize_string, Table def test__sanitize_string(): assert _sanitize_string(cli.format("foobar", cli.GREEN)) == "foobar" assert _sanitize_string(cli.format("foobar", cli.BOLD)) == "foobar" def test_table(): table = Table() assert table.e...
true
true
f74cee003c3c4f2391f62fefc98bc111aa961f18
29,998
py
Python
synapseclient/utils.py
zimingd/synapsePythonClient
6bddd4d9de2f06f6f79d8ce814ac57970d6bebee
[ "Apache-2.0" ]
null
null
null
synapseclient/utils.py
zimingd/synapsePythonClient
6bddd4d9de2f06f6f79d8ce814ac57970d6bebee
[ "Apache-2.0" ]
null
null
null
synapseclient/utils.py
zimingd/synapsePythonClient
6bddd4d9de2f06f6f79d8ce814ac57970d6bebee
[ "Apache-2.0" ]
null
null
null
""" ***************** Utility Functions ***************** Utility functions useful in the implementation and testing of the Synapse client. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future.utils import ...
32.92865
178
0.634709
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future.utils import implements_iterator from builtins import str import six try: from urllib.parse import urlparse from urllib.parse import urlencode from...
true
true
f74cee60ec6eb1ebac4c9593c6c8ae327160786f
2,647
py
Python
3-Greedy Algorithms, Minimum Spanning Tree, and Dynamic Programming/2-Dynamic Programming/4-Sequence Alignment Problem/Two Strings Problems Using Dynamic Progamming/2-Longest Common Subsequence Problem/longest_common_subsequence.py
Ziang-Lu/Coursera-Algorithms-Stanford-U-
936ef4230ca4f3d22008255e6feb1519ed646e79
[ "MIT" ]
25
2018-01-20T23:09:30.000Z
2022-01-17T04:51:25.000Z
3-Greedy Algorithms, Minimum Spanning Tree, and Dynamic Programming/2-Dynamic Programming/4-Sequence Alignment Problem/Two Strings Problems Using Dynamic Progamming/2-Longest Common Subsequence Problem/longest_common_subsequence.py
Ziang-Lu/Coursera-Algorithms-Stanford-U-
936ef4230ca4f3d22008255e6feb1519ed646e79
[ "MIT" ]
null
null
null
3-Greedy Algorithms, Minimum Spanning Tree, and Dynamic Programming/2-Dynamic Programming/4-Sequence Alignment Problem/Two Strings Problems Using Dynamic Progamming/2-Longest Common Subsequence Problem/longest_common_subsequence.py
Ziang-Lu/Coursera-Algorithms-Stanford-U-
936ef4230ca4f3d22008255e6feb1519ed646e79
[ "MIT" ]
10
2018-11-29T06:19:23.000Z
2021-06-27T20:59:29.000Z
#!usr/bin/env python3 # -*- coding: utf-8 -*- """ Given two strings X and Y of length m and n, respectively, find the longest common subsequence (LCS). Algorithm: (Dynamic programming) Denote LCS(X, Y) to be the LCS of X and Y. Consider the final characters x_m and y_n: 1. x_m and y_n are the same: Let X' = {X - x...
30.425287
80
0.546657
__author__ = 'Ziang Lu' from typing import List def longest_common_subsequence(x: str, y: str) -> List[str]: if not x or not y: return [] m, n = len(x), len(y) subproblems = [[0 * (n + 1)] for _ in range(m + 1)] for i in range(1, m + 1): for j in range(1, n + 1): ...
true
true
f74cefba2da868e0a28021fe4608f22c484c6e8e
2,585
py
Python
eval.py
JetBrains-Research/commit_message_generation
dc6efbb3fca92d8d289dfdfa6a1e2aad8932774e
[ "MIT" ]
2
2021-08-07T23:05:39.000Z
2021-12-20T09:55:53.000Z
eval.py
JetBrains-Research/commit_message_generation
dc6efbb3fca92d8d289dfdfa6a1e2aad8932774e
[ "MIT" ]
1
2020-11-10T13:44:26.000Z
2020-11-26T15:20:42.000Z
eval.py
saridormi/commit_message_generation
c25db61a5f41accfb566caaea5feb0d275751293
[ "MIT" ]
null
null
null
import os import pytorch_lightning as pl import hydra from hydra.utils import instantiate from omegaconf import DictConfig, OmegaConf from src.model import EncoderDecoderModule, GPT2LMHeadModule from src.data_utils import CMGDataModule @hydra.main(config_path="conf", config_name="config") def main(cfg: DictConfig)...
35.410959
111
0.589555
import os import pytorch_lightning as pl import hydra from hydra.utils import instantiate from omegaconf import DictConfig, OmegaConf from src.model import EncoderDecoderModule, GPT2LMHeadModule from src.data_utils import CMGDataModule @hydra.main(config_path="conf", config_name="config") def main(cfg: DictConfig)...
true
true
f74cefd439fb16c1712739e94c8fb19c93938c14
8,790
py
Python
arvet_slam/metrics/frame_error/frame_error_update_denormalised_data.py
jskinn/arvet-slam
94b1be30dd64a02ab3d7ac8b84292ba6d5b4153e
[ "BSD-2-Clause" ]
4
2018-03-25T02:48:48.000Z
2021-05-17T09:00:08.000Z
arvet_slam/metrics/frame_error/frame_error_update_denormalised_data.py
jskinn/arvet-slam
94b1be30dd64a02ab3d7ac8b84292ba6d5b4153e
[ "BSD-2-Clause" ]
null
null
null
arvet_slam/metrics/frame_error/frame_error_update_denormalised_data.py
jskinn/arvet-slam
94b1be30dd64a02ab3d7ac8b84292ba6d5b4153e
[ "BSD-2-Clause" ]
null
null
null
import logging import time from itertools import chain, zip_longest from pymongo import UpdateMany from pymodm.context_managers import no_auto_dereference from arvet.core.system import VisionSystem from arvet.core.trial_result import TrialResult from arvet.core.image import Image from arvet.core.image_source import Ima...
49.106145
117
0.684414
import logging import time from itertools import chain, zip_longest from pymongo import UpdateMany from pymodm.context_managers import no_auto_dereference from arvet.core.system import VisionSystem from arvet.core.trial_result import TrialResult from arvet.core.image import Image from arvet.core.image_source import Ima...
true
true
f74cf043819371b1c2443a369762a91ed5d2116f
7,536
py
Python
embedutils/converters.py
zephyrkul/phen-cogs
656cbab522ed085d70850da1a066c170cbbe92ed
[ "MIT" ]
null
null
null
embedutils/converters.py
zephyrkul/phen-cogs
656cbab522ed085d70850da1a066c170cbbe92ed
[ "MIT" ]
null
null
null
embedutils/converters.py
zephyrkul/phen-cogs
656cbab522ed085d70850da1a066c170cbbe92ed
[ "MIT" ]
null
null
null
import asyncio import json from typing import Dict, List, Optional, Union import discord import yaml from redbot.core import commands from redbot.core.commands import ( BadArgument, CheckFailure, Converter, MessageConverter, TextChannelConverter, ) from redbot.core.utils import menus class String...
37.492537
100
0.616242
import asyncio import json from typing import Dict, List, Optional, Union import discord import yaml from redbot.core import commands from redbot.core.commands import ( BadArgument, CheckFailure, Converter, MessageConverter, TextChannelConverter, ) from redbot.core.utils import menus class String...
true
true
f74cf150c6708c379b58b0e5ddf07e5acfa9ce48
4,752
py
Python
midstream/views.py
georgiawang5332/meatFoodManager
204b5b7aa2a3c5a6c9cc38077a10a72c0c69f140
[ "MIT" ]
null
null
null
midstream/views.py
georgiawang5332/meatFoodManager
204b5b7aa2a3c5a6c9cc38077a10a72c0c69f140
[ "MIT" ]
null
null
null
midstream/views.py
georgiawang5332/meatFoodManager
204b5b7aa2a3c5a6c9cc38077a10a72c0c69f140
[ "MIT" ]
null
null
null
from django.shortcuts import render, get_object_or_404, redirect from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.db.models import Q from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.contrib import messages from midstream.forms import * # Create your ...
32.326531
209
0.657828
from django.shortcuts import render, get_object_or_404, redirect from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.db.models import Q from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.contrib import messages from midstream.forms import * def create(req...
true
true
f74cf16e91fc7ea19a01642f501e52fb01253c7e
3,249
py
Python
APIs/management/management/routers/addresses.py
matteyeux/MyBookingServices
ce6ec906b3a58da16e1f066b9af290fb7e8b82d3
[ "MIT" ]
null
null
null
APIs/management/management/routers/addresses.py
matteyeux/MyBookingServices
ce6ec906b3a58da16e1f066b9af290fb7e8b82d3
[ "MIT" ]
3
2022-02-26T16:50:12.000Z
2022-02-26T16:50:12.000Z
APIs/management/management/routers/addresses.py
matteyeux/MyBookingServices
ce6ec906b3a58da16e1f066b9af290fb7e8b82d3
[ "MIT" ]
null
null
null
import os from typing import Optional from fastapi import APIRouter from fastapi import HTTPException from fastapi import Request from management.models.addresses import Addresses from management.utils import user_is_admin from management.utils import user_logged from pydantic import BaseModel router = APIRouter() ...
27.533898
76
0.693136
import os from typing import Optional from fastapi import APIRouter from fastapi import HTTPException from fastapi import Request from management.models.addresses import Addresses from management.utils import user_is_admin from management.utils import user_logged from pydantic import BaseModel router = APIRouter() ...
true
true
f74cf24cd8c95488d288b4a2c551e0af3d5c443d
114
py
Python
ipywidgets/_version.py
minrk/ipython_widgets
a80597fd4c81dd75a2f610e376fe21a64e0df8d1
[ "BSD-3-Clause" ]
2
2019-05-15T03:10:38.000Z
2020-10-08T08:08:24.000Z
ipywidgets/_version.py
minrk/ipython_widgets
a80597fd4c81dd75a2f610e376fe21a64e0df8d1
[ "BSD-3-Clause" ]
2
2015-12-29T18:03:24.000Z
2016-05-19T06:26:50.000Z
ipywidgets/_version.py
minrk/ipython_widgets
a80597fd4c81dd75a2f610e376fe21a64e0df8d1
[ "BSD-3-Clause" ]
1
2020-05-14T14:32:56.000Z
2020-05-14T14:32:56.000Z
version_info = (6, 0, 0, 'beta7') __version__ = '.'.join(map(str, version_info)) __frontend_version__ = '^2.0.20'
28.5
46
0.675439
version_info = (6, 0, 0, 'beta7') __version__ = '.'.join(map(str, version_info)) __frontend_version__ = '^2.0.20'
true
true
f74cf35b76e4ab4dbb98854f098dd2d45783cde0
424
py
Python
libs/interface.py
spidermila/mikrotik_control
65bf4405be180cf5073cdb129aa345df4ddfac52
[ "MIT" ]
null
null
null
libs/interface.py
spidermila/mikrotik_control
65bf4405be180cf5073cdb129aa345df4ddfac52
[ "MIT" ]
null
null
null
libs/interface.py
spidermila/mikrotik_control
65bf4405be180cf5073cdb129aa345df4ddfac52
[ "MIT" ]
1
2022-03-20T02:57:03.000Z
2022-03-20T02:57:03.000Z
class Interface: def __init__( self, number: int, name: str, disabled: bool, running: bool, slave: bool, dynamic: bool, comment: str, ) -> None: self.number = number self.name = name self.disabled = disabled self.run...
22.315789
32
0.514151
class Interface: def __init__( self, number: int, name: str, disabled: bool, running: bool, slave: bool, dynamic: bool, comment: str, ) -> None: self.number = number self.name = name self.disabled = disabled self.run...
true
true
f74cf36922d66a0003ccd3a85420fdeac4e3725f
1,283
py
Python
youtube_dl_client.py
franciscoGPS/youtdl
85b7530f9e01386b1baa1d7531a01d90b1e97cd2
[ "Apache-2.0" ]
null
null
null
youtube_dl_client.py
franciscoGPS/youtdl
85b7530f9e01386b1baa1d7531a01d90b1e97cd2
[ "Apache-2.0" ]
null
null
null
youtube_dl_client.py
franciscoGPS/youtdl
85b7530f9e01386b1baa1d7531a01d90b1e97cd2
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import youtube_dl class YoutubeDLClient(): """docstring for YoutubeDLClient""" def __init__(self, ydl_opts): ydl_opts.update({'logger': self.MyLogger()}) ydl_opts.update({'progress_hooks': [self.my_hook]}) self.ydl_opts = ydl_opts self.ydl...
27.297872
66
0.538581
from __future__ import unicode_literals import youtube_dl class YoutubeDLClient(): def __init__(self, ydl_opts): ydl_opts.update({'logger': self.MyLogger()}) ydl_opts.update({'progress_hooks': [self.my_hook]}) self.ydl_opts = ydl_opts self.ydl = youtube_dl.YoutubeDL(ydl_opts) ...
true
true
f74cf3ac034cdda587e6101224f62d913c8d848e
223
py
Python
mp/core/framework.py
kerryeon/mp_python
1aca4069bc635959fa4f3ce94507c55226219039
[ "MIT" ]
1
2021-04-08T01:59:11.000Z
2021-04-08T01:59:11.000Z
mp/core/framework.py
kerryeon/mp_python
1aca4069bc635959fa4f3ce94507c55226219039
[ "MIT" ]
null
null
null
mp/core/framework.py
kerryeon/mp_python
1aca4069bc635959fa4f3ce94507c55226219039
[ "MIT" ]
null
null
null
import numpy as np MAP_NUM_TYPE = { # bool-type is not supported 'b': np.bool_, 'i8': np.uint8, 'i32': np.int32, 'i64': np.int64, 'f16': np.float16, 'f32': np.float32, 'f64': np.float64, }
15.928571
32
0.547085
import numpy as np MAP_NUM_TYPE = { 'b': np.bool_, 'i8': np.uint8, 'i32': np.int32, 'i64': np.int64, 'f16': np.float16, 'f32': np.float32, 'f64': np.float64, }
true
true
f74cf420f6672be7a50384579ebb67c9a596cb62
3,215
py
Python
linkedin_matrix/db/upgrade/v01_initial_revision.py
sumnerevans/mautrix-linkedin
4d9b3feb8b6d7b7cba534cfaef93582814586958
[ "Apache-2.0" ]
9
2021-06-10T11:22:37.000Z
2021-07-14T14:31:35.000Z
linkedin_matrix/db/upgrade/v01_initial_revision.py
sumnerevans/linkedin-matrix
4d9b3feb8b6d7b7cba534cfaef93582814586958
[ "Apache-2.0" ]
55
2021-06-04T03:04:53.000Z
2021-07-13T03:01:15.000Z
linkedin_matrix/db/upgrade/v01_initial_revision.py
sumnerevans/mautrix-linkedin
4d9b3feb8b6d7b7cba534cfaef93582814586958
[ "Apache-2.0" ]
null
null
null
from asyncpg import Connection from . import upgrade_table @upgrade_table.register(description="Initial asyncpg revision", transaction=False) async def upgrade_v1(conn: Connection): create_table_queries = [ """ CREATE TABLE "user" ( mxid TEXT PRIMARY KEY, li_mem...
29.495413
82
0.479938
from asyncpg import Connection from . import upgrade_table @upgrade_table.register(description="Initial asyncpg revision", transaction=False) async def upgrade_v1(conn: Connection): create_table_queries = [ """ CREATE TABLE "user" ( mxid TEXT PRIMARY KEY, li_mem...
true
true
f74cf537f9ac147d06a9262730e0ed6c8c75d50c
1,605
py
Python
digits/download_data/__main__.py
4QuantOSS/OpenDIGITS
f7969aef0f91d074d09290261ca36e2e93128276
[ "BSD-3-Clause" ]
2
2018-05-09T05:54:37.000Z
2018-05-13T14:18:03.000Z
digits/download_data/__main__.py
4QuantOSS/OpenDIGITS
f7969aef0f91d074d09290261ca36e2e93128276
[ "BSD-3-Clause" ]
null
null
null
digits/download_data/__main__.py
4QuantOSS/OpenDIGITS
f7969aef0f91d074d09290261ca36e2e93128276
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function from __future__ import absolute_import # Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. import argparse import sys import time from .cifar10 import Cifar10Downloader from .cifar100 import Cifar100Downloader from .mnist import MnistDownloader if __name__ == '_...
28.157895
79
0.576324
from __future__ import print_function from __future__ import absolute_import import argparse import sys import time from .cifar10 import Cifar10Downloader from .cifar100 import Cifar100Downloader from .mnist import MnistDownloader if __name__ == '__main__': parser = argparse.ArgumentParser(description='Download-...
true
true
f74cf58aef1b16d864d26ca77026a62d5f47e48f
90,354
py
Python
peter_sslers/lib/db/get.py
aptise/peter_sslers
1dcae3fee0c1f4c67ae8a614aed7e2a3121e88b0
[ "MIT" ]
35
2016-04-21T18:55:31.000Z
2022-03-30T08:22:43.000Z
peter_sslers/lib/db/get.py
aptise/peter_sslers
1dcae3fee0c1f4c67ae8a614aed7e2a3121e88b0
[ "MIT" ]
8
2018-05-23T13:38:49.000Z
2021-03-19T21:05:44.000Z
peter_sslers/lib/db/get.py
aptise/peter_sslers
1dcae3fee0c1f4c67ae8a614aed7e2a3121e88b0
[ "MIT" ]
2
2016-08-18T21:07:11.000Z
2017-01-11T09:47:40.000Z
# logging import logging log = logging.getLogger(__name__) # stdlib import datetime # pypi import sqlalchemy # localapp from ... import lib from .. import utils from ...model import utils as model_utils from ...model import objects as model_objects # ===============================================================...
31.770042
126
0.65302
import logging log = logging.getLogger(__name__) import datetime import sqlalchemy from ... import lib from .. import utils from ...model import utils as model_utils from ...model import objects as model_objects def get__AcmeEventLog__count(ctx): counted = ctx.dbSession.query(model_objects.AcmeEventLog).cou...
true
true
f74cf71883f97756a405a10c859515f5aac34653
1,745
py
Python
metaci/testresults/migrations/0019_auto_20201016_1935.py
sfdc-qbranch/MetaCI
78ac0d2bccd2db381998321ebd71029dd5d9ab39
[ "BSD-3-Clause" ]
48
2018-10-24T14:52:06.000Z
2022-03-25T21:14:50.000Z
metaci/testresults/migrations/0019_auto_20201016_1935.py
sfdc-qbranch/MetaCI
78ac0d2bccd2db381998321ebd71029dd5d9ab39
[ "BSD-3-Clause" ]
2,034
2018-10-31T20:59:16.000Z
2022-03-22T21:38:03.000Z
metaci/testresults/migrations/0019_auto_20201016_1935.py
sfdc-qbranch/MetaCI
78ac0d2bccd2db381998321ebd71029dd5d9ab39
[ "BSD-3-Clause" ]
27
2018-12-24T18:16:23.000Z
2021-12-15T17:57:27.000Z
# Generated by Django 2.2.16 on 2020-10-16 19:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("testresults", "0018_testresult_robot_tags"), ] operations = [ migrations.AlterField( model_name="testresult", name=...
32.314815
74
0.591404
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("testresults", "0018_testresult_robot_tags"), ] operations = [ migrations.AlterField( model_name="testresult", name="email_invocations_allowed", field=mo...
true
true
f74cf73c498658e6d4ed787f5f4d671984a52111
1,194
py
Python
algorithm/neural-network/XOR.py
mk43/machine-learning
1ca1baf797fe6f593a88ad4e0d7ac7e5c24ce139
[ "Apache-2.0" ]
6
2018-02-22T00:27:44.000Z
2019-11-21T18:12:48.000Z
algorithm/neural-network/XOR.py
mk43/machine-learning
1ca1baf797fe6f593a88ad4e0d7ac7e5c24ce139
[ "Apache-2.0" ]
null
null
null
algorithm/neural-network/XOR.py
mk43/machine-learning
1ca1baf797fe6f593a88ad4e0d7ac7e5c24ce139
[ "Apache-2.0" ]
4
2018-02-19T05:59:23.000Z
2020-04-08T08:53:02.000Z
# coding: utf-8 import numpy as np x1 = np.asarray([0, 0, 1, 1]) x2 = np.asarray([0, 1, 0, 1]) X = np.row_stack((np.ones(shape=(1, 4)), x1, x2)) print("X:\n%s" % X) y = np.asarray([0, 1, 1, 0]) W1 = np.asarray([[-1, 2, -2], [-1, -2, 2]]) W2 = np.asarray([-1, 2, 2]) def sigmoid(input): return 1 ...
23.88
55
0.463987
import numpy as np x1 = np.asarray([0, 0, 1, 1]) x2 = np.asarray([0, 1, 0, 1]) X = np.row_stack((np.ones(shape=(1, 4)), x1, x2)) print("X:\n%s" % X) y = np.asarray([0, 1, 1, 0]) W1 = np.asarray([[-1, 2, -2], [-1, -2, 2]]) W2 = np.asarray([-1, 2, 2]) def sigmoid(input): return 1 / (1 + np.power(...
true
true
f74cf7e04b78d92e4029b5aebb44fe312293709d
584
py
Python
otcore/occurrence/migrations/0003_auto_20160504_0937.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
null
null
null
otcore/occurrence/migrations/0003_auto_20160504_0937.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
2
2017-10-30T21:19:07.000Z
2017-10-31T18:06:30.000Z
otcore/occurrence/migrations/0003_auto_20160504_0937.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-05-04 13:37 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('occurrence', '0002_auto_20160415_1549'), ] operatio...
26.545455
144
0.659247
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('occurrence', '0002_auto_20160415_1549'), ] operations = [ migrations.AlterField( model_name='occurrence...
true
true
f74cf91c1d69e4d676250648c48515c5d9b1c4e1
957
py
Python
L1Trigger/L1TGlobal/python/PrescalesVetos_cff.py
menglu21/cmssw
c3d6cb102c0aaddf652805743370c28044d53da6
[ "Apache-2.0" ]
null
null
null
L1Trigger/L1TGlobal/python/PrescalesVetos_cff.py
menglu21/cmssw
c3d6cb102c0aaddf652805743370c28044d53da6
[ "Apache-2.0" ]
null
null
null
L1Trigger/L1TGlobal/python/PrescalesVetos_cff.py
menglu21/cmssw
c3d6cb102c0aaddf652805743370c28044d53da6
[ "Apache-2.0" ]
null
null
null
# # WARNING: This file is in the L1T configuration critical path. # # All changes must be explicitly discussed with the L1T offline coordinator. # import FWCore.ParameterSet.Config as cms L1TGlobalPrescalesVetosRcdSource = cms.ESSource("EmptyESSource", recordName = cms.string('L1TGlobalPrescalesVetosRcd'), iov...
38.28
94
0.789969
import FWCore.ParameterSet.Config as cms L1TGlobalPrescalesVetosRcdSource = cms.ESSource("EmptyESSource", recordName = cms.string('L1TGlobalPrescalesVetosRcd'), iovIsRunNotTime = cms.bool(True), firstValid = cms.vuint32(1) ) L1TGlobalPrescalesVetos = cms.ESProducer("L1TGlobalPrescalesVetosESProducer", ...
true
true
f74cf9818eac25e58299b018cba1d6f13cf4a2d6
1,788
py
Python
examples/gan/gan_run.py
birdiesanders/zenml
fca11c17ccf941aa14920ef4eab470b94b26ccbe
[ "Apache-2.0" ]
1
2021-05-04T17:11:23.000Z
2021-05-04T17:11:23.000Z
examples/gan/gan_run.py
birdiesanders/zenml
fca11c17ccf941aa14920ef4eab470b94b26ccbe
[ "Apache-2.0" ]
null
null
null
examples/gan/gan_run.py
birdiesanders/zenml
fca11c17ccf941aa14920ef4eab470b94b26ccbe
[ "Apache-2.0" ]
1
2020-12-27T08:16:42.000Z
2020-12-27T08:16:42.000Z
# Copyright (c) maiot GmbH 2020. 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...
38.042553
98
0.722595
from zenml.core.datasources.image_datasource import ImageDatasource from zenml.core.pipelines.training_pipeline import TrainingPipeline from zenml.core.steps.split.categorical_domain_split_step import \ CategoricalDomainSplit from zenml.core.repo.repo import Repository from examples.gan.gan_functions import CycleG...
true
true
f74cfa5de40c148055138b1e3df9c69523326dd0
10,653
py
Python
tensorflow_datasets/object_detection/kitti.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
2
2022-02-14T09:51:39.000Z
2022-02-14T13:27:49.000Z
tensorflow_datasets/object_detection/kitti.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/object_detection/kitti.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
1
2020-12-13T22:11:33.000Z
2020-12-13T22:11:33.000Z
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets 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 appl...
34.144231
82
0.653994
import collections import csv import os import numpy as np import tensorflow as tf import tensorflow_datasets.public_api as tfds _CITATION = """\ @inproceedings{Geiger2012CVPR, author = {Andreas Geiger and Philip Lenz and Raquel Urtasun}, title = {Are we ready for Autonomous Driving? The KITTI Vision Benchmark S...
true
true
f74cfac82196445d75509fe47d7d143c870fb21e
908
py
Python
molecule/default/tests/test_installation.py
infOpen/ansible-role-xvfb
3858d3002ea38d610c98ee3d4e3ba0d8c858befb
[ "MIT" ]
2
2019-01-23T19:32:38.000Z
2020-07-25T11:10:18.000Z
molecule/default/tests/test_installation.py
infOpen/ansible-role-xvfb
3858d3002ea38d610c98ee3d4e3ba0d8c858befb
[ "MIT" ]
173
2018-04-05T20:38:50.000Z
2022-03-23T19:07:51.000Z
molecule/default/tests/test_installation.py
infOpen/ansible-role-xvfb
3858d3002ea38d610c98ee3d4e3ba0d8c858befb
[ "MIT" ]
null
null
null
""" Role tests """ import os from testinfra.utils.ansible_runner import AnsibleRunner testinfra_hosts = AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_package(host): """ Ensure package installed """ if host.system_info.distribution in ('debian', 'ubuntu'): ...
20.636364
74
0.672907
import os from testinfra.utils.ansible_runner import AnsibleRunner testinfra_hosts = AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_package(host): if host.system_info.distribution in ('debian', 'ubuntu'): assert host.package('xvfb').is_installed else: as...
true
true
f74cfccbdb98d4d5b39947d817b4cc0e71ad4550
6,906
py
Python
backend/vpn_30372/settings.py
crowdbotics-apps/vpn-30372
3a2195421c9ef62471ebab8b8e7144e633f317f3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/vpn_30372/settings.py
crowdbotics-apps/vpn-30372
3a2195421c9ef62471ebab8b8e7144e633f317f3
[ "FTL", "AML", "RSA-MD" ]
11
2021-09-13T03:33:33.000Z
2021-11-28T17:24:55.000Z
backend/vpn_30372/settings.py
crowdbotics-apps/vpn-30372
3a2195421c9ef62471ebab8b8e7144e633f317f3
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for vpn_30372 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os ...
29.512821
112
0.73009
import os import environ import logging from modules.manifest import get_modules env = environ.Env() DEBUG = env.bool("DEBUG", default=False) # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development set...
true
true
f74cfd0346d92ca9acb430da8e67b4125c5280ad
14,177
py
Python
EPMS_DBMS.py
Nishit014/EPMS
bcc8bf12b34dd3c3ebcfed4ff14cfc337590afa4
[ "MIT" ]
1
2021-06-27T11:54:02.000Z
2021-06-27T11:54:02.000Z
EPMS_DBMS.py
Nishit014/EPMS-DBMS
bcc8bf12b34dd3c3ebcfed4ff14cfc337590afa4
[ "MIT" ]
null
null
null
EPMS_DBMS.py
Nishit014/EPMS-DBMS
bcc8bf12b34dd3c3ebcfed4ff14cfc337590afa4
[ "MIT" ]
1
2021-06-26T12:40:30.000Z
2021-06-26T12:40:30.000Z
from tkinter import * import sqlite3 #import matplotlib.pyplot as plt #import pandas as pd from datetime import * from tkinter import messagebox #root=Tk() #root.configure(bg='gray27') #root.title('EPMS') #conn=sqlite3.connect('epms.db') def main(): def emp(): def back(): top.destroy...
38.734973
170
0.523242
from tkinter import * import sqlite3 from datetime import * from tkinter import messagebox def main(): def emp(): def back(): top.destroy() main() def new(): def back2(): n.destroy() main() ...
true
true
f74cfea789c4ec41c787366d22438095c3456106
1,211
py
Python
napari/layers/_shapes_layer/_constants.py
donovanr/napari
580b5eab8cc40af53aef780a65adb9216d968a32
[ "BSD-3-Clause" ]
null
null
null
napari/layers/_shapes_layer/_constants.py
donovanr/napari
580b5eab8cc40af53aef780a65adb9216d968a32
[ "BSD-3-Clause" ]
null
null
null
napari/layers/_shapes_layer/_constants.py
donovanr/napari
580b5eab8cc40af53aef780a65adb9216d968a32
[ "BSD-3-Clause" ]
null
null
null
from enum import Enum import sys class Mode(Enum): """MODE: Interactive mode. The normal, default mode is PAN_ZOOM, which allows for normal interactivity with the canvas. The SELECT mode allows for entire shapes to be selected, moved and resized. The DIRECT mode allows for shapes to be selected ...
26.326087
74
0.69777
from enum import Enum import sys class Mode(Enum): PAN_ZOOM = 0 SELECT = 1 DIRECT = 2 ADD_RECTANGLE = 3 ADD_ELLIPSE = 4 ADD_LINE = 5 ADD_PATH = 6 ADD_POLYGON = 7 VERTEX_INSERT = 8 VERTEX_REMOVE = 9 BOX_WITH_HANDLE = [0, 1, 2, 3, 4, 5, 6, 7, 9] BOX_LINE_HANDLE = [1, 2, 4, 6, 0...
true
true
f74cfec703b2ba702f4707e0c2059fdd644e14b2
226
py
Python
katas/beta/count_consecutive_characters.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
katas/beta/count_consecutive_characters.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
katas/beta/count_consecutive_characters.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
from itertools import groupby def count_consecutives(s): return ''.join(str(sum(1 for _ in g)) + k for k, g in groupby(s)) # PEP8: kata should use snake_case instead of mixedCase countConsecutives = count_consecutives
22.6
69
0.743363
from itertools import groupby def count_consecutives(s): return ''.join(str(sum(1 for _ in g)) + k for k, g in groupby(s)) countConsecutives = count_consecutives
true
true
f74cff212d3aa5ae19c1f4a2695ca6996501ba18
159
py
Python
Session7/Day1/foo/code.py
rmorgan10/LSSTC-DSFP-Sessions
1d0b3c28fe7f6f93e00e332e74873e6d1ec29d0b
[ "MIT" ]
null
null
null
Session7/Day1/foo/code.py
rmorgan10/LSSTC-DSFP-Sessions
1d0b3c28fe7f6f93e00e332e74873e6d1ec29d0b
[ "MIT" ]
null
null
null
Session7/Day1/foo/code.py
rmorgan10/LSSTC-DSFP-Sessions
1d0b3c28fe7f6f93e00e332e74873e6d1ec29d0b
[ "MIT" ]
null
null
null
from numpy import pi def do_something(): π = pi print(π)# this will make it much easier in future problems to see that something is actually happening
31.8
106
0.742138
from numpy import pi def do_something(): π = pi print(π)
true
true
f74cffe5a6279946fb16760be492a3f549feb470
132
py
Python
portfolio/urls.py
petersoleeh/WIP
8b7f1227b8d5322487677dc3b6aa1c8ce9ead91a
[ "MIT" ]
null
null
null
portfolio/urls.py
petersoleeh/WIP
8b7f1227b8d5322487677dc3b6aa1c8ce9ead91a
[ "MIT" ]
null
null
null
portfolio/urls.py
petersoleeh/WIP
8b7f1227b8d5322487677dc3b6aa1c8ce9ead91a
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns=[ #The landing page url(r'^$',views.index,name='index') ]
16.5
39
0.681818
from django.conf.urls import url from . import views urlpatterns=[ url(r'^$',views.index,name='index') ]
true
true
f74d00493cf7a39b3f2651657177430a43caf9ce
808
py
Python
jsinclude/templatetags/pkg/utils.py
cobbdb/jsinclude
7a979677359df18b755190ed569b09d0ea8dad07
[ "MIT" ]
null
null
null
jsinclude/templatetags/pkg/utils.py
cobbdb/jsinclude
7a979677359df18b755190ed569b09d0ea8dad07
[ "MIT" ]
null
null
null
jsinclude/templatetags/pkg/utils.py
cobbdb/jsinclude
7a979677359df18b755190ed569b09d0ea8dad07
[ "MIT" ]
null
null
null
def stripQuotes(string): """Strip leading and trailing quotes from a string. Does nothing unless starting and ending quotes are present and the same type (single or double). """ single = string.startswith("'") and string.endswith("'") double = string.startswith('"') and string.endswith('"'...
31.076923
67
0.623762
def stripQuotes(string): single = string.startswith("'") and string.endswith("'") double = string.startswith('"') and string.endswith('"') if single or double: return string[1:-1] return string def escapeQuotes(string): try: return string.replace("'", "\\'") except Att...
true
true
f74d015228eab6997290a8b257cce327a871a694
6,500
py
Python
python/complex-numbers/complex_numbers_test.py
tamireinhorn/exercism
3ca78b262ad590b67c75c5d1cd83db02bc2d1e6e
[ "MIT" ]
null
null
null
python/complex-numbers/complex_numbers_test.py
tamireinhorn/exercism
3ca78b262ad590b67c75c5d1cd83db02bc2d1e6e
[ "MIT" ]
2
2021-12-18T16:31:51.000Z
2021-12-18T16:33:33.000Z
python/complex-numbers/complex_numbers_test.py
tamireinhorn/Exercism
3a3d5744e88ab4457df4e6ac20d772d8c50c43da
[ "MIT" ]
null
null
null
import math import unittest from complex_numbers import ( ComplexNumber, ) # Tests adapted from `problem-specifications//canonical-data.json` class ComplexNumbersTest(unittest.TestCase): # Real part def test_real_part_of_a_purely_real_number(self): self.assertEqual(ComplexNumber(1, 0).real, ...
34.031414
88
0.707231
import math import unittest from complex_numbers import ( ComplexNumber, ) class ComplexNumbersTest(unittest.TestCase): def test_real_part_of_a_purely_real_number(self): self.assertEqual(ComplexNumber(1, 0).real, 1) def test_real_part_of_a_purely_imaginary_number(self): self.ass...
true
true
f74d01b34d0b948711be5cf52e76a3ff134b5c32
471
py
Python
Medium/1167. Minimum Cost to Connect Sticks/solution (1).py
czs108/LeetCode-Solutions
889f5b6a573769ad077a6283c058ed925d52c9ec
[ "MIT" ]
3
2020-05-09T12:55:09.000Z
2022-03-11T18:56:05.000Z
Medium/1167. Minimum Cost to Connect Sticks/solution (1).py
czs108/LeetCode-Solutions
889f5b6a573769ad077a6283c058ed925d52c9ec
[ "MIT" ]
null
null
null
Medium/1167. Minimum Cost to Connect Sticks/solution (1).py
czs108/LeetCode-Solutions
889f5b6a573769ad077a6283c058ed925d52c9ec
[ "MIT" ]
1
2022-03-11T18:56:16.000Z
2022-03-11T18:56:16.000Z
# 1167. Minimum Cost to Connect Sticks import heapq class Solution: # Greedy | Heap def connectSticks(self, sticks: list[int]) -> int: heapq.heapify(sticks) cost = 0 while len(sticks) > 1: # Always pick two of the smallest sticks to connect. stick1, stick2 = h...
27.705882
73
0.602972
import heapq class Solution: def connectSticks(self, sticks: list[int]) -> int: heapq.heapify(sticks) cost = 0 while len(sticks) > 1: stick1, stick2 = heapq.heappop(sticks), heapq.heappop(sticks) cost += stick1 + stick2 heapq.heappush(s...
true
true
f74d01e15784d436a563807618590b57448c0f48
3,730
py
Python
xos/core/dashboard/views/interactions.py
xmaruto/mcord
3678a3d10c3703c2b73f396c293faebf0c82a4f4
[ "Apache-2.0" ]
null
null
null
xos/core/dashboard/views/interactions.py
xmaruto/mcord
3678a3d10c3703c2b73f396c293faebf0c82a4f4
[ "Apache-2.0" ]
5
2020-06-05T17:47:15.000Z
2021-09-23T23:21:27.000Z
xos/core/dashboard/views/interactions.py
pan2za/xos
c2a4da2ccaa12360b2718be303b247866aefdfe6
[ "Apache-2.0" ]
null
null
null
from view_common import * class DashboardSliceInteractions(View): def get(self, request, name="users", **kwargs): colors = ["#005586", "#6ebe49", "orange", "#707170", "#00c4b3", "#077767", "dodgerblue", "#a79b94", "#c4e76a", "red"] groups = [] matrix = [] slices = list(Slice.object...
35.865385
125
0.551743
from view_common import * class DashboardSliceInteractions(View): def get(self, request, name="users", **kwargs): colors = ["#005586", "#6ebe49", "orange", "#707170", "#00c4b3", "#077767", "dodgerblue", "#a79b94", "#c4e76a", "red"] groups = [] matrix = [] slices = list(Slice.object...
true
true
f74d025eb05b6b97ac22b14e97db453556d0d970
405
py
Python
src/monitoring.py
jagadeesh6jaga/vakyansh-realtime-server
a914adb29570ded792f4692c595527492c99b8c6
[ "MIT" ]
null
null
null
src/monitoring.py
jagadeesh6jaga/vakyansh-realtime-server
a914adb29570ded792f4692c595527492c99b8c6
[ "MIT" ]
null
null
null
src/monitoring.py
jagadeesh6jaga/vakyansh-realtime-server
a914adb29570ded792f4692c595527492c99b8c6
[ "MIT" ]
null
null
null
import time from src import log_setup LOGGER = log_setup.get_logger(__name__) def monitor(func): def wrapped_function(*args, **kwargs): start = time.monotonic_ns() return_value = func(*args, **kwargs) LOGGER.info( f'function {func.__name__} took {(time.monotonic_ns() - start)...
23.823529
101
0.666667
import time from src import log_setup LOGGER = log_setup.get_logger(__name__) def monitor(func): def wrapped_function(*args, **kwargs): start = time.monotonic_ns() return_value = func(*args, **kwargs) LOGGER.info( f'function {func.__name__} took {(time.monotonic_ns() - start)...
true
true
f74d025fc102159173e84e6023fcc9058865349c
268
py
Python
utils/util.py
daili0015/ModelFeast
0689ced4d0f37be438d3a91908e5e4cc5b7d54b8
[ "MIT" ]
247
2019-03-05T07:12:29.000Z
2022-03-29T01:51:17.000Z
utils/util.py
jungerschwarz/ModelFeast
03afca0b129532135910ee2ac72a3b85be795289
[ "MIT" ]
8
2019-05-21T03:05:27.000Z
2021-12-09T03:22:51.000Z
utils/util.py
jungerschwarz/ModelFeast
03afca0b129532135910ee2ac72a3b85be795289
[ "MIT" ]
47
2019-03-05T07:14:13.000Z
2021-11-11T01:04:28.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os def ensure_dir(path): if not os.path.exists(path): os.makedirs(path) def get_instance(module, name, config, *args): return getattr(module, config[name]['type'])(*args, **config[name]['args'])
20.615385
79
0.63806
import os def ensure_dir(path): if not os.path.exists(path): os.makedirs(path) def get_instance(module, name, config, *args): return getattr(module, config[name]['type'])(*args, **config[name]['args'])
true
true
f74d032d9362b09343651bbdd34e19ded7d8e7bf
1,726
py
Python
src/python/socket_debugger_generator.py
textX/viewX-vscode
e19fc2d3f21aaab13aa3271a0670b7b1bf2705ae
[ "MIT" ]
6
2019-10-02T16:20:45.000Z
2022-01-09T09:24:07.000Z
src/python/socket_debugger_generator.py
danielkupco/viewX-vscode
e19fc2d3f21aaab13aa3271a0670b7b1bf2705ae
[ "MIT" ]
3
2017-11-05T16:48:03.000Z
2019-02-18T16:38:11.000Z
src/python/socket_debugger_generator.py
textX/viewX-vscode
e19fc2d3f21aaab13aa3271a0670b7b1bf2705ae
[ "MIT" ]
1
2022-01-09T09:24:11.000Z
2022-01-09T09:24:11.000Z
import sys from os.path import abspath, dirname, join from os import makedirs import datetime import jinja2 from shutil import copytree ROOT_PATH = abspath(dirname(__file__)) TEMPLATE_PATH = abspath(join(ROOT_PATH, 'templates')) # pair of template name and output file name TEMPLATE_DATA = [ ('socket_debugger.temp...
29.254237
79
0.6854
import sys from os.path import abspath, dirname, join from os import makedirs import datetime import jinja2 from shutil import copytree ROOT_PATH = abspath(dirname(__file__)) TEMPLATE_PATH = abspath(join(ROOT_PATH, 'templates')) TEMPLATE_DATA = [ ('socket_debugger.template', 'socket-debugger.html') ] PROJECT_PAT...
true
true
f74d05b4ae9d00e909bd5abdc0b5832021d3d9e4
24,229
py
Python
scripts/stop_user_clusters-v6.py
smartcommunitylab/sco.mobilitycovid
a4af6b3b2d14208d638894a94b2c673397bf77fd
[ "Apache-2.0" ]
null
null
null
scripts/stop_user_clusters-v6.py
smartcommunitylab/sco.mobilitycovid
a4af6b3b2d14208d638894a94b2c673397bf77fd
[ "Apache-2.0" ]
null
null
null
scripts/stop_user_clusters-v6.py
smartcommunitylab/sco.mobilitycovid
a4af6b3b2d14208d638894a94b2c673397bf77fd
[ "Apache-2.0" ]
1
2021-01-19T09:22:15.000Z
2021-01-19T09:22:15.000Z
from __future__ import print_function from sklearn.cluster import DBSCAN import argparse import hashlib import os import time from datetime import date, datetime, timedelta from functools import reduce from math import degrees from concurrent.futures import ThreadPoolExecutor import concurrent.futures from azure.st...
39.525285
218
0.624541
from __future__ import print_function from sklearn.cluster import DBSCAN import argparse import hashlib import os import time from datetime import date, datetime, timedelta from functools import reduce from math import degrees from concurrent.futures import ThreadPoolExecutor import concurrent.futures from azure.st...
true
true
f74d072e8e2329c29dd755d044ee2ed1308e622d
26,565
py
Python
tensorflow/python/framework/func_graph.py
aeverall/tensorflow
7992bf97711919f56f80bff9e5510cead4ab2095
[ "Apache-2.0" ]
1
2018-12-06T16:34:59.000Z
2018-12-06T16:34:59.000Z
tensorflow/python/framework/func_graph.py
aeverall/tensorflow
7992bf97711919f56f80bff9e5510cead4ab2095
[ "Apache-2.0" ]
null
null
null
tensorflow/python/framework/func_graph.py
aeverall/tensorflow
7992bf97711919f56f80bff9e5510cead4ab2095
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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.186047
92
0.704837
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import weakref from tensorflow.core.framework import attr_value_pb2 from tensorflow.python.eager import context from tensorflow.python.eager import tape from tensorflow.python.eager.graph_o...
true
true
f74d078ef1fbd3e1376f3ee6b2e4b73709423dc6
1,869
py
Python
share/qt/extract_strings_qt.py
genteshare-project/genteshare
b1407e7977c52bac52326cec9c7243877d0b273d
[ "MIT" ]
3
2018-05-04T01:33:30.000Z
2018-08-08T14:54:21.000Z
share/qt/extract_strings_qt.py
genteshare-project/genteshare
b1407e7977c52bac52326cec9c7243877d0b273d
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
genteshare-project/genteshare
b1407e7977c52bac52326cec9c7243877d0b273d
[ "MIT" ]
1
2019-08-18T00:42:19.000Z
2019-08-18T00:42:19.000Z
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator import os import sys OUT_CPP="qt/gentesharestrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' ...
23.658228
83
0.599786
from subprocess import Popen, PIPE import glob import operator import os import sys OUT_CPP="qt/gentesharestrings.cpp" EMPTY=['""'] def parse_po(text): messages = [] msgid = [] msgstr = [] in_msgid = False in_msgstr = False for line in text.split('\n'): line = line.rstrip('\r') ...
true
true
f74d09353cc6f3436d0b220becdea030aa01bad5
2,111
py
Python
tests/st/networks/models/alexnet.py
unseenme/mindspore
4ba052f0cd9146ac0ccc4880a778706f1b2d0af8
[ "Apache-2.0" ]
2
2020-04-28T03:49:10.000Z
2020-04-28T03:49:13.000Z
tests/st/networks/models/alexnet.py
unseenme/mindspore
4ba052f0cd9146ac0ccc4880a778706f1b2d0af8
[ "Apache-2.0" ]
null
null
null
tests/st/networks/models/alexnet.py
unseenme/mindspore
4ba052f0cd9146ac0ccc4880a778706f1b2d0af8
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
37.035088
79
0.578399
import mindspore.nn as nn from mindspore.ops import operations as P from mindspore.nn import Dense class AlexNet(nn.Cell): def __init__(self, num_classes=10): super(AlexNet, self).__init__() self.batch_size = 32 self.conv1 = nn.Conv2d(3, 96, 11, stride=4, pad_mode="valid") ...
true
true
f74d0a5aa7455ecf8ce47b07a5a063cf945fbc01
2,021
py
Python
models/GraphUNet.py
qbxlvnf11/graph-neural-networks-for-graph-classification
5d69ead58c786aa8e472ab0433156fe09fe6ca4b
[ "MIT" ]
20
2020-09-02T07:07:35.000Z
2022-03-16T15:22:14.000Z
models/GraphUNet.py
yuexiarenjing/graph-neural-networks-for-graph-classification
5d69ead58c786aa8e472ab0433156fe09fe6ca4b
[ "MIT" ]
2
2021-11-01T08:32:10.000Z
2022-03-25T04:29:35.000Z
models/GraphUNet.py
yuexiarenjing/graph-neural-networks-for-graph-classification
5d69ead58c786aa8e472ab0433156fe09fe6ca4b
[ "MIT" ]
11
2020-09-02T07:13:46.000Z
2022-03-23T10:38:07.000Z
import os import sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) import torch.nn as nn import torch.nn.functional as F #from layers.graph_convolution_layer import GraphConvolutionLayer from layers.graph_unet_layer import GraphUNetLayer from readouts.basic_readout import readout_functi...
30.621212
110
0.59525
import os import sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) import torch.nn as nn import torch.nn.functional as F from layers.graph_unet_layer import GraphUNetLayer from readouts.basic_readout import readout_function class GraphUNet(nn.Module): def __init__(self, n_feat, n_...
true
true
f74d0bdef1ded2e9c75d7707abfe28677ab055f7
601
py
Python
P17043-class-leader/self_small_trainning/20181118.py
13022108937/homework
05b3c0535532766b286976b15245ed1f925da8c5
[ "Apache-2.0" ]
null
null
null
P17043-class-leader/self_small_trainning/20181118.py
13022108937/homework
05b3c0535532766b286976b15245ed1f925da8c5
[ "Apache-2.0" ]
null
null
null
P17043-class-leader/self_small_trainning/20181118.py
13022108937/homework
05b3c0535532766b286976b15245ed1f925da8c5
[ "Apache-2.0" ]
null
null
null
# 给定一个不超过5位的正整数,判断该数的位数,依次打印出十位,百位千位,万位的数字 num = int(input(':>> ')) length = len(str(num)) if num < 100000 and num>=0: for x in range(length): print(num%10) num //= 10 num = int(input(':>> ')) length = len(str(num)) if num < 100000 and num >= 0: for x in range(length): tmp = num // 1...
18.78125
44
0.494176
num = int(input(':>> ')) length = len(str(num)) if num < 100000 and num>=0: for x in range(length): print(num%10) num //= 10 num = int(input(':>> ')) length = len(str(num)) if num < 100000 and num >= 0: for x in range(length): tmp = num // 10 print(num - ( tmp *10)) num...
true
true
f74d0c24ed6660662b6af5e515ec032812b7061c
8,884
py
Python
contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py
TheJokersThief/opencensus-python
511289fa4cc4bbd6e013c8a33c5dc570a895ed2c
[ "Apache-2.0" ]
null
null
null
contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py
TheJokersThief/opencensus-python
511289fa4cc4bbd6e013c8a33c5dc570a895ed2c
[ "Apache-2.0" ]
null
null
null
contrib/opencensus-ext-azure/opencensus/ext/azure/log_exporter/__init__.py
TheJokersThief/opencensus-python
511289fa4cc4bbd6e013c8a33c5dc570a895ed2c
[ "Apache-2.0" ]
null
null
null
# Copyright 2019, OpenCensus 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 w...
35.678715
78
0.622467
import logging import random import threading import time import traceback from opencensus.common.schedule import Queue, QueueEvent, QueueExitEvent from opencensus.ext.azure.common import Options, utils from opencensus.ext.azure.common.processor import ProcessorMixin from opencensus.ext.azure.common.protocol import (...
true
true
f74d0c46435c066f97449e6aebd72a2a5e7e5bf9
4,329
py
Python
src/zeit/push/testing.py
ZeitOnline/zeit.push
b36d7ae1f172ffbd4e1f3d873b27831516c13054
[ "BSD-3-Clause" ]
null
null
null
src/zeit/push/testing.py
ZeitOnline/zeit.push
b36d7ae1f172ffbd4e1f3d873b27831516c13054
[ "BSD-3-Clause" ]
10
2016-08-05T05:46:30.000Z
2019-02-12T15:24:18.000Z
src/zeit/push/testing.py
ZeitOnline/zeit.push
b36d7ae1f172ffbd4e1f3d873b27831516c13054
[ "BSD-3-Clause" ]
1
2017-02-23T11:52:36.000Z
2017-02-23T11:52:36.000Z
import gocept.selenium import logging import pkg_resources import plone.testing import urlparse import zeit.cms.testing import zeit.content.text.jinja import zeit.push.interfaces import zeit.workflow.testing import zope.interface log = logging.getLogger(__name__) class PushNotifier(object): zope.interface.impl...
31.830882
77
0.685609
import gocept.selenium import logging import pkg_resources import plone.testing import urlparse import zeit.cms.testing import zeit.content.text.jinja import zeit.push.interfaces import zeit.workflow.testing import zope.interface log = logging.getLogger(__name__) class PushNotifier(object): zope.interface.impl...
true
true
f74d0c940dd4e7c9abd9793d913208bb5f9fc7e1
2,118
py
Python
test/dbghelp-remote/test.py
clayne/syringe-1
4a431aa65c371a2018fca95145a3952ba802a609
[ "BSD-2-Clause" ]
25
2015-04-14T21:53:46.000Z
2022-03-30T19:15:24.000Z
test/dbghelp-remote/test.py
clayne/syringe-1
4a431aa65c371a2018fca95145a3952ba802a609
[ "BSD-2-Clause" ]
5
2020-03-23T20:19:59.000Z
2021-05-24T19:38:31.000Z
test/dbghelp-remote/test.py
clayne/syringe-1
4a431aa65c371a2018fca95145a3952ba802a609
[ "BSD-2-Clause" ]
7
2015-07-31T13:26:37.000Z
2021-03-05T19:35:37.000Z
import sys,ctypes,pydbgeng ## types class GUID(ctypes.Structure): _fields_ = [ ("Data1", c_ulong), ("Data2", c_ushort), ("Data3", c_ushort), ("Data4", c_byte*8) ] def set(self, string): # extract guid if string[0] != "{" and string[-1] != "}": rai...
27.506494
77
0.593012
import sys,ctypes,pydbgeng class GUID(ctypes.Structure): _fields_ = [ ("Data1", c_ulong), ("Data2", c_ushort), ("Data3", c_ushort), ("Data4", c_byte*8) ] def set(self, string): if string[0] != "{" and string[-1] != "}": raise ValueError st...
false
true
f74d0d5b68f196c39781bb76b06d19f6849b1602
7,863
py
Python
ISR/utils/datahandler.py
supertopdev/data-science
76aaa67289cbb8c608b190e6409a8c001c78ac6c
[ "Apache-2.0" ]
1
2019-08-27T18:06:08.000Z
2019-08-27T18:06:08.000Z
ISR/utils/datahandler.py
DoDuy/image-super-resolution
9534085236a79e123b97f0771a4641289039d93b
[ "Apache-2.0" ]
null
null
null
ISR/utils/datahandler.py
DoDuy/image-super-resolution
9534085236a79e123b97f0771a4641289039d93b
[ "Apache-2.0" ]
null
null
null
import os import imageio import numpy as np from ISR.utils.logger import get_logger class DataHandler: """ DataHandler generate augmented batches used for training or validation. Args: lr_dir: directory containing the Low Res images. hr_dir: directory containing the High Res images. ...
38.73399
108
0.57548
import os import imageio import numpy as np from ISR.utils.logger import get_logger class DataHandler: def __init__(self, lr_dir, hr_dir, patch_size, scale, n_validation_samples=None, T=0.03): self.folders = {'hr': hr_dir, 'lr': lr_dir} self.extensions = ('.png', '.jpeg', '.jpg') self.i...
true
true
f74d0d8bd0fd329871ecb686b49a9ba97f819f7c
2,698
py
Python
tensorflow_asr/utils/env_util.py
vaibhav016/TensorFlowASR
2c90f67f284be6c8a6c182223b9f517a73bc766f
[ "Apache-2.0" ]
1
2021-11-30T16:04:53.000Z
2021-11-30T16:04:53.000Z
tensorflow_asr/utils/env_util.py
vaibhav016/TensorFlowASR
2c90f67f284be6c8a6c182223b9f517a73bc766f
[ "Apache-2.0" ]
null
null
null
tensorflow_asr/utils/env_util.py
vaibhav016/TensorFlowASR
2c90f67f284be6c8a6c182223b9f517a73bc766f
[ "Apache-2.0" ]
1
2021-08-17T14:53:33.000Z
2021-08-17T14:53:33.000Z
# Copyright 2020 Huy Le Nguyen (@usimarit) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
34.151899
105
0.705337
from typing import Union, List import warnings import tensorflow as tf logger = tf.get_logger() def setup_environment(): warnings.simplefilter("ignore") logger.setLevel("WARN") def setup_devices(devices: List[int], cpu: bool = False): if cpu: cpus = tf.config.list_physical_devices("CPU") ...
true
true
f74d0d91edb3804e7987bee2219f21d5c8102185
612
py
Python
tests/flatpages/test_models.py
jeanmask/opps
031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87
[ "MIT" ]
159
2015-01-03T16:36:35.000Z
2022-03-29T20:50:13.000Z
tests/flatpages/test_models.py
jeanmask/opps
031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87
[ "MIT" ]
81
2015-01-02T21:26:16.000Z
2021-05-29T12:24:52.000Z
tests/flatpages/test_models.py
jeanmask/opps
031c6136c38d43aa6d1ccb25a94f7bcd65ccbf87
[ "MIT" ]
75
2015-01-23T13:41:03.000Z
2021-09-24T03:45:23.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase from django.db import models from opps.flatpages.models import FlatPage class FlatPagesFields(TestCase): def test_show_in_menu(self): field = FlatPage._meta.get_field_by_name('show_in_menu')[0] self.assertFalse(field....
27.818182
67
0.707516
from django.test import TestCase from django.db import models from opps.flatpages.models import FlatPage class FlatPagesFields(TestCase): def test_show_in_menu(self): field = FlatPage._meta.get_field_by_name('show_in_menu')[0] self.assertFalse(field.default) def test_content(self): ...
true
true
f74d0e6c1dc4274ac75d615be50d61a83f182e39
1,064
py
Python
djangoerp/menus/tests/urls.py
xarala221/django-erp
f84ee8ab193b3b06ee4522ac3c888ed47396e795
[ "MIT" ]
345
2015-02-16T17:36:32.000Z
2022-01-13T11:04:35.000Z
djangoerp/menus/tests/urls.py
xarala221/django-erp
f84ee8ab193b3b06ee4522ac3c888ed47396e795
[ "MIT" ]
22
2015-09-11T13:29:00.000Z
2021-11-27T18:47:38.000Z
djangoerp/menus/tests/urls.py
xarala221/django-erp
f84ee8ab193b3b06ee4522ac3c888ed47396e795
[ "MIT" ]
243
2015-03-31T12:08:30.000Z
2022-01-29T08:23:53.000Z
#!/usr/bin/env python """This file is part of the django ERP project. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLD...
38
91
0.765038
__author__ = 'Emanuele Bertoldi <emanuele.bertoldi@gmail.com>' __copyright__ = 'Copyright (c) 2013-2015, django ERP Team' __version__ = '0.0.5' from django.conf.urls import url from django.views.generic import TemplateView class BaseTemplateView(TemplateView): template_name = "index.html" urlpatterns = [ ur...
true
true
f74d0edb06f8a572229657ad2751ad10217f0616
6,153
py
Python
src/gluonts/model/deep_factor/_network.py
ykaitao/gluon-ts
9622550974e9e0819e25438fc45353f8a6474b55
[ "Apache-2.0" ]
1
2020-01-19T13:27:51.000Z
2020-01-19T13:27:51.000Z
src/gluonts/model/deep_factor/_network.py
ykaitao/gluon-ts
9622550974e9e0819e25438fc45353f8a6474b55
[ "Apache-2.0" ]
null
null
null
src/gluonts/model/deep_factor/_network.py
ykaitao/gluon-ts
9622550974e9e0819e25438fc45353f8a6474b55
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
31.880829
87
0.61661
import math from mxnet.gluon import HybridBlock from mxnet.gluon import nn from gluonts.block.feature import FeatureEmbedder from gluonts.core.component import validated from gluonts.model.common import Tensor class DeepFactorNetworkBase(HybridBlock): def __init__( self, global_model: HybridBlo...
true
true
f74d104fecd3101afb6f2b7b942c225d3b3a3f23
1,091
py
Python
tests/cmdline_gen.py
ashusharmasigdev/libkernaux
efe96b5de9c30d7e65a7024df803bd40060e071d
[ "MIT" ]
19
2021-12-15T05:06:13.000Z
2022-01-22T01:46:47.000Z
tests/cmdline_gen.py
ashusharmasigdev/libkernaux
efe96b5de9c30d7e65a7024df803bd40060e071d
[ "MIT" ]
26
2021-12-14T00:43:38.000Z
2022-02-09T23:10:14.000Z
tests/cmdline_gen.py
ashusharmasigdev/libkernaux
efe96b5de9c30d7e65a7024df803bd40060e071d
[ "MIT" ]
1
2022-01-11T20:50:36.000Z
2022-01-11T20:50:36.000Z
from jinja2 import Environment, FileSystemLoader from os import path from yaml import SafeLoader, safe_load CASES_FILENAME = 'cmdline.yml' TEMPLATE_FILENAME = 'cmdline_gen.jinja' TEST_FILENAME = 'test_cmdline_gen.c' ROOT_DIRPATH = path.dirname(path.dirname(path.join(path.abspath(__file__)))) COMMON_DIRPATH = ...
24.795455
76
0.707608
from jinja2 import Environment, FileSystemLoader from os import path from yaml import SafeLoader, safe_load CASES_FILENAME = 'cmdline.yml' TEMPLATE_FILENAME = 'cmdline_gen.jinja' TEST_FILENAME = 'test_cmdline_gen.c' ROOT_DIRPATH = path.dirname(path.dirname(path.join(path.abspath(__file__)))) COMMON_DIRPATH = ...
true
true
f74d105d98f75a8e01f01f3a6a382e2f5abcb120
2,605
py
Python
homeassistant/components/mailgun/__init__.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
4
2019-07-03T22:36:57.000Z
2019-08-10T15:33:25.000Z
homeassistant/components/mailgun/__init__.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
7
2019-08-23T05:26:02.000Z
2022-03-11T23:57:18.000Z
homeassistant/components/mailgun/__init__.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
2
2018-08-15T03:59:35.000Z
2018-10-18T12:20:05.000Z
"""Support for Mailgun.""" import hashlib import hmac import json import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import CONF_API_KEY, CONF_DOMAIN, CONF_WEBHOOK_ID from homeassistant.helpers import config_entry_flow from .const import DOMAIN _LO...
27.421053
79
0.70096
import hashlib import hmac import json import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import CONF_API_KEY, CONF_DOMAIN, CONF_WEBHOOK_ID from homeassistant.helpers import config_entry_flow from .const import DOMAIN _LOGGER = logging.getLogger(__...
true
true
f74d117b16fd6e6d0a3879e6b01d13c5f03f026c
934
py
Python
appdaemon/lib/time_wrapper.py
snjoetw/appdaemon_apps
bfc318fac142e324e730d47b008167f738dd411d
[ "MIT" ]
null
null
null
appdaemon/lib/time_wrapper.py
snjoetw/appdaemon_apps
bfc318fac142e324e730d47b008167f738dd411d
[ "MIT" ]
null
null
null
appdaemon/lib/time_wrapper.py
snjoetw/appdaemon_apps
bfc318fac142e324e730d47b008167f738dd411d
[ "MIT" ]
null
null
null
class DateTimeWrapper: def __init__(self, app, dt): self._app = app if isinstance(dt, str): self._dt = self._parse_datetime(dt) else: self._dt = dt def datetime(self): return self._dt def before(self, dt_str): time = self._parse_datetime(dt_...
27.470588
75
0.641328
class DateTimeWrapper: def __init__(self, app, dt): self._app = app if isinstance(dt, str): self._dt = self._parse_datetime(dt) else: self._dt = dt def datetime(self): return self._dt def before(self, dt_str): time = self._parse_datetime(dt_...
true
true
f74d12826fa1e124d77f701fb1f9e1d425bf9b89
824
py
Python
2017/01/17/Using Flask-WTForms With Flask-Bootstrap/flask_bootstrap/main.py
kenjitagawa/youtube_video_code
ef3c48b9e136b3745d10395d94be64cb0a1f1c97
[ "Unlicense" ]
492
2019-06-25T12:54:31.000Z
2022-03-30T12:38:28.000Z
2017/01/17/Using Flask-WTForms With Flask-Bootstrap/flask_bootstrap/main.py
kenjitagawa/youtube_video_code
ef3c48b9e136b3745d10395d94be64cb0a1f1c97
[ "Unlicense" ]
23
2019-10-01T01:36:08.000Z
2022-02-10T12:46:16.000Z
2017/01/17/Using Flask-WTForms With Flask-Bootstrap/flask_bootstrap/main.py
kenjitagawa/youtube_video_code
ef3c48b9e136b3745d10395d94be64cb0a1f1c97
[ "Unlicense" ]
1,734
2019-06-03T06:25:13.000Z
2022-03-31T23:57:53.000Z
from flask import Flask, render_template from flask_wtf import Form from wtforms import StringField, PasswordField from wtforms.validators import InputRequired, Email, Length, AnyOf from flask_bootstrap import Bootstrap app = Flask(__name__) Bootstrap(app) app.config['SECRET_KEY'] = 'DontTellAnyone' class ...
35.826087
122
0.731796
from flask import Flask, render_template from flask_wtf import Form from wtforms import StringField, PasswordField from wtforms.validators import InputRequired, Email, Length, AnyOf from flask_bootstrap import Bootstrap app = Flask(__name__) Bootstrap(app) app.config['SECRET_KEY'] = 'DontTellAnyone' class ...
true
true
f74d12c59af5ff96fff043d3d67bb55cb765b120
87
py
Python
drfapp/apps.py
tanujnotes/lispay
c21b9345b9162ec5b7a955a1e2c0c3c92db6a47c
[ "MIT" ]
1
2021-06-13T19:58:15.000Z
2021-06-13T19:58:15.000Z
drfapp/apps.py
tanujnotes/lispay
c21b9345b9162ec5b7a955a1e2c0c3c92db6a47c
[ "MIT" ]
null
null
null
drfapp/apps.py
tanujnotes/lispay
c21b9345b9162ec5b7a955a1e2c0c3c92db6a47c
[ "MIT" ]
null
null
null
from django.apps import AppConfig class DrfappConfig(AppConfig): name = 'drfapp'
14.5
33
0.747126
from django.apps import AppConfig class DrfappConfig(AppConfig): name = 'drfapp'
true
true
f74d1358a99c7830566491f1347c157a3c1c0c7e
19,623
py
Python
py_alg_dat/singly_linked_list.py
trycatchhorn/PyAlgDat
85f8c7550630cf31b5e4472fd593956c9d96c078
[ "MIT" ]
null
null
null
py_alg_dat/singly_linked_list.py
trycatchhorn/PyAlgDat
85f8c7550630cf31b5e4472fd593956c9d96c078
[ "MIT" ]
null
null
null
py_alg_dat/singly_linked_list.py
trycatchhorn/PyAlgDat
85f8c7550630cf31b5e4472fd593956c9d96c078
[ "MIT" ]
null
null
null
#!/usr/bin/python env # The MIT License (MIT) # # Copyright (c) 2015 by Brian Horn, trycatchhorn@gmail.com. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including w...
35.103757
99
0.601998
__author__ = "Brian Horn" __copyright__ = "Copyright (c) 2015 Brian Horn" __credits__ = "Brian Horn" __license__ = "MIT" __version__ = "1.0.2" __maintainer__ = "Brian Horn" __email__ = "trycatchhorn@gmail.com" __status__ = "Prototype" from py_alg_dat.linked_list import LinkedList class SinglyLinkedList(LinkedList...
true
true
f74d13a606e2afb42557d35c2616514efe0e4be6
266
py
Python
cluster/cluster1.py
dendisuhubdy/code-snippets
12b99ac102f16a011f30bd94b4e42789225eaf7d
[ "MIT" ]
2
2020-04-07T17:08:45.000Z
2020-12-29T20:37:41.000Z
cluster/cluster1.py
dendisuhubdy/code-snippets
12b99ac102f16a011f30bd94b4e42789225eaf7d
[ "MIT" ]
null
null
null
cluster/cluster1.py
dendisuhubdy/code-snippets
12b99ac102f16a011f30bd94b4e42789225eaf7d
[ "MIT" ]
1
2020-04-07T17:08:46.000Z
2020-04-07T17:08:46.000Z
from __future__ import print_function import pyslurm def main(): try: a = pyslurm.job() jobs = a.get() print(jobs) except ValueError as e: print("Job list error - {0}".format(e.args[0])) if __name__=="__main__": main()
17.733333
55
0.586466
from __future__ import print_function import pyslurm def main(): try: a = pyslurm.job() jobs = a.get() print(jobs) except ValueError as e: print("Job list error - {0}".format(e.args[0])) if __name__=="__main__": main()
true
true
f74d142b5436da42079c1aaa166901a6c1943760
223
py
Python
examples/log_stdout.py
tierpod/easylogconfig
0eb8f1eb3c6acd09ddacb553ef87b74ee5da48bd
[ "MIT" ]
null
null
null
examples/log_stdout.py
tierpod/easylogconfig
0eb8f1eb3c6acd09ddacb553ef87b74ee5da48bd
[ "MIT" ]
1
2020-05-22T06:25:11.000Z
2020-05-22T11:08:45.000Z
examples/log_stdout.py
tierpod/easylogconfig
0eb8f1eb3c6acd09ddacb553ef87b74ee5da48bd
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import logging import easylogconfig log = logging.getLogger(__name__) easylogconfig.auto(debug=True) log.info("info message") log.error("error message") log.debug("debug message")
14.866667
33
0.753363
import logging import easylogconfig log = logging.getLogger(__name__) easylogconfig.auto(debug=True) log.info("info message") log.error("error message") log.debug("debug message")
true
true
f74d1482b5698ff1784e8f61001211fa3dff11a2
20,342
py
Python
helpData_n2c2.py
yjc9696/biobert-my
ffc11c91f7032cffbcc7d9526159f0ff8e08c1f3
[ "Apache-2.0" ]
null
null
null
helpData_n2c2.py
yjc9696/biobert-my
ffc11c91f7032cffbcc7d9526159f0ff8e08c1f3
[ "Apache-2.0" ]
3
2020-11-13T17:48:47.000Z
2022-02-09T23:43:16.000Z
helpData_n2c2.py
yjc9696/biobert-my
ffc11c91f7032cffbcc7d9526159f0ff8e08c1f3
[ "Apache-2.0" ]
null
null
null
import json import numpy as np import metrics import tokenization import utils from config import opt def write2file(data, path): with open(path, 'w') as f: f.write(json.dumps(data, ensure_ascii=False)) def get_BIO(self, tag): return self.id2tag[tag] # if tag == 0: # return 'O' # if ...
40.929577
175
0.531462
import json import numpy as np import metrics import tokenization import utils from config import opt def write2file(data, path): with open(path, 'w') as f: f.write(json.dumps(data, ensure_ascii=False)) def get_BIO(self, tag): return self.id2tag[tag] def detokenize(self,in_...
true
true
f74d1782f7ccea0856374780931e138f1c53872b
198
py
Python
dungeon_master_submit.py
ClusterFights/dungeon-master-challenge
cd4e0fc1f04c046eadc3b971dbaa03587318218d
[ "MIT" ]
null
null
null
dungeon_master_submit.py
ClusterFights/dungeon-master-challenge
cd4e0fc1f04c046eadc3b971dbaa03587318218d
[ "MIT" ]
1
2019-04-23T20:24:27.000Z
2019-04-23T20:24:27.000Z
dungeon_master_submit.py
ClusterFights/dungeon-master-challenge
cd4e0fc1f04c046eadc3b971dbaa03587318218d
[ "MIT" ]
1
2019-04-23T20:21:18.000Z
2019-04-23T20:21:18.000Z
import requests import sys res = requests.put("http://challenges.clusterfights.com/challenge/" + sys.argv[1], json={ "solution": { "secret": sys.argv[2] } }) print(res.json()['runtime'])
18
89
0.651515
import requests import sys res = requests.put("http://challenges.clusterfights.com/challenge/" + sys.argv[1], json={ "solution": { "secret": sys.argv[2] } }) print(res.json()['runtime'])
true
true
f74d1785f4c3724cfd52549be35e2e86c75130d5
3,997
py
Python
riemann/data/data_ingredient.py
jdieter31/riemannian-nlp
75ef47608c81ec6e925fe24d16c67985e4b987c6
[ "MIT" ]
3
2020-02-02T09:02:12.000Z
2021-07-24T03:38:35.000Z
riemann/data/data_ingredient.py
jdieter31/riemannian-nlp
75ef47608c81ec6e925fe24d16c67985e4b987c6
[ "MIT" ]
1
2019-06-18T23:25:38.000Z
2019-08-16T13:10:18.000Z
riemann/data/data_ingredient.py
jdieter31/riemannian-nlp
75ef47608c81ec6e925fe24d16c67985e4b987c6
[ "MIT" ]
2
2020-01-02T07:14:37.000Z
2020-06-25T15:50:08.000Z
from math import floor import numpy as np from .graph import load_edge_list, load_adjacency_matrix from .graph_dataset import BatchedDataset from ..config_loader import get_config def load_dataset(): data_config = get_config().data if graph_data_type == "edge": idx, objects, weights = load_edge_lis...
34.756522
90
0.618214
from math import floor import numpy as np from .graph import load_edge_list, load_adjacency_matrix from .graph_dataset import BatchedDataset from ..config_loader import get_config def load_dataset(): data_config = get_config().data if graph_data_type == "edge": idx, objects, weights = load_edge_lis...
true
true
f74d1ac5806b3df08f57092c9a18ef1c0abce61d
4,564
py
Python
scripts/sources/s_checklist_scenariobased_step07.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2021-04-10T13:24:30.000Z
2022-03-26T08:20:42.000Z
scripts/sources/s_checklist_scenariobased_step07.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
null
null
null
scripts/sources/s_checklist_scenariobased_step07.py
dpopadic/arpmRes
ddcc4de713b46e3e9dcb77cc08c502ce4df54f76
[ "MIT" ]
6
2019-08-13T22:02:17.000Z
2022-02-09T17:49:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.2.0 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # s_ch...
32.140845
235
0.704207
import numpy as np import pandas as pd from arpym.portfolio import spectral_index from arpym.statistics import meancov_sp, quantile_sp copula_marginal = True lam = 3e-7 c_quantile = 0.95 c_es = 0.95 path = '../../../databases/temporary-databases/' if copula_marginal: db_projection_tools = pd.read_c...
true
true
f74d1af590bc5c4d9a6ff45609537069ffe3d097
77,634
py
Python
google/cloud/compute_v1/services/disks/client.py
igor-solomatov/python-compute
16e7294cd536af9a8bf8e4e99219a883339aa955
[ "Apache-2.0" ]
null
null
null
google/cloud/compute_v1/services/disks/client.py
igor-solomatov/python-compute
16e7294cd536af9a8bf8e4e99219a883339aa955
[ "Apache-2.0" ]
null
null
null
google/cloud/compute_v1/services/disks/client.py
igor-solomatov/python-compute
16e7294cd536af9a8bf8e4e99219a883339aa955
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
43.37095
127
0.592176
from collections import OrderedDict from distutils import util import os import re from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import exceptions from google.api_core import gapic...
true
true