text
stringlengths
475
200k
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Paul Durivage <[EMAIL]>, and others # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the L...
# Copyright (C) 2012 Alex Nitz # 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. # # This program is distributed in the h...
# Copyright 2021 The Magenta 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 ...
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
# -*- coding: utf-8 -*- # # 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...
# Copyright 2013 IBM Corp. # 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/LIC...
#!/usr/bin/env python3 import requests import sys def get_all(): page_num = 1 price_data = '' while True: req = requests.get("http://coinbase.com/api/v1/prices/historical?page="+str(page_num)) if req.status_code == 200: price_data += '\n' + req.text else: pr...
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Implementation of the Metadata for Python packages PEPs. Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental). """ from __future__ import unicode_literals import codecs from email...
from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin from import_export.admin import ImportExportActionModelAdmin from gda.models import Questionnaire, Question, Choice, Answer ## Questionnaires # Class to import and export Questionnaire class Qu...
from django.contrib.staticfiles.testing import StaticLiveServerTestCase from selenium import webdriver from django.contrib.auth.models import User class TestLogin(StaticLiveServerTestCase): def setUp(self): self.username = 'alice' self.email = '[EMAIL]' self.password = 'test' User.o...
# This file provides common utility functions for the test suite. from clang.cindex import Cursor from clang.cindex import TranslationUnit def get_tu(source, lang='c', all_warnings=False, flags=[]): """Obtain a translation unit from source and language. By default, the translation unit is created from source...
## This file was taken from PyFlag http://www.pyflag.net/ # Michael Cohen <[EMAIL]> # David Collett <[EMAIL]> # # ****************************************************** # Version: FLAG $Version: 0.87-pre1 Date: Thu Jun 12 00:48:38 EST 2008$ # ****************************************************** # # * This program is...
# -*- coding: utf-8 -*- """ Separate module to handle vocabulary expansions. The L{cache} module takes care of caching vocabulary graphs; the L{process} module takes care of the expansion itself. @organization: U{World Wide Web Consortium<http://www.w3.org>} @author: U{Ivan Herman<a href="http://www.w3.org/People/Ivan...
# encoding: 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 survey_user in orm['survey.SurveyUser'].objects.all(): assert survey_user.user.count() <= 1, survey_user.global...
# Copyright (C) 2003 Python Software Foundation import unittest import plistlib import os import datetime from test import support # This test data was generated through Cocoa's NSDictionary class TESTDATA = b"""<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" \ "http://www...
# 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 http://mozilla.org/MPL/2.0/. import os import shutil import sys import tempfile import types import uuid from collections import defaultdict from mo...
from collections import defaultdict from datetime import timedelta from sqlalchemy import func from sqlalchemy.orm import load_only from ichnaea.models import ( ApiKey, OCIDCell, ) from ichnaea import util class ApiKeyLimits(object): def __init__(self, task, session): self.task = task s...
# -*- coding: utf-8; -*- # Copyright (C) 2009 Østfold University College # # This file is part of ANDP. # # ANDP 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 you...
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software withou...
from django.contrib.auth.backends import ModelBackend from ..utils import get_user_model from .utils import filter_users_by_email from .app_settings import AuthenticationMethod from . import app_settings class AuthenticationBackend(ModelBackend): def authenticate(self, **credentials): ret = None ...
''' Name: Sebastian Lloret Recitation TA: Brennan Mcconnell Assignment #: 8 ''' # Used to properly break the file into rows import csv def CreateDictionary(fileName): slangDictionary = {} # With just ensures a resource is cleaned even if exceptions are thrown. # I had to use "rU" for universal n...
# Copyright 2011 OpenStack Foundation # Copyright 2011 Grid Dynamics # Copyright 2011 Eldar Nugaev, Kirill Shileev, Ilya Alekseyev # # 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 # #...
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView, RedirectView from django.conf import settings #from django.views.generic.simple import redirect_to, direct_to_template from django.shortcuts import render,redirect urlpatterns = patterns('core.views.main_views', url(...
"""This file contains the default (English) substitutions for the PyAIML kernel. These substitutions may be overridden by using the Kernel.loadSubs(filename) method. The filename specified should refer to a Windows-style INI file with the following format: # lines that start with '#' are comments # The 'gen...
#!/usr/bin/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 or a...
""" Certificate end-points used by the student support UI. See lms/djangoapps/support for more details. """ import logging from functools import wraps from django.http import ( HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, HttpResponseServerError ) from django.views.decorators.http imp...
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
#---------------------------------------------------------------------- # Copyright (c) 2011-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
import cvxopt import cvxpy.problems.problem as problem import cvxpy.settings as s from boolean import Boolean def branch(booleans): bool_vals = (b for b in booleans if not b.fix_values) # pick *a* boolean variable to branch on # choose the most ambivalent one (smallest distance to 0.5) # NOTE: if there...
#!/usr/bin/python # # Urwid keyboard input test app # Copyright (C) 2004-2009 Ian Ward # # 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 Licens...
""" This file contains tasks that are designed to perform background operations on the running state of a course. At present, these tasks all operate on StudentModule objects in one way or another, so they share a visitor architecture. Each task defines an "update function" that takes a module_descriptor, a particula...
# Copyright 2016 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 ...
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2018 (ita) """ C# support. A simple example:: def configure(conf): conf.load('cs') def build(bld): bld(features='cs', source='main.cs', gen='foo') Note that the configuration may compile C# snippets:: FRAG = ''' namespace Moo { public class Test ...
# # 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 us...
# Copyright 2001-2004 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <[EMAIL]>, and others # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) str = type('') import warnings import pigpio import os from . import Pin from .data import pi_info from ..exc import ( PinInvalidFunction, PinSetInput, PinFixedPull, PinInvalidPull, PinInval...
""" Copyright 2017 Nicholas Moehle This file is part of CVXPY-CODEGEN. CVXPY-CODEGEN 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. CVXPY...
import unittest, time, sys sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_glm, h2o_hosts, h2o_import as h2i, h2o_util class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): global localhost localhost = h2o.dec...
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <[EMAIL]> # # Copyright 2012 Zearin <[EMAIL]> #...
""" Python 'mbcs' Codec for Windows Cloned by Mark Hammond ([EMAIL]) from ascii.py, which was written by Marc-Andre Lemburg ([EMAIL]). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ # Import them explicitly to cause an ImportError # on non-Windows systems from codecs import mbcs_encode, mbcs_decode # for...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Ansible, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'core'} DOCUMENTATIO...
# Utility functions for git # # Copyright (C) 2008 Owen Taylor # Copyright (C) 2009 Red Hat, 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 you...
# 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...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 (<http://www.erpsystems.ro>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under the...
# Copyright 2016 Nathan Sommer and Ben Coleman # # 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. # # This program is dis...
import copy import os import sys from importlib import import_module from django.utils import six def import_string(dotted_path): """ Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed. """ try: module...
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import re import socket import struct import warnings from . import __vers...
import numpy as np import copy from random import randrange """ We will check across the diagonal top left to bottom right, This will allow us to check all possible solutions for a win """ def threecheck(board): win=False #Top Left if board[0]!=0: #Row T-L to T-R ...
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: win_linein...
from flask import jsonify, request, g, abort, url_for, current_app from .. import db from ..models import Post, Permission from . import api from .decorators import permission_required from .errors import forbidden @api.route('/posts/') def get_posts(): page = request.args.get('page', 1, type=int) pagination =...
# -*- coding: utf-8 -*- """ *************************************************************************** HypsometricCurves.py --------------------- Date : November 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com ******...
import copy import docker import pytest from ..helpers import force_leave_swarm, requires_api_version from .base import BaseAPIIntegrationTest class SwarmTest(BaseAPIIntegrationTest): def setUp(self): super(SwarmTest, self).setUp() force_leave_swarm(self.client) self._unlock_key = None ...
import unittest import json import re from base64 import b64encode from flask import url_for from app import create_app, db from app.models import User, Role, Post, Comment class APITestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.app_context = self.app.app_conte...
#! /usr/bin/env python # Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) # # This file is part of Olena. # # Olena 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, version 2 of the License....
import django.contrib.admin.models from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('contenttypes', '__first__'), ] operations = [ migratio...
# Copyright 2014 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. import logging import time import unittest from telemetry import decorators from telemetry.internal.platform.power_monitor import msr_power_monitor from tel...
""" HTML Widget classes """ import copy import datetime import re from itertools import chain from django.conf import settings from django.forms.utils import to_current_timezone from django.templatetags.static import static from django.utils import datetime_safe, formats from django.utils.dates import MONTHS from dja...
from django.db import connection, transaction from django.db.models import signals, get_model from django.db.models.fields import AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist from django.db.models.related import RelatedObject from django.db.models.query import Query...
""" Synchronization primitives: - reader-writer lock (preference to writers) (Contributed to Django by [EMAIL]) """ try: import threading except ImportError: import dummy_threading as threading class RWLock: """ Classic implementation of reader-writer lock with preference to writers. Reader...
#!/usr/bin/env python # Copyright (c) 2012, Marco Vito Moscaritolo <[EMAIL]> # Copyright (c) 2013, Jesse Keating <[EMAIL]> # Copyright (c) 2015, Hewlett-Packard Development Company, L.P. # Copyright (c) 2016, Rackspace Australia # # This module is free software: you can redistribute it and/or modify # it under the ter...
# Copyright 2013 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. import os import verifier class FileVerifier(verifier.Verifier): """Verifies that the current files match the expectation dictionaries.""" def _Verif...
# -*- coding: utf-8 -*- # This code is part of Amoco # Copyright (C) 2013 Axel Tillequin ([EMAIL]) # published under GPLv2 license from amoco.logger import Log logger = Log(__name__) from .env64 import * from .utils import * from amoco.cas.utils import * def i_ADC(i,fmap): fmap[pc] = fmap[pc]+i.length op1,o...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_parse_qs from ..utils import ( int_or_none, parse_duration, parse_iso8601, xpath_text, ) class FolketingetIE(InfoExtractor): IE_DESC = 'Folketinget (ft.dk; Danish parliame...
# -*- 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): # Adding model 'Folder' db.create_table(u'rss_folder', ( (u'i...
from __future__ import absolute_import, division, unicode_literals from xml.dom import minidom, Node import weakref from . import _base from .. import constants from ..constants import namespaces from ..utils import moduleFactoryFactory def getDomBuilder(DomImplementation): Dom = DomImplementation class A...
# Copyright (C) 2006-2007 Owen Williams. # Copyright (C) 2006-2008 Red Hat, 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 3 of the License, or # (at your option) any late...
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-03-23 20:34 from __future__ import unicode_literals from django.db import migrations, models import osf.models.base import osf.utils.datetime_aware_jsonfield class Migration(migrations.Migration): initial = True dependencies = [ ] operation...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
""" Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363) imports from itertools are fixed in fix_itertools_import.py If itertools is imported as something else (ie: import itertools as it; it.izip(spam, eggs)) method calls w...
""" Schema differencing support. """ import logging import sqlalchemy from sqlalchemy.types import Float log = logging.getLogger(__name__) def getDiffOfModelAgainstDatabase(metadata, engine, excludeTables=None): """ Return differences of model against database. :return: object which will evaluate to...
# -*- 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...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Therp BV (<http://therp.nl>) # All Rights Reserved # # This program is free software: you can redistribute it and/or modify #...
# -*- 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...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
# -*- coding: utf-8 -*- """ blinkpy is an unofficial api for the Blink security camera system. repo url: https://github.com/fronzbot/blinkpy Original protocol hacking by MattTW : https://github.com/MattTW/BlinkMonitorProtocol Published under the MIT license - See LICENSE file for more details. "Blink Wire-Free HS Ho...
from gourmet.plugin import ImporterPlugin from gourmet.importers.importer import Tester from gourmet.threadManager import get_thread_manager from gourmet.importers.interactive_importer import InteractiveImporter from gourmet import check_encodings import os.path import fnmatch from gettext import gettext as _ MAX_PLAI...
from django.db import models from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.core.exceptions import ValidationError from django.utils.html import strip_tags import json from xmodule_django.models import CourseKeyField class Note(models.Model): user = models.Fo...
# 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. from telemetry.core import util from telemetry.page.actions import click_element from telemetry.page.actions import wait from telemetry.unittest import t...
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
# -*- coding: utf-8 -*- ''' This file can be placed in the simulations directory of a neuroConstruct project and when run it will search in all subdirectories for time.dat, and if it doesn't find it, will try running pullsim.sh, which will attempt to retrieve the saved data from a remotely executed simulation ''' im...
"""Adds xref targets to the top of files.""" import sys import os testing = False DONT_TOUCH = ( './index.txt', ) def target_name(fn): if fn.endswith('.txt'): fn = fn[:-4] return '_' + fn.lstrip('./').replace('/', '-') def process_file(fn, lines): lines.insert(0, '\n') lines...
from __future__ import unicode_literals import sys from django.utils import six from django.utils.encoding import force_str from django.utils.six.moves import http_cookies # Some versions of Python 2.7 and later won't need this encoding bug fix: _cookie_encodes_correctly = http_cookies.SimpleCookie().value_encode(';...
# -*- coding: utf-8 -*- # vim:set et sts=4 sw=4: # # libpinyin - Library to deal with pinyin. # # Copyright (c) 2007-2008 Peng Huang <[EMAIL]> # Copyright (C) 2011 Peng Wu <[EMAIL]> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Testing utilities. Not part of the public API!""" from astropy.wcs import WCS from astropy.wcs.wcsapi import BaseHighLevelWCS def assert_wcs_seem_equal(wcs1, wcs2): """Just checks a few attributes to make sure wcs instances seem to be equal. ...
from . import models, serializers, utils from datetime import datetime, timedelta from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status, permissions class Process(APIView): """ These apis are for general purpose """ def get(self, re...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
#!/usr/bin/env python # Copyright 2009 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...
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software withou...
#!/usr/bin/env python # # Performs a release of Review Board. This can only be run by the core # developers with release permissions. # import os import re import subprocess import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..")) from reviewboard import get_package_version, VERSION PY_VER...
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests text-emphasis-line-height-001 ~ 004 except 001z. They test the line height expansion in different directions. This script outputs a list of all tests it generated in the format of Mozilla reftest.list to the stdout. """ from __future__ ...
# coding: utf-8 import datetime from django.core.management.base import BaseCommand from registration.models import RegistrationProfile from stats.models import ValueStore class Command(BaseCommand): help = 'creates bulk shifts from existing data' args = "" option_list = BaseCommand.option_list d...
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function import sys from operator import itemgetter import first import thinkstats2 de...
# -*- coding: utf-8 -*- from django.conf import settings from django.test import TestCase from tastypie.exceptions import BadRequest from tastypie.paginator import Paginator from core.models import Note from core.tests.resources import NoteResource from django.db import reset_queries from django.http import QueryDict ...
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # Derived from source in PyFlag developed by: # Copyright 2004: Commonwealth of Australia. # Michael Cohen <[EMAIL]> # David Collett <[EMAIL]> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it ...
"""Geary Unittest.""" import unittest from ... import open as popen from ... import examples from .. import geary import numpy as np from ...common import pandas PANDAS_EXTINCT = pandas is None class Geary_Tester(unittest.TestCase): """Geary class for unit tests.""" def setUp(self): self.w = popen(ex...