CombinedText stringlengths 4 3.42M |
|---|
# coding=utf-8
import posixpath
import re
import filecmp
import hashlib
import translitcodec
from itertools import chain, islice
from path import path
from urlparse import urljoin, urlparse, urlunparse
from engineer.log import logger
__author__ = 'tyler@tylerbutler.com'
_punctuation_regex = re.compile(r'... |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Legion(CMakePackage):
"""Legion is a data-centric parallel programming system for writing... |
#!/usr/bin/env python3
# Copyright 2020 The Pigweed 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
from decimal import Decimal
from functools import partial
from django.conf import settings
from django.db import models
from django.db.models import F, Q
from django.utils import timezone
from django.utils.translation import pgettext, pgettext_lazy
from django_countries.fields import CountryField
from django_prices.mo... |
from django.utils.translation import gettext_lazy as _
import os
import logging
from django.utils.log import DEFAULT_LOGGING
from decouple import AutoConfig, Csv
from pathlib import Path
mpl_logger = logging.getLogger('matplotlib')
mpl_logger.setLevel(logging.WARNING)
logger = logging.getLogger(__name__)
# Build pa... |
'''
Created on Jul 22, 2011
@author: Rio
'''
from mclevelbase import *
from collections import deque;
import time
import zlib
import struct
import shutil
import subprocess
import sys
import urllib
import tempfile
#infinite
Level = 'Level'
BlockData = 'BlockData'
BlockLight = 'BlockLight'
SkyLight = 'SkyLight'
HeightM... |
#!/usr/bin/env python
#
# VMEncryption extension
#
# Copyright 2015 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... |
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... |
# -*- coding: utf-8 -*-
# Copyright (c) 2010-2013, GEM Foundation.
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... |
#!/usr/bin/env python3
# Copyright 2020 The Pigweed 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
"""Leetcode 130. Surrounded Regions
Medium
URL: https://leetcode.com/problems/surrounded-regions/
Given a 2D board containing 'X' and 'O' (the letter O),
capture all regions surrounded by 'X'.
A region is captured by flipping all 'O's into 'X's in that surrounded region.
Example:
X X X X
X O O X
X X O X
X O X X
A... |
# -*- coding: utf-8 -*-
"""
keyboard
========
Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more.
## Features
- Global event hook on all keyboards (captures keys regardless of focus).
- **Listen** and **sends** keyboard events.
... |
##############################################################################
# Copyright (c) 2013, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Written by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
... |
# -*- coding: utf-8 -*-
'''
OpenStack Nova Cloud Module
===========================
PLEASE NOTE: This module is currently in early development, and considered to
be experimental and unstable. It is not recommended for production use. Unless
you are actively developing code in this module, you should use the OpenStack
... |
from dolo.symbolic.symbolic import *
from dolo.symbolic.model import *
import sympy
import re
import inspect
line_regex = re.compile(
"(\s*)$|"
+"\s*//#(.*)$|"
+"\s*@#(.*)$|"
+"\s*//[^#](.*)$|"
+"\s*\[(.*)\]\s*$|"
+"(\s*[^\s].*)$"
)
tag_regex = re.compile("\s*(\w+)\s*=\s*'(.*)'")
def parse_d... |
Update docstring and fn name
|
# coding=utf-8
# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016,2017
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
try:
from future import standard_library
standard_library.install_aliases()
e... |
from __future__ import absolute_import, division
from httplib import BadStatusLine
from .FiltrackerNotifications import FiltrackerMsgDict, FiltrackerPrintingStatusDict, FiltrackerPrinterStatusDict, FiltrackerSlicingStatusDict
import octoprint.plugin
from octoprint.slicing import SlicingManager, UnknownProfile
from oct... |
'''
Created on Jul 22, 2011
@author: Rio
'''
import copy
from datetime import datetime
import itertools
from logging import getLogger
from math import floor
import os
import re
import random
import shutil
import struct
import time
import traceback
import weakref
import zlib
import sys
import blockrotation
from box i... |
from hypothesis.stateful import GenericStateMachine
class NetworkBroker(GenericStateMachine):
"""
Broker to coordinate network traffic
nodes = A map of node ids to node objects.
network = An adjacency list of what nodes can talk to each other. If a is
in network[b] than b -> a communcation is ... |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RBrms(RPackage):
"""Bayesian Regression Models using 'Stan':
Fit Bayesian generalized... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-09-07 19:52
from __future__ import unicode_literals
from django.db import migrations
import osf.utils.fields
class Migration(migrations.Migration):
dependencies = [
('osf', '0056_merge_20170831_0832'),
]
operations = [
migrati... |
"""Leetcode 443. String Compression
Easy
URL: https://leetcode.com/problems/string-compression/
Given an array of characters, compress it in-place.
The length after compression must always be smaller than or equal to the
original array.
Every element of the array should be a character (not int) of length 1.
After ... |
# Copyright 2012-2013 STACKOPS TECHNOLOGIES S.L.
#
# 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 applic... |
# -*- coding: utf-8 -*-
'''
Management of Docker Containers
.. versionadded:: 2015.8.0
.. versionchanged:: 2017.7.0
This module has replaced the legacy docker execution module.
:depends: docker_ Python module
.. _`create_container()`: http://docker-py.readthedocs.io/en/stable/api.html#docker.api.container.Contai... |
Experimental summary view
|
from django.conf import settings
from django.db import connection
from django.db.models.fields.related import ForeignKey, OneToOneField, ManyToManyField, RelatedObject
from django.core.exceptions import FieldError
from rest_framework import serializers
from rest_framework.response import Response
from rest_framework.vi... |
# Copyright (C) 2009-2016, Quentin "mefyl" Hocquet
#
# This software is provided "as is" without warranty of any kind,
# either expressed or implied, including but not limited to the
# implied warranties of fitness for a particular purpose.
#
# See the LICENSE file for more information.
import collections
import drake... |
"""
Django settings for eoj3 project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
im... |
'''
Created on Jul 22, 2011
@author: Rio
'''
from mclevelbase import *
from collections import deque;
import time
import zlib
import struct
import shutil
import subprocess
import sys
import urllib
import tempfile
#infinite
Level = 'Level'
BlockData = 'BlockData'
BlockLight = 'BlockLight'
SkyLight = 'SkyLight'
HeightM... |
# coding=utf-8
from __future__ import absolute_import
__author__ = "Jarek Szczepanski <imrahil@imrahil.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2014 Jarek Szczepanski - Released under terms of the AGPLv3 License"
import octopri... |
# -*- coding: utf-8 -*-
# MIT license
#
# Copyright (C) 2018 by XESS Corporation / Hildo Guillardi Júnior
#
# 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 wit... |
import csv
from datetime import datetime
import io
from importlib import import_module
import json
import logging
import uuid
from django.db import connection
from django.db.models.functions import Lower
from arches.app.datatypes.datatypes import DataTypeFactory
from arches.app.models.models import GraphModel, Node, No... |
# -*- coding: utf-8 -*-
'''
Module for managing locales on POSIX-like systems.
'''
# Import python libs
import logging
import re
import os
# Import salt libs
import salt.utils
import salt.utils.decorators as decorators
log = logging.getLogger(__name__)
# Define the module's virtual name
__virtualname__ = 'locale'
... |
Updated examples
Updated to reflect changes to the last handful of commits (back to 1f1b31e87a8ada8ca63c4b6cd94f2b6704f178f7)
|
#!/usr/bin/env python
# encoding=utf8
from flexbe_core import EventState, Logger
from flexbe_core.proxy import ProxySubscriberCached
from geometry_msgs.msg import Pose, PoseStamped
class Get_Robot_Pose(EventState):
'''
Gets the current pose of the robot.
#> pose geometry_msgs.Pose Current... |
'''
Module for managing logrotate.
'''
# Import python libs
import os
import logging
# Import salt libs
import salt.utils
log = logging.getLogger(__name__)
default_conf = '/etc/logrotate.conf'
def __virtual__():
'''
Only work on POSIX-like systems
'''
# Disable on these platforms
disable = ('Wi... |
"""
A collection of utilities for handling output to standard out/err as well as
to file-based or other logging handlers through a single interface.
"""
import inspect
import logging
import os
import sys
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
global_logging_s... |
try:
from urllib.parse import quote
except ImportError:
from urllib import quote
import traceback
from django.db.models.signals import post_save
from django.dispatch import receiver
from boto.s3.connection import S3Connection, OrdinaryCallingFormat
from boto.exception import S3ResponseError
from celery import... |
# Copyright (C) 2009-2016, Quentin "mefyl" Hocquet
#
# This software is provided "as is" without warranty of any kind,
# either expressed or implied, including but not limited to the
# implied warranties of fitness for a particular purpose.
#
# See the LICENSE file for more information.
import collections
import drake... |
# -*- coding: utf-8 -*-
import re
class InfluxDBClient(object):
def __init__(self,
host,
port,
user,
pwd,
db,
):
import influxdb
self._client = influxdb.InfluxDBClient(
host=host,
port=port,
... |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... |
"""
basic support for running library as script
"""
import os
import os.path as op
import sys
import shutil
import logging
from subprocess import call
from optparse import OptionParser as OptionP, OptionGroup
os.environ["LC_ALL"] = "C"
class ActionDispatcher (object):
"""
This class will be invoked
a) ... |
# -*- encoding: utf-8 -*-
import base64
import os.path
import sublime
import re
from .image_manager import ImageManager
from .lib.pygments_from_theme import pygments_from_theme
from bs4 import BeautifulSoup, Comment as html_comment
def plugin_loaded():
global error404, loading, DEFAULT_STYLE, USER_STYLE_FILE
l... |
# contains the string to be deserialized/parse (currently a tx or blockheader)
data gStr[]
# index to gStr
data pos
# contains a script, currently only used for outputScripts since input scripts are ignored
data gScript[]
# length of gScript
data tmpScriptLen
def txinParse():
prevTxId = self.readUnsignedBitsL... |
#!/usr/bin/python
import exceptions, sys, os, socket, rpyc, pickle
import dns.query, dns.rdatatype, dns.exception
from twisted.internet import reactor
from twisted.names import dns as twisted_dns
from twisted.names import server
from datetime import datetime, timedelta
from random import randrange
from threading import... |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from __future__ import print_function
import os
import sys
from shutil import copytree, rmtree, copyfile
# append root of the python code tree to sys.apth so that imports are working
# alternative: add path to riotam_backend to the PYTHONPATH environment variable, but this... |
# -*- coding: utf-8 -*-
'''
Clone a remote git repository and use the filesystem as a Pillar source
This external Pillar source can be configured in the master config file like
so:
.. code-block:: yaml
ext_pillar:
- git: master git://gitserver/git-pillar.git root=subdirectory
The `root=` parameter is opti... |
from __future__ import unicode_literals
import django
from django.test import TestCase
import source.test.utils as source_test_utils
from ingest.triggers.ingest_trigger_condition import IngestTriggerCondition
class TestIngestTriggerConditionIsConditionMet(TestCase):
def setUp(self):
django.setup()
... |
#
# Author: Satoru SATOH <ssato redhat.com>
# License: BSD3
#
"""
Base class for template engine implementations.
"""
from __future__ import absolute_import
import logging
import anytemplate.compat
import anytemplate.utils
LOGGER = logging.getLogger(__name__)
class TemplateNotFound(Exception):
"""
Excepti... |
# Copyright (C) 2009-2012, Quentin "mefyl" Hocquet
#
# This software is provided "as is" without warranty of any kind,
# either expressed or implied, including but not limited to the
# implied warranties of fitness for a particular purpose.
#
# See the LICENSE file for more information.
import drake
import re
import s... |
import json
import os
from os import path
from datetime import datetime
from psycopg2 import connect
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
class Etl(object):
def __init__(self, connection_string, folder, wipe=False):
self.wipe = wipe
self.connection_string = connection_string... |
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Velvet(MakefilePackage):
"""Velvet is a de novo genomic assembler specially designed for s... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, tools, _
from odoo.exceptions import AccessError, MissingError
from odoo.tools import pickle
EXCLUDED_FIELDS = set((
'report_sxw_content', 'report_rml_content', 'report_sxw', 'r... |
import logging
import os
import urllib2
from django.conf import settings
import cronjobs
import waffle
from kitsune.search.tasks import index_task
from kitsune.wiki import tasks
from kitsune.wiki.models import DocumentMappingType
log = logging.getLogger('k.migratehelpful')
@cronjobs.register
def rebuild_kb():
... |
import asyncio
import aiohs2
import pandas as pd
import logging
from functools import wraps
coroutine = asyncio.coroutine
logger = logging.getLogger(__name__)
hive_type_map = {
'BOOLEAN': pd.np.dtype(bool),
'BINARY': pd.np.dtype(bytes),
'TINYINT': pd.np.dtype(int),
'SMALLINT': pd.np.dtype(int),
... |
# -*- coding: utf-8 -*-
#
# Copyright 2015 SUSE 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 agr... |
from __future__ import unicode_literals, print_function
from ape import tasks
import os
import sys
import subprocess
class Config(object):
APE_ROOT = os.environ['APE_ROOT_DIR']
SOURCE_HEADER = '#please execute the following in your shell:\n'
introduce_conf = Config()
@tasks.register_helper
def get_contain... |
from copy import deepcopy
import numpy as np
from multiphenotype_utils import (get_continuous_features_as_matrix, add_id, remove_id_and_get_mat,
partition_dataframe_into_binary_and_continuous, divide_idxs_into_batches)
import pandas as pd
import tensorflow as tf
from dimreducer import DimReducer
from general_auto... |
# Lint as: python3
# Copyright 2020 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 ... |
#
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2006 Async Open Source
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (a... |
# -*- coding: utf-8 -*-
'''
Philips HUE lamps module for proxy.
'''
from __future__ import absolute_import
# Import python libs
import logging
import requests
import json
from salt.exceptions import CommandExecutionError
__proxyenabled__ = ['philips_hue']
GRAINS_CACHE = {}
CONFIG = {}
log = logging.getLogger(__fil... |
from os.path import dirname, basename, abspath
from collections import defaultdict, Counter, OrderedDict
from multiprocessing import Process, Manager
from subprocess import Popen, PIPE
from xml.sax import make_parser
from xml.sax.handler import ContentHandler
from io import StringIO
from glob import glob
from datetime ... |
from datetime import timedelta
import time
import uuid
from Cryptodome.PublicKey.RSA import importKey
from django.utils import dateformat, timezone
from jwkest.jwk import RSAKey as jwk_RSAKey
from jwkest.jwk import SYMKey
from jwkest.jws import JWS
from jwkest.jwt import JWT
from oidc_provider.lib.utils.common import... |
# coding=utf-8
# Filename: common.py
# pylint: disable=locally-disabled
"""
A collection of commonly used modules.
"""
from __future__ import division, absolute_import, print_function
import numpy as np
import pandas as pd
from km3pipe import Module, Blob
from km3pipe.tools import peak_memory_usage, zenith, azimuth
... |
from __future__ import absolute_import
import time
import json
import xlwt
import datetime
from django.db import transaction
from django.contrib.gis.geos import Point
from celery import shared_task
from onadata.apps.fieldsight.models import Organization, Project, Site, Region, SiteType
from onadata.apps.userrole.models... |
#!/usr/bin/env python
# coding=utf-8
# Filename: jpp.py
# pylint: disable=
"""
Pump for the jpp file read through aanet interface.
"""
from __future__ import division, absolute_import, print_function
import numpy as np
from km3pipe import Pump
from km3pipe.dataclasses import HitSeries
from km3pipe.logger import logg... |
from __future__ import absolute_import
import time
import json
import xlwt
import datetime
from datetime import date
from django.db import transaction
from django.contrib.gis.geos import Point
from celery import shared_task
from onadata.apps.fieldsight.models import Organization, Project, Site, Region, SiteType
from on... |
from __future__ import unicode_literals
import json
import xlwt
from io import BytesIO
from django.http import HttpResponse
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.models import Group, User, Permission
from django.contrib.gis.geos import Point
from django.db import ... |
"""
Multiplies two square matrices together using a *single* block of threads and
global memory only. Each thread computes one element of the resulting matrix.
"""
import time
import numpy as np
from pycuda import driver, compiler, gpuarray, tools
# -- initialize the device
import pycuda.autoinit
kernel_code_templa... |
from __future__ import unicode_literals
import json
import xlwt
from io import BytesIO
from django.http import HttpResponse
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.models import Group, User, Permission
from django.contrib.gis.geos import Point
from django.db import ... |
# !/usr/bin/env python
"""
Usage: python gui_export.py
===GUI version of lingualeo.export===
"""
import sys
import os
import sqlite3
import time
import traceback
import json
import psutil
from PyQt4 import QtCore, QtGui
from requests.exceptions import ConnectionError as NoConnection, Timeout
from collections import C... |
# Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
# !/usr/bin/env python
"""
Usage: python gui_export.py
===GUI version of lingualeo.export===
"""
import sys
import os
import sqlite3
import time
from PyQt4 import QtCore, QtGui
from requests.exceptions import ConnectionError as NoConnection, Timeout
from collections import Counter
from operator import itemgetter
fro... |
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... |
from __future__ import division
from __future__ import print_function
# -*- coding: utf-8 -*-
# Copyright 2020 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.a... |
# 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 ... |
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redistribute it and/or modify
# it ... |
# -*- coding: utf-8 -*-
"""Environment configuration"""
import collections
import datetime
import importlib
import logging
import multiprocessing
import os
import pkg_resources
import sys
import weakref
from biryani import strings
from openfisca_core import periods
try:
from openfisca_parsers import input_variab... |
import importlib
import shutil
import subprocess
from pathlib import Path
from tempfile import NamedTemporaryFile
import pytest
from Pegasus.api import *
pegasus_graphviz = importlib.import_module("Pegasus.cli.pegasus-graphviz")
graph_node = pegasus_graphviz.Node
@pytest.fixture(scope="module")
def diamond_wf_file... |
# -*- coding: utf-8 -*-
from logging import getLogger
from time import time, sleep, localtime, strftime
from restkit import request
from retrying import retry
import simplejson as json
from elasticsearch import Elasticsearch
from elasticsearch.client import IndicesClient
from elasticsearch.exceptions import Elasticsea... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2017-2022 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... |
from django.db import models
import settings
AUTO_PRUNE_MODES = (
('None', 'None'),
('Conservative', 'Conservative'),
('Normal', 'Normal'),
('Aggressive', 'Aggressive'),
)
class GwoExperiment(models.Model):
"""An experiment or test in Google Website Optimizer"""
title = models.CharField(max_... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, o... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, o... |
# Port-specific Skia library code.
{
'targets': [
{
'target_name': 'ports',
'product_name': 'skia_ports',
'type': 'static_library',
'standalone_static_library': 1,
'dependencies': [
'core.gyp:core',
'sfnt.gyp:sfnt',
'utils.gyp:utils',
],
'include_d... |
"""akara.services - adapters to use Python functions as WSGI handlers
This module is meant to be used by functions in an Akara extension
module.
"""
import httplib
import warnings
import functools
import cgi
import inspect
from xml.sax.saxutils import escape as xml_escape
from BaseHTTPServer import BaseHTTPRequestH... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, o... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2017 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2017 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2020 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2014-2019 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... |
remove * import
|
import gpsd
import time, os
import numpy as np
from math import radians, degrees, sin, cos, sqrt, asin, atan2, pi
from flask_socketio import SocketIO
ORIGIN_LOC = None
EARTH_SPHERE_RADIUS = 6372.8 * 1000 #in meters
socketio = SocketIO(message_queue='redis://')
def connect_local():
gpsd.connect()
def get_loc(max_... |
fix extra or statement
|
__version__ = "0.6.59"
0.6.60
__version__ = "0.6.60"
|
# =============================================================================
# COPYRIGHT 2013 Brain Corporation.
# License under MIT license (see LICENSE file)
# =============================================================================
import logging
import os
import platform
from utility import run_shell, cp, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.