text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# Volatility # Copyright (C) 2011-2013 Volatility Foundation # Copyright (C) 2011 Jamie Levy (Gleeda) <jamie@memoryanalysis.net> # # This file is part of Volatility. # # Volatility 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...
codeparrot/github-code-clean
"""urbs: A linear optimisation model for distributed energy systems urbs minimises total cost for providing energy in form of desired commodities (usually electricity) to satisfy a given demand in form of timeseries. The model contains commodities (electricity, fossil fuels, renewable energy sources, greenhouse gases)...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ /*************************************************************************** Cadastre - Dialog classes A QGIS plugin This plugins helps users to import the french land registry ('cadastre') into a database. It is meant to ea...
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
# 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
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): for comment in orm.Comment.objects.all(): comment.body_txt = comment.body comment.save() def...
codeparrot/github-code-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
codeparrot/github-code-clean
# 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:gc/www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
codeparrot/github-code-clean
# Tests of the diskdf module: distribution functions from Dehnen (1999) from __future__ import print_function, division import os import numpy from scipy import stats from galpy.df import dehnendf, shudf _FEWERLONGINTEGRALS= True #So we can reuse the following ddf_correct_flat= None ddf_correct2_flat= None ddf_correct_...
codeparrot/github-code-clean
# Licensed under a 3-clause BSD style license - see PYFITS.rst import collections import copy import itertools import re import warnings from .card import Card, _pad, KEYWORD_LENGTH, UNDEFINED from .file import _File from .util import (encode_ascii, decode_ascii, fileobj_closed, fileobj_is_binary, ...
codeparrot/github-code-clean
#!/usr/bin/python3 # -*- coding: utf-8 -*- # pylint: disable=too-many-lines """ Configurator for Home Assistant. https://github.com/danielperna84/hass-configurator """ import os import sys import argparse import json import ssl import socket import socketserver import base64 import ipaddress import signal import cgi im...
codeparrot/github-code-clean
from ChannelSelection import ChannelSelection, BouquetSelector, SilentBouquetSelector from Components.ActionMap import ActionMap, HelpableActionMap from Components.ActionMap import NumberActionMap from Components.Harddisk import harddiskmanager from Components.Input import Input from Components.Label import Label from...
codeparrot/github-code-clean
import copy import csv import datetime import json import urllib import random import urlparse import pyquery import mock from cStringIO import StringIO from nose.tools import eq_, ok_, assert_raises from nose.plugins.skip import SkipTest from django.test.client import RequestFactory from django.test.utils import ove...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import json import re from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db.models import Count from django.http im...
codeparrot/github-code-clean
#!/usr/bin/env python3 #=============================================================================== # # MBN TOOLS # # GENERAL DESCRIPTION # Contains all MBN Utilities for image generation # # SPDX-License-Identifier: BSD-3-Clause #------------------------------------------------------------------------------- #...
codeparrot/github-code-clean
#!/usr/bin/python # # Copyright (c) 2009 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: # # * Redistributions of source code must retain the above copyright # notice, this list of ...
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
# This file is part of Booktype. # Copyright (c) 2012 Aleksandar Erkalovic <aleksandar.erkalovic@sourcefabric.org> # # Booktype 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 Free Software Foundation, either version 3 of the Li...
codeparrot/github-code-clean
""" HLLib is a package library for Half-Life that abstracts several package formats (e.g. GCF, VPK) and provides a simple interface for all of them. This module provides access to the underlying C library via Python. Directions: See Package class for information on handling (e.g. opening, closing, inspecting) ...
codeparrot/github-code-clean
"""Tests for the array padding functions. """ from __future__ import division, absolute_import, print_function import pytest import numpy as np from numpy.testing import assert_array_equal, assert_allclose, assert_equal from numpy.lib.arraypad import _as_pairs _numeric_dtypes = ( np.sctypes["uint"] + np.sc...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import pytest from datetime import datetime, timedelta from collections import defaultdict import pandas.util.testing as tm from pandas.core.dtypes.common import is_unsigned_integer_dtype from pandas.core.indexes.api import Index, MultiIndex from pandas.tests.indexes.common import Base from...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import unittest from itertools import zip_longest from lxml import etree as ET, html from lxml.html import builder as h from odoo.tests import common, HttpCase, tagged def attrs(**kwargs): return {'data-oe-%s' % k...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import from base64 import standard_b64decode import json import unittest from cStringIO import StringIO import numbers import time from PIL import Image import requests import pytest lupa = pytest.importorskip("lupa") from . import test_render from .test_jsonpos...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ pygments.lexers.templates ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for various template engines' markup. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexers.html import HtmlLexer, XmlLex...
codeparrot/github-code-clean
import pytest from nose.tools import * # noqa: from django.utils import timezone from api.base.settings.defaults import API_BASE, MAX_PAGE_SIZE from api.base.utils import default_node_permission_queryset from api.caching import settings as cache_settings from api.caching.utils import storage_usage_cache from api_test...
codeparrot/github-code-clean
# coding: utf8 """ weasyprint.tests.layout ----------------------- Tests for layout, ie. positioning and dimensioning of boxes, line breaks, page breaks. :copyright: Copyright 2011-2014 Simon Sapin and contributors, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ imp...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer API. From build dir, run: ctest -R PyQgsServerApi -V .. note:: 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 2 of the Licens...
codeparrot/github-code-clean
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
codeparrot/github-code-clean
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 ## License, ...
codeparrot/github-code-clean
from Tools.Profile import profile from Screen import Screen import Screens.InfoBar import Components.ParentalControl from Components.Button import Button from Components.ServiceList import ServiceList, refreshServiceList from Components.ActionMap import NumberActionMap, ActionMap, HelpableActionMap from Components.Men...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Run the script for details of the licence # or refer to the notice section later in the file. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #!<^DATA #!<^CON...
codeparrot/github-code-clean
# Unix SMB/CIFS implementation. # backend code for provisioning a Samba4 server # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2012 # Copyright (C) Andrew Bartlett <abartlet@samba.org> 2008-2009 # Copyright (C) Oliver Liebel <oliver@itc.li> 2008-2009 # # Based on the original in EJS: # Copyright (C) Andrew Tr...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...
codeparrot/github-code-clean
""" Test script for the Unicode implementation. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs import struct import sys import unittest import warnings from test import support, string_tests import _string # decorator to skip tests on narro...
codeparrot/github-code-clean
# Orca # # Copyright 2005-2009 Sun Microsystems 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 (at your option) any later version. # # This...
codeparrot/github-code-clean
# 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 # d...
codeparrot/github-code-clean
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
codeparrot/github-code-clean
# hy:change logs are in tensorflow_train.py ##################################################################################################### import ImageDraw import ImageFilter import ImageOps import time import random import glob from functools import wraps from random import randint import os import sys import d...
codeparrot/github-code-clean
#!/usr/bin/env python # # basic_tests.py: testing working-copy interactions with ra_local # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (...
codeparrot/github-code-clean
# 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 # distributed under t...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import from .. import backend as K from .. import activations from .. import initializers from .. import regularizers from .. import constraints from ..engine import Layer from ..engine import InputSpec from ..utils import conv_utils from ..legacy import interfac...
codeparrot/github-code-clean
from __future__ import annotations from datetime import datetime import functools from itertools import zip_longest import operator from typing import ( TYPE_CHECKING, Any, Callable, Hashable, Literal, Sequence, TypeVar, cast, overload, ) import warnings import numpy as np from pa...
codeparrot/github-code-clean
import datetime import os from unittest import mock from django.conf import settings from django.contrib.auth.models import Permission from django.core.files.base import ContentFile from django.http import HttpRequest, HttpResponse from django.test import TestCase, modify_settings, override_settings from django.urls i...
codeparrot/github-code-clean
# This file was created automatically by SWIG 1.3.29. # Don't modify this file, modify the SWIG interface instead. """ Classes for a simple HTML rendering window, HTML Help Window, etc. """ import _html import new new_instancemethod = new.instancemethod def _swig_setattr_nondynamic(self,class_type,name,value,static=1...
codeparrot/github-code-clean
""" auibar contains an implementation of L{AuiToolBar}, which is a completely owner-drawn toolbar perfectly integrated with the AUI layout system. This allows drag and drop of toolbars, docking/floating behaviour and the possibility to define "overflow" items in the toolbar itself. The default theme that is used is L{...
codeparrot/github-code-clean
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANS...
codeparrot/github-code-clean
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License");...
codeparrot/github-code-clean
import coverage import json import os import pytest import pwd import re import shutil import sys from asn1crypto import pem, x509 from glob import glob from oscrypto import asymmetric from csrbuilder import CSRBuilder, pem_armor_csr from asn1crypto.util import OrderedDict from subprocess import check_output from impor...
codeparrot/github-code-clean
# Generated from tools/antlr/Fcl.g4 by ANTLR 4.5.3 from antlr4 import * from io import StringIO def serializedATN(): with StringIO() as buf: buf.write("\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2_") buf.write("\u0306\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") buf.write("\t\...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2005-2014 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## 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 Softw...
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 2013 Google 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 applicable law or ...
codeparrot/github-code-clean
""" Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For two lists of strings, return a delta in context diff format. Function nd...
codeparrot/github-code-clean
# Copyright (c) Gary Strangman. All rights reserved # # Disclaimer # # This software is provided "as-is". There are no expressed or implied # warranties of any kind, including, but not limited to, the warranties # of merchantability and fitness for a given application. In no event # shall Gary Strangman be liable fo...
codeparrot/github-code-clean
from __future__ import division, with_statement import math import os import time import warnings import numpy as np import pyfits as fits from ..util import PyfitsDeprecationWarning, PyfitsPendingDeprecationWarning from ..hdu.compressed import SUBTRACTIVE_DITHER_1, DITHER_SEED_CHECKSUM from . import PyfitsTestCase ...
codeparrot/github-code-clean
""" These are models for the Sierra Database. NOTES: Models below are organized the same way the Sierra DNA is organized. (http://techdocs.iii.com/sierradna/) *_myuser tables are problematic--they don't have a proper foreign key to the table that they should hang off of, and they're generally redundant with existing ...
codeparrot/github-code-clean
"""Concrete date/time and related types -- prototype implemented in Python. See http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage See also http://dir.yahoo.com/Reference/calendars/ For a primer on DST, including many current DST rules, see http://webexhibits.org/daylightsaving/ For more about DST than you e...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """This module defines an interface to CASTEP for use by the ASE (Webpage: http://wiki.fysik.dtu.dk/ase) Authors: Max Hoffmann, max.hoffmann@ch.tum.de Jörg Meyer, joerg.meyer@ch.tum.de """ __all__ = [ 'Castep', 'CastepCell', 'CastepParam', 'create_...
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
""" Tests that work on both the Python and C engines but do not have a specific classification into the other test modules. """ import codecs from collections import OrderedDict import csv from datetime import datetime from io import BytesIO, StringIO import os import platform from tempfile import TemporaryFile impor...
codeparrot/github-code-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'Vitals' db.delete_table('indivo_vitals') # Adding model 'VitalSigns' db...
codeparrot/github-code-clean
# Copyright (c) 2013 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
codeparrot/github-code-clean
# coding: utf-8 from __future__ import unicode_literals import base64 import binascii import collections import ctypes import email import getpass import io import itertools import optparse import os import platform import re import shlex import shutil import socket import struct import subprocess import sys import xm...
codeparrot/github-code-clean
from __future__ import unicode_literals import warnings from functools import partial from operator import attrgetter from django import forms from django.apps import apps from django.core import checks, exceptions from django.core.exceptions import FieldDoesNotExist from django.db import connection, connections, rou...
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
# Author: Steven J. Bethard <steven.bethard@gmail.com>. import codecs import inspect import os import shutil import stat import sys import textwrap import tempfile import unittest import argparse from io import StringIO from test import support from unittest import mock class StdIOBuffer(StringIO): pass class T...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Authentication, Authorization, Accouting @requires: U{B{I{gluon}} <http://web2py.com>} @author: Dominic König <dominic[at]aidiq.com> @copyright: (c) 2010-2011 Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obt...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import warnings from io import StringIO, BytesIO as stringio from collections.abc import Iterable from itertools import combinations from collections import Counter import pickle import os import numpy as np import pandas as pd import pytest from scipy.stats import weibull_min, norm, logistic...
codeparrot/github-code-clean
# -*- encoding: utf-8 -*- # # Copyright (c) 2013, 2014 Paul Tagliamonte <paultag@debian.org> # Copyright (c) 2013 Julien Danjou <julien@danjou.info> # Copyright (c) 2013 Nicolas Dandrimont <nicolas.dandrimont@crans.org> # Copyright (c) 2013 James King <james@agentultra.com> # Copyright (c) 2013, 2014 Bob Tolbert <bob@t...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # forked from MadEdit # Name: MadEdit/TradSimp.cpp # Description: Traditional Chinese <==> Simplified Chinese # Author: madedit@gmail.com # Licence: GPL # Forked by skydarkchen <skydark2 at gmail> import sys UEMPTY = '' py2 = sys.version_info < (3, 0, 0) if py2: UEMPTY = U...
codeparrot/github-code-clean
# ---------------------------------------------------------------------------- # # Charm: A Python-based client for LiveJournal and other blogging services. # # Version 1.9.1 # January 11th, 2009 # Copyright (C) 2001 - 2009 Lydia Leong (evilhat@livejournal.com) # # Usage: charm --help # # (Don't invoke this module dir...
codeparrot/github-code-clean
#!/usr/bin/env python # ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake 'RunQueue' implementation Handles preparation and execution of a queue of tasks """ # Copyright (C) 2006-2007 Richard Purdie # # This program is free software; you can redistribute it and/or mod...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (C) 2012 VT SuperDARN Lab # Full license can be found in LICENSE.txt # # 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 #...
codeparrot/github-code-clean
# Copyright (C) 2010-2016 GRNET S.A. and individual contributors # # 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 version. # # T...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Created on Tue Aug 23 11:54:38 2011 @author: a1185872 """ import fnmatch import os import shutil import subprocess import time from operator import itemgetter import matplotlib.colorbar as mcb import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np import...
codeparrot/github-code-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # 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
""" Copyright 2015, Institute e-Austria, Timisoara, Romania http://www.ieat.ro/ Developers: * Gabriel Iuhasz, iuhasz.gabriel@info.uvt.ro 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: ht...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Utility functions for plotting M/EEG data.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Mainak Jas <mainak...
codeparrot/github-code-clean
import datetime import json, yaml import io import csv from bson import json_util, ObjectId from dateutil.parser import parse from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from mongoengine import EmbeddedDocument, DynamicEmbeddedDocum...
codeparrot/github-code-clean
#!/usr/bin/env python # $Id: Template.py,v 1.185 2007/10/02 01:36:26 tavis_rudd Exp $ """Provides the core API for Cheetah. See the docstring in the Template class and the Users' Guide for more information Meta-Data ================================================================================ Author: Tavis Rudd <t...
codeparrot/github-code-clean
# Version: 5.1 # Architecture: i386 import vstruct from vstruct.primitives import * POLICY_AUDIT_EVENT_TYPE = v_enum() POLICY_AUDIT_EVENT_TYPE.AuditCategorySystem = 0 POLICY_AUDIT_EVENT_TYPE.AuditCategoryLogon = 1 POLICY_AUDIT_EVENT_TYPE.AuditCategoryObjectAccess = 2 POLICY_AUDIT_EVENT_TYPE.AuditCategoryPrivilegeUse =...
codeparrot/github-code-clean
import pytest import copy from bit.constants import HASH_TYPE from bit.exceptions import InsufficientFunds from bit.network.meta import Unspent from bit.transaction import ( TxIn, TxOut, TxObj, calc_txid, create_new_transaction, construct_outputs, deserialize, estimate_tx_fee, sanit...
codeparrot/github-code-clean
"""Wide_Eastasian table, created by bin/update-tables.py.""" # Generated: 2020-06-23T15:58:41.860748 WIDE_EASTASIAN = { '4.1.0': ( # Source: EastAsianWidth-4.1.0.txt # Date: 2005-03-17, 15:21:00 PST [KW] # (0x01100, 0x01159,), # Hangul Choseong Kiyeok ..Hangul Choseong Yeorinhi ...
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
# # DescendantIndentedTree - a plugin for GRAMPS, the GTK+/GNOME based # genealogy program that creates an Ancestor Chart Map based on # the D3.js Indented Tree Layout scheme. # # Copyright (C) 2014 Matt Keenan <matt.keenan@gmail.com> # # This program is free software; you can redistribute it and/or modify...
codeparrot/github-code-clean
################################################################################ # # Copyright 2014-2015 Eric Lacombe <eric.lacombe@security-labs.org> # ################################################################################ # # This file is part of fuddly. # # fuddly is free software: you can redistribute ...
codeparrot/github-code-clean
import asyncio import json import re import traceback from datetime import timedelta from enum import Enum from typing import Union import discord import pydash as _ from discord.ext import commands from discord.ext.commands import BadArgument from clembot.config import config_template from clembot.config.constants i...
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
import contextlib import collections import pickle import re import sys from unittest import TestCase, main, skipUnless, SkipTest from copy import copy, deepcopy from typing import Any, NoReturn from typing import TypeVar, AnyStr from typing import T, KT, VT # Not in __all__. from typing import Union, Optional from t...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (c) 2013, Eduard Broecker # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that # the following conditions are met: # # Redistributions of source code must retain the above copyright notice, # t...
codeparrot/github-code-clean
import datetime import json from unittest.mock import Mock import pytz from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from ...
codeparrot/github-code-clean
import sys import math import itertools from collections import defaultdict, namedtuple from types import SimpleNamespace as namespace import numpy as np from PyQt4 import QtGui from PyQt4.QtGui import ( QSizePolicy, QGraphicsScene, QGraphicsView, QFontMetrics, QPen, QPixmap, QColor ) from PyQt4.QtCore impor...
codeparrot/github-code-clean
# Lint as: python2, python3 # 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 # ...
codeparrot/github-code-clean
#!/usr/bin/env python # $URL$ # $Rev$ # png.py - PNG encoder/decoder in pure Python # # Copyright (C) 2006 Johann C. Rocholl <johann@browsershots.org> # Portions Copyright (C) 2009 David Jones <drj@pobox.com> # And probably portions Copyright (C) 2006 Nicko van Someren <nicko@nicko.org> # # Original concept by Johann...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to check recently uploaded files. This script checks if a file description is present and if there are other problems in the image's description. This script will have to be configured for each language. Please submit translations as addition to the Pywikibot frame...
codeparrot/github-code-clean
# -*- python -*- # # wireshark_gen.py (part of idl2wrs) # # Author : Frank Singleton (frank.singleton@ericsson.com) # # Copyright (C) 2001 Frank Singleton, Ericsson Inc. # # This file is a backend to "omniidl", used to generate "Wireshark" # dissectors from CORBA IDL descriptions. The output language generated # ...
codeparrot/github-code-clean
#!/usr/bin/env python """ crate_anon/crateweb/research/models.py =============================================================================== Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of CRATE. CRATE is free software: you can redistribute it and/or modify it u...
codeparrot/github-code-clean
#!/usr/bin/env python # # Generated by generateDS.py. # import sys import getopt from string import lower as str_lower from xml.dom import minidom from xml.dom import Node # # User methods # # Calls to the methods in these classes are generated by generateDS.py. # You can replace these methods by re-implementing th...
codeparrot/github-code-clean