text
stringlengths
5.09k
178k
domain
stringclasses
106 values
"""Tests for items views.""" import json from datetime import datetime, timedelta import ddt from mock import patch, Mock, PropertyMock from pytz import UTC from webob import Response from django.http import Http404 from django.test import TestCase from django.test.client import RequestFactory from django.core.urlres...
codeparrot/github-code-clean
#!/usr/bin/env python # Created by Dan Feldman and Connor Robinson for analyzing data from Espaillat Group research models. #---------------------------------------------IMPORT RELEVANT MODULES-------------------------------------------- import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm fro...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # import json import time from rest_framework.test import APITestCase from rest_framework import status from django.core.urlresolvers import reverse from django.test.client import Client ...
codeparrot/github-code-clean
# sql/elements.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """Core SQL expression elements, including :class:`_expression.ClauseElement`, :cla...
codeparrot/github-code-clean
#-*- coding=utf8 -*- #/usr/bin/python env import os,sys,logging reload(sys) sys.setdefaultencoding("utf-8") logger = logging.getLogger('django') from django.http import HttpResponseRedirect,HttpResponse,request,JsonResponse,StreamingHttpResponse from django.core.urlresolvers import reverse from django.shortcuts import ...
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 -*- """ Sahana Eden GIS Model @copyright: 2009-2015 (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 in the Software without ...
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
""" :created: 2017-09 :author: Alex BROSSARD <abrossard@artfx.fr> """ from PySide2 import QtWidgets, QtCore, QtGui from pymel import core as pmc from auri.auri_lib import AuriScriptView, AuriScriptController, AuriScriptModel, is_checked, grpbox from auri.scripts.Maya_Scripts import rig_lib from auri.scripts.Maya_Scri...
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 2017 Battelle Energy Alliance, 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 agreed t...
codeparrot/github-code-clean
#---------------------------------------------------------------------- # This file was generated by C:/Users/Jacob/Documents/cloaked-octo-spice/Src/gui/images/img2py.py # from wx.lib.embeddedimage import PyEmbeddedImage document_save = PyEmbeddedImage( "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgI...
codeparrot/github-code-clean
""" Cisco_IOS_XR_mpls_ldp_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR mpls\-ldp package configuration. This module contains definitions for the following management objects\: mpls\-ldp\: MPLS LDP configuration This YANG module augments the Cisco\-IOS\-XR\-snmp\-agent\-cfg module ...
codeparrot/github-code-clean
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # diff_tests.py: some basic diff tests # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (AS...
codeparrot/github-code-clean
# Copyright 2015 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 agreed to in writing, s...
codeparrot/github-code-clean
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import operator from sqlalchemy import * from sqlalchemy import exc as sa_exc, util from sqlalchemy.sql import compiler, table, column from sqlalchemy.engine import default from sqlalchemy.orm import * from sqlalchemy.orm import attributes from s...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Motivation ---------- The motivation behind the given re-implementation of some clustering metrics is to avoid the high memory usage of equivalent methods in Scikit-Learn. Using sparse dictionary maps avoids storing co-incidence matrices in memory leading to more acceptable performance i...
codeparrot/github-code-clean
# (c) Copyright 2014-2016 Hewlett Packard Enterprise Development LP # 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/lic...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Custom UI Widgets used by the survey application @copyright: 2011-2012 (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 de...
codeparrot/github-code-clean
from globals import * from overwatch import core from alife import * import graphics as gfx import damage as dam import pathfinding import scripting import missions import crafting import language import contexts import drawing import logging import weapons import bad_numbers import effects import weather import rando...
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
#!/usr/bin/env python3 from .util import clamp, diceroll import random from .modifiers import * """ Tags: animate - Marks objects that are living biological creatures. For example gargolyes are not animate, golems are not animate. inaminate - self explanatory humanoid - Marks objects that have humanoid tra...
codeparrot/github-code-clean
# Copyright (C) 2018 The Electrum developers # # 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, modify, merge, publ...
codeparrot/github-code-clean
#coding=UTF-8 from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext from pyspark.sql.types import * from datetime import date, datetime, timedelta import sys, re, os st = datetime.now() conf = SparkConf().setAppName('PROC_F_CI_COM_CUST_INFO').setMaster(sys.argv[2]) sc = SparkContext(conf = conf) sc...
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
# Copyright 2011 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 by ...
codeparrot/github-code-clean
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------------------------------------------------- # INFO: # ----------------------------------------------------------------------------------------------------------------------- """ Author: Evan Hub...
codeparrot/github-code-clean
# pylint: disable-msg=W0400,W0511,W0611,W0612,W0614,R0201,E1102 """Tests suite for MaskedArray & subclassing. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ from __future__ import division, absolute_import, print_function __author__ = "Pierre GF Gerard-Marchant" import warnings import pickle i...
codeparrot/github-code-clean
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest from datetime import datetime, timedelta from numpy import nan import numpy as np import pandas as pd import pandas._libs.index as _index from pandas.core.dtypes.common import is_integer, is_scalar from pandas import (Index, Series, DataFrame, isna, ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Arithmetc tests for DataFrame/Series/Index/Array classes that should # behave identically. # Specifically for datetime64 and datetime64tz dtypes import operator from datetime import datetime, timedelta import warnings from itertools import product, starmap import numpy as np import pytest imp...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 # Li...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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 the ## ...
codeparrot/github-code-clean
#----------------------------------------------------------------------------- # Name: wx.lib.plot.py # Purpose: Line, Bar and Scatter Graphs # # Author: Gordon Williams # # Created: 2003/11/03 # RCS-ID: $Id$ # Copyright: (c) 2002 # Licence: Use as you wish. #-----------------------------...
codeparrot/github-code-clean
""" Author: Justin Cappos, Armon Dadgar Start Date: 27 June 2008 Description: This is a collection of communications routines that provide a programmer with a reasonable environment. This is used by repy.py to provide a highly restricted (but usable) environment. """ import socket # Armon: Us...
codeparrot/github-code-clean
#!/usr/bin/python # # Copyright (C) 2006, 2007, 2010 Google Inc. # # 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 License, or # (at your option) any later version. # # ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Spyder, the Scientific Python Development Environment ===================================================== Developped and maintained by the Spyder Project Contr...
codeparrot/github-code-clean
# # Copyright 2016 The BigDL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
codeparrot/github-code-clean
# Copyright 2012 OpenStack Foundation # 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 requ...
codeparrot/github-code-clean
from __future__ import absolute_import import datetime import pickle import sys from django.conf import settings from django.core.exceptions import FieldError from django.db import DatabaseError, connection, connections, DEFAULT_DB_ALIAS from django.db.models import Count from django.db.models.query import Q, ITER_CH...
codeparrot/github-code-clean
#!/usr/bin/env python3 """ This file defines a set of system_info classes for getting information about various resources (libraries, library directories, include directories, etc.) in the system. Usage: info_dict = get_info(<name>) where <name> is a string 'atlas','x11','fftw','lapack','blas', 'lapack_src', 'b...
codeparrot/github-code-clean
from datetime import datetime, timedelta import operator from textwrap import dedent import warnings import numpy as np from pandas._libs import ( algos as libalgos, index as libindex, join as libjoin, lib) from pandas._libs.lib import is_datetime_array from pandas._libs.tslibs import OutOfBoundsDatetime, Timedel...
codeparrot/github-code-clean
from nose.tools import eq_, ok_, raises, assert_true from wtforms import fields from flask_admin import form from flask_admin._compat import as_unicode from flask_admin._compat import iteritems from flask_admin.contrib.sqla import ModelView, filters from flask_babelex import Babel from sqlalchemy.ext.hybrid import h...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright 2010 Google 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 law o...
codeparrot/github-code-clean
# postgresql/base.py # Copyright (C) 2005-2015 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 """ .. dialect:: postgresql :name: PostgreSQL Sequences/SERIAL ------------...
codeparrot/github-code-clean
# Copyright (c) 2020 DDN. All rights reserved. # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. import json import threading import sys import traceback import time import uuid from django.core.exceptions import ObjectDoesNotExist import os import operator import ...
codeparrot/github-code-clean
# (C) British Crown Copyright 2010 - 2016, Met Office # # This file is part of Iris. # # Iris 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 l...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import print_function import sys from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models, transaction from django.utils.encoding import smart_text class Migration(DataMigration): def _get_dic...
codeparrot/github-code-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Rackspace # Copyright (c) 2011 X.commerce, a business unit of eBay 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 t...
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
#!/usr/bin/env python # # Copyright 2007 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
# coding=utf-8 # Copyright 2022 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
codeparrot/github-code-clean
import pytest, py, sys from _pytest import python as funcargs from _pytest.python import FixtureLookupError from _pytest.pytester import get_public_names from textwrap import dedent def test_getfuncargnames(): def f(): pass assert not funcargs.getfuncargnames(f) def g(arg): pass assert funcargs.getfunc...
codeparrot/github-code-clean
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- class Charset(object): common_name = 'Cousine-Regular' native_name = '' def glyphs(self): chars = [] chars.append(0x200C) #uni200C ZERO WIDTH NON-JOINER chars.append(0x200D) #uni200D ZERO WIDTH JOINER chars.append(0x200E) #uni200E LEFT-TO-RIGHT M...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
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 python # # Copyright (c) 2016, The OpenThread Authors. # 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 copyright # notic...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" je opcioni izraz kao sto je "polje1=\'nova vrijednost\'". Ne mozete azurirati ili izbristi rezultati JOIN-a', '# of Houses Damaged': 'Broj oštećenih kuća', '# of Houses...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- { "_NUM_ duplicates found": "_NUM_ adet yineleme bulundu", "...or add a new bin": "...veya yeni bir kutu ekleyin", "* Required Fields": "* Zorunlu Alanlar", "# of International Staff": "# Uluslararası Çalışan", "# of National Staff": "# Yerel Çalışan", "# selected": "# seçildi", "%(app)s not ins...
codeparrot/github-code-clean
# sql/elements.py # Copyright (C) 2005-2017 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 """Core SQL expression elements, including :class:`.ClauseElement`, :class:`.ColumnE...
codeparrot/github-code-clean
from ipaddress import IPv4Network import re from itertools import product from math import ceil, floor from django.conf import settings from django.core.exceptions import ValidationError from django.core.management import call_command from rest_framework import status from desecapi.models import Domain, RR, RRset, RR...
codeparrot/github-code-clean
# encoding=utf-8 import datetime import decimal import logging import os import Queue import threading import unittest import peewee from peewee import (RawQuery, SelectQuery, InsertQuery, UpdateQuery, DeleteQuery, Node, Q, database, parseq, SqliteAdapter, PostgresqlAdapter, filter_query, annotate_que...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # blitz_gateway - python bindings and wrappers to access an OMERO blitz server # # Copyright (c) 2007-2015 Glencoe Software, Inc. All rights reserved. # # This software is distributed under the terms described by the LICENCE file # you can find at the root of the distribu...
codeparrot/github-code-clean
""" Misc heavy lifting functions for cobbler Copyright 2006-2009, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> 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 License, or...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Shiva Manne <manneshiva@gmail.com> # Copyright (C) 2018 RaRe Technologies s.r.o. # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """This module implements word vectors and their similarity look-ups. Since trained word vectors are ind...
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: utf-8 -*- import os import shutil import sys import unittest import tempfile import warnings import subprocess try: import multiprocessing as mp multiprocessing_imported = True except ImportError: multiprocessing_imported = False import numpy import tables import tables.flavor from tables ...
codeparrot/github-code-clean
import platform from .flag import make_flag bits = platform.architecture()[0] bitness = int(bits[:2]) NATIVE_WORD_MAX_VALUE = 0xffffffff if bitness == 32 else 0xffffffffffffffff from .ntstatus import * from .winerror import * BG_JOB_ENUM_ALL_USERS = make_flag("BG_JOB_ENUM_ALL_USERS", 0x0001) BG_NOTIFY_JOB_TRANSFERRE...
codeparrot/github-code-clean
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsTextRenderer. .. 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 License, or (at your option) any later version. """ _...
codeparrot/github-code-clean
# This is Kconfiglib, a Python library for scripting, debugging, and extracting # information from Kconfig-based configuration systems. To view the # documentation, run # # $ pydoc kconfiglib # # or, if you prefer HTML, # # $ pydoc -w kconfiglib # # The examples/ subdirectory contains examples, to be run with e.g. # ...
codeparrot/github-code-clean
#!/usr/bin/python3 """ main loop for pi-ager """ import os import subprocess import stat import time import datetime import Adafruit_DHT import RPi.GPIO as gpio import pi_sht1x import pi_ager_database import pi_ager_names import pi_ager_paths import pi_ager_init import pi_ager_gpio_config import pi_ager_organizati...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWi...
codeparrot/github-code-clean
from django.shortcuts import render, render_to_response import os, time, math, itertools, csv, random from itertools import chain from django.db.models import Max, Subquery, OuterRef, Exists from django.db.models import Q, Count, Func, F, Sum, Value as V from django.db.models.functions import Concat from django.core i...
codeparrot/github-code-clean
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
codeparrot/github-code-clean
# module pyparsing.py # # Copyright (c) 2003,2004,2005 Paul T. McGuire # # 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...
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...
codeparrot/github-code-clean
import random from datetime import timedelta from typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Union from unittest import mock import ujson from django.conf import settings from django.core.exceptions import ValidationError from django.http import HttpRequest, HttpResponse from django.utils.timezon...
codeparrot/github-code-clean
# Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 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/LICENS...
codeparrot/github-code-clean
""" Find a few eigenvectors and eigenvalues of a matrix. Uses ARPACK: http://www.caam.rice.edu/software/ARPACK/ """ # Wrapper implementation notes # # ARPACK Entry Points # ------------------- # The entry points to ARPACK are # - (s,d)seupd : single and double precision symmetric matrix # - (s,d,c,z)neupd: single,do...
codeparrot/github-code-clean
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1+ # systemd-networkd tests import argparse import itertools import os import re import shutil import signal import subprocess import sys import time import unittest from shutil import copytree network_unit_file_path='/run/systemd/network' networkd_runtime_dire...
codeparrot/github-code-clean
from Screen import Screen from Components.Button import Button from Components.ActionMap import HelpableActionMap, ActionMap, NumberActionMap from Components.ChoiceList import ChoiceList, ChoiceEntryComponent from Components.MenuList import MenuList from Components.MovieList import MovieList, resetMoviePlayState, AUDIO...
codeparrot/github-code-clean
# coding: utf-8 """ Test cases for DataFrame.plot """ import pytest import string import warnings from datetime import datetime, date import pandas as pd from pandas import (Series, DataFrame, MultiIndex, PeriodIndex, date_range, bdate_range) from pandas.core.dtypes.api import is_list_like from ...
codeparrot/github-code-clean
"""A `Type` and `Op` classes to work with numpy.ndarrays symbolically.""" from six.moves import builtins import sys import warnings import numpy from six import integer_types from six.moves import xrange import numbers import theano from theano.compat import izip from theano.configparser import config from theano imp...
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 # Copyright (c) 2015-2022 Vector 35 Inc # # 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, modify, m...
codeparrot/github-code-clean
''' Peach XML Parser. Sucks in the crazy XML and returns a top level context object that contians things like templates, namespaces, etc. @author: Michael Eddington @version: $Id: parser.py 2697 2012-01-31 21:55:00Z meddingt $ ''' # # Copyright (c) Michael Eddington # # Permission is hereby granted, free of charge,...
codeparrot/github-code-clean
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire # # Copyright (C) 2009 Blazingamer ...
codeparrot/github-code-clean
import unittest import numpy import sys import os from osgeo import gdal from raster import Raster from vector import Vector from vector import convert_polygons_to_centroids from projection import Projection from projection import DEFAULT_PROJECTION from core import read_layer from core import write_raster_data from ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Template helpers -------------------------------------------- """ import cgi import os import re imp...
codeparrot/github-code-clean
#!/usr/bin/python from pyepl.locals import * # use the random module to randomize the jitter import random # use shutil to copy instruction text into data dir import shutil import sys import os # use pygame to draw the colored box around stimuli import pygame import pdb # debug #pdb.set_trace() # For EGI/NetStation ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'HeaderOverride.source' db.delete_column(u'source_data_h...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Unit tests for instructor.api methods. """ import datetime import ddt import random import pytz import io import json import requests import shutil import tempfile from urllib import quote from django.conf import settings from django.contrib.auth.models import User from django.core import m...
codeparrot/github-code-clean
# Copyright (C) 2008 The Android Open Source Project # # 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 ...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """Script to manage code reviews.""" from __future__ import print_function import argparse import json import logging import os import random import re import shlex import subprocess import sys import time # pylint: disable=import-error # pylint: disable=no-name-in-module if ...
codeparrot/github-code-clean
# Copyright (c) 2010-2012 OpenStack, 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 agreed to ...
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
#!/usr/bin/env python # # Copyright 2007 Google 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 law o...
codeparrot/github-code-clean