repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
ericmjl/influenza-reassortment-detector | full_affmat.py | 1 | 1077 | import pandas as pd
import sys
class FullAffmatCompiler(object):
"""docstring for FullAffmatCompiler"""
def __init__(self, handle):
super(FullAffmatCompiler, self).__init__()
self.handle = handle
self.summed_affmat = pd.DataFrame()
self.current_df = None
self.affmats = d... | mit | -9,035,768,609,521,674,000 | 34.933333 | 170 | 0.627669 | false |
widdowquinn/THAPBI | ITS_region_genomic_coverage/get_genes_from_GFF.py | 1 | 1976 | #!/usr/bin/env python
#author: Peter Thorpe September 2016. The James Hutton Insitute,Dundee,UK.
#Title:
#script to get the gene columns only from GFF"
#imports
import os
import sys
from sys import stdin,argv
import sys
import datetime
from optparse import OptionParser
##############################################... | mit | 6,784,813,885,300,704,000 | 23.395062 | 79 | 0.566296 | false |
GermanRuizMarcos/Classical-Composer-Classification | code_8/classification_1.py | 1 | 8408 | '''
AUDIO CLASSICAL COMPOSER IDENTIFICATION BASED ON:
A SPECTRAL BANDWISE FEATURE-BASED SYSTEM
'''
import essentia
from essentia.standard import *
import glob
import numpy as np
import arff
from essentia.standard import *
from scipy import stats
# Dataset creation with specific attributes (spectral features) and a s... | gpl-3.0 | 4,417,720,493,671,316,500 | 23.16092 | 144 | 0.614534 | false |
juharris/tensorflow | tensorflow/contrib/layers/python/layers/target_column.py | 1 | 19116 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 887,826,027,601,003,500 | 35.411429 | 80 | 0.672003 | false |
ClusterWhisperer/clusterstats | tests/test_http.py | 1 | 8802 | """Testcases for the clusterstats module."""
import unittest
import json
from pprint import pprint
import httpretty
from requests import HTTPError, Timeout
import pandas as pd
from clusterstats import http
from clusterstats import stats
class ClusterStatsTest(unittest.TestCase):
def test_read_servers(self):
... | mit | 1,064,580,791,326,973,600 | 34.212 | 105 | 0.566576 | false |
dbhirko/ansible-modules-extras | cloud/vmware/vsphere_copy.py | 1 | 6194 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2015 Dag Wieers <dag@wieers.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 | -8,349,510,817,290,760,000 | 34.597701 | 155 | 0.656926 | false |
TAJaroszewski/lma_contrail_monitoring | deployment_scripts/puppet/modules/lma_collector/files/collectd/openstack_keystone.py | 1 | 3086 | #!/usr/bin/python
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 3,808,081,965,423,770,000 | 30.814433 | 74 | 0.629618 | false |
asgeirrr/pgantomizer | pgantomizer/anonymize.py | 1 | 8192 | import argparse
import logging
import os
import subprocess
import sys
import psycopg2
import yaml
from .utils import get_in
DEFAULT_PK_COLUMN_NAME = 'id'
ANONYMIZE_DATA_TYPE = {
'timestamp with time zone': "'1111-11-11 11:11:11.111111+00'",
'date': "'1111-11-11'",
'boolean': 'random() > 0.5',
'int... | bsd-3-clause | -4,770,951,618,853,237,000 | 41.226804 | 120 | 0.630005 | false |
CWDoherty/Baseball | Scripts/player_stats.py | 1 | 5865 | '''
Copyright (c) 2015 Chris Doherty, Oliver Nabavian
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, merge, publi... | mit | -1,999,657,956,672,452,900 | 28.325 | 104 | 0.662575 | false |
CptDemocracy/Python | MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-6/PSET-6/decryptStory.py | 1 | 3795 | """
PSET-6
Problem 2: Decryption (decryptStory)
Now that you have all the pieces to the puzzle, please use them to
decode the file story.txt. In the skeleton file, you will see a method
getStoryString() that will return the encrypted version of the story.
Fill in the following function; it should create the wordList,... | mit | 3,336,012,462,027,109,400 | 30.106557 | 80 | 0.529644 | false |
asipto/kamcli | kamcli/commands/cmd_aliasdb.py | 1 | 5403 | import click
from sqlalchemy import create_engine
from kamcli.ioutils import ioutils_dbres_print
from kamcli.cli import pass_context
from kamcli.cli import parse_user_spec
@click.group("aliasdb", help="Manage database user aliases")
@pass_context
def cli(ctx):
pass
@cli.command("add", short_help="Add a user-ali... | gpl-2.0 | -459,473,105,445,511,100 | 28.850829 | 79 | 0.531371 | false |
aYukiSekiguchi/ACCESS-Chromium | build/android/android_commands.py | 1 | 28898 | #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides an interface to communicate with the device via the adb command.
Assumes adb binary is currently on system path.
Usag... | bsd-3-clause | -6,705,148,772,835,299,000 | 36.048718 | 80 | 0.64828 | false |
conan-io/conan | conans/test/unittests/client/graph/version_ranges_graph_test.py | 1 | 12748 | from collections import OrderedDict
from collections import namedtuple
import six
from parameterized import parameterized
from conans.errors import ConanException
from conans.model.ref import ConanFileReference
from conans.model.requires import Requirements
from conans.test.unittests.model.transitive_reqs_test import... | mit | -7,860,550,224,070,192,000 | 42.958621 | 105 | 0.562127 | false |
rsalmei/clearly | tests/unit/utils/test_data.py | 1 | 2993 | import re
from unittest import mock
import pytest
from celery.events.state import Task, Worker
from clearly.protos.clearly_pb2 import TaskMessage, WorkerMessage
# noinspection PyProtectedMember
from clearly.utils.data import _accept, accept_task, accept_worker, obj_to_message
TASK = dict(name='name', routing_key='ro... | mit | 6,475,354,787,992,684,000 | 33.802326 | 94 | 0.602072 | false |
mdtux89/amr-eager | action.py | 1 | 1131 | #!/usr/bin/env python
#coding=utf-8
'''
Definition of Action class. In AMREAGER, an action can be either 'shift', 'reduce', 'rarc'
or 'larc'. When it's a shift, the argument is the subgraph triggered by the token. When it's a reduce,
the argument is used to specify the optional reeentrant edge to create. For rarcs and... | bsd-2-clause | -1,735,350,711,124,829,000 | 30.416667 | 102 | 0.576481 | false |
Quihico/repository.spartacus | temp/script.module.python.koding.aio/lib/koding/video.py | 1 | 16114 | # -*- coding: utf-8 -*-
# script.module.python.koding.aio
# Python Koding AIO (c) by whufclee (info@totalrevolution.tv)
# Python Koding AIO is licensed under a
# Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
# You should have received a copy of the license along with this
# wor... | gpl-2.0 | 1,564,265,599,120,319,500 | 40.738342 | 148 | 0.616946 | false |
tudorvio/tempest | tempest/api/compute/test_authorization.py | 1 | 18893 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -3,149,787,669,873,692,700 | 46.709596 | 79 | 0.614513 | false |
shiquanwang/pylearn2 | pylearn2/scripts/tutorials/softmax_regression/tests/test_softmaxreg.py | 1 | 1450 | """
Test for softmax_regression.ipynb
"""
import os
from pylearn2.testing.skip import skip_if_no_data
from pylearn2.config import yaml_parse
from theano import config
def test():
skip_if_no_data()
dirname = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
with open(os.path.join(dirname, ... | bsd-3-clause | -464,289,127,205,744,400 | 24.892857 | 76 | 0.577241 | false |
CCharlieLi/StaffManagmentSystem | Website/admin.py | 1 | 1775 | from django.contrib import admin
from Website.models import *
from django import forms
from django.utils.translation import ugettext_lazy
from Skyrover.widgets import KindEditor
# Register your models here.
class kindeditorNewsForm(forms.ModelForm):
Content = forms.CharField(label=ugettext_lazy(u"Content"), widge... | gpl-2.0 | -58,941,322,863,837,096 | 31.272727 | 123 | 0.761127 | false |
uclmr/inferbeddings | scripts/fb15k/UCL_FB15K_adv_v3.1.py | 1 | 3991 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import itertools
import os.path
import sys
import argparse
import logging
def cartesian_product(dicts):
return (dict(zip(dicts, x)) for x in itertools.product(*dicts.values()))
def summary(configuration):
kvs = sorted([(k, v) for k, v in configuration.items()... | mit | -8,338,077,182,654,248,000 | 34.633929 | 112 | 0.496617 | false |
TomTranter/OpenPNM | tests/unit/models/geometry/PoreSeedTest.py | 1 | 1690 | import numpy as np
import scipy as sp
import openpnm as op
import openpnm.models.geometry.pore_seed as mods
class PoreSeedTest:
def setup_class(self):
self.net = op.network.Cubic(shape=[5, 5, 5])
self.geo = op.geometry.GenericGeometry(network=self.net,
... | mit | 6,806,431,745,261,210,000 | 32.8 | 67 | 0.489941 | false |
cmoutard/mne-python | mne/io/brainvision/brainvision.py | 1 | 20471 | # -*- coding: utf-8 -*-
"""Conversion tool from Brain Vision EEG to FIF"""
# Authors: Teon Brooks <teon.brooks@gmail.com>
# Christian Brodbeck <christianbrodbeck@nyu.edu>
# Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD (3-clause)
import os
import time
import re
import warnings
import numpy... | bsd-3-clause | -8,863,967,679,030,398,000 | 37.91635 | 79 | 0.593796 | false |
cstlee/kafkamark | scripts/kafkamark_plot.py | 1 | 1296 | # ISC License
#
# Copyright (c) 2017, Stanford University
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE... | isc | 2,795,149,768,533,533,000 | 29.139535 | 79 | 0.677469 | false |
weedge/doubanFmSpeackerPi | plugin/fm/baseFM.py | 1 | 3321 | # -*- coding: utf-8-*-
import os
import logging
import pipes
import tempfile
import subprocess
import psutil
import signal
import lib.appPath
from lib.baseClass import AbstractClass
class AbstractFM(AbstractClass):
"""
Generic parent class for FM class
"""
@classmethod
def is_available(cls):
... | apache-2.0 | 4,241,096,129,657,073,000 | 25.822034 | 95 | 0.52575 | false |
daniel-severo/dask-ml | tests/test_metrics.py | 1 | 2139 | import pytest
import dask.array as da
import numpy as np
import numpy.testing as npt
from dask.array.utils import assert_eq
import sklearn.metrics as sm
import dask_ml.metrics as dm
def test_pairwise_distances(X_blobs):
centers = X_blobs[::100].compute()
result = dm.pairwise_distances(X_blobs, centers)
e... | bsd-3-clause | 7,806,270,662,457,897,000 | 30.455882 | 73 | 0.655914 | false |
balloob/pychromecast | examples/yleareena_example.py | 1 | 2570 | """
Example on how to use the Yle Areena Controller
"""
import argparse
import logging
import sys
from time import sleep
import pychromecast
from pychromecast.controllers.yleareena import YleAreenaController
import zeroconf
logger = logging.getLogger(__name__)
# Change to the name of your Chromecast
CAST_NAME = "... | mit | -3,048,973,992,877,498,000 | 31.125 | 129 | 0.706226 | false |
ecodiv/code-snippets | cross-validation/cross_fold_validation.py | 1 | 8776 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
DESCRIPTION: Code to run a n-fold cross validation on the results of the GRASS
GIS v.surf.bspline and v.surf.idw function. This code is used in
a tutorial about carrying out n-fold cross validation in GRASS
GIS (https://tutori... | gpl-3.0 | 8,661,852,449,883,056,000 | 38.178571 | 79 | 0.559594 | false |
arider/riderml | riderml/regression/gradient_descent.py | 1 | 6474 | import numpy
ETA_PLUS = 1.2
ETA_MINUS = 0.5
def stochastic_gradient_descent(function,
derivative,
x, y,
theta=None,
iterations=100,
learning_rate=0.000001,
... | mit | -6,365,893,648,222,809,000 | 34.571429 | 79 | 0.545103 | false |
dstanek/keystone | keystone/common/ldap/core.py | 1 | 76540 | # Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 | 6,774,204,902,072,156,000 | 38.926969 | 79 | 0.568709 | false |
olivetree123/redash-x | redash/handlers/base.py | 1 | 1202 | from flask_restful import Resource, abort
from flask_login import current_user, login_required
from peewee import DoesNotExist
from redash.authentication.org_resolving import current_org
from redash.tasks import record_event
class BaseResource(Resource):
decorators = [login_required]
def __init__(self, *arg... | bsd-2-clause | -1,565,178,672,739,305,200 | 24.574468 | 74 | 0.635607 | false |
mfiers/Moa | moa/plugin/job/openLavaActor.py | 1 | 9361 | # Copyright 2009-2011 Mark Fiers
# The New Zealand Institute for Plant & Food Research
#
# This file is part of Moa - http://github.com/mfiers/Moa
#
# Licensed under the GPL license (see 'COPYING')
#
"""
**sgeActor** - Run jobs through SGE
-----------------------------------------------------------
"""
import os
impor... | gpl-3.0 | -2,962,970,957,543,276,500 | 28.253125 | 77 | 0.577075 | false |
stefanseefeld/numba | numba/tests/test_complex.py | 1 | 11311 | from __future__ import print_function, absolute_import, division
import cmath
import itertools
import math
import sys
from numba import unittest_support as unittest
from numba.compiler import compile_isolated, Flags, utils
from numba import types
from .support import TestCase, tag
from .complex_usecases import *
ena... | bsd-2-clause | -6,641,714,589,291,190,000 | 35.022293 | 83 | 0.604721 | false |
hackerbot/DjangoDev | django/forms/models.py | 2 | 55275 | """
Helper functions for creating Form classes from Django models
and database field objects.
"""
from __future__ import unicode_literals
from collections import OrderedDict
from itertools import chain
from django.core.exceptions import (
NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, ValidationError,
)
fro... | bsd-3-clause | 4,096,164,790,503,905,300 | 41.00228 | 124 | 0.589326 | false |
rleigh-dundee/openmicroscopy | components/tools/OmeroWeb/omeroweb/settings.py | 1 | 22862 | #!/usr/bin/env python
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # Django settings for OMERO.web project. # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#
# Copyright (c) 2008 University of Dundee.
#
# This progr... | gpl-2.0 | -7,212,896,495,762,122,000 | 43.220503 | 290 | 0.673301 | false |
DonnchaC/onionbalance | test/functional/test_publish_master_descriptor.py | 1 | 5980 | # -*- coding: utf-8 -*-
import os
import sys
import socket
import time
import pytest
import Crypto.PublicKey.RSA
import yaml
import pexpect
import stem.control
import onionbalance.util
# Skip functional tests if Chutney environment is not running.
pytestmark = pytest.mark.skipif(
"os.environ.get('CHUTNEY_ONION_A... | gpl-3.0 | -6,428,917,183,354,752,000 | 33.367816 | 78 | 0.661371 | false |
codeman38/toggldesktop | third_party/cppclean/cpp/symbols.py | 1 | 6773 | # Copyright 2007 Neal Norwitz
# Portions Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | bsd-3-clause | -7,632,433,835,013,923,000 | 32.696517 | 79 | 0.598996 | false |
emccode/HeliosBurn | heliosburn/django/hbproject/webui/backends.py | 1 | 1440 | from django.conf import settings
from mongoengine.django.auth import User
import requests
import json
class HeliosAuthBackend(object):
"""
Authenticate against the API.
"""
def authenticate(self, username=None, password=None):
payload = {'username': username, 'password': password}
ur... | mit | -4,774,238,198,615,431,000 | 31.022222 | 72 | 0.565278 | false |
dcos/shakedown | tests/acceptance/test_dcos_command.py | 1 | 1176 | from shakedown import *
def test_run_command():
exit_status, output = run_command(master_ip(), 'cat /etc/motd')
assert exit_status
def test_run_command_on_master():
exit_status, output = run_command_on_master('uname -a')
assert exit_status
assert output.startswith('Linux')
def test_run_command_o... | apache-2.0 | -1,168,257,401,744,224,500 | 33.588235 | 102 | 0.673469 | false |
commtrack/commtrack-old-to-del | apps/reports/custom/all/domain_summary.py | 1 | 3326 | from django.template.loader import render_to_string
import settings
from xformmanager.models import FormDefModel, Metadata
from receiver.models import Submission, Attachment
def domain_summary(request, domain=None, detail_view=True):
'''Domain Admin Summary Data'''
if not domain:
domain = request.ex... | bsd-3-clause | -5,803,733,305,685,974,000 | 42.776316 | 110 | 0.553818 | false |
uaprom-summer-2015/Meowth | project/gallery.py | 1 | 1876 | import os
from werkzeug.datastructures import FileStorage
from project.models import UploadedImage
from PIL import Image
from PIL.ExifTags import TAGS
IM_EXTENSIONS = frozenset(['.jpg', '.jpeg', '.gif', '.png'])
def remove_exif_orientation(file_path):
ext = os.path.splitext(file_path)[1].lower()
if ext == ... | bsd-3-clause | -2,487,392,880,310,597,000 | 28.3125 | 66 | 0.58209 | false |
JonnyJD/python-discid | discid/__init__.py | 1 | 2174 | # Copyright (C) 2013 Johannes Dewender
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is dis... | lgpl-3.0 | 7,205,535,056,516,717,000 | 37.140351 | 77 | 0.772769 | false |
UManPychron/pychron | pychron/envisage/initialization/initialization_parser.py | 1 | 13078 | # ===============================================================================
# Copyright 2011 Jake Ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | apache-2.0 | 3,117,435,444,442,191,000 | 31.942065 | 97 | 0.523627 | false |
ntduong/data-science-newbie | Articles_Data_Analysis/cluster_articles.py | 1 | 1885 | import numpy as np
import scipy.cluster.hierarchy as hier
import scipy.spatial.distance as dist
import matplotlib.pyplot as plt
import make_data
from transform import count_transform
from cluster_algos import kmeans, hcluster
def clustering(X, labels, algo='hcluster', n_clusters=5, figname='cluster_result.png'):
... | mit | 4,438,244,582,114,250,000 | 39.12766 | 136 | 0.620159 | false |
bitmazk/django-generic-positions | generic_positions/tests/models_tests.py | 1 | 1512 | """Tests for the models of the ``generic_positions`` app."""
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from mixer.backend.django import mixer
from ..models import ObjectPosition, save_positions
from .test_app.models import DummyModel
class ObjectPositionTestCase(Tes... | mit | 2,228,287,124,904,203,000 | 35.878049 | 74 | 0.65873 | false |
margamanterola/Cinnamon | files/usr/share/cinnamon/cinnamon-settings/modules/cs_mouse.py | 1 | 6281 | #!/usr/bin/env python2
from gi.repository import Gtk, Gdk, GLib
from SettingsWidgets import *
class Module:
comment = _("Control mouse and touchpad settings")
name = "mouse"
category = "hardware"
def __init__(self, content_box):
keywords = _("mouse, touchpad, synaptic, double-click")
... | gpl-2.0 | -8,442,599,125,222,118,000 | 47.689922 | 178 | 0.631428 | false |
dannybrowne86/django-avatar | setup.py | 2 | 1958 | import codecs
import re
from os import path
from setuptools import setup, find_packages
def read(*parts):
filename = path.join(path.dirname(__file__), *parts)
with codecs.open(filename, encoding='utf-8') as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
... | bsd-3-clause | 9,097,149,291,649,415,000 | 31.098361 | 68 | 0.589888 | false |
garbear/EventGhost | eg/Classes/MacroSelectButton.py | 1 | 2415 | # This file is part of EventGhost.
# Copyright (C) 2005 Lars-Peter Voss <bitmonster@eventghost.org>
#
# EventGhost is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (a... | gpl-2.0 | 1,440,151,838,803,465,500 | 29.776316 | 76 | 0.609938 | false |
vprusso/youtube_tutorials | natural_language_processing/nlp_1.py | 1 | 3973 | # LucidProgramming -- Natural Language Processing in Python: Part 1
# YouTube Video: https://www.youtube.com/watch?v=tP783g97C5o
# Prior to running this script, you will require Python to be installed on
# your machine. If so, you may run the following command via pip:
# pip install nltk
# Once installed, you shoul... | gpl-3.0 | -2,300,163,772,194,960,600 | 41.265957 | 103 | 0.726655 | false |
markgw/jazzparser | lib/nltk/corpus/__init__.py | 1 | 10492 | # Natural Language Toolkit: Corpus Readers
#
# Copyright (C) 2001-2010 NLTK Project
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
# [xx] this docstring isnt' up-to-date!
"""
NLTK corpus readers. The modules in this package provide func... | gpl-3.0 | -5,547,489,834,691,697,000 | 38.893536 | 101 | 0.670416 | false |
cpitclaudel/dBoost | graphics/scalability.pdf.py | 1 | 2629 | #!/usr/bin/env python3
from utils import filename, save2pdf, setup, rcparams, to_inches
from utils.plots_helper import sensors
import matplotlib
from matplotlib import pyplot
from matplotlib.backends.backend_pdf import PdfPages
import itertools
matplotlib.rcParams['text.latex.preamble'] = [r"\usepackage{siunitx}"]
... | gpl-3.0 | 3,273,065,536,939,600,400 | 32.705128 | 139 | 0.58197 | false |
jaygoswami2303/course_dashboard_api | v2/DiscussionAPI/permissions.py | 1 | 1727 | """
Permissions classes for Discussion-API views.
"""
from rest_framework import permissions
from django.http import HttpResponse
import MySQLdb
from course_dashboard_api.v2.dbv import *
sql_user = MYSQL_USER
sql_pswd = MYSQL_PSWD
mysql_db = MYSQL_DB
class IsStudent(permissions.BasePermission):
"""
Grants ac... | mit | 3,944,675,056,809,785,300 | 32.211538 | 124 | 0.658367 | false |
JaneliaSciComp/Ax | ax1.py | 1 | 6102 | #!/home/arthurb/bin/anaconda/bin/python
# python ax1.py params_file FILEIN FILEOUT
# python ax1.py params_file FILEIN FILEOUT START STOP
# python ax1.py FS NFFT NW K PVAL FILEIN FILEOUT
# python ax1.py FS NFFT NW K PVAL FILEIN FILEOUT START STOP
#
# analyze a set of time series with multi-taper spectral analysis and
#... | bsd-3-clause | 4,388,245,357,869,162,500 | 28.765854 | 157 | 0.632416 | false |
ashoksekar/python | CodeJam/2011/Round2/AIWar/main.py | 1 | 5722 | #!/usr/bin/python
import networkx as nx
import matplotlib.pyplot as plt
num_of_test = 0 # number of test case (N)
debug = 0
num_P = 0
num_W = 0
gown = 0
gthtn = 0
th = []
class node(object):
""" data = n
child = child nodes """
def __init__(self, data = 0, child = [], parent = [], level = 0):
... | gpl-2.0 | -8,738,169,697,906,892,000 | 24.207048 | 90 | 0.436386 | false |
robertdeg/sdfpy | tests/test_core.py | 1 | 3311 | import unittest
import networkx as nx
import sdfpy.core as core
class TestLoadJSON(unittest.TestCase):
def test_tiny_csdf(self):
try:
g = core.load_sdf('tests/graphs/csdfg-tiny.json')
q = g.repetition_vector()
s = g.normalisation_vector()
m = g.modulus()
... | gpl-2.0 | -5,373,801,623,200,563,000 | 38.416667 | 67 | 0.481728 | false |
JeffHoogland/eandora | oldvlc/eAndoraVLC.py | 1 | 21838 | """A Pandora Client Written in Python EFLs/Elm
Uses VLC as a streaming backend
By: Jeff Hoogland (JeffHoogland@Linux.com)
Started: 12/20/12
"""
import os
import elementary
import edje
import ecore
import evas
import time
import pandora
import vlc
import urllib
import webbrowser
def openBrowser(url):
print "Open... | bsd-3-clause | -3,637,781,326,252,944,000 | 35.215589 | 128 | 0.59717 | false |
kylef/maintain | tests/release/test_aggregate.py | 1 | 3715 | import unittest
from semantic_version import Version
from maintain.release.base import Releaser
from maintain.release.aggregate import AggregateReleaser
from maintain.release.version_file import VersionFileReleaser
from ..utils import temp_directory, touch
class MockReleaser(Releaser):
def __init__(self, curren... | bsd-2-clause | -6,303,545,453,626,747,000 | 31.587719 | 102 | 0.613728 | false |
PuzzleboxIO/synapse-python | Puzzlebox/Synapse/Device.py | 1 | 12424 | # -*- coding: utf-8 -*-
# Copyright Puzzlebox Productions, LLC (2010-2012)
#
# This code is released under the GNU Pulic License (GPL) version 2
# For more information please refer to http://www.gnu.org/copyleft/gpl.html
__changelog__ = """\
Last Update: 2012.04.23
"""
__todo__ = """
"""
### IMPORTS ###
import os, ... | agpl-3.0 | 6,322,157,607,286,303,000 | 24.883333 | 95 | 0.58717 | false |
jamesjarlathlong/resourceful | two_agents_presleep.py | 1 | 8165 | import os
from agent import *
import asyncio
from qlearn import QLearn
from sarsa import Sarsa
import itertools
import functools
import json
import random
import sklearn
import collections
import websockets
import json
import copy
import time
import random
###Helper functions###
def merge(dicts):
super_dict = colle... | mit | -7,540,607,257,386,654,000 | 40.446701 | 112 | 0.658298 | false |
Freso/listenbrainz-server | listenbrainz/domain/tests/test_spotify.py | 1 | 9004 | import time
import requests_mock
from flask import current_app
from listenbrainz.domain import spotify
from listenbrainz.webserver.testing import ServerTestCase
from unittest import mock
class SpotifyDomainTestCase(ServerTestCase):
def setUp(self):
super(SpotifyDomainTestCase, self).setUp()
se... | gpl-2.0 | 3,376,187,134,347,358,700 | 42.708738 | 103 | 0.615504 | false |
dopuskh3/confluence-publisher | conf_publisher/confluence.py | 1 | 7678 | import os
import copy
from operator import attrgetter
try:
from lxml import etree
except ImportError:
import xml.etree.ElementTree as etree
class Content(object):
type = None
def __init__(self):
self.id = None
def __eq__(self, other):
return self.__dict__ == other.__dict__
cla... | mit | 1,458,645,083,216,607,500 | 29.347826 | 112 | 0.565642 | false |
ampotty/uip-pc3 | Ejemplos/ejemplo16.py | 1 | 1153 | def isPalindromicNumber(num: int) -> bool:
"""
Determina sin un numero es palindromico
:param num: Numbero entero a evaluar
:type num: int
:return: Verdadero si es numero palindromico; Falso si no es numero palindromico
:rtype: bool
"""
try:
if type(num) != int:
raise... | mit | 7,433,402,708,684,758,000 | 27.825 | 84 | 0.62706 | false |
Azure/azure-sdk-for-python | sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py | 1 | 8293 | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | mit | -7,345,336,612,967,402,000 | 42.878307 | 134 | 0.633064 | false |
Azure/azure-sdk-for-python | sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/setup.py | 1 | 2961 | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | mit | 5,800,291,530,648,143,000 | 32.647727 | 91 | 0.602499 | false |
beeftornado/sentry | src/sentry/migrations/0023_hide_environment_none_20191126.py | 2 | 1733 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
def hide_environment_none(apps, schema_editor):
"""
Hide environments that are named none, since they're blacklisted and no longer can be created.
We should iterate over each environment row individua... | bsd-3-clause | -3,321,665,843,704,771,600 | 41.268293 | 119 | 0.709175 | false |
denz/swarm | swarm/helpers.py | 1 | 11212 | # -*- coding: utf-8 -*-
import sys
import os
import pkgutil
from multiprocessing import RLock
from types import StringTypes
def get_root_path(import_name):
"""Returns the path to a package or cwd if that cannot be found. This
returns the path of a package or the folder that contains a module.
Not to be co... | bsd-3-clause | 4,586,606,665,246,934,000 | 38.206294 | 78 | 0.604085 | false |
beiko-lab/gengis | bin/Lib/site-packages/numpy/numarray/numerictypes.py | 1 | 15882 | """numerictypes: Define the numeric type objects
This module is designed so 'from numerictypes import *' is safe.
Exported symbols include:
Dictionary with all registered number types (including aliases):
typeDict
Numeric type objects:
Bool
Int8 Int16 Int32 Int64
UInt8 UInt16 UInt32 UI... | gpl-3.0 | -3,608,736,657,460,471,300 | 26.981752 | 87 | 0.581287 | false |
ryota-sugimoto/hackerrank | vmware/logical_hub.py | 1 | 1266 | #!/usr/bin/env python
def wire_port2port(d):
for host in d.keys():
hubs = d[host]
for i in range(len(hubs)):
for j in range(i+1,len(hubs)):
if hubs[i] == hubs[j]:
print "PORT_TO_PORT %s %i %i" % (host,i,j)
print "PORT_TO_PORT %s %i %i" % (host,j,i)
def make_hub_map(d):
hu... | gpl-2.0 | -9,089,723,739,468,877,000 | 23.346154 | 68 | 0.561611 | false |
dparnell/rethinkdb | drivers/java/convert_tests.py | 1 | 31689 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''Finds yaml tests, converts them to Java tests.'''
from __future__ import print_function
import sys
import os
import os.path
import re
import time
import ast
import argparse
import metajava
import process_polyglot
import logging
from process_polyglot import Unhandled, S... | agpl-3.0 | 2,851,923,914,246,198,000 | 32.321767 | 79 | 0.545426 | false |
upconsulting/IsisCB | isiscb/zotero/tests.py | 1 | 54915 | from __future__ import absolute_import
from __future__ import unicode_literals
from builtins import str
from builtins import object
from unittest import TestCase
from django.test.client import RequestFactory
from django.contrib.contenttypes.models import ContentType
from django.db import models
import rdflib, datetime... | mit | -3,700,071,653,428,453,000 | 39.798663 | 147 | 0.604079 | false |
kcompher/FreeDiscovUI | freediscovery/server/tests/test_clustering.py | 1 | 2200 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import pytest
import json
import itertools
from unittest import SkipTest
from numpy.testing import assert_equal, assert_almost_equal
f... | bsd-3-clause | 8,105,949,624,726,091,000 | 28.72973 | 81 | 0.519545 | false |
wbsavage/shinken | shinken/modules/glances_ui/plugins/cv_memory/cv_memory.py | 1 | 2398 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redis... | agpl-3.0 | -5,770,006,532,879,468,000 | 25.94382 | 100 | 0.634696 | false |
vdloo/raptiformica | tests/unit/raptiformica/actions/mesh/test_stop_detached_cjdroute.py | 1 | 2606 | from raptiformica.actions.mesh import stop_detached_cjdroute
from raptiformica.shell.execute import COMMAND_TIMEOUT
from tests.testcase import TestCase
class TestStopDetachedCjdroute(TestCase):
def setUp(self):
self.log = self.set_up_patch('raptiformica.actions.mesh.log')
self.execute_process = se... | mit | -887,037,330,012,145,900 | 41.032258 | 94 | 0.59363 | false |
trustpilot/python-lambdarest | lambdarest/__init__.py | 1 | 13223 | # -*- coding: utf-8 -*-
import json
import logging
from string import Template
from jsonschema import validate, ValidationError, FormatChecker
from werkzeug.routing import Map, Rule, NotFound
from werkzeug.http import HTTP_STATUS_CODES
from functools import wraps
__validate_kwargs = {"format_checker": FormatChecker(... | mit | -7,489,941,035,686,895,000 | 36.247887 | 138 | 0.571807 | false |
zayamatias/retrotool | retroclasses.py | 1 | 6684 | class sprite:
# Sprite class, to make it easier to manipulate afterwards
spriteCount = 0
def __init__ (self,pattern,colors,ored,x,y):
self.pattern=pattern #binary pattern of the sprite
self.colors=colors #colors of the sprite
self.ored = ored #does this sprite c... | gpl-3.0 | -4,547,728,878,825,318,000 | 31.939086 | 117 | 0.524087 | false |
akash1808/cachetools | cachetools/func.py | 1 | 3382 | import collections
import functools
import random
import time
from .lfu import LFUCache
from .lru import LRUCache
from .rr import RRCache
from .ttl import TTLCache
try:
from threading import RLock
except ImportError:
from dummy_threading import RLock
_CacheInfo = collections.namedtuple('CacheInfo', [
'h... | mit | -298,878,277,565,286,600 | 26.950413 | 77 | 0.611473 | false |
cernops/cloudbase-init | cloudbaseinit/tests/plugins/windows/test_localscripts.py | 1 | 2254 | # Copyright 2014 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | -5,743,922,069,370,638,000 | 37.862069 | 78 | 0.692103 | false |
HuaweiSwitch/CloudEngine-Ansible | library/ce_vrrp.py | 1 | 55373 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | -4,655,661,425,479,502,000 | 38.467569 | 120 | 0.54299 | false |
MalkmusT/coala-quickstart | coala_quickstart/interaction/Logo.py | 2 | 2373 | import textwrap
from coala_quickstart.Strings import COALA_BEAR_LOGO, WELCOME_MESSAGES
def print_side_by_side(printer,
left=[],
right=[],
left_color='white',
right_color='blue',
limit=80):
"""
Pr... | agpl-3.0 | 982,964,152,342,786,000 | 30.223684 | 70 | 0.574378 | false |
jimfenton/notif-notifier | clockwatcherd.py | 1 | 5149 | #!/usr/bin/python
# clockwatcherd.py - Daemon to generate test notifs once a minute
#
# Copyright (c) 2015 Jim Fenton
#
# 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, i... | mit | 2,108,621,448,660,416,500 | 36.043165 | 110 | 0.629637 | false |
gitpython-developers/GitPython | git/repo/base.py | 1 | 49533 | # repo.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import logging
import os
import re
import warnings
from git.cmd import (
Git,
handle_process_o... | bsd-3-clause | -8,987,056,800,874,823,000 | 42.18483 | 119 | 0.577978 | false |
anandka/SEWA | project/user/forms.py | 1 | 2007 | # project/user/forms.py
from flask_wtf import Form
from wtforms import TextField, PasswordField
from wtforms.validators import DataRequired, Email, Length, EqualTo
from project.models import User
class LoginForm(Form):
email = TextField('email', validators=[DataRequired()])
password = PasswordField('passwo... | mit | -8,264,770,392,331,245,000 | 26.121622 | 80 | 0.623817 | false |
Abhino/GamifiedTodoList | app.py | 1 | 1583 | import logging
import logging.config
import sys
from flask import Flask,render_template
from werkzeug.contrib.fixers import ProxyFix
from datetime import datetime
from apis import api, db
import os
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
DATE_FORMAT="%Y-%m-%d %H:%M:%S"
FORMAT = '%(asctime)s - %... | mit | -6,565,310,337,275,284,000 | 30.68 | 113 | 0.725205 | false |
python-xlib/python-xlib | Xlib/xobject/drawable.py | 1 | 34416 | # Xlib.xobject.drawable -- drawable objects (window and pixmap)
#
# Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either v... | lgpl-2.1 | -8,560,134,836,506,674,000 | 40.216766 | 101 | 0.463389 | false |
GiovanniConserva/TestDeploy | venv/Lib/site-packages/binstar_client/inspect_package/tests/test_pypi.py | 1 | 8799 | from __future__ import print_function, unicode_literals
import unittest
from os import path
from binstar_client.inspect_package import pypi
from pprint import pprint
import os
import shutil
import tempfile
def data_path(filename):
return path.join(path.dirname(__file__), 'data', filename)
expected_package_data ... | bsd-3-clause | -6,492,083,558,679,514,000 | 46.820652 | 108 | 0.472895 | false |
kiyoad/twimg2rss | url_db.py | 1 | 1450 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime
import os
import sqlite3
from common import conf
class UrlDb:
def __init__(self):
self.conn = None
self.c = None
def _open_sqlite3(self, url_db_file):
self.conn = sqlite3.connect(
url_db_file,
dete... | mit | 1,711,929,013,310,290,000 | 27.431373 | 77 | 0.576552 | false |
SCUEvals/scuevals-api | db/alembic/versions/20170927093446_fix_update_courses.py | 1 | 4925 | """Fix update_courses
Revision ID: 7004250e3ef5
Revises: 8a786f9bf241
Create Date: 2017-09-27 09:34:46.069174
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7004250e3ef5'
down_revision = '8a786f9bf241'
branch_labels = None
depends_on = None
def upgrade():
... | agpl-3.0 | -5,163,401,731,827,070,000 | 25.196809 | 106 | 0.591269 | false |
leonardr/botfriend | bots.sample/podcast/__init__.py | 1 | 2324 | from dateutil import parser
from pdb import set_trace
import random
from olipy.ia import Audio
from botfriend.bot import BasicBot
from botfriend.publish.podcast import PodcastPublisher
class PodcastBot(BasicBot):
COLLECTION = "podcasts"
def update_state(self):
# Grab the 100 most recently posted po... | mit | -460,678,980,916,038,300 | 29.986667 | 105 | 0.567986 | false |
mkhutornenko/incubator-aurora | src/test/python/apache/aurora/client/api/test_scheduler_client.py | 1 | 11221 | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under ... | apache-2.0 | 3,804,141,466,639,658,500 | 35.080386 | 100 | 0.733268 | false |
jbteixeir/Openflow-DC-Framework | pox/host_tracker/host_tracker.old.py | 1 | 12063 | # Copyright 2011 Dorgival Guedes
#
# This file is part of POX.
# Some of the arp/openflow-related code was borrowed from dumb_l3_switch.
#
# POX is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3... | gpl-3.0 | -1,858,211,703,470,429,200 | 33.663793 | 80 | 0.655558 | false |
jonaslu/thatswhatsup | python/bytecode/bytecode.py | 1 | 2290 | method_add = {
"code": [
# func add(x,y):
# return x + y
# STORE_NAME 0
# STORE_NAME 1
# LOAD_NAME 0
# LOAD_NAME 1
# ADD_TWO_VALUES
# RET
("STORE_NAME", 0),
("STORE_NAME", 1),
("LOAD_NAME", 0),
("LOAD_NAME", 1),
("ADD_TWO_VALUES", None),
... | mit | -5,269,336,586,440,504,000 | 26.590361 | 64 | 0.460262 | false |
googleinterns/e2e-convrec | trainer/constants.py | 1 | 1779 | # Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... | apache-2.0 | 3,666,765,548,474,841,000 | 39.431818 | 75 | 0.704328 | false |
MWisBest/PyBot | Commands/xbox/xbox.py | 1 | 2126 | ###########################################################################
## PyBot ##
## Copyright (C) 2015, Kyle Repinski ##
## Copyright (C) 2015, Andres Preciado (Glitch) ##
## ... | gpl-3.0 | -3,655,683,782,739,206,700 | 63.424242 | 106 | 0.489652 | false |
rancher/validation-tests | tests/v2_validation/cattlevalidationtest/core/test_services_lb_ssl_with_cert_from_volume.py | 1 | 27225 | from common_fixtures import * # NOQA
from test_storage_nfs_driver import check_for_nfs_driver
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
if_certs_available = pytest.mark.skipif(
not os.path.isdir(SSLCERT_SUBDIR),
reason='ssl cert file directory not found')
dom_list = readDataFile(SS... | apache-2.0 | 4,385,412,779,574,357,500 | 37.837375 | 78 | 0.53124 | false |
pneff/wsgiservice | tests/test_application.py | 1 | 20489 | import io
from datetime import timedelta
from mox3 import mox
import wsgiservice
import wsgiservice.application
import wsgiservice.exceptions
from webob import Request
def test_getapp():
"""get_app returns a list of resources from the dictionary."""
app = wsgiservice.get_app(globals())
print(app)
pr... | bsd-2-clause | 3,326,394,759,695,108,600 | 32.699013 | 78 | 0.639123 | false |
emailgregn/djtempl | djtempl/cli.py | 1 | 1278 | from djtempl import render_files
import argparse
import sys
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--template",
metavar='file',
default='Dockerfile.tmpl',
type=argparse.FileType(mode='r'), # 2.7 argparse... | gpl-3.0 | 3,263,640,041,976,481,000 | 33.540541 | 109 | 0.516432 | false |
ama-jharrison/agdc | agdc/agdc/abstract_ingester/dataset_record.py | 1 | 27323 | #!/usr/bin/env python
# ===============================================================================
# Copyright 2015 Geoscience Australia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
... | apache-2.0 | 7,368,330,845,389,171,000 | 41.493002 | 101 | 0.569044 | false |
chris-klinger/Goat | databases/database_config.py | 1 | 7681 | """
This module contains code for creating the underlying database structures
and also general code to perform basic actions: add, remove, update, list
"""
import os
import goat
from settings import settings_config
from databases import database_records,database_util,database_dirfiles
from util.inputs import prompts
... | gpl-3.0 | 8,086,966,148,088,573,000 | 35.751196 | 88 | 0.623096 | false |
shanx/django-maintenancemode | test_settings.py | 1 | 1663 | import os
import re
SECRET_KEY = "DUMMY_SECRET_KEY"
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
INTERNAL_IPS = []
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
os.path.join(PROJECT_ROOT, "test_templates"),
],
"AP... | bsd-3-clause | -1,005,136,904,575,613,800 | 28.696429 | 85 | 0.628984 | false |
demisto/content | Packs/CommonScripts/Scripts/CheckContextValue/CheckContextValue_test.py | 1 | 2863 | from CommonServerPython import *
from CheckContextValue import poll_field
context = {
'id': 1,
'name': 'This is incident1',
'type': 'Phishing',
'severity': 0,
'status': 1,
'created': '2019-01-02',
'closed': '0001-01-01T00:00:00Z',
'foo': 'bar',
}
missing_context = {
'id': 2,
'n... | mit | -6,227,709,969,366,190,000 | 25.509259 | 85 | 0.618582 | false |
dragoon/kilogram | kilogram/dataset/edit_histories/wikipedia/libs/dewikify.py | 1 | 1518 | import re
class Parser(object):
"""
Parser to remove all kinds of wiki markup tags from an object
"""
def __init__(self):
"""
Constructor
"""
self.string = ''
# all the following regex remove all tags that cannot be rendered
# in text
self.wiki_... | apache-2.0 | 5,212,644,074,540,540,000 | 32.755556 | 89 | 0.431489 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.