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
# -*- coding: utf-8 -*- """ /*************************************************************************** TopoDelProp A QGIS plugin TopoDelProp ------------------- begin : 2011-12-19 copyright : (C) 2011 by...
gasparmoranavarro/TopoDelProp
ctr/ctrSelEsquema.py
Python
gpl-2.0
7,104
# -*- coding: utf-8 -*- from Plugins.Extensions.MediaPortal.plugin import _ from Plugins.Extensions.MediaPortal.resources.imports import * def promptfile(self, data, url): if re.search('http://www.promptfile.com/file', data): self.promptfilePost(data) else: chash = re.findall('type="hidden".*?"chash".*?name\s*=...
schleichdi2/OpenNfr_E2_Gui-6.0
lib/python/Plugins/Extensions/MediaPortal/resources/hosters/promptfile.py
Python
gpl-2.0
1,248
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-11 13:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Image'...
hehaichi/django-imagemanagement
imagemanagement/migrations/0001_initial.py
Python
mit
721
import os path = os.path.dirname(os.path.realpath(__file__)) sbmlFilePath = os.path.join(path, 'MODEL1006230011.xml') with open(sbmlFilePath,'r') as f: sbmlString = f.read() def module_exists(module_name): try: __import__(module_name) except ImportError: return False else: ret...
biomodels/MODEL1006230011
MODEL1006230011/model.py
Python
cc0-1.0
427
from django import forms from books.models import Book class NewBookForm(forms.ModelForm): class Meta: model = Book exclude = ('deleted', 'content_type', 'object_id', 'tribes', 'created')
dongguangming/django-books
forms.py
Python
bsd-3-clause
230
""" ============== Edge operators ============== Edge operators are used in image processing within edge detection algorithms. They are discrete differentiation operators, computing an approximation of the gradient of the image intensity function. """ import numpy as np import matplotlib.pyplot as plt from skimage.d...
pratapvardhan/scikit-image
doc/examples/edges/plot_edge_filter.py
Python
bsd-3-clause
2,909
# -*- coding: iso-8859-1 -*- """ MoinMoin - migration from base rev 1060300 Nothing to do, we just return the new data dir revision. @copyright: 2008 by Thomas Waldmann @license: GNU GPL, see COPYING for details. """ def execute(script, data_dir, rev): return 1060400
RealTimeWeb/wikisite
MoinMoin/script/migration/1060300.py
Python
apache-2.0
292
#!/usr/bin/env python3 """SSH into a running appliance and configure security. Configures security on appliance(s) according to this document: https://access.redhat.com/articles/1124753 Works for single appliance and distributed appliance configurations. In distributed configurations, provide the hostname of the repl...
ManageIQ/integration_tests
scripts/harden_security.py
Python
gpl-2.0
5,968
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name="EQTransformer", author="S. Mostafa Mousavi", version="0.1.61", author_email="smousavi05@gmail.com", description="A python package for making and using attentive deep-learnin...
smousavi05/EQTransformer
setup.py
Python
mit
1,037
'''OpenGL extension EXT.texture_env_combine This module customises the behaviour of the OpenGL.raw.GL.EXT.texture_env_combine to provide a more Python-friendly API Overview (from the spec) New texture environment function COMBINE_EXT allows programmable texture combiner operations, including: REPLACE ...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/GL/EXT/texture_env_combine.py
Python
lgpl-3.0
1,682
"""Imports for Python API. This file is MACHINE GENERATED! Do not edit. Generated by: tensorflow/tools/api/generator/create_python_api.py script. """ from tensorflow.python import constant_initializer as constant from tensorflow.python import global_variables_initializer as global_variables from tensorflow.python impo...
ryfeus/lambda-packs
Keras_tensorflow_nightly/source2.7/tensorflow/tools/api/generator/api/initializers/__init__.py
Python
mit
1,088
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
sanguinariojoe/FreeCAD
src/Mod/Draft/draftmake/make_text.py
Python
lgpl-2.1
7,940
import logging from flask import Flask from honeybadger.contrib import FlaskHoneybadger from blueprint import simple_page logger = logging.getLogger(__name__) app = Flask(__name__) app.config['HONEYBADGER_ENVIRONMENT'] = 'honeybadger-example' app.config['HONEYBADGER_API_KEY'] = '<your key>' app.config['HONEYBADGER_...
honeybadger-io/honeybadger-python
examples/flask-blueprint/app.py
Python
mit
454
''' Doc... @author: kmu @since: 16. nov. 2010 ''' # Built-in import time import datetime # Additional from numpy import arange from netCDF4 import Dataset, num2date, date2num # Own from pysenorge.tools.date_converters import iso2datetime from pysenorge.set_environment import timeunit, default_UM4_width,\...
kmunve/pysenorge
pysenorge/tools/clone_netCDF.py
Python
gpl-3.0
3,835
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Converts text files into randomized sequences which cannot be translated without the seed value. """ import cPickle as pkl import numpy as np import os import nltk import nltk.data import codecs import sys """ take in raw text, converts each sentence to list of l...
eelanagaraj/IST_project
text_processing/text_preprocessing.py
Python
mit
2,943
""" Copyright (C) 2011 Jon Macey 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 distrib...
NCCA/NGL6Demos
PointBake/ImportExportScripts/NCCAPointBakeMayaExport.py
Python
gpl-2.0
9,250
import unittest from checkQC.handlers.cluster_pf_handler import ClusterPFHandler from tests.test_utils import get_stats_json from tests.handlers.handler_test_base import HandlerTestBase class TestClusterPFHandler(HandlerTestBase): def setUp(self): key = "ConversionResults" qc_config = {'name': ...
monikaBrandt/checkQC
tests/handlers/test_cluster_pf_handler.py
Python
gpl-3.0
2,350
""" Template for Characters Copy this module up one level and name it as you like, then use it as a template to create your own Character class. To make new logins default to creating characters of your new type, change settings.BASE_CHARACTER_TYPECLASS to point to your new class, e.g. settings.BASE_CHAR...
YourCyborg/Sun-RPI
game/gamesrc/objects/examples/character.py
Python
bsd-3-clause
1,578
#!/usr/bin/env python """ http://adventofcode.com/day/24 Part 1 ------ It's Christmas Eve, and Santa is loading up the sleigh for this year's deliveries. However, there's one small problem: he can't get the sleigh to balance. If it isn't balanced, he can't defy physics, and nobody gets presents this year. No pressure...
rnelson/adventofcode
advent2015/partial_day24.py
Python
mit
4,689
# Pygame spritesheet example # Licensed under LGPLv3 # This class handles sprite sheets # This was taken from www.scriptefun.com/transcript-2-using # sprite-sheets-and-drawing-the-background # I've added some code to fail if the file wasn't found.. # Note: When calling images_at the rect is the format: # (x, y, x + of...
adalbas/sfgame
sfgame/game/spritesheet.py
Python
apache-2.0
4,014
"""cl.utils""" from __future__ import absolute_import import operator from importlib import import_module from itertools import imap, ifilter from kombu.utils import cached_property # noqa __all__ = ["force_list", "flatten", "get_cls_by_name", "instantiate", "cached_property"] def force_list(obj): ...
pexip/os-python-cl
cl/utils/__init__.py
Python
bsd-3-clause
2,587
"""ber_serkr URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
rawenihcam/BER-SERKR
ber_serkr/urls.py
Python
mit
867
#!/usr/bin/env python from nose.tools import * from nose import SkipTest import networkx as nx class TestFlowClosenessCentrality(object): numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): global np try: import numpy as np ...
cmtm/networkx
networkx/algorithms/centrality/tests/test_current_flow_closeness.py
Python
bsd-3-clause
1,387
# -*- coding: utf-8 -*- # # Copyright 2017 Ricequant, 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 ...
xclxxl414/rqalpha
rqalpha/api/names.py
Python
apache-2.0
2,048
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
quanvm009/codev7
openerp/addons/stock/stock.py
Python
agpl-3.0
164,671
"""Camera platform that receives images through HTTP POST.""" import logging import asyncio from collections import deque from datetime import timedelta import voluptuous as vol import aiohttp import async_timeout from homeassistant.components.camera import Camera, PLATFORM_SCHEMA,\ STATE_IDLE, STATE_RECORDING fr...
MartinHjelmare/home-assistant
homeassistant/components/push/camera.py
Python
apache-2.0
5,809
#!/usr/bin/env python3 # coding: utf-8 """Plotting and analysis tools for the ARTIS 3D supernova radiative transfer code.""" import datetime import os import sys from setuptools import find_packages, setup from setuptools.command.test import test as TestCommand from artistools import console_scripts class PyTest(...
lukeshingles/artistools
setup.py
Python
mit
1,709
import lib.solutions.pbs.modelParameters as parameters import lib.interface import lib.spice import lib.files.measurements import lib.plot.formatter import scipy.optimize import matplotlib.pyplot as plt import numpy as np import time import sys import math #===========================================================...
MarkHedleyJones/Electrode_Interface_Model
model.py
Python
mit
11,822
#! /usr/bin/python import subprocess, argparse import logging, sys #Usage python generateData.py allConfigurationsFile begin_configuration_index ram_value ram_level_value resultFileWithPath iterations # def writeToFile(i, user, j, time_now, f1,f2,f3,f4,f5,f6,r1,f_output): # ram, cpu_freq, cpu_freq_governor, num_cor...
KajuBadaam/performance-meter
generateData.py
Python
gpl-2.0
2,985
# 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...
brchiu/tensorflow
tensorflow/python/kernel_tests/scatter_ops_test.py
Python
apache-2.0
11,256
import re import subprocess import weakref from scrapy.contrib.pipeline.files import FilesPipeline from scrapy.exceptions import DropItem from scrapy.utils.httpobj import urlparse_cached from twisted.internet import threads class SlideDefaults(object): """Set up defaults items.""" def process_item(self, ite...
rolando/scrapy-slidebot
slidebot/pipelines.py
Python
mit
2,428
data = ( 'Hai ', # 0x00 'Ren ', # 0x01 'Tian ', # 0x02 'Jiao ', # 0x03 'Jia ', # 0x04 'Bing ', # 0x05 'Yao ', # 0x06 'Tong ', # 0x07 'Ci ', # 0x08 'Xiang ', # 0x09 'Yang ', # 0x0a 'Yang ', # 0x0b 'Er ', # 0x0c 'Yan ', # 0x0d 'Le ', # 0x0e 'Yi ', # 0x0f 'Can ', # 0x10 '...
avian2/unidecode
unidecode/x099.py
Python
gpl-2.0
4,627
#!/home/paulk/software/bin/python from __future__ import division import sys,os,time,gzip import cPickle,pysam,random,math import pylab from multiprocessing import Process,Queue import numpy """ Synopsis Given a GTF file of genes, txs and exons prints to stdout the union of genes' exons over all txs. """ def usage():...
polarise/RP-python
gene2exons.py
Python
gpl-2.0
2,496
# 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 ...
v-iam/azure-sdk-for-python
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/day_details.py
Python
mit
805
# coding:utf-8 ''' Created on 2017/11/22. @author: chk01 ''' import argparse import os import matplotlib.pyplot as plt from matplotlib.pyplot import imshow import scipy.io import scipy.misc import numpy as np import pandas as pd import PIL import tensorflow as tf from keras import backend as K from keras.layers import...
sunyihuan326/DeltaLab
Andrew_NG_learning/class_four/week_three/Dxq_1.py
Python
mit
3,398
from cProfile import run from reg import dispatch from reg import LruCachingKeyLookup def get_key_lookup(r): return LruCachingKeyLookup( r, component_cache_size=5000, all_cache_size=5000, fallback_cache_size=5000, ) @dispatch(get_key_lookup=get_key_lookup) def args0(): ra...
morepath/reg
profdispatch.py
Python
bsd-3-clause
1,317
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, fields, api import bas...
barct/odoo-coop
infocoop_afip_patch/models/infocoop_tab_fact.py
Python
gpl-3.0
4,487
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
jgao54/airflow
airflow/contrib/hooks/emr_hook.py
Python
apache-2.0
1,979
# # Module implementing synchronization primitives # # multiprocessing/synchronize.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = [ 'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition', 'Event' ] import threading import sys import tempfile impor...
kenshay/ImageScript
Script_Runner/PYTHON/Lib/multiprocessing/synchronize.py
Python
gpl-3.0
11,587
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test account RPCs. RPCs tested are: - getaccountaddress - getaddressesbyaccount - listaddressgr...
faircoin/faircoin
test/functional/wallet-accounts.py
Python
mit
5,091
#!/usr/bin/env python # # Copyright (c) 2010-2019 Jon Parise <jon@indelible.org> # # 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 rights...
jparise/stale
stale.py
Python
mit
5,905
# Copyright 2010 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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.apach...
shhui/nova
nova/api/openstack/compute/servers.py
Python
apache-2.0
61,915
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, print_function) __license__ = 'GPL v3' __copyright__ = '2015, Jim Miller' __docformat__ = 'restructuredtext en' import re try: from PyQt5.Qt import (Qt, QSyntaxHighlighter, QTextCharFormat, QBrush) ...
PlushBeaver/FanFicFare
calibre-plugin/basicinihighlighter.py
Python
gpl-3.0
2,295
#Boss Ogg - A Music Server #(c)2003 by Ted Kulp (wishy@comcast.net) #This project's homepage is: http://bossogg.wishy.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 2 of the L...
tedkulp/bossogg
boss3/xmlrpc/Util.py
Python
gpl-2.0
1,506
#UDP Class #UDP Server stuff import threading from threading import Thread import socket import time UDPBufferSize = 1024 #UDP Data buffer size in bytes class UDP(threading.Thread): """docstring for UDP""" def __init__(self, UDPIp, UDPPort, Callback): threading.Thread.__init__(self) self.CallbackFunction = Cal...
snowdenator/EarlHomeAutomation
GenV/Software/Server/Refactored Code/udp.py
Python
mit
683
from . import current def use_executor(executor): current.process = executor def current_executor(): return current.process
ducksboard/libsaas
libsaas/executors/base.py
Python
mit
136
# # Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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 Lice...
phw/weblate
weblate/wladmin/tests.py
Python
gpl-3.0
13,318
#!/usr/bin/env python import socket import struct import stkuser from stkutil import running, socklist, updateinfo STK_SERVER_PORT = 9007 STK_MAX_CLIENTS = 30 STK_MAX_PACKET_SIZE = 65535 STK_MAGIC = 'ST' STK_VERSION = 0x0001 STK_CLIENT_FLAG = 0x00 STK_SERVER_FLAG = 0x01 STK_END = 0x07 COMMANDS =...
sharmer/sixtalk
stkserver/python/stksocket.py
Python
gpl-2.0
8,920
# Copyright (c) 2014 Andrew Kerr # Copyright (c) 2015 Alex Meade # Copyright (c) 2015 Rushil Chugh # Copyright (c) 2015 Yogesh Kshirsagar # Copyright (c) 2015 Michael Price # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
Paul-Ezell/cinder-1
cinder/tests/unit/volume/drivers/netapp/eseries/test_library.py
Python
apache-2.0
54,418
import numpy as np class Perceptron(object): def __init__(self, bias=0, eta=0.1, epoch=10): self.bias = bias self.eta = eta self.epoch = epoch def net_input(self, x): return self.weights[0] + np.dot(x, self.weights[1:]) def fit(self, X, y): self.weights = np.z...
jeancochrane/learning
python-machine-learning/code/algos/perceptron.py
Python
mit
984
from flask_script import Command, Option from skylines.database import db from skylines.model import Airport from skylines.lib.waypoints.welt2000 import get_database from datetime import datetime from sqlalchemy.sql.expression import or_, and_ class Welt2000(Command): """ Import all airports from the WELT2000 pr...
shadowoneau/skylines
skylines/commands/import_/welt2000.py
Python
agpl-3.0
5,171
from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification import base64 import json log = CPLog(__name__) class Pushbullet(Notification): url = 'https://api.p...
rooi/CouchPotatoServer
couchpotato/core/notifications/pushbullet/main.py
Python
gpl-3.0
2,483
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: fix_standarderror.py """Fixer for StandardError -> Exception.""" from .. import fixer_base from ..fixer_util import Name class FixStandarderror(fixe...
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/lib2to3/fixes/fix_standarderror.py
Python
unlicense
519
import _plotly_utils.basevalidators class CmidValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scatterpolargl.marker", **kwargs ): super(CmidValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
plotly/plotly.py
packages/python/plotly/plotly/validators/scatterpolargl/marker/_cmid.py
Python
mit
474
from typing import List from hwtHls.netlist.nodes.io import HlsNetNodeExplicitSync, HlsNetNodeRead, HlsNetNodeWrite from hwtHls.netlist.nodes.node import HlsNetNode from hwtHls.netlist.transformation.hlsNetlistPass import HlsNetlistPass from itertools import chain class HlsNetlistPassMergeExplicitSync(HlsNetlistPass...
Nic30/hwtHls
hwtHls/netlist/transformation/mergeExplicitSync.py
Python
mit
3,384
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP s.a. (<http://www.openerp.com>). # Copyright (C) 2012-TODAY Mentis d.o.o. (<http://www.mentis.si/openerp>) # # This program i...
codeback/openerp-purchase_landing_costs
__openerp__.py
Python
agpl-3.0
1,849
"""Mixin class for handling connection state changes.""" import logging from homeassistant.helpers.event import async_call_later _LOGGER = logging.getLogger(__name__) TIME_MARK_DISCONNECTED = 10 class ConnectionStateMixin: """Base implementation for connection state handling.""" def __init__(self): ...
partofthething/home-assistant
homeassistant/components/harmony/connection_state.py
Python
apache-2.0
1,550
""" Helper file to manage translations for the Meerkat Authentication module. We have two types of translations, general and implementation specific The general translations are extracted from the python, jijna2 and js files. """ from csv import DictReader import argparse import os import shutil import datetime f...
meerkat-code/meerkat_auth
translate.py
Python
mit
1,780
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer.testing import attr from chainer.testing import condition if cuda.available: cuda.init() class TestNonparameterizedConvolution2D(unittest.TestCase): def setUp...
tereka114/chainer
tests/functions_tests/test_nonparameterized_convolution_2d.py
Python
mit
3,032
# (C) British Crown Copyright 2012 - 2014, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
Jozhogg/iris
lib/iris/tests/test_abf.py
Python
lgpl-3.0
2,149
# pylint: disable=unicode-format-string """ Defines the URL routes for this app. NOTE: These views are deprecated. These routes are superseded by ``/api/user/v1/accounts/{username}/image``, found in ``openedx.core.djangoapps.user_api.urls``. """ # pylint: enable=unicode-format-string from __future__ import absolute_...
ESOedX/edx-platform
openedx/core/djangoapps/profile_images/urls.py
Python
agpl-3.0
784
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
karllessard/tensorflow
tensorflow/python/ops/parallel_for/control_flow_ops_test.py
Python
apache-2.0
74,341
# 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/scheduler/azure-mgmt-scheduler/azure/mgmt/scheduler/models/_models.py
Python
mit
43,628
# Copyright (c) 2017 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import Qt from UM.Application import Application from UM.Qt.ListModel import ListModel from UM.PluginRegistry import PluginRegistry class ToolModel(ListModel): IdRole = Qt.UserRole + 1 NameR...
thopiekar/Uranium
UM/Qt/Bindings/ToolModel.py
Python
lgpl-3.0
3,001
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/paramiko/server.py
Python
bsd-3-clause
30,482
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
ascherbakoff/ignite
modules/ducktests/tests/checks/utils/check_enum_constructible.py
Python
apache-2.0
2,219
from PyQt4.QtGui import * from PyQt4.QtCore import * from subprocess import Popen,PIPE from scapy.all import * from Dns_Func import frm_dhcp_Attack import threading from os import popen,system,getuid,path,makedirs,getcwd from re import search,compile,match from Core.Settings import frm_Settings from Modules.fuc_airodu...
hackerbolt-freelancer/PEH-wifi-attack
Modules/deauth_func.py
Python
mit
15,370
from deap_algorithm import DeapAlgorithm import numpy as np import random from deap import base from deap import creator from deap import tools ####Parameter #Num_evaluations class RandomSampler(DeapAlgorithm): def __init__(self): super(RandomSampler, self).__init__() self.bootstrap_...
ForsvaretsForskningsinstitutt/Paper-NLLS-speedup
algorithms/random_sampler.py
Python
gpl-3.0
1,799
from test.fixtures import make_test_env, make_fake_space from wsgi_intercept import httplib2_intercept import wsgi_intercept import httplib2 import simplejson from base64 import b64encode from tiddlyweb.model.bag import Bag from tiddlyweb.model.tiddler import Tiddler from tiddlyweb.model.user import User def setup...
FND/tiddlyspace
test/test_mapspace.py
Python
bsd-3-clause
3,636
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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; eith...
arunkgupta/gramps
gramps/gen/filters/rules/place/_hascitation.py
Python
gpl-2.0
1,939
# # Copyright (c) 2011 xGrab Development Team # # This file is part of xGrab # # xGrab 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. ...
EverlastingFire/xGrab
xgrab/gui.py
Python
gpl-3.0
1,116
#!/usr/bin/env python # coding: utf-8 from __future__ import ( print_function, unicode_literals, absolute_import ) import argparse import json import os def get_path(): return unicode(os.path.abspath('.')) def parse_args(): _parser = argparse.ArgumentParser() _parser.add_argument('--fixtur...
IuryAlves/code-challenge
app/load_data.py
Python
mit
1,329
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
ConeyLiu/spark
python/pyspark/tests/test_rdd.py
Python
apache-2.0
37,267
#! usr/bin/python3 # -*- coding: utf-8 -*- # # Flicket - copyright Paul Bourne: evereux@gmail.com from flask import url_for from application import app class PaginatedAPIMixin(object): @staticmethod def to_collection_dict(query, page, per_page, endpoint, **kwargs): resources = query.paginate(page, ...
evereux/flicket
application/flicket_api/scripts/paginated_api.py
Python
mit
1,203
# -*- encoding: utf-8 -*- import io from datetime import date from decimal import Decimal from django.apps import apps from django.conf import settings from django.core.files.base import ContentFile from django.db import transaction from reportlab.lib import colors from reportlab.lib.pagesizes import A4 from reportl...
pkimber/invoice
invoice/service.py
Python
apache-2.0
16,089
import os import sys import re import glob import time import json import logging import internetarchive from internetarchive.config import parse_config_file from datetime import datetime from yt_dlp import YoutubeDL from .utils import (sanitize_identifier, check_is_file_empty, EMPTY_ANNOTATION_FIL...
bibanon/tubeup
tubeup/TubeUp.py
Python
gpl-3.0
21,687
# class generated by DeVIDE::createDeVIDEModuleFromVTKObject from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class vtkMultiGroupProbeFilter(SimpleVTKClassModuleBase): def __init__(self, module_manager): SimpleVTKClassModuleBase.__init__( self, module_manager, ...
nagyistoce/devide
modules/vtk_basic/vtkMultiGroupProbeFilter.py
Python
bsd-3-clause
517
from ._plntll_ec import EcuaciónEdad class FuncDías(EcuaciónEdad): """ Edad por día. """ nombre = 'Días' def eval(símismo, paso, sim): return paso
julienmalard/Tikon
tikon/móds/rae/orgs/ecs/edad/días.py
Python
agpl-3.0
184
#!/usr/bin/env python # Copyright 2021 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This is generated, do not edit. Update BuildConfigGenerator.groovy and # 3ppFetch.template instead. from __future__ import print_fun...
nwjs/chromium.src
third_party/android_deps/libs/com_google_android_datatransport_transport_api/3pp/fetch.py
Python
bsd-3-clause
1,383
from django.conf.urls import url from . import views urlpatterns = [ url(r'^result', views.result, name='result'), url(r'^$', views.index, name='index'), ]
mosmeh/danbooru-prediction
prediction/urls.py
Python
mit
165
import socket try: import requests httplib2 = None except ImportError: requests = None try: import httplib2 except ImportError: raise ImportError('No module named requests or httplib2') ConnectionError = requests.exceptions.ConnectionError if requests else socket.error def wrap_...
tow/sunburnt
sunburnt/http.py
Python
mit
1,389
import subprocess from datetime import datetime, timedelta from i3pystatus import IntervalModule from i3pystatus.core.desktop import DesktopNotification STOPPED = 0 RUNNING = 1 BREAK = 2 class Pomodoro(IntervalModule): """ This plugin shows Pomodoro timer. Left click starts/restarts timer. Right c...
facetoe/i3pystatus
i3pystatus/pomodoro.py
Python
mit
4,203
import re import abc import asyncio import contextlib import urllib.parse as urlparse import aiohttp import pyquery from pycrawl.utils import Queue from pycrawl.http import Request from pycrawl.http import Response from pycrawl.middleware import CrawlerMiddlewareManager class Spider(metaclass=abc.ABCMeta): de...
jmcarp/pycrawl
pycrawl/crawl.py
Python
bsd-3-clause
3,966
from muntjac.api import VerticalLayout, Link from muntjac.terminal.theme_resource import ThemeResource from muntjac.terminal.external_resource import ExternalResource class LinkCurrentWindowExample(VerticalLayout): _CAPTION = 'Open Google' _TOOLTIP = 'http://www.google.com' _ICON = ThemeResource('../sam...
rwl/muntjac
muntjac/demo/sampler/features/link/LinkCurrentWindowExample.py
Python
apache-2.0
1,076
from django.shortcuts import resolve_url from django.test import TestCase from InternetSemLimites.core.models import Provider, State class TestGet(TestCase): def setUp(self): sc, *_ = State.objects.get_or_create(abbr='SC', name='Santa Catarina') go, *_ = State.objects.get_or_create(abbr='GO', nam...
InternetSemLimites/PublicAPI
InternetSemLimites/api/tests/test_shame_view.py
Python
mit
1,538
import mock import nengo import numpy as np import pytest from nengo_spinnaker import utils def test_decoder_generation(): """Ensure that Decoders are only generated when absolutely necessary!""" model = nengo.Network() with model: a = nengo.Ensemble(100, 3) b = nengo.Node(lambda t, v: No...
ctn-archive/nengo_spinnaker_2014
nengo_spinnaker/utils/tests/test_decoders.py
Python
mit
8,579
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class Adms(AutotoolsPackage): """ADMS is a code generator that converts electrical compact device models speci...
LLNL/spack
var/spack/repos/builtin/packages/adms/package.py
Python
lgpl-2.1
1,052
from django.contrib.auth.models import User, Group from rest_framework import viewsets from .serializer import UserSerializer, GroupSerializer, ProfileSerializer from .models import Profile class UserViewSet(viewsets.ModelViewSet): queryset = User.objects.all().order_by('-date_joined') serializer_class = UserSerial...
Towhidn/django-boilerplate
account/api.py
Python
mit
557
# -*- coding: utf-8 -*- def uri(): valores = [] par = 0 impar = 0 positivo = 0 negativo = 0 for i in range(0, 5): valores.append(input()) if(float(valores[i]) % 2 == 0): par += 1 else: impar += 1 if(float(valores[i]) > 0): positivo += 1 elif(float(valores...
gustavolcorreia/uri
iniciante/exerc1066.py
Python
apache-2.0
533
import pandas.util.testing as tm class BaseExtensionTests(object): assert_series_equal = staticmethod(tm.assert_series_equal) assert_frame_equal = staticmethod(tm.assert_frame_equal) assert_extension_array_equal = staticmethod( tm.assert_extension_array_equal )
louispotok/pandas
pandas/tests/extension/base/base.py
Python
bsd-3-clause
288
# Copyright 2016 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 appl...
anilmuthineni/tensorflow
tensorflow/contrib/learn/python/learn/experiment_test.py
Python
apache-2.0
17,120
from unittest import TestCase class TestApp(TestCase): def test_make_app(self): from pyramid.router import Router from yait.app import make_app global_settings = {} settings = {'yait.db_url': 'sqlite://', 'yait.auth.secret': 'secret', 'yait....
dbaty/Yait
yait/tests/test_app.py
Python
bsd-3-clause
553
import re # noqa import logging import argparse from slackbot_queue import slack_controller, queue # import commands here from example import Example from example2 import Example2 logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = loggin...
xtream1101/slackbot-task-queue
example/commands.py
Python
mit
3,629
#-*- coding:utf-8 -*- import csv import os.path from . import basededatos from . import scian3ramas def eliminar_tabla(): """ Eliminar tabla """ with basededatos.inegi() as bd: bd.cursor.execute("DROP TABLE IF EXISTS scian_subramas") print(" Eliminada la tabla scian_subramas si existía.") def cr...
guivaloz/INEGI
DENUE/scian/scian4subramas.py
Python
gpl-3.0
1,825
#!/usr/bin/env python # -*- coding: utf-8 -*- if __name__ == '__main__': pass
fpeder/mscr
mscr/main.py
Python
bsd-2-clause
84
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-03-20 18:12 from __future__ import unicode_literals from django.db import migrations def set_coupons_shop(apps, schema_editor): Coupon = apps.get_model("campaigns", "Coupon") for coupon_code in Coupon.objects.filter(campaign__isnull=False): ...
shoopio/shoop
shuup/campaigns/migrations/0015_set_coupon_shops.py
Python
agpl-3.0
749
import gtk import urllib from json import JSONDecoder from threading import Thread class VersionCheck: """Small class used for checking and displaying current and latest version of software detected by getting a file from project hosting site. """ URL = 'https://api.github.com/repos/MeanEYE/Sunflower/releases...
Goodmind/sunflower-fm
application/tools/version_check.py
Python
gpl-3.0
3,045
import vindinium as vin from vindinium.models import Hero, Map, Tavern, Mine __all__ = ['Game'] class Game(object): '''Represents a game. A game object holds information about the game and is updated automatically by ``BaseBot``. Attributes: id (int): the game id. max_turns (int): ma...
renatopp/vindinium-python
vindinium/models/game.py
Python
mit
4,020
# vim: set filencoding=utf8 """ Story Views @author: Mike Crute (mcrute@gmail.com) @organization: SoftGroup Interactive, Inc. @date: July 10, 2010 """ # 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 Lic...
mcrute/snakeplan
snakeplan/projects/views/stories.py
Python
apache-2.0
999
# $Id$ # # Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ Functionality for ...
rdkit/rdkit-orig
rdkit/Chem/SATIS.py
Python
bsd-3-clause
3,432