src stringlengths 721 1.04M |
|---|
# ==============================================================================
# Copyright (C) 2011 Diego Duclos
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as publi... |
# Revision graph generator for Mercurial
#
# Copyright 2008 Dirkjan Ochtman <dirkjan@ochtman.nl>
# Copyright 2007 Joel Rosdahl <joel@rosdahl.net>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""supports walking the history as D... |
# Copyright 2011 Jamie Norrish (jamie@artefact.org.nz)
#
# 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... |
from chatterbot.adapters.storage import StorageAdapter
from chatterbot.adapters.exceptions import EmptyDatabaseException
from chatterbot.conversation import Statement, Response
# from jsondb import Database
class JsonDatabaseAdapter(StorageAdapter):
"""
The JsonDatabaseAdapter is an interface that allows Chat... |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
# -*- coding: utf-8 -*-
from time import time
from module.common.json_layer import json_loads
from module.plugins.Account import Account
class MyfastfileCom(Account):
__name__ = "MyfastfileCom"
__type__ = "account"
__version__ = "0.03"
__description__ = """Myfastfile.com account plugin"""
... |
from ..core import HoloMap, CompositeOverlay
from ..core.util import match_spec
def compute_sizes(sizes, size_fn, scaling, base_size):
"""
Scales point sizes according to a scaling factor,
base size and size_fn, which will be applied before
scaling.
"""
sizes = size_fn(sizes)
return (base_s... |
# coding: UTF-8
#
# TileCutter - .tcp file reading/writing functions
#
# Copyright © 2011 Timothy Baldock. All Rights Reserved.
import logger
debug = logger.Log()
import sys, os, traceback
import pickle
import json
import tcproject
import project
import config
config = config.Config()
class tcp_writer(object):
... |
from collections import namedtuple
import copy
import warnings
from numba.core.tracing import event
from numba.core import (utils, errors, typing, interpreter, bytecode, postproc,
config, callconv, cpu)
from numba.parfors.parfor import ParforDiagnostics
from numba.core.inline_closurecall import... |
from edc_constants.constants import NEG, YES, NOT_APPLICABLE, POS, NO
from django import forms
from td_maternal.classes import MaternalStatusHelper
from ..models import MaternalMedicalHistory, AntenatalEnrollment
from .base_maternal_model_form import BaseMaternalModelForm
class MaternalMedicalHistoryForm(BaseMater... |
import pytest
# from pireal.core.interpreter import scanner
# from pireal.core.interpreter import lexer
from pireal.core.interpreter import parser
# from pireal.core.interpreter import rast as ast
# @pytest.fixture
# def fixture_parser():
# def _make_parser(text):
# sc = scanner.Scanner(text)
# l... |
"""
The public API for Templar pre/post-processor rules.
Users can use this module with the following import statement:
from templar.api.rules import core
"""
from templar.exceptions import TemplarError
import re
class Rule:
"""Represents a preprocessor or postprocessor rule. Rules are applied in the orde... |
"""
Tests for adding and removing variants from variant_sets.
"""
import os
import random
from django.conf import settings
from django.test import TestCase
import pyinter
from main.models import AlignmentGroup
from main.models import Chromosome
from main.models import Dataset
from main.models import ExperimentSample... |
"""
:mod:`jedi.evaluate.imports` is here to resolve import statements and return
the modules/classes/functions/whatever, which they stand for. However there's
not any actual importing done. This module is about finding modules in the
filesystem. This can be quite tricky sometimes, because Python imports are not
always ... |
import uuid
import os
from flask_restful import Resource, reqparse
from flask_login import login_required
from flask import redirect, send_file, g, url_for
from massive import api, app
from massive.models import *
from massive.utils import *
from io import BytesIO
class Resource(Resource):
method_decorators = [... |
'''
MarkDown format generator
'''
class MarkDown:
'convert raw text to markdown syntax'
def __init__(self):
self.escape_table = {"\\": "\\\\", "`": "\`",
"*": "\*", "_": "\_",
"{": "\{", "}": "\}",
"[": ... |
from pubnub import utils
from pubnub.endpoints.endpoint import Endpoint
from pubnub.enums import HttpMethod, PNOperationType
from pubnub.models.consumer.presence import PNHereNowResult
class HereNow(Endpoint):
HERE_NOW_PATH = "/v2/presence/sub-key/%s/channel/%s"
HERE_NOW_GLOBAL_PATH = "/v2/presence/sub-key/%s... |
#! /usr/bin/env python2
import argparse
import os
import sys
import re
def AssembleJSeq(jseq1_file, jseq2_file):
jseq1 = get_ID_and_seq(jseq1_file)
jseq2 = get_ID_and_seq(jseq2_file)
get_ID = lambda seq: seq[0]
common_IDs = list(set(map(get_ID, jseq1)) & set(map(get_ID, jseq2)))
jseq1_common = i... |
# Pulls video game metadata from Giantbomb's developer API.
#
# Written by Akshay Agrawal
# August 22, 2013
import argparse
import json
import sys
import urllib2 # For URL opening
def get_game_name(result):
try:
name = result["game"]["name"].encode("utf-8")
if name.find("\"") != -1:
name = name.replace("\"",... |
# encoding: utf-8
"""
Created on 07/18/14
@author: Takashi NAGAI
"""
from zope import schema
from zope.interface import Interface
from plone.app.registry.browser import controlpanel
from ngi.notify.datadog import _
class IDatadog(Interface):
""" Datadog settings """
instance_name = schema.TextLine(
... |
#!/usr/bin/python
#
# Copyright 2014 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 b... |
# -*- coding: utf-8 -*-
#
# 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
#... |
#!/usr/bin/env python
# coding=utf-8
#
# Copyright 2013 meiritugua.com
from wtforms import TextField, HiddenField, validators
from lib.forms import Form
class NewForm(Form):
title = TextField('Title', [
validators.Required(message = "请填写帖子标题"),
validators.Length(min = 3, message = "帖子标题长度过短(3-... |
#!/usr/bin/env python
# We attempted to make this program work with both python2 and python3
"""This script takes a set of files and a cluster configuration describing a set of machines.
It uploads the files to the given machines in round-robin fashion.
The script can also be given an optional schema file.
Th... |
#!/usr/bin/env python
import matplotlib
from matplotlib import pyplot as plt
if __name__ == '__main__':
matplotlib.use('TKAgg')
import sys
import os
from datetime import datetime, timedelta
import numpy as np
from PIL import ImageTk, Image
import tkinter as tk
from tkinter import ttk
import opendrift
from opendr... |
#! /usr/bin/env/python
# Copyright (c) 2016 Brett g Porter
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mod... |
import numpy as np
import pandas as pd
from pandas import Categorical, DataFrame, Series, Timestamp, date_range
import pandas._testing as tm
class TestDataFrameDescribe:
def test_describe_bool_in_mixed_frame(self):
df = DataFrame(
{
"string_data": ["a", "b", "c", "d", "e"],
... |
# Copyright 2013 NTT Data
# 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 appl... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2019 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consi... |
"""
classifier.py
@author yohanes.gultom@ui.ac.id
Running experiments:
* Comparing triple classifiers (optimized by grid search) performance using cross validation
* Comparing feature sets performance agains the best triple classifier
Train models:
* Train triple classifier model using the best model and feature set ... |
# 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 PIL import Image
import HTMLParser
import string
import re
import os.path
from django.utils.datastructures import SortedDict
from django.utils.translation import ugettext as _
from django.core.paginator import Paginator, InvalidPage
from django.template.loader import get_template
from django.template imp... |
def func1(param1):
"""Description
:param param1:
:returns: the return value
"""
pass
def func2(param1):
"""Description
:param param1: param's message
:return: the return value
"""
pass
def func3(param1):
"""Description
:param param1:
:returns: the return value... |
import importlib
import pkgutil
from pathlib import Path
from vint.linting.cli import start_cli
import logging
LOG_FORMAT = 'vint %(levelname)s: %(message)s'
def init_logger():
logging.basicConfig(format=LOG_FORMAT)
def init_linter():
import_all_policies()
def init_cli():
start_cli()
def import_a... |
from docutils.parsers.rst import Directive
try:
maketrans = "".maketrans
except AttributeError:
# python2 fallback
from string import maketrans
import unyt
import unyt.dimensions as dims
from unyt import Unit
from unyt.exceptions import UnitsNotReducible
from unyt._unit_lookup_table import name_alternati... |
# -*- coding: utf-8 -*-
import warnings
from datetime import datetime, timedelta
import pytest
import numpy as np
import pandas as pd
import pandas.util.testing as tm
from pandas.errors import PerformanceWarning
from pandas import (Timestamp, Timedelta, Series,
DatetimeIndex, TimedeltaIndex,
... |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-27 02:19
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('registro', '0001_initial'),
]
operations = [
... |
# This file is a part of MediaDrop (http://www.mediadrop.net),
# Copyright 2009-2015 MediaDrop contributors
# For the exact contribution history, see the git revision log.
# The source code contained in this file is licensed under the GPLv3 or
# (at your option) any later version.
# See LICENSE.txt in the main project ... |
"""
.. _tut_evoked_objects:
The :class:`Evoked <mne.Evoked>` data structure: evoked/averaged data
=====================================================================
The :class:`Evoked <mne.Evoked>` data structure is mainly used for storing
averaged data over trials. In MNE the evoked objects are usually created by... |
#!/usr/bin/python3
import rdflib
import helpFunctions as hf
import re
class Vocabulary0102:
def __init__(self, troot, namespace):
self.troot = troot
self.basens = namespace['base'] + '/voc/'
self.nss = namespace
self.ns = re.sub(r'(\{.*\})lookup', r'\1', troot.tag)
types... |
##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... |
#!/usr/bin/python
from BoostBuild import Tester, List
import os
from string import strip
t = Tester()
# First check some startup
t.set_tree("direct-request-test")
t.run_build_system(extra_args="define=MACROS")
t.expect_addition("bin/$toolset/debug/"
* (List("a.obj b.obj b.dll a.exe")... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# (c) Copyright 2013-2016 Hewlett Packard Enterprise Development LP
# 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 ... |
import logging
import sys
from errbot.backends.base import Message, build_message
from errbot.errBot import ErrBot
from threading import Condition
log = logging.getLogger(__name__)
try:
import pyfire
except ImportError:
log.exception("Could not start the campfire backend")
log.fatal("""
If you intend... |
# -*- encoding:utf-8 -*-
#
# Copyright (c) 2017-2018 Shota Shimazu
#
# 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... |
# -*- coding: utf-8 -*-
# Copyright © 2017 Kevin Thibedeau
# Distributed under the terms of the MIT license
import math
from math import sin, pi
import colorsys
def sinebow(hue):
'''Adapted from http://basecase.org/env/on-rainbows'''
hue = -(hue + 0.5) # Start at red rotating clockwise
rgb = sin(pi * hue), sin(p... |
import urllib,urllib.parse,urllib.request,urllib.error
import json
import time,datetime
import hashlib,hmac,base64
import logging
LOG=logging.getLogger(__name__)
#SELL='sale'
#BUY='purchase'
class hashnest(object):
URL = 'https://www.hashnest.com/api/v1/'
def __init__(self,username,key,secret):
... |
#!/usr/local/bin/python3.5
import csv
import os
import re
import urllib
import requests
import calendar
import sys
import json
import codecs
import resource
import argparse
import gzip
import io
import shutil
import statistics
import warnings
from datetime import timedelta, datetime
from glob import glob
from hashlib ... |
# Copyright 2020 HTCondor Team, Computer Sciences Department,
# University of Wisconsin-Madison, WI.
#
# 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/LICE... |
# -*- coding: UTF-8 -*-
# Copyright 2009-2021 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
"""This defines the :class:`Action` class and the :func:`action`
decorator, and some of the standard actions. See :ref:`dev.actions`.
"""
import logging; logger = logging.getLo... |
#!/usr/bin/env python
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" A collator for Service Manifests """
import argparse
import json
import os
import shutil
import sys
import urlparse
eater_relativ... |
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# Copyright 2014 by Eapii Authors, see AUTHORS for more details.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENCE, distributed with this software.
#------------... |
#!/usr/bin/env python
""" Hippy VM. Execute by typing
hippy [--gcdump dumpfile] [--cgi] <file.php> [php program options]
and enjoy
"""
import sys
import os
if __name__ == '__main__':
sys.path.insert(0, os.path.dirname(
os.path.dirname(os.path.abspath(__file__))))
from hippy.phpcompiler import compile_p... |
# -*- coding: utf-8 -*-
import unittest
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
print(sys.path)
from pathlib import Path
import numpy as np
import pandas as pd
from cogstat import cogstat as cs
print(cs.__file__)
print(cs.__version__)
print(os.path.abspath(cs.__file__))
"""
- All statistica... |
# -*- coding: utf-8 -*-
"""
Logging setup and handlers for PyBank
Created on Wed Jan 13 13:55:56 2016
"""
# ---------------------------------------------------------------------------
### Imports
# ---------------------------------------------------------------------------
# Standard Library
import datetime
... |
import numpy as np
from sklearn.ensemble import GradientBoostingRegressor
from random import sample, seed
from sklearn.decomposition import TruncatedSVD
from math import floor
from sklearn import cross_validation
import numpy as np
from numpy.linalg import norm, svd
def inexact_augmented_lagrange_multiplier(X, lmbda=... |
# 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... |
#!/usr/bin/env python
# ******************************************************
# Copyright 2004: Commonwealth of Australia.
#
# Developed by the Computer Network Vulnerability Team,
# Information Security Group.
# Department of Defence.
#
# Michael Cohen <scudette@users.sourceforge.net>
#
# ****************************... |
#!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2014-2015 CNRS
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limita... |
#!/usr/bin/env python
# Copyright 2015 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.
"""Checks that released mojom.dart files in the source tree are up to date"""
import argparse
import os
import subprocess
import sys
... |
# 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... |
# -*- coding: utf-8 -*-
from views.gobstonesMain import *
from PyQt4 import QtGui
from PyQt4 import QtCore
import datetime
from views.qDesigner.interactive import *
sys.path.append('..')
from .fileOption import FileOption
from .preferencesWindow import PreferencesWindow
from .editOption import EditOption
from .boardOp... |
"""Test the classes and functions defined by gg/photos.py"""
from time import struct_time
from mock import Mock, call
from tests import BaseTestCase
class point:
def __init__(self, lat, lon, ele):
self.lat = lat
self.lon = lon
self.ele = ele
class GError(Exception):
pass
class Ph... |
#! /usr/bin/env python
from __future__ import print_function
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
distribution = Triangular(1.0, 2.5, 4.0)
size = 10000
sample = distribution.getSample(size)
factory = TriangularFactory()
estimatedDistribution = factory.build(sampl... |
# Copyright 2015, Ansible, Inc.
# Luke Sneeringer <lsneeringer@ansible.com>
#
# 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 requi... |
# Copyright (C) 2013-2015 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you can
# redi... |
# 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
# -*- coding: utf-8 -*-
# @Time : 2018/12/27 11:47
# @Author : TOM.LEE
import cv2
import face_recognition
video_capture = cv2.VideoCapture("../videos/hamilton_clip.mp4")
# Load a sample picture and learn how to recognize it.
# Load some sample pictures and learn how to recognize them.
lmm_i... |
"""
verktyg.testsuite.test_datastructures
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests the functionality of the provided Verktyg datastructures.
Classes prefixed with an underscore are mixins and are not discovered by
the test runner.
TODO:
- FileMultiDict
- Immutable types undert... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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... |
#!/usr/bin/env python3
import sys
import numpy as np
import pytest
def generator(n):
for i in range(n):
yield i
def test_we_can_import_listize():
import listize
def test_listize_exists():
import listize
listize.listize
def test_listized_function_is_callable():
import listize
wrapped... |
# -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... |
#!/usr/bin/python
"""nrvr.distros.common.gnome - Manipulate Linux distribution GNOME
Class provided by this module is Gnome.
Idea and first implementation - Leo Baschy <srguiwiz12 AT nrvr DOT com>
Public repository - https://github.com/srguiwiz/nrvr-commander
Copyright (c) Nirvana Research 2006-2015.
Simplified BS... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# help script that details the list of commands
def help(response):
text = "PantherBot works by prefacing commands with \"!\"\n"
text += "Commands:\n"
text += "```!help\n"
text += "!coin\n"
text += "!helloworld\n"
text += "!version\n"
text += "... |
#!/usr/bin/env python
import tweepy
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
import time
ckey = 'CiQGfooRBKJRSrtaGl7GkQ'
csecret = 'G2o2pVeFaYlZdZAQL6NxkE3x7iW0U7kfoUKBTaOg'
atoken = '741285805-38CJ8saoV8UJx46L38bFiZMOSocC2XhtubOsot9x'
asecret = 'sNJUHNg4Gz... |
"""Modoboa limits constants."""
import collections
from django.utils.translation import ugettext_lazy as _
DEFAULT_USER_LIMITS = collections.OrderedDict((
("domains", {
"content_type": "admin.domain", "label": _("Domains"),
"help": _("Maximum number of domains this user can create"),
"re... |
from django.db import models
from django.urls.base import reverse
from edc_base.model_mixins import BaseUuidModel
from edc_base.sites import SiteModelMixin
from edc_search.model_mixins import SearchSlugManager
from edc_search.model_mixins import SearchSlugModelMixin as Base
from django.conf import settings
class Sea... |
from flask.ext.wtf import Form
from wtforms import StringField, SubmitField, TextAreaField, DateTimeField, SelectField, BooleanField, DateField, \
validators, FileField
from wtforms.validators import Required, URL, Email
from .. import db
from flask.ext.pagedown.fields import PageDownField
# datepicker failed
'''
f... |
# coding: utf-8
"""
* plotting phase tensor maps using mtpy.imaging.mtplot.plot_pt_maps
JP 2016
FZ 2017-12-01 re-wrote
"""
# Import necessary modules
#----------------------------------------
import os
import sys
import glob
import mtpy.imaging.mtplot as mtplot
#----------------------------------------
# python ./scr... |
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitati... |
import unittest
import logging
def warn_if_not_implemented(func):
def wrapper(*args, **kwargs):
try:
func(*args, **kwargs)
except Exception as e:
if e.args[0] == 'Not implemented':
logging.warning('%s is not implemented' % func.__name__[len('test_'):])
... |
'''
This file is part of the Python EJTP library.
The Python EJTP library is free software: you can redistribute it
and/or modify it under the terms of the GNU Lesser Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
the Python EJTP ... |
############################################################################
# Copyright(c) Open Law Library. All rights reserved. #
# See ThirdPartyNotices.txt in the project root for additional notices. #
# #
# Licensed u... |
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "frappe"
app_title = "Frappe Framework"
app_publisher = "Frappe Technologies"
app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node"
app_icon = "octicon octicon-circuit-board"
app_color = "o... |
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... |
# This file is part of OpenHatch.
# Copyright (C) 2010 Jack Grigg
# Copyright (C) 2010 John Stumpo
# Copyright (C) 2011 Krzysztof Tarnowski (krzysztof.tarnowski@ymail.com)
# Copyright (C) 2010, 2011 OpenHatch, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... |
import gmail as Gm
import messages as Msg
import slack
from cfg.config import (
WEBHOOK_URL,
GOCD_DASHBOARD_URL,
)
def main():
try:
service, labels, messages_details = initialize()
process(service, labels, messages_details)
except:
pass
def initialize():
service = Gm.ge... |
from __future__ import print_function
import sys
import logging
from couchdbkit.exceptions import ResourceNotFound
from django.conf import settings
from django.db.models import signals
from requests.exceptions import RequestException
from corehq.apps.callcenter.utils import sync_user_cases, bootstrap_callcenter, get_ca... |
#!/usr/bin/python
# This script is used to generate luabinding glue codes.
# Android ndk version must be ndk-r9b.
import sys
import os, os.path
import shutil
import ConfigParser
import subprocess
import re
from contextlib import contextmanager
def _check_ndk_root_env():
''' Checking the environment NDK_ROOT, w... |
# pykarta/geocoder/google.py
# Copyright 2013--2018, Trinity College Computing Center
# Last modified: 15 May 2018
from __future__ import print_function
import string
import xml.etree.cElementTree as ET
from .geocoder_base import GeocoderBase, GeocoderResult, GeocoderError
# See http://code.google.com/apis/maps/docu... |
__author__ = 'ricardo'
"""
Parse Lonely Planet pages
"""
import re
import urllib2
from collections import OrderedDict
from bs4 import BeautifulSoup
def get_text(elem):
"""
Return the element's text encoded in utf-8
"""
return '\n'.join(elem.stripped_strings).encode('utf8')
def parse_sight_index(in... |
# -*- coding: utf-8 -*-
# Copyright (C) 2013-2018 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Tris Wilson
#
# 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 Softw... |
import re
import copy
from linghelper.representations.constants import ENGLISH_ONSETS as ONSETS,ENGLISH_VOWEL_PATTERN as VOWEL_PATTERN
class Word(object):
def __init__(self,orthography,transcription,frequency=0):
self.orthography = orthography
self.syllables = syllabify(transcription)
sel... |
# ----------------------------------------------------------------------------
# Copyright (c) 2017-, LabControl development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -------------------------------------------------... |
# -*- coding: utf-8 -*-
import re
import urlparse
from module.plugins.internal.misc import json
from module.plugins.internal.MultiHoster import MultiHoster
class LinksnappyCom(MultiHoster):
__name__ = "LinksnappyCom"
__type__ = "hoster"
__version__ = "0.16"
__status__ = "testing"
__pattern__ = ... |
#!/usr/bin/env python
#======================================================================
#
# Project : hpp_IOStressTest
# File : IOST.py
# Date : Sep 21, 2016
# Author : HuuHoang Nguyen
# Contact : hhnguyen@apm.com
# : hoangnh.hpp@gmail.com
# License : MIT License
# Copyright : 2016
# Descri... |
# -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2019 Adam Baratz <adam.baratz@gmail.com> #
# ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ulka 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
# autoge... |
from copy import copy, deepcopy
from pickle import loads, dumps
from unittest import TestCase
from weakref import ref
from catalyst.utils.sentinel import sentinel
class SentinelTestCase(TestCase):
def tearDown(self):
sentinel._cache.clear() # don't pollute cache.
def test_name(self):
self.a... |
# gmail-filters.py
#
# Uses the GMail API to remotely manipulate filters for
# mailing lists and the corresponding labels.
#
# Author: Paolo Bonzini <pbonzini@redhat.com>
# License: AGPLv3
from __future__ import print_function
import httplib2
import os, sys, io
import argparse, copy
import mailbox
try:
from googl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.