text
stringlengths
4
1.02M
meta
dict
''' Created on Apr 15, 2015 Description: This will help to plot SV using Genome Diagram from bio python @author: Ronak H Shah ''' from Bio.SeqFeature import SeqFeature, FeatureLocation from Bio.Graphics import GenomeDiagram from reportlab.lib.colors import red, grey, orange, green, brown, blue, lightblue, purple import...
{ "content_hash": "92818f3f8f20180f9e76b4a6c5b35d4c", "timestamp": "", "source": "github", "line_count": 421, "max_line_length": 143, "avg_line_length": 42.612826603325416, "alnum_prop": 0.5326644370122631, "repo_name": "rhshah/iAnnotateSV", "id": "8b831c28daff1ef51edecb406f1d22e1543d9151", "size": ...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['Lag1Trend'] , ['BestCycle'] , ['SVR'] );
{ "content_hash": "25c6733bfb1a54b8b703b5494c2e9c4f", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 80, "avg_line_length": 38.25, "alnum_prop": 0.7058823529411765, "repo_name": "antoinecarme/pyaf", "id": "cd26471a56bb4bb2e3525041b02e59ec6679b7d1", "size": "153", "binary"...
import font def status_wordlist(location, wlist): return font.color('ciano')+'\nLoaded '+font.color('bold')+location+font.color('end')\ +font.color('ciano')+' wordlist with '+font.color('bold')+str(len(wlist))+font.color('end')\ +font.color('ciano')+' item(s)\n'+font.color('end') def start_scan(domain): text = f...
{ "content_hash": "96b11444388ab8de2a33c7b5ccc80b22", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 95, "avg_line_length": 34.729729729729726, "alnum_prop": 0.5782101167315176, "repo_name": "rajeshmajumdar/TheFatCat", "id": "076e3d6cdca456087c8eb4f51891fe0b372d3fe1", "siz...
from datetime import datetime from flask import current_app, g, url_for from werkzeug.security import check_password_hash, generate_password_hash from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from application import db class User(db.Model): __tablename__ = 'users' id = db.Column(db.In...
{ "content_hash": "d65c754576c9433cc458038c8aa0b442", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 79, "avg_line_length": 37.57534246575342, "alnum_prop": 0.6325191396281443, "repo_name": "andela-lolali/bucketlist_api", "id": "d41d6c924f0a429fd8f3d4dc61577770d7a80634", "...
"""Models representing Call Center API objects""" from __future__ import absolute_import from ..common.models import Item class Call(Item): """An object for retrieving data from and working with an individual call.""" rest_root = '/callcenter/calls/' @property def url(self): return None
{ "content_hash": "52f41b2ce8ae8a1ee5f0314befd200f7", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 81, "avg_line_length": 24.307692307692307, "alnum_prop": 0.6867088607594937, "repo_name": "PerformLine/python-performline-client", "id": "ea6bb35f8be027078bf1424153073a94b335...
from __future__ import division import numpy as np from pysd import functions from pysd import builder ...
{ "content_hash": "aae00510f609642d5eb357795eed81dd", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 64, "avg_line_length": 65, "alnum_prop": 0.26153846153846155, "repo_name": "bpowers/pysd", "id": "0975627af6e3a4cb404244db175905a18db186d9", "size": "455", "binary": false...
import pygame from pygame import * from button import Button from player import Player from scene import Scene import globals import glob import os class PlayerScene(Scene): """Player scene""" def __init__(self, manager_scene): super(PlayerScene, self).__init__(manager_scene) self.bg = Surfac...
{ "content_hash": "a42a32a607c3faa41817a0b71aa42fa6", "timestamp": "", "source": "github", "line_count": 234, "max_line_length": 91, "avg_line_length": 33.427350427350426, "alnum_prop": 0.5698031194068013, "repo_name": "dnlkng/zplayer", "id": "57e50362e777f508e096a23457cad3f1e7627aa1", "size": "7822...
""" Display song currently playing in moc. MOC (music on console) is a console audio player for Linux/Unix designed to be powerful and easy to use. It consists of two parts, a server (moc) and a player/interface (mocp). It supports OGG, WAV, MP3 and other formats. Configuration parameters: button_next: mouse butt...
{ "content_hash": "9fe85acc285c8aab84a8f3dac0a5f88e", "timestamp": "", "source": "github", "line_count": 177, "max_line_length": 78, "avg_line_length": 32.259887005649716, "alnum_prop": 0.5970227670753064, "repo_name": "alexoneill/py3status", "id": "48c91f11d6e8bb173d9ba645141652caef9d2edb", "size":...
__author__ = 'ar (Alexander Kalinovsky)' import glob import os import sys import time import numpy as np import json from keras.backend.tensorflow_backend import set_session import tensorflow as tf import nibabel as nib try: import cPickle as pickle except: import pickle import collections # from collections...
{ "content_hash": "c3e3dac89290dcc92fe97770f41f062f", "timestamp": "", "source": "github", "line_count": 688, "max_line_length": 129, "avg_line_length": 46.60029069767442, "alnum_prop": 0.5700071738248963, "repo_name": "gakarak/BTBDB_ImageAnalysisSubPortal", "id": "0157575e58a02b5fec2688a29dbd4635a9dc...
import unittest import copy from scrapy.http import Headers class HeadersTest(unittest.TestCase): def assertSortedEqual(self, first, second, msg=None): return self.assertEqual(sorted(first), sorted(second), msg) def test_basics(self): h = Headers({'Content-Type': 'text/html', 'Content-Lengt...
{ "content_hash": "cedf853b496e15bf906865b9184384d6", "timestamp": "", "source": "github", "line_count": 155, "max_line_length": 80, "avg_line_length": 39.670967741935485, "alnum_prop": 0.5550496015612295, "repo_name": "pawelmhm/scrapy", "id": "64ff7a73dbfee6a2f84b6380e24fdd637ba69966", "size": "614...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging import os import sys # Note throughout the distinction between the artifact_root (which is where the artifacts are # originally built and where the ca...
{ "content_hash": "401d9481ab3acacc51add883079bcbac", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 114, "avg_line_length": 32.37222222222222, "alnum_prop": 0.7025913849322121, "repo_name": "sameerparekh/pants", "id": "1f7ddc2d8fda2e85adc8e6be2e1f9dc3f438f86f", "size": "...
from __future__ import division, print_function, unicode_literals # This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "s, t 0.49, s, t 0.51, s, t 2.49, s, t 2.51, s, t 2.99, s, t 3.1, s, q" tags = ...
{ "content_hash": "da6f35c884e72a2cdc25727bb32b8304", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 82, "avg_line_length": 28.8, "alnum_prop": 0.6566358024691358, "repo_name": "vyscond/cocos", "id": "d89060ed1834cbf4eb46b135b92e6afde2d1866b", "size": "1296", "binary": f...
import os import math from director.consoleapp import ConsoleApp from director import ioUtils from director import segmentation from director import segmentationroutines from director import applogic from director import visualization as vis from director import roboturdf app = ConsoleApp() # create a view view = ap...
{ "content_hash": "585d4751dd704833d738a6c344270349", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 165, "avg_line_length": 35.4375, "alnum_prop": 0.800705467372134, "repo_name": "patmarion/director", "id": "cb146a65bb33c2ba784a2e860825ab3914d0c5a9", "size": "1701", "bi...
from __future__ import division import gc import os.path import sys import timeit pythoscope_path = os.path.join(os.path.dirname(__file__), os.pardir) sys.path.insert(0, os.path.abspath(pythoscope_path)) from pythoscope.cmdline import init_project from pythoscope.store import get_pickle_path from test.helper import ...
{ "content_hash": "68a2874ebe8fd4f4a1f2990e865079ab", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 113, "avg_line_length": 34.111111111111114, "alnum_prop": 0.6188925081433225, "repo_name": "adamhaapala/pythoscope", "id": "688d810ba4414e9a9cfe6e8fb1e7205fce5a40d3", "size...
from openturns import * TESTPREAMBLE() try: # Create an intance myFunc = NumericalMathFunction("x", "x^2") mySpatialFunc = SpatialFunction(myFunc) print "mySpatialFunc=", mySpatialFunc # Get the input and output description print "mySpatialFunc input description=", mySpatialFunc.getInputDescr...
{ "content_hash": "b816bd1b392fe639b36d974b9c080928", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 83, "avg_line_length": 38.45161290322581, "alnum_prop": 0.7030201342281879, "repo_name": "sofianehaddad/ot-svn", "id": "4d9854a1f50d7f9e9b59033bc092f79bfa4bba09", "size": "...
"""The Normal (Gaussian) distribution class. @@Gaussian """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import math from tensorflow.contrib.framework.python.framework import tensor_util as contrib_tensor_util # pylint: disable=line-too-long from tens...
{ "content_hash": "31ac1a3b29086d92fec57c5971748333", "timestamp": "", "source": "github", "line_count": 183, "max_line_length": 125, "avg_line_length": 34.114754098360656, "alnum_prop": 0.6423193977254525, "repo_name": "peterbraden/tensorflow", "id": "cbb98624d97f639b4b0c47bcfd40335a042c0cf6", "siz...
"""Certificate Authority package certificate request helper module """ __author__ = "P J Kershaw" __date__ = "19/09/12" __copyright__ = "(C) 2012 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revision__ = "$Id$" from ...
{ "content_hash": "672f5786d696991ca0d39fbc7306dbfb", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 86, "avg_line_length": 34.55714285714286, "alnum_prop": 0.5890863993385697, "repo_name": "philipkershaw/CertificateAuthority", "id": "879aff245e64340949635ec99275cab8d7949636...
from django.shortcuts import redirect def index(request): return redirect('/panel')
{ "content_hash": "a4f6884607653a10ced8d0be0bf14388", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 37, "avg_line_length": 22.25, "alnum_prop": 0.7528089887640449, "repo_name": "bilgorajskim/soman", "id": "0ee7e53bac4d2a3af00ba4ec81e9db5a1c773a59", "size": "89", "binary"...
import numpy as np import dill from pathlib import Path from pySDC.helpers.stats_helper import get_sorted from pySDC.core.Collocation import CollBase as Collocation from pySDC.implementations.problem_classes.Battery_2Condensators import battery_2condensators from pySDC.implementations.sweeper_classes.imex_1st_order im...
{ "content_hash": "022959d64c8d45a6f81e7aa0d7d7c223", "timestamp": "", "source": "github", "line_count": 241, "max_line_length": 109, "avg_line_length": 36.22406639004149, "alnum_prop": 0.6406643757159222, "repo_name": "Parallel-in-Time/pySDC", "id": "c41cb8271236f26c8c7c6f827a0a2853e1154c91", "size...
from lib.graphics import * from src.interface.IDrawable import * from src.interface.Color import * class Fence(IDrawable): class DIRECTION(Enum): HORIZONTAL = 0 VERTICAL = 1 def __init__(self, board, player): self.board = board self.player =...
{ "content_hash": "84b1e5795808b75d7e89c65a3a7cd25c", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 132, "avg_line_length": 34, "alnum_prop": 0.6214833759590793, "repo_name": "alainrinder/quoridor.py", "id": "08c758ca17efcf5fe3c32dbaac017454d09afda6", "size": "1656", "b...
""" Proxied API URLs. Served from the same domain docs are served, so they can make use of features that require to have access to their cookies. """ from django.conf.urls import url from readthedocs.analytics.proxied_api import AnalyticsView from readthedocs.api.v2.views.proxied import ProxiedEmbedAPI, ProxiedFoote...
{ "content_hash": "bf2a1232e5159202df321f1bed74c451", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 79, "avg_line_length": 35.095238095238095, "alnum_prop": 0.7530529172320217, "repo_name": "rtfd/readthedocs.org", "id": "2f5346a465dabfa56b5338d9c5cfd3b84cb99463", "size": ...
"""C4 dataset based on Common Crawl.""" import os import gzip import requests from tqdm import tqdm BASE_DOWNLOAD_PATH = "/tmp" _VARIANTS = ["en", "realnewslike", "en.noblocklist", "en.noclean"] _N_SHARDS_PER_SPLIT = { "en": { "train": 1024, "validation": 8 }, "realnewslike": { ...
{ "content_hash": "0fb8ad22a7585c57a5bd78777ffde330", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 161, "avg_line_length": 28.96, "alnum_prop": 0.523135359116022, "repo_name": "tensorflow/tensorrt", "id": "5dcf3b23a75cbd430242c389ebad74b396d720b8", "size": "2896", "bi...
"""Tools for animation. Animation sources are GIFs from disk, which have been made into a PygAnimation [1]_ object. Stateful animations which represent objects, e.g., :class:`Walkabout` represents an :class:`actor.Actor`. Examples of "tools": * functions for creating an animation from a single suface * ...
{ "content_hash": "8558f7f78fffc3b0a328341726211bcc", "timestamp": "", "source": "github", "line_count": 605, "max_line_length": 79, "avg_line_length": 32.236363636363635, "alnum_prop": 0.5722196585140747, "repo_name": "brechin/hypatia", "id": "8ab4294e4f6e6bf3134ba4e17c2ea9b1df44f594", "size": "196...
from shop.models.ordermodel import OrderExtraInfo, Order from shop.util.order import get_order_from_request class ShopAPI(object): """ A base-baseclass for shop APIs. Both payment and shipping backends need some common functions from the shop interface (for example get_order() is useful in both cases...
{ "content_hash": "38c5edff89c0f82b134c47eb6f7b64ae", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 79, "avg_line_length": 37.111111111111114, "alnum_prop": 0.6636726546906188, "repo_name": "bmihelac/django-shop", "id": "f300f8875af5c0d89ce3e26c6bad47b6d2d46ce1", "size": ...
1import sys as s import subprocess as sb from time import time from parsingInfo import parseInfo from actions import userNodeSelectionAct,randomSubSamplingAct,parseList from featuresVector import featuresCreate from misc import mergeList from preformat import process #/!\ The list of samples ID is supposed to be the ...
{ "content_hash": "f90b61d5c086f13276f129a65c1fe4f3", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 138, "avg_line_length": 48.36363636363637, "alnum_prop": 0.6284461152882206, "repo_name": "kuredatan/taxoclassifier", "id": "9256919fad98cb7ba745f4a099d09723c4802381", "siz...
import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy from .._version import VERSION if sys.version_info >= (3, 8): from typing i...
{ "content_hash": "128556ca68c5947dc4d18dfec6920f0f", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 108, "avg_line_length": 53.4, "alnum_prop": 0.7251512532411409, "repo_name": "Azure/azure-sdk-for-python", "id": "5d4d41c05cac63d16919a896dec93f58ed5e5fec", "size": "3939",...
from tastypie.test import ResourceTestCase from mozdns.tests.utils import create_fake_zone, random_label from core.registration.static.models import StaticReg from core.hwadapter.models import HWAdapter from core.group.models import Group from systems.models import ( System, SystemRack, SystemStatus, OperatingSys...
{ "content_hash": "f97e77d624a9f8976c33316101be2a7b", "timestamp": "", "source": "github", "line_count": 233, "max_line_length": 79, "avg_line_length": 38.836909871244636, "alnum_prop": 0.5883523041220025, "repo_name": "rtucker-mozilla/inventory", "id": "fffc68aa14105166000de53b68697f4b781db547", "s...
import ConfigParser import json import logging import os import subprocess import re import time import unittest from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.support.ui import Select from selenium.common.exceptions import UnexpectedAlertPresentException from autot...
{ "content_hash": "b6f9419ec1c9616c4c6c07fe8016f947", "timestamp": "", "source": "github", "line_count": 867, "max_line_length": 117, "avg_line_length": 36.08073817762399, "alnum_prop": 0.5465123713317562, "repo_name": "xiaom-GitHub/openthread", "id": "33384cd77cc747bcd3dee795be003d671c475a18", "siz...
"""Agent-environment training loop based on acme.""" import collections import csv import operator import os import pickle from absl import flags from acme import core from acme.utils import counting from acme.utils import loggers import dm_env from mime.agent import ScriptAgent import numpy as np import tensorflow a...
{ "content_hash": "7895d304c0c53f55f6bdf2eaf267004e", "timestamp": "", "source": "github", "line_count": 575, "max_line_length": 110, "avg_line_length": 39.850434782608694, "alnum_prop": 0.6140350877192983, "repo_name": "google-research/google-research", "id": "5ececab16486438bc9f1dfb7d1a3eb181cadf26b...
import rospy import tf from geometry_msgs.msg import PoseStamped from sensor_msgs.msg import Joy from math import fabs lastData = None def joyChanged(data): global lastData lastData = data # print(data) if __name__ == '__main__': rospy.init_node('publish_pose', anonymous=True) name = rospy.get_pa...
{ "content_hash": "15ea1b3d61f53b111bfa00988b6c198e", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 76, "avg_line_length": 32.854838709677416, "alnum_prop": 0.5915562101129112, "repo_name": "marktsai0316/crazyflie_ros", "id": "96f64d66c9eef231aac6e4cf67ee64a7deedd354", "s...
from setuptools import setup import codecs import os here = os.path.abspath(os.path.dirname(__file__)) def read_file(names, encoding='utf-8'): file_path = os.path.join(here, *names) if encoding: with codecs.open(file_path, encoding=encoding) as f: return f.read() else: with op...
{ "content_hash": "ba8bfc9583d1e30906b6381a3c4e7996", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 72, "avg_line_length": 28.098039215686274, "alnum_prop": 0.6022330774598744, "repo_name": "dovf/matrix-python-sdk", "id": "dc7c8d717db8fa7e06971c0fb04c13088062bcb0", "size"...
"""Maintain moving averages of parameters.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.ops import control_flow_ops from tensorflow.python...
{ "content_hash": "9126bb91abcc95ea3e20ac2fae1dca29", "timestamp": "", "source": "github", "line_count": 517, "max_line_length": 80, "avg_line_length": 41.65570599613153, "alnum_prop": 0.6680906389301634, "repo_name": "dongjoon-hyun/tensorflow", "id": "fc9eb479cc3a0c3fd3dba4de7269b7894d3ec84c", "siz...
import logging from django import template from django.utils.html import mark_safe import cio.conf from cio.pipeline import pipeline from djedi.auth import has_permission from djedi.utils.templates import render_embed register = template.Library() logger = logging.getLogger(__name__) @register.simple_tag(takes_con...
{ "content_hash": "2fbaabdaed5620b2efb1284621d4c4c2", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 75, "avg_line_length": 22.894736842105264, "alnum_prop": 0.6816091954022988, "repo_name": "5monkeys/djedi-cms", "id": "8798839b1eaed7fe6c19fe6e200724e8adfcdd78", "size": "8...
from django.conf.urls.defaults import url, patterns urlpatterns = patterns("symposion.boxes.views", url(r"^([-\w]+)/edit/$", "box_edit", name="box_edit"), )
{ "content_hash": "a6493064498cfc9a771e3b2037039bb6", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 58, "avg_line_length": 27, "alnum_prop": 0.6666666666666666, "repo_name": "djangocon/symposion-2014", "id": "dc57fe6bd7fe5147a39210669f116f9086cd5cc2", "size": "162", "bin...
from tempest.lib.services.identity.v3 import groups_client from tempest.tests.lib import fake_auth_provider from tempest.tests.lib.services import base class TestGroupsClient(base.BaseServiceTest): FAKE_CREATE_GROUP = { 'group': { 'description': 'Tempest Group Description', 'domain...
{ "content_hash": "97758a9c480fb7c78dbed0705e923150", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 71, "avg_line_length": 34.085427135678394, "alnum_prop": 0.5364882795223352, "repo_name": "Tesora/tesora-tempest", "id": "38cf3ae1c271d666a15aac37be7dd3c846d5b5b7", "size"...
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext setup( cmdclass = {'build_ext': build_ext}, ext_modules = [Extension("decoder", ["decoder.pyx"]),] )
{ "content_hash": "1753375b652c7a945735165e69f5a849", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 56, "avg_line_length": 27.5, "alnum_prop": 0.740909090909091, "repo_name": "xiamike/stanford-ctc", "id": "19c47c9790dd97f3f6364a707cf9f3c1f0e2af31", "size": "221", "binary...
from tweepy.mixins import DataMapping, HashableID from tweepy.utils import parse_datetime class List(HashableID, DataMapping): """The list object contains `Twitter Lists`_ metadata describing the referenced List. The List object is the primary object returned in the List lookup endpoint. When requesting a...
{ "content_hash": "6cfb8b3d71522023f7998eb86f58815b", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 88, "avg_line_length": 36.36986301369863, "alnum_prop": 0.6508474576271186, "repo_name": "tweepy/tweepy", "id": "b2a5044246f2b6210fb07e5302defe2a08bf1907", "size": "2731", ...
""" Views for CAVE Language """ from cavelanguage.utils import template from cavelanguage.models import Symbol, Collection, Category, Diagram, Contributor @template('home.html') def home(request): """ Home page. """ return {'location':'home'} @template('symbol_library.html') def symbol_library(reque...
{ "content_hash": "022e8911968b58b62a8e5ca8f8637ee2", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 113, "avg_line_length": 31.621951219512194, "alnum_prop": 0.6702661010412649, "repo_name": "Axilent/cave-language", "id": "84ae2bc2d1c05b49fda643294a7d948cebebf4ca", "size"...
import json import urllib import urlparse import logging import cookielib import dateutil.tz from datetime import datetime from StringIO import StringIO from collections import OrderedDict from twisted.web.client import Agent, CookieAgent, FileBodyProducer from twisted.web.http_headers import Headers from twisted.inte...
{ "content_hash": "a6a5cf793b846b44c62423a72f046e4a", "timestamp": "", "source": "github", "line_count": 184, "max_line_length": 110, "avg_line_length": 31.972826086956523, "alnum_prop": 0.6328403875573687, "repo_name": "mmc-tudelft/billy", "id": "dd2c00185ee5e1e0cb824dbf2ed3618a281b8b06", "size": "...
import argparse from matplotlib import pyplot as plt class Result(): params = {} iterations = [] def __init__(self, lines): info = lines[0].split() self.params = { 'population_size': int(info[0]), 'number_of_tournaments': int(info[1]), 'tournament_siz...
{ "content_hash": "a94736bec3421c0a8a27de264ac2e46d", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 110, "avg_line_length": 30.363636363636363, "alnum_prop": 0.583166999334664, "repo_name": "konradstrack/stochastic-sudoku-solver", "id": "6f44dbeaa8e8820c700b78da780aecdcb07f...
"""Resize images in a folder using imagemagick command line tools. http://hakanu.net """ import glob import os def main(): print 'Started' images = glob.glob("/home/h/Desktop/all_karikatur_resized/*.jpg") counter = 0 for image in images: print 'Processing: ', image index = image[image.rfind('/') + 1:...
{ "content_hash": "4f343e1fe2cd019d9a7f8b87a074ebd0", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 88, "avg_line_length": 24.304347826086957, "alnum_prop": 0.6243291592128801, "repo_name": "hakanu/scripts", "id": "a9836284221d7bd240a52447bd76b631ea410043", "size": "559",...
from flask import request from weblab.core.wl import weblab_api @weblab_api.route_web('/language/') def language(): accept_language = request.headers.get('Accept-Language') if accept_language is None: return 'var acceptLanguageHeader = null;' else: return 'var acceptLanguageHeader = "%s";' ...
{ "content_hash": "9a2b3889a843574bce7d9ef6accf0d39", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 67, "avg_line_length": 30.818181818181817, "alnum_prop": 0.6991150442477876, "repo_name": "zstars/weblabdeusto", "id": "800db39b8e955667dbd9626031c036a2f30538aa", "size": "...
from setuptools import setup, find_packages version = '1.0' setup( name='tn.plonehtmlimagecache', version=version, description='', classifiers=[ "Framework :: Plone", "Programming Language :: Python", ], keywords='', author='TN Tecnologia e Negocios', author_email='ed@t...
{ "content_hash": "307359e80e6efd8bc8a264ec381b2041", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 49, "avg_line_length": 22.88095238095238, "alnum_prop": 0.554630593132154, "repo_name": "tecnologiaenegocios/tn.plonehtmlimagecache", "id": "f12e623665fe15791b0d552bf26d1a9ea...
__author__ = 'innopath'
{ "content_hash": "fcea760b40a8f9fe5f38fe6f6938dc46", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 23, "avg_line_length": 24, "alnum_prop": 0.5833333333333334, "repo_name": "xinquanking/AndJoin", "id": "03d774b81c4755ff04d6fd338a72d456e10398f9", "size": "24", "binary": ...
"""A specfile interface. Used mainly by transformer and tests to represent a conventional specfile as a structure of sections. """ try: from functools import reduce except ImportError: pass # we're on Python 2 => ok import re from spec2scl import settings class Specfile(object): """An specfile interf...
{ "content_hash": "ed603780743af8c6532ede539b111075", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 93, "avg_line_length": 34.016666666666666, "alnum_prop": 0.6080352768250857, "repo_name": "sclorg/spec2scl", "id": "5fe5e7324fe391fcb879e7d9647cc4da58ef6e2c", "size": "2041...
from fuel_agent import errors from fuel_agent.openstack.common import log as logging from fuel_agent.utils import utils LOG = logging.getLogger(__name__) def pvdisplay(): # unit m means MiB (power of 2) output = utils.execute( 'pvdisplay', '-C', '--noheading', '--units', 'm',...
{ "content_hash": "4c0bcf53c331d047de6f7538698690b8", "timestamp": "", "source": "github", "line_count": 225, "max_line_length": 76, "avg_line_length": 32.693333333333335, "alnum_prop": 0.5710984230560087, "repo_name": "zhaochao/fuel-web", "id": "8dc2a2911311c48e3ddb9c9f639561048a5ecb69", "size": "7...
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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, modify, merg...
{ "content_hash": "6d3862ea09b384986574a0c9fe03612b", "timestamp": "", "source": "github", "line_count": 745, "max_line_length": 120, "avg_line_length": 28.94228187919463, "alnum_prop": 0.5781003617475188, "repo_name": "rapptz/discord.py", "id": "3465250a1a09d37d1b6d3049cce8cbea5eecb0c0", "size": "2...
"""This example updates the given client user's status.""" import argparse import pprint import os import sys sys.path.insert(0, os.path.abspath('..')) from googleapiclient.errors import HttpError import samples_util DEFAULT_ACCOUNT_ID = 'ENTER_ACCOUNT_ID_HERE' DEFAULT_CLIENT_BUYER_ID = 'ENTER_CLIENT_BUYER_ID_HER...
{ "content_hash": "64e787498729aa38f251444f3419a282", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 75, "avg_line_length": 33.84057971014493, "alnum_prop": 0.6625267665952891, "repo_name": "googleads/googleads-adxbuyer-examples", "id": "4bc45bd3bb393e2c2028a8a01ad3becc3bd42...
from __future__ import unicode_literals, absolute_import from os.path import abspath, join, dirname from preggy import expect from thumbor.context import ServerParameters, RequestParameters from thumbor.config import Config from thumbor.engines.gif import Engine from thumbor.utils import which from thumbor.importer i...
{ "content_hash": "85f8e9a914d3fb5b738361b48c93e896", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 88, "avg_line_length": 34.03921568627451, "alnum_prop": 0.6287442396313364, "repo_name": "okor/thumbor", "id": "c0c8430439afbb0b9655cb6cf3b44b36f2b2be27", "size": "3724", ...
from __future__ import absolute_import, division, print_function, unicode_literals from .common import BaseTest, TestConfig as Config class Kinesis(BaseTest): def test_stream_query(self): factory = self.replay_flight_data("test_kinesis_stream_query") p = self.load_policy( { ...
{ "content_hash": "2a9514fabaa4b05708058ea2d0e33f57", "timestamp": "", "source": "github", "line_count": 222, "max_line_length": 163, "avg_line_length": 41.16216216216216, "alnum_prop": 0.5383015977237907, "repo_name": "Sutto/cloud-custodian", "id": "e8259895a72382b8cef2e84d889b91dde6479b7c", "size"...
import struct from collections import OrderedDict import numpy as np import scipy.stats REVISION_STATEPOINT = 12 filter_types = {1: 'universe', 2: 'material', 3: 'cell', 4: 'cellborn', 5: 'surface', 6: 'mesh', 7: 'energyin', 8: 'energyout'} score_types = {-1: 'flux', -2: 'total', ...
{ "content_hash": "bb50cf274376ad33f8a0c328fb53ecb8", "timestamp": "", "source": "github", "line_count": 631, "max_line_length": 85, "avg_line_length": 35.78605388272583, "alnum_prop": 0.49112085381515436, "repo_name": "shenqicang/openmc", "id": "5a9764d92b78cc70cda36cb6d6d31ca48e99f2aa", "size": "2...
__author__ = "Peter Shipley" __license__ = "BSD" # Simple example # # This script listens for Upnp advertisements from any local ISY # unit and prints results # from ISY.IsyDiscover import isy_discover def list_units(): fmt = "%-25s %-25s %s" print(fmt % ("Device Name", "Device Number", "URL Address" ...
{ "content_hash": "3b75c93e6e84f022a59245a670efdded", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 76, "avg_line_length": 23.464285714285715, "alnum_prop": 0.5920852359208524, "repo_name": "fxstein/ISYlib-python", "id": "16e9b2003261b116411fb8d3d46f27dd9d15e123", "size":...
__author__ = 'ar' import os import sys import glob import fnmatch import numpy as np import json import lmdb import matplotlib.pyplot as plt from datetime import datetime import copy import shutil import skimage.io as skio from dbhelpers import DBImageImportReader, DBImageImportReaderFromDir, DBImageImportReaderFr...
{ "content_hash": "a2d9aa237a24a48134ce0913e54f8f10", "timestamp": "", "source": "github", "line_count": 224, "max_line_length": 118, "avg_line_length": 41.08482142857143, "alnum_prop": 0.5598174508312507, "repo_name": "SummaLabs/DLS", "id": "64e7a98f1729663d5d0ea644f1a76aa747664588", "size": "9245"...
""" Simulated annealing fitting routine. Complete rebuild of the original SA fitting module written by Mark A. Zentile, now using lmfit Last updated 2018-07-12 MAZ """ # py 2.7 compatibility from __future__ import (division, print_function, absolute_import) import numpy as np import matplotlib.pyplot as plt import...
{ "content_hash": "6a5b8c63f396b184fcd23fc8bfed0a7d", "timestamp": "", "source": "github", "line_count": 650, "max_line_length": 153, "avg_line_length": 31.435384615384617, "alnum_prop": 0.653746390642588, "repo_name": "jameskeaveney/ElecSus", "id": "8bed4c5d7a0017b31430e73a782c9be7c365770a", "size"...
from oslo.concurrency import lockutils from oslo.config import cfg import stevedore from ironic.common import exception dhcp_provider_opts = [ cfg.StrOpt('dhcp_provider', default='neutron', help='DHCP provider to use. "neutron" uses Neutron, and ' '"none" uses a no-op...
{ "content_hash": "fad1fd515624fad00b4eb89d6c631b54", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 79, "avg_line_length": 32.670731707317074, "alnum_prop": 0.561030235162374, "repo_name": "Tehsmash/ironic", "id": "c6848c6d01dbc78e0df7ed675fa8c6d7e31777b1", "size": "3287"...
from examples_common import * from connectors import * # default configuration # DEFAULT_JDBC_CONFIG = JdbcConnectorConfig(host='localhost', port='5555', db_name='db_samples', user_name='test',...
{ "content_hash": "162923f8084a51add4e3a8d922007401", "timestamp": "", "source": "github", "line_count": 200, "max_line_length": 123, "avg_line_length": 54.065, "alnum_prop": 0.4893184130213632, "repo_name": "CogStack/cogstack", "id": "504ece59bf755c9d6c654962fde8db37e5273867", "size": "10832", "b...
version_info = (2, 4, 0, 'final', 0) def _get_version(): " Returns a PEP 386-compliant version number from version_info. " assert len(version_info) == 5 assert version_info[3] in ('alpha', 'beta', 'rc', 'final') parts = 2 if version_info[2] == 0 else 3 main = '.'.join(map(str, version_info...
{ "content_hash": "ef4689a678838e4cfbac6eae5303dcb7", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 69, "avg_line_length": 33.666666666666664, "alnum_prop": 0.5502121640735502, "repo_name": "brian-yang/mozillians", "id": "65edeeddbe2024b9e9a9513b5ec0deaec794cfdb", "size":...
from osp_pipeline.core.models import FilesModel from pyspark.sql import types as T from .core import MARCModel, MARCDatafield from ..sources import marc from ...core.counters import Counters class RawMARCRecord(FilesModel): schema = T.StructType([ T.StructField('marc_id', T.StringType(), nullable=False),...
{ "content_hash": "d27b8bea271a497ba901ce20b9791e57", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 75, "avg_line_length": 37.46875, "alnum_prop": 0.5757575757575758, "repo_name": "opensyllabus/osp-pipeline", "id": "94185d639c832caf9b74c521b21de6e603d4619c", "size": "3597...
from __future__ import print_function from __future__ import absolute_import from builtins import str from builtins import next from builtins import object import os, codecs, re from .helpers import save_json, load_json from .content import Content class Position(object): """ more than just a number of an item...
{ "content_hash": "2c0dc8c62c2ccf03d20e28eca69ac856", "timestamp": "", "source": "github", "line_count": 499, "max_line_length": 94, "avg_line_length": 30.064128256513026, "alnum_prop": 0.5736568457538995, "repo_name": "charlesbrandt/medley", "id": "93abd7e0dae7327195c3bfabd4492e3106ebfbc6", "size":...
import datetime class TimeBucket: def __init__(self,start_time,stop_time, datetime_format = None): if datetime_format is not None: self.datetime_format = datetime_format else: self.datetime_format = "%Y%m%d%H%M%S" if isinstance(start_time,datetime.datetime)...
{ "content_hash": "3a3b8b5fa65104be8aabbae1903cbf48", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 137, "avg_line_length": 37.715384615384615, "alnum_prop": 0.5873954721599021, "repo_name": "compston/TAP-Workshop", "id": "3615b2abaded980bedcd7450550499645b025bd4", "size...
""" Pushover platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.pushover/ """ import logging from homeassistant.components.notify import ( ATTR_TITLE, ATTR_TARGET, ATTR_DATA, DOMAIN, BaseNotificationService) from ho...
{ "content_hash": "60d301dbb60836b3159dfc1214c28bd1", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 74, "avg_line_length": 31.850746268656717, "alnum_prop": 0.626991565135895, "repo_name": "Julian/home-assistant", "id": "45a331c35857a7125fd1c6be8146e7d68064506f", "size": ...
from io import BytesIO from glob import glob from os.path import join, exists, dirname, abspath from subprocess import call from urllib.request import urlopen from zipfile import ZipFile import os import shutil JASMINE_REPORTER_URL='https://github.com/larrymyers/jasmine-reporters/zipball/0.2.1' BASE = abspath(dirname...
{ "content_hash": "0469e558577b03e29cb1744e03636d64", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 101, "avg_line_length": 28.11111111111111, "alnum_prop": 0.6613965744400527, "repo_name": "HelioGuilherme66/robotframework", "id": "a470cd84483a6e98e22973c26f642d54a0da45d4",...
from __future__ import division import numpy as np from chainercv.utils.mask.mask_to_bbox import mask_to_bbox from chainercv.visualizations.colormap import voc_colormap from chainercv.visualizations import vis_image def vis_instance_segmentation( img, mask, label=None, score=None, label_names=None, ...
{ "content_hash": "35a94d39bd2d80d5a6e4ae56274e10c2", "timestamp": "", "source": "github", "line_count": 146, "max_line_length": 77, "avg_line_length": 41.92465753424658, "alnum_prop": 0.596144420846267, "repo_name": "pfnet/chainercv", "id": "c4ed265ed06cf2ff112105288e9a6a15d392b78e", "size": "6121"...
import codecs import ConfigParser import os import sys import RezzMe.config.builder onMacOSX = sys.platform == 'darwin' onLinux = sys.platform == 'linux2' onWindows = sys.platform == 'win32' # check prereqs if not os.path.exists('rezzme.cfg'): print ''' oops...you need to create rezzme.cfg first! copy rezzme.cf...
{ "content_hash": "c263d43c4a89784d66349c67913dc344", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 65, "avg_line_length": 21.25, "alnum_prop": 0.6980392156862745, "repo_name": "dirkhusemann/rezzme", "id": "7a04bda4e1dbb16b1e38e3d0801160a596ad9bb2", "size": "810", "bina...
from libfcg.fcg import FCG from oslo.config import cfg from virtman.utils import singleton from virtman.utils import rootwrap fcg_opts = [ cfg.StrOpt('fcg_name', default='fcg', help='The name of the Flashcache Group'), cfg.ListOpt('fcg_ssds', default=['/dev/loop0'...
{ "content_hash": "785ff86aa272b81201e94261d67aeb8e", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 77, "avg_line_length": 25.24, "alnum_prop": 0.5784469096671949, "repo_name": "vmthunder/virtman", "id": "efafea50f5a2545eeecb882af8d798d796765bd3", "size": "1262", "binar...
""" SLA (Service-level agreement) is set of details for determining compliance with contracted values such as maximum error rate or minimum response time. """ from rally.common.i18n import _ from rally.common import streaming_algorithms from rally import consts from rally.task import sla @sla.configure(name="outlier...
{ "content_hash": "a3d3afc47c8bb0ecc75a65b1cfbbc8f1", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 79, "avg_line_length": 41.04210526315789, "alnum_prop": 0.6245191074634522, "repo_name": "vganapath/rally", "id": "40ae37dfa93fc13ced46a070b526742be05a5a52", "size": "4530"...
extensions_list = {"application/andrew-inset":["ez"], "application/applixware":["aw"], "application/atom+xml":["atom"], "application/atomcat+xml":["atomcat"], "application/atomsvc+xml":["atomsvc"], "application/ccxml+xml":["ccxml"], "application/cdmi-capability":["cdmia"], "application/cdmi-container":["cdmic"], "appli...
{ "content_hash": "176c3bb77cf16c319b369d6acb6f9133", "timestamp": "", "source": "github", "line_count": 765, "max_line_length": 107, "avg_line_length": 39.07843137254902, "alnum_prop": 0.6785415621341362, "repo_name": "aidatorajiro/Wiki2Epub", "id": "917704fd689c6fcf6ac8e0ed410b3d44a04a2410", "size...
''' RPC Dispatcher Tests -------------------- ''' import base64 import json import unittest from xml.dom.minidom import parseString from django.core.exceptions import ImproperlyConfigured try: from rpc4django.rpcdispatcher import rpcmethod, RPCMethod, RPCDispatcher except ImproperlyConfigured: # Configure D...
{ "content_hash": "853e029d70879a76cf9dbbae9a484e60", "timestamp": "", "source": "github", "line_count": 169, "max_line_length": 349, "avg_line_length": 37.1301775147929, "alnum_prop": 0.6328286852589642, "repo_name": "angvp/rpc4django", "id": "ae854766c6b2fbe9f04b5554ca0dee68b7d1dec8", "size": "632...
from __future__ import unicode_literals from django.db import migrations import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('questions', '0013_auto_20160505_0905'), ] operations = [ migrations.AlterField( model_name='question', name=...
{ "content_hash": "e09964e2b253b24705b4a5a3c8e4f630", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 57, "avg_line_length": 21.263157894736842, "alnum_prop": 0.6138613861386139, "repo_name": "watchdogpolska/bliski_publikator", "id": "9bb70e2b40b4506c5be210bf3285bc7b311127df"...
import ReadConfig import Utils from FTModuleClass import * from SIL.LCModel import * from SIL.LCModel.Core.KernelInterfaces import ITsString, ITsStrBldr #-------------------------------------------------------...
{ "content_hash": "07aab958ccdb13e5c2231bed3ed7bcba", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 140, "avg_line_length": 34.588235294117645, "alnum_prop": 0.5625, "repo_name": "rmlockwood/FLExTrans", "id": "02c80407247a87284e44da87c16c0556a5f97bbf", "size": "3250", "...
import httplib as http import itertools from flask import request from modularodm import Q from modularodm.exceptions import NoResultsFound from framework import status from framework.exceptions import HTTPError from framework.flask import redirect # VOL-aware redirect from framework.auth.decorators import must_be_...
{ "content_hash": "988a72acf1d8c346d49d02aebb99e272", "timestamp": "", "source": "github", "line_count": 324, "max_line_length": 166, "avg_line_length": 36.91975308641975, "alnum_prop": 0.6472161845845177, "repo_name": "TomHeatwole/osf.io", "id": "55efe7e91e3a3e224e5bc243eebca81e0c1d7d89", "size": "...
import os try : from setuptools import setup except ImportError : from distutils.core import setup readme = open(os.path.join(os.path.dirname(__file__), 'README'), 'r').read() setup( name='ACIS-pandas', author='Bill Noon', author_email='wn10@cornell.edu', version='0.1.0', url='http://g...
{ "content_hash": "cd2ff1211c1451d45056870a4e7356d0", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 76, "avg_line_length": 26.347826086956523, "alnum_prop": 0.636963696369637, "repo_name": "bnoon/acis-pandas", "id": "9d2652645e2ce9b606d7135d02efc4bb7caab48a", "size": "606...
""" This template script should accept two arguments: the source input filename (which is expected to exist) and the target output filename (expected to be created by this script). """ import sys source = sys.argv[1] target = sys.argv[2]
{ "content_hash": "90e17e8869dc9e0f2e8165b3e42f90ed", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 75, "avg_line_length": 26.555555555555557, "alnum_prop": 0.7531380753138075, "repo_name": "daler/hubward", "id": "65960ce1271dc468feb456d1893fac1c8c49e12e", "size": "262", ...
from oslo_log import log from oslo_utils import excutils from manila.i18n import _LE from manila.share.drivers.netapp.dataontap.client import api as netapp_api from manila.share.drivers.netapp import utils as na_utils LOG = log.getLogger(__name__) class NetAppBaseClient(object): def __init__(self, **kwargs): ...
{ "content_hash": "88a8ce3fc04f4cdc1c3bd8fb590ff164", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 77, "avg_line_length": 34.074074074074076, "alnum_prop": 0.6315217391304347, "repo_name": "weiting-chen/manila", "id": "45e1148aead94dace71c00aad947813f81cf6d82", "size": "...
import logging class BrieLogging: logger = None @staticmethod def initializeLog(): # create logger with 'spam_application' BrieLogging.logger = logging.getLogger('Brie') BrieLogging.logger.setLevel(logging.DEBUG) # create file handler which logs even debug messa...
{ "content_hash": "1858b157e790e808ee35b834b816a0da", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 82, "avg_line_length": 32.86842105263158, "alnum_prop": 0.6261008807045636, "repo_name": "Rbeuque74/brie-aurore", "id": "38deb91c857ab0fb81fb889dfe36ab37ec7ddc31", "size": ...
from conjureup import controllers, juju from conjureup.app_config import app from conjureup.models.provider import load_schema class BaseRegionsController: def __init__(self): # can't just determine these during __init__ because the controller # instance is cached and the BACK button means we can ...
{ "content_hash": "0c99ed690ad36623e79944c47cf3aaf8", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 77, "avg_line_length": 41.40816326530612, "alnum_prop": 0.5914243469689502, "repo_name": "ubuntu/conjure-up", "id": "8672e12589300ead206576fd3f7ebbff771d06ca", "size": "202...
import subprocess import json import math import re import lizard from jinja2 import Environment, FileSystemLoader from xml.dom import minidom from decimal import Decimal from analyzr.settings import CONFIG_PATH, PROJECT_PATH, LAMBDA XML_ILLEGAL = u'([\u0000-\u0008\u000b-\u000c\u000e-\u001f\ufffe-\uffff])|([%s-%s][...
{ "content_hash": "f7e34afa183c053360ea5efbf46c9624", "timestamp": "", "source": "github", "line_count": 535, "max_line_length": 131, "avg_line_length": 28.485981308411215, "alnum_prop": 0.5496062992125984, "repo_name": "frontendphil/analyzr", "id": "fb2baf6b6ff7eba70417004065cdde34e6f8c22c", "size"...
import json import requests import sys import time import datetime def indent(level): retval = "" for i in range(0, level): retval += " " return retval def get_most_recent_test(series): res = requests.get("http://cstar.datastax.com/api/series/{series}/{ts_start}/{ts_end}".format( ...
{ "content_hash": "efee413d49dfac222570e292049730e9", "timestamp": "", "source": "github", "line_count": 172, "max_line_length": 337, "avg_line_length": 46.883720930232556, "alnum_prop": 0.5525793650793651, "repo_name": "mambocab/cstar_perf", "id": "97a32979060a02fcae7dd89f390598388ff94ac7", "size":...
import json import numpy import time import pyspark from pyspark.ml.classification import LogisticRegression as MLLogisticRegression from pyspark.ml.regression import LinearRegression as MLLinearRegression from pyspark.mllib.classification import * from pyspark.mllib.clustering import * from pyspark.mllib.regression i...
{ "content_hash": "b6e7b0a17ff1a17a4130e948c7315886", "timestamp": "", "source": "github", "line_count": 425, "max_line_length": 99, "avg_line_length": 42.80235294117647, "alnum_prop": 0.5754493980539828, "repo_name": "zsxwing/spark-perf", "id": "133d7518e7002eb376ab103e535b9c21657b27fe", "size": "1...
from django.conf import settings from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from .models import Lottery, LotteryParticipant, LotteryTranslation class LotteryTranslationInlineAdmin(admin.StackedInline): verbose_name = _(u'Translation') verbose_name_plural = _(u'Tr...
{ "content_hash": "9f96cd7fa1b8fc7dea5a602d75a18c62", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 67, "avg_line_length": 28.307692307692307, "alnum_prop": 0.7744565217391305, "repo_name": "CasualGaming/studlan", "id": "42a3963d65a8337bd43097470b54fcd318a9e614", "size": ...
import os from paraview import simple # ----------------------------------------------------------------------------- MODULE_PATH = os.path.dirname(os.path.abspath(__file__)) PLUGINS = [ 'parflow.py' ] FULL_PATHS = [ '/Applications/ParaView-5.6.0-1626-g52acf2f741.app/Contents/Plugins/ParFlow.so', ] # -----...
{ "content_hash": "bd65570651d6239f822819dea85f0329", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 84, "avg_line_length": 26.083333333333332, "alnum_prop": 0.4440894568690096, "repo_name": "Kitware/HPCCloud", "id": "1b8e3c325a97cccaf1c8c5f4654e6b07c027e9f1", "size": "626...
__author__ = 'Sergei F. Kliver' import sys import argparse from BCBio import GFF from MACE.Parsers.VCF import CollectionVCF, ReferenceGenome parser = argparse.ArgumentParser() parser.add_argument("-i", "--input_file", action="store", dest="input", required=True, help="Input vcf file with variants...
{ "content_hash": "fde14e2310fa108e8e56ee589119da89", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 126, "avg_line_length": 61.84848484848485, "alnum_prop": 0.5539768087538788, "repo_name": "mahajrod/MACE", "id": "b2c0752f255a3a59bae44e2d3c02c27d19b4183d", "size": "6145",...
print "I could have code like this." # and a passive agressive little comment # like this... # you can also use comments to disable stuff. AKA "Comment it out" # you did this stuff a million times already man. print "This will run ."
{ "content_hash": "da5ed56c65e7c4ac214e2663c3375b85", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 78, "avg_line_length": 29.75, "alnum_prop": 0.7226890756302521, "repo_name": "jaredmanning/learning", "id": "0fc1c0e9597543dff2ae9f7b54325c71e93b8f1f", "size": "292", "bin...
import euphoria as eu import part import json class Board(eu.execgroup.ExecGroup): """ Manages all the parts of the board from one location. """ def __init__(self, *boards): super().__init__(autoclean=False) for b in boards: self.add(b) def get(self, nameshort): ...
{ "content_hash": "6c4c0a11b0546725a28883320fcc0928", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 197, "avg_line_length": 27.375, "alnum_prop": 0.5609915198956295, "repo_name": "jedevc/MusicNotice", "id": "aee2ece7274ccb7309f626307326480d969f3376", "size": "1533", "bi...
from ..java import opcodes as JavaOpcodes, Classref ########################################################################## # Pseudo instructions used to flag the offset position of other # attributes of the code, especially those depened on opcode offset. ##########################################################...
{ "content_hash": "2d52c0b2dbb3bdc56b3ddce0fb3af894", "timestamp": "", "source": "github", "line_count": 2254, "max_line_length": 143, "avg_line_length": 29.6885536823425, "alnum_prop": 0.576347171164709, "repo_name": "chubbymaggie/voc", "id": "aa0e7504a6436576760014bcc67e9c3eabf852ff", "size": "669...
from parsetron import String, Grammar, Regex, Or, Optional, ZeroOrMore, \ OneOrMore, RobustParser __author__ = 'Xuchen Yao' def replaced_string(s, v): return String(s).replace_result_with(v) def result_sum(r): # result could either be a list or a single item try: r.set(sum(r.get())) exc...
{ "content_hash": "208f6047fe67264f06bac247b835329a", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 79, "avg_line_length": 31.78181818181818, "alnum_prop": 0.5371853546910755, "repo_name": "Kitt-AI/parsetron", "id": "f2ad8c88bc3541137e431097f082563dddfdc80a", "size": "34...
from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/poi/shared_naboo_tradefederationloyalist_large2.iff" result.attribute_template_id = -1 result.stfName("poi_n","base_poi_building") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return resu...
{ "content_hash": "a5526f7328e6a73a661e39319d515c17", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 88, "avg_line_length": 24.76923076923077, "alnum_prop": 0.7080745341614907, "repo_name": "obi-two/Rebelion", "id": "a1468b2ff5678df876b0e9dd26ad9b392d2b3fb5", "size": "467"...
from typing import Any, Dict from django.http import HttpRequest, HttpResponse from django.utils.translation import gettext as _ from zerver.decorator import webhook_view from zerver.lib.exceptions import JsonableError from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_succ...
{ "content_hash": "7cccde6b779d286d2e24cb725356c4bb", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 69, "avg_line_length": 32, "alnum_prop": 0.7163461538461539, "repo_name": "eeshangarg/zulip", "id": "45203545d043194ad8938c3695010515529f5f56", "size": "1248", "binary": ...
"""Layout to monitor flight status.""" from makani.control import system_params from makani.gs.monitor2.apps.layout import base from makani.gs.monitor2.apps.plugins import common from makani.gs.monitor2.apps.plugins.indicators import aio_comms from makani.gs.monitor2.apps.plugins.indicators import avionics from makani...
{ "content_hash": "f3a9d8fdc7e04552c1a9a8f248b871f1", "timestamp": "", "source": "github", "line_count": 216, "max_line_length": 80, "avg_line_length": 41.324074074074076, "alnum_prop": 0.6757786242437822, "repo_name": "google/makani", "id": "db279945d5ae97aa17ba4829dbd9aa6a0c56eade", "size": "9515"...
import unittest from datetime import datetime from unittest import mock from django.test import SimpleTestCase, ignore_warnings from django.utils.datastructures import MultiValueDict from django.utils.deprecation import RemovedInDjango40Warning from django.utils.http import ( base36_to_int, escape_leading_slashes,...
{ "content_hash": "f935dda6d78d3918bae5786eabb9569a", "timestamp": "", "source": "github", "line_count": 359, "max_line_length": 117, "avg_line_length": 39.49860724233983, "alnum_prop": 0.5717207334273625, "repo_name": "simonw/django", "id": "ed6824429d51a5a56dc639b56c73910d5432c982", "size": "14180...
import os from PIL import Image def calcOptiFactorString(orig, new, asprocent=False,reverse=False): origlen = len(orig) newlen = len(new) factor = newlen/origlen if reverse: factor = 1 - factor if asprocent: factor *= 100 factor = round(factor) return factor def calcOptiFactorBinary(fpatho, fpathn, aspro...
{ "content_hash": "31660c2aac8568d8c03f0fcf020bb4a5", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 80, "avg_line_length": 24.25, "alnum_prop": 0.665807560137457, "repo_name": "rejhgadellaa/icerrr", "id": "5bc7df98de471ead6b5f47b45d9fb30fbbfda53b", "size": "2371", "bina...
from .claripy import * from .light import * from .heavy import * from .lifter import VEXLifter
{ "content_hash": "c6c2f30621c8e9a3cf184aa8beab73e1", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 29, "avg_line_length": 23.75, "alnum_prop": 0.7578947368421053, "repo_name": "schieb/angr", "id": "45b364fd2d1de876b0ad19cced5f3a960d63326c", "size": "95", "binary": false...
from __future__ import unicode_literals import sys sys.path.insert(0, "..") import webbrowser from qqweibo import OAuthHandler, API API_KEY = 'your key' API_SECRET = 'your secret' if API_KEY.startswith('your'): print ('You must fill API_KEY and API_SECRET!') webbrowser.open("http://open.t.q...
{ "content_hash": "37866ebe79627660942edc4fcbbd326e", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 74, "avg_line_length": 24.677419354838708, "alnum_prop": 0.64640522875817, "repo_name": "hufei/qqweibo", "id": "11d42d5ee10044183ad4a796eb66ceb072b09d09", "size": "1883", ...
import unittest import vsmlib import logging import vsmlib.benchmarks.similarity.similarity logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) path = "test/data/embeddings/text/plain_with_file_header" class Tests(unittest.TestCase): def test_similar(self): model = vsmlib.model...
{ "content_hash": "7474f349616bd7a636bbcad738eb3180", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 73, "avg_line_length": 35.21621621621622, "alnum_prop": 0.6415963161933999, "repo_name": "undertherain/vsmlib", "id": "12703ea56643eed14e1e905db50275967548062c", "size": "1...
from .repeat import Repeat
{ "content_hash": "e6b64a3ebf6ce0cc4d49cd2fedc05ff8", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 26, "avg_line_length": 27, "alnum_prop": 0.8148148148148148, "repo_name": "interuss/dss", "id": "c738568938e87a3c66314ba65e6950db2895c0c8", "size": "27", "binary": false, ...
import smarter from .models import Page, PageFile class PageViews(smarter.GenericViews): model = Page options = { 'add': { 'redirect': lambda view, request, **kwargs: view.get_url('index') }, 'edit': { 'exclude': ('owner',), 'redirect': lambda view, ...
{ "content_hash": "fe54186fe6c774522260c1d7873048c4", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 88, "avg_line_length": 24.115384615384617, "alnum_prop": 0.532695374800638, "repo_name": "fabiosantoscode/django-smarter", "id": "96309ae268b0c1bda538226449794e26916b670f", ...
from .stage01_isotopomer_spectrumAccuracy_io import stage01_isotopomer_spectrumAccuracy_io #Remove after refactor from .stage01_isotopomer_spectrumAccuracy_postgresql_models import * class stage01_isotopomer_spectrumAccuracy_execute(stage01_isotopomer_spectrumAccuracy_io): def execute_analyzeSpectrumAccuracy(self,...
{ "content_hash": "03cfc0052846d8aee1dbce2813826b09", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 188, "avg_line_length": 69.31288343558282, "alnum_prop": 0.580545229244114, "repo_name": "dmccloskey/SBaaS_isotopomer", "id": "ebe1355402facffb24ba4d5d0c08f0ced172a0d2", "...
{ 'name': 'Webkit Report Engine', 'description': """ This module adds a new Report Engine based on WebKit library (wkhtmltopdf) to support reports designed in HTML + CSS. ===================================================================================================================== The module structure a...
{ "content_hash": "4619491e7d4b545521eb2ddfdcd93cef", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 117, "avg_line_length": 36.0958904109589, "alnum_prop": 0.6402277039848198, "repo_name": "diogocs1/comps", "id": "b8557e7747ef39ba943898ae6a3b2ec03966ebd9", "size": "4029",...
from django.contrib import admin from models import Article,TagInfo,AboutMe,Toys from common import sync_es,trans_localdate_format # Register your models here. def make_published(self, request, queryset): rows_updated = queryset.update(status='p') if rows_updated == 1: message_bit = "1 article was" ...
{ "content_hash": "401486024752de0b0c42d396ef881188", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 84, "avg_line_length": 34.5, "alnum_prop": 0.663768115942029, "repo_name": "mnpiozhang/myblog", "id": "61dd2d4ba0e592bb95659a084b5022688e3d566f", "size": "1380", "binary"...
""" Google BigQuery support """ def _try_import(): # since pandas is a dependency of pandas-gbq # we need to import on first use try: import pandas_gbq except ImportError: # give a nice error message raise ImportError("Load data from Google BigQuery\n" ...
{ "content_hash": "0b9780c1778e859122718003f038a771", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 94, "avg_line_length": 36.25, "alnum_prop": 0.6286079182630907, "repo_name": "winklerand/pandas", "id": "b452b0cf5ddd4efe956c8f1ea8383ca09e28c186", "size": "3915", "bina...