repo_name stringlengths 5 100 | path stringlengths 4 299 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1.03M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,297,778B | line_mean float64 3.17 100 | line_max int64 7 1k | alpha_frac float64 0.25 0.98 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
dayatz/taiga-back | taiga/projects/tasks/migrations/0009_auto_20151104_1131.py | 2 | 1459 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import connection, migrations, models
def set_finished_date_for_tasks(apps, schema_editor):
# Updates the finished date from tasks according to the history_entries associated
# It takes the last history change updateing the status ... | agpl-3.0 | -1,495,348,254,073,087,500 | 28.18 | 90 | 0.696367 | false |
PaddlePaddle/models | PaddleCV/image_classification/legacy/dist_train/batch_merge.py | 1 | 2499 | #copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#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,866,482,817,361,182,000 | 42.842105 | 76 | 0.561825 | false |
openfisca/openfisca-france-indirect-taxation | openfisca_france_indirect_taxation/build_survey_data/calibration_aliss.py | 4 | 6081 | # -*- coding: utf-8 -*-
from __future__ import division
import itertools
import os
import pandas
import pkg_resources
from openfisca_survey_manager.survey_collections import SurveyCollection
from openfisca_survey_manager import default_config_files_directory as config_files_directory
elasticities_path = os.path.... | agpl-3.0 | -2,006,823,806,000,192,500 | 34.770588 | 117 | 0.582306 | false |
molobrakos/home-assistant | tests/helpers/test_template.py | 4 | 39409 | """Test Home Assistant template helper methods."""
import asyncio
from datetime import datetime
import unittest
import random
import math
import pytz
from unittest.mock import patch
from homeassistant.components import group
from homeassistant.exceptions import TemplateError
from homeassistant.helpers import template
... | apache-2.0 | 3,563,766,284,263,300,000 | 35.549165 | 79 | 0.517944 | false |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/GL/INTEL/map_texture.py | 9 | 1716 | '''OpenGL extension INTEL.map_texture
This module customises the behaviour of the
OpenGL.raw.GL.INTEL.map_texture to provide a more
Python-friendly API
Overview (from the spec)
Systems with integrated GPUs can share the same physical memory between CPU
and GPU. This feature, if exposed by API, can bring significa... | gpl-3.0 | 1,124,484,426,113,575,600 | 38.930233 | 76 | 0.798368 | false |
ac1apeyre/CS290_GroupAssignment1 | convertShaders.py | 4 | 1796 | #Purpose: To create Javascript multiline strings from all of the vertex
#and fragment shaders in this directory and to automatically put those strings
#at the end of Shaders.js. This eliminates security problems loading external
#files and allows users to execute code on their own computer without cross
#origin proble... | apache-2.0 | -8,371,898,065,905,836,000 | 39.818182 | 78 | 0.563474 | false |
mahak/neutron | neutron/tests/functional/db/test_models.py | 3 | 1254 | # Copyright (c) 2014 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... | apache-2.0 | 4,078,523,603,800,438,000 | 32 | 78 | 0.708134 | false |
jhrozek/samba-ldb-mdb | buildtools/wafsamba/samba_pidl.py | 9 | 5486 | # waf build tool for building IDL files with pidl
from TaskGen import before
import Build, os, sys, Logs
from samba_utils import *
def SAMBA_PIDL(bld, pname, source,
options='',
output_dir='.',
generate_tables=True):
'''Build a IDL file using pidl.
This will pro... | gpl-3.0 | -1,922,757,916,528,531,500 | 36.834483 | 136 | 0.530441 | false |
kiddinn/plaso | plaso/parsers/plugins.py | 2 | 4656 | # -*- coding: utf-8 -*-
"""This file contains basic interface for plugins within Plaso.
This library serves a basis for all plugins in Plaso, whether that are
Windows registry plugins, SQLite plugins or any other parsing plugins.
This is provided as a separate file to make it easier to inherit in other
projects that ... | apache-2.0 | -2,405,555,486,327,840,000 | 40.571429 | 80 | 0.7311 | false |
tswast/google-cloud-python | language/setup.py | 2 | 2778 | # Copyright 2018 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | -7,441,570,764,534,308,000 | 30.213483 | 85 | 0.681425 | false |
Excito/audiotools | audiotools/py_decoders/wavpack.py | 2 | 38340 | #!/usr/bin/python
#Audio Tools, a module and set of tools for manipulating audio data
#Copyright (C) 2007-2012 Brian Langenberger
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2... | gpl-2.0 | 2,428,501,330,193,078,300 | 38.9375 | 79 | 0.497418 | false |
baklanovp/pystella | rezone.py | 1 | 2128 | #!/usr/bin/env python3
# #!/usr/bin/python3
import getopt
import os
import sys
from os.path import dirname
import matplotlib.pyplot as plt
from pystella.model.stella import Stella
__author__ = 'bakl'
ROOT_DIRECTORY = dirname(dirname(os.path.abspath(__file__)))
def usage():
print("\n Create hyd- abn-files fro... | mit | 2,307,978,648,476,167,700 | 24.035294 | 79 | 0.522556 | false |
tonygalmiche/is_plastigray | is_inventaire.py | 1 | 44072 | # -*- coding: utf-8 -*-
from openerp import models,fields,api
from openerp.tools.translate import _
from openerp.exceptions import Warning
import datetime
import base64
import MySQLdb
import logging
_logger = logging.getLogger(__name__)
def _date_creation():
return datetime.date.today() # Date du jour
class is... | mit | -8,118,558,261,304,154,000 | 41.345525 | 199 | 0.443417 | false |
ibab/tensorprob | tests/distributions/test_combinators.py | 1 | 3595 | from __future__ import division
import numpy as np
from tensorprob import Model, Parameter, Normal, Exponential, Mix2
def test_mix2_fit():
with Model() as model:
mu = Parameter()
sigma = Parameter(lower=1)
a = Parameter(lower=0)
f = Parameter(lower=0, upper=1)
X1 = Norma... | mit | 7,315,858,475,312,611,000 | 29.726496 | 91 | 0.532962 | false |
Svolcano/python_exercise | dianhua/test/bill_data_fusion_test.py | 1 | 1842 | # -*- coding: utf-8 -*-
import pymongo
import sys
sys.path.append('../')
from worker.bill_data_fusion import data_fusion
DEV_MONGO_CONFIG = {
'host': '172.18.19.219',
'port': 27017,
'db': 'crs'
}
class Dev_MongodbConnection(object):
"""
MongoDB连接类
"""
def __init__(self)... | mit | -3,320,518,550,378,024,000 | 26.25 | 108 | 0.551991 | false |
JoshRodd/mockdevices | asa_config.py | 1 | 13358 | #!/usr/bin/env python3
from jinja2 import Environment
baseline_asa_conf_file_text = '''\
: Saved
:
: Serial Number: 9AJDFJGV165
: Hardware: ASAv, 2048 MB RAM, CPU Pentium II 2000 MHz
:
ASA Version 9.5(2)204
!
terminal width 511
hostname {{ hostname }}
enable password 2KFQnbNIdI.2KYOU encrypted
xlate per-session den... | mit | 564,070,875,583,957,500 | 41.951768 | 133 | 0.793008 | false |
romanz/python-keepkey | tests/test_msg_signidentity.py | 1 | 4304 | from __future__ import print_function
import unittest
import common
import binascii
import hashlib
import struct
from keepkeylib.client import CallException
import keepkeylib.types_pb2 as proto_types
def check_path(identity):
m = hashlib.sha256()
m.update(struct.pack("<I", identity.index))
uri = ''
i... | lgpl-3.0 | -5,067,317,723,074,652,000 | 57.958904 | 191 | 0.740474 | false |
fraricci/pymatgen | pymatgen/analysis/aflow_prototypes.py | 2 | 4003 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import os
from monty.serialization import loadfn
from pymatgen.analysis.structure_matcher import StructureMatcher
"""
This module uses data from the AFLOW LIBRARY OF CRYSTALLOGRAPHIC PROTOTYPES.
If using thi... | mit | -4,214,893,756,256,269,000 | 35.390909 | 97 | 0.623782 | false |
Hakuba/youtube-dl | youtube_dl/extractor/mitele.py | 21 | 3018 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urlparse,
)
from ..utils import (
encode_dict,
get_element_by_attribute,
int_or_none,
)
class MiTeleIE(InfoExtractor):
IE_DESC = 'mitele.es'
_VALID_URL = r'http://w... | unlicense | -6,856,082,474,153,087,000 | 32.910112 | 89 | 0.510272 | false |
rsepassi/tensor2tensor | tensor2tensor/data_generators/inspect.py | 1 | 3424 | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | -6,508,975,020,971,683,000 | 36.626374 | 79 | 0.70736 | false |
jiwanlimbu/aura | keystone/auth/plugins/password.py | 3 | 1675 | # Copyright 2013 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,764,065,640,510,353,000 | 35.413043 | 79 | 0.69194 | false |
szecsi/Gears | GearsPy/Ide.py | 1 | 3617 | from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import QApplication, QLabel, QDialog, QWidget, QGridLayout, QPushButton, QSplitter, QHBoxLayout, QSlider
from PyQt5.Qsci import QsciScintilla, QsciScintillaBase, QsciLexerPython, QsciAPIs
from Editor import Editor
from Preview import Preview
fr... | gpl-2.0 | 1,888,139,975,741,167,600 | 31.872727 | 125 | 0.652006 | false |
yinquan529/platform-external-chromium_org | tools/json_schema_compiler/idl_schema.py | 23 | 15958 | #! /usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import itertools
import json
import os.path
import re
import sys
from json_parse import OrderedDict
# This file is a peer to jso... | bsd-3-clause | 359,429,400,023,107,400 | 34.072527 | 80 | 0.626018 | false |
petrlosa/ella | ella/articles/south_migrations/0001_initial.py | 6 | 7112 |
from south.db import db
from django.db import models
import datetime
from south.v2 import SchemaMigration
from ella.core.models import Publishable
class Migration(SchemaMigration):
depends_on = (
("core", "0002_initial_publishable"),
)
def forwards(self, orm):
# Adding model 'Article'
... | bsd-3-clause | -2,924,197,103,444,478,500 | 51.681481 | 161 | 0.546682 | false |
pinax/django-waitinglist | waitinglist/tests.py | 1 | 4566 | from django.test import TestCase
from .forms import SurveyForm
from .models import (
Survey,
SurveyQuestion,
WaitingListEntry
)
class SurveyTests(TestCase):
def setUp(self):
self.survey = Survey.objects.create(
label="My Test Survey"
)
self.entry = WaitingListEntr... | mit | 6,137,663,377,484,723,000 | 35.528 | 95 | 0.593955 | false |
huizhuzhao/rfscore | bin/csar.py | 2 | 4569 | import os
import sys
import csv
import glob
from optparse import OptionParser
from rfscore.config import config, logger
from rfscore.ob import get_molecule, extract_ligand
from rfscore.credo import contacts
def parse_options():
'''
'''
# PARSE COMMAND LINE
usage = "%prog [options]"
parser = Optio... | mit | -724,087,612,189,265,800 | 33.353383 | 117 | 0.546071 | false |
D-K-E/cltk | src/cltk/lemmatize/processes.py | 4 | 5044 | """
Processes for lemmatization.
"""
from copy import deepcopy
from dataclasses import dataclass
from boltons.cacheutils import cachedproperty
from cltk.core.data_types import Doc, Process
from cltk.lemmatize.ang import OldEnglishDictionaryLemmatizer
from cltk.lemmatize.fro import OldFrenchDictionaryLemma... | mit | 1,679,960,883,668,530,400 | 36.292308 | 99 | 0.689835 | false |
hachreak/invenio-ext | invenio_ext/restful/__init__.py | 3 | 11926 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015 CERN.
#
# Invenio 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 (at your optio... | gpl-2.0 | 2,646,861,535,427,532,300 | 33.568116 | 79 | 0.533121 | false |
heromod/migrid | mig/shared/functionality/isjobactive.py | 1 | 3383 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# isjobactive - Check if sandbox job is still active
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU General ... | gpl-2.0 | -4,693,156,376,203,703,000 | 33.876289 | 82 | 0.632279 | false |
beiko-lab/gengis | plugins/LinearRegression/LinearRegressionLayout.py | 1 | 13203 | # -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Sep 8 2010)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
##########################################################################... | gpl-3.0 | -1,419,284,371,034,977,800 | 41.006515 | 189 | 0.686208 | false |
dexterx17/nodoSocket | clients/Python-2.7.6/Demo/pdist/RCSProxy.py | 47 | 4724 | #! /usr/bin/env python
"""RCS Proxy.
Provide a simplified interface on RCS files, locally or remotely.
The functionality is geared towards implementing some sort of
remote CVS like utility. It is modeled after the similar module
FSProxy.
The module defines two classes:
RCSProxyLocal -- used for local access
RCSPr... | mit | -5,689,671,796,840,622,000 | 22.858586 | 74 | 0.573455 | false |
enginoid/mutagen | tests/test_oggspeex.py | 4 | 2091 | import os
import shutil
import sys
from cStringIO import StringIO
from mutagen.ogg import OggPage
from mutagen.oggspeex import OggSpeex, OggSpeexInfo, delete
from tests import TestCase, add
from tests.test_ogg import TOggFileType
from tempfile import mkstemp
class TOggSpeex(TOggFileType):
Kind = OggSpeex
... | gpl-2.0 | 7,577,141,766,819,959,000 | 31.671875 | 78 | 0.65758 | false |
jesseklein406/data-structures | data-structures/linked_list.py | 2 | 1548 | class Node(object):
def __init__(self, value):
self.value = value
self.next_node = None
class LinkedList(object):
def __init__(self, iterable=None):
self.sizeOfList = 0
self.head = None
if iterable != None:
for item in iterable:
self.i... | mit | -8,443,942,395,358,694,000 | 23.1875 | 60 | 0.520026 | false |
adaxi/sickbeard | tests/name_parser_tests.py | 14 | 17744 | import datetime
import unittest
import sys, os.path
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../lib'))
from sickbeard.name_parser import parser
import sickbeard
sickbeard.SYS_ENCODING = 'UTF-8'
DEBUG = VERBOSE = False
simple_test_cases = {
'standard': {
... | gpl-3.0 | 6,614,100,721,204,994,000 | 48.552707 | 169 | 0.547565 | false |
creativeprojects/speedcam | picamera/capture_client.py | 1 | 1563 | import io
import socket
import struct
import time
import picamera
# Connect a client socket to my_server:8000 (change my_server to the
# hostname of your server)
client_socket = socket.socket()
client_socket.connect(('Ethelwyn.lan', 8000))
# Make a file-like object out of the connection
connection = client_socket.mak... | mit | 5,104,022,669,589,617,000 | 33.755556 | 71 | 0.672425 | false |
churchie317/wheel_of_fortune | Versions/Wheel_of_Fortune_v0.py | 1 | 16877 | ##for Raleigh & Grant
##who contributed more than they know
################################################################################
############################## WHEEL OF FORTUNE ################################
################################################################################
import random
im... | unlicense | -2,878,137,057,453,136,400 | 40.982587 | 138 | 0.485394 | false |
uncommoncode/good_dog | good_dog/data.py | 1 | 2491 | import glob
import os
import scipy.ndimage
import random
import shutil
def load_np_image(image_path):
return scipy.ndimage.imread(image_path)
class DogsVsCats(object):
def __init__(self, train_dir, test_dir=None):
self.train_dir = train_dir
self.test_dir = test_dir
self.classes = ["cat... | bsd-2-clause | -7,083,395,612,974,963,000 | 35.632353 | 86 | 0.65275 | false |
punit-haria/multimodal-learning | code/models/vae.py | 1 | 20821 | import tensorflow as tf
import numpy as np
from copy import deepcopy
from models import base
from models import layers as nw
class VAE(base.Model):
"""
Variational Auto-Encoder
"""
def __init__(self, arguments, name, tracker, init_minibatch, session=None, log_dir=None, model_dir=None):
# dict... | mit | 7,226,428,171,072,180,000 | 33.358086 | 122 | 0.505307 | false |
azhar3339/RAKE-tutorial | test_data.py | 7 | 1260 | __author__ = 'a_medelyan'
import os
# class to hold our test instance (document plus its correct manual keywords)
class TestDoc:
def __init__(self, name):
self.name = name
self.text = ''
self.keywords = []
# reading documents and their keywords from a directory
def read_data(input_dir):
... | mit | -4,995,581,503,702,450,000 | 25.270833 | 77 | 0.535714 | false |
pnorman/mapnik | utils/mapnik-config/build.py | 2 | 6293 | #
# This file is part of Mapnik (c++ mapping toolkit)
#
# Copyright (C) 2015 Artem Pavlenko
#
# Mapnik 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 2.1 of the License, or (at your op... | lgpl-2.1 | 4,558,087,957,803,858,400 | 33.767956 | 154 | 0.685841 | false |
dsarkozi/care4care-sdp-grp4 | Care4Care/C4CApplication/views/forms/DonateTimeForm.py | 1 | 1901 | from django import forms
from django.utils.translation import ugettext_lazy as _
from C4CApplication.models.member import Member
class DonateTimeForm(forms.Form):
message = forms.CharField(
widget=forms.Textarea(
attrs={'rows':'5'}
)
)
days = forms.DecimalField(
initi... | agpl-3.0 | -3,614,336,686,322,137,000 | 26.970588 | 121 | 0.571804 | false |
kenorb/BitTorrent | twisted/protocols/policies.py | 2 | 17426 | # -*- test-case-name: twisted.test.test_policies -*-
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
#
"""Resource limiting policies.
@seealso: See also L{twisted.protocols.htb} for rate limiting.
"""
# system imports
import sys, operator
# twisted imports
from twisted.internet.pr... | gpl-3.0 | -1,337,991,955,031,797,200 | 31.151292 | 103 | 0.651268 | false |
Leoniela/nipype | nipype/interfaces/ants/base.py | 8 | 3737 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""The ants module provides basic functions for interfacing with ANTS tools."""
# Local imports
from ..base import (CommandLine, CommandLineInputSpec, traits,
isdefined)
from ... import logging
logger = l... | bsd-3-clause | 5,414,236,903,631,197,000 | 42.964706 | 100 | 0.678084 | false |
draekko/androguard | tools/api/androapi.py | 23 | 7202 | #!/usr/bin/env python
# This file is part of Androguard.
#
# Copyright (C) 2010, Anthony Desnos <desnos at t0t0.org>
# 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
#
... | apache-2.0 | -6,297,110,013,047,550,000 | 32.812207 | 176 | 0.500972 | false |
maurofaccenda/ansible | contrib/inventory/gce_googleapiclient.py | 1 | 13337 | #!/usr/bin/env python
"""
Google Cloud Engine Dynamic Inventory
=====================================
Before using:
- Authentication: this script uses the same authentication as gcloud command
line. So, set it up before according to:
https://cloud.google.com/ml-engine/docs/quickstarts/command-line
- Depend... | gpl-3.0 | 7,408,946,137,983,462,000 | 35.64011 | 129 | 0.59931 | false |
armills/agocontrol | devices/scheduler/agoscheduler.py | 2 | 31606 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# agoscheduler
# copyright (c) 2014 tang (tanguy.bonneau@gmail.com)
import sys
import os
import agoclient
import threading
import time
import logging
import json
import copy
from dateutil.relativedelta import *
from dateutil.rrule import *
from dateutil.parser import *... | gpl-3.0 | -5,674,381,481,719,515,000 | 38.556946 | 181 | 0.593811 | false |
jrising/prospectus-tools | gcp/extract/single.py | 1 | 1948 | """
Usage: `python single.py OPTIONS FILEPATH
Supported configuration options:
- config (default: none): read the options from a config file
- column (default: `rebased`)
- yearsets (default: `no`)
- year or years (default: `null`)
- region or regions (default: `null`)
"""
import sys, csv
from lib import bundles, con... | mit | 1,144,895,587,784,701,300 | 35.074074 | 113 | 0.588809 | false |
jschultz/Gooey | gooey/gui/windows/header.py | 2 | 2603 | '''
Created on Dec 23, 2013
@author: Chris
'''
import wx
from gooey.gui import imageutil, image_repository
from gooey.gui.util import wx_util
PAD_SIZE = 10
class FrameHeader(wx.Panel):
def __init__(self, parent=None, **kwargs):
wx.Panel.__init__(self, parent, **kwargs)
self.SetDoubleB... | mit | -4,890,559,889,068,914,000 | 27.579545 | 108 | 0.65655 | false |
UdeM-LBIT/GAPol | lib/TreeLib/params.py | 1 | 1616 | # This file is part of profileNJ
#
# params set duplication and losses cost for profileNJ and reconciliation
__author__ = "Emmanuel Noutahi"
import hashlib
import numpy as np
cdup, closs = 1, 1
dupcost, losscost = {}, {}
internal_type = 0
def set(dup, loss, constdlcost=(1, 1), internal_mode='default'):
global ... | gpl-3.0 | 5,027,785,877,860,318,000 | 26.87931 | 112 | 0.664604 | false |
fulfilio/trytond-sale-available-stock | setup.py | 2 | 3914 | #!/usr/bin/env python
import re
import os
import sys
import time
import unittest
import ConfigParser
from setuptools import setup, Command
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
class SQLiteTest(Command):
"""
Run the tests on SQLite
"""
description = ... | bsd-3-clause | -500,966,380,051,378,200 | 25.808219 | 79 | 0.586357 | false |
wong2/sentry | tests/sentry/api/endpoints/test_project_releases.py | 4 | 3567 | from __future__ import absolute_import
from datetime import datetime
from django.core.urlresolvers import reverse
from sentry.models import Release
from sentry.testutils import APITestCase
class ProjectReleaseListTest(APITestCase):
def test_simple(self):
self.login_as(user=self.user)
team = sel... | bsd-3-clause | -794,492,773,894,965,900 | 30.848214 | 69 | 0.594617 | false |
hydroshare/hydroshare_temp | hs_core/tests/api/http/test_get_revisions_view.py | 1 | 3636 | __author__ = 'shaunjl'
"""
Tastypie REST API tests for resolveDOI(view) modeled entirely after
test_get_revisions.py written by Pabitra Dash
"""
from tastypie.test import ResourceTestCase, TestApiClient
from django.contrib.auth.models import User
from hs_core import hydroshare
from tastypie.serializers import Seriali... | bsd-3-clause | 745,294,527,247,112,600 | 37.680851 | 84 | 0.666117 | false |
jeremiah-c-leary/vhdl-style-guide | vsg/tests/case/test_rule_007.py | 1 | 1203 |
import os
import unittest
from vsg.rules import case
from vsg import vhdlFile
from vsg.tests import utils
sTestDir = os.path.dirname(__file__)
lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_007_test_input.vhd'))
lExpected = []
lExpected.append('')
utils.read_file(os.path.join(sTestDir, 'ru... | gpl-3.0 | -2,404,013,222,632,069,600 | 24.0625 | 106 | 0.66916 | false |
GroestlCoin/electrum-grs | electrum_grs/plugins/revealer/hmac_drbg.py | 9 | 1826 | '''
Copyright (c) 2014 David Lazar <lazard@mit.edu>
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, publis... | gpl-3.0 | -7,607,971,278,986,841,000 | 34.803922 | 77 | 0.686199 | false |
wemanuel/smry | smry/server-auth/ls/google-cloud-sdk/.install/.backup/lib/googlecloudapis/apitools/base/py/util.py | 4 | 7010 | """Assorted utilities shared between parts of apitools."""
import collections
import os
import random
from protorpc import messages
import six
from six.moves import http_client
import six.moves.urllib.error as urllib_error
import six.moves.urllib.parse as urllib_parse
import six.moves.urllib.request as urllib_request... | apache-2.0 | 3,095,757,246,124,527,000 | 32.864734 | 80 | 0.685164 | false |
volpino/Yeps-EURAC | lib/galaxy/model/migrate/versions/0009_request_table.py | 1 | 2290 | """
This migration script adds a new column to 2 tables:
1) a new boolean type column named 'submitted' to the 'request' table
2) a new string type column named 'bar_code' to the 'sample' table
"""
from sqlalchemy import *
from sqlalchemy.orm import *
from migrate import *
from migrate.changeset import *
import sys, lo... | mit | -5,073,953,024,989,574,000 | 35.349206 | 95 | 0.633624 | false |
boehm-s/dotfiles | .emacs.d/elpy/rpc-venv/lib/python3.7/site-packages/pip/_vendor/packaging/specifiers.py | 5 | 28800 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import abc
import functools
import itertools
import re
from ._c... | gpl-3.0 | -8,638,099,803,205,713,000 | 35.209302 | 79 | 0.545903 | false |
AlphaSmartDog/DeepLearningNotes | Note-1 RNN-DNC择时/Note-1 初学RqAlpha——PonderLSTM和PonderDNC日频期货的简单应用/sonnet/python/modules/basic.py | 3 | 48619 | # Copyright 2017 The Sonnet 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 applicable l... | mit | -2,524,306,854,411,019,300 | 36.198929 | 80 | 0.644481 | false |
mastizada/kuma | kuma/demos/helpers.py | 1 | 13588 | import datetime
import functools
import hashlib
import random
from babel import localedata
import jinja2
from django.conf import settings
from django.core.cache import cache
from django.utils.tzinfo import LocalTimezone
import jingo
from jingo import register
from tower import ugettext as _
from tower import ugettex... | mpl-2.0 | -2,504,698,096,416,612,400 | 30.381062 | 79 | 0.628201 | false |
yongtang/tensorflow | tensorflow/python/tpu/training_loop.py | 9 | 9472 | # Copyright 2017 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 | 6,007,988,542,291,337,000 | 39.135593 | 97 | 0.655089 | false |
jcshen007/cloudstack | test/integration/component/test_acl_isolatednetwork.py | 3 | 50928 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 841,529,715,351,655,700 | 43.246742 | 201 | 0.615084 | false |
gavinandresen/bitcoin-git | share/qt/extract_strings_qt.py | 12 | 2526 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt stringdefs so that
they can be picked up by Qt linguist.
'''
from __future__ import division,print_function,unicode_literals
from subprocess import Popen, PIPE
import glob
import operator
import os
import sys
OUT_CPP="qt/bitcoinstrings.cp... | mit | -8,493,147,293,304,912,000 | 28.034483 | 106 | 0.612035 | false |
mjbrewer/testindex | magnum/tests/unit/api/controllers/v1/test_x509keypair.py | 7 | 13729 | # Copyright 2015 NEC Corporation. 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 a... | apache-2.0 | -3,933,161,691,942,718,500 | 44.460265 | 79 | 0.641853 | false |
Castronova/EMIT | api_old/ODM2/LikeODM1/services/record_service.py | 1 | 8238 |
from wx.lib.pubsub import pub as Publisher
class RecordService():
# Script header (imports etc.) will be set up in Main when record is clicked.
def __init__(self, script, edit_service, connection_string, record=False):
self._script = script
self._edit_service = edit_service
self._co... | gpl-2.0 | 2,349,401,841,005,918,000 | 35.451327 | 138 | 0.580117 | false |
dpwrussell/openmicroscopy | components/tools/OmeroWeb/omeroweb/webgateway/marshal.py | 1 | 19351 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2016 University of Dundee & Open Microscopy Environment.
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software... | gpl-2.0 | 7,000,183,557,897,163,000 | 38.491837 | 83 | 0.538163 | false |
xqliu/coursera | 6.00.1x_IntroductionToComputerScienceAndProgramming/ProblemSet4/ps4b.py | 1 | 6470 | from ps4a import *
import time
#
#
# Problem #6: Computer chooses a word
#
#
def compChooseWord(hand, wordList, n):
"""
Given a hand and a wordList, find the word that gives
the maximum value score, and return it.
This word should be calculated by considering all the words
in the wordList.
... | mit | 3,226,312,288,263,787,000 | 36.183908 | 169 | 0.574034 | false |
tobias47n9e/social-core | social_core/backends/vend.py | 5 | 1227 | """
Vend OAuth2 backend:
"""
from .oauth import BaseOAuth2
class VendOAuth2(BaseOAuth2):
name = 'vend'
AUTHORIZATION_URL = 'https://secure.vendhq.com/connect'
ACCESS_TOKEN_URL = 'https://{0}.vendhq.com/api/1.0/token'
ACCESS_TOKEN_METHOD = 'POST'
REDIRECT_STATE = False
EXTRA_DATA = [
(... | bsd-3-clause | -1,724,783,308,075,950,600 | 30.461538 | 71 | 0.566422 | false |
HyperBaton/ansible | lib/ansible/modules/network/fortios/fortios_spamfilter_dnsbl.py | 7 | 11149 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | gpl-3.0 | 8,198,966,180,892,313,000 | 29.545205 | 97 | 0.552247 | false |
adoosii/edx-platform | lms/startup.py | 2 | 5390 | """
Module for code that should run during LMS startup
"""
# pylint: disable=unused-argument
from django.conf import settings
# Force settings to run so that the python path is modified
settings.INSTALLED_APPS # pylint: disable=pointless-statement
from openedx.core.lib.django_startup import autostartup
import edxm... | agpl-3.0 | -2,560,384,727,025,535,000 | 33.774194 | 99 | 0.684972 | false |
jmartinezchaine/OpenERP | openerp/addons/point_of_sale/wizard/pos_sales_user.py | 9 | 2221 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -7,650,896,322,884,492,000 | 35.409836 | 96 | 0.580369 | false |
dancingdan/tensorflow | tensorflow/python/kernel_tests/substr_op_test.py | 6 | 20111 | # 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 | -5,872,511,195,430,174,000 | 40.211066 | 80 | 0.496196 | false |
joachimmetz/plaso | tests/parsers/zsh_extended_history.py | 3 | 1922 | #!/usr/bin/env python3
# -*_ coding: utf-8 -*-
"""Tests for the Zsh extended_history parser."""
import unittest
from plaso.parsers import zsh_extended_history
from tests.parsers import test_lib
class ZshExtendedHistoryTest(test_lib.ParserTestCase):
"""Tests for the Zsh extended_history parser."""
def testPars... | apache-2.0 | 4,767,368,761,887,004,000 | 30.508197 | 75 | 0.676899 | false |
MjAbuz/flask | flask/testsuite/testing.py | 1 | 7411 | # -*- coding: utf-8 -*-
"""
flask.testsuite.testing
~~~~~~~~~~~~~~~~~~~~~~~
Test client and more.
:copyright: (c) 2014 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
from flask.testsuite import FlaskTestCase
from flask._compat import text_type
c... | bsd-3-clause | -4,079,166,665,988,013,000 | 29.623967 | 80 | 0.538254 | false |
massimo-zaniboni/netrobots | server/rest_api/configuration.py | 2 | 7174 | # coding: utf-8
"""
Copyright 2016 SmartBear Software
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... | gpl-3.0 | -3,508,052,409,785,501,700 | 30.056277 | 97 | 0.596181 | false |
nwjs/chromium.src | third_party/blink/tools/blinkpy/style/patchreader.py | 2 | 2840 | # Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
# Copyright (C) 2010 ProFUSION embedded systems
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | bsd-3-clause | -975,206,121,481,361,300 | 42.692308 | 90 | 0.713732 | false |
idaholab/raven | framework/Databases/__init__.py | 1 | 1355 | # Copyright 2017 Battelle Energy Alliance, 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | 1,328,735,218,116,621,600 | 30.511628 | 74 | 0.772694 | false |
jhreinholdt/collatz-conjecture | collatz_conjecture.py | 1 | 1190 | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 18 16:03:24 2017
@author: jorei
"""
#Collatz Conjecture - Start with a number n > 1.
#Find the number of steps it takes to reach one using the following process:
#If n is even, divide it by 2. If n is odd, multiply it by 3 and add 1.
import matplotlib.pyplot... | mit | -716,338,628,596,278,000 | 25.72093 | 77 | 0.562185 | false |
herove/dotfiles | sublime/Packages/SublimeCodeIntel/libs/inflector/Rules/Base.py | 2 | 6613 | #!/usr/bin/env python
# Copyright (c) 2006 Bermi Ferrer Martinez
# info at bermi dot org
# See the end of this file for the free software, open source license
# (BSD-style).
import re
class Base:
'''Locale inflectors must inherit from this base class inorder to provide
the basic Inflector functionality'''
... | mit | -3,599,438,972,841,421,000 | 43.086667 | 390 | 0.642522 | false |
helenwarren/pied-wagtail | wagtail/wagtaildocs/wagtail_hooks.py | 1 | 1464 | from django.conf import settings
from django.conf.urls import include, url
from django.core import urlresolvers
from django.utils.html import format_html, format_html_join
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailadmin import hooks
from wagtail.wagtailadmin.menu import MenuItem
from... | bsd-3-clause | -6,834,067,793,087,028,000 | 31.533333 | 131 | 0.681011 | false |
zak-k/iris | tools/gen_stash_refs.py | 14 | 4827 | # (C) British Crown Copyright 2013 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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 l... | gpl-3.0 | 1,901,862,876,571,535,400 | 32.289655 | 88 | 0.588357 | false |
DayGitH/Python-Challenges | DailyProgrammer/DP20151214A.py | 1 | 2774 | """
[2015-12-14] Challenge # 245 [Easy] Date Dilemma
https://www.reddit.com/r/dailyprogrammer/comments/3wshp7/20151214_challenge_245_easy_date_dilemma/
# Description
Yesterday, Devon the developer made an awesome webform, which the sales team would use to record the results from
today's big new marketing campaign, bu... | mit | 5,571,221,075,342,877,000 | 30.168539 | 119 | 0.69106 | false |
TonyShield/Whatever | parse.py | 1 | 1531 | #encoding=utf-8
import jieba
import stem
import stop_words
class Parser(object):
def __init__(self):
self.__stemmer = stem.PorterStemmer()
s = stop_words.get_stop_words('en')
self.__stopwords = []
for word in s:
if word.isalpha():
self.__stopwords.append(... | agpl-3.0 | 2,030,494,398,209,831,400 | 35.195122 | 92 | 0.436952 | false |
fernandalavalle/mlab-ns | server/mapreduce/input_readers.py | 2 | 70093 | #!/usr/bin/env python
#
# Copyright 2010 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 applicable law o... | apache-2.0 | 3,572,940,923,067,458,000 | 35.186371 | 80 | 0.654973 | false |
CenterForOpenScience/SHARE | share/schema/shapes.py | 2 | 1146 | from enum import Enum
from typing import Set, NamedTuple, Optional, Tuple
RelationShape = Enum('RelationShape', ['MANY_TO_MANY', 'MANY_TO_ONE', 'ONE_TO_MANY'])
AttributeDataType = Enum('AttributeDataType', ['BOOLEAN', 'STRING', 'INTEGER', 'DATETIME', 'OBJECT'])
AttributeDataFormat = Enum('AttributeDataFormat', ['URI'... | apache-2.0 | 8,417,613,205,347,932,000 | 28.384615 | 101 | 0.706806 | false |
nikmolnar/python-sld | sld/run_tests.py | 2 | 1347 | #!/usr/bin/env python
"""
Testing fixture for StyledLayerDescriptor library.
License
=======
Copyright 2011-2014 David Zwarg <U{david.a@zwarg.com}>
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 | -6,708,301,877,772,915,000 | 27.0625 | 84 | 0.717149 | false |
dodger487/MIST | data/magnetak_plot.py | 1 | 8973 | """
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in... | apache-2.0 | 1,342,547,384,469,074,400 | 33.914397 | 99 | 0.663881 | false |
jskurka/PyChess-Learning-Module | setup.py | 1 | 5135 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from imp import load_module, find_module
pychess = load_module("pychess", *find_module("pychess",["lib"]))
from distutils.core import setup
from glob import glob
from os import listdir
from os.path import isdir, isfile
import os
import sys
# To run "setup.py register" ch... | gpl-3.0 | -1,360,995,317,106,970,000 | 37.609023 | 144 | 0.644791 | false |
Duke-NSOE/GeoHAT | GeoHat_V10/Scripts/networkx/algorithms/tests/test_core.py | 16 | 4195 | #!/usr/bin/env python
from nose.tools import *
import networkx as nx
class TestCore:
def setUp(self):
# G is the example graph in Figure 1 from Batagelj and
# Zaversnik's paper titled An O(m) Algorithm for Cores
# Decomposition of Networks, 2003,
# http://arXiv.org/abs/cs/0310049. ... | cc0-1.0 | 7,264,925,824,296,135,000 | 35.798246 | 78 | 0.56472 | false |
kriswuollett/grpc | src/python/grpcio/grpc/beta/_server_adaptations.py | 19 | 14757 | # Copyright 2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause | -1,663,827,651,052,878,600 | 36.549618 | 82 | 0.640984 | false |
UTSDataArena/examples | earth/LoadKML.py | 1 | 1342 | # TODO: append GeoLoader package to python search path in omegalib: workaround
import os.path, sys
basePath = os.path.dirname(os.path.abspath(__file__)) # for current dir of file
modulePath = os.path.dirname(basePath) # for GeoLoader packages - '/local/examples'
sys.path.append(modulePath)
from omega import setEventF... | bsd-2-clause | 7,411,220,163,943,094,000 | 29.5 | 83 | 0.771237 | false |
hackebrot/pytest | testing/test_helpconfig.py | 3 | 2111 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest
from _pytest.main import EXIT_NOTESTSCOLLECTED
def test_version(testdir, pytestconfig):
result = testdir.runpytest("--version")
assert result.ret == 0
# p = py.path.local(py.__file__... | mit | -7,620,794,595,243,463,000 | 26.415584 | 80 | 0.646139 | false |
RipcordSoftware/replication-monitor | ui/new_replications_window.py | 2 | 2058 | from gi.repository import Gtk, Gdk, GObject
from src.gtk_helper import GtkHelper
class NewReplicationsWindow:
def __init__(self, builder, hide_callback=None):
self._win = builder.get_object('window_new_replications', target=self, include_children=True)
self._hide_callback = hide_callback
... | mit | -8,508,211,357,497,981,000 | 32.737705 | 101 | 0.578717 | false |
sumerc/yappi | tests/test_hooks.py | 1 | 7136 | import re
import subprocess
import sys
import unittest
import time
import yappi
import utils
def a():
pass
class ContextIdCallbackTest(utils.YappiUnitTestCase):
"""Test yappi.set_context_id_callback()."""
def test_profile_single_context(self):
def id_callback():
return self.callba... | mit | -4,016,871,694,571,817,000 | 26.13308 | 79 | 0.578055 | false |
endlessm/chromium-browser | third_party/catapult/firefighter/default/handlers/trace.py | 7 | 1172 | # Copyright 2015 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.
import urllib
import webapp2
from common import jinja
from common import query_filter
class Trace(webapp2.RequestHandler):
def get(self):
try:
... | bsd-3-clause | -5,157,119,744,680,215,000 | 29.842105 | 72 | 0.683447 | false |
rrahn/gdf_tools | include/seqan/apps/tree_recon/tests/run_tests.py | 13 | 3621 | #!/usr/bin/env python
"""Execute the tests for the tree_recomb program.
The golden test outputs are generated by the script generate_outputs.sh.
You have to give the root paths to the source and the binaries as arguments to
the program. These are the paths to the directory that contains the 'projects'
directory.
Us... | gpl-3.0 | 3,598,783,130,950,774,300 | 34.5 | 79 | 0.481911 | false |
patjouk/djangogirls | organize/tests/test_models.py | 1 | 3370 | import vcr
from django.core import mail
from django.core.exceptions import ValidationError
from django.test import TestCase
from organize.constants import DEPLOYED, ON_HOLD, REJECTED
from organize.models import EventApplication
from core.models import Event, User
class EventApplicationTest(TestCase):
fixtures = ... | bsd-3-clause | -4,528,928,447,635,633,700 | 36.865169 | 122 | 0.675074 | false |
hospace/ToughRADIUS | toughradius/console/customer/forms.py | 3 | 5988 | #coding:utf-8
from toughradius.console.libs import pyforms
from toughradius.console.libs.pyforms import dataform
from toughradius.console.libs.pyforms import rules
from toughradius.console.libs.pyforms.rules import button_style,input_style
boolean = {0:u"否", 1:u"是"}
sexopt = {1:u"男",0:u"女"}
member_login_form = pyfor... | agpl-3.0 | -7,405,204,193,205,255,000 | 52.25 | 130 | 0.653666 | false |
aspc/mainsite | aspc/events/backends/facebook.py | 1 | 6686 | import dateutil.parser
from django.conf import settings
import requests
import urlparse
from aspc.events.exceptions import InvalidEventException, InvalidFacebookEventPageException
import re
import logging
import pytz
import json
from datetime import datetime, timedelta
logger = logging.getLogger(__name__)
class Faceb... | mit | 6,455,790,034,031,716,000 | 37.425287 | 133 | 0.608884 | false |
CenterForOpenScience/SHARE | tests/share/metadata_formats/test_oai_dc_formatter.py | 2 | 3827 | from lxml import etree
from tests.share.metadata_formats.base import BaseMetadataFormatterTest
def xml_elements_equal(element_1, element_2):
return (
element_1.tag == element_2.tag
and element_1.text == element_2.text
and element_1.tail == element_2.tail
and element_1.attrib == el... | apache-2.0 | -5,439,439,050,747,447,000 | 44.559524 | 224 | 0.604651 | false |
msabramo/PyHamcrest | src/hamcrest/library/text/isequal_ignoring_whitespace.py | 6 | 1667 | __author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"
from hamcrest.core.base_matcher import BaseMatcher
import six
def stripspace(string):
result = ''
last_was_space = True
for character in string:
if character.isspace():
if not la... | bsd-3-clause | -8,010,375,042,774,392,000 | 28.245614 | 79 | 0.64787 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.