src stringlengths 721 1.04M |
|---|
from vsg.token import association_element as token
from vsg.vhdlFile import utils
def detect(iCurrent, lObjects):
'''
association_element ::=
[ formal_part => ] actual_part
An association element will either end in a close parenthesis or a comma that is not within paranthesis.
accociation_... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
import sys
import logging
console = logging.StreamHandler()
logger = logging.getLogger()
logger.addHandler(console)
logger.setLevel(logging.ERROR)
labels = {}
program = []
imm_expr = []
imm_dict = {}
imm_values = []
nr = 0
def _get_value_imm(str):
if str[0] == '#':
if phase == 1:
if not str[... |
# cell_mapping.py gives annotation to the detected cells through registering
# the sample brain to the CUBIC-Atlas.
# Please see the help.txt file for details.
#
# Copyright (C) 2017, Tatsuya C. Murakami
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... |
#!/usr/bin/env python2
# Copyright (c) 2011-2012 PM Development, LLC
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# THE SOFTWARE IS PROVIDED "AS IS" ... |
#!/usr/bin/env python
# encoding: utf-8
'''
create_swap.py
A Python 2 script for creating and removing Linux swap files.
Copyright (C) 2016 Farzan Hajian
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 Foundatio... |
import argparse
import pywikibot
import sys
import codecs
import os
if __name__ == '__main__' and __package__ is None:
from os import sys, path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
import kian.fitness
from kian import TrainedModel
from kian import Kian
def recent_changes_gen(si... |
# -*- encoding: utf-8 -*-
"""Implements Navigator UI."""
from robottelo.ui.base import Base, UIError
from robottelo.ui.locators import menu_locators
class Navigator(Base):
"""Quickly navigate through menus and tabs."""
def menu_click(self, top_menu_locator, sub_menu_locator,
tertiary_menu_... |
import abc
import os
import time
import markupsafe
import requests
from django.db import models
from framework.auth import Auth
from framework.auth.decorators import must_be_logged_in
from framework.exceptions import HTTPError, PermissionsError
from mako.lookup import TemplateLookup
from osf.models.base import BaseMod... |
import numpy as np
def intersect_ray_sphere(p, d, sphereR, sphereC):
""" Intersects ray r = p + td, |d| = 1, with sphere s
Parameters
----------
p : (3,1)
starting point of ray
d : (3,1)
normalized direction vector of ray
sphereR : float
sphere radius
sphereC : ... |
#The following fuction will take the following parameters:
#A HTML page with the island info
#And it will produce:
#A timestamp of when the fuction was executed in Local Time in a form of struct_time
#The type of data produced by the function in a form of a string "fact"
#The yoweb location of the page in a form of a ... |
from voxel_globe.common_tasks import shared_task, VipTask
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
import logging
import os
@shared_task(base=VipTask, bind=True)
def run_build_voxel_model(self, image_collection_id, scene_id, bbox,
skip_frames, cleanup... |
import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.natural_ventilation_and_duct_leakage import AirflowNetworkMultiZoneSurfaceEffectiveLeakageArea
log = logging.getLogger(__name__)
class TestAirflowNetworkMultiZoneSurfaceEffectiv... |
# -*- coding: utf-8 -*-
"""
Modulo del comando list, che serve a visualizzare la lista delle entità
comprabili di un negoziante.
"""
#= IMPORT ======================================================================
from src.color import remove_colors
from src.enums import SHOP, TO
from src.database ... |
from __future__ import unicode_literals
import six
from ..shared.objects import Property
from .operations import CypherExpression, ComparisonExpression, QueryParams
class CypherQuery(list):
def __init__(self, graph_obj, use_full_pattern=False):
self.params = QueryParams()
try:
verb ... |
# coding=utf-8
# Copyright 2021 The Google Research 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 applicab... |
'''
This page is going to go through some more advanced modeling techniques
using forward and self-references
'''
from ommongo.document import Document
from ommongo.fields import *
from datetime import datetime
from pprint import pprint
class Event(Document):
name = StringField()
children = ListField(Docume... |
import unittest
import p4lib
from mock23 import Mock
from test_utils import change_stdout, test_options, test_raw_result
CHANGE_NUM = 1234
USER = "someuser"
CLIENT = "someclient"
DATE = "2014/11/01"
DESCRIPTION = "Some changelist description"
FILE_0 = "//depot/file.cpp"
REV_0 = 3
ACTION_0 = "edit"
FILE_1 = "//depot/f... |
######################################################################################################
# A tool that makes opening/closing window faster and easier #
# Actualy partly uncommented - if you do not understand some parts of the code, #
# please se... |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
# Copyright 2017 Bracket Computing, 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.
# A copy of the License is located at
#
# https://github.com/brkt/brkt-cli/blob/master/LICENSE
#
# or in the "license" file... |
# -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""
Rope introspection plugin
"""
import time
import imp
from spyder.config.base import get_conf_path, STDERR
from spyder.utils import encoding, progr... |
# vim: set fileencoding=utf-8 :
from .. import context
import os
import unittest
import gbp.deb.git
class DebianGitTestRepo(unittest.TestCase):
"""Scratch repo for a single unit test"""
def setUp(self, repo_cls=None):
name = 'test_repo'
self.tmpdir = context.new_tmpdir(__name__)
i... |
import os
import platform
from retriever.lib.models import Engine, no_cleanup
from retriever import DATA_DIR
class engine(Engine):
"""Engine instance for SQLite."""
name = "SQLite"
abbreviation = "sqlite"
datatypes = {
"auto": "INTEGER",
"int": "INTEGER",
... |
import os
import requests
from jinja2 import Environment
from jinja2 import FileSystemLoader
def launch_terminator_job(logger, config, job_id):
# Do this stuff to load jinja templates
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
j2_env = Environment(loader=FileSystemLoader(THIS_DIR),
... |
# -*- coding: utf-8 -*-
import ctypes
from cpylmnl.nlstruct import NLStructure
import cpylmnl.linux.netlinkh as netlink
GENL_NAMSIZ = 16 # length of family name
GENL_MIN_ID = netlink.NLMSG_MIN_TYPE
GENL_MAX_ID = 1023
class Genlmsghdr(NLStructure):
"""struct genlmsghdr
"""
_fields_ = [("cmd", ctypes.... |
import os
import sys
import transaction
import json
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from pyramid.scripts.common import parse_vars
from pylistener.models.meta import Base
from pylistener.models import (
get_engine,
get_session_factory,
get_tm_session,
)
from ... |
import csv
from urllib.request import Request, urlopen
import re
from datetime import date
import dateutil.parser
from sys import argv
from bs4 import BeautifulSoup
from dateutil.relativedelta import relativedelta
from os import system
import scrape_util
default_sale, base_url, prefix = scrape_util.get_market(argv)
t... |
# coding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import hashlib
import hmac
from requests.utils import to_native_string
import time
from requests.auth import AuthBase
class HMACAuth(AuthBase):
def... |
from os import path
from enigma import iPlayableService, iServiceInformation, eTimer, eServiceCenter, eServiceReference, eDVBDB
from Screens.Screen import Screen
from Screens.ChannelSelection import FLAG_IS_DEDICATED_3D
from Components.About import about
from Components.SystemInfo import SystemInfo
from Components.Co... |
def main(j, args, params, tags, tasklet):
page = args.page
page.addCSS("/jslib/bootstrap/css/bootstrap-3-3-1.min.css")
page.addCSS("/jslib/old/bootstrap/css/bootstrap-responsive.css")
page.addCSS("/jslib/flatui/css/flat-ui.css")
page.addCSS("/jslib/font-awesome/css/font-awesome.min.css")
page.ad... |
# Localization classes and functions
#
# Copyright (C) 2012-2013 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program i... |
from __future__ import absolute_import
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse
from django.http import HttpRequest, Http404
from django.test import TestCase
from django.utils.encoding import force_str
from rules.contrib.views import objectgetter
from testa... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2017 Ary Pablo Batista <arypbatista@gmail.com>, Pablo Barenbaum <foones@gmail.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... |
# !/usr/bin/python
# -*- coding: utf-8 -*-
'''
Created on 2013-9-2
@author: plex
'''
from ReadWeibo.mainapp.models import Weibo
from ReadWeibo.account.models import Account
from djangodb.WeiboDao import WeiboDao
from datetime import datetime
from sets import Set
import numpy as np
import re
import jieba
jieba.load_u... |
## begin license ##
#
# "Meresco Examples" is a project demonstrating some of the
# features of various components of the "Meresco Suite".
# Also see http://meresco.org.
#
# Copyright (C) 2007-2008 SURF Foundation. http://www.surf.nl
# Copyright (C) 2007-2010 Seek You Too (CQ2) http://www.cq2.nl
# Copyright (C) 2007... |
# -*- coding: utf_8 -*-
"""iOS View Source."""
import io
import json
import logging
import ntpath
import os
from pathlib import Path
import biplist
from django.conf import settings
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.utils.html import escape
from mobsf.MobSF.f... |
# NOTE: More than 256GB CPU memory required to run this script.
# Use `--low-memory` to reduce memory consumption by using half-precision
import os.path as osp
import time
import argparse
import torch
import torch.nn.functional as F
from torch_sparse import SparseTensor
from torch_geometric.nn import LabelPropa... |
from typing import Any, Generator, List, Tuple
import sqlparse
from .keywords import ROOT_KEYWORDS
class Token:
def __init__(self, token: sqlparse.sql.Token, row: int, col: int, depth: int) -> None:
self._token = token
self.row = row
self.col = col
self.depth = depth
@prope... |
import copy
import os
from pathlib import Path
import pdb
import pytest
import shutil
import yaml
import payu
import payu.models.test
from .common import cd, make_random_file, get_manifests
from .common import tmpdir, ctrldir, labdir, workdir
from .common import sweep_work, payu_init, payu_setup
from .common import c... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '0... |
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from collections import OrderedDict
import ... |
# Copyright 2016 Joel Dunham
#
# 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 uuid
from io import StringIO
from flask import Flask
from abilian.core.models.blob import Blob
from abilian.core.sqlalchemy import SQLAlchemy
from abilian.services import repository_service as repository
from abilian.services import session_repository_service as session_repository
#
# Unit tests
#
def... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
# -*- coding: utf-8 -*-
import pytest
import ruamel.yaml
from translate.storage import base, test_monolingual, yaml
class TestYAMLResourceUnit(test_monolingual.TestMonolingualUnit):
UnitClass = yaml.YAMLUnit
def test_getlocations(self):
unit = self.UnitClass("teststring")
unit.setid('some-... |
import copy
from nive.utils.dataPool2.mysql.tests import test_MySql
try:
from nive.utils.dataPool2.mysql.mySqlPool import *
except:
pass
from . import test_db
from nive.utils.dataPool2.sqlite.sqlite3Pool import *
def create_mysql(n):
pool = MySql(test_MySql.conf)
pool.SetStdMeta(copy.copy(test_MyS... |
from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer
from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle
from heppy_fcc.particles.cms.particle import Particle
import math
class CMSReader(Analyzer):
def declareHandles(self):
super(CMSReader, self).declareHandles()
s... |
# 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... |
# 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... |
#---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------... |
from django.db import models
import datetime
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
class Category(models.Model):
name = models.CharField(max_length=100)
slug = models.SlugField(max_length=100, unique=True, verbose_name='slug')
description = models.T... |
# Copyright (C) 2012-2014 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# propagated, or dist... |
from urllib2 import urlopen
from xml.dom import minidom
from collections import defaultdict
import threading
import logging
from django.utils.translation import ugettext_lazy as _
from molly.apps.places.providers import BaseMapsProvider
logger = logging.getLogger(__name__)
class TubeRealtimeProvider(BaseMapsProvide... |
import gourmet.convert as convert
import gtk
from gourmet.gglobals import *
from gourmet.gdebug import *
from gourmet.gtk_extras.cb_extras import *
import gourmet.GourmetRecipeManager
from gettext import gettext as _
import os
try:
current_path = os.path.split(os.path.join(os.getcwd(),__file__))[0]
except:
cur... |
# Copyright Collab 2012-2016
# See LICENSE for details.
"""
Tasks.
"""
from __future__ import unicode_literals
from celery import Task
from celery.utils.log import get_task_logger
from encode.models import MediaBase
from encode.util import fqn, short_path
from encode import EncodeError, UploadError
from encode.enco... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cms', '0003_auto_20140926_2347'),
]
operations = [
migrations.CreateModel(
name='ArticlesPlugin',
fi... |
import pytest
from astropy.tests.helper import assert_quantity_allclose
from astropy import units as u
from astropy.time import Time
from poliastro.bodies import Earth, Sun
from poliastro.twobody import Orbit
from poliastro.twobody.propagation import kepler, mean_motion, cowell
import numpy as np
from poliastro.util... |
from xml.etree import ElementTree
from exception import WCSException
from json import loads
from psycopg2 import connect
import abc
class WCSBase(object):
__metaclass__ = abc.ABCMeta
geo_arrays = None
def __init__(self, db_path="config/db.config.json", meta="config/geo_arrays.json"):
super(WCSBa... |
"""
Django settings for NetControl project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build p... |
import json
import math
import re
import struct
import sys
from peewee import *
from peewee import ColumnBase
from peewee import EnclosedNodeList
from peewee import Entity
from peewee import Expression
from peewee import Node
from peewee import NodeList
from peewee import OP
from peewee import VirtualField
from peewee... |
from django.views.generic import ListView, TemplateView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.forms.models import modelform_factory
from django.core.urlresolvers import reverse_lazy
from django.shortcuts import render
fro... |
"""
Geometric utility functions for 3D geometry.
"""
import numpy as np
from scipy.spatial.distance import cdist
def unit_vector(vector: np.ndarray) -> np.ndarray:
""" Returns the unit vector of the vector.
Parameters
----------
vector: np.ndarray
A numpy array of shape `(3,)`, where `3` is (x,y,z).
... |
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# Copyright (c) 2014 Kevin B. Hendricks, John Schember, and Doug Massay
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following ... |
#Converts a txt file containing a list of notes into an image
#with the corresponding fingering images
#Inputs: txt file name
from PIL import Image
import math
import sys
#Definitions
iHeigth = 300
iWidth = 150
iGridWidth = 8.0 #items
i = 0 #counts the current note index
#Open fingering images
si0 = Image.open("Note... |
# -*- coding: utf-8 -*-
#
# satcfe/tests/test_configurarinterfacederede.py
#
# Copyright 2019 Base4 Sistemas Ltda ME
#
# 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.... |
"""
Module rendering
"""
import hashlib
import json
import logging
import textwrap
from collections import OrderedDict
from functools import partial
import six
from completion import waffle as completion_waffle
from completion.models import BlockCompletion
from django.conf import settings
from django.contrib.auth.mo... |
import os
import requests # pip install requests
# Please NOTE: In this sample we're assuming Cloud Api Server is hosted at "https://localhost".
# If it's not then please replace this with with your hosting url.
# Base URL for PDF.co Web API requests
BASE_URL = "https://localhost"
# Source PDF file
SourceFile = ".\... |
# -*- coding: utf-8 -*-
# Copyright 2011 Takeshi KOMIYA
#
# 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... |
# -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import re
from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
FK_HEAD_LIST = ['FK', 'KD_JENIS_TRANSAKSI', 'FG_PENGGANTI', 'NOMOR_FAKTUR', 'MASA_PAJAK', 'TAHUN_P... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import logging
import geojson
from django.contrib.gis.geos import GEOSGeometry
from django.http import HttpResponse
from geojson import Feature, FeatureCollection, Point
from rest_framework import viewsets
from rest_framework.decorators import api_view
from re... |
"""This is a shard that works off a fixed set of values. The shard_field
configuration property should be set to an incoming message property that
can be used to select a shard. Each node's definition should have a property
called shard_field_value. This is used to build a mapping from vlaues of
the shard_field to node... |
[
{
"name": "youkujson",
"find": "https?:\/\/val[fcopb]\.atm\.youku\.com\/v[fcopb]",
"replace": "about:blank",
"extra": "adkillrule"
},
{
"name": "youkuloader",
"find": "https?:\/\/static\.youku\.com(\/v[\d\.]*)?\/v\/swf\/.*\/loaders?\.swf",
"exfind": ... |
from textwrap import dedent
import warnings
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from ._core import (
VectorPlotter,
)
from .utils import (
ci_to_errsize,
locator_to_legend_entries,
ci as ci_func
)
from .algorithms import bootstrap
from .axisg... |
from __future__ import unicode_literals
from django.db import models
from django.conf import settings
from oauth2_provider.models import Application as ApplicationModel, AccessToken as AccessTokenModel
from pfc.users.models import Company, User
class ApplicationConfig(models.Model):
id = models.AutoField(primar... |
# Copyright 2010-2011 OpenStack Foundation
# Copyright 2012-2013 IBM Corp.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/li... |
# pylint: disable=missing-docstring
from lettuce import world
import time
import json
import re
import platform
# django_url is assigned late in the process of loading lettuce,
# so we import this as a module, and then read django_url from
# it to get the correct value
import lettuce.django
from textwrap import de... |
#!/usr/bin/env python
"""Parse a log file and submit last values
Parse a specified log file looking the most recent data being inserted to the
'NOVA_LASTDATA_T' table and submit this over http. MAX_BYTES is used to
limit the volume of data that is read from the log file into memory.
"""
# beware this is horrible ha... |
# -*- coding: utf-8 -*-
#
# Copyright 2016-2021 BigML
#
# 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 ... |
# encoding: utf-8
'''This is a collection of helper functions for use in tests.
We want to avoid sharing test helper functions between test modules as
much as possible, and we definitely don't want to share test fixtures between
test modules, or to introduce a complex hierarchy of test class subclasses,
etc.
We want... |
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 Lice... |
# Copyright 2009-2013 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the following
# conditions are met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of conditions ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy
from abc import ABCMeta, abstractmethod
from geometry_msgs.msg import Twist
from kobuki_msgs.msg import BumperEvent
from gazebo_msgs.msg import ModelStates
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import cv2
class Abstr... |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""CSL Citation Formatter serializer for records."""
from __future__ import absolute... |
import os
import sys
import copy
import struct
import ctypes
import threading
import itertools
import pkg_resources
import logging
from ..sim_options import UNICORN_HANDLE_TRANSMIT_SYSCALL
l = logging.getLogger("angr.state_plugins.unicorn_engine")
try:
import unicorn
except ImportError:
l.warning("Unicorn i... |
#############################################################################
# #
# This file is part of Verificarlo. #
# #
# Copyr... |
#!/bin/python
world_name = 'SmoWorld'
worlds[world_name] = '/home/pfsmorigo/.minecraft/saves/'+world_name
outputdir = '/mnt/disk/beirut/minecraft/overviewer/'+world_name
rendermode = "smooth_lighting"
MC_IDS = {
0: "air",
1: "stone",
2: "grass",
3: "dirt",
4: "cobblestone",
5: "planks",
6... |
#!/usr/bin/env python
## $Id: document.py,v 1.2 2003/07/27 13:54:05 euske Exp $
##
## document.py - Document analyzer (HTML/TeX/PlainText)
##
import re, sys
from texparser import TexParser, TexTokenizer
from sgmllib_rev import SGMLParser
from abstfilter import AbstractFeeder, AbstractFilter, AbstractConsumer
clas... |
#!/usr/bin/python3
import time, posix, daily, gnuplot, linear, sys, datetime
from dailyFilters import *
from monthName import monthName
START_MONTH=7
START_DAY=1
END_MONTH=7
END_DAY=1
def START_DATE(year):
return datetime.date(year,START_MONTH,START_DAY)
def END_DATE(year):
return datetime.date(year+1,END_MO... |
import sys
import imp
import os
import unittest
from test import support
test_src = """\
def get_name():
return __name__
def get_file():
return __file__
"""
absimp = "import sub\n"
relimp = "from . import sub\n"
deeprelimp = "from .... import sub\n"
futimp = "from __future__ import absolute_import\n"
reload... |
import unittest
from datetime import timedelta
from streamsx.topology.topology import *
from streamsx.topology import schema
from streamsx.topology.tester import Tester
import streamsx.spl.op as op
import streamsx.spl.toolkit
from streamsx.topology.context import ConfigParams
import spl_tests_utils as stu
# Test che... |
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
import numpy as np
import sys
import astropy.io.fits as afits
import collections
import tdose_utilities as tu
import tdose_extract_spectra as tes
import tdose_build_mock_cube as tbmc
import pdb
import scipy.ndi... |
from unittest import skip
from django.contrib.gis.geos import Point
from django.test import RequestFactory, TestCase
from api.country import serializers
from geodata.factory import geodata_factory
class TestCountrySerializers(TestCase):
request_dummy = RequestFactory().get('/')
@skip
def test_CountrySe... |
from game.table import Table
from mahjong.constants import EAST, NORTH, SOUTH, WEST
from utils.decisions_logger import MeldPrint
from utils.test_helpers import make_meld, string_to_136_array
def test_can_call_riichi_and_tempai():
table = Table()
player = table.player
player.in_tempai = False
player.i... |
import json
import sys
from pprint import pprint
from ete3 import Tree, TreeStyle, TextFace
from PIL import Image, ImageDraw
def parseTree(root):
tree = Tree()
tree.name = root['Name']
tree.add_face(TextFace(root['Split'], fgcolor="red"), column=0, position="branch-bottom")
if root['Children']:
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Tristan Fischer (sphere@dersphere.de)
#
# 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 ... |
"""Test cases for the limits extension."""
from django.urls import reverse
from modoboa.admin import factories as admin_factories
from modoboa.admin.models import Domain
from modoboa.core import factories as core_factories
from modoboa.core.models import User
from modoboa.lib import tests as lib_tests
from .. import ... |
# coding=utf-8
# Copyright 2021 The Deeplab2 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 ... |
import datetime
import pytest
from django.core.management import call_command
from django.contrib.auth import get_user_model
from erudit.models import Organisation
from erudit.test.factories import OrganisationFactory
from core.accounts.models import LegacyAccountProfile
from core.subscription.models import (
Jou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.