text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
Cgruppo/oppia
core/domain/exp_domain_test.py
Python
apache-2.0
19,626
0.000357
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Copyright 2012 Unknown <diogo@arch> # # 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 optio...
ODiogoSilva/TriFusion
trifusion/ortho/OrthomclToolbox.py
Python
gpl-3.0
64,833
0.000586
# Copyright 2015 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...
jbedorf/tensorflow
tensorflow/python/kernel_tests/where_op_test.py
Python
apache-2.0
8,003
0.010371
""" Weather information for air and road temperature, provided by Trafikverket. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.trafikverket_weatherstation/ """ import asyncio from datetime import timedelta import logging import aiohttp import vo...
jamespcole/home-assistant
homeassistant/components/trafikverket_weatherstation/sensor.py
Python
apache-2.0
5,210
0
import requests import ujson as json BASE_URL = 'http://localhost:8088/' # set the port and IP address correct USERNAME = '<Your username here>' PASSWD = '<Your password here>' TOKEN = '' # will be filled in by the login request VERBOSE = 1 # verbose 0 => No output, 1 => minimal output, 2 => full output def creat...
openmotics/gateway
tools/api-tester.py
Python
agpl-3.0
3,464
0.001443
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/space/weapon/shared_wpn_heavy_disruptor.iff" result.attrib...
anhstudios/swganh
data/scripts/templates/object/draft_schematic/space/weapon/shared_wpn_heavy_disruptor.py
Python
mit
461
0.047722
''' Simple test for apachelogs ''' import unittest from apachelogs import ApacheLogFile class apachelogs_test(unittest.TestCase): def test_foo(self): log = ApacheLogFile('test.log') line = iter(log).next() self.assertEquals(line.ip, '127.0.0.1') self.assertEquals(line.ident, '-...
bkjones/loghetti
test/apachelogs_test.py
Python
bsd-3-clause
930
0.005376
#!/usr/bin/python # # Copyright 2014: wycomco GmbH (choules@wycomco.de) # 2015: modifications by Tim Sutton # # 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...
FabianN/autopkg_recipies
AdobeReader/AdobeReaderUpdatesURLProvider.py
Python
mit
5,706
0.000526
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/> # # EventGhost is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either versio...
tfroehlich82/EventGhost
plugins/Mouse/__init__.py
Python
gpl-2.0
21,487
0.004328
# Copyright (C) 2012 Statoil ASA, Norway. # # The file 'ecl_kw.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 th...
iLoop2/ResInsight
ThirdParty/Ert/devel/python/python/ert/enkf/enkf_main.py
Python
gpl-3.0
13,314
0.007736
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Romeo Theriault <romeot () hawaii.edu> # # 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 th...
akirakoyasu/ansible-modules-core
network/basics/uri.py
Python
gpl-3.0
19,263
0.006489
import string from pyparsing import ( Literal, White, Word, alphanums, CharsNotIn, Forward, Group, SkipTo, Optional, OneOrMore, ZeroOrMore, pythonStyleComment) class Parser(object): left_bracket = Literal("{").suppress() right_bracket = Literal("}").suppress() semicolon = Literal(";").suppress() ...
Nat-Lab/pac.py
lib/confParser.py
Python
mit
3,119
0
from JumpScale import j class test_complextype_user_osismodelbase(j.code.classGetJSRootModelBase()): """ group of users """ def __init__(self): pass self._P_id=0 self._P_organization="" self._P_name="" self._P_emails=list() self._P_groups=list() s...
Jumpscale/jumpscale6_core
apps/osis/logic/test_complextype/user/test_complextype_user_osismodelbase.py
Python
bsd-2-clause
5,069
0.00868
""" This file includes commonly used utilities for this app. """ from datetime import datetime today = datetime.now() year = today.year month = today.month day = today.day # Following are for images upload helper functions. The first two are used for product upload for the front and back. # The last two are used f...
sunlaiqi/fundiy
src/shop/utils.py
Python
mit
2,973
0.006805
# -*- coding: utf-8 -*- # # test_disconnect_multiple.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 th...
terhorstd/nest-simulator
pynest/nest/tests/test_sp/test_disconnect_multiple.py
Python
gpl-2.0
10,751
0
"""File holds the three classes Bit, DigitProduct, and PartialProduct.""" class Bit: """Class Bit represents a single bit of a digit-product.""" def __init__(self, identifier, absolute, relative): self.identifier = identifier self.absolute = absolute self.relative = relative def s...
Koppermann/mod-mul-mersenne
mod_mul_mersenne/classes.py
Python
mit
2,433
0.000822
from enigma import eEPGCache, getBestPlayableServiceReference, \ eServiceReference, iRecordableService, quitMainloop from Components.config import config from Components.UsageConfig import defaultMoviePath from Components.TimerSanityCheck import TimerSanityCheck from Screens.MessageBox import MessageBox import Scree...
openpli-arm/enigma2-arm
RecordTimer.py
Python
gpl-2.0
26,731
0.033781
import theano theano.test()
1iyiwei/pyml
code/ch13/theano_test.py
Python
mit
29
0
#!/usr/bin/python # Copyright (C) 2013 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. import urwid import os from example1 import palette # example data from widgets import TreeBox from tree import Tree from decoration import CollapsibleArrowTree ...
audebert/alot
alot/foreign/urwidtrees/example4.filesystem.py
Python
gpl-3.0
4,462
0.002465
# -*- coding: utf-8 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class ExternalSyncTemplate(models.Model): _description = 'External Sync Template' _name = 'clv.external_sync.template' _ord...
CLVsol/clvsol_odoo_addons
clv_external_sync/models/external_sync_template.py
Python
agpl-3.0
2,540
0.001181
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
cyli/volatility
volatility/plugins/mac/socket_filters.py
Python
gpl-2.0
3,566
0.00673
from selenium import webdriver from selenium.webdriver.common.keys import Keys from .base import FunctionalTest class RecipeEditTest(FunctionalTest): def test_can_add_a_recipe(self): # Ben goes to the recipe website homepage self.browser.get(self.server_url) # He notices the page title m...
benosment/recipes
functional_tests/test_edit_recipe.py
Python
mit
8,273
0.00411
from __future__ import division, print_function, absolute_import import numpy as np from numpy.dual import eig from scipy.special import comb from scipy.signal import convolve __all__ = ['daub', 'qmf', 'cascade', 'morlet', 'ricker', 'morlet2', 'cwt'] def daub(p): """ The coefficients for the FIR low-pass fi...
jamestwebber/scipy
scipy/signal/wavelets.py
Python
bsd-3-clause
13,701
0.000292
# Copyright 2017 The Vispek Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
hl475/vispek
examples/run_raw_file_io.py
Python
apache-2.0
1,604
0.003117
import sys import platform import twisted import scrapy from scrapy.command import ScrapyCommand class Command(ScrapyCommand): def syntax(self): return "[-v]" def short_desc(self): return "Print Scrapy version" def add_options(self, parser): ScrapyCommand.add_options(self, pars...
openhatch/oh-mainline
vendor/packages/scrapy/scrapy/commands/version.py
Python
agpl-3.0
850
0.004706
# This code can be put in any Python module, it does not require IPython # itself to be running already. It only creates the magics subclass but # doesn't instantiate it yet. # from __future__ import print_function import json from IPython.core.magic import (Magics, magics_class, line_magic, ...
tbenst/jupyter_webppl
jupyter_webppl/jupyter_webppl.py
Python
gpl-3.0
2,273
0.00132
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ImageViewTemplate.ui' # # Created: Thu May 1 15:20:40 2014 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets try: _fromUtf8 = QtCore.QString.f...
mylxiaoyi/mypyqtgraph-qt5
pyqtgraph/imageview/ImageViewTemplate_pyqt.py
Python
mit
8,950
0.003017
import sqlite3 def cursor(): global conn return conn.cursor() def commit(): global conn conn.commit() def insert(table, data): global conn c = conn.cursor() keys = [*data] template_list = ','.join(['?'] * len(data)) query = "INSERT INTO {} ({}) VALUES ({})".format(table, ','.join(...
flukiluke/eris
db.py
Python
mit
686
0.010204
""" This module should trigger a linting error for camelcase function name. """ def camelCaseFunc(): """ This function has a bad name. """
thusoy/grunt-pylint
test/fixtures/test_package/camelcasefunc.py
Python
mit
144
0.006944
from keyman.interface import app
sahabi/keyman
main.py
Python
mit
33
0
import unittest from openerp.tools import misc class test_countingstream(unittest.TestCase): def test_empty_stream(self): s = misc.CountingStream(iter([])) self.assertEqual(s.index, -1) self.assertIsNone(next(s, None)) self.assertEqual(s.index, 0) def test_single(self): ...
vileopratama/vitech
src/openerp/addons/base/tests/test_misc.py
Python
mit
1,108
0.000903
import sys import os import unittest sys.path.append(os.path.abspath(".")) import pymzml from pymzml.spec import PROTON import pymzml.run as run import test_file_paths import numpy as np class SpectrumMS2Test(unittest.TestCase): """ BSA test file Peptide @ Scan: 2548 RT [min] 28.96722412109...
StSchulze/pymzML
tests/ms2_spec_test.py
Python
mit
2,583
0.003097
# -*- coding: utf-8 -*- """Base stuff for providers that handle filesystem directories.""" from xal.provider import ResourceProvider from xal.dir.resource import Dir class DirProvider(ResourceProvider): """Base class for filesystem directories.""" def __init__(self, resource_factory=Dir): super(DirPro...
benoitbryon/xal
xal/dir/provider.py
Python
bsd-3-clause
895
0
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_virtual_hubs_operations.py
Python
mit
26,953
0.004786
from django.conf import settings from . import defaults __title__ = 'fobi.contrib.plugins.form_elements.fields.' \ 'select_multiple_with_max.conf' __author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>' __copyright__ = '2014-2017 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' __all__ = ('get_sett...
mansonul/events
events/contrib/plugins/form_elements/fields/select_multiple_with_max/conf.py
Python
mit
1,127
0
import os files = os.listdir(os.path.join('src','effects')) for file in files: if file[-3:] == '.py' and file[:2] != '__': exec('from .%s import *' % (file[:-3]))
cycladesnz/chambersAndCreatures
src/effects/__init__.py
Python
gpl-2.0
175
0.005714
#!/usr/bin/env python import wx from wx.lib.agw import floatspin as fs import numpy as np class MyFrame(wx.Frame): def __init__(self, *args, **kws): super(self.__class__,self).__init__(*args, **kws) nb1 = MyNB(self) self.Show() class MyFrame1(wx.Frame): def __init__(self, *a...
Archman/felapps
tests/test2.py
Python
mit
8,381
0.022193
# Programmer: Noah Osterhout # Date: September 30th 2016 1:40PM EST # Project: Kirby_Physics.py #Ask what Problem they will be using print() print("This Program will find the misisng Variables using the three known ones and using PEMDAS") print() beetles_mem = input("What Beetles member will you be using? ")...
NoahFlowa/CTC_Projects
Osterhout_Python/Kirby_Physics.py
Python
mit
1,794
0.043478
from webob import Response from keystone import utils from keystone.common import template, wsgi class ExtensionsController(wsgi.Controller): """Controller for extensions related methods""" def __init__(self, options): super(ExtensionsController, self).__init__() self.options = options ...
ntt-pf-lab/backup_keystone
keystone/controllers/extensions.py
Python
apache-2.0
752
0.00133
#!/usr/bin/env python # -*- coding: utf-8 -*- from solution import Solution from solution import TreeNode def constructOne(s): if s == '#': return None else: return TreeNode(int(s)) def createTree(tree): q = [] root = constructOne(tree[0]); q.append(root); idx = 1; while ...
zhlinh/leetcode
0094.Binary Tree Inorder Traversal/test.py
Python
apache-2.0
874
0.006865
from django.conf.urls.defaults import * from django.views.generic.dates import YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView from tinymce.widgets import TinyMCE from tinymce.views import preview from opstel.models import Entry entry_info_dict = {'queryset':Entry.live.all(), 'date_field': 'pub_date'...
davogler/venus
opstel/urls/entries.py
Python
mit
1,232
0.018669
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
SUSE/azure-sdk-for-python
azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_assignments_operations.py
Python
mit
30,831
0.002465
""" Physics test sandbox for the space race game! Alistair Reid 2015 """ import matplotlib.pyplot as pl import matplotlib as mpl import numpy as np from numpy.linalg import norm from time import time, sleep import os def integrate(states, props, inp, walls, bounds, dt): """ Implementing 4th order Runge-Kutta f...
lmccalman/spacerace
physics/engine.py
Python
mit
10,367
0.002026
def getSublists(L, n): sublists = [] for i in range(len(L)): next_sublist = L[i:i+n] if len(next_sublist) == n: sublists.append(next_sublist) return sublists # Test Cases L = [10, 4, 6, 8, 3, 4, 5, 7, 7, 2] print getSublists(L, 4) == [[10, 4, 6, 8], [4, 6, 8, 3], [6, 8, 3, 4]...
NicholasAsimov/courses
6.00.1x/final/p4-1.py
Python
mit
459
0.004357
import csbuild #csbuild.SetActiveToolchain("android") @csbuild.project("AndroidTest_Basic", "AndroidTest_Basic") def AndroidTest_Basic(): csbuild.Toolchain("android").SetCcCommand("gcc") csbuild.Toolchain("android").SetCxxCommand("g++") csbuild.Toolchain("android").SetPackageName("csbuild.UnitTest.AndroidBasic") ...
ShadauxCat/csbuild
UnitTests/Android/unit_test_android.py
Python
mit
622
0.016077
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
kobejean/tensorflow
tensorflow/python/autograph/converters/asserts_test.py
Python
apache-2.0
1,319
0.002274
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from rest_framework import response, schemas from rest_framework.decorators import ( api_view, renderer_classes, ) from drf_yasg.renderers import ( OpenAPIRenderer, SwaggerUIRenderer, ) @api_view() @renderer_classes([OpenAPIRenderer, SwaggerUIRen...
masschallenge/impact-api
web/impact/impact/schema.py
Python
mit
482
0
a = "1" b = 1 print("Arvud on " + 5 * a + " ja " + str(5 * b))
captainhungrykaboom/MTAT.TK.006
6. märts - 12. märts ülesanded/harjutus ülesanne 6.py
Python
mit
62
0.016129
from builtins import str from qgis.PyQt.QtCore import QFileInfo from qgis.PyQt.QtWidgets import QFileDialog def update_directory_key(settings, settings_dir_key, fileName): """ modified from module RASTERCALC by Barry Rowlingson """ path = QFileInfo(fileName).absolutePath() settings.setValue(se...
mauroalberti/gsf
pygsf/utils/qt_utils/filesystem.py
Python
gpl-3.0
1,060
0.003774
# Copyright 2009-2015 MongoDB, 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 agreed to in writin...
neharejanjeva/techstitution
venv/lib/python2.7/site-packages/pymongo/collection.py
Python
cc0-1.0
104,519
0.000287
# # [The "BSD license"] # Copyright (c) 2012 Terence Parr # Copyright (c) 2012 Sam Harwell # Copyright (c) 2014 Eric Vergnaud # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redis...
sidhart/antlr4
runtime/Python3/src/antlr4/atn/LexerATNSimulator.py
Python
bsd-3-clause
26,465
0.007255
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # Copyright 2012 Canonical # Author: Marco Trevisan (Treviño) # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundati...
foer/linuxmuster-client-unity
tests/autopilot/unity/emulators/panel.py
Python
gpl-3.0
11,333
0.000794
#!/usr/bin/python import json from urllib import urlopen import requests import getpass from string import Template import sys import os import subprocess class RunError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) def run(command, **kwar...
aqavi-paracha/coinsbazar
qa/pull-tester/pull-tester.py
Python
mit
8,761
0.007191
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Nexenta Systems, 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.apa...
tylertian/Openstack
openstack F/nova/nova/volume/nexenta/volume.py
Python
apache-2.0
11,026
0.001179
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
sadanandb/pmt
src/pyasm/prod/biz/texture.py
Python
epl-1.0
5,425
0.00977
import re import optparse from django.core.management.base import BaseCommand from dbmail.models import MailTemplate from dbmail.defaults import BACKEND from dbmail import db_sender def send_test_msg(pk, email, user=None, **kwargs): template = MailTemplate.objects.get(pk=pk) slug = template.slug var_lis...
Shekharrajak/django-db-mailer
dbmail/management/commands/dbmail_test_send.py
Python
gpl-2.0
1,678
0.004172
from django.contrib import admin class CandidateAdmin(admin.ModelAdmin): fieldsets = [ (None, { 'fields': ['email', 'first_name', 'last_name', 'gender', 'cv'] }), ('Contact Information', { 'classes': ('collapse',), 'fields': ['mobile_phone'] }), ...
QC-Technologies/HRMS
interview/admin/candidate.py
Python
gpl-3.0
1,067
0
# Stripped down configuration file for ipython-notebook in Topographica. c = get_config() #------------------------------------------------------------------------------ # NotebookApp configuration #------------------------------------------------------------------------------ # NotebookApp will inherit config from:...
Tasignotas/topographica_mirror
platform/ipython/profile_topo/ipython_notebook_config.py
Python
bsd-3-clause
4,652
0.003869
#!/usr/bin/env python import os import sys from setuptools import setup SETUP_DIR = os.path.dirname(__file__) README = os.path.join(SETUP_DIR, "README.rst") NEEDS_PYTEST = {"pytest", "test", "ptr"}.intersection(sys.argv) PYTEST_RUNNER = ["pytest-runner", "pytest-cov"] if NEEDS_PYTEST else [] setup( name="cwl-u...
common-workflow-language/cwl-upgrader
setup.py
Python
apache-2.0
2,104
0
def hello_again(): print("hello again")
pdorrell/emacs-site-lisp
test/test-project/src/subdir_with_files/spaced dir name/hello.py
Python
gpl-2.0
45
0
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module implements an interface to the Henkelmann et al.'s excellent Fortran code for calculating a Bader charge analysis. This module depends on a compiled bader executable available in the path. Please download the ...
vorwerkc/pymatgen
pymatgen/command_line/bader_caller.py
Python
mit
22,902
0.002358
import subprocess import os """ What are the differences and similarities between ffmpeg, libav, and avconv? https://stackoverflow.com/questions/9477115 ffmeg encoders high to lower quality libopus > libvorbis >= libfdk_aac > aac > libmp3lame libfdk_aac due to copyrights needs to be compiled by end user on MacOS brew...
AndreaMordenti/spotydowny
core/convert.py
Python
mit
2,314
0.001729
from __future__ import absolute_import import os.path import requests import wtforms from wtforms import validators from ..forms import TextDatasetForm from origae import utils from origae.utils.forms import validate_required_iff, validate_greater_than class TextClassificationDatasetForm(TextDatasetForm): """ ...
winnerineast/Origae-6
origae/dataset/text/classification/forms.py
Python
gpl-3.0
14,708
0.001904
# Copyright 2016 Cisco 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 # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
ragupta-git/ImcSdk
imcsdk/__init__.py
Python
apache-2.0
1,616
0.001238
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, André Paramés <git@andreparames.com> # Based on the Git module by Michael DeHaan <michael.dehaan@gmail.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 a...
Rajeshkumar90/ansible-modules-extras
source_control/bzr.py
Python
gpl-3.0
6,658
0.001954
# -*- encoding: utf-8 -*- from imaplib import ParseFlags # mockimaplib: A very simple mock server module for imap client APIs # Copyright (C) 2014 Alan Etkin <spametki@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public Li...
SpaceKatt/CSPLN
apps/scaffolding/win/web2py/gluon/contrib/mockimaplib.py
Python
gpl-3.0
10,569
0.002933
####################################################################### # # Author: Gabi Roeger # Modified by: Silvia Richter (silvia.richter@nicta.com.au) # (C) Copyright 2008: Gabi Roeger and NICTA # # This file is part of LAMA. # # LAMA is free software; you can redistribute it and/or # modify it under the terms of ...
PlanTool/plantool
wrappingPlanners/Deterministic/LAMA/seq-sat-lama/lama/translate/pddl/f_expression.py
Python
gpl-2.0
5,321
0.008081
# 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 the Li...
inbloom/legacy-projects
lri-middleware/path_builder/form.py
Python
apache-2.0
1,107
0.001807
# Copyright (c) 2014,Vienna University of Technology, # Department of Geodesy and Geoinformation # 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...
christophreimer/pytesmo
pytesmo/time_series/plotting.py
Python
bsd-3-clause
6,133
0.000163
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'boardOptions.ui' # # Created: Fri Oct 4 12:27:03 2013 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui from commons.i18n import * try: _fromUtf8 = QtCore...
mateoqac/unqTip
gui/views/boardOption.py
Python
gpl-3.0
3,726
0.002952
from compare_mlp import calculate_distance_pairs, load_models,get_filenames, plot_distance_pairs, plot_distances_from_target import unittest class DistanceTestCase(unittest.TestCase): def setUp(self): self.afiles = load_models(get_filenames("best_model_mlp", "zero_blur_a.pkl")) self.bfiles = load_...
laputian/dml
mlp_test/test_compare_mlp_unit.py
Python
mit
1,003
0.004985
import db import db.exceptions import sqlalchemy import string import random KEY_LENGTH = 40 def generate(owner_id): """Generate new key for a specified user. Doesn't check if user exists. Args: owner_id: ID of a user that will be associated with a key. Returns: Value of the new ke...
metabrainz/acousticbrainz-server
db/api_key.py
Python
gpl-2.0
2,579
0.000775
from __future__ import absolute_import, division, print_function import numpy as np import os import logging def _read_amira(src_file): """ Reads all information contained within standard AmiraMesh data sets. Separate the header information from the image/volume, data. Parameters ---------- s...
danielballan/scikit-xray
skbeam/io/avizo_io.py
Python
bsd-3-clause
10,337
0.000097
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2017 Ansible Project # 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 DOCUMENTATION = """ name: lines author: Daniel H...
mattclay/ansible
lib/ansible/plugins/lookup/lines.py
Python
gpl-3.0
2,214
0.005872
# -*- Mode: Python -*- VERSION_STRING = "$Id: thread_channel.py,v 1.3 2002/03/19 22:49:40 amk Exp $" # This will probably only work on Unix. # The disadvantage to this technique is that it wastes file # descriptors (especially when compared to select_trigger.py) # May be possible to do it on Win32, using TCP localh...
zxl200406/minos
supervisor/supervisor/medusa/thread/thread_channel.py
Python
apache-2.0
3,713
0.01185
''' Training file with functions for 1) Taking in the inputs 2) Defining the model 3) Reading the input and generating batches 4) Defining the loss, learning rate and optimization functions 5) Running multiple epochs on training and testing ''' import argparse from read_input import * from model import * import tensor...
Kaushikpatnaik/LSTMChar2Char
train.py
Python
mit
5,431
0.019518
import sqlite3 def main(): conn = sqlite3.connect("../database") cursor = conn.cursor() # I claim this gives the current score. Another formulation is # select trackid, score, max(scoreid) from scores group by trackid; # cursor.execute("""select trackid, score from scores # gro...
erbridge/NQr
src/export.py
Python
bsd-3-clause
834
0
#!/usr/bin/python # -*- coding: iso-8859-15 -*- # # audi_codes.py # # Copyright (C) Ben Van Mechelen 2008-2009 <me@benvm.be> # # This file is part of Garmon # # Garmon 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 Fo...
bwhitelock/garmon-ng
garmon/audi_codes.py
Python
gpl-3.0
34,868
0.000488
# This module is part of the GeoTag-X project builder. # Copyright (C) 2015 UNITAR. # # 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...
geotagx/geotagx-project-template
src/test_question.py
Python
agpl-3.0
2,076
0.010597
from django.apps import AppConfig class Leaderboard2Config(AppConfig): name = 'leaderboard'
FRC-RS/FRS
leaderboard/apps.py
Python
mit
98
0
"""Test Home Assistant json utility functions.""" from json import JSONEncoder import os import sys from tempfile import mkdtemp import unittest from unittest.mock import Mock import pytest from homeassistant.exceptions import HomeAssistantError from homeassistant.util.json import SerializationError, load_json, save_...
leppa/home-assistant
tests/util/test_json.py
Python
apache-2.0
2,695
0.000371
# (c) 2014, Michael DeHaan <michael.dehaan@gmail.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, or # (at your option) any lat...
s-hertel/ansible
lib/ansible/utils/display.py
Python
gpl-3.0
19,334
0.001914
import pygame import time import random pygame.init() display_width = 800 display_height = 600 black = (0,0,0) white = (255,255,255) red = (255,0,0) block_color = (53,115,255) car_width = 73 gameDisplay = pygame.display.set_mode((display_width,display_height)) pygame.display.set_caption('A bit Racey') clock...
danstoner/python_experiments
playing_with_pygame/pygame-tutorial-series/part10.py
Python
gpl-2.0
3,658
0.020503
#!/usr/bin/env python """ Evaluate the performance of detector get the statistical quantify for the hypotheis test like False Alarm Rate. """ from __future__ import print_function, division, absolute_import import copy, os import collections from ..Detector import MEM_FS from ..Detector import BotDetector from ..util i...
hbhzwj/GAD
gad/Experiment/EvalForBotnetDetection.py
Python
gpl-3.0
9,139
0.001532
# 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 agreed to in writing, ...
google/tink
testing/cross_language/key_generation_consistency_test.py
Python
apache-2.0
15,388
0.004744
from unittest import TestCase class TestFoo( TestCase ): def test_foo_1( self ): self.assertTrue( True ) def test_foo_2( self ): self.assertTrue( True ) def test_foo_3( self ): self.assertTrue( True ) def test_foo_4( self ): self.assertTrue( True ) def test_foo...
codepanda/pycicl
tests/fixtures/parallel/tests/testfoo.py
Python
mit
2,035
0.064865
"""Compute ESA driving functions for various systems. ESA is abbreviation for equivalent scattering approach. ESA driving functions for an edge-shaped SSD are provided below. Further ESA for different geometries might be added here. Note that mode-matching (such as NFC-HOA, SDM) are equivalent to ESA in their specif...
sfstoolbox/sfs-python
sfs/fd/esa.py
Python
mit
11,543
0
from django.conf.urls.defaults import patterns, include, url from singlecontrol.views import index, socketio urlpatterns = patterns('', url(r'^$', view=index, name='index'), url(r'^socket\.io', view=socketio, name='socketio'), ) from django.contrib.staticfiles.urls import staticfiles_urlpatterns urlpatterns ...
victorpoluceno/python_kinect_socketio
urls.py
Python
bsd-2-clause
349
0.005731
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it u...
diogocs1/comps
web/addons/l10n_be_coda/__init__.py
Python
apache-2.0
1,105
0.00181
try: import unittest2 as unittest except ImportError: import unittest import rope.base.project import rope.base.builtins from rope.base import libutils from ropetest import testutils class ObjectInferTest(unittest.TestCase): def setUp(self): super(ObjectInferTest, self).setUp() self.proj...
emacsway/rope
ropetest/objectinfertest.py
Python
gpl-2.0
14,587
0
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import StringIO from pytest import raises from aspen.website import Website from aspen.http.response import Response from aspen.exceptions import BadLocation ...
jaraco/aspen
tests/test_website.py
Python
mit
14,886
0.00477
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals import os import docker from flexmock import flexmock import requests from atomic_reactor.constants...
jarodwilson/atomic-reactor
tests/docker_mock.py
Python
bsd-3-clause
14,501
0.002
from django.db import models from .common_info import CommonInfo from django.utils import timezone from django.urls import reverse from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from django.core.validators import URLValidator def validate_nonzero(value): ...
HumanExposure/factotum
dashboard/models/data_source.py
Python
gpl-3.0
1,472
0.002717
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2015-2020 Bitergia # # 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 l...
grimoirelab/perceval
tests/mocked_package/nested_package/nested_backend_b.py
Python
gpl-3.0
1,241
0
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apporc/nova
nova/tests/unit/image/test_glance.py
Python
apache-2.0
53,589
0.000187
# import os import numpy as np import matplotlib.pyplot as plt import random # cluster_dp_GPU = "./cluster_dp_GPU" # os.system(cluster_dp_GPU) input_file = raw_input("enter the input file name:") result_file = raw_input("enter the result file name:") location = [] # input_lable = [] for line in open("dataset/"+input_f...
GeKeShi/cluster-dp
cluster_image.py
Python
gpl-3.0
1,589
0.004405
#!/usr/bin/env python # # Copyright 2011-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import random import cmath from gnuradio import gr, gr_unittest, digital, blocks class test_clock_recovery_mm(gr_unittest.TestCase): def setUp(self):...
skoslowski/gnuradio
gr-digital/python/digital/qa_clock_recovery_mm.py
Python
gpl-3.0
4,755
0.003785
#---------------------------------------------------------------------- # Copyright (c) 2008 Board of Trustees, Princeton University # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, i...
dana-i2cat/felix
ofam/src/src/ext/sfa/util/faults.py
Python
apache-2.0
11,639
0.01452
import cv2 import numpy from PIL import Image import numpy as np import os from matplotlib import pyplot as plt bin_n = 16 # Number of bins def hog(img): gx = cv2.Sobel(img, cv2.CV_32F, 1, 0) gy = cv2.Sobel(img, cv2.CV_32F, 0, 1) mag, ang = cv2.cartToPolar(gx, gy) bins = np.int32(bin_n*ang/...
Emmanu12/Image-Classification-using-SVM
predict.py
Python
apache-2.0
4,390
0.023235
# -*- coding: utf-8 -*- from setuptools import setup, find_packages import os, sys import pkg_resources import norikraclient long_description = open(os.path.join("README.rst")).read() classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: System Administrators", "License :: OSI Approve...
norikra/norikra-client-python
setup.py
Python
mit
1,304
0.001534