Datasets:

Modalities:
Text
Formats:
parquet
ArXiv:
Libraries:
Datasets
Dask
License:
Dataset Viewer
Auto-converted to Parquet Duplicate
zip
stringlengths
19
109
filename
stringlengths
4
185
contents
stringlengths
0
30.1M
type_annotations
listlengths
0
1.97k
type_annotation_starts
listlengths
0
1.97k
type_annotation_ends
listlengths
0
1.97k
archives/007MrNiko_Stepper.zip
about/urls.py
from django.urls import path from about import views #creating of section "about" app_name = 'about' urlpatterns = [ path('about_project', views.index, name='video'), ]
[]
[]
[]
archives/007MrNiko_Stepper.zip
about/views.py
from django.shortcuts import render, redirect from django.http import HttpResponse #connecting of html file (section "about") def index(request): return render(request, 'index_about.html')
[]
[]
[]
archives/007MrNiko_Stepper.zip
accounts/__init__.py
[]
[]
[]
archives/007MrNiko_Stepper.zip
accounts/admin.py
from django.contrib import admin # Register your models here.
[]
[]
[]
archives/007MrNiko_Stepper.zip
accounts/forms.py
from django import forms from django.contrib.auth.models import User def widget_attrs(placeholder): return {'class': 'u-full-width', 'placeholder': placeholder} def form_kwargs(widget, label='', max_length=64): return {'widget': widget, 'label': label, 'max_length': max_length} #login form class LoginForm(...
[]
[]
[]
archives/007MrNiko_Stepper.zip
accounts/migrations/__init__.py
[]
[]
[]
archives/007MrNiko_Stepper.zip
accounts/models.py
from django.db import models # Create your models here.
[]
[]
[]
archives/007MrNiko_Stepper.zip
accounts/tests.py
from django.test import TestCase from django.urls import reverse from django.contrib.auth.models import User from django import forms from accounts.forms import RegistrationForm, LoginForm class AccountsTests(TestCase): def setUp(self): self.register_data = { 'email': 'new@user.com', ...
[]
[]
[]
archives/007MrNiko_Stepper.zip
accounts/urls.py
from django.urls import path from accounts import views #connecting of authorisation form app_name = 'auth' urlpatterns = [ path('login/', views.login_view, name='login'), path('logout/', views.logout_view, name='logout'), path('register/', views.register, name='register'), ]
[]
[]
[]
archives/007MrNiko_Stepper.zip
accounts/views.py
from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from accounts.forms import LoginForm, RegistrationForm from lists.forms import TodoForm #login request def login_view(request): if request.method == 'POST': ...
[]
[]
[]
archives/007MrNiko_Stepper.zip
api/__init__.py
[]
[]
[]
archives/007MrNiko_Stepper.zip
api/migrations/__init__.py
[]
[]
[]
archives/007MrNiko_Stepper.zip
api/serializers.py
from django.contrib.auth.models import User from rest_framework import serializers from lists.models import TodoList, Todo class UserSerializer(serializers.ModelSerializer): todolists = serializers.PrimaryKeyRelatedField( many=True, queryset=TodoList.objects.all() ) class Meta: model = ...
[]
[]
[]
archives/007MrNiko_Stepper.zip
api/tests.py
from django.urls import reverse from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APITestCase from lists.models import TodoList class UserTests(APITestCase): def setUp(self): User.objects.create_user('test', 'test@example.com', 'test') ...
[]
[]
[]
archives/007MrNiko_Stepper.zip
api/urls.py
from django.urls import path, include from rest_framework.routers import DefaultRouter from api import views router = DefaultRouter() router.register(r'users', views.UserViewSet) router.register(r'todolists', views.TodoListViewSet) router.register(r'todos', views.TodoViewSet) #connecting of api app_name = 'api' url...
[]
[]
[]
archives/007MrNiko_Stepper.zip
api/views.py
from django.contrib.auth.models import User from rest_framework import permissions, viewsets from api.serializers import UserSerializer, TodoListSerializer, TodoSerializer from lists.models import TodoList, Todo class IsCreatorOrReadOnly(permissions.BasePermission): """ Object-level permission to only allow...
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/__init__.py
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/admin.py
from django.contrib import admin # Register your models here.
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/forms.py
from django import forms def widget_attrs(placeholder): return {'class': 'u-full-width', 'placeholder': placeholder} def form_kwargs(widget, label='', max_length=128): return {'widget': widget, 'label': label, 'max_length': max_length} class TodoForm(forms.Form): description = forms.CharField( ...
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/migrations/0001_initial.py
# Generated by Django 2.0 on 2017-12-02 17:39 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] opera...
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/migrations/__init__.py
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/models.py
from django.db import models from django.contrib.auth.models import User from django.utils import timezone class TodoList(models.Model): title = models.CharField(max_length=128, default='List') created_at = models.DateTimeField(auto_now=True) creator = models.ForeignKey(User, null=True, related_name='tod...
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/templatetags/__init__.py
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/templatetags/lists_extras.py
from django import template from datetime import datetime register = template.Library() @register.filter('humanize') def humanize_time(dt, past_='ago', future_='from now', default='just now'): """ Returns string representing 'time since' or 'time until' e.g. 3 days ago, 5 hours from now etc. ""...
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/tests.py
from django.test import TestCase from django.urls import reverse from django.contrib.auth.models import User from lists.forms import TodoForm, TodoListForm from lists.models import Todo, TodoList from unittest import skip class ListTests(TestCase): def setUp(self): self.user = User.objects.create_user(...
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/urls.py
from django.urls import path from lists import views #connecting of lists app_name = 'lists' urlpatterns = [ path('', views.index, name='index'), path('todolist/<int:todolist_id>/', views.todolist, name='todolist'), path('todolist/new/', views.new_todolist, name='new_todolist'), path('todolist/add/', ...
[]
[]
[]
archives/007MrNiko_Stepper.zip
lists/views.py
from django.shortcuts import get_object_or_404, render, redirect from django.contrib.auth.decorators import login_required from django.http import HttpResponse from lists.models import TodoList, Todo from lists.forms import TodoForm, TodoListForm def index(request): return render(request, 'lists/index.html', {'f...
[]
[]
[]
archives/007MrNiko_Stepper.zip
manage.py
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "todolist.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
[]
[]
[]
archives/007MrNiko_Stepper.zip
todolist/__init__.py
[]
[]
[]
archives/007MrNiko_Stepper.zip
todolist/settings.py
""" Django settings for todolist project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) i...
[]
[]
[]
archives/007MrNiko_Stepper.zip
todolist/urls.py
from django.urls import path, include from django.contrib import admin #connecting of urls urlpatterns = [ path('', include('lists.urls')), path('auth/', include('accounts.urls')), path('api/', include('api.urls')), path('api-auth/', include('rest_framework.urls')), path('admin/', admin.site.urls),...
[]
[]
[]
archives/007MrNiko_Stepper.zip
todolist/wsgi.py
""" WSGI config for todolist project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "todolist.settings") from django.core...
[]
[]
[]
archives/007MrNiko_Stepper.zip
weather/urls.py
from django.urls import path from weather import views #creating of the weather_app app_name = 'weather' urlpatterns = [ path('your_weather', views.index, name='weather'), ]
[]
[]
[]
archives/007MrNiko_Stepper.zip
weather/views.py
from django.shortcuts import render, redirect from django.http import HttpResponse #connecting of html file (section "weather") def index(request): return render(request, 'index.html')
[]
[]
[]
archives/097475_hansberger.zip
config/__init__.py
[]
[]
[]
archives/097475_hansberger.zip
config/settings/__init__.py
[]
[]
[]
archives/097475_hansberger.zip
config/settings/base.py
""" Base settings to build other settings files upon. """ import environ ASGI_APPLICATION = 'hansberger.routing.application' DATA_UPLOAD_MAX_MEMORY_SIZE = 104857600 ROOT_DIR = ( environ.Path(__file__) - 3 ) # (hansberger/config/settings/base.py - 3 = hansberger/) APPS_DIR = ROOT_DIR.path("hansberger") env = e...
[]
[]
[]
archives/097475_hansberger.zip
config/settings/local.py
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY...
[]
[]
[]
archives/097475_hansberger.zip
config/settings/production.py
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env("DJANGO_SECRET_KEY") # https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts ALLOWED...
[]
[]
[]
archives/097475_hansberger.zip
config/settings/test.py
""" With these settings, tests run faster. """ from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = False # https://docs.djangoproject.com/en/dev/ref/settings/#se...
[]
[]
[]
archives/097475_hansberger.zip
config/urls.py
from django.conf import settings from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home...
[]
[]
[]
archives/097475_hansberger.zip
config/wsgi.py
""" WSGI config for HansBerger project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
[]
[]
[]
archives/097475_hansberger.zip
docs/__init__.py
# Included so that Django's startproject comment runs against the docs directory
[]
[]
[]
archives/097475_hansberger.zip
docs/conf.py
# HansBerger documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that a...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/__init__.py
__version__ = "0.1.0" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/__init__.py
default_app_config = 'analysis.apps.AnalysisConfig'
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/admin.py
from django.contrib import admin # Register your models here. from .models import FiltrationAnalysis, MapperAnalysis admin.site.register(FiltrationAnalysis) admin.site.register(MapperAnalysis)
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/apps.py
from django.apps import AppConfig class AnalysisConfig(AppConfig): name = 'analysis' def ready(self): import analysis.signals # noqa
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/consumers.py
from channels.generic.websocket import WebsocketConsumer import json class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls._instances[cls] def anal...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/forms.py
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Fieldset, Field, Div from django.urls import reverse_lazy from .models import FiltrationAnalysis, MapperAnalysis, Bottleneck from datasets.models import Dataset, DatasetKindChoice def analysis_name_unique_check...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/migrations/0001_initial.py
# Generated by Django 2.0.13 on 2019-06-27 17:04 import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('research', '0001_initial'), ('datasets', '0001_init...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/migrations/0002_auto_20190628_1222.py
# Generated by Django 2.0.13 on 2019-06-28 10:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('analysis', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='filtrationwindow', name='diagrams'...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/migrations/__init__.py
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/models/__init__.py
from .analysis import Analysis, MapperAnalysis, FiltrationAnalysis # noqa from .window import Window, MapperWindow, FiltrationWindow # noqa from .bottleneck import Bottleneck, Diagram # noqa
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/models/analysis.py
import math import json import gc import matplotlib import matplotlib.pyplot as plt import mpld3 import pandas from django.db import models from django.utils.text import slugify from django.contrib.postgres.fields import JSONField import ripser import kmapper import sklearn.cluster import sklearn.preprocessing import s...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/models/bottleneck.py
import matplotlib import matplotlib.pyplot as plt import persim import ripser import base64 import numpy import pandas import gc from io import BytesIO from django.db import models from django.core.exceptions import ObjectDoesNotExist from ..consumers import StatusHolder, bottleneck_logger_decorator matplotlib.use('Agg...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/models/window.py
import json import matplotlib import matplotlib.pyplot as plt import ripser import numpy import math import base64 from io import BytesIO from django.contrib.postgres.fields import JSONField from django.db import models from django.utils.text import slugify from .bottleneck import Bottleneck matplotlib.use('Agg') def...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/routing.py
from django.conf.urls import url from . import consumers websocket_urlpatterns = [ # (http->django views is added by default) url(r'^ws/analysis/', consumers.AnalysisConsumer), ]
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/signals.py
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/tests.py
from django.test import TestCase # Create your tests here.
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/urls.py
from django.urls import path from .views import ( AnalysisListView, FiltrationAnalysisCreateView, MapperAnalysisCreateView, AnalysisDetailView, AnalysisDeleteView, WindowListView, WindowDetailView, MapperAnalysisView, WindowBottleneckView, AnalysisConsecutiveBottleneckView, A...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/analysis/views.py
import numpy import json from itertools import chain from django.shortcuts import redirect from django.http import HttpResponse from django_downloadview import VirtualDownloadView from django.core.files.base import ContentFile from django.shortcuts import get_object_or_404, render from django.urls import reverse_lazy f...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/conftest.py
import pytest from django.conf import settings from django.test import RequestFactory from hansberger.users.tests.factories import UserFactory @pytest.fixture(autouse=True) def media_storage(settings, tmpdir): settings.MEDIA_ROOT = tmpdir.strpath @pytest.fixture def user() -> settings.AUTH_USER_MODEL: retu...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/contrib/__init__.py
""" To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """
[]
[]
[]
archives/097475_hansberger.zip
hansberger/contrib/sites/__init__.py
""" To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """
[]
[]
[]
archives/097475_hansberger.zip
hansberger/contrib/sites/migrations/0001_initial.py
import django.contrib.sites.models from django.contrib.sites.models import _simple_domain_name_validator from django.db import migrations, models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name="Site", fields=[ ...
[]
[]
[]
archives/097475_hansberger.zip
hansberger/contrib/sites/migrations/0002_alter_domain_unique.py
import django.contrib.sites.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("sites", "0001_initial")] operations = [ migrations.AlterField( model_name="site", name="domain", field=models.CharField( ...
[]
[]
[]
End of preview. Expand in Data Studio

ManyTypes4Py-Reconstructed

This is a reconstruction of the original code from the ManyTypes4Py paper from the following paper

A. M. Mir, E. Latoškinas and G. Gousios, "ManyTypes4Py: A Benchmark Python Dataset for Machine Learning-based Type Inference," IEEE/ACM International Conference on Mining Software Repositories (MSR), 2021, pp. 585-589

The artifact (v0.7) for ManyTypes4Py does not have the original Python files. Instead, each file is pre-processed into a stream of types without comments, and the contents of each repository are stored in a single JSON file. This reconstructed dataset has raw Python code.

More specifically:

  1. We extract the list of repositories from the "clean" subset of ManyTypes4Py, which are the repositories that type-check with mypy.

  2. We attempt to download all repositories, but only succeed in fetching 4,663 (out of ~5.2K).

  3. We augment each file with the text of each type annotation, as well as their start and end positions (in bytes) in the code.

Internal Note

The dataset construction code is on the Discovery cluster at /work/arjunguha-research-group/arjun/projects/ManyTypesForPy_reconstruction.

Downloads last month
63

Paper for arjunguha/manytypes4py