text stringlengths 12 6.59M |
|---|
# encryption.py - module for handling encrypted values
# coding: utf-8
#
# Copyright (C) 2014 Arthur de Jong
#
# This library 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 ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""psutil is a cross-platform library for retrieving information on
running processes and system utilization... |
import base64
import falcon
import json
import logging
from problems.problem1 import Problem1
from runners.python_runner import PythonRunner
import util
# Config applies to all other loggers
logging.basicConfig(format='[%(asctime)s] %(name)s:%(levelname)s: %(message)s', level=logging.DEBUG)
log = logging.getLogger(__... |
#!/usr/bin/env python
#
# $Id$
#
"""psutil is a module providing convenience functions for managing
processes in a portable way by using Python.
"""
__all__ = [
"NoSuchProcess",
"AccessDenied",
"NUM_CPUS",
"Process",
"test",
"CPUTimes",
"pid_exists",
"get_pid_list",
"process_iter",... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""psutil is a cross-platform library for retrieving information on
running processes and system utilization... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, print_function, absolute_import,
unicode_literals)
__all__ = ["Sampler", "default_beta_ladder"]
import numpy as np
import multiprocessing as multi
from . import util
def default_beta_ladder(ndim, ntemps=None, Tma... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Crawtext.
Usage:
crawtext.py <project> crawl <query> [--repeat]
crawtext.py <project> discover <query> [--file=<filename> | --key=<bing_api_key> | --file=<filename> --key=<bing_api_key>] [--repeat]
crawtext.py <project> restart
crawtext.py <project> stop
crawtext... |
#estimation tests
import pandas as pd
import numpy as np
import pdb
def _additive_estimate(event_times, timeline, observed, additive_f, initial, nelson_aalen_smoothing=False):
"""
nelson_aalen_smoothing: see section 3.1.3 in Survival and Event History Analysis
"""
n = timeline.shape[0]
_additi... |
'''
########################
Infusionsoft Experiment
########################
.. image:: https://travis-ci.org/BMJHayward/infusionsoft_xpmt.svg?branch=master
:target: https://travis-ci.org/BMJHayward/infusionsoft_xpmt
API wrapper for Infusionsoft CRM. Infusionsoft a.k.a. 'IS' from here on. Intended use is specifi... |
# Copyright 2021 The T5 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 writi... |
"""Probability and Likelihood Functions for Distribution Testing"""
from __future__ import division
import sys
from math import factorial, floor, sqrt
from numpy import exp, histogram, log, matlib, sort, pi, std, mean
import numpy as np
from scipy import integrate, stats, optimize, special
from scipy.stats import rv_d... |
# -*- coding: utf-8 -*-
#
# Copyright 2011, Caleb Callaway <enlightened-despot@gmail.com>
# Copyright 2008-2010, Frank Scholz <dev@coherence-project.org>
# Copyright 2008, James Livingston <doclivingston@gmail.com>
#
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
import rhythmdb
impo... |
import json
import logging
import sys
import time
from dnstrails import APIError
from dnstrails import DnsTrails
log = logging.getLogger('dnstrails')
log.setLevel(logging.DEBUG)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter(
'%(asctime)s - %(name)s - %(levelname)s... |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2019 Compassion CH (http://www.compassion.ch)
# @author: Emanuel Cino, Théo Nikles <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py
#
####################################... |
from __future__ import generators
# @(#)root/pyroot:$Id$
# Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
# Created: 02/20/03
# Last: 02/06/13
"""PyROOT user module.
o) install lazy ROOT class/variable lookup as appropriate
o) feed gSystem and gInterpreter for display updates
o) add readline completion (if supported b... |
from __future__ import generators
# @(#)root/pyroot:$Id$
# Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
# Created: 02/20/03
# Last: 09/30/16
"""PyROOT user module.
o) install lazy ROOT class/variable lookup as appropriate
o) feed gSystem and gInterpreter for display updates
o) add readline completion (if supported b... |
import subprocess as sp
from collections import defaultdict
import os
import logging
import networkx as nx
from . import utils
from . import docker_utils
from . import pkg_test
from . import upload
from conda_build import api
logger = logging.getLogger(__name__)
def build(recipe,
recipe_folder,
e... |
#!/usr/bin/env python
import os
import glob
import subprocess as sp
import argparse
import sys
import shutil
from collections import defaultdict, Iterable
from itertools import product, chain
import logging
import pkg_resources
import networkx as nx
import requests
from conda_build.metadata import MetaData
import yam... |
"""
Script to test setting up batch simaulations with Sumatra.
To set up environment.
$ smt init smt_repository
$ smt configure --executable=python --main=script.py
$ smt configure --addlabel=parameters
$ smt configure -g uuid
View data on laptop
$ ssh concorde
$ smtweb --allips --no-browser... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''It contains useful functions to build SQL with common Python's data types.'''
# The default styles of ``dumps``
encoding = 'UTF-8'
paramstyle = 'pyformat'
boolstyle = 'uppercase'
# A hyper None, because None represents null in SQL.
Empty = ___ = type('Empty', (obje... |
__author__ = 'Samuel Gratzl'
from flask import Flask, request, abort
from caleydo_server.config import view as configview
import caleydo_server.plugin
import itertools
from caleydo_server.util import jsonify
import sqlalchemy
import logging
_log = logging.getLogger(__name__)
app = Flask(__name__)
def _to_config(p):... |
""" SSS - Simple SWORD Server """
__version__ = "0.1"
__author__ = ["Richard Jones <richard@oneoverzero.com>"]
__license__ = "public domain"
import web, uuid, os, re, base64, hashlib, urllib
from lxml import etree
from datetime import datetime
from zipfile import ZipFile
from web.wsgiserver import CherryPyWSGIServer
... |
import csv
import sys
import os
import threading
from time import strftime, sleep
from datetime import datetime
from io import IOBase
import msgpack
import zmq
if len(sys.argv) > 1:
outfolder = sys.argv[1]
else:
outfolder = '.'
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SU... |
import sys
if len(sys.argv) != 3:
print "Usage: python svm.py <training data> <pickled model output>"
raise SystemExit(1)
import pickle
import pandas as pd
import numpy as np
from sklearn import svm
train = pd.read_csv(sys.argv[1],header=0)
num_fit = len(train)
#Separate out label data and convert to numpy ar... |
import hashlib
import functools
import glob
import sublime
import sublime_plugin
import urllib.request, urllib.parse, urllib.error
import threading
import json
import types
import os
import re
import time
import sys
import imp
import re
import logging
swi_folder = os.path.dirname(os.path.realpath(__file__))
if not swi... |
import hashlib
import functools
import glob
import sublime
import sublime_plugin
import urllib.request, urllib.parse, urllib.error
import threading
import json
import types
import os
import re
import time
import sys
import imp
swi_folder = os.path.dirname(os.path.realpath(__file__))
if not swi_folder in sys.path:
... |
import hashlib
import functools
import glob
import sublime
import sublime_plugin
import urllib.request, urllib.parse, urllib.error
import threading
import json
import types
import os
import re
import time
import sys
import imp
swi_folder = os.path.dirname(os.path.realpath(__file__))
if not swi_folder in sys.path:
... |
from lxml import etree
class TCXBase:
NS1 = 'http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2'
NS2 = 'http://www.garmin.com/xmlschemas/UserProfile/v2'
NS3 = 'http://www.garmin.com/xmlschemas/ActivityExtension/v2'
NS4 = 'http://www.garmin.com/xmlschemas/ProfileExtension/v1'
NS5 = 'http:/... |
#!/usr/bin/env python
import sys, os, getopt, md5, re, time, tempfile
from os.path import expanduser
# configuration
# hopefully all of these will be ported to a .trkrc
# and have command-line flags as well
CONFIG=dict()
# size of the md5 sum substring used as the task id
CONFIG['id_size']=4
# highlighting on
CONFIG... |
#!/usr/bin/env python
import sys, os, getopt, md5, re, time, tempfile
from os.path import expanduser
# configuration
# hopefully all of these will be ported to a .trkrc
# and have command-line flags as well
CONFIG=dict()
# size of the md5 sum substring used as the task id
CONFIG['id_size']=4
# highlighting on
CONFIG... |
#!/usr/bin/env python
import sys, os, getopt, md5, re, time, tempfile
from os.path import expanduser
# configuration
# hopefully all of these will be ported to a .trkrc
# and have command-line flags as well
CONFIG = {
# where to find the config file
'config': '%s/%s' % (expanduser('~'), '.trkrc'),
# what character... |
import os
import inspect
import json
from ruamel import yaml
from api_ai.models import Intent, Entity
from api_ai.api_ai import ApiAi
from flask_assistant.core import _dbgdump
class SchemaHandler(object):
def __init__(self, assist, object_type=None):
self.assist = assist
self.intents = []
... |
###############################################################################
# apogee.modelatm.atlas9: tools for dealing with ATLAS9 model atmospheres
###############################################################################
import os, os.path
import copy
import numpy
from scipy import interpolate, ndimage
fro... |
"""
Tasks must be done after project generate
"""
import os
import sys
SOURCE_PATH = 'tests/playbook.yml'
TARGET_PATH = 'playbook.yml'
try:
if os.path.exists(TARGET_PATH):
os.unlink(TARGET_PATH)
os.symlink(SOURCE_PATH, TARGET_PATH)
except OSError:
print('Symlink create error: {}'.format(TARGET_... |
import time
import threading
from houston.generator.base import MissionGenerator
from houston.branch import BranchID, BranchPath
from houston.mission import Mission, MissionOutcome
from houston.action import ActionOutcome, Action, ActionGenerator
class TreeBasedMissionGenerator(MissionGenerator):
def __init__(se... |
from __future__ import absolute_import
from collections import defaultdict
from django.contrib.auth import login, authenticate
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import Group, User
from django.contrib.sites.models import Site
from django.core.exceptions import Vali... |
from __future__ import absolute_import
import json
import datetime
import pytz
import logging
from django.core.mail import send_mail
from django.contrib.auth import authenticate, login as auth_login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import Group, User
from django... |
from app.bot import BaseMessenger
from flask import url_for, current_app as app
import requests
import json
class FacebookMessenger(BaseMessenger):
FACEBOOK_MESSAGE_URL = 'https://graph.facebook.com/v2.6/me/messages?'
FACEBOOK_ACCOUNT_LINK_URL = 'https://graph.facebook.com/v2.6/me?access_token=PAGE_ACCESS_TOK... |
""" Utilities for processing mathematical expressions used by obj_model models
:Author: Arthur Goldberg <Arthur.Goldberg@mssm.edu>
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2018-12-19
:Copyright: 2016-2019, Karr Lab
:License: MIT
"""
import collections
import math
import pint
import re
import token
import tokenize... |
from __future__ import (
absolute_import, division, print_function, unicode_literals)
from builtins import (ascii, bytes, chr, dict, filter, hex, input, # noqa
int, map, next, oct, open, pow, range, round,
str, super, zip)
from future import standard_library
standard... |
import os
import re
import time
from assertions import assert_all, assert_invalid, assert_one, assert_unauthorized
from cassandra import AuthenticationFailed, InvalidRequest, Unauthorized
from cassandra.cluster import NoHostAvailable
from cassandra.protocol import SyntaxException
from ccmlib.common import get_version_... |
#===================================================================================================
# C L A S S
#===================================================================================================
import sys, os, subprocess, re, time, datetime, smtplib, MySQLdb, shutil, string, glob
import phedexDataH... |
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Vaucher
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... |
import json
from django.http import HttpResponse
from djangoautoconf.django_utils import retrieve_param
from models import UfsObj
class ObjOperator(object):
def __init__(self, pk):
self.pk = pk
def rm(self):
for obj in UfsObj.objects.filter(pk=self.pk):
invalid_obj_and_rm_tags(obj... |
'''
This module determine and expose various information about the java
environment.
'''
import sys
from os.path import join, exists, dirname, realpath
from os import getenv
from platform import machine
from subprocess import Popen, check_output, PIPE
from shlex import split
from logging import getLogger
from textwrap... |
# -*- coding: utf8 -*-
__all__ = ('CodeAttribute', 'CodeException')
from struct import unpack, pack
from itertools import repeat
from collections import namedtuple
from jawa.attribute import Attribute, AttributeTable
from jawa.util.bytecode import (
read_instruction,
write_instruction
)
try:
from cString... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#This file is part of CanFestival, a library implementing CanOpen Stack.
#
#Copyright (C): Edouard TISSERANT, Francis DUPIN and Laurent BESSARD
#
#See COPYING file for copyrights details.
#
#This library is free software; you can redistribute it and/or
#modify it under th... |
import re
import os
import numpy as np
import urllib
from pyon.util.log import log
from email.utils import formatdate
from stat import ST_MTIME
from coverage_model.coverage import AbstractCoverage
from coverage_model.parameter_types import QuantityType,ConstantRangeType,ArrayType, ConstantType, RecordType, CategoryTyp... |
# Copyright 2015 NEC Corporation. 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 ... |
#!/usr/bin/env python
import requests, json, sys, time
from pprint import pprint
import autofocus_config
AF_APIKEY = autofocus_config.AF_APIKEY
# Useful information:
#
# * We're not doing any input validation in the client itself. We pass
# the data to the API, and rely on 4XX errors to communicate invalid
# requ... |
import pandas as pd
from pandas import DataFrame, read_sql
from pandas.tools.pivot import pivot_table
from datapoints.models import *
class CacheRefresh(object):
'''
Any time a user wants to refresh the cache, that is make any changes in the
datapoint table avalaible to the API and the platform as a whole... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#This file is part of CanFestival, a library implementing CanOpen Stack.
#
#Copyright (C): Edouard TISSERANT and Francis DUPIN
#
#See COPYING file for copyrights details.
#
#This library is free software; you can redistribute it and/or
#modify it under the terms of the GN... |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
없음 = None
____id = id
____debug = False
____locals = locals
____globals = globals
____range = range
____eval = eval
____modules = {}
def ____getmodule(name):
# TODO sys.modules 같은 import된 모듈 저장소가 필요
if name not in ____modules:
____modules[name] = ____run_code(open(name + '.yak').read(), name+'.yak')
... |
import time
from ethereum.config import Env
from ethereum.utils import sha3
import rlp
from rlp.utils import encode_hex
from ethereum import processblock
from ethereum.slogging import get_logger
from ethereum.processblock import validate_transaction
from ethereum.exceptions import InvalidTransaction
from ethereum.chain... |
#!/usr/bin/python3
import argparse
import sys
import datetime
from bs4 import BeautifulSoup
import tld
def main():
parser = argparse.ArgumentParser(description="autolink v2")
parser.add_argument("url", type=str, help="the URL")
parser.add_argument("-f", "--filetype", type=str,
help="output fil... |
import sys
import json
from pprint import pprint
from django.db import connection
from datapoints.models import *
class CalcTarget(object):
def __init__(self):
self.cursor = connection.cursor()
self.global_cache = dict()
x,y,z = self.run_engine(158,0)
def run_engine(self,campaign_... |
"""
This a nonuniform sampler with ANGIE scheme. |br|
The modules samples the given signals nonuniformly. |br|
THe sampling aptterns are generated using ANGIE scheme.
*Author*:
Jacek Pierzchlewski, Aalborg University, Denmark. <jap@es.aau.dk>
*Version*:
0.1 | 26-MAY-2014 : * Initial version. |br|
0.2 |... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
copyright_notice="""/*
This file is part of CanFestival, a library implementing CanOpen Stack.
Copyright (C): Edouard TISSERANT and Francis DUPIN
See COPYING file for copyrights details.
This library is free software; you can redistribute it and/or
modify it under the t... |
# Copyright (c) 2016, Henrique Miranda
# All rights reserved.
#
# This file is part of the yambopy project
#
from yambopy import *
from yambopy.netcdf import *
from yambopy.plot import *
ha2ev = 27.211396132
class YamboRTDB():
"""
Open the RT databases and store it in a RTDB class
"""
def __init__(sel... |
__author__ = "Andre Merzky"
__copyright__ = "Copyright 2012-2013, The SAGA Project"
__license__ = "MIT"
import re
import os
import sys
import errno
import saga.utils.logger as sul
import saga.utils.pty_shell_factory as supsf
import saga.exceptions as se
_PTY_TIMEOUT = 2.0
# ----------... |
import os
import json
from django.core.management.base import BaseCommand
from opencivicdata.core.models import Post
class Command(BaseCommand):
help = 'make JSON files for boundaries'
def add_arguments(self, parser):
parser.add_argument('year', help='year')
parser.add_argument('--state', hel... |
#!/usr/bin/python2.4
#
# Copyright (c) 2006-2007 rPath, Inc. All rights reserved.
#
"""
rMake Backend server
"""
import errno
import itertools
import logging
import pwd
import os
import shutil
import signal
import sys
import time
import traceback
import xmlrpclib
from conary.deps import deps
from conary.lib import ut... |
#!/usr/bin/env python
#===============================================================================
# Copyright (c) 2014 Geoscience Australia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
... |
#!/usr/bin/python3
import re, traceback, sys, os, collections, urllib.parse
import asyncio
# pip3 install --user http-parser
try:
from http_parser.parser import HttpParser
except ImportError:
from http_parser.pyparser import HttpParser
#attr kind: Int, could be 0 to parseonly requests,
# 1 to parse only r... |
#!/usr/bin/env python
"""This is a global script that takes actual or simulated Fermi data and searches it for transients
actual data is specified by a date, simulated is given by a specific ft1 or ft2 file"""
import argparse
from astropy.io import fits
import os
from SULI.execute_command import execute_command
... |
"""yaurtww.
Usage:
yaurtww <filename> --dest=<target>
yaurtww (-h | --help)
yaurtww --version
Options:
-h --help Show this help message.
--version Show version.
"""
from __future__ import absolute_import, division, print_function
from .__about__ import (
__author__, __copyright__, __emai... |
#!/usr/bin/env python
#
# 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 ... |
import z3
import z3.z3util as z3u
import hyped.schema as h
import hyped.xmlparser as xmlparser
import itertools
import copy
import re
def simplify(expr):
tac = z3.Then(
z3.Tactic('purify-arith'),
# z3.Tactic('simplify'),
z3.Tactic('propagate-values'),
# z3.Tactic('propagate-ineqs')... |
import re
from crosscompute.exceptions import DataTypeError
from crosscompute.scripts.serve import import_upload
from crosscompute_table import TableType
from invisibleroads_macros.geometry import (
drop_z, flip_xy, transform_geometries)
from invisibleroads_macros.math import define_normalize
from invisibleroads_ma... |
# Import the camera server
import logging
import cv2
import numpy as np
from networktables import NetworkTables
import robotmap
from cscore import CameraServer
class Camera:
def __init__(self, width, height):
# Allocating new images is very expensive, always try to preallocate
self.width, self.h... |
# Copyright (c) 2018 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... |
from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
import sys
class ProgressBar:
def __init__(self, start=0, stop=100):
self._state = 0
self._start = start
self._stop = stop
def reset(self, val=0):
self.... |
#
# Copyright (c) 2004-2005 Specifix, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.opensource.o... |
import os
import django
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', '... |
# -*- coding: utf-8 -*-
'''
Watch files and translate the changes into salt events
:depends: - pyinotify Python module >= 0.9.5
:Caution: Using generic mask options like open, access, ignored, and
closed_nowrite with reactors can easily cause the reactor
to loop on itself. To mitigate this... |
from __future__ import absolute_import
from . import colored
from .core import * |
# -*- coding:utf-8 -*-
from django.conf import settings
def common_values(request):
values = {
'GOOGLE_ANALYTICS_PROPERTY_ID': getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_ID', ''),
'GOOGLE_SITE_VERIFICATION_ID': getattr(settings, 'GOOGLE_SITE_VERIFICATION_ID', ''),
'settings': settings.D... |
#import modules
from __future__ import division
from sys import argv
import re
from collections import Counter
from sets import Set
import matplotlib.pyplot as plt
import xml.etree.ElementTree as ET
import MySQLdb
#create xml collection of "docs" (i.e., programs in NYPhil's definition)
tree = ET.parse('../Programs/com... |
from unittest import TestCase
import math
import ddsc.config
import multiprocessing
from mock.mock import patch
class TestConfig(TestCase):
def test_empty_config(self):
config = ddsc.config.Config()
self.assertEqual(config.url, ddsc.config.DUKE_DATA_SERVICE_URL)
self.assertEqual(config.use... |
from DOJO.dojo import Dojo
from FELLOW.fellow import Fellow
from LIVINGSPACE.livingspace import LivingSpace
from OFFICE.office import Office
from PERSON.person import Person
from ROOM.room import Room
from room_allocator import InteractiveRoomAllocator
import unittest
from cmd import Cmd
class CreateRoomTest(unittest... |
#!/usr/bin/env python
from boto3.session import Session
import botocore.exceptions
import uuid
import yaml
from datetime import datetime
import os
import requests
import requests.exceptions
import pivnet
import opsmanapi
import wait_util
import sys
import json
import dnsmapping
# Othwerise urllib3 warns about
# self... |
# -*- coding: utf-8 -*-
'''
All salt configuration loading and defaults should be in this module
'''
# Import python libs
from __future__ import absolute_import
from __future__ import generators
import os
import re
import sys
import glob
import time
import codecs
import logging
from copy import deepcopy
import types
... |
''' -- imports from python libraries -- '''
import datetime
# from datetime import datetime
''' -- imports from installed packages -- '''
from django.http import HttpResponseRedirect #, HttpResponse uncomment when to use
from django.http import HttpResponse
from django.http import Http404
from django.shortcuts import ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2014 Thibaut Lapierre <root@epheo.eu>. 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
#
# ... |
"""Install packages via the MacOSX Homebrew and Linux Linuxbrew package manager.
https://github.com/mxcl/homebrew
https://github.com/Homebrew/linuxbrew
"""
import contextlib
from distutils.version import LooseVersion
import os
from cloudbio.flavor.config import get_config_file
from cloudbio.fabutils import quiet, find... |
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from coaster.sqlalchemy import BaseMixin
from .fields import FileField
from .constants import PRIVACY_TYPE
from ..utils import STRING_LEN, GENDER_TYPE, id_generator, object_list_to_named_dict
from ..extensions import db
from ..telephony import PhoneNu... |
import logging
import numpy as np
import copy
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
from sklearn.ensemble import AdaBoostClassifier, AdaBoostRegressor
logger = logging.getLogger('disteval.discretization.TreeBinningSklearn')
def __sample_uniform__(y, sample_weight=None):
"""Fun... |
from django.utils.translation import ugettext_lazy as _
from django.db.models import Count
from source import models as source_models
from contracts import models as contract_models
from voting import models as voting_models
class DashboardCard(object):
"""
Represents dashboard card / list-group
"""
... |
VERSION = (0, 8, 1, 'alpha')
__version__ = '.'.join(map(str, VERSION))
|
# coding=utf-8
import datetime
from .base import VKBase
from .database import City, Country
from .friends import Friends
from .wall import Wall
class User(VKBase):
"""
https://vk.com/dev/objects/user
"""
USER_FIELDS = ('bdate', 'domain', 'sex',
'maiden_name', 'nickname', 'verified'... |
# -*- coding: utf-8 -*-
'''
All salt configuration loading and defaults should be in this module
'''
# Import python libs
from __future__ import absolute_import
from __future__ import generators
import os
import re
import sys
import glob
import time
import codecs
import logging
from copy import deepcopy
import types
... |
''' -- imports from python libraries -- '''
# import os -- Keep such imports here
import json
import datetime
''' -- imports from installed packages -- '''
from django.http import HttpResponseRedirect
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.shortcuts import render_... |
from django.conf.urls import url
from . import views
app_name = 'exams'
urlpatterns = [
url(
r'^$',
views.AllExamsView.as_view(),
name='all-exams-list'
),
url(
r'^(?P<class_number>8|9|1[0-2])/$',
views.AllClassExamsView.as_view(),
name='all-class-exams-list'... |
"""Install packages via the MacOSX Homebrew and Linux Linuxbrew package manager.
https://github.com/mxcl/homebrew
https://github.com/Homebrew/linuxbrew
"""
import contextlib
from distutils.version import LooseVersion
import os
import sys
from cloudbio.custom import system, shared
from cloudbio.flavor.config import get... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import base64
import binascii
import calendar
import codecs
import contextlib
import ctypes
import datetime
import email.utils
import errno
import functools
import gzip
import io
import itertools
import json
import locale
import mat... |
#!/usr/bin/env python
import fcntl
import getopt
import json
import logging
import os
import signal
import socket
import sys
import time
import traceback
from ConfigParser import ConfigParser
from logging.handlers import SysLogHandler
from roushagent.modules import OutputManager
from roushagent.modules import InputM... |
#!/usr/bin/env python3
import sys
import os
import datetime
import urllib.request
import re
import configparser
import vk
import progressbar
config = configparser.ConfigParser()
config.read('config.ini')
vk_token = config['DEFAULT']['access_token']
session = vk.Session(access_token=vk_token)
api = vk.API(session)
... |
#!/usr/bin/env python
# Run from directory above all the database gbks
import argparse
import os
import re
import csv
import sys
import pandas as pd
import logging
from collections import defaultdict
from dojo.taxonomy import NCBITree
from ninja_utils.parsers import FASTA
# The arg parser
def make_arg_parser():
pa... |
# -*- coding: utf-8 -*-
'''
All salt configuration loading and defaults should be in this module
'''
# Import python libs
from __future__ import absolute_import
from __future__ import generators
import os
import re
import sys
import glob
import time
import codecs
import logging
from copy import deepcopy
import types
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.