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
from django.conf.urls import patterns, url from proxy import views urlpatterns = patterns('', url(r'^$', views.search, name='search'), url(r'^(?P<bucket_name>\S+?)(?P<key>/\S*)', views.get, name='get') )
stuart-warren/django-s3-proxy
proxy/urls.py
Python
apache-2.0
214
0.004673
from openerp import models,fields class OeMedicalMedicamentCategory(models.Model): _name = 'oemedical.medicament.category' childs = fields.One2many('oemedical.medicament.category', 'parent_id', string='Children', ) name = fields.Char(size=256, string='Name', required=True) ...
Manexware/medical
oemedical/oemedical_medicament_category/oemedical_medicament_category.py
Python
gpl-2.0
589
0.011885
from django.shortcuts import render, HttpResponse import os # Create your views here. def status(request, task_id): from celery.result import AsyncResult task = AsyncResult(task_id); task.traceback_html = tracebackToHtml(task.traceback) return render(request, 'task/html/task_status.html', ...
andyneff/voxel-globe
voxel_globe/task/views.py
Python
mit
1,192
0.026846
from django.test import TestCase from trix.trix_core import trix_markdown class TestTrixMarkdown(TestCase): def test_simple(self): self.assertEqual( trix_markdown.assignment_markdown('# Hello world\n'), '<h1>Hello world</h1>') def test_nl2br(self): self.assertEqual( ...
devilry/trix2
trix/trix_core/tests/test_trix_markdown.py
Python
bsd-3-clause
421
0
#!/usr/bin/env python2.7 #The MIT License (MIT) #Copyright (c) 2015-2016 mh4x0f P0cL4bs Team #Permission is hereby granted, free of charge, to any person obtaining a copy of #this software and associated documentation files (the "Software"), to deal in #the Software without restriction, including without limitation the...
samyoyo/3vilTwinAttacker
3vilTwin-Attacker.py
Python
mit
1,843
0.01465
from pycp2k.inputsection import InputSection from ._dielectric_cube1 import _dielectric_cube1 from ._dirichlet_bc_cube1 import _dirichlet_bc_cube1 from ._dirichlet_cstr_charge_cube1 import _dirichlet_cstr_charge_cube1 class _implicit_psolver1(InputSection): def __init__(self): InputSection.__init__(self) ...
SINGROUP/pycp2k
pycp2k/classes/_implicit_psolver1.py
Python
lgpl-3.0
709
0.002821
import random from os.path import join, dirname import numpy as np from sklearn.base import ClassifierMixin, BaseEstimator import fasttext as ft from underthesea.util.file_io import write import os from underthesea.util.singleton import Singleton class FastTextClassifier(ClassifierMixin, BaseEstimator): def __i...
rain1024/underthesea
underthesea/classification/model_fasttext.py
Python
gpl-3.0
2,185
0
# Copyright 2016 ZTE Corporation. # # 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 ...
open-o/nfvo
lcm/lcm/ns/vls/urls.py
Python
apache-2.0
1,036
0.000965
""" NL2BR Extension =============== A Python-Markdown extension to treat newlines as hard breaks; like GitHub-flavored Markdown does. Usage: >>> import markdown >>> print markdown.markdown('line 1\\nline 2', extensions=['nl2br']) <p>line 1<br /> line 2</p> Copyright 2011 [Brian Neal](http://deathofa...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/markdown/extensions/nl2br.py
Python
agpl-3.0
765
0.002614
from django.db import models from taggit.managers import TaggableManager class BaseModel(models.Model): name = models.CharField(max_length=50, unique=True) tags = TaggableManager() def __unicode__(self): return self.name class Meta(object): abstract = True class AlphaModel(...
feuervogel/django-taggit-templatetags
taggit_templatetags/tests/models.py
Python
bsd-3-clause
379
0.015831
#!/usr/bin/env python3 """ Calculate the total cost of tile it would take to cover a floor plan of width and height, using a cost entered by the user. """ from __future__ import print_function import argparse import sys class App(object): """Application.""" def __init__(self, args): self._raw_args =...
micumatei/learning-goals
Probleme/Solutii/Find_Cost_of_Tile_to_Cover_WxH_Floor/mmicu/python/main.py
Python
mit
1,283
0.000779
#!/usr/env/python """ diffusion_in_gravity.py Example of a continuous-time, stochastic, pair-based cellular automaton model, which simulates diffusion by random particle motion in a gravitational field. The purpose of the example is to demonstrate the use of an OrientedRasterLCA. GT, September 2014 """ from __future...
csherwood-usgs/landlab
landlab/ca/examples/diffusion_in_gravity.py
Python
mit
5,014
0.01077
# Copyright 2011 Justin Santa Barbara # 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...
mmnelemane/nova
nova/tests/functional/test_extensions.py
Python
apache-2.0
1,588
0
#--coding: utf8-- from django.shortcuts import render from templated_docs import fill_template from templated_docs.http import FileResponse from invoices.forms import InvoiceForm def invoice_view(request): form = InvoiceForm(request.POST or None) if form.is_valid(): doctype = form.cleaned_data['fo...
alexmorozov/templated-docs
example/invoices/views.py
Python
mit
643
0.001555
#!/usr/bin/env python import argparse import json import time import logging from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTShadowClient import RPi.GPIO as GPIO parser = argparse.ArgumentParser(description='Lightbulb control unit.') parser.add_argument('-e', '--endpoint', required=True, help='The AWS Iot endpoint.') ...
stephenjelfs/aws-iot-gddev2016
controlUnit.py
Python
mit
3,371
0.00445
# -*- coding: utf-8 -*- # Copyright(C) 2016 Julien Veyssier # # This file is part of a weboob module. # # This weboob module 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 Lice...
laurentb/weboob
modules/lyricsdotcom/module.py
Python
lgpl-3.0
1,693
0.000591
""" File: phaseStreamTest.py Author: Matt Strader Date: Feb 18, 2016 Firmware: pgbe0_2016_Feb_19_2018.fpg This script inserts a phase pulse in the qdr dds table and sets up the fake adc lut. It checks snap blocks for each stage of the channelization process. In the end the phase pulse should be recover...
bmazin/SDR
Projects/FirmwareTests/darkDebug/phaseStreamTest.py
Python
gpl-2.0
17,347
0.022655
from . import stock_move from . import product_product
OCA/stock-logistics-warehouse
stock_move_auto_assign/models/__init__.py
Python
agpl-3.0
55
0
#!/usr/bin/env python # # Copyright 2007,2010,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, blocks import math class test_max(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block()...
trabucayre/gnuradio
gr-blocks/python/blocks/qa_max.py
Python
gpl-3.0
5,142
0.00739
def pe0001(upto): total = 0 for i in range(upto): if i % 3 == 0 or i % 5 == 0: total += i return total print(pe0001(1000))
guandalf/projecteuler
pe0001.py
Python
mit
155
0.012903
# Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor 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...
mozilla/caseconductor-ui
ccui/environments/views.py
Python
gpl-3.0
1,892
0.002643
import logging from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.core.cache import cache from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.http import Http404 from readthedocs.projects.models import Project, Domain log = logg...
SteveViss/readthedocs.org
readthedocs/core/middleware.py
Python
mit
6,904
0.001593
#!/usr/bin/env python3 import argparse import dataclasses from array import array from .edr import (EDRHeader, EDRDisplayDataHeader, EDRSpectralDataHeader) def parse_args(): parser = argparse.ArgumentParser(description='Print .edr file') parser.add_argument('edr', type=argparse.FileTy...
illicium/ccss2edr
ccss2edr/dumpedr.py
Python
mit
1,581
0
''' Motion Event Provider ===================== Abstract class for the implementation of a :class:`~kivy.input.motionevent.MotionEvent` provider. The implementation must support the :meth:`~MotionEventProvider.start`, :meth:`~MotionEventProvider.stop` and :meth:`~MotionEventProvider.update` methods. ''' __all__ = ('M...
Cheaterman/kivy
kivy/input/provider.py
Python
mit
1,082
0
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-17 19:19 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
samitnuk/online_shop
apps/orders/migrations/0002_auto_20170317_2119.py
Python
mit
1,976
0.002614
from django import template from django.utils.safestring import mark_safe register = template.Library() @register.filter def img_tag(obj, cls=""): if hasattr(obj, "img"): if obj.img: return mark_safe("<img class='" + cls + "' src='" + obj.img.url + "'/>") return mark_safe("<span class='gl...
OmegaDroid/quokka
utils/templatetags/utils.py
Python
mit
767
0.005215
''' Created on Mar 19, 2014 @author: Simon ''' from engine.engine_job import EngineJob class ValidationJob(EngineJob): ''' M/R job for validating a trained model. ''' def mapper(self, key, values): data_processor = self.get_data_processor() data_processor.set_data(values) dat...
xapharius/mrEnsemble
Engine/src/jobs/validation_job.py
Python
mit
746
0.00134
# -*- coding: utf-8 -*- from __future__ import division from odoo import api, fields, models class A(models.Model): _name = 'test_testing_utilities.a' _description = 'Testing Utilities A' f1 = fields.Char(required=True) f2 = fields.Integer(default=42) f3 = fields.Integer() f4 = fields.Integer(...
t3dev/odoo
odoo/addons/test_testing_utilities/models.py
Python
gpl-3.0
6,753
0.002962
import os import sys if sys.version_info >= (3, 0): sys.exit(0) import requests import json import numpy as np import time import logging import xgboost as xgb cur_dir = os.path.dirname(os.path.abspath(__file__)) from test_utils import (create_docker_connection, BenchmarkException, headers, ...
dcrankshaw/clipper
integration-tests/deploy_xgboost_models.py
Python
apache-2.0
4,355
0.000459
#Copyright ReportLab Europe Ltd. 2000-2017 #see license.txt for license details #history https://hg.reportlab.com/hg-public/reportlab/log/tip/src/reportlab/graphics/charts/doughnut.py # doughnut chart __version__='3.3.0' __doc__="""Doughnut chart Produces a circular chart like the doughnut charts produced by Excel. C...
piMoll/SEILAPLAN
lib/reportlab/graphics/charts/doughnut.py
Python
gpl-2.0
19,476
0.011861
# DESCRIPTION # Renders a PNG image like bacteria that mutate color as they spread. TRY IT. The output is awesome. # DEPENDENCIES # python 3 with numpy, queue, and pyimage modules installed (and others--see the import statements). # USAGE # Run this script through a Python interpreter without any parameters, and it w...
r-alex-hall/fontDevTools
scripts/imgAndVideo/color_growth.py
Python
gpl-3.0
45,584
0.005484
# # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # SLEPc - Scalable Library for Eigenvalue Problem Computations # Copyright (c) 2002-2015, Universitat Politecnica de Valencia, Spain # # This file is part of SLEPc. # # SLEPc is free software: you can redistribute it and/or modify it u...
OpenCMISS-Dependencies/slepc
config/packages/petsc.py
Python
lgpl-3.0
6,234
0.022137
from numpy import array, compress, zeros import wx from wx.lib.mixins.listctrl import ListCtrlAutoWidthMixin from spacq.interface.list_columns import ListParser """ Embeddable, generic, virtual, tabular display. """ class VirtualListCtrl(wx.ListCtrl, ListCtrlAutoWidthMixin): """ A generic virtual list. """ ma...
ghwatson/SpanishAcquisitionIQC
spacq/gui/display/table/generic.py
Python
bsd-2-clause
4,604
0.03258
ranged_attacker = "ranged attacker" melee_attacker = "melee attacker" healer = 'healer' dismantling_attacker = 'dismantler' general_attacker = 'general attacker' tough_attacker = 'tough guy' work_and_carry_attacker = 'multi-purpose attacker' civilian = 'civilian' scout = 'scout'
daboross/screeps-warreport
warreport/constants.py
Python
mit
280
0
import time import tensorflow as tf import numpy as np import pandas as pd from scipy.misc import imread from alexnet import AlexNet sign_names = pd.read_csv('signnames.csv') nb_classes = 43 x = tf.placeholder(tf.float32, (None, 32, 32, 3)) resized = tf.image.resize_images(x, (227, 227)) # NOTE: By setting `feature_...
Raag079/self-driving-car
Term01-Computer-Vision-and-Deep-Learning/Labs/05-CarND-Alexnet-Feature-Extraction/feature_extraction.py
Python
mit
1,499
0.002668
import json import bottle from pyrouted.util import make_spec def route(method, path): def decorator(f): f.http_route = path f.http_method = method return f return decorator class APIv1(object): prefix = '/v1' def __init__(self, ndb, config): self.ndb = ndb ...
svinota/pyrouted
pyrouted/api.py
Python
gpl-2.0
2,803
0
from ert.test import TestRun from ert.test import path_exists from ert.test import SourceEnumerator from ert.test import TestArea , TestAreaContext from ert.test import ErtTestRunner from ert.test import PathContext from ert.test import LintTestCase from ert.test import ImportTestCase from tests import EclTest class...
Statoil/libecl
python/tests/legacy_tests/test_test.py
Python
gpl-3.0
358
0.002793
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
vpodzime/lvm-dubstep
lvmdbus/automatedproperties.py
Python
gpl-3.0
6,035
0
from RPi import GPIO as gpio from robotics.actors.redbot_motor_actor import RedbotMotorActor from robotics.interfaces.spi.mcp3008_spi_interface import MCP3008SpiInterface from robotics.robots.aizek_robot import AizekRobot from robotics.sensors.redbot_wheel_encoder_sensor import RedbotWheelEncoderSensor from robotics.s...
asydorchuk/robotics
python/robotics/robots/factory.py
Python
mit
1,253
0.000798
"""Tests for chebyshev module. """ from __future__ import division, absolute_import, print_function import numpy as np import numpy.polynomial.chebyshev as cheb from numpy.polynomial.polynomial import polyval from numpy.testing import ( assert_almost_equal, assert_raises, assert_equal, assert_, ) def trim(x...
tynn/numpy
numpy/polynomial/tests/test_chebyshev.py
Python
bsd-3-clause
20,348
0.000934
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-09-18 19:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('coursedashboards', '0005_auto_20170915_2036'), ] operations = [ migrations.Create...
uw-it-aca/course-dashboards
coursedashboards/migrations/0006_auto_20170918_1954.py
Python
apache-2.0
2,064
0.001938
""" WSGI config for django_model_deploy project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_AP...
juanpex/django-model-deploy
test_project/wsgi.py
Python
bsd-3-clause
1,153
0.000867
# Copyright 2019,2020,2021 Sony Corporation. # # 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...
sony/nnabla
python/test/function/test_div2.py
Python
apache-2.0
1,404
0
"""Utility to compare (Numpy) version strings. The NumpyVersion class allows properly comparing numpy version strings. The LooseVersion and StrictVersion classes that distutils provides don't work; they don't recognize anything like alpha/beta/rc/dev versions. """ import re from scipy._lib.six import string_types ...
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/scipy/_lib/_version.py
Python
mit
4,793
0.000209
""" Django settings for practica4 project. Generated by 'django-admin startproject' using Django 1.9.1. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os,...
acasadoquijada/bares
practica4/settings.py
Python
gpl-3.0
4,257
0.003993
from django import forms from .models import Join class EmailForm(forms.Form): email = forms.EmailField() class JoinForm(forms.ModelForm): class Meta: model = Join fields = ["email",]
loafbaker/django_launch_with_code
joins/forms.py
Python
mit
211
0.018957
# 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...
npuichigo/ttsflow
third_party/tensorflow/tensorflow/python/kernel_tests/string_to_hash_bucket_op_test.py
Python
apache-2.0
4,034
0.010659
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='orgwolf', version='0...
m3wolf/orgwolf
setup.py
Python
gpl-3.0
1,198
0
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='pygments-red', version='0.2', description='Pygments lexer for Ruby + Red.', keywords='pygments ruby red lexer', license='MIT', author='Aleksandar Milicevic', author_email='[email protected]', url='https:...
aleksandarmilicevic/pygments-red
setup.py
Python
mit
1,246
0
from cardboard import types from cardboard.ability import ( AbilityNotImplemented, spell, activated, triggered, static ) from cardboard.cards import card, common, keywords, match @card("Crovax the Cursed") def crovax_the_cursed(card, abilities): def crovax_the_cursed(): return AbilityNotImplemented ...
Julian/cardboard
cardboard/cards/sets/stronghold.py
Python
mit
26,294
0.000038
# -*- coding: utf-8 -*- """ Authors: Tim Hessels UNESCO-IHE 2017 Contact: [email protected] Repository: https://github.com/wateraccounting/wa Module: Collect/JRC Description: This module downloads JRC water occurrence data from http://storage.googleapis.com/global-surface-water/downloads/. Use the JRC...
wateraccounting/wa
Collect/JRC/__init__.py
Python
apache-2.0
647
0.003091
drunkenDoodling = { 'ghost': "Salt and iron, and don't forget to burn the corpse", 'wendigo': 'Burn it to death', 'phoenix': 'Use the colt', 'angel': 'Use the angelic blade', 'werewolf': 'Silver knife or bullet to the heart', 'shapeshifter': 'Silver knife or bullet to the heart', 'rugaru': '...
the-zebulan/CodeWars
katas/kyu_7/supernatural.py
Python
mit
1,003
0
""" Created on 9 Nov 2012 @author: plish """ class TrelloObject(object): """ This class is a base object that should be used by all trello objects; Board, List, Card, etc. It contains methods needed and used by all those objects and masks the client calls as methods belonging to the object. """ ...
Oksisane/RSS-Bot
Trolly-master/trolly/trelloobject.py
Python
gpl-3.0
3,944
0.000761
# -*- coding: iso-8859-1 -*- # # Copyright (C) 2001 - 2020 Massimo Gerardi all rights reserved. # # Author: Massimo Gerardi [email protected] # # Copyright (c) 2020 Qsistemi.com. All rights reserved. # # Viale Giorgio Ribotta, 11 (Roma) # 00144 Roma (RM) - Italy # Phone: (+39) 06.87.163 # # # Si veda ...
phasis/phasis
phasis/base/srctblcf.py
Python
gpl-2.0
5,891
0.016466
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
sysadminmatmoz/ingadhoc
multi_store/__openerp__.py
Python
agpl-3.0
2,617
0.003821
from xmcam import * from xmconst import * from time import sleep CAM_IP = '192.168.1.10' CAM_PORT = 34567 if __name__ == '__main__': xm = XMCam(CAM_IP, CAM_PORT, 'admin', 'admin') login = xm.cmd_login() print(login) print(xm.cmd_system_function()) print(xm.cmd_system_info()) print(xm.cmd_chan...
janglapuk/xiongmai-cam-api
example.py
Python
mit
660
0
""" Store status messages in the database. """ from django.db import models from django.contrib import admin from django.core.cache import cache from xmodule_django.models import CourseKeyField from config_models.models import ConfigurationModel from config_models.admin import ConfigurationModelAdmin class GlobalS...
ahmadiga/min_edx
common/djangoapps/status/models.py
Python
agpl-3.0
2,090
0.002871
from time import time import argparse import numpy as np from sklearn.dummy import DummyClassifier from sklearn.datasets import fetch_20newsgroups_vectorized from sklearn.metrics import accuracy_score from sklearn.utils.validation import check_array from sklearn.ensemble import RandomForestClassifier from sklearn.en...
kevin-intel/scikit-learn
benchmarks/bench_20newsgroups.py
Python
bsd-3-clause
3,292
0
"""Queue item for deep analysis by irwin""" from default_imports import * from modules.queue.Origin import Origin from modules.game.Game import PlayerID from datetime import datetime import pymongo from pymongo.collection import Collection IrwinQueue = NamedTuple('IrwinQueue', [ ('id', PlayerID), ('o...
clarkerubber/irwin
modules/queue/IrwinQueue.py
Python
agpl-3.0
1,421
0.004222
#!/usr/bin/env python import unittest from SDDetector.Entities.Gene import Gene from SDDetector.Entities.Transcript import Transcript from SDDetector.Entities.CDS import CDS from SDDetector.Parser.Gff.GffGeneParser import GffGeneParser class TestGffGeneParser(unittest.TestCase): def setUp(self): pass ...
nlapalu/SDDetector
tests/test_GffGeneParser.py
Python
gpl-3.0
1,549
0.020013
import numbers import numpy import cupy ############################################################################### # Private utility functions. def _round_if_needed(arr, dtype): """Rounds arr inplace if the destination dtype is an integer. """ if cupy.issubdtype(dtype, cupy.integer): arr....
cupy/cupy
cupy/_padding/pad.py
Python
mit
29,422
0
from django.core.management.base import BaseCommand, CommandError from corehq.elastic import get_es_new from corehq.pillows.utils import get_all_expected_es_indices class Command(BaseCommand): help = "Update dynamic settings for existing elasticsearch indices." def add_arguments(self, parser): parse...
dimagi/commcare-hq
corehq/ex-submodules/pillowtop/management/commands/update_es_settings.py
Python
bsd-3-clause
2,244
0.003119
# Copyright 2019 The dm_control Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
deepmind/dm_control
dm_control/entities/manipulators/kinova/__init__.py
Python
apache-2.0
848
0
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
dlazz/ansible
lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py
Python
gpl-3.0
11,232
0.003205
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
yencarnacion/jaikuengine
.google_appengine/google/appengine/api/modules/modules_stub.py
Python
apache-2.0
5,933
0.007079
# -*- coding: utf-8 -*- # # adlib.py # # A lot of help from: # http://marcitland.blogspot.com/2011/02/python-active-directory-linux.html # import sys is my friend! import sys import logging import ldap from person import Person #import netrc import base64,zlib import ldap.modlist as modlist from secure import AD...
msghens/pyADAP
adlib.py
Python
mit
8,216
0.041504
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib import messages from models import UserVote from forms import UserVoteForm def vote(request): if request.method ...
django-stars/dash2011
presence/apps/vote/views.py
Python
bsd-3-clause
684
0
# coding: utf-8 """`MemoryFS` opener definition. """ from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import typing from .base import Opener from .registry import registry if typing.TYPE_CHECKING: from typing import Text from .parse import ...
PyFilesystem/pyfilesystem2
fs/opener/memoryfs.py
Python
mit
808
0
#!/usr/bin/env python # coding=utf-8 __author__ = 'Jayin Ton' from flask import Flask app = Flask(__name__) host = '127.0.0.1' port = 8000 @app.route('/') def index(): return 'welcome' if __name__ == '__main__': app.run(host=host, port=port, debug=True)
jayinton/FlaskDemo
simple/index.py
Python
mit
269
0
#!/usr/bin/env python from distutils.core import setup,Extension from distutils.command.build_py import build_py dist = setup(name='PyMobot', version='0.1', description='Mobot Control Python Library', author='David Ko', author_email='[email protected]', url='http://www.barobo.com', packages=['b...
BaroboRobotics/libbarobo
PyMobot/setup_win32.py
Python
gpl-3.0
855
0.016374
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' from tinycss.css21 import CSS21Parser from tinycss.parsing import remove_whit...
nozuono/calibre-webserver
src/tinycss/media3.py
Python
gpl-3.0
4,645
0.003229
# extension imports from _NetworKit import PageRankNibble, GCE
fmaschler/networkit
networkit/scd.py
Python
mit
62
0.016129
"""Unit tests for the copy module.""" import sys import copy import copy_reg import unittest from test import test_support class TestCopy(unittest.TestCase): # Attempt full line coverage of copy.py from top to bottom def test_exceptions(self): self.assert_(copy.Error is copy.error) self.ass...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.4/Lib/test/test_copy.py
Python
mit
17,174
0.002678
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import argparse #import imp from validator import * from settings import * from utils import * parser = argparse.ArgumentParser(description='Sync two Databases', epilog="Es: python main.py -run test --db-master=mysql://root:[email protected]...
peppelinux/pyDBsync
src/main.py
Python
bsd-3-clause
3,261
0.029745
#!/usr/bin/python import logging, sys, re, getpass, argparse, pprint, csv, time from pysphere import MORTypes, VIServer, VITask, VIProperty, VIMor, VIException from pysphere.vi_virtual_machine import VIVirtualMachine from pysphere.resources import VimService_services as VI def sizeof_fmt(num): for x in ['bytes','K...
jm66/vsphere_inventory_report
vsphere_inventory_report.py
Python
gpl-2.0
17,553
0.014357
from PdfProcessor import * import argparse from datetime import datetime import ConfigParser import ProcessLogger import traceback from urllib2 import HTTPError, URLError parser = argparse.ArgumentParser(description='Processes the pdf and extracts the text') parser.add_argument('-l','--language', help='Language of inp...
anjesh/pdf-processor
run.py
Python
mit
2,284
0.007005
#!/usr/bin/python import requests import time, Cookie # Instantiate a SimpleCookie object cookie = Cookie.SimpleCookie() # The SimpleCookie instance is a mapping cookie['lastvisit'] = str(time.time()) s = requests.session() s.cookies.clear() # Output the HTTP message containing the cookie print cookie print 'C...
5610110083/Safety-in-residential-project
cgi-bin/any/setCookies.py
Python
apache-2.0
447
0.029083
""" commswave ========= Takes device communications up and down according to a timefunction. Comms will be working whenever the timefunction returns non-zero. Configurable parameters:: { "timefunction" : A timefunction definition "threshold" : (optional) Comms will only work when the timefunction ...
DevicePilot/synth
synth/devices/commswave.py
Python
mit
3,252
0.006458
import json from plugins import gateway_speaker from plugins.magnet import MAGNET_STORE_KEY DOOR_SENSOR_SID = '158d0001837ec2' def run(store, conn, cursor): """Play sound on the Gateway when somebody opens the door""" p = store.pubsub(ignore_subscribe_messages=True) p.subscribe(MAGNET_STORE_KEY) fo...
aluminiumgeek/goodbye-mihome
apps/sound_when_door_is_open.py
Python
bsd-2-clause
608
0
# Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
CloudVLab/professional-services
tools/ml-auto-eda/ml_eda/reporting/recommendation.py
Python
apache-2.0
4,289
0.007694
# -*- coding: utf-8 -*- ############################################################################### # License, author and contributors information in: # # __openerp__.py file at the root folder of this module. # ########################################################...
odoousers2014/odoo-development
modules/development_tools/wizard/development_tools_config_settings.py
Python
agpl-3.0
12,322
0.000081
from __future__ import print_function from __future__ import unicode_literals from inspect import getdoc from operator import attrgetter import logging import re import signal import sys from docker.errors import APIError import dockerpty from .. import __version__ from .. import legacy from ..const import DEFAULT_TI...
feelobot/compose
compose/cli/main.py
Python
apache-2.0
19,689
0.001727
# Copyright 2018 Silvio Gregorini ([email protected]) # Copyright (c) 2018 Openforce Srls Unipersonale (www.openforce.it) # Copyright (c) 2019 Matteo Bilotta # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models class ResConfigSettings(models.TransientModel): ...
OCA/l10n-italy
l10n_it_vat_statement_split_payment/models/account_config.py
Python
agpl-3.0
520
0
"""General-use classes to interact with the ApplicationAutoScaling service through CloudFormation. See Also: `AWS developer guide for ApplicationAutoScaling <https://docs.aws.amazon.com/autoscaling/application/APIReference/Welcome.html>`_ """ # noinspection PyUnresolvedReferences from .._raw import applicatio...
garyd203/flying-circus
src/flyingcircus/service/applicationautoscaling.py
Python
lgpl-3.0
424
0.002358
# Created By: Virgil Dupras # Created On: 2009-11-27 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/g...
fokusov/moneyguru
qt/controller/transaction/filter_bar.py
Python
gpl-3.0
843
0.005931
# -*- coding: UTF-8 """ Entry decorators for python plugins Functions ========= chat_message -- Decorator for chat message plugin chat_command -- Decorator for chat command plugin chat_accost -- Decorator for chat accost plugin """ from dewyatochka.core.plugin.loader.internal import entry_point from dew...
kawashiro/dewyatochka2
src/dewyatochka/core/plugin/subsystem/message/py_entry.py
Python
gpl-3.0
2,198
0.002275
# -*- coding: utf-8 -*- ''' Uncoded Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This progr...
TheWardoctor/Wardoctors-repo
plugin.video.uncoded/uncoded.py
Python
apache-2.0
12,280
0.003746
# %FILEHEADER% from ..filebased import FileBasedBackend from .. import NONE, MissingOption from xmlserialize import serialize_to_file, unserialize_file from lxml.etree import XMLSyntaxError class XMLBackend(dict, FileBasedBackend): ROOT_ELEMENT = 'configuration' initial_file_content = '<{0}></{0}>'.format(RO...
jonashaag/gpyconf
gpyconf/backends/_xml/__init__.py
Python
lgpl-2.1
1,161
0.002584
import re import urllib from xbmcswift2 import xbmc from meta import plugin, LANG from meta.gui import dialogs from meta.utils.text import to_unicode from meta.library.live import get_player_plugin_from_library from meta.navigation.base import get_icon_path, get_background_path from meta.play.players import get_needed_...
TheWardoctor/Wardoctors-repo
plugin.video.metalliq/resources/lib/meta/play/live.py
Python
apache-2.0
3,977
0.005029
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.conf import se...
suutari/shoop
shuup/notify/models/notification.py
Python
agpl-3.0
4,222
0.002605
# # Copyright 2016-2017 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
EdDev/vdsm
lib/vdsm/storage/check.py
Python
gpl-2.0
12,176
0
# coding: utf-8 # # Copyright © 2012-2015 Ejwa Software. All rights reserved. # # This file is part of gitinspector. # # gitinspector is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
eklochkov/gitinspector
gitinspector/extensions.py
Python
gpl-3.0
1,635
0.015912
# The contents of this file are subject to the Mozilla Public 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.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS"basis, #...
os2webscanner/os2webscanner
scrapy-webscanner/scanners/processors/xml.py
Python
mpl-2.0
2,214
0.002258
# 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, ...
GoogleCloudPlatform/jupyter-extensions
jupyterlab_gitsync/setup.py
Python
apache-2.0
1,836
0.003268
import logging from time import sleep from tools.audiosink import AudioSink demo = logging.getLogger('Demo') logging.basicConfig(level=logging.DEBUG) p = AudioSink() with open("sample.wav", 'rb') as f: a = f.read() demo.info("add the first track") p.add(a, "a") sleep(2) with open("sample.wav", 'rb') as f: ...
loult-elte-fwere/termiloult
tests/test_multiple_play.py
Python
mit
559
0.001789
import numpy import os import sys # This script depends on a SJSON parsing package: # https://pypi.python.org/pypi/SJSON/1.1.0 # https://shelter13.net/projects/SJSON/ # https://bitbucket.org/Anteru/sjson/src import sjson if __name__ == "__main__": if sys.version_info < (3, 4): print('Python 3.4 or higher needed to...
nfrechette/acl
tools/graph_generation/gen_bit_rate_stats.py
Python
mit
2,309
0.020788
from common import * DEBUG = True MONGODB_SETTINGS = { 'HOST': '127.0.0.1', 'PORT': 27017, 'DB': 'myhoard_dev', 'USERNAME': 'myhoard', 'PASSWORD': 'myh0@rd', } # Logging LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'root': { 'level': 'NOTSET', 'handlers...
blstream/myHoard_Python
myhoard/settings/dev.py
Python
apache-2.0
1,018
0.001965
class Solution(object): def maxSumOfThreeSubarrays(self, nums, k): """ :type nums: List[int] :type k: int :rtype: List[int] """ window = [] c_sum = 0 for i, v in enumerate(nums): c_sum += v if i >= k: c_sum -= nums[i-k] ...
Mlieou/leetcode_python
leetcode/python/ex_689.py
Python
mit
1,077
0.007428
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import ExteriorFuelEquipment log = logging.getLogger(__name__) class TestExteriorFuelEquipment(unittest.TestCase): def setUp(self): self.fd, self...
rbuffat/pyidf
tests/test_exteriorfuelequipment.py
Python
apache-2.0
1,733
0.003462
""" sphinxit.core.constants ~~~~~~~~~~~~~~~~~~~~~~~ Defines some Sphinx-specific constants. :copyright: (c) 2013 by Roman Semirook. :license: BSD, see LICENSE for more details. """ from collections import namedtuple RESERVED_KEYWORDS = ( 'AND', 'AS', 'ASC', 'AVG', 'BEGIN', ...
abhijo89/sphinxit
sphinxit/core/constants.py
Python
bsd-3-clause
1,436
0