text stringlengths 17 737k |
|---|
#!/usr/bin/env python
#
# checkout_tests.py: Testing checkout --force behavior when local
# tree already exits.
#
# Subversion is a tool for revision control.
# See http://subversion.tigris.org for more information.
#
# ====================================================================
# Copy... |
#!/usr/local/bin/python3
"""
BibLaTeX check on missing fields and consistent name conventions,
especially developed for requirements in Computer Science.
"""
__author__ = "Pez Cuckow based on "
__version__ = "0.0.3"
__credits__ = ["Pez Cuckow", "BibTex Check 0.2.0 by Fabian Beck"]
__license__ = "MIT"
__e... |
from sqlalchemy import Column, Integer, String, DateTime, text, ForeignKey, func,create_engine
from sqlalchemy.ext.declarative import declarative_base
import re
from requests import get, HTTPError
from bs4 import BeautifulSoup
from sqlalchemy.orm import sessionmaker
Base = declarative_base() #metadata
class Link(Base)... |
#!/usr/bin/env python
#
# svnadmin_tests.py: testing the 'svnadmin' tool.
#
# Subversion is a tool for revision control.
# See http://subversion.tigris.org for more information.
#
# ====================================================================
# Copyright (c) 2000-2006 CollabNet. All rights reserved.
#
# Th... |
import unittest
from mock import Mock
from mock import patch
from datetime import datetime
import time
import json
import os
import fedmsg
import fedmsg.core
import fedmsg.config
import fedmsg.commands
from fedmsg.commands.logger import LoggerCommand
from fedmsg.commands.tail import TailCommand
from nose.tools impor... |
#!/usr/bin/python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import pickle
import re
import autofill_dataset_converter
import autofill_dataset_generator
import pyauto_fun... |
# ------------------------------------------------------------------------
# coding=utf-8
# $Id$
# ------------------------------------------------------------------------
from django import forms
from django.contrib import admin
from django.contrib.admin.util import unquote
from django.core.urlresolvers import revers... |
import os
import re
from runpy import run_path
import sys
import warnings
import click
try:
from pygments import highlight
from pygments.lexers import PythonLexer
from pygments.formatters import TerminalFormatter
PYGMENTS = True
except:
PYGMENTS = False
from toolz import valfilter, concatv
from zi... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
A universal Python parser combinator library inspired by Parsec library of Haskell.
'''
__author__ = 'He Tao, sighingnow@gmail.com'
import re
from functools import wraps
from collections import namedtuple
#############################################################... |
"""
sentry.web.frontend.projects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.http... |
"""
This module provides the foundation of job elements.
"""
class PipelineElement(object):
"""
This class is the base class for all objects participating in the
transformation pipeline.
A PipelineElement must have the following attributes:
- `out`, a dictionary that maps logical names for outpu... |
import numpy as np
from matplotlib import pyplot
from fire_rs.geodata.environment import World
from fire_rs.geodata.geo_data import GeoData
def cluster_multi_layer(arr: 'GeoData', err_by_layer, already_clustered=(), cluster_layer_name='clustering'):
"""Clusters a GeoData by (1) clustering each of its layers indiv... |
from path import path
from setuptools import find_packages
import logging
import sphinx
import sys
def read_project_version(py=None, where='.', exclude=['bootstrap', 'pavement', 'doc', 'docs', 'test', 'tests', ]):
if not py:
py = path(where) / find_packages(where=where, exclude=exclude)[0]
py = path(p... |
# -*- coding: utf-8 -*-
#
# nonconformist documentation build configuration file, created by
# sphinx-quickstart on Thu Mar 19 19:08:44 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.... |
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... |
# -*- coding: utf-8 -*-
#
# Web Platform Compatibility API documentation build configuration file,
# created by
# sphinx-quickstart on Mon Jul 21 13:24:51 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# ... |
# -*- coding: utf-8 -*-
#
# -- General configuration ------------------------------------------------
import re
import sys
nitpicky = True
linkcheck_anchors_ignore = [".*"]
linkcheck_ignore = [
r"http://localhost:\d+/",
r"https://github.com/mit-nlp/MITIE/releases/download/",
]
linkcheck_retries = 2
linkcheck_t... |
# -*- coding: utf-8 -*-
#
# Channels documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 19 11:37:58 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or module... |
# -*- coding: utf-8 -*-
#
# Populus documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 16 20:43:24 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... |
# -*- coding: utf-8 -*-
#
# Reo documentation build configuration file, created by
# sphinx-quickstart on Mon Aug 22 11:55:22 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pip2 documentation build configuration file, created by
# sphinx-quickstart on Fri Jan 13 09:42:16 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogen... |
# -*- coding: utf-8 -*-
#
# marshmallow documentation build configuration file.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are co... |
# coding=utf-8
# Copyright 2021 The Circuit Training Team 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 ap... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# pmareport documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... |
import os
import sys
import time
import inspect
from pathlib import Path, PurePosixPath
from typing import Optional, Union, Mapping
import logging
HERE = Path(__file__).parent
sys.path.insert(0, str(HERE / '..'))
import anndata
logger = logging.getLogger(__name__)
for generated in HERE.glob('anndata.*.rst'):
g... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# demosys-py documentation build configuration file, created by
# sphinx-quickstart on Sat Apr 22 08:32:03 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
#... |
# -*- coding: utf-8 -*-
#
# Pythran documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 19 20:57:04 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... |
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
class Turtle(object):
def __init__(self):
super().__init__()
self.image = 'sprites/turtle.png'
self.pos_x = 0
self.pos_y = 0
self.x_vel = 0
self.y_vel = 0
def position(self):
return [self.pos_x, self.pos_y]
|
# -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'osl_flatpages.views.get', {'page': 'Home'}, name="home"),
url(... |
# -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.template import RequestContext
def server_error(request):
return render_to_response('500.html', RequestContext(request))
|
# -*- coding: utf-8 -*-
"""
Flask_LenzM_Utils
~~~~~~~~~~~~~~~~~~~
Utils for Flask Projects
:copyright: (c) 2016 by Michael Lenzen
:licence: MIT, see LICENCE for more details
"""
import csv
import logging
import os.path
from flask import abort
import flask_sqlalchemy
from sqlalchemy import (
Column,
Integer,
Strin... |
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.core.paginator import Paginator
from django.db.models import ObjectDoesNotExist
from django.shortcuts import render_to_response, get_object_or_404
from django.template impor... |
"""
Data type classes used by base importers
"""
import abc
import logging
from collections import namedtuple
from django.db import connection
from django.forms import ValidationError
from localflavor.gb.forms import GBPostcodeField
from addressbase.models import Blacklist
from data_collection.slugger import Slugger... |
#
#
# Copyright (C) 2013 Google Inc.
#
# 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed ... |
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
import shutil
import tempfile
try:
from cStringIO import StringIO as IOStream
except ModuleNotFoundError:
from io import BytesIO as IOStream
from django.test import TestCase
from django.conf import settings
from django.cor... |
# Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.provision.test.test_install -*-
"""
Install flocker on a remote node.
"""
import posixpath
from textwrap import dedent
from urlparse import urljoin
from effect import Func, Effect
from ._common import PackageSource, Variants, ... |
"""
This module provides routines for applying solar rotation functions to
mapcubes.
"""
import numpy as np
import astropy.units as u
# SunPy imports
from sunpy.physics.transforms.differential_rotation import rot_hpc
from sunpy.image.coalignment import apply_shifts
__author__ = 'J. Ireland'
__all__ = ['calculate_so... |
#!/usr/bin/env python
# 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
#
# Authors:
# - Paul Nilsson, paul.nilsson@cern.ch, 2017
import os
import ti... |
#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... |
########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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... |
# This file is part of LiSE, a framework for life simulation games.
# Copyright (c) Zachary Spector, zacharyspector@gmail.com
"""Proxy objects to access LiSE entities from another process."""
import sys
import logging
from os import getpid
from collections import (
Mapping,
MutableMapping,
MutableSequence
... |
# Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... |
# Amara, universalsubtitles.org
#
# Copyright (C) 2012 Participatory Culture Foundation
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your op... |
# coding=utf-8
# Copyright 2019 The Mesh TensorFlow 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 applicab... |
# -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
# Copyright 2018-2019 New Vector Ltd
# Copyright 2019 The Matrix.org Foundation C.I.C.
#
# 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 Licens... |
# Copyright 2014 Florian Ludwig
#
# 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... |
"""
Topographica SheetView objects and its subclasses.
For use with the Topographica plotting and data analysis mechanisms.
A Sheet object has its internal data which remains hidden, but it will
create views of this data depending on the Sheet defaults or the
information requested. This way there can be multiple view... |
# coding=utf-8
# Copyright 2019 The Mesh TensorFlow 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 applicab... |
import os
import sys
import tempfile
import shutil
from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.log import logger
from pip.locations import src_prefix, virtualenv_no_global, distutils_scheme
from pip.basecommand import Command
from pip.index import PackageFinder
from pip.exception... |
# Copyright 2012 Florian Ludwig
#
# 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... |
import os, shutil
from unittest import mock, skip
import swiftclient
from django.test import TestCase, tag
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from rest_framework import status
from uploadedfiles.models import UploadedFile
from u... |
from eve.render import send_response
from flask import request, send_from_directory
from taarifa_api import api as app, main
app.name = 'TaarifaWaterpoints'
# Override the maximum number of results on a single page
# This is needed by the dashboard
# FIXME: this should eventually be replaced by an incremental load
#... |
#!/usr/bin/env python
""" Implements S-K Algorithm for training SVMs on Zener Cards. """
import sys
import os
import re
import numpy as np
from PIL import Image
class SVM(object):
"""An SVM model
Attirbutes:
epsilon:
max_updates
class_letter
"""
def __init__(self, epsilon, ... |
import sys
import logging
from bottle import Bottle, run, urljoin, HTTPResponse, request
# set up logging
logging.basicConfig(filename='bidder_gateway.log',
format='%(asctime)-15s %(levelname)s %(message)s',
level=logging.DEBUG)
logger = logging.getLogger('bidder_gateway')
# create the bottle app so ... |
# -*- coding: utf-8 -*-
from socketIO_client import SocketIO
import json
import serial
import subprocess
locations=['/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2','/dev/ttyACM3']
isOnline = False
# Detect and select the Serial Port
for device in locations:
try:
ser = serial.Serial(device, 9600)
br... |
import numpy as np
from scipy.ndimage import gaussian_laplace
import itertools as itt
import math
from math import sqrt, hypot, log
from numpy import arccos
from skimage.util import img_as_float
from skimage.feature import peak_local_max
from astropy.modeling.models import Ellipse2D
# from .._shared.utils import asser... |
#
# Copyright (c) 2010 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy of... |
import logging
import os
import pathlib
import sys
import warnings
from tqdm.auto import tqdm
from cellpy import prms
from cellpy.parameters.internal_settings import get_headers_journal, get_headers_summary
from cellpy.readers import cellreader
from cellpy.utils.batch_tools import batch_helpers as helper
from cellpy.... |
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext
from django.contrib.auth.models import User
from django.contrib.humanize.templatetags.humanize import naturalday
from django.core.urlresolvers import reverse
from django.template.defaultfil... |
"""schema is a library for validating Python data structures, such as those
obtained from config-files, forms, external services or command-line
parsing, converted from JSON/YAML (or something else) to Python data-types."""
import re
__version__ = '0.6.7'
__all__ = ['Schema',
'And', 'Or', 'Regex', 'Optiona... |
"""Reverse geocoding using the Google Geocoding API at:
http://code.google.com/apis/maps/documentation/geocoding/index.html#ReverseGeocoding
This pulls out the "long_name" of the "locality" type of the
"address_components" of the "postal_code" result type. Make sense?
"""
import json
import logging
from google.a... |
from pyparsing import *
import os
import json
class IdlParserException(Exception):
def __init__(self, message, location):
self.message = message
self.location = location
class IdlParser:
def __init__(self):
self.locator = Empty().setParseAction(self.locatorParseAction)('location')
... |
# Copyright 2014 Sandra Giuliani
# drug_repo.py
# A bioinformatics pipeline for drug repositioning for schistosomiasis
# Please dowload the full repository from github.com/sandygiuliani/drug_repo
# See README.md for more info
############################################################################
### IMPORT ... |
import re
import flatland as fl
def valid_float(element, state):
if isinstance(element.value, float):
return True
else:
element.add_error("Value must be numeric")
return False
def valid_int(element, state):
if isinstance(element.value, int):
return True
else:
... |
from datetime import datetime
from django.shortcuts import get_object_or_404
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from django.views.generic import dates
from models import Section
from pressroom.models import Article
class SectionListView(ListVie... |
# -*- coding: utf-8 -*-
# Amara, universalsubtitles.org
#
# Copyright (C) 2012 Participatory Culture Foundation
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
#... |
#!/usr/bin/env python
# encoding: utf-8
from __future__ import unicode_literals
import datetime
import logging
import requests
import requests_cache
import socket
import time
import urlparse
from contextlib import contextmanager
from cStringIO import StringIO
from nose.tools import assert_equal, assert_raises
from ... |
#!/usr/bin/env python
import json
import visit
"""Visits ns_server metadata and emits cleansed versions where
values are converted to zeros. By zero'ing out values,
the metadata becomes more easily diff'able."""
def emit(level, *args):
print " " * level + " ".join([str(x) for x in args])
def zero(val):
... |
from fontTools.misc.py23 import bytechr, byteord, bytesjoin
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
floatToFixed as fl2fi,
floatToFixedToStr as fl2str,
strToFixedToFloat as str2fl,
otRound,
)
from fontTools.misc.textTools import safeEval
import array
import io
import logging
i... |
from django.core.management.base import BaseCommand, CommandError
from django.contrib.sessions.models import Session
class Command(BaseCommand):
args = '--batch-size=n --bigger-than=n'
help = 'Analyze Django sessions, summarizing present keys & session size'
# Number of sessions to process in one batch.
... |
#
# Copyright (c) 2004-2006 rPath, Inc.
#
# All Rights Reserved
#
# python standard library imports
import os, sys
import tempfile
import subprocess
import re
# mint imports
from imagegen import ImageGenerator, MSG_INTERVAL
import bootable_image
# conary imports
from conary import conaryclient
from conary import dep... |
""" boxing - wrapping process with another process so we can run
a process inside and see if it crashes
"""
import py
import os
import sys
import marshal
from py.__.test import config as pytestconfig
PYTESTSTDOUT = "pyteststdout"
PYTESTSTDERR = "pyteststderr"
PYTESTRETVAL = "pytestretval"
import tempfile
from Strin... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2007 Edgewall Software
# Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2005-2007 Christian Boos <cboos@neuf.fr>
# All rights reserved.
#
# This software is licensed as described in th... |
from application import app
from .models import *
import sendgrid
import time
from itsdangerous import URLSafeTimedSerializer
sg = sendgrid.SendGridClient(app.config["SENDGRID_API_KEY"])
ts = URLSafeTimedSerializer(app.config["SECRET_KEY"])
def validate_email(entry):
token = ts.dumps(entry.email, salt = app.config["... |
# -*- 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 GNU... |
from File import File
class Png:
"""Class containing methods for creation of png files."""
#### initial values ###
_height = 1
_width = 1
_color_type = 2
_bit_depth = 8
_default_color = [0,0,0] # black
_image = [[_default_color]]
_background_color = None
_transparent_c... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from future import standard_library
standard_library.install_aliases()
import configdb
import csv
from consolemsg import step, error, warn, fail, success
from erppeek import Client
from emili import sendMail
import pymongo
from datetime import datetime, timedelta, date, t... |
from .Point import Point
from .smooth import smoothSegment
from .noiseDetection import removeNoise
from .simplify import simplify
from .preprocess import preprocessSegment
from .Location import inferLocation
from .transportationMode import inferTransportationMode
from sklearn.cluster import DBSCAN
from sklearn.preproc... |
import capstone as _capstone
from .arch import Arch
from .archerror import ArchError
class ArchX86(Arch):
def __init__(self, endness='Iend_LE'):
if endness != 'Iend_LE':
raise ArchError('Arch i386 must be little endian')
super(ArchX86, self).__init__(endness)
bits = 32
vex_arc... |
class AdminPlugin(object):
# A dictionary which will contain the owner nicks and vhosts
owners = None
# A list of trusted vhosts
trusted_vhosts = None
def __init__(self, cardinal, config):
self.owners = {}
self.trusted_vhosts = []
# If owners aren't defined, bail out
... |
"""
Inbound Proxy Module developed by Bharadwaj Machiraju (blog.tunnelshade.in)
as a part of Google Summer of Code 2013.
"""
import os
import re
import ssl
import socket
import datetime
from multiprocessing import Value
import tornado.httpserver
import tornado.ioloop
import tornado.iostream
import tornado.... |
#!/usr/bin/env python
from qt_gui.plugin import Plugin
from python_qt_binding import QtWidgets, QtCore, QtGui
class ProjectPlugin(Plugin):
def __init__(self, context):
super(ProjectPlugin, self).__init__(context)
## Editor
self.editor = self.create_editor()
self.editor.undo_sta... |
# -*- coding: utf-8 -*-
import werkzeug.wrappers
from werkzeug.exceptions import NotFound
from framework import StoredObject
from framework import HTTPError
from framework.flask import app, redirect, make_response
from framework.mako import makolookup
from mako.template import Template
from framework import session
... |
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import api, models, fields, _
class Parser(models.AbstractMod... |
# -*- coding: utf-8 -*-
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
import io
import os
import json
import timeit
import frappe
from datetime import datetime
from frappe import _
from frappe.utils import cint, flt, update_progress_bar, cstr, DATETIME_FORMAT
from ... |
#!/usr/bin/python
"""
Diaphora, a diffing plugin for IDA
Copyright (c) 2015-2018, Joxean Koret
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 2 of the License, or
(at your option) an... |
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and contributors
# For license information, please see license.txt
import traceback
import json
from rq.timeouts import JobTimeoutException
import smtplib
import quopri
from email.parser import Parser
import frappe
from frappe import _, safe_encode, t... |
#!/usr/bin/python
"""
Diaphora, a diffing plugin for IDA
Copyright (c) 2015, Joxean Koret
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 2 of the License, or
(at your option) any lat... |
# libavg - Media Playback Engine.
# Copyright (C) 2003-2008 Ulrich von Zadow
#
# 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 of the License, or (at your option) any l... |
import subprocess
class Adb:
ADB_COMMAND = "adb"
# devices
ADB_COMMAND_DEVICES = ["devices", "-l"]
# activity manager
ADB_COMMAND_KILL = ["shell", "am", "force-stop"]
ADB_COMMAND_KILL_ALL = ["shell", "am", "kill-all"]
# package manager
ADB_COMMAND_CLEAR_APP_DATA = ["shell", "pm", "c... |
import frappe
# `skip_for_doctype` was a un-normalized way of storing for which
# doctypes the user permission was applicable.
# in this patch, we normalize this into `applicable_for` where
# a new record will be created for each doctype where the user permission
# is applicable
#
# if the user permission is applicabl... |
from abc import ABCMeta, abstractmethod
from voluptuous import Schema, Required, MultipleInvalid, Coerce
import time
from uuid import uuid4
from pyehr.ehr.services.dbmanager.errors import InvalidJsonStructureError
from pyehr.utils import cleanup_json, decode_dict
class Record(object):
"""
Generic record abst... |
from future_builtins import zip
from operator import itemgetter
from collections import defaultdict
from heapq import heappush, heappop
def identity(value):
return value
def make_graph(source, edge_factory=identity):
"""
Make graph out of (from, to, *attributes) tuples using edge_factory.
:param edge... |
# -*- coding: utf-8 -*-
"""pybooru.api_danbooru
This module contains all API calls of Danbooru for Pybooru.
Classes:
Danbooru -- Contains all API calls.
"""
# __future__ imports
from __future__ import absolute_import
# pybooru imports
from .exceptions import PybooruAPIError
class DanbooruApi(object):
"""... |
#!/usr/bin/env python
"""
Extract pronunciations from the ELP items.
Outputs a CSV with the orthographic and phonological form on each
line. The phonological form is stripped of syllabification and stress
markers.
"""
# Copyright 2013 Constantine Lignos
#
# Licensed under the Apache License, Version 2.0 (the "Licens... |
"""distutils.dir_util
Utility functions for manipulating directories and directory trees."""
# This module should be kept compatible with Python 1.5.2.
__revision__ = "$Id$"
import os, sys
from types import *
from distutils.errors import DistutilsFileError, DistutilsInternalError
from distutils import log
# cache ... |
#!/usr/bin/env python
# coding=utf-8
import hashlib
import hmac
import requests
import six
import time
from .exceptions import BinanceAPIException, BinanceRequestException, BinanceWithdrawException
if six.PY2:
from urllib import urlencode
elif six.PY3:
from urllib.parse import urlencode
class Client(object)... |
#!/usr/bin/env python
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
import os
import yaml
from fabric.api import task, local, settings, warn_only
from cuisine import file_exists
@task
def up():
""" Boot instances """
# call class OpenStack
op = OpenStack()
# Check if fingerprint exis... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.