id stringlengths 28 33 | content stringlengths 14 265k ⌀ | max_stars_repo_path stringlengths 49 55 |
|---|---|---|
crossvul-python_data_bad_3920_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/bad_3920_1 |
crossvul-python_data_good_3922_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/good_3922_2 |
crossvul-python_data_good_3920_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/good_3920_1 |
crossvul-python_data_good_3915_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/good_3915_0 |
crossvul-python_data_bad_3914_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/bad_3914_1 |
crossvul-python_data_good_3921_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/good_3921_0 |
crossvul-python_data_good_3914_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/good_3914_0 |
crossvul-python_data_good_3919_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/good_3919_0 |
crossvul-python_data_bad_3923_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/bad_3923_0 |
crossvul-python_data_bad_3918_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/bad_3918_1 |
crossvul-python_data_good_3920_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/good_3920_0 |
crossvul-python_data_good_3921_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/good_3921_2 |
crossvul-python_data_bad_3922_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/bad_3922_2 |
crossvul-python_data_good_3917_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ./CrossVul/dataset_final_sorted/CWE-684/py/good_3917_0 |
crossvul-python_data_good_2410_3 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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... | ./CrossVul/dataset_final_sorted/CWE-203/py/good_2410_3 |
crossvul-python_data_bad_2410_2 | """Miscellaneous utility functions and classes.
This module is used internally by Tornado. It is not necessarily expected
that the functions and classes defined here will be useful to other
applications, but they are documented here in case they are.
The one public-facing part of this module is the `Configurable` cl... | ./CrossVul/dataset_final_sorted/CWE-203/py/bad_2410_2 |
crossvul-python_data_bad_2410_3 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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... | ./CrossVul/dataset_final_sorted/CWE-203/py/bad_2410_3 |
crossvul-python_data_good_2410_2 | """Miscellaneous utility functions and classes.
This module is used internally by Tornado. It is not necessarily expected
that the functions and classes defined here will be useful to other
applications, but they are documented here in case they are.
The one public-facing part of this module is the `Configurable` cl... | ./CrossVul/dataset_final_sorted/CWE-203/py/good_2410_2 |
crossvul-python_data_good_2410_4 | """Implementation of the WebSocket protocol.
`WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional
communication between the browser and server.
.. warning::
The WebSocket protocol was recently finalized as `RFC 6455
<http://tools.ietf.org/html/rfc6455>`_ and is not yet supported in
al... | ./CrossVul/dataset_final_sorted/CWE-203/py/good_2410_4 |
crossvul-python_data_bad_2410_4 | """Implementation of the WebSocket protocol.
`WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional
communication between the browser and server.
.. warning::
The WebSocket protocol was recently finalized as `RFC 6455
<http://tools.ietf.org/html/rfc6455>`_ and is not yet supported in
al... | ./CrossVul/dataset_final_sorted/CWE-203/py/bad_2410_4 |
crossvul-python_data_bad_4903_1 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-21/py/bad_4903_1 |
crossvul-python_data_bad_4903_2 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-21/py/bad_4903_2 |
crossvul-python_data_good_4903_1 | # -*- coding: utf-8 -*-
#
# This file is part of Radicale Server - Calendar Server
# Copyright © 2012-2015 Guillaume Ayoub
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of t... | ./CrossVul/dataset_final_sorted/CWE-21/py/good_4903_1 |
crossvul-python_data_good_4903_0 | # -*- coding: utf-8 -*-
#
# This file is part of Radicale Server - Calendar Server
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any la... | ./CrossVul/dataset_final_sorted/CWE-21/py/good_4903_0 |
crossvul-python_data_bad_4903_0 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-21/py/bad_4903_0 |
crossvul-python_data_good_4903_2 | # -*- coding: utf-8 -*-
#
# This file is part of Radicale Server - Calendar Server
# Copyright © 2014 Jean-Marc Martins
# Copyright © 2014-2015 Guillaume Ayoub
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softw... | ./CrossVul/dataset_final_sorted/CWE-21/py/good_4903_2 |
crossvul-python_data_bad_3768_1 | import os
import re
import urllib
from django.conf import settings
from django.contrib.auth import SESSION_KEY, REDIRECT_FIELD_NAME
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.sites.models import Site, RequestSite
from django.contrib.auth.models import User
from django.test import Test... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3768_1 |
crossvul-python_data_bad_3768_3 | import datetime
import os
import re
import time
from pprint import pformat
from urllib import urlencode, quote
from urlparse import urljoin, urlparse
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
try:
# The mod_python version is more efficient, so try importing it fir... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3768_3 |
crossvul-python_data_bad_1739_2 | """Tornado handlers for the contents web service."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import json
from tornado import gen, web
from IPython.html.utils import url_path_join, url_escape
from IPython.utils.jsonutil import date_default
from IPython.ht... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_1739_2 |
crossvul-python_data_good_1739_1 | """A contents manager that uses the local file system for storage."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import io
import os
import shutil
import mimetypes
from tornado import web
from .filecheckpoints import FileCheckpoints
from .fileio import File... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_1739_1 |
crossvul-python_data_bad_5582_1 | import os
import os.path
import mimetypes
import requests
from zope.interface import implements
from pyramid.interfaces import ITemplateRenderer
class ReleaseFileRenderer(object):
implements(ITemplateRenderer)
def __init__(self, repository_root):
self.repository_root = repository_root
def __cal... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_5582_1 |
crossvul-python_data_good_3768_2 | import urlparse
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, QueryDict
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils.http import base36_to_int
from django.utils.translation impo... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3768_2 |
crossvul-python_data_bad_3500_1 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3500_1 |
crossvul-python_data_bad_100_2 | # -*- coding: utf-8 -*-
# Copyright 2014 - 2016 OpenMarket Ltd
# Copyright 2017 - 2018 New Vector 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/LI... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_100_2 |
crossvul-python_data_bad_5399_0 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import six
from cryptography import utils
from cryptography.exceptions i... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_5399_0 |
crossvul-python_data_good_1740_1 | """A contents manager that uses the local file system for storage."""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import io
import os
import shutil
import mimetypes
import nbformat
from tornado import web
from .filecheckpoints import FileCheckpoints
from .fi... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_1740_1 |
crossvul-python_data_bad_2141_3 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_2141_3 |
crossvul-python_data_good_3499_0 | import getopt
from subprocess import Popen, PIPE
import pipes
import Bcfg2.Server.Admin
class Viz(Bcfg2.Server.Admin.MetadataCore):
__shorthelp__ = "Produce graphviz diagrams of metadata structures"
__longhelp__ = (__shorthelp__ + "\n\nbcfg2-admin viz [--includehosts] "
"[--... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3499_0 |
crossvul-python_data_bad_3766_3 | from __future__ import absolute_import
import datetime
import os
import re
import sys
import time
import warnings
from pprint import pformat
from urllib import urlencode, quote
from urlparse import urljoin, urlparse
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
try:
... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3766_3 |
crossvul-python_data_bad_1467_1 | # coding: UTF-8
'''Mock D-BUS objects for test suites.'''
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option) any
# later version. See h... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_1467_1 |
crossvul-python_data_bad_3768_0 | from django.conf.urls.defaults import patterns
from django.contrib.auth.urls import urlpatterns
from django.contrib.auth.views import password_reset
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.template import Template, RequestContext
from django.views.decor... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3768_0 |
crossvul-python_data_good_2156_1 | # Tests potential DOS of IcnsImagePlugin with 0 length block.
# Run from anywhere that PIL is importable.
from PIL import Image
from io import BytesIO
if bytes is str:
Image.open(BytesIO(bytes('icns\x00\x00\x00\x10hang\x00\x00\x00\x00')))
else:
Image.open(BytesIO(bytes('icns\x00\x00\x00\x10hang\x00\x00\x00\x... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_2156_1 |
crossvul-python_data_good_2816_1 | # -*- coding: utf-8 -*-
'''
TCP transport classes
Wire protocol: "len(payload) msgpack({'head': SOMEHEADER, 'body': SOMEBODY})"
'''
# Import Python Libs
from __future__ import absolute_import
import logging
import msgpack
import socket
import os
import weakref
import time
import traceback
import errno
# Import Salt... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_2816_1 |
crossvul-python_data_bad_872_0 | # -*- test-case-name: twisted.web.test.test_newclient -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
An U{HTTP 1.1<http://www.w3.org/Protocols/rfc2616/rfc2616.html>} client.
The way to use the functionality provided by this module is to:
- Connect a L{HTTP11ClientProtocol} to an HT... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_872_0 |
crossvul-python_data_good_3268_3 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3268_3 |
crossvul-python_data_bad_1739_0 | """Serve files directly from the ContentsManager."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import os
import mimetypes
import json
import base64
from tornado import web
from IPython.html.base.handlers import IPythonHandler
class FilesHandler(IPythonHand... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_1739_0 |
crossvul-python_data_good_3767_1 | import os
import re
from django.conf import global_settings, settings
from django.contrib.sites.models import Site, RequestSite
from django.contrib.auth.models import User
from django.core import mail
from django.core.exceptions import SuspiciousOperation
from django.core.urlresolvers import reverse, NoReverseMatch
fr... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3767_1 |
crossvul-python_data_good_3683_0 | # Copyright 2012, Piston Cloud Computing, Inc.
# Copyright 2012, OpenStack LLC.
# 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/LICEN... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3683_0 |
crossvul-python_data_bad_3500_2 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3500_2 |
crossvul-python_data_good_2141_4 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_2141_4 |
crossvul-python_data_bad_3766_2 | import urlparse
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, QueryDict
from django.template.response import TemplateResponse
from django.utils.http import base36_to_int
from django.utils.translation import ugettext as _
from django.views.de... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3766_2 |
crossvul-python_data_bad_802_0 | # -*- coding: utf-8 -*-
# Copyright 2014-2015 OpenMarket 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 applica... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_802_0 |
crossvul-python_data_bad_2078_3 | #!/usr/bin/env python
"""
f2py2e - Fortran to Python C/API generator. 2nd Edition.
See __usage__ below.
Copyright 1999--2011 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRAN... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_2078_3 |
crossvul-python_data_bad_3499_4 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3499_4 |
crossvul-python_data_good_50_7 | # -*- coding: utf-8 -*-
#
# (c) Cornelius Kölbel
# License: AGPLv3
# contact: http://www.privacyidea.org
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
# License as published by the Free Software Foundation; either
# version 3 of ... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_50_7 |
crossvul-python_data_good_3766_0 | from django.conf.urls import patterns, url
from django.contrib.auth import context_processors
from django.contrib.auth.urls import urlpatterns
from django.contrib.auth.views import password_reset
from django.contrib.auth.decorators import login_required
from django.contrib.messages.api import info
from django.http impo... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3766_0 |
crossvul-python_data_bad_872_3 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_872_3 |
crossvul-python_data_bad_3499_3 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3499_3 |
crossvul-python_data_good_3500_2 | '''This module manages ssh key files for bcfg2'''
__revision__ = '$Revision$'
import binascii
import os
import socket
import shutil
import sys
import tempfile
from subprocess import Popen, PIPE
import Bcfg2.Server.Plugin
class SSHbase(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.Generator,
... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3500_2 |
crossvul-python_data_good_3767_2 | try:
from urllib.parse import urlparse, urlunparse
except ImportError: # Python 2
from urlparse import urlparse, urlunparse
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, QueryDict
from django.template.response import TemplateResp... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3767_2 |
crossvul-python_data_bad_3268_3 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3268_3 |
crossvul-python_data_bad_3659_2 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2011 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you m... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3659_2 |
crossvul-python_data_good_2141_3 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_2141_3 |
crossvul-python_data_bad_3766_1 | from __future__ import with_statement
import os
import re
import urllib
from django.conf import settings
from django.contrib.sites.models import Site, RequestSite
from django.contrib.auth.models import User
from django.core import mail
from django.core.urlresolvers import reverse, NoReverseMatch
from django.http impor... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3766_1 |
crossvul-python_data_bad_2816_1 | # -*- coding: utf-8 -*-
'''
TCP transport classes
Wire protocol: "len(payload) msgpack({'head': SOMEHEADER, 'body': SOMEBODY})"
'''
# Import Python Libs
from __future__ import absolute_import
import logging
import msgpack
import socket
import os
import weakref
import time
import traceback
import errno
# Import Salt... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_2816_1 |
crossvul-python_data_good_1376_3 | #
# 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... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_1376_3 |
crossvul-python_data_bad_3499_2 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3499_2 |
crossvul-python_data_good_3499_3 | '''This module manages ssh key files for bcfg2'''
__revision__ = '$Revision$'
import binascii
import os
import sys
import socket
import shutil
import tempfile
from subprocess import Popen, PIPE
import Bcfg2.Server.Plugin
class SSHbase(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.Generator,
... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3499_3 |
crossvul-python_data_good_3500_0 | import getopt
from subprocess import Popen, PIPE
import sys
import Bcfg2.Server.Admin
class Viz(Bcfg2.Server.Admin.MetadataCore):
__shorthelp__ = "Produce graphviz diagrams of metadata structures"
__longhelp__ = (__shorthelp__ + "\n\nbcfg2-admin viz [--includehosts] "
"[--... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3500_0 |
crossvul-python_data_bad_3500_3 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3500_3 |
crossvul-python_data_good_2078_3 | #!/usr/bin/env python
"""
f2py2e - Fortran to Python C/API generator. 2nd Edition.
See __usage__ below.
Copyright 1999--2011 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRAN... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_2078_3 |
crossvul-python_data_bad_1065_0 | """Header value parser implementing various email-related RFC parsing rules.
The parsing methods defined in this module implement various email related
parsing rules. Principal among them is RFC 5322, which is the followon
to RFC 2822 and primarily a clarification of the former. It also implements
RFC 2047 encoded w... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_1065_0 |
crossvul-python_data_good_1739_2 | """Tornado handlers for the contents web service."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import json
from tornado import gen, web
from IPython.html.utils import url_path_join, url_escape
from IPython.utils.jsonutil import date_default
from IPython.ht... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_1739_2 |
crossvul-python_data_bad_3659_1 | # Copyright 2011 OpenStack LLC.
# Copyright 2012 Justin Santa Barbara
# 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/license... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3659_1 |
crossvul-python_data_good_1656_0 | # Copyright (C) 2013, Red Hat, Inc.
# All rights reserved.
#
# 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 without limitation the rights
# to use, copy, modif... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_1656_0 |
crossvul-python_data_good_3660_2 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2011 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you m... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3660_2 |
crossvul-python_data_good_2816_0 | # -*- coding: utf-8 -*-
'''
The crypt module manages all of the cryptography functions for minions and
masters, encrypting and decrypting payloads, preparing messages, and
authenticating peers
'''
# Import python libs
from __future__ import absolute_import, print_function
import os
import sys
import copy
import time
im... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_2816_0 |
crossvul-python_data_bad_3500_4 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3500_4 |
crossvul-python_data_bad_2156_1 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_2156_1 |
crossvul-python_data_good_100_1 | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket 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 applica... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_100_1 |
crossvul-python_data_bad_3660_2 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2011 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you m... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3660_2 |
crossvul-python_data_bad_1739_1 | """A contents manager that uses the local file system for storage."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import io
import os
import shutil
import mimetypes
from tornado import web
from .filecheckpoints import FileCheckpoints
from .fileio import File... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_1739_1 |
crossvul-python_data_bad_3499_0 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3499_0 |
crossvul-python_data_good_1065_0 | """Header value parser implementing various email-related RFC parsing rules.
The parsing methods defined in this module implement various email related
parsing rules. Principal among them is RFC 5322, which is the followon
to RFC 2822 and primarily a clarification of the former. It also implements
RFC 2047 encoded w... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_1065_0 |
crossvul-python_data_good_117_2 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
from cryptography import utils
from cryptography.exceptions import Invali... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_117_2 |
crossvul-python_data_bad_3523_0 | import datetime
from StringIO import StringIO
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.serializers import json
from django.utils import simplejson
from django.utils.encoding import force_unicode
from tastypie.bundle import Bundle
from tastypie.exceptions ... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3523_0 |
crossvul-python_data_good_3268_2 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3268_2 |
crossvul-python_data_bad_1232_1 | ###
# Copyright (c) 2002-2004, Jeremiah Fincher
# Copyright (c) 2008-2009, James McCoy
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above ... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_1232_1 |
crossvul-python_data_good_872_0 | # -*- test-case-name: twisted.web.test.test_newclient -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
An U{HTTP 1.1<http://www.w3.org/Protocols/rfc2616/rfc2616.html>} client.
The way to use the functionality provided by this module is to:
- Connect a L{HTTP11ClientProtocol} to an HT... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_872_0 |
crossvul-python_data_bad_3500_0 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_3500_0 |
crossvul-python_data_bad_1740_0 | """Serve files directly from the ContentsManager."""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import os
import mimetypes
import json
import base64
from tornado import web
from notebook.base.handlers import IPythonHandler
class FilesHandler(IPythonHandler)... | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_1740_0 |
crossvul-python_data_bad_1232_0 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-20/py/bad_1232_0 |
crossvul-python_data_good_100_2 | # -*- coding: utf-8 -*-
# Copyright 2014 - 2016 OpenMarket Ltd
# Copyright 2017 - 2018 New Vector 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/LI... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_100_2 |
crossvul-python_data_good_1740_0 | """Serve files directly from the ContentsManager."""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import os
import mimetypes
import json
import base64
from tornado import web
from notebook.base.handlers import IPythonHandler
class FilesHandler(IPythonHandler)... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_1740_0 |
crossvul-python_data_good_652_0 | from __future__ import unicode_literals
from itertools import chain
import re
import string
import six
from six.moves.urllib.parse import urlparse
from xml.sax.saxutils import unescape
import html5lib
from html5lib.constants import (
entities,
namespaces,
prefixes,
tokenTypes,
)
try:
from html5lib... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_652_0 |
crossvul-python_data_good_3500_1 | import os
from mercurial import ui, hg
import Bcfg2.Server.Plugin
# for debugging output only
import logging
logger = logging.getLogger('Bcfg2.Plugins.Mercurial')
class Hg(Bcfg2.Server.Plugin.Plugin,
Bcfg2.Server.Plugin.Version):
"""Mercurial is a version plugin for dealing with Bcfg2 repository."""
... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3500_1 |
crossvul-python_data_good_3723_0 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3723_0 |
crossvul-python_data_good_2141_2 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_2141_2 |
crossvul-python_data_good_3659_2 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2011 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you m... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_3659_2 |
crossvul-python_data_good_5399_0 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import six
from cryptography import utils
from cryptography.exceptions i... | ./CrossVul/dataset_final_sorted/CWE-20/py/good_5399_0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.