text
stringlengths
12
6.59M
#!/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 writing, softwa...
#!/usr/bin/env pythonw import wx import os import sys import matplotlib if matplotlib.get_backend() != "WXAgg": matplotlib.use("WXAgg") import matplotlib.pyplot as plt import pmagpy.command_line_extractor as extractor import pmagpy.ipmag as ipmag import dialogs.pmag_widgets as pw import dialogs.pmag_menu_dialogs as...
import os import PIL import sys import glob import imageio import logging import argparse import numpy as np from tqdm import tqdm from datetime import datetime from cartoongan import build_model STYLES = ["shinkai", "hayao", "hosoda", "paprika"] VALID_EXTENSIONS = ['jpg', 'png', 'gif'] # TODO: add self-trained carto...
#! /usr/bin/env python import os.path import khmer import argparse import screed K=20 N=4 X=1e8 DEFAULT_MIN=20 DEFAULT_MAX=100 PCNT=50 DEFAULT_BINSIZE=1000 def output_single(r): if hasattr(r, 'accuracy'): return "@%s\n%s\n+\n%s\n" % (r.name, r.sequence, r.accuracy) else: return ">%s\n%s\n" % ...
""" Parameters and parameterizable objects. """ from __future__ import division from __future__ import absolute_import from __future__ import print_function import numpy as np import copy import tabulate from collections import OrderedDict from .priors import PRIORS from .domains import REAL from .domains import BO...
from kivy.uix.screenmanager import ScreenManager, Screen from kivy.uix.popup import Popup from kivy.uix.boxlayout import BoxLayout from kivy.uix.scrollview import ScrollView from kivy.uix.button import Button from kivy.uix.stacklayout import StackLayout from kivy.uix.gridlayout import GridLayout from kivy.properties im...
#!/usr/bin/env python # # thapbi_santi_otus.py # # Script to identify OTUs from metabarcoding reads. # # This is an almost direct translation of a pipeline written by Santiago # Garcia, to generate OTU clusters from metabarcoding ITS reads in # Phytophthora. # # (c) The James Hutton Institute 2016 # Author: Leighton Pr...
# Copyright (c) 2012-2014 Leif Johnson <leif@leifjohnson.net> # # 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, mo...
from registrasion import forms from registrasion import models as rego from registrasion.controllers.cart import CartController from registrasion.controllers.invoice import InvoiceController from registrasion.controllers.product import ProductController from django.contrib.auth.decorators import login_required from dj...
# Third-Party from fsm_admin.mixins import FSMTransitionMixin from mptt.admin import MPTTModelAdmin # Django from django.contrib import admin # Local from .inlines import ( AwardInline, CertificationInline, ContestantInline, ContestInline, ConventionInline, GroupInline, JudgeInline, Me...
""" Forms and validation code for user registration. """ from django import newforms as forms from django.core.validators import alnum_re from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from registration.models import RegistrationProfile # I put this on all requ...
from django.contrib import admin from django_object_actions import ( DjangoObjectActions, takes_instance_or_queryset, ) from .models import ( Arranger, Convention, Contest, Contestant, Group, District, Song, Person, Performance, Score, Judge, Singer, Directo...
""" Forms and validation code for user registration. """ from django.contrib.auth.models import User from django import forms from django.utils.translation import ugettext_lazy as _ from registration.models import RegistrationProfile # I put this on all required fields, because it's easier to pick up # on them wi...
""" Module for 2D depth averaged solver """ from __future__ import absolute_import from .utility import * from . import shallowwater_eq from . import timeintegrator from . import rungekutta from . import implicitexplicit import time as time_mod from mpi4py import MPI from . import exporter from .field_defs import field...
import logging log = logging.getLogger(__name__) from django.contrib import admin from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from easy_select2 import select2_modelform from .models import ( Convention, Singer, Chorus, Quartet, District, Contest,...
""" Forms and validation code for user registration. """ from django.contrib.auth.models import User from django import forms from django.utils.translation import ugettext_lazy as _ from registration.models import RegistrationProfile # I put this on all required fields, because it's easier to pick up # on them wi...
import requests import json from datetime import datetime from celery import task from celery.utils.log import get_task_logger from celery.exceptions import SoftTimeLimitExceeded from django.core.exceptions import ObjectDoesNotExist from django.conf import settings from go_http.contacts import ContactsApiClient from .m...
from collections import OrderedDict import csv import locale import csvkit from dateutil.parser import parse from django.conf import settings from django.db.models import Q from django.http import HttpResponse, Http404 from django.views.generic import View, TemplateView from rest_framework import viewsets, routers, ser...
""" Unit tests for django-registration. """ import datetime from django.conf import settings from django.contrib.auth.models import User from django.core import mail from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.test import TestCase from registratio...
""" Views which allow users to create and activate accounts. """ from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from registration.forms import RegistrationForm from registration.models import Re...
""" Views which allow users to create and activate accounts. """ from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from fumblerooski.registration.forms import RegistrationForm from fumblerooski.reg...
from registry import app from voluptuous import Schema from mongoengine import ( StringField, DateTimeField, DictField, PolygonField, ListField, PointField, Document, BooleanField, URLField, BooleanField ) avaliable_scopes = { 'person:view': 'View your full name and date of ...
import numpy as np import json import csv import argparse from pathlib import Path from collections import defaultdict from datetime import date from getpass import getuser from topopy.MorseSmaleComplex import MorseSmaleComplex as MSC, TopologicalObject class Merge(object): def __init__(self, level, is_max, src,...
# Copyright (c) 2012 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. { 'variables': { # TODO(dmaclach): can we pick this up some other way? Right now it's # duplicated from chrome.gyp 'chromium_code': 1, ...
import click import serial import prosflasher.upload import time from proscli.utils import debug from prosflasher import adr_to_str, bytes_to_str ACK = 0x79 MAX_WRITE_SIZE = 256 def debug_response(command, response, fmt='STM BL RESPONSE TO 0x{}: {}'): if not isinstance(command, str): command...
import json import logging from time import time as time_lib from django.conf import settings from django.db import transaction from django.http import HttpResponse, HttpResponseBadRequest from lazysignup.decorators import allow_lazy_user from proso.django.cache import cache_page_conditional from proso.django.reques...
"""Thumber Library Author Hannu Valtonen""" import Image import struct import StringIO try: import json except: import simplejson as json INDEX_VERSION = 1 class Thumber(object): """Thumber librarys main class, use this if you want to use everything""" def __init__(self, thumbnail_sizes = None, reserv...
class TileProcessingStatsHandler(object): def __init__(self, stats): self.stats = stats def processed_coord(self, coord_proc_data): with self.stats.pipeline() as pipe: pipe.timing('process.time.fetch', coord_proc_data.timing['fetch']) pipe.timing('process.time.process',...
import logging import progressbar progressbar.streams.wrap_stderr() logging.basicConfig(level=logging.DEBUG, filename='/tmp/geolife.timehomo.log') logger = logging.getLogger("geolife") stdout = logging.StreamHandler() stdout.setLevel(logging.DEBUG) logger.addHandler(stdout) from sqlalchemy import Index from sqlalche...
# -*- coding: utf-8 -*- # # django-timegraph - monitoring graphs for django # Copyright (c) 2011-2012, Wifirst # All rights reserved. # # See AUTHORS file for a full list of contributors. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following con...
"""Views for the ``django-tinylinks`` application.""" from django.contrib.auth import get_user_model from django.contrib.auth.decorators import permission_required from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.db.models import Count, Sum from django.http import Http404 from django...
# Copyright (c) 2008 Joost Cassee # Licensed under the terms of the MIT License (see LICENSE.txt) """ This TinyMCE widget was copied and extended from this code by John D'Agostino: http://code.djangoproject.com/wiki/CustomWidgetsTinyMCE """ from __future__ import unicode_literals import tinymce.settings from django i...
#!/usr/bin/env python3 import argparse import atexit import binascii import colorama import glob import os import struct import subprocess import sys import tempfile import time import crcmod import serial import serial.tools.list_ports import serial.tools.miniterm from ._version import __version__ ###############...
#!/usr/bin/env python import os import subprocess import sys import argparse SKELETON=("<!DOCTYPE html>\n" "<head>\n" "<meta charset=\"UTF-8\">\n" "<title>{title}</title>\n" "</head>\n" "<html>\n" "<textarea theme=\"united\" style=\"display:none;\">\n" ...
# Author: F. Alex Wolf (http://falexwolf.de) # T. Callies """Rank genes according to differential expression [Wolf17]_. """ import numpy as np import pandas as pd from math import sqrt, floor from scipy.sparse import issparse from scipy.stats import rankdata from scipy.stats import norm from .. import utils fr...
import commons, sys, os import logging as log import pandas as pd import xgboost as xgb import numpy as np from sklearn.externals import joblib from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score, classification_report, confusion_matri...
""" K-means clustering """ # Authors: Gael Varoquaux <gael.xaroquaux@normalesup.org> # Thomas Rueckstiess <ruecksti@in.tum.de> # License: BSD import warnings import numpy as np from ..base import BaseEstimator ################################################################################ # Initialisatio...
# # Created by: Pearu Peterson, September 2002 # from __future__ import division, print_function, absolute_import import sys import subprocess import time from functools import reduce from numpy.testing import (assert_equal, assert_array_almost_equal, assert_, assert_allclose, assert_almos...
#!/usr/bin/env python # Copyright 2010 Leonid Movshovich <event.riga@gmail.com> # This file is part of Webridge. # Webridge 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 Lic...
# # Created by: Pearu Peterson, September 2002 # import sys import subprocess import time from functools import reduce from numpy.testing import (assert_equal, assert_array_almost_equal, assert_, assert_allclose, assert_almost_equal, assert_array_equal) import pyt...
import os import re import sys import subprocess import platform def which(cmd): return subprocess.Popen(["/usr/bin/which",cmd],stdout=subprocess.PIPE).communicate()[0].rstrip(os.linesep) def julia_base_from_which_julia(): path = ""; which_julia = which("julia") if len(which_julia) > 0: real_path =...
#this program corresponds to special.py ### Means test is not done yet #E Means test is giving error (E) #F Means test is failing (F) #EF Means test is giving error and Failing #! Means test is segfaulting #8 Means test runs forever ### test_besselpoly ### test_mathieu_a ### test_mathieu_even_coef ### te...
#!/usr/bin/env python import os import sys import optparse directory = os.path.dirname(__file__) sys.path.append( os.path.realpath(os.path.join(directory, '..', 'third_party', 'v8', 'tools')) ) import js2c js2c.GET_SCRIPT_SOURCE_CASE = """\ if (index == %(i)i) return std::string(sources + %(offset)i, %(sour...
#!/usr/bin/env python import os import pickle import sys import time import socket import random from optparse import OptionParser from threading import Thread import subprocess from operator import itemgetter import logging import signal import zmq import getpass import mesos import mesos_pb2 ctx = zmq.Context() cl...
from .extensions import db, bcrypt, login_manager from marshmallow import Schema, fields, ValidationError from flask.ext.login import UserMixin import arrow @login_manager.user_loader def load_admin(admin_id): return Admin.query.get(admin_id) """ Models """ class User(db.Model): id = db.Column(db.Integer,...
import operator import copy from toolz.compatibility import (map, zip, iteritems, iterkeys, itervalues, reduce) __all__ = ('merge', 'merge_with', 'valmap', 'keymap', 'valfilter', 'keyfilter', 'assoc', 'update_in', 'get_in') no_default = '__no__default__' def merge(*dicts...
import os.path import click import readline import getpass import sys from mastodon import Mastodon # TODO: need to modify this to support multiple shards, since we have to register per shard # For now it only supports the default mastodon.social shard APP_PATH = os.path.expanduser('~/.config/tootstream/client.txt') A...
""" Neural sheet objects and associated functions. The Sheet class is the base class for EPs that simulate topographically mapped sheets of units (neurons or columns). A Sheet is an EventProcessor that maintains a rectangular array of activity values, and sends the contents of this array as the data element in events...
from exceptions import * """ This is a list of all attributes that may be added by a decorator, it is used to allow decorators to be order agnostic. """ invocation_attributes = ["asynchronous",] def __copy_attributes(fn, wrapper): for a in invocation_attributes: if hasattr(fn, a): setattr(wrapper, a, geta...
#!/usr/bin/env python # coding=utf-8 import time import os import importlib from toughlib import dispatch,logger import urlparse class Permit(): """ 权限菜单管理 """ opr_cache = {} def __init__(self, parent=None): if parent: self.routes = parent.routes self.handlers...
#!/usr/bin/env python # # Test cases for tournament.py from tournament import * def test_delete_all_event(test_num): delete_all_events() c = count_events() if type(c) is not long: raise TypeError( "count_events() should return long value.") if c != 0: raise ValueError("Aft...
import discord from discord.ext import commands from random import randint import requests import asyncio import random import json from cogs.utils import checks from .utils.dataIO import dataIO import os from fake_useragent import UserAgent from proxybroker import Broker, Proxy from collections import deque creditIc...
import datetime import decimal import urllib from django.contrib import messages from django.core.exceptions import PermissionDenied, ValidationError from django.core.urlresolvers import reverse, NoReverseMatch from django.db import models from django.db.models.deletion import Collector from django.forms.formsets impo...
import datetime import decimal import urllib from django.contrib import messages from django.core import paginator from django.core.exceptions import PermissionDenied, ValidationError from django.db import models from django.db.models.deletion import Collector from django.forms.formsets import all_valid from django.fo...
from toydist.misc import \ Extension from toydist.cabal_parser.cabal_parser import \ parse class PackageDescription: def __init__(self, name, version=None, summary=None, url=None, author=None, author_email=None, maintainer=None, maintainer_email=None, license=None, descript...
#!/usr/bin/env python from __future__ import print_function, absolute_import import re import requests import itertools from decimal import Decimal from copy import deepcopy from .ete3mini import TreeNode from .TreeStyle import TreeStyle, normal, coal, dark, multi from .Coords import Coords from .Drawing import Draw...
# -*- coding: iso8859-1 -*- # # Copyright (C) 2003-2005 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgstrm <jonas@edgewall.com> # Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of...
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com> # 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 htt...
#!/usr/bin/env python3 # Trace Generator for ECE5984 Cache Project # Generates a trace file import random import pprint import sys import math # Script Wide Values rw_options = ['read', 'write'] #addr_options = range(0,0xffffffff+1) # must be range otherwise will fill mem crit_options = ['hi', 'low'] #prior_options...
#!/usr/bin/env python # -*- coding:utf-8 -*- """ IG Markets REST API Library for Python http://labs.ig.com/rest-trading-api-reference Original version by Lewis Barber - 2014 - http://uk.linkedin.com/in/lewisbarber/ Modified by Femto Trader - 2014-2015 - https://github.com/femtotrader/ """ # noqa import json import l...
#! python3 from secp256k1 import G, order, pointMultiply import hashlib from base58 import b58encode, b58encode_check # to be fixed for other version value def private_key_to_public_key(private_key, version=0x04): p = pointMultiply(private_key) public_key = version+p[0]+p[1] return public_key # https://en.bitc...
from collections import defaultdict import os import re from operator import attrgetter from ryu.controller import ofp_event from ryu.controller.handler import MAIN_DISPATCHER, DEAD_DISPATCHER from ryu.controller.handler import set_ev_cls from ryu.lib import hub from ryu.base import app_manager import config from rrd_...
#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # ***** END LICENSE BLOCK ***** import sys, os, re, multiprocess...
from sklearn.naive_bayes import * from sklearn import svm from sklearn.pipeline import Pipeline from sklearn.metrics import classification_report, confusion_matrix from optparse import OptionParser from helper import FileHelper, Word2VecHelper, GraphHelper import helper from helper.VectorHelper import * classes = [] i...
#!/usr/bin/python import os import sys import os.path as osp import cv2 import numpy as np import argparse as ap from lxml import etree import re import time parser = ap.ArgumentParser(description='Traverse all .mp4 video files in the specified folder and'+ ' pick out frames to export as ima...
from sklearn.naive_bayes import * from sklearn import svm from sklearn.pipeline import Pipeline from sklearn.metrics import classification_report, confusion_matrix from optparse import OptionParser from helper import FileHelper, Word2VecHelper, GraphHelper import helper from helper.VectorHelper import * import os impo...
import os from zipfile import ZipFile #Place all .zip files from Udacity in the directory you specify below: inputDirectory = "transcripts/" #The formatted .txt files from each of the lessons will be saved in the directory you specify below: outputDirectory = "parsedTranscripts/" def parseTranscript(inputLines, outp...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import sys import os import time import re from datetime import datetime import dateutil.parser as parser import traceback from redis import StrictRedis, ConnectionError from kafka import KafkaProducer from kafka.common import KafkaUnavailableError from birdy.t...
#!/usr/bin/env python import json import logging import sys import time import dateutil.parser as parser from redis import StrictRedis, ConnectionError from kafka import SimpleProducer, KafkaClient from kafka.common import (NotLeaderForPartitionError, KafkaUnavailableError) from birdy.twitter import StreamClient, Twit...
__version__ = '1.4.13.0-dev' if __name__ == '__main__': print(__version__)
__version__ = '3.3.1' if __name__ == '__main__': print(__version__)
__version__ = '1.4.11.1' if __name__ == '__main__': print(__version__)
#RUIAN VDP downloader - download VFR file for "obce" based on ZSJ codelist import requests import os urlVDP = "http://vdp.cuzk.cz/vymenny_format/soucasna/" date = "20151130"; origHranice = "UKSH"; statGenHranice = "UKSG"; def saveToFile(fileName,content): if not os.path.exists("./data/"): os.makedirs("....
""" Copyright [2009-2017] EMBL-European Bioinformatics Institute 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 a...
""" Backfill information into the IEM summary table, so the website tools are happier """ from __future__ import print_function from pyiem.util import get_dbconn from pyiem.datatypes import speed, distance, temperature ISUAG = get_dbconn('isuag', user='mesonet') IEM = get_dbconn('iem', user='mesonet') def two():...
""" Generate a raster of XXhour precipitation totals from MRMS run from RUN_10_AFTER.sh """ import datetime import os import sys import tempfile import subprocess import json import gzip import unittest import numpy as np from PIL import Image import pyiem.mrms as mrms import pygrib TMP = "/mesonet/tmp" PQI = "/h...
#!/usr/bin/env python import sys import numpy as np from optparse import OptionParser parser = OptionParser() parser.add_option("-b", "--bedpe_file", dest="bedpe_file", help="BEDPE file") parser.add_option("-n", "--name", default="LUMPY BedGraph", dest="name", help="Name") (options, ar...
#!/usr/bin/env python # # This program returns the gray matter segmentation given anatomical, spinal cord segmentation and t2star images # # --------------------------------------------------------------------------------------- # Copyright (c) 2013 Polytechnique Montreal <www.neuro.polymtl.ca> # Authors: Sara Dupont #...
#!/usr/bin/env python # # This program returns the gray matter segmentation given anatomical, spinal cord segmentation and t2star images # # --------------------------------------------------------------------------------------- # Copyright (c) 2013 Polytechnique Montreal <www.neuro.polymtl.ca> # Authors: Sara Dupont #...
#!/usr/bin/env python # # This program returns the gray matter segmentation given anatomical, spinal cord segmentation and t2star images # # --------------------------------------------------------------------------------------- # Copyright (c) 2013 Polytechnique Montreal <www.neuro.polymtl.ca> # Authors: Sara Dupont #...
#!/usr/bin/env python # # This program returns the gray matter segmentation given anatomical, spinal cord segmentation and t2star images # # --------------------------------------------------------------------------------------- # Copyright (c) 2013 Polytechnique Montreal <www.neuro.polymtl.ca> # Authors: Sara Dupont #...
from django.shortcuts import render_to_response from django.http import HttpResponse from django.core.context_processors import csrf from django.forms.util import ErrorList from django.forms.forms import NON_FIELD_ERRORS from django.template import RequestContext from phylocommons.get_treestore import get_treestore, tr...
from httplib2 import Http from urllib import urlencode from datetime import datetime import exceptions import json import oauth2 as oauth import os import random import time import urlparse class ResourceUnavailable(Exception): """Exception representing a failed request to a resource""" def __init__(self, msg, http...
__version__ = '2.30.53'
__version__ = '3.16.1' if __name__ == '__main__': # print version if run directly i.e. in a CI script print(__version__)
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSHelperFn, AWSObject, AWSProperty, Ref from .validators import boolean, integer, integer_range, network_port class Tag(AWSHelperFn): def __init__(self, key, value): self.data...
# Copyright (c) 2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSHelperFn, AWSObject, AWSProperty from .validators import boolean, network_port, positive_integer class DBInstance(AWSObject): resource_type = "AWS::RDS::DBInstance" props = { ...
import os os.system( "curl \"https://docs.google.com/spreadsheets/d/1tS_AHvttsNA7WVVQjaR8Wv1kEpn-DmuzI5Ld2A0XPQc/export?gid=0&format=tsv\" > team.tsv" ) readFile = open("team.tsv") writeFile = open("../team-container-content.html", 'w') print >> writeFile, "<h1 class=\"section-title\">Leadership</h1> \n\ <p>Cli...
#!/usr/bin/python from os.path import join, dirname, normpath import os import shlex import subprocess import time import urllib2 import uuid def shell(cmd): args = shlex.split(cmd) subprocess.check_call(args) base_path = normpath(join(dirname(__file__), '..', '..')) os.chdir(base_path) vers = uuid.uuid1() pr...
import PyYAML import os path = os.path.dirname(os.path.realpath(__file__)) path = path[:-len("scripts")] pubspec = {} with open(path + "pubspec.yaml") as stream: pubspec = yaml.load(stream) data = dict( name = pubspec['name'], description = pubspec['description'], version = pubspec['version'], homepage =...
import tkinter as Tk import tkinter.ttk as ttk import tkinter.simpledialog as simpledialog import tkinter.filedialog as filedialog import tkinter.messagebox as messagebox import importlib import tts #if win USE_REGISTRY = importlib.find_loader('winreg') if USE_REGISTRY: import winreg else: import xdgappdirs impo...
# Copyright (c) 2014-2015 by California Institute of Technology # 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,...
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from datetime import datetime, timedelta import sys import requests from .settings import Settings from .exceptions import DocumentNotFound, Unauthorized from . import events class NTBObject(object): def __init_...
# -*- coding: utf8 -*- from report.html_repport import create_html_report from pickle import dump, load #from tuttle.workflow_runner import create_tuttle_dirs, print_header, print_logs, tuttle_dir, ResourceError, \ # prepare_paths, empty_extension_dir, TuttleEnv, list_extensions, print_preprocesses_header, print_pre...
# -*- coding: utf-8 -*- """ Twingoで利用する認証バックエンドを提供します。 @author: Jun-ya HASEBA """ from django.conf import settings from django.contrib.auth.models import User import tweepy from twingo.models import Profile class TwitterBackend: """ TwitterのOAuthを利用した認証バックエンドです。 ModelBackendの代替として使用してください。 """ ...
import os import json import copy import hexchat import twitch.logger log = twitch.logger.get() # the default settings defaults = { # attributes for each user type "usertypes": { "global_mod": { # note we don't need %R in badge if we only set a colour, # because the nick will set another colour anyway # (...
import ssl from datetime import datetime from twitcher._compat import urlparse from twitcher._compat import xmlrpclib import logging LOGGER = logging.getLogger(__name__) def _create_https_context(verify=True): context = ssl._create_default_https_context() if verify is False: context.check_hostname =...
# encoding: utf-8 """ USAGE: twitter [action] [options] ACTIONS: authorize authorize the command-line tool to interact with Twitter follow follow a user friends get latest tweets from your friends (default action) help print this help text that you are currently reading leave ...
import configparser import click import signal import sys import time from .common import TwitterConnection class TweetReader: def __init__(self, twitter, wall, query, lang=None): self.twitter = twitter self.wall = wall self.params = {'q': query, 'since_id': 0} self.tf = {} ...
__version__ = '0.2.4'