code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
from .resources import register_swaggerui_app, StaticSinkAdapter
rdidyk/falcon-swagger-ui
falcon_swagger_ui/__init__.py
Python
mit
65
# Check two factor page displays the username, account and logout options. from u1testutils.sst import config from acceptance import helpers from acceptance.actions import ( subheader, two_factor, ) config.set_base_url_from_env() display_name = "Fred Jones" # Create an account and login. helpers.register_...
miing/mci_migo
acceptance/tests/two_factor/check_username_display.py
Python
agpl-3.0
489
import logging from typing import Any, Dict, Optional logger = logging.getLogger(__name__) class MagicInjectError(ValueError): pass def get_injection_requests( type_hints: Dict[str, type], cname: str, component: Optional[Any] = None ) -> Dict[str, type]: """ Given a dict of type hints, filter it to...
robotpy/robotpy-wpilib-utilities
magicbot/inject.py
Python
bsd-3-clause
2,800
# codplayer - audio source interface # # Copyright 2014-2018 Peter Liljenberg <peter.liljenberg@gmail.com> # # Distributed under an MIT license, please see LICENSE in the top dir. class SourceError(Exception): pass class Source(object): """Abstract base class representing a source of audio packets. """ ...
petli/codplayer
src/codplayer/source.py
Python
mit
1,893
# coding: utf-8 import os.path from datetime import datetime from django.conf import settings from django.test.client import RequestFactory from django.test.utils import override_settings from django_jinja.backend import Jinja2 from jinja2 import Markup from mock import patch from nose.tools import eq_, ok_ from pyq...
gerv/bedrock
bedrock/mozorg/tests/test_helper_misc.py
Python
mpl-2.0
25,477
#encoding:utf-8 """ pythoner.net Copyright (C) 2013 PYTHONER.ORG 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. Th...
wangjun/pythoner.net
pythoner/accounts/models.py
Python
gpl-3.0
4,232
from __future__ import unicode_literals from future.builtins import str from future.utils import with_metaclass from json import loads try: from urllib.request import urlopen from urllib.parse import urlencode except ImportError: from urllib import urlopen, urlencode from django.contrib.contenttypes.field...
andfoy/margffoy-tuay-server
env/lib/python2.7/site-packages/Mezzanine-3.1.10-py2.7.egg/mezzanine/core/models.py
Python
gpl-2.0
18,640
#!/bin/python import sqlite3 import climquery if __name__ == "__main__": # RCPS = ['rcp45', 'rcp60', 'rcp85'] RCPS = ['rcp45', 'rcp85'] # CLIMATES = ['CCSM4', 'Ensemble', 'GFDLCM3', 'HadGEM2ES'] CLIMATES = ['Ensemble'] # YEARS = ['1990', '2030', '2060', '2090'] YEARS = ['1990', '2060'] ...
jgcobb3/growth-yield-batch
scripts/blm/climate_suitability/get_species_climate_combos.py
Python
bsd-3-clause
1,011
import urllib, json import time import os scriptPath = os.path.dirname(__file__)+'/' if scriptPath == '/': scriptPath = './' urlPath = "http://yourserver/X2D/" if os.name == 'nt': pythonPath = r'c:\Python27\python.exe' else: pythonPath = 'python' url = urlPath+"modeStatus.php" response = urllib.urlopen(url) mode ...
SixK/CC1101-X2D-Heaters
pythonScripts/X2D_WebPoller.py
Python
gpl-2.0
791
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from django.utils import six from .models import (SelfRefer, Tag, TagCollection, Entry, SelfReferChild, SelfReferChildSibling, Worksheet, RegressionModelSplit, Line) class M2MRegressionTests(Te...
oscaro/django
tests/m2m_regress/tests.py
Python
bsd-3-clause
4,303
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from Tkinter import * import ttk from ScrolledText import * CURRENT_PATH = os.path.abspath('.') DATA_PAHT = os.path.join(CURRENT_PATH, 'data') SUMMARY_LINE = 10 def clean_list(orig_list): return [_.strip() for _ in orig_list] ...
zxjsdp/bioinfo-scripts
Dictionary/CSV_Dictionary/csv_dict.py
Python
apache-2.0
7,878
# Copyright 2014 Google Inc. All Rights Reserved. """Command for listing persistent disks.""" from googlecloudsdk.compute.lib import base_classes class List(base_classes.ZonalLister): """List Google Compute Engine persistent disks.""" @property def service(self): return self.compute.disks @property de...
harshilasu/LinkurApp
y/google-cloud-sdk/lib/googlecloudsdk/compute/subcommands/disks/list.py
Python
gpl-3.0
362
from flask import current_app from . import db from .models import Build, BuildStatus from random import random import os import string import subprocess import shutil from PIL import Image import time def run_builds(): build = Build.query.filter_by(status=1).first() if build is not None: return ...
acnazarejr/cvcontest
app/external.py
Python
gpl-2.0
8,112
class SomeClass(): def __init__(self): self.a = '' self.x = 1 def foo(self): self.a
caot/intellij-community
python/testData/refactoring/introduceField/py4437.after.py
Python
apache-2.0
117
# -*- coding: utf-8 -*- """This package contains ll tests (unit, property, etc.)."""
jtpaasch/armyguys
tests/__init__.py
Python
mit
86
#!usr/bin/env python2 name = raw_input("Full name: ") if name == 'Nguyen Viet Hung': print 'Hi HVN' namelist = name.split(' ') for w in namelist: print w,
familug/FAMILUG
Python/FCM28RawInput.py
Python
bsd-2-clause
158
# This file is part of the Simulation Manager project for VecNet. # For copyright and licensing information about this project, see the # NOTICE.txt and LICENSE.md files in its top-level directory; they are # available at https://github.com/vecnet/simulation-manager # # This Source Code Form is subject to the terms of ...
vecnet/simulation-manager
sim_manager/tests/constants.py
Python
mpl-2.0
649
""" WSGI config for nferoot project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django import Django...
gbazilio/nfebrasil
nferoot/wsgi.py
Python
mit
490
""" :synopsis: Queue Model :copyright: 2014 Nathan Lewis, See LICENSE.txt .. moduleauthor:: Nathan Lewis <natewlew@gmail.com> """ from datetime import datetime from sqlalchemy import Column, Integer, String, DateTime, Boolean from MythTVArchiveServer.controllers.registry import Base from MythTVArchiveServer.ut...
natewlew/mythtvarchiveserver
MythTVArchiveServer/models/queue.py
Python
gpl-2.0
1,098
# -*- coding: utf-8 -*- doctests = """ Tests for the tokenize module. The tests can be really simple. Given a small fragment of source code, print out a table with tokens. The ENDMARK is omitted for brevity. >>> dump_tokens("1 + 1") ENCODING 'utf-8' (0, 0) (0, 0) NUMBER '1' (1, 0) (...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.1/Lib/test/test_tokenize.py
Python
mit
31,885
ksleg = "http://www.kslegislature.org/li" url = "%s/api/v11/rev-1/" % ksleg # These actions are from the KLISS API documentation, # and are in the same order as that table # The PDF is linked from this webpage, and changes name # based on the most recent API version: # http://www.kslegislature.org/klois/Pages/RESTianA...
openstates/openstates
openstates/ks/ksapi.py
Python
gpl-3.0
8,104
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
MakeHer/edx-platform
cms/envs/common.py
Python
agpl-3.0
35,005
#!/usr/bin/env python """ Since one might not only be interested in the individual (hyper-)parameters of a bayesloop study, but also in arbitrary arithmetic combinations of one or more (hyper-)parameters, a parser is needed to compute probability values or distributions for those derived parameters. """ from __future_...
christophmark/bayesloop
bayesloop/parser.py
Python
mit
19,939
from __future__ import absolute_import import unittest from bokeh.plotting import figure from bokeh.models.ranges import DataRange1d class TestGlyphRenderer(unittest.TestCase): def test_warning_about_colons_in_column_labels_for_axis(self): invalid_labels = ['0', '1', '2:0'] plot = figure( ...
azjps/bokeh
bokeh/models/tests/test_renderers.py
Python
bsd-3-clause
1,438
#!/usr/bin/env python import os import logging import yaml #################################################################### # Base class # #################################################################### class Module(object): """ Sets up the logger and stores the intent of the module. """ def __init__(se...
walchko/jarvis
plugins/Module.py
Python
mit
1,140
# cell definition # name = 'Epos_AD' # libname = 'can' inp = 0 outp = 1 parameters = dict() #parametriseerbare cell properties = {'Device ID': ' 0x01', 'Channel [0/1]': ' 0', 'name': 'epos_areadBlk'} #voor netlisten #view variables: iconSource = 'AD' views = {'icon':iconSource}
imec-myhdl/pycontrol-gui
BlockEditor/libraries/library_can/Epos_AD.py
Python
lgpl-2.1
283
import json import yaml root_dir = "../" json_dir = root_dir + "translations" yaml_dir = root_dir + "translations_yaml" def yaml_to_json(source_path, target_path): data = yaml.load(open(source_path, "r")) json.dump(data, open(target_path, "w+")) def json_to_yaml(source_path, target_path): data = json....
ProjectSky/FrackinUniverse-sChinese-Project
script/json_yaml_converter.py
Python
mit
394
import inspect from IPython.utils.traitlets import ( Any, CInt, CBool, CFloat, Dict, Tuple, link, ) from IPython.html.widgets import Widget from IPython.html.widgets.widget_selection import _Selection from .widgets import Tangle __all__ = ["Tangle", "tangle"] function = type(lambda: 0)...
bollwyvl/ipytangle
ipytangle/__init__.py
Python
bsd-3-clause
5,335
import os from setuptools import setup, find_packages from pip.req import parse_requirements with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: README = readme.read() REQUIREMENTS = [str(r.req) for r in parse_requirements('requirements.txt', session='hack')] # grab version from GIT TAG wi...
mdutkin/m2core
setup.py
Python
mit
1,198
import arcpy if arcpy.CheckExtension("Spatial") == "Available": arcpy.AddMessage("Checking out Spatial") arcpy.CheckOutExtension("Spatial") else: arcpy.AddError("Unable to get spatial analyst extension") arcpy.AddMessage(arcpy.GetMessages(0)) sys.exit(0) from arcpy.sa import * results = arcpy.Ge...
inkenbrandt/UBM
Arcgis toolbox/UBM.py
Python
mit
3,381
"""Tests for the cluster.ini and config class.""" import os import pytest import re class TestConfig(): slow = pytest.mark.skipif( not pytest.config.getoption("--runslow"), reason="need --runslow option to run" ) def test_generateSSHKey(self, config): public_filepath = '~/.ssh/ac...
rgardler/acs-scripts
tests/commands/test_config.py
Python
apache-2.0
1,423
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 b...
pradhanta/drunken-robot
tools/profilegen/sforce/metadata.py
Python
apache-2.0
24,129
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * import re class AboutRegex(Koan): """ These koans are based on Ben's book: Regular Expressions in 10 minutes. I found this book very useful, so I decided to write a koan file in order to practice everything it taught...
erikld/Bobo
python3/koans/about_regex.py
Python
mit
5,204
# -*- coding: utf-8 -*- """ 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 ...
Arno-Nymous/pyload
module/gui/Collector.py
Python
gpl-3.0
14,038
from collections import OrderedDict def get_fields(items, exclude_fields=[]): for item in items: fields = item._meta._get_fields() item.fields = OrderedDict() for field in fields: if not field.is_relation and field.name not in exclude_fields: field_name = field....
ACLARKNET/aclarknet-database
aclarknet/database/fields.py
Python
mit
667
__author__ = 'mehdibenchoufi' from filereader import FileReader from data import Data import constants import sys sys.path.append('/usr/local/lib/python2.7/site-packages') import cv2 class ScanConverter: def get_input(self, value): return self.input def set_input(self, value): self.input = ...
ydre/kit-soft
ImageProcessing/soobash/scanconverter.py
Python
bsd-3-clause
1,674
from django.forms.widgets import SelectDateWidget # NOQA
yephper/django
django/forms/extras/widgets.py
Python
bsd-3-clause
59
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2022 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
tzpBingo/github-trending
codespace/python/telegram/inline/inlinequeryresultmpeg4gif.py
Python
mit
6,226
# Copyright IBM Corp, 2016 # # 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, so...
ppc64le/ciaas
roles/client/files/backend/account/urls.py
Python
apache-2.0
961
import unittest from fontMath.mathFunctions import _roundNumber from fontMath.mathInfo import MathInfo, _numberListAttrs class MathInfoTest(unittest.TestCase): def __init__(self, methodName): unittest.TestCase.__init__(self, methodName) self.maxDiff = None def test_add(self): info1 =...
typesupply/fontMath
Lib/fontMath/test/test_mathInfo.py
Python
mit
11,763
"""Support for the definition of zones.""" import logging from typing import Dict, List, Optional, cast import voluptuous as vol from homeassistant import config_entries from homeassistant.const import ( ATTR_EDITABLE, ATTR_HIDDEN, ATTR_LATITUDE, ATTR_LONGITUDE, CONF_ICON, CONF_ID, CONF_LA...
Teagan42/home-assistant
homeassistant/components/zone/__init__.py
Python
apache-2.0
10,239
#!/usr/bin/env python from __future__ import division import unittest import numpy as np import warnings from pymatgen.core.lattice import Lattice from pymatgen.core.operations import SymmOp from pymatgen.symmetry.groups import PointGroup, SpaceGroup __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The ...
tallakahath/pymatgen
pymatgen/symmetry/tests/test_groups.py
Python
mit
6,002
def mirror_y(clip, apply_to= "mask"): """ flips the clip vertically (and its mask too, by default) """ return clip.fl_image(lambda f : f[::-1], apply_to = apply_to)
kerimlcr/ab2017-dpyo
ornek/moviepy/moviepy-0.2.2.12/moviepy/video/fx/mirror_y.py
Python
gpl-3.0
173
# -*- coding: utf-8 -*- from django import get_version from django.conf import settings from django.db.models import Model from django.db.models.signals import post_save, post_delete try: from django.db.models.signals import post_migrate except ImportError: # django <= 1.6 from django.db.models.signals import ...
leotsem/django-elasticsearch
django_elasticsearch/models.py
Python
mit
3,338
""" This file is part of Team Brocket Robotics, licensed under the MIT License. A copy of the MIT License can be found in LICENSE.txt """ class _Watcher(object): def last_seen(self): pass def get_id(self): pass class RobotWatcher(_Watcher): ROBOTS = {} class Robot: de...
simon816/TeamBrocket-Student-Robotics-2014
watchers.py
Python
mit
648
from setuptools import setup setup( name='vocaudio', version='0.0.1', description='Trigger OSX media player controls with voice actions.', url='https://github.com/jakemmarsh/vocaudio', author='Jake Marsh', author_email='jakemmarsh@gmail.com', license='MIT', keywords='voice control osx audio speec...
jakemmarsh/vocaudio
setup.py
Python
mit
408
import datetime import getpass import logging import time import traceback from bitcoinrpc.authproxy import AuthServiceProxy import bot_logger import config import models import user_function def get_rpc(): return AuthServiceProxy("http://%s:%s@%s:%s" % ( config.rpc_config['doge_rpc_username'], config.r...
magayorker/magatip
crypto.py
Python
mit
10,464
# minicontest.py # -------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to # http://ins...
naderm/cs188
p5/classification/minicontest.py
Python
bsd-3-clause
1,438
import sys sys.path.append('/home/lhearen/Server')
Hearen/OnceServer
Server/test/__init__.py
Python
mit
52
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
paoloach/zdomus
zigbee_lib/googletest/googletest/test/gtest_list_tests_unittest.py
Python
gpl-2.0
6,515
# Copyright 2016 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 or agreed to in writing, ...
l-meng/mobly
mobly/controllers/android_device_lib/snippet_client.py
Python
apache-2.0
11,896
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
VisTrails/VisTrails
vistrails/db/domain/__init__.py
Python
bsd-3-clause
1,997
# -*- coding: utf-8 -*- from .etag import ETagMiddleware from .ifmodifysince import IfModifySinceMiddleware __all__ = [ 'ETagMiddleware', 'IfModifySinceMiddleware', ]
wartalker/BlogSpider
spider/src/mydm/middlewares/__init__.py
Python
mit
187
# -*- coding: utf-8 -*- # © 2016 Comunitea - Kiko Sanchez <kiko@comunitea.com> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError class PurchaseOrder(models.Model): _inherit = 'purchase.order' harbor...
Comunitea/CMNT_00098_2017_JIM_addons
shipping_container/models/stock_picking.py
Python
agpl-3.0
2,127
#!/usr/bin/python ''' Study NJFET Saturation currents, and their dependence on gate voltage can be easily visualized. ''' from __future__ import print_function import time,sys,os from SEEL_Apps.utilitiesClass import utilitiesClass from .templates import ui_NFET as NFET from PyQt4 import QtCore, QtGui import pyqtgra...
jithinbp/SEELablet-apps
seel_res/GUI/B_ELECTRONICS/A_BJT_AND_FET/D_transistorCB.py
Python
gpl-3.0
3,685
x = int("100") + 25 print "X:", x y = "100" + str(25); print "Y:", y z = int("sam") + 25; print "Z:", z
csev/wa4e
lectures/PHP-01-Overview/cast.py
Python
bsd-2-clause
104
# coding=utf-8 __author__ = 'André Meneghelli' """ /******************************************************************************* * Aluno: André Meneghelli Vale, Núm. USP: 4898948 * Curso: Bacharelado em Ciências da Computação * Aula 12 - Turn for MEGA * MAC0327 -- IME/USP, -- Prof. Cristina Gomes Fernande...
andredalton/bcc
2015/MAC0327/Desafios 2/p5.py
Python
apache-2.0
672
#!/usr/bin/env python # Copyright 2013-2014 by Christopher C. Little import re, sys files = sys.argv[1:] if not files: print 'Usage: ' + sys.argv[0] + ' <canon.h-style file(s)>' exit() for fn in files: f = open(fn).readlines() booksChapters = 0 vmChapters = 0 inBooks = False inVm = Fa...
chrislit/versification
validate_v11n.py
Python
gpl-3.0
1,483
#!/usr/bin/env python3 # generate 'mandel_grid.vtr' first ! import vtk # source r = vtk.vtkXMLRectilinearGridReader() r.SetFileName('mandel_grid.vtr') # mapper mandelMapper = vtk.vtkDataSetMapper() mandelMapper.SetInputConnection(r.GetOutputPort()) mandelMapper.SetScalarModeToUsePointFieldData() mandelMapper.SelectC...
dubrayn/dubrayn.github.io
examples/vtk/vtk_load_grid.py
Python
mit
784
# -*- coding: utf-8 -*- from openerp import models, fields, api class SaleOrder(models.Model): _inherit = 'sale.order' state = fields.Selection(selection_add=[('valorado', "Valorado")])
sandrafig/addons
sales_state/models/sale_order.py
Python
agpl-3.0
197
from kivy.app import App class LangApp(App): pass if __name__=="__main__": LangApp().run()
pd-Shah/kivy
4-kv_lang/kv_lang.py
Python
gpl-3.0
101
""" Command to back-populate domain of the site the user account was created on. """ from __future__ import absolute_import import six from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.management.base import BaseCommand, CommandError from student.models import R...
ESOedX/edx-platform
common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py
Python
agpl-3.0
3,308
# 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, ...
googlefonts/picosvg
src/picosvg/svg_reuse.py
Python
apache-2.0
9,935
from flask import Flask, request, jsonify, abort, make_response import time from datetime import datetime import boto3 import sys import os import requests import json import decimal from threading import Timer from flask_httpauth import HTTPBasicAuth auth = HTTPBasicAuth() app = Flask(__name__) here =...
abhijith0505/GoChat
services/api.py
Python
mit
6,110
mcinif='mcini_gen2a' runname='gen_test2220k' mcpick='gen_test2a.pickle' pathdir='/beegfs/work/ka_oj4748/echoRD' wdir='/beegfs/work/ka_oj4748/gen_tests' update_prec=0.01 update_mf='07moist.dat' update_part=100 import sys sys.path.append(pathdir) import run_echoRD as rE rE.echoRD_job(mcinif=mcinif,mcpick=mcpick,runname...
cojacoo/testcases_echoRD
gen_test2220k.py
Python
gpl-3.0
439
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf.urls.static import static from django.conf import settings from C4CApplication.views.SearchJobView import SearchJobView from C4CApplication.views.AccountStatsView import AccountStatsView from C4CApplication.views.Crea...
dsarkozi/care4care-sdp-grp4
Care4Care/Care4Care/urls.py
Python
agpl-3.0
6,493
# Copyright (c) 2018 PaddlePaddle 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 app...
gongweibao/cloud
doc/edl/experiment/python/case2.py
Python
apache-2.0
2,006
#!/usr/bin/python import usb.core import usb.util import serial import socket from escpos import * from constants import * from exceptions import * from time import sleep class Usb(Escpos): """ Define USB printer """ def __init__(self, idVendor, idProduct, interface=0, in_ep=0x82, out_ep=0x01): """ ...
vileopratama/vitech
src/addons/hw_escpos/escpos/printer.py
Python
mit
6,802
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() setup( name='infoblox', version='1.2', description='The module implements Infoblox IPAM API via REST API', long_description=README, license...
lcorsini/Infoblox-API-Python
setup.py
Python
apache-2.0
430
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 PC Solutions (<http://pcsol.be>). All Rights Reserved # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free...
crmccreary/openerp_server
openerp/addons/point_of_sale/account_bank_statement.py
Python
agpl-3.0
3,115
#!/usr/bin/python3 from test_shared import * COMPORT_NAME = "com22" #logging levels CONSOLE_LOGGER_LEVEL = logging.INFO LOGGER_LEVEL = logging.INFO SIM_MODULE_PIN = "1111" def main(): """ Test IMEI (serial number) retrieving from SIM 900 module. :return: true if everyth...
FindYourGrind/sim-module
test_imei_retrieving.py
Python
mit
1,742
#!/usr/bin/env python # encoding: utf-8 """ File: sidebar_gallery.py Author: Florian Wagner <fwagner@gfz-potsdam.de> Description: Add all examples/tutorials to sidebar gallery Created on: 2013-10-13 """ from __future__ import print_function import os, re from glob import glob from os.path import abspath, join, dirnam...
KristoferHellman/gimli
doc/sidebar_gallery.py
Python
gpl-3.0
3,907
#!/usr/bin/python # Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
eatbyte/Swift
test/functional/test_account.py
Python
apache-2.0
33,819
# 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 ...
lmazuel/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/cluster_upgrade_description_object.py
Python
mit
5,840
"""Component that will help set the Dlib face detect processing.""" import logging import io from homeassistant.core import split_entity_id # pylint: disable=unused-import from homeassistant.components.image_processing import PLATFORM_SCHEMA # noqa from homeassistant.components.image_processing import ( ImageProc...
MartinHjelmare/home-assistant
homeassistant/components/dlib_face_detect/image_processing.py
Python
apache-2.0
1,961
import re import urllib.parse def sanitizer_1(source): items_were_deleted = True while items_were_deleted: start_length = len(source) source = ''.join(re.split(r'<\s*split\s*>', source)) source = source[:50] source = ''.join(source.split('"')) items_were_deleted = len...
kerkeslager/sandbox
bad_sanitizers/bad_sanitizers.py
Python
mit
419
#! /usr/bin/env python # ========================================================================== # Generate COMPTEL database from HEASARC archive # # Copyright (C) 2022 Juergen Knoedlseder # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
ctools/ctools
modules/comscripts/comgendb.py
Python
gpl-3.0
70,328
from .utils import * del utils
hamid-m/NavPy
navpy/utils/__init__.py
Python
bsd-3-clause
31
""" WSGI config for my project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "filebrowsertest.settings") from django.cor...
agushuley/gu-django-filebrowser-no-grappelli
filebrowsertest/wsgi.py
Python
bsd-3-clause
392
import abc from typing import Callable, Iterable, TypeVar, Generic, List import amino # NOQA from amino.tc.apply import Apply from amino.func import I from amino.tc.base import tc_prop from amino.tc.apply_n import ApplyN F = TypeVar('F') G = TypeVar('G') A = TypeVar('A') B = TypeVar('B') class FlatMap(Apply, Apply...
tek/amino
amino/tc/flat_map.py
Python
mit
1,825
""" Test helper functions from numba.numpy_support. """ from __future__ import print_function import sys import numpy as np import numba.unittest_support as unittest from numba import config, numpy_support, types from .support import TestCase, skip_on_numpy_16 class TestFromDtype(TestCase): def test_number_t...
ssarangi/numba
numba/tests/test_numpy_support.py
Python
bsd-2-clause
12,931
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from datetime import datetime, date from optionaldict import optionaldict from wechatpy.client.api.base import BaseWeChatAPI class WeChatWiFi(BaseWeChatAPI): API_BASE_URL = 'https://api.weixin.qq.com/bizwifi/' def list_shops(s...
chenjiancan/wechatpy
wechatpy/client/api/wifi.py
Python
mit
5,576
# (c) 2016 Red Hat Inc. # (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 = """ --- author: Ansible Networking Team connection: netconf short_desc...
jimi-c/ansible
lib/ansible/plugins/connection/netconf.py
Python
gpl-3.0
11,295
i=10 d=2.5 s="HackerRank" # Declare second integer, double, and String variables. ii=int(raw_input()) dd=float(raw_input()) ss=raw_input() # Read and save an integer, double, and String to your variables. # Print the sum of both integer variables on a new line. print i+ii # Print the sum of the double variables on a n...
kumarisneha/practice_repo
hackerrank/hackerrank_datatype.py
Python
mit
467
import numpy as np import math import random class FCM: """ This algorithm is from the paper "FCM: The fuzzy c-means clustering algorithm" by James Bezdek Here we will use the Euclidean distance Pseudo code: 1) Fix c, m, A c: n_clusters m: 2 by default ...
ahmad88me/tada
tadacode/clustering/fuzzy_clustering.py
Python
mit
10,374
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Red Hat, inc # Written by Seth Vidal # based on the mount modules from salt and puppet # 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 __metacl...
tsdmgz/ansible
lib/ansible/modules/system/mount.py
Python
gpl-3.0
20,431
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # <LicenseText> # # ~~~~~~~~~...
bmi-forum/bmi-pyre
pythia-0.8/packages/pulse/tests/signon.py
Python
gpl-2.0
867
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('opensky', '0012_auto_20150327_1057'), ] operations = [ migrations.CreateModel( name='SocialWidget', ...
pinballwizard/service-partner
opensky/migrations/0013_auto_20150328_1158.py
Python
gpl-2.0
1,034
#!/opt/local/bin/python # coding: utf8 import os def fileOpen( name, mode ): """ Create the path to the file to be written is it does not exists""" if '/' in name and mode == 'w': os.makedirs(os.path.dirname(name), exist_ok=True) f = open ( name, mode ) return f def isContai...
AlexandreBiguet/NJLlikeModels
PythonStuffs/utils.py
Python
gpl-3.0
1,367
# -*- coding: utf-8 -*- """Plist plugin related functions and classes for testing.""" from __future__ import unicode_literals from plaso.storage.fake import writer as fake_writer from plaso.containers import sessions from plaso.parsers import plist from tests.parsers import test_lib class PlistPluginTestCase(test_...
rgayon/plaso
tests/parsers/plist_plugins/test_lib.py
Python
apache-2.0
2,289
from __future__ import unicode_literals import datetime import decimal import hashlib import logging from time import time from django.conf import settings from django.utils.encoding import force_bytes from django.utils.timezone import utc logger = logging.getLogger('django.db.backends') class CursorWrapper(objec...
Bashar/django
django/db/backends/utils.py
Python
bsd-3-clause
6,295
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Red Hat, inc # Written by Seth Vidal # based on the mount modules from salt and puppet # # 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 ...
stianvi/ansible-modules-core
system/mount.py
Python
gpl-3.0
12,181
import sys, os, binascii, imp, shutil from . import __version__ from . import ffiplatform class Verifier(object): def __init__(self, ffi, preamble, tmpdir=None, modulename=None, ext_package=None, tag='', force_generic_engine=False, **kwds): self.ffi = ffi self.preamble = preamble...
bussiere/pypyjs
website/demo/home/rfk/repos/pypy/lib_pypy/cffi/verifier.py
Python
mit
8,306
# Principal Component Analysis Code : from numpy import mean,cov,double,cumsum,dot,linalg,array,rank,size,flipud from pylab import * import numpy as np import matplotlib.pyplot as pp #from enthought.mayavi import mlab import scipy.ndimage as ni import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import ro...
tapomayukh/projects_in_python
sandbox_tapo/src/skin_related/BMED_8813_HAP/Scaling/results/cross_validate_categories_BMED_8813_HAP_scaled_method_I.py
Python
mit
4,026
# Author: Nicolas VERDIER # This file is part of memorpy. # # memorpy 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. # # memorpy is di...
aidatorajiro/memgame
memorpy/MemWorker.py
Python
gpl-3.0
8,260
def parser(i): idx = i dep = s[i].count('.') i += 1 arr = [] while i < N and s[i].count(".") > dep: if "+" in s[i] or "*" in s[i]: num, i = parser(i) arr.append(num) else: arr.append(int(s[i].replace('.', ''))) i += 1 if "+" in s[idx]: ...
knuu/competitive-programming
aoj/16/aoj1602.py
Python
mit
627
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import os import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management.base import BaseCommand, CommandError from django.template import loader ...
sgaist/django-haystack
haystack/management/commands/build_solr_schema.py
Python
bsd-3-clause
6,850
""" MagickaWizard class for the Magicka problem for Google Code Jam 2011 Qualification Link to problem description: http://code.google.com/codejam/contest/975485/dashboard#s=p1 author: Christos Nitsas (chrisn654) language: Python 3.2.1 date: April, 2012 """ import collections class MagickaWizard: """ A...
nitsas/codejamsolutions
Magicka/MagickaWizard.py
Python
mit
2,332
import logging import json from flask import Blueprint, render_template, redirect # internal imports from config import ConfigClass logger = logging.getLogger() site_blueprint = Blueprint('site', __name__, url_prefix='/') ########################################################################## #--- UI Routes ###...
iSIGHTPartners/macaroni_server
server/web/views.py
Python
gpl-3.0
988
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import hmac from cryptography.hazmat.bindings._constant_time import lib ...
ARMmbed/yotta_osx_installer
workspace/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py
Python
apache-2.0
798