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 |
|---|---|---|---|---|---|---|---|---|---|---|
joshuahoman/vivisect | vivisect/base.py | 2 | 23578 | import Queue
import traceback
import threading
import collections
import envi
import envi.memory as e_mem
import envi.pagelookup as e_page
import envi.codeflow as e_codeflow
import vstruct.cparse as vs_cparse
import vstruct.builder as vs_builder
import vstruct.constants as vs_const
import vivisect.const as viv_const... | apache-2.0 | 4,224,038,362,557,105,700 | 32.827834 | 107 | 0.591526 | false |
Lemma1/MAC-POSTS | src/pybinder/pybind11/tests/test_numpy_array.py | 8 | 14777 | import pytest
from pybind11_tests import numpy_array as m
pytestmark = pytest.requires_numpy
with pytest.suppress(ImportError):
import numpy as np
@pytest.fixture(scope='function')
def arr():
return np.array([[1, 2, 3], [4, 5, 6]], '=u2')
def test_array_attributes():
a = np.array(0, 'f8')
assert m... | mit | 2,836,450,355,394,470,400 | 35.758706 | 99 | 0.597009 | false |
j-carpentier/nova | nova/tests/unit/api/openstack/compute/test_volumes.py | 9 | 38890 | # Copyright 2013 Josh Durgin
# Copyright 2013 Red Hat, 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-... | apache-2.0 | -4,335,558,850,881,914,000 | 39.051493 | 79 | 0.586012 | false |
jakevdp/spheredb | spheredb/hpx_utils.py | 1 | 2943 | """HEALPix Utilities"""
import numpy as np
def RAdec_to_HPX(RA, dec):
"""Convert RA/dec to healpix
Parameters
----------
RA, dec : degrees
Returns
-------
x, y : degrees
See Section 6 of Calabretta & Roukema, Mapping on the HEALPix grid
"""
H, K = 4.0, 3.0
RA = np.asarr... | bsd-3-clause | -1,399,782,932,874,408,000 | 25.754545 | 74 | 0.498471 | false |
City-of-Helsinki/kuulemma | kuulemma/forms/sign_up.py | 2 | 2193 | # -*- coding: utf-8 -*-
# Kuulemma
# Copyright (C) 2014, Fast Monkeys Oy
#
# 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 Foundation, either version 3 of the License, or
# (at your option) any later... | agpl-3.0 | -6,837,181,214,356,372,000 | 33.142857 | 79 | 0.647141 | false |
mway08/grpc | src/python/interop/interop/client.py | 8 | 4235 | # Copyright 2015, 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,769,432,103,839,377,700 | 37.5 | 97 | 0.727509 | false |
philanthropy-u/edx-platform | common/test/acceptance/pages/lms/course_page.py | 24 | 1158 | """
Base class for pages in courseware.
"""
from bok_choy.page_object import PageObject
from common.test.acceptance.pages.lms import BASE_URL
from common.test.acceptance.pages.lms.tab_nav import TabNavPage
class CoursePage(PageObject):
"""
Abstract base class for page objects within a course.
"""
#... | agpl-3.0 | 7,720,485,328,744,148,000 | 27.243902 | 78 | 0.626079 | false |
hackerkid/zulip | zerver/lib/message.py | 1 | 49744 | import copy
import datetime
import zlib
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Sequence, Set, Tuple
import ahocorasick
import orjson
from django.db import connection
from django.db.models import Max, Sum
from django.utils.timezone import now as timezone_now
from django.u... | apache-2.0 | 8,241,790,482,959,836,000 | 34.254429 | 100 | 0.61911 | false |
marek-sezemsky/coreemu | daemon/core/misc/ipaddr.py | 11 | 6985 | #
# CORE
# Copyright (c)2010-2012 the Boeing Company.
# See the LICENSE file included in this distribution.
#
# author: Tom Goff <thomas.goff@boeing.com>
#
'''
ipaddr.py: helper objects for dealing with IPv4/v6 addresses.
'''
import socket
import struct
import random
AF_INET = socket.AF_INET
AF_INET6 = socket.AF_INET... | bsd-2-clause | 5,247,344,145,343,764,000 | 29.369565 | 87 | 0.528132 | false |
ronkyo/mi-instrument | mi/idk/platform/switch_driver.py | 11 | 3321 | """
@file coi-services/mi/idk/platform/switch_driver.py
@author Bill French
@brief Main script class for running the switch_driver process
"""
from os.path import exists, join, isdir
from os import listdir
from mi.idk.metadata import Metadata
from mi.idk.comm_config import CommConfig
from mi.idk.config import Config
... | bsd-2-clause | -8,164,659,112,145,360,000 | 29.190909 | 83 | 0.595303 | false |
sysadmin75/ansible | test/lib/ansible_test/_internal/cloud/hcloud.py | 19 | 3099 | """Hetzner Cloud plugin for integration tests."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
from ..util import (
display,
ConfigParser,
)
from . import (
CloudProvider,
CloudEnvironment,
CloudEnvironmentConfig,
)
from ..core_ci import (
... | gpl-3.0 | 2,734,247,036,087,165,400 | 25.715517 | 142 | 0.609229 | false |
motion2015/edx-platform | lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py | 114 | 10407 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'OrderItem.service_fee'
db.add_column('shoppingcart_orderitem', 'service_fee',
... | agpl-3.0 | 1,544,607,153,648,904,200 | 72.288732 | 182 | 0.562506 | false |
boudinfl/pke | pke/supervised/neural_based/seq2seq.py | 1 | 1171 | # -*- coding: utf-8 -*-
# Author: Florian Boudin
# Date: 11-11-2018
"""
Implementation of the Seq2Seq model for automatic keyphrase extraction.
"""
from __future__ import absolute_import
from __future__ import print_function
from pke.supervised.api import SupervisedLoadFile
class Seq2Seq(SupervisedLoadFile):
... | gpl-3.0 | 2,304,112,351,493,401,900 | 25.613636 | 72 | 0.601196 | false |
ahmadio/edx-platform | common/djangoapps/enrollment/data.py | 39 | 9283 | """
Data Aggregation Layer of the Enrollment API. Collects all enrollment specific data into a single
source to be used throughout the API.
"""
import logging
from django.contrib.auth.models import User
from opaque_keys.edx.keys import CourseKey
from enrollment.errors import (
CourseNotFoundError, CourseEnrollmen... | agpl-3.0 | 817,833,241,314,472,700 | 32.879562 | 102 | 0.682107 | false |
alexknvl/mbody | wire_loops.py | 1 | 2403 | from numpy import *
from ellip import ellipe, ellipk
from const import *
import unittest
def wire_loop_field(radius, x, y, z):
rr = radius
r1 = sqrt(x**2 + y**2)
if r1 == 0:
return array([0, 0, 2 * pi * rr ** 2 / pow(rr**2 + z**2, 1.5)]) * kMagneticConstant / (4 * kPi)
theta = arctan2(y, x)
... | mit | -2,936,108,847,077,385,700 | 37.758065 | 234 | 0.540158 | false |
MSFTOSSMgmt/WPSDSCLinux | Providers/Scripts/2.4x-2.5x/Scripts/nxOMSPerfCounter.py | 2 | 13033 | #!/usr/bin/env python
#============================================================================
# Copyright (C) Microsoft Corporation, All rights reserved.
#============================================================================
import os
import imp
import re
import codecs
protocol = imp.load_source('protoco... | mit | -2,551,377,977,865,066,500 | 36.559078 | 172 | 0.596869 | false |
pombredanne/MOG | nova/openstack/common/rpc/__init__.py | 13 | 11696 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not... | apache-2.0 | -8,517,661,493,546,626,000 | 37.222222 | 79 | 0.621409 | false |
noisymime/zookeepr | zkpylons/controllers/location.py | 3 | 6620 | import logging
import vobject
from pylons import request, response, session, tmpl_context as c
from zkpylons.lib.helpers import redirect_to
from pylons.decorators import validate
from pylons.decorators.rest import dispatch_on
from formencode import validators, htmlfill, ForEach, Invalid
from formencode.variabledecode... | gpl-2.0 | -7,040,212,445,718,217,000 | 39.365854 | 144 | 0.649245 | false |
PlanetHunt/planet-hunt | app/startup/init_app.py | 1 | 3214 | # Copyright 2014 SolidBuilds.com. All rights reserved
#
# Authors: Ling Thio <ling.thio@gmail.com>
import logging
from logging.handlers import SMTPHandler
from flask_mail import Mail
from flask_user import UserManager, SQLAlchemyAdapter
def init_app(app, db, extra_config_settings={}):
"""
Initialize Flask app... | bsd-2-clause | 8,879,478,152,464,151,000 | 38.679012 | 110 | 0.658681 | false |
robbi/pyload | module/plugins/hoster/SenditCloud.py | 7 | 1339 | # -*- coding: utf-8 -*-
from ..internal.SimpleHoster import SimpleHoster
class SenditCloud(SimpleHoster):
__name__ = "SenditCloud"
__type__ = "hoster"
__version__ = "0.01"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?sendit\.cloud/\w+'
__config__ = [("activated", "bool", "Activa... | gpl-3.0 | 3,190,155,604,643,007,500 | 37.285714 | 95 | 0.566094 | false |
QuicklyRainbow/FieldGuideAU | Flask_App/utils/models/data_service.py | 1 | 7774 | __author__ = 'lachlan'
import logging
class ServiceLayerError(Exception):
pass
class DataService(object):
def __init__(self, db_session):
self.db = db_session
self.tablename = None
self.bad_keys = ['id'] # Fields that should not be created or updated using uploaded data. They need to... | mit | 1,720,140,140,062,181,400 | 41.255435 | 140 | 0.530486 | false |
turbulenz/turbulenz_tools | turbulenz_tools/tools/xml2json.py | 1 | 3268 | #!/usr/bin/env python
# Copyright (c) 2010-2013 Turbulenz Limited
import logging
from re import sub
from optparse import OptionParser, OptionGroup, TitledHelpFormatter
from turbulenz_tools.utils.xml_json import xml2json
from turbulenz_tools.tools.stdtool import simple_options
__version__ = '1.0.0'
__dependencies__ ... | mit | 4,993,451,341,559,350,000 | 42 | 118 | 0.624847 | false |
kercos/PickMeUp | route.py | 1 | 5323 | # -*- coding: utf-8 -*-
from google.appengine.ext import ndb
from utility import convertToUtfIfNeeded
class Route(ndb.Model):
#percorso = ndb.StringProperty() # id
percorso_info = ndb.PickleProperty()
# list of route info:
# for each route ->
# {route_intermediates_fermate: <list>,
# route_du... | apache-2.0 | -2,114,500,600,788,252,000 | 39.9 | 111 | 0.657326 | false |
chunywang/crosswalk-test-suite | webapi/tct-csp-w3c-tests/csp-py/csp_media-src_corss-origin_video_blocked_int.py | 30 | 3099 | def main(request, response):
import simplejson as json
f = file('config.json')
source = f.read()
s = json.JSONDecoder().decode(source)
url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1])
url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0])
_CSP = "media-src http://www.... | bsd-3-clause | 7,233,694,666,239,378,000 | 42.647887 | 98 | 0.68635 | false |
kanak87/oldboy_rep | yong_celeb_recognize/image.py | 1 | 1069 | import cv2
from matplotlib import pyplot
import numpy as np
def read_sample(filenames):
images = []
for filename in filenames:
image = cv2.imread(filename)
image = cv2.resize(image, (96, 96))
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
image_array = []
for y in ra... | mit | 6,226,666,312,204,681,000 | 24.47619 | 72 | 0.573433 | false |
daineseh/kodi-plugin.video.ted-talks-chinese | youtube_dl/extractor/tnaflix.py | 10 | 11477 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
fix_xml_ampersands,
float_or_none,
int_or_none,
parse_duration,
str_to_int,
xpath_text,
)
class TNAFlixNetworkBaseIE(InfoExtractor):
# May be overridd... | gpl-2.0 | -8,878,899,810,516,388,000 | 36.877888 | 145 | 0.541431 | false |
alhashash/odoo | addons/hr_holidays/report/holidays_summary_report.py | 7 | 7334 | # -*- 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 | -5,709,277,890,058,954,000 | 53.333333 | 227 | 0.585901 | false |
selahssea/ggrc-core | src/ggrc/converters/handlers/custom_attribute.py | 4 | 7690 | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Handlers used for custom attribute columns."""
from dateutil.parser import parse
from sqlalchemy import and_
from ggrc import models
from ggrc.converters import errors
from ggrc.converters.handlers imp... | apache-2.0 | 8,865,814,761,532,145,000 | 33.954545 | 79 | 0.680104 | false |
mlperf/training_results_v0.5 | v0.5.0/google/cloud_v3.8/gnmt-tpuv3-8/code/gnmt/model/t2t/tensor2tensor/models/research/universal_transformer_util.py | 3 | 66281 | # 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 | 4,190,197,228,734,371,300 | 33.378112 | 80 | 0.658831 | false |
SEMAFORInformatik/femagtools | femagtools/gmsh.py | 1 | 3903 | # -*- coding: utf-8 -*-
"""
femagtools.gmsh
~~~~~~~~~~~~~~~~
Handle gmsh models
"""
import numpy as np
import logging
class Gmsh(object):
def __init__(self, mshfile):
import meshio
self.m = meshio.read(mshfile)
self.r = np.linalg.norm(self.m.points, axis=1)
self.phi =... | bsd-2-clause | 7,853,747,746,885,079,000 | 31.256198 | 95 | 0.487061 | false |
broxtronix/distributed | distributed/tests/test_nanny.py | 1 | 3622 | from __future__ import print_function, division, absolute_import
from datetime import datetime
import os
import sys
from time import time
import pytest
from toolz import valmap
from tornado.tcpclient import TCPClient
from tornado.iostream import StreamClosedError
from tornado import gen
from distributed import Nanny... | bsd-3-clause | -1,880,225,421,499,286,800 | 26.648855 | 70 | 0.6455 | false |
mavit/ansible | lib/ansible/modules/network/cnos/cnos_backup.py | 10 | 11252 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, Inc.
#
# 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 Licens... | gpl-3.0 | -1,848,159,835,767,778,600 | 37.40273 | 114 | 0.648507 | false |
GastonLab/ddb-toil_test | test.py | 1 | 1936 | #!/usr/bin/env python
from toil.job import Job
import os
def globalFileStoreJobFn(job):
job.fileStore.logToMaster("The following example exercises all the"
" methods provided by the"
" toil.fileStore.FileStore class")
scratchFile = job.fileStore.ge... | mit | -7,528,098,965,882,290,000 | 36.980392 | 76 | 0.692665 | false |
Wilee999/panda3d | direct/src/showbase/LeakDetectors.py | 11 | 12662 | # objects that report different types of leaks to the ContainerLeakDetector
from pandac.PandaModules import *
from direct.showbase.DirectObject import DirectObject
from direct.showbase.Job import Job
import __builtin__, gc
class LeakDetector:
def __init__(self):
# put this object just under __builtins__ w... | bsd-3-clause | 6,030,039,357,654,520,000 | 34.368715 | 100 | 0.614674 | false |
Jokeren/neon | examples/fast-rcnn/inference.py | 1 | 6411 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015-2016 Nervana Systems 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
#... | apache-2.0 | -8,089,277,523,610,130,000 | 37.160714 | 94 | 0.667915 | false |
w1ll1am23/home-assistant | tests/components/ozw/test_climate.py | 14 | 11016 | """Test Z-Wave Multi-setpoint Climate entities."""
from homeassistant.components.climate import ATTR_TEMPERATURE
from homeassistant.components.climate.const import (
ATTR_CURRENT_TEMPERATURE,
ATTR_FAN_MODE,
ATTR_FAN_MODES,
ATTR_HVAC_ACTION,
ATTR_HVAC_MODES,
ATTR_PRESET_MODE,
ATTR_PRESET_MODE... | apache-2.0 | 1,312,410,803,001,183,000 | 32.688073 | 88 | 0.618646 | false |
HerlanAssis/Django-AulaOsvandoSantana | lib/python2.7/site-packages/django/forms/models.py | 10 | 55377 | """
Helper functions for creating Form classes from Django models
and database field objects.
"""
from __future__ import unicode_literals
import warnings
from collections import OrderedDict
from itertools import chain
from django.core.exceptions import (
NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, Valida... | mit | -4,313,641,301,726,599,000 | 40.730972 | 116 | 0.586399 | false |
mat12/mytest | lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py | 7 | 26313 | from Screens.Screen import Screen
from Screens.ChannelSelection import ChannelSelectionBase
from Components.ActionMap import ActionMap
from Components.Sources.StaticText import StaticText
from Components.config import config, ConfigNothing
from Components.ConfigList import ConfigList
from Components.Label import Label
... | gpl-2.0 | -6,624,194,504,077,798,000 | 39.419355 | 224 | 0.680424 | false |
antoine-levitt/wannier | tests/KaneMele/kanemele.py | 1 | 7793 | from __future__ import division
import sys
from numpy import *
from numpy.linalg import *
import matplotlib.pyplot as plt
#from mpl_toolkits.mplot3d import Axes3D
PLOT_EIG = False
WRITE_AMN = True
#Define some useful matrices
I = eye(2)
sigma_x = array([[0, 1],[1, 0]])
sigma_y = array([[0, -1j],[1j, 0]])
sigma_z =... | mit | -1,328,779,657,670,939,600 | 30.678862 | 185 | 0.478763 | false |
kisel/trex-core | scripts/external_libs/elasticsearch/elasticsearch/connection/base.py | 3 | 4906 | import logging
try:
import simplejson as json
except ImportError:
import json
from ..exceptions import TransportError, HTTP_EXCEPTIONS
logger = logging.getLogger('elasticsearch')
# create the elasticsearch.trace logger, but only set propagate to False if the
# logger hasn't already been configured
_tracer_al... | apache-2.0 | -641,368,096,871,400,000 | 38.564516 | 139 | 0.612923 | false |
xuewei4d/scikit-learn | sklearn/utils/tests/test_fixes.py | 4 | 3281 | # Authors: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Justin Vincent
# Lars Buitinck
# License: BSD 3 clause
import math
import numpy as np
import pytest
import scipy.stats
from sklearn.utils._testing import assert_array_equal
from sklearn.utils.fixes import _joblib_parallel_args
from sklear... | bsd-3-clause | 1,962,554,988,841,810,400 | 35.054945 | 79 | 0.605608 | false |
2ndQuadrant/ansible | lib/ansible/modules/cloud/vultr/vultr_server.py | 2 | 31379 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2017, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 9,218,975,227,851,380,000 | 33.291803 | 126 | 0.536189 | false |
mrquim/repository.mrquim | repo/script.module.schism.common/lib/incapsula/config.py | 10 | 1861 | """
This module should work out of the box.
If there are problems, then it may need to be manually configured.
Configure by typing the following variables into your web browser console and checking their output:
navigator
if this returns undefined then config['navigator']['exists'] = False, otherwise True... | gpl-2.0 | 5,120,729,821,055,526,000 | 31.649123 | 114 | 0.652337 | false |
rsalveti/zephyr | scripts/scl.py | 9 | 2327 | #! /usr/bin/python
#
# Zephyr's Sanity Check library
#
# Set of code that other projects can also import to do things on
# Zephyr's sanity check testcases.
import logging
import os
import yaml
log = logging.getLogger("scl")
#
#
def yaml_load(filename):
"""
Safely load a YAML document
Follows recomendati... | apache-2.0 | -7,141,337,390,780,891,000 | 31.319444 | 94 | 0.670821 | false |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/compat/__init__.py | 1 | 2502 | """
compat
======
Cross-compatible functions for different versions of Python.
Other items:
* platform checker
"""
import platform
import struct
import sys
import warnings
PY35 = sys.version_info[:2] == (3, 5)
PY36 = sys.version_info >= (3, 6)
PY37 = sys.version_info >= (3, 7)
PY38 = sys.version_info >= (3, 8)
PYPY ... | apache-2.0 | 7,622,572,007,694,950,000 | 24.530612 | 79 | 0.623102 | false |
indashnet/InDashNet.Open.UN2000 | android/external/chromium_org/third_party/WebKit/Tools/TestResultServer/handlers/buildershandler_unittest.py | 1 | 7276 | #!/usr/bin/env python
# Copyright (C) 2012 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 ... | apache-2.0 | -6,678,782,997,288,826,000 | 50.239437 | 179 | 0.619709 | false |
pymonger/prov-0.5.4 | prov/persistence/tests.py | 1 | 1453 | """Test cases for the prov.persistence Django app
@author: Trung Dong Huynh <trungdong@donggiang.com>
@copyright: University of Southampton 2014
"""
import unittest
import logging
from prov.model.test import examples
from prov.persistence.models import save_bundle, PDBundle
logger = logging.getLogger(__name__)
cla... | mit | -1,127,868,869,633,103,200 | 35.325 | 92 | 0.653131 | false |
h3biomed/ansible | lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py | 2 | 11780 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCU... | gpl-3.0 | 1,622,481,138,571,564,500 | 36.75641 | 159 | 0.621477 | false |
Wyss/mascpcr | tests/test_pipeline.py | 1 | 2863 | import filecmp
import os
import unittest
from mascpcr import pipeline, genbankfeatures
from ._common import RECODED_GENOME_FP, REFERENCE_GENOME_FP, TEST_OUTPUT_DIR, \
TEST_CACHE_DIR, REFERENCE_GB_STR, RECODED_GB_STR, \
REFERENCE_GB, RECODED_GB
class TestPipeline(unittest.Tes... | gpl-2.0 | 6,397,947,026,232,318,000 | 40.492754 | 86 | 0.5854 | false |
meatough/Marks-Programs | cs 2430/Assignment12 Germany Trip/TrainObjects.py | 1 | 13138 | '''
***********************************************************
* Discrete Structures
* Trip Through Germany Program
* Programmer: Mark Eatough
* Course: CSIS 2430
* Created Novermber 3, 2013
***********************************************************
'''
#database called GermanyDB for all objects
#table called... | gpl-3.0 | -2,412,943,273,274,023,000 | 38.575301 | 96 | 0.751484 | false |
avocado-framework-tests/avocado-misc-tests | memory/pmem_dm.py | 4 | 9214 | #!/usr/bin/env python
# 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 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that ... | gpl-2.0 | 5,300,290,207,276,827,000 | 42.87619 | 81 | 0.543412 | false |
losnikitos/googleads-python-lib | examples/dfp/v201508/creative_template_service/get_all_creative_templates.py | 4 | 1984 | #!/usr/bin/python
#
# Copyright 2015 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 b... | apache-2.0 | 5,598,378,245,823,768,000 | 32.627119 | 80 | 0.696573 | false |
Songbee/beerializer | setup.py | 1 | 1763 | """
A lightweight library for serialization of arbitrary Python objects into dicts.
"""
import re
from setuptools import setup
def find_version(fname):
"""
Attempts to find the version number in the file names fname.
Raises RuntimeError if not found.
"""
version = ""
with open(fname, "r") as f... | unlicense | 6,408,753,673,676,982,000 | 31.648148 | 82 | 0.581395 | false |
ccastell/Transfer-System | Website/env/lib/python3.5/site-packages/django/db/migrations/writer.py | 58 | 11569 | from __future__ import unicode_literals
import os
import re
from importlib import import_module
from django import get_version
from django.apps import apps
from django.db import migrations
from django.db.migrations.loader import MigrationLoader
from django.db.migrations.serializer import serializer_factory
from djang... | apache-2.0 | -7,991,597,523,595,459,000 | 36.080128 | 108 | 0.552252 | false |
gangadhar-kadam/sms-erpnext | stock/doctype/delivery_note/delivery_note.py | 5 | 15852 | # ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# 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 License, or
# (at yo... | agpl-3.0 | 9,202,620,955,723,405,000 | 36.566351 | 308 | 0.682248 | false |
andersk/zulip | zerver/management/commands/get_migration_status.py | 6 | 1223 | import argparse
import os
from typing import Any
from django.core.management.base import BaseCommand
from django.db import DEFAULT_DB_ALIAS
from scripts.lib.zulip_tools import get_dev_uuid_var_path
from zerver.lib.test_fixtures import get_migration_status
class Command(BaseCommand):
help = "Get status of migrat... | apache-2.0 | -6,637,216,148,468,718,000 | 32.972222 | 96 | 0.631235 | false |
renqianluo/DLT2T | DLT2T/data_generators/algorithmic_math.py | 1 | 22201 | # coding=utf-8
# Copyright 2017 The DLT2T 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 law or ... | apache-2.0 | 1,216,758,889,239,109,600 | 36.821124 | 80 | 0.658844 | false |
suriya/rasikapriya | rasikapriya/migrations/0002_auto__add_field_venue_create_date__add_field_venue_modify_date__add_fi.py | 1 | 10694 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from django.utils import timezone
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Venue.create_date'
db.add_column(u'rasikapriya_venue', 'cre... | mit | -3,990,114,308,811,552,300 | 65.8375 | 187 | 0.571722 | false |
xen0n/python-oauth2 | oauth2/exc.py | 1 | 1504 | """
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
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 ... | mit | -4,831,147,452,655,628,000 | 34.809524 | 77 | 0.75 | false |
carlosalberto/carbon-fork | lib/carbon/routers.py | 3 | 3016 | import imp
from carbon.relayrules import loadRelayRules
from carbon.hashing import ConsistentHashRing
class DatapointRouter:
"Interface for datapoint routing logic implementations"
def addDestination(self, destination):
"destination is a (host, port, instance) triple"
def removeDestination(self, destinati... | apache-2.0 | -7,642,043,862,873,826,000 | 32.511111 | 94 | 0.695292 | false |
sbrunner/QGIS | python/PyQt/PyQt5/QtWebKit.py | 17 | 1132 | # -*- coding: utf-8 -*-
"""
***************************************************************************
QtWebKit.py
---------------------
Date : November 2015
Copyright : (C) 2015 by Matthias Kuhn
Email : matthias at opengis dot ch
*************************... | gpl-2.0 | 7,597,989,326,831,827,000 | 42.538462 | 75 | 0.381625 | false |
kreatorkodi/repository.torrentbr | plugin.video.yatp/libs/client/actions.py | 1 | 8310 | # coding: utf-8
# Module: actions
# Created on: 27.07.2015
# Author: Roman Miroshnychenko aka Roman V.M. (romanvm@yandex.ua)
# Licence: GPL v.3: http://www.gnu.org/copyleft/gpl.html
import os
import xbmcgui
import xbmcplugin
from simpleplugin import Plugin
import json_requests as jsonrq
from buffering import buffer_to... | gpl-2.0 | -5,768,955,779,380,998,000 | 36.60181 | 119 | 0.519495 | false |
jonparrott/compute-hadoop-java-python | cfg.py | 2 | 3945 | # Copyright 2012 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 a... | apache-2.0 | -992,113,311,855,062,800 | 31.875 | 80 | 0.684411 | false |
lidavidm/mathics-heroku | mathics/__init__.py | 1 | 1560 | # -*- coding: utf8 -*-
# force utf8 encoding
import sys
import codecs
writer = codecs.getwriter("utf-8")
sys.stdout = writer(sys.stdout)
__version__ = "0.6.0rc1"
def get_version():
version = {}
import sympy
import sympy.mpmath as mpmath
from django.core.exceptions import ImproperlyConfigured
... | gpl-3.0 | 7,199,105,407,389,156,000 | 25.896552 | 76 | 0.648718 | false |
JRock007/Notes-Maker | NotesMaker.py | 1 | 25462 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.QtCore import Qt
from ext import find
from ext import abbreviations
from ext import datetime
from ext import table
from ext import wordcount
class Main(QtGui.QMainWindow):
def __init__(self, parent=None):
Qt... | mit | 7,842,574,968,400,065,000 | 29.938032 | 121 | 0.631765 | false |
kubernetes-incubator/external-storage | repo-infra/defs/gcs_uploader.py | 6 | 2889 | #!/usr/bin/env python
# Copyright 2016 The Kubernetes 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 appli... | apache-2.0 | -6,298,574,388,053,577,000 | 34.666667 | 88 | 0.628937 | false |
zapier/django-pipeline | tests/tests/test_compressor.py | 1 | 9034 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import base64
try:
from mock import patch, MagicMock
except ImportError:
from unittest.mock import patch, MagicMock # noqa
from django.test import TestCase
from pipeline.compressors import Compressor, TEMPLATE_FUNC
from pipeline.compressors.yu... | mit | -8,613,514,646,227,856,000 | 46.041667 | 444 | 0.649469 | false |
caisq/tensorflow | tensorflow/python/kernel_tests/boosted_trees/training_ops_test.py | 6 | 47713 | # Copyright 2018 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 | -2,084,426,581,368,099,300 | 30.002599 | 80 | 0.53346 | false |
jfrygeo/solutions-geoprocessing-toolbox | suitability/toolboxes/scripts/NAMDownload.py | 2 | 8637 | # coding: utf-8
'''
------------------------------------------------------------------------------
Copyright 2016 Esri
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 | -1,590,416,166,516,263,000 | 45.686486 | 146 | 0.646521 | false |
doug-fish/horizon | openstack_dashboard/contrib/sahara/content/data_processing/job_binaries/tests.py | 12 | 4368 | # 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 t... | apache-2.0 | 5,623,169,444,867,991,000 | 43.571429 | 78 | 0.626145 | false |
indianajohn/ycmd | ycmd/tests/javascript/subcommands_test.py | 1 | 13462 | # Copyright (C) 2015 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd 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.
#
# ycmd... | gpl-3.0 | -2,018,946,543,884,635,600 | 32.157635 | 80 | 0.515228 | false |
zouyapeng/horizon-newtouch | horizon/test/tests/workflows.py | 7 | 10953 | # Copyright 2012 Nebula, 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 agree... | apache-2.0 | 8,271,650,053,066,978,000 | 33.443396 | 78 | 0.621017 | false |
nwjs/chromium.src | third_party/blink/web_tests/external/wpt/webdriver/tests/set_timeouts/user_prompts.py | 42 | 2147 | # META: timeout=long
import pytest
from tests.support.asserts import assert_success
def set_timeouts(session, timeouts):
return session.transport.send(
"POST", "session/{session_id}/timeouts".format(**vars(session)),
timeouts)
@pytest.fixture
def check_user_prompt_not_closed(session, create_di... | bsd-3-clause | 2,597,034,688,995,659,000 | 33.629032 | 76 | 0.722869 | false |
mikewiebe-ansible/ansible | test/units/modules/network/fortios/test_fortios_wireless_controller_wtp_profile.py | 20 | 17499 | # 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 License, or
# (at your option) any later version.
#
# This program is distributed in the... | gpl-3.0 | 6,349,056,281,766,405,000 | 38.861048 | 142 | 0.566318 | false |
formath/mxnet | example/bi-lstm-sort/lstm_sort.py | 25 | 3168 | # 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 | 5,515,932,103,077,509,000 | 36.270588 | 114 | 0.618056 | false |
eBay/restcommander | play-1.2.4/python/Lib/wsgiref/simple_server.py | 58 | 4794 | """BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21)
This is both an example of how WSGI can be implemented, and a basis for running
simple web applications on a local machine, such as might be done when testing
or debugging an application. It has not been reviewed for security issues,
howev... | apache-2.0 | -7,448,858,720,460,817,000 | 22.385366 | 79 | 0.601377 | false |
ToxicFrog/lancow | madcow/util/google.py | 3 | 4713 | # Copyright (C) 2007, 2008 Christopher Jones
#
# This file is part of Madcow.
#
# Madcow 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... | gpl-3.0 | 6,125,836,033,747,347,000 | 34.43609 | 188 | 0.631021 | false |
PowerShellEmpire/Empire | lib/modules/powershell/exploitation/exploit_jenkins.py | 10 | 3379 | import base64
from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Exploit-Jenkins',
'Author': ['@luxcupitor'],
'Description': ("Run command on unauthenticated Jenkins Script consoles."),
'Backgroun... | bsd-3-clause | 5,114,936,303,125,955,000 | 32.79 | 127 | 0.509026 | false |
yakky/django | tests/backends/tests.py | 16 | 48369 | # -*- coding: utf-8 -*-
# Unit and doctests for specific database backends.
from __future__ import unicode_literals
import datetime
import re
import threading
import unittest
import warnings
from decimal import Decimal, Rounded
from django.core.exceptions import ImproperlyConfigured
from django.core.management.color ... | bsd-3-clause | -6,892,357,699,733,083,000 | 38.90429 | 119 | 0.617319 | false |
fernandog/Medusa | ext/dateutil/rrule.py | 9 | 64642 | # -*- coding: utf-8 -*-
"""
The rrule module offers a small, complete, and very fast, implementation of
the recurrence rules documented in the
`iCalendar RFC <https://tools.ietf.org/html/rfc5545>`_,
including support for caching of results.
"""
import itertools
import datetime
import calendar
import re
import sys
try:... | gpl-3.0 | 3,283,657,446,893,784,000 | 37.730977 | 86 | 0.485087 | false |
ecreall/lagendacommun | lac/views/lac_view_manager/home.py | 1 | 5196 | # -*- coding: utf8 -*-
# Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
import math
import datetime
import pytz
from pyramid.view import view_config
from pyramid.threadlocal import get_current_request
from substanced.o... | agpl-3.0 | 7,191,274,477,247,623,000 | 36.927007 | 77 | 0.60893 | false |
geekaia/edx-platform | common/djangoapps/track/contexts.py | 5 | 1475 | """Generates common contexts"""
import logging
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from opaque_keys import InvalidKeyError
from util.request import COURSE_REGEX
log = logging.getLogger(__name__)
def course_context_from_url(url):
"""
Extracts the course_context from the given `url` ... | agpl-3.0 | 1,627,284,375,638,080,300 | 25.818182 | 88 | 0.60339 | false |
BoPeng/simuPOP | docs/PyOperator.py | 1 | 2258 | #!/usr/bin/env python
#
# $File: PyOperator.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redistribute... | gpl-2.0 | -4,326,466,934,336,378,000 | 34.84127 | 85 | 0.667405 | false |
michaelerule/neurotools | stats/mcint.py | 1 | 5228 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# BEGIN PYTHON 2/3 COMPATIBILITY BOILERPLATE
from __future__ import absolute_import
from __future__ import with_statement
from __future__ import division
from __future__ import nested_scopes
from __future__ import generators
from __future__ import unicode_literals
from __future... | gpl-3.0 | 453,506,364,964,403,900 | 31.675 | 94 | 0.613236 | false |
kbsezginel/tee_mof | thermof/reldist.py | 1 | 4529 | # Date: February 2017
# Author: Patrick Asinger and Kutay B. Sezginel
"""
Calculate relative distance between interpenetrated frameworks
"""
import os
import math
def reldist(traj_path, end=300000):
segmentation = []
x_axis_data = []
MOF1_pt1_coords = []
MOF1_pt2_coords = []
MOF1_pt3_coords = []
... | mit | 119,960,073,522,521,230 | 45.690722 | 277 | 0.558181 | false |
ronaldbradford/os-demo | oslo_log/examples/syntax_helper.py | 1 | 2797 | # Copyright (c) 2015 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 i... | apache-2.0 | 1,801,431,667,089,447,000 | 27.835052 | 77 | 0.690025 | false |
crossroadchurch/paul | openlp/core/lib/colorbutton.py | 1 | 3307 | # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | gpl-2.0 | 7,508,550,098,501,231,000 | 39.329268 | 94 | 0.527366 | false |
AKLLaursen/gamgee | blogengine/models.py | 1 | 2183 | from django.db import models
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.utils.text import slugify
from django.db.models.signals import post_save
from django.core.cache import cache
# Category model
class Category(models.Model):
name = models.CharField(max_len... | gpl-2.0 | -1,252,414,630,109,535,500 | 26.64557 | 106 | 0.706825 | false |
ericmjl/bokeh | tests/unit/bokeh/util/test_hex.py | 1 | 3858 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 807,412,369,140,659,100 | 34.394495 | 78 | 0.347589 | false |
dlatk/dlatk | dlatk/sqlitemethods/sqliteMethods.py | 1 | 3334 | """
Sqlite interface based on the sqlite3 package
"""
import sys, time
import sqlite3
from dlatk.dlaConstants import MAX_ATTEMPTS, SQLITE_ERROR_SLEEP, MAX_SQL_PRINT_CHARS, warn
def dbConnect(db):
"""
Creates connection with the database
"""
db = db + ".db"
dbConn = None
attempts = 0
while(1):
try:
dbConn ... | gpl-3.0 | 2,413,575,742,804,356,000 | 26.553719 | 95 | 0.670666 | false |
natefoo/ansible-modules-extras | network/f5/bigip_pool.py | 3 | 19402 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Matt Hite <mhite@hotmail.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 License... | gpl-3.0 | 2,605,106,136,488,584,700 | 34.996289 | 166 | 0.562777 | false |
TieWei/nova | nova/tests/cells/test_cells_manager.py | 9 | 37403 | # Copyright (c) 2012 Rackspace Hosting
# 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 req... | apache-2.0 | -5,645,561,614,519,444,000 | 45.75375 | 79 | 0.571131 | false |
lukovnikov/SME | Family/rTransE.py | 5 | 18397 | '''
Build a tweet sentiment analyzer
'''
from collections import OrderedDict
import cPickle as pkl
import random
import sys
import time
import scipy.io
import numpy
import theano
from theano import config
import theano.tensor as tensor
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from aux_fu... | bsd-3-clause | 6,000,488,881,538,462,000 | 36.090726 | 175 | 0.550361 | false |
yanheven/neutron | neutron/tests/unit/dummy_plugin.py | 9 | 4446 | # 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 req... | apache-2.0 | -7,171,095,521,552,108,000 | 32.938931 | 78 | 0.607737 | false |
Em-Pan/swift | swift/proxy/controllers/info.py | 39 | 3768 | # Copyright (c) 2010-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 agree... | apache-2.0 | 7,559,925,865,017,092,000 | 34.54717 | 79 | 0.586253 | false |
pbougue/navitia | source/jormungandr/jormungandr/street_network/utils.py | 1 | 2284 | # encoding: utf-8
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobilit... | agpl-3.0 | -8,004,988,770,288,755,000 | 37.066667 | 91 | 0.707531 | false |
sestrella/ansible | lib/ansible/module_utils/network/junos/facts/interfaces/interfaces.py | 19 | 4091 | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The junos interfaces fact class
It is in this file the configuration is collected from the device
for a given resource, parsed, and the facts tree is populated
based on t... | gpl-3.0 | 2,844,295,097,034,292,700 | 35.855856 | 91 | 0.620631 | false |
qutebrowser/qutebrowser | qutebrowser/utils/log.py | 1 | 28519 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 | 8,036,734,590,630,784,000 | 34.252163 | 86 | 0.624566 | false |
webitup/puke | puke/Console.py | 2 | 2576 | #!/usr/bin/env python
# -*- coding: utf8 -*-
import logging, sys, os, json
from colorama import *
import subprocess
SPEAK_ENABLED = False
SPEAK_MESSAGE_ON_FAIL = "Build failed!"
SPEAK_MESSAGE_ON_SUCCESS = "Build success!"
init(autoreset = True)
class console:
@staticmethod
def log(*messages):
color = Style.... | mit | 2,733,193,653,001,594,400 | 17.941176 | 94 | 0.64014 | false |
cea-sec/miasm | example/expression/solve_condition_stp.py | 2 | 6730 | from __future__ import print_function
import sys
import subprocess
from optparse import OptionParser
from pdb import pm
from future.utils import viewitems
from miasm.analysis.machine import Machine
from miasm.analysis.binary import Container
from miasm.expression.expression import ExprInt, ExprCond, ExprId, \
get... | gpl-2.0 | -8,537,619,613,936,739,000 | 32.989899 | 114 | 0.58529 | 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.