text
stringlengths
17
737k
#!/usr/bin/python import argparse import logging import random import socket import ssl import sys import time parser = argparse.ArgumentParser(description="Slowloris, low bandwidth stress test tool for websites") parser.add_argument('host', nargs="?", help="Host to perform stress test on") parser.add_argument('-p', '...
import json import factory from rest_framework.test import force_authenticate from rest_framework import status from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, AnonymousUser from tests.factories import UserFactory from django.conf import settings from grandchallenge.subdom...
# Copyright 2016 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...
from datetime import datetime from django.conf import settings from nose.tools import eq_ from kitsune.dashboards.readouts import ( UnreviewedReadout, kb_overview_rows, TemplateTranslationsReadout, l10n_overview_rows, MostVisitedDefaultLanguageReadout, MostVisitedTranslationsReadout, UnreadyForLo...
from __future__ import unicode_literals from .fields import ExtraField, SimplePopoloField from .field_mappings import form_simple_fields, form_complex_fields_locations from django.db.models import F # FIXME: handle the extra fields (e.g. cv & program for BF) # FIXME: check all the preserve_fields are dealt with def...
# Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Documentation on PRESUBMIT.py can be found at: # http://www.chromium.org/developers/how-tos/depottools/presubmit-scripts import json import hashl...
# (C) Copyright 2014 Voyager Search # # 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 writi...
import json import logging from django.utils.translation import ugettext as _ from couchdbkit.exceptions import ResourceConflict from django.http import HttpResponse, Http404 from django.shortcuts import render from django.views.decorators.http import require_GET from django.conf import settings from django.contrib im...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from earwigbot.wiki import NS_TEMPLATE __all__ = ["get_attribution_info"] ATTRIB_TEMPLATES = { "enwiki": { "CC-notice", "Cc-notice", "Citation-attribution", "Free-content attribution", "Open-source attribution", "So...
import uuid import json import logging import pika import tornado.ioloop import mist.io.amqp_tornado import mist.io.hub.main import mist.io.config log = logging.getLogger(__name__) class _HubTornadoConsumer(mist.io.amqp_tornado.Consumer): """AMQP consumer used by Tornado-compatible hub client""" def __in...
# -*- coding: utf-8 -*- ''' Test the auth process. ''' from __future__ import absolute_import from __future__ import unicode_literals # Import pythond stdlib import time import logging from multiprocessing import Process # Import third party libs import pytest import nacl.utils import nacl.secret import nacl.signing ...
# Test wcslib wrapper import unittest from tkp.utility import coordinates from tkp.sourcefinder import extract from tkp.utility.uncertain import Uncertain import wcslib # Specify the number of digits you want to include when checking if positions are equal. nod=12 class Sanity(unittest.TestCase): """Some sanity ...
""" ****** Tables ****** Synapse Tables enable storage of tabular data in Synapse in a form that can be queried using a SQL-like query language. A table has a :py:class:`Schema` and holds a set of rows conforming to that schema. A :py:class:`Schema` defines a series of :py:class:`Column` of the following types: STRI...
from Scripts import graphiti from Scripts import nx import re import fnmatch import json import random def vec2_to_str(v): return str(v[0]) + " " + str(v[1]) def vec3_to_str(v): return str(v[0]) + " " + str(v[1]) + " " + str(v[2]) def vec4_to_str(v): return str(v[0]) + " " + str(v[1]) + " " + str(v[2]) + ...
import statsmodels.base.model as base from statsmodels.base import data import statsmodels.base.wrapper as wrap from statsmodels.tsa.base import datetools from numpy import arange, asarray from pandas import Index from pandas import datetools as pandas_datetools import datetime _freqs = ['B','D','W','M','A', 'Q'] _fr...
# Copyright (C) 2015-2020 The Software Heritage developers # See the AUTHORS file at the top-level directory of this distribution # License: GNU Affero General Public License version 3, or any later version # See top-level LICENSE file for more information from collections import defaultdict import functools from fun...
from 臺灣言語工具.翻譯.摩西工具.摩西用戶端 import 摩西用戶端 from 臺灣言語工具.斷詞.中研院工具.官方斷詞剖析工具 import 官方斷詞剖析工具 from 臺灣言語工具.斷詞.中研院工具.斷詞結構化工具 import 斷詞結構化工具 from 臺灣言語工具.字詞組集句章.解析整理.物件譀鏡 import 物件譀鏡 __斷詞工具 = 官方斷詞剖析工具() __斷詞結構化 = 斷詞結構化工具() __譀鏡 = 物件譀鏡() __用戶端 = 摩西用戶端('icorpus.iis.sinica.edu.tw', '80') def 斷詞(語句): 一句一句斷詞 = [] for 原本段 in 語...
from collections import defaultdict import json import logging from django.conf import settings from django.contrib import auth from django.core import exceptions as django_exceptions from django.core.validators import RegexValidator, MaxLengthValidator from django.db import models as django_models, transaction from d...
import os from collections import OrderedDict from django.utils.translation import ugettext_lazy as _ SITE_ID = 1 PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(PROJECT_DIR) SECRET_KEY = 'this is not a very secret key' DEBUG = False ALLOWED_HOSTS = ['localhost'...
"""Testing module for Stack class.""" import pytest @pytest.fixture def graph(): """Return initialized graph.""" from graph_traversal import Graph return Graph() @pytest.fixture def complex_g(graph): graph.add_edge('A', 'B') graph.add_edge('A', 'C') graph.add_edge('B', 'D') graph.add_edg...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Chunyang Guo # # Copyright (C) 2016 Zhihu Inc. from __future__ import absolute_import import json import time import tornado.web import MySQLdb import uuid from sns import wrapper from qiniu import Auth, put_file, etag, urlsafe_base64_encode import qiniu.con...
#! /usr/env/python """ Component that models 2D diffusion using an explicit finite-volume method. Created July 2013 GT Last updated March 2016 DEJH with LL v1.0 component style """ from __future__ import print_function import numpy as np from six.moves import range from landlab import ModelParameterDictionary, Com...
#!/usr/bin/env python3 import RPi.GPIO as GPIO import time import serial as ser import csv import sys pin_REV7 = 11 ## REV7 power pin # power on REV7 def powerOn(): # print("Power on REV7") GPIO.output(pin_REV7, GPIO.LOW) #power off REV7 def powerOff(): # print("Power off REV7") GPIO.outpu...
#!/usr/bin/python import os import sys import pwd import uuid import struct import socket import logging import base64 from M2Crypto import EVP, EC, util logger = logging.getLogger("sock2proc") class ProcInfo(object): sock = -1 # used to find proc info vi proc/etc/net pid = -1 euid = -1 u...
#--------------------------------------------------------------------------------------------------------------- ## Import Statements #--------------------------------------------------------------------------------------------------------------- from __future__ import print_function import sys import os import argpars...
import piglatin import random from interfaces.SentenceOperation import SentenceOperation from tasks.TaskTypes import TaskType class PigLatin(SentenceOperation): tasks = [ TaskType.TEXT_CLASSIFICATION, TaskType.TEXT_TO_TEXT_GENERATION, TaskType.TEXT_TAGGING, ] languages = ["en"] ...
# Copyright (C) 2015 UCSC Computational Genomics Lab # # 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...
#--------------------------------------------------------------------------------------------------------------- ## Import Statements #--------------------------------------------------------------------------------------------------------------- from __future__ import print_function import sys import os import argpars...
# coding: utf-8 from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os, sys import logging # Third-party import numpy as np import astropy.units as u from astropy.utils import isiterable # Project from .prior import LogPrior __all__ = ["ModelPara...
"""PySoundFile is an audio library based on libsndfile, CFFI and NumPy. Sound files can be read or written directly using the functions :func:`read` and :func:`write`. To read a sound file in a block-wise fashion, use :func:`blocks`. Alternatively, sound files can be opened as :class:`SoundFile` objects. For further ...
# Generator class Generator(object): def __init__(self): self._obj = None self._output = 'None' def generate(self, obj): self._obj = obj def __str__(self): if self._obj: return self.generate(self._obj) return "<Generator %s>" % str(self._output) class XmlGenerator...
# -*- coding: utf-8 -*- # Copyright (c) 2008-2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud 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 v...
# # Copyright 2010 Map Of Life # # 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...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2013, Battelle Memorial Institute # 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. Redistri...
# encoding: utf-8 # --------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # --------------------------------------------------------------------------- """...
#!/usr/bin/python from unittest import TestCase from core.utils.dice import Dice, DiceRoller class DiceSidesTests(TestCase): def setUp(self): self.dice = Dice() def test_dice_with_default_side(self): self.assertEquals(self.dice.sides, 4) def test_dice_with_none_sides(self): se...
''' some utils for the test ''' import inspect def get_test_data_path(fname): path = inspect.stack()[0][1].split('repoNoData')[0]+'repo4data/test_data/%s' return path % fname
#!/usr/bin/python """Open Exoplanet Catalog Explorer Ryan Burns rdburns@gmail.com """ import sys from lxml import etree import urllib import gzip import io import time import cmd # TODO # There's something weird with the system name autocomplete try: from enum import Enum except ImportError: print "You need...
import requests import config import json import datetime import urllib import urllib2 import cookielib import logging import socket from ep import EP from opp import OP import sys sys.path.append("../") from gis_token_generator import GIS from get_response import GetResponse #CONFIG VARS start #CONFIG VARS start #name...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module prvoides the tools used to internally run the astropy test suite from the installed astropy. It makes use of the `pytest` testing framework. """ import sys import base64 import zlib import functools import os import subprocess from distu...
import copy import csv import re from datetime import date, datetime, timedelta from functools import reduce from itertools import groupby from math import ceil, floor from django.contrib import messages from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required, user_pass...
"""Implements the Astropy TestRunner which is a thin wrapper around py.test.""" import inspect import os import glob import copy import shlex import sys import tempfile import warnings import importlib from collections import OrderedDict from importlib.util import find_spec from ..config.paths import set_temp_config,...
# -*- coding: utf-8 -*- # Import chosenforms for pretty search forms from chosen import forms as chosenforms # Import the AbstractUser model from django.contrib.auth.models import AbstractUser # Import the basic Django ORM models and forms library from django.db import models from django import forms # Import tags fo...
import rospy import subprocess import threading from lg_common.msg import WindowGeometry XDOTOOL_BIN = '/usr/bin/xdotool' class ManagedWindow(object): def __init__(self, w_name=None, w_class=None, w_instance=None, geometry=None, visible=True): self.w_name = w_name self.w_class = w_class ...
# 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 # Copyright 2014 Kong Luoxing, Copyright 2015 Marc Sibson import datetime from copy import deepcopy ...
from os import remove, environ from os.path import exists, join from datetime import datetime from dateutil.relativedelta import relativedelta from subprocess import CalledProcessError from unittest.mock import patch import re import copy import numpy as np import pytest import pandas as pd import f90nml from pymag...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ IRSA ==== API from http://irsa.ipac.caltech.edu/applications/Gator/GatorAid/irsa/catsearch.html The URL of the IRSA catalog query service, CatQuery, is http://irsa.ipac.caltech.edu/cgi-bin/Gator/nph-query The service accepts the following keywor...
import os import numpy as np from .. import vv from .. import process from ... import common def test_get_vv_dir(): obsdir = vv.get_vv_dir(16504) assert obsdir == os.path.abspath(os.path.join(common.MICA_ARCHIVE, 'vv/16/16504_v01')) def test_get_vv_files(): obsfiles = vv.get_vv_files(16504) assert s...
# pylint: disable=C0103 # pylint: disable=C0111 # pylint: disable=C0301 import argparse import json import sys import os import threading import logging import time import curses from shutil import rmtree from shutil import move from getpass import getpass from time import sleep from uuid import uuid4 from pprint imp...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import os import re import time import logging import threading from hashlib import md5 from datetime import datetime from socket import timeout as socket_timeout from json import JSONDecoder from . import utils, co...
# Package from .... import models as m class Root(object): """Root The main root object for v1 API traversal """ __name__ = None __parent__ = None def __init__(self, request): """Create the default root object :request: The Pyramid request object """ self._...
# -*- coding: UTF-8 -*- ''' Created on 2012-11-10 @author: tianwei ''' #Forms and validation code for user registration. from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from registration.models import RegistrationProfile attrs_dict = {'clas...
#!/usr/bin/env python # # 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, publish, # distribute, subl...
# Copyright 2018 The Bazel 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 law o...
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2015 SF Isle of Man Limited # # PyBossa 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 License, or # (at...
import json import random from copy import deepcopy from django.db.models import Q from atlas.cric.client import CRICClient from atlas.prodtask.models import ActionStaging, ActionDefault, DatasetStaging, StepAction, TTask, JediTasks, HashTag from datetime import timedelta from atlas.prodtask.ddm_api import DDM from ...
#!/usr/bin/env python3 import argparse import librpc def instance(i): print('Instance {0}'.format(i.path)) print('Interfaces:') for name, iface in i.interfaces.items(): interface(name, iface) def interface(name, iface): print(' Interface {0}'.format(name)) print(' Methods:') if...
#!/usr/bin/env python from __future__ import division #from matplotlib.pylab import * from numpy import * import getopt import sys import os import time #import pandas as pd from Cef_tools import CEF_obj def _calc_weights_matrix(mat_size, wid): '''Calculate Weight Matrix Parameters ---------- mat_size...
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
import os import Tkinter as tk import ttk import pafy import re import threading import logging import platform import ConfigParser from settings import YtSettings from tkFileDialog import askdirectory import converter import tkMessageBox logging.basicConfig(level=logging.DEBUG, filename='y2m.log',...
from copy import copy import json from random import choice import re import string from IPython.core.display import display, HTML import pandas as pd import six import semver from .constants import MISSING_VALUE, OPTIONAL_VALUE from ..constants import REACT_CRAFT_AI_DECISION_TREE_VERSION from ..errors import CraftAiE...
#!/usr/bin/env python3 # -*- 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, ...
# Create your views here. from django.http import HttpResponse from registration.models import Team,Participant from django.core import serializers from django.views.decorators.cache import cache_page import simplejson as json @cache_page(60 * 5) def get_teams(request): return_data = serializers.serialize("json", ...
# (c) 2012, Jeroen Hoekx <jeroen@hoekx.be> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
#!/usr/bin/env python3 import pytest from asynctest import CoroutineMock import aiospamc from aiospamc.client import Client @pytest.fixture def mock_client_cls(mocker): client_cls = mocker.patch('aiospamc.Client', autospec=True) yield client_cls @pytest.mark.asyncio async def test_check_default_args_passe...
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable-msg=C0301,W0613,W0612 """ cli.py ====== Desc: Command-line tool for listing Python packages installed by setuptools, package metadata, package dependencies, and querying The Cheese Shop (PyPI) for Python package release information such as w...
#!/usr/bin/env python2 """Prostate segementation.""" from __future__ import absolute_import, division, print_function import argparse import logging import numpy as np from scipy import ndimage import skimage.segmentation import sklearn.preprocessing import dwi.files import dwi.mask import dwi.plot import dwi.util ...
from rest_framework import viewsets from .models import Registro from .serializers import RegistroSerializer class RegistroViewSet(viewsets.ReadOnlyModelViewSet): queryset = Registro.objects.all() serializer_class = RegistroSerializer filter_fields = ('id', 'p', 'a', 'data') def get_queryset(self): ...
#!/usr/bin/env python import os, sys, getopt, re, math, subprocess HOME = os.path.abspath(os.path.dirname(__file__)) sys.path.extend([ os.path.abspath(os.path.join(HOME, '..')) ]) import sniper_lib, sniper_stats, cpistack, level2, level3 # From http://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_main --------- Tests for `cookiecutter.main` module. """ import logging import os import shutil import sys import unittest from cookiecutter import config, main if sys.version_info[:2] < (2, 7): import unittest2 as unittest else: import unittest PY3 =...
# -*- coding: utf-8 -*- """ License Copyright (C) 2016 YUNOHOST.ORG This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) a...
#! /usr/bin/env python __author__ = "Graeme Andrew Stewart, John Hover, Jose Caballero" __copyright__ = "2007,2008,2009,2010 Graeme Andrew Stewart; 2010-2015 John Hover; 2010-2015 Jose Caballero" __credits__ = [] __license__ = "GPL" __version__ = "2.4.2" __maintainer__ = "Jose Caballero" __email__ = "jcaballero@bnl.go...
# -*- coding: iso-8859-1 -*- # # Copyright (C) 2005 Edgewall Software # Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de> # Copyright (C) 2005 Matthew Good <trac@matt-good.net> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distr...
#! /usr/bin/env python __author__ = "Graeme Andrew Stewart, John Hover, Jose Caballero" __copyright__ = "2007,2008,2009,2010 Graeme Andrew Stewart; 2010-2015 John Hover; 2010-2015 Jose Caballero" __credits__ = [] __license__ = "GPL" __version__ = "2.4.2" __maintainer__ = "Jose Caballero" __email__ = "jcaballero@bnl.go...
import datetime import simplejson import random import functools import time from django.db import IntegrityError from django.test import TestCase, LiveServerTestCase from django.http import HttpResponse, Http404 from tracker.models import (Tbluser, TrackingEntry, ...
# TensorFlow Model ! import os import shutil import tensorflow as tf from cell import ConvLSTMCell import sys module_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..") if module_path not in sys.path: sys.path.append(module_path) from datasets.batch_generator import datasets class conv_lstm_model...
from cStringIO import StringIO class BaseExporter(object): "Base class for all exporters" preferred_formats = [] def __init__(self, concepts): self.concepts = concepts self.params = [] for concept in concepts: length = concept.concept_fields.count() self....
#!/usr/bin/env python# Versione 0.3-alpha # Changelog: # *Ora l'app utilizza Tkinter! import json from setDbName import setDbName from deleteBook import deleteBook from setBorrowTime import setBorrowTime from datetime import date, datetime, time, timedelta from Tkinter import * ISBNuse = {} # Dizionario che c...
# -*- coding: utf-8 -*- ## # Copyright 2007-2011 University Of Southern California # # 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 # # Un...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # pylint: disable-msg=C0321 # pylint: max-line-length=120 # pylint: max-module-lines=10000 # See the LICENSE.rst file for licensing information. ''' Bibulous is a drop-in replacement for BibTeX, with the primary advantage that the bibliography template format is compact and...
# Copyright (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type ...
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from scrapy.contrib.spiders import CrawlSpider, Rule from scrapy.selector import Selector from symfony_doc_spider.items import SectionItem class DocSpider(CrawlSpider): def parseLink(value): # only follow links to the current link if ...
# coding: utf-8 from django.db import models from taggit.managers import TaggableManager from taggit.models import TaggedItemBase from . import managers from ..ditto.utils import truncate_string from ..ditto.models import DiffModelMixin, DittoItemModel, TimeStampedModelMixin class Account(TimeStampedModelMixin, mod...
import os, time, sched, requests, json, HTMLParser import urlparse, math, collections, re from flask import * from flask.ext.sqlalchemy import * from BeautifulSoup import BeautifulSoup from adn import * from flask.ext.wtf.html5 import URLField from helpers import * app = Flask(__name__) app.config['SQLALCHEMY_DATAB...
# Copyright 2020. ThingsBoard # # 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 python3 # # yosys -- Yosys Open SYnthesis Suite # # Copyright (C) 2012 Claire Xenia Wolf <claire@yosyshq.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notic...
from django.conf.urls.defaults import patterns, include, url urlpatterns = patterns('django_actions.views', url(r'^action/(?P<app_n_model>[\w\.]+)/$', 'act', name='url_act'), )
# coding: utf-8 # Copyright 2013 The Font Bakery 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 re...
from __future__ import unicode_literals import json import numbers import phonenumbers import pytz import regex import requests import time import urllib2 import xlwt from collections import OrderedDict from datetime import timedelta from decimal import Decimal from django.conf import settings from django.core.files ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- '''Tests for first-level audio feature extraction''' import numpy as np import pytest import jams import pumpp xfail = pytest.mark.xfail @pytest.fixture() def SR(): return 22050 @pytest.fixture() def HOP_LENGTH(): return 512 @pytest.fixture(params=['3', '...
__author__ = 'Sean Yu' '''created @2015/5/27''' import os, sys pardir =os.path.dirname(os.path.realpath(os.getcwd())) #pardir= os.path.sep.join(pardir.split(os.path.sep)[:-1]) sys.path.append(os.path.sep.join([pardir,'lib'])) print('\n'.join(sys.path)) # begin wxGlade: dependencies import gettext import re, string ...
# Copyright 2016-2017 Canonical Ltd. # # This file is part of the Snap layer for Juju. # # 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 # # Unle...
from __future__ import print_function import imp from django.conf import settings from importlib import import_module import logging import sys def get_static_renderers(): module_name = 'renderers' renderers = [] modules_to_check = [] # Hackish: do this in case we have some project top-level # (...
# -*- coding: utf-8 -*- """ Test suite for the util module ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import unittest from pygments import util, console class FakeLexer(object): def anal...
import json import numpy as np import unittest import great_expectations as ge class TestUtilMethods(unittest.TestCase): def __init__(self, *args, **kwargs): super(TestUtilMethods, self).__init__(*args, **kwargs) self.D = ge.read_csv('./tests/test_sets/distributional_expectations_data_base.csv') ...
from twilio import Conference, Dial, Response from django_twilio.decorators import twilio_view @twilio_view def conference(request, name, muted=None, beep=None, start_conference_on_enter=None, end_conference_on_exit=None, wait_url=None, wait_method=None, max_participants=None): """A fully featured conference roo...
from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, Http404, HttpResponseForbidden from exceptions import * class AddRatingView(object): def __call__(self, request, content_type_id, object_id, field_name, score): ...
FUNDING_CHOICES = ( ('Pursuit of Funding', 'Pursuit of Funding'), ('Funding Identified', 'Funding Identified'), ) PROJECT_END_CHOICES = ( ('Be completed', 'Be completed'), ('Require additional funding', 'Require additional funding'), ) CLASSIFICATION_CHOICES = ( ('Prime applicant','Prime applicant')...
from django.db import models from django.conf import settings from django.contrib.auth.models import User from django.db.models.signals import post_save from django.utils.translation import ugettext_lazy as _ from localflavor.us.models import USStateField from tagging import fields, managers from userprofile.m...