src stringlengths 721 1.04M |
|---|
"""TOOD: We need to test the basic command functionality, ensuring that
at it's core, import, export and init are operative, create the files they
should create, skip the files they should skip when they should be skipped,
etc. In particular, we should test both the case of multiple XML input files
(strings.xml, arrays... |
# Generated by Django 3.2.2 on 2021-05-10 21:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('screenshow', '0002_auto_20180711_2110'),
]
operations = [
migrations.AlterField(
model_name='ircmessage',
name='id',... |
#!/usr/bin/env python
# File: dataset_uci_classes.py
# Author: James Bedell, 8/20/13
#
# Specififc details for UCI CSV data sets
#
# Copyright 2013-2015, by the California Institute of Technology. ALL
# RIGHTS RESERVED. United States Government Sponsorship
# acknowledged. Any commercial use must be negotiated with the... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import os
from pyredex.utils import with_temp_cleanup
from tools.bytecode_debugger.inject_debug_lib import run_debug_injector... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
#On the name of ALLAH and may the blessing and peace of Allah
#be upon the Messenger of Allah Mohamed Salla Allahu Aliahi Wassalam.
#Author : Fouad Teniou
#Date : 10/07/10
#version :2.6
"""
maclaurin_ln is a function to compute ln(x) using maclaurin series
and the interval of convergence is -1 < x < +1
ln(y) = ln(1+x... |
#!/usr/bin/python
import MySQLdb
import datetime
prekes = [None] * 16
automatoId=1
data = str(datetime.date.today())
prekesId = None
prekesPav = "Niekas"
def prisijungimas():
db = MySQLdb.connect(host="pardavimuaparatas2.mysql.database.azure.com",
user="pi@pardavimuapar... |
# -*- coding: UTF-8 -*-
# Copyright (C) 2011 Juan David Ibáñez Palomar <jdavid@itaapy.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option... |
"""
WSGI config for saveyourvote 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_APPLICATI... |
import sys
import requests
import os
import time
import logging
from core.region_connection import EC2Connection
from config import AMI, SIZE, DEPLOY_PRIVATE_PATH, DEPLOY_PUBLIC_PATH
from aws.keypair import create_keypair
from aws.ec2 import create_instance_profile
TEST_URL = 'http://%s/?url=http://httpbin.org/user-a... |
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import itertools
import oper... |
"""
A dialog widget for selecting an item.
"""
from typing import Iterable, Optional, Any
from AnyQt.QtWidgets import (
QDialog, QWidget, QVBoxLayout, QDialogButtonBox, QSizePolicy
)
from AnyQt.QtCore import Qt, QStringListModel, QAbstractItemModel
from AnyQt.QtCore import pyqtSignal as Signal
from . import previ... |
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... |
# Generated by Django 2.0.2 on 2018-03-13 17:23
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('fund... |
##################################################
# shitsu - tiny and flexible xmpp bot framework
# Copyright (C) 2008-2012 Kagami Hiiragi <kagami@genshiken.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free So... |
# coding: utf-8
import json
from django import forms
from parkkeeper import models
from croniter import croniter
class BaseSchedule(forms.ModelForm):
def clean_options_json(self):
options_json = self.cleaned_data.get('options_json')
if options_json:
try:
options = json... |
#!/usr/bin/env python2
"""List available machines on all clouds, using mist.io API
This will show all machines on all clouds, no matter if they are
enabled or disabled from the mist.io dashboard
"""
import json
import sys
import time
import json
import multiprocessing.pool
try:
import requests
except ImportError... |
# Copyright (C) 2011 Midokura KK
# Copyright (C) 2011 Nicira, Inc
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
# Copyright 2016 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... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2010 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (... |
#!/usr/bin/env python
import mapnik
import sys
import math
import json
import os
import time
import codecs
import re
import regions
import Utfgrid
import gzip
from PIL import Image, ImageMath
import color_to_alpha
try:
from osgeo import gdal
from osgeo import osr
except ImportError:
import gdal
import... |
"""
Functions for accessing and displaying courses within the
courseware.
"""
from datetime import datetime
from collections import defaultdict
from fs.errors import ResourceNotFoundError
import logging
from path import Path as path
import pytz
from django.http import Http404
from django.conf import settings
from edx... |
# Copyright 2013 Nebula, 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 required by ... |
# coding: utf-8
# In[1]:
import requests
import json
from IPython.display import display
import time
class ObsGrabber:
'''
Grabs the observations for a specific species (with the taxonomy id) and a request delta. The request delta
is the time in seconds to wait inbetween each request.
... |
# -*- coding: utf8 -*-
# This file is part of PYBOSSA.
#
# Copyright (C) 2015 Scifabric LTD.
#
# PYBOSSA is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your op... |
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: cygwinccompiler.py
"""distutils.cygwinccompiler
Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the ... |
'''
Appends the average conservation score of a region to each entry in a bed file
usage:
python conservationBed.py [OPTIONS] bedfile outputfile <conservationfile>
'''
import sys, tabix, optparse
p = optparse.OptionParser()
p.add_option('-p', '--padded',action = 'store', dest = 'pad', help = 'Program will remove... |
'''
Diagnoses available simulator input and outputs
'''
import joysticks,state,log,phidgets
# debug joysticks
for j in range(0, joysticks.numJoysticks()) :
joy = joysticks.get(j)
for b in range(0, joy.numButtons()) :
key = "joysticks.get('%s').button(%d)" % (joy.name, b)
... |
# TODO: fix and check all command-line arguments
from util import debug_print
from pygame import image, Rect, Surface
from pygame.locals import KEYDOWN, KEYUP, USEREVENT
import pygame
import sys
import random
import json
import os
from collections import namedtuple
from functools import partial
import argparse
import... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 (... |
#!/usr/bin/python2.4
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
#
# $Id$
#
# Copyright (C) 1999-2006 Keith Dart <keith@kdart.com>
#
# 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... |
from seo.models import MetaPage, MetaSite
class MetaContent(object):
"""
MetaContent class define an object that contain informations about page or publication.
These informations are included in template.
"""
def __init__(self):
self.title = ""
self.description = ""
self... |
# -*- coding: utf-8 -*-
#
# pwnypack documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 25 15:04:19 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... |
from django.db.models import Manager
from django.db.models import Sum
from django.db.models.query import RawQuerySet
from le_utils.constants import content_kinds
from rest_framework import serializers
from kolibri.core.content.models import ChannelMetadata
from kolibri.core.content.models import ContentNode
from kolib... |
import numpy as np
import scipy.stats as stats
import scipy.integrate as integrate
Z_normal = { None: 1, '90': 1.644854, '95': 1.959964, '99': 2.575829, '99.9': 3.290527, '99.99': 3.890592 }
# % Generic % #
def mean(v):
return np.mean(v)
def var(v):
return np.var(v, ddof=1)
def std(v):
return np.std... |
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 8, 0.01)
myb = []
for i in x:
if np.floor(i)%2 == 0:
myb.append(1)
else:
myb.append(0)
y = np.array(myb)
plt.subplot(121)
plt.plot(x,y)
plt.xticks([2,4,6],("-T","0","T"))
plt.tick_params(axis='x', labelsize="15")
plt.ylim([-... |
"""
Test reload for trained models.
"""
__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "MIT"
import unittest
import tempfile
import numpy as np
import deepchem as dc
import tensorflow as tf
from sklearn.ensemble import RandomForestClassifier
class TestReload(unit... |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os
import re
from setuptools import setup, find_packages
THIS_DIR = os.path.dirname(os.path.realpath(__name__))
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from multiplexer.multiplexer_constants import peers, types
from obci.control.peer.configured_multiplexer_server import ConfiguredMultiplexerServer
from obci.configs import settings, variables_pb2
import random, time, sys
from obci.drivers import drivers_logging as logger
... |
import urllib,urllib2,re,xbmcplugin,xbmcgui
def getURL(url):
useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
req = urllib2.Request(url)
req.add_header('User-Agent', useragent)
response = urllib2.urlopen(req)
link=response.read()
response.close()
return li... |
import bpy
from mathutils import *
from .util import *
from .transform import *
from .renderbuffer import *
from .morphtarget import *
from .material import *
from io_scene_cs.utilities import B2CS
class Hierarchy:
OBJECTS = {}
exportedFactories = []
def __init__(self, anObject, anEmpty):
self.object = anO... |
__author__ = 'aje'
#
# Copyright (c) 2008 - 2013 10gen, Inc. <http://10gen.com>
#
# 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 r... |
"""Boolean algebra module for SymPy"""
from sympy.core import Basic, Function, sympify, Symbol
from sympy.utilities import flatten
class BooleanFunction(Function):
"""Boolean function is a function that lives in a boolean space
It is used as base class for And, Or, Not, etc.
"""
pass
class And(Boolea... |
# -*- encoding: utf-8 -*-
##############################################################################
#
# Avanzosc - Avanced Open Source Consulting
# Copyright (C) 2011 - 2012 Avanzosc <http://www.avanzosc.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Anotações da aula 1:
Toda função que apresenta parâmetros não é exposta:
Ex:
def soma(x, y):
return x + y
Existe no objeto request variáveis vars, post_vars e get_vars separadas.
Utilize redirect('http://www.google.com') para redirecionar para outra págin... |
"""Initial db
Revision ID: 93662ac30d13
Revises: None
Create Date: 2016-07-26 13:32:26.181303
"""
# revision identifiers, used by Alembic.
revision = '93662ac30d13'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('users',
sa.Column('username', sa.String(l... |
#
# Astroid documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 26 15:00:40 2013.
#
# 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 configuration values ha... |
# ------------------------------------------------------------------------------
# Screenshot All Channels
# ------------------------------------------------------------------------------
# Will do Screenshots of all Channels and export them based on the path provided
# in Screenshot Settings
# ------------------------... |
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# 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/LICEN... |
from django.db import models
from django.utils import timezone
from urllib.request import urlretrieve
import hashlib
import os
from django.conf import settings
from math import ceil
# Create your models here.
class Item(models.Model):
'''All items discovered by players in the game'''
item_id = models.PositiveI... |
# routines to support generating panda3d models
import subprocess
import cv2
import math
import numpy as np
import os
import scipy.spatial
from . import camera
from .logger import log, qlog
def make_textures(src_dir, analysis_dir, image_list, resolution=512):
dst_dir = os.path.join(analysis_dir, 'models')
if... |
#! /usr/bin/env python
# $Id: massage.py 4114 2010-11-09 16:25:15Z kena $
import sys
import notes
import re
thenote = sys.argv[1]
outfile = sys.argv[2]
insref = int(sys.argv[3])
makemath = int(sys.argv[4])
notes.init_repo(sys.argv[5:])
note = notes.repo.get(thenote)
deps = note.get_deps()
deps.sort(notes.cmpkey)
p... |
# -*- coding: utf-8 -*-
# pylint: disable-msg=W0612,E1101
from collections import OrderedDict
import numpy as np
from numpy import nan
import pytest
from pandas.compat import u
from pandas.core.dtypes.common import is_integer_dtype
import pandas as pd
from pandas import Categorical, DataFrame, Index, Series, get_d... |
from ev3.ev3dev import Motor
import unittest
import time
from util import get_input
class TestMotor(unittest.TestCase):
get_input('Attach a motor on port A then continue')
def __init__(self,*args, **kwargs):
super(TestMotor, self).__init__(*args, **kwargs)
self.d=Motor(port=Motor.PORT.A... |
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Licen... |
import json
import time
import boto3
ddb = boto3.client('dynamodb')
def handler(event, context):
try:
print "X-Forwarded-For %s %s" % (repr(time.time()),
event['InputParams']['header']['X-Forwarded-For'].replace(',',''))
except:
pass
if 'MessagesTa... |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-08-31 05:44
from __future__ import unicode_literals
from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import markupfield.fields
... |
# -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
import os
import sys
import time
import types
import signal
import subprocess
import logging
import multiprocessing
import threading
# Import salt libs
import salt.defaults.exitcodes
import salt.utils
# Import 3rd-party libs
import ... |
# encoding: utf-8
"""
reactor.py
Created by Thomas Mangin on 2012-06-10.
Copyright (c) 2009-2013 Exa Networks. All rights reserved.
"""
import os
import re
import sys
import time
import signal
import select
from collections import deque
from exabgp.reactor.daemon import Daemon
from exabgp.reactor.listener import Li... |
from mock import MagicMock, patch
from django.test import TestCase
from discover_jenkins import runner, tasks
class FakeTestRunner(object):
"""
A fake object to stub out the base methods that the mixin's super() calls
require.
"""
def setup_test_environment(self):
pass
def teardown_... |
"""
A collection of functions for transforming expression trees
"""
from rmathics.expression import BaseExpression, Expression, Symbol
from rmathics.rpython_util import all
def flatten(expr, depth=-1, head=None):
"""
flattens an Expression
- a negative depth allows for infinite recursion
- only f... |
'''Evaluates expressions in a namespace.'''
from api import Api
class Executor(object):
"""
Executes statements and expressions.
Manages the name space and access to definitions.
"""
def __init__(self):
self._api = Api()
self._namespace = {'api': self._api}
def addNamespace(self, namespace):
... |
# coding=utf-8
from flask import request
from flask import jsonify
from flask import g
from flask import url_for
from . import api
from ..api import auth
from .errors import action_failed
from app.core.models.posts import Post
@api.route('/posts', methods=['POST'])
@auth.login_required
def add_post():
if not g.... |
# -*- coding: utf-8 -*-
"""
tests
~~~~~
tests package
"""
from unittest import TestCase
from backend.core import db
from .factories import UserFactory
from .utils import FlaskTestCaseMixin
class OverholtTestCase(TestCase):
pass
class OverholtAppTestCase(FlaskTestCaseMixin, OverholtTestCase):
... |
# -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010> Gabriel Falcão <gabriel@nacaolivre.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, ei... |
from __future__ import print_function,absolute_import,division,unicode_literals
_B=False
_A=None
import sys
from .compat import no_limit_int
from .anchor import Anchor
if _B:from typing import Text,Any,Dict,List
__all__=['ScalarFloat','ExponentialFloat','ExponentialCapsFloat']
class ScalarFloat(float):
def __new__(D,*... |
# -*- coding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
#... |
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch import optim
use_cuda = torch.cuda.is_available()
def evaluate(config_params, encoder, decoder, sentence):
SOS_TOKEN = int(config_params["RNN"]["sos_token"])
EOS_TOKEN = int(config_params["RNN"]["eos_token"])
max_length = int... |
import os
import dj_database_url
### Basic config
BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
DEBUG = TEMPLATE_DEBUG = True
SITE_ID = 1
SECRET_KEY = 'its-a-secret-to-everybody'
# Until Sentry works on Py3, do errors the old-fashioned way.
ADMINS = []
# General project information
# T... |
CARTO_VL_VERSION = 'v1.4'
CARTO_VL_DEV = '/dist/carto-vl.js'
CARTO_VL_URL = 'https://libs.cartocdn.com/carto-vl/{}/carto-vl.min.js'.format(CARTO_VL_VERSION)
AIRSHIP_VERSION = 'v2.3'
AIRSHIP_COMPONENTS_DEV = '/packages/components/dist/airship.js'
AIRSHIP_BRIDGE_DEV = '/packages/bridge/dist/asbridge.js'
AIRSHIP_MODULE_D... |
# vim: set ts=2 expandtab:
# -*- coding: utf-8 -*-
"""
Module: hikaritv.py
Desc: Hikari tv service channel info
Author: on_three
Email: on.three.email@gmail.com
DATE: Sat, September 6th 2014
"""
CHANNEL_LIST = {}
class Channel(object):
def __init__(self, name, number, jname, desc, tuner, aliases=... |
import re
from urllib2 import Request, urlopen, URLError
import json
def handle(text, speaker):
# method to get the wiki summary
get_wiki(text, speaker)
def get_wiki(title, speaker):
# get the user voice input as string
# make a call to the Wikipedia API
request = Request('https://en.wikipedia.or... |
#!/usr/bin/python
import sys
import subprocess as sb
import pylab as pl
import argparse
from utilities import filesFromList
from plotTools import userLabels, plotCSV
'''
Description:
Author: Mikko Auvinen
mikko.auvinen@helsinki.fi
University of Helsinki &
Finnish Meteorological Institute
''... |
# Bernard Gutermann - 2013
##############################################################################
# mpl_plots.py
# Experiment plotter
##############################################################################
import os
import re
import numpy as np
import matplotlib.pyplot as plt
PATH = 'results/mlp'
direct... |
# Copyright 2021 DeepMind Technologies Limited.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... |
import string
import re
import sys
from pprint import pprint
"""
utils.py is a library of methods for dealing with streams (or lists) of tuples
and objects as generated by some of the other libraries for data cleaning, here.
"""
def query( stream ):
"""
Takes a generator and returns a list. The terminal operator i... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class AccountMove(models.Model):
_inherit = 'account.move'
def _post(self, soft=True):
vendor_bill_service = self.env.ref('account_fleet.data_fleet_service_type_... |
#!/usr/bin/env python
#
# Microsoft Azure Linux Agent setup.py
#
# Copyright 2013 Microsoft Corporation
#
# 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/... |
####################################################################################################
#
# Musica - A Music Theory Package for Python
# Copyright (C) 2017 Fabrice Salvaire
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... |
"""Websocket client implementation.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import json
import logging
import socket
import time
import websocket as ws_client
from treadmill import context
_LOGGER = lo... |
# 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
# Copyright (c) 2012-2014 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# $Id: lookupsid.py 1101 2014-01-14 22:15:30Z bethus@gmail.com $
#
# DCE/RPC lookup s... |
# Copyright (C) 2001-2007 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ... |
# -*- coding: utf-8 -*-
#
# backscatter documentation build configuration file, created by
# sphinx-quickstart on Mon Aug 29 14:27:57 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.
#... |
# Copyright 2020 The SQLFlow 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 law o... |
import json
from django.http import HttpResponse
from django.core.exceptions import ObjectDoesNotExist
from catmaid.models import UserRole, Project, Relation, Treenode, Connector, \
TreenodeConnector, ClassInstance
from catmaid.control.authentication import requires_user_role, can_edit_or_fail
@requires_user... |
#!/usr/bin/env python
"""
Emoji Example
===============
A simple example that shows how to include emoji. Note that this example does not seem to work on OS X, but does
work correctly in Ubuntu.
There are 3 important steps to follow to include emoji:
1) Read the text input with io.open instead of the built in open. ... |
import warnings
import itertools
from copy import copy
from functools import partial
from collections.abc import Iterable, Sequence, Mapping
from numbers import Number
from datetime import datetime
import numpy as np
import pandas as pd
import matplotlib as mpl
from ._decorators import (
share_init_params_with_ma... |
#!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to us... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bottle import template, redirect, request
import utils, json
from passlib.hash import bcrypt
def GET(**params):
table = utils.RenderTable(\
"""SELECT * FROM users""",\
(),\
u"""
<tr>
<th><input type="checkbox"></th>
<th>Usuario</th>... |
# -*- coding: utf-8; -*-
#
# @file establishment.py
# @brief coll-gate organisation establishment model REST API
# @author Frédéric SCHERMA (INRA UMR1095)
# @date 2017-01-03
# @copyright Copyright (c) 2017 INRA/CIRAD
# @license MIT (see LICENSE file)
# @details
from django.contrib.contenttypes.models import ContentTy... |
import re
from functools import partial
from django.conf import settings
from django.utils.translation import ugettext as _
from core.messages import SANITIZE_ERROR
from core.validators import sanitize_string
from .choices import QUESTION_TYPES, XFORM_GEOM_FIELDS
from .exceptions import InvalidQuestionnaire
def valid... |
from common import XBMCInterfaceUtils, Logger
from metahandler import metahandlers # @UnresolvedImport
import sys
def retieveMovieInfoAndAddItem(request_obj, response_obj):
items = response_obj.get_item_list()
XBMCInterfaceUtils.callBackDialogProgressBar(getattr(sys.modules[__name__], '__addMovieInfo_i... |
# Copyright 2016 Douban Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... |
# vi: sw=4 ts=4 et:
import logging
import microarray
import membership as memb
import meme
import motif
import util
import rsat
import microbes_online
import organism as org
import scoring
import network as nw
import stringdb
import os
from datetime import date, datetime
import json
import numpy as np
import gc
import ... |
import json
import requests
with open('properties.json') as data_file:
data = json.load(data_file)
jwtToken = data["jwtToken"]
id = data["id"]
ITEM_NAME = data["item_name"]
headers = {"authorization" : "Bearer " + jwtToken}
baseurl = "https://api.streamelements.com/kappa/v1/store/"
end = "/redemptions?limit=100... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from random import seed as rs, choice as rc
import requests
from string import ascii_lowercase as sl, digits as sg
import time
import thread
try:
import subprocess
except ImportError:
import subprocess32
class Aria2Response(object):
'''
'''
... |
"""
Copyright (C) 2014, 申瑞珉 (Ruimin Shen)
This program 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 3 of the License, or
(at your option) any later version.
This program is distributed i... |
# gcompris - pythontest
#
# Copyright (C) 2003, 2008 Bruno Coudoin
#
# 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 ver... |
import npyscreen
from core.logging.logger import Logger
from androguard.core.bytecodes.dvm import ClassDefItem
from androguard.core.bytecodes.dvm import EncodedMethod
from pygments import highlight
from pygments.lexers.dalvik import SmaliLexer
from pygments.formatters import TerminalFormatter
# Global
# This global va... |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
"""
实际处理 表结构的导入
1 遍历所有表
2 检查表的字段定义、索引的定义、主键的定义、外键的定义。
"""
import json
from .db_conn import cs_create_engine
import sqlalchemy
from sqlalchemy import inspect
class DBTableMeta(object):
def __init__(self, tbl_name):
self._tbl_name = tbl_name
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.