src stringlengths 721 1.04M |
|---|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
from hwt.interfaces.std import Handshaked
from hwt.interfaces.utils import addClkRstn
from hwt.simulator.simTestCase import SimTestCase
from hwtLib.handshaked.joinPrioritized import HsJoinPrioritized
from hwtSimApi.constants import CLK_PERIOD
class HsJo... |
# pyOCD debugger
# Copyright (c) 2006-2015 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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... |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... |
from .base import Component, System
from .utils.misc import Vector
from .utils.window import CloseEvent, Keyboard, KeyEvent
class Action:
attack = 0
defend = 1
class Input(System):
update_loop = 'variable'
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.input = self.e... |
# encoding: utf-8
'''
Created on 29 mai 2015
@author: Bertrand Verdu
'''
from __future__ import print_function
import os
from kivy.clock import Clock
from kivy.core.window import Window
# from kivy.graphics.transformation import Matrix
from kivy.loader import Loader
from kivy.metrics import dp
from kivy.properties... |
# Django settings for CourseDeadlines project.
import os
settings_dir = os.path.dirname(__file__)
project_dir = os.path.join(os.path.split(os.path.realpath(__file__))[0], os.path.pardir)
DEBUG = True
TASTYPIE_FULL_DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS... |
##########################################################
# Right now this script is only configured to index QP #
# files according to their Q20 and Q30 multipole values, #
# so if you were to probe, say, the Q22 direction, this #
# script would create a lot of files with redundant #
# (indistinguishable) fil... |
# -*- coding: utf-8 -*-
"""
A useful subclass of logger for more fine-grained messaging.
"""
import logging
import weakref
__all__ = ['KeywordMessageFilter']
class Logger(logging.getLoggerClass()):
"""A basic subclass of logger with some useful items."""
def getChild(self, suffix):
"""Get a chil... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
from r... |
# Copyright 2016 Intel Corp.
#
# 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 agr... |
# -*- 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):
# Flag to indicate if this migration is too risky
# to run online and needs to be coordinated for offline
... |
import datetime
from datetime import timedelta as td
import pymongo as pymongo
from pymongo import MongoClient
from movingavg import compute_moving_averages
import math
import sys
# Constants.
MAX_ARTICLES = 250
WINDOW_SIZE = 3 # hours
# --------------------------------------------------
# Connect with the remote Mo... |
# -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------
# Freevo image viewer
# -----------------------------------------------------------------------
# $Id: $
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework... |
#!/usr/bin/env python
# encoding: utf-8
"""
Control All Arduino Functions
"""
from pymata_aio.pymata3 import PyMata3
from pymata_aio.constants import Constants
import constants
class Arduino():
# Define Pin Constants
# SPI (for pixy) uses pins 10-13
_MOTOR1 = 3
_MOTOR1_DIR_A = 2
_MOTOR1_DIR_B = 4
_MOTOR... |
# Copyright (c) 2014 Cloudbase Solutions SRL
# 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
#
# Unle... |
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... |
"""
Django settings for evetool project.
Generated by 'django-admin startproject' using Django 1.8.
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 paths ... |
from django.contrib.auth.decorators import permission_required
from django.contrib.auth import logout
from django.conf import settings
from django.http import HttpResponse, JsonResponse, Http404
from django.shortcuts import render, reverse, get_object_or_404
import yaml
from mittab.apps.tab.archive import ArchiveExpor... |
"""
Django settings for sim project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import... |
#!/usr/bin/env python
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# Post-diagnostic of STATION_ASF / L. Brodeau, 2019
import sys
from os import path as path
#from string import replace
import math
import numpy as nmp
from netCDF4 import Dataset,num2date
import matplotlib as mpl
mpl.use... |
# coding=utf-8
# Copyright 2021 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either... |
import glob
from poly import parse_poly
from shapely.geometry import Polygon
# directories used for searching for packages
valhalla_meta_dir = 'valhalla/packages_meta'
valhalla_packages_dir = 'valhalla/packages'
valhalla_tiles_timestamp = "valhalla/tiles/timestamp"
version = "1"
def getsize(sname):
f = open(sname... |
# #
# Copyright 2013-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... |
"""
Defines the routing endpoints of the RESTful API for databayes.
Each method corresponds to an API action and returns the status of the action and the output. This
layer handles communication to the databayes daemon.
IMPORTANT NOTE! - Only one of these server instances should be running to avoid r... |
import unittest
from rx import operators as ops
from rx.testing import TestScheduler, ReactiveTest
on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscribe = ReactiveTest.subscribe
subscribed = ReactiveTest.subscribed
disposed = ReactiveTest.disposed
created =... |
from contextlib import contextmanager
from bok_choy.page_object import PageObject
from bok_choy.promise import EmptyPromise
from .course_page import CoursePage
class DiscussionPageMixin(object):
def is_ajax_finished(self):
return self.browser.execute_script("return jQuery.active") == 0
class Discussi... |
#!/usr/bin/python -u
import datetime
import modbus_tcp_sim
import os
import sys
from twisted.internet import reactor
from fronius_sim import FroniusSim
app_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
bottle_dir = os.path.normpath(os.path.join(app_dir, '..', '..', 'software', 'ext', 'bottle'))
sy... |
import argparse
import os
import pymysql.cursors
import re
import sys
from ConfigParser import SafeConfigParser
from StringIO import StringIO
from pymysql import OperationalError
# returns a list of sql commands as strings
def read_DDL(ddlfilename):
f = open(ddlfilename, 'r')
ddlfile = f.read()
f.close()
temp = f... |
#!/usr/bin/env python
"""Tests anime filename output
"""
from functional_runner import run_tvnamer, verify_out_data
from nose.plugins.attrib import attr
@attr("functional")
def test_group():
"""Anime filename [#100]
"""
out_data = run_tvnamer(
with_files = ['[Some Group] Scrubs - 01 [A1B2C3].avi... |
#!/usr/bin/python
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... |
import numpy as np
from ..base import BaseLibSVM, BaseLibLinear, _get_class_weight
from . import libsvm
from .. import liblinear
class SparseBaseLibSVM(BaseLibSVM):
_kernel_types = ['linear', 'poly', 'rbf', 'sigmoid', 'precomputed']
_svm_types = ['c_svc', 'nu_svc', 'one_class', 'epsilon_svr', 'nu_svr']
... |
"""alloccli subcommand for viewing the details of a single entity."""
from alloc import alloc
class view(alloc):
"""View an entity."""
# Setup the options that this cli can accept
ops = []
ops.append(('' , 'help ', 'Show this help.'))
ops.append(('t:', 'task=ID ', 'An existing task\'s ID.'... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2014 Grupo de Sistemas Inteligentes (GSI) DIT, UPM
#
# 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.ap... |
import requests
import pandas as pd
import os.path
import resources.constants
import json
from pandas.io.json import json_normalize
from utils.data_utils import get_ordinal_number
"""
This script aggregates data from multiple endpoints and returns a single .json file containing all data
used in the displacement tracke... |
#!/usr/bin/env python
# encoding: utf-8
import urllib
import json
import os
import requests
import sys
import webbrowser
import gspread
from oauth2client.service_account import ServiceAccountCredentials
from flask import Flask
from flask import request
from flask import make_response
from flask_restful import Resource... |
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware imp... |
# Copyright (c) 2006-2009 The Trustees of Indiana University.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without ... |
# Generated by Django 3.0.3 on 2020-08-29 15:39
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('common', '0003_citation_page_name'),
('structure', '0028_auto_20200829_1704'),
('protein', '0009_auto_202005... |
from setuptools import setup, find_packages
from pip.req import parse_requirements
import playlist as package
def get_requirements(path):
# parse_requirements() returns generator of pip.req.InstallRequirement objects
return map(lambda ir: str(ir.req), parse_requirements(path, session=False))
keywords = ["me... |
#!/usr/bin/python3
"""
Let's call any (contiguous) subarray B (of A) a mountain if the following
properties hold:
B.length >= 3
There exists some 0 < i < B.length - 1 such that B[0] < B[1] < ... B[i-1] <
B[i] > B[i+1] > ... > B[B.length - 1]
(Note that B could be any subarray of A, including the entire array A.)
Give... |
import deltaRCM_base
class deltaRCM(deltaRCM_base.Tools):
_input_vars = {
'model_output__site_prefix': {'name':'site_prefix', 'type': 'string', 'default': ''},
'model_output__case_prefix': {'name':'case_prefix', 'type': 'string', 'default': ''},
'model_output__out_dir': {'name':'out_dir', ... |
from pyevolve import G1DList
from pyevolve import GSimpleGA
from pyevolve import G1DBinaryString
from pyevolve import Util
from pyevolve import Selectors
from random import randint as rand_randint, uniform as rand_uniform, choice as rand_choice, randrange as randrange
import sys
MAX_SET_SIZE = 3
RULE_SIZE = 36
INITIA... |
from unittest import TestCase
class TestOrder(TestCase):
def test_email(self):
self.fail()
def test_closed_at(self):
self.fail()
def test_created_at(self):
self.fail()
def test_updated_at(self):
self.fail()
def test_number(self):
self.fail()
def tes... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
control_thread.py
This script sends positions to control the UAV in X, Y, Z
ILPS 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 th... |
# -*- coding: utf-8 -*-
"""
Copyright (C) 2012 Aurélien Bompard <abompard@fedoraproject.org>
Author: Aurélien Bompard <abompard@fedoraproject.org>
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; eit... |
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
# -*- 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... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017-2020 - Chris Griffith - MIT License
import copy
import re
from os import PathLike
from typing import Iterable, Type, Union
import box
from box.converters import (
BOX_PARAMETERS,
_from_csv,
_from_json,
_from_msgpack,
_from_toml,
... |
# dnf-utils - add-on tools for DNF
# Copyright (C) 2014 Tim Lauridsen < timlau<AT>fedoraproject<DOT>org >
#
# 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... |
# -*- coding: utf-8 -*-
# equalize.py
# by Jens Kutilek
# https://github.com/jenskutilek/Curve-Equalizer
#-----------------------
# EQMethods/geometry.py
#-----------------------
from math import atan2, cos, pi, sin, sqrt
# helper functions
def getTriangleArea(a, b, c):
return (b.x - a.x) * (c.y - a.y) - (c.x... |
#!/usr/bin/env python
# general imports
from numpy import *
from random import uniform
# imp general
import IMP
# our project
from IMP.isd import *
# unit testing framework
import IMP.test
class MockFunc:
def __init__(self, setval, evaluate, evalargs=(1,), update=None):
self.__set = setval
s... |
# Copyright 2015 Rackspace US, 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 agreed to in wri... |
from argparse import ArgumentParser, RawDescriptionHelpFormatter
import piony
from piony.common.exceptions import InputError
class ArgParser(object):
def __init__(self):
self.ps = ArgumentParser(prog=piony.__appname__,
formatter_class=RawDescriptionHelpFormatter,
... |
# -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes.
Email: danaukes<at>seas.harvard.edu.
Please see LICENSE.txt for full license.
"""
import PySide.QtCore as qc
import PySide.QtGui as qg
class Child(object):
# display = ['a','b','c','d','e']
editable = ['a', 'b', 'c']
new_attr = {'<new_string>': ''... |
# Copyright 2013 IBM Corp.
# Copyright 2011 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 ... |
# Copyright (c) 2014 - 2016 townhallpinball.org
#
# 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, p... |
import string, os, sys, subprocess
#Use MRIConvert to convert images to nifti format. Images will be saved as a 4D file and then split into separate flip angles
if len(sys.argv[1:]) < 1:
print 'Correct Usage: python determineIncludedVolumes.py <Path to DTIPrep QC Report (.txt) > <output root directory> <dwi file> ... |
from xml.etree import ElementTree
import datetime
from couchdbkit import ResourceNotFound
from django.test.utils import override_settings
from casexml.apps.case.exceptions import IllegalCaseId
from casexml.apps.case.mock import CaseBlock
from casexml.apps.case.models import CommCareCase
from casexml.apps.case.sharedmod... |
import datetime
from django.db.models import Sum
from django.db.models.functions import TruncDay, TruncMonth, TruncYear
from oppia.test import OppiaTestCase
from oppia.models import Course
from oppia.views.utils import generate_graph_data
from summary.models import CourseDailyStats
class OppiaViewUtilsTest(OppiaTe... |
# =============================================================================
# Copyright [2014] [Kevin Carter]
# License Information :
# This software has no warranty, it is provided 'as is'. It is your
# responsibility to validate the behavior of the routines and its accuracy
# using the code provided. Consult the ... |
import numpy as np
import tensorflow as tf
from tfgraph.utils.callbacks.update_edge_notifier import UpdateEdgeNotifier
from tfgraph.utils.tensorflow_object import TensorFlowObject, TF_type
def __str__(self) -> str:
return str(self.run_tf(self.L_tf))
class Graph(TensorFlowObject, UpdateEdgeNotifier):
""" Graph ... |
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
"""
Compare the properties injected to the properties recovered.
Particularly the Ages.
"""
import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import h5py
plotpar = {'axes.labelsize': 18,
'font.size': 10,
'legend.fontsize': 18,
'xtick.labelsize': 18,
... |
import numpy as np
import pytest
import struct
import tempfile
from nengo_spinnaker.regions.matrix import (
MatrixRegion, MatrixPartitioning)
class TestMatrixRegion(object):
@pytest.mark.parametrize("dtype", [np.uint8, np.int16])
@pytest.mark.parametrize(
"prepend_n_rows, prepend_n_cols, n_prepen... |
#!/usr/bin/env python3
'''
A script for outlining Fortran programs
Copyright 2013-2018 RIKEN
Copyright 2018-2019 Chiba Institute of Technology
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 Lice... |
'''
Written by Dmitry Chirikov <dmitry@chirikov.ru>
This file is part of Luna, cluster provisioning tool
https://github.com/dchirikov/luna
This file is part of Luna.
Luna 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 Foun... |
#!/usr/bin/env python
"""Test the operation of a bridge on the SUT"""
import time
import unittest2
import xmlrunner
import params
import sut
import traffic
ZERO_STATS = {
'rx_pkts': 0L,
'tx_pkts': 0L,
}
TX_50_STATS = {
'rx_pkts': 0L,
'tx_pkts': 50L,
}
TX_100_STATS = {
'rx_pkts': 0L,
... |
"""Collection of utility functions."""
# RecuperaBit
# Copyright 2014-2021 Andrea Lazzarotto
#
# This file is part of RecuperaBit.
#
# RecuperaBit 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 versio... |
"""
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Experiment resources.
"""
from datetime import datetime
import logging
from pyramid.httpexceptions import HTTPBadRequest
from everest.querying.specificatio... |
#
# 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... |
import argparse
from fractions import Fraction
import math
import matplotlib.pyplot as plt
import numpy as np
import os
import re
import time
import parse_ctcp_output
import parse_tcptrace
import analyse_data
# Format:-
# key: cc_type eg. 10x, 1000x, cubic, cubicsfqCodel etc.
# value: dictionary: key - (vary_type, v... |
# Copyright (c) 2015 Gamda Software, LLC
#
# See the file LICENSE.txt for copying permission.
from enum import Enum
from gameboard.gameboard import Gameboard
from gameboard.gameboard import Direction
from gameboard.coordinate import Coordinate
class Chip:
class Color(Enum):
white = True
black = Fa... |
# Copyright 2018 Fujitsu.
#
# 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... |
# -*- coding: utf8 -*-
#!/usr/bin/python
#
# This is derived from a cadquery script for generating PDIP models in X3D format
#
# from https://bitbucket.org/hyOzd/freecad-macros
# author hyOzd
# This is a
# Dimensions are from Microchips Packaging Specification document:
# DS00000049BY. Body drawing is the same as QFP ... |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class UtilLinux(AutotoolsPackage):
"""Util-linux is a suite of essential utilities for any Linux... |
import nltk, string
from sklearn.feature_extraction.text import TfidfVectorizer
from items.models import BookProfile
from recommenders.models import DocToDocLink
class DocumentSimilarity:
def __init__(self, doc1=None, doc2=None):
self.b1 = doc1
self.b2 = doc2
def calculate_cosine(self):
... |
"""Development settings and globals."""
from os.path import join, normpath
from os import environ
from base import *
from django.core.exceptions import ImproperlyConfigured
def get_env_setting(setting):
""" Get the environment setting or return exception """
try:
return environ[setting]
except KeyE... |
# 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 json
import re
from telemetry.core import extension_page
from telemetry.core.backends.chrome import inspector_backend
class ExtensionNotFoundExcept... |
import json
import sys
from os.path import join
'''
Read movielens data into Veritable-ready json
'''
def main(input_file, output_dir):
data = {}
columns = set()
with open(input_file) as fd:
for line in fd:
tokens = line.split('\t')
user_id = 'U{}'.format(tokens[0]).decode(... |
# -*- coding: utf-8 -*-
# Scrapy settings for ManagedScraper project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en... |
###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... |
import unittest
import mock
import ddt
import octoprint.plugin
import octoprint.plugin.core
##~~ Helpers for testing mixin type extraction
class A(object):
pass
class A_1(A):
pass
class A_2(A):
pass
class A_3(A):
pass
class A1_1(A_1):
pass
class B(object):
pass
class B_1(B):
pass
class C(object)... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import unittest
current_path = os.path.abspath(os.path.dirname(__file__))
tests_path = os.path.join(current_path, 'tests')
sys.path[0:0] = [
current_path,
tests_path,
]
all_tests = [f[:-3] for f in os.listdir(tests_path)
if f.start... |
import os
import sublime
from sublime_plugin import WindowCommand
from ..git_command import GitCommand
from ...common import util
NO_REPO_MESSAGE = ("It looks like you haven't initialized Git in this directory. "
"Would you like to?")
REPO_PATH_PROMPT = "Enter root path of new git repo:"
CONFIRM... |
#!/usr/bin/env nemesis
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://g... |
# -*- coding: utf-8 -*-
#
# Boas Práticas em Desenvolvimento documentation build configuration file, created by
# sphinx-quickstart on Sat Oct 31 19:44:44 2015.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# au... |
def test_basic_switch(check_output):
check_output('''
main() {
extrn putchar;;
auto i;
i = 0; while(i <= 4) {
describe(i);
putchar('*n');
++i;
}
}
describe(val) {
extrn putstr, putnumb... |
# @file node.py
# Node implementation
## @package networks
# @author Evtushenko Georgy
# @date 05/03/2015 17:19:00
# @version 1.1
## @mainpage Metanet documentation
# @section intro_sec Introduction
# Short script to demonstrate the use of doxygen.
#
# @section license_sec License
#\verbatim This file is pa... |
# The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
#
# 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, mod... |
import math
import cStringIO
import os
import copy as cp
from itertools import chain, ifilter, ifilterfalse
from functools import partial
import re
import operator as op
from string import Template as T
import logging
from lib.typecheck import *
import lib.const as C
from lib.enum import enum
import util
import sampl... |
#-------------------------------------------------------------------------------
# Copyright (c) 2011 Anton Golubkov.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU Lesser Public License v2.1
# which accompanies this distribution, and is available at
#... |
# Copyright 2017 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
from __future__ import absolute_import, division, unicode_literals
import xml.etree.ElementTree as ElT
import bz2
import io
import os
import uuid
import sqlite3
import config
import re
import datetime
import pickle
import requests
REPODATA_ARC_SUFFIX = "x86_64/"
METADATA_SUFFIX = "repodata/repomd.xml"
PACKAGE_TIMESTAM... |
# Paperwork - Using OCR to grep dead trees the easy way
# Copyright (C) 2014 Jerome Flesch
#
# Paperwork 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
# ... |
import tweepy
import json
from tweepy import OAuthHandler
from tweepy import Stream
from liveListener import Listener
class TweetMiner:
def __init__(self, config_fname='config'):
self._readdetails(config_fname)
self._authenticate()
def mine(self):
self.state = None
while self.... |
# This file is part of Essential Editor Research Project (EERP)
#
# EERP 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.
#
# EERP is di... |
"""
Django settings for psycho_test project.
Generated by 'django-admin startproject' using Django 1.9.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import o... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class PaymentWizard(models.TransientModel):
""" Override for the sale quotation onboarding panel. """
_inherit = 'payment.acquirer.onboarding.wizard'
_name = 'sale.paym... |
from Communicator import *
from PID_Q_Lerner import *
import json
import os
import time
import atexit
t_fmt = "{00:g}"
inf = float("inf")
stable_factor = 40
timeout = 13
timeout_penalty = 100
count_until = 2
class PIDLerner:
def __init__(self, learning_factor = .1):
self.arduino = SerialComm()
self.log_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.