repo_name stringlengths 8 92 | path stringlengths 5 221 | copies stringclasses 10
values | size stringlengths 4 6 | content stringlengths 974 828k | license stringclasses 15
values | hash int64 -9,212,977,344,346,658,000 9,220,224,517B | line_mean float64 8.67 91.6 | line_max int64 15 966 | alpha_frac float64 0.29 0.86 | autogenerated bool 1
class | nl_text stringlengths 0 164k | nl_size int64 0 164k | nl_language stringclasses 17
values | nl_language_score float64 0.04 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
thinkopensolutions/tkobr-addons | tko_partner_relatives/__init__.py | 1 | 1091 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# Thinkopen Brasil
# Copyright (C) Thinkopen Solutions Brasil (<http://www.tkobr.com>).
#
# This ... | agpl-3.0 | 7,388,563,763,742,791,000 | 44.458333 | 78 | 0.608616 | false | -*- encoding: utf-8 -*- OpenERP, Open Source Management Solution Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). Thinkopen Brasil Copyright (C) Thinkopen Solutions Brasil (<http://www.tkobr.com>). This program is free software: you can redistribute it and/or modify it under the terms of the GNU ... | 875 | en | 0.865832 |
DavidGSola/Basic-RESTful-Service-with-FLASK | practica1.py | 1 | 1251 | # -*- coding: utf-8 -*-
from flask import Flask, url_for, render_template, Response
import random
app = Flask(__name__)
@app.route('/')
def api_root():
mensaje = 'Welcome'
return Response(mensaje, status=200, mimetype='text/plain')
@app.route('/hola')
def api_home():
mensaje = 'Hola -cañón-'
return Response(mens... | apache-2.0 | -8,561,766,479,407,991,000 | 28.738095 | 74 | 0.665332 | false | -*- coding: utf-8 -*- | 21 | en | 0.767281 |
a4a881d4/6FSK | utils.py | 1 | 1800 | import random
import numpy as np
def rsrcBin(L):
r = []
for k in range(L):
r.append(random.randint(0,1))
return r
def rsrc(L):
r = rsrcBin(L)
x = [1-2*x for x in r]
return x
def fftOnce(x):
W = len(x)
hw = np.hamming(W)
ss = np.fft.fft(x*hw)
return np.conj(ss)*ss
def spectrum(x):
... | gpl-3.0 | 1,853,868,788,121,301,800 | 15.142857 | 53 | 0.545 | false | 0 | en | 0.110449 | |
owers19856/PyLATO | TBelec.py | 1 | 39671 | """
Created on Thursday 16 April 2015
@author: Andrew Horsfield, Marc Coury and Max Boleininger
This module contains functions that are needed once the molecular orbitals are
populated by electrons.
"""
#
# Import the modules that will be needed
import numpy as np
import math
import TBH
import sys
import time
import ... | gpl-2.0 | 8,748,730,909,583,750,000 | 43.624297 | 184 | 0.558468 | false | Import the modules that will be needed PyDQED module Save job reference as an attribute for internal use. Set up the core charges, and count the number of electrons Allocate memory for the level occupancies and density matrix setup for the Pulay mixing Find the lower bound to the chemical potential Find the upper bound... | 10,497 | en | 0.657444 |
CS4098Group/Project | app/peos.py | 1 | 4950 | from subprocess import Popen, PIPE
import os.path
import os
import xml.etree.ElementTree as ET
PEOS_COMMAND = './peos/os/kernel/peos'
class PEOSException(Exception):
pass
def create(path_to_model_file):
if not os.path.isfile(path_to_model_file):
raise IOError("File does not exist")
proc = Pop... | mit | -4,090,355,685,830,059,500 | 27.285714 | 99 | 0.55596 | false | Going to need to parse the stderr/stdout pipes for this list command creates the xml file Going to need to parse the stderr/stdout pipes for this Going to need to parse the stderr/stdout pipes for this Going to need to parse the stderr/stdout pipes for this Going to need to parse the stderr/stdout pipes for this Going ... | 425 | en | 0.839301 |
mnestis/provglish | provglish/nl/templates/generation_template.py | 1 | 3100 | from provglish import transform, prov
from provglish.lexicalisation import urn_from_uri as lex
from provglish.lexicalisation import plural_p
from provglish.prov import PROV
from provglish.nl.tools import SETTINGS, realise_sentence
import rdflib
from rdflib.plugins import sparql
from rdflib import RDF
import urllib2
... | mit | -5,202,516,395,004,116,000 | 35.046512 | 109 | 0.569677 | false | Qualified Unqualified | 21 | en | 0.868223 |
ledusledus/lidarheightcellclassifyscripts | cliffs.py | 1 | 3730 | import unittest
from itertools import imap
from operator import add
NO_CLIFF=1
HAS_CLIFF=2
class TestBuildCliff(unittest.TestCase):
def setUp(self):
pass
def testBuild_Cliff(self):
altitudes={(10,10):2,(10,11):4,(11,11):4,(11,10):2,(12,10):2,(12,11):4}
key=(10,10)
start_cliff=1... | apache-2.0 | 4,035,802,107,887,874,000 | 33.537037 | 88 | 0.584718 | false | we need to have a full cell and there is none no cliffs found 1 means we are at the end. In that case it should be found from another cliff. now we need to grow right: has been visited already this is not our cliff todo: then we need to grow left | 246 | en | 0.985339 |
BrunoTh/ETS2Autopilot | UI/ui_updater.py | 1 | 2676 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'designer\updater.ui'
#
# Created by: PyQt5 UI code generator 5.9
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Ma... | mit | -8,680,544,128,683,672,000 | 45.947368 | 91 | 0.681988 | false | -*- coding: utf-8 -*- Form implementation generated from reading ui file 'designer\updater.ui' Created by: PyQt5 UI code generator 5.9 WARNING! All changes made in this file will be lost! | 187 | en | 0.827483 |
bgribble/mfp | mfp/gui/modes/global_mode.py | 1 | 12471 | #! /usr/bin/env python
'''
global_mode.py: Global input mode bindings
Copyright (c) 2012 Bill Gribble <grib@billgribble.com>
'''
from ..input_mode import InputMode
from .label_edit import LabelEditMode
from .transient import TransientMessageEditMode
from .enum_control import EnumEditMode
from ..message_element import... | gpl-2.0 | -2,904,285,902,620,587,000 | 35.89645 | 95 | 0.571646 | false | global_mode.py: Global input mode bindings
Copyright (c) 2012 Bill Gribble <grib@billgribble.com>
! /usr/bin/env python global keybindings KLUDGE! KLUDGE! | 156 | en | 0.325909 |
winguru/graphite-api | graphite_api/render/glyph.py | 1 | 84736 | """Copyright 2008 Orbitz WorldWide
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, softwa... | apache-2.0 | -1,222,734,711,232,685,800 | 36.067367 | 79 | 0.520098 | false | Axis ticmarks with uniform spacing.
Apply the specified settings to this axis.
Set self.minValue, self.minValueSource, self.maxValue,
self.maxValueSource, and self.axisLimit reasonably based on the
parameters provided.
Arguments:
axisMin -- a finite number, or None to choose a round minimum
limit that includes a... | 9,699 | en | 0.847151 |
tommartensen/arion-backend | arionBackend/serializers/json.py | 1 | 2209 | """
This module contains all json serializers in the project.
"""
from json import loads as json_loads
class JSONSerializer(object):
"""
This class contains methods for serializing model objects into JSON objects.
"""
@staticmethod
def serialize_hierarchy_overview(hierarchy):
"""
Serializes a hierarchy to J... | mit | 2,168,103,708,467,919,400 | 26.962025 | 92 | 0.715256 | false | This class contains methods for serializing model objects into JSON objects.
Serializes an event type into JSON format.
:param event_type: the event type to serialize
:return: Dictionary with event type information
Serializes an event type into JSON format with enhanced information.
:param event_type: the event type to... | 874 | en | 0.68364 |
viroulep/RebirthItemTracker | src/game_objects/state.py | 1 | 5925 | """This module handles anything related to the item tracker's state"""
import logging
import json
from game_objects.item import Item, ItemInfo
from game_objects.floor import Floor
from game_objects.serializable import Serializable
class TrackerState(Serializable):
"""This class represents a tracker state, and han... | bsd-2-clause | -7,840,911,215,102,460,000 | 33.447674 | 118 | 0.560169 | false | This class represents a tracker state, and handle the logic to
modify it while keeping it coherent
An encoder to provide to the json.load method, which handle game objects
Update player's stats with the given item.
Add boss to seen boss
Add a curse to current floor
Add a floor to the current run
Add an item to the ... | 1,411 | en | 0.836907 |
tommo/gii | lib/gii/DeviceManager/DeviceManager.py | 1 | 2811 | import os
import stat
from gii.core import *
from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import QEventLoop, QEvent, QObject
from gii.qt.IconCache import getIcon
from gii.qt.controls.Window import MainWindow
from gii.qt.controls.Menu import MenuManager
from gii.qt.QtEditorModule import QtEditorModule
... | mit | -5,803,916,313,980,087,000 | 27.393939 | 76 | 0.617574 | false | ---------------------------------------------------------------- def getIOSDeviceName( dev ): name = u'' try: name = dev.get_value(name=u'DeviceName') except: pass print( u'%s - "%s"' % ( dev.get_deviceid(), name.decode(u'utf-8') ) )-------------------------------------------------------------------------------... | 518 | en | 0.189725 |
google/struct2tensor | struct2tensor/expression_impl/__init__.py | 1 | 1826 | # Copyright 2019 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 | -8,786,078,613,776,037,000 | 41.465116 | 80 | 0.787514 | false | Import all modules in expression_impl.
The modules in this file should be accessed like the following:
```
import struct2tensor as s2t
from struct2tensor import expression_impl
s2t.expression_impl.apply_schema
```
Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Versio... | 879 | en | 0.816452 |
floringrigoriu/Algorthitms | Leetcode2021/Monthly/January/Jan23.py | 1 | 1312 | # https://leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/582/week-4-january-22nd-january-28th/3614/
# A matrix diagonal is a diagonal line of cells starting from some cell in either the topmost row or leftmost column and
# going in the bottom-right direction until reaching the matrix's end.
# F... | gpl-2.0 | -4,631,008,891,928,721,000 | 36.485714 | 141 | 0.560213 | false | https://leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/582/week-4-january-22nd-january-28th/3614/ A matrix diagonal is a diagonal line of cells starting from some cell in either the topmost row or leftmost column and going in the bottom-right direction until reaching the matrix's end. For examp... | 566 | en | 0.805174 |
alexholcombe/twoWords | twoWords.py | 1 | 49945 | #Alex Holcombe alex.holcombe@sydney.edu.au
#See the github repository for more information: https://github.com/alexholcombe/twoWords
from __future__ import print_function #use python3 style print
from psychopy import monitors, visual, event, data, logging, core, sound, gui
import psychopy.info
import numpy as np
from m... | mit | -25,841,017,926,910,716 | 57.966942 | 209 | 0.683372 | false | Alex Holcombe alex.holcombe@sydney.edu.auSee the github repository for more information: https://github.com/alexholcombe/twoWordsuse python3 style printdegrees of visual angle away from the fixation pointTHINGS THAT COULD PREVENT SUCCESS ON A NEW MACHINEsame screen or external screen? Set scrn=0 if one screen. scrn=1 m... | 13,657 | en | 0.804712 |
cloudnautique/rancher-compose | tests/integration/cattletest/core/test_compose.py | 1 | 57541 | from common_fixtures import * # NOQA
import subprocess
from subprocess import Popen
from os import path
import os
import sys
import pytest
import cattle
import ConfigParser
PROJECTS = []
CERT = '''-----BEGIN CERTIFICATE-----
MIIDJjCCAg4CCQDLCSjwGXM72TANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJB
VTETMBEGA1UECBMKU29tZS1T... | apache-2.0 | -6,945,807,674,935,528,000 | 29.252892 | 79 | 0.620705 | false | NOQA Not supported assert service.launchConfig.externalLinks == ['foo', 'bar'] | 78 | en | 0.420992 |
jianghuaw/nova | nova/api/openstack/compute/extended_volumes.py | 1 | 3796 | # 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 a... | apache-2.0 | 4,793,651,557,385,615,000 | 43.139535 | 78 | 0.629874 | false | The Extended Volumes API extension.
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... | 993 | en | 0.857133 |
sailfish-sdk/sailfish-qtcreator | share/qtcreator/debugger/stdtypes.py | 1 | 37164 | ############################################################################
#
# Copyright (C) 2016 The Qt Company Ltd.
# Contact: https://www.qt.io/licensing/
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the co... | gpl-3.0 | -7,329,428,618,475,966,000 | 32.360862 | 106 | 0.551367 | false | Copyright (C) 2016 The Qt Company Ltd. Contact: https://www.qt.io/licensing/ This file is part of Qt Creator. Commercial License Usage Licensees holding valid commercial Qt licenses may use this file in accordance with the commercial license agreement provided with the Software or, alternatively, in accordance with the... | 2,514 | en | 0.757405 |
stscieisenhamer/ginga | ginga/rv/plugins/Drawing.py | 1 | 15096 | #
# Drawing.py -- Drawing plugin for Ginga reference viewer
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga import GingaPlugin
from ginga import colors
from ginga.gw import Widgets
from ginga.misc import ParamSet, Bunch
from ginga.util import dp... | bsd-3-clause | 7,770,706,608,207,105,000 | 33.703448 | 88 | 0.588169 | false | Local plugin to draw shapes on canvas.
Create boolean mask from drawing.
All areas enclosed by all the shapes drawn will be set to 1 (True)
in the mask. Otherwise, the values will be set to 0 (False).
The mask will be inserted as a new image buffer, like ``Mosaic``.
Enable or disable Create Mask button based on drawn ... | 2,034 | en | 0.738807 |
miguelfrde/stanford-cs231n | assignment2/cs231n/optim.py | 1 | 6261 | import numpy as np
"""
This file implements various first-order update rules that are commonly used
for training neural networks. Each update rule accepts current weights and the
gradient of the loss with respect to those weights and produces the next set of
weights. Each update rule has the same interface:
def updat... | mit | 2,448,093,510,012,221,400 | 40.463576 | 97 | 0.54001 | false | Uses the Adam update rule, which incorporates moving averages of both the
gradient and its square and a bias correction term.
config format:
- learning_rate: Scalar learning rate.
- beta1: Decay rate for moving average of first moment of gradient.
- beta2: Decay rate for moving average of second moment of gradient.
- ... | 2,082 | en | 0.788404 |
cvandeplas/plaso | plaso/parsers/winreg_plugins/msie_zones.py | 1 | 11257 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual 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 L... | apache-2.0 | -8,224,367,203,974,624,000 | 38.36014 | 80 | 0.639424 | false | Windows Registry plugin for parsing the MSIE Zones settings.
Parses the Zones key in the Software hive.
Retrieves information of the Internet Settings Zones values.
The MSIE Feature controls are stored in the Zone specific subkeys in:
Internet Settings\Zones key
Internet Settings\Lockdown_Zones key
Args:
parser... | 1,690 | en | 0.738295 |
datamade/yournextmp-popit | elections/bf_elections_2015/management/commands/bf_elections_2015_import_candidate.py | 1 | 9711 | # -*- coding: utf-8 -*-
import dateutil.parser
import csv
from os.path import dirname, join
import re
import string
import codecs
import requests
from django.core.management.base import BaseCommand
from candidates.utils import strip_accents
from candidates.views.version_data import get_change_metadata
from electio... | agpl-3.0 | -1,523,529,099,116,446,000 | 34.702206 | 120 | 0.510658 | false | -*- coding: utf-8 -*- See if this person already exists by searching for the ID they were imported with: Otherwise there was exactly one result: See if this person already exists by searching for the ID they were imported with: Otherwise there was exactly one result: csv.py doesn't do Unicode; encode temporarily as UTF... | 579 | en | 0.899406 |
matthewghgriffiths/nestedbasinsampling | examples/LJ31/system.py | 1 | 3922 | import logging
from pele.potentials import LJ
from nestedbasinsampling import (
NoGUTSSampler, NestedOptimizerKalman, HardShellConstraint, random_structure,
RecordMinimization, CompareStructures, LOG_CONFIG, Database)
logger = logging.getLogger("LJ31.system")
logger = logging.getLogger("NBS.LJ_syste... | gpl-3.0 | 6,799,967,800,464,881,000 | 37.616162 | 80 | 0.629526 | false | 0 | en | 0.110449 | |
ubivar/ubivar-python | ubivar/error.py | 1 | 1837 | # Exceptions
class UbivarError(Exception):
def __init__(self, message=None, http_body=None, http_status=None,
json_body=None, headers=None):
super(UbivarError, self).__init__(message)
if http_body and hasattr(http_body, 'decode'):
try:
http_body = htt... | mit | -8,536,734,799,136,476,000 | 25.623188 | 70 | 0.598258 | false | Exceptions | 10 | en | 0.319377 |
duncanwp/cis_plugins | Grosvenor_CDNC.py | 1 | 2421 | from cis.data_io.products import NetCDF_Gridded
import cis.data_io.gridded_data as gd
import logging
from cis.utils import demote_warnings
class Grosvenor_CDNC(NetCDF_Gridded):
"""
Plugin for reading Dan Grosvenor's MODIS CDNC files.
"""
@staticmethod
def load_multiple_files_callback(cube, fi... | lgpl-3.0 | -3,232,205,901,868,574,700 | 40.033898 | 120 | 0.634036 | false | Plugin for reading Dan Grosvenor's MODIS CDNC files.
Reads the data for a variable.
:param filenames: list of names of files from which to read data
:param variable: (optional) name of variable; if None, the file(s) must contain data for only one cube
:return: iris.cube.Cube
We need to remove these global attributes ... | 731 | en | 0.81468 |
PaulWay/insights-core | insights/parsers/current_clocksource.py | 1 | 1559 | """
CurrentClockSource - file ``/sys/devices/system/clocksource/clocksource0/current_clocksource``
==============================================================================================
This is a relatively simple parser that reads the
``/sys/devices/system/clocksource/clocksource0/current_clocksource`` file.
... | apache-2.0 | -2,943,900,483,633,057,000 | 25.87931 | 94 | 0.592046 | false | The CurrentClockSource parser class.
Attributes:
data (str): the content of the current_clocksource file.
bool: does the clock source contain 'kvm-clock'?
bool: does the clock source contain 'tsc'?
bool: does the clock source contain 'vmi-timer'?
CurrentClockSource - file ``/sys/devices/system/clocksource/clocksou... | 1,021 | en | 0.74966 |
akuster/yali | yali/gui/ScrCheckCD.py | 1 | 4754 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2010 TUBITAK/UEKAE
#
# 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.
#
# ... | gpl-2.0 | -8,076,896,464,390,555,000 | 35.569231 | 150 | 0.562474 | false | -*- coding: utf-8 -*- Copyright (C) 2006-2010 TUBITAK/UEKAE 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. Please read the COPY... | 329 | en | 0.877724 |
cscanlin/munger-builder | script_builder/views.py | 1 | 5537 | import os
import re
import csv
import json
import time
from django.shortcuts import render, render_to_response
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib import messages
from django.contrib.auth.models import User, Group
from django.contrib.auth import authenticate, login
from djang... | mit | -3,080,153,474,421,255,000 | 34.954545 | 104 | 0.657576 | false | Helper Functions | 16 | en | 0.331032 |
CI-WATER/gsshapy | gsshapy/grid/nwm_to_gssha.py | 1 | 4942 | # -*- coding: utf-8 -*-
#
# nwm_to_gssha.py
# GSSHApy
#
# Created by Alan D Snow, 2016.
# License BSD 3-Clause
import logging
from datetime import timedelta
from os import mkdir, path, remove, rename
import xarray as xr
from .grid_to_gssha import GRIDtoGSSHA
log = logging.getLogger(__name__)
# ----------------... | bsd-3-clause | 1,060,683,975,107,513,100 | 41.973913 | 195 | 0.510522 | false | This class converts the National Water Model output data to GSSHA formatted input.
This class inherits from class:`GRIDtoGSSHA`.
Attributes:
gssha_project_folder(:obj:`str`): Path to the GSSHA project folder
gssha_project_file_name(:obj:`str`): Name of the GSSHA elevation grid file.
lsm_input_folder_path(:... | 2,802 | en | 0.370994 |
eirmag/weboob | weboob/core/bcall.py | 1 | 7438 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon, Christophe Benz
#
# This file is part of weboob.
#
# weboob 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 Licen... | agpl-3.0 | -295,907,511,899,842,750 | 35.106796 | 112 | 0.565071 | false | -*- coding: utf-8 -*- Copyright(C) 2010-2011 Romain Bignon, Christophe Benz This file is part of weboob. weboob 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 o... | 1,232 | en | 0.880129 |
lujinda/replace | replace/args.py | 1 | 1706 | #/usr/bin/env python
#coding:utf-8
# Author : tuxpy
# Email : q8886888@qq.com.com
# Last modified : 2015-05-19 14:03:37
# Filename : args.py
# Description :
import optparse
from replace import version
import os
def parser_args():
usage = "Usage: %prog [options] target_path"
parser = opt... | gpl-3.0 | -682,240,807,930,640,600 | 29.464286 | 104 | 0.594373 | false | /usr/bin/env pythoncoding:utf-8 Author : tuxpy Email : q8886888@qq.com.com Last modified : 2015-05-19 14:03:37 Filename : args.py Description : | 165 | en | 0.344882 |
macieksmuga/server | tests/unit/test_client.py | 1 | 21768 | """
Tests for the client
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import mock
import ga4gh.protocol as protocol
import ga4gh.backend as backend
import ga4gh.client as client
import ga4gh.datarepo as datarepo
import tests.utils a... | apache-2.0 | 127,916,958,536,394,690 | 38.795247 | 78 | 0.652931 | false | Thin wrapper class that allows us to treat data model objects uniformly.
We should update the data model interface so that objects are always
returned so that we always call toProtocolElement on the results.
Variants and Reads are the exceptions here.
Client in which we intercept calls to the underlying requests connec... | 1,464 | en | 0.862007 |
streampref/wcimport | tool/query/bestseq/move.py | 1 | 6139 | # -*- coding: utf-8 -*-
'''
Queries for experiments with preference operators
'''
# =============================================================================
# Queries with preference operators
# =============================================================================
# Moves
Q_MOVE_BESTSEQ = '''
SELECT SEQUE... | gpl-3.0 | 3,218,681,803,519,124,000 | 29.849246 | 79 | 0.59684 | false | Queries for experiments with preference operators
-*- coding: utf-8 -*- ============================================================================= Queries with preference operators ============================================================================= Moves ==================================================... | 966 | en | 0.793379 |
hperala/kontuwikibot | scripts/spamremove.py | 1 | 3739 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script to remove links that are being or have been spammed.
Usage:
spamremove.py www.spammedsite.com
It will use Special:Linksearch to find the pages on the wiki that link to
that site, then for each page make a proposed change consisting of removing
all the lines where ... | mit | -3,847,130,002,318,686,000 | 28.912 | 79 | 0.554426 | false | Process command line arguments and perform task.
If args is an empty list, sys.argv is used.
@param args: command line arguments
@type args: list of unicode
Script to remove links that are being or have been spammed.
Usage:
spamremove.py www.spammedsite.com
It will use Special:Linksearch to find the pages on the w... | 1,078 | en | 0.80359 |
googleapis/python-compute | google/cloud/compute_v1/services/license_codes/transports/rest.py | 1 | 8998 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 1,804,528,747,988,835,600 | 40.275229 | 118 | 0.631918 | false | REST backend transport for LicenseCodes.
The LicenseCodes API.
This class defines the same methods as the primary client, so the
primary client can load the underlying transport implementation
and call it.
It sends JSON representations of protocol buffers over HTTP/1.1
Instantiate the transport.
Args:
host (Opt... | 4,673 | en | 0.761315 |
olichtne/python-perfrepo | perfrepo/PerfRepoTest.py | 1 | 3986 | """
This module contains the PerfRepoTest class.
Copyright 2015 Red Hat, Inc.
Licensed under the GNU General Public License, version 2 as
published by the Free Software Foundation; see COPYING for details.
"""
__author__ = """
olichtne@redhat.com (Ondrej Lichtner)
"""
import textwrap
from xml.etree import ElementTre... | gpl-2.0 | -8,145,718,045,749,561,000 | 29.899225 | 78 | 0.544656 | false | This module contains the PerfRepoTest class.
Copyright 2015 Red Hat, Inc.
Licensed under the GNU General Public License, version 2 as
published by the Free Software Foundation; see COPYING for details. | 202 | en | 0.888311 |
nvdv/vprof | vprof/tests/code_heatmap_e2e.py | 1 | 5023 | """End-to-end tests for code heatmap module."""
# pylint: disable=missing-docstring, blacklisted-name
import functools
import gzip
import json
import inspect
import threading
import os
import unittest
import urllib.request
from vprof import code_heatmap
from vprof import stats_server
from vprof import runner
from vpro... | bsd-2-clause | -3,235,933,077,664,283,000 | 35.398551 | 79 | 0.601234 | false | End-to-end tests for code heatmap module.
pylint: disable=missing-docstring, blacklisted-name pylint: disable=unused-import pylint: enable=missing-docstring, blacklisted-name | 176 | en | 0.473333 |
django-oscar/django-oscar-paymentexpress | tests/facade_tests.py | 1 | 7334 | from django.test import TestCase
from mock import Mock, patch
from paymentexpress.facade import Facade
from paymentexpress.gateway import AUTH, PURCHASE
from paymentexpress.models import OrderTransaction
from tests import (XmlTestingMixin, CARD_VISA, SAMPLE_SUCCESSFUL_RESPONSE,
SAMPLE_DECLINED_RESPO... | bsd-3-clause | -3,153,989,515,319,986,000 | 39.076503 | 78 | 0.604854 | false | 0 | en | 0.110449 | |
daonb/tumulus | tumuli/urls.py | 1 | 1745 | """tumuli URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | agpl-3.0 | 1,101,324,068,289,894,900 | 38.659091 | 110 | 0.718052 | false | tumuli URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 822 | en | 0.713605 |
muccg/rdrf | scripts/check_views.py | 1 | 5203 | '''
TO DO:
- Further abstract states (maybe find some way of removing reliance
on indices)
- Add comments to provide full information on code
- Create unit tests for script (view with mixin, view w/out mixin
with decorators, no mixin no decorators)
'''
import os
import re
import sys
from os.pa... | agpl-3.0 | 6,208,441,592,899,194,000 | 27.277174 | 71 | 0.582933 | false | TO DO:
- Further abstract states (maybe find some way of removing reliance
on indices)
- Add comments to provide full information on code
- Create unit tests for script (view with mixin, view w/out mixin
with decorators, no mixin no decorators)
Check line Change to "in-view" state if check for... | 865 | en | 0.8836 |
antmicro/distant-rec | tools/shebang-replace.py | 1 | 1211 | #!/usr/bin/env python3
import sys
from os import listdir, chdir
from os.path import isfile, abspath
UNTIL = '/build/'
REPLACE_WITH = '/b/f/w'
def bangchange(file_path):
script = File(file_path)
if script.flist[0].find("#!") == 0:
if script.flist[0].find(UNTIL) > 0:
print("\033[92m" + "[M... | apache-2.0 | -7,748,558,177,413,436,000 | 24.765957 | 82 | 0.549959 | false | !/usr/bin/env python3 | 21 | fr | 0.448822 |
jamesls/labmanager-shell | labmanager/shell.py | 1 | 11699 | import argparse
import getpass
import cmd
import sys
from pprint import pprint
import textwrap
import rlcompleter
import readline
import logging
import ConfigParser
import urllib2
from texttable import Texttable
import suds
from labmanager import api
from labmanager import config
from labmanager.loghandler import Nul... | bsd-3-clause | -8,810,449,703,896,863,000 | 30.877384 | 82 | 0.575177 | false | A mapping from the SOAP returned names to the nicer to display names. Using .get() here because sometimes labmanager returned non documented types/statuses/etc. If the user explicitly specifies a section but it does not exist, we should let them know and exit. | 260 | en | 0.868355 |
bgoli/cbmpy-build | ubuntu/1_install_cbmpy_dependencies.py | 1 | 6549 | # Detect all MetaToolKit depencies on Ubuntu and create a custom script to install them.
# Tested on Ubuntu 14.04, 16.04
# Author Brett G. Olivier (bgoli@users.sourceforge.net)
# (C) All rights reserved, Brett G. Olivier, Amsterdam 2016.
import os, subprocess, itertools, stat
UBUNTU = CONDA = False
try:
print(os.... | gpl-3.0 | -6,120,319,862,562,689,000 | 28.90411 | 170 | 0.603604 | false | Detect all MetaToolKit depencies on Ubuntu and create a custom script to install them. Tested on Ubuntu 14.04, 16.04 Author Brett G. Olivier (bgoli@users.sourceforge.net) (C) All rights reserved, Brett G. Olivier, Amsterdam 2016. First lets check for some Python essentials this should just be there for any sane python ... | 498 | en | 0.622605 |
j4k0bk/pyidaemon | replies.py | 1 | 7720 |
# FIXME: Move these messages to somewhere else
NUMERIC_REPLIES = {
'001' : 'Welcome to the Internet Relay Network %s',
'002' : 'Your host is %s, running version %s',
'003' : 'This server was created %s',
'004' : '<servername> <version> <available user modes> <available channel modes>',
'31... | gpl-2.0 | 7,832,151,543,027,428,000 | 26.278388 | 86 | 0.553886 | false | FIXME: Move these messages to somewhere else -- IRC REPLIES ------------------------------------------------------------- May be a 3-digit numeric FIXME -- IRC ERRORS -------------------------------------------------------------- | 229 | en | 0.200538 |
zojoncj/cleanthehead | nsnitro/nsresources/__init__.py | 1 | 2953 | from nsbaseresource import NSBaseResource
from nsconfig import NSConfig
from nscspolicy import NSCSPolicy
from nscsvserver import NSCSVServer
from nscsvservercspolicybinding import NSCSVServerCSPolicyBinding
from nscsvserverresponderpolicybinding import NSCSVServerResponderPolicyBinding
from nscsvserverrewritepolicybin... | apache-2.0 | -3,418,641,863,379,671,000 | 38.905405 | 79 | 0.764985 | false | 0 | en | 0.110449 | |
espressif/esp-idf | tools/mkdfu.py | 1 | 9975 | #!/usr/bin/env python
#
# Copyright 2020-2021 Espressif Systems (Shanghai) CO LTD
#
# 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 | -567,022,162,495,438,100 | 34.37234 | 140 | 0.589975 | false | Add file to be written into flash at given address
Files are split up into chunks in order avoid timing-out during erasing large regions. Instead of adding
"app.bin" at flash_addr it will add:
1. app.bin at flash_addr # sizeof(app.bin) == self.part_size
2. app.bin.1 at flash_addr + self.part_size
3. app.bin.2 at fl... | 2,611 | en | 0.798416 |
johnmgregoire/JCAPdatavis | createdlist_benchmarkingstepCA.py | 1 | 2595 | import numpy, pylab, os, sys, csv, pickle
from echem_plate_fcns import *
from echem_plate_math import *
PyCodePath=os.path.split(os.path.split(os.path.realpath(__file__))[0])[0]
sys.path.append(os.path.join(PyCodePath,'ternaryplot'))
from myternaryutility import TernaryPlot
from myquaternaryutility import QuaternaryPlo... | bsd-3-clause | -1,207,282,057,356,617,200 | 33.6 | 115 | 0.568401 | false | pylab.show() | 12 | fi | 0.166347 |
ssato/python-jinja2-cli | jinja2_cli/tests/render.py | 1 | 2414 | #
# Copyright (C) 2011 - 2013 Satoru SATOH <ssato at redhat.com>
#
import os
import unittest
import jinja2_cli.render as TT # Stands for Test Target module.
import jinja2_cli.compat
import jinja2_cli.tests.common as C
class Test_00_pure_functions(unittest.TestCase):
def test_00_mk_template_paths__wo_paths(self... | bsd-3-clause | -3,658,749,903,160,472,000 | 31.186667 | 76 | 0.553853 | false | FIXME: Write tests for jinja2_cli.render.render
Copyright (C) 2011 - 2013 Satoru SATOH <ssato at redhat.com> Stands for Test Target module. vim:sw=4:ts=4:et: | 159 | en | 0.412946 |
odbelix/mnTool | ModulosDevice/ComunicacionDB/Comunication.py | 1 | 3354 | #!/usr/bin/env python
# Comunication.py, script that manages the communication with the databas,
# as requirement it needs that exist a file with the information of the database,
# which content is :
# host => name of the host
# data base => name of database
# user => user name
# password => keyword
#
# This file is ... | gpl-2.0 | -104,137,734,422,662,380 | 34.305263 | 141 | 0.703339 | false | !/usr/bin/env python Comunication.py, script that manages the communication with the databas, as requirement it needs that exist a file with the information of the database, which content is : host => name of the host data base => name of database user => user name password => keyword This file is contained in Modulo... | 1,751 | en | 0.864484 |
Bakuutin/Pitchers | pitchers.py | 1 | 6675 | """
Программа ищет оптимальное решение для задачи про два кувшина
Для работы требуется Python 3
"""
from enum import Enum
class Action(Enum):
"""
Действия с кувшинами
"""
empty = 0
fill = 1
transfer = 2
start = 3
def get_pitchers_volume():
"""
Возвращает список из целочисленных з... | mit | -342,281,821,695,193,660 | 36.282609 | 120 | 0.611975 | false | Действия с кувшинами
Находит кратчайший путь в графе
Возвращает список из целочисленных значений объёмов кувшинов
Возвращает целочисленный желаемый объём
Считает наибольший общий делитель.
Создаёт список из всех исходящих ветвей графа в точке (i, j)
Где i и j — наполненность первого и второго кувшинов
Создаёт словарь, ... | 1,717 | ru | 0.999145 |
gpuhalla/discord_bot | newMusic.py | 1 | 16747 | """
Adapted from: https://gist.github.com/vbe0201/ade9b80f2d3b64643d854938d40a0a2d
"""
import asyncio
import functools
import itertools
import math
import random
import discord
import youtube_dlc
from async_timeout import timeout
from discord.ext import commands
# Silence useless bug reports messages
youtube_dlc.u... | gpl-3.0 | -7,463,120,260,197,721,000 | 32.001972 | 114 | 0.592254 | false | Adapted from: https://gist.github.com/vbe0201/ade9b80f2d3b64643d854938d40a0a2d
Silence useless bug reports messages Try to get the next song within 3 minutes. If no song will be added to the queue in time, the player will disconnect due to performance reasons. 3 minutes Inverse boolean value to loop and unloop. | 316 | en | 0.903029 |
zhlinh/leetcode | 0130.Surrounded Regions/solution.py | 1 | 1911 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
*****************************************
Author: zhlinh
Email: zhlinhng@gmail.com
Version: 0.0.1
Created Time: 2016-03-11
Last_modify: 2016-03-11
******************************************
'''
'''
Given a 2D board containing 'X' and 'O',
c... | apache-2.0 | -6,414,174,349,112,948,000 | 25.915493 | 75 | 0.438514 | false | :type board: List[List[str]]
:rtype: void Do not return anything, modify board in-place instead.
*****************************************
Author: zhlinh
Email: zhlinhng@gmail.com
Version: 0.0.1
Created Time: 2016-03-11
Last_modify: 2016-03-11
******************************************
!/u... | 480 | en | 0.57779 |
certtools/contactdb | contactdb/contacts/admin.py | 1 | 1153 | from django.contrib import admin
# Register your models here.
from .models import *
admin.site.register(Address)
admin.site.register(AutonomousSystem)
admin.site.register(AutonomousSystemAutomatic)
#
#admin.site.register(ClassificationIdentifier)
#admin.site.register(ClassificationType)
admin.site.register(Contact)... | agpl-3.0 | -8,570,416,123,354,967,000 | 31.027778 | 53 | 0.846487 | false | Register your models here.admin.site.register(ClassificationIdentifier)admin.site.register(ClassificationType)admin.site.register(ContactAutomatic)admin.site.register(FqdnAutomatic)admin.site.register(Inhibition)admin.site.register(NetworkAutomatic)admin.site.register(OrganisationAutomatic)admin.site.register(Organisat... | 558 | en | 0.195769 |
cmjatai/cmj | cmj/utils.py | 1 | 14127 | from datetime import date, datetime, timedelta
from functools import wraps
import re
import subprocess
import threading
from unicodedata import normalize as unicodedata_normalize
from PyPDF4.pdf import PdfFileReader
from asn1crypto import cms
from django.apps import apps
from django.conf import settings
from django.co... | gpl-3.0 | -1,395,734,842,059,924,000 | 26.065259 | 87 | 0.552301 | false | creates a base64 encoded barcode PNG image
Make a list of adjacent page ranges interspersed with "None"s
The list starts with [1, 2] and end with [num_pages-1, num_pages].
The list includes [index-1, index, index+1]
"None"s separate those ranges and mean ellipsis (...)
Example: [1, 2, None, 10, 11, 12, None, 29, 30]... | 735 | pt | 0.534876 |
dhalima3/TravelSpark | Main.py | 1 | 7574 | import requests
import os
import time
import random
from flask import Flask, request, redirect, session, url_for, render_template
from flask.json import jsonify, dumps, loads
from requests_oauthlib import OAuth2Session
import requests
import json
import urllib2
import mechanize
from bs4 import BeautifulSoup
from urlpa... | apache-2.0 | 4,999,414,832,929,667,000 | 34.227907 | 231 | 0.695933 | false | When grabbing the token Instagram requires you give the code you got in the authorization step in the token step, along with client_id + secret -_- This fetch token call might not be right for other APIs, it all demands on their requirementsTODO: Put in Flickr APi for the home page. Lets get info on myself the access_t... | 802 | en | 0.638527 |
google-research/google-research | hierarchical_foresight/models/vae.py | 1 | 3093 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | apache-2.0 | -1,294,222,527,283,148,800 | 33.752809 | 74 | 0.628839 | false | VAE for the Maze Environment.
Variational Autoencoder Models.
coding=utf-8 Copyright 2021 The Google Research 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/lice... | 642 | en | 0.848547 |
a365541453/django | django/blog/docker_part/admin.py | 1 | 1206 | # coding=utf-8
from django.contrib import admin
from docker_part.models import docker_article
# Register your models here.
from django import forms
from django.forms import fields
# Register your models here.
# form是用来控制显示的,这段代码是用来修改form的默认显示
class FlatPageForm(forms.ModelForm):
class Meta:
model = docker_article... | gpl-3.0 | 5,791,728,908,724,285,000 | 19.291667 | 50 | 0.693018 | false | coding=utf-8 Register your models here. Register your models here. form是用来控制显示的,这段代码是用来修改form的默认显示 FlatPageForm是form类,不能用来与article一起注册 所以要将修改好的form类和admin类关联起来 下面是添加富文本编辑器的代码 在管理后台的HTML文件中加入js文件, 每一个路径都会追加STATIC_URL/ 再将修改后的admin类的方式来注册article article要用admin类的方法来注册 | 264 | zh | 0.823629 |
littmus/kutime_web | kutime/views.py | 1 | 2776 | # -*- coding: utf-8 -*-
try:
import simplejson as json
except ImportError:
import json
from django.shortcuts import render
from django.http import HttpResponse
from django.core import serializers
from django.views.decorators.csrf import csrf_exempt
import watson
from models import *
def JsonResponse(json):
... | mit | -1,254,733,528,694,133,200 | 26.836735 | 83 | 0.569648 | false | -*- coding: utf-8 -*- for _q in q.split(','): if q.endswith(u'교시'):result = [s.object for s in watson.search(q)] | 130 | en | 0.507295 |
SnabbCo/neutron | neutron/tests/unit/test_l3_agent.py | 1 | 54667 | # Copyright 2012 VMware, 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 ... | apache-2.0 | 4,219,393,043,147,675,600 | 42.044882 | 79 | 0.562021 | false | Copyright 2012 VMware, 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 ag... | 2,444 | en | 0.932885 |
cjh1/cumulus | cumulus/ssh/tasks/key.py | 1 | 3038 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2015 Kitware 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 cop... | apache-2.0 | -5,409,938,265,857,967,000 | 32.384615 | 80 | 0.579658 | false | Task to generate a new key pair for a user.
!/usr/bin/env python -*- coding: utf-8 -*- Copyright 2015 Kitware 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/lice... | 744 | en | 0.823059 |
dblalock/bolt | experiments/python/compress.py | 1 | 10068 | #!/usr/bin/env python
import numpy as np
import numba
import zstandard as zstd # pip install zstandard
# ================================================================ Funcs
def nbits_cost(diffs, signed=True):
"""
>>> [nbits_cost(i) for i in [0, 1, 2, 3, 4, 5, 7, 8, 9]]
[0, 2, 3, 3, 4, 4, 4, 5, 5]
... | mpl-2.0 | -8,800,742,138,520,516,000 | 31.794788 | 90 | 0.562078 | false | >>> [nbits_cost(i) for i in [0, 1, 2, 3, 4, 5, 7, 8, 9]]
[0, 2, 3, 3, 4, 4, 4, 5, 5]
>>> [nbits_cost(i) for i in [-1, -2, -3, -4, -5, -7, -8, -9]]
[1, 2, 3, 3, 4, 4, 4, 5]
>>> nbits_cost([])
array([], dtype=int32)
>>> nbits_cost([0, 2, 1, 0])
array([0, 3, 2, 0], dtype=int32)
>>> nbits_cost([0, 2, 1, 3, 4, 0], signed=Fa... | 4,353 | en | 0.517683 |
NoBodyCam/TftpPxeBootBareMetal | nova/api/openstack/wsgi.py | 1 | 42066 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# 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/... | apache-2.0 | -310,886,773,118,716,200 | 34.113523 | 79 | 0.590429 | false | vim: tabstop=4 shiftwidth=4 softtabstop=4 Copyright 2011 OpenStack LLC. 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.... | 3,522 | en | 0.802285 |
thtrieu/qclass_dl | lstm.py | 1 | 3699 | import tensorflow as tf
from tensorflow.models.rnn import rnn_cell, rnn
from tensorflow.models.rnn import seq2seq
from tensorflow.models.rnn.ptb import reader
import numpy as np
class lstm_class(object):
def __init__(
self, embedding_mat, non_static, lstm_type, hidden_unit, sequence_length, num_classes, vo... | gpl-3.0 | 4,280,998,755,685,231,600 | 48.32 | 121 | 0.600703 | false | Placeholders for input, output and dropout Keeping track of l2 regularization loss (optional) Lookup LSTM Collect the appropriate last words into variable output (dimension = batch x embedding_size) Final (unnormalized) scores and predictions CalculateMean cross-entropy loss Accuracy | 284 | en | 0.801193 |
Kentzo/Power | power/win32.py | 1 | 3384 | # coding=utf-8
"""
Implements PowerManagement functions using GetSystemPowerStatus.
Requires Windows XP+.
Observing is not supported
"""
from ctypes import Structure, wintypes, POINTER, windll, WinError, pointer, WINFUNCTYPE
import warnings
from power import common
# GetSystemPowerStatus
# Returns brief description o... | mit | -1,949,248,720,823,125,000 | 33.886598 | 105 | 0.663121 | false | Returns warning according to GetSystemPowerStatus().BatteryLifeTime/BatteryLifePercent
@raise WindowsError if any underlying error occures.
Returns GetSystemPowerStatus().ACLineStatus
@raise: WindowsError if any underlying error occures.
Returns time remaining estimate according to GetSystemPowerStatus().BatteryLifeT... | 553 | en | 0.503158 |
tata-antares/LHCb-topo-trigger | BBDTconvert.py | 1 | 3846 | from __future__ import division, absolute_import
__author__ = 'Tatiana Likhomanenko'
import sys
import struct
from scipy.special import expit
import numpy
from rep_ef.estimators._matrixnetapplier import MatrixnetClassifier
def unpack_formula(formula_stream, print_=True):
features = list() # feature names
... | apache-2.0 | -4,683,562,495,968,357,000 | 35.638095 | 97 | 0.615965 | false | feature names bins quantity for each feature list for bins for each feature skip formula length | 95 | en | 0.753541 |
sergiopasra/connectsim | conectsim/devices/device.py | 1 | 5726 | from conectsim.optics.basenodes import Node, Source
from conectsim.devices.element import Element
from conectsim.signal import Signal
class Device(Element):
'''Something we can handle.'''
def __init__(self, name=None, parent=None):
self.parent = parent
self.children = []
if self.pare... | gpl-3.0 | -7,182,442,475,465,436,000 | 26.931707 | 74 | 0.538421 | false | Something we can handle.
Return my configuration information.
Configure myself and my children.
Container is empty object in the current position signals find pos of object with name Container is empty object in the current position signals find pos of object with name | 271 | en | 0.811603 |
midnightercz/pulp_docker | pulp-dev.py | 1 | 5020 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import optparse
import os
import sys
from pulp.devel import environment
WARNING_COLOR = '\033[31m'
WARNING_RESET = '\033[0m'
DIRS = ('/var/lib/pulp/published/docker/web',)
#
# Str entry assumes same src and dst relative path.
# Tuple entry is explicit (src, dst)
#
# P... | gpl-2.0 | -7,254,177,743,593,166,000 | 27.202247 | 97 | 0.566932 | false | !/usr/bin/env python -*- coding: utf-8 -*- Str entry assumes same src and dst relative path. Tuple entry is explicit (src, dst) Please keep alphabetized and by subproject Standard directories Install the packages in developer mode Ensure the directory is owned by apache Uninstall the packages --------------------------... | 415 | en | 0.685461 |
hanyangii/SummThing | bptree.py | 1 | 18095 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import bisect
import itertools
import operator
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
class _BNode(object):
__slots__ = ["tree", "contents", "children"]
def __init__(self, tree, contents=None, children=None):
self.tree = tree
self... | apache-2.0 | -7,392,944,706,407,312,000 | 32.207721 | 114 | 0.543814 | false | !/usr/bin/env python -*- coding: utf-8 -*- try to lend to the left neighboring sibling try the right neighbor pass the median up to the parent try to borrow from the right sibling try to borrow from the left sibling consolidate with a sibling - try left first parent is not the root parent is root, and its now empty fin... | 1,073 | en | 0.868801 |
authman/Python201609 | Nguyen_Ken/Assignments/Flask with MySQL/full_friends/server.py | 1 | 2098 | from flask import Flask, render_template, request, redirect, session, flash
from mysqlconnection import MySQLConnector
app = Flask(__name__)
app.secret_key = 'secretsquirrel'
mysql = MySQLConnector(app, 'friendsdb')
@app.route('/')
def index():
showQuery = 'SELECT * FROM friends'
friends = mysql.query_d... | mit | -6,934,720,650,099,028,000 | 22.054945 | 159 | 0.63918 | false | 0 | en | 0.110449 | |
vdv7/stap | tasks/stdio/pvt.py | 1 | 1754 | #!/usr/bin/env python3
'''Psychomotor Vigilance Task'''
#########################################################
# STAP constants and stdio
import json,sys
if 'raw_input' in vars(__builtins__): input = raw_input #Fix for Python 2.x raw_input
def send(d): print(json.dumps(d)); sys.stdout.flush()
def recv(): retur... | mit | 8,034,561,188,412,784,000 | 30.321429 | 177 | 0.657925 | false | Psychomotor Vigilance Task
!/usr/bin/env python3 STAP constants and stdioFix for Python 2.x raw_inputannounce required optionsdisplay Trial and instructions containers; let user software know that any buttons inside the instructions container should be deleted once user-input (i.e. click) is detecteddo trialsset rando... | 483 | en | 0.643527 |
cheery/pyllisp | compiler/__init__.py | 1 | 33018 | from rpython.rlib import jit
from rpython.rlib.listsort import make_timsort_class
from rpython.rlib.objectmodel import always_inline, specialize
import base
import reader
import space
class ProgramBody:
def __init__(self, blocks, functions, is_generator):
self.blocks = reverse_postorder(blocks[0])
... | agpl-3.0 | -1,058,595,052,669,584,400 | 31.952096 | 167 | 0.557847 | false | Since the frame is virtualizable now, it copies everything from tmp to juggle them. Instead of using separate index for every temporary value, we can do some live range analysis and reuse the indices. for items that quarranteely aren't simultaneously live. This is just here in case my register alloc func messes up ... | 2,702 | en | 0.417033 |
start-jsk/jsk_apc | demos/baxtergv6_apc2016/node_scripts/json_saver.py | 1 | 7469 | #!/usr/bin/env python
import datetime
from jsk_arc2017_common.msg import Content
from jsk_arc2017_common.msg import ContentArray
from jsk_arc2017_common.srv import UpdateJSON
from jsk_arc2017_common.srv import UpdateJSONResponse
import json
import os
import os.path as osp
import rospy
import shutil
from std_msgs.msg ... | bsd-3-clause | 6,995,504,888,770,529,000 | 33.419355 | 79 | 0.528585 | false | !/usr/bin/env python this is for pick task order file is only used in pick task len(order['contents']) == 5 publish stamped json_dir | 132 | en | 0.845197 |
iw3hxn/LibrERP | account_financial_report_aeroo_xls/report/common_report_header.py | 1 | 6668 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) BrowseInfo (http://browseinfo.in)
# Copyright (C) Didotech SRL
# This program is free software: you can redistribute it and/or modify
# it un... | agpl-3.0 | -1,271,005,539,179,233,300 | 44.054054 | 129 | 0.574985 | false | -*- coding: utf-8 -*- OpenERP, Open Source Management Solution Copyright (C) BrowseInfo (http://browseinfo.in) Copyright (C) Didotech SRL 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 F... | 994 | en | 0.799929 |
endrebak/epic | tests/blacklist/test_blacklist.py | 1 | 1241 | import pytest
from io import StringIO
from collections import namedtuple
import pandas as pd
from epic.blacklist.compute_poisson import compute_poisson
@pytest.fixture()
def matrix():
return pd.read_table(StringIO(u"""Chromosome Bin f1.bed f2.bed
chr1 0 1.0 1.0
chr1 200 1.0 1.0
chr1 400 1.0 10.0
chr1 600 1.0 1... | mit | 3,399,528,446,603,903,000 | 20.77193 | 89 | 0.684126 | false | 0 | en | 0.110449 | |
goodmami/pydelphin | delphin/mrs/__init__.py | 1 | 4262 | # -*- coding: utf-8 -*-
"""
This module contains classes and methods related to Minimal Recursion
Semantics [MRS]_. In addition to MRS, there are the related formalisms
Robust Minimal Recursion Semantics [RMRS]_, Elementary Dependency
Structures [EDS]_, and Dependency Minimal Recursion Semantics [DMRS]_.
As a convenie... | mit | -4,533,146,085,247,655,000 | 43.789474 | 76 | 0.671445 | false | Convert a textual representation of \*MRS from one the src_fmt
representation to the tgt_fmt representation. By default, only
read and convert a single \*MRS object (e.g. for `mrx` this
starts at <mrs> and not <mrs-list>), but changing the `mode`
argument to `corpus` (alternatively: `list`) reads and converts
multiple ... | 3,377 | en | 0.738619 |
DavidPurcell/murano_temp | murano/cfapi/cfapi.py | 1 | 13455 | # Copyright (c) 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -3,214,018,305,001,191,000 | 38.690265 | 79 | 0.570197 | false | WSGI controller for application catalog resource in Murano v1 API
Here is the example of request body given us from Cloud Foundry:
{
"service_id": "service-guid-here",
"plan_id": "plan-guid-here",
"organization_guid": "org-guid-here",
"space_guid": "space-guid-here",
"parameters": {"param1": "v... | 2,228 | en | 0.864955 |
mjbrownie/django-cloudmailin | cloudmailin/views.py | 1 | 2088 | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponse, HttpResponseNotFound, HttpResponseForbidden, HttpResponseServerError
import hashlib
def generate_signature(params, secret):
sig = "".join(params[k].encode('utf-8') for k in sorted(params.k... | bsd-3-clause | 6,135,572,548,960,023,000 | 31.625 | 106 | 0.573755 | false | 0 | en | 0.110449 | |
youknowone/instantauth | python/instantauthtests/test_verifier.py | 1 | 1247 |
import pytest
from instantauth.verifiers import BypassVerifier, DataKeyVerifier
from instantauth.verifiers.timehash import TimeHashVerifier
from instantauth.coders.json import JsonCoder
bypass = BypassVerifier('pubkey')
datakey = DataKeyVerifier(JsonCoder(), 'key')
timehash = TimeHashVerifier(now=lambda : 100000000... | bsd-2-clause | 4,985,760,965,628,746,000 | 42 | 126 | 0.68324 | false | Round-trip test
mod private_key public_key input output need better test, not round-trip one | 111 | en | 0.488035 |
costastf/toonlib | _CI/bin/semver.py | 1 | 6205 | # -*- coding: utf-8 -*-
import re
_REGEX = re.compile('^(?P<major>(?:0|[1-9][0-9]*))'
'\.(?P<minor>(?:0|[1-9][0-9]*))'
'\.(?P<patch>(?:0|[1-9][0-9]*))'
'(\-(?P<prerelease>[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?'
'(\+(?P<build>[0-9A-Za-z-]+(\.[... | mit | 1,343,708,063,086,418,700 | 32.722826 | 88 | 0.607736 | false | Parse version to major, minor, patch, pre-release, build parts.
-*- coding: utf-8 -*- look for the last sequence of number(s) in a string and increment, from: http://code.activestate.com/recipes/442460-increment-numbers-in-a-string/c1 https://github.com/k-bx/python-semver/blob/master/LICENSE.txt Downloaded: 20160406 ... | 1,865 | en | 0.872226 |
adriennekarnoski/data-structures | python/data_structures/test_priorityq.py | 1 | 1646 | """Test the functions of priorityq module."""
import pytest
def test_pop_removes_highest_priority():
"""Test pop method removed first value in highest priority."""
from priorityq import PriorityQueue
p = PriorityQueue()
for i in range(3):
p.insert(i)
p.insert(8, 2)
p.insert(10, 2)
... | mit | 834,841,151,389,414,300 | 25.126984 | 67 | 0.651883 | false | Test the peek method returns none if no values available.
Test the peek method to show highest priority value.
Test pop method on empties priority queue raises error.
Test pop method on new priority queue raises error.
Test pop method removed first value in highest priority.
Test pop method removed first value in highe... | 372 | en | 0.688745 |
athena-voice/athena-voice-client | athena/apis.py | 1 | 1210 | """
Finds and stores APIs in the 'api_lib' global variable
"""
import pkgutil
import inspect
import traceback
from athena import settings
api_lib = None
def find_apis():
""" Find APIs """
global api_lib
api_lib = {}
print('~ Looking for APIs in:', settings.API_DIRS)
for finder... | gpl-3.0 | 3,669,009,364,997,560,000 | 25.5 | 78 | 0.513223 | false | Find APIs
List APIs
Verify APIs
Finds and stores APIs in the 'api_lib' global variable | 89 | en | 0.272501 |
wkiri/DEMUD | demud/demud.py | 1 | 92208 | #!/usr/bin/env python
# File: demud.py
# Author: Kiri Wagstaff, 2/28/13; James Bedell, summer 2013
#
# Implementation of DEMUD (Discovery through Eigenbasis Modeling of
# Uninteresting Data). See Wagstaff et al., AAAI 2013.
#
# Copyright 2013-2015, by the California Institute of Technology. ALL
# RIGHTS RESERVED. Uni... | apache-2.0 | 4,071,230,157,630,002,700 | 37.759142 | 143 | 0.569658 | false | !/usr/bin/env python File: demud.py Author: Kiri Wagstaff, 2/28/13; James Bedell, summer 2013 Implementation of DEMUD (Discovery through Eigenbasis Modeling of Uninteresting Data). See Wagstaff et al., AAAI 2013. Copyright 2013-2015, by the California Institute of Technology. ALL RIGHTS RESERVED. United States Govern... | 17,104 | en | 0.795195 |
Blueshoe/djangocms-workflows | workflows/forms.py | 1 | 2853 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
from django.contrib.auth import get_user_model
from django.utils.translation import ugettext_lazy as _
from .models import Action
class ActionForm(forms.Form):
message_ = forms.CharField(
label=_('Message'),
... | mit | 9,073,147,331,475,379,000 | 33.373494 | 89 | 0.592709 | false | :rtype: django.contrib.auth.models.User
:rtype: str
:rtype: Action
-*- coding: utf-8 -*- {open, approve, reject, cancel} no editor can be chosen root must be request non-root must not be request | 196 | en | 0.707841 |
osroom/osroom | apps/modules/theme_setting/process/nav_setting.py | 1 | 5260 | #!/usr/bin/env python
# -*-coding:utf-8-*-
# @Time : 2019/12/2 14:43
# @Author : Allen Woo
from bson import ObjectId
from flask import request, g
from flask_babel import gettext
from apps.app import mdbs, cache
from apps.core.flask.reqparse import arg_verify
from apps.utils.format.obj_format import json_to_pys... | bsd-2-clause | 6,717,044,610,144,772,000 | 26.128342 | 83 | 0.459125 | false | Update
:RETURN:
!/usr/bin/env python -*-coding:utf-8-*- @Time : 2019/12/2 14:43 @Author : Allen Woo | 100 | en | 0.244391 |
RuthAngus/chronometer | chronometer/compare.py | 1 | 3001 | """
Compare the properties injected to the properties recovered.
Particularly the Ages.
"""
import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import h5py
plotpar = {'axes.labelsize': 18,
'font.size': 10,
'legend.fontsize': 18,
'xtick.labelsize': 18,
... | mit | -151,283,496,425,190,530 | 31.978022 | 77 | 0.586138 | false | Take a 2d array of samples and produce medians and confidence intervals.
Compare the true property with the injected property.
Compare the properties injected to the properties recovered.
Particularly the Ages.
Load samples Find N stars Load iso only samples Calculate medians and errorbars Load truths Make plot | 314 | en | 0.825208 |
miguelinux/vbox | src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/OptRomInfStatement.py | 1 | 5392 | ## @file
# process OptionROM generation from INF statement
#
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of ... | gpl-2.0 | -6,444,457,340,399,212,000 | 33.793548 | 115 | 0.635386 | false | @file process OptionROM generation from INF statement Copyright (c) 2007, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may b... | 1,882 | en | 0.642275 |
hakuna-m/wubiuefi | src/wubi/backends/win32/backend.py | 1 | 37791 | # Copyright (c) 2008 Agostino Russo
#
# Written by Agostino Russo <agostino.russo@gmail.com>
#
# This file is part of Wubi the Win32 Ubuntu Installer.
#
# Wubi is free software; you can redistribute it and/or modify
# it under 5the terms of the GNU Lesser General Public License as
# published by the Free Software Found... | gpl-2.0 | 8,644,267,584,578,374,000 | 40.574257 | 156 | 0.571988 | false | Copyright (c) 2008 Agostino Russo Written by Agostino Russo <agostino.russo@gmail.com> This file is part of Wubi the Win32 Ubuntu Installer. Wubi is free software; you can redistribute it and/or modify it under 5the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either vers... | 2,399 | en | 0.812475 |
barnone/EigenD | app_cmdline/script.py | 2 | 3985 |
#
# Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com
#
# This file is part of EigenD.
#
# EigenD 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) a... | gpl-3.0 | -5,788,715,704,505,319,000 | 28.087591 | 123 | 0.65596 | false | Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com This file is part of EigenD. EigenD 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. E... | 676 | en | 0.892391 |
benrudolph/commcare-hq | custom/ewsghana/tests/handlers/utils.py | 1 | 5950 | import datetime
from couchdbkit.exceptions import ResourceNotFound
from casexml.apps.stock.consumption import ConsumptionConfiguration
from couchforms.models import XFormInstance
from corehq import Domain
from corehq.apps.accounting import generator
from corehq.apps.commtrack.models import CommtrackConfig, CommtrackAct... | bsd-3-clause | -8,109,241,093,053,428,000 | 39.753425 | 110 | 0.647899 | false | 0 | en | 0.110449 | |
World-Youth-Days/Dictionary | adapter/old_db_inserter.py | 1 | 6193 | # -*- coding: utf-8 -*-
import codecs
from DbAdapter import DbAdapter
from display_dict import display_dict
db = DbAdapter(None) # define db connection
printable = []
# --------------------------------------------------------------------#
# -------------------------- Open file -------------------------#
# ----... | gpl-3.0 | 5,694,650,053,456,996,000 | 30.753846 | 94 | 0.465278 | false | -*- coding: utf-8 -*- define db connection -------------------------------------------------------------------- -------------------------- Open file ------------------------- -------------------------------------------------------------------- sorry, I avoid understanding deep/shallow copy specs ;) --------------... | 2,203 | en | 0.242223 |
gmalmquist/unix-hollymonitor | src/unix-hollymonitor.py | 1 | 4266 | #!/usr/bin/env python
# This is a script to run the hollymonitor in a little
# standalone webserver, rather than being integrated
# into a larger application.
from __future__ import print_function
from BaseHTTPServer import BaseHTTPRequestHandler
from subprocess import Popen, PIPE, STDOUT
import mimetypes
import os
i... | mit | -7,604,787,221,590,789,000 | 28.219178 | 95 | 0.599391 | false | !/usr/bin/env python This is a script to run the hollymonitor in a little standalone webserver, rather than being integrated into a larger application.print(file_path, line)print('Mime-type unknown, defaulting to text/html.')print('Mime-type is', mime_type, mime_encoding) | 272 | en | 0.709386 |
mtayseer/infoq-downloader | infoq_downloader.py | 1 | 4839 | #!/usr/bin/env python
from __future__ import division, print_function
import os
import sys
import re
import argparse
import requests
import cssselect
import lxml.html
import unicodedata
if sys.version_info.major == 3:
text_type = str
else:
text_type = unicode
# Some settings
download_directory = 'downloads'
... | mit | 752,140,745,732,130,700 | 33.81295 | 80 | 0.692498 | false | !/usr/bin/env python Some settings Set argparse to parse the paramaters Parse the arguments passed to the script Tell infoq that I'm an iPad, so it gives me simpler HTML to parse & mp4 file qto download Start downloading Clean the page Make slides links point to local copies Create a directory for the downloaded presen... | 909 | en | 0.778923 |
cwrubiorobots/ramblerVision | backup/shelterfind-serial-kogeto.py | 1 | 4607 | #!/usr/bin/python
import cv, serial, struct
from datetime import datetime
cyril = serial.Serial('/dev/ttyAMA0', 9600) #open first serial port and give it a good name
print "Opened "+cyril.portstr+" for serial access"
centerX = 175 #160
centerY = 140 #120
cropped = None
img = None
# decrease angular resolution for 8... | gpl-2.0 | -3,594,148,619,330,314,000 | 31.907143 | 146 | 0.598003 | false | !/usr/bin/pythonopen first serial port and give it a good name160120 decrease angular resolution for 8-bit serial transport allow user to click on image from camera to set the center for transformationprint "Set center ", x, ", ", y, ": ", img[y,x]global centerXglobal centerYcenterX = xcenterY = ycapture = cv.CaptureFr... | 1,349 | en | 0.689293 |
cysuncn/python | spark/crm/PROC_O_LNA_XDXT_CUSTOMER_INFO.py | 1 | 8194 | #coding=UTF-8
from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext
from pyspark.sql.types import *
from datetime import date, datetime, timedelta
import sys, re, os
st = datetime.now()
conf = SparkConf().setAppName('PROC_O_LNA_XDXT_CUSTOMER_INFO').setMaster(sys.argv[2])
sc = SparkContext(conf = co... | gpl-3.0 | -7,871,501,833,930,011,000 | 52.517241 | 198 | 0.532474 | false | coding=UTF-8处理需要使用的日期etl日期上一日日期月初日期上月末日期10位日期任务[12] 001-01::先删除原表所有数据从昨天备表复制一份全量过来F_CI_XDXT_CUSTOMER_INFO = sqlContext.read.parquet(hdfs+'/F_CI_XDXT_CUSTOMER_INFO/*')F_CI_XDXT_CUSTOMER_INFO.registerTempTable("F_CI_XDXT_CUSTOMER_INFO")先删除备表当天数据从当天原表复制一份全量到备表 | 257 | zh | 0.331029 |
xiexiangwei/xGame | gamecenter/main.py | 1 | 2054 | # coding:utf-8
import platform
import sys
sys.path.append("../")
if 'twisted.internet.reactor' not in sys.modules:
if platform.system() == "Linux":
from twisted.internet import epollreactor
epollreactor.install()
else:
from twisted.internet import iocpreactor
iocpreactor.inst... | apache-2.0 | -3,971,600,087,697,623,000 | 26.916667 | 95 | 0.695522 | false | coding:utf-8 | 12 | en | 0.777938 |
jaredthomas68/FEM | src/fem.py | 1 | 32857 | import math as m
import numpy as np
import scipy.sparse as sparse
from scipy.sparse.linalg import spsolve
import time
import matplotlib.pylab as plt
def ffunc_constant(x, a):
"""
Constant valued forcing function
:param x: point at which to evaluate the forcingg function
:param a: parameter values, in t... | mit | 4,212,410,585,531,477,000 | 30.11553 | 151 | 0.474754 | false | load cases corresponding to a[-1] 0: constant axial load 1: constant transverse load 2: Linearly distributed transverse load (0 at left, N at right) J = (np.pi*d**4)/32. define LM array initialize global stiffness matrix K = np.zeros((ID[ID[:]>0].shape)) coding 2 coding 3 initialize global force vector get quadrature p... | 6,139 | en | 0.452013 |
librelab/qtmoko-test | qtopiacore/qt/util/local_database/qlocalexml2cpp.py | 1 | 18278 | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
## Contact: Nokia Corporation (qt-info@nokia.com)
##
## This file is part of the test suite of the Qt Toolkit.
##
## $QT_BEG... | gpl-2.0 | 4,154,200,599,349,329,400 | 32.661142 | 248 | 0.57747 | false | !/usr/bin/env python Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Contact: Nokia Corporation (qt-info@nokia.com) This file is part of the test suite of the Qt Toolkit. $QT_BEGIN_LICENSE:LGPL$ Commercial Usage Licensees holding valid Qt Commercial licenses may use this file in a... | 2,456 | en | 0.715406 |
anurag03/integration_tests | cfme/tests/cloud_infra_common/test_discovery.py | 1 | 2639 | # -*- coding: utf-8 -*-
import pytest
import time
from cfme.common.provider import BaseProvider
from cfme.exceptions import CFMEException
from cfme.infrastructure.provider.scvmm import SCVMMProvider
from cfme.utils.generators import random_vm_name
from cfme.utils.log import logger
from cfme.utils.wait import TimedOutE... | gpl-2.0 | 7,873,537,507,350,937,000 | 28.651685 | 99 | 0.674877 | false | Tests whether cfme will discover a vm change (add/delete) without being manually refreshed.
Prerequisities:
* Desired provider set up
Steps:
* Create a virtual machine on the provider.
* Wait for the VM to appear
* Delete the VM from the provider (not using CFME)
* Wait for the VM to become Archiv... | 438 | en | 0.84412 |
turdusmerula/kipartman | kipartbase/swagger_server/models/part_offer_data.py | 1 | 7328 | # coding: utf-8
from __future__ import absolute_import
from .base_model_ import Model
from datetime import date, datetime
from typing import List, Dict
from ..util import deserialize_model
class PartOfferData(Model):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edi... | gpl-3.0 | 7,979,520,396,145,676,000 | 25.941176 | 178 | 0.586517 | false | NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
PartOfferData - a model defined in Swagger
:param packaging_unit: The packaging_unit of this PartOfferData.
:type packaging_unit: int
:param quantity: The quantity of this PartOfferData.
:type quantity: int
:param... | 3,068 | en | 0.335707 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.