gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# coding=utf-8
# Copyright 2021 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | |
# Copyright 2009-2012 10gen, 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,... | |
#!/usr/bin/env python
import pickle, argparse,urllib,re, subprocess
import scipy.ndimage.interpolation as intp
import numpy as np
from PIL import Image
import os
from StringIO import StringIO
import math
import pylab
from astropy.io import fits
import chainer
from chainer import computational_graph
from chainer impo... | |
# Copyright (c) 2010-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 wit... | |
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
# Martin Luessi <mluessi@nmr.mgh.harvard.edu>
# Eric Larson <larsoner@uw.edu>
#
# License: BSD (3-clause)
import os
from os import path as op
import numpy as np
from .. impor... | |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Nicolas P. Rougier
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
import re
import math... | |
# I'll specially test some critical internal time-interval related code,
# since it's easier to test it separately than create lots of SDOs AND
# patterns.
import pytest
from stix2patterns.pattern import ParseException
from stix2matcher.matcher import (_OVERLAP, _OVERLAP_NONE,
_OVERLA... | |
"""
=======================================================
Scalable learning with polynomial kernel approximation
=======================================================
This example illustrates the use of :class:`PolynomialCountSketch` to
efficiently generate polynomial kernel feature-space approximations.
This is u... | |
# Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import warnings
from collections import OrderedDict
from contextlib import ExitStack
from functools import partial
import torch
from torch.distributions import constraints
from torch.distributions.transforms import AffineTransform... | |
"""Test the onboarding views."""
import asyncio
import os
from unittest.mock import patch
import pytest
from homeassistant.components import onboarding
from homeassistant.components.onboarding import const, views
from homeassistant.const import HTTP_FORBIDDEN
from homeassistant.helpers import area_registry as ar
from... | |
"""
Read and write wiggle tracks.
.. todo:: Now that we also include the end positions in the index, it is
possible to do random jumps inside a region with some educated guessing.
Perfect hits would not be possible, since the length of the lines is
variable.
.. moduleauthor:: Martijn Vermaat <martijn@verm... | |
from os.path import join, dirname, relpath, basename
from utils import cd
import subprocess
import logging
from glob import glob
import os
import shutil
from pprint import pprint
import re
import z3
from z3 import Select, Concat, Array, BitVecSort, BitVecVal, Solver, BitVec
from inference import InferenceError
logg... | |
#!/usr/bin/env python
# Copyright 2018-2020 The PySCF Developers. 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
#
# U... | |
# 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... | |
#!/usr/bin/env python
import os
import sys
from datetime import datetime
import json
import hmac
import hashlib
import pymongo
import tangelo
import requests
import cherrypy
import dashboard
global _geojs_test_mongo
_cdash_url = 'http://my.cdash.org/index.php?project=geojs'
_geojs_test_mongo = None
_github_api = '... | |
# 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 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... | |
# 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... | |
# basic command line functions to use. Some of those functions can be implemented to
# scikit-beam later.
import os
import time
import json
import glob
import multiprocessing
import numpy as np
import h5py
import copy
from collections.abc import Iterable
import re
from ..core.quant_analysis import ParamQuantitativeAna... | |
# 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
# distributed under the Li... | |
# 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... | |
import collections
import copy
import os
import os.path as osp
import time
import chainer
import fcn
import numpy as np
import pandas
import skimage.io
import skimage.util
import tqdm
import grasp_fusion_lib
class FCNTrainer(object):
"""Training class for FCN models.
Parameters
----------
device: ... | |
import pandas as pd
from pprint import pprint
from glob import glob
import numpy as np
import re
import csv
import sys
followUp = {}
ack = {}
nonIntimate = {}
intimate = {}
featureList = {}
questionType_DND = {}
questionType_PN = {}
discriminativeVectors = []
nonDiscriminativeVectors = []
def readHelperData():
... | |
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from scipy.misc import toimage
import matplotlib.gridspec as gridspec
import tensorflow as tf
from tensorflow.python.framework import graph_util
from functools import reduce
from operator import mul
from sklearn.metrics import classification_report, a... | |
import ipaddress
import json
import os
import socket
import textwrap
from math import floor
from subprocess import check_output
import yaml
import gen.aws.calc
import gen.azure.calc
import pkgpanda.exceptions
from pkgpanda import PackageId
from pkgpanda.build import hash_checkout
AWS_REXRAY_CONFIG = """
rexray:
l... | |
#----------------------------------------------------------------------
# Copyright (c) 2008 Board of Trustees, Princeton University
#
# 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, i... | |
#! /usr/bin/env python
'''
Develop a JTAG state transition graph that shows TMS values for
transitions from any state to any other state.
This module knows a lot about the JTAG state machine, but
in a completely implementation independent way.
Examples:
jtagstates.states.reset.shift_dr returns the TMS sequence to... | |
import json
import datetime
import requests
import calendar
import urllib
rest_base_url = "http://inevent.klewel.com:8081/rest/"
rest_url_retrieval = rest_base_url + "retrieval/"
rest_url_user = rest_base_url + "user/"
rest_url_management = rest_base_url + "archiving/"
def get_similar_events(event_id, limit=5):
... | |
from sympy.core.compatibility import range
from sympy.core.backend import cos, Matrix, sin, zeros, tan, pi, symbols
from sympy import trigsimp, simplify, solve
from sympy.physics.mechanics import (cross, dot, dynamicsymbols, KanesMethod,
inertia, inertia_of_point_mass,
... | |
#!/usr/bin/env python
# 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.
import contextlib
import json
import logging
import math
import multiprocessing
import os
import tempfile
import time
import unittest
f... | |
# j4cDAC test code
#
# Copyright 2011 Jacob Potter
#
# 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, version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ... | |
import copy
import io
class Node(object):
'''This is the basic node class.
A series of nodes allow for a decision tree to be created. The node
branches are then attached to a tree.
Attributes
----------
criterion : string
This is the "choice" involved.
descrip... | |
# 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 ... | |
"""
pyexcel.book
~~~~~~~~~~~~~~~~~~~
Excel book
:copyright: (c) 2014-2017 by Onni Software Ltd.
:license: New BSD License, see LICENSE for more details
"""
from pyexcel.sheet import Sheet
import pyexcel._compact as compact
from pyexcel.internal.meta import BookMeta
from pyexcel.internal.common imp... | |
# Base code for calculating the fractal dimension of a digital image.
# Thesis
# Michael C. Murphy
# Code started: November, 2016
import sys
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from math import log
from statistics import variance
import time
from random import randint
... | |
from datetime import datetime
import pytest
import demistomock as demisto
from freezegun import freeze_time
from PhishTankV2 import is_number, Client
from PhishTankV2 import remove_last_slash, is_reload_needed, reload
from PhishTankV2 import phishtank_status_command, url_command
from CommonServerPython import DBotScor... | |
# coding=utf-8
import sys
import petsc4py
petsc4py.init(sys.argv)
import numpy as np
from time import time
from scipy.io import savemat
# from src.stokes_flow import problem_dic, obj_dic
from petsc4py import PETSc
from src import stokes_flow as sf
from src.myio import *
from src.objComposite import *
# from src.myvt... | |
""" RLLIB SUMO Utils - SUMO Connector
Author: Lara CODECA lara.codeca@gmail.com
See:
https://github.com/lcodeca/rllibsumoutils
https://github.com/lcodeca/rllibsumodocker
for further details.
"""
import logging
import os
import sys
# Attach $SUMO_HOME/tools to the path to import SUMO libr... | |
# Copyright 2020,2021 Sony 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 or agreed to i... | |
"""Support for August devices."""
import asyncio
from datetime import timedelta
from functools import partial
import logging
from august.api import Api, AugustApiHTTPError
from august.authenticator import AuthenticationState, Authenticator, ValidationResult
from requests import RequestException, Session
import voluptu... | |
#!/usr/bin/env python
"""Client repacking library."""
import getpass
import logging
import os
import platform
import sys
import zipfile
from grr_response_client_builder import build
from grr_response_client_builder import build_helpers
from grr_response_client_builder import signing
from grr_response_client_builder.... | |
# Copyright 2016 Google Inc. All Rights Reserved.
# Copyright 2017 You8M team.
#
# 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... | |
'''
Kivy framework
==============
Kivy is an open source library for developing multi-touch applications. It is
completely cross-platform (Linux/OSX/Win) and released under the terms of the
MIT License.
It comes with native support for many multi-touch input devices, a growing
library of multi-touch aware widgets and... | |
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""
Tests for the HTTP challenge authentication implementation. These tests aren't parallelizable, because
the challenge cache is global to the process.
"""
import async... | |
# -*- coding: utf-8 -*-
'''
FanFilm Add-on
Copyright (C) 2015 lambda
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 ... | |
# -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | |
# 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 compliance with the License. You may obtain
# a ... | |
import numpy as np
import pandas as pd
import os
import sys
try:
import pwd
except ImportError:
print "couldn't import pwd, ignoring"
from kid_readout.analysis.noise_measurement import load_noise_pkl
import glob
import collections
import time
import kid_readout.analysis.kid_response
kid_response = kid_readout.... | |
# 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 ... | |
# 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 agr... | |
# 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/LICENSE-2.0
#
# Unless requ... | |
# 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... | |
from __future__ import division, unicode_literals
from future.builtins import str
from copy import copy
from django.contrib.contenttypes.generic import GenericRelation
from django.core.exceptions import ImproperlyConfigured, AppRegistryNotReady
from django.db.models import IntegerField, CharField, FloatField
from dja... | |
import os
import sys
import logging
from datetime import datetime
from datetime import timedelta
import calendar
from backtest.universe import Universe
from backtest.screening import Screening
from backtest.pricing import Pricing
from backtest import constants
def month_range(start_yyyymm, count=10, step=3):
yyyy... | |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Trip.shape'
db.delete_column('gtfs_trip', 'shape_id')
# Adding field 'Trip.shap... | |
#!/usr/bin/env python
# encoding: utf-8
'''
Wrapper script around common use of i18n.
1. Add new language: creates PO files and instruct how to add to transifex.
2. Update languages: Regenerate English PO files. TX gets it automaticaly.
3. Update translations: download translations from TX and compi... | |
from abc import ABC, abstractmethod
from deluca.lung.devices.pins import Pin, PWMOutput
import os
import numpy as np
class SolenoidBase(ABC):
"""An abstract baseclass that defines methods using valve terminology.
Also allows configuring both normally _open and normally closed valves (called the "form" of the... | |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-13 11:01
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_smalluuid.models
import mptt.fields
class Migration(migrations.Migration):
initial... | |
import logging
from io import StringIO
import PE
import PE.carve as pe_carve
import vstruct
import vivisect
import vivisect.parsers as v_parsers
# Steal symbol parsing from vtrace
import vtrace # needed only for setting the logging level
import vtrace.platforms.win32 as vt_win32
import envi.exc as e_exc
import envi... | |
# -*- coding: utf-8 -*-
"""Some miscellaneous utility functions."""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
#
# License: BSD (3-clause)
from contextlib import contextmanager
import fnmatch
import gc
import inspect
from math import log
import os
from queue import Queue, Empty
from string import Form... | |
# Copyright 2014: Mirantis 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 b... | |
# 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 scipy.stats import norm, mvn #normal and bivariate normal
from numpy import sqrt
from numpy import exp
from datetime import date, timedelta
import datetime as dt
import pandas as pd
import numpy as np
from parameters import x0Vas
from Curves.Corporates.CorporateDaily import CorporateRates
from Products.Cred... | |
from __future__ import division, print_function
import numpy as np
from scipy import linalg
from functools import partial
from itertools import product
import warnings
from sklearn import datasets
from sklearn import svm
from sklearn.datasets import make_multilabel_classification
from sklearn.preprocessing import La... | |
import arcpy, os, sys, urllib, urllib2, re, traceback
from xml.etree.ElementTree import ElementTree, Element, SubElement
def open_nds():
try:
in_nds = arcpy.GetParameterAsText(0)
out_xml = arcpy.GetParameterAsText(1)
AddMsgAndPrint('Network dataset: ' + in_nds)
AddMsgAndPrint('Outpu... | |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Needs freetype-py>=1.0
# Implements multi-pass solution to setting an exact font height
# Some code adapted from Daniel Bader's work at the following URL
# https://dbader.org/blog/monochrome-font-rendering-with-freetype-and-python
# With thanks to Stephen Irons @irons... | |
import numpy as np
import scipy as sc
from prettyprint import pp
import os
import re
#index label in the dictionary
idx_lbl = 'idx'
dfreq_lbl = "docfreq"
pattern = re.compile(r'([a-zA-Z]+|[0-9]+(\.[0-9]+)?)')
def tokenizeDoc(doc_address, min_len = 0, remove_numerics=True):
"""
to tokenize a document file to... | |
import pyexcel as pe
from base import PyexcelBase, clean_up_files
from base import create_sample_file1
from _compact import BytesIO
from nose.tools import raises
class TestReader:
def setUp(self):
"""
Make a test csv file as:
a,b,c,d
e,f,g,h
i,j,1.1,1
"""
s... | |
# Copyright 2014 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 agreed to in w... | |
"""Support for Amcrest IP cameras."""
import asyncio
from datetime import timedelta
import logging
from urllib3.exceptions import HTTPError
from amcrest import AmcrestError
import voluptuous as vol
from homeassistant.components.camera import (
Camera,
CAMERA_SERVICE_SCHEMA,
SUPPORT_ON_OFF,
SUPPORT_STR... | |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | |
#!/usr/bin/python2.7
'''
Copyright 2013 George Caley
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... | |
__author__ = 'Vernon Wenberg III'
import tkinter as tk
import os
import tkinter.messagebox
import tkinter.filedialog
import tkinter.simpledialog
from tkinter import ttk
import subprocess
import sys
import viddb.dbfuncs
import viddb.dirfuncs
class Options(object):
"""
Stores the directory sort option that ha... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Nachi Ueno, NTT MCL, 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:/... | |
"""Tests for permissions"""
import pytest
from django.contrib.auth.models import AnonymousUser
from django.http import Http404
from prawcore.exceptions import Forbidden as PrawForbidden, Redirect as PrawRedirect
from channels.models import Channel
from open_discussions.permissions import (
AnonymousAccessReadonlyP... | |
#
# 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 us... | |
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponseForbidden, Http404
from django.shortcuts import render, get_object_or_404
from django.template import RequestContext
from django.u... | |
#
# Copyright 2014 Major Hayden
#
# 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... | |
# -*- coding: utf-8 -*-
"""
Created on Sun May 24 08:39:36 2015
@author: Roger
"""
#x = x x' y y' theta
from math import cos, sin, sqrt, atan2
import numpy as np
from numpy import array, dot
from numpy.linalg import pinv
def print_x(x):
print(x[0, 0], x[1, 0], np.degrees(x[2, 0]))
def control_update(x, u, dt... | |
# Copyright 2014 Rackspace, 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 writin... | |
# Copyright 2013 IBM Corp
#
# 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... | |
# 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... | |
from unittest.mock import Mock, patch
import django_filters
import graphene
import pytest
from django.core.exceptions import ImproperlyConfigured
from django.utils import timezone
from graphene import InputField
from graphql_jwt.shortcuts import get_token
from saleor.graphql.core.enums import ReportingPeriod
from sal... | |
# 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.
"""This tests our first tracking example
"""
import unittest
import mesh
import tracking
import copy
import sys
import numpy as np
import matplotlib... | |
"""Provide the functionality to group entities."""
from __future__ import annotations
from abc import abstractmethod
import asyncio
from collections.abc import Iterable
from contextvars import ContextVar
import logging
from typing import Any, List, cast
import voluptuous as vol
from homeassistant import core as ha
f... | |
# -*- coding: utf-8 -*-
"""
pygments.lexers.matlab
~~~~~~~~~~~~~~~~~~~~~~
Lexers for Matlab and related languages.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, bygroups, word... | |
# 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... | |
# 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... | |
# Copyright (c) 2016 EMC 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 o... | |
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import collections
import sys
from importlib import import_module
import factory
from django.conf import settings
from django.core.urlresolvers import reverse
from rest_framework import status
from res... | |
#!/usr/bin/env python
# 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.
"""Adaptor script called through build/isolate.gypi.
Creates a wrapping .isolate which 'includes' the original one, that can be
consum... | |
# Copyright 2011 OpenStack Foundation
# 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 compliance wi... | |
"""
This module is intended for solving recurrences or, in other words,
difference equations. Currently supported are linear, inhomogeneous
equations with polynomial or rational coefficients.
The solutions are obtained among polynomials, rational functions,
hypergeometric terms, or combinations of hypergeometric term ... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual 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 L... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test replace by fee code
#
from test_framework.test_framework import BitcoinTestFramework
from test_... | |
#!/usr/bin/env python
"""
Build script for the shared library providing the C ABI bridge to LLVM.
"""
from __future__ import print_function
from ctypes.util import find_library
import re
import multiprocessing
import os
import subprocess
import shutil
import sys
import tempfile
here_dir = os.path.abspath(os.path.di... | |
# -*- coding: utf-8 -*-
""" ymir.validation
"""
import os
import logging
import voluptuous
from fabric import api
from peak.util.imports import lazyModule
from ymir import util
from ymir import checks
from ymir.util import puppet
from ymir.base import report as base_report
from ymir import schema as yschema
from ym... | |
"""
Our linter engine needs to run in 3 different scenarios:
* Linting all files (python, js, less)
* Linting only python files (--python)
* Linting only js files (--js)
For the js only path, we should not depend on any packages outside the
python stdlib to prevent the need to install the world just to run eslint.
... | |
"""
pyAudio-sona interface and command line user interface.
"""
import argparse
import contextlib
import os
import pyaudio
import sys
import threading
import time
import scipy.signal as signal
from .generators.noise import ColoredNoise
from .generators.noise import PulseGenerator
from .generators.noise import SineOsci... | |
#!/usr/bin/env python
"""
Make an OpenID association request against an endpoint and print the results.
Usage: associate.py [options] <endpoint>
associate.py -h | --help
Options:
-h, --help show this help message and exit
-a, --assoc-type=ASSOC_TYPE set custom association type [default... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.