text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# Copyright (C) 2013-2014 Computer Sciences 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 a...
codeparrot/github-code-clean
# Copyright 2015 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...
codeparrot/github-code-clean
#!/usr/bin/env python3 # Copyright 2021 Stanford University, NVIDIA 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 ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Authors: Denis A. Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Juergen Dammers <j.dammers@fz-juelich.de> # # License: BSD-3-Clause from inspect import isfunction from collections import namedtuple from copy import deepcopy from n...
codeparrot/github-code-clean
## # pytibrv/msg.py # TIBRV Library for PYTHON # # LAST MODIFIED : V1.1 20170220 ARIEN arien.chen@gmail.com # # DESCRIPTIONS # ----------------------------------------------------------------------------- # 1. Data Type # API NOT SUPPORT # TIBRVMSG_ENCRYPTED # TIBRVMSG_XML # # TibrvMsg NOT SUPPORT #...
codeparrot/github-code-clean
import decimal from sympy import (Rational, Symbol, Float, I, sqrt, oo, nan, pi, E, Integer, S, factorial, Catalan, EulerGamma, GoldenRatio, cos, exp, Number, zoo, log, Mul, Pow, Tuple, latex) from sympy.core.basic import _aresame from sympy.core.compatibility import long, u from s...
codeparrot/github-code-clean
# cython: language_level = 2 # # Code output module # from __future__ import absolute_import import cython cython.declare(os=object, re=object, operator=object, Naming=object, Options=object, StringEncoding=object, Utils=object, SourceDescriptor=object, StringIOTree=object, ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import datetime from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import * from django.http import QueryDict from django.template import Template, Context from django.test import TestCase from django.utils.datastructures import MultiValueDict, MergeDict from django...
codeparrot/github-code-clean
# Copyright (c) 2003-2016 CORE Security Technologies # # This software is provided under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Description: Performs various techniques to dump hashes from the # remote machine without exec...
codeparrot/github-code-clean
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import hashlib import tempfile import unittest import pytest # type: ignore from _pytest.monkeypatch import MonkeyPatch # type: ignore from monty.json import MontyDecoder from pymatgen.core import SETTINGS from pymatgen.c...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ pygments.lexers._openedge_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Builtin list for the OpenEdgeLexer. :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ OPENEDGEKEYWORDS = ( 'ABSOLUTE', 'ABS', ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import atexit import json import math import os import re from collections import namedtuple from datetime import date from datetime import datetime from datetime import timedelta from math import ceil from tempfile import NamedTemporaryFile import six from cached_property import cached_propert...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Module of tool that can be applied to BIRRP outputs Created on %(date)s @author: %(Jared Peacock)s """ import numpy as np import os import fnmatch import datetime from scipy import interpolate import time import mtpy.legacy.mttools as mt import shutil import subprocess #import winsound as...
codeparrot/github-code-clean
# pylint: disable=no-member """ Unit tests for the Mixed Modulestore, with DDT for the various stores (Split, Draft, XML) """ from collections import namedtuple import datetime import logging import ddt import itertools import mimetypes from unittest import skip from uuid import uuid4 # Mixed modulestore depends on dj...
codeparrot/github-code-clean
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
codeparrot/github-code-clean
import hashlib import random from datetime import timedelta from typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Union from unittest import mock import orjson from django.conf import settings from django.core.exceptions import ValidationError from django.http import HttpResponse from django.utils.time...
codeparrot/github-code-clean
""" Test functions for stats module """ import warnings import re import sys import pickle from pathlib import Path import os import json import platform from numpy.testing import (assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, as...
codeparrot/github-code-clean
""" mbed SDK Copyright (c) 2011-2015 ARM Limited 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 writin...
codeparrot/github-code-clean
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """The fsl module provides classes for interfacing with the `FSL <http://www.fmrib.ox.ac.uk/fsl/index.html>`_ command line tools. This was written to work with FSL version 4.1.4. Examples -------- See the...
codeparrot/github-code-clean
(dp0 VOpera 9.7 p1 (dp2 S'summary_display' p3 S'97.5%' p4 sS'total_runs' p5 L1L sS'summary_score' p6 F97.504621072088725 sS'results' p7 (dp8 S'failed' p9 (dp10 S'score' p11 I50 sS'raw_score' p12 L54L sS'display' p13 S'54' p14 ssS'passed' p15 (dp16 g11 I95 sg12 L2110L sg13 S'2110' p17 ssssVOpera 9.6 p18 (dp19 S'summary_...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import RegexValidator from django.forms import ( Boolean...
codeparrot/github-code-clean
from __future__ import unicode_literals import datetime import os from decimal import Decimal from unittest import skipUnless from django import forms from django.core.exceptions import FieldError, ImproperlyConfigured, NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.va...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Resource Import Tools @author: Graeme Foster <graeme[at]acm.org> @author: Dominic König <dominic[at]aidiq.com> @copyright: 2011 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this so...
codeparrot/github-code-clean
""" pgp.py this is where the armorable PGP block objects live """ import binascii import calendar import collections import contextlib import copy import functools import itertools import operator import os import re import warnings import weakref import six from datetime import datetime from cryptography.hazmat.pr...
codeparrot/github-code-clean
# coding: utf-8 from __future__ import unicode_literals import itertools import json import os.path import re import time import traceback from .common import InfoExtractor, SearchInfoExtractor from ..jsinterp import JSInterpreter from ..swfinterp import SWFInterpreter from ..compat import ( compat_chr, com...
codeparrot/github-code-clean
import _compression from io import BytesIO, UnsupportedOperation, DEFAULT_BUFFER_SIZE import os import pickle import random import unittest from test.support import ( _4G, TESTFN, import_module, bigmemtest, run_unittest, unlink ) lzma = import_module("lzma") from lzma import LZMACompressor, LZMADecompressor, LZMA...
codeparrot/github-code-clean
# 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...
codeparrot/github-code-clean
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above ...
codeparrot/github-code-clean
''' Gmvault: a tool to backup and restore your gmail account. Copyright (C) <since 2011> <guillaume Aubert (guillaume dot aubert at gmail do com)> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Fr...
codeparrot/github-code-clean
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Defines functionality for pipelined execution of interfaces The `Workflow` class provides core functionality for batch processing. Change directory to provide relative paths for doctests >>> impo...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import sys sys.path[0:0] = [""] import bson import os import pickle import unittest import uuid from datetime import datetime from bson import DBRef, ObjectId from tests import fixtures from tests.fixtures import (PickleEmbedded, PickleTest, PickleSignalsTest, Pickl...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Disaster Victim Registration Model @copyright: 2012-2016 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Original source: github.com/okfn/bibserver # Authors: # markmacgillivray # Etienne Posthumus (epoz) # Francois Boulogne <fboulogne at april dot org> import itertools import re import sys import unicodedata __all__ = ['string_to_latex', 'latex_to_unicode', 'protect_uppe...
codeparrot/github-code-clean
# orm/relationships.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Heuristics related to join conditions as used in :func:`.relationship`. Provi...
codeparrot/github-code-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
codeparrot/github-code-clean
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Tests for the Materials Project DFT mixing scheme **NOTE FOR FUTURE DEVELOPERS** PLEASE DO NOT CHANGE THESE TESTS WITHOUT READING THIS ENTIRE DOCUMENTATION! The MP DFT mixing scheme is conceptually simple but highly int...
codeparrot/github-code-clean
import os.path, re, urllib, time, cgi import simplejson from twisted.application import service from twisted.trial import unittest from twisted.internet import defer, reactor from twisted.internet.task import Clock from twisted.web import client, error, http from twisted.python import failure, log from nevow.util imp...
codeparrot/github-code-clean
"""An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some extra me...
codeparrot/github-code-clean
import os import sys import gtk import pango import webbrowser import user import gettext import common import shlex import subprocess import glib import urllib import signal from menus import MenuManager from mounts import MountsManager from icons import IconManager from emblems import EmblemManager from associations...
codeparrot/github-code-clean
# Copyright 2014-2017 The ODL contributors # # This file is part of ODL. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. """Abstract mathematical operators.""" fro...
codeparrot/github-code-clean
# Lint as: python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
codeparrot/github-code-clean
# Copyright 2015 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...
codeparrot/github-code-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012-2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
codeparrot/github-code-clean
# # # Copyright 2009-2017 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
codeparrot/github-code-clean
# Copyright (C) 2011-2016 Red Hat, Inc. # This library 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 2.1 of the License, or any later version. # # This library is distributed in the h...
codeparrot/github-code-clean
# Copyright (c) 2013 VMware, 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...
codeparrot/github-code-clean
# Copyright 2012 IBM Corp. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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 2 of t...
codeparrot/github-code-clean
# Copyright 2015 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...
codeparrot/github-code-clean
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
codeparrot/github-code-clean
''' Mesh ==== ''' import copy class Nodes(object): ''' Manages nodes for finite element modeling pre/postprocessing and further graphical representations. :param labels: list of node labels. :type labels: list of int > 0 :param x: x coordinate of nodes. :type x: list floats :param y: y coordinate...
codeparrot/github-code-clean
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ##Copyright (C) [2003] [Juergen Hamel, D-32584 Loehne] ##This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as ##published by the Free Software Foundation; either version 3 of the License, or (at your option) any later vers...
codeparrot/github-code-clean
# coding=utf-8 import copy import datetime from ddt import ddt, file_data from mock import patch from nose.tools import raises import pytz from django.db import DatabaseError, IntegrityError from django.utils import timezone from openassessment.assessment.api import peer as peer_api from openassessment.assessment.mo...
codeparrot/github-code-clean
import pytest from api.base.settings.defaults import API_BASE, MAX_PAGE_SIZE from api_tests.nodes.filters.test_filters import NodesListFilteringMixin, NodesListDateFilteringMixin from framework.auth.core import Auth from osf.models import AbstractNode, Node, NodeLog from osf.utils.sanitize import strip_html from osf.u...
codeparrot/github-code-clean
# -*- 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...
codeparrot/github-code-clean
from uuid import UUID # # For scratchpad work... # services_have = ['delete', 'description', 'enabled', 'get', 'human_id', 'id', 'is_loaded', 'links', 'manager', 'name', 'set_loaded', 'to_dict', 'type'] services = [ {u'description': u'Heat CloudFormation Service', ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # 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 #...
codeparrot/github-code-clean
#!/usr/bin/env python3 """Base class for all FAUCET unit tests.""" # pylint: disable=missing-docstring # pylint: disable=too-many-arguments from functools import partial import collections import copy import glob import ipaddress import json import os import random import re import shutil import string import subpro...
codeparrot/github-code-clean
# Copyright 2015 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...
codeparrot/github-code-clean
# Copyright 2014 Alcatel-Lucent USA Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
codeparrot/github-code-clean
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2013 IBM Corp. # 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 # # ...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import os import re import sys import copy import glob import atexit import tempfile import subprocess import shutil import multiprocessing import textwrap import distutils from distutils.errors import DistutilsError try: from threading import local...
codeparrot/github-code-clean
# provide the pinyin initial table for Chinese characters # vim: set fileencoding=utf-8 : pinyin_initial = { u'䤆' : [u'k'] , u'涉' : [u's', u'd'] , u'鈌' : [u'j'] , u'㲓' : [u'r'] , u'愖' : [u'c'] , u'薙' : [u't'] , u'咣' : [u'g'] , u'礦' : [u'k'] , u'鶩' : [u'm', u'w'] , u'䠰' : [u'q'] , u'河' : [u'h'] , u'鄶' : [u'k'] , u'恀'...
codeparrot/github-code-clean
# orm/relationships.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Heuristics related to join conditions as used in :func:`.relationship`. Pro...
codeparrot/github-code-clean
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
codeparrot/github-code-clean
# Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
codeparrot/github-code-clean
"""Climate data and mass-balance computations""" # Built ins import logging import os import datetime import json import warnings # External libs import numpy as np import xarray as xr import netCDF4 import pandas as pd from scipy import stats from scipy import optimize # Optional libs try: import salem except Im...
codeparrot/github-code-clean
# encoding: utf-8 # # Copyright (c) 2014 Dean Jackson <deanishe@deanishe.net> # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2014-02-15 # """The :class:`Workflow` object is the main interface to this library. :class:`Workflow` is targeted at Alfred 2. Use :class:`~workflow.Workflow3` if you wa...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- { #'Profile': '', 'Sawr': 'ثور', "Logout": "خروج", "First Aid": "کمک ها ی اولیه", "First Aid Refresher": "کمک ها ی اولیه کورس مجدد", "Community Based Disaster Preparedness": "آماده گی علیه حوادث به سطح جامعه", "Community Based Disaster Preparedness Refresher": "آماده گی علیه حوادث به سطح جامعه ...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for presubmit_support.py and presubmit_canned_checks.py.""" # pylint: disable=no-member,E1103 import StringIO impor...
codeparrot/github-code-clean
import unicodedata import sqlalchemy as sa from sqlalchemy import Computed from sqlalchemy import DefaultClause from sqlalchemy import event from sqlalchemy import FetchedValue from sqlalchemy import ForeignKey from sqlalchemy import Identity from sqlalchemy import Index from sqlalchemy import inspect from sqlalchemy ...
codeparrot/github-code-clean
#!/usr/bin/env python3 """ Copyright (c) 2016 The Hyve B.V. This code is licensed under the GNU Affero General Public License (AGPL), version 3, or (at your option) any later version. """ import unittest from unittest.mock import Mock import sys import logging.handlers import textwrap from pathlib import Path from co...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
codeparrot/github-code-clean
# cython: auto_cpdef=True, infer_types=True, language_level=3, py2_import=True # # Parser # from __future__ import absolute_import # This should be done automatically import cython cython.declare(Nodes=object, ExprNodes=object, EncodedString=object, BytesLiteral=object, StringEncoding=object, ...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- ## ## # Author: Peter Manev # # peter.manev@openinfosecfoundation.org # ## ## ## !!! IMPORTANT - LATEST DEV Scapy is needed !!! # REMOVE your current scapy installation !!! # th...
codeparrot/github-code-clean
"""Slices is an interactive text control in which a user types in commands to be sent to the interpreter. This particular shell is based on wxPython's wxStyledTextCtrl. Sponsored by Orbtech - Your source for Python programming expertise. Slices is a version of shell modified by David Mashburn.""" __author__ = "David...
codeparrot/github-code-clean
#!/usr/bin/python3 """ This package creates methods to easily call the various Salseforce APIs. """ import json import webservice import urllib import time import sys import os from mimetypes import MimeTypes from zeep import Client, xsd, ns API_VERSION = '50.0' METADATA_WSDL_FILE = os.path.join(os.path.dirname(os.p...
codeparrot/github-code-clean
# -*- coding: utf8 -*- #*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Yorik van Havre <yorik@uncreated.net>, Ken Cline <cline@frii...
codeparrot/github-code-clean
"""Copyright 2008 Orbitz WorldWide 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, software...
codeparrot/github-code-clean
def predict_income(data={}): """ Predictor for income from model/53603192ffa04466fd000977 https://archive.ics.uci.edu/ml/machine-learning-databases/adult/ """ if (not 'marital_status' in data or data['marital_status'] is None): return u'<=50K' if (data['marital_status'] == 'Married-civ-...
codeparrot/github-code-clean
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that t...
codeparrot/github-code-clean
# Copyright (C) 2001-2004 Python Software Foundation # Contact: email-sig@python.org # email package unit tests import os import sys import time import base64 import difflib import unittest import warnings from cStringIO import StringIO import email from email.Charset import Charset from email.Header import Header, ...
codeparrot/github-code-clean
#!/usr/bin/python2.4 """Diff Match and Patch Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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/l...
codeparrot/github-code-clean
# We can test part of the module without zlib. try: import zlib except ImportError: zlib = None import os import io import sys import time import struct import zipfile import unittest from StringIO import StringIO from tempfile import TemporaryFile from random import randint, random from unittest import skipU...
codeparrot/github-code-clean
#!/usr/bin/python # NOTE: this file is taken from the Python source distribution # It can be found under Tools/gdb/libpython.py. It is shipped with Cython # because it's not installed as a python module, and because changes are only # merged into new python versions (v3.2+). ''' From gdb 7 onwards, gdb's build can be...
codeparrot/github-code-clean
import unittest from django.db import connection, migrations, models, transaction from django.db.migrations.migration import Migration from django.db.migrations.operations import CreateModel from django.db.migrations.state import ModelState, ProjectState from django.db.models.fields import NOT_PROVIDED from django.db....
codeparrot/github-code-clean
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
codeparrot/github-code-clean
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
codeparrot/github-code-clean
# coding=utf-8 """TO-DO: Write a description of what this XBlock is.""" import json import pkg_resources import logging import threading import math import sys from xblock.core import XBlock from xblock.fields import Scope, Integer, Any, String, Float, Dict, Boolean,List from xblock.fragment import Fragment from lxml...
codeparrot/github-code-clean
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import logging import math import itertools import warnings from collections import OrderedDict import numpy as np from monty.json import jsanitize from pymatgen.core.periodic_table import Element from pymat...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2014 CERN. # # Invenio 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 2 of the # Li...
codeparrot/github-code-clean
#!/usr/bin/python import logging logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s") import procgame.game, sys, os import procgame.config import random import procgame.sound sys.path.insert(0,os.path.pardir) import bingo_emulator.common.units as units import bingo_em...
codeparrot/github-code-clean
#!/usr/bin/python import logging logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s") import procgame.game, sys, os import procgame.config import random import procgame.sound import pygame sys.path.insert(0,os.path.pardir) import bingo_emulator.common.units as units i...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
codeparrot/github-code-clean
# coding: utf-8 from __future__ import unicode_literals import itertools import json import os.path import re import time import traceback from .common import InfoExtractor, SearchInfoExtractor from ..jsinterp import JSInterpreter from ..swfinterp import SWFInterpreter from ..compat import ( compat_chr, com...
codeparrot/github-code-clean
# Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright 2012 Varnish Software AS # Copyright 2013-2014 Antoine "hashar" Musso # Copyright 2013-2014 Wikimedia Foundation Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licen...
codeparrot/github-code-clean
#Copyright 2008 Orbitz WorldWide # #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, so...
codeparrot/github-code-clean