gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright 2014 Cloudbase Solutions Srl
#
# 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 ... | |
#!/usr/bin/env python2
# Copyright (c) 2016 Bitcredit Core Developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# This script will locally construct a merge commit for a pull request on a
# github repository, inspect it, sig... | |
# Copyright 2015 Twitter, Inc and other contributors.
#
# 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 a... | |
from __future__ import absolute_import
from __future__ import print_function
import json
import os
import pandas as pd
from PIL import Image
import shutil
from six.moves.urllib.request import urlopen
import subprocess
import tempfile
import unittest
import uuid
import tensorflow as tf
from tensorflow.python.lib.io im... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A portal to the tv database.
"""
import sqlite3, logging, os
from datetime import date
import re
from collections import OrderedDict
from . import tvregexes, util
from .util import normpath, split_root_dir, ensure_utf8, ancestry, posixpath
from . import appconfig as c... | |
import os
import time
import psutil
import shutil
import pyHook
import smtplib
import sqlite3
import win32con
import win32api
import win32gui
import mimetypes
import pythoncom
import win32crypt
import win32console
from ctypes import *
import win32clipboard
from os import getenv
from Queue import Queue
from PIL import I... | |
# 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, software
# d... | |
"""
Functions used by the dyn_model
"""
# Modules
# ------------------------------------------------------------------------------
import ipdb
import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import fminbound, nnls, minimize_scalar
from scipy.signal import dlsim, dlti
from models import ModelDyn... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Invoke tasks. To run a task, run ``$ invoke <COMMAND>``. To see a list of
commands, run ``$ invoke --list``.
"""
import os
import sys
import code
import platform
import subprocess
import logging
from invoke import task, run
from website import settings
logging.getLogg... | |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from textwrap import... | |
# ===============================================================================
# Copyright 2012 Jake Ross
#
# 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... | |
'''
Copyright (c) 2008 Georgios Giannoudovardis, <vardis.g@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy,... | |
# -*- coding: utf-8 -*-
# Copyright 2022 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... | |
import os
import re
from typing import Any, Dict, Sequence
from unittest import mock, skipUnless
from urllib.parse import urlsplit
import orjson
from django.conf import settings
from django.http import HttpResponse
from django.test import override_settings
from django.utils.timezone import now as timezone_now
from co... | |
import pandas as pd
import numpy as np
import itertools
from itertools import compress
import math
from scipy import special
import multiprocessing
from functools import partial
import os, sys
from . import utils
# Wrapper function for BBSRforOneGene that's called in BBSR
gx, gy, gpp, gwm, gns = None, None, None, None... | |
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 13 19:00:43 2016
@author: ajaver
"""
import collections
import os
import numpy as np
import pandas as pd
import tables
from scipy.ndimage.filters import median_filter, minimum_filter, maximum_filter
from tierpsy.analysis.int_ske_orient.checkFinalOrientation import check... | |
# Copyright 2015-2015 ARM 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | |
# -*- coding: utf-8 -*-
"""
Provide rules and states for a lattice-grain CTS model.
Created on Tue Feb 2 07:37:59 2016
@author: gtucker
"""
from landlab.ca.celllab_cts import Transition
def lattice_grain_node_states():
"""
Create and return dict of states for lattice-grain model.
Examples
-------... | |
intro = """
blake.py
version 5, 2-Apr-2014
BLAKE is a SHA3 round-3 finalist designed and submitted by
Jean-Philippe Aumasson et al.
At the core of BLAKE is a ChaCha-like mixer, very similar
to that found in the stream cipher, ChaCha8. Besides being
a very good mixer, ChaCha i... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Fourth Paradigm Development, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "Licen... | |
from collections import defaultdict
from django.utils import six
from django.utils.safestring import mark_safe
from .base import (
Node, Template, TemplateSyntaxError, TextNode, Variable, token_kwargs,
)
from .library import Library
register = Library()
BLOCK_CONTEXT_KEY = 'block_context'
class ExtendsError(E... | |
#!/usr/bin/python
# Copyright 2013-present Barefoot Networks, 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... | |
# coding: utf-8
"""Wrapper for netCDF readers."""
from __future__ import unicode_literals, division, print_function
import os.path
from monty.dev import requires, deprecated
from monty.collections import AttrDict
from monty.functools import lazy_property
from pymatgen.core.units import ArrayWithUnit
from pymatgen.cor... | |
# -*- coding: utf-8 -*-
import os
import re
import sys
import string
import time
import gevent
from coincurve import PrivateKey
from ethereum.utils import remove_0x_head
from sha3 import keccak_256
import raiden
LETTERS = string.printable
def safe_address_decode(address):
try:
address = safe_lstrip_he... | |
# Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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... | |
#PyJ2D - Copyright (C) 2011 James Garnon <https://gatc.ca/>
#Released under the MIT License <https://opensource.org/licenses/MIT>
from math import pi as _pi
from java.awt import BasicStroke, RenderingHints
from java.awt.geom import Ellipse2D
from pyj2d.rect import Rect
from pyj2d.color import Color
__docformat__ = 'r... | |
"""
A Blaze Element Kernel is a wrapper around an LLVM Function with a
particular signature.
The kinds of argument types are simple, ptr, and array.
A kernel kind is a tuple of input kinds followed by the output kind
simple: out_type @func(in1_type %a, in2_type %b)
ptrs: void @func(in1_type * %a, in2_... | |
# Copyright:
# Copyright (c) 2010, Benjamin Reitzammer <http://github.com/nureineide>,
# All rights reserved.
#
# License:
# This program is free software. You can distribute/modify this program under
# the terms of the Apache License Version 2.0 available at
# http://www.apache.org/license... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides the tools used to internally run the astropy test suite
from the installed astropy. It makes use of the `pytest` testing framework.
"""
import os
import sys
import types
import pickle
import warnings
import functools
import pytes... | |
import os
import sys
import datetime
from hashlib import sha1
import subprocess
import getpass
import htcondor
import re
sys.path.insert(0, '/cvmfs/cms.cern.ch/crab/CRAB_2_11_1_patch1/python/')
from DashboardAPI import apmonSend, apmonFree
# import DashboardAPI
# DashboardAPI.apmonLoggingLevel = "DEBUG"
class cmsd... | |
##########################################################################
#
# Copyright (c) 2020, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | |
# Copyright 2013 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 required by applicable law or ... | |
import json
import urlparse
from requests.auth import HTTPBasicAuth
import requests
def show_me_the_logs():
"""Turns on debug-level logging in requests
This helps to find out wtf is going wrong.
"""
import httplib
httplib.HTTPConnection.debuglevel = 1
import logging
# you need to initi... | |
# Copyright 2011 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 req... | |
# Copyright (c) 2012, Cloudscaling
# 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... | |
"""Tests for the API"""
from unittest.mock import Mock
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase
from courses.catalog_serializers import CatalogProgramSerializer
from courses.factories import ProgramFactory, CourseFactory, CourseRunFactory
from cour... | |
# encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
Sales module objects.
"""
from django.core.urlresolvers import reverse
from django.db import models
from treeio.core.models import Object, User, ModuleSetting
from treeio.identities.models import Conta... | |
import os
import shutil
from sqlite3 import dbapi2 as sqlite3
from flask import Flask, request, session, g, redirect, url_for, abort, \
flash, render_template
from werkzeug.utils import secure_filename
from contextlib import closing
from werkzeug import utils, secure_filename
# configuration
DATABASE = '/tmp/curly... | |
"""
Main Random Variables Module
Defines abstract random variable type.
Contains interfaces for probability space object (PSpace) as well as standard
operators, P, E, sample, density, where
See Also
========
sympy.stats.crv
sympy.stats.frv
sympy.stats.rv_interface
"""
from __future__ import print_function, division
... | |
#!/usr/bin/python
import matplotlib.pyplot as plt
from matplotlib import *
import sys, getopt
import copy
import time
import datetime
import random
import sys
import os
import re
def get_data(file_list, type, start, finish, nice):
mapped_reqs, running_reqs, refused_reqs = [], [], []
mapped_requests_dict = di... | |
# Copyright (c) 2014, Max Zwiessele
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import itertools
import numpy
np = numpy
from parameter_core import Parameterizable, adjust_name_for_printing, Pickleable
from observable_array import ObsAr
###### printing
__constraints_name__ = "Constraint"
__index_name_... | |
"""Test against the builders in the op.* module."""
from sqlalchemy import Integer, Column, ForeignKey, \
Table, String, Boolean
from sqlalchemy.sql import column, func, text
from sqlalchemy import event
from alembic import op
from alembic.testing.fixtures import op_fixture
from alembic.testing import eq_, assert... | |
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | |
import dis
from ..java import (
Code as JavaCode,
opcodes as JavaOpcodes,
ExceptionInfo as JavaExceptionInfo,
LineNumberTable
)
from .utils import extract_command, find_blocks
from .opcodes import ASTORE_name, ALOAD_name, ADELETE_name, IF, END_IF, resolve_jump
class IgnoreBlock(Exception):
"""An... | |
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp>
#
# 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
#
# h... | |
# Copyright (c) 2010-2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | |
#!/usr/bin/env python3
#
# urc.py -- one long long horrible python script
#
# monolithic urc hub in python
#
# public domain
#
# for hexchat
__module_name__ = "urc"
__module_version__ = "0.1"
__module_description__ = "urc network plugin"
import binascii
import struct
import asyncio
from random import randrange, Rand... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage example::
>>> from angora.baseclass.classtree import gencode
>>> gencode(data, "example.py")
"""
from __future__ import print_function
import datetime
import sys
import os
try:
from . import nameddict
except SystemError:
from angora.baseclass... | |
"""Trusted Networks auth provider.
It shows list of users if access from trusted network.
Abort login flow if not access from trusted network.
"""
from __future__ import annotations
from collections.abc import Mapping
from ipaddress import (
IPv4Address,
IPv4Network,
IPv6Address,
IPv6Network,
ip_a... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2012 Edgewall Software
# Copyright (C) 2005-2006 Matthew Good <trac@matt-good.net>
# Copyright (C) 2006 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this ... | |
from bisect import bisect_left, bisect_right
import numpy
from datetime import date, datetime
import pytz
from affine import Affine
from netCDF4 import num2date, date2num, Variable
from pyproj import Proj
import six
from trefoil.geometry.bbox import BBox
from trefoil.utilities.proj import is_latlong
from trefoil.util... | |
# -*- coding: utf-8 -*-
from functools import update_wrapper
import os
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import ugettext_lazy as _
from django.utils.six.moves.urllib.parse import urljoin
from cms import constants
__all__ = ['get_cm... | |
# Copyright (c) Barefoot Networks, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
from p4_hlir.hlir import p4_match_type, p4_field, p4_table, p4_header_instance
from programSerializer import ProgramSerializer
from compilationException import *
import ebpfProgram
import ebpfInstance
import ebpfCo... | |
#
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | |
#!/usr/bin/python
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
# 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 applica... | |
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, msgprint
from frappe.utils import flt, cint, cstr, now
from frappe.modules import load_doctype_module
from frappe.model.base_document import... | |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
go through user cleaned monthly tweets (MO_tweets.dat) and create user monthly CVs (MO_CV.json)
need access to MongoDB for individual word CVs. Both, input and output are .json txt files.
"""
import sys, io, json, os
import pymongo
from pymongo import MongoClient
from... | |
# -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket Ltd
#
# 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 applica... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | |
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import re
import signal
import subprocess
import sys
import tempfile
from pylib.device import device_errors # pylint: disable=F040... | |
from __future__ import unicode_literals
import uritemplate
import wac
from balanced import exc, config, utils
registry = wac.ResourceRegistry(route_prefix='/')
class JSONSchemaCollection(wac.ResourceCollection):
@property
def href(self):
return self.uri
class ObjectifyMixin(wac._ObjectifyMixin)... | |
import matplotlib.pyplot as plt
import sys
import os
import numpy as np
from pprint import pprint
from datetime import datetime
from datetime import timedelta
import mysql.connector
import pickle
import math
import calendar
from math import log10, floor
GC_error = True
test_case = 'Van'#'default' #default, Van, wet_s... | |
import requests
from django.utils.dateparse import parse_datetime
from typing import List, Dict
from data_refinery_common.job_lookup import ProcessorPipeline, Downloaders
from data_refinery_common.logging import get_and_configure_logger
from data_refinery_common.models import (
Experiment,
ExperimentAnnotatio... | |
import operator
import itertools
from functools import reduce
import packaging.version
def find(pred, items):
"""
Find the index of the first element in items for which pred returns
True
>>> find(lambda x: x > 3, range(100))
4
>>> find(lambda x: x < -3, range(100)) is None
True
"""
... | |
# Lint as: python2, python3
# Copyright 2018 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
#
... | |
import threading
from contextlib import closing
import os.path
import os
import subprocess
import traceback
from customUtilities.helperFunctions import *
from customUtilities.logger import logger
class ResultWriter():
def __init__(self,resultfilename,logger=logger('detourResultWriter.log')):
self.lock = ... | |
# -*- coding: utf-8 -*-
# Source: https://github.com/tsileo/dirtools (copied here because pypi package is not updated)
import logging
import os
import hashlib
from contextlib import closing # for Python2.6 compatibility
import tarfile
import tempfile
from datetime import datetime
import json
from globster import Glo... | |
"""
This tutorial shows how to use cleverhans.picklable_model
to create models that can be saved for evaluation later.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import numpy as np
import tensor... | |
# 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 indra.statements import Agent
from indra.ontology.bio import bio_ontology
from indra.databases import go_client, hgnc_client
from indra.ontology.standardize import \
standardize_agent_name, standardize_db_refs, standardize_name_db_refs
def test_isa_entity():
assert bio_ontology.isa('HGNC', '1097', 'FPLX'... | |
# Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | |
#!/usr/bin/env python
# This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (t... | |
#!/usr/bin/env python
# Copyright 2015 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... | |
from canvas_sdk import client, utils
def list_features_courses(request_ctx, course_id, per_page=None, **request_kwargs):
"""
List all features that apply to a given Account, Course, or User.
:param request_ctx: The request context
:type request_ctx: :class:RequestContext
:param course_... | |
import os
from django.core.exceptions import PermissionDenied
from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, redirect
from django.template.response import TemplateResponse
from django.urls import reverse
from django.utils.translation import gettext as _
from django.views.de... | |
from dogpile.cache.api import CacheBackend, CachedValue, NO_VALUE
from dogpile.cache import register_backend, CacheRegion, util
from dogpile.cache.region import _backend_loader
from . import eq_, assert_raises_message
import itertools
import time
from nose import SkipTest
from threading import Thread, Lock
from dogpile... | |
#!/usr/bin/env python
import sys
from shutil import copy, rmtree
import distutils.dir_util as dir_util
from subprocess import call
from tempfile import mkdtemp
from atexit import register
from os import getenv, mkdir, remove
from os.path import abspath, dirname, isdir, join
if len(sys.argv) > 1 and sys.argv[1] in ['... | |
# Copyright 2011, VMware, 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... | |
import operator
from datetime import date, datetime
import numpy as np
import pandas as pd
import pandas.testing as tm
import pytest
import ibis
import ibis.expr.datatypes as dt
from ibis import literal as L
pytest.importorskip("clickhouse_driver")
@pytest.mark.parametrize(
('left', 'right', 'type'),
[
... | |
# 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 applica... | |
from __future__ import annotations
from dataclasses import dataclass
from typing import Dict, Any, List, TypedDict, Callable
import re
import sublime
import Default #type: ignore
import time
from .import core
from .import dap
from .panel import OutputPanel
from .output_view import OutputView
@dataclass
class Proble... | |
# Copyright 2014 - Mirantis, Inc.
# Copyright 2015 - StackStorm, 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
#
# Unl... | |
################################################################################
# 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... | |
#------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | |
# We use term extraction and clustering methods found in this paper http://nlg18.csie.ntu.edu.tw:8080/lwku/c12.pdf
import sys; import os
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('.'))
from nltk import pos_tag, word_tokenize
from nltk.corpus import stopwords
from Keywords_Wordnet.Key... | |
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | |
# Copyright 2017 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | |
# Copyright 2015 Planet Labs, 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 wr... | |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from jmbo import USE_GIS
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Event.external_link'
db.add_column('jmbo_calendar_event', 'externa... | |
import json
from flask import request
from mock import patch
import appcomposer.translator.translation_listing as trlisting
from appcomposer import redis_store
from appcomposer.login import graasp_oauth_login_redirect
from appcomposer.tests.translator.fake_requests import create_requests_mock
from appcomposer.tests.ut... | |
# 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 ... | |
from datetime import timedelta
from six import StringIO
from django.test import TestCase
from django.core import management
from django.utils import timezone
from wagtail.wagtailcore.models import Page, PageRevision
from wagtail.wagtailcore.signals import page_published, page_unpublished
from wagtail.tests.models im... | |
from pyramid.httpexceptions import HTTPFound
# from pyramid.response import Response
from collections import defaultdict
from pyramid.renderers import get_renderer
from ..models import (
StoredQuery,
)
import json
from ..lib import (
html_f,
consts,
query_f,
converters,
filter_funcs,
# g... | |
import functools
import numpy.core.numeric as _nx
from numpy.core.numeric import (
asarray, zeros, outer, concatenate, array, asanyarray
)
from numpy.core.fromnumeric import reshape, transpose
from numpy.core.multiarray import normalize_axis_index
from numpy.core import overrides
from numpy.core import vstack,... | |
#!/usr/bin/env python
#
# Copyright (C) 2016 The Android Open Source Project
#
# 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 req... | |
# -*- coding: utf-8 -*-
import os, glob, sys, json
workdir = os.curdir
try:
workdir = os.path.dirname(__file__)
except: pass
from flask import Flask
from flaskext.genshi import Genshi, render_template
from genshi.template import MarkupTemplate
from genshi.template import TemplateLoader
from genshi import Stream
... | |
#!/usr/bin/env python
import argparse
import atexit
import copy
import os
import shutil
import socket
import subprocess
import sys
import tempfile
import warnings
try:
import django
except ImportError as e:
raise RuntimeError(
'Django module not found, reference tests/README.rst for instructions.'
... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Christopher Lenz
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
"""Simple HTTP client implementation based on the ``httplib`` module in the
standar... | |
# 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 applicab... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.