gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
from __future__ import unicode_literals
import logging
from django.conf import settings
from django.contrib.auth.models import User
from django.core import mail
from django.template import TemplateSyntaxError
from django.utils.datastructures import MultiValueDict
from django.utils.six.moves.urllib.request import urlo... | |
# Copyright 2017 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 unicode_literals
import datetime
import re
from itertools import chain
from django.conf import settings
from django.db import models
from django.db.migrations import operations
from django.db.migrations.migration import Migration
from django.db.migrations.operations.models import AlterModelOpti... | |
import collections
import errno
import re
from hashlib import sha1
import base64
from base64 import b64encode, b64decode
import socket
import struct
import logging
from socket import error as SocketError
import gevent
from gunicorn.workers.async import ALREADY_HANDLED
logger = logging.getLogger(__name__)
WS_KEY = "... | |
from __future__ import unicode_literals
import errno
import os
import socket
import time
import re
from .common import FileDownloader
from ..compat import compat_urllib_error
from ..utils import (
ContentTooShortError,
encodeFilename,
sanitize_open,
sanitized_Request,
)
class HttpFD(FileDownloader):... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from graphviz import Digraph
import math
import pymongo
import argparse
import sys
import os
import pickle
class Recommender:
def __init__(self, depth=2, nsfw=False, verbose=False):
self.depth = depth
self.verbose = verbose
self.nsfw = nsfw
... | |
# Copyright (c) 2012 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.
"""Constrained network server (CNS) test base."""
import logging
import os
import Queue
import subprocess
import sys
import threading
import urllib2
im... | |
"""Provide common mysensors fixtures."""
from __future__ import annotations
from collections.abc import AsyncGenerator, Generator
import json
from typing import Any, Callable
from unittest.mock import MagicMock, patch
from mysensors.persistence import MySensorsJSONDecoder
from mysensors.sensor import Sensor
import py... | |
import msgpack
import json
import pickle
import os.path
from Queue import PriorityQueue
import re
import doench_score
import azimuth.model_comparison
import numpy as np
import pandas as pd
import csv
from intervaltree import IntervalTree
class GuideRNA():
"""Holder of gRNA information"""
def __init__(self, selecte... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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.apac... | |
# -*- encoding: utf-8
from sqlalchemy import Column
from sqlalchemy import DDL
from sqlalchemy import event
from sqlalchemy import ForeignKey
from sqlalchemy import Index
from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import PrimaryKeyConstraint
from sqlalc... | |
# 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 u... | |
from __future__ import absolute_import, unicode_literals
import os
import mock
from django.test import TestCase
from django.utils.encoding import force_text
from dj_oydiv.utils.random import random_ascii_letters
from dj_oydiv.models import VidyoAdmin
from dj_oydiv.utils.crypto import (
sym_encrypt_cfb_128,
s... | |
#!/usr/bin/python
# -*- coding:utf-8 -*-
import tensorflow as tf
def init_param(number_classes=1000):
model_param = {
'conv1_kernel':
tf.Variable(tf.truncated_normal(shape=[7, 7, 3, 64], stddev=1e-4, dtype=tf.float32)),
'conv1_strides': 2, 'conv1_biases': tf.Variable(tf.constant(0... | |
# -*- 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... | |
class file_iter:
def __init__(self,name):
self.name = name
self.suffix = 1
self.file = self.name + str(self.suffix)
def next(self):
self.suffix += 1
self.file = self.name + str(self.suffix)
return self.file
def __iter__(self):
self.file = self.na... | |
from sfepy.base.base import *
from sfepy.base.progressbar import MyBar
from sfepy.linalg import cycle
from sfepy.fem import Mesh
def gen_block_mesh(dims, shape, centre, name='block'):
"""Generate a 2D or 3D block mesh. The dimension is determined by the
lenght of the shape argument.
Parameters
------... | |
import unittest, json
from io import BytesIO
from six.moves import cPickle as pickle
import lxml.etree
import re
from scrapy.item import Item, Field
from scrapy.utils.python import str_to_unicode
from scrapy.contrib.exporter import BaseItemExporter, PprintItemExporter, \
PickleItemExporter, CsvItemExporter, XmlIte... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.contrib import messages
from django.http import HttpResponseBadRequest, JsonResponse
from django.shortcuts import redirect
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext_lazy... | |
# Copyright 2016 Jochen Kursawe. See the LICENSE file at the top-level directory
# of this distribution and at https://github.com/kursawe/MCSTracker/blob/master/LICENSE.
import numpy as np
from ..core import *
from pyhull.voronoi import VoronoiTess # in maths type easy_install --user pyhull to make this work
def ge... | |
import pygraphviz as *
from protocols.models import Protocol
def compare_protocols(protocol_A,protocol_B):
'''compare two protocols side by side
both protocols come from the same template
no complex diff, only layout
'''
import pygraphviz as *
from protocols.models import Protocol
reagent_verbs = ['add', 'c... | |
# Copyright (c) 2015-2021 Vector 35 Inc
#
# 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, modify, merge, publish, ... | |
# Copyright (c) 2012, GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
# tdot function courtesy of Ian Murray:
# Iain Murray, April 2013. iain contactable via iainmurray.net
# http://homepages.inf.ed.ac.uk/imurray2/code/tdot/tdot.py
import numpy as np
from scipy import linalg... | |
#original https://github.com/trailbehind/zendesk-utils/tree/master/uservoice_to_zendesk
import requests, json
class ZendeskToZenDeskImporter:
'''
Transfer articles, sections, and categories from an old ZenDesk Help Center to a New one.
'''
def __init__(self):
#setup old zendesk client
self.origin... | |
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""cros bootstrap-overlay: Create an overlay based on an existing one."""
from __future__ import print_function
from datetime import date
from distutils... | |
import os
import sys
import time
import yappi
import _yappi
import utils
import multiprocessing # added to fix http://bugs.python.org/issue15881 for > Py2.6
if sys.version_info < (2, 7): # use unittest2 for < Py2.7
import unittest2 as _unittest
else:
import unittest as _unittest
class BasicUsage(utils.YappiU... | |
# -*- coding: utf-8 -*-
"""
erply
~~~~~
Simple Python wrapper for Erply API
:copyright: (c) 2014-2016 by Priit Laes
:license: BSD, see LICENSE for details.
"""
from contextlib import closing
from datetime import datetime
from time import sleep
import csv
import requests
class ErplyException(Exce... | |
# 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 required by applicable law or a... | |
"""Implementations of different data feeders to provide data for TF trainer."""
# Copyright 2015-present The Scikit Flow 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 th... | |
from elasticsearch_dsl import aggs, query
from pytest import raises
def test_repr():
max_score = aggs.Max(field='score')
a = aggs.A('terms', field='tags', aggs={'max_score': max_score})
assert "Terms(aggs={'max_score': Max(field='score')}, field='tags')" == repr(a)
def test_meta():
max_score = aggs.... | |
# Copyright 2013 IBM Corp.
# Copyright 2012 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/LIC... | |
import os
import glob
import warnings
import logging
import re
import atexit
logger = logging.getLogger(__name__)
@atexit.register
def cleanup():
for f in glob.glob('/sys/class/tacho-motor/motor*/command'):
with open(f, 'w') as f:
f.write('stop')
for f in glob.glob('/sys/class/leds/*/trig... | |
import os
import json
import tempfile
import re
from datetime import datetime, timedelta, date
from urllib2 import URLError
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import permission_required
from django.core.cache import cache
from django.core.servers.ba... | |
# -*- coding: utf-8 -*-
from logging import getLogger
from cms.utils import get_cms_setting
from cms.utils.django_load import load
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.core.urlresolvers import NoReverseMatch
from django.utils.tran... | |
"""
Temporal difference agents.
$Id: td.py,v 1.13 2006/04/07 23:24:57 jp Exp $
"""
from plastk.base import *
from plastk.params import *
from plastk.rl import Agent,is_terminal
from plastk.utils import mmax,weighted_sample,inf
from plastk import rand
import Numeric
from Numeric import nonzero,putmask,array,zeros,dot,... | |
# Copyright 2014 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.
'''A container for timeline-based events and traces and can handle importing
raw event data from different sources. This model closely resembles that in the
t... | |
"""
Accessors for related objects.
When a field defines a relation between two models, each model class provides
an attribute to access related instances of the other model class (unless the
reverse accessor has been disabled with related_name='+').
Accessors are implemented as descriptors in order to customize acces... | |
###############################################################################
##
## Copyright (C) 2011-2014 Tavendo GmbH
##
## 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... | |
import os
import sys
from fractions import Fraction
from gurobipy import *
import tft_expr
import tft_error_form
# ==== global variables ====
VERBOSE = False
# ==== class ====
class GurobiSolver:
solver = None
var_expr_2_gurobi_var = None
n_linear_cons = 0
n_quadratic_cons = 0
opt_obj ... | |
import json
from django.contrib.auth.decorators import login_required
from django.http.response import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils.decorators import method_decorator
from rest_framework import permissions, status
from... | |
#!/usr/bin/env python3
import subprocess
import msgpack
from string import Template
import re
import textwrap
import os
import io
void_func_template = Template('''\
public func ${func_name}(${args}
expectsReturnValue: Bool = false
) -> Completable {
let params: [RxNeovimApi.Value] = [
${params}... | |
# 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 u... | |
"""The WaveBlocks Project
Plot the wavefunctions probability densities in the eigenbasis.
Additionally plot the spawned wavepackets.
The plot can be splitted into 4 subplots corresponding to the
left and the right of a barrier potential.
@author: R. Bourquin
@copyright: Copyright (C) 2010, 2011 R. Bourquin
@license: ... | |
# -*- coding: utf-8 -*-
u"""elegant lattice parser
:copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern import pkresource
from pykern.pkcollections import PKDict
fro... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
#... | |
"""
Get PSM3 TMY
see https://developer.nrel.gov/docs/solar/nsrdb/psm3_data_download/
"""
import io
import requests
import pandas as pd
from json import JSONDecodeError
NSRDB_API_BASE = "https://developer.nrel.gov"
PSM_URL = NSRDB_API_BASE + "/api/nsrdb/v2/solar/psm3-download.csv"
TMY_URL = NSRDB_API_BASE + "/api/nsr... | |
# KidsCanCode - Game Development with Pygame video series
# Jumpy! (a platform game) - Part 17
# Video link: https://youtu.be/Dspz3kaTKUg
# Using mask collisions
# Art from Kenney.nl
# Happy Tune by http://opengameart.org/users/syncopika
# Yippee by http://opengameart.org/users/snabisch
import pygame as pg
import rand... | |
# 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 ... | |
# -*- coding: utf-8 -*-
#
# Copyright 2013 Simone Campagna
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | |
# 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 required by applicable la... | |
#----------------------------------------------------------------------
# Copyright (c) 2011-2015 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including ... | |
#!/usr/bin/env python
"""
f2py2e - Fortran to Python C/API generator. 2nd Edition.
See __usage__ below.
Copyright 1999--2005 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRAN... | |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | |
# Generated from sdoc/antlr/sdoc1Lexer.g4 by ANTLR 4.5.3
from antlr4 import *
from io import StringIO
def serializedATN():
with StringIO() as buf:
buf.write("\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2*")
buf.write("\u013d\b\1\b\1\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6")
buf.writ... | |
#!/usr/bin/env python
#adam-use# put bigmacs zps in cats and headers of coadd.fits and calculate NFILT
#adam-example# ipython -i -- adam_bigmacs_apply_zps_and_add_NFILT.py -i /nfs/slac/kipac/fs1/u/awright/SUBARU/photometry/MACS1226+21/PHOTOMETRY_W-C-RC_aper/MACS1226+21.unstacked.split_apers.cat -o /nfs/slac/kipac/fs1/u... | |
import waffle
from django.contrib import messages
from django.contrib.messages.api import add_message
from django.db.models import Q
from django.conf import settings
from django.http.response import HttpResponseRedirect
from django.http.response import Http404
from django.contrib.auth.models import User
from django.con... | |
# coding=utf-8
# Copyright 2018 The DisentanglementLib 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
#
# Un... | |
#!/usr/bin/python
#
# Copyright (c) 2011 The Crowncoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
impo... | |
# -*- coding: utf-8 -*-
# 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
... | |
from __future__ import absolute_import
import datetime
import imp
import json
from django.utils import timezone
from django.utils.functional import cached_property
from django.contrib.auth.models import Permission, User
from django.test.client import RequestFactory
from widgy.contrib.review_queue.site import Reviewed... | |
#!/usr/bin/env python2
"""
Travis-CI build script
mbed SDK
Copyright (c) 2011-2013 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
Unle... | |
"""The tests the for Locative device tracker platform."""
from unittest.mock import patch, Mock
import pytest
from homeassistant import data_entry_flow
from homeassistant.components import locative
from homeassistant.components.device_tracker import \
DOMAIN as DEVICE_TRACKER_DOMAIN
from homeassistant.components.... | |
from django.test import TestCase
from django.db.models.manager import Manager
from django.core.exceptions import ImproperlyConfigured
from rest_framework import serializers
from drf_nested_resource.utils import (
find_child_to_parent_accessor_name,
find_child_to_parent_serializer_field,
compute_default_ur... | |
#!/usr/bin/env python
from __future__ import division
import argparse
import datetime
import functools
import os.path as osp
import PIL.Image
import random
import socket
import chainer
from chainer import training
from chainer.training import extensions
import chainer_mask_rcnn as cmr
from chainercv import transform... | |
from __future__ import absolute_import
import json
import logging
import warnings
from pip._vendor import six
from pip._vendor.six.moves import zip_longest
from pip._internal.basecommand import Command
from pip._internal.cmdoptions import index_group, make_option_group
from pip._internal.exceptions import CommandErr... | |
from __future__ import print_function
import collections
import functools
import logging
import operator
import os
import types
import six
import toolz
import ibis.compat as compat
from ibis.config import options
def guid():
try:
from ibis.comms import uuid4_hex
return uuid4_hex()
except I... | |
"""
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 this ... | |
# Copyright (c) 2018 PaddlePaddle 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 app... | |
#!/usr/bin/env python
# Copyright 2016 gRPC 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 o... | |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from pwn import *
context(arch='amd64', os='linux', aslr=True, terminal=['tmux', 'neww'])
env = {'LD_PRELOAD': './libvtv.so.0'}
if args['GDB']:
io = gdb.debug('./ragnarok.bin', env=env, gdbscript='''\
set follow-fork-mode parent
c
''')
elf, li... | |
# Copyright 2012 Managed I.T.
#
# Author: Kiall Mac Innes <kiall@managedit.ie>
#
# 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... | |
"""
Support for MQTT climate devices.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/climate.mqtt/
"""
import asyncio
import logging
import voluptuous as vol
from homeassistant.core import callback
import homeassistant.components.mqtt as mqtt
from homeas... | |
"""Utilities to evaluate models with respect to a variable
"""
# Author: Alexander Fabisch <afabisch@informatik.uni-bremen.de>
#
# License: BSD 3 clause
import warnings
import numpy as np
from .base import is_classifier, clone
from .cross_validation import check_cv
from .externals.joblib import Parallel, delayed
fro... | |
# 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 ... | |
#
# SPDX-License-Identifier: MIT
# Copyright wtfsckgh@gmail.com
# Copyright iced contributors
#
import copy
import pytest
from iced_x86 import *
def test_ctor():
instr = Instruction()
assert instr.code == Code.INVALID
assert instr.code_size == CodeSize.UNKNOWN
assert instr.len == 0
assert instr.ip == 0
def test... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# Database Module
# --------------------
from __future__ import unicode_literals
import re
import time
import frappe
import datetime
import frappe.defaults
import frappe.model.meta
from frappe import _
from time impo... | |
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright (C) 2006 Fluendo, S.A. (www.fluendo.com).
# Copyright 2006, Frank Scholz <coherence@beebits.net>
import urlparse
from urlparse import urlsplit
from coherence.extern.et import parse_xml as et_parse_xml
from coherence import... | |
#!/usr/bin/env python3
import unittest as ut
import subtest_fix
import os
import sys
import glob
import argparse
import copy
import tempfile
from itertools import combinations
import c4.cmany as cmany
import c4.cmany.util as util
import c4.cmany.main as main
import c4.cmany.cmake as cmake
from multiprocessing import... | |
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2022, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 John Hampton <pacopablo@pacopablo.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# Author: John Hampton <pacopablo@pacopablo.com>
from trac.core import *
from tra... | |
"""
Logging - hellanzb's logging facility. Ties in with python's logging system, with an added
SCROLL log level.
The NZBLeecherTicker object will constantly print new and kill it's old lines of text on
the screen via the scroll() level. This busys the screen, but the SCROLL level hooks allow
normal logging of non-SCR... | |
# coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.113
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
im... | |
#!/usr/bin/env python
# Copyright 2016 NEC 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/LICENSE-2.0
#
# Unless required by applicable law ... | |
import functools
import gc
import operator
import platform
import unittest
from itertools import count
from warnings import catch_warnings
from scrapy.utils.python import (
memoizemethod_noargs, binary_is_text, equal_attributes,
WeakKeyCache, get_func_args, to_bytes, to_unicode,
without_none_values, Mutabl... | |
#!/usr/bin/env python2.7
# Copyright 2015 gRPC 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 l... | |
#!/usr/bin/env python
"""Code generator of mongoodm"""
import sys
import os
import argparse
import string
import xml.etree.cElementTree
import inflection
import pprint
#Error codes
E_SUCCESS = 0
E_NOT_EXIST = 1
E_INVALID_ARGUMENT = 2
E_INSUFFICIENT_ARGUMENTS = 3
E_PARSE ... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | |
#!/usr/bin/env python3
#
# Copyright (c) 2017 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import argparse
import struct
import sys
import os
from elftools.elf.elffile import ELFFile
from elftools.elf.sections import SymbolTableSection
ISR_FLAG_DIRECT = (1 << 0)
# The below few hardware independent magi... | |
# Copyright (C) 2014 Xinguard, 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 wri... | |
# Copyright (c) 2014 Pure Storage, 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 re... | |
# Copyright 2015 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... | |
import requests
from bs4 import BeautifulSoup
from bs4.element import Comment
import re
from utils.common.nlp import tokenize_alphanum
from utils.common.datapipeline import DataPipeline
from utils.common.browser import SelfClosingBrowser
from utils.common.db_utils import read_all_results
_pattern = re.compile('[\W_]+'... | |
"""Test fire front interpolation"""
# Copyright (c) 2019, CNRS-LAAS
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notic... | |
#
# 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... | |
"""Configuration file parser.
A setup file consists of sections, lead by a "[section]" header,
and followed by "name: value" entries, with continuations and such in
the style of RFC 822.
The option values can contain format strings which refer to other values in
the same section, or values in a special [DEFAULT] sect... | |
# Copyright 2012, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | |
'''
Author: Jason.Parks
Created: April 25, 2012
Module: core.moBuFile
Purpose: File convenience class
'''
from pyfbsdk import *
from common.core import globalVariables as gv
from common.diagnostic.pcsLogger import moBuLogger
from common.fileIO.parser_schema import ParseSchema
from common.fileIO.pcsPath import Path
from... | |
# -*- coding: utf-8 -*-
"""
pygments.lexers.modeling
~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for modeling languages.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, using, d... | |
"""
Copyright 2013 The Trustees of Princeton University
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... | |
"""inline module.
This module describes the Inline content to answer inlineQuery.
"""
from uuid import uuid4
from .content import DictItem
class _InlineQueryResult(DictItem):
"""Base class."""
_result_type = None
_prefix = None
def __init__(self, result_id=None, url=None, title=None, width=None... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.