src stringlengths 721 1.04M |
|---|
import os
from config import STRIPE_KEYS
from time import sleep
import stripe
from salesforce_bulk import SalesforceBulk
from simple_salesforce import Salesforce
stripe.api_key = STRIPE_KEYS["secret_key"]
# get Stripe emails
customers = stripe.Customer.list(limit=100)
stripe_emails = set(
(x["email"].lower() for... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from hwt.interfaces.utils import addClkRstn
from hwt.synthesizer.unit import Unit
from hwtLib.peripheral.usb.usb2.ulpi_agent_test import UlpiAgentTC, \
UlpiUsbAgentTC
from hwtLib.peripheral.usb.usb2.utmi import Utmi_8b
from hwt.simulator.simTestCase import SimTestCase... |
from enigma import getBoxType
from Tools.StbHardware import getFPVersion
import os
class RcModel:
RCTYPE_DMM = 0
RCTYPE_DMM1 = 1
RCTYPE_DMM2 = 2
RCTYPE_E3HD = 3
RCTYPE_EBOX5000 = 4
RCTYPE_ET4X00 = 5
RCTYPE_ET6X00 = 6
RCTYPE_ET6500 = 7
RCTYPE_ET9X00 = 8
RCTYPE_ET9500 = 9
RCTYPE_GB = 10
RCTYPE_INI0 = 11
... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Make input data (Switchboard corpus)."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from os.path import join, basename
import numpy as np
import pickle
from tqdm import tqdm
from utils.util import mkd... |
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en'
'''
ebook-meta
'''
import sys, os
from calibre.utils.config import StringConfig
from calibre.customize.ui import metadata_readers, metadata_writers, force_ident... |
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# 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
... |
""" Test the API for Gyms """
from datetime import datetime, timedelta
from app.models.gym import Gym
from app.models.gym_item import GymItem
from app.models.raid_item import RaidItem
from app.tests.api.personalised.gym_collection.gym_common import \
GymAPICommonCase
import pytz
class TestGymCollectionModelData(G... |
#!/usr/bin/python
"""soql2atom: a `pyforce` demo that generates an atom 1.0 formatted feed of any SOQL query (adapted from Simon Fell's pyforce example)
The fields Id, SystemModStamp and CreatedDate are automatically added to the SOQL if needed.
The first field in the select list becomes the title of the entry, ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
def get_immediate_subdirectories(directory):
return [name for name in os.listdir(directory) if os.path.isdir(os.path.join(directory, name)) and name[0] != '.']
PlugInNames = get_immediate_subdirectories(os.path.abspath(os.path.dirname(__file__)))
plugin =... |
# -*- 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, Version 2.0 (the
#... |
from pycp2k.inputsection import InputSection
class _restart_averages1(InputSection):
def __init__(self):
InputSection.__init__(self)
self.Itimes_start = None
self.Avecpu = None
self.Avehugoniot = None
self.Avetemp_baro = None
self.Avepot = None
self.Avekin =... |
#!/usr/bin/python3
###############################################################################
# #
# collecty - A system statistics collection daemon for IPFire #
# Copyright (C) 2012 IPFire development team ... |
import os
import re
import posixpath
from compressor.filters import FilterBase, FilterError
from compressor.conf import settings
from compressor.utils import get_hexdigest, get_mtime
URL_PATTERN = re.compile(r'url\(([^\)]+)\)')
class CssAbsoluteFilter(FilterBase):
def input(self, filename=None, **kwargs):
... |
from recon.core.module import BaseModule
from dicttoxml import dicttoxml
from xml.dom.minidom import parseString
import codecs
import os
class Module(BaseModule):
meta = {
'name': 'XML Report Generator',
'author': 'Eric Humphries (@e2fsck) and Tim Tomes (@LaNMaSteR53)',
'version': 'v0.0.2'... |
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""tales.py doctests."""
from datetime import (
datetime,
timedelta,
)
from lxml import html
from pytz import utc
from zope.component import (
getAdapter,
... |
import re
import six
from options import Options, OptionsClass, Prohibited, Transient
from .util import *
from .quoter import Quoter
from .joiner import joinlines
from .styleset import StyleSet
# MD_ATTRS = set(['a', 'p', 'doc', 'h'])
# MD_ATTRS.update(QUOTER_ATTRS)
class MDQuoter(Quoter):
"""
A more soph... |
from functools import partial
from random import sample
from navmazing import NavigateToSibling, NavigateToAttribute
from cfme.common.provider import BaseProvider
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import (
Quadicon, Form, AngularSelect, form_buttons, Input, toolbar as tb,
InfoB... |
from __future__ import print_function
import argparse
import os
import time
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim
import torch.utils.data
import torchvision.transforms as transforms
from wresnet_models import *
from h5_dataloaders import *
import pandas as pd
parser = argpars... |
# -*- coding: utf-8 -*-
"""
Implements the Gaussian process functionality needed for the probabilistic
line search algorithm.
"""
import numpy as np
from scipy import linalg
from utils import erf
class ProbLSGaussianProcess(object):
"""Gaussian process implementation for probabilistic line searches [1].
Implement... |
#!/usr/bin/env python
# Copyright (C) 2013 Jive Software. All rights reserved.
"""High-level functions for manipulating a .properties file.
"""
import ConfigParser
import itertools
import os
import StringIO
FAKE_SECTION_NAME = 'fake_section'
class Error(Exception):
"""Base exception class for this module."""
c... |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider
from mpi4py import MPI
from cplpy import CPL
from draw_grid import draw_grid
#initialise MPI and CPL
comm = MPI.COMM_WORLD
CPL = CPL()
CFD_COMM = CPL.init(CPL.CFD_REALM)
nprocs_realm = CFD_COMM.Get_size()
# Parameters of the cpu... |
#!/usr/bin/env python
#
# Copyright 2013 Simone Campagna
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
#!/usr/bin/python
# vim: set fileencoding=utf-8 :
#
# © 2012 Will Thompson <will@willthompson.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at y... |
#!/usr/bin/python
#Gateway
import time
import random
import sys
import cwiid
import json
import gevent
from collections import OrderedDict
import cStringIO
import alsaaudio
import wave
import requests
import os
import struct
import math
from dotstar import Adafruit_DotStar
import socket
WHATAMI = os.path.basename(__fi... |
import re
import os
import json
import importlib
import timeit
import inspect
import collections
from enum import Enum
from pathlib import Path
import numpy as np
from matplotlib.cm import cmap_d
import wx
import app
import fileio
from classes.om.base.manager import ObjectManager
from app import log
... |
#-*- encoding:utf-8 -*-
"""
Parse MBGA data to generate statistics.
"""
import glob
import os
import re
import csv
import numpy
from PIL import Image
from datetime import datetime
DATA_PATH = "data/mbga/{0}/"
PERMISSIONS = {
"メンバー全員": 1 # all members
,"主催者+副管理": 2 # sponsors and moderators
,"主催者のみ": 3 # sponsors
... |
#@ImagePlus imp
#@LogService log
'''
This script uses an outdated API. For a modern replacement, have a look at
https://github.com/morphonets/SNT/tree/master/src/main/resources/script_templates/Neuroanatomy
'''
from sholl import Sholl_Analysis
from sholl import Options
from os.path import expanduser
def spa... |
# Author: Mani Srivastava, NESL, UCLA
# Created on: May 22, 2013
#
# Copyright notice in LICENSE file
#
import sys
import os
import Queue
import BaseDevice
import time
import json
import cherrypy
import iso8601
import logging
from pkg.utils.debug import debug_mesg
from pkg.utils.misc import json_convert_unicode_to_s... |
import tensorflow as tf
import cv2
import numpy as np
class MultilayerConvolutionalNetwork:
"""
This class manages the deep neural network
that will be used by the agent to learn
and extrapolate the state space
"""
def __init__(self, input_width, input_height, nimages, nchannels):
self.... |
import os
import tempfile
import unittest
from mockito import *
from pysteam import grid
from pysteam import shortcuts
from ice import model
from ice import roms
from ice import steam_grid_updater
from testinfra import fixtures
class SteamGridUpdaterTests(unittest.TestCase):
def setUp(self):
self.steam_fix... |
# Copyright (c) 2016 Dell Inc. or its subsidiaries.
# 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
#
# ... |
"""
Loads the energy data csv files acquired through the loader scripts
(ion_get_data.py or jci_get_data.py), and inserts them into the Postgres
energy database.
"""
import csv
import os
import pyodbc
import sys
import util
DB = util.PG_DB
USER = util.PG_USER
PWD = uti.PG_PWD
# Default data directory if none is supp... |
import numpy as np
from WideSweepFile import WideSweepFile
from Resonator import Resonator
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
import datetime
import argparse
import os
class autofit():
def __init__(self, wideSweepFileName, reslocFileName, logFileName):
self.... |
"""
Test lldb watchpoint that uses '-s size' to watch a pointed location with size.
"""
from __future__ import print_function
import re
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class HelloWatchLocationTestCase(TestBase):
mydi... |
""""Argo Workflow for running frontend unit tests"""
from kubeflow.kubeflow.ci import workflow_utils
from kubeflow.testing import argo_build_util
class Builder(workflow_utils.ArgoTestBuilder):
def __init__(self, name=None, namespace=None, bucket=None,
test_target_name=None, **kwargs):
sup... |
#!/usr/bin/env python
import os
import sys
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
#Include scaffolder
sys.path.append(
os.path.abspath(
os.path.join(
os.path.dirname(__file__), 'scaffolder')
)
)
import scaffolder
scaffolder... |
import hashlib
import numpy
from sklearn.base import BaseEstimator, ClassifierMixin, clone
from sklearn.tree.tree import DecisionTreeClassifier
from sklearn.utils.fixes import unique
from sklearn import preprocessing
from sklearn.utils.random import check_random_state
from resilient.logger import Logger
from resilien... |
"""
WSGI config for omnomer project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` ... |
# -*- coding: utf-8 -*-
"""
S3 Microsoft Excel codec
@copyright: 2011-2019 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software wi... |
from __future__ import absolute_import
import marshal
import math
from dpark.portable_hash import portable_hash
from six.moves import range
from functools import reduce
from six.moves import zip as izip
from six.moves import zip_longest as izip_longest
BYTE_SHIFT = 3
BYTE_SIZE = 1 << BYTE_SHIFT
BYTE_MASK = BYTE_SIZE -... |
#
# Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com
#
# This file is part of EigenD.
#
# EigenD 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) a... |
import unittest
from fftoptionlib.cosine_pricer import (
cosin_vanilla_call,
interval_a_and_b,
)
from fftoptionlib.moment_generating_funs import (
cumulants_from_mgf,
general_log_moneyness_mgf,
)
from fftoptionlib.process_class import (
BlackScholes,
Heston,
VarianceGamma,
)
class TestCos... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
#!/usr/bin/python
import sys
import struct
import random
import signal
try:
import gevent
from gevent import socket
from gevent.server import StreamServer
from gevent.socket import create_connection, gethostbyname
except:
print >>sys.stderr, "please install gevent first!"
sys.exit(1)
import ... |
#!/usr/bin/env python3
from flask import Flask
from flask.ext.assets import Environment, Bundle
from logging.handlers import SMTPHandler
from models import db
from werkzeug.contrib.fixers import ProxyFix
from views.admin import admin
from views.api import api
from views.quiz import quiz
import logging
app = Flask(__na... |
import numpy as np
class LanderSimulator(object):
inputs = 3
actions = [0, 1]
ALTITUDE = 0
FUEL = 0
def __init__(self, altitude=10000., fuel=200.):
LanderSimulator.ALTITUDE = altitude
LanderSimulator.FUEL = fuel
self.altitude = altitude
self.fuel = fue... |
# -*- coding: utf-8 -*-
#
# Django Kong documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 18 09:17:59 2009.
#
# 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
# autogenerated file.
#
#... |
import numpy as np
__author__ = "Nathan I. Budd"
__email__ = "nibudd@gmail.com"
__copyright__ = "Copyright 2017, LASR Lab"
__license__ = "MIT"
__version__ = "0.1"
__status__ = "Production"
__date__ = "08 Mar 2017"
def meeEl_meefl(meefl):
"""Convert MEEs with true longitude to eccentric longitude.
Args:
... |
#!/usr/bin/env python
# Based on the parameterized test case technique described here:
#
# http://eli.thegreenplace.net/2011/08/02/python-unit-testing-parametrized-test-cases
import unittest
import time
import sys
import ev3dev.ev3 as ev3
import parameterizedtestcase as ptc
from motor_info import motor_info
clas... |
# Copyright 2012 Red Hat, 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 agre... |
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... |
#!/usr/bin/env python3
from app import app
from app.config import BASE_DIR
from argparse import ArgumentParser
from os import path
import ssl
def main():
ssl_base_dir = path.join(BASE_DIR, 'ssl')
parser = ArgumentParser()
parser.add_argument('--bind', '-b', action='store', help='the address to bind to',... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import datetime
import os
import psycopg2
import sys
con = None
f = None
try:
################ CHANGE THESE PARAMETERS ONLY ################
con = psycopg2.connect(database='switch', host='localhost', port='5432', user='deepakc_super', password='myPa... |
from flask import Blueprint, request, jsonify, make_response
from app.comments.models import Comments, CommentsSchema
from flask_restful import Api
from app.baseviews import Resource
from app.basemodels import db
from sqlalchemy.exc import SQLAlchemyError
from marshmallow import ValidationError
comments = Blue... |
import re
import os
import logging
import genshi
import cgi
import datetime
from urllib import urlencode
from pylons.i18n import get_lang
import ckan.lib.base as base
import ckan.lib.helpers as h
import ckan.lib.maintain as maintain
import ckan.lib.navl.dictization_functions as dict_fns
import ckan.logic as logic
imp... |
# Copyright 2021 The Flax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... |
from .. import command, utils, bar
LEFT = object()
CENTER = object()
class _Drawer:
"""
A helper class for drawing and text layout.
"""
_fallbackFont = "-*-fixed-bold-r-normal-*-15-*-*-*-c-*-*-*"
def __init__(self, qtile, window):
self.qtile, self.window = qtile, window
self.win... |
"""
Functions related to the RediBatch database
"""
__author__ = "University of Florida CTS-IT Team"
__copyright__ = "Copyright 2014, University of Florida"
__license__ = "BSD 3-Clause"
import datetime
import hashlib
import logging
import os
import sqlite3 as lite
import stat
import sys
import time
from lxml import ... |
from __future__ import absolute_import
import pytest
from sentry import eventstore
from sentry.event_manager import EventManager
@pytest.fixture
def make_http_snapshot(insta_snapshot):
def inner(data):
mgr = EventManager(data={"request": data})
mgr.normalize()
evt = eventstore.create_eve... |
from django.db import models
class Note(models.Model):
note = models.TextField(max_length=800)
def __unicode__(self): # Python 3: def __str__(self):
return self.note
class Company(models.Model):
name = models.CharField(max_length=200, default='Unknown')
validation_date = models.CharFiel... |
__author__ = 'yueli'
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
from config.config import *
# Import the targeted raw CSV file
rawCSV_file1 = os.path.join(
CSV_FILE_DESTDIR,
'For_different_5_VP',
'Deleted_database',
'EID-153.16.47.16-MR-198.6.255.37',
"liege-EID-153... |
# Copyright (C) 2005, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
... |
"""Z-Wave discovery schemas."""
from . import const
DEFAULT_VALUES_SCHEMA = {
"power": {
const.DISC_SCHEMAS: [
{
const.DISC_COMMAND_CLASS: [const.COMMAND_CLASS_SENSOR_MULTILEVEL],
const.DISC_INDEX: [const.INDEX_SENSOR_MULTILEVEL_POWER],
},
... |
import numpy as np
from notes_utilities import randgen, log_sum_exp, normalize_exp, normalize
class HMM(object):
def __init__(self, pi, A, B):
# p(x_0)
self.pi = pi
# p(x_k|x_{k-1})
self.A = A
# p(y_k|x_{k})
self.B = B
# Number of possible latent states at ea... |
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# Copyright © 2016, Continuum Analytics, Inc. All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
# -------------------------------------------------------------------... |
from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config file for Python... |
#### PATTERN | EN | RULE-BASED SHALLOW PARSER ########################################################
# Copyright (c) 2010 University of Antwerp, Belgium
# Author: Tom De Smedt <tom@organisms.be>
# License: BSD (see LICENSE.txt for details).
# http://www.clips.ua.ac.be/pages/pattern
##################################... |
import requests
import tempfile
from django.core import files
from django.core.exceptions import PermissionDenied, ValidationError
from easy_thumbnails.files import get_thumbnailer
from rest_framework import serializers
from rest_framework_gis import serializers as geoserializers
from rest_framework.serializers imp... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: zengchunyun
"""
import pika
import subprocess
import threading
import time
import sys
class RabbitMQClient(object):
def __init__(self, host="localhost", port=5672, timeout=15, host_id=None, binding_keys=None):
"""
:param host: rabbitmq服务器... |
#----------------------------------------------------------------------
# This file was generated by L:\Projects\ClamWin\py\throb\ENCODE~1.PY
#
from wxPython.wx import wxImageFromStream, wxBitmapFromImage
import cStringIO
catalog = {}
index = []
class ImageClass: pass
def getscanprogress01Data():
return \
'\x89... |
from tableausdk.Exceptions import TableauException
from tableausdk.Extract import Row
from tableausdk.Types import Type
from trext.db.utils import format_datetime, format_date, get_fake_date, get_fake_datetime
class ExtractFiller(object):
"""
Fills the extract skeleton with cleaned and formatted data.
... |
import re
# import random
from .elementLite import Satellite, GroundStation
from .qlearner import QlearnerStorage, QlearnerCost
from .generalFunctions import matchVariance
class FederateLite():
def __init__(self, name, context, costSGL, costISL, storagePenalty = 100, strategy = 1):
"""
@param name... |
#!/usr/bin/env python
#coding:utf-8
# Created: 10.02.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
__author__ = "mozman <mozman@gmx.at>"
import unittest
from dxfwrite.entities import Viewport
from dxfwrite import dxfstr, DXFEngine
class TestViewportEntity(unittest.TestCase):
expected = " 0\n... |
import fbchat
import pytest
import logging
import getpass
@pytest.fixture(scope="session")
def session(pytestconfig):
session_cookies = pytestconfig.cache.get("session_cookies", None)
try:
session = fbchat.Session.from_cookies(session_cookies)
except fbchat.FacebookError:
logging.exception... |
from bs4 import BeautifulSoup
from urllib.request import urlopen
from platform import subprocess
# if genlist = 0, then this script downloads the files, the cmd_downloader variable comes into play
# if genlist = 1, then this script generates a list.txt file containing direct links to music files in the working direct... |
# Copyright (C) 2011 Matteo Franchin
#
# This file is part of Pyrtist.
#
# Pyrtist is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 2.1 of the License, or
# (at your option) any la... |
import numpy as np
import pandas as pd
pd.options.display.expand_frame_repr = False
import UTILS.Util as utl
import UTILS.Plots as pplt
import pylab as plt
import seaborn as sns
path=utl.home+'storage/Data/Dmelanogaster/OxidativeStress/'
CHROMS=['2L','2R','3L','3R','X','4']
pops={'C':'Control','H':'Hyperoxia','L':'Hy... |
# -*- coding: utf-8 -*-
#
# Diana documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 22 12:48:46 2016.
#
# 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
# autogenerated file.
#
# All... |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, throw
from frappe.utils import today, flt, cint, fmt_money, formatdate, getdate
from erpnext.setup.utils import get_... |
"""
numpy.ma : a package to handle missing or invalid values.
This package was initially written for numarray by Paul F. Dubois
at Lawrence Livermore National Laboratory.
In 2006, the package was completely rewritten by Pierre Gerard-Marchant
(University of Georgia) to make the MaskedArray class a subclass of ndarray,... |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Addons modules by CLEARCORP S.A.
# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
#
# This program is free software: you can redistribute... |
#
# This file is part of CasADi.
#
# CasADi -- A symbolic framework for dynamic optimization.
# Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl,
# K.U. Leuven. All rights reserved.
# Copyright (C) 2011-2014 Greg Horn
#
# CasADi is free software; you can... |
from __future__ import print_function
import errno
import hashlib
import os
import sys
try:
from urllib.request import addinfourl, BaseHandler, build_opener, Request, URLError
except ImportError:
from urllib2 import addinfourl, BaseHandler, build_opener, Request, URLError
from argparse import ArgumentParser
N... |
"""
Utilities for reading and writing Mach-O headers
"""
from pkg_resources import require
require("altgraph")
import os
import sys
from altgraph.Graph import Graph
from altgraph.ObjectGraph import ObjectGraph
from macholib.mach_o import *
from macholib.dyld import dyld_find
from macholib.MachO import MachO
from ma... |
#!/usr/bin/env python
import logging
import bs4
from thug.DOM.W3C.Core.DOMException import DOMException
from .HTMLElement import HTMLElement
from .HTMLCollection import HTMLCollection
from .HTMLTableRowElement import HTMLTableRowElement
from .HTMLTableSectionElement import HTMLTableSectionElement
from .HTMLTableCapt... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-07-31 17:38
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('work_order', '0007_order_tim... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Satzgenerator
Referenzimplementierung
"""
import sys
import random as r
# Textdateien einlesen, Zeilen in Liste
vornamen_m = open('../data/vornamen_m.txt', 'r').read().splitlines()
vornamen_w = open('../data/vornamen_w.txt', 'r').read().splitlines()
vornamen = vorna... |
'''
Copyright 2012 Hannes Rauhe
This file is part of Skyhog.
Skyhog 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.
Skyhog is distribu... |
#
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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 unittest
from zope.testing import doctestunit
from zope.component import testing
from Testing import ZopeTestCase as ztc
from Products.Five import zcml
from Products.Five import fiveconfigure
from Products.PloneTestCase import PloneTestCase as ptc
from Products.PloneTestCase.layer import PloneSite
ptc.setupPlo... |
# -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... |
from datetime import datetime
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import now
from django.utils.translation import ugettext as _
class Command(BaseCommand):
args = 'No arguments required'
help = 'Sets projects to "Done Incomplete" and task status to "Rea... |
from helper import CompatTestCase
from validator.compat import FX10_DEFINITION
class TestFX10Compat(CompatTestCase):
"""Test that compatibility tests for Firefox 10 are properly executed."""
VERSION = FX10_DEFINITION
def test_isSameNode(self):
"""Test that `isSameNode` is flagged in Gecko 10."""... |
import configobj, lbc, os, sys, zipfile
from collections import OrderedDict
if sys.platform.startswith('win'): #only import this if we're on windows
import accessible_output
s=accessible_output.speech.Speaker()
def getAppPath():
""" This will get us the program's directory,
even if we are frozen using py2exe
This... |
# Copyright (c) 2011, Peter Thatcher
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditi... |
__author__ = "Harish Narayanan"
__copyright__ = "Copyright (C) 2009 Simula Research Laboratory and %s" % __author__
__license__ = "GNU GPL Version 3 or any later version"
import fenics
from cbc.common import CBCProblem
from cbc.twist.solution_algorithms_static import StaticMomentumBalanceSolver_U
from cbc.twist.soluti... |
#!/usr/bin/env python
#
# 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
# "... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from distutils.core import setup
VERSION = '0.8'
LONG_DESCRIPTION = open('README.rst').read()
INSTALL_REQUIRES = [
'beautifulsoup4',
]
PY_MAJOR, PY_MINOR = sys.version_info[:2]
if (PY_MAJOR, PY_MINOR) == (2, 6):
INSTALL_REQUIRES.append('argparse')... |
# -*- coding: utf-8 -*-
# pylint: disable=unused-import,import-error,no-name-in-module,
# pylint: disable=ungrouped-imports
"""This module contains various compatibility definitions and imports.
It is used internally by SoCo to ensure compatibility with Python 2."""
from __future__ import unicode_literals
try: # p... |
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.