text
stringlengths
4
1.02M
meta
dict
"""Python 'uu_codec' Codec - UU content transfer encoding. This codec de/encodes from bytes to bytes and is therefore usable with bytes.transform() and bytes.untransform(). Written by Marc-Andre Lemburg (mal@lemburg.com). Some details were adapted from uu.py which was written by Lance Ellinghouse and modified by Jack...
{ "content_hash": "ed2f972ced191ca60b4874ea64dc1a91", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 71, "avg_line_length": 27.96, "alnum_prop": 0.6351931330472103, "repo_name": "timm/timmnix", "id": "e3269e40cd306e1cb42586af87e7cde2d2115a48", "size": "2796", "binary": ...
"""Prepare JSON for all files in current directory.""" import argparse import os import json def main(): parser = argparse.ArgumentParser("Prepare JSON for all files in specified directory") parser.add_argument("directory", help="directory with sources") parser.add_argument("output", help="output file") args = p...
{ "content_hash": "2ec3f0a9792f93871610fd93c55f3217", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 86, "avg_line_length": 24.714285714285715, "alnum_prop": 0.6791907514450867, "repo_name": "Timus1712/source-code-comparator", "id": "6b27b8c7fa1363268ab4cdb07403963853973b84"...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('adventure', '0009_adventure_slug'), ] operations = [ migrations.AddField( model_name='artifact', name='guard_id', ...
{ "content_hash": "8936930ff6aea1b593b9cf060c954344", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 143, "avg_line_length": 31.26086956521739, "alnum_prop": 0.6147426981919333, "repo_name": "kdechant/eamon", "id": "03a26d4a96d15dd3c565e0c03d18886822d23721", "size": "791",...
import importlib import sys import warnings warnings.warn('progress has been moved from stanza.research to stanza.monitoring; the module in research is deprecated.') sys.modules[__name__] = importlib.import_module('...monitoring.progress', __name__)
{ "content_hash": "393ed632ca91d953a38bcfcdda8ab84b", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 121, "avg_line_length": 36, "alnum_prop": 0.7698412698412699, "repo_name": "arunchaganty/aeschines", "id": "1d45ddeb615667750f349d036cc1c962fceda16b", "size": "252", "bina...
import bond import time class Ring(object): """Docstring for Ring""" ring_type = 0 improper = False fused = False thio = False atom1 = "" atom2 = "" atom3 = "" atom4 = "" atom5 = "" atom6 = "" def __init__(self,a1,a2,a3,a4,a5,a6=None): self.atom1 = a1 se...
{ "content_hash": "91c9d52e624b4e0050e22a3b36706f93", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 100, "avg_line_length": 31.137254901960784, "alnum_prop": 0.4782745591939547, "repo_name": "sipjca/cmlparser_py", "id": "c69d128bfea4e555276147d35ef8137b45e37190", "size":...
""" Hacer un conversor de gradación a. De Celsius a Fahrenheit y de Fahrenheit a Celsius b. Escribir una función que genere aleatoriamente valores de temperatura entre -5 y 40ºC c. Escribir una función que genere una tupla con 1200 valores de temperatura d. Considerar que cada 100 datos del apartado...
{ "content_hash": "97b7e925cce237027ccd83a0f1beb8cf", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 102, "avg_line_length": 30.486486486486488, "alnum_prop": 0.625, "repo_name": "IhToN/DAW1-PRG", "id": "08de032aa5b754a3fe6b55ffb98bd8f0bf38c2ca", "size": "2266", "binary"...
import unittest import mock def _make_credentials(): import google.auth.credentials return mock.Mock(spec=google.auth.credentials.Credentials) class TestGAXClient(unittest.TestCase): def _get_target_class(self): from google.cloud.vision._gax import _GAPICVisionAPI return _GAPICVisionA...
{ "content_hash": "a71b84bd309d20fe2f43fe9eaa76dce1", "timestamp": "", "source": "github", "line_count": 283, "max_line_length": 79, "avg_line_length": 39.53003533568904, "alnum_prop": 0.637704478412443, "repo_name": "daspecster/google-cloud-python", "id": "b2c0ea5ab430385ff1bdbe09da3a169682fa09c5", ...
from __future__ import division, print_function import gi gi.require_version('Gtk', '3.0') from gi.repository import GLib, Gio, Gtk from ScientificProjects.Config import read_config, write_config class PreferencesDialog(Gtk.Dialog): def __init__(self, parent, config_file_name): self.config_file_name = c...
{ "content_hash": "2904e9585dd4c514322fea8ea0bf872c", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 92, "avg_line_length": 38, "alnum_prop": 0.5767543859649122, "repo_name": "bond-anton/TrimMerge", "id": "0d800b67ae0f78a0c1b188628ff4d041c9b0e08f", "size": "4119", "bina...
import datetime import http import json import pathlib import pytest from gidgethub import ( BadRequest, BadRequestUnknownError, GitHubBroken, HTTPException, InvalidField, RateLimitExceeded, RedirectionException, ValidationError, ValidationFailure, ) from gidgethub import sansio ...
{ "content_hash": "7394911406d3810fe569cd90b512544b", "timestamp": "", "source": "github", "line_count": 621, "max_line_length": 125, "avg_line_length": 38.44927536231884, "alnum_prop": 0.6043053985006491, "repo_name": "brettcannon/gidgethub", "id": "c97d63f52ecd6ee876ae00c31ac6de136a712e19", "size"...
import os.path as op from copy import deepcopy from functools import partial import pytest import numpy as np from scipy.io import savemat from numpy.testing import assert_array_equal, assert_equal, assert_allclose from mne.channels import (rename_channels, read_ch_adjacency, combine_channels, ...
{ "content_hash": "fd6e9290972fc7c7f3143f3e74c9e9bf", "timestamp": "", "source": "github", "line_count": 530, "max_line_length": 79, "avg_line_length": 42.83584905660377, "alnum_prop": 0.6084217944765009, "repo_name": "bloyl/mne-python", "id": "2543e2e1a80cb428e96cecfbc19f7c8875f633b6", "size": "228...
from HBaseHandler.HbaseHandler import * import tornado.autoreload import tornado.httpserver import tornado.ioloop import tornado.locale import tornado.web import os import sys reload(sys) sys.setdefaultencoding('utf-8') settings = \ { 'cookie_secret': 'hbasehbasehbasepythonpythonthriftthrift!!!', ...
{ "content_hash": "ee911d19534b70552b19abd5dedc75fa", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 70, "avg_line_length": 29.57777777777778, "alnum_prop": 0.69045830202855, "repo_name": "yangdyi/hbase_api", "id": "ce500b9b204f1eed5fd500eeba464fc9e471297f", "size": "1370"...
from __future__ import print_function import unittest import numpy as np import paddle.fluid.core as core from op_test import OpTest import paddle.fluid as fluid from paddle.fluid import Program, program_guard class TestDropoutOp(OpTest): def setUp(self): self.op_type = "dropout" self.inputs = {'...
{ "content_hash": "6201fbd289861e143ced301ffa9264b6", "timestamp": "", "source": "github", "line_count": 194, "max_line_length": 82, "avg_line_length": 30.84536082474227, "alnum_prop": 0.5412767379679144, "repo_name": "chengduoZH/Paddle", "id": "08ec1fce8d3dad06c10686914fd1f834076cef8e", "size": "65...
from supybot.test import * class TopicTestCase(ChannelPluginTestCase): plugins = ('Topic','User',) def testRemove(self): self.assertError('topic remove 1') _ = self.getMsg('topic add foo') _ = self.getMsg('topic add bar') _ = self.getMsg('topic add baz') self.assertError...
{ "content_hash": "d0f7c062f391695fe02eb4e74b5bac36", "timestamp": "", "source": "github", "line_count": 238, "max_line_length": 81, "avg_line_length": 44.294117647058826, "alnum_prop": 0.5762663631189527, "repo_name": "buildbot/supybot", "id": "83adcfaee687088bb4815b1108e40b8a939af6d3", "size": "12...
import rospy import math from sensor_msgs.msg import Joy from geometry_msgs.msg import Twist class JoyTwist(object): def __init__(self): self._joy_sub = rospy.Subscriber('joy', Joy, self.joy_callback, queue_size = 1) self._twist_pub = rospy.Publisher('/cmd_vel', Twist, queue_size = 1) def joy_...
{ "content_hash": "11a283be3cb64a0b6ee3031963d3f315", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 87, "avg_line_length": 31.904761904761905, "alnum_prop": 0.5940298507462687, "repo_name": "kato-masahiro/raspimouse_maze_manual", "id": "43cf2550196fb601b5410a14ffba60cec95ea...
import config from turkic.cli import handler @handler("import") def importstuff(args): pass @handler() def dump(args): pass
{ "content_hash": "607af60aca788c93c053d612001b6e79", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 30, "avg_line_length": 13.4, "alnum_prop": 0.7089552238805971, "repo_name": "johndoherty/turkic", "id": "81898d98b7c917f657de5bf8a99038d12a078d60", "size": "134", "binary...
from modules import BaseModule import re import random class EightBallModule(BaseModule): def do8ball(self, message): split = re.split("(\[\s\]\s[^\[\]]+)+?\s?", message) choices = [x for x in split if len(x) > 0] choice = random.randint(0, len(choices)-1) out = "" for i in...
{ "content_hash": "7eb10f635d1e6237b93211c2ecfd419b", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 68, "avg_line_length": 27.870967741935484, "alnum_prop": 0.4791666666666667, "repo_name": "hrkfdn/cherry", "id": "9ed9771dd81ead7a158776166283b5fce9238372", "size": "864", ...
from pylab import * class Container: def contains(self, (x,y)): raise "Container is an abstract class" class Rectangle(Container): def __init__(self, x0, x1, y0, y1): self.x0 = x0 self.x1 = x1 self.y0 = y0 self.y1 = y1 self.width = x1 - x0 self.height = ...
{ "content_hash": "666b780a395637b318d19f05954fb403", "timestamp": "", "source": "github", "line_count": 136, "max_line_length": 82, "avg_line_length": 27.551470588235293, "alnum_prop": 0.5764611689351481, "repo_name": "spectralflight/billiards", "id": "afdc44cd7781e496157837b82f1ff0e6f1c8220e", "si...
import os __all__ = ['test_client'] # Useful Constants INSTALL_DIR = os.path.dirname(__file__) DATA_DIR = os.path.join(INSTALL_DIR, 'data')
{ "content_hash": "28373c1845e654c02ec3c337f615a01e", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 44, "avg_line_length": 20.285714285714285, "alnum_prop": 0.6619718309859155, "repo_name": "threerings/splatd", "id": "11848b327ed2d9c5c3f96d10fe527da87d1cf4c5", "size": "184...
import subprocess import tkinter as tk from math import sqrt, ceil class Application(tk.Frame): def __init__(self, master=None): super().__init__(master) self.pack() self.create_widgets() def create_widgets(self): buttonFile = open("buttons.txt") buttons = list(buttonFi...
{ "content_hash": "882094759790319796b7bfaa5ef86ae2", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 144, "avg_line_length": 38.18840579710145, "alnum_prop": 0.5259962049335863, "repo_name": "NickTGraham/PythonPack", "id": "9919c1c84c83202615bcd1a8ff213061b42b9d7f", "size"...
"""Support for the Oracle database via the zxjdbc JDBC connector. JDBC Driver ----------- The official Oracle JDBC driver is at http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html. """ import decimal import re from sqlalchemy import sql, types as sqltypes, util from sqlalchemy.connectors.zxJDBC...
{ "content_hash": "1dd3c32d41828bbf02ab6ace89a38211", "timestamp": "", "source": "github", "line_count": 209, "max_line_length": 97, "avg_line_length": 35.3732057416268, "alnum_prop": 0.6067902069525226, "repo_name": "simplegeo/sqlalchemy", "id": "d742654a0d0fee70d438484d76ce048bb462848c", "size": "...
""" Classes for interpolating values. """ from __future__ import division, print_function, absolute_import __all__ = ['interp1d', 'interp2d', 'spline', 'spleval', 'splmake', 'spltopp', 'ppform', 'lagrange', 'PPoly', 'BPoly', 'NdPPoly', 'RegularGridInterpolator', 'interpn'] import itertools impor...
{ "content_hash": "7127c173dd087143a7ec24015d99bef7", "timestamp": "", "source": "github", "line_count": 2856, "max_line_length": 111, "avg_line_length": 35.3921568627451, "alnum_prop": 0.5476948951325683, "repo_name": "DailyActie/Surrogate-Model", "id": "f21172c26e5961a3f26369c065257788a5bebaea", "...
import urllib import re import smtplib import string from xml.dom import minidom from email.mime.text import MIMEText WEATHER_URL = 'http://xml.weather.yahoo.com/forecastrss?p=%s' WEATHER_NS = 'http://xml.weather.yahoo.com/ns/rss/1.0' RAIN_CODES = (5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 35, 40, 45) USERS_URL =...
{ "content_hash": "fd1e809e07e2dcf951a92f53ad7fcb8a", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 120, "avg_line_length": 32.04225352112676, "alnum_prop": 0.6558241758241758, "repo_name": "landa/rain", "id": "364f9a281cc96c9ef18e6fcac5a8ed729d17ac8d", "size": "2294", ...
"""Shared functionality for dtFabric-based data format plist parser plugins.""" import abc import os from dtfabric import errors as dtfabric_errors from dtfabric.runtime import fabric as dtfabric_fabric from plaso.lib import errors from plaso.parsers.plist_plugins import interface class DtFabricBasePlistPlugin(int...
{ "content_hash": "759a71381195a91ed3910d545189ee03", "timestamp": "", "source": "github", "line_count": 194, "max_line_length": 80, "avg_line_length": 38.04123711340206, "alnum_prop": 0.7069105691056911, "repo_name": "kiddinn/plaso", "id": "30335e6a6ece9bf9ce100cad0ebd4975a594bb0e", "size": "7404",...
import copy from rpython.rlib import jit from rpython.rlib.objectmodel import specialize from topaz.celldict import CellDict, VersionTag from topaz.coerce import Coerce from topaz.module import ClassDef, check_frozen from topaz.objects.functionobject import W_FunctionObject from topaz.objects.objectobject import W_Ro...
{ "content_hash": "c61c34813680db0bc7981f6b1a53f92e", "timestamp": "", "source": "github", "line_count": 862, "max_line_length": 127, "avg_line_length": 37.72389791183295, "alnum_prop": 0.6053877852266437, "repo_name": "topazproject/topaz", "id": "6c3b95d3d52a59d3102995c952322bb3f5cdb3ca", "size": "...
import os import time import signal import requests from headers import headers from db.redis_db import Urls from db.redis_db import Cookies from logger.log import crawler, other from db.login_info import freeze_account from utils.email_warning import send_email from page_parse.basic import is_403, is_404, is_complete ...
{ "content_hash": "e3799eda410e88ec169823c5e2265a07", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 114, "avg_line_length": 35.857142857142854, "alnum_prop": 0.5742031872509961, "repo_name": "KingOfBanana/SocialNetworkAI", "id": "0991173f8bd2a8cdafc8e0207c7ca2641b24861a", ...
import os from loguru import logger from requests import Session from requests.exceptions import RequestException from flexget import plugin from flexget.event import event from flexget.utils.template import RenderError logger = logger.bind(name='qbittorrent') class OutputQBitTorrent: """ Example: q...
{ "content_hash": "3879ed8c1fa844f653547bf5b1e8b67d", "timestamp": "", "source": "github", "line_count": 249, "max_line_length": 93, "avg_line_length": 39.00803212851405, "alnum_prop": 0.5284670029856893, "repo_name": "ianstalk/Flexget", "id": "441c5e696a1fefa0f19fbf1e71c75f735f5625b0", "size": "971...
import sys import json import csv if __name__ == "__main__": try: if len(sys.argv) < 2: print "Usage: %s <JSON settings file>" % sys.argv[0] print " <settings file>: access settings (IP/user/password)" sys.exit(0) f = open(sys.argv[1], 'r') settings...
{ "content_hash": "6163fa35195a27c93142a5e988015cd9", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 112, "avg_line_length": 27, "alnum_prop": 0.5588235294117647, "repo_name": "jocook/s3260-python", "id": "93c14b61a575d24ae364babf2b7eb784eb4f5c16", "size": "918", "binary...
from __future__ import absolute_import from __future__ import division from __future__ import generators from __future__ import nested_scopes from __future__ import print_function from __future__ import unicode_literals from __future__ import with_statement from server.io_multiplex import IOMultiplex from server.reque...
{ "content_hash": "c4656b93a871d6d9aa8d5e951854a390", "timestamp": "", "source": "github", "line_count": 187, "max_line_length": 124, "avg_line_length": 33.61497326203209, "alnum_prop": 0.573814826598791, "repo_name": "JianMingZhuo/WSGIServer", "id": "6f33289d345209bf2fd6e435661283dfbeca2fcc", "size...
''' app.emails ~~~~~~~~~~~~~~~~ Defining all the email functions here. ''' from flask_mail import Message from flask import render_template from config import ADMINS from app import mail, app from .decorators import async_dec @async_dec def send_async_email(app, msg): '''Send mail asynchronously.''' with ap...
{ "content_hash": "52bd36b8d591905638aa16a081746fbd", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 80, "avg_line_length": 32.97222222222222, "alnum_prop": 0.5846672283066554, "repo_name": "Napchat/microblog", "id": "055b562b56a72522b654658e34963eb8833c9b13", "size": "118...
import os import tkinter as tk import tkinter.ttk as ttk from tkinter import Menu from Domain.Discipline import Discipline from View.GUI.InputDialog import InputDialog class DisciplineView(tk.Frame): def __init__(self, master, catalogController, commandController): # Set up our variables and controllers ...
{ "content_hash": "e82962dec3627d563d63926db2bdcf75", "timestamp": "", "source": "github", "line_count": 161, "max_line_length": 141, "avg_line_length": 48.50931677018634, "alnum_prop": 0.612932138284251, "repo_name": "Zephyrrus/ubb", "id": "a09e37aeab3d889076b4ad17ef3abf59bb803dd2", "size": "7810",...
import logging import unittest import config import thread_cert # Test description: Here is the test case `5.11.1 DUA-TC-04: DUA re-registration` # # Topology: # -----------(eth)---------------- # | | # Router_1----BR_1---HOST # \ / # Router_2 # from pktverify.packet_verif...
{ "content_hash": "982ac2bcc10c6920c79eb7acb41f6c4c", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 113, "avg_line_length": 37.229166666666664, "alnum_prop": 0.587203879873158, "repo_name": "abtink/openthread", "id": "63d2b08b814f7ebec2d1784bf9010820f26fdb49", "size": "6...
import pytest import asyncio import os from datetime import datetime, timedelta from aiohttp.test_utils import loop_context from os import environ as env from app import create, TestConfig from app.views import Post, Comment, parse_post_options @pytest.fixture def app(loop): return create(loop, conf=TestConfig) ...
{ "content_hash": "71b34f1edc17e0ec7cae5749973a71b3", "timestamp": "", "source": "github", "line_count": 181, "max_line_length": 74, "avg_line_length": 30.22099447513812, "alnum_prop": 0.596709323583181, "repo_name": "wzuo/blog-markdown-aio", "id": "c64c53f272b06ad9e321bec198e9c1f6449d1a32", "size":...
from openravepy import ( CollisionOptions, CollisionOptionsStateSaver, CollisionReport, RaveCreateKinBody, openrave_exception, ) from prpy.exceptions import PrPyException from prpy.planning.exceptions import ( CollisionPlanningError, SelfCollisionPlanningError, ) class SimpleRobotCollisi...
{ "content_hash": "01fe32df95af0dab1376f2cacc8a75fe", "timestamp": "", "source": "github", "line_count": 164, "max_line_length": 79, "avg_line_length": 35.201219512195124, "alnum_prop": 0.6847393036549454, "repo_name": "personalrobotics/prpy", "id": "d0685a73b125152f32cf3b04c33805805a8971a5", "size"...
import sys from cdrouter import CDRouter from cdrouter.configs import Config if len(sys.argv) < 3: print('usage: <base_url> <token>') sys.exit(1) base = sys.argv[1] token = sys.argv[2] # create service c = CDRouter(base, token=token) cfg = c.configs.create(Config( name='My Config File', contents=""...
{ "content_hash": "9f1c42dfa0268afd22a0721d885475f1", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 44, "avg_line_length": 18.695652173913043, "alnum_prop": 0.6767441860465117, "repo_name": "qacafe/cdrouter.py", "id": "0a44dc20d7509c8c5d82fce313280b6145c672dd", "size": "4...
from math import sqrt, log class Node: """ A node in the game tree. Note wins is always from the viewpoint of playerJustMoved. Crashes if state not specified. """ def __init__(self, move = None, parent = None, state = None): self.move = move # the move that got us to this node - "None" for...
{ "content_hash": "f4563286b86e0ec36ff6c1e17ea9ca11", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 133, "avg_line_length": 37.08474576271186, "alnum_prop": 0.5845521023765996, "repo_name": "crainiarc/poker-ai-planner", "id": "7d89168dd2859c6168d8fe63b0dea5e99f66cc18", "s...
import decimal import json import os import time from datetime import datetime import pytest import pytz import snowflake.connector from snowflake.connector import (constants, errorcode, errors) from snowflake.connector.compat import (BASE_EXCEPTION_CLASS, PY2) def _create_warehouse(conn, db_parameters): """ ...
{ "content_hash": "d9c560ca769d1605db108a04a244691f", "timestamp": "", "source": "github", "line_count": 883, "max_line_length": 79, "avg_line_length": 32.58776896942242, "alnum_prop": 0.5490877497827976, "repo_name": "mayfield/snowflake-connector-python", "id": "24cef78870d7ea31e17d442d195b2780f29324...
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, unicode_literals import pytest from atomic_reactor.core import DockerTasker from atomic_reactor.inner...
{ "content_hash": "4a2b0a80e0bf4f503bce504230dc00d2", "timestamp": "", "source": "github", "line_count": 170, "max_line_length": 194, "avg_line_length": 43.076470588235296, "alnum_prop": 0.6009832036050798, "repo_name": "jpopelka/atomic-reactor", "id": "4f4c3e01e81ef7514ff902c33b8c0e7e3f11b75b", "si...
import os import signal import asyncio import logging import threading import faulthandler logger = logging.getLogger(__name__) _glob_loop = None _glob_thrd = None def _asynciostacks(*args, **kwargs): # pragma: no cover ''' A signal handler used to print asyncio task stacks and thread stacks. ''' p...
{ "content_hash": "d24a95ad13491e48ec2be30039506d7c", "timestamp": "", "source": "github", "line_count": 122, "max_line_length": 101, "avg_line_length": 26.311475409836067, "alnum_prop": 0.626791277258567, "repo_name": "vertexproject/synapse", "id": "faab5cafe0fff915dd55e9dd52ee470be4ca58b9", "size"...
import h2o import h2o_cmd import h2o_hosts import sys import time import webbrowser #import unittest, time, sys #sys.path.extend(['.','..','py']) h2o.config_json = "testdir_hosts/pytest_config-cypof.json" h2o_hosts.build_cloud_with_hosts() #h2o.build_cloud(4, java_heap_GB=1, capture_output=False, classpath=True) fil...
{ "content_hash": "823f9b28e385a5bc30801bc9781bdb84", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 86, "avg_line_length": 28.5, "alnum_prop": 0.7543859649122807, "repo_name": "woobe/h2o", "id": "aa040f08038da3c62c6d76168273344dc25b4a68", "size": "570", "binary": false,...
from oslo_db import exception from oslo_db.sqlalchemy import utils from oslo_utils import uuidutils import six import sqlalchemy from cloudkitty import db from cloudkitty.rating.hash.db import api from cloudkitty.rating.hash.db.sqlalchemy import migration from cloudkitty.rating.hash.db.sqlalchemy import models def g...
{ "content_hash": "c1a1916727ea3a99d6b62d8045a15a9c", "timestamp": "", "source": "github", "line_count": 466, "max_line_length": 78, "avg_line_length": 37.81974248927039, "alnum_prop": 0.5150930549251022, "repo_name": "muraliselva10/cloudkitty", "id": "b5ad73a39930592a65da5e47e1952820d515f26c", "siz...
from django.conf.urls import include, url from openslides.saml import SAML_ENABLED from openslides.utils.plugins import get_all_plugin_urlpatterns urlpatterns = get_all_plugin_urlpatterns() urlpatterns += [ url(r"^core/", include("openslides.core.urls")), url(r"^users/", include("openslides.users.urls")), ]...
{ "content_hash": "1f559e5332778131da0a30e729e31bb8", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 68, "avg_line_length": 27.2, "alnum_prop": 0.7205882352941176, "repo_name": "FinnStutzenstein/OpenSlides", "id": "e4dc76c5f23e3f17bdc1760dbb346ff20530b728", "size": "408", ...
''' Created on 9 aout 2014 @author: ludovicl ''' import sys # py2app (Mac OS X) if sys.argv[1] == 'py2app' : # Module : py2app # usage : python standalone_setup.py py2app # To reduce size on Mac OS X : ditto --rsrc --arch x86_64 oldapp.app newapp.app from setuptools import setup ####Remove p...
{ "content_hash": "a40d9a7c00ff4700d91318753b960952", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 160, "avg_line_length": 26.394495412844037, "alnum_prop": 0.5290232881473758, "repo_name": "ludovicl/Drag-Press", "id": "da17afecc5059571b6003a6a0f7a4ae2e9dc9a94", "size":...
import rospy import tf from geometry_msgs.msg import PoseStamped, Quaternion, TwistStamped from dbw_mkz_msgs.msg import SteeringReport, ThrottleCmd, BrakeCmd, SteeringCmd from std_msgs.msg import Float32 as Float from std_msgs.msg import Bool from sensor_msgs.msg import PointCloud2 from sensor_msgs.msg import Image im...
{ "content_hash": "fbbda466ad6eae7194c7e329a5769c02", "timestamp": "", "source": "github", "line_count": 205, "max_line_length": 129, "avg_line_length": 34.048780487804876, "alnum_prop": 0.610458452722063, "repo_name": "DavidObando/carnd", "id": "400ce704de4ed74b63769306de5566bea5883100", "size": "6...
''' Run this script inside of src/ and it will look for all the files that were changed this year that still have the last year in the copyright headers, and it will fix the headers on that file using a perl regex one liner. For example: if it finds something like this and we're in 2014 // Copyright (c) 2009-2013 The...
{ "content_hash": "211b0fb6871cc00b31dc617705fa3edb", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 81, "avg_line_length": 28, "alnum_prop": 0.6929945054945055, "repo_name": "CavityGap/greencoin", "id": "65da7d9465503cc9053955ccb7590c505e47755d", "size": "1478", "binary...
import numpy from chainer import functions from chainer import testing def _decorrelated_batch_normalization(x, mean, projection, groups): xs = numpy.split(x, groups, axis=1) assert mean.shape[0] == groups assert projection.shape[0] == groups ys = [ _decorrelated_batch_normalization_1group(xi...
{ "content_hash": "80ac56f9b613e736bd375c87ae19336c", "timestamp": "", "source": "github", "line_count": 228, "max_line_length": 78, "avg_line_length": 34.030701754385966, "alnum_prop": 0.5882201314602398, "repo_name": "wkentaro/chainer", "id": "abc0537ee2215f319680f8405578f1e0ab49b459", "size": "77...
""" nestly is a collection of functions designed to make running software with combinatorial choices of parameters easier. """ __version__ = '0.6.1' from .core import Nest, nest_map, stripext
{ "content_hash": "e030da0da5214072324b6962f7d39386", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 74, "avg_line_length": 24.25, "alnum_prop": 0.7422680412371134, "repo_name": "fhcrc/nestly", "id": "6d6adf2c3aa3803fe2462cc2dc6d1315af9fc851", "size": "194", "binary": fal...
"""Add timeout to function calls.""" import signal class CallTimeout(Exception): pass def handler(signum, frame): funcname = frame.f_code.co_name raise CallTimeout("{} timed out".format(funcname)) def wrap_timeout(func, timeout, args=None, kwargs=None): if args is None: args = [] if kwargs is Non...
{ "content_hash": "1e825eb422ce0298d802ba6c4f09449a", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 56, "avg_line_length": 18.1, "alnum_prop": 0.6629834254143646, "repo_name": "CristianCantoro/wikidump", "id": "b54eb1d97f5cb4ffb12e05d39a7b7ce945e97275", "size": "543", "...
from mlpython.learners.generic import Learner import numpy as np import theano as T from theano.tensor.nnet import conv from theano.tensor.signal import downsample class TemporalNeuralNetwork(Learner): def __init__(self, lrFirstPhase = 0.001, lrSecondPhase=0.001, ...
{ "content_hash": "6b8475370a83ccaecba0357633103c6a", "timestamp": "", "source": "github", "line_count": 314, "max_line_length": 168, "avg_line_length": 42.72929936305732, "alnum_prop": 0.5973019303868227, "repo_name": "martarek/temporalcoherence", "id": "fc9e13c4e3c92653320d401547c4739b6293e8d0", "...
for i in range(7): # define the page size newPage(150, 100) # draw a random background fill(random(), random(), random()) rect(10, 10, width()-20, height()-20) # set a fill fill(1) # draw some text text("Hello World %s!" % (i+1), (20, 40)) # save only page 3 as pdf if i ...
{ "content_hash": "98718ea6dd79fc9d107e7ed538bb67ce", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 64, "avg_line_length": 23, "alnum_prop": 0.5942028985507246, "repo_name": "bitforks/drawbot", "id": "07399e0543b0737f5e3e2e0fa6cdeb7c4039153c", "size": "505", "binary": f...
from __future__ import print_function, unicode_literals import os from util.message import EN, Msg # TODO: use a const DIR_DELIM evaluate once, instead of evaluate each time def get_delim(): import platform system_name = platform.system() if "Darwin" in system_name: return "/" elif "Linux" in ...
{ "content_hash": "194643f4a07aeeb15fc931bd31218a18", "timestamp": "", "source": "github", "line_count": 165, "max_line_length": 107, "avg_line_length": 19.509090909090908, "alnum_prop": 0.6281453867660765, "repo_name": "r-kan/reminder", "id": "49085093214d43b8942f63e514f42b9b8024135f", "size": "326...
""" Agents (used for dumping data) and Teachers (for training models) related to the TOD conversation setup. As a convention, agents and teachers that are inheritable are prefixed with "Tod" whereas those that can be used as-is are not. Similarly, classes and functions that do not need to be exposed outside of this fi...
{ "content_hash": "c2069bc9d60d53256fed9de40b34263b", "timestamp": "", "source": "github", "line_count": 819, "max_line_length": 408, "avg_line_length": 39.27106227106227, "alnum_prop": 0.5991667443957343, "repo_name": "facebookresearch/ParlAI", "id": "6fb15fb731a63a84b15bb6e2faec7b4cea922ee2", "siz...
from msrest.serialization import Model class ContainerServiceVMDiagnostics(Model): """Profile for diagnostics on the container service VMs. Variables are only populated by the server, and will be ignored when sending a request. :param enabled: Whether the VM diagnostic agent is provisioned on the VM...
{ "content_hash": "b4651639780a137575b214a4306f7215", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 77, "avg_line_length": 28.448275862068964, "alnum_prop": 0.6290909090909091, "repo_name": "SUSE/azure-sdk-for-python", "id": "8db4c84f62fee42c7eabd5324b0fcb1dfa5bfaa4", "si...
import io from hashlib import sha256 from ...encoding.hash import double_sha256 from ...encoding.bytes32 import from_bytes_32 from ...intbytes import byte2int, indexbytes from ..SolutionChecker import SolutionChecker, ScriptError from pycoin.satoshi import errno from pycoin.satoshi.satoshi_struct import stream_stru...
{ "content_hash": "2085f09600836665b27c4b9748567403", "timestamp": "", "source": "github", "line_count": 162, "max_line_length": 114, "avg_line_length": 41.15432098765432, "alnum_prop": 0.6230688465576721, "repo_name": "richardkiss/pycoin", "id": "26a70b1ebd84ab26c7b454dfc51acbccfc35fc32", "size": "...
from iris_sdk.models.maps.base_map import BaseMap class LoasMap(BaseMap): file_count = None file_data = None file_names = None result_code = None result_message = None
{ "content_hash": "48c7d2e5ed3cdfe59ee635d05bec9f15", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 49, "avg_line_length": 21, "alnum_prop": 0.6825396825396826, "repo_name": "bandwidthcom/python-bandwidth-iris", "id": "2cd35ddbcec548ae28a00508800ee0c945a73d71", "size": "21...
from .rcmod import * from .utils import * from .palettes import * from .linearmodels import * from .categorical import * from .distributions import * from .timeseries import * from .matrix import * from .miscplot import * from .axisgrid import * from .widgets import * from .xkcd_rgb import xkcd_rgb from .crayons import...
{ "content_hash": "ea69f05c7e46e10bb70e0a56bc68982d", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 30, "avg_line_length": 22.5, "alnum_prop": 0.7388888888888889, "repo_name": "oesteban/seaborn", "id": "e4881d378eec51513c9758908ca1e3e3d60df15d", "size": "360", "binary":...
"""Tests for IPython.core.application""" import os import tempfile import nose.tools as nt from traitlets import Unicode from IPython.core.application import BaseIPythonApplication from IPython.testing import decorators as dec from IPython.utils.tempdir import TemporaryDirectory @dec.onlyif_unicode_paths def test...
{ "content_hash": "0d99601822193102b3adb2ffed4b326e", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 76, "avg_line_length": 31.166666666666668, "alnum_prop": 0.6394830659536542, "repo_name": "Foxfanmedium/python_training", "id": "45d42727c9b6eb4025e15256526f990c5d0a0a09", ...
from __future__ import division, unicode_literals, print_function import math import re import os import textwrap import warnings from collections import OrderedDict, deque import six from six.moves import zip, cStringIO import numpy as np from functools import partial try: from inspect import getfullargspec as...
{ "content_hash": "c30aa333c309b9308956b98cf1320061", "timestamp": "", "source": "github", "line_count": 1339, "max_line_length": 99, "avg_line_length": 41.42046303211352, "alnum_prop": 0.5055713822076376, "repo_name": "nisse3000/pymatgen", "id": "0c2790580d8c3251f380aedace0d0852f57b4a5b", "size": "...
import pysftp with pysftp.Connection('192.168.8.1', username='root', password='843ea28d5f') as sftp: print sftp.pwd with sftp.cd("/tmp/mnt/mmcblk0p1/"): print sftp.pwd for i in sftp.listdir_attr(): print unicode(i) # with sftp.cd('public'): # temporarily chdir to pu...
{ "content_hash": "5a01e1aabb44343101d158dabf7c4f5a", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 86, "avg_line_length": 40.583333333333336, "alnum_prop": 0.6098562628336756, "repo_name": "weijia/django-local-apps", "id": "b016c38309a1a2843c76a0c52a2b8438cfe89e81", "siz...
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import xml.etree.ElementTree as ET from decimal import Decimal from io import open from builtins import str as text import pytest from satcfe.excecoes import ErroRespostaSATInvalida from satcfe.exce...
{ "content_hash": "de91ba78411afefa90b42024c1277939", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 78, "avg_line_length": 36.07142857142857, "alnum_prop": 0.6906490649064907, "repo_name": "base4sistemas/satcfe", "id": "955ffc7ad2fd51993e97bc1b74a933d536c6eff8", "size": ...
import pyxb_114 import normal as custom import raw.custom as raw_custom import unittest class TestComplex (unittest.TestCase): def setUp (self): xmls = file('test.xml').read() self.instance = custom.CreateFromDocument(xmls) def testRawSubclassHierarchy (self): self.assertTrue(issubcl...
{ "content_hash": "99969f905738d27f9557e565bfe45f68", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 70, "avg_line_length": 39.738461538461536, "alnum_prop": 0.6755710414246999, "repo_name": "msherry/PyXB-1.1.4", "id": "9beebbc50937ae64c4fe8117f13c4c22566f335f", "size": "2...
from builtins import range import numpy as np def get_im2col_indices(x_shape, field_height, field_width, padding=1, stride=1): # First figure out what the size of the output should be N, C, H, W = x_shape assert (H + 2 * padding - field_height) % stride == 0 assert (W + 2 * padding - field_height) % s...
{ "content_hash": "d21708181cdd13c49c2e916603b42598", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 80, "avg_line_length": 38.49122807017544, "alnum_prop": 0.5970829535095715, "repo_name": "zklgame/CatEyeNets", "id": "ab21d5310fdec7c91dfdf672a01f0547fe5e11d4", "size": "21...
import os,sys,glob #rootdir = '..' clawdir = os.path.expandvars('$CLAW') rootdir = clawdir targetfiles = ['*.html','load.js'] oldpat = "http://localhost:50005" newpat = "http://depts.washington.edu/clawpack/clawpack-4.6.2" print "Will change ", oldpat print " to ", newpat print " in all of ", rootdir ans = r...
{ "content_hash": "bfa65e23a7b90a45f2709a4e432c5dba", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 62, "avg_line_length": 25.928571428571427, "alnum_prop": 0.5803489439853077, "repo_name": "clawpack/clawpack-4.x", "id": "632bc39ac62e8968f2b0ac6abdb3f448c1200ed5", "size":...
import RPi.GPIO as GPIO class Button: 'Class for a Button' def __init__(self, pinNumber, actionOverride=None): GPIO.setmode(GPIO.BOARD) GPIO.setup(pinNumber, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.add_event_detect(pinNumber, GPIO.RISING, self.action, 200) self.pinNumber = pinNumber self.__enabled = True...
{ "content_hash": "b76bd9ba20dce27312d6d78928972fa9", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 65, "avg_line_length": 23.4375, "alnum_prop": 0.7, "repo_name": "baconbum/SportsTicker", "id": "b9b07eb375d7ee73f0dde79700374bdeaff6c6dc", "size": "773", "binary": false,...
""" The InteractiveFK is a generic module that use layered 'ribbons' to easily rig anything. Common use cases are tentacles, ropes, props, clothing, tongue, etc. This module is also one of the few that support non-uniform scaling, making it perfect for crazy scenarios. You'll need to provide at least one surface for t...
{ "content_hash": "fca642201d8d1abd12d9f82fd0efae87", "timestamp": "", "source": "github", "line_count": 865, "max_line_length": 145, "avg_line_length": 41.49248554913295, "alnum_prop": 0.6029088072218662, "repo_name": "SqueezeStudioAnimation/omtk", "id": "897b2c62df9480ebea7a92d11a2fc66431123727", ...
""" This module contains the following classes: Context InbandContext BlindContext A context represents a set of conditions required to perform correctly an SQL injection. """ from random import choice class Context: """ Context class This class is used to store every info rel...
{ "content_hash": "b493a28a61695b4baac599c1efac4627", "timestamp": "", "source": "github", "line_count": 381, "max_line_length": 97, "avg_line_length": 24.8005249343832, "alnum_prop": 0.5443962324055456, "repo_name": "sysdream/pysqli", "id": "a2f0e62dfc955d82e937dc8f6340a4f00b55d561", "size": "9479"...
class BaseFriendsProvider(): def fetch_friends(self, user): """abstract method""" raise NotImplementedError("Should have implemented this") def fetch_friend_ids(self, user): """abstract method""" raise NotImplementedError("Should have implemented this")
{ "content_hash": "34a040278d6cc0d646778f4e97f12a97", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 65, "avg_line_length": 32.888888888888886, "alnum_prop": 0.668918918918919, "repo_name": "laplacesdemon/django-social-friends-finder", "id": "7b87067b3e0facd78a734a89eb7d8c821...
import os #import socket import json import time import urllib2 import re import stat import common from instagram.client import InstagramAPI from instagram.bind import InstagramAPIError from instagram.bind import InstagramClientError class BaseCrawler: def __init__(self, configurationsDictionary): self._...
{ "content_hash": "e88d4f1d2297f68ca7f4e41e3a709e91", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 117, "avg_line_length": 43.7239263803681, "alnum_prop": 0.564753753332398, "repo_name": "fghso/instagram-crawler", "id": "a419e002d8711089e4965f716f30d51cbb7a0af6", "size"...
import platform import os file_path = os.path.abspath(__file__)[0:] if (platform.system() == 'Windows'): GEOMETRA_ROOT = os.environ['USERPROFILE'] + '\\.GeometrA' RESOURCE_PATH = file_path[0:file_path.rindex('\\', 0, file_path.rindex('\\', 0, file_path.rindex('\\')))] + '\\resources' else: GEOMETRA_ROOT =...
{ "content_hash": "fdf6d0fd8b6083d939026a8335e3c8a8", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 125, "avg_line_length": 38.625, "alnum_prop": 0.6294498381877023, "repo_name": "NTUTVisualScript/Visual_Script", "id": "92bee4214f6edad54213a330b52b7dc0e7f2ddd4", "size": "...
from flask import Blueprint apiroot = Blueprint("apiroot", __name__) from . import auth, root
{ "content_hash": "95a707f827214a26bcaefc48aeb76446", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 40, "avg_line_length": 19.2, "alnum_prop": 0.71875, "repo_name": "lsst-sqre/ltd-keeper", "id": "b551386da4a2a4987f8e518df36f01400b417205", "size": "96", "binary": false, ...
import pyrax from raxas.core_plugins.base import PluginBase from datetime import datetime, timedelta import logging from pyrax.exceptions import NotFound class Raxclb(PluginBase): """ Rackspace cloud load balancer plugin. """ def __init__(self, scaling_group): super(Raxclb, self).__init__(scalin...
{ "content_hash": "4b596ec03cdeebfabfcd0d208c1a1d7e", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 86, "avg_line_length": 33.160377358490564, "alnum_prop": 0.5644381223328592, "repo_name": "boxidau/rax-autoscaler", "id": "5ba921f930c8f4e47b8d274ce3f61ba723939c05", "size...
from _external import * from boost import * boost_gil = HeaderChecker( 'boost_gil', ['boost/gil/gil_all.hpp'], 'c++', dependencies=[boost] )
{ "content_hash": "efd32daf3c1313dd7c4f0e84e7162fde", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 73, "avg_line_length": 33.8, "alnum_prop": 0.5739644970414202, "repo_name": "tuttleofx/sconsProject", "id": "f1b27ba2d427f33fa1103b23f14d3f95c0dc357c", "size": "169", "bin...
import logging from django_openid_auth.views import login_begin as django_login_begin, login_complete from desktop.lib.django_util import render from django.core import urlresolvers from django.conf import settings from django.shortcuts import render_to_response from django.template import RequestContext import libo...
{ "content_hash": "68f4a205d59bb1d8af02b2eb4c63d797", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 104, "avg_line_length": 32.92857142857143, "alnum_prop": 0.7368040491684743, "repo_name": "todaychi/hue", "id": "1e2ddd5f1c957bc9ea082fe3a5fd6aa945e7eae5", "size": "2175", ...
import random inclusive_range = (1, 100) print("Guess my target number that is between %i and %i (inclusive).\n" % inclusive_range) @@ begin question get_random_number @@ points: 10 @@ time: 1 minute target = random.randint(*inclusive_range) @@ end question answer, i = None, 0 while answer != target: i += 1 ...
{ "content_hash": "c2ee01f127bab2ca7da8b553edb4028e", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 90, "avg_line_length": 24.930232558139537, "alnum_prop": 0.6268656716417911, "repo_name": "RaphaelArkadyMeyer/LiveCoding", "id": "d421976df722174b4254cc89083b064a3435e579", ...
from argparse import ArgumentParser from sklearn.feature_extraction import DictVectorizer from sklearn.linear_model import LogisticRegression from sklearn import cross_validation import json import sys def q_to_fdict(q): fdict = {} for lat in q['LAT']: if (lat['type'] != "WordnetLAT"): fdic...
{ "content_hash": "be43ba880d04cf112d5fde5b1c35ff20", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 96, "avg_line_length": 39.12068965517241, "alnum_prop": 0.6632877919788454, "repo_name": "vineetk1/yodaqa", "id": "e2c35f47a1e40c9165b018b2ec979d75851ed391", "size": "3448"...
""" Django settings for helloworld project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
{ "content_hash": "921933b995e25257e536da71500346fa", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 71, "avg_line_length": 25.433734939759034, "alnum_prop": 0.7280909521553766, "repo_name": "JianMingZhuo/WSGIServer", "id": "e4780735f595786ba47664fd791fc96487c5e32a", "size...
"""fix altitude trigger Revision ID: 9a9f4971edcd Revises: 7471f51011c8 Create Date: 2021-11-30 14:48:23.458154 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '9a9f4971edcd' down_revision = '7471f51011c8' branch_labels = None depends_on = None def upgrade():...
{ "content_hash": "20f14cec53c87a8debed3f02c409339e", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 164, "avg_line_length": 44.4639175257732, "alnum_prop": 0.6121029445861349, "repo_name": "PnEcrins/GeoNature", "id": "1e2d4b0cd2aaaca541e26f17c4a4534761f43e81", "size": "43...
import os.path import os import logging import hashlib import json import datetime from pytz import timezone import iso8601 import threading import queue import xlsxwriter import sys log = logging.getLogger(__name__) time_zone = timezone(os.getenv('TZ', "America/New_York")) class Inventory: def __init__(self, p...
{ "content_hash": "a946d777422004da3c970d59ea1371a7", "timestamp": "", "source": "github", "line_count": 423, "max_line_length": 123, "avg_line_length": 43.22458628841608, "alnum_prop": 0.6137606650623496, "repo_name": "gwu-libraries/inventory", "id": "c6c74162c401de0ca71b86c93f2832d416dbdc72", "siz...
from cStringIO import StringIO import jsmin import os.path import re import sys def main(argv): if len(argv) < 3: print('usage: %s input_file imports_dir output_file no_minify' % argv[0]) return 1 input_file_name = argv[1] imports_dir = argv[2] output_file_name = argv[3] no_mini...
{ "content_hash": "3ecb95dc68045a9e95032fdd45b4a295", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 91, "avg_line_length": 33.280701754385966, "alnum_prop": 0.5998945703742752, "repo_name": "espadrine/opera", "id": "b65c35019032b3ca8a269c4e77967823bf30f2bd", "size": "3597...
from distutils.core import setup setup( name='Logentries', version='0.7', author='Mark Lacomber', author_email='marklacomber@gmail.com', packages=['logentries'], scripts=[], url='http://pypi.python.org/pypi/Logentries/', license='LICENSE.txt', description='Python Logger plugin to se...
{ "content_hash": "b8ccbd789ec6316d98d2db7b301a0279", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 66, "avg_line_length": 26.058823529411764, "alnum_prop": 0.6455981941309256, "repo_name": "siniar1990/le_python", "id": "09fe454f430ceb68015c8d210dad50b0cdf1a1ea", "size": ...
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 7, transform = "Quantization", sigma = 0.0, exog_count = 0, ar_order = 12);
{ "content_hash": "9b1fc425282fb087c055f1220a85a1a1", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 166, "avg_line_length": 38, "alnum_prop": 0.706766917293233, "repo_name": "antoinecarme/pyaf", "id": "4608492efa1b7c5ce0ad13a217bfd24ff249a0eb", "size": "266", "binary": f...
""" test/integration ~~~~~~~~~~~~~~~~ This file defines integration-type tests for hyper. These are still not fully hitting the network, so that's alright. """ import requests import threading import hyper import hyper.http11.connection import pytest from hyper.compat import ssl from hyper.contrib import HTTP20Adapter...
{ "content_hash": "c52d7d084702fa8d37bf7713f774c07d", "timestamp": "", "source": "github", "line_count": 623, "max_line_length": 114, "avg_line_length": 29.447833065810595, "alnum_prop": 0.5609942221737708, "repo_name": "masaori335/hyper", "id": "89886e813be37bb2e4fa4a6265ffc33700337d78", "size": "1...
from copy import deepcopy import json # django imports from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.http import HttpResponse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django....
{ "content_hash": "c0199f8358784635ed41587abe559b00", "timestamp": "", "source": "github", "line_count": 516, "max_line_length": 115, "avg_line_length": 40.560077519379846, "alnum_prop": 0.655788618663099, "repo_name": "leadbrick/django-lfs", "id": "62cbef3ebea9199fbaf418e48d687380859fd21f", "size":...
""" Building and world design commands """ from django.conf import settings from src.objects.models import ObjectDB, ObjAttribute from src.players.models import PlayerAttribute from src.utils import create, utils, debug from src.utils.ansi import raw from src.commands.default.muxcommand import MuxCommand from src.com...
{ "content_hash": "7b3f8b34947f2d60ce016238f53ee2b9", "timestamp": "", "source": "github", "line_count": 2031, "max_line_length": 153, "avg_line_length": 38.32299359921221, "alnum_prop": 0.5459824755248349, "repo_name": "YourCyborg/Sun-RPI", "id": "dcbba718d29467ab31a52fa622c6eb04400bf1cd", "size": ...
import collections import random import threading import time import weakref import sqlalchemy as tsa from sqlalchemy import event from sqlalchemy import pool from sqlalchemy import select from sqlalchemy import testing from sqlalchemy.testing import assert_raises from sqlalchemy.testing import assert_raises_context_o...
{ "content_hash": "fa43634bf033e5bc7e0e21edefc757cb", "timestamp": "", "source": "github", "line_count": 1955, "max_line_length": 79, "avg_line_length": 27.90843989769821, "alnum_prop": 0.5459210791591064, "repo_name": "graingert/sqlalchemy", "id": "72e0fa1865a53355ce9ca927ef016156a3b37acb", "size":...
""" .. module:: layer :platform: Windows, Linux :synopsis: Class that contians feature service layer information. .. moduleauthor:: Esri """ from .._abstract import abstract from ..security import security import types from ..common import filters from ..common.geometry import SpatialReference from ..common.g...
{ "content_hash": "be51c3dc6266e7b422bb92ab84fb3938", "timestamp": "", "source": "github", "line_count": 1258, "max_line_length": 105, "avg_line_length": 43.29570747217806, "alnum_prop": 0.48219072448867184, "repo_name": "jgravois/ArcREST", "id": "03e607e17dfbd28c61d966b7b784794930970819", "size": "...
"""This example creates a mobile creative asset in a given advertiser. Currently only gif, jpg, jpeg, png and wbmp files are supported as mobile assets. To create an advertiser, run create_advertiser.py. Tags: creative.saveCreativeAsset """ __author__ = 'api.jdilallo@gmail.com (Joseph DiLallo)' import base64 import ...
{ "content_hash": "c7cbdbd534a25efcdea22654f307e603", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 80, "avg_line_length": 30.352941176470587, "alnum_prop": 0.6989664082687338, "repo_name": "lociii/googleads-python-lib", "id": "f93696bcf35c109411309f0f92b490bedeb9ca43", "...
""" Backdoc is a tool for backbone-like documentation generation. Backdoc main goal is to help to generate one page documentation from one markdown source file. https://github.com/chibisov/backdoc """ import sys import argparse from markdown2 import Markdown template_html = open('./template.html', 'r').read() PY3 ...
{ "content_hash": "c4e2b274b8447a7b213c9264dd3687f3", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 113, "avg_line_length": 30.376344086021504, "alnum_prop": 0.5805309734513274, "repo_name": "chibisov/backdoc", "id": "6224717397b2064173dd8ebd7f6d6945b3e65204", "size": "28...
from django.utils.translation import ugettext_lazy as _, string_concat from django.forms.fields import CharField from django.core.exceptions import ValidationError from phonenumber_field.validators import validate_international_phonenumber from phonenumber_field.phonenumber import to_python from phonenumber_field.widge...
{ "content_hash": "2720c980145d30d876354ba920cf7845", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 87, "avg_line_length": 39.541666666666664, "alnum_prop": 0.7017913593256059, "repo_name": "DjangoAdminHackers/django-phonenumber-field", "id": "949526cd9c278bcf17559a5b3fca82...
import base64 import re from pywps import xml_util as etree from pywps.app.Common import Metadata from pywps.exceptions import InvalidParameterValue from pywps.inout.formats import Format from pywps.inout import basic from copy import deepcopy from pywps.validator.mode import MODE from pywps.inout.literaltypes import ...
{ "content_hash": "1e988e6f6912a50dbe27eb00acb0eaec", "timestamp": "", "source": "github", "line_count": 387, "max_line_length": 120, "avg_line_length": 40.82945736434109, "alnum_prop": 0.5656604012404278, "repo_name": "geopython/pywps", "id": "eb5b1535e0d5eaeae2dee1ab95b25ecf2ac017ba", "size": "160...
from oslo_log import log as logging from oslo_utils import excutils from cinder import exception from cinder.i18n import _ from cinder.volume.drivers.huawei import constants from cinder.volume.drivers.huawei import huawei_utils LOG = logging.getLogger(__name__) class SmartQos(object): def __init__(self, client)...
{ "content_hash": "0c53128316922f19a67fa5f0e23d4cb0", "timestamp": "", "source": "github", "line_count": 146, "max_line_length": 79, "avg_line_length": 36.23287671232877, "alnum_prop": 0.5495274102079395, "repo_name": "potsmaster/cinder", "id": "fd408d7b5441dee529cb1f0e970e91eee6ffea15", "size": "59...
from . import static_pbkdf2 from . import per_team from . import nonce from . import regex _Validators = { 'static_pbkdf2': static_pbkdf2.StaticPBKDF2Validator, 'static_pbkdf2_ci': static_pbkdf2.CaseStaticPBKDF2Validator, 'per_team': per_team.PerTeamValidator, 'nonce_166432': nonce.Nonc...
{ "content_hash": "317bc68866b520ed90686c8439bd7b3e", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 69, "avg_line_length": 25.52173913043478, "alnum_prop": 0.6303236797274276, "repo_name": "google/ctfscoreboard", "id": "816411ddcfe2c0b7515e4d6a0c5fda5115cd7a76", "size": "...
""" Word Embedding Module @author: Ruchika Chhabra """ #!/usr/bin/python import csv import gensim import numpy import sys import re import operator class WordEmbedding(): ''' This class has the following functionality: 1. Reads the input text file, containing sentences to be clustered. 2. Loads the word2vec pre...
{ "content_hash": "6906b282c66a9340a1a20732fdba81af", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 97, "avg_line_length": 33.16304347826087, "alnum_prop": 0.6971484759095379, "repo_name": "Ruchi2507/Text-Clustering", "id": "e97cbe0419b05fbc5c34744e0736496c016fd464", "siz...
from django.urls import reverse def test_article_list(admin_client, article): response = admin_client.get(reverse('articles:list')) assert response.status_code == 200 list_items = response.context['list_items'][0]['fields'] item_dict = {} for item in list_items: try: field = it...
{ "content_hash": "7528e21ff54d4e1ab82b1b85f2394032", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 60, "avg_line_length": 30.772727272727273, "alnum_prop": 0.5923190546528804, "repo_name": "sanoma/django-arctic", "id": "e70eac949230208944d2fd87117edcc3459a8d30", "size": ...
from __future__ import unicode_literals import asyncore from email.mime.text import MIMEText import os import shutil import smtpd import sys import tempfile import threading from smtplib import SMTPException from ssl import SSLError from django.core import mail from django.core.mail import (EmailMessage, mail_admins,...
{ "content_hash": "2ec9e28c2141c41ae610a18c7453bc12", "timestamp": "", "source": "github", "line_count": 985, "max_line_length": 216, "avg_line_length": 45.79593908629442, "alnum_prop": 0.6352390875435058, "repo_name": "deployed/django", "id": "935508aa167318ba35230263bae9aa9958ba1212", "size": "451...
from setuptools import setup, find_packages import owscapable from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): ...
{ "content_hash": "a12a7349d259e30e1a17a41087bf3bfd", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 99, "avg_line_length": 33.851063829787236, "alnum_prop": 0.6373350094280327, "repo_name": "b-cube/OwsCapable", "id": "c49b385db0f48151380fe50a9a4dcaa6a04d3044", "size": "15...
from django import template from testpro.forecast.weather import Weather from testpro.forecast.models import Forecast from django.core.cache import cache from django.conf import settings register = template.Library() def get_condision(): f = Forecast.objects.get(id=1) is_cached = "false" ws = cache.get('...
{ "content_hash": "678d2c9c5a8055e0992523d856d16da8", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 103, "avg_line_length": 29.045454545454547, "alnum_prop": 0.6885758998435054, "repo_name": "blampe/M2M", "id": "9867c1cbede9c25152b6082b005affb2b9cd53a2", "size": "639", ...
import itertools from flask_sqlalchemy import SQLAlchemy from sqlalchemy.sql.expression import cast from sqlalchemy.sql.expression import desc from sqlalchemy.sql.expression import case from sqlalchemy import text from time import time, localtime, strftime, mktime, strptime, gmtime from distutils.version import LooseVe...
{ "content_hash": "0aace72ad0c3b82c498be8c1dffb389c", "timestamp": "", "source": "github", "line_count": 614, "max_line_length": 190, "avg_line_length": 39.229641693811075, "alnum_prop": 0.5870386515547806, "repo_name": "alexjch/telemetrics-backend", "id": "88eec7a80402e7c7731e7d1aeeae7ee0454c83f9", ...
from setuptools import setup, find_packages VERSION = '1.2.12' setup(name='BitEx', version=VERSION, author='Nils Diefenbach', author_email='23okrs20+pypi@mykolab.com', url="https://github.com/nlsdfnbch/bitex.git", test_suite='nose.collector', tests_require=['nose'], packages=find_packages(exc...
{ "content_hash": "913a141eb8171b72c833a1a6ecc2eb89", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 84, "avg_line_length": 44.2, "alnum_prop": 0.6485671191553545, "repo_name": "nlsdfnbch/bitex-crawler", "id": "99ca51c9d546ffe1e5a495587e6ac8c5ed7f8a24", "size": "663", "b...
""" BVT tests for Service offerings""" #Import Local Modules import marvin from marvin.cloudstackTestCase import * from marvin.cloudstackAPI import * from marvin.integration.lib.utils import isAlmostEqual from marvin.integration.lib.base import * from marvin.integration.lib.common import * from nose.plugins.attrib imp...
{ "content_hash": "275c5ec62e1b4493c996bf18deae3b6a", "timestamp": "", "source": "github", "line_count": 425, "max_line_length": 96, "avg_line_length": 35.82588235294118, "alnum_prop": 0.5113621437015631, "repo_name": "mufaddalq/cloudstack-datera-driver", "id": "22273d766e47dc1fdd135bc311ce608713e6aab...
from piprng import PiPrng class TickATackGame(object): EMPTY = ' ' PLAYERS = ['P', 'Q'] DEBUG = False def __init__(self, player_start=0): self.player_char = self.EMPTY self.computer_char = self.EMPTY self.prng = PiPrng() self.player_prng = PiPrng(player_start) self.scores = {'player': 0, 'computer': 0...
{ "content_hash": "b54abfa2efe374dedb43531675f12f0a", "timestamp": "", "source": "github", "line_count": 193, "max_line_length": 118, "avg_line_length": 27.989637305699482, "alnum_prop": 0.6047760088855979, "repo_name": "f0rki/cb-multios", "id": "8223e303d2e1f1472fbe6e67c4e38c67b1cc8270", "size": "6...