text stringlengths 17 737k |
|---|
__version_info__ = {
'major': 0,
'minor': 8,
'micro': 0,
'releaselevel': 'alpha',
'serial': 1
}
def get_version():
vers = ["%(major)i.%(minor)i" % __version_info__, ]
if __version_info__['micro']:
vers.append(".%(micro)i" % __version_info__)
if __version_info__['releaselevel'] ... |
'''
This module is used to initialize a global Java VM instance, to run the python
wrapper for the stallone library
Created on 15.10.2013
@author: marscher
'''
from log import log as _log
import numpy as _np
"""is the stallone python binding available?"""
stallone_available = None
try:
_log.debug('try to initial... |
""" Module handles the heavy lifting, building the various site directories. """
import git, shutil, os, yaml, tempfile, distutils.core, datetime, time, copy
from drupdates.utils import Utils
from drupdates.settings import Settings
from drupdates.settings import DrupdatesError
from drupdates.drush import Drush
from dru... |
# This script extracts specific sets of instructions generated by the prohow-crawler
# The urls to extract are found in the extract_specific_sets_instructions.txt file
# The extract_specific_sets_instructions.txt file should contain one URL per line
# only the sets of instructions corresponding to these URLs will be ex... |
from django.contrib.auth import authenticate, login # Login module handles sessions
from django.shortcuts import render, redirect
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth.models import User
from .models import *
import json
# Login view, method = POST.
@csrf_exempt
def loginView... |
from __future__ import division
__author__ = 'jacob'
import ROOT
import numpy as np
import os
import math
from root_numpy import root2array
import luminosity_plotting_routines as luminosity_plotting
import glob
data_files = glob.iglob(os.path.join("data", "*.root"))
for file_name in data_files:
detector_array = r... |
import db_access
import logging
from logging.handlers import RotatingFileHandler
from flask import Flask, render_template, request, redirect
from minify import minify as minify_css
app = Flask(__name__)
app_info = {
'debug': True,
'version': 'Alpha 0.2'
}
game_names = [
{
'short': 'ED',
'... |
import datetime
import json
import logging
import os
import re
import requests
from pajbot.apiwrappers import APIBase
from pajbot.managers.redis import RedisManager
from pajbot.managers.schedule import ScheduleManager
from pajbot.streamhelper import StreamHelper
log = logging.getLogger(__name__)
class BTTVEmoteMan... |
import sys
import simplejson
import cPickle as pickle
import datetime
import dateutil.parser
from hashlib import sha1
import logging
import time
import copy
from zlib import compress, decompress
from twisted.internet.defer import maybeDeferred, DeferredList
from .requestqueuer import RequestQueuer
from .unicodeconvert... |
from __future__ import print_function
import os, sys
import argparse
import oath
import base64
from vipaccess.patharg import PathType
from vipaccess import provision as vp
EXCL_WRITE = 'x' if sys.version_info>=(3,3) else 'wx'
# http://stackoverflow.com/a/26379693/20789
def set_default_subparser(self, name, args=Non... |
"""Calibration of predicted probabilities."""
# Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Balazs Kegl <balazs.kegl@gmail.com>
# Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# Mathieu Blondel <mathieu@mblondel.org>
#
# License: BSD 3 clause
from __future__ impo... |
from parcels.field import Field, VectorField, SummedField, SummedVectorField, NestedField
from parcels.tools.loggers import logger
import ast
import cgen as c
from collections import OrderedDict
import math
import numpy as np
import random
from copy import copy
class IntrinsicNode(ast.AST):
def __init__(self, obj... |
import matplotlib
import numpy as np
import re
# python 3 compatible
try:
xrange
except NameError:
xrange = range
DEG2RAD = np.pi/180
resolution = 75
# extrapolation function from
# http://stackoverflow.com/questions/2745329/how-to-make-scipy-interpolate-give-an-extrapolated-result-beyond-the-input-range
# i... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... |
#!/usr/bin/python
#mostly a proxy object to abstract how some of this works
import json
from _server import Server
class SlackClient(object):
def __init__(self, token):
self.token = token
self.server = Server(self.token, False)
def rtm_connect(self):
try:
self.server.rtm_... |
'''
Created on 2015/6/25
:author: hubo
'''
import re
import ast
import sys
import io
class ConfigTree(object):
def __init__(self):
pass
def keys(self):
return self.__dict__.keys()
def items(self):
return self.__dict__.items()
def __len__(self):
return len(self.__dict__)... |
# 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 applicable ... |
from datetime import timedelta
import re
from django.utils import timezone
from django.test import TestCase
from coupons.models import Coupon, Campaign
from coupons.settings import (
CODE_LENGTH,
CODE_CHARS,
SEGMENT_LENGTH,
SEGMENT_SEPARATOR,
)
class CouponTestCase(TestCase):
def test_generate_c... |
from datetime import datetime, timedelta
from typing import List
from rqdatac import init as rqdata_init
from rqdatac.services.basic import all_instruments as rqdata_all_instruments
from rqdatac.services.get_price import get_price as rqdata_get_price
from rqdatac.share.errors import AuthenticationFailed
from .setting... |
#! /usr/bin/env python
"""
Widely.
Usage:
widely (help | -h | --help) [<TOPIC>]
widely [login | auth:login]
widely [logout | auth:logout]
widely auth:whoami
widely sites
widely sites:info [--site <SITENAME>]
widely sites:create <SITENAME>
widely sites:copy <SITENAME>
widely sites:rename <SITENAME>
... |
# -*- coding: utf-8 -*-
import os
import sys
import requests
from errors import SnoothError
from handlers import http_error_handler, snooth_error_handler
from utils import wineify
try:
API_KEY = os.environ['API_KEY']
except KeyError:
API_KEY = None
sys.stderr.write('Please set os.environ["API_KEY"] = youra... |
import os
import os.path
import re
import string
class PageNotFoundError(Exception):
""" An error raised when no physical file
is found for a given URL.
"""
pass
class FileSystem(object):
""" A class responsible for mapping page URLs to
file-system paths, and for scanning the file-sys... |
# Copyright 2019 The Sonnet Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
"""Cover Platform for the Somfy MyLink component."""
import logging
from homeassistant.components.cover import CoverDeviceClass, CoverEntity
from homeassistant.const import STATE_CLOSED, STATE_OPEN
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.restore_state import RestoreEntity
from .... |
"""Package Install Manager for Python.
This is currently a MacOSX-only strawman implementation.
Motto: "He may be shabby, but he gets you what you need" :-)
Tools to allow easy installation of packages. The idea is that there is
an online XML database per (platform, python-version) containing packages
known to work... |
from test.support import run_unittest
import cgi
import os
import sys
import tempfile
import unittest
from io import StringIO
class HackedSysModule:
# The regression test will have real values in sys.argv, which
# will completely confuse the test of the cgi module
argv = []
stdin = sys.stdin
cgi.sys =... |
#!/usr/bin/python
# (c) 2013, Cove Schneider
# (c) 2014, Joshua Conner <joshua.conner@gmail.com>
# (c) 2014, Pavel Antonov <antonov@adwz.ru>
#
# This file is part of Ansible,
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the... |
# Copyright (c) 2011, 2012, 2013 by California Institute of Technology
# 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
# ... |
## \file
## \ingroup tutorial_math
## \notebook
## Principal Components Analysis (PCA) example
##
## Example of using TPrincipal as a stand alone class.
##
## I create n-dimensional data points, where c = trunc(n / 5) + 1
## are correlated with the rest n - c randomly distributed variables.
##
## Based on principal.C ... |
"""
Django settings for institutions 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 os
import io
from datetime import datetime
from decimal import Decimal
import unittest
import httpretty
import requests
import pytz
from cryptex.exchange import Cryptsy
import cryptex.trade
test_dir = os.path.dirname(os.path.realpath(__file__))
mock_dir = os.path.join(test_dir, 'mocks')
class CryptsyMock():
... |
from twisted.words.protocols import irc
from txircd.modbase import Command
from txircd.server import ModuleMessage
from txircd.utils import epoch, now
import collections
irc.RPL_STATS = "210"
irc.RPL_STATSOPERS = "249"
irc.RPL_STATSPORTS = "249"
class StatsCommand(Command):
def onUse(self, user, data):
if... |
#!/usr/bin/python
# Author: Anton Gustafsson
# Released under MIT license
from StepperMotorDriver import MotorControl
import mosquitto
from uuid import getnode as get_mac
import sys
class MQTTMotorControl(mosquitto.Mosquitto,MotorControl):
def __init__(self,Pins = [24,25,8,7],ip = "localhost", port = 1883,... |
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2011, Luis Pedro Coelho <lpc@cmu.edu>
# vim: set ts=4 sts=4 sw=4 expandtab smartindent:
#
# 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 witho... |
from __future__ import division
from ..base.uber_model import UberModel, ModelSharedInputs
import pandas as pd
class AgdriftInputs(ModelSharedInputs):
"""
Input class for Agdrift.
"""
def __init__(self):
"""Class representing the inputs for TerrPlant"""
super(AgdriftInputs, self).__in... |
class PreconnectMiddleware():
def process_response(self, request, response):
if response['Content-Type'] == 'text/html; charset=utf-8':
response['Link'] = '<//cdnjs.cloudflare.com>; rel=preconnect, <//www.google-analytics.com>; rel=preconnect, <https://login.persona.org>; rel=preconnect... |
import networkx as nx
import random
import operator
import numpy as np
from ATT.algorithm import surf_tools, tools
import matplotlib.pyplot as plt
from ATT.util import plotfig
from scipy import stats
class light_smallwd(object):
def __init__(self, nodenum, neighk, p):
G = nx.watts_strogatz_graph(nodenum, n... |
########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... |
"""
.. module:: system_builder.py
:synopsis: Build the matrix representation of the system of coupled
real-valued stochastic differential equations.
.. moduleauthor:: Jonathan Gross <jarthurgross@gmail.com>
"""
import numpy as np
def vectorize(operator, basis):
"""Vectorize an operator in a particular oper... |
from firedrake import *
from firedrake.petsc import PETSc
from firedrake.utils import cached_property
from pyop2.profiling import timed_stage
import numpy as np
from balance_pressure import compute_balanced_pressure
from extruded_vertical_normal import VerticalNormal
from solver import GravityWaveSolver
def fmax(f):
... |
# -*- coding: utf-8 -*-
"""MicroPython rotary encoder library for Pyboard/STMHal.
Usage:
from time import sleep_ms
from pyb_encoder import Encoder
enc = Encoder(pin_clk='X11', pin_dt='X12')
def readloop(enc):
oldval = 0
while True:
val = enc.value
if oldval !=... |
from RPi import GPIO
import sqlite3 as sqlite
from datetime import datetime
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
db = sqlite.connect("greenhouse.db")
cursor = db.cursor()
cursor.execute("""
CREATE TABLE IF NOT EXISTS
greenhouse (
datetime TEXT,
tem... |
"""
==========
Libsvm GUI
==========
A simple graphical frontend for Libsvm mainly intended for didactic
purposes. You can create data points by point and click and visualize
the decision region induced by different kernels and parameter settings.
To create positive examples click the left mouse button; to create
neg... |
#
# Copyright 2017-2018 B-Open Solutions srl.
# Copyright 2017-2018 European Centre for Medium-Range Weather Forecasts (ECMWF).
#
# 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://ww... |
# ***************************************************************************
# * *
# * Copyright (c) 2016 - Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
import binascii
import json
import os
import requests
from requests_toolbelt.multipart import encoder, decoder
import sys
from typing import List, Union
from urllib.parse import urlparse
import websocket
import torch
from gevent import monkey
import syft as sy
from syft.messaging.message import Message, PlanCommandM... |
#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2021-present MagicStack Inc. and the EdgeDB 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... |
import numpy as np
import sys
import argparse
import os.path
from numba import jit, njit
from csdlib import csdlib as csd
verbose = not True
def myLog(s: str = "", *args, **kwargs):
if verbose:
print(s, args, kwargs)
def getArgs():
# 1 handling the in line parameters
parser = argparse.Argu... |
##
# Copyright (c) 2016-present MagicStack Inc.
# All rights reserved.
#
# See LICENSE for details.
##
import argparse
import asyncio
import getpass
import os
import select
import sys
from prompt_toolkit import application as pt_app
from prompt_toolkit import buffer as pt_buffer
from prompt_toolkit import filters as... |
# -*- coding: utf-8 -*-
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
"""Example Plugin for EasyEngine."""
from cement.core.controller import CementBaseController, expose
from cement.core import handler, hook
from ee.core.variables import EEVariables
from ee.core.aptget import EEAptGet
from ee.core.download import EEDownload
from ee.core.shellexec import EEShellExec
from ee.core.fileuti... |
from ..base import BaseStatModel
from ..base import np
from ..utils import lazy_method
from itertools import combinations
class LinearModel(BaseStatModel):
def __init__(self, train_x, train_y, features_name=None):
super().__init__(train_x, train_y, features_name)
self.beta_hat = None
self.... |
'''
xam.addon
---------
Contains the Addon class to represent an XBMC addon
:copyright: (c) 2012 Jonathan Beluch
:license: BSD, see LICENSE for more details.
'''
from functools import wraps
from xml.etree import ElementTree as ET
try:
from collections import OrderedDict
except ImportError:
... |
#!/usr/bin/env python
from circuits.web import Controller
from circuits.web.wsgi import Application
class Root(Controller):
def index(self):
return "Hello World!"
application = Application() + Root()
|
# Copyright (c) 2015 Yubico AB
# 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... |
import sublime
import sublime_plugin
import os
from .common import log, hh_setting, hh_update_setting, help_package_prompt
from .common import current_help_file, current_help_package
from .view import find_help_view
from .core import help_index_list, lookup_help_topic
from .core import show_help_topic, navigate_help_... |
from unittest2 import TestCase
class TestNonFieldErrorsClassFormMixin(TestCase):
@property
def mixin(self):
from tcmui.core.forms import NonFieldErrorsClassFormMixin
return NonFieldErrorsClassFormMixin
@property
def form_class(self):
from django import forms
class P... |
############################################################################
# Copyright 2016 Albin Severinson #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may no... |
from django.contrib.gis.db import models
class Hospital(models.Model):
file_nbr = models.CharField(max_length=20)
license_number = models.CharField(max_length=20, unique=True)
name = models.CharField(max_length=250)
address = models.CharField(max_length=250)
zipcode = models.PositiveIntegerField()... |
# -*- coding: utf-8 -*-
import HTMLParser
import random
import requests
import datetime
import socket
import oembed
import urllib2
import urllib
import threading
import functools
import lxml.html
import lxml.etree as etree
import wikipedia as wiki
import re
import arrow
import string
from urlparse import urlparse
def ... |
# coding: utf-8
import logging
from flask.ext.script import Command, Option
from .models import Campaign
logger = logging.getLogger(__name__)
class ListCampaign(Command):
'''prints a list of campaigns'''
command_name = 'list_campaigns'
option_list = (
Option('--title', '-t', dest='title'),
... |
#!/usr/bin/env python
#
##############################################################################
### NZBGET POST-PROCESSING SCRIPT ###
# Converts files and passes them to Sonarr for further processing.
#
# NOTE: This script requires Python to be installed on your system.
... |
from __future__ import absolute_import
from django import forms
from django.contrib.auth.forms import PasswordChangeForm
from two_factor.forms import (
PhoneNumberMethodForm, DeviceValidationForm, MethodForm,
TOTPDeviceForm, PhoneNumberForm
)
from crispy_forms.helper import FormHelper
from crispy_forms import ... |
# -*- coding: utf-8 -*-
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.osv import expression
from odoo.tools.misc import formatLang
class AccountReconciliation(models.AbstractModel):
_name = 'account.reconciliation.widget'
_description = 'Account Reconciliation widget... |
# -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.db.models import Q, Sum
from django.http import Http404, HttpResponse
from django.utils.timezone import now
from django.utils.translation import ugettext_lazy as _
from django.shortcuts import get_object_or_404
from django.co... |
# Copyright (c) 2011-2014 by California Institute of Technology
# 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,... |
#
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
from django.db import models
from xobj import xobj
from mint.django_rest.rbuilder import modellib
import sys
from mint.django_field.rbuilder.projects import models as projmodels
class TargetImage(modellib.XObjIdModel):
class Meta:
db_table = u... |
import copy
import os
import logging
import archinfo
import elftools
from elftools.elf import elffile, sections
from elftools.dwarf import callframe
from elftools.common.exceptions import ELFError, DWARFError
from collections import OrderedDict, defaultdict
from sortedcontainers import SortedDict
from .symbol import E... |
from twisted.plugin import IPlugin
from twisted.words.protocols import irc
from txircd.module_interface import Command, ICommand, IModuleData, ModuleData
from zope.interface import implements
class ConnectCommand(ModuleData, Command):
implements(IPlugin, IModuleData, ICommand)
name = "ConnectCommand"
core = True
... |
# (C) Copyright 2015 Hewlett Packard Enterprise Development Company LP
import monasca_setup.detection
class Cinder(monasca_setup.detection.ServicePlugin):
"""Detect Cinder daemons and setup configuration to monitor them."""
def __init__(self, template_dir, overwrite=True, args=None):
service_params... |
# Copyright 2014 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
from __future__ import absolute_import
from __future__ import unicode_literals
from collections import namedtuple
import csv342 as csv
from datetime import date, datetime, timedelta
import io
import logging
import os
from celery import chain, group
from celery.schedules import crontab
from celery.task import periodic... |
"""
A python package to simulate X-ray lightcurves
from coherent signals and power spectrum models.
"""
__author__ = 'Riccardo Campana'
__version__ = '0.2.2'
from simulation import Simulation
from lcsinusoid import lcsinusoid
from lcpsd import lcpsd
from utils import poisson_randomization
from utils import psd
from u... |
# -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.website.website_generator import WebsiteGenerator
class Chapter(WebsiteGenerator):
_website = frappe._dict(
... |
#! /usr/bin/env python
# $Id$
"""Gnuplot.py -- A pipe-based interface to the gnuplot plotting program.
Copyright (C) 1998,1999 Michael Haggerty
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; eithe... |
# Simple Gnuplot interface.
#
# Written by Konrad Hinsen <hinsen@ibs.ibs.fr>
# last revision: 1997-5-23
#
# Caution: If you use a Gnuplot version earlier than 3.6beta,
# every call for a screen display creates another gnuplot
# process; these processes are never closed. There seems to be no
# other way to make gnuplot ... |
# -*- coding: utf-8 -*-
# Django settings for zamboni project.
import os
import logging
import socket
import product_details
# Make filepaths relative to settings.
ROOT = os.path.dirname(os.path.abspath(__file__))
path = lambda *a: os.path.join(ROOT, *a)
# We need to track this because hudson can't just call its ch... |
json_filepath="/var/tmp/applconn/static/applconn.json"
pathprefix='/var/tmp/applconn/static'
rsyncgitpath='/var/tmp/rsyncgit/'
##
list_import_def=[
#"import_ansible_facts",
#"import_haproxy",
"import_testlogic"
]
##
enable_ganglia=False
enable_elasticsearch=False
enable_prometheus=False
ganglia_url='htt... |
#! /usr/bin/env python
# This tries to import the most efficient reactor
# that's available on the system.
try:
from twisted.internet import epollreactor
epollreactor.install()
print 'Using epoll reactor'
except ImportError:
try:
from twisted.internet import kqreactor
kqreactor.install()
print 'Using kqueue... |
import os
import logging, logging.handlers
import environment
import logconfig
# If using a separate Python package (e.g. a submodule in vendor/) to share
# logic between applications, you can also share settings. Just create another
# settings file in your package and import it like so:
#
# from comrade.core.set... |
"""EcoData Retriever
This package contains a framework for creating and running scripts designed to
download published ecological data, and store the data in a database.
"""
import os
from os.path import join, isfile, getmtime, exists
import imp
from lib.compile import compile_script
VERSION = 'master'
REPO_URL =... |
import base64
import email.utils
import os
import smtplib
import time
import zlib
from Crypto import Random
from Crypto.Cipher import Blowfish
from Crypto.Hash import SHA
from email.mime.text import MIMEText
from flask import Flask, render_template, request, redirect, url_for
from threading import Thread
# BEGIN CHANG... |
#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
import os
import logging
from django.contrib import messages
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = ()
MANAGERS = ADMINS
# default to the system's timezone settings
TIME_ZONE = "UTC"
# Langua... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Configuration and raw manipulation for Dwarf Fortress."""
from __future__ import print_function, unicode_literals
import os, re, shutil
# Markers to read certain settings correctly
class _DisableValues(object):
"""Marker class for DFConfiguration. Value is disable... |
import bpy
import binascii
import struct
from liblas import file
from liblas import header
import multiprocessing
import time
# Blender Addon Information
# Used by User Preferences > Addons
bl_info = {
"name" : "LiDAR Importer",
"author" : "Brian Cordell Hynds",
"version" : (0, 1),
"blender" : (2, 6, 0... |
"""Anharmonic modes module for ASE
Docs follows Google's python styling guide:
http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
Developed by
Keld Lundgaard -- keld.lundgaard@gmail.com
Supervised by Thomas Bligaard
Other contributers:
Thomas Nygaard
"""
from __future__ import division
impo... |
from sys import path
from time import sleep
from urllib2 import HTTPBasicAuthHandler , build_opener, install_opener, urlopen
from subprocess import call, Popen
from ConfigParser import RawConfigParser, ConfigParser
from bs4 import BeautifulSoup
from os.path import expanduser, exists, join
__all__ = [path, sleep, HTTPBa... |
# Copyright 2016 Mycroft AI, Inc.
#
# This file is part of Mycroft Core.
#
# Mycroft Core 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 versio... |
# Copyright (c) 2015 Fraunhofer FOKUS. 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... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import argparse
import glob
import json
import logging as log
import os
import pymongo as m
import re
import sys
import time
from multiprocessing.pool import ThreadPool
###############################################################################
databases = []
collections ... |
# coding: utf-8
"""Test mdn.scrape."""
from __future__ import unicode_literals
from datetime import date
from json import dumps
from mdn.models import FeaturePage
from mdn.scrape import (
date_to_iso, end_of_line, page_grammar, scrape_page, scrape_feature_page,
slugify, PageVisitor, ScrapedViewFeature)
from we... |
from xmpp import *
from spade import *
from spade.ACLMessage import *
class accPlugIn(PlugIn):
#NS='jabber:x:fipa'
NS=''
def do(self, uno, dos):
print "####################################"
print "####################################"
print "############... |
#!/usr/bin/env python
##PACKAGES##
from __future__ import division
import sys
import warnings
import re
import itertools
import seaborn as sns
import pandas as pd
from matplotlib.lines import Line2D
import matplotlib.animation as animation
import matplotlib.pyplot as plt
from .._shared.helpers import *
from ..tools.cl... |
# -*- coding: utf8 -*-
from PyQt4 import QtGui, QtCore
class speciesListDialog(QtGui.QDialog):
_tableview = None
def __init__(self, parent, app):
QtGui.QDialog.__init__(self, parent)
self._app = app
self._parent = parent
self.initUI()
self.setWindowTitle('List species')
self.show()
def initUI(self):... |
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import copy
import json
import os
from collections import defaultdict
import mock
import pytest
from datadog_checks.kafka_consumer import KafkaCheck
from datadog_checks.kafka_consumer.kafka_consumer import OAu... |
from datetime import date
from celery.schedules import crontab
from celery.task import periodic_task
from django.core.management import call_command
from corehq.util.soft_assert import soft_assert
from .models import BackupRecord
import settings
GUINEA_CONTACT_TRACING_DOMAIN = 'guinea_contact_tracing'
GUINEA_CONTACT_... |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
AO integrals from spherical GTO basis representation to spinor-GTO basis
representation.
Generally, the transformation requires two steps. First is to form a
quaternion matrix (2x2 super matrix) using Pauli matrices (sigma_2x2)
1_2x2... |
import logging
from logika import IGRALEC_R, IGRALEC_Y, PRAZNO, NEODLOCENO, NI_KONEC, nasprotnik, NEVELJAVNO
from five_logika import Five_logika
from powerup_logika import Powerup_logika
from pop10_logika import Pop10_logika
from pop_logika import Pop_logika
import random
#######################
## ALGORITEM MINIMAX ... |
#!/usr/bin/env python3
#
# Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... |
# Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.