text
stringlengths
17
737k
# Copyright 2012 Locaweb. # 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 appli...
#!/usr/bin/python import re import sys input = "\n".join([l for l in open(sys.argv[1])]) class Node: known_macros = [] def __init__(self, name, args): assert isinstance(args, list) self.name = name self.args = args def tostr(self, indent): indentation = indent * " " result = "" resul...
#Alex Holcombe alex.holcombe@sydney.edu.au #See the github repository for more information: https://github.com/alexholcombe/twoWords from __future__ import print_function #use python3 style print from psychopy import monitors, visual, event, data, logging, core, sound, gui import psychopy.info import numpy as np from m...
""" Views for Indivo JS UI """ # todo: rm unused from django.http import HttpResponse, HttpResponseRedirect, Http404, HttpRequest from django.contrib.auth.models import User from django.core.exceptions import * from django.core.urlresolvers import reverse from django.core import serializers from django.db import trans...
import json import codecs from pages import ProjectDashboardPage, ProjectFilesPage, ProjectAnalyticsPage, \ ProjectForksPage, ProjectRegistrationsPage, ProjectWikiPage, RegistrationDashboardPage, RegistrationFilesPage, \ RegistrationAnalyticsPage, RegistrationForksPage, RegistrationWikiPage, UserProfilePage, In...
#!/usr/bin/env python import cluster_labeling.optemo_django_models as optemo import subprocess import time import re output_subdir = 'cluster_labeling/cc_boostexter_files/' boostexter_subdir = 'cluster_labeling/BoosTexter2_1/' boosting_fields = [ ('title', 'text'), ('brand', 'text'), ('model', 'text'), ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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.or...
from .decorators import raml_optional, raml_simple_parse, raml_tabbed from .RamlParseable import RamlParseable from .RamlBody import RamlBody from .RamlResponse import RamlResponse from .RamlHeader import RamlHeader class RamlMethod(RamlParseable): def __init__(self, yaml): super(RamlMethod, self).__init...
import json from functools import partial from datetime import datetime from moi import r_client, ctxs, ctx_default, REDIS_KEY_TIMEOUT from moi.group import create_info def _status_change(id, redis, new_status): """Update the status of a job The status associated with the id is updated, an update command is...
import collections import re from rest_framework.reverse import reverse from rest_framework.fields import SkipField from rest_framework import serializers as ser from website import settings from website.util.sanitize import strip_html from website.util import waterbutler_api_url_for from api.base import utils from ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from UM.Backend.Backend import Backend from UM.Application import Application from UM.Scene.SceneNode import SceneNode from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Preferences import Preferenc...
# -*- coding: utf-8 -*- # Copyright(C) 2008-2010 Romain Bignon, Christophe Benz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in t...
import logging import numpy as np from .base_recommender import AbstractRecommender from scipy.spatial import distance FLOOR_DISTANCE_ADJUSTMENT = 0.001 CATEGORICAL_FEATURES = ["geo_city", "locale", "os"] CONTINUOUS_FEATURES = ["subsession_length", "bookmark_count", "tab_open_count", "total_uri", "unique_tlds"] S3_B...
""" This is a plugin created by ShiN0 Copyright (c) 2018 ShiN0 <https://www.github.com/mgaertne/minqlx-plugin-tests> You are free to modify this plugin to your own one, except for the version related code. This plugin automatically rebalances new-joiners at round start based upon the ratings in the balance plugin. I...
from collections import defaultdict import simplejson as json from django.contrib.auth.decorators import login_required from django.contrib.auth.models import Group from django.core.cache import cache from django.db import transaction from django.db.models import Q, Prefetch from django.http import JsonResponse impor...
"""Preprocessing - mitosis detection""" import argparse import math import os import shutil from keras.models import load_model import numpy as np from PIL import Image from sklearn.model_selection import train_test_split from train_mitoses import normalize def create_mask(h, w, coords, size): """Create a binary ...
# Copyright (c) 2018, DjaoDjin Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
from time import gmtime from calendar import timegm from datetime import datetime from dateutil.relativedelta import relativedelta from elasticsearch import Elasticsearch from website import settings share_es = Elasticsearch( settings.SHARE_ELASTIC_URI, request_timeout=settings.ELASTIC_TIMEOUT ) def search...
#!/usr/bin/env python3 from models import Location, Stop, POI, Address from models import TimeAndPlace, Platform, RealtimeTime from models import Trip, Ride, RideSegment, Coordinates, TicketList, TicketData from models import Line, LineType, LineTypes, Way, WayType, WayEvent from datetime import datetime, timedelta imp...
# coding=utf-8 # Copyright 2018 The TensorFlow Datasets 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 appl...
################################################################################ # Copyright (c) 2022 ContinualAI. # # Copyrights licensed under the MIT License. # # See the accompanying LICENSE file for terms. ...
import os import traceback import hashlib import random import subprocess from collections import namedtuple # Setup logging import logging logger = logging.getLogger(__name__) def booleanize(*args, **kwargs): # Handle both single value and kwargs to get arg name name = None if args and not kwargs: ...
import sys, json import RPi.GPIO as GPIO import time direction = 'none' # simple JSON echo script for line in sys.stdin: print line if line.strip() =='left': direction = 'left' else: direction = 'right' GPIO.setmode(GPIO.BCM) GPIO.setup(22, GPIO.OUT) p=GPIO.PWM(22,100) p.start(5) if direction == 'left':...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC class NodeModel(): """ Node looku...
# -*- coding: utf-8 -*- ''' Copyright (c) 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Tobias Houska and Alejandro Chamorro-Chavez This class holds the Robust Parameter Estimation (ROPE) algorithm based on Bárdossy and Singh (2008). Bárdossy, A. and Singh, S. K...
"""Stack Plugin for EasyEngine.""" from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from ee.cli.plugins.site_functions import * from ee.core.variables import EEVariables from ee.core.aptget import EEAptGet from ee.core.download import EEDownload from ee.core.shellex...
import requests import re import math import os from datetime import datetime from .extensions import db from .importer import release_parse, parse_github_url, parse_bitbucket_url from .models import ProjectLog, Project github_search_regex = re.compile('github.com/(.*)') github_match_regex = re.compile('((http(s)*://...
import json from twisted.words.protocols import irc from twisted.internet import protocol, task from twisted.python import log import treq import lxml.html import re import Levenshtein import functools import urlparse import iptools INTERNAL_IPS = iptools.IpRangeList( '127/8', # full range '192.1...
"""Stack Plugin for EasyEngine.""" from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from ee.cli.plugins.site_functions import * from ee.core.variables import EEVariables from ee.core.aptget import EEAptGet from ee.core.download import EEDownload from ee.core.shellex...
#!/usr/bin/env python """Module to keep track of paths and versions of other software used within the workflow at various intervals.""" import Bio import argparse import getpass import logging import os from subprocess import Popen, PIPE import sys __author__ = "Tim te Beek" __contact__ = "brs@nbic.nl" __copyright__...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import * # Register your models here. class AlumniAdminSet(admin.ModelAdmin): actions_on_top = False actions_on_bottom = True list_filter = ('consul', 'entrep', 'govt', 'acadm', 'research', 'finance', '...
# # ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2015 # Copyright by UWA (in the framework of the ICRAR) # All rights reserved # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser G...
import os import sys import distutils.spawn from vex.run import run from vex import exceptions PYDOC_SCRIPT = """#!/usr/bin/env python from pydoc import cli cli() """.encode('ascii') PYDOC_BATCH = """ @python -m pydoc %* """.encode('ascii') def handle_make(environ, options, make_path): if os.path.exists(make_...
# # engagements import logging import os from datetime import datetime import operator from django.contrib.auth.models import User from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import user_passes_test from django.core.exceptions import PermissionDenied from d...
"""Backport of python 3.8 functools.cached_property. cached_property() - computed once per instance, cached as attribute """ __all__ = ("cached_property",) # Standard Library from sys import version_info if version_info <= (3, 5): from cached_property import cached_property elif version_info >= (3, 8): # St...
#!/usr/bin/env python2 import re from sys import argv from os import walk EXCLUDES = ["implementation", "testbench"] def _vhdltree(level, filepath, pattern, vhd_files): included_entities = find_entities(filepath, pattern) if included_entities: for entity, name in included_entities.iteritems(): ...
from django.db import models from django.core.exceptions import ValidationError class OrderedModelManager(models.Manager): def swap(self, obj1, obj2): tmp, obj2.order = obj2.order, 0 obj2.save(swapping=True) obj2.order, obj1.order = obj1.order, tmp obj1.save() obj2.save() ...
import logging import sys DEFAULT_LEVEL = logging.DEBUG root = logging.getLogger() ch = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') ch.setFormatter(formatter) root.addHandler(ch) root.setLevel(DEFAULT_LEVEL) # Make an exception for boto and...
import os, timeit, argparse from PIL import ImageDraw from processMaze import Maze from binaryHeap import BinaryHeap class mazeSolve(object): """Takes in a maze, makes a graph, and solves it""" def __init__(self, filename, to_crop=False): self.maze = Maze(filename, to_crop=to_crop) self.nod...
# -*- coding: utf-8 -*- """ test_api_request.py Test TinEyeAPIRequest class. Copyright (c) 2015 Idée Inc. All rights reserved worldwide. """ from datetime import datetime import unittest from pytineye.api import Backlink, Match, TinEyeResponse from pytineye.api import TinEyeAPIRequest class TestTinEyeAPIRequest(...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __open...
""" Utilities for ILC noise, source counts and associated power spectra, etc.. """ import glob,os,sys import numpy as np from scipy.interpolate import interp1d from orphics import maps, cosmology # Helpers from tilec/fg.py [with J. Colin Hill] ###################################### # global constants # MKS units, ...
# Filename: test_db.py # pylint: disable=C0111,E1003,R0904,C0103,R0201,C0102 from km3pipe.testing import TestCase, MagicMock, patch from km3pipe.db import DBManager, DOMContainer, we_are_in_lyon from km3pipe.logger import get_logger __author__ = "Tamas Gal" __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT c...
# Standard Libary import datetime import logging import random import uuid # Third-Party from auth0.v3.authentication import Passwordless from django_fsm import ( RETURN_VALUE, FSMIntegerField, transition, ) from django_fsm_log.decorators import fsm_log_by from dry_rest_permissions.generics import ( al...
from __future__ import print_function import numpy as np from sympy import Symbol,Function import sympy from enlib import fft as efft, enmap, bench from orphics import maps,io,stats,cosmology,lensing import os,sys """ Routines to reduce and evaluate symbolic mode coupling integrals """ ifft = lambda x: efft.ifft(x,ax...
import pytest from PyTeX import json, lexer, bib @pytest.fixture def simple(): with open('data/simple.bib') as f: return lexer.FileIn(f, bib.SUB_DICT) def test_FileIn(f=simple): assert f().read() == """@article{test, author = {Dillon Niederhut}, title={Structured data with PyTeX}, year=2016 }"""...
import logging.config import os from configobj import ConfigObj from configobj import flatten_errors from configobj import get_extra_values from validate import Validator try: import kolibri.core.analytics.pskolibri as psutil except NotImplementedError: # This module can't work on this OS psutil = None d...
from typing import Set from django.contrib import admin from django.contrib.auth.models import User, Group from django.contrib.auth.admin import UserAdmin # Unregister the default user model admin admin.site.unregister(User) @admin.register(User) class CustomUserAdmin(UserAdmin): """A custom admin interface for...
from django.contrib import admin from .models import FrequentItemSet, Operation class MinerAdmin(admin.ModelAdmin): using = 'miner' def save_model(self, request, obj, form, change): pass def delete_model(self, request, obj): pass def get_queryset(self, request): return supe...
""" We follow semantic versioning 2.0.0 according to `semver.org <http://semver.org/>`__ but for Python distributions and in the internal string representation in Python, you will find a `PEP-440 <https://www.python.org/dev/peps/pep-0440/>`__ flavor. * ``1.1.0`` (Semver) = ``1.1`` (PEP-440). * ``1.0.0-alpha.1`` (Se...
import requests from routes import url_for from ckan.tests.helpers import reset_db from ckan import plugins from ckanext.orgdashboards.tests.helpers import (id_generator, create_mock_data, get_site_base_url) class Tes...
from datetime import date from workalendar.tests import GenericCalendarTest from workalendar.core import MON, TUE, THU, FRI from workalendar.core import Calendar, LunarCalendar from workalendar.core import IslamicMixin, JalaliMixin class CalendarTest(GenericCalendarTest): def test_private_variables(self): ...
# # Konstrukteur - Static website generator # Copyright 2013 Sebastian Fastner # """ **Konstrukteur - Static website generator** Konstrukteur is a website generator that uses a template and content files to create static website output. """ __version__ = "0.1.14" __author__ = "Sebastian Fastner <mail@sebastianfastne...
from ethereum import tester, exceptions import datetime import struct import json from functools import partial import pytest slow = pytest.mark.slow from utilRelay import makeMerkleProof, randomMerkleProof, \ getHeaderBytes, dblSha256Flip, disablePyethLogging disablePyethLogging() class TestFee(object): C...
"""DataStore class for WorkBench.""" import pymongo import gridfs import hashlib import datetime import bson import time class DataStore(object): """DataStore for Workbench. Currently tied to MongoDB but making this class 'abstract' should be straightforward and we could think about using another back...
"""Tests for plugin.py.""" from ckan import model from ckan.plugins import toolkit from ckanext.xroad_integration.tests.xroad_mock import xroad_rest_adapter_mock as adapter_mock import pytest import json import os from multiprocessing import Process from ckanext.xroad_integration.harvesters.xroad_harvester import XRoad...
''' This file is part of Arakoon, a distributed key-value store. Copyright (C) 2010 Incubaid BVBA Licensees holding a valid Incubaid license may use this file in accordance with Incubaid's Arakoon commercial license agreement. For more information on how to enter into this agreement, please contact Incubaid (contact d...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import traceback from datetime import datetime from django.db import models from django.db import connection from django.db.utils import OperationalError import django.utils.timezone as timezone from django import db from Kunlun_M.const import TAMPER_TY...
# (c) 2009-2016 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Implement the FileLikeQueue helper class. This helper class is intended to handle use cases where an incoming PUT request should be direct...
from __future__ import print_function, absolute_import, division """searchspace.py This module contains code for specifying the hyperparameter search space. The search space is specified as a product of bounded intervals. Each dimension can be either an integer, floating-point or enumeration. The base measure on the ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 Timothy Dozat # # 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 Timothy Dozat # # 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 ...
import numpy from blocks.bricks import Tanh from blocks.bricks.recurrent import GatedRecurrent, RecurrentStack, LSTM, SimpleRecurrent from blocks.bricks.sequence_generators import SequenceGenerator, Readout, SoftmaxEmitter, LookupFeedback from blocks.initialization import Uniform from blocks.model import Model from blo...
""" Authenticator original from the JupyterHub repository https://github.com/jupyter/nbgrader/blob/master/nbgrader/auth/hubauth.py """ import json import logging import os import requests from flask import request, redirect, abort, current_app class HubAuth: """Jupyter hub authenticator.""" def __init__(self): ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2011, GEM Foundation. # # OpenQuake is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # only, as published by the Free Software Foundation. # # OpenQuak...
from synapse.rest.client.v2_alpha.register import RegisterRestServlet from synapse.api.errors import SynapseError from twisted.internet import defer from mock import Mock from tests import unittest import json class RegisterRestServletTestCase(unittest.TestCase): def setUp(self): # do the dance to hook u...
""" The cache bits of TileStache. A Cache is the part of TileStache that stores static files to speed up future requests. A few default caches are found here, but it's possible to define your own and pull them into TileStache dynamically by class name. Built-in providers: - test - disk - multi - memcache - s3 Exampl...
# -*- coding: utf-8 -*- import json import re import django import psycopg2 import psycopg2.extensions import psycopg2.extras from django import forms from django.db import models from django.db.backends.postgresql_psycopg2.version import get_version from django.conf import settings from django.utils import six from...
"""Django Feed Aggregator.""" VERSION = (0, 2, 28) __version__ = ".".join(map(str, VERSION)) __author__ = "Ask Solem" __contact__ = "askh@opera.com" __homepage__ = "http://github.com/ask/django-feeds/" __docformat__ = "restructuredtext" import logging logger = logging.getLogger("djangofeeds") channel = logging.Stream...
# Copyright (c) 2014, The MITRE Corporation. All rights reserved. # For more information, please refer to the LICENSE.txt file. #ThreatExpert Converter Script #Updated 02/24/2014 for MAEC v4.1 and CybOX v2.1 #ThreatExpert main parser class #For use in extracting data from XML ThreatExpert output from maec.bundle.bund...
# project/user/views.py ################# #### imports #### ################# from flask import render_template, Blueprint, url_for, \ redirect, flash, request from flask.ext.login import login_user, logout_user, \ login_required, current_user from project.models import User # from project.email import send...
from __future__ import unicode_literals import logging import requests import re import json from bs4 import BeautifulSoup class Post(object): stop = False def __init__(self, url="https://steamcommunity.com/groups/ns2rus/discussions/0/527273452871150509/"): self.url = url self.count = None ...
# Natural Language Toolkit: Tokens and Tokenizers # # Copyright (C) 2001 University of Pennsylvania # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@ldc.upenn.edu> (minor additions) # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT # # $Id$ # Open questions: # S...
""" DataTypes used by this provider """ import inspect import json import logging import time from azure.common import AzureException from azure.mgmt.network.models import NetworkSecurityGroup from cloudbridge.cloud.base.resources import BaseAttachmentInfo, \ BaseBucket, BaseBucketObject, BaseFloatingIP, \ ...
import os.path import sys import tarfile import time import zipfile import StringIO def read_file(path, use_crlf): with open(path, 'rb') as file: data = file.read() if '\0' not in data: data = data.replace('\r', '') if use_crlf: data = data.replace('\n', '\r\n') return data def write_zip(target, arcpref...
# -* codding : utf-8 # supported python version: 3.6 __author__ = "Djoudi Benarfa" __create_date__ = "12/03/2017" __version__ = "0.1" __email__ = "dbenarfa@outlook.com" numbers_less_17 = {1: "un", 2: "deux", 3: "trois", 4: "quatre", ...
""" AuxiliaryVariables subclasses for extractin isosurfaces and contours """ from collections import defaultdict, OrderedDict from itertools import product from proteus.EGeometry import etriple,ecross,enorm,edot from mpi4py import MPI from petsc4py import PETSc import numpy as np from numpy.linalg import norm from . ...
__version__ = '1.0rc2'
""" Django settings for Homepage project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ import environ ROOT_DIR = environ.Path(__file__) - 3 # (homepage/config/...
import logging from pajbot.managers.connection import ConnectionManager log = logging.getLogger(__name__) def do_nothing(_c, _e): pass class IRCManager: def __init__(self, bot): self.bot = bot self.channels = [] self.channel = "#" + self.bot.streamer self.channels.append(...
import re from emend import Edit PAGE_SIZE = 10 def get(handler, response): query = handler.request.get('q') status = handler.request.get('status') response.query = query response.status = status search_args = dict(status=status) # default heading if status == "open": response.default_heading = "O...
# Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of co...
# pylint: disable=W0231,E1101 import warnings import operator import weakref import gc import numpy as np import pandas.lib as lib import pandas as pd from pandas.core.base import PandasObject from pandas.core.index import (Index, MultiIndex, _ensure_index, InvalidIndexError) import pand...
#! /usr/bin/env python # ------------------------------------------------------------------------------ # Script which imports portal data. # # ------------------------------------------------------------------------------ import os import sys import getopt from cbioportal_common import * # -------------------------...
import copy from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.db import models from django.forms.models import modelform_factory from django.http import Http404 from django.template import loader from ...
import copy from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.db import models from django.forms.models import modelform_factory from django.http import Http404 from django.template import loader from ...
#!/usr/bin/env python """ @package coverage_model.test.test_coverage @file coverage_model/test/test_coverage.py @author James Case @brief Test cases for the coverage_model module """ import random import os import shutil import tempfile from pyon.public import log import numpy as np from coverage_model import * from...
from flask import Flask, Response, jsonify, request, render_template from barista import messaging from redis import Redis import redis_collections as redisC import numpy as np import argparse from caffe import SGDSolver # Global settings, only set once, when the server is started redisInstance = None snapshot_frequen...
# -*- coding: utf-8 -*- # # Copyright (C) 2013 by Alex Brandt <alunduil@alunduil.com> # # pmort is freely distributable under the terms of an MIT-style license. # See COPYING or http://www.opensource.org/licenses/mit-license.php. import logging import argparse import copy import os import sys import re try: from ...
#! /usr/bin/env python # Copyright Arvid Norberg 2008. Use, modification and distribution is # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import os, sys, time, os stat = open(sys.argv[1]) line = stat.readline() while no...
from django.utils.deprecation import MiddlewareMixin from django.conf import settings from subdomains.middleware import SubdomainURLRoutingMiddleware class PatchedSubdomainURLRoutingMiddleware(MiddlewareMixin, SubdomainURLRoutingMiddleware): pass if settings.DEBUG: ...
#!/bin/bash """The Emu object esentially wraps the GPy gaussian process code. It handles building, training, and predicting.""" import warnings from itertools import izip from collections import OrderedDict from os import path import sys from time import time import cPickle as pickle from abc import ABCMeta, abstractm...
# TAKES a set of image paths # OPTIONALLY TAKES alternate IQDB url, acceptable sites ORDERED # RETURNS a set of 3 tupples of the form: # {source_url, source_hash, [tags]} # Make a request to IQDB with the image # Find the highest res copy of the image, orders ties based on site # Download image, as well as tags, other...
from .parsing.exceptions import ParserError class PendulumException(Exception): pass
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals import os import sys import glob import time import logging import argparse # petrarch.py ## # Automated event data coder ## # SYSTEM REQUIREMENTS # This program has been successfully run under Mac OS 10.10; it is s...
#!/usr/bin/python2.4 # # Copyright (c) 2005-2007 rPath, Inc. # import testsuite testsuite.setup() from mint_rephelp import MintRepositoryHelper from mint_rephelp import MINT_DOMAIN, MINT_PROJECT_DOMAIN, PFQDN from mint import database from mint import server from mint import users from mint.projects import LabelMiss...
# -*- coding: utf-8 -*- """ ========================================================== File: WakaTime.py Description: Automatic time tracking for Sublime Text 2 and 3. Maintainer: WakaTime <support@wakatime.com> License: BSD, see LICENSE for more details. Website: https://wakatime.com/ =================...
""" ========================================================== File: WakaTime.py Description: Automatic time tracking for Sublime Text 2 and 3. Maintainer: WakaTi.me <support@wakatime.com> Website: https://www.wakati.me/ ===========================================================""" __version__ = '0.3.3' ...
#!/usr/bin/python2.4 # # Copyright (c) 2005-2007 rPath, Inc. # import tempfile import time import os, sys import testsuite testsuite.setup() from mint_rephelp import MintRepositoryHelper from mint import userlevels, server from mint import buildtypes from mint import mirror from conary import dbstore from conary impo...
""" Overview -------- The functions - `fromstring()` and `fromfile()` return namedtuples from GeoJSON input - `tostring()` returns GeoJSON from a namedtuple - `result_fromstring()` and `result_fromfile()` return namedtuples wrapped as a GeoJSONResult so that values of a specific types can be safely extracted Addit...