code
stringlengths
1
199k
"""The setup and build script for the python-telegram-bot library.""" import codecs import os from setuptools import setup, find_packages def requirements(): """Build the requirements list for this project""" requirements_list = [] with open('requirements.txt') as requirements: for install in requir...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0003_remove_userprofile_is_check'), ] operations = [ migrations.RemoveField( model_name='userprofile', name='is_create...
import io import openpyxl from django.test import ( Client, TestCase ) from django.urls import reverse from core.models import ( User, Batch, Section, Election, Candidate, CandidateParty, CandidatePosition, Vote, VoterProfile, Setting, UserType ) class ResultsExporter(TestCase): """ Tests the result...
from mercurial import cmdutil _hgignore_content = """\ syntax: glob *~ *.pyc *.pyo *.bak cache/* databases/* sessions/* errors/* """ def commit(): app = request.args[0] path = apath(app, r=request) uio = ui.ui() uio.quiet = True if not os.environ.get('HGUSER') and not uio.config("ui", "username"): ...
"""InaSAFE Disaster risk tool by Australian Aid - Flood Raster Impact on Population. Contact : ole.moller.nielsen@gmail.com .. note:: 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 v...
from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required def centres(request): #Python练习项目管理中心Center return render(request, 'centres/centres.html') def up...
import cv2 import numpy as np np.set_printoptions(threshold=np.nan) import util as util import edge_detect import lineseg import drawedgelist img = cv2.imread("unsorted/Unit Tests/lambda.png", 0) im_size = img.shape returnedCanny = cv2.Canny(img, 50, 150, apertureSize = 3) cv2.imshow("newcanny", returnedCanny) skel_dst...
training_queue = { 'queue':'q1dm', 'memfree':'16G', 'pe_opt':'pe_mth 2', 'hvmem':'8G', 'io_big':True } isv_training_queue = { 'queue':'q1wm', 'memfree':'32G', 'pe_opt':'pe_mth 4', 'hvmem':'8G' } number_of_audio_files_per_job = 1000 preprocessing_queue = {} number_of_features_per_job = 600 extraction_queue = { 'queue':'...
import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala = Escala('fixtures/escala.xml') self.dir = dirs.TestDir() self.maxDiff = None def tearDown(self): ...
from test_support import * prove_all(prover=["plop"], opt=["--why3-conf=test.conf"])
from itertools import combinations def is_good(n): return 1 + ((int(n) - 1) % 9) == 9 def generate_subsequences(n): subsequences = [] combinations_list = [] index = 4 while index > 0: combinations_list.append(list(combinations(str(n), index))) index -= 1 for index in combinations...
import unittest import HTMLTestRunner import time from config import globalparam from public.common import sendmail def run(): test_dir = './testcase' suite = unittest.defaultTestLoader.discover(start_dir=test_dir,pattern='test*.py') now = time.strftime('%Y-%m-%d_%H_%M_%S') reportname = globalparam.repo...
from pyload.plugin.internal.DeadCrypter import DeadCrypter class FiredriveCom(DeadCrypter): __name = "FiredriveCom" __type = "crypter" __version = "0.03" __pattern = r'https?://(?:www\.)?(firedrive|putlocker)\.com/share/.+' __config = [] #@TODO: Remove in 0.4.10 __description = """Firedr...
import queue import logging import platform import threading import datetime as dt import serial import serial.threaded import serial_device from .or_event import OrEvent logger = logging.getLogger(__name__) POLL_QUEUES = (platform.system() == 'Windows') class EventProtocol(serial.threaded.Protocol): def __init__(s...
__author__ = "Harish Narayanan" __copyright__ = "Copyright (C) 2009 Simula Research Laboratory and %s" % __author__ __license__ = "GNU GPL Version 3 or any later version" from cbc.twist import * from sys import argv """ DEMO - Twisting of a hyperelastic cube """ class Twist(StaticHyperelasticity): """ Definition o...
import requests import xml.dom.minidom import sys import signal import os import getopt from queue import Queue from threading import Thread import time class SetQueue(Queue): def _init(self, maxsize): Queue._init(self, maxsize) self.all_items = set() def _put(self, item): if item not in...
import sys import glob import os import shutil try : from distutils.core import setup except ImportError as msg : sys.stderr.write("%s\n" % msg) sys.stderr.write("You need the DistUtils Python module.\nunder Debian, you may have to install the python-dev package.\nOf course, YMMV.\n") sys.exit(-1) try :...
"""This utility script was adopted from StackExchange: http://stackoverflow.com/questions/12090503/listing-available-com-ports-with-python Adopted for use with arduino_GC connection project """ import sys import glob import serial def serial_ports(): """ Lists serial port names :raises EnvironmentError: ...
def _setup_pkgresources(): import pkg_resources import os import plistlib pl = plistlib.readPlist(os.path.join( os.path.dirname(os.getenv('RESOURCEPATH')), "Info.plist")) appname = pl.get('CFBundleIdentifier') if appname is None: appname = pl['CFBundleDisplayName'] path = os....
from jira.client import JIRA def main(): jira = JIRA() JIRA(options={'server': 'http://localhost:8100'}) projects = jira.projects() print projects for project in projects: print project.key if __name__ == '__main__': main()
""" Class that contains client access to the transformation DB handler. """ __RCSID__ = "$Id$" import types from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.Core.Base.Client import Client from DIRAC.Core.Utilities.List ...
from django.db import models from django.contrib.auth.models import User import MySQLdb class Comentario(models.Model): """Comentario""" contenido = models.TextField(help_text='Escribe un comentario') fecha_coment = models.DateField(auto_now=True) def __unicode__(self): return self.contenido class Estado(models.M...
import unittest from itertools import izip import numpy as np from numpy import cos, sin, pi from pele.angleaxis import RBTopology, RigidFragment, RBPotentialWrapper from pele.potentials import LJ from pele.angleaxis._otp_cluster import OTPCluster from pele.thermodynamics import get_thermodynamic_information from pele....
SQL = """select SQL_CALC_FOUND_ROWS * FROM doc_view order by `name` asc limit %(offset)d,%(limit)d ;""" FOUND_ROWS = True ROOT = "doc_view_list" ROOT_PREFIX = "<doc_view_edit />" ROOT_POSTFIX= None XSL_TEMPLATE = "data/af-web.xsl" EVENT = None WHERE = () PARAM = None TITLE="Список видов документов" MESSAGE="ошибка полу...
import logging from openerp.osv import osv, fields _logger = logging.getLogger(__name__) class res_users(osv.osv): _inherit = "res.users" _columns = { 'xis_user_external_id': fields.integer('XIS external user', required=True), }
""" Contains format specification class and methods to parse it from JSON. .. codeauthor:: Tomas Krizek <tomas.krizek1@tul.cz> """ import json import re def get_root_input_type_from_json(data): """Return the root input type from JSON formatted string.""" return parse_format(json.loads(data)) def parse_format(da...
""" Page view class """ import os from Server.Importer import ImportFromModule class PageView(ImportFromModule("Server.PageViewBase", "PageViewBase")): """ Page view class. """ _PAGE_TITLE = "Python Web Framework" def __init__(self, htmlToLoad): """ Constructor. - htmlToLoad ...
import discord import asyncio import datetime import time import aiohttp import threading import glob import re import json import os import urllib.request from discord.ext import commands from random import randint from random import choice as randchoice from random import choice as rndchoice from random import shuffl...
import string import ast from state_machine import PSM, Source class SpecialPattern: individual_chars = ('t', 'n', 'v', 'f', 'r', '0') range_chars = ('d', 'D', 'w', 'W', 's', 'S') special_chars = ('^', '$', '[', ']', '(', ')', '{', '}', '\\', '.', '*', '?', '+', '|', '.') restrict_s...
'''WARCAT: Web ARChive (WARC) Archiving Tool Tool and library for handling Web ARChive (WARC) files. ''' from .version import *
import math from PyQt5.QtCore import Qt, pyqtSlot from PyQt5.QtGui import QCloseEvent from PyQt5.QtWidgets import QDialog, QInputDialog from urh import settings from urh.models.FuzzingTableModel import FuzzingTableModel from urh.signalprocessing.ProtocoLabel import ProtocolLabel from urh.signalprocessing.ProtocolAnalyz...
import os import unittest from vsg.rules import iteration_scheme from vsg import vhdlFile from vsg.tests import utils sTestDir = os.path.dirname(__file__) lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_300_test_input.vhd')) dIndentMap = utils.read_indent_file() lExpected = [] lExpected.append('...
"""Tests for logging support code.""" from StringIO import StringIO import logging import os.path import time from l_mirror import logging_support from l_mirror.tests import ResourcedTestCase from l_mirror.tests.logging_resource import LoggingResourceManager from l_mirror.tests.stubpackage import TempDirResource class ...
import codecs from latexparser.InputPaths import InputPaths class Occurrence(object): """ self.as_written : the code as it appears in the file, including \MyMacro, including the backslash. self.position : the position at which this occurrence appears. Example, if we look at the LatexCode Hel...
try: import RPi.GPIO as GPIO except ImportError as error: pass try: import Adafruit_BBIO as GPIO except ImportError as error: pass try: import spidev except ImportError as error: pass from DevLib.MyValues import MyValues class MCP320x: """This is an class that implements an interface to the ...
__version__ = '0.3.4'
import sys print "divsum_analysis.py DivsumFile NumberOfNucleotides" try: file = sys.argv[1] except: file = raw_input("Introduce RepeatMasker's Divsum file: ") try: nucs = sys.argv[2] except: nucs = raw_input("Introduce number of analysed nucleotides: ") nucs = int(nucs) data = open(file).readlines() s_...
""" Copyright 2014 Jason Heeris, jason.heeris@gmail.com This file is part of the dungeon excavator web interface ("webcavate"). Webcavate is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the Lic...
import subprocess import time import sys import re class checkIfUp: __shellPings = [] __shell2Nbst = [] __ipsToCheck = [] checkedIps = 0 onlineIps = 0 unreachable = 0 timedOut = 0 upIpsAddress = [] computerName = [] completeMacAddress = [] executionTime = 0 def __init__(s...
import re from PyQt5.QtCore import Qt, pyqtSlot from PyQt5.QtWidgets import ( QPushButton, QLineEdit, QVBoxLayout, QGridLayout, QDialog, QTableView, QAbstractItemView, QSpacerItem, QSizePolicy, QHeaderView, ) from .exclude_list_table import ExcludeListTable from core.exclude impo...
from bottle import route, template, error, request, static_file, get, post from index import get_index from bmarks import get_bmarks from tags import get_tags from add import add_tags from bmarklet import get_bmarklet from account import get_account from edit_tags import get_edit_tags from importbm import get_import_bm...
class Message(object): """ Base type of a message sent through the pipeline. Define some attributes and methods to form your message. I suggest you don't alter this class. You're are free to do so, of course. It's your own decision. Though, I suggest you create your own message type ...
from __future__ import unicode_literals import itertools import json import erpnext import frappe import copy from erpnext.controllers.item_variant import (ItemVariantExistsError, copy_attributes_to_variant, get_variant, make_variant_item_code, validate_item_variant_attributes) from erpnext.setup.doctype.item_group.i...
import unittest import os from ui import main print os.getcwd() class TestMain(unittest.TestCase): def setUp(self): self.m = main.MainWindow() def test_mainWindow(self): assert(self.m) def test_dataframe(self): import numpy #Random 25x4 Numpy Matrix self.m.render_data...
from datetime import datetime import factory from zds.forum.factories import PostFactory, TopicFactory from zds.gallery.factories import GalleryFactory, UserGalleryFactory from zds.utils.factories import LicenceFactory, SubCategoryFactory from zds.utils.models import Licence from zds.tutorialv2.models.database import P...
import sys, dia import os import pygtk pygtk.require("2.0") import gtk import locale class ResizeWindow(object): def __init__(self, group, data): self.group = group self.data = data self.initWindow() def initWindow(self): self.dlg = gtk.Dialog() self.dlg.set_title('Group ...
from ..models import Album from ..resource import SingleResource, ListResource from ..schemas import AlbumSchema class SingleAlbum(SingleResource): schema = AlbumSchema() routes = ('/album/<int:id>/',) model = Album class ListAlbums(ListResource): schema = AlbumSchema(many=True) routes = ('/album/',...
""" System plugin Copyright (C) 2016 Walid Benghabrit This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distribute...
import turtle import random def bloom(radius): turtle.colormode(255) for rad in range(40, 10, -5): for looper in range(360//rad): turtle.up() turtle.circle(radius+rad, rad) turtle.begin_fill() turtle.fillcolor((200+random.randint(0, rad), ...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('characters', '0011_auto_20160212_1144'), ] operations = [ migrations.CreateModel( name='CharacterSpells', fields=[ ...
"""Miscellaneous network utility code.""" from __future__ import absolute_import, division, print_function, with_statement import errno import os import re import socket import ssl import stat from lib.tornado.concurrent import dummy_executor, run_on_executor from lib.tornado.ioloop import IOLoop from lib.tornado.platf...
import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser import BS4Parser from sickchill.providers.torrent.Torr...
import re import sys import os import traceback from ..ibdawg import IBDAWG from ..echo import echo from . import gc_options __all__ = [ "lang", "locales", "pkg", "name", "version", "author", \ "load", "parse", "getDictionary", \ "setOptions", "getOptions", "getOptionsLabels", "resetOptions", \ ...
import datetime from collections import defaultdict from core.util import dedupe, first as getfirst from core.trans import tr from ..model.date import DateFormat from .base import GUIObject from .import_table import ImportTable from .selectable_list import LinkedSelectableList DAY = 'day' MONTH = 'month' YEAR = 'year' ...
"""30. Digit fifth powers https://projecteuler.net/problem=30 Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: > 1634 = 14 \+ 64 \+ 34 \+ 44 > 8208 = 84 \+ 24 \+ 04 \+ 84 > 9474 = 94 \+ 44 \+ 74 \+ 44 As 1 = 14 is not a sum it is not included. The sum of these...
import sys, math from test import goertzel import wave import pyaudio import Queue import numpy as np if len(sys.argv) < 2: print "Usage: %s <filename> " % sys.argv[0] sys.exit(1) filename = sys.argv[1] w = wave.open(filename) fs = w.getframerate() width = w.getsampwidth() chunkDuration = .2 #.2 second chunks c...
from controllers.job_ctrl import JobController from models.job_model import JobModel from views.job_view import JobView class MainController(object): def __init__(self, main_model): self.main_view = None self.main_model = main_model self.main_model.begin_job_fetch.connect(self.on_begin_job_f...
from heapq import * def process(r1, r2, c1, c2): for i in range(r1, r2): for j in range(c1, c2): if 0 <= i < m and 0 <= j < n: if g[i][j] == None: s[i][j] = 0 elif i == 0 or j == 0: s[i][j] = 1 elif g[i-1][j]...
from .gaussian_process import RandomFeatureGaussianProcess, mean_field_logits from .spectral_normalization import SpectralNormalization
import unittest from test import support import os import io import socket import urllib.request from urllib.request import Request, OpenerDirector class TrivialTests(unittest.TestCase): def test_trivial(self): # A couple trivial tests self.assertRaises(ValueError, urllib.request.urlopen, 'bogus url...
import argparse import logging from pyctools.core.compound import Compound import pyctools.components.arithmetic import pyctools.components.qt.qtdisplay import pyctools.components.zone.zoneplategenerator class Network(object): components = \ { 'clipper': { 'class': 'pyctools.components.arithmetic.Arithmetic', ...
import itertools """ Languages | ShortCode | Wordnet Albanian | sq | als Arabic | ar | arb Bulgarian | bg | bul Catalan | ca | cat Chinese | zh | cmn Chinese (Taiwan) | qn ...
""" ..mod: FTSRequest ================= Helper class to perform FTS job submission and monitoring. """ import sys import re import time from DIRAC import gLogger, S_OK, S_ERROR from DIRAC.Core.Utilities.File import checkGuid from DIRAC.Core.Utilities.Adler import compareAdler, intAdlerToHex, hexAdlerToInt from ...
import sys, os, urllib, time, socket, mt, ssl from dlmanager.NZB import NZBParser from dlmanager.NZB.nntplib2 import NNTP_SSL,NNTPError,NNTP, NNTPReplyError from dlmanager.NZB.Decoder import ArticleDecoder class StatusReport(object): def __init__(self): self.message = "Downloading.." self.total_byte...
"""Tests for `fix.with_fixture`.""" from __future__ import with_statement import os import shutil import tempfile from types import FunctionType from fix import with_fixture def test_exists(): """`fix.with_fixture` function exists""" assert isinstance(with_fixture, FunctionType) def test_setup_only(): """`s...
r""" ****************************** espressopp.integrator.CapForce ****************************** This class can be used to forcecap all particles or a group of particles. Force capping means that the force vector of a particle is rescaled so that the length of the force vector is <= capforce Example Usage: >>> capforc...
"""proyectoP4 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
import poplib, email, re, sys, xmlConfigs, utils; class ReferenceNode : def __init__(self, node, emailMessage, references=list(), children=dict(), slotted=bool("false")): self.node = node self.children = dict(children) self.references = references[:] self.slotted = slotted se...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('erudit', '0065_auto_20170202_1152'), ] operations = [ migrations.AddField( model_name='issue', name='force_free_access', ...
from __future__ import division, print_function, absolute_import import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import sys import scipy.io as sio sys.path.insert(0, '../..') # Add path to where TF_Model.py is, if not in the same dir from TF_Model import * from utils import * action_map = {} ...
""" Tests for closeness centrality. """ import pytest import networkx as nx from networkx.testing import almost_equal class TestClosenessCentrality: @classmethod def setup_class(cls): cls.K = nx.krackhardt_kite_graph() cls.P3 = nx.path_graph(3) cls.P4 = nx.path_graph(4) cls.K5 = ...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'Vendeur', fields ['code_permanent'] db.create_unique(u'encefal_vendeur', ['code_permanent']) def bac...
"""Classes and functions for interfacing with WS-28xx weather stations. LaCrosse makes a number of stations in the 28xx series, including: WS-2810, WS-2810U-IT WS-2811, WS-2811SAL-IT, WS-2811BRN-IT, WS-2811OAK-IT WS-2812, WS-2812U-IT WS-2813 WS-2814, WS-2814U-IT WS-2815, WS-2815U-IT C86234 The station i...
import logging import logging.handlers import os import time from data_structures import enum from config import get_config_value LoggingSection = enum( 'CLIENT', 'CRAWLER', 'DATA', 'FRONTIER', 'TEST', 'UTILITIES', ) logging.basicConfig(level=logging.INFO, format='[%(asctime)...
''' Purpose: This script, using default values, determines and plots the CpG islands in relation to a given feature "type" (e.g. "gene" or "mRNA") from a GFF file which corresponds to the user-provided fasta file. Note: CpG Islands are determined by ObEx = (Observed CpG) / (Expected CpG) , default threshold > 1. Where ...
import numpy as np from scipy import sparse from scipy.interpolate import interp1d class calibration(object): ''' some useful tools for manual calibration ''' def normalize_zdata(self,z_data,cal_z_data): return z_data/cal_z_data def normalize_amplitude(self,z_data,cal_ampdata): return z_data/cal_ampdata def n...
import sys, random import re, collections, time TXT_FILE=''; BUF_DIR=''; NWORDS=None; def words(text): return re.findall('[a-z]+', text) def train(features): model = collections.defaultdict(lambda: 1) for f in features: model[f] += 1 return model alphabet = 'abcdefghijklmnopqrstuvwxyz' def edits1(wo...
from __future__ import (absolute_import, division, print_function, unicode_literals) import collections import six from .comminfo import CommissionInfo from .position import Position from .metabase import MetaParams from .order import Order, BuyOrder, SellOrder class BrokerBack(six.with_metaclas...
import logging, logtool from .page import Page from .xlate_frame import XlateFrame LOG = logging.getLogger (__name__) class Contents: @logtool.log_call def __init__ (self, canvas, objects): self.canvas = canvas self.objects = objects @logtool.log_call def render (self): with Page (self.canvas) as pg...
import logging from pprint import pformat from time import clock, sleep try: import unittest2 as unittest except ImportError: import unittest import config from event_stack import TimeOutReached from database_reception import Database_Reception from static_agent_pools import Rece...
""" This module provides the Todo class. """ from datetime import date from topydo.lib.Config import config from topydo.lib.TodoBase import TodoBase from topydo.lib.Utils import date_string_to_date class Todo(TodoBase): """ This class adds common functionality with respect to dates to the Todo base class, m...
from pupa.scrape import Jurisdiction, Organization from .bills import MNBillScraper from .committees import MNCommitteeScraper from .people import MNPersonScraper from .vote_events import MNVoteScraper from .events import MNEventScraper from .common import url_xpath """ Minnesota legislative data can be found at the Of...
''' Copyright 2015 This file is part of Orbach. Orbach is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Orbach is distributed in the hope that...
import kivy kivy.require('1.9.1') from kivy.uix.popup import Popup from kivy.uix.label import Label from kivy.uix.gridlayout import GridLayout from kivy.metrics import dp from kivy.app import Builder from kivy.properties import StringProperty, ObjectProperty from kivy.clock import Clock from kivy.metrics import sp from...
class CheckBase(object): """ Base class for checks. """ hooks = [] # pylint: disable=W0105 """Git hooks to which this class applies. A list of strings.""" def execute(self, hook): """ Executes the check. :param hook: The name of the hook being run. :type hook:...
def scale(cur, res, num): num = str(num) iscaps = False positive = True # Input if cur == res: return num if num == "0": return "0" assert cur in range(2, 65) and res in range(2, 65), "Base not defined." if num[0] == "-": positive = False num = num[1:] result = 0 ...
from PyQt4 import QtCore, QtGui from collections import * from functools import * import os, glob import pandas as pd try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): return s try: _encoding = QtGui.QApplication.UnicodeUTF8 def _translate(context, text, disambig)...
from cProfile import Profile from optparse import make_option from django.conf import settings from django.core.management.base import (BaseCommand, CommandError) from treeherder.etl.buildapi import (Builds4hJobsProcess, PendingJobsProcess, ...
present_lastread_stamp = "%I:%M %p on %A, %b %d" present_temp_precision = 1 present_graph_recent_x = "%I:%M %p" present_recent_point_count = 720 present_recent_reduce_to = 16 www_out = "/var/www/environd.html" html_template = "/opt/environd/template/environd.tpl" database = "/opt/environd/database/temperature_readings....
''' tagsPlorer package entry point (C) 2021-2021 Arne Bachmann https://github.com/ArneBachmann/tagsplorer ''' from tagsplorer import tp tp.Main().parse_and_run()
from socorro.lib import datetimeutil from socorro.unittest.external.es.base import ( ElasticsearchTestCase, SuperSearchWithFields, minimum_es_version, ) class IntegrationTestAnalyzers(ElasticsearchTestCase): """Test the custom analyzers we create in our indices. """ def setUp(self): super(In...
"""Django module for the OS2datascanner project."""
{ "name": "Account balance reporting engine", "version": "8.0.1.2.0", "author": "Pexego, " "AvanzOSC, " "Tecnativa, " "Odoo Community Association (OCA)", "website": "http://www.pexego.es", "category": "Accounting & Finance", "contributors": [ "Ju...
{ 'name': 'Capture picture with webcam', 'version': '1.0', 'category': 'Generic Modules/Human Resources', 'description': """ TApplicant WebCam ========= Capture employee pictures with an attached web cam. """, 'author': "Michael Telahun Makonnen <mmakonnen@gmail.com>," "Odoo Community Associ...
import os.path import numpy as np import pandas as pd import pandas.util.testing as pdt import pytest from ..activitysim import eval_variables from .. import mnl @pytest.fixture(scope='module', params=[ ('fish.csv', 'fish_choosers.csv', pd.DataFrame( [[-0.02047652], [0.95309824]], index=...
""" High-level objects for fields. """ from collections import OrderedDict from datetime import date, datetime from functools import partial from operator import attrgetter from types import NoneType import logging import pytz import xmlrpclib from openerp.tools import float_round, frozendict, html_sanitize, ustr, Orde...
import io import os from dlstats.fetchers.bea import BEA as Fetcher import httpretty from dlstats.tests.base import RESOURCES_DIR as BASE_RESOURCES_DIR from dlstats.tests.fetchers.base import BaseFetcherTestCase import unittest from unittest import mock RESOURCES_DIR = os.path.abspath(os.path.join(BASE_RESOURCES_DIR, "...
import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relative to tasks.py) 'deploy_path': '..', # Github Pages configuration '...
from __future__ import print_function, division import multiprocessing import os import csv import datetime import logging from datetime import datetime import argparse import shutil import math from glob import glob import gzip from shi7 import __version__ from shi7.shi7 import TRUE_FALSE_DICT, read_fastq, axe_adaptor...
from openerp.osv import osv, fields from openerp.tools.translate import _ class Partner(osv.osv): _inherit = 'res.partner' _columns = { 'legal_representative': fields.char( 'Legal Representative', ), }